text
stringlengths 6.38k
228k
|
---|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_802A5988_7AD328
/* 41A718 802A5988 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 41A71C 802A598C AFB60028 */ sw $s6, 0x28($sp)
/* 41A720 802A5990 3C16800E */ lui $s6, %hi(gBattleStatus)
/* 41A724 802A5994 26D6C070 */ addiu $s6, $s6, %lo(gBattleStatus)
/* 41A728 802A5998 AFB50024 */ sw $s5, 0x24($sp)
/* 41A72C 802A599C 3C158011 */ lui $s5, %hi(gPlayerData)
/* 41A730 802A59A0 26B5F290 */ addiu $s5, $s5, %lo(gPlayerData)
/* 41A734 802A59A4 AFB00010 */ sw $s0, 0x10($sp)
/* 41A738 802A59A8 3C10800E */ lui $s0, %hi(gBattleSubState)
/* 41A73C 802A59AC 2610C4DC */ addiu $s0, $s0, %lo(gBattleSubState)
/* 41A740 802A59B0 AFBF0034 */ sw $ra, 0x34($sp)
/* 41A744 802A59B4 AFBE0030 */ sw $fp, 0x30($sp)
/* 41A748 802A59B8 AFB7002C */ sw $s7, 0x2C($sp)
/* 41A74C 802A59BC AFB40020 */ sw $s4, 0x20($sp)
/* 41A750 802A59C0 AFB3001C */ sw $s3, 0x1C($sp)
/* 41A754 802A59C4 AFB20018 */ sw $s2, 0x18($sp)
/* 41A758 802A59C8 AFB10014 */ sw $s1, 0x14($sp)
/* 41A75C 802A59CC F7B80048 */ sdc1 $f24, 0x48($sp)
/* 41A760 802A59D0 F7B60040 */ sdc1 $f22, 0x40($sp)
/* 41A764 802A59D4 F7B40038 */ sdc1 $f20, 0x38($sp)
/* 41A768 802A59D8 8ED700D8 */ lw $s7, 0xD8($s6)
/* 41A76C 802A59DC 8E030000 */ lw $v1, 0x0($s0)
/* 41A770 802A59E0 8ED100DC */ lw $s1, 0xDC($s6)
/* 41A774 802A59E4 10600005 */ beqz $v1, .L802A59FC_7AD39C
/* 41A778 802A59E8 2402012C */ addiu $v0, $zero, 0x12C
/* 41A77C 802A59EC 10620023 */ beq $v1, $v0, .L802A5A7C_7AD41C
/* 41A780 802A59F0 00000000 */ nop
/* 41A784 802A59F4 080A9709 */ j .L802A5C24_7AD5C4
/* 41A788 802A59F8 00000000 */ nop
.L802A59FC_7AD39C:
/* 41A78C 802A59FC 2402FFFF */ addiu $v0, $zero, -0x1
/* 41A790 802A5A00 A2C20178 */ sb $v0, 0x178($s6)
/* 41A794 802A5A04 A6C0017C */ sh $zero, 0x17C($s6)
/* 41A798 802A5A08 0C0A9606 */ jal func_802A5818_7AD1B8
/* 41A79C 802A5A0C AEC00188 */ sw $zero, 0x188($s6)
/* 41A7A0 802A5A10 104008D8 */ beqz $v0, .L802A7D74_7AF714
/* 41A7A4 802A5A14 00000000 */ nop
/* 41A7A8 802A5A18 0C093903 */ jal func_8024E40C
/* 41A7AC 802A5A1C 24040002 */ addiu $a0, $zero, 0x2
/* 41A7B0 802A5A20 0C093936 */ jal D_8024E4D8_C0BD58
/* 41A7B4 802A5A24 2404000A */ addiu $a0, $zero, 0xA
/* 41A7B8 802A5A28 8EC20000 */ lw $v0, 0x0($s6)
/* 41A7BC 802A5A2C 3C030010 */ lui $v1, (0x100000 >> 16)
/* 41A7C0 802A5A30 00431024 */ and $v0, $v0, $v1
/* 41A7C4 802A5A34 14400004 */ bnez $v0, .L802A5A48_7AD3E8
/* 41A7C8 802A5A38 2402012C */ addiu $v0, $zero, 0x12C
/* 41A7CC 802A5A3C 2402012E */ addiu $v0, $zero, 0x12E
/* 41A7D0 802A5A40 080A9709 */ j .L802A5C24_7AD5C4
/* 41A7D4 802A5A44 AE020000 */ sw $v0, 0x0($s0)
.L802A5A48_7AD3E8:
/* 41A7D8 802A5A48 C6200138 */ lwc1 $f0, 0x138($s1)
/* 41A7DC 802A5A4C C6220140 */ lwc1 $f2, 0x140($s1)
/* 41A7E0 802A5A50 E620000C */ swc1 $f0, 0xC($s1)
/* 41A7E4 802A5A54 E6220014 */ swc1 $f2, 0x14($s1)
/* 41A7E8 802A5A58 C6E00138 */ lwc1 $f0, 0x138($s7)
/* 41A7EC 802A5A5C AE020000 */ sw $v0, 0x0($s0)
/* 41A7F0 802A5A60 E6200018 */ swc1 $f0, 0x18($s1)
/* 41A7F4 802A5A64 C6E00140 */ lwc1 $f0, 0x140($s7)
/* 41A7F8 802A5A68 24020004 */ addiu $v0, $zero, 0x4
/* 41A7FC 802A5A6C A6220070 */ sh $v0, 0x70($s1)
/* 41A800 802A5A70 AE200054 */ sw $zero, 0x54($s1)
/* 41A804 802A5A74 080A9709 */ j .L802A5C24_7AD5C4
/* 41A808 802A5A78 E6200020 */ swc1 $f0, 0x20($s1)
.L802A5A7C_7AD41C:
/* 41A80C 802A5A7C 86220070 */ lh $v0, 0x70($s1)
/* 41A810 802A5A80 10400022 */ beqz $v0, .L802A5B0C_7AD4AC
/* 41A814 802A5A84 00000000 */ nop
/* 41A818 802A5A88 C6200018 */ lwc1 $f0, 0x18($s1)
/* 41A81C 802A5A8C C6280144 */ lwc1 $f8, 0x144($s1)
/* 41A820 802A5A90 C6220020 */ lwc1 $f2, 0x20($s1)
/* 41A824 802A5A94 46080001 */ sub.s $f0, $f0, $f8
/* 41A828 802A5A98 C624014C */ lwc1 $f4, 0x14C($s1)
/* 41A82C 802A5A9C 46041081 */ sub.s $f2, $f2, $f4
/* 41A830 802A5AA0 44823000 */ mtc1 $v0, $f6
/* 41A834 802A5AA4 00000000 */ nop
/* 41A838 802A5AA8 468031A0 */ cvt.s.w $f6, $f6
/* 41A83C 802A5AAC 46060003 */ div.s $f0, $f0, $f6
/* 41A840 802A5AB0 46004200 */ add.s $f8, $f8, $f0
/* 41A844 802A5AB4 46003006 */ mov.s $f0, $f6
/* 41A848 802A5AB8 46061083 */ div.s $f2, $f2, $f6
/* 41A84C 802A5ABC C620000C */ lwc1 $f0, 0xC($s1)
/* 41A850 802A5AC0 46022100 */ add.s $f4, $f4, $f2
/* 41A854 802A5AC4 E6280144 */ swc1 $f8, 0x144($s1)
/* 41A858 802A5AC8 E624014C */ swc1 $f4, 0x14C($s1)
/* 41A85C 802A5ACC C6E40144 */ lwc1 $f4, 0x144($s7)
/* 41A860 802A5AD0 46040001 */ sub.s $f0, $f0, $f4
/* 41A864 802A5AD4 46003086 */ mov.s $f2, $f6
/* 41A868 802A5AD8 46060003 */ div.s $f0, $f0, $f6
/* 41A86C 802A5ADC 46002100 */ add.s $f4, $f4, $f0
/* 41A870 802A5AE0 E6E40144 */ swc1 $f4, 0x144($s7)
/* 41A874 802A5AE4 C6200014 */ lwc1 $f0, 0x14($s1)
/* 41A878 802A5AE8 C6E4014C */ lwc1 $f4, 0x14C($s7)
/* 41A87C 802A5AEC 86220070 */ lh $v0, 0x70($s1)
/* 41A880 802A5AF0 46040001 */ sub.s $f0, $f0, $f4
/* 41A884 802A5AF4 44821000 */ mtc1 $v0, $f2
/* 41A888 802A5AF8 00000000 */ nop
/* 41A88C 802A5AFC 468010A0 */ cvt.s.w $f2, $f2
/* 41A890 802A5B00 46020003 */ div.s $f0, $f0, $f2
/* 41A894 802A5B04 46002100 */ add.s $f4, $f4, $f0
/* 41A898 802A5B08 E6E4014C */ swc1 $f4, 0x14C($s7)
.L802A5B0C_7AD4AC:
/* 41A89C 802A5B0C C62C0054 */ lwc1 $f12, 0x54($s1)
/* 41A8A0 802A5B10 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 41A8A4 802A5B14 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 41A8A8 802A5B18 4481B000 */ mtc1 $at, $f22
/* 41A8AC 802A5B1C 00000000 */ nop
/* 41A8B0 802A5B20 46166302 */ mul.s $f12, $f12, $f22
/* 41A8B4 802A5B24 00000000 */ nop
/* 41A8B8 802A5B28 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 41A8BC 802A5B2C 4481C000 */ mtc1 $at, $f24
/* 41A8C0 802A5B30 3C014180 */ lui $at, (0x41800000 >> 16)
/* 41A8C4 802A5B34 4481A000 */ mtc1 $at, $f20
/* 41A8C8 802A5B38 0C00A85B */ jal sin_rad
/* 41A8CC 802A5B3C 46186303 */ div.s $f12, $f12, $f24
/* 41A8D0 802A5B40 46140002 */ mul.s $f0, $f0, $f20
/* 41A8D4 802A5B44 00000000 */ nop
/* 41A8D8 802A5B48 C622014C */ lwc1 $f2, 0x14C($s1)
/* 41A8DC 802A5B4C 46001081 */ sub.s $f2, $f2, $f0
/* 41A8E0 802A5B50 C62C0054 */ lwc1 $f12, 0x54($s1)
/* 41A8E4 802A5B54 46006307 */ neg.s $f12, $f12
/* 41A8E8 802A5B58 0C00A6C9 */ jal clamp_angle
/* 41A8EC 802A5B5C E622014C */ swc1 $f2, 0x14C($s1)
/* 41A8F0 802A5B60 C62C0054 */ lwc1 $f12, 0x54($s1)
/* 41A8F4 802A5B64 46166302 */ mul.s $f12, $f12, $f22
/* 41A8F8 802A5B68 00000000 */ nop
/* 41A8FC 802A5B6C E620018C */ swc1 $f0, 0x18C($s1)
/* 41A900 802A5B70 0C00A85B */ jal sin_rad
/* 41A904 802A5B74 46186303 */ div.s $f12, $f12, $f24
/* 41A908 802A5B78 46140002 */ mul.s $f0, $f0, $f20
/* 41A90C 802A5B7C 00000000 */ nop
/* 41A910 802A5B80 C6E2014C */ lwc1 $f2, 0x14C($s7)
/* 41A914 802A5B84 46001080 */ add.s $f2, $f2, $f0
/* 41A918 802A5B88 E6E2014C */ swc1 $f2, 0x14C($s7)
/* 41A91C 802A5B8C C62C0054 */ lwc1 $f12, 0x54($s1)
/* 41A920 802A5B90 0C00A6C9 */ jal clamp_angle
/* 41A924 802A5B94 46006307 */ neg.s $f12, $f12
/* 41A928 802A5B98 E6E0018C */ swc1 $f0, 0x18C($s7)
/* 41A92C 802A5B9C C6200054 */ lwc1 $f0, 0x54($s1)
/* 41A930 802A5BA0 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 41A934 802A5BA4 44811000 */ mtc1 $at, $f2
/* 41A938 802A5BA8 86220070 */ lh $v0, 0x70($s1)
/* 41A93C 802A5BAC 46020000 */ add.s $f0, $f0, $f2
/* 41A940 802A5BB0 96230070 */ lhu $v1, 0x70($s1)
/* 41A944 802A5BB4 10400004 */ beqz $v0, .L802A5BC8_7AD568
/* 41A948 802A5BB8 E6200054 */ swc1 $f0, 0x54($s1)
/* 41A94C 802A5BBC 2462FFFF */ addiu $v0, $v1, -0x1
/* 41A950 802A5BC0 080A9709 */ j .L802A5C24_7AD5C4
/* 41A954 802A5BC4 A6220070 */ sh $v0, 0x70($s1)
.L802A5BC8_7AD568:
/* 41A958 802A5BC8 C6200018 */ lwc1 $f0, 0x18($s1)
/* 41A95C 802A5BCC C6220020 */ lwc1 $f2, 0x20($s1)
/* 41A960 802A5BD0 C624000C */ lwc1 $f4, 0xC($s1)
/* 41A964 802A5BD4 E6200144 */ swc1 $f0, 0x144($s1)
/* 41A968 802A5BD8 E622014C */ swc1 $f2, 0x14C($s1)
/* 41A96C 802A5BDC E6E40144 */ swc1 $f4, 0x144($s7)
/* 41A970 802A5BE0 C6200014 */ lwc1 $f0, 0x14($s1)
/* 41A974 802A5BE4 E6E0014C */ swc1 $f0, 0x14C($s7)
/* 41A978 802A5BE8 C6200144 */ lwc1 $f0, 0x144($s1)
/* 41A97C 802A5BEC C622014C */ lwc1 $f2, 0x14C($s1)
/* 41A980 802A5BF0 3C04FFEF */ lui $a0, (0xFFEFFFFF >> 16)
/* 41A984 802A5BF4 E6200138 */ swc1 $f0, 0x138($s1)
/* 41A988 802A5BF8 E6220140 */ swc1 $f2, 0x140($s1)
/* 41A98C 802A5BFC C6E00144 */ lwc1 $f0, 0x144($s7)
/* 41A990 802A5C00 C6E2014C */ lwc1 $f2, 0x14C($s7)
/* 41A994 802A5C04 3484FFFF */ ori $a0, $a0, (0xFFEFFFFF & 0xFFFF)
/* 41A998 802A5C08 E6E00138 */ swc1 $f0, 0x138($s7)
/* 41A99C 802A5C0C E6E20140 */ swc1 $f2, 0x140($s7)
/* 41A9A0 802A5C10 8EC20000 */ lw $v0, 0x0($s6)
/* 41A9A4 802A5C14 2403012E */ addiu $v1, $zero, 0x12E
/* 41A9A8 802A5C18 AE030000 */ sw $v1, 0x0($s0)
/* 41A9AC 802A5C1C 00441024 */ and $v0, $v0, $a0
/* 41A9B0 802A5C20 AEC20000 */ sw $v0, 0x0($s6)
.L802A5C24_7AD5C4:
/* 41A9B4 802A5C24 3C02800E */ lui $v0, %hi(gBattleSubState)
/* 41A9B8 802A5C28 8C42C4DC */ lw $v0, %lo(gBattleSubState)($v0)
/* 41A9BC 802A5C2C 2443FFFF */ addiu $v1, $v0, -0x1
/* 41A9C0 802A5C30 2C62012E */ sltiu $v0, $v1, 0x12E
/* 41A9C4 802A5C34 10400943 */ beqz $v0, .L802A8144_7AFAE4
/* 41A9C8 802A5C38 00031080 */ sll $v0, $v1, 2
/* 41A9CC 802A5C3C 3C01802B */ lui $at, %hi(jtbl_802ABBD8_7B3578)
/* 41A9D0 802A5C40 00220821 */ addu $at, $at, $v0
/* 41A9D4 802A5C44 8C22BBD8 */ lw $v0, %lo(jtbl_802ABBD8_7B3578)($at)
/* 41A9D8 802A5C48 00400008 */ jr $v0
/* 41A9DC 802A5C4C 00000000 */ nop
glabel .L802A5C50_7AD5F0
/* 41A9E0 802A5C50 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 41A9E4 802A5C54 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 41A9E8 802A5C58 3C03FBFF */ lui $v1, (0xFBFFFFFF >> 16)
/* 41A9EC 802A5C5C 8E020000 */ lw $v0, 0x0($s0)
/* 41A9F0 802A5C60 3463FFFF */ ori $v1, $v1, (0xFBFFFFFF & 0xFFFF)
/* 41A9F4 802A5C64 34420002 */ ori $v0, $v0, 0x2
/* 41A9F8 802A5C68 AE020000 */ sw $v0, 0x0($s0)
/* 41A9FC 802A5C6C 8EE20000 */ lw $v0, 0x0($s7)
/* 41AA00 802A5C70 3C040800 */ lui $a0, (0x8000000 >> 16)
/* 41AA04 802A5C74 00431024 */ and $v0, $v0, $v1
/* 41AA08 802A5C78 00441025 */ or $v0, $v0, $a0
/* 41AA0C 802A5C7C 12200006 */ beqz $s1, .L802A5C98_7AD638
/* 41AA10 802A5C80 AEE20000 */ sw $v0, 0x0($s7)
/* 41AA14 802A5C84 8E220000 */ lw $v0, 0x0($s1)
/* 41AA18 802A5C88 3C030400 */ lui $v1, (0x4000000 >> 16)
/* 41AA1C 802A5C8C 00431025 */ or $v0, $v0, $v1
/* 41AA20 802A5C90 00441025 */ or $v0, $v0, $a0
/* 41AA24 802A5C94 AE220000 */ sw $v0, 0x0($s1)
.L802A5C98_7AD638:
/* 41AA28 802A5C98 0C098C9A */ jal func_80263268
/* 41AA2C 802A5C9C 00000000 */ nop
/* 41AA30 802A5CA0 0C098CC0 */ jal func_80263300
/* 41AA34 802A5CA4 00000000 */ nop
/* 41AA38 802A5CA8 0C098D2E */ jal btl_init_menu_boots
/* 41AA3C 802A5CAC 00000000 */ nop
/* 41AA40 802A5CB0 0C098DB9 */ jal btl_init_menu_hammer
/* 41AA44 802A5CB4 00000000 */ nop
/* 41AA48 802A5CB8 02E0202D */ daddu $a0, $s7, $zero
/* 41AA4C 802A5CBC 0C099CAB */ jal player_team_is_ability_active
/* 41AA50 802A5CC0 24050015 */ addiu $a1, $zero, 0x15
/* 41AA54 802A5CC4 1440091D */ bnez $v0, .L802A813C_7AFADC
/* 41AA58 802A5CC8 24020064 */ addiu $v0, $zero, 0x64
/* 41AA5C 802A5CCC 0000A02D */ daddu $s4, $zero, $zero
/* 41AA60 802A5CD0 82C2004C */ lb $v0, 0x4C($s6)
/* 41AA64 802A5CD4 04410002 */ bgez $v0, .L802A5CE0_7AD680
/* 41AA68 802A5CD8 241E0002 */ addiu $fp, $zero, 0x2
/* 41AA6C 802A5CDC A2C0004C */ sb $zero, 0x4C($s6)
.L802A5CE0_7AD680:
/* 41AA70 802A5CE0 3C03802B */ lui $v1, %hi(D_802AB478_7B2E18)
/* 41AA74 802A5CE4 8C63B478 */ lw $v1, %lo(D_802AB478_7B2E18)($v1)
/* 41AA78 802A5CE8 24020007 */ addiu $v0, $zero, 0x7
/* 41AA7C 802A5CEC 3C01802B */ lui $at, %hi(battle_menu_submenuIDs)
/* 41AA80 802A5CF0 AC22D0B8 */ sw $v0, %lo(battle_menu_submenuIDs)($at)
/* 41AA84 802A5CF4 24020001 */ addiu $v0, $zero, 0x1
/* 41AA88 802A5CF8 3C01802B */ lui $at, %hi(BattleMenu_OptionEnabled)
/* 41AA8C 802A5CFC AC22D0D0 */ sw $v0, %lo(BattleMenu_OptionEnabled)($at)
/* 41AA90 802A5D00 3C02802B */ lui $v0, %hi(D_802AB4DC_7B2E7C)
/* 41AA94 802A5D04 8C42B4DC */ lw $v0, %lo(D_802AB4DC_7B2E7C)($v0)
/* 41AA98 802A5D08 3C01802B */ lui $at, %hi(BattleMenu_HudScripts)
/* 41AA9C 802A5D0C AC23D078 */ sw $v1, %lo(BattleMenu_HudScripts)($at)
/* 41AAA0 802A5D10 82C30083 */ lb $v1, 0x83($s6)
/* 41AAA4 802A5D14 3C04802B */ lui $a0, %hi(BattleMenu_TitleMessages)
/* 41AAA8 802A5D18 2484D090 */ addiu $a0, $a0, %lo(BattleMenu_TitleMessages)
/* 41AAAC 802A5D1C 107E0006 */ beq $v1, $fp, .L802A5D38_7AD6D8
/* 41AAB0 802A5D20 AC820000 */ sw $v0, 0x0($a0)
/* 41AAB4 802A5D24 8E020000 */ lw $v0, 0x0($s0)
/* 41AAB8 802A5D28 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 41AABC 802A5D2C 00431024 */ and $v0, $v0, $v1
/* 41AAC0 802A5D30 10400004 */ beqz $v0, .L802A5D44_7AD6E4
/* 41AAC4 802A5D34 00000000 */ nop
.L802A5D38_7AD6D8:
/* 41AAC8 802A5D38 3C02001D */ lui $v0, (0x1D0054 >> 16)
/* 41AACC 802A5D3C 34420054 */ ori $v0, $v0, (0x1D0054 & 0xFFFF)
/* 41AAD0 802A5D40 AC820000 */ sw $v0, 0x0($a0)
.L802A5D44_7AD6E4:
/* 41AAD4 802A5D44 3C08802B */ lui $t0, %hi(battle_menu_isMessageDisabled)
/* 41AAD8 802A5D48 2508D0E8 */ addiu $t0, $t0, %lo(battle_menu_isMessageDisabled)
/* 41AADC 802A5D4C 00141880 */ sll $v1, $s4, 2
/* 41AAE0 802A5D50 00682021 */ addu $a0, $v1, $t0
/* 41AAE4 802A5D54 AC800000 */ sw $zero, 0x0($a0)
/* 41AAE8 802A5D58 96C20070 */ lhu $v0, 0x70($s6)
/* 41AAEC 802A5D5C 30420080 */ andi $v0, $v0, 0x80
/* 41AAF0 802A5D60 1440000B */ bnez $v0, .L802A5D90_7AD730
/* 41AAF4 802A5D64 00000000 */ nop
/* 41AAF8 802A5D68 3C02802B */ lui $v0, %hi(D_802AB47C_7B2E1C)
/* 41AAFC 802A5D6C 8C42B47C */ lw $v0, %lo(D_802AB47C_7B2E1C)($v0)
/* 41AB00 802A5D70 3C01802B */ lui $at, %hi(BattleMenu_OptionEnabled)
/* 41AB04 802A5D74 00230821 */ addu $at, $at, $v1
/* 41AB08 802A5D78 AC20D0D0 */ sw $zero, %lo(BattleMenu_OptionEnabled)($at)
/* 41AB0C 802A5D7C 3C01802B */ lui $at, %hi(BattleMenu_HudScripts)
/* 41AB10 802A5D80 00230821 */ addu $at, $at, $v1
/* 41AB14 802A5D84 AC22D078 */ sw $v0, %lo(BattleMenu_HudScripts)($at)
/* 41AB18 802A5D88 24020048 */ addiu $v0, $zero, 0x48
/* 41AB1C 802A5D8C AC820000 */ sw $v0, 0x0($a0)
.L802A5D90_7AD730:
/* 41AB20 802A5D90 82C3004C */ lb $v1, 0x4C($s6)
/* 41AB24 802A5D94 24020007 */ addiu $v0, $zero, 0x7
/* 41AB28 802A5D98 50620001 */ beql $v1, $v0, .L802A5DA0_7AD740
/* 41AB2C 802A5D9C 0280F02D */ daddu $fp, $s4, $zero
.L802A5DA0_7AD740:
/* 41AB30 802A5DA0 82C2007D */ lb $v0, 0x7D($s6)
/* 41AB34 802A5DA4 04400034 */ bltz $v0, .L802A5E78_7AD818
/* 41AB38 802A5DA8 26940001 */ addiu $s4, $s4, 0x1
/* 41AB3C 802A5DAC 3C03802B */ lui $v1, %hi(BattleMenu_HudScripts)
/* 41AB40 802A5DB0 2463D078 */ addiu $v1, $v1, %lo(BattleMenu_HudScripts)
/* 41AB44 802A5DB4 00142080 */ sll $a0, $s4, 2
/* 41AB48 802A5DB8 3C07802B */ lui $a3, %hi(D_802AB388_7B2D28)
/* 41AB4C 802A5DBC 24E7B388 */ addiu $a3, $a3, %lo(D_802AB388_7B2D28)
/* 41AB50 802A5DC0 00833021 */ addu $a2, $a0, $v1
/* 41AB54 802A5DC4 8CE20000 */ lw $v0, 0x0($a3)
/* 41AB58 802A5DC8 24090002 */ addiu $t1, $zero, 0x2
/* 41AB5C 802A5DCC ACC20000 */ sw $v0, 0x0($a2)
/* 41AB60 802A5DD0 3C02802B */ lui $v0, %hi(BattleMenu_OptionEnabled)
/* 41AB64 802A5DD4 2442D0D0 */ addiu $v0, $v0, %lo(BattleMenu_OptionEnabled)
/* 41AB68 802A5DD8 00822821 */ addu $a1, $a0, $v0
/* 41AB6C 802A5DDC 24020001 */ addiu $v0, $zero, 0x1
/* 41AB70 802A5DE0 3C01802B */ lui $at, %hi(battle_menu_submenuIDs)
/* 41AB74 802A5DE4 00240821 */ addu $at, $at, $a0
/* 41AB78 802A5DE8 AC29D0B8 */ sw $t1, %lo(battle_menu_submenuIDs)($at)
/* 41AB7C 802A5DEC ACA20000 */ sw $v0, 0x0($a1)
/* 41AB80 802A5DF0 3C02802B */ lui $v0, %hi(D_802AB4C8_7B2E68)
/* 41AB84 802A5DF4 8C42B4C8 */ lw $v0, %lo(D_802AB4C8_7B2E68)($v0)
/* 41AB88 802A5DF8 3C01802B */ lui $at, %hi(BattleMenu_TitleMessages)
/* 41AB8C 802A5DFC 00240821 */ addu $at, $at, $a0
/* 41AB90 802A5E00 AC22D090 */ sw $v0, %lo(BattleMenu_TitleMessages)($at)
/* 41AB94 802A5E04 82C2007D */ lb $v0, 0x7D($s6)
/* 41AB98 802A5E08 14400006 */ bnez $v0, .L802A5E24_7AD7C4
/* 41AB9C 802A5E0C 00881821 */ addu $v1, $a0, $t0
/* 41ABA0 802A5E10 8CE20004 */ lw $v0, 0x4($a3)
/* 41ABA4 802A5E14 ACC20000 */ sw $v0, 0x0($a2)
/* 41ABA8 802A5E18 24020045 */ addiu $v0, $zero, 0x45
/* 41ABAC 802A5E1C ACA00000 */ sw $zero, 0x0($a1)
/* 41ABB0 802A5E20 AC620000 */ sw $v0, 0x0($v1)
.L802A5E24_7AD7C4:
/* 41ABB4 802A5E24 96C20070 */ lhu $v0, 0x70($s6)
/* 41ABB8 802A5E28 30420004 */ andi $v0, $v0, 0x4
/* 41ABBC 802A5E2C 14400006 */ bnez $v0, .L802A5E48_7AD7E8
/* 41ABC0 802A5E30 00881821 */ addu $v1, $a0, $t0
/* 41ABC4 802A5E34 8CE20004 */ lw $v0, 0x4($a3)
/* 41ABC8 802A5E38 ACC20000 */ sw $v0, 0x0($a2)
/* 41ABCC 802A5E3C 24020048 */ addiu $v0, $zero, 0x48
/* 41ABD0 802A5E40 ACA00000 */ sw $zero, 0x0($a1)
/* 41ABD4 802A5E44 AC620000 */ sw $v0, 0x0($v1)
.L802A5E48_7AD7E8:
/* 41ABD8 802A5E48 82C200B0 */ lb $v0, 0xB0($s6)
/* 41ABDC 802A5E4C 04400006 */ bltz $v0, .L802A5E68_7AD808
/* 41ABE0 802A5E50 00881821 */ addu $v1, $a0, $t0
/* 41ABE4 802A5E54 8CE20004 */ lw $v0, 0x4($a3)
/* 41ABE8 802A5E58 ACC20000 */ sw $v0, 0x0($a2)
/* 41ABEC 802A5E5C 24020048 */ addiu $v0, $zero, 0x48
/* 41ABF0 802A5E60 ACA00000 */ sw $zero, 0x0($a1)
/* 41ABF4 802A5E64 AC620000 */ sw $v0, 0x0($v1)
.L802A5E68_7AD808:
/* 41ABF8 802A5E68 82C2004C */ lb $v0, 0x4C($s6)
/* 41ABFC 802A5E6C 50490001 */ beql $v0, $t1, .L802A5E74_7AD814
/* 41AC00 802A5E70 0280F02D */ daddu $fp, $s4, $zero
.L802A5E74_7AD814:
/* 41AC04 802A5E74 26940001 */ addiu $s4, $s4, 0x1
.L802A5E78_7AD818:
/* 41AC08 802A5E78 3C0C802B */ lui $t4, %hi(BattleMenu_HudScripts)
/* 41AC0C 802A5E7C 258CD078 */ addiu $t4, $t4, %lo(BattleMenu_HudScripts)
/* 41AC10 802A5E80 00141880 */ sll $v1, $s4, 2
/* 41AC14 802A5E84 006C3021 */ addu $a2, $v1, $t4
/* 41AC18 802A5E88 3C0B802B */ lui $t3, %hi(BattleMenu_OptionEnabled)
/* 41AC1C 802A5E8C 256BD0D0 */ addiu $t3, $t3, %lo(BattleMenu_OptionEnabled)
/* 41AC20 802A5E90 006B2821 */ addu $a1, $v1, $t3
/* 41AC24 802A5E94 24090001 */ addiu $t1, $zero, 0x1
/* 41AC28 802A5E98 3C0A802B */ lui $t2, %hi(D_802AB4C0_7B2E60)
/* 41AC2C 802A5E9C 254AB4C0 */ addiu $t2, $t2, %lo(D_802AB4C0_7B2E60)
/* 41AC30 802A5EA0 82A20000 */ lb $v0, 0x0($s5)
/* 41AC34 802A5EA4 24420001 */ addiu $v0, $v0, 0x1
/* 41AC38 802A5EA8 000210C0 */ sll $v0, $v0, 3
/* 41AC3C 802A5EAC 3C01802B */ lui $at, %hi(D_802AB348_7B2CE8)
/* 41AC40 802A5EB0 00220821 */ addu $at, $at, $v0
/* 41AC44 802A5EB4 8C22B348 */ lw $v0, %lo(D_802AB348_7B2CE8)($at)
/* 41AC48 802A5EB8 3C04802B */ lui $a0, %hi(D_802AB348_7B2CE8)
/* 41AC4C 802A5EBC 2484B348 */ addiu $a0, $a0, %lo(D_802AB348_7B2CE8)
/* 41AC50 802A5EC0 ACC20000 */ sw $v0, 0x0($a2)
/* 41AC54 802A5EC4 3C01802B */ lui $at, %hi(battle_menu_submenuIDs)
/* 41AC58 802A5EC8 00230821 */ addu $at, $at, $v1
/* 41AC5C 802A5ECC AC20D0B8 */ sw $zero, %lo(battle_menu_submenuIDs)($at)
/* 41AC60 802A5ED0 ACA90000 */ sw $t1, 0x0($a1)
/* 41AC64 802A5ED4 8D420000 */ lw $v0, 0x0($t2)
/* 41AC68 802A5ED8 3C07802B */ lui $a3, %hi(battle_menu_submenuIDs)
/* 41AC6C 802A5EDC 24E7D0B8 */ addiu $a3, $a3, %lo(battle_menu_submenuIDs)
/* 41AC70 802A5EE0 3C01802B */ lui $at, %hi(BattleMenu_TitleMessages)
/* 41AC74 802A5EE4 00230821 */ addu $at, $at, $v1
/* 41AC78 802A5EE8 AC22D090 */ sw $v0, %lo(BattleMenu_TitleMessages)($at)
/* 41AC7C 802A5EEC 82C2007E */ lb $v0, 0x7E($s6)
/* 41AC80 802A5EF0 3C08802B */ lui $t0, %hi(BattleMenu_TitleMessages)
/* 41AC84 802A5EF4 2508D090 */ addiu $t0, $t0, %lo(BattleMenu_TitleMessages)
/* 41AC88 802A5EF8 1C400008 */ bgtz $v0, .L802A5F1C_7AD8BC
/* 41AC8C 802A5EFC 00000000 */ nop
/* 41AC90 802A5F00 8C820000 */ lw $v0, 0x0($a0)
/* 41AC94 802A5F04 ACC20000 */ sw $v0, 0x0($a2)
/* 41AC98 802A5F08 24020043 */ addiu $v0, $zero, 0x43
/* 41AC9C 802A5F0C ACA00000 */ sw $zero, 0x0($a1)
/* 41ACA0 802A5F10 3C01802B */ lui $at, %hi(battle_menu_isMessageDisabled)
/* 41ACA4 802A5F14 00230821 */ addu $at, $at, $v1
/* 41ACA8 802A5F18 AC22D0E8 */ sw $v0, %lo(battle_menu_isMessageDisabled)($at)
.L802A5F1C_7AD8BC:
/* 41ACAC 802A5F1C 96C20070 */ lhu $v0, 0x70($s6)
/* 41ACB0 802A5F20 30420001 */ andi $v0, $v0, 0x1
/* 41ACB4 802A5F24 14400008 */ bnez $v0, .L802A5F48_7AD8E8
/* 41ACB8 802A5F28 00000000 */ nop
/* 41ACBC 802A5F2C 8C820004 */ lw $v0, 0x4($a0)
/* 41ACC0 802A5F30 ACC20000 */ sw $v0, 0x0($a2)
/* 41ACC4 802A5F34 24020048 */ addiu $v0, $zero, 0x48
/* 41ACC8 802A5F38 ACA00000 */ sw $zero, 0x0($a1)
/* 41ACCC 802A5F3C 3C01802B */ lui $at, %hi(battle_menu_isMessageDisabled)
/* 41ACD0 802A5F40 00230821 */ addu $at, $at, $v1
/* 41ACD4 802A5F44 AC22D0E8 */ sw $v0, %lo(battle_menu_isMessageDisabled)($at)
.L802A5F48_7AD8E8:
/* 41ACD8 802A5F48 82C200AF */ lb $v0, 0xAF($s6)
/* 41ACDC 802A5F4C 04400008 */ bltz $v0, .L802A5F70_7AD910
/* 41ACE0 802A5F50 00000000 */ nop
/* 41ACE4 802A5F54 8C820004 */ lw $v0, 0x4($a0)
/* 41ACE8 802A5F58 ACC20000 */ sw $v0, 0x0($a2)
/* 41ACEC 802A5F5C 24020048 */ addiu $v0, $zero, 0x48
/* 41ACF0 802A5F60 ACA00000 */ sw $zero, 0x0($a1)
/* 41ACF4 802A5F64 3C01802B */ lui $at, %hi(battle_menu_isMessageDisabled)
/* 41ACF8 802A5F68 00230821 */ addu $at, $at, $v1
/* 41ACFC 802A5F6C AC22D0E8 */ sw $v0, %lo(battle_menu_isMessageDisabled)($at)
.L802A5F70_7AD910:
/* 41AD00 802A5F70 82C2004C */ lb $v0, 0x4C($s6)
/* 41AD04 802A5F74 50400001 */ beql $v0, $zero, .L802A5F7C_7AD91C
/* 41AD08 802A5F78 0280F02D */ daddu $fp, $s4, $zero
.L802A5F7C_7AD91C:
/* 41AD0C 802A5F7C 82A20001 */ lb $v0, 0x1($s5)
/* 41AD10 802A5F80 04400034 */ bltz $v0, .L802A6054_7AD9F4
/* 41AD14 802A5F84 26940001 */ addiu $s4, $s4, 0x1
/* 41AD18 802A5F88 00142080 */ sll $a0, $s4, 2
/* 41AD1C 802A5F8C 24420001 */ addiu $v0, $v0, 0x1
/* 41AD20 802A5F90 000210C0 */ sll $v0, $v0, 3
/* 41AD24 802A5F94 008C3021 */ addu $a2, $a0, $t4
/* 41AD28 802A5F98 3C01802B */ lui $at, %hi(D_802AB368_7B2D08)
/* 41AD2C 802A5F9C 00220821 */ addu $at, $at, $v0
/* 41AD30 802A5FA0 8C22B368 */ lw $v0, %lo(D_802AB368_7B2D08)($at)
/* 41AD34 802A5FA4 008B2821 */ addu $a1, $a0, $t3
/* 41AD38 802A5FA8 ACC20000 */ sw $v0, 0x0($a2)
/* 41AD3C 802A5FAC 00871021 */ addu $v0, $a0, $a3
/* 41AD40 802A5FB0 AC490000 */ sw $t1, 0x0($v0)
/* 41AD44 802A5FB4 ACA90000 */ sw $t1, 0x0($a1)
/* 41AD48 802A5FB8 8D430004 */ lw $v1, 0x4($t2)
/* 41AD4C 802A5FBC 00881021 */ addu $v0, $a0, $t0
/* 41AD50 802A5FC0 AC430000 */ sw $v1, 0x0($v0)
/* 41AD54 802A5FC4 82C2007F */ lb $v0, 0x7F($s6)
/* 41AD58 802A5FC8 3C03802B */ lui $v1, %hi(D_802AB368_7B2D08)
/* 41AD5C 802A5FCC 1C400008 */ bgtz $v0, .L802A5FF0_7AD990
/* 41AD60 802A5FD0 2463B368 */ addiu $v1, $v1, %lo(D_802AB368_7B2D08)
/* 41AD64 802A5FD4 8C620000 */ lw $v0, 0x0($v1)
/* 41AD68 802A5FD8 ACC20000 */ sw $v0, 0x0($a2)
/* 41AD6C 802A5FDC 24020044 */ addiu $v0, $zero, 0x44
/* 41AD70 802A5FE0 ACA00000 */ sw $zero, 0x0($a1)
/* 41AD74 802A5FE4 3C01802B */ lui $at, %hi(battle_menu_isMessageDisabled)
/* 41AD78 802A5FE8 00240821 */ addu $at, $at, $a0
/* 41AD7C 802A5FEC AC22D0E8 */ sw $v0, %lo(battle_menu_isMessageDisabled)($at)
.L802A5FF0_7AD990:
/* 41AD80 802A5FF0 96C20070 */ lhu $v0, 0x70($s6)
/* 41AD84 802A5FF4 30420002 */ andi $v0, $v0, 0x2
/* 41AD88 802A5FF8 14400008 */ bnez $v0, .L802A601C_7AD9BC
/* 41AD8C 802A5FFC 00000000 */ nop
/* 41AD90 802A6000 8C620004 */ lw $v0, 0x4($v1)
/* 41AD94 802A6004 ACC20000 */ sw $v0, 0x0($a2)
/* 41AD98 802A6008 24020048 */ addiu $v0, $zero, 0x48
/* 41AD9C 802A600C ACA00000 */ sw $zero, 0x0($a1)
/* 41ADA0 802A6010 3C01802B */ lui $at, %hi(battle_menu_isMessageDisabled)
/* 41ADA4 802A6014 00240821 */ addu $at, $at, $a0
/* 41ADA8 802A6018 AC22D0E8 */ sw $v0, %lo(battle_menu_isMessageDisabled)($at)
.L802A601C_7AD9BC:
/* 41ADAC 802A601C 82C200AE */ lb $v0, 0xAE($s6)
/* 41ADB0 802A6020 04400008 */ bltz $v0, .L802A6044_7AD9E4
/* 41ADB4 802A6024 00000000 */ nop
/* 41ADB8 802A6028 8C620004 */ lw $v0, 0x4($v1)
/* 41ADBC 802A602C ACC20000 */ sw $v0, 0x0($a2)
/* 41ADC0 802A6030 24020048 */ addiu $v0, $zero, 0x48
/* 41ADC4 802A6034 ACA00000 */ sw $zero, 0x0($a1)
/* 41ADC8 802A6038 3C01802B */ lui $at, %hi(battle_menu_isMessageDisabled)
/* 41ADCC 802A603C 00240821 */ addu $at, $at, $a0
/* 41ADD0 802A6040 AC22D0E8 */ sw $v0, %lo(battle_menu_isMessageDisabled)($at)
.L802A6044_7AD9E4:
/* 41ADD4 802A6044 82C2004C */ lb $v0, 0x4C($s6)
/* 41ADD8 802A6048 50490001 */ beql $v0, $t1, .L802A6050_7AD9F0
/* 41ADDC 802A604C 0280F02D */ daddu $fp, $s4, $zero
.L802A6050_7AD9F0:
/* 41ADE0 802A6050 26940001 */ addiu $s4, $s4, 0x1
.L802A6054_7AD9F4:
/* 41ADE4 802A6054 82A2028E */ lb $v0, 0x28E($s5)
/* 41ADE8 802A6058 10400027 */ beqz $v0, .L802A60F8_7ADA98
/* 41ADEC 802A605C 00141880 */ sll $v1, $s4, 2
/* 41ADF0 802A6060 3C04802B */ lui $a0, %hi(BattleMenu_HudScripts)
/* 41ADF4 802A6064 2484D078 */ addiu $a0, $a0, %lo(BattleMenu_HudScripts)
/* 41ADF8 802A6068 3C06802B */ lui $a2, %hi(D_802AB390_7B2D30)
/* 41ADFC 802A606C 24C6B390 */ addiu $a2, $a2, %lo(D_802AB390_7B2D30)
/* 41AE00 802A6070 00642821 */ addu $a1, $v1, $a0
/* 41AE04 802A6074 8CC20000 */ lw $v0, 0x0($a2)
/* 41AE08 802A6078 24070008 */ addiu $a3, $zero, 0x8
/* 41AE0C 802A607C ACA20000 */ sw $v0, 0x0($a1)
/* 41AE10 802A6080 3C02802B */ lui $v0, %hi(BattleMenu_OptionEnabled)
/* 41AE14 802A6084 2442D0D0 */ addiu $v0, $v0, %lo(BattleMenu_OptionEnabled)
/* 41AE18 802A6088 00622021 */ addu $a0, $v1, $v0
/* 41AE1C 802A608C 24020001 */ addiu $v0, $zero, 0x1
/* 41AE20 802A6090 3C01802B */ lui $at, %hi(battle_menu_submenuIDs)
/* 41AE24 802A6094 00230821 */ addu $at, $at, $v1
/* 41AE28 802A6098 AC27D0B8 */ sw $a3, %lo(battle_menu_submenuIDs)($at)
/* 41AE2C 802A609C AC820000 */ sw $v0, 0x0($a0)
/* 41AE30 802A60A0 3C02802B */ lui $v0, %hi(D_802AB4E0_7B2E80)
/* 41AE34 802A60A4 8C42B4E0 */ lw $v0, %lo(D_802AB4E0_7B2E80)($v0)
/* 41AE38 802A60A8 3C01802B */ lui $at, %hi(BattleMenu_TitleMessages)
/* 41AE3C 802A60AC 00230821 */ addu $at, $at, $v1
/* 41AE40 802A60B0 AC22D090 */ sw $v0, %lo(BattleMenu_TitleMessages)($at)
/* 41AE44 802A60B4 3C02802B */ lui $v0, %hi(battle_menu_isMessageDisabled)
/* 41AE48 802A60B8 2442D0E8 */ addiu $v0, $v0, %lo(battle_menu_isMessageDisabled)
/* 41AE4C 802A60BC 00621821 */ addu $v1, $v1, $v0
/* 41AE50 802A60C0 AC600000 */ sw $zero, 0x0($v1)
/* 41AE54 802A60C4 96C20070 */ lhu $v0, 0x70($s6)
/* 41AE58 802A60C8 30420100 */ andi $v0, $v0, 0x100
/* 41AE5C 802A60CC 14400006 */ bnez $v0, .L802A60E8_7ADA88
/* 41AE60 802A60D0 00000000 */ nop
/* 41AE64 802A60D4 8CC20004 */ lw $v0, 0x4($a2)
/* 41AE68 802A60D8 ACA20000 */ sw $v0, 0x0($a1)
/* 41AE6C 802A60DC 24020048 */ addiu $v0, $zero, 0x48
/* 41AE70 802A60E0 AC800000 */ sw $zero, 0x0($a0)
/* 41AE74 802A60E4 AC620000 */ sw $v0, 0x0($v1)
.L802A60E8_7ADA88:
/* 41AE78 802A60E8 82C2004C */ lb $v0, 0x4C($s6)
/* 41AE7C 802A60EC 50470001 */ beql $v0, $a3, .L802A60F4_7ADA94
/* 41AE80 802A60F0 0280F02D */ daddu $fp, $s4, $zero
.L802A60F4_7ADA94:
/* 41AE84 802A60F4 26940001 */ addiu $s4, $s4, 0x1
.L802A60F8_7ADA98:
/* 41AE88 802A60F8 24020002 */ addiu $v0, $zero, 0x2
/* 41AE8C 802A60FC 005E1023 */ subu $v0, $v0, $fp
/* 41AE90 802A6100 3C01802B */ lui $at, %hi(BattleMenu_NumOptions)
/* 41AE94 802A6104 AC34D0AC */ sw $s4, %lo(BattleMenu_NumOptions)($at)
/* 41AE98 802A6108 3C01802B */ lui $at, %hi(D_802AD0A8)
/* 41AE9C 802A610C AC20D0A8 */ sw $zero, %lo(D_802AD0A8)($at)
/* 41AEA0 802A6110 3C01802B */ lui $at, %hi(D_802AD0B0)
/* 41AEA4 802A6114 AC3ED0B0 */ sw $fp, %lo(D_802AD0B0)($at)
/* 41AEA8 802A6118 3C01802B */ lui $at, %hi(D_802AD100)
/* 41AEAC 802A611C AC22D100 */ sw $v0, %lo(D_802AD100)($at)
/* 41AEB0 802A6120 0C0A9634 */ jal func_802A58D0_7AD270
/* 41AEB4 802A6124 00000000 */ nop
/* 41AEB8 802A6128 10400006 */ beqz $v0, .L802A6144_7ADAE4
/* 41AEBC 802A612C 00000000 */ nop
/* 41AEC0 802A6130 24020001 */ addiu $v0, $zero, 0x1
/* 41AEC4 802A6134 3C01802B */ lui $at, %hi(BattleMenu_ShowSwapIcons)
/* 41AEC8 802A6138 AC22D104 */ sw $v0, %lo(BattleMenu_ShowSwapIcons)($at)
/* 41AECC 802A613C 080A9853 */ j .L802A614C_7ADAEC
/* 41AED0 802A6140 00000000 */ nop
.L802A6144_7ADAE4:
/* 41AED4 802A6144 3C01802B */ lui $at, %hi(BattleMenu_ShowSwapIcons)
/* 41AED8 802A6148 AC20D104 */ sw $zero, %lo(BattleMenu_ShowSwapIcons)($at)
.L802A614C_7ADAEC:
/* 41AEDC 802A614C 0C0A8400 */ jal func_802A1000_7A89A0
/* 41AEE0 802A6150 00000000 */ nop
/* 41AEE4 802A6154 24020008 */ addiu $v0, $zero, 0x8
/* 41AEE8 802A6158 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41AEEC 802A615C AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41AEF0 802A6160 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41AEF4 802A6164 AC20CC6C */ sw $zero, %lo(D_802ACC6C)($at)
/* 41AEF8 802A6168 080AA04F */ j .L802A813C_7AFADC
/* 41AEFC 802A616C 24020001 */ addiu $v0, $zero, 0x1
glabel .L802A6170_7ADB10
/* 41AF00 802A6170 82C2008B */ lb $v0, 0x8B($s6)
/* 41AF04 802A6174 10400005 */ beqz $v0, .L802A618C_7ADB2C
/* 41AF08 802A6178 0000202D */ daddu $a0, $zero, $zero
/* 41AF0C 802A617C 0080282D */ daddu $a1, $a0, $zero
/* 41AF10 802A6180 3C060001 */ lui $a2, (0x10027 >> 16)
/* 41AF14 802A6184 080A9868 */ j .L802A61A0_7ADB40
/* 41AF18 802A6188 34C60027 */ ori $a2, $a2, (0x10027 & 0xFFFF)
.L802A618C_7ADB2C:
/* 41AF1C 802A618C 0C099751 */ jal get_player_anim_for_status
/* 41AF20 802A6190 2404001C */ addiu $a0, $zero, 0x1C
/* 41AF24 802A6194 0000202D */ daddu $a0, $zero, $zero
/* 41AF28 802A6198 0080282D */ daddu $a1, $a0, $zero
/* 41AF2C 802A619C 0040302D */ daddu $a2, $v0, $zero
.L802A61A0_7ADB40:
/* 41AF30 802A61A0 0C098F3F */ jal set_animation
/* 41AF34 802A61A4 00000000 */ nop
/* 41AF38 802A61A8 0C0A846C */ jal func_802A11B0_7A8B50
/* 41AF3C 802A61AC 00000000 */ nop
/* 41AF40 802A61B0 3C04802B */ lui $a0, %hi(D_802ACC6C)
/* 41AF44 802A61B4 2484CC6C */ addiu $a0, $a0, %lo(D_802ACC6C)
/* 41AF48 802A61B8 8C830000 */ lw $v1, 0x0($a0)
/* 41AF4C 802A61BC 10600004 */ beqz $v1, .L802A61D0_7ADB70
/* 41AF50 802A61C0 0040802D */ daddu $s0, $v0, $zero
/* 41AF54 802A61C4 2462FFFF */ addiu $v0, $v1, -0x1
/* 41AF58 802A61C8 080A98A3 */ j .L802A628C_7ADC2C
/* 41AF5C 802A61CC AC820000 */ sw $v0, 0x0($a0)
.L802A61D0_7ADB70:
/* 41AF60 802A61D0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 41AF64 802A61D4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 41AF68 802A61D8 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 41AF6C 802A61DC 00431024 */ and $v0, $v0, $v1
/* 41AF70 802A61E0 1440002A */ bnez $v0, .L802A628C_7ADC2C
/* 41AF74 802A61E4 00000000 */ nop
/* 41AF78 802A61E8 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 41AF7C 802A61EC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 41AF80 802A61F0 8C420010 */ lw $v0, 0x10($v0)
/* 41AF84 802A61F4 30422000 */ andi $v0, $v0, 0x2000
/* 41AF88 802A61F8 10400024 */ beqz $v0, .L802A628C_7ADC2C
/* 41AF8C 802A61FC 00000000 */ nop
/* 41AF90 802A6200 0C0A9634 */ jal func_802A58D0_7AD270
/* 41AF94 802A6204 00000000 */ nop
/* 41AF98 802A6208 10400013 */ beqz $v0, .L802A6258_7ADBF8
/* 41AF9C 802A620C 24020001 */ addiu $v0, $zero, 0x1
/* 41AFA0 802A6210 82C3008B */ lb $v1, 0x8B($s6)
/* 41AFA4 802A6214 10620010 */ beq $v1, $v0, .L802A6258_7ADBF8
/* 41AFA8 802A6218 00000000 */ nop
/* 41AFAC 802A621C 0C05272D */ jal sfx_play_sound
/* 41AFB0 802A6220 2404000F */ addiu $a0, $zero, 0xF
/* 41AFB4 802A6224 3C02802B */ lui $v0, %hi(BattleMenu_CurPos)
/* 41AFB8 802A6228 8042D002 */ lb $v0, %lo(BattleMenu_CurPos)($v0)
/* 41AFBC 802A622C 3C03802B */ lui $v1, %hi(BattleMenu_HomePos)
/* 41AFC0 802A6230 8063D06B */ lb $v1, %lo(BattleMenu_HomePos)($v1)
/* 41AFC4 802A6234 00431021 */ addu $v0, $v0, $v1
/* 41AFC8 802A6238 00021080 */ sll $v0, $v0, 2
/* 41AFCC 802A623C 3C01802B */ lui $at, %hi(D_802AD0BB)
/* 41AFD0 802A6240 00220821 */ addu $at, $at, $v0
/* 41AFD4 802A6244 9022D0BB */ lbu $v0, %lo(D_802AD0BB)($at)
/* 41AFD8 802A6248 0C0A842E */ jal func_802A10B8_7A8A58
/* 41AFDC 802A624C A2C2004C */ sb $v0, 0x4C($s6)
/* 41AFE0 802A6250 080A9F71 */ j .L802A7DC4_7AF764
/* 41AFE4 802A6254 00000000 */ nop
.L802A6258_7ADBF8:
/* 41AFE8 802A6258 122007BA */ beqz $s1, .L802A8144_7AFAE4
/* 41AFEC 802A625C 3C030020 */ lui $v1, (0x200000 >> 16)
/* 41AFF0 802A6260 8E220000 */ lw $v0, 0x0($s1)
/* 41AFF4 802A6264 00431024 */ and $v0, $v0, $v1
/* 41AFF8 802A6268 144007B6 */ bnez $v0, .L802A8144_7AFAE4
/* 41AFFC 802A626C 24020001 */ addiu $v0, $zero, 0x1
/* 41B000 802A6270 82C3008B */ lb $v1, 0x8B($s6)
/* 41B004 802A6274 106207B3 */ beq $v1, $v0, .L802A8144_7AFAE4
/* 41B008 802A6278 00000000 */ nop
/* 41B00C 802A627C 0C05272D */ jal sfx_play_sound
/* 41B010 802A6280 2404021D */ addiu $a0, $zero, 0x21D
/* 41B014 802A6284 080AA04F */ j .L802A813C_7AFADC
/* 41B018 802A6288 24020008 */ addiu $v0, $zero, 0x8
.L802A628C_7ADC2C:
/* 41B01C 802A628C 3C03802B */ lui $v1, %hi(D_802ACC60)
/* 41B020 802A6290 2463CC60 */ addiu $v1, $v1, %lo(D_802ACC60)
/* 41B024 802A6294 8C620000 */ lw $v0, 0x0($v1)
/* 41B028 802A6298 5440058D */ bnel $v0, $zero, .L802A78D0_7AF270
/* 41B02C 802A629C 2442FFFF */ addiu $v0, $v0, -0x1
/* 41B030 802A62A0 120007A8 */ beqz $s0, .L802A8144_7AFAE4
/* 41B034 802A62A4 0000202D */ daddu $a0, $zero, $zero
/* 41B038 802A62A8 0080282D */ daddu $a1, $a0, $zero
/* 41B03C 802A62AC 3C060001 */ lui $a2, (0x10004 >> 16)
/* 41B040 802A62B0 0C098F3F */ jal set_animation
/* 41B044 802A62B4 34C60004 */ ori $a2, $a2, (0x10004 & 0xFFFF)
/* 41B048 802A62B8 2602FFFF */ addiu $v0, $s0, -0x1
/* 41B04C 802A62BC 00021080 */ sll $v0, $v0, 2
/* 41B050 802A62C0 3C01802B */ lui $at, %hi(D_802AD0BB)
/* 41B054 802A62C4 00220821 */ addu $at, $at, $v0
/* 41B058 802A62C8 9022D0BB */ lbu $v0, %lo(D_802AD0BB)($at)
/* 41B05C 802A62CC 0000982D */ daddu $s3, $zero, $zero
/* 41B060 802A62D0 A2C20048 */ sb $v0, 0x48($s6)
/* 41B064 802A62D4 A2C2004C */ sb $v0, 0x4C($s6)
/* 41B068 802A62D8 02D31021 */ addu $v0, $s6, $s3
.L802A62DC_7ADC7C:
/* 41B06C 802A62DC 26730001 */ addiu $s3, $s3, 0x1
/* 41B070 802A62E0 A04001DE */ sb $zero, 0x1DE($v0)
/* 41B074 802A62E4 A6C001AE */ sh $zero, 0x1AE($s6)
/* 41B078 802A62E8 A04001F6 */ sb $zero, 0x1F6($v0)
/* 41B07C 802A62EC 2A620018 */ slti $v0, $s3, 0x18
/* 41B080 802A62F0 1440FFFA */ bnez $v0, .L802A62DC_7ADC7C
/* 41B084 802A62F4 02D31021 */ addu $v0, $s6, $s3
/* 41B088 802A62F8 82C30048 */ lb $v1, 0x48($s6)
/* 41B08C 802A62FC 24100001 */ addiu $s0, $zero, 0x1
/* 41B090 802A6300 10700059 */ beq $v1, $s0, .L802A6468_7ADE08
/* 41B094 802A6304 28620002 */ slti $v0, $v1, 0x2
/* 41B098 802A6308 10400005 */ beqz $v0, .L802A6320_7ADCC0
/* 41B09C 802A630C 24020002 */ addiu $v0, $zero, 0x2
/* 41B0A0 802A6310 10600059 */ beqz $v1, .L802A6478_7ADE18
/* 41B0A4 802A6314 00000000 */ nop
/* 41B0A8 802A6318 080A99AC */ j .L802A66B0_7AE050
/* 41B0AC 802A631C 00000000 */ nop
.L802A6320_7ADCC0:
/* 41B0B0 802A6320 10620005 */ beq $v1, $v0, .L802A6338_7ADCD8
/* 41B0B4 802A6324 24020008 */ addiu $v0, $zero, 0x8
/* 41B0B8 802A6328 1062005E */ beq $v1, $v0, .L802A64A4_7ADE44
/* 41B0BC 802A632C 24140001 */ addiu $s4, $zero, 0x1
/* 41B0C0 802A6330 080A99AC */ j .L802A66B0_7AE050
/* 41B0C4 802A6334 00000000 */ nop
.L802A6338_7ADCD8:
/* 41B0C8 802A6338 0000982D */ daddu $s3, $zero, $zero
/* 41B0CC 802A633C 3C148008 */ lui $s4, %hi(gItemTable)
/* 41B0D0 802A6340 269478E0 */ addiu $s4, $s4, %lo(gItemTable)
/* 41B0D4 802A6344 24120002 */ addiu $s2, $zero, 0x2
/* 41B0D8 802A6348 02A0882D */ daddu $s1, $s5, $zero
/* 41B0DC 802A634C 3C03802B */ lui $v1, %hi(D_802AB513)
/* 41B0E0 802A6350 9063B513 */ lbu $v1, %lo(D_802AB513)($v1)
/* 41B0E4 802A6354 24020155 */ addiu $v0, $zero, 0x155
/* 41B0E8 802A6358 A6C201AE */ sh $v0, 0x1AE($s6)
/* 41B0EC 802A635C A2D001F6 */ sb $s0, 0x1F6($s6)
/* 41B0F0 802A6360 A2C301DE */ sb $v1, 0x1DE($s6)
.L802A6364_7ADD04:
/* 41B0F4 802A6364 862201B4 */ lh $v0, 0x1B4($s1)
/* 41B0F8 802A6368 5040000B */ beql $v0, $zero, .L802A6398_7ADD38
/* 41B0FC 802A636C 26730001 */ addiu $s3, $s3, 0x1
/* 41B100 802A6370 00021140 */ sll $v0, $v0, 5
/* 41B104 802A6374 A2D20178 */ sb $s2, 0x178($s6)
/* 41B108 802A6378 962301B4 */ lhu $v1, 0x1B4($s1)
/* 41B10C 802A637C 00548021 */ addu $s0, $v0, $s4
/* 41B110 802A6380 A6C3017A */ sh $v1, 0x17A($s6)
/* 41B114 802A6384 8E020008 */ lw $v0, 0x8($s0)
/* 41B118 802A6388 02E0202D */ daddu $a0, $s7, $zero
/* 41B11C 802A638C 0C098C0B */ jal func_8026302C
/* 41B120 802A6390 AEC20184 */ sw $v0, 0x184($s6)
/* 41B124 802A6394 26730001 */ addiu $s3, $s3, 0x1
.L802A6398_7ADD38:
/* 41B128 802A6398 2A62000A */ slti $v0, $s3, 0xA
/* 41B12C 802A639C 1440FFF1 */ bnez $v0, .L802A6364_7ADD04
/* 41B130 802A63A0 26310002 */ addiu $s1, $s1, 0x2
/* 41B134 802A63A4 24140001 */ addiu $s4, $zero, 0x1
/* 41B138 802A63A8 0000982D */ daddu $s3, $zero, $zero
/* 41B13C 802A63AC 3C0B8008 */ lui $t3, %hi(gItemTable)
/* 41B140 802A63B0 256B78E0 */ addiu $t3, $t3, %lo(gItemTable)
/* 41B144 802A63B4 3C0A8009 */ lui $t2, %hi(gMoveTable)
/* 41B148 802A63B8 254AF060 */ addiu $t2, $t2, %lo(gMoveTable)
/* 41B14C 802A63BC 3C09802B */ lui $t1, %hi(D_802AB4F0_7B2E90)
/* 41B150 802A63C0 2529B4F0 */ addiu $t1, $t1, %lo(D_802AB4F0_7B2E90)
/* 41B154 802A63C4 0280402D */ daddu $t0, $s4, $zero
/* 41B158 802A63C8 02A0302D */ daddu $a2, $s5, $zero
/* 41B15C 802A63CC 26C70002 */ addiu $a3, $s6, 0x2
.L802A63D0_7ADD70:
/* 41B160 802A63D0 84C20208 */ lh $v0, 0x208($a2)
/* 41B164 802A63D4 5040001C */ beql $v0, $zero, .L802A6448_7ADDE8
/* 41B168 802A63D8 26730001 */ addiu $s3, $s3, 0x1
/* 41B16C 802A63DC 00021140 */ sll $v0, $v0, 5
/* 41B170 802A63E0 004B1021 */ addu $v0, $v0, $t3
/* 41B174 802A63E4 9045001A */ lbu $a1, 0x1A($v0)
/* 41B178 802A63E8 82C30048 */ lb $v1, 0x48($s6)
/* 41B17C 802A63EC 00051080 */ sll $v0, $a1, 2
/* 41B180 802A63F0 00451021 */ addu $v0, $v0, $a1
/* 41B184 802A63F4 00021080 */ sll $v0, $v0, 2
/* 41B188 802A63F8 004A9021 */ addu $s2, $v0, $t2
/* 41B18C 802A63FC 00031880 */ sll $v1, $v1, 2
/* 41B190 802A6400 00691821 */ addu $v1, $v1, $t1
/* 41B194 802A6404 82440010 */ lb $a0, 0x10($s2)
/* 41B198 802A6408 8C620000 */ lw $v0, 0x0($v1)
/* 41B19C 802A640C 5482000E */ bnel $a0, $v0, .L802A6448_7ADDE8
/* 41B1A0 802A6410 26730001 */ addiu $s3, $s3, 0x1
/* 41B1A4 802A6414 02D42021 */ addu $a0, $s6, $s4
/* 41B1A8 802A6418 A08501DE */ sb $a1, 0x1DE($a0)
/* 41B1AC 802A641C 94C20208 */ lhu $v0, 0x208($a2)
/* 41B1B0 802A6420 A4E201AE */ sh $v0, 0x1AE($a3)
/* 41B1B4 802A6424 A08801F6 */ sb $t0, 0x1F6($a0)
/* 41B1B8 802A6428 82A20005 */ lb $v0, 0x5($s5)
/* 41B1BC 802A642C 82430011 */ lb $v1, 0x11($s2)
/* 41B1C0 802A6430 0043102A */ slt $v0, $v0, $v1
/* 41B1C4 802A6434 54400001 */ bnel $v0, $zero, .L802A643C_7ADDDC
/* 41B1C8 802A6438 A08001F6 */ sb $zero, 0x1F6($a0)
.L802A643C_7ADDDC:
/* 41B1CC 802A643C 24E70002 */ addiu $a3, $a3, 0x2
/* 41B1D0 802A6440 26940001 */ addiu $s4, $s4, 0x1
/* 41B1D4 802A6444 26730001 */ addiu $s3, $s3, 0x1
.L802A6448_7ADDE8:
/* 41B1D8 802A6448 2A620040 */ slti $v0, $s3, 0x40
/* 41B1DC 802A644C 1440FFE0 */ bnez $v0, .L802A63D0_7ADD70
/* 41B1E0 802A6450 24C60002 */ addiu $a2, $a2, 0x2
/* 41B1E4 802A6454 24020001 */ addiu $v0, $zero, 0x1
/* 41B1E8 802A6458 16820095 */ bne $s4, $v0, .L802A66B0_7AE050
/* 41B1EC 802A645C A2D4020E */ sb $s4, 0x20E($s6)
/* 41B1F0 802A6460 080A99AC */ j .L802A66B0_7AE050
/* 41B1F4 802A6464 A2C0020E */ sb $zero, 0x20E($s6)
.L802A6468_7ADE08:
/* 41B1F8 802A6468 0C098DB9 */ jal btl_init_menu_hammer
/* 41B1FC 802A646C 00000000 */ nop
/* 41B200 802A6470 080A9920 */ j .L802A6480_7ADE20
/* 41B204 802A6474 00000000 */ nop
.L802A6478_7ADE18:
/* 41B208 802A6478 0C098D2E */ jal btl_init_menu_boots
/* 41B20C 802A647C 00000000 */ nop
.L802A6480_7ADE20:
/* 41B210 802A6480 92C2020E */ lbu $v0, 0x20E($s6)
/* 41B214 802A6484 50500001 */ beql $v0, $s0, .L802A648C_7ADE2C
/* 41B218 802A6488 A2C0020E */ sb $zero, 0x20E($s6)
.L802A648C_7ADE2C:
/* 41B21C 802A648C 82C30083 */ lb $v1, 0x83($s6)
/* 41B220 802A6490 24020002 */ addiu $v0, $zero, 0x2
/* 41B224 802A6494 50620086 */ beql $v1, $v0, .L802A66B0_7AE050
/* 41B228 802A6498 A2C0020E */ sb $zero, 0x20E($s6)
/* 41B22C 802A649C 080A99AC */ j .L802A66B0_7AE050
/* 41B230 802A64A0 00000000 */ nop
.L802A64A4_7ADE44:
/* 41B234 802A64A4 0000982D */ daddu $s3, $zero, $zero
/* 41B238 802A64A8 24020077 */ addiu $v0, $zero, 0x77
/* 41B23C 802A64AC A2C201DE */ sb $v0, 0x1DE($s6)
/* 41B240 802A64B0 82A3028E */ lb $v1, 0x28E($s5)
/* 41B244 802A64B4 24020155 */ addiu $v0, $zero, 0x155
/* 41B248 802A64B8 A6C201AE */ sh $v0, 0x1AE($s6)
/* 41B24C 802A64BC 1860002B */ blez $v1, .L802A656C_7ADF0C
/* 41B250 802A64C0 A2D001F6 */ sb $s0, 0x1F6($s6)
/* 41B254 802A64C4 241E0008 */ addiu $fp, $zero, 0x8
/* 41B258 802A64C8 3C038009 */ lui $v1, %hi(D_8008F9C0)
/* 41B25C 802A64CC 2463F9C0 */ addiu $v1, $v1, %lo(D_8008F9C0)
/* 41B260 802A64D0 26D10002 */ addiu $s1, $s6, 0x2
.L802A64D4_7ADE74:
/* 41B264 802A64D4 0060902D */ daddu $s2, $v1, $zero
/* 41B268 802A64D8 02D48021 */ addu $s0, $s6, $s4
/* 41B26C 802A64DC 26620078 */ addiu $v0, $s3, 0x78
/* 41B270 802A64E0 A20201DE */ sb $v0, 0x1DE($s0)
/* 41B274 802A64E4 A62001AE */ sh $zero, 0x1AE($s1)
/* 41B278 802A64E8 A2DE0178 */ sb $fp, 0x178($s6)
/* 41B27C 802A64EC A6C2017A */ sh $v0, 0x17A($s6)
/* 41B280 802A64F0 8E420004 */ lw $v0, 0x4($s2)
/* 41B284 802A64F4 02E0202D */ daddu $a0, $s7, $zero
/* 41B288 802A64F8 0C098C0B */ jal func_8026302C
/* 41B28C 802A64FC AEC20184 */ sw $v0, 0x184($s6)
/* 41B290 802A6500 24020001 */ addiu $v0, $zero, 0x1
/* 41B294 802A6504 A20201F6 */ sb $v0, 0x1F6($s0)
/* 41B298 802A6508 82E2040C */ lb $v0, 0x40C($s7)
/* 41B29C 802A650C 14400002 */ bnez $v0, .L802A6518_7ADEB8
/* 41B2A0 802A6510 2402FFFE */ addiu $v0, $zero, -0x2
/* 41B2A4 802A6514 A20201F6 */ sb $v0, 0x1F6($s0)
.L802A6518_7ADEB8:
/* 41B2A8 802A6518 86A20290 */ lh $v0, 0x290($s5)
/* 41B2AC 802A651C 04420001 */ bltzl $v0, .L802A6524_7ADEC4
/* 41B2B0 802A6520 244200FF */ addiu $v0, $v0, 0xFF
.L802A6524_7ADEC4:
/* 41B2B4 802A6524 82430011 */ lb $v1, 0x11($s2)
/* 41B2B8 802A6528 00021203 */ sra $v0, $v0, 8
/* 41B2BC 802A652C 0043102A */ slt $v0, $v0, $v1
/* 41B2C0 802A6530 54400001 */ bnel $v0, $zero, .L802A6538_7ADED8
/* 41B2C4 802A6534 A20001F6 */ sb $zero, 0x1F6($s0)
.L802A6538_7ADED8:
/* 41B2C8 802A6538 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4)
/* 41B2CC 802A653C 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0)
/* 41B2D0 802A6540 30421000 */ andi $v0, $v0, 0x1000
/* 41B2D4 802A6544 10400002 */ beqz $v0, .L802A6550_7ADEF0
/* 41B2D8 802A6548 2402FFFF */ addiu $v0, $zero, -0x1
/* 41B2DC 802A654C A20201F6 */ sb $v0, 0x1F6($s0)
.L802A6550_7ADEF0:
/* 41B2E0 802A6550 26310002 */ addiu $s1, $s1, 0x2
/* 41B2E4 802A6554 26940001 */ addiu $s4, $s4, 0x1
/* 41B2E8 802A6558 82A2028E */ lb $v0, 0x28E($s5)
/* 41B2EC 802A655C 26730001 */ addiu $s3, $s3, 0x1
/* 41B2F0 802A6560 0262102A */ slt $v0, $s3, $v0
/* 41B2F4 802A6564 1440FFDB */ bnez $v0, .L802A64D4_7ADE74
/* 41B2F8 802A6568 26430014 */ addiu $v1, $s2, 0x14
.L802A656C_7ADF0C:
/* 41B2FC 802A656C 82B10292 */ lb $s1, 0x292($s5)
/* 41B300 802A6570 24020001 */ addiu $v0, $zero, 0x1
/* 41B304 802A6574 16220024 */ bne $s1, $v0, .L802A6608_7ADFA8
/* 41B308 802A6578 02D48021 */ addu $s0, $s6, $s4
/* 41B30C 802A657C 3C128009 */ lui $s2, %hi(D_8008FA4C)
D_802A6580_7ADF20:
/* 41B310 802A6580 2652FA4C */ addiu $s2, $s2, %lo(D_8008FA4C)
/* 41B314 802A6584 2402007F */ addiu $v0, $zero, 0x7F
/* 41B318 802A6588 A20201DE */ sb $v0, 0x1DE($s0)
/* 41B31C 802A658C 00141040 */ sll $v0, $s4, 1
/* 41B320 802A6590 02C21021 */ addu $v0, $s6, $v0
/* 41B324 802A6594 A44001AE */ sh $zero, 0x1AE($v0)
/* 41B328 802A6598 24020008 */ addiu $v0, $zero, 0x8
/* 41B32C 802A659C A2C20178 */ sb $v0, 0x178($s6)
/* 41B330 802A65A0 26620078 */ addiu $v0, $s3, 0x78
/* 41B334 802A65A4 A6C2017A */ sh $v0, 0x17A($s6)
/* 41B338 802A65A8 8E420004 */ lw $v0, 0x4($s2)
/* 41B33C 802A65AC 02E0202D */ daddu $a0, $s7, $zero
/* 41B340 802A65B0 0C098C0B */ jal func_8026302C
/* 41B344 802A65B4 AEC20184 */ sw $v0, 0x184($s6)
/* 41B348 802A65B8 A21101F6 */ sb $s1, 0x1F6($s0)
/* 41B34C 802A65BC 82E2040C */ lb $v0, 0x40C($s7)
/* 41B350 802A65C0 14400002 */ bnez $v0, .L802A65CC_7ADF6C
/* 41B354 802A65C4 2402FFFE */ addiu $v0, $zero, -0x2
/* 41B358 802A65C8 A20201F6 */ sb $v0, 0x1F6($s0)
.L802A65CC_7ADF6C:
/* 41B35C 802A65CC 86A20290 */ lh $v0, 0x290($s5)
/* 41B360 802A65D0 04420001 */ bltzl $v0, .L802A65D8_7ADF78
/* 41B364 802A65D4 244200FF */ addiu $v0, $v0, 0xFF
.L802A65D8_7ADF78:
/* 41B368 802A65D8 82430011 */ lb $v1, 0x11($s2)
/* 41B36C 802A65DC 00021203 */ sra $v0, $v0, 8
/* 41B370 802A65E0 0043102A */ slt $v0, $v0, $v1
/* 41B374 802A65E4 54400001 */ bnel $v0, $zero, .L802A65EC_7ADF8C
/* 41B378 802A65E8 A20001F6 */ sb $zero, 0x1F6($s0)
.L802A65EC_7ADF8C:
/* 41B37C 802A65EC 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4)
/* 41B380 802A65F0 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0)
/* 41B384 802A65F4 30421000 */ andi $v0, $v0, 0x1000
D_802A65F8_7ADF98:
/* 41B388 802A65F8 10400002 */ beqz $v0, .L802A6604_7ADFA4
/* 41B38C 802A65FC 2402FFFF */ addiu $v0, $zero, -0x1
/* 41B390 802A6600 A20201F6 */ sb $v0, 0x1F6($s0)
.L802A6604_7ADFA4:
/* 41B394 802A6604 26940001 */ addiu $s4, $s4, 0x1
.L802A6608_7ADFA8:
/* 41B398 802A6608 82A30292 */ lb $v1, 0x292($s5)
/* 41B39C 802A660C 24020002 */ addiu $v0, $zero, 0x2
/* 41B3A0 802A6610 54620027 */ bnel $v1, $v0, .L802A66B0_7AE050
/* 41B3A4 802A6614 A2D4020E */ sb $s4, 0x20E($s6)
/* 41B3A8 802A6618 3C128009 */ lui $s2, %hi(D_8008FA60)
/* 41B3AC 802A661C 2652FA60 */ addiu $s2, $s2, %lo(D_8008FA60)
/* 41B3B0 802A6620 02D48021 */ addu $s0, $s6, $s4
/* 41B3B4 802A6624 24020080 */ addiu $v0, $zero, 0x80
/* 41B3B8 802A6628 A20201DE */ sb $v0, 0x1DE($s0)
/* 41B3BC 802A662C 00141040 */ sll $v0, $s4, 1
/* 41B3C0 802A6630 02C21021 */ addu $v0, $s6, $v0
/* 41B3C4 802A6634 A44001AE */ sh $zero, 0x1AE($v0)
/* 41B3C8 802A6638 24020008 */ addiu $v0, $zero, 0x8
/* 41B3CC 802A663C A2C20178 */ sb $v0, 0x178($s6)
D_802A6640_7ADFE0:
/* 41B3D0 802A6640 26620078 */ addiu $v0, $s3, 0x78
/* 41B3D4 802A6644 A6C2017A */ sh $v0, 0x17A($s6)
/* 41B3D8 802A6648 8E420004 */ lw $v0, 0x4($s2)
/* 41B3DC 802A664C 02E0202D */ daddu $a0, $s7, $zero
D_802A6650_7ADFF0:
/* 41B3E0 802A6650 0C098C0B */ jal func_8026302C
/* 41B3E4 802A6654 AEC20184 */ sw $v0, 0x184($s6)
/* 41B3E8 802A6658 24020001 */ addiu $v0, $zero, 0x1
/* 41B3EC 802A665C A20201F6 */ sb $v0, 0x1F6($s0)
D_802A6660_7AE000:
/* 41B3F0 802A6660 82E2040C */ lb $v0, 0x40C($s7)
/* 41B3F4 802A6664 14400002 */ bnez $v0, .L802A6670_7AE010
/* 41B3F8 802A6668 2402FFFE */ addiu $v0, $zero, -0x2
/* 41B3FC 802A666C A20201F6 */ sb $v0, 0x1F6($s0)
.L802A6670_7AE010:
/* 41B400 802A6670 86A20290 */ lh $v0, 0x290($s5)
/* 41B404 802A6674 04420001 */ bltzl $v0, .L802A667C_7AE01C
/* 41B408 802A6678 244200FF */ addiu $v0, $v0, 0xFF
.L802A667C_7AE01C:
/* 41B40C 802A667C 82430011 */ lb $v1, 0x11($s2)
/* 41B410 802A6680 00021203 */ sra $v0, $v0, 8
/* 41B414 802A6684 0043102A */ slt $v0, $v0, $v1
/* 41B418 802A6688 54400001 */ bnel $v0, $zero, .L802A6690_7AE030
/* 41B41C 802A668C A20001F6 */ sb $zero, 0x1F6($s0)
.L802A6690_7AE030:
/* 41B420 802A6690 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4)
/* 41B424 802A6694 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0)
/* 41B428 802A6698 30421000 */ andi $v0, $v0, 0x1000
/* 41B42C 802A669C 10400002 */ beqz $v0, .L802A66A8_7AE048
D_802A66A0_7AE040:
/* 41B430 802A66A0 2402FFFF */ addiu $v0, $zero, -0x1
/* 41B434 802A66A4 A20201F6 */ sb $v0, 0x1F6($s0)
.L802A66A8_7AE048:
/* 41B438 802A66A8 26940001 */ addiu $s4, $s4, 0x1
/* 41B43C 802A66AC A2D4020E */ sb $s4, 0x20E($s6)
.L802A66B0_7AE050:
/* 41B440 802A66B0 82D00048 */ lb $s0, 0x48($s6)
/* 41B444 802A66B4 24020008 */ addiu $v0, $zero, 0x8
/* 41B448 802A66B8 16020003 */ bne $s0, $v0, .L802A66C8_7AE068
/* 41B44C 802A66BC 24020007 */ addiu $v0, $zero, 0x7
/* 41B450 802A66C0 080A9FE1 */ j .L802A7F84_7AF924
/* 41B454 802A66C4 2402003C */ addiu $v0, $zero, 0x3C
.L802A66C8_7AE068:
/* 41B458 802A66C8 16020012 */ bne $s0, $v0, .L802A6714_7AE0B4
/* 41B45C 802A66CC 24020002 */ addiu $v0, $zero, 0x2
/* 41B460 802A66D0 82C30083 */ lb $v1, 0x83($s6)
/* 41B464 802A66D4 10620006 */ beq $v1, $v0, .L802A66F0_7AE090
/* 41B468 802A66D8 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 41B46C 802A66DC 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 41B470 802A66E0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 41B474 802A66E4 00431024 */ and $v0, $v0, $v1
/* 41B478 802A66E8 10400626 */ beqz $v0, .L802A7F84_7AF924
/* 41B47C 802A66EC 240200C8 */ addiu $v0, $zero, 0xC8
.L802A66F0_7AE090:
/* 41B480 802A66F0 0C0A842E */ jal func_802A10B8_7A8A58
/* 41B484 802A66F4 00000000 */ nop
/* 41B488 802A66F8 24040012 */ addiu $a0, $zero, 0x12
/* 41B48C 802A66FC A2D00178 */ sb $s0, 0x178($s6)
/* 41B490 802A6700 A6C0017A */ sh $zero, 0x17A($s6)
/* 41B494 802A6704 0C090464 */ jal func_80241190
/* 41B498 802A6708 A6C0017C */ sh $zero, 0x17C($s6)
/* 41B49C 802A670C 080AA051 */ j .L802A8144_7AFAE4
/* 41B4A0 802A6710 00000000 */ nop
.L802A6714_7AE0B4:
/* 41B4A4 802A6714 92C2020E */ lbu $v0, 0x20E($s6)
/* 41B4A8 802A6718 14400005 */ bnez $v0, .L802A6730_7AE0D0
/* 41B4AC 802A671C 24020002 */ addiu $v0, $zero, 0x2
/* 41B4B0 802A6720 16020686 */ bne $s0, $v0, .L802A813C_7AFADC
/* 41B4B4 802A6724 2402000A */ addiu $v0, $zero, 0xA
/* 41B4B8 802A6728 080A9FE1 */ j .L802A7F84_7AF924
/* 41B4BC 802A672C 24020028 */ addiu $v0, $zero, 0x28
.L802A6730_7AE0D0:
/* 41B4C0 802A6730 16000005 */ bnez $s0, .L802A6748_7AE0E8
/* 41B4C4 802A6734 0000F02D */ daddu $fp, $zero, $zero
/* 41B4C8 802A6738 82C2004D */ lb $v0, 0x4D($s6)
/* 41B4CC 802A673C 04420001 */ bltzl $v0, .L802A6744_7AE0E4
/* 41B4D0 802A6740 A2C0004D */ sb $zero, 0x4D($s6)
.L802A6744_7AE0E4:
/* 41B4D4 802A6744 82DE004D */ lb $fp, 0x4D($s6)
.L802A6748_7AE0E8:
/* 41B4D8 802A6748 82C30048 */ lb $v1, 0x48($s6)
/* 41B4DC 802A674C 24020001 */ addiu $v0, $zero, 0x1
/* 41B4E0 802A6750 14620007 */ bne $v1, $v0, .L802A6770_7AE110
/* 41B4E4 802A6754 24020002 */ addiu $v0, $zero, 0x2
/* 41B4E8 802A6758 82C2004E */ lb $v0, 0x4E($s6)
/* 41B4EC 802A675C 04420001 */ bltzl $v0, .L802A6764_7AE104
/* 41B4F0 802A6760 A2C0004E */ sb $zero, 0x4E($s6)
.L802A6764_7AE104:
/* 41B4F4 802A6764 82DE004E */ lb $fp, 0x4E($s6)
/* 41B4F8 802A6768 82C30048 */ lb $v1, 0x48($s6)
/* 41B4FC 802A676C 24020002 */ addiu $v0, $zero, 0x2
.L802A6770_7AE110:
/* 41B500 802A6770 14620005 */ bne $v1, $v0, .L802A6788_7AE128
/* 41B504 802A6774 00000000 */ nop
/* 41B508 802A6778 82C2004F */ lb $v0, 0x4F($s6)
/* 41B50C 802A677C 04420001 */ bltzl $v0, .L802A6784_7AE124
/* 41B510 802A6780 A2C0004F */ sb $zero, 0x4F($s6)
.L802A6784_7AE124:
/* 41B514 802A6784 82DE004F */ lb $fp, 0x4F($s6)
.L802A6788_7AE128:
/* 41B518 802A6788 92C2020E */ lbu $v0, 0x20E($s6)
/* 41B51C 802A678C 1040007A */ beqz $v0, .L802A6978_7AE318
/* 41B520 802A6790 0000982D */ daddu $s3, $zero, $zero
/* 41B524 802A6794 02D3A021 */ addu $s4, $s6, $s3
.L802A6798_7AE138:
/* 41B528 802A6798 928201DE */ lbu $v0, 0x1DE($s4)
/* 41B52C 802A679C 3C0E8009 */ lui $t6, %hi(gMoveTable)
/* 41B530 802A67A0 25CEF060 */ addiu $t6, $t6, %lo(gMoveTable)
/* 41B534 802A67A4 00021880 */ sll $v1, $v0, 2
/* 41B538 802A67A8 00621821 */ addu $v1, $v1, $v0
/* 41B53C 802A67AC 00031880 */ sll $v1, $v1, 2
/* 41B540 802A67B0 00131040 */ sll $v0, $s3, 1
/* 41B544 802A67B4 02C21021 */ addu $v0, $s6, $v0
/* 41B548 802A67B8 006E9021 */ addu $s2, $v1, $t6
/* 41B54C 802A67BC 3C0E8008 */ lui $t6, %hi(gItemTable)
/* 41B550 802A67C0 25CE78E0 */ addiu $t6, $t6, %lo(gItemTable)
/* 41B554 802A67C4 3C03802B */ lui $v1, %hi(BattleMenu_Moves_OptionCantUseMessages)
/* 41B558 802A67C8 2463D5E8 */ addiu $v1, $v1, %lo(BattleMenu_Moves_OptionCantUseMessages)
/* 41B55C 802A67CC 844201AE */ lh $v0, 0x1AE($v0)
/* 41B560 802A67D0 02632021 */ addu $a0, $s3, $v1
/* 41B564 802A67D4 00021140 */ sll $v0, $v0, 5
/* 41B568 802A67D8 004E8021 */ addu $s0, $v0, $t6
/* 41B56C 802A67DC 86020004 */ lh $v0, 0x4($s0)
/* 41B570 802A67E0 3C0E8009 */ lui $t6, %hi(gItemHudScripts)
/* 41B574 802A67E4 25CEA680 */ addiu $t6, $t6, %lo(gItemHudScripts)
/* 41B578 802A67E8 A0800000 */ sb $zero, 0x0($a0)
/* 41B57C 802A67EC 828301F6 */ lb $v1, 0x1F6($s4)
/* 41B580 802A67F0 000210C0 */ sll $v0, $v0, 3
/* 41B584 802A67F4 14600003 */ bnez $v1, .L802A6804_7AE1A4
/* 41B588 802A67F8 004EA821 */ addu $s5, $v0, $t6
/* 41B58C 802A67FC A0800000 */ sb $zero, 0x0($a0)
/* 41B590 802A6800 828301F6 */ lb $v1, 0x1F6($s4)
.L802A6804_7AE1A4:
/* 41B594 802A6804 2402FFFF */ addiu $v0, $zero, -0x1
/* 41B598 802A6808 14620005 */ bne $v1, $v0, .L802A6820_7AE1C0
/* 41B59C 802A680C 2402FFFE */ addiu $v0, $zero, -0x2
/* 41B5A0 802A6810 A28001F6 */ sb $zero, 0x1F6($s4)
/* 41B5A4 802A6814 240E0048 */ addiu $t6, $zero, 0x48
/* 41B5A8 802A6818 A08E0000 */ sb $t6, 0x0($a0)
/* 41B5AC 802A681C 828301F6 */ lb $v1, 0x1F6($s4)
.L802A6820_7AE1C0:
/* 41B5B0 802A6820 14620003 */ bne $v1, $v0, .L802A6830_7AE1D0
/* 41B5B4 802A6824 240E0048 */ addiu $t6, $zero, 0x48
/* 41B5B8 802A6828 A28001F6 */ sb $zero, 0x1F6($s4)
/* 41B5BC 802A682C A08E0000 */ sb $t6, 0x0($a0)
.L802A6830_7AE1D0:
/* 41B5C0 802A6830 828301F6 */ lb $v1, 0x1F6($s4)
/* 41B5C4 802A6834 2402FFFD */ addiu $v0, $zero, -0x3
/* 41B5C8 802A6838 14620003 */ bne $v1, $v0, .L802A6848_7AE1E8
/* 41B5CC 802A683C 24020054 */ addiu $v0, $zero, 0x54
/* 41B5D0 802A6840 A28001F6 */ sb $zero, 0x1F6($s4)
/* 41B5D4 802A6844 A0820000 */ sb $v0, 0x0($a0)
.L802A6848_7AE1E8:
/* 41B5D8 802A6848 3C03802B */ lui $v1, %hi(battle_menu_moveOptionIconScripts)
/* 41B5DC 802A684C 2463D260 */ addiu $v1, $v1, %lo(battle_menu_moveOptionIconScripts)
/* 41B5E0 802A6850 00138080 */ sll $s0, $s3, 2
/* 41B5E4 802A6854 8EA20000 */ lw $v0, 0x0($s5)
/* 41B5E8 802A6858 02031821 */ addu $v1, $s0, $v1
/* 41B5EC 802A685C AC620000 */ sw $v0, 0x0($v1)
/* 41B5F0 802A6860 828201F6 */ lb $v0, 0x1F6($s4)
/* 41B5F4 802A6864 14400003 */ bnez $v0, .L802A6874_7AE214
/* 41B5F8 802A6868 00000000 */ nop
/* 41B5FC 802A686C 8EA20004 */ lw $v0, 0x4($s5)
/* 41B600 802A6870 AC620000 */ sw $v0, 0x0($v1)
.L802A6874_7AE214:
/* 41B604 802A6874 82420011 */ lb $v0, 0x11($s2)
/* 41B608 802A6878 02E0202D */ daddu $a0, $s7, $zero
/* 41B60C 802A687C 3C01802B */ lui $at, %hi(battle_menu_moveOptionDisplayCosts)
/* 41B610 802A6880 00300821 */ addu $at, $at, $s0
/* 41B614 802A6884 AC22D320 */ sw $v0, %lo(battle_menu_moveOptionDisplayCosts)($at)
/* 41B618 802A6888 82420012 */ lb $v0, 0x12($s2)
/* 41B61C 802A688C 24050018 */ addiu $a1, $zero, 0x18
/* 41B620 802A6890 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionSortPriority)
/* 41B624 802A6894 00330821 */ addu $at, $at, $s3
/* 41B628 802A6898 A020D5D0 */ sb $zero, %lo(BattleMenu_Moves_OptionSortPriority)($at)
/* 41B62C 802A689C 3C01802B */ lui $at, %hi(battle_menu_moveOptionBPCosts)
/* 41B630 802A68A0 00300821 */ addu $at, $at, $s0
/* 41B634 802A68A4 AC22D440 */ sw $v0, %lo(battle_menu_moveOptionBPCosts)($at)
/* 41B638 802A68A8 3C02802B */ lui $v0, %hi(battle_menu_moveOptionDisplayCostReductions)
/* 41B63C 802A68AC 2442D380 */ addiu $v0, $v0, %lo(battle_menu_moveOptionDisplayCostReductions)
/* 41B640 802A68B0 02028821 */ addu $s1, $s0, $v0
/* 41B644 802A68B4 3C02802B */ lui $v0, %hi(battle_menu_moveOptionDisplayCostReductionColors)
/* 41B648 802A68B8 2442D3E0 */ addiu $v0, $v0, %lo(battle_menu_moveOptionDisplayCostReductionColors)
/* 41B64C 802A68BC 0202A821 */ addu $s5, $s0, $v0
/* 41B650 802A68C0 AE200000 */ sw $zero, 0x0($s1)
/* 41B654 802A68C4 0C099CAB */ jal player_team_is_ability_active
/* 41B658 802A68C8 AEA00000 */ sw $zero, 0x0($s5)
/* 41B65C 802A68CC 10400008 */ beqz $v0, .L802A68F0_7AE290
/* 41B660 802A68D0 02E0202D */ daddu $a0, $s7, $zero
/* 41B664 802A68D4 0C099CAB */ jal player_team_is_ability_active
/* 41B668 802A68D8 24050018 */ addiu $a1, $zero, 0x18
/* 41B66C 802A68DC 8E230000 */ lw $v1, 0x0($s1)
/* 41B670 802A68E0 00621821 */ addu $v1, $v1, $v0
/* 41B674 802A68E4 24020001 */ addiu $v0, $zero, 0x1
/* 41B678 802A68E8 AE230000 */ sw $v1, 0x0($s1)
/* 41B67C 802A68EC AEA20000 */ sw $v0, 0x0($s5)
.L802A68F0_7AE290:
/* 41B680 802A68F0 02E0202D */ daddu $a0, $s7, $zero
/* 41B684 802A68F4 0C099CAB */ jal player_team_is_ability_active
/* 41B688 802A68F8 24050026 */ addiu $a1, $zero, 0x26
/* 41B68C 802A68FC 10400009 */ beqz $v0, .L802A6924_7AE2C4
/* 41B690 802A6900 02E0202D */ daddu $a0, $s7, $zero
/* 41B694 802A6904 0C099CAB */ jal player_team_is_ability_active
/* 41B698 802A6908 24050026 */ addiu $a1, $zero, 0x26
/* 41B69C 802A690C 8E230000 */ lw $v1, 0x0($s1)
/* 41B6A0 802A6910 00021040 */ sll $v0, $v0, 1
/* 41B6A4 802A6914 00621821 */ addu $v1, $v1, $v0
/* 41B6A8 802A6918 24020002 */ addiu $v0, $zero, 0x2
/* 41B6AC 802A691C AE230000 */ sw $v1, 0x0($s1)
/* 41B6B0 802A6920 AEA20000 */ sw $v0, 0x0($s5)
.L802A6924_7AE2C4:
/* 41B6B4 802A6924 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionIndices)
/* 41B6B8 802A6928 00300821 */ addu $at, $at, $s0
/* 41B6BC 802A692C AC33D4B0 */ sw $s3, %lo(BattleMenu_Moves_OptionIndices)($at)
/* 41B6C0 802A6930 828201F6 */ lb $v0, 0x1F6($s4)
/* 41B6C4 802A6934 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionEnabled)
/* 41B6C8 802A6938 00300821 */ addu $at, $at, $s0
/* 41B6CC 802A693C AC22D510 */ sw $v0, %lo(BattleMenu_Moves_OptionEnabled)($at)
/* 41B6D0 802A6940 8E420000 */ lw $v0, 0x0($s2)
/* 41B6D4 802A6944 3C01802B */ lui $at, %hi(battle_menu_moveOptionNames)
/* 41B6D8 802A6948 00300821 */ addu $at, $at, $s0
/* 41B6DC 802A694C AC22D2C0 */ sw $v0, %lo(battle_menu_moveOptionNames)($at)
/* 41B6E0 802A6950 8E420008 */ lw $v0, 0x8($s2)
/* 41B6E4 802A6954 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionDescMessages)
/* 41B6E8 802A6958 00300821 */ addu $at, $at, $s0
/* 41B6EC 802A695C AC22D570 */ sw $v0, %lo(BattleMenu_Moves_OptionDescMessages)($at)
/* 41B6F0 802A6960 92C2020E */ lbu $v0, 0x20E($s6)
/* 41B6F4 802A6964 26730001 */ addiu $s3, $s3, 0x1
/* 41B6F8 802A6968 0262102A */ slt $v0, $s3, $v0
/* 41B6FC 802A696C 1440FF8A */ bnez $v0, .L802A6798_7AE138
/* 41B700 802A6970 02D3A021 */ addu $s4, $s6, $s3
/* 41B704 802A6974 92C2020E */ lbu $v0, 0x20E($s6)
.L802A6978_7AE318:
/* 41B708 802A6978 3C01802B */ lui $at, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 41B70C 802A697C AC20D4A0 */ sw $zero, %lo(BattleMenu_UsingSpiritsSubmenu)($at)
/* 41B710 802A6980 3C01802B */ lui $at, %hi(D_802AD4A8)
/* 41B714 802A6984 AC3ED4A8 */ sw $fp, %lo(D_802AD4A8)($at)
/* 41B718 802A6988 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionCount)
/* 41B71C 802A698C AC22D4A4 */ sw $v0, %lo(BattleMenu_Moves_OptionCount)($at)
/* 41B720 802A6990 0C0A89A1 */ jal func_802A2684_7AA024
/* 41B724 802A6994 00000000 */ nop
/* 41B728 802A6998 080AA04F */ j .L802A813C_7AFADC
/* 41B72C 802A699C 24020002 */ addiu $v0, $zero, 0x2
glabel .L802A69A0_7AE340
/* 41B730 802A69A0 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41B734 802A69A4 00000000 */ nop
/* 41B738 802A69A8 0040802D */ daddu $s0, $v0, $zero
/* 41B73C 802A69AC 2402FFFF */ addiu $v0, $zero, -0x1
/* 41B740 802A69B0 120205E2 */ beq $s0, $v0, .L802A813C_7AFADC
/* 41B744 802A69B4 24020007 */ addiu $v0, $zero, 0x7
/* 41B748 802A69B8 120005E2 */ beqz $s0, .L802A8144_7AFAE4
/* 41B74C 802A69BC 240200FF */ addiu $v0, $zero, 0xFF
/* 41B750 802A69C0 5602000B */ bnel $s0, $v0, .L802A69F0_7AE390
/* 41B754 802A69C4 2602FFFF */ addiu $v0, $s0, -0x1
/* 41B758 802A69C8 0C0A8414 */ jal func_802A1050_7A89F0
/* 41B75C 802A69CC 00000000 */ nop
/* 41B760 802A69D0 24020008 */ addiu $v0, $zero, 0x8
/* 41B764 802A69D4 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41B768 802A69D8 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41B76C 802A69DC 24020004 */ addiu $v0, $zero, 0x4
/* 41B770 802A69E0 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41B774 802A69E4 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41B778 802A69E8 080A9FE1 */ j .L802A7F84_7AF924
/* 41B77C 802A69EC 24020001 */ addiu $v0, $zero, 0x1
.L802A69F0_7AE390:
/* 41B780 802A69F0 00021080 */ sll $v0, $v0, 2
/* 41B784 802A69F4 3C01802B */ lui $at, %hi(D_802AD4B3)
/* 41B788 802A69F8 00220821 */ addu $at, $at, $v0
/* 41B78C 802A69FC 9022D4B3 */ lbu $v0, %lo(D_802AD4B3)($at)
/* 41B790 802A6A00 82C30048 */ lb $v1, 0x48($s6)
/* 41B794 802A6A04 A2C20049 */ sb $v0, 0x49($s6)
/* 41B798 802A6A08 00021600 */ sll $v0, $v0, 24
/* 41B79C 802A6A0C 00021603 */ sra $v0, $v0, 24
/* 41B7A0 802A6A10 02C21021 */ addu $v0, $s6, $v0
/* 41B7A4 802A6A14 904201DE */ lbu $v0, 0x1DE($v0)
/* 41B7A8 802A6A18 14600004 */ bnez $v1, .L802A6A2C_7AE3CC
/* 41B7AC 802A6A1C A6C2017C */ sh $v0, 0x17C($s6)
/* 41B7B0 802A6A20 3C02802B */ lui $v0, %hi(D_802AD603)
/* 41B7B4 802A6A24 9042D603 */ lbu $v0, %lo(D_802AD603)($v0)
/* 41B7B8 802A6A28 A2C2004D */ sb $v0, 0x4D($s6)
.L802A6A2C_7AE3CC:
/* 41B7BC 802A6A2C 82C30048 */ lb $v1, 0x48($s6)
/* 41B7C0 802A6A30 24020001 */ addiu $v0, $zero, 0x1
/* 41B7C4 802A6A34 14620004 */ bne $v1, $v0, .L802A6A48_7AE3E8
/* 41B7C8 802A6A38 00000000 */ nop
/* 41B7CC 802A6A3C 3C02802B */ lui $v0, %hi(D_802AD603)
/* 41B7D0 802A6A40 9042D603 */ lbu $v0, %lo(D_802AD603)($v0)
/* 41B7D4 802A6A44 A2C2004E */ sb $v0, 0x4E($s6)
.L802A6A48_7AE3E8:
/* 41B7D8 802A6A48 82C40048 */ lb $a0, 0x48($s6)
/* 41B7DC 802A6A4C 24020002 */ addiu $v0, $zero, 0x2
/* 41B7E0 802A6A50 14820007 */ bne $a0, $v0, .L802A6A70_7AE410
/* 41B7E4 802A6A54 0080182D */ daddu $v1, $a0, $zero
/* 41B7E8 802A6A58 3C02802B */ lui $v0, %hi(D_802AD603)
/* 41B7EC 802A6A5C 9042D603 */ lbu $v0, %lo(D_802AD603)($v0)
/* 41B7F0 802A6A60 14640003 */ bne $v1, $a0, .L802A6A70_7AE410
/* 41B7F4 802A6A64 A2C2004F */ sb $v0, 0x4F($s6)
/* 41B7F8 802A6A68 080A9FE1 */ j .L802A7F84_7AF924
/* 41B7FC 802A6A6C 24020014 */ addiu $v0, $zero, 0x14
.L802A6A70_7AE410:
/* 41B800 802A6A70 0C0A89F4 */ jal D_802A27D0_7AA170
/* 41B804 802A6A74 00000000 */ nop
/* 41B808 802A6A78 0C0A840C */ jal func_802A1030_7A89D0
/* 41B80C 802A6A7C 00000000 */ nop
/* 41B810 802A6A80 080AA04F */ j .L802A813C_7AFADC
/* 41B814 802A6A84 24020003 */ addiu $v0, $zero, 0x3
glabel .L802A6A88_7AE428
/* 41B818 802A6A88 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41B81C 802A6A8C 00000000 */ nop
/* 41B820 802A6A90 8EC30214 */ lw $v1, 0x214($s6)
/* 41B824 802A6A94 30634000 */ andi $v1, $v1, 0x4000
/* 41B828 802A6A98 10600009 */ beqz $v1, .L802A6AC0_7AE460
/* 41B82C 802A6A9C 0040802D */ daddu $s0, $v0, $zero
/* 41B830 802A6AA0 16000007 */ bnez $s0, .L802A6AC0_7AE460
/* 41B834 802A6AA4 00000000 */ nop
/* 41B838 802A6AA8 0C0A8AAE */ jal func_802A2AB8_7AA458
/* 41B83C 802A6AAC 00000000 */ nop
/* 41B840 802A6AB0 0C0A8426 */ jal func_802A1098_7A8A38
/* 41B844 802A6AB4 00000000 */ nop
/* 41B848 802A6AB8 080AA04F */ j .L802A813C_7AFADC
/* 41B84C 802A6ABC 24020004 */ addiu $v0, $zero, 0x4
.L802A6AC0_7AE460:
/* 41B850 802A6AC0 0C0A846C */ jal func_802A11B0_7A8B50
/* 41B854 802A6AC4 00000000 */ nop
/* 41B858 802A6AC8 1040059E */ beqz $v0, .L802A8144_7AFAE4
/* 41B85C 802A6ACC 24020005 */ addiu $v0, $zero, 0x5
/* 41B860 802A6AD0 A6C2006C */ sh $v0, 0x6C($s6)
/* 41B864 802A6AD4 82C20049 */ lb $v0, 0x49($s6)
/* 41B868 802A6AD8 24030006 */ addiu $v1, $zero, 0x6
/* 41B86C 802A6ADC A6C3006E */ sh $v1, 0x6E($s6)
/* 41B870 802A6AE0 02C21021 */ addu $v0, $s6, $v0
/* 41B874 802A6AE4 904301DE */ lbu $v1, 0x1DE($v0)
/* 41B878 802A6AE8 82C20049 */ lb $v0, 0x49($s6)
/* 41B87C 802A6AEC 02C21021 */ addu $v0, $s6, $v0
/* 41B880 802A6AF0 A6C3017C */ sh $v1, 0x17C($s6)
/* 41B884 802A6AF4 904301DE */ lbu $v1, 0x1DE($v0)
/* 41B888 802A6AF8 82D00048 */ lb $s0, 0x48($s6)
/* 41B88C 802A6AFC 00031080 */ sll $v0, $v1, 2
/* 41B890 802A6B00 00431021 */ addu $v0, $v0, $v1
/* 41B894 802A6B04 00021080 */ sll $v0, $v0, 2
/* 41B898 802A6B08 3C018009 */ lui $at, %hi(D_8008F064)
/* 41B89C 802A6B0C 00220821 */ addu $at, $at, $v0
/* 41B8A0 802A6B10 8C22F064 */ lw $v0, %lo(D_8008F064)($at)
/* 41B8A4 802A6B14 AEC20184 */ sw $v0, 0x184($s6)
/* 41B8A8 802A6B18 24020001 */ addiu $v0, $zero, 0x1
/* 41B8AC 802A6B1C 1202000E */ beq $s0, $v0, .L802A6B58_7AE4F8
/* 41B8B0 802A6B20 2A020002 */ slti $v0, $s0, 0x2
/* 41B8B4 802A6B24 50400005 */ beql $v0, $zero, .L802A6B3C_7AE4DC
/* 41B8B8 802A6B28 24020004 */ addiu $v0, $zero, 0x4
/* 41B8BC 802A6B2C 12000007 */ beqz $s0, .L802A6B4C_7AE4EC
/* 41B8C0 802A6B30 24040011 */ addiu $a0, $zero, 0x11
/* 41B8C4 802A6B34 080AA051 */ j .L802A8144_7AFAE4
/* 41B8C8 802A6B38 00000000 */ nop
.L802A6B3C_7AE4DC:
/* 41B8CC 802A6B3C 1202000F */ beq $s0, $v0, .L802A6B7C_7AE51C
/* 41B8D0 802A6B40 00000000 */ nop
/* 41B8D4 802A6B44 080AA051 */ j .L802A8144_7AFAE4
/* 41B8D8 802A6B48 00000000 */ nop
.L802A6B4C_7AE4EC:
/* 41B8DC 802A6B4C 92A20000 */ lbu $v0, 0x0($s5)
/* 41B8E0 802A6B50 080A9AD9 */ j .L802A6B64_7AE504
/* 41B8E4 802A6B54 A2C00178 */ sb $zero, 0x178($s6)
.L802A6B58_7AE4F8:
/* 41B8E8 802A6B58 92A20001 */ lbu $v0, 0x1($s5)
/* 41B8EC 802A6B5C 24040011 */ addiu $a0, $zero, 0x11
/* 41B8F0 802A6B60 A2D00178 */ sb $s0, 0x178($s6)
.L802A6B64_7AE504:
/* 41B8F4 802A6B64 00021600 */ sll $v0, $v0, 24
/* 41B8F8 802A6B68 00021603 */ sra $v0, $v0, 24
/* 41B8FC 802A6B6C 0C090464 */ jal func_80241190
/* 41B900 802A6B70 A6C2017A */ sh $v0, 0x17A($s6)
/* 41B904 802A6B74 080AA051 */ j .L802A8144_7AFAE4
/* 41B908 802A6B78 00000000 */ nop
.L802A6B7C_7AE51C:
/* 41B90C 802A6B7C 86C2006E */ lh $v0, 0x6E($s6)
/* 41B910 802A6B80 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41B914 802A6B84 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 41B918 802A6B88 0C0A9662 */ jal func_802A5988_7AD328
/* 41B91C 802A6B8C 00000000 */ nop
/* 41B920 802A6B90 080A9F69 */ j .L802A7DA4_7AF744
/* 41B924 802A6B94 24040019 */ addiu $a0, $zero, 0x19
glabel .L802A6B98_7AE538
/* 41B928 802A6B98 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41B92C 802A6B9C 00000000 */ nop
/* 41B930 802A6BA0 0C0A846C */ jal func_802A11B0_7A8B50
/* 41B934 802A6BA4 00000000 */ nop
/* 41B938 802A6BA8 10400566 */ beqz $v0, .L802A8144_7AFAE4
/* 41B93C 802A6BAC 24020002 */ addiu $v0, $zero, 0x2
/* 41B940 802A6BB0 080AA04F */ j .L802A813C_7AFADC
/* 41B944 802A6BB4 00000000 */ nop
glabel .L802A6BB8_7AE558
/* 41B948 802A6BB8 0C0A8AAE */ jal func_802A2AB8_7AA458
/* 41B94C 802A6BBC 00000000 */ nop
/* 41B950 802A6BC0 0C0A8426 */ jal func_802A1098_7A8A38
/* 41B954 802A6BC4 00000000 */ nop
/* 41B958 802A6BC8 080AA04F */ j .L802A813C_7AFADC
/* 41B95C 802A6BCC 24020004 */ addiu $v0, $zero, 0x4
glabel .L802A6BD0_7AE570
/* 41B960 802A6BD0 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41B964 802A6BD4 00000000 */ nop
/* 41B968 802A6BD8 2403FFFF */ addiu $v1, $zero, -0x1
/* 41B96C 802A6BDC 10430559 */ beq $v0, $v1, .L802A8144_7AFAE4
/* 41B970 802A6BE0 24020002 */ addiu $v0, $zero, 0x2
/* 41B974 802A6BE4 080AA04F */ j .L802A813C_7AFADC
/* 41B978 802A6BE8 00000000 */ nop
glabel .L802A6BEC_7AE58C
/* 41B97C 802A6BEC 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4)
/* 41B980 802A6BF0 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0)
/* 41B984 802A6BF4 30420004 */ andi $v0, $v0, 0x4
/* 41B988 802A6BF8 10400004 */ beqz $v0, .L802A6C0C_7AE5AC
/* 41B98C 802A6BFC 24040050 */ addiu $a0, $zero, 0x50
/* 41B990 802A6C00 2405003C */ addiu $a1, $zero, 0x3C
/* 41B994 802A6C04 080A9B06 */ j .L802A6C18_7AE5B8
/* 41B998 802A6C08 0000302D */ daddu $a2, $zero, $zero
.L802A6C0C_7AE5AC:
/* 41B99C 802A6C0C 24040051 */ addiu $a0, $zero, 0x51
/* 41B9A0 802A6C10 82A60012 */ lb $a2, 0x12($s5)
/* 41B9A4 802A6C14 2405003C */ addiu $a1, $zero, 0x3C
.L802A6C18_7AE5B8:
/* 41B9A8 802A6C18 0C093E81 */ jal func_8024FA04
/* 41B9AC 802A6C1C 00000000 */ nop
/* 41B9B0 802A6C20 24020001 */ addiu $v0, $zero, 0x1
/* 41B9B4 802A6C24 3C01802B */ lui $at, %hi(D_802AD607)
/* 41B9B8 802A6C28 A022D607 */ sb $v0, %lo(D_802AD607)($at)
/* 41B9BC 802A6C2C 080AA04F */ j .L802A813C_7AFADC
/* 41B9C0 802A6C30 24020009 */ addiu $v0, $zero, 0x9
glabel .L802A6C34_7AE5D4
/* 41B9C4 802A6C34 0C093EAD */ jal func_8024FAB4
/* 41B9C8 802A6C38 00000000 */ nop
/* 41B9CC 802A6C3C 14400541 */ bnez $v0, .L802A8144_7AFAE4
/* 41B9D0 802A6C40 24020004 */ addiu $v0, $zero, 0x4
/* 41B9D4 802A6C44 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41B9D8 802A6C48 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41B9DC 802A6C4C 3C01802B */ lui $at, %hi(D_802AD607)
/* 41B9E0 802A6C50 A020D607 */ sb $zero, %lo(D_802AD607)($at)
/* 41B9E4 802A6C54 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41B9E8 802A6C58 AC20CC60 */ sw $zero, %lo(D_802ACC60)($at)
/* 41B9EC 802A6C5C 080AA04F */ j .L802A813C_7AFADC
/* 41B9F0 802A6C60 24020001 */ addiu $v0, $zero, 0x1
glabel .L802A6C64_7AE604
/* 41B9F4 802A6C64 0C0A840C */ jal func_802A1030_7A89D0
/* 41B9F8 802A6C68 00000000 */ nop
/* 41B9FC 802A6C6C 080AA04F */ j .L802A813C_7AFADC
/* 41BA00 802A6C70 2402000B */ addiu $v0, $zero, 0xB
glabel .L802A6C74_7AE614
/* 41BA04 802A6C74 0C0A846C */ jal func_802A11B0_7A8B50
/* 41BA08 802A6C78 00000000 */ nop
/* 41BA0C 802A6C7C 8EC30214 */ lw $v1, 0x214($s6)
/* 41BA10 802A6C80 30634000 */ andi $v1, $v1, 0x4000
/* 41BA14 802A6C84 10600007 */ beqz $v1, .L802A6CA4_7AE644
/* 41BA18 802A6C88 0040802D */ daddu $s0, $v0, $zero
/* 41BA1C 802A6C8C 16000007 */ bnez $s0, .L802A6CAC_7AE64C
/* 41BA20 802A6C90 00000000 */ nop
/* 41BA24 802A6C94 0C0A841E */ jal func_802A1078_7A8A18
/* 41BA28 802A6C98 00000000 */ nop
/* 41BA2C 802A6C9C 080AA04F */ j .L802A813C_7AFADC
/* 41BA30 802A6CA0 2402000C */ addiu $v0, $zero, 0xC
.L802A6CA4_7AE644:
/* 41BA34 802A6CA4 12000527 */ beqz $s0, .L802A8144_7AFAE4
/* 41BA38 802A6CA8 00000000 */ nop
.L802A6CAC_7AE64C:
/* 41BA3C 802A6CAC 82C40048 */ lb $a0, 0x48($s6)
/* 41BA40 802A6CB0 2402000D */ addiu $v0, $zero, 0xD
/* 41BA44 802A6CB4 A6C2006C */ sh $v0, 0x6C($s6)
/* 41BA48 802A6CB8 2402000E */ addiu $v0, $zero, 0xE
/* 41BA4C 802A6CBC 10800006 */ beqz $a0, .L802A6CD8_7AE678
/* 41BA50 802A6CC0 A6C2006E */ sh $v0, 0x6E($s6)
/* 41BA54 802A6CC4 24020001 */ addiu $v0, $zero, 0x1
/* 41BA58 802A6CC8 1082000C */ beq $a0, $v0, .L802A6CFC_7AE69C
/* 41BA5C 802A6CCC 00000000 */ nop
/* 41BA60 802A6CD0 080A9B56 */ j .L802A6D58_7AE6F8
/* 41BA64 802A6CD4 00000000 */ nop
.L802A6CD8_7AE678:
/* 41BA68 802A6CD8 92A30000 */ lbu $v1, 0x0($s5)
/* 41BA6C 802A6CDC A2C00178 */ sb $zero, 0x178($s6)
/* 41BA70 802A6CE0 92A20000 */ lbu $v0, 0x0($s5)
/* 41BA74 802A6CE4 00031E00 */ sll $v1, $v1, 24
/* 41BA78 802A6CE8 00031E03 */ sra $v1, $v1, 24
/* 41BA7C 802A6CEC 00021600 */ sll $v0, $v0, 24
/* 41BA80 802A6CF0 00021603 */ sra $v0, $v0, 24
/* 41BA84 802A6CF4 080A9B47 */ j .L802A6D1C_7AE6BC
/* 41BA88 802A6CF8 2442001A */ addiu $v0, $v0, 0x1A
.L802A6CFC_7AE69C:
/* 41BA8C 802A6CFC 92A30001 */ lbu $v1, 0x1($s5)
/* 41BA90 802A6D00 A2C40178 */ sb $a0, 0x178($s6)
/* 41BA94 802A6D04 92A20001 */ lbu $v0, 0x1($s5)
/* 41BA98 802A6D08 00031E00 */ sll $v1, $v1, 24
/* 41BA9C 802A6D0C 00031E03 */ sra $v1, $v1, 24
/* 41BAA0 802A6D10 00021600 */ sll $v0, $v0, 24
/* 41BAA4 802A6D14 00021603 */ sra $v0, $v0, 24
/* 41BAA8 802A6D18 24420003 */ addiu $v0, $v0, 0x3
.L802A6D1C_7AE6BC:
/* 41BAAC 802A6D1C A6C2017C */ sh $v0, 0x17C($s6)
/* 41BAB0 802A6D20 00021400 */ sll $v0, $v0, 16
/* 41BAB4 802A6D24 00021403 */ sra $v0, $v0, 16
/* 41BAB8 802A6D28 A6C3017A */ sh $v1, 0x17A($s6)
/* 41BABC 802A6D2C 00021880 */ sll $v1, $v0, 2
/* 41BAC0 802A6D30 00621821 */ addu $v1, $v1, $v0
/* 41BAC4 802A6D34 00031880 */ sll $v1, $v1, 2
/* 41BAC8 802A6D38 3C028009 */ lui $v0, %hi(D_8008F064)
/* 41BACC 802A6D3C 00431021 */ addu $v0, $v0, $v1
/* 41BAD0 802A6D40 8C42F064 */ lw $v0, %lo(D_8008F064)($v0)
/* 41BAD4 802A6D44 24040011 */ addiu $a0, $zero, 0x11
/* 41BAD8 802A6D48 0C090464 */ jal func_80241190
/* 41BADC 802A6D4C AEC20184 */ sw $v0, 0x184($s6)
/* 41BAE0 802A6D50 080AA051 */ j .L802A8144_7AFAE4
/* 41BAE4 802A6D54 00000000 */ nop
glabel .L802A6D58_7AE6F8
/* 41BAE8 802A6D58 0C0A846C */ jal func_802A11B0_7A8B50
/* 41BAEC 802A6D5C 00000000 */ nop
/* 41BAF0 802A6D60 104004F8 */ beqz $v0, .L802A8144_7AFAE4
/* 41BAF4 802A6D64 24020008 */ addiu $v0, $zero, 0x8
/* 41BAF8 802A6D68 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41BAFC 802A6D6C AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41BB00 802A6D70 24020004 */ addiu $v0, $zero, 0x4
/* 41BB04 802A6D74 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41BB08 802A6D78 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41BB0C 802A6D7C 080AA04F */ j .L802A813C_7AFADC
/* 41BB10 802A6D80 24020001 */ addiu $v0, $zero, 0x1
glabel .L802A6D84_7AE724
/* 41BB14 802A6D84 0C0A841E */ jal func_802A1078_7A8A18
/* 41BB18 802A6D88 00000000 */ nop
/* 41BB1C 802A6D8C 080AA04F */ j .L802A813C_7AFADC
/* 41BB20 802A6D90 2402000C */ addiu $v0, $zero, 0xC
glabel .L802A6D94_7AE734
/* 41BB24 802A6D94 86C3017C */ lh $v1, 0x17C($s6)
/* 41BB28 802A6D98 24020035 */ addiu $v0, $zero, 0x35
/* 41BB2C 802A6D9C 14620005 */ bne $v1, $v0, .L802A6DB4_7AE754
/* 41BB30 802A6DA0 24020036 */ addiu $v0, $zero, 0x36
/* 41BB34 802A6DA4 24020002 */ addiu $v0, $zero, 0x2
/* 41BB38 802A6DA8 A2C20088 */ sb $v0, 0x88($s6)
/* 41BB3C 802A6DAC 86C3017C */ lh $v1, 0x17C($s6)
/* 41BB40 802A6DB0 24020036 */ addiu $v0, $zero, 0x36
.L802A6DB4_7AE754:
/* 41BB44 802A6DB4 14620003 */ bne $v1, $v0, .L802A6DC4_7AE764
/* 41BB48 802A6DB8 0000A02D */ daddu $s4, $zero, $zero
/* 41BB4C 802A6DBC 24020003 */ addiu $v0, $zero, 0x3
/* 41BB50 802A6DC0 A2C20088 */ sb $v0, 0x88($s6)
.L802A6DC4_7AE764:
/* 41BB54 802A6DC4 0280982D */ daddu $s3, $s4, $zero
/* 41BB58 802A6DC8 241E0002 */ addiu $fp, $zero, 0x2
/* 41BB5C 802A6DCC 02A0902D */ daddu $s2, $s5, $zero
/* 41BB60 802A6DD0 3C11802B */ lui $s1, %hi(D_802ACCD0)
/* 41BB64 802A6DD4 2631CCD0 */ addiu $s1, $s1, %lo(D_802ACCD0)
.L802A6DD8_7AE778:
/* 41BB68 802A6DD8 864201B4 */ lh $v0, 0x1B4($s2)
/* 41BB6C 802A6DDC 50400027 */ beql $v0, $zero, .L802A6E7C_7AE81C
/* 41BB70 802A6DE0 26730001 */ addiu $s3, $s3, 0x1
/* 41BB74 802A6DE4 00021140 */ sll $v0, $v0, 5
/* 41BB78 802A6DE8 3C0E8008 */ lui $t6, %hi(gItemTable)
/* 41BB7C 802A6DEC 25CE78E0 */ addiu $t6, $t6, %lo(gItemTable)
/* 41BB80 802A6DF0 004E8021 */ addu $s0, $v0, $t6
/* 41BB84 802A6DF4 3C0E8009 */ lui $t6, %hi(gItemHudScripts)
/* 41BB88 802A6DF8 25CEA680 */ addiu $t6, $t6, %lo(gItemHudScripts)
/* 41BB8C 802A6DFC 86020004 */ lh $v0, 0x4($s0)
/* 41BB90 802A6E00 96030018 */ lhu $v1, 0x18($s0)
/* 41BB94 802A6E04 000210C0 */ sll $v0, $v0, 3
/* 41BB98 802A6E08 30630002 */ andi $v1, $v1, 0x2
/* 41BB9C 802A6E0C 1060001A */ beqz $v1, .L802A6E78_7AE818
/* 41BBA0 802A6E10 004EA821 */ addu $s5, $v0, $t6
/* 41BBA4 802A6E14 A2DE0178 */ sb $fp, 0x178($s6)
/* 41BBA8 802A6E18 964201B4 */ lhu $v0, 0x1B4($s2)
/* 41BBAC 802A6E1C A6C2017A */ sh $v0, 0x17A($s6)
/* 41BBB0 802A6E20 8E020008 */ lw $v0, 0x8($s0)
/* 41BBB4 802A6E24 02E0202D */ daddu $a0, $s7, $zero
/* 41BBB8 802A6E28 0C098C0B */ jal func_8026302C
/* 41BBBC 802A6E2C AEC20184 */ sw $v0, 0x184($s6)
/* 41BBC0 802A6E30 8EA20000 */ lw $v0, 0x0($s5)
/* 41BBC4 802A6E34 AE220000 */ sw $v0, 0x0($s1)
/* 41BBC8 802A6E38 864301B4 */ lh $v1, 0x1B4($s2)
/* 41BBCC 802A6E3C 24020001 */ addiu $v0, $zero, 0x1
/* 41BBD0 802A6E40 AE22018C */ sw $v0, 0x18C($s1)
/* 41BBD4 802A6E44 AE230108 */ sw $v1, 0x108($s1)
/* 41BBD8 802A6E48 8E020000 */ lw $v0, 0x0($s0)
/* 41BBDC 802A6E4C AE220084 */ sw $v0, 0x84($s1)
/* 41BBE0 802A6E50 8E020014 */ lw $v0, 0x14($s0)
/* 41BBE4 802A6E54 AE220294 */ sw $v0, 0x294($s1)
/* 41BBE8 802A6E58 82E2040C */ lb $v0, 0x40C($s7)
/* 41BBEC 802A6E5C 54400005 */ bnel $v0, $zero, .L802A6E74_7AE814
/* 41BBF0 802A6E60 26310004 */ addiu $s1, $s1, 0x4
/* 41BBF4 802A6E64 8EA20004 */ lw $v0, 0x4($s5)
/* 41BBF8 802A6E68 AE20018C */ sw $zero, 0x18C($s1)
/* 41BBFC 802A6E6C AE220000 */ sw $v0, 0x0($s1)
/* 41BC00 802A6E70 26310004 */ addiu $s1, $s1, 0x4
.L802A6E74_7AE814:
/* 41BC04 802A6E74 26940001 */ addiu $s4, $s4, 0x1
.L802A6E78_7AE818:
/* 41BC08 802A6E78 26730001 */ addiu $s3, $s3, 0x1
.L802A6E7C_7AE81C:
/* 41BC0C 802A6E7C 2A62000A */ slti $v0, $s3, 0xA
/* 41BC10 802A6E80 1440FFD5 */ bnez $v0, .L802A6DD8_7AE778
/* 41BC14 802A6E84 26520002 */ addiu $s2, $s2, 0x2
/* 41BC18 802A6E88 3C01802B */ lui $at, %hi(D_802ACFEC)
/* 41BC1C 802A6E8C AC20CFEC */ sw $zero, %lo(D_802ACFEC)($at)
/* 41BC20 802A6E90 3C01802B */ lui $at, %hi(D_802ACFF0)
/* 41BC24 802A6E94 AC20CFF0 */ sw $zero, %lo(D_802ACFF0)($at)
/* 41BC28 802A6E98 86C3017C */ lh $v1, 0x17C($s6)
/* 41BC2C 802A6E9C 24020035 */ addiu $v0, $zero, 0x35
/* 41BC30 802A6EA0 14620009 */ bne $v1, $v0, .L802A6EC8_7AE868
/* 41BC34 802A6EA4 24020036 */ addiu $v0, $zero, 0x36
/* 41BC38 802A6EA8 82C30088 */ lb $v1, 0x88($s6)
/* 41BC3C 802A6EAC 24020001 */ addiu $v0, $zero, 0x1
/* 41BC40 802A6EB0 3C01802B */ lui $at, %hi(D_802ACFEC)
/* 41BC44 802A6EB4 AC22CFEC */ sw $v0, %lo(D_802ACFEC)($at)
/* 41BC48 802A6EB8 3C01802B */ lui $at, %hi(D_802ACFF0)
/* 41BC4C 802A6EBC AC23CFF0 */ sw $v1, %lo(D_802ACFF0)($at)
/* 41BC50 802A6EC0 86C3017C */ lh $v1, 0x17C($s6)
/* 41BC54 802A6EC4 24020036 */ addiu $v0, $zero, 0x36
.L802A6EC8_7AE868:
/* 41BC58 802A6EC8 14620006 */ bne $v1, $v0, .L802A6EE4_7AE884
/* 41BC5C 802A6ECC 24020002 */ addiu $v0, $zero, 0x2
/* 41BC60 802A6ED0 82C30088 */ lb $v1, 0x88($s6)
/* 41BC64 802A6ED4 3C01802B */ lui $at, %hi(D_802ACFEC)
/* 41BC68 802A6ED8 AC22CFEC */ sw $v0, %lo(D_802ACFEC)($at)
/* 41BC6C 802A6EDC 3C01802B */ lui $at, %hi(D_802ACFF0)
/* 41BC70 802A6EE0 AC23CFF0 */ sw $v1, %lo(D_802ACFF0)($at)
.L802A6EE4_7AE884:
/* 41BC74 802A6EE4 82C20050 */ lb $v0, 0x50($s6)
/* 41BC78 802A6EE8 04420001 */ bltzl $v0, .L802A6EF0_7AE890
/* 41BC7C 802A6EEC A2C00050 */ sb $zero, 0x50($s6)
.L802A6EF0_7AE890:
/* 41BC80 802A6EF0 82DE0050 */ lb $fp, 0x50($s6)
/* 41BC84 802A6EF4 3C04802B */ lui $a0, %hi(D_802ACCD0)
/* 41BC88 802A6EF8 2484CCD0 */ addiu $a0, $a0, %lo(D_802ACCD0)
/* 41BC8C 802A6EFC AC800318 */ sw $zero, 0x318($a0)
/* 41BC90 802A6F00 AC940324 */ sw $s4, 0x324($a0)
/* 41BC94 802A6F04 0C03D44F */ jal create_battle_popup_menu
/* 41BC98 802A6F08 AC9E0328 */ sw $fp, 0x328($a0)
/* 41BC9C 802A6F0C 0C03D4AF */ jal func_800F52BC
/* 41BCA0 802A6F10 00000000 */ nop
/* 41BCA4 802A6F14 080AA04F */ j .L802A813C_7AFADC
/* 41BCA8 802A6F18 24020015 */ addiu $v0, $zero, 0x15
glabel .L802A6F1C_7AE8BC
/* 41BCAC 802A6F1C 3C03802B */ lui $v1, %hi(D_802ACFFC)
/* 41BCB0 802A6F20 8463CFFC */ lh $v1, %lo(D_802ACFFC)($v1)
/* 41BCB4 802A6F24 10600487 */ beqz $v1, .L802A8144_7AFAE4
/* 41BCB8 802A6F28 240200FF */ addiu $v0, $zero, 0xFF
/* 41BCBC 802A6F2C 14620007 */ bne $v1, $v0, .L802A6F4C_7AE8EC
/* 41BCC0 802A6F30 24020018 */ addiu $v0, $zero, 0x18
/* 41BCC4 802A6F34 0C0A8A44 */ jal func_802A2910_7AA2B0
/* 41BCC8 802A6F38 00000000 */ nop
/* 41BCCC 802A6F3C 24020002 */ addiu $v0, $zero, 0x2
/* 41BCD0 802A6F40 A6C0017C */ sh $zero, 0x17C($s6)
/* 41BCD4 802A6F44 080A9FE1 */ j .L802A7F84_7AF924
/* 41BCD8 802A6F48 A2C00088 */ sb $zero, 0x88($s6)
.L802A6F4C_7AE8EC:
/* 41BCDC 802A6F4C 24030019 */ addiu $v1, $zero, 0x19
/* 41BCE0 802A6F50 A6C2006C */ sh $v0, 0x6C($s6)
/* 41BCE4 802A6F54 3C02802B */ lui $v0, %hi(D_802ACFFC)
/* 41BCE8 802A6F58 8442CFFC */ lh $v0, %lo(D_802ACFFC)($v0)
/* 41BCEC 802A6F5C 3C0E802B */ lui $t6, %hi(D_802ACCD0)
/* 41BCF0 802A6F60 25CECCD0 */ addiu $t6, $t6, %lo(D_802ACCD0)
/* 41BCF4 802A6F64 A6C3006E */ sh $v1, 0x6E($s6)
/* 41BCF8 802A6F68 2442FFFF */ addiu $v0, $v0, -0x1
/* 41BCFC 802A6F6C 00021080 */ sll $v0, $v0, 2
/* 41BD00 802A6F70 01C21021 */ addu $v0, $t6, $v0
/* 41BD04 802A6F74 9442010A */ lhu $v0, 0x10A($v0)
/* 41BD08 802A6F78 24030002 */ addiu $v1, $zero, 0x2
/* 41BD0C 802A6F7C A2C30178 */ sb $v1, 0x178($s6)
/* 41BD10 802A6F80 A6C201AA */ sh $v0, 0x1AA($s6)
/* 41BD14 802A6F84 A6C2017A */ sh $v0, 0x17A($s6)
/* 41BD18 802A6F88 00021400 */ sll $v0, $v0, 16
/* 41BD1C 802A6F8C 000212C3 */ sra $v0, $v0, 11
/* 41BD20 802A6F90 3C038008 */ lui $v1, %hi(gItemTable + 0x8)
/* 41BD24 802A6F94 00621821 */ addu $v1, $v1, $v0
/* 41BD28 802A6F98 8C6378E8 */ lw $v1, %lo(gItemTable + 0x8)($v1)
/* 41BD2C 802A6F9C 3C02802B */ lui $v0, %hi(D_802ACFFD)
/* 41BD30 802A6FA0 9042CFFD */ lbu $v0, %lo(D_802ACFFD)($v0)
/* 41BD34 802A6FA4 AEC00188 */ sw $zero, 0x188($s6)
/* 41BD38 802A6FA8 2442FFFF */ addiu $v0, $v0, -0x1
/* 41BD3C 802A6FAC 34638000 */ ori $v1, $v1, 0x8000
/* 41BD40 802A6FB0 A2C20050 */ sb $v0, 0x50($s6)
/* 41BD44 802A6FB4 0C03C4EC */ jal hide_popup_menu
/* 41BD48 802A6FB8 AEC30184 */ sw $v1, 0x184($s6)
/* 41BD4C 802A6FBC 0C0A89F4 */ jal D_802A27D0_7AA170
/* 41BD50 802A6FC0 00000000 */ nop
/* 41BD54 802A6FC4 0C0A840C */ jal func_802A1030_7A89D0
/* 41BD58 802A6FC8 00000000 */ nop
/* 41BD5C 802A6FCC 080AA04F */ j .L802A813C_7AFADC
/* 41BD60 802A6FD0 24020016 */ addiu $v0, $zero, 0x16
glabel .L802A6FD4_7AE974
/* 41BD64 802A6FD4 8EC20214 */ lw $v0, 0x214($s6)
/* 41BD68 802A6FD8 30424000 */ andi $v0, $v0, 0x4000
/* 41BD6C 802A6FDC 1040000E */ beqz $v0, .L802A7018_7AE9B8
/* 41BD70 802A6FE0 00000000 */ nop
/* 41BD74 802A6FE4 3C02802B */ lui $v0, %hi(D_802ACFFC)
/* 41BD78 802A6FE8 8442CFFC */ lh $v0, %lo(D_802ACFFC)($v0)
/* 41BD7C 802A6FEC 1440000A */ bnez $v0, .L802A7018_7AE9B8
/* 41BD80 802A6FF0 00000000 */ nop
/* 41BD84 802A6FF4 0C03C5B3 */ jal func_800F16CC
/* 41BD88 802A6FF8 00000000 */ nop
/* 41BD8C 802A6FFC 0C0A8B16 */ jal func_802A2C58_7AA5F8
/* 41BD90 802A7000 00000000 */ nop
/* 41BD94 802A7004 0C0A8426 */ jal func_802A1098_7A8A38
/* 41BD98 802A7008 00000000 */ nop
/* 41BD9C 802A700C 24020017 */ addiu $v0, $zero, 0x17
/* 41BDA0 802A7010 080AA04F */ j .L802A813C_7AFADC
/* 41BDA4 802A7014 A6C0017C */ sh $zero, 0x17C($s6)
.L802A7018_7AE9B8:
/* 41BDA8 802A7018 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41BDAC 802A701C 00000000 */ nop
.L802A7020_7AE9C0:
/* 41BDB0 802A7020 0C0A846C */ jal func_802A11B0_7A8B50
/* 41BDB4 802A7024 00000000 */ nop
/* 41BDB8 802A7028 10400446 */ beqz $v0, .L802A8144_7AFAE4
/* 41BDBC 802A702C 00000000 */ nop
/* 41BDC0 802A7030 080A9E2B */ j .L802A78AC_7AF24C
/* 41BDC4 802A7034 00000000 */ nop
glabel .L802A7038_7AE9D8
/* 41BDC8 802A7038 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41BDCC 802A703C 00000000 */ nop
/* 41BDD0 802A7040 0C0A846C */ jal func_802A11B0_7A8B50
/* 41BDD4 802A7044 00000000 */ nop
/* 41BDD8 802A7048 1040043E */ beqz $v0, .L802A8144_7AFAE4
/* 41BDDC 802A704C 24020015 */ addiu $v0, $zero, 0x15
/* 41BDE0 802A7050 080AA04F */ j .L802A813C_7AFADC
/* 41BDE4 802A7054 00000000 */ nop
glabel .L802A7058_7AE9F8
/* 41BDE8 802A7058 0C03C5B3 */ jal func_800F16CC
/* 41BDEC 802A705C 00000000 */ nop
/* 41BDF0 802A7060 0C0A8B16 */ jal func_802A2C58_7AA5F8
/* 41BDF4 802A7064 00000000 */ nop
/* 41BDF8 802A7068 0C0A8426 */ jal func_802A1098_7A8A38
/* 41BDFC 802A706C 00000000 */ nop
/* 41BE00 802A7070 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41BE04 802A7074 00000000 */ nop
/* 41BE08 802A7078 080AA04F */ j .L802A813C_7AFADC
/* 41BE0C 802A707C 24020017 */ addiu $v0, $zero, 0x17
glabel .L802A7080_7AEA20
/* 41BE10 802A7080 0C03C54E */ jal destroy_popup_menu
/* 41BE14 802A7084 00000000 */ nop
/* 41BE18 802A7088 080A9D8B */ j .L802A762C_7AEFCC
/* 41BE1C 802A708C 00000000 */ nop
glabel .L802A7090_7AEA30
/* 41BE20 802A7090 0000A02D */ daddu $s4, $zero, $zero
/* 41BE24 802A7094 0280982D */ daddu $s3, $s4, $zero
/* 41BE28 802A7098 241E0002 */ addiu $fp, $zero, 0x2
/* 41BE2C 802A709C 02A0902D */ daddu $s2, $s5, $zero
/* 41BE30 802A70A0 3C11802B */ lui $s1, %hi(D_802ACCD0)
/* 41BE34 802A70A4 2631CCD0 */ addiu $s1, $s1, %lo(D_802ACCD0)
.L802A70A8_7AEA48:
/* 41BE38 802A70A8 864201B4 */ lh $v0, 0x1B4($s2)
/* 41BE3C 802A70AC 50400027 */ beql $v0, $zero, .L802A714C_7AEAEC
/* 41BE40 802A70B0 26730001 */ addiu $s3, $s3, 0x1
/* 41BE44 802A70B4 00021140 */ sll $v0, $v0, 5
/* 41BE48 802A70B8 3C0E8008 */ lui $t6, %hi(gItemTable)
/* 41BE4C 802A70BC 25CE78E0 */ addiu $t6, $t6, %lo(gItemTable)
/* 41BE50 802A70C0 004E8021 */ addu $s0, $v0, $t6
/* 41BE54 802A70C4 3C0E8009 */ lui $t6, %hi(gItemHudScripts)
/* 41BE58 802A70C8 25CEA680 */ addiu $t6, $t6, %lo(gItemHudScripts)
/* 41BE5C 802A70CC 86020004 */ lh $v0, 0x4($s0)
/* 41BE60 802A70D0 96030018 */ lhu $v1, 0x18($s0)
/* 41BE64 802A70D4 000210C0 */ sll $v0, $v0, 3
/* 41BE68 802A70D8 30630002 */ andi $v1, $v1, 0x2
/* 41BE6C 802A70DC 1060001A */ beqz $v1, .L802A7148_7AEAE8
/* 41BE70 802A70E0 004EA821 */ addu $s5, $v0, $t6
/* 41BE74 802A70E4 A2DE0178 */ sb $fp, 0x178($s6)
/* 41BE78 802A70E8 964201B4 */ lhu $v0, 0x1B4($s2)
/* 41BE7C 802A70EC A6C2017A */ sh $v0, 0x17A($s6)
/* 41BE80 802A70F0 8E020008 */ lw $v0, 0x8($s0)
/* 41BE84 802A70F4 02E0202D */ daddu $a0, $s7, $zero
/* 41BE88 802A70F8 0C098C0B */ jal func_8026302C
/* 41BE8C 802A70FC AEC20184 */ sw $v0, 0x184($s6)
/* 41BE90 802A7100 8EA20000 */ lw $v0, 0x0($s5)
/* 41BE94 802A7104 AE220000 */ sw $v0, 0x0($s1)
/* 41BE98 802A7108 864301B4 */ lh $v1, 0x1B4($s2)
/* 41BE9C 802A710C 24020001 */ addiu $v0, $zero, 0x1
/* 41BEA0 802A7110 AE22018C */ sw $v0, 0x18C($s1)
/* 41BEA4 802A7114 AE230108 */ sw $v1, 0x108($s1)
/* 41BEA8 802A7118 8E020000 */ lw $v0, 0x0($s0)
/* 41BEAC 802A711C AE220084 */ sw $v0, 0x84($s1)
/* 41BEB0 802A7120 8E020014 */ lw $v0, 0x14($s0)
/* 41BEB4 802A7124 AE220294 */ sw $v0, 0x294($s1)
/* 41BEB8 802A7128 82E2040C */ lb $v0, 0x40C($s7)
/* 41BEBC 802A712C 54400005 */ bnel $v0, $zero, .L802A7144_7AEAE4
/* 41BEC0 802A7130 26310004 */ addiu $s1, $s1, 0x4
/* 41BEC4 802A7134 8EA20004 */ lw $v0, 0x4($s5)
/* 41BEC8 802A7138 AE20018C */ sw $zero, 0x18C($s1)
/* 41BECC 802A713C AE220000 */ sw $v0, 0x0($s1)
/* 41BED0 802A7140 26310004 */ addiu $s1, $s1, 0x4
.L802A7144_7AEAE4:
/* 41BED4 802A7144 26940001 */ addiu $s4, $s4, 0x1
.L802A7148_7AEAE8:
/* 41BED8 802A7148 26730001 */ addiu $s3, $s3, 0x1
.L802A714C_7AEAEC:
/* 41BEDC 802A714C 2A62000A */ slti $v0, $s3, 0xA
/* 41BEE0 802A7150 1440FFD5 */ bnez $v0, .L802A70A8_7AEA48
/* 41BEE4 802A7154 26520002 */ addiu $s2, $s2, 0x2
/* 41BEE8 802A7158 82C20050 */ lb $v0, 0x50($s6)
/* 41BEEC 802A715C 04420001 */ bltzl $v0, .L802A7164_7AEB04
/* 41BEF0 802A7160 A2C00050 */ sb $zero, 0x50($s6)
.L802A7164_7AEB04:
/* 41BEF4 802A7164 82DE0050 */ lb $fp, 0x50($s6)
/* 41BEF8 802A7168 3C04802B */ lui $a0, %hi(D_802ACCD0)
/* 41BEFC 802A716C 2484CCD0 */ addiu $a0, $a0, %lo(D_802ACCD0)
/* 41BF00 802A7170 AC800318 */ sw $zero, 0x318($a0)
/* 41BF04 802A7174 AC940324 */ sw $s4, 0x324($a0)
/* 41BF08 802A7178 AC80031C */ sw $zero, 0x31C($a0)
/* 41BF0C 802A717C AC800320 */ sw $zero, 0x320($a0)
/* 41BF10 802A7180 0C03D44F */ jal create_battle_popup_menu
/* 41BF14 802A7184 AC9E0328 */ sw $fp, 0x328($a0)
/* 41BF18 802A7188 0C03D4AF */ jal func_800F52BC
/* 41BF1C 802A718C 00000000 */ nop
/* 41BF20 802A7190 080AA04F */ j .L802A813C_7AFADC
/* 41BF24 802A7194 24020029 */ addiu $v0, $zero, 0x29
glabel .L802A7198_7AEB38
/* 41BF28 802A7198 3C03802B */ lui $v1, %hi(D_802ACFFC)
/* 41BF2C 802A719C 8463CFFC */ lh $v1, %lo(D_802ACFFC)($v1)
/* 41BF30 802A71A0 106003E8 */ beqz $v1, .L802A8144_7AFAE4
/* 41BF34 802A71A4 240200FF */ addiu $v0, $zero, 0xFF
/* 41BF38 802A71A8 5462000B */ bnel $v1, $v0, .L802A71D8_7AEB78
/* 41BF3C 802A71AC 2402002C */ addiu $v0, $zero, 0x2C
/* 41BF40 802A71B0 0C0A8414 */ jal func_802A1050_7A89F0
/* 41BF44 802A71B4 00000000 */ nop
/* 41BF48 802A71B8 24020008 */ addiu $v0, $zero, 0x8
/* 41BF4C 802A71BC 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41BF50 802A71C0 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41BF54 802A71C4 24020004 */ addiu $v0, $zero, 0x4
/* 41BF58 802A71C8 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41BF5C 802A71CC AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41BF60 802A71D0 080A9FE1 */ j .L802A7F84_7AF924
/* 41BF64 802A71D4 24020001 */ addiu $v0, $zero, 0x1
.L802A71D8_7AEB78:
/* 41BF68 802A71D8 2403002D */ addiu $v1, $zero, 0x2D
/* 41BF6C 802A71DC A6C2006C */ sh $v0, 0x6C($s6)
/* 41BF70 802A71E0 3C02802B */ lui $v0, %hi(D_802ACFFC)
/* 41BF74 802A71E4 8442CFFC */ lh $v0, %lo(D_802ACFFC)($v0)
/* 41BF78 802A71E8 3C0E802B */ lui $t6, %hi(D_802ACCD0)
/* 41BF7C 802A71EC 25CECCD0 */ addiu $t6, $t6, %lo(D_802ACCD0)
/* 41BF80 802A71F0 A6C3006E */ sh $v1, 0x6E($s6)
/* 41BF84 802A71F4 2442FFFF */ addiu $v0, $v0, -0x1
/* 41BF88 802A71F8 00021080 */ sll $v0, $v0, 2
/* 41BF8C 802A71FC 01C21021 */ addu $v0, $t6, $v0
/* 41BF90 802A7200 9442010A */ lhu $v0, 0x10A($v0)
/* 41BF94 802A7204 A6C201AA */ sh $v0, 0x1AA($s6)
/* 41BF98 802A7208 0040182D */ daddu $v1, $v0, $zero
/* 41BF9C 802A720C 24020002 */ addiu $v0, $zero, 0x2
/* 41BFA0 802A7210 A2C20178 */ sb $v0, 0x178($s6)
/* 41BFA4 802A7214 A6C3017A */ sh $v1, 0x17A($s6)
/* 41BFA8 802A7218 86C2017A */ lh $v0, 0x17A($s6)
/* 41BFAC 802A721C 24030034 */ addiu $v1, $zero, 0x34
/* 41BFB0 802A7220 A6C3017C */ sh $v1, 0x17C($s6)
/* 41BFB4 802A7224 00021140 */ sll $v0, $v0, 5
/* 41BFB8 802A7228 3C038008 */ lui $v1, %hi(gItemTable + 0x8)
/* 41BFBC 802A722C 00621821 */ addu $v1, $v1, $v0
/* 41BFC0 802A7230 8C6378E8 */ lw $v1, %lo(gItemTable + 0x8)($v1)
/* 41BFC4 802A7234 3C02802B */ lui $v0, %hi(D_802ACFFD)
/* 41BFC8 802A7238 9042CFFD */ lbu $v0, %lo(D_802ACFFD)($v0)
/* 41BFCC 802A723C AEC00188 */ sw $zero, 0x188($s6)
/* 41BFD0 802A7240 2442FFFF */ addiu $v0, $v0, -0x1
/* 41BFD4 802A7244 34638000 */ ori $v1, $v1, 0x8000
/* 41BFD8 802A7248 A2C20050 */ sb $v0, 0x50($s6)
/* 41BFDC 802A724C 0C03C4EC */ jal hide_popup_menu
/* 41BFE0 802A7250 AEC30184 */ sw $v1, 0x184($s6)
/* 41BFE4 802A7254 0C0A840C */ jal func_802A1030_7A89D0
/* 41BFE8 802A7258 00000000 */ nop
/* 41BFEC 802A725C 080AA04F */ j .L802A813C_7AFADC
/* 41BFF0 802A7260 2402002A */ addiu $v0, $zero, 0x2A
glabel .L802A7264_7AEC04
/* 41BFF4 802A7264 8EC20214 */ lw $v0, 0x214($s6)
/* 41BFF8 802A7268 30424000 */ andi $v0, $v0, 0x4000
/* 41BFFC 802A726C 1040FF6C */ beqz $v0, .L802A7020_7AE9C0
/* 41C000 802A7270 00000000 */ nop
/* 41C004 802A7274 3C02802B */ lui $v0, %hi(D_802ACFFC)
/* 41C008 802A7278 8442CFFC */ lh $v0, %lo(D_802ACFFC)($v0)
/* 41C00C 802A727C 1440FF68 */ bnez $v0, .L802A7020_7AE9C0
/* 41C010 802A7280 00000000 */ nop
/* 41C014 802A7284 0C03C5B3 */ jal func_800F16CC
/* 41C018 802A7288 00000000 */ nop
/* 41C01C 802A728C 0C0A8426 */ jal func_802A1098_7A8A38
/* 41C020 802A7290 00000000 */ nop
/* 41C024 802A7294 080AA04F */ j .L802A813C_7AFADC
/* 41C028 802A7298 2402002B */ addiu $v0, $zero, 0x2B
glabel .L802A729C_7AEC3C
/* 41C02C 802A729C 0C0A846C */ jal func_802A11B0_7A8B50
/* 41C030 802A72A0 00000000 */ nop
/* 41C034 802A72A4 104003A7 */ beqz $v0, .L802A8144_7AFAE4
/* 41C038 802A72A8 24020029 */ addiu $v0, $zero, 0x29
/* 41C03C 802A72AC 080AA04F */ j .L802A813C_7AFADC
/* 41C040 802A72B0 00000000 */ nop
glabel .L802A72B4_7AEC54
/* 41C044 802A72B4 0C03C5B3 */ jal func_800F16CC
/* 41C048 802A72B8 00000000 */ nop
/* 41C04C 802A72BC 0C0A8426 */ jal func_802A1098_7A8A38
/* 41C050 802A72C0 00000000 */ nop
/* 41C054 802A72C4 080AA04F */ j .L802A813C_7AFADC
/* 41C058 802A72C8 2402002B */ addiu $v0, $zero, 0x2B
glabel .L802A72CC_7AEC6C
/* 41C05C 802A72CC 0C03C54E */ jal destroy_popup_menu
/* 41C060 802A72D0 00000000 */ nop
glabel .L802A72D4_7AEC74
/* 41C064 802A72D4 0C0A842E */ jal func_802A10B8_7A8A58
/* 41C068 802A72D8 00000000 */ nop
/* 41C06C 802A72DC 080AA051 */ j .L802A8144_7AFAE4
/* 41C070 802A72E0 00000000 */ nop
glabel .L802A72E4_7AEC84
/* 41C074 802A72E4 92C2020E */ lbu $v0, 0x20E($s6)
/* 41C078 802A72E8 1040005E */ beqz $v0, .L802A7464_7AEE04
/* 41C07C 802A72EC 0000982D */ daddu $s3, $zero, $zero
/* 41C080 802A72F0 3C0D8009 */ lui $t5, %hi(gMoveTable)
/* 41C084 802A72F4 25ADF060 */ addiu $t5, $t5, %lo(gMoveTable)
/* 41C088 802A72F8 3C0C802B */ lui $t4, %hi(BattleMenu_Moves_OptionCantUseMessages)
/* 41C08C 802A72FC 258CD5E8 */ addiu $t4, $t4, %lo(BattleMenu_Moves_OptionCantUseMessages)
/* 41C090 802A7300 240BFFFF */ addiu $t3, $zero, -0x1
/* 41C094 802A7304 24070048 */ addiu $a3, $zero, 0x48
/* 41C098 802A7308 240AFFFE */ addiu $t2, $zero, -0x2
/* 41C09C 802A730C 24090001 */ addiu $t1, $zero, 0x1
/* 41C0A0 802A7310 3C08802B */ lui $t0, %hi(D_802AB398_7B2D38)
/* 41C0A4 802A7314 2508B398 */ addiu $t0, $t0, %lo(D_802AB398_7B2D38)
/* 41C0A8 802A7318 3C06802B */ lui $a2, %hi(battle_menu_moveOptionIconScripts)
/* 41C0AC 802A731C 24C6D260 */ addiu $a2, $a2, %lo(battle_menu_moveOptionIconScripts)
.L802A7320_7AECC0:
/* 41C0B0 802A7320 02D32021 */ addu $a0, $s6, $s3
/* 41C0B4 802A7324 908201DE */ lbu $v0, 0x1DE($a0)
/* 41C0B8 802A7328 026C2821 */ addu $a1, $s3, $t4
/* 41C0BC 802A732C A0A00000 */ sb $zero, 0x0($a1)
/* 41C0C0 802A7330 00021880 */ sll $v1, $v0, 2
/* 41C0C4 802A7334 00621821 */ addu $v1, $v1, $v0
/* 41C0C8 802A7338 00031880 */ sll $v1, $v1, 2
/* 41C0CC 802A733C 808201F6 */ lb $v0, 0x1F6($a0)
/* 41C0D0 802A7340 14400003 */ bnez $v0, .L802A7350_7AECF0
/* 41C0D4 802A7344 006D9021 */ addu $s2, $v1, $t5
/* 41C0D8 802A7348 A0A00000 */ sb $zero, 0x0($a1)
/* 41C0DC 802A734C 808201F6 */ lb $v0, 0x1F6($a0)
.L802A7350_7AECF0:
/* 41C0E0 802A7350 144B0004 */ bne $v0, $t3, .L802A7364_7AED04
/* 41C0E4 802A7354 00000000 */ nop
/* 41C0E8 802A7358 A08001F6 */ sb $zero, 0x1F6($a0)
/* 41C0EC 802A735C A0A70000 */ sb $a3, 0x0($a1)
/* 41C0F0 802A7360 808201F6 */ lb $v0, 0x1F6($a0)
.L802A7364_7AED04:
/* 41C0F4 802A7364 144A0003 */ bne $v0, $t2, .L802A7374_7AED14
/* 41C0F8 802A7368 00000000 */ nop
/* 41C0FC 802A736C A08001F6 */ sb $zero, 0x1F6($a0)
/* 41C100 802A7370 A0A70000 */ sb $a3, 0x0($a1)
.L802A7374_7AED14:
/* 41C104 802A7374 8EC20074 */ lw $v0, 0x74($s6)
/* 41C108 802A7378 02691804 */ sllv $v1, $t1, $s3
/* 41C10C 802A737C 00431024 */ and $v0, $v0, $v1
/* 41C110 802A7380 14400003 */ bnez $v0, .L802A7390_7AED30
/* 41C114 802A7384 00000000 */ nop
/* 41C118 802A7388 A08001F6 */ sb $zero, 0x1F6($a0)
/* 41C11C 802A738C A0A70000 */ sb $a3, 0x0($a1)
.L802A7390_7AED30:
/* 41C120 802A7390 908201DE */ lbu $v0, 0x1DE($a0)
/* 41C124 802A7394 2442FF89 */ addiu $v0, $v0, -0x77
/* 41C128 802A7398 000210C0 */ sll $v0, $v0, 3
/* 41C12C 802A739C 00481021 */ addu $v0, $v0, $t0
/* 41C130 802A73A0 8C420000 */ lw $v0, 0x0($v0)
/* 41C134 802A73A4 ACC20000 */ sw $v0, 0x0($a2)
/* 41C138 802A73A8 808201F6 */ lb $v0, 0x1F6($a0)
/* 41C13C 802A73AC 14400008 */ bnez $v0, .L802A73D0_7AED70
/* 41C140 802A73B0 00131880 */ sll $v1, $s3, 2
/* 41C144 802A73B4 908201DE */ lbu $v0, 0x1DE($a0)
/* 41C148 802A73B8 2442FF89 */ addiu $v0, $v0, -0x77
/* 41C14C 802A73BC 000210C0 */ sll $v0, $v0, 3
/* 41C150 802A73C0 34420004 */ ori $v0, $v0, 0x4
/* 41C154 802A73C4 00481021 */ addu $v0, $v0, $t0
/* 41C158 802A73C8 8C420000 */ lw $v0, 0x0($v0)
/* 41C15C 802A73CC ACC20000 */ sw $v0, 0x0($a2)
.L802A73D0_7AED70:
/* 41C160 802A73D0 82420011 */ lb $v0, 0x11($s2)
/* 41C164 802A73D4 3C01802B */ lui $at, %hi(battle_menu_moveOptionDisplayCosts)
/* 41C168 802A73D8 00230821 */ addu $at, $at, $v1
/* 41C16C 802A73DC AC22D320 */ sw $v0, %lo(battle_menu_moveOptionDisplayCosts)($at)
/* 41C170 802A73E0 82420012 */ lb $v0, 0x12($s2)
/* 41C174 802A73E4 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionSortPriority)
/* 41C178 802A73E8 00330821 */ addu $at, $at, $s3
/* 41C17C 802A73EC A020D5D0 */ sb $zero, %lo(BattleMenu_Moves_OptionSortPriority)($at)
/* 41C180 802A73F0 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionIndices)
/* 41C184 802A73F4 00230821 */ addu $at, $at, $v1
/* 41C188 802A73F8 AC33D4B0 */ sw $s3, %lo(BattleMenu_Moves_OptionIndices)($at)
/* 41C18C 802A73FC 3C01802B */ lui $at, %hi(battle_menu_moveOptionBPCosts)
/* 41C190 802A7400 00230821 */ addu $at, $at, $v1
/* 41C194 802A7404 AC22D440 */ sw $v0, %lo(battle_menu_moveOptionBPCosts)($at)
/* 41C198 802A7408 808201F6 */ lb $v0, 0x1F6($a0)
/* 41C19C 802A740C 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionEnabled)
/* 41C1A0 802A7410 00230821 */ addu $at, $at, $v1
/* 41C1A4 802A7414 AC22D510 */ sw $v0, %lo(BattleMenu_Moves_OptionEnabled)($at)
/* 41C1A8 802A7418 8E420000 */ lw $v0, 0x0($s2)
/* 41C1AC 802A741C 3C01802B */ lui $at, %hi(battle_menu_moveOptionNames)
/* 41C1B0 802A7420 00230821 */ addu $at, $at, $v1
/* 41C1B4 802A7424 AC22D2C0 */ sw $v0, %lo(battle_menu_moveOptionNames)($at)
/* 41C1B8 802A7428 8E420008 */ lw $v0, 0x8($s2)
/* 41C1BC 802A742C 3C01802B */ lui $at, %hi(battle_menu_moveOptionDisplayCostReductions)
/* 41C1C0 802A7430 00230821 */ addu $at, $at, $v1
/* 41C1C4 802A7434 AC20D380 */ sw $zero, %lo(battle_menu_moveOptionDisplayCostReductions)($at)
/* 41C1C8 802A7438 3C01802B */ lui $at, %hi(battle_menu_moveOptionDisplayCostReductionColors)
/* 41C1CC 802A743C 00230821 */ addu $at, $at, $v1
/* 41C1D0 802A7440 AC20D3E0 */ sw $zero, %lo(battle_menu_moveOptionDisplayCostReductionColors)($at)
/* 41C1D4 802A7444 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionDescMessages)
/* 41C1D8 802A7448 00230821 */ addu $at, $at, $v1
/* 41C1DC 802A744C AC22D570 */ sw $v0, %lo(BattleMenu_Moves_OptionDescMessages)($at)
/* 41C1E0 802A7450 92C2020E */ lbu $v0, 0x20E($s6)
/* 41C1E4 802A7454 26730001 */ addiu $s3, $s3, 0x1
/* 41C1E8 802A7458 0262102A */ slt $v0, $s3, $v0
/* 41C1EC 802A745C 1440FFB0 */ bnez $v0, .L802A7320_7AECC0
/* 41C1F0 802A7460 24C60004 */ addiu $a2, $a2, 0x4
.L802A7464_7AEE04:
/* 41C1F4 802A7464 82C20052 */ lb $v0, 0x52($s6)
/* 41C1F8 802A7468 04420001 */ bltzl $v0, .L802A7470_7AEE10
/* 41C1FC 802A746C A2C00052 */ sb $zero, 0x52($s6)
.L802A7470_7AEE10:
/* 41C200 802A7470 82DE0052 */ lb $fp, 0x52($s6)
/* 41C204 802A7474 92C2020E */ lbu $v0, 0x20E($s6)
/* 41C208 802A7478 24030001 */ addiu $v1, $zero, 0x1
/* 41C20C 802A747C 3C01802B */ lui $at, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 41C210 802A7480 AC23D4A0 */ sw $v1, %lo(BattleMenu_UsingSpiritsSubmenu)($at)
/* 41C214 802A7484 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionCount)
/* 41C218 802A7488 AC22D4A4 */ sw $v0, %lo(BattleMenu_Moves_OptionCount)($at)
/* 41C21C 802A748C 3C01802B */ lui $at, %hi(D_802AD4A8)
/* 41C220 802A7490 AC3ED4A8 */ sw $fp, %lo(D_802AD4A8)($at)
/* 41C224 802A7494 0C0A89A1 */ jal func_802A2684_7AA024
/* 41C228 802A7498 00000000 */ nop
/* 41C22C 802A749C 080AA04F */ j .L802A813C_7AFADC
/* 41C230 802A74A0 2402003D */ addiu $v0, $zero, 0x3D
glabel .L802A74A4_7AEE44
/* 41C234 802A74A4 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41C238 802A74A8 00000000 */ nop
/* 41C23C 802A74AC 0040802D */ daddu $s0, $v0, $zero
/* 41C240 802A74B0 2402FFFF */ addiu $v0, $zero, -0x1
/* 41C244 802A74B4 12020321 */ beq $s0, $v0, .L802A813C_7AFADC
/* 41C248 802A74B8 24020042 */ addiu $v0, $zero, 0x42
/* 41C24C 802A74BC 12000321 */ beqz $s0, .L802A8144_7AFAE4
/* 41C250 802A74C0 240200FF */ addiu $v0, $zero, 0xFF
/* 41C254 802A74C4 5602000B */ bnel $s0, $v0, .L802A74F4_7AEE94
/* 41C258 802A74C8 2602FFFF */ addiu $v0, $s0, -0x1
/* 41C25C 802A74CC 0C0A8414 */ jal func_802A1050_7A89F0
/* 41C260 802A74D0 00000000 */ nop
/* 41C264 802A74D4 24020008 */ addiu $v0, $zero, 0x8
/* 41C268 802A74D8 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41C26C 802A74DC AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41C270 802A74E0 24020004 */ addiu $v0, $zero, 0x4
/* 41C274 802A74E4 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41C278 802A74E8 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41C27C 802A74EC 080A9FE1 */ j .L802A7F84_7AF924
/* 41C280 802A74F0 24020001 */ addiu $v0, $zero, 0x1
.L802A74F4_7AEE94:
/* 41C284 802A74F4 00021080 */ sll $v0, $v0, 2
/* 41C288 802A74F8 3C01802B */ lui $at, %hi(D_802AD4B3)
/* 41C28C 802A74FC 00220821 */ addu $at, $at, $v0
/* 41C290 802A7500 9022D4B3 */ lbu $v0, %lo(D_802AD4B3)($at)
/* 41C294 802A7504 3C03802B */ lui $v1, %hi(D_802AD603)
/* 41C298 802A7508 9063D603 */ lbu $v1, %lo(D_802AD603)($v1)
/* 41C29C 802A750C A2C20049 */ sb $v0, 0x49($s6)
/* 41C2A0 802A7510 0C0A89F4 */ jal D_802A27D0_7AA170
/* 41C2A4 802A7514 A2C30052 */ sb $v1, 0x52($s6)
/* 41C2A8 802A7518 0C0A840C */ jal func_802A1030_7A89D0
/* 41C2AC 802A751C 00000000 */ nop
/* 41C2B0 802A7520 080AA04F */ j .L802A813C_7AFADC
/* 41C2B4 802A7524 2402003E */ addiu $v0, $zero, 0x3E
glabel .L802A7528_7AEEC8
/* 41C2B8 802A7528 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41C2BC 802A752C 00000000 */ nop
/* 41C2C0 802A7530 8EC30214 */ lw $v1, 0x214($s6)
/* 41C2C4 802A7534 30634000 */ andi $v1, $v1, 0x4000
/* 41C2C8 802A7538 10600009 */ beqz $v1, .L802A7560_7AEF00
/* 41C2CC 802A753C 0040802D */ daddu $s0, $v0, $zero
/* 41C2D0 802A7540 16000007 */ bnez $s0, .L802A7560_7AEF00
/* 41C2D4 802A7544 00000000 */ nop
/* 41C2D8 802A7548 0C0A8AAE */ jal func_802A2AB8_7AA458
/* 41C2DC 802A754C 00000000 */ nop
/* 41C2E0 802A7550 0C0A8426 */ jal func_802A1098_7A8A38
/* 41C2E4 802A7554 00000000 */ nop
/* 41C2E8 802A7558 080AA04F */ j .L802A813C_7AFADC
/* 41C2EC 802A755C 2402003F */ addiu $v0, $zero, 0x3F
.L802A7560_7AEF00:
/* 41C2F0 802A7560 0C0A846C */ jal func_802A11B0_7A8B50
/* 41C2F4 802A7564 00000000 */ nop
/* 41C2F8 802A7568 104002F6 */ beqz $v0, .L802A8144_7AFAE4
/* 41C2FC 802A756C 24020040 */ addiu $v0, $zero, 0x40
/* 41C300 802A7570 A6C2006C */ sh $v0, 0x6C($s6)
/* 41C304 802A7574 24020041 */ addiu $v0, $zero, 0x41
/* 41C308 802A7578 A6C2006E */ sh $v0, 0x6E($s6)
/* 41C30C 802A757C 82C20049 */ lb $v0, 0x49($s6)
/* 41C310 802A7580 24030008 */ addiu $v1, $zero, 0x8
/* 41C314 802A7584 A2C30178 */ sb $v1, 0x178($s6)
/* 41C318 802A7588 02C21021 */ addu $v0, $s6, $v0
/* 41C31C 802A758C 904301DE */ lbu $v1, 0x1DE($v0)
/* 41C320 802A7590 82C20049 */ lb $v0, 0x49($s6)
/* 41C324 802A7594 02C21021 */ addu $v0, $s6, $v0
/* 41C328 802A7598 A6C3017C */ sh $v1, 0x17C($s6)
/* 41C32C 802A759C 904301DE */ lbu $v1, 0x1DE($v0)
/* 41C330 802A75A0 00031080 */ sll $v0, $v1, 2
/* 41C334 802A75A4 00431021 */ addu $v0, $v0, $v1
/* 41C338 802A75A8 00021080 */ sll $v0, $v0, 2
/* 41C33C 802A75AC 92C30049 */ lbu $v1, 0x49($s6)
/* 41C340 802A75B0 3C018009 */ lui $at, %hi(D_8008F064)
/* 41C344 802A75B4 00220821 */ addu $at, $at, $v0
/* 41C348 802A75B8 8C22F064 */ lw $v0, %lo(D_8008F064)($at)
/* 41C34C 802A75BC 00031E00 */ sll $v1, $v1, 24
/* 41C350 802A75C0 00032603 */ sra $a0, $v1, 24
/* 41C354 802A75C4 A6C4017A */ sh $a0, 0x17A($s6)
/* 41C358 802A75C8 AEC20184 */ sw $v0, 0x184($s6)
/* 41C35C 802A75CC 82A30292 */ lb $v1, 0x292($s5)
/* 41C360 802A75D0 24020002 */ addiu $v0, $zero, 0x2
/* 41C364 802A75D4 146200B5 */ bne $v1, $v0, .L802A78AC_7AF24C
/* 41C368 802A75D8 00041400 */ sll $v0, $a0, 16
/* 41C36C 802A75DC 00021403 */ sra $v0, $v0, 16
/* 41C370 802A75E0 24030008 */ addiu $v1, $zero, 0x8
/* 41C374 802A75E4 144300B1 */ bne $v0, $v1, .L802A78AC_7AF24C
/* 41C378 802A75E8 24820001 */ addiu $v0, $a0, 0x1
/* 41C37C 802A75EC 080A9E2B */ j .L802A78AC_7AF24C
/* 41C380 802A75F0 A6C2017A */ sh $v0, 0x17A($s6)
glabel .L802A75F4_7AEF94
/* 41C384 802A75F4 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41C388 802A75F8 00000000 */ nop
/* 41C38C 802A75FC 0C0A846C */ jal func_802A11B0_7A8B50
/* 41C390 802A7600 00000000 */ nop
/* 41C394 802A7604 104002CF */ beqz $v0, .L802A8144_7AFAE4
/* 41C398 802A7608 2402003D */ addiu $v0, $zero, 0x3D
/* 41C39C 802A760C 080AA04F */ j .L802A813C_7AFADC
/* 41C3A0 802A7610 00000000 */ nop
glabel .L802A7614_7AEFB4
/* 41C3A4 802A7614 0C0A8AAE */ jal func_802A2AB8_7AA458
/* 41C3A8 802A7618 00000000 */ nop
/* 41C3AC 802A761C 0C0A8426 */ jal func_802A1098_7A8A38
/* 41C3B0 802A7620 00000000 */ nop
/* 41C3B4 802A7624 080AA04F */ j .L802A813C_7AFADC
/* 41C3B8 802A7628 2402003F */ addiu $v0, $zero, 0x3F
glabel .L802A762C_7AEFCC
/* 41C3BC 802A762C 0C0A89F9 */ jal func_802A27E4_7AA184
/* 41C3C0 802A7630 00000000 */ nop
/* 41C3C4 802A7634 080A9CB5 */ j .L802A72D4_7AEC74
/* 41C3C8 802A7638 00000000 */ nop
glabel .L802A763C_7AEFDC
/* 41C3CC 802A763C 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41C3D0 802A7640 00000000 */ nop
/* 41C3D4 802A7644 2403FFFF */ addiu $v1, $zero, -0x1
/* 41C3D8 802A7648 104302BE */ beq $v0, $v1, .L802A8144_7AFAE4
/* 41C3DC 802A764C 2402003D */ addiu $v0, $zero, 0x3D
/* 41C3E0 802A7650 080AA04F */ j .L802A813C_7AFADC
/* 41C3E4 802A7654 00000000 */ nop
glabel .L802A7658_7AEFF8
/* 41C3E8 802A7658 0C0A9606 */ jal func_802A5818_7AD1B8
/* 41C3EC 802A765C 00000000 */ nop
/* 41C3F0 802A7660 14400004 */ bnez $v0, .L802A7674_7AF014
/* 41C3F4 802A7664 0000A02D */ daddu $s4, $zero, $zero
/* 41C3F8 802A7668 24020001 */ addiu $v0, $zero, 0x1
/* 41C3FC 802A766C 080A9F5D */ j .L802A7D74_7AF714
D_802A7670_7AF010:
/* 41C400 802A7670 A2C20088 */ sb $v0, 0x88($s6)
.L802A7674_7AF014:
/* 41C404 802A7674 0280982D */ daddu $s3, $s4, $zero
/* 41C408 802A7678 241E0002 */ addiu $fp, $zero, 0x2
/* 41C40C 802A767C 02A0902D */ daddu $s2, $s5, $zero
/* 41C410 802A7680 3C11802B */ lui $s1, %hi(D_802ACCD0)
/* 41C414 802A7684 2631CCD0 */ addiu $s1, $s1, %lo(D_802ACCD0)
.L802A7688_7AF028:
/* 41C418 802A7688 864201B4 */ lh $v0, 0x1B4($s2)
/* 41C41C 802A768C 50400027 */ beql $v0, $zero, .L802A772C_7AF0CC
/* 41C420 802A7690 26730001 */ addiu $s3, $s3, 0x1
/* 41C424 802A7694 00021140 */ sll $v0, $v0, 5
/* 41C428 802A7698 3C0E8008 */ lui $t6, %hi(gItemTable)
/* 41C42C 802A769C 25CE78E0 */ addiu $t6, $t6, %lo(gItemTable)
D_802A76A0_7AF040:
/* 41C430 802A76A0 004E8021 */ addu $s0, $v0, $t6
/* 41C434 802A76A4 3C0E8009 */ lui $t6, %hi(gItemHudScripts)
/* 41C438 802A76A8 25CEA680 */ addiu $t6, $t6, %lo(gItemHudScripts)
/* 41C43C 802A76AC 86020004 */ lh $v0, 0x4($s0)
/* 41C440 802A76B0 96030018 */ lhu $v1, 0x18($s0)
/* 41C444 802A76B4 000210C0 */ sll $v0, $v0, 3
/* 41C448 802A76B8 30630002 */ andi $v1, $v1, 0x2
/* 41C44C 802A76BC 1060001A */ beqz $v1, .L802A7728_7AF0C8
/* 41C450 802A76C0 004EA821 */ addu $s5, $v0, $t6
/* 41C454 802A76C4 A2DE0178 */ sb $fp, 0x178($s6)
/* 41C458 802A76C8 964201B4 */ lhu $v0, 0x1B4($s2)
/* 41C45C 802A76CC A6C2017A */ sh $v0, 0x17A($s6)
/* 41C460 802A76D0 8E020008 */ lw $v0, 0x8($s0)
/* 41C464 802A76D4 02E0202D */ daddu $a0, $s7, $zero
/* 41C468 802A76D8 0C098C0B */ jal func_8026302C
/* 41C46C 802A76DC AEC20184 */ sw $v0, 0x184($s6)
/* 41C470 802A76E0 8EA20000 */ lw $v0, 0x0($s5)
/* 41C474 802A76E4 AE220000 */ sw $v0, 0x0($s1)
D_802A76E8_7AF088:
/* 41C478 802A76E8 864301B4 */ lh $v1, 0x1B4($s2)
/* 41C47C 802A76EC 24020001 */ addiu $v0, $zero, 0x1
/* 41C480 802A76F0 AE22018C */ sw $v0, 0x18C($s1)
/* 41C484 802A76F4 AE230108 */ sw $v1, 0x108($s1)
/* 41C488 802A76F8 8E020000 */ lw $v0, 0x0($s0)
/* 41C48C 802A76FC AE220084 */ sw $v0, 0x84($s1)
/* 41C490 802A7700 8E020014 */ lw $v0, 0x14($s0)
/* 41C494 802A7704 AE220294 */ sw $v0, 0x294($s1)
/* 41C498 802A7708 82E2040C */ lb $v0, 0x40C($s7)
/* 41C49C 802A770C 54400005 */ bnel $v0, $zero, .L802A7724_7AF0C4
/* 41C4A0 802A7710 26310004 */ addiu $s1, $s1, 0x4
/* 41C4A4 802A7714 8EA20004 */ lw $v0, 0x4($s5)
D_802A7718_7AF0B8:
/* 41C4A8 802A7718 AE20018C */ sw $zero, 0x18C($s1)
/* 41C4AC 802A771C AE220000 */ sw $v0, 0x0($s1)
/* 41C4B0 802A7720 26310004 */ addiu $s1, $s1, 0x4
.L802A7724_7AF0C4:
/* 41C4B4 802A7724 26940001 */ addiu $s4, $s4, 0x1
.L802A7728_7AF0C8:
/* 41C4B8 802A7728 26730001 */ addiu $s3, $s3, 0x1
.L802A772C_7AF0CC:
/* 41C4BC 802A772C 2A62000A */ slti $v0, $s3, 0xA
/* 41C4C0 802A7730 1440FFD5 */ bnez $v0, .L802A7688_7AF028
/* 41C4C4 802A7734 26520002 */ addiu $s2, $s2, 0x2
/* 41C4C8 802A7738 16800004 */ bnez $s4, .L802A774C_7AF0EC
/* 41C4CC 802A773C 24020035 */ addiu $v0, $zero, 0x35
/* 41C4D0 802A7740 24020001 */ addiu $v0, $zero, 0x1
/* 41C4D4 802A7744 080A9F5D */ j .L802A7D74_7AF714
/* 41C4D8 802A7748 A2C20088 */ sb $v0, 0x88($s6)
.L802A774C_7AF0EC:
/* 41C4DC 802A774C 3C01802B */ lui $at, %hi(D_802ACFE8)
D_802A7750_7AF0F0:
/* 41C4E0 802A7750 AC20CFE8 */ sw $zero, %lo(D_802ACFE8)($at)
/* 41C4E4 802A7754 86C3017C */ lh $v1, 0x17C($s6)
/* 41C4E8 802A7758 1462000C */ bne $v1, $v0, .L802A778C_7AF12C
/* 41C4EC 802A775C 24020036 */ addiu $v0, $zero, 0x36
D_802A7760_7AF100:
/* 41C4F0 802A7760 24020064 */ addiu $v0, $zero, 0x64
/* 41C4F4 802A7764 3C01802B */ lui $at, %hi(D_802ACFE8)
/* 41C4F8 802A7768 AC22CFE8 */ sw $v0, %lo(D_802ACFE8)($at)
/* 41C4FC 802A776C 82C30088 */ lb $v1, 0x88($s6)
D_802A7770_7AF110:
/* 41C500 802A7770 24020001 */ addiu $v0, $zero, 0x1
/* 41C504 802A7774 3C01802B */ lui $at, %hi(D_802ACFEC)
/* 41C508 802A7778 AC22CFEC */ sw $v0, %lo(D_802ACFEC)($at)
/* 41C50C 802A777C 3C01802B */ lui $at, %hi(D_802ACFF0)
D_802A7780_7AF120:
/* 41C510 802A7780 AC23CFF0 */ sw $v1, %lo(D_802ACFF0)($at)
/* 41C514 802A7784 86C3017C */ lh $v1, 0x17C($s6)
/* 41C518 802A7788 24020036 */ addiu $v0, $zero, 0x36
.L802A778C_7AF12C:
/* 41C51C 802A778C 1462000B */ bne $v1, $v0, .L802A77BC_7AF15C
/* 41C520 802A7790 24020002 */ addiu $v0, $zero, 0x2
/* 41C524 802A7794 3C01802B */ lui $at, %hi(D_802ACFEC)
/* 41C528 802A7798 AC22CFEC */ sw $v0, %lo(D_802ACFEC)($at)
/* 41C52C 802A779C 3C02802B */ lui $v0, %hi(D_802ACFE8)
/* 41C530 802A77A0 8C42CFE8 */ lw $v0, %lo(D_802ACFE8)($v0)
/* 41C534 802A77A4 82C30088 */ lb $v1, 0x88($s6)
/* 41C538 802A77A8 244200C8 */ addiu $v0, $v0, 0xC8
/* 41C53C 802A77AC 3C01802B */ lui $at, %hi(D_802ACFE8)
/* 41C540 802A77B0 AC22CFE8 */ sw $v0, %lo(D_802ACFE8)($at)
/* 41C544 802A77B4 3C01802B */ lui $at, %hi(D_802ACFF0)
D_802A77B8_7AF158:
/* 41C548 802A77B8 AC23CFF0 */ sw $v1, %lo(D_802ACFF0)($at)
.L802A77BC_7AF15C:
/* 41C54C 802A77BC 82C20050 */ lb $v0, 0x50($s6)
D_802A77C0_7AF160:
/* 41C550 802A77C0 04420001 */ bltzl $v0, .L802A77C8_7AF168
/* 41C554 802A77C4 A2C00050 */ sb $zero, 0x50($s6)
.L802A77C8_7AF168:
/* 41C558 802A77C8 82DE0050 */ lb $fp, 0x50($s6)
/* 41C55C 802A77CC 3C04802B */ lui $a0, %hi(D_802ACCD0)
/* 41C560 802A77D0 2484CCD0 */ addiu $a0, $a0, %lo(D_802ACCD0)
/* 41C564 802A77D4 AC940324 */ sw $s4, 0x324($a0)
/* 41C568 802A77D8 0C03D44F */ jal create_battle_popup_menu
/* 41C56C 802A77DC AC9E0328 */ sw $fp, 0x328($a0)
/* 41C570 802A77E0 0C03D4AF */ jal func_800F52BC
/* 41C574 802A77E4 00000000 */ nop
/* 41C578 802A77E8 080AA04F */ j .L802A813C_7AFADC
/* 41C57C 802A77EC 24020047 */ addiu $v0, $zero, 0x47
glabel .L802A77F0_7AF190
/* 41C580 802A77F0 3C03802B */ lui $v1, %hi(D_802ACFFC)
/* 41C584 802A77F4 8463CFFC */ lh $v1, %lo(D_802ACFFC)($v1)
/* 41C588 802A77F8 10600252 */ beqz $v1, .L802A8144_7AFAE4
/* 41C58C 802A77FC 240200FF */ addiu $v0, $zero, 0xFF
/* 41C590 802A7800 14620004 */ bne $v1, $v0, .L802A7814_7AF1B4
/* 41C594 802A7804 2402004A */ addiu $v0, $zero, 0x4A
/* 41C598 802A7808 24020001 */ addiu $v0, $zero, 0x1
/* 41C59C 802A780C 080A9F5D */ j .L802A7D74_7AF714
/* 41C5A0 802A7810 A2C20088 */ sb $v0, 0x88($s6)
.L802A7814_7AF1B4:
/* 41C5A4 802A7814 2403004B */ addiu $v1, $zero, 0x4B
/* 41C5A8 802A7818 A6C2006C */ sh $v0, 0x6C($s6)
/* 41C5AC 802A781C 3C02802B */ lui $v0, %hi(D_802ACFFC)
D_802A7820_7AF1C0:
/* 41C5B0 802A7820 8442CFFC */ lh $v0, %lo(D_802ACFFC)($v0)
/* 41C5B4 802A7824 3C0E802B */ lui $t6, %hi(D_802ACCD0)
/* 41C5B8 802A7828 25CECCD0 */ addiu $t6, $t6, %lo(D_802ACCD0)
/* 41C5BC 802A782C A6C3006E */ sh $v1, 0x6E($s6)
/* 41C5C0 802A7830 2442FFFF */ addiu $v0, $v0, -0x1
/* 41C5C4 802A7834 00021080 */ sll $v0, $v0, 2
/* 41C5C8 802A7838 01C21021 */ addu $v0, $t6, $v0
/* 41C5CC 802A783C 9442010A */ lhu $v0, 0x10A($v0)
/* 41C5D0 802A7840 24030002 */ addiu $v1, $zero, 0x2
/* 41C5D4 802A7844 A2C30178 */ sb $v1, 0x178($s6)
/* 41C5D8 802A7848 A6C201AA */ sh $v0, 0x1AA($s6)
/* 41C5DC 802A784C A6C2017A */ sh $v0, 0x17A($s6)
/* 41C5E0 802A7850 00021400 */ sll $v0, $v0, 16
/* 41C5E4 802A7854 000212C3 */ sra $v0, $v0, 11
/* 41C5E8 802A7858 3C038008 */ lui $v1, %hi(gItemTable + 0x8)
/* 41C5EC 802A785C 00621821 */ addu $v1, $v1, $v0
/* 41C5F0 802A7860 8C6378E8 */ lw $v1, %lo(gItemTable + 0x8)($v1)
/* 41C5F4 802A7864 3C02802B */ lui $v0, %hi(D_802ACFFD)
/* 41C5F8 802A7868 9042CFFD */ lbu $v0, %lo(D_802ACFFD)($v0)
/* 41C5FC 802A786C AEC00188 */ sw $zero, 0x188($s6)
/* 41C600 802A7870 2442FFFF */ addiu $v0, $v0, -0x1
/* 41C604 802A7874 34638000 */ ori $v1, $v1, 0x8000
/* 41C608 802A7878 A2C20050 */ sb $v0, 0x50($s6)
/* 41C60C 802A787C 0C03C4EC */ jal hide_popup_menu
/* 41C610 802A7880 AEC30184 */ sw $v1, 0x184($s6)
/* 41C614 802A7884 24020005 */ addiu $v0, $zero, 0x5
D_802A7888_7AF228:
/* 41C618 802A7888 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41C61C 802A788C AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41C620 802A7890 080AA04F */ j .L802A813C_7AFADC
/* 41C624 802A7894 24020048 */ addiu $v0, $zero, 0x48
glabel .L802A7898_7AF238
/* 41C628 802A7898 3C03802B */ lui $v1, %hi(D_802ACC60)
/* 41C62C 802A789C 2463CC60 */ addiu $v1, $v1, %lo(D_802ACC60)
/* 41C630 802A78A0 8C620000 */ lw $v0, 0x0($v1)
/* 41C634 802A78A4 1440000A */ bnez $v0, .L802A78D0_7AF270
/* 41C638 802A78A8 2442FFFF */ addiu $v0, $v0, -0x1
.L802A78AC_7AF24C:
/* 41C63C 802A78AC 0C090464 */ jal func_80241190
/* 41C640 802A78B0 24040011 */ addiu $a0, $zero, 0x11
/* 41C644 802A78B4 080AA051 */ j .L802A8144_7AFAE4
/* 41C648 802A78B8 00000000 */ nop
glabel .L802A78BC_7AF25C
/* 41C64C 802A78BC 3C03802B */ lui $v1, %hi(D_802ACC60)
/* 41C650 802A78C0 2463CC60 */ addiu $v1, $v1, %lo(D_802ACC60)
/* 41C654 802A78C4 8C620000 */ lw $v0, 0x0($v1)
/* 41C658 802A78C8 10400003 */ beqz $v0, .L802A78D8_7AF278
/* 41C65C 802A78CC 2442FFFF */ addiu $v0, $v0, -0x1
.L802A78D0_7AF270:
/* 41C660 802A78D0 080AA051 */ j .L802A8144_7AFAE4
/* 41C664 802A78D4 AC620000 */ sw $v0, 0x0($v1)
.L802A78D8_7AF278:
/* 41C668 802A78D8 080AA04F */ j .L802A813C_7AFADC
/* 41C66C 802A78DC 24020047 */ addiu $v0, $zero, 0x47
glabel .L802A78E0_7AF280
/* 41C670 802A78E0 0C03C5B3 */ jal func_800F16CC
/* 41C674 802A78E4 00000000 */ nop
/* 41C678 802A78E8 24020005 */ addiu $v0, $zero, 0x5
/* 41C67C 802A78EC 3C01802B */ lui $at, %hi(D_802ACC60)
D_802A78F0_7AF290:
/* 41C680 802A78F0 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41C684 802A78F4 080AA04F */ j .L802A813C_7AFADC
/* 41C688 802A78F8 24020049 */ addiu $v0, $zero, 0x49
glabel .L802A78FC_7AF29C
/* 41C68C 802A78FC 0C03C54E */ jal destroy_popup_menu
/* 41C690 802A7900 00000000 */ nop
/* 41C694 802A7904 080AA051 */ j .L802A8144_7AFAE4
/* 41C698 802A7908 00000000 */ nop
glabel .L802A790C_7AF2AC
/* 41C69C 802A790C 82A20000 */ lb $v0, 0x0($s5)
/* 41C6A0 802A7910 04400008 */ bltz $v0, .L802A7934_7AF2D4
/* 41C6A4 802A7914 02E0202D */ daddu $a0, $s7, $zero
/* 41C6A8 802A7918 3C028009 */ lui $v0, %hi(D_8008F2BC)
/* 41C6AC 802A791C 8C42F2BC */ lw $v0, %lo(D_8008F2BC)($v0)
/* 41C6B0 802A7920 0C098C0B */ jal func_8026302C
/* 41C6B4 802A7924 AEC20184 */ sw $v0, 0x184($s6)
/* 41C6B8 802A7928 82F1040C */ lb $s1, 0x40C($s7)
/* 41C6BC 802A792C 080A9E4E */ j .L802A7938_7AF2D8
/* 41C6C0 802A7930 00000000 */ nop
.L802A7934_7AF2D4:
/* 41C6C4 802A7934 0000882D */ daddu $s1, $zero, $zero
.L802A7938_7AF2D8:
/* 41C6C8 802A7938 82A20001 */ lb $v0, 0x1($s5)
/* 41C6CC 802A793C 04400008 */ bltz $v0, .L802A7960_7AF300
/* 41C6D0 802A7940 02E0202D */ daddu $a0, $s7, $zero
/* 41C6D4 802A7944 3C028009 */ lui $v0, %hi(D_8008F0F0)
/* 41C6D8 802A7948 8C42F0F0 */ lw $v0, %lo(D_8008F0F0)($v0)
/* 41C6DC 802A794C 0C098C0B */ jal func_8026302C
/* 41C6E0 802A7950 AEC20184 */ sw $v0, 0x184($s6)
/* 41C6E4 802A7954 82E2040C */ lb $v0, 0x40C($s7)
D_802A7958_7AF2F8:
/* 41C6E8 802A7958 080A9E59 */ j .L802A7964_7AF304
/* 41C6EC 802A795C 00000000 */ nop
.L802A7960_7AF300:
/* 41C6F0 802A7960 0000102D */ daddu $v0, $zero, $zero
.L802A7964_7AF304:
/* 41C6F4 802A7964 1E200009 */ bgtz $s1, .L802A798C_7AF32C
/* 41C6F8 802A7968 00000000 */ nop
/* 41C6FC 802A796C 1C400007 */ bgtz $v0, .L802A798C_7AF32C
/* 41C700 802A7970 24040016 */ addiu $a0, $zero, 0x16
/* 41C704 802A7974 24020009 */ addiu $v0, $zero, 0x9
/* 41C708 802A7978 A2C20178 */ sb $v0, 0x178($s6)
/* 41C70C 802A797C 0C090464 */ jal func_80241190
/* 41C710 802A7980 A2C00095 */ sb $zero, 0x95($s6)
/* 41C714 802A7984 080AA051 */ j .L802A8144_7AFAE4
/* 41C718 802A7988 00000000 */ nop
.L802A798C_7AF32C:
/* 41C71C 802A798C 1E200002 */ bgtz $s1, .L802A7998_7AF338
/* 41C720 802A7990 24100032 */ addiu $s0, $zero, 0x32
/* 41C724 802A7994 0000802D */ daddu $s0, $zero, $zero
.L802A7998_7AF338:
/* 41C728 802A7998 58400001 */ blezl $v0, .L802A79A0_7AF340
/* 41C72C 802A799C 24100065 */ addiu $s0, $zero, 0x65
.L802A79A0_7AF340:
/* 41C730 802A79A0 0C00A67F */ jal rand_int
/* 41C734 802A79A4 24040064 */ addiu $a0, $zero, 0x64
/* 41C738 802A79A8 0050102A */ slt $v0, $v0, $s0
/* 41C73C 802A79AC 1040000C */ beqz $v0, .L802A79E0_7AF380
/* 41C740 802A79B0 02E0202D */ daddu $a0, $s7, $zero
/* 41C744 802A79B4 92A20000 */ lbu $v0, 0x0($s5)
/* 41C748 802A79B8 2403001E */ addiu $v1, $zero, 0x1E
/* 41C74C 802A79BC A6C3017C */ sh $v1, 0x17C($s6)
D_802A79C0_7AF360:
/* 41C750 802A79C0 A2C00178 */ sb $zero, 0x178($s6)
/* 41C754 802A79C4 3C038009 */ lui $v1, %hi(D_8008F2BC)
/* 41C758 802A79C8 8C63F2BC */ lw $v1, %lo(D_8008F2BC)($v1)
/* 41C75C 802A79CC 00021600 */ sll $v0, $v0, 24
/* 41C760 802A79D0 00021603 */ sra $v0, $v0, 24
/* 41C764 802A79D4 AEC30184 */ sw $v1, 0x184($s6)
/* 41C768 802A79D8 080A9E83 */ j .L802A7A0C_7AF3AC
/* 41C76C 802A79DC A6C2017A */ sh $v0, 0x17A($s6)
.L802A79E0_7AF380:
/* 41C770 802A79E0 24020007 */ addiu $v0, $zero, 0x7
/* 41C774 802A79E4 A6C2017C */ sh $v0, 0x17C($s6)
/* 41C778 802A79E8 92A30001 */ lbu $v1, 0x1($s5)
/* 41C77C 802A79EC 24020001 */ addiu $v0, $zero, 0x1
/* 41C780 802A79F0 A2C20178 */ sb $v0, 0x178($s6)
/* 41C784 802A79F4 3C028009 */ lui $v0, %hi(D_8008F0F0)
/* 41C788 802A79F8 8C42F0F0 */ lw $v0, %lo(D_8008F0F0)($v0)
/* 41C78C 802A79FC 00031E00 */ sll $v1, $v1, 24
/* 41C790 802A7A00 00031E03 */ sra $v1, $v1, 24
/* 41C794 802A7A04 AEC20184 */ sw $v0, 0x184($s6)
/* 41C798 802A7A08 A6C3017A */ sh $v1, 0x17A($s6)
.L802A7A0C_7AF3AC:
/* 41C79C 802A7A0C 0C098C0B */ jal func_8026302C
/* 41C7A0 802A7A10 00000000 */ nop
/* 41C7A4 802A7A14 0C090464 */ jal func_80241190
/* 41C7A8 802A7A18 24040012 */ addiu $a0, $zero, 0x12
/* 41C7AC 802A7A1C 080AA051 */ j .L802A8144_7AFAE4
/* 41C7B0 802A7A20 00000000 */ nop
glabel .L802A7A24_7AF3C4
/* 41C7B4 802A7A24 0C098C9A */ jal func_80263268
D_802A7A28_7AF3C8:
/* 41C7B8 802A7A28 0000A02D */ daddu $s4, $zero, $zero
/* 41C7BC 802A7A2C 82C2007C */ lb $v0, 0x7C($s6)
/* 41C7C0 802A7A30 04400023 */ bltz $v0, .L802A7AC0_7AF460
/* 41C7C4 802A7A34 3C05001D */ lui $a1, (0x1D00A1 >> 16)
/* 41C7C8 802A7A38 34A500A1 */ ori $a1, $a1, (0x1D00A1 & 0xFFFF)
/* 41C7CC 802A7A3C 24020005 */ addiu $v0, $zero, 0x5
/* 41C7D0 802A7A40 3C04802B */ lui $a0, %hi(D_802AB4A4_7B2E44)
/* 41C7D4 802A7A44 8C84B4A4 */ lw $a0, %lo(D_802AB4A4_7B2E44)($a0)
/* 41C7D8 802A7A48 82A30012 */ lb $v1, 0x12($s5)
/* 41C7DC 802A7A4C 3C06802B */ lui $a2, %hi(D_802AD690)
/* 41C7E0 802A7A50 24C6D690 */ addiu $a2, $a2, %lo(D_802AD690)
/* 41C7E4 802A7A54 3C01802B */ lui $at, %hi(D_802AD678)
/* 41C7E8 802A7A58 AC22D678 */ sw $v0, %lo(D_802AD678)($at)
/* 41C7EC 802A7A5C 00031880 */ sll $v1, $v1, 2
/* 41C7F0 802A7A60 3C01802B */ lui $at, %hi(D_802AD658)
/* 41C7F4 802A7A64 AC24D658 */ sw $a0, %lo(D_802AD658)($at)
/* 41C7F8 802A7A68 3C01802B */ lui $at, %hi(D_802AB3F8_7B2D98)
/* 41C7FC 802A7A6C 00230821 */ addu $at, $at, $v1
/* 41C800 802A7A70 8C23B3F8 */ lw $v1, %lo(D_802AB3F8_7B2D98)($at)
/* 41C804 802A7A74 24020001 */ addiu $v0, $zero, 0x1
/* 41C808 802A7A78 ACC20000 */ sw $v0, 0x0($a2)
/* 41C80C 802A7A7C 3C01802B */ lui $at, %hi(D_802AD6C0)
/* 41C810 802A7A80 AC25D6C0 */ sw $a1, %lo(D_802AD6C0)($at)
/* 41C814 802A7A84 82C2007C */ lb $v0, 0x7C($s6)
D_802A7A88_7AF428:
/* 41C818 802A7A88 3C04802B */ lui $a0, %hi(D_802AD640)
/* 41C81C 802A7A8C 2484D640 */ addiu $a0, $a0, %lo(D_802AD640)
/* 41C820 802A7A90 1C40000A */ bgtz $v0, .L802A7ABC_7AF45C
/* 41C824 802A7A94 AC830000 */ sw $v1, 0x0($a0)
/* 41C828 802A7A98 82A20012 */ lb $v0, 0x12($s5)
/* 41C82C 802A7A9C 00021080 */ sll $v0, $v0, 2
/* 41C830 802A7AA0 3C01802B */ lui $at, %hi(D_802AB438_7B2DD8)
/* 41C834 802A7AA4 00220821 */ addu $at, $at, $v0
/* 41C838 802A7AA8 8C22B438 */ lw $v0, %lo(D_802AB438_7B2DD8)($at)
/* 41C83C 802A7AAC ACC00000 */ sw $zero, 0x0($a2)
D_802A7AB0_7AF450:
/* 41C840 802A7AB0 3C01802B */ lui $at, %hi(D_802AD6A8)
/* 41C844 802A7AB4 AC20D6A8 */ sw $zero, %lo(D_802AD6A8)($at)
/* 41C848 802A7AB8 AC820000 */ sw $v0, 0x0($a0)
.L802A7ABC_7AF45C:
/* 41C84C 802A7ABC 24140001 */ addiu $s4, $zero, 0x1
.L802A7AC0_7AF460:
/* 41C850 802A7AC0 3C05001D */ lui $a1, (0x1D00A2 >> 16)
/* 41C854 802A7AC4 34A500A2 */ ori $a1, $a1, (0x1D00A2 & 0xFFFF)
/* 41C858 802A7AC8 00141880 */ sll $v1, $s4, 2
/* 41C85C 802A7ACC 26940001 */ addiu $s4, $s4, 0x1
/* 41C860 802A7AD0 24020009 */ addiu $v0, $zero, 0x9
/* 41C864 802A7AD4 24080001 */ addiu $t0, $zero, 0x1
/* 41C868 802A7AD8 3C04802B */ lui $a0, %hi(D_802AB480_7B2E20)
/* 41C86C 802A7ADC 8C84B480 */ lw $a0, %lo(D_802AB480_7B2E20)($a0)
/* 41C870 802A7AE0 3C06001D */ lui $a2, (0x1D00A3 >> 16)
/* 41C874 802A7AE4 3C01802B */ lui $at, %hi(D_802AD678)
/* 41C878 802A7AE8 00230821 */ addu $at, $at, $v1
/* 41C87C 802A7AEC AC22D678 */ sw $v0, %lo(D_802AD678)($at)
/* 41C880 802A7AF0 3C01802B */ lui $at, %hi(D_802AD690)
/* 41C884 802A7AF4 00230821 */ addu $at, $at, $v1
/* 41C888 802A7AF8 AC28D690 */ sw $t0, %lo(D_802AD690)($at)
/* 41C88C 802A7AFC 3C01802B */ lui $at, %hi(D_802AD640)
/* 41C890 802A7B00 00230821 */ addu $at, $at, $v1
/* 41C894 802A7B04 AC24D640 */ sw $a0, %lo(D_802AD640)($at)
/* 41C898 802A7B08 3C04802B */ lui $a0, %hi(D_802AB490_7B2E30)
/* 41C89C 802A7B0C 2484B490 */ addiu $a0, $a0, %lo(D_802AB490_7B2E30)
/* 41C8A0 802A7B10 8C820024 */ lw $v0, 0x24($a0)
/* 41C8A4 802A7B14 3C09802B */ lui $t1, %hi(D_802AB488_7B2E28)
/* 41C8A8 802A7B18 2529B488 */ addiu $t1, $t1, %lo(D_802AB488_7B2E28)
/* 41C8AC 802A7B1C 3C01802B */ lui $at, %hi(D_802AD6C0)
/* 41C8B0 802A7B20 00230821 */ addu $at, $at, $v1
/* 41C8B4 802A7B24 AC25D6C0 */ sw $a1, %lo(D_802AD6C0)($at)
/* 41C8B8 802A7B28 00142880 */ sll $a1, $s4, 2
/* 41C8BC 802A7B2C 3C01802B */ lui $at, %hi(D_802AD658)
/* 41C8C0 802A7B30 00230821 */ addu $at, $at, $v1
/* 41C8C4 802A7B34 AC22D658 */ sw $v0, %lo(D_802AD658)($at)
/* 41C8C8 802A7B38 3C03802B */ lui $v1, %hi(D_802AD640)
/* 41C8CC 802A7B3C 2463D640 */ addiu $v1, $v1, %lo(D_802AD640)
/* 41C8D0 802A7B40 8D220000 */ lw $v0, 0x0($t1)
/* 41C8D4 802A7B44 00A33821 */ addu $a3, $a1, $v1
/* 41C8D8 802A7B48 ACE20000 */ sw $v0, 0x0($a3)
/* 41C8DC 802A7B4C 24020003 */ addiu $v0, $zero, 0x3
/* 41C8E0 802A7B50 3C01802B */ lui $at, %hi(D_802AD678)
/* 41C8E4 802A7B54 00250821 */ addu $at, $at, $a1
/* 41C8E8 802A7B58 AC22D678 */ sw $v0, %lo(D_802AD678)($at)
/* 41C8EC 802A7B5C 3C02802B */ lui $v0, %hi(D_802AD690)
/* 41C8F0 802A7B60 2442D690 */ addiu $v0, $v0, %lo(D_802AD690)
/* 41C8F4 802A7B64 00A21821 */ addu $v1, $a1, $v0
/* 41C8F8 802A7B68 AC680000 */ sw $t0, 0x0($v1)
/* 41C8FC 802A7B6C 8C82000C */ lw $v0, 0xC($a0)
/* 41C900 802A7B70 34C600A3 */ ori $a2, $a2, (0x1D00A3 & 0xFFFF)
/* 41C904 802A7B74 3C01802B */ lui $at, %hi(D_802AD6C0)
/* 41C908 802A7B78 00250821 */ addu $at, $at, $a1
/* 41C90C 802A7B7C AC26D6C0 */ sw $a2, %lo(D_802AD6C0)($at)
/* 41C910 802A7B80 3C01802B */ lui $at, %hi(D_802AD658)
/* 41C914 802A7B84 00250821 */ addu $at, $at, $a1
/* 41C918 802A7B88 AC22D658 */ sw $v0, %lo(D_802AD658)($at)
/* 41C91C 802A7B8C 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4)
/* 41C920 802A7B90 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0)
/* 41C924 802A7B94 30420020 */ andi $v0, $v0, 0x20
/* 41C928 802A7B98 14400007 */ bnez $v0, .L802A7BB8_7AF558
/* 41C92C 802A7B9C 00000000 */ nop
/* 41C930 802A7BA0 8D220004 */ lw $v0, 0x4($t1)
/* 41C934 802A7BA4 ACE20000 */ sw $v0, 0x0($a3)
/* 41C938 802A7BA8 AC600000 */ sw $zero, 0x0($v1)
/* 41C93C 802A7BAC 3C01802B */ lui $at, %hi(D_802AD6A8)
/* 41C940 802A7BB0 00250821 */ addu $at, $at, $a1
/* 41C944 802A7BB4 AC28D6A8 */ sw $t0, %lo(D_802AD6A8)($at)
.L802A7BB8_7AF558:
/* 41C948 802A7BB8 82C20053 */ lb $v0, 0x53($s6)
/* 41C94C 802A7BBC 04410002 */ bgez $v0, .L802A7BC8_7AF568
/* 41C950 802A7BC0 26940001 */ addiu $s4, $s4, 0x1
/* 41C954 802A7BC4 A2C00053 */ sb $zero, 0x53($s6)
.L802A7BC8_7AF568:
/* 41C958 802A7BC8 82DE0053 */ lb $fp, 0x53($s6)
/* 41C95C 802A7BCC 3C01802B */ lui $at, %hi(D_802AD66C)
/* 41C960 802A7BD0 AC34D66C */ sw $s4, %lo(D_802AD66C)($at)
/* 41C964 802A7BD4 3C01802B */ lui $at, %hi(D_802AD670)
/* 41C968 802A7BD8 AC3ED670 */ sw $fp, %lo(D_802AD670)($at)
/* 41C96C 802A7BDC 0C0A9176 */ jal func_802A45D8_7ABF78
/* 41C970 802A7BE0 00000000 */ nop
/* 41C974 802A7BE4 080AA04F */ j .L802A813C_7AFADC
/* 41C978 802A7BE8 240200C9 */ addiu $v0, $zero, 0xC9
glabel .L802A7BEC_7AF58C
/* 41C97C 802A7BEC 0C0A9295 */ jal func_802A4A54_7AC3F4
/* 41C980 802A7BF0 00000000 */ nop
/* 41C984 802A7BF4 0040802D */ daddu $s0, $v0, $zero
/* 41C988 802A7BF8 2402FFFF */ addiu $v0, $zero, -0x1
/* 41C98C 802A7BFC 1202014F */ beq $s0, $v0, .L802A813C_7AFADC
/* 41C990 802A7C00 240200CF */ addiu $v0, $zero, 0xCF
/* 41C994 802A7C04 1200014F */ beqz $s0, .L802A8144_7AFAE4
/* 41C998 802A7C08 240200FF */ addiu $v0, $zero, 0xFF
/* 41C99C 802A7C0C 1602000B */ bne $s0, $v0, .L802A7C3C_7AF5DC
/* 41C9A0 802A7C10 2603FFFF */ addiu $v1, $s0, -0x1
/* 41C9A4 802A7C14 0C0A8414 */ jal func_802A1050_7A89F0
/* 41C9A8 802A7C18 00000000 */ nop
/* 41C9AC 802A7C1C 24020008 */ addiu $v0, $zero, 0x8
/* 41C9B0 802A7C20 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41C9B4 802A7C24 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41C9B8 802A7C28 24020004 */ addiu $v0, $zero, 0x4
/* 41C9BC 802A7C2C 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41C9C0 802A7C30 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41C9C4 802A7C34 080A9FE1 */ j .L802A7F84_7AF924
/* 41C9C8 802A7C38 24020001 */ addiu $v0, $zero, 0x1
.L802A7C3C_7AF5DC:
/* 41C9CC 802A7C3C 00031080 */ sll $v0, $v1, 2
/* 41C9D0 802A7C40 3C01802B */ lui $at, %hi(D_802AD67B)
/* 41C9D4 802A7C44 00220821 */ addu $at, $at, $v0
/* 41C9D8 802A7C48 9022D67B */ lbu $v0, %lo(D_802AD67B)($at)
/* 41C9DC 802A7C4C A2C30053 */ sb $v1, 0x53($s6)
/* 41C9E0 802A7C50 A2C20048 */ sb $v0, 0x48($s6)
/* 41C9E4 802A7C54 82C30048 */ lb $v1, 0x48($s6)
/* 41C9E8 802A7C58 24020005 */ addiu $v0, $zero, 0x5
/* 41C9EC 802A7C5C 106200C9 */ beq $v1, $v0, .L802A7F84_7AF924
/* 41C9F0 802A7C60 2402001E */ addiu $v0, $zero, 0x1E
/* 41C9F4 802A7C64 0C0A91C6 */ jal func_802A4718_7AC0B8
/* 41C9F8 802A7C68 00000000 */ nop
/* 41C9FC 802A7C6C 0C0A840C */ jal func_802A1030_7A89D0
/* 41CA00 802A7C70 00000000 */ nop
/* 41CA04 802A7C74 080AA04F */ j .L802A813C_7AFADC
/* 41CA08 802A7C78 240200CA */ addiu $v0, $zero, 0xCA
glabel .L802A7C7C_7AF61C
/* 41CA0C 802A7C7C 0C0A9295 */ jal func_802A4A54_7AC3F4
/* 41CA10 802A7C80 00000000 */ nop
/* 41CA14 802A7C84 8EC30214 */ lw $v1, 0x214($s6)
/* 41CA18 802A7C88 30634000 */ andi $v1, $v1, 0x4000
/* 41CA1C 802A7C8C 10600009 */ beqz $v1, .L802A7CB4_7AF654
/* 41CA20 802A7C90 0040802D */ daddu $s0, $v0, $zero
/* 41CA24 802A7C94 16000007 */ bnez $s0, .L802A7CB4_7AF654
/* 41CA28 802A7C98 00000000 */ nop
/* 41CA2C 802A7C9C 0C0A923F */ jal func_802A48FC_7AC29C
/* 41CA30 802A7CA0 00000000 */ nop
/* 41CA34 802A7CA4 0C0A8426 */ jal func_802A1098_7A8A38
/* 41CA38 802A7CA8 00000000 */ nop
/* 41CA3C 802A7CAC 080AA04F */ j .L802A813C_7AFADC
/* 41CA40 802A7CB0 240200CB */ addiu $v0, $zero, 0xCB
.L802A7CB4_7AF654:
/* 41CA44 802A7CB4 0C0A846C */ jal func_802A11B0_7A8B50
/* 41CA48 802A7CB8 00000000 */ nop
/* 41CA4C 802A7CBC 10400121 */ beqz $v0, .L802A8144_7AFAE4
/* 41CA50 802A7CC0 240200CC */ addiu $v0, $zero, 0xCC
/* 41CA54 802A7CC4 82D00048 */ lb $s0, 0x48($s6)
/* 41CA58 802A7CC8 A6C2006C */ sh $v0, 0x6C($s6)
/* 41CA5C 802A7CCC 240200CD */ addiu $v0, $zero, 0xCD
/* 41CA60 802A7CD0 A6C2006E */ sh $v0, 0x6E($s6)
/* 41CA64 802A7CD4 24020004 */ addiu $v0, $zero, 0x4
/* 41CA68 802A7CD8 1202002A */ beq $s0, $v0, .L802A7D84_7AF724
/* 41CA6C 802A7CDC 2A020005 */ slti $v0, $s0, 0x5
/* 41CA70 802A7CE0 10400005 */ beqz $v0, .L802A7CF8_7AF698
/* 41CA74 802A7CE4 24020003 */ addiu $v0, $zero, 0x3
/* 41CA78 802A7CE8 1202000A */ beq $s0, $v0, .L802A7D14_7AF6B4
/* 41CA7C 802A7CEC 240200CD */ addiu $v0, $zero, 0xCD
/* 41CA80 802A7CF0 080AA051 */ j .L802A8144_7AFAE4
/* 41CA84 802A7CF4 00000000 */ nop
.L802A7CF8_7AF698:
/* 41CA88 802A7CF8 24020009 */ addiu $v0, $zero, 0x9
/* 41CA8C 802A7CFC 12020010 */ beq $s0, $v0, .L802A7D40_7AF6E0
/* 41CA90 802A7D00 2402000A */ addiu $v0, $zero, 0xA
/* 41CA94 802A7D04 1202002B */ beq $s0, $v0, .L802A7DB4_7AF754
/* 41CA98 802A7D08 240200CD */ addiu $v0, $zero, 0xCD
/* 41CA9C 802A7D0C 080AA051 */ j .L802A8144_7AFAE4
/* 41CAA0 802A7D10 00000000 */ nop
.L802A7D14_7AF6B4:
/* 41CAA4 802A7D14 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41CAA8 802A7D18 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 41CAAC 802A7D1C 0C0A9662 */ jal func_802A5988_7AD328
/* 41CAB0 802A7D20 00000000 */ nop
/* 41CAB4 802A7D24 24040018 */ addiu $a0, $zero, 0x18
/* 41CAB8 802A7D28 24020039 */ addiu $v0, $zero, 0x39
/* 41CABC 802A7D2C A2D00178 */ sb $s0, 0x178($s6)
/* 41CAC0 802A7D30 0C090464 */ jal func_80241190
/* 41CAC4 802A7D34 A6C2017C */ sh $v0, 0x17C($s6)
/* 41CAC8 802A7D38 080AA051 */ j .L802A8144_7AFAE4
/* 41CACC 802A7D3C 00000000 */ nop
.L802A7D40_7AF6E0:
/* 41CAD0 802A7D40 3C05FBFF */ lui $a1, (0xFBFFFFFF >> 16)
/* 41CAD4 802A7D44 34A5FFFF */ ori $a1, $a1, (0xFBFFFFFF & 0xFFFF)
/* 41CAD8 802A7D48 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 41CADC 802A7D4C 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 41CAE0 802A7D50 A2C0008B */ sb $zero, 0x8B($s6)
/* 41CAE4 802A7D54 8C620000 */ lw $v0, 0x0($v1)
/* 41CAE8 802A7D58 86C4006E */ lh $a0, 0x6E($s6)
/* 41CAEC 802A7D5C 00451024 */ and $v0, $v0, $a1
/* 41CAF0 802A7D60 AC620000 */ sw $v0, 0x0($v1)
/* 41CAF4 802A7D64 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41CAF8 802A7D68 AC24C4DC */ sw $a0, %lo(gBattleSubState)($at)
/* 41CAFC 802A7D6C 0C0A9662 */ jal func_802A5988_7AD328
/* 41CB00 802A7D70 00000000 */ nop
.L802A7D74_7AF714:
/* 41CB04 802A7D74 0C090464 */ jal func_80241190
/* 41CB08 802A7D78 24040016 */ addiu $a0, $zero, 0x16
/* 41CB0C 802A7D7C 080AA051 */ j .L802A8144_7AFAE4
/* 41CB10 802A7D80 00000000 */ nop
.L802A7D84_7AF724:
/* 41CB14 802A7D84 240200CD */ addiu $v0, $zero, 0xCD
/* 41CB18 802A7D88 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41CB1C 802A7D8C AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 41CB20 802A7D90 0C0A9662 */ jal func_802A5988_7AD328
/* 41CB24 802A7D94 00000000 */ nop
/* 41CB28 802A7D98 24040019 */ addiu $a0, $zero, 0x19
/* 41CB2C 802A7D9C 24020031 */ addiu $v0, $zero, 0x31
/* 41CB30 802A7DA0 A6C2017C */ sh $v0, 0x17C($s6)
.L802A7DA4_7AF744:
/* 41CB34 802A7DA4 0C090464 */ jal func_80241190
/* 41CB38 802A7DA8 A2D00178 */ sb $s0, 0x178($s6)
/* 41CB3C 802A7DAC 080AA051 */ j .L802A8144_7AFAE4
/* 41CB40 802A7DB0 00000000 */ nop
.L802A7DB4_7AF754:
/* 41CB44 802A7DB4 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41CB48 802A7DB8 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 41CB4C 802A7DBC 0C0A9662 */ jal func_802A5988_7AD328
/* 41CB50 802A7DC0 00000000 */ nop
.L802A7DC4_7AF764:
/* 41CB54 802A7DC4 0C090464 */ jal func_80241190
/* 41CB58 802A7DC8 2404000B */ addiu $a0, $zero, 0xB
/* 41CB5C 802A7DCC 080AA051 */ j .L802A8144_7AFAE4
D_802A7DD0_7AF770:
/* 41CB60 802A7DD0 00000000 */ nop
glabel .L802A7DD4_7AF774
/* 41CB64 802A7DD4 0C0A9295 */ jal func_802A4A54_7AC3F4
/* 41CB68 802A7DD8 00000000 */ nop
/* 41CB6C 802A7DDC 0C0A846C */ jal func_802A11B0_7A8B50
/* 41CB70 802A7DE0 00000000 */ nop
/* 41CB74 802A7DE4 104000D7 */ beqz $v0, .L802A8144_7AFAE4
/* 41CB78 802A7DE8 24020008 */ addiu $v0, $zero, 0x8
/* 41CB7C 802A7DEC 3C01802B */ lui $at, %hi(D_802ACC60)
D_802A7DF0_7AF790:
/* 41CB80 802A7DF0 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41CB84 802A7DF4 24020004 */ addiu $v0, $zero, 0x4
/* 41CB88 802A7DF8 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41CB8C 802A7DFC AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41CB90 802A7E00 080AA04F */ j .L802A813C_7AFADC
/* 41CB94 802A7E04 24020001 */ addiu $v0, $zero, 0x1
glabel .L802A7E08_7AF7A8
/* 41CB98 802A7E08 0C0A923F */ jal func_802A48FC_7AC29C
/* 41CB9C 802A7E0C 00000000 */ nop
/* 41CBA0 802A7E10 0C0A8426 */ jal func_802A1098_7A8A38
/* 41CBA4 802A7E14 00000000 */ nop
/* 41CBA8 802A7E18 080AA04F */ j .L802A813C_7AFADC
/* 41CBAC 802A7E1C 240200CB */ addiu $v0, $zero, 0xCB
glabel .L802A7E20_7AF7C0
/* 41CBB0 802A7E20 0C0A9295 */ jal func_802A4A54_7AC3F4
/* 41CBB4 802A7E24 00000000 */ nop
/* 41CBB8 802A7E28 2403FFFF */ addiu $v1, $zero, -0x1
/* 41CBBC 802A7E2C 104300C5 */ beq $v0, $v1, .L802A8144_7AFAE4
/* 41CBC0 802A7E30 240200C9 */ addiu $v0, $zero, 0xC9
/* 41CBC4 802A7E34 080AA04F */ j .L802A813C_7AFADC
/* 41CBC8 802A7E38 00000000 */ nop
glabel .L802A7E3C_7AF7DC
/* 41CBCC 802A7E3C 0000A02D */ daddu $s4, $zero, $zero
/* 41CBD0 802A7E40 24130001 */ addiu $s3, $zero, 0x1
/* 41CBD4 802A7E44 3C0C8009 */ lui $t4, %hi(gPartnerPopupProperties)
/* 41CBD8 802A7E48 258CEF20 */ addiu $t4, $t4, %lo(gPartnerPopupProperties)
/* 41CBDC 802A7E4C 3C0B802B */ lui $t3, %hi(D_802AB3F8_7B2D98)
/* 41CBE0 802A7E50 256BB3F8 */ addiu $t3, $t3, %lo(D_802AB3F8_7B2D98)
/* 41CBE4 802A7E54 0260502D */ daddu $t2, $s3, $zero
/* 41CBE8 802A7E58 3C09802B */ lui $t1, %hi(D_802AB438_7B2DD8)
/* 41CBEC 802A7E5C 2529B438 */ addiu $t1, $t1, %lo(D_802AB438_7B2DD8)
/* 41CBF0 802A7E60 3C088009 */ lui $t0, %hi(D_8008EEC4)
/* 41CBF4 802A7E64 2508EEC4 */ addiu $t0, $t0, %lo(D_8008EEC4)
/* 41CBF8 802A7E68 3C04802B */ lui $a0, %hi(D_802ACCD0)
/* 41CBFC 802A7E6C 2484CCD0 */ addiu $a0, $a0, %lo(D_802ACCD0)
.L802A7E70_7AF810:
/* 41CC00 802A7E70 8D050000 */ lw $a1, 0x0($t0)
/* 41CC04 802A7E74 000510C0 */ sll $v0, $a1, 3
/* 41CC08 802A7E78 02A23021 */ addu $a2, $s5, $v0
/* 41CC0C 802A7E7C 90C20014 */ lbu $v0, 0x14($a2)
/* 41CC10 802A7E80 50400019 */ beql $v0, $zero, .L802A7EE8_7AF888
/* 41CC14 802A7E84 26730001 */ addiu $s3, $s3, 0x1
/* 41CC18 802A7E88 00053880 */ sll $a3, $a1, 2
/* 41CC1C 802A7E8C 00EB1021 */ addu $v0, $a3, $t3
/* 41CC20 802A7E90 00051900 */ sll $v1, $a1, 4
/* 41CC24 802A7E94 8C420000 */ lw $v0, 0x0($v0)
/* 41CC28 802A7E98 006C1821 */ addu $v1, $v1, $t4
/* 41CC2C 802A7E9C AC850108 */ sw $a1, 0x108($a0)
/* 41CC30 802A7EA0 AC8A018C */ sw $t2, 0x18C($a0)
/* 41CC34 802A7EA4 AC820000 */ sw $v0, 0x0($a0)
/* 41CC38 802A7EA8 8C620000 */ lw $v0, 0x0($v1)
/* 41CC3C 802A7EAC AC820084 */ sw $v0, 0x84($a0)
/* 41CC40 802A7EB0 8C62000C */ lw $v0, 0xC($v1)
/* 41CC44 802A7EB4 AC820294 */ sw $v0, 0x294($a0)
/* 41CC48 802A7EB8 80C20015 */ lb $v0, 0x15($a2)
/* 41CC4C 802A7EBC AC820210 */ sw $v0, 0x210($a0)
/* 41CC50 802A7EC0 82A20012 */ lb $v0, 0x12($s5)
/* 41CC54 802A7EC4 54450006 */ bnel $v0, $a1, .L802A7EE0_7AF880
/* 41CC58 802A7EC8 24840004 */ addiu $a0, $a0, 0x4
/* 41CC5C 802A7ECC 00E91021 */ addu $v0, $a3, $t1
/* 41CC60 802A7ED0 AC80018C */ sw $zero, 0x18C($a0)
/* 41CC64 802A7ED4 8C420000 */ lw $v0, 0x0($v0)
/* 41CC68 802A7ED8 AC820000 */ sw $v0, 0x0($a0)
/* 41CC6C 802A7EDC 24840004 */ addiu $a0, $a0, 0x4
.L802A7EE0_7AF880:
/* 41CC70 802A7EE0 26940001 */ addiu $s4, $s4, 0x1
/* 41CC74 802A7EE4 26730001 */ addiu $s3, $s3, 0x1
.L802A7EE8_7AF888:
/* 41CC78 802A7EE8 2A62000C */ slti $v0, $s3, 0xC
/* 41CC7C 802A7EEC 1440FFE0 */ bnez $v0, .L802A7E70_7AF810
/* 41CC80 802A7EF0 25080004 */ addiu $t0, $t0, 0x4
/* 41CC84 802A7EF4 82C20051 */ lb $v0, 0x51($s6)
/* 41CC88 802A7EF8 04420001 */ bltzl $v0, .L802A7F00_7AF8A0
/* 41CC8C 802A7EFC A2C00051 */ sb $zero, 0x51($s6)
.L802A7F00_7AF8A0:
/* 41CC90 802A7F00 82A30012 */ lb $v1, 0x12($s5)
/* 41CC94 802A7F04 24020001 */ addiu $v0, $zero, 0x1
/* 41CC98 802A7F08 3C01802B */ lui $at, %hi(D_802ACFE8)
/* 41CC9C 802A7F0C AC22CFE8 */ sw $v0, %lo(D_802ACFE8)($at)
/* 41CCA0 802A7F10 3C01802B */ lui $at, %hi(D_802ACFF4)
/* 41CCA4 802A7F14 AC34CFF4 */ sw $s4, %lo(D_802ACFF4)($at)
/* 41CCA8 802A7F18 00031880 */ sll $v1, $v1, 2
/* 41CCAC 802A7F1C 3C028009 */ lui $v0, %hi(D_8008EEF0)
/* 41CCB0 802A7F20 00431021 */ addu $v0, $v0, $v1
/* 41CCB4 802A7F24 8C42EEF0 */ lw $v0, %lo(D_8008EEF0)($v0)
/* 41CCB8 802A7F28 3C04802B */ lui $a0, %hi(D_802ACCD0)
/* 41CCBC 802A7F2C 2484CCD0 */ addiu $a0, $a0, %lo(D_802ACCD0)
/* 41CCC0 802A7F30 AC80031C */ sw $zero, 0x31C($a0)
/* 41CCC4 802A7F34 AC800320 */ sw $zero, 0x320($a0)
/* 41CCC8 802A7F38 2442FFFF */ addiu $v0, $v0, -0x1
/* 41CCCC 802A7F3C 0C03D44F */ jal create_battle_popup_menu
/* 41CCD0 802A7F40 AC820328 */ sw $v0, 0x328($a0)
/* 41CCD4 802A7F44 0C03D4AF */ jal func_800F52BC
/* 41CCD8 802A7F48 00000000 */ nop
/* 41CCDC 802A7F4C 080AA04F */ j .L802A813C_7AFADC
/* 41CCE0 802A7F50 2402001F */ addiu $v0, $zero, 0x1F
glabel .L802A7F54_7AF8F4
/* 41CCE4 802A7F54 3C03802B */ lui $v1, %hi(D_802ACFFC)
/* 41CCE8 802A7F58 8463CFFC */ lh $v1, %lo(D_802ACFFC)($v1)
/* 41CCEC 802A7F5C 2402FFFF */ addiu $v0, $zero, -0x1
/* 41CCF0 802A7F60 10620076 */ beq $v1, $v0, .L802A813C_7AFADC
/* 41CCF4 802A7F64 24020024 */ addiu $v0, $zero, 0x24
/* 41CCF8 802A7F68 10600076 */ beqz $v1, .L802A8144_7AFAE4
/* 41CCFC 802A7F6C 240200FF */ addiu $v0, $zero, 0xFF
/* 41CD00 802A7F70 1462000C */ bne $v1, $v0, .L802A7FA4_7AF944
/* 41CD04 802A7F74 24020022 */ addiu $v0, $zero, 0x22
/* 41CD08 802A7F78 0C0A91F8 */ jal func_802A47E0_7AC180
/* 41CD0C 802A7F7C 00000000 */ nop
/* 41CD10 802A7F80 240200C9 */ addiu $v0, $zero, 0xC9
.L802A7F84_7AF924:
/* 41CD14 802A7F84 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41CD18 802A7F88 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 41CD1C 802A7F8C 0C0A9662 */ jal func_802A5988_7AD328
/* 41CD20 802A7F90 00000000 */ nop
/* 41CD24 802A7F94 0C0A9662 */ jal func_802A5988_7AD328
/* 41CD28 802A7F98 00000000 */ nop
/* 41CD2C 802A7F9C 080AA051 */ j .L802A8144_7AFAE4
/* 41CD30 802A7FA0 00000000 */ nop
.L802A7FA4_7AF944:
/* 41CD34 802A7FA4 24030023 */ addiu $v1, $zero, 0x23
/* 41CD38 802A7FA8 A6C2006C */ sh $v0, 0x6C($s6)
/* 41CD3C 802A7FAC 3C02802B */ lui $v0, %hi(D_802ACFFC)
/* 41CD40 802A7FB0 8442CFFC */ lh $v0, %lo(D_802ACFFC)($v0)
/* 41CD44 802A7FB4 3C0E802B */ lui $t6, %hi(D_802ACCD0)
/* 41CD48 802A7FB8 25CECCD0 */ addiu $t6, $t6, %lo(D_802ACCD0)
/* 41CD4C 802A7FBC A6C3006E */ sh $v1, 0x6E($s6)
/* 41CD50 802A7FC0 2442FFFF */ addiu $v0, $v0, -0x1
/* 41CD54 802A7FC4 00021080 */ sll $v0, $v0, 2
/* 41CD58 802A7FC8 01C21021 */ addu $v0, $t6, $v0
/* 41CD5C 802A7FCC 9043010B */ lbu $v1, 0x10B($v0)
/* 41CD60 802A7FD0 24020005 */ addiu $v0, $zero, 0x5
/* 41CD64 802A7FD4 A2C20178 */ sb $v0, 0x178($s6)
/* 41CD68 802A7FD8 24020037 */ addiu $v0, $zero, 0x37
/* 41CD6C 802A7FDC A6C2017C */ sh $v0, 0x17C($s6)
/* 41CD70 802A7FE0 24020002 */ addiu $v0, $zero, 0x2
/* 41CD74 802A7FE4 AEC20184 */ sw $v0, 0x184($s6)
/* 41CD78 802A7FE8 A2C301AC */ sb $v1, 0x1AC($s6)
/* 41CD7C 802A7FEC 00031E00 */ sll $v1, $v1, 24
/* 41CD80 802A7FF0 3C02802B */ lui $v0, %hi(D_802ACFFD)
/* 41CD84 802A7FF4 9042CFFD */ lbu $v0, %lo(D_802ACFFD)($v0)
/* 41CD88 802A7FF8 00031E03 */ sra $v1, $v1, 24
/* 41CD8C 802A7FFC A6C3017A */ sh $v1, 0x17A($s6)
/* 41CD90 802A8000 2442FFFF */ addiu $v0, $v0, -0x1
/* 41CD94 802A8004 0C03C4EC */ jal hide_popup_menu
/* 41CD98 802A8008 A2C20051 */ sb $v0, 0x51($s6)
/* 41CD9C 802A800C 0C0A91C6 */ jal func_802A4718_7AC0B8
/* 41CDA0 802A8010 00000000 */ nop
/* 41CDA4 802A8014 0C0A840C */ jal func_802A1030_7A89D0
/* 41CDA8 802A8018 00000000 */ nop
/* 41CDAC 802A801C 080AA04F */ j .L802A813C_7AFADC
/* 41CDB0 802A8020 24020020 */ addiu $v0, $zero, 0x20
glabel .L802A8024_7AF9C4
/* 41CDB4 802A8024 8EC20214 */ lw $v0, 0x214($s6)
/* 41CDB8 802A8028 30424000 */ andi $v0, $v0, 0x4000
/* 41CDBC 802A802C 1040000D */ beqz $v0, .L802A8064_7AFA04
/* 41CDC0 802A8030 00000000 */ nop
/* 41CDC4 802A8034 3C02802B */ lui $v0, %hi(D_802ACFFC)
/* 41CDC8 802A8038 8442CFFC */ lh $v0, %lo(D_802ACFFC)($v0)
/* 41CDCC 802A803C 14400009 */ bnez $v0, .L802A8064_7AFA04
/* 41CDD0 802A8040 00000000 */ nop
/* 41CDD4 802A8044 0C03C5B3 */ jal func_800F16CC
/* 41CDD8 802A8048 00000000 */ nop
/* 41CDDC 802A804C 0C0A9284 */ jal func_802A4A10_7AC3B0
/* 41CDE0 802A8050 00000000 */ nop
/* 41CDE4 802A8054 0C0A8426 */ jal func_802A1098_7A8A38
/* 41CDE8 802A8058 00000000 */ nop
/* 41CDEC 802A805C 080AA04F */ j .L802A813C_7AFADC
/* 41CDF0 802A8060 24020021 */ addiu $v0, $zero, 0x21
.L802A8064_7AFA04:
/* 41CDF4 802A8064 0C0A9295 */ jal func_802A4A54_7AC3F4
/* 41CDF8 802A8068 00000000 */ nop
/* 41CDFC 802A806C 0C0A846C */ jal func_802A11B0_7A8B50
/* 41CE00 802A8070 00000000 */ nop
/* 41CE04 802A8074 10400033 */ beqz $v0, .L802A8144_7AFAE4
/* 41CE08 802A8078 00000000 */ nop
/* 41CE0C 802A807C 86C2006E */ lh $v0, 0x6E($s6)
/* 41CE10 802A8080 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41CE14 802A8084 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 41CE18 802A8088 0C0A9662 */ jal func_802A5988_7AD328
/* 41CE1C 802A808C 00000000 */ nop
/* 41CE20 802A8090 0C090464 */ jal func_80241190
/* 41CE24 802A8094 2404001D */ addiu $a0, $zero, 0x1D
/* 41CE28 802A8098 080AA051 */ j .L802A8144_7AFAE4
/* 41CE2C 802A809C 00000000 */ nop
glabel .L802A80A0_7AFA40
/* 41CE30 802A80A0 0C0A9295 */ jal func_802A4A54_7AC3F4
/* 41CE34 802A80A4 00000000 */ nop
/* 41CE38 802A80A8 0C0A846C */ jal func_802A11B0_7A8B50
/* 41CE3C 802A80AC 00000000 */ nop
/* 41CE40 802A80B0 10400024 */ beqz $v0, .L802A8144_7AFAE4
/* 41CE44 802A80B4 2402001F */ addiu $v0, $zero, 0x1F
/* 41CE48 802A80B8 080AA04F */ j .L802A813C_7AFADC
/* 41CE4C 802A80BC 00000000 */ nop
glabel .L802A80C0_7AFA60
/* 41CE50 802A80C0 0C03C5B3 */ jal func_800F16CC
/* 41CE54 802A80C4 00000000 */ nop
/* 41CE58 802A80C8 0C0A9284 */ jal func_802A4A10_7AC3B0
/* 41CE5C 802A80CC 00000000 */ nop
/* 41CE60 802A80D0 0C0A8426 */ jal func_802A1098_7A8A38
/* 41CE64 802A80D4 00000000 */ nop
/* 41CE68 802A80D8 080AA04F */ j .L802A813C_7AFADC
/* 41CE6C 802A80DC 24020021 */ addiu $v0, $zero, 0x21
glabel .L802A80E0_7AFA80
/* 41CE70 802A80E0 0C03C54E */ jal destroy_popup_menu
/* 41CE74 802A80E4 00000000 */ nop
glabel .L802A80E8_7AFA88
/* 41CE78 802A80E8 0C0A91CB */ jal func_802A472C_7AC0CC
/* 41CE7C 802A80EC 00000000 */ nop
/* 41CE80 802A80F0 080A9CB5 */ j .L802A72D4_7AEC74
/* 41CE84 802A80F4 00000000 */ nop
glabel .L802A80F8_7AFA98
/* 41CE88 802A80F8 24040006 */ addiu $a0, $zero, 0x6
/* 41CE8C 802A80FC 0C051F9F */ jal set_window_update
/* 41CE90 802A8100 24050002 */ addiu $a1, $zero, 0x2
/* 41CE94 802A8104 24040007 */ addiu $a0, $zero, 0x7
/* 41CE98 802A8108 0C051F9F */ jal set_window_update
/* 41CE9C 802A810C 24050002 */ addiu $a1, $zero, 0x2
D_802A8110_7AFAB0:
/* 41CEA0 802A8110 3C03802B */ lui $v1, %hi(D_802ACFFC)
/* 41CEA4 802A8114 8463CFFC */ lh $v1, %lo(D_802ACFFC)($v1)
/* 41CEA8 802A8118 2402FFFF */ addiu $v0, $zero, -0x1
/* 41CEAC 802A811C 10620009 */ beq $v1, $v0, .L802A8144_7AFAE4
/* 41CEB0 802A8120 24040006 */ addiu $a0, $zero, 0x6
/* 41CEB4 802A8124 0C051F9F */ jal set_window_update
/* 41CEB8 802A8128 24050009 */ addiu $a1, $zero, 0x9
/* 41CEBC 802A812C 24040007 */ addiu $a0, $zero, 0x7
D_802A8130_7AFAD0:
/* 41CEC0 802A8130 0C051F9F */ jal set_window_update
/* 41CEC4 802A8134 24050009 */ addiu $a1, $zero, 0x9
/* 41CEC8 802A8138 2402001F */ addiu $v0, $zero, 0x1F
.L802A813C_7AFADC:
/* 41CECC 802A813C 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41CED0 802A8140 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
glabel .L802A8144_7AFAE4
/* 41CED4 802A8144 8FBF0034 */ lw $ra, 0x34($sp)
/* 41CED8 802A8148 8FBE0030 */ lw $fp, 0x30($sp)
/* 41CEDC 802A814C 8FB7002C */ lw $s7, 0x2C($sp)
/* 41CEE0 802A8150 8FB60028 */ lw $s6, 0x28($sp)
/* 41CEE4 802A8154 8FB50024 */ lw $s5, 0x24($sp)
/* 41CEE8 802A8158 8FB40020 */ lw $s4, 0x20($sp)
/* 41CEEC 802A815C 8FB3001C */ lw $s3, 0x1C($sp)
/* 41CEF0 802A8160 8FB20018 */ lw $s2, 0x18($sp)
/* 41CEF4 802A8164 8FB10014 */ lw $s1, 0x14($sp)
/* 41CEF8 802A8168 8FB00010 */ lw $s0, 0x10($sp)
/* 41CEFC 802A816C D7B80048 */ ldc1 $f24, 0x48($sp)
/* 41CF00 802A8170 D7B60040 */ ldc1 $f22, 0x40($sp)
/* 41CF04 802A8174 D7B40038 */ ldc1 $f20, 0x38($sp)
/* 41CF08 802A8178 03E00008 */ jr $ra
/* 41CF0C 802A817C 27BD0050 */ addiu $sp, $sp, 0x50
### DECOMPILED C INSTRUCTIONS:
void btl_state_update_player_menu(void) {
BattleStatus* battleStatus = &gBattleStatus;
PlayerData* playerData = &gPlayerData;
Actor* playerActor = battleStatus->playerActor;
Actor* partnerActor = battleStatus->partnerActor;
PopupMenu* popup = &D_802ACCD0;
MoveData* moveData;
s32 entryIdx, initialPos;
s32 i;
s32 submenuResult;
s32 jumpTargetCount, hammerTargetCount, jumpChance;
ItemData* itemData;
s32 starBeamLevel;
s32 currentSubmenu;
s32 currentSubmenu2;
IconHudScriptPair* hudScriptPair;
PartnerPopupProperties* prop;
switch (gBattleSubState) {
case BTL_SUBSTATE_PLAYER_MENU_INIT:
battleStatus->moveCategory = BTL_MENU_TYPE_INVALID;
battleStatus->selectedMoveID = 0;
battleStatus->currentAttackElement = 0;
if (!can_btl_state_update_switch_to_player()) {
btl_set_state(BATTLE_STATE_END_PLAYER_TURN);
return;
}
btl_cam_use_preset(BTL_CAM_DEFAULT);
btl_cam_move(10);
if (!(battleStatus->flags1 & BS_FLAGS1_PLAYER_IN_BACK)) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CREATE_MAIN_MENU;
} else {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_PERFORM_SWAP;
partnerActor->state.currentPos.x = partnerActor->homePos.x;
partnerActor->state.currentPos.z = partnerActor->homePos.z;
partnerActor->state.goalPos.x = playerActor->homePos.x;
partnerActor->state.goalPos.z = playerActor->homePos.z;
partnerActor->state.moveTime = 4;
partnerActor->state.angle = 0.0f;
}
break;
case BTL_SUBSTATE_PLAYER_MENU_PERFORM_SWAP:
if (partnerActor->state.moveTime != 0) {
partnerActor->currentPos.x += (partnerActor->state.goalPos.x - partnerActor->currentPos.x) / partnerActor->state.moveTime;
partnerActor->currentPos.z += (partnerActor->state.goalPos.z - partnerActor->currentPos.z) / partnerActor->state.moveTime;
playerActor->currentPos.x += (partnerActor->state.currentPos.x - playerActor->currentPos.x) / partnerActor->state.moveTime;
playerActor->currentPos.z += (partnerActor->state.currentPos.z - playerActor->currentPos.z) / partnerActor->state.moveTime;
}
partnerActor->currentPos.z -= sin_rad(DEG_TO_RAD(partnerActor->state.angle)) * 16.0f;
partnerActor->yaw = clamp_angle(-partnerActor->state.angle);
playerActor->currentPos.z += sin_rad(DEG_TO_RAD(partnerActor->state.angle)) * 16.0f;
playerActor->yaw = clamp_angle(-partnerActor->state.angle);
partnerActor->state.angle += 90.0f;
if (partnerActor->state.moveTime != 0) {
partnerActor->state.moveTime--;
} else {
partnerActor->currentPos.x = partnerActor->state.goalPos.x;
partnerActor->currentPos.z = partnerActor->state.goalPos.z;
playerActor->currentPos.x = partnerActor->state.currentPos.x;
playerActor->currentPos.z = partnerActor->state.currentPos.z;
partnerActor->homePos.x = partnerActor->currentPos.x;
partnerActor->homePos.z = partnerActor->currentPos.z;
playerActor->homePos.x = playerActor->currentPos.x;
playerActor->homePos.z = playerActor->currentPos.z;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CREATE_MAIN_MENU;
battleStatus->flags1 &= ~BS_FLAGS1_PLAYER_IN_BACK;
}
break;
}
switch (gBattleSubState) {
case BTL_SUBSTATE_PLAYER_MENU_CREATE_MAIN_MENU:
gBattleStatus.flags1 |= BS_FLAGS1_MENU_OPEN;
playerActor->flags &= ~ACTOR_FLAG_4000000;
playerActor->flags |= ACTOR_FLAG_8000000;
if (partnerActor != NULL) {
partnerActor->flags |= ACTOR_FLAG_4000000;
partnerActor->flags |= ACTOR_FLAG_8000000;
}
func_80263268();
func_80263300();
btl_init_menu_boots();
btl_init_menu_hammer();
if (player_team_is_ability_active(playerActor, ABILITY_BERSERKER)) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_BERSERKER_1;
break;
}
entryIdx = 0;
initialPos = 2;
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_MAIN] < 0) {
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_MAIN] = 0;
}
// strategies menu category
battle_menu_submenuIDs[entryIdx] = BTL_MENU_TYPE_STRATEGIES;
BattleMenu_OptionEnabled[entryIdx] = TRUE;
BattleMenu_HudScripts[entryIdx] = battle_menu_StrategiesHudScript.enabled;
BattleMenu_TitleMessages[entryIdx] = BattleMenu_CenteredMessages[BTL_MENU_TYPE_STRATEGIES];
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_TUTORIAL || gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE) {
BattleMenu_TitleMessages[entryIdx] = MSG_Menus_EndTraining_Centered;
}
battle_menu_isMessageDisabled[entryIdx] = 0;
if (!(battleStatus->enabledMenusFlags & BTL_MENU_ENABLED_STRATEGIES)) {
BattleMenu_HudScripts[entryIdx] = battle_menu_StrategiesHudScript.disabled;
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW;
}
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_MAIN] == BTL_MENU_TYPE_STRATEGIES) {
initialPos = entryIdx;
}
entryIdx++;
// items menu category
if (battleStatus->menuStatus[0] >= 0) {
BattleMenu_HudScripts[entryIdx] = battle_menu_ItemHudScripts.enabled;
battle_menu_submenuIDs[entryIdx] = BTL_MENU_TYPE_ITEMS;
BattleMenu_OptionEnabled[entryIdx] = TRUE;
BattleMenu_TitleMessages[entryIdx] = BattleMenu_CenteredMessages[BTL_MENU_TYPE_ITEMS];
if(battleStatus->menuStatus[0] == 0) {
BattleMenu_HudScripts[entryIdx] = battle_menu_ItemHudScripts.disabled;
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_NO_ITEM_TARGET;
}
if (!(battleStatus->enabledMenusFlags & BTL_MENU_ENABLED_ITEMS)) {
BattleMenu_HudScripts[entryIdx] = battle_menu_ItemHudScripts.disabled;
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW;
}
if (battleStatus->itemLossTurns >= 0) {
BattleMenu_HudScripts[entryIdx] = battle_menu_ItemHudScripts.disabled;
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW;
}
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_MAIN] == BTL_MENU_TYPE_ITEMS) {
initialPos = entryIdx;
}
entryIdx++;
}
// jump menu category
BattleMenu_HudScripts[entryIdx] = battle_menu_JumpHudScripts[playerData->bootsLevel + 1].enabled;
battle_menu_submenuIDs[entryIdx] = BTL_MENU_TYPE_JUMP;
BattleMenu_OptionEnabled[entryIdx] = TRUE;
BattleMenu_TitleMessages[entryIdx] = BattleMenu_CenteredMessages[BTL_MENU_TYPE_JUMP];
if (battleStatus->menuStatus[1] <= 0) {
BattleMenu_HudScripts[entryIdx] = battle_menu_JumpHudScripts[0].enabled;
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_NO_JUMP_TARGET;
}
if (!(battleStatus->enabledMenusFlags & BTL_MENU_ENABLED_JUMP)) {
BattleMenu_HudScripts[entryIdx] = battle_menu_JumpHudScripts[0].disabled;
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW;
}
if (battleStatus->jumpLossTurns >= 0) {
BattleMenu_HudScripts[entryIdx] = battle_menu_JumpHudScripts[0].disabled;
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW;
}
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_MAIN] == BTL_MENU_TYPE_JUMP) {
initialPos = entryIdx;
}
entryIdx++;
// hammer menu category
if (playerData->hammerLevel >= 0) {
BattleMenu_HudScripts[entryIdx] = battle_menu_HammerHudScripts[playerData->hammerLevel + 1].enabled;
battle_menu_submenuIDs[entryIdx] = BTL_MENU_TYPE_SMASH;
BattleMenu_OptionEnabled[entryIdx] = TRUE;
BattleMenu_TitleMessages[entryIdx] = BattleMenu_CenteredMessages[BTL_MENU_TYPE_SMASH];
if (battleStatus->menuStatus[2] <= 0) {
BattleMenu_HudScripts[entryIdx] = battle_menu_HammerHudScripts[0].enabled;
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_NO_HAMMER_TARGET;
}
if (!(battleStatus->enabledMenusFlags & BTL_MENU_ENABLED_SMASH)) {
BattleMenu_HudScripts[entryIdx] = battle_menu_HammerHudScripts[0].disabled;
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW;
}
if (battleStatus->hammerLossTurns >= 0) {
BattleMenu_HudScripts[entryIdx] = battle_menu_HammerHudScripts[0].disabled;
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW;
}
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_MAIN] == BTL_MENU_TYPE_SMASH) {
initialPos = entryIdx;
}
entryIdx++;
}
// star powers menu category
if (playerData->maxStarPower != 0) {
BattleMenu_HudScripts[entryIdx] = battle_menu_StarPowerHudScripts.enabled;
battle_menu_submenuIDs[entryIdx] = BTL_MENU_TYPE_STAR_POWERS;
BattleMenu_OptionEnabled[entryIdx] = TRUE;
BattleMenu_TitleMessages[entryIdx] = BattleMenu_CenteredMessages[BTL_MENU_TYPE_STAR_POWERS];
battle_menu_isMessageDisabled[entryIdx] = 0;
if (!(battleStatus->enabledMenusFlags & BTL_MENU_ENABLED_STAR_POWERS)) {
BattleMenu_HudScripts[entryIdx] = battle_menu_StarPowerHudScripts.disabled;
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW;
}
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_MAIN] == BTL_MENU_TYPE_STAR_POWERS) {
initialPos = entryIdx;
}
entryIdx++;
}
BattleMenu_NumOptions = entryIdx;
D_802AD0A8 = 0;
D_802AD0B0 = initialPos;
D_802AD100 = 2 - initialPos;
if (func_802A58D0()) {
BattleMenu_ShowSwapIcons = TRUE;
} else {
BattleMenu_ShowSwapIcons = FALSE;
}
btl_main_menu_init();
D_802ACC60 = 8;
D_802ACC6C = 0;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHOOSE_CATEGORY;
break;
case BTL_SUBSTATE_PLAYER_MENU_CHOOSE_CATEGORY:
if (battleStatus->hustleTurns != 0) {
set_animation(ACTOR_PLAYER, 0, ANIM_Mario1_ThinkingRun);
} else {
set_animation(ACTOR_PLAYER, 0, get_player_anim_for_status(STATUS_KEY_THINKING));
}
submenuResult = btl_main_menu_update();
if (D_802ACC6C != 0) {
D_802ACC6C--;
} else if (!(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE) && (gGameStatusPtr->pressedButtons[0] & BUTTON_Z)) {
if (func_802A58D0() && battleStatus->hustleTurns != 1) {
sfx_play_sound(SOUND_F);
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_MAIN] = battle_menu_submenuIDs[BattleMenu_CurPos + BattleMenu_HomePos];
btl_main_menu_destroy();
btl_set_state(BATTLE_STATE_SWITCH_TO_PARTNER);
} else if (partnerActor != NULL && !(partnerActor->flags & BS_FLAGS1_YIELD_TURN) && battleStatus->hustleTurns != 1) {
sfx_play_sound(SOUND_MENU_ERROR);
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_SHOW_CANT_SWAP;
}
break;
}
if (D_802ACC60 != 0) {
D_802ACC60--;
} else if (submenuResult != 0) {
set_animation(ACTOR_PLAYER, 0, ANIM_Mario1_Walk);
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_MAIN] = battleStatus->currentSubmenu = battle_menu_submenuIDs[submenuResult - 1];
for (i = 0; i < ARRAY_COUNT(battleStatus->submenuMoves); i++) {
battleStatus->submenuMoves[i] = 0;
battleStatus->submenuIcons[0] = 0; ///< @bug ?
battleStatus->submenuStatus[i] = 0;
}
switch (battleStatus->currentSubmenu) {
case BTL_MENU_TYPE_ITEMS:
battleStatus->submenuMoves[0] = D_802AB4F0[8];
battleStatus->submenuIcons[0] = ITEM_PARTNER_ATTACK;
battleStatus->submenuStatus[0] = 1;
for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
if (playerData->invItems[i] == 0) {
continue;
}
itemData = &gItemTable[playerData->invItems[i]];
battleStatus->moveCategory = BTL_MENU_TYPE_ITEMS;
battleStatus->moveArgument = playerData->invItems[i];
battleStatus->currentTargetListFlags = itemData->targetFlags;
player_create_target_list(playerActor);
}
entryIdx = 1;
for (i = 0; i < ARRAY_COUNT(playerData->equippedBadges); i++) {
if (playerData->equippedBadges[i] != 0) {
s32 moveID = gItemTable[playerData->equippedBadges[i]].moveID;
moveData = &gMoveTable[moveID];
if (moveData->category == D_802AB4F0[battleStatus->currentSubmenu]) {
battleStatus->submenuMoves[entryIdx] = moveID;
battleStatus->submenuIcons[entryIdx] = playerData->equippedBadges[i];
battleStatus->submenuStatus[entryIdx] = 1;
if (playerData->curFP < moveData->costFP) {
battleStatus->submenuStatus[entryIdx] = 0;
}
entryIdx++;
}
}
}
battleStatus->submenuMoveCount = entryIdx;
if (entryIdx == 1) {
battleStatus->submenuMoveCount = 0;
}
break;
do { // required to match
case BTL_MENU_TYPE_SMASH:
btl_init_menu_hammer();
if (battleStatus->submenuMoveCount == 1) {
battleStatus->submenuMoveCount = 0;
}
if (battleStatus->actionCommandMode == 2) {
battleStatus->submenuMoveCount = 0;
}
break;
case BTL_MENU_TYPE_JUMP:
btl_init_menu_boots();
if (battleStatus->submenuMoveCount == 1) {
battleStatus->submenuMoveCount = 0;
}
if (battleStatus->actionCommandMode == 2) {
battleStatus->submenuMoveCount = 0;
}
break;
case BTL_MENU_TYPE_STAR_POWERS:
battleStatus->submenuMoves[0] = MOVE_FOCUS;
battleStatus->submenuIcons[0] = ITEM_PARTNER_ATTACK;
battleStatus->submenuStatus[0] = 1;
entryIdx = 1;
initialPos = 8;
for (i = 0; i < playerData->maxStarPower; i++) {
moveData = &gMoveTable[MOVE_REFRESH + i];
battleStatus->submenuMoves[entryIdx] = MOVE_REFRESH + i;
battleStatus->submenuIcons[entryIdx] = 0;
battleStatus->moveCategory = BTL_MENU_TYPE_STAR_POWERS;
battleStatus->moveArgument = MOVE_REFRESH + i;
battleStatus->currentTargetListFlags = moveData->flags;
player_create_target_list(playerActor);
battleStatus->submenuStatus[entryIdx] = 1;
if (playerActor->targetListLength == 0) {
battleStatus->submenuStatus[entryIdx] = -2;
}
if (playerData->specialBarsFilled / 256 < moveData->costFP) {
battleStatus->submenuStatus[entryIdx] = 0;
}
if (gBattleStatus.flags2 & BS_FLAGS2_NO_TARGET_AVAILABLE) {
battleStatus->submenuStatus[entryIdx] = -1;
}
entryIdx++;
}
starBeamLevel = playerData->starBeamLevel;
if (starBeamLevel == 1) {
do {
moveData = &gMoveTable[MOVE_STAR_BEAM];
battleStatus->submenuMoves[entryIdx] = MOVE_STAR_BEAM;
battleStatus->submenuIcons[entryIdx] = 0;
battleStatus->moveCategory = BTL_MENU_TYPE_STAR_POWERS;
battleStatus->moveArgument = MOVE_REFRESH + i;
battleStatus->currentTargetListFlags = moveData->flags;
player_create_target_list(playerActor);
battleStatus->submenuStatus[entryIdx] = starBeamLevel;
if (playerActor->targetListLength == 0) {
battleStatus->submenuStatus[entryIdx] = -2;
}
if (playerData->specialBarsFilled / 256 < moveData->costFP) {
battleStatus->submenuStatus[entryIdx] = 0;
}
if (gBattleStatus.flags2 & BS_FLAGS2_NO_TARGET_AVAILABLE) {
battleStatus->submenuStatus[entryIdx] = -1;
}
entryIdx++;
} while (0);
}
if (playerData->starBeamLevel == 2) {
do {
do {
moveData = &gMoveTable[MOVE_PEACH_BEAM];
battleStatus->submenuMoves[entryIdx] = MOVE_PEACH_BEAM;
battleStatus->submenuIcons[entryIdx] = 0;
battleStatus->moveCategory = BTL_MENU_TYPE_STAR_POWERS;
battleStatus->moveArgument = MOVE_REFRESH + i;
battleStatus->currentTargetListFlags = moveData->flags;
player_create_target_list(playerActor);
battleStatus->submenuStatus[entryIdx] = 1;
if (playerActor->targetListLength == 0) {
battleStatus->submenuStatus[entryIdx] = -2;
}
if (playerData->specialBarsFilled / 256 < moveData->costFP) {
battleStatus->submenuStatus[entryIdx] = 0;
}
if (gBattleStatus.flags2 & BS_FLAGS2_NO_TARGET_AVAILABLE) {
battleStatus->submenuStatus[entryIdx] = -1;
}
entryIdx++;
} while (0);
} while (0); // TODO required to match
}
battleStatus->submenuMoveCount = entryIdx;
break;
} while (0); // TODO required to match
}
currentSubmenu = battleStatus->currentSubmenu;
if (currentSubmenu == BTL_MENU_TYPE_STAR_POWERS) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_1;
btl_state_update_player_menu();
btl_state_update_player_menu();
break;
} else if (currentSubmenu == BTL_MENU_TYPE_STRATEGIES) {
if (battleStatus->actionCommandMode != ACTION_COMMAND_MODE_TUTORIAL && !(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE)) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_BUILD_STRATEGIES;
btl_state_update_player_menu();
btl_state_update_player_menu();
break;
} else {
btl_main_menu_destroy();
battleStatus->moveCategory = currentSubmenu;
battleStatus->moveArgument = 0;
battleStatus->selectedMoveID = 0;
btl_set_state(BATTLE_STATE_PLAYER_MOVE);
break;
}
} else {
if (battleStatus->submenuMoveCount == 0) {
if (currentSubmenu != BTL_MENU_TYPE_ITEMS) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_10;
break;
} else {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_ITEMS_1;
btl_state_update_player_menu();
btl_state_update_player_menu();
break;
}
}
initialPos = 0;
if (currentSubmenu == BTL_MENU_TYPE_JUMP) {
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_JUMP] < 0) {
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_JUMP] = 0;
}
initialPos = battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_JUMP];
}
if (battleStatus->currentSubmenu == BTL_MENU_TYPE_SMASH) {
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_SMASH] < 0) {
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_SMASH] = 0;
}
initialPos = battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_SMASH];
}
if (battleStatus->currentSubmenu == BTL_MENU_TYPE_ITEMS) {
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_ITEMS] < 0) {
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_ITEMS] = 0;
}
initialPos = battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_ITEMS];
}
for (i = 0; i < battleStatus->submenuMoveCount; i++) {
moveData = &gMoveTable[battleStatus->submenuMoves[i]];
itemData = &gItemTable[battleStatus->submenuIcons[i]];
hudScriptPair = &gItemHudScripts[itemData->hudElemID];
BattleMenu_Moves_OptionCantUseMessages[i] = 0;
if (battleStatus->submenuStatus[i] == 0) {
BattleMenu_Moves_OptionCantUseMessages[i] = 0;
}
if (battleStatus->submenuStatus[i] == -1) {
battleStatus->submenuStatus[i] = 0;
BattleMenu_Moves_OptionCantUseMessages[i] = BTL_MSG_CANT_SELECT_NOW;
}
if (battleStatus->submenuStatus[i] == -2) {
battleStatus->submenuStatus[i] = 0;
BattleMenu_Moves_OptionCantUseMessages[i] = BTL_MSG_CANT_SELECT_NOW;
}
if (battleStatus->submenuStatus[i] == -3) {
battleStatus->submenuStatus[i] = 0;
BattleMenu_Moves_OptionCantUseMessages[i] = BTL_MSG_CANT_SELECT_NOW_ALT;
}
battle_menu_moveOptionIconScripts[i] = hudScriptPair->enabled;
if (battleStatus->submenuStatus[i] == 0) {
battle_menu_moveOptionIconScripts[i] = hudScriptPair->disabled;
}
battle_menu_moveOptionDisplayCosts[i] = moveData->costFP;
battle_menu_moveOptionBPCosts[i] = moveData->costBP;
BattleMenu_Moves_OptionSortPriority[i] = 0;
battle_menu_moveOptionDisplayCostReductions[i] = 0;
battle_menu_moveOptionDisplayCostReductionColors[i] = 0;
if (player_team_is_ability_active(playerActor, ABILITY_FLOWER_SAVER)) {
battle_menu_moveOptionDisplayCostReductions[i] += player_team_is_ability_active(playerActor, ABILITY_FLOWER_SAVER);
battle_menu_moveOptionDisplayCostReductionColors[i] = 1;
}
if (player_team_is_ability_active(playerActor, ABILITY_FLOWER_FANATIC)) {
battle_menu_moveOptionDisplayCostReductions[i] += 2 * player_team_is_ability_active(playerActor, ABILITY_FLOWER_FANATIC);
battle_menu_moveOptionDisplayCostReductionColors[i] = 2;
}
BattleMenu_Moves_OptionIndices[i] = i;
BattleMenu_Moves_OptionEnabled[i] = battleStatus->submenuStatus[i];
battle_menu_moveOptionNames[i] = moveData->nameMsg;
BattleMenu_Moves_OptionDescMessages[i] = moveData->shortDescMsg;
}
BattleMenu_UsingSpiritsSubmenu = FALSE;
D_802AD4A8 = initialPos;
BattleMenu_Moves_OptionCount = battleStatus->submenuMoveCount;
func_802A2684();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_2;
break;
}
}
break;
case BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_2:
submenuResult = btl_submenu_moves_update();
if (submenuResult == -1) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_7;
} else if (submenuResult == 0) {
} else if (submenuResult == 255) {
func_802A1050();
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHOOSE_CATEGORY;
btl_state_update_player_menu();
btl_state_update_player_menu();
} else {
battleStatus->unk_49 = BattleMenu_Moves_OptionIndices[submenuResult - 1];
battleStatus->selectedMoveID = battleStatus->submenuMoves[battleStatus->unk_49];
if (battleStatus->currentSubmenu == BTL_MENU_TYPE_JUMP) {
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_JUMP] = battle_menu_moveOptionActive;
}
if (battleStatus->currentSubmenu == BTL_MENU_TYPE_SMASH) {
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_SMASH] = battle_menu_moveOptionActive;
}
currentSubmenu2 = battleStatus->currentSubmenu;
if (battleStatus->currentSubmenu == BTL_MENU_TYPE_ITEMS) {
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_ITEMS] = battle_menu_moveOptionActive;
if (battleStatus->currentSubmenu == currentSubmenu2) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_UNKNOWN_1;
btl_state_update_player_menu();
btl_state_update_player_menu();
break;
}
}
func_802A27D0();
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MOVE_CHOOSE_TARGET;
}
break;
case BTL_SUBSTATE_PLAYER_MENU_MOVE_CHOOSE_TARGET:
submenuResult = btl_submenu_moves_update();
if ((battleStatus->currentButtonsPressed & BUTTON_B) && submenuResult == 0) {
func_802A2AB8();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_4;
break;
}
if (btl_main_menu_update() == 0) {
break;
}
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_MOVE_TARGET_CANCEL;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_MOVE_TARGET_CHOSEN;
battleStatus->selectedMoveID = battleStatus->submenuMoves[battleStatus->unk_49];
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->submenuMoves[battleStatus->unk_49]].flags;
currentSubmenu = battleStatus->currentSubmenu;
switch (currentSubmenu) {
case BTL_MENU_TYPE_JUMP:
battleStatus->moveCategory = BTL_MENU_TYPE_JUMP;
battleStatus->moveArgument = playerData->bootsLevel;
btl_set_state(BATTLE_STATE_SELECT_TARGET);
break;
case BTL_MENU_TYPE_SMASH:
battleStatus->moveCategory = BTL_MENU_TYPE_SMASH;
battleStatus->moveArgument = playerData->hammerLevel;
btl_set_state(BATTLE_STATE_SELECT_TARGET);
break;
case BTL_MENU_TYPE_DEFEND:
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
btl_state_update_player_menu();
battleStatus->moveCategory = BTL_MENU_TYPE_DEFEND;
btl_set_state(BATTLE_STATE_DEFEND);
break;
}
break;
case BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_4:
btl_submenu_moves_update();
if (btl_main_menu_update() == 0) {
break;
}
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_2;
break;
case BTL_SUBSTATE_PLAYER_MENU_MOVE_TARGET_CANCEL:
func_802A2AB8();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_4;
break;
case BTL_SUBSTATE_PLAYER_MENU_MOVE_TARGET_CHOSEN:
func_802A27E4();
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_7:
if (btl_submenu_moves_update() != -1) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_2;
}
break;
case BTL_SUBSTATE_PLAYER_MENU_MAIN_SHOW_CANT_SWAP:
if (gBattleStatus.flags2 & BS_FLAGS2_4) {
btl_show_variable_battle_message(BTL_MSG_CANT_SWITCH, 60, 0);
} else {
btl_show_variable_battle_message(BTL_MSG_CANT_MOVE, 60, playerData->currentPartner);
}
D_802AD607 = 1;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_AWAIT_CANT_SWAP;
break;
case BTL_SUBSTATE_PLAYER_MENU_MAIN_AWAIT_CANT_SWAP:
if (btl_is_popup_displayed()) {
break;
}
D_802ACC6C = 4;
D_802AD607 = 0;
D_802ACC60 = 0;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHOOSE_CATEGORY;
break;
case BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_10:
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_11;
break;
case BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_11:
submenuResult = btl_main_menu_update();
if ((battleStatus->currentButtonsPressed & BUTTON_B) && submenuResult == 0) {
func_802A1078();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_12;
} else if (submenuResult != 0) {
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_13;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_14;
switch (battleStatus->currentSubmenu) {
case BTL_MENU_TYPE_JUMP:
battleStatus->moveCategory = BTL_MENU_TYPE_JUMP;
battleStatus->moveArgument = playerData->bootsLevel;
battleStatus->selectedMoveID = playerData->bootsLevel + MOVE_JUMP1;
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags;
btl_set_state(BATTLE_STATE_SELECT_TARGET);
break;
case BTL_MENU_TYPE_SMASH:
battleStatus->moveCategory = BTL_MENU_TYPE_SMASH;
battleStatus->moveArgument = playerData->hammerLevel;
battleStatus->selectedMoveID = playerData->hammerLevel + MOVE_HAMMER1;
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags;
btl_set_state(BATTLE_STATE_SELECT_TARGET);
break;
default:
goto CASE_C; // TODO find better match
}
}
break;
CASE_C:
case BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_12:
if (btl_main_menu_update() == 0) {
break;
}
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHOOSE_CATEGORY;
break;
case BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_13:
func_802A1078();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_12;
break;
case BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_14:
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PLAYER_MENU_UNKNOWN_1:
if (battleStatus->selectedMoveID == MOVE_DOUBLE_DIP) {
battleStatus->itemUsesLeft = 2;
}
if (battleStatus->selectedMoveID == MOVE_TRIPLE_DIP) {
battleStatus->itemUsesLeft = 3;
}
entryIdx = 0;
for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
if (playerData->invItems[i] == 0) {
continue;
}
itemData = &gItemTable[playerData->invItems[i]];
hudScriptPair = &gItemHudScripts[itemData->hudElemID];
if (!(itemData->typeFlags & ITEM_TYPE_FLAG_BATTLE_USABLE)) {
continue;
}
battleStatus->moveCategory = BTL_MENU_TYPE_ITEMS;
battleStatus->moveArgument = playerData->invItems[i];
battleStatus->currentTargetListFlags = itemData->targetFlags;
player_create_target_list(playerActor);
popup->ptrIcon[entryIdx] = hudScriptPair->enabled;
popup->userIndex[entryIdx] = playerData->invItems[i];
popup->enabled[entryIdx] = TRUE;
popup->nameMsg[entryIdx] = itemData->nameMsg;
popup->descMsg[entryIdx] = itemData->shortDescMsg;
if (playerActor->targetListLength == 0) {
popup->ptrIcon[entryIdx] = hudScriptPair->disabled;
popup->enabled[entryIdx] = 0;
}
entryIdx++;
}
popup->dipMode = 0;
popup->titleNumber = 0;
if (battleStatus->selectedMoveID == MOVE_DOUBLE_DIP) {
popup->dipMode = 1;
popup->titleNumber = battleStatus->itemUsesLeft;
}
if (battleStatus->selectedMoveID == MOVE_TRIPLE_DIP) {
popup->dipMode = 2;
popup->titleNumber = battleStatus->itemUsesLeft;
}
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP] < 0) {
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP] = 0;
}
popup->popupType = POPUP_MENU_USE_ITEM;
popup->numEntries = entryIdx;
initialPos = battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP];
popup->initialPos = initialPos;
create_battle_popup_menu(popup);
func_800F52BC();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_DIPPING_CHOOSE_TARGET;
break;
case BTL_SUBSTATE_PLAYER_MENU_DIPPING_CHOOSE_TARGET:
if (popup->result != POPUP_RESULT_CHOOSING) {
if (popup->result == POPUP_RESULT_CANCEL) {
func_802A2910();
battleStatus->selectedMoveID = 0;
battleStatus->itemUsesLeft = 0;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_2;
btl_state_update_player_menu();
btl_state_update_player_menu();
} else {
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_DIPPING_TARGET_CANCEL;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_DIPPING_TARGET_CHOSEN;
battleStatus->unk_1AA = popup->userIndex[popup->result - 1];
battleStatus->moveCategory = BTL_MENU_TYPE_ITEMS;
battleStatus->moveArgument = battleStatus->unk_1AA;
battleStatus->currentTargetListFlags = gItemTable[battleStatus->moveArgument].targetFlags | TARGET_FLAG_8000;
battleStatus->currentAttackElement = 0;
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP] = popup->result - 1;
hide_popup_menu();
func_802A27D0();
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_UNKNOWN_3;
}
}
break;
case BTL_SUBSTATE_PLAYER_MENU_UNKNOWN_3:
if ((battleStatus->currentButtonsPressed & BUTTON_B) && popup->result == POPUP_RESULT_CHOOSING) {
func_800F16CC();
func_802A2C58();
func_802A1098();
battleStatus->selectedMoveID = 0;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_UNKNOWN_4;
} else {
btl_submenu_moves_update();
if (btl_main_menu_update()) {
btl_set_state(BATTLE_STATE_SELECT_TARGET);
}
}
break;
case BTL_SUBSTATE_PLAYER_MENU_UNKNOWN_4:
btl_submenu_moves_update();
if (btl_main_menu_update() != 0) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_DIPPING_CHOOSE_TARGET;
}
break;
case BTL_SUBSTATE_PLAYER_MENU_DIPPING_TARGET_CANCEL:
func_800F16CC();
func_802A2C58();
func_802A1098();
btl_submenu_moves_update();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_UNKNOWN_4;
break;
case BTL_SUBSTATE_PLAYER_MENU_DIPPING_TARGET_CHOSEN:
destroy_popup_menu();
func_802A27E4();
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PLAYER_MENU_ITEMS_1:
entryIdx = 0;
for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
if (playerData->invItems[i] == 0) {
continue;
}
itemData = &gItemTable[playerData->invItems[i]];
hudScriptPair = &gItemHudScripts[itemData->hudElemID];
if (!(itemData->typeFlags & ITEM_TYPE_FLAG_BATTLE_USABLE)) {
continue;
}
battleStatus->moveCategory = BTL_MENU_TYPE_ITEMS;
battleStatus->moveArgument = playerData->invItems[i];
battleStatus->currentTargetListFlags = itemData->targetFlags;
player_create_target_list(playerActor);
popup->ptrIcon[entryIdx] = hudScriptPair->enabled;
popup->userIndex[entryIdx] = playerData->invItems[i];
popup->enabled[entryIdx] = 1;
popup->nameMsg[entryIdx] = itemData->nameMsg;
popup->descMsg[entryIdx] = itemData->shortDescMsg;
if (playerActor->targetListLength == 0) {
popup->ptrIcon[entryIdx] = hudScriptPair->disabled;
popup->enabled[entryIdx] = 0;
}
entryIdx++;
}
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP] < 0) {
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP] = 0;
}
initialPos = battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP];
popup->popupType = POPUP_MENU_USE_ITEM;
popup->numEntries = entryIdx;
popup->dipMode = 0;
popup->titleNumber = 0;
popup->initialPos = initialPos;
create_battle_popup_menu(popup);
func_800F52BC();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_ITEMS_2;
break;
case BTL_SUBSTATE_PLAYER_MENU_ITEMS_2:
if (popup->result != POPUP_RESULT_CHOOSING) {
if (popup->result == POPUP_RESULT_CANCEL) {
func_802A1050();
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHOOSE_CATEGORY;
btl_state_update_player_menu();
btl_state_update_player_menu();
} else {
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_ITEMS_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_ITEMS_6;
battleStatus->unk_1AA = popup->userIndex[popup->result - 1];
battleStatus->moveCategory = BTL_MENU_TYPE_ITEMS;
battleStatus->moveArgument = battleStatus->unk_1AA;
battleStatus->selectedMoveID = MOVE_ITEMS;
battleStatus->currentTargetListFlags = gItemTable[battleStatus->moveArgument].targetFlags | TARGET_FLAG_8000;
battleStatus->currentAttackElement = 0;
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP] = popup->result - 1;
hide_popup_menu();
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_ITEMS_3;
}
}
break;
case BTL_SUBSTATE_PLAYER_MENU_ITEMS_3:
if ((battleStatus->currentButtonsPressed & BUTTON_B) && popup->result == POPUP_RESULT_CHOOSING) {
func_800F16CC();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_ITEMS_4;
} else {
if (btl_main_menu_update() != 0) {
btl_set_state(BATTLE_STATE_SELECT_TARGET);
}
}
break;
case BTL_SUBSTATE_PLAYER_MENU_ITEMS_4:
if (btl_main_menu_update() != 0) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_ITEMS_2;
}
break;
case BTL_SUBSTATE_PLAYER_MENU_ITEMS_5:
func_800F16CC();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_ITEMS_4;
break;
case BTL_SUBSTATE_PLAYER_MENU_ITEMS_6:
destroy_popup_menu();
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_1:
for (i = 0; i < battleStatus->submenuMoveCount; i++) {
moveData = &gMoveTable[battleStatus->submenuMoves[i]];
BattleMenu_Moves_OptionCantUseMessages[i] = 0;
if (battleStatus->submenuStatus[i] == 0) {
BattleMenu_Moves_OptionCantUseMessages[i] = 0;
}
if (battleStatus->submenuStatus[i] == -1) {
battleStatus->submenuStatus[i] = 0;
BattleMenu_Moves_OptionCantUseMessages[i] = BTL_MSG_CANT_SELECT_NOW;
}
if (battleStatus->submenuStatus[i] == -2) {
battleStatus->submenuStatus[i] = 0;
BattleMenu_Moves_OptionCantUseMessages[i] = BTL_MSG_CANT_SELECT_NOW;
}
if (!(battleStatus->enabledStarPowersFlags & (1 << i))) {
battleStatus->submenuStatus[i] = 0;
BattleMenu_Moves_OptionCantUseMessages[i] = BTL_MSG_CANT_SELECT_NOW;
}
battle_menu_moveOptionIconScripts[i] = battle_menu_StarPowerMovesHudScripts[2 * STAR_POWER_INDEX(battleStatus->submenuMoves[i]) + 0];
if (battleStatus->submenuStatus[i] == 0) {
battle_menu_moveOptionIconScripts[i] = battle_menu_StarPowerMovesHudScripts[2 * STAR_POWER_INDEX(battleStatus->submenuMoves[i]) + 1];
}
battle_menu_moveOptionDisplayCosts[i] = moveData->costFP;
battle_menu_moveOptionBPCosts[i] = moveData->costBP;
BattleMenu_Moves_OptionSortPriority[i] = 0;
BattleMenu_Moves_OptionIndices[i] = i;
BattleMenu_Moves_OptionEnabled[i] = battleStatus->submenuStatus[i];
battle_menu_moveOptionNames[i] = moveData->nameMsg;
BattleMenu_Moves_OptionDescMessages[i] = moveData->shortDescMsg;
battle_menu_moveOptionDisplayCostReductions[i] = 0;
battle_menu_moveOptionDisplayCostReductionColors[i] = 0;
}
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_STAR_POWER] < 0) {
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_STAR_POWER] = 0;
}
initialPos = battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_STAR_POWER];
BattleMenu_Moves_OptionCount = battleStatus->submenuMoveCount;
D_802AD4A8 = initialPos;
BattleMenu_UsingSpiritsSubmenu = TRUE;
func_802A2684();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_2;
break;
case BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_2:
submenuResult = btl_submenu_moves_update();
if (submenuResult == -1) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_7;
} else if (submenuResult == 0) {
} else if (submenuResult == 255) {
func_802A1050();
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHOOSE_CATEGORY;
btl_state_update_player_menu();
btl_state_update_player_menu();
} else {
battleStatus->unk_49 = BattleMenu_Moves_OptionIndices[submenuResult - 1];
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_STAR_POWER] = battle_menu_moveOptionActive;
func_802A27D0();
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_3;
}
break;
case BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_3:
submenuResult = btl_submenu_moves_update();
if ((battleStatus->currentButtonsPressed & BUTTON_B) && submenuResult == 0) {
func_802A2AB8();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_4;
} else if (btl_main_menu_update() != 0) {
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_6;
battleStatus->moveCategory = BTL_MENU_TYPE_STAR_POWERS;
battleStatus->selectedMoveID = battleStatus->submenuMoves[battleStatus->unk_49];
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->submenuMoves[battleStatus->unk_49]].flags;
battleStatus->moveArgument = battleStatus->unk_49;
if (playerData->starBeamLevel == 2 && battleStatus->moveArgument == 8) {
battleStatus->moveArgument++;
}
btl_set_state(BATTLE_STATE_SELECT_TARGET);
}
break;
case BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_4:
btl_submenu_moves_update();
if (btl_main_menu_update() != 0) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_2;
}
break;
case BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_5:
func_802A2AB8();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_4;
break;
case BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_6:
func_802A27E4();
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_7:
if (btl_submenu_moves_update() != -1) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_2;
}
break;
case BTL_SUBSTATE_PLAYER_MENU_DIPPING_1:
if (!can_btl_state_update_switch_to_player()) {
battleStatus->itemUsesLeft = 1;
btl_set_state(BATTLE_STATE_END_PLAYER_TURN);
} else {
entryIdx = 0;
for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
if (playerData->invItems[i] == 0) {
continue;
}
itemData = &gItemTable[playerData->invItems[i]];
hudScriptPair = &gItemHudScripts[itemData->hudElemID];
if (!(itemData->typeFlags & ITEM_TYPE_FLAG_BATTLE_USABLE)) {
continue;
}
battleStatus->moveCategory = BTL_MENU_TYPE_ITEMS;
battleStatus->moveArgument = playerData->invItems[i];
battleStatus->currentTargetListFlags = itemData->targetFlags;
player_create_target_list(playerActor);
popup->ptrIcon[entryIdx] = hudScriptPair->enabled;
popup->userIndex[entryIdx] = playerData->invItems[i];
popup->enabled[entryIdx] = TRUE;
popup->nameMsg[entryIdx] = itemData->nameMsg;
popup->descMsg[entryIdx] = itemData->shortDescMsg;
if (playerActor->targetListLength == 0) {
popup->ptrIcon[entryIdx] = hudScriptPair->disabled;
popup->enabled[entryIdx] = FALSE;
}
entryIdx++;
}
if (entryIdx == 0) {
battleStatus->itemUsesLeft = 1;
btl_set_state(BATTLE_STATE_END_PLAYER_TURN);
} else {
popup->popupType = POPUP_MENU_USE_ITEM;
if (battleStatus->selectedMoveID == MOVE_DOUBLE_DIP) {
popup->popupType += POPUP_MENU_DOUBLE_DIP;
popup->dipMode = 1;
popup->titleNumber = battleStatus->itemUsesLeft;
}
if (battleStatus->selectedMoveID == MOVE_TRIPLE_DIP) {
popup->popupType += POPUP_MENU_TRIPLE_DIP;
popup->dipMode = 2;
popup->titleNumber = battleStatus->itemUsesLeft;
}
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP] < 0) {
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP] = 0;
}
popup->numEntries = entryIdx;
initialPos = battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP];
popup->initialPos = initialPos;
create_battle_popup_menu(popup);
func_800F52BC();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_DIPPING_2;
}
}
break;
case BTL_SUBSTATE_PLAYER_MENU_DIPPING_2:
if (popup->result != POPUP_RESULT_CHOOSING) {
if (popup->result == POPUP_RESULT_CANCEL) {
battleStatus->itemUsesLeft = 1;
btl_set_state(BATTLE_STATE_END_PLAYER_TURN);
} else {
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_DIPPING_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_DIPPING_6;
battleStatus->unk_1AA = popup->userIndex[popup->result - 1];
battleStatus->moveCategory = BTL_MENU_TYPE_ITEMS;
battleStatus->moveArgument = battleStatus->unk_1AA;
battleStatus->currentTargetListFlags = gItemTable[battleStatus->moveArgument].targetFlags | TARGET_FLAG_8000;
battleStatus->currentAttackElement = 0;
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP] = popup->result - 1;
hide_popup_menu();
D_802ACC60 = 5;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_DIPPING_3;
}
}
break;
case BTL_SUBSTATE_PLAYER_MENU_DIPPING_3:
if (D_802ACC60 != 0) {
D_802ACC60--;
} else {
btl_set_state(BATTLE_STATE_SELECT_TARGET);
}
break;
case BTL_SUBSTATE_PLAYER_MENU_DIPPING_4:
if (D_802ACC60 != 0) {
D_802ACC60--;
} else {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_DIPPING_2;
}
break;
case BTL_SUBSTATE_PLAYER_MENU_DIPPING_5:
func_800F16CC();
D_802ACC60 = 5;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_DIPPING_4;
break;
case BTL_SUBSTATE_PLAYER_MENU_DIPPING_6:
destroy_popup_menu();
break;
case BTL_SUBSTATE_PLAYER_MENU_BERSERKER_1:
if (playerData->bootsLevel >= 0) {
battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_JUMP5].flags;
player_create_target_list(playerActor);
jumpTargetCount = playerActor->targetListLength;
} else {
jumpTargetCount = 0;
}
if (playerData->hammerLevel >= 0) {
battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_HAMMER5].flags;
player_create_target_list(playerActor);
hammerTargetCount = playerActor->targetListLength;
} else {
hammerTargetCount = 0;
}
if (jumpTargetCount <= 0 && hammerTargetCount <= 0) {
battleStatus->moveCategory = BTL_MENU_TYPE_DO_NOTHING;
battleStatus->unk_95 = 0;
btl_set_state(BATTLE_STATE_END_PLAYER_TURN);
} else {
jumpChance = 50;
if (jumpTargetCount <= 0) {
jumpChance = 0;
}
if (hammerTargetCount <= 0) {
jumpChance = 101;
}
if (rand_int(100) < jumpChance) {
battleStatus->selectedMoveID = MOVE_UNUSED_JUMP5;
battleStatus->moveCategory = BTL_MENU_TYPE_JUMP;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_JUMP5].flags;
battleStatus->moveArgument = playerData->bootsLevel;
player_create_target_list(playerActor);
} else {
battleStatus->selectedMoveID = MOVE_UNUSED_HAMMER5;
battleStatus->moveCategory = BTL_MENU_TYPE_SMASH;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_HAMMER5].flags;
battleStatus->moveArgument = playerData->hammerLevel;
player_create_target_list(playerActor);
}
btl_set_state(BATTLE_STATE_PLAYER_MOVE);
}
break;
case BTL_SUBSTATE_PLAYER_MENU_BUILD_STRATEGIES:
entryIdx = 0;
func_80263268();
if (battleStatus->changePartnerAllowed >= 0) {
D_802AD678[0] = BTL_MENU_TYPE_CHANGE_PARTNER;
D_802AD658[0] = BattleMenu_LeftJustMessages[BTL_MENU_TYPE_CHANGE_PARTNER];
D_802AD640[0] = battle_menu_PartnerHudScripts[playerData->currentPartner];
D_802AD690[0] = 1;
D_802AD6C0[0] = MSG_Menus_Action_ChangePartner;
if (battleStatus->changePartnerAllowed <= 0) {
D_802AD640[0] = battle_menu_DisabledPartnerHudScripts[playerData->currentPartner];
D_802AD690[0] = 0;
D_802AD6A8[0] = 0;
}
entryIdx++;
}
D_802AD640[entryIdx] = battle_menu_DoNothingHudScripts.enabled;
D_802AD678[entryIdx] = BTL_MENU_TYPE_DO_NOTHING;
D_802AD690[entryIdx] = 1;
D_802AD658[entryIdx] = BattleMenu_LeftJustMessages[BTL_MENU_TYPE_DO_NOTHING];
D_802AD6C0[entryIdx] = MSG_Menus_Action_DoNothing;
entryIdx++;
D_802AD640[entryIdx] = battle_menu_FleeHudScripts.enabled;
D_802AD678[entryIdx] = BTL_MENU_TYPE_RUN_AWAY;
D_802AD690[entryIdx] = 1;
D_802AD658[entryIdx] = BattleMenu_LeftJustMessages[BTL_MENU_TYPE_RUN_AWAY];
D_802AD6C0[entryIdx] = MSG_Menus_Action_RunAway;
if (!(gBattleStatus.flags2 & BS_FLAGS2_CANT_FLEE)) {
D_802AD640[entryIdx] = battle_menu_FleeHudScripts.disabled;
D_802AD690[entryIdx] = 0;
D_802AD6A8[entryIdx] = 1;
}
entryIdx++;
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_STRATEGY] < 0) {
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_STRATEGY] = 0;
}
initialPos = battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_STRATEGY];
D_802AD66C = entryIdx;
D_802AD670 = initialPos;
func_802A45D8();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_2;
break;
case BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_2:
submenuResult = func_802A4A54();
if (submenuResult == -1) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_8;
} else if (submenuResult == 0) {
} else if (submenuResult == 255) {
func_802A1050();
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHOOSE_CATEGORY;
btl_state_update_player_menu();
btl_state_update_player_menu();
} else {
battleStatus->currentSubmenu = D_802AD678[submenuResult - 1];
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_STRATEGY] = submenuResult - 1;
if (battleStatus->currentSubmenu == 5) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_1;
btl_state_update_player_menu();
btl_state_update_player_menu();
} else {
func_802A4718();
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_3;
}
}
break;
case BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_3:
submenuResult = func_802A4A54();
if ((battleStatus->currentButtonsPressed & BUTTON_B) && submenuResult == 0) {
func_802A48FC();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_4;
} else if (btl_main_menu_update() != 0) {
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_6;
switch (battleStatus->currentSubmenu) {
case 3:
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_6;
btl_state_update_player_menu();
battleStatus->moveCategory = BTL_MENU_TYPE_RUN_AWAY;
battleStatus->selectedMoveID = MOVE_UNUSED_39;
btl_set_state(BATTLE_STATE_RUN_AWAY);
break;
case 9:
battleStatus->hustleTurns = 0;
gBattleStatus.flags1 &= ~BS_FLAGS1_HUSTLED;
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
btl_state_update_player_menu();
btl_set_state(BATTLE_STATE_END_PLAYER_TURN);
break;
case 4:
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_6;
btl_state_update_player_menu();
battleStatus->selectedMoveID = MOVE_UNUSED_DEFEND_PLUS;
battleStatus->moveCategory = BTL_MENU_TYPE_DEFEND;
btl_set_state(BATTLE_STATE_DEFEND);
break;
case 10:
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_6;
btl_state_update_player_menu();
btl_set_state(BATTLE_STATE_SWITCH_TO_PARTNER);
break;
}
}
break;
case BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_4:
func_802A4A54();
if (btl_main_menu_update() != 0) {
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHOOSE_CATEGORY;
}
break;
case BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_5:
func_802A48FC();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_4;
break;
case BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_6:
func_802A472C();
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_8:
if (func_802A4A54() != -1) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_2;
}
break;
case BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_1:
entryIdx = 0;
for (i = 1; i < ARRAY_COUNT(playerData->partners); i++) {
s32 partnerId = D_8008EEC0[i];
if (playerData->partners[partnerId].enabled) {
prop = &gPartnerPopupProperties[partnerId];
popup->ptrIcon[entryIdx] = battle_menu_PartnerHudScripts[partnerId];
popup->userIndex[entryIdx] = partnerId;
popup->enabled[entryIdx] = 1;
popup->nameMsg[entryIdx] = prop->nameMsg;
popup->descMsg[entryIdx] = prop->battleDescMsg;
popup->value[entryIdx] = playerData->partners[partnerId].level;
if (playerData->currentPartner == partnerId) {
popup->enabled[entryIdx] = 0;
popup->ptrIcon[entryIdx] = battle_menu_DisabledPartnerHudScripts[partnerId];
}
entryIdx++;
}
}
if (battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_PARTNER] < 0) {
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_PARTNER] = 0;
}
popup->popupType = POPUP_MENU_SWITCH_PARTNER;
popup->numEntries = entryIdx;
popup->initialPos = D_8008EEF0[playerData->currentPartner] - 1;
popup->dipMode = 0;
popup->titleNumber = 0;
create_battle_popup_menu(popup);
func_800F52BC();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_2;
break;
case BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_2:
if (popup->result == POPUP_RESULT_MINUS_1) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_7;
} else if (popup->result != POPUP_RESULT_CHOOSING) {
if (popup->result == POPUP_RESULT_CANCEL) {
func_802A47E0();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_2;
btl_state_update_player_menu();
btl_state_update_player_menu();
} else {
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_6;
battleStatus->unk_1AC = popup->userIndex[popup->result - 1];
battleStatus->moveCategory = BTL_MENU_TYPE_CHANGE_PARTNER;
battleStatus->selectedMoveID = MOVE_UNUSED_37;
battleStatus->currentTargetListFlags = TARGET_FLAG_2;
battleStatus->moveArgument = battleStatus->unk_1AC;
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_PARTNER] = popup->result - 1;
hide_popup_menu();
func_802A4718();
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_3;
}
}
break;
case BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_3:
if ((battleStatus->currentButtonsPressed & BUTTON_B) && popup->result == POPUP_RESULT_CHOOSING) {
func_800F16CC();
func_802A4A10();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_4;
} else {
func_802A4A54();
if (btl_main_menu_update() != 0) {
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
btl_state_update_player_menu();
btl_set_state(BATTLE_STATE_CHANGE_PARTNER);
}
}
break;
case BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_4:
func_802A4A54();
if (btl_main_menu_update() != 0) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_2;
}
break;
case BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_5:
func_800F16CC();
func_802A4A10();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_4;
break;
case BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_6:
destroy_popup_menu();
func_802A472C();
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_7:
set_window_update(WINDOW_ID_6, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_7, WINDOW_UPDATE_HIDE);
if (popup->result != POPUP_RESULT_MINUS_1) {
set_window_update(WINDOW_ID_6, WINDOW_UPDATE_9);
set_window_update(WINDOW_ID_7, WINDOW_UPDATE_9);
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_2;
}
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_801180E8
/* AE7E8 801180E8 27BDFF88 */ addiu $sp, $sp, -0x78
/* AE7EC 801180EC 0080602D */ daddu $t4, $a0, $zero
/* AE7F0 801180F0 00A0C02D */ daddu $t8, $a1, $zero
/* AE7F4 801180F4 AFBE0070 */ sw $fp, 0x70($sp)
/* AE7F8 801180F8 00C0F02D */ daddu $fp, $a2, $zero
/* AE7FC 801180FC AFB7006C */ sw $s7, 0x6C($sp)
/* AE800 80118100 AFB60068 */ sw $s6, 0x68($sp)
/* AE804 80118104 AFB50064 */ sw $s5, 0x64($sp)
/* AE808 80118108 AFB40060 */ sw $s4, 0x60($sp)
/* AE80C 8011810C AFB3005C */ sw $s3, 0x5C($sp)
/* AE810 80118110 AFB20058 */ sw $s2, 0x58($sp)
/* AE814 80118114 AFB10054 */ sw $s1, 0x54($sp)
/* AE818 80118118 AFB00050 */ sw $s0, 0x50($sp)
/* AE81C 8011811C 95990022 */ lhu $t9, 0x22($t4)
/* AE820 80118120 8FA6008C */ lw $a2, 0x8C($sp)
/* AE824 80118124 93B00093 */ lbu $s0, 0x93($sp)
/* AE828 80118128 93B40097 */ lbu $s4, 0x97($sp)
/* AE82C 8011812C 97B5009A */ lhu $s5, 0x9A($sp)
/* AE830 80118130 97B6009E */ lhu $s6, 0x9E($sp)
/* AE834 80118134 AFA00030 */ sw $zero, 0x30($sp)
/* AE838 80118138 2B220003 */ slti $v0, $t9, 0x3
/* AE83C 8011813C A3B00007 */ sb $s0, 0x7($sp)
/* AE840 80118140 A3B4000F */ sb $s4, 0xF($sp)
/* AE844 80118144 A7B50016 */ sh $s5, 0x16($sp)
/* AE848 80118148 A7B6001E */ sh $s6, 0x1E($sp)
/* AE84C 8011814C 95920026 */ lhu $s2, 0x26($t4)
/* AE850 80118150 14400028 */ bnez $v0, .L801181F4
/* AE854 80118154 0000882D */ daddu $s1, $zero, $zero
/* AE858 80118158 2B220005 */ slti $v0, $t9, 0x5
/* AE85C 8011815C 54400023 */ bnel $v0, $zero, .L801181EC
/* AE860 80118160 24100002 */ addiu $s0, $zero, 0x2
/* AE864 80118164 2B220009 */ slti $v0, $t9, 0x9
/* AE868 80118168 5440001E */ bnel $v0, $zero, .L801181E4
/* AE86C 8011816C 24160003 */ addiu $s6, $zero, 0x3
/* AE870 80118170 2B220011 */ slti $v0, $t9, 0x11
/* AE874 80118174 54400019 */ bnel $v0, $zero, .L801181DC
/* AE878 80118178 24150004 */ addiu $s5, $zero, 0x4
/* AE87C 8011817C 2B220021 */ slti $v0, $t9, 0x21
/* AE880 80118180 5440001D */ bnel $v0, $zero, .L801181F8
/* AE884 80118184 24140005 */ addiu $s4, $zero, 0x5
/* AE888 80118188 2B220041 */ slti $v0, $t9, 0x41
/* AE88C 8011818C 54400011 */ bnel $v0, $zero, .L801181D4
/* AE890 80118190 24100006 */ addiu $s0, $zero, 0x6
/* AE894 80118194 2B220081 */ slti $v0, $t9, 0x81
/* AE898 80118198 5440000C */ bnel $v0, $zero, .L801181CC
/* AE89C 8011819C 24160007 */ addiu $s6, $zero, 0x7
/* AE8A0 801181A0 2B220101 */ slti $v0, $t9, 0x101
/* AE8A4 801181A4 14400007 */ bnez $v0, .L801181C4
/* AE8A8 801181A8 24150008 */ addiu $s5, $zero, 0x8
/* AE8AC 801181AC 2410000A */ addiu $s0, $zero, 0xA
/* AE8B0 801181B0 2B220201 */ slti $v0, $t9, 0x201
/* AE8B4 801181B4 10400011 */ beqz $v0, .L801181FC
/* AE8B8 801181B8 AFB00048 */ sw $s0, 0x48($sp)
/* AE8BC 801181BC 0804607E */ j .L801181F8
/* AE8C0 801181C0 24140009 */ addiu $s4, $zero, 0x9
.L801181C4:
/* AE8C4 801181C4 0804607F */ j .L801181FC
/* AE8C8 801181C8 AFB50048 */ sw $s5, 0x48($sp)
.L801181CC:
/* AE8CC 801181CC 0804607F */ j .L801181FC
/* AE8D0 801181D0 AFB60048 */ sw $s6, 0x48($sp)
.L801181D4:
/* AE8D4 801181D4 0804607F */ j .L801181FC
/* AE8D8 801181D8 AFB00048 */ sw $s0, 0x48($sp)
.L801181DC:
/* AE8DC 801181DC 0804607F */ j .L801181FC
/* AE8E0 801181E0 AFB50048 */ sw $s5, 0x48($sp)
.L801181E4:
/* AE8E4 801181E4 0804607F */ j .L801181FC
/* AE8E8 801181E8 AFB60048 */ sw $s6, 0x48($sp)
.L801181EC:
/* AE8EC 801181EC 0804607F */ j .L801181FC
/* AE8F0 801181F0 AFB00048 */ sw $s0, 0x48($sp)
.L801181F4:
/* AE8F4 801181F4 24140001 */ addiu $s4, $zero, 0x1
.L801181F8:
/* AE8F8 801181F8 AFB40048 */ sw $s4, 0x48($sp)
.L801181FC:
/* AE8FC 801181FC 2A420003 */ slti $v0, $s2, 0x3
/* AE900 80118200 14400028 */ bnez $v0, .L801182A4
/* AE904 80118204 24160001 */ addiu $s6, $zero, 0x1
/* AE908 80118208 2A420005 */ slti $v0, $s2, 0x5
/* AE90C 8011820C 14400023 */ bnez $v0, .L8011829C
/* AE910 80118210 24150002 */ addiu $s5, $zero, 0x2
/* AE914 80118214 2A420009 */ slti $v0, $s2, 0x9
/* AE918 80118218 5440001E */ bnel $v0, $zero, .L80118294
/* AE91C 8011821C 24140003 */ addiu $s4, $zero, 0x3
/* AE920 80118220 2A420011 */ slti $v0, $s2, 0x11
/* AE924 80118224 14400019 */ bnez $v0, .L8011828C
/* AE928 80118228 24100004 */ addiu $s0, $zero, 0x4
/* AE92C 8011822C 2A420021 */ slti $v0, $s2, 0x21
/* AE930 80118230 1440001C */ bnez $v0, .L801182A4
/* AE934 80118234 24160005 */ addiu $s6, $zero, 0x5
/* AE938 80118238 2A420041 */ slti $v0, $s2, 0x41
/* AE93C 8011823C 14400011 */ bnez $v0, .L80118284
/* AE940 80118240 24150006 */ addiu $s5, $zero, 0x6
/* AE944 80118244 2A420081 */ slti $v0, $s2, 0x81
/* AE948 80118248 5440000C */ bnel $v0, $zero, .L8011827C
/* AE94C 8011824C 24140007 */ addiu $s4, $zero, 0x7
/* AE950 80118250 2A420101 */ slti $v0, $s2, 0x101
/* AE954 80118254 14400007 */ bnez $v0, .L80118274
/* AE958 80118258 24100008 */ addiu $s0, $zero, 0x8
/* AE95C 8011825C 2415000A */ addiu $s5, $zero, 0xA
/* AE960 80118260 2A420201 */ slti $v0, $s2, 0x201
/* AE964 80118264 10400010 */ beqz $v0, .L801182A8
/* AE968 80118268 AFB50044 */ sw $s5, 0x44($sp)
/* AE96C 8011826C 080460A9 */ j .L801182A4
/* AE970 80118270 24160009 */ addiu $s6, $zero, 0x9
.L80118274:
/* AE974 80118274 080460AA */ j .L801182A8
/* AE978 80118278 AFB00044 */ sw $s0, 0x44($sp)
.L8011827C:
/* AE97C 8011827C 080460AA */ j .L801182A8
/* AE980 80118280 AFB40044 */ sw $s4, 0x44($sp)
.L80118284:
/* AE984 80118284 080460AA */ j .L801182A8
/* AE988 80118288 AFB50044 */ sw $s5, 0x44($sp)
.L8011828C:
/* AE98C 8011828C 080460AA */ j .L801182A8
/* AE990 80118290 AFB00044 */ sw $s0, 0x44($sp)
.L80118294:
/* AE994 80118294 080460AA */ j .L801182A8
/* AE998 80118298 AFB40044 */ sw $s4, 0x44($sp)
.L8011829C:
/* AE99C 8011829C 080460AA */ j .L801182A8
/* AE9A0 801182A0 AFB50044 */ sw $s5, 0x44($sp)
.L801182A4:
/* AE9A4 801182A4 AFB60044 */ sw $s6, 0x44($sp)
.L801182A8:
/* AE9A8 801182A8 9183002D */ lbu $v1, 0x2D($t4)
/* AE9AC 801182AC 9582002E */ lhu $v0, 0x2E($t4)
/* AE9B0 801182B0 95930020 */ lhu $s3, 0x20($t4)
/* AE9B4 801182B4 3069000F */ andi $t1, $v1, 0xF
/* AE9B8 801182B8 00021202 */ srl $v0, $v0, 8
/* AE9BC 801182BC 3057000F */ andi $s7, $v0, 0xF
/* AE9C0 801182C0 9582002C */ lhu $v0, 0x2C($t4)
/* AE9C4 801182C4 9183002B */ lbu $v1, 0x2B($t4)
/* AE9C8 801182C8 00021202 */ srl $v0, $v0, 8
/* AE9CC 801182CC 3045000F */ andi $a1, $v0, 0xF
/* AE9D0 801182D0 9182002F */ lbu $v0, 0x2F($t4)
/* AE9D4 801182D4 3068000F */ andi $t0, $v1, 0xF
/* AE9D8 801182D8 00021300 */ sll $v0, $v0, 12
/* AE9DC 801182DC AFA2002C */ sw $v0, 0x2C($sp)
/* AE9E0 801182E0 918B0029 */ lbu $t3, 0x29($t4)
/* AE9E4 801182E4 95900024 */ lhu $s0, 0x24($t4)
/* AE9E8 801182E8 2A620003 */ slti $v0, $s3, 0x3
/* AE9EC 801182EC 1440001B */ bnez $v0, .L8011835C
/* AE9F0 801182F0 AFB00040 */ sw $s0, 0x40($sp)
/* AE9F4 801182F4 2A620005 */ slti $v0, $s3, 0x5
/* AE9F8 801182F8 14400019 */ bnez $v0, .L80118360
/* AE9FC 801182FC 240D0002 */ addiu $t5, $zero, 0x2
/* AEA00 80118300 2A620009 */ slti $v0, $s3, 0x9
/* AEA04 80118304 14400016 */ bnez $v0, .L80118360
/* AEA08 80118308 240D0003 */ addiu $t5, $zero, 0x3
/* AEA0C 8011830C 2A620011 */ slti $v0, $s3, 0x11
/* AEA10 80118310 14400013 */ bnez $v0, .L80118360
/* AEA14 80118314 240D0004 */ addiu $t5, $zero, 0x4
/* AEA18 80118318 2A620021 */ slti $v0, $s3, 0x21
/* AEA1C 8011831C 14400010 */ bnez $v0, .L80118360
/* AEA20 80118320 240D0005 */ addiu $t5, $zero, 0x5
/* AEA24 80118324 2A620041 */ slti $v0, $s3, 0x41
/* AEA28 80118328 1440000D */ bnez $v0, .L80118360
/* AEA2C 8011832C 240D0006 */ addiu $t5, $zero, 0x6
/* AEA30 80118330 2A620081 */ slti $v0, $s3, 0x81
/* AEA34 80118334 1440000A */ bnez $v0, .L80118360
/* AEA38 80118338 240D0007 */ addiu $t5, $zero, 0x7
/* AEA3C 8011833C 2A620101 */ slti $v0, $s3, 0x101
/* AEA40 80118340 14400007 */ bnez $v0, .L80118360
/* AEA44 80118344 240D0008 */ addiu $t5, $zero, 0x8
/* AEA48 80118348 2A620201 */ slti $v0, $s3, 0x201
/* AEA4C 8011834C 10400004 */ beqz $v0, .L80118360
/* AEA50 80118350 240D000A */ addiu $t5, $zero, 0xA
/* AEA54 80118354 080460D8 */ j .L80118360
/* AEA58 80118358 240D0009 */ addiu $t5, $zero, 0x9
.L8011835C:
/* AEA5C 8011835C 240D0001 */ addiu $t5, $zero, 0x1
.L80118360:
/* AEA60 80118360 8FB40040 */ lw $s4, 0x40($sp)
/* AEA64 80118364 2A820003 */ slti $v0, $s4, 0x3
/* AEA68 80118368 1440001A */ bnez $v0, .L801183D4
/* AEA6C 8011836C 240E0001 */ addiu $t6, $zero, 0x1
/* AEA70 80118370 2A820005 */ slti $v0, $s4, 0x5
/* AEA74 80118374 14400017 */ bnez $v0, .L801183D4
/* AEA78 80118378 240E0002 */ addiu $t6, $zero, 0x2
/* AEA7C 8011837C 2A820009 */ slti $v0, $s4, 0x9
/* AEA80 80118380 14400014 */ bnez $v0, .L801183D4
/* AEA84 80118384 240E0003 */ addiu $t6, $zero, 0x3
/* AEA88 80118388 2A820011 */ slti $v0, $s4, 0x11
/* AEA8C 8011838C 14400011 */ bnez $v0, .L801183D4
/* AEA90 80118390 240E0004 */ addiu $t6, $zero, 0x4
/* AEA94 80118394 2A820021 */ slti $v0, $s4, 0x21
/* AEA98 80118398 1440000E */ bnez $v0, .L801183D4
/* AEA9C 8011839C 240E0005 */ addiu $t6, $zero, 0x5
/* AEAA0 801183A0 2A820041 */ slti $v0, $s4, 0x41
/* AEAA4 801183A4 1440000B */ bnez $v0, .L801183D4
/* AEAA8 801183A8 240E0006 */ addiu $t6, $zero, 0x6
/* AEAAC 801183AC 2A820081 */ slti $v0, $s4, 0x81
/* AEAB0 801183B0 14400008 */ bnez $v0, .L801183D4
/* AEAB4 801183B4 240E0007 */ addiu $t6, $zero, 0x7
/* AEAB8 801183B8 2A820101 */ slti $v0, $s4, 0x101
/* AEABC 801183BC 14400005 */ bnez $v0, .L801183D4
/* AEAC0 801183C0 240E0008 */ addiu $t6, $zero, 0x8
/* AEAC4 801183C4 2A820201 */ slti $v0, $s4, 0x201
/* AEAC8 801183C8 10400002 */ beqz $v0, .L801183D4
/* AEACC 801183CC 240E000A */ addiu $t6, $zero, 0xA
/* AEAD0 801183D0 240E0009 */ addiu $t6, $zero, 0x9
.L801183D4:
/* AEAD4 801183D4 9584002C */ lhu $a0, 0x2C($t4)
/* AEAD8 801183D8 00041102 */ srl $v0, $a0, 4
/* AEADC 801183DC 3042000F */ andi $v0, $v0, 0xF
/* AEAE0 801183E0 AFA20024 */ sw $v0, 0x24($sp)
/* AEAE4 801183E4 9583002E */ lhu $v1, 0x2E($t4)
/* AEAE8 801183E8 9582002A */ lhu $v0, 0x2A($t4)
/* AEAEC 801183EC 00042302 */ srl $a0, $a0, 12
/* AEAF0 801183F0 AFA4004C */ sw $a0, 0x4C($sp)
/* AEAF4 801183F4 00031B02 */ srl $v1, $v1, 12
/* AEAF8 801183F8 00021102 */ srl $v0, $v0, 4
/* AEAFC 801183FC 3042000F */ andi $v0, $v0, 0xF
/* AEB00 80118400 AFA20020 */ sw $v0, 0x20($sp)
/* AEB04 80118404 24020003 */ addiu $v0, $zero, 0x3
/* AEB08 80118408 15620003 */ bne $t3, $v0, .L80118418
/* AEB0C 8011840C AFA30028 */ sw $v1, 0x28($sp)
/* AEB10 80118410 0007A82B */ sltu $s5, $zero, $a3
/* AEB14 80118414 AFB50030 */ sw $s5, 0x30($sp)
.L80118418:
/* AEB18 80118418 14E00003 */ bnez $a3, .L80118428
/* AEB1C 8011841C 34168000 */ ori $s6, $zero, 0x8000
/* AEB20 80118420 50C000A1 */ beql $a2, $zero, .L801186A8
/* AEB24 80118424 AFA00034 */ sw $zero, 0x34($sp)
.L80118428:
/* AEB28 80118428 10E0004C */ beqz $a3, .L8011855C
/* AEB2C 8011842C AFB60034 */ sw $s6, 0x34($sp)
/* AEB30 80118430 14A0001B */ bnez $a1, .L801184A0
/* AEB34 80118434 24020001 */ addiu $v0, $zero, 0x1
/* AEB38 80118438 8F020000 */ lw $v0, 0x0($t8)
/* AEB3C 8011843C 0040182D */ daddu $v1, $v0, $zero
/* AEB40 80118440 24420008 */ addiu $v0, $v0, 0x8
/* AEB44 80118444 AF020000 */ sw $v0, 0x0($t8)
/* AEB48 80118448 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* AEB4C 8011844C AC620000 */ sw $v0, 0x0($v1)
/* AEB50 80118450 AC670004 */ sw $a3, 0x4($v1)
/* AEB54 80118454 8F020000 */ lw $v0, 0x0($t8)
/* AEB58 80118458 3C04F500 */ lui $a0, (0xF5000100 >> 16)
/* AEB5C 8011845C 0040182D */ daddu $v1, $v0, $zero
/* AEB60 80118460 24420008 */ addiu $v0, $v0, 0x8
/* AEB64 80118464 AF020000 */ sw $v0, 0x0($t8)
/* AEB68 80118468 3C02E800 */ lui $v0, (0xE8000000 >> 16)
/* AEB6C 8011846C AC620000 */ sw $v0, 0x0($v1)
/* AEB70 80118470 AC600004 */ sw $zero, 0x4($v1)
/* AEB74 80118474 8F020000 */ lw $v0, 0x0($t8)
/* AEB78 80118478 34840100 */ ori $a0, $a0, (0xF5000100 & 0xFFFF)
/* AEB7C 8011847C 0040182D */ daddu $v1, $v0, $zero
/* AEB80 80118480 24420008 */ addiu $v0, $v0, 0x8
/* AEB84 80118484 AF020000 */ sw $v0, 0x0($t8)
/* AEB88 80118488 3C020700 */ lui $v0, (0x7000000 >> 16)
/* AEB8C 8011848C AC640000 */ sw $a0, 0x0($v1)
/* AEB90 80118490 AC620004 */ sw $v0, 0x4($v1)
/* AEB94 80118494 8F020000 */ lw $v0, 0x0($t8)
/* AEB98 80118498 08046142 */ j .L80118508
/* AEB9C 8011849C 3C040703 */ lui $a0, (0x703C000 >> 16)
.L801184A0:
/* AEBA0 801184A0 14A2002E */ bne $a1, $v0, .L8011855C
/* AEBA4 801184A4 3C04F500 */ lui $a0, (0xF5000100 >> 16)
/* AEBA8 801184A8 8F020000 */ lw $v0, 0x0($t8)
/* AEBAC 801184AC 0040182D */ daddu $v1, $v0, $zero
/* AEBB0 801184B0 24420008 */ addiu $v0, $v0, 0x8
/* AEBB4 801184B4 AF020000 */ sw $v0, 0x0($t8)
/* AEBB8 801184B8 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* AEBBC 801184BC AC620000 */ sw $v0, 0x0($v1)
/* AEBC0 801184C0 AC670004 */ sw $a3, 0x4($v1)
/* AEBC4 801184C4 8F020000 */ lw $v0, 0x0($t8)
/* AEBC8 801184C8 0040182D */ daddu $v1, $v0, $zero
/* AEBCC 801184CC 24420008 */ addiu $v0, $v0, 0x8
/* AEBD0 801184D0 AF020000 */ sw $v0, 0x0($t8)
/* AEBD4 801184D4 3C02E800 */ lui $v0, (0xE8000000 >> 16)
/* AEBD8 801184D8 AC620000 */ sw $v0, 0x0($v1)
/* AEBDC 801184DC AC600004 */ sw $zero, 0x4($v1)
/* AEBE0 801184E0 8F020000 */ lw $v0, 0x0($t8)
/* AEBE4 801184E4 34840100 */ ori $a0, $a0, (0xF5000100 & 0xFFFF)
/* AEBE8 801184E8 0040182D */ daddu $v1, $v0, $zero
/* AEBEC 801184EC 24420008 */ addiu $v0, $v0, 0x8
/* AEBF0 801184F0 AF020000 */ sw $v0, 0x0($t8)
/* AEBF4 801184F4 3C020700 */ lui $v0, (0x7000000 >> 16)
/* AEBF8 801184F8 AC640000 */ sw $a0, 0x0($v1)
/* AEBFC 801184FC AC620004 */ sw $v0, 0x4($v1)
/* AEC00 80118500 8F020000 */ lw $v0, 0x0($t8)
/* AEC04 80118504 3C04073F */ lui $a0, (0x73FC000 >> 16)
.L80118508:
/* AEC08 80118508 0040182D */ daddu $v1, $v0, $zero
/* AEC0C 8011850C 24420008 */ addiu $v0, $v0, 0x8
/* AEC10 80118510 AF020000 */ sw $v0, 0x0($t8)
/* AEC14 80118514 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* AEC18 80118518 AC620000 */ sw $v0, 0x0($v1)
/* AEC1C 8011851C AC600004 */ sw $zero, 0x4($v1)
/* AEC20 80118520 8F020000 */ lw $v0, 0x0($t8)
/* AEC24 80118524 3484C000 */ ori $a0, $a0, (0x73FC000 & 0xFFFF)
/* AEC28 80118528 0040182D */ daddu $v1, $v0, $zero
/* AEC2C 8011852C 24420008 */ addiu $v0, $v0, 0x8
/* AEC30 80118530 AF020000 */ sw $v0, 0x0($t8)
/* AEC34 80118534 3C02F000 */ lui $v0, (0xF0000000 >> 16)
/* AEC38 80118538 AC620000 */ sw $v0, 0x0($v1)
/* AEC3C 8011853C AC640004 */ sw $a0, 0x4($v1)
/* AEC40 80118540 8F020000 */ lw $v0, 0x0($t8)
/* AEC44 80118544 0040182D */ daddu $v1, $v0, $zero
/* AEC48 80118548 24420008 */ addiu $v0, $v0, 0x8
/* AEC4C 8011854C AF020000 */ sw $v0, 0x0($t8)
/* AEC50 80118550 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* AEC54 80118554 AC620000 */ sw $v0, 0x0($v1)
/* AEC58 80118558 AC600004 */ sw $zero, 0x4($v1)
.L8011855C:
/* AEC5C 8011855C 10C00052 */ beqz $a2, .L801186A8
/* AEC60 80118560 00000000 */ nop
/* AEC64 80118564 8FB0004C */ lw $s0, 0x4C($sp)
/* AEC68 80118568 1600001F */ bnez $s0, .L801185E8
/* AEC6C 8011856C 24020001 */ addiu $v0, $zero, 0x1
/* AEC70 80118570 8F020000 */ lw $v0, 0x0($t8)
/* AEC74 80118574 0040182D */ daddu $v1, $v0, $zero
/* AEC78 80118578 24420008 */ addiu $v0, $v0, 0x8
/* AEC7C 8011857C AF020000 */ sw $v0, 0x0($t8)
/* AEC80 80118580 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* AEC84 80118584 AC620000 */ sw $v0, 0x0($v1)
/* AEC88 80118588 AC660004 */ sw $a2, 0x4($v1)
/* AEC8C 8011858C 8F020000 */ lw $v0, 0x0($t8)
/* AEC90 80118590 0040182D */ daddu $v1, $v0, $zero
/* AEC94 80118594 24420008 */ addiu $v0, $v0, 0x8
/* AEC98 80118598 AF020000 */ sw $v0, 0x0($t8)
/* AEC9C 8011859C 3C02E800 */ lui $v0, (0xE8000000 >> 16)
/* AECA0 801185A0 AC620000 */ sw $v0, 0x0($v1)
/* AECA4 801185A4 AC600004 */ sw $zero, 0x4($v1)
/* AECA8 801185A8 8F020000 */ lw $v0, 0x0($t8)
/* AECAC 801185AC 0040202D */ daddu $a0, $v0, $zero
/* AECB0 801185B0 24420008 */ addiu $v0, $v0, 0x8
/* AECB4 801185B4 AF020000 */ sw $v0, 0x0($t8)
/* AECB8 801185B8 8FB40030 */ lw $s4, 0x30($sp)
/* AECBC 801185BC 3C03F500 */ lui $v1, (0xF5000000 >> 16)
/* AECC0 801185C0 00141100 */ sll $v0, $s4, 4
/* AECC4 801185C4 24420100 */ addiu $v0, $v0, 0x100
/* AECC8 801185C8 304201FF */ andi $v0, $v0, 0x1FF
/* AECCC 801185CC 00431025 */ or $v0, $v0, $v1
/* AECD0 801185D0 AC820000 */ sw $v0, 0x0($a0)
/* AECD4 801185D4 3C020700 */ lui $v0, (0x7000000 >> 16)
/* AECD8 801185D8 AC820004 */ sw $v0, 0x4($a0)
/* AECDC 801185DC 8F020000 */ lw $v0, 0x0($t8)
/* AECE0 801185E0 08046195 */ j .L80118654
/* AECE4 801185E4 3C040703 */ lui $a0, (0x703C000 >> 16)
.L801185E8:
/* AECE8 801185E8 8FB5004C */ lw $s5, 0x4C($sp)
/* AECEC 801185EC 16A2002E */ bne $s5, $v0, .L801186A8
/* AECF0 801185F0 3C04F500 */ lui $a0, (0xF5000100 >> 16)
/* AECF4 801185F4 8F020000 */ lw $v0, 0x0($t8)
/* AECF8 801185F8 0040182D */ daddu $v1, $v0, $zero
/* AECFC 801185FC 24420008 */ addiu $v0, $v0, 0x8
/* AED00 80118600 AF020000 */ sw $v0, 0x0($t8)
/* AED04 80118604 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* AED08 80118608 AC620000 */ sw $v0, 0x0($v1)
/* AED0C 8011860C AC660004 */ sw $a2, 0x4($v1)
/* AED10 80118610 8F020000 */ lw $v0, 0x0($t8)
/* AED14 80118614 0040182D */ daddu $v1, $v0, $zero
/* AED18 80118618 24420008 */ addiu $v0, $v0, 0x8
/* AED1C 8011861C AF020000 */ sw $v0, 0x0($t8)
/* AED20 80118620 3C02E800 */ lui $v0, (0xE8000000 >> 16)
/* AED24 80118624 AC620000 */ sw $v0, 0x0($v1)
/* AED28 80118628 AC600004 */ sw $zero, 0x4($v1)
/* AED2C 8011862C 8F020000 */ lw $v0, 0x0($t8)
/* AED30 80118630 34840100 */ ori $a0, $a0, (0xF5000100 & 0xFFFF)
/* AED34 80118634 0040182D */ daddu $v1, $v0, $zero
/* AED38 80118638 24420008 */ addiu $v0, $v0, 0x8
/* AED3C 8011863C AF020000 */ sw $v0, 0x0($t8)
/* AED40 80118640 3C020700 */ lui $v0, (0x7000000 >> 16)
/* AED44 80118644 AC640000 */ sw $a0, 0x0($v1)
/* AED48 80118648 AC620004 */ sw $v0, 0x4($v1)
/* AED4C 8011864C 8F020000 */ lw $v0, 0x0($t8)
/* AED50 80118650 3C04073F */ lui $a0, (0x73FC000 >> 16)
.L80118654:
/* AED54 80118654 0040182D */ daddu $v1, $v0, $zero
/* AED58 80118658 24420008 */ addiu $v0, $v0, 0x8
/* AED5C 8011865C AF020000 */ sw $v0, 0x0($t8)
/* AED60 80118660 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* AED64 80118664 AC620000 */ sw $v0, 0x0($v1)
/* AED68 80118668 AC600004 */ sw $zero, 0x4($v1)
/* AED6C 8011866C 8F020000 */ lw $v0, 0x0($t8)
/* AED70 80118670 3484C000 */ ori $a0, $a0, (0x73FC000 & 0xFFFF)
/* AED74 80118674 0040182D */ daddu $v1, $v0, $zero
/* AED78 80118678 24420008 */ addiu $v0, $v0, 0x8
/* AED7C 8011867C AF020000 */ sw $v0, 0x0($t8)
/* AED80 80118680 3C02F000 */ lui $v0, (0xF0000000 >> 16)
/* AED84 80118684 AC620000 */ sw $v0, 0x0($v1)
/* AED88 80118688 AC640004 */ sw $a0, 0x4($v1)
/* AED8C 8011868C 8F020000 */ lw $v0, 0x0($t8)
/* AED90 80118690 0040182D */ daddu $v1, $v0, $zero
/* AED94 80118694 24420008 */ addiu $v0, $v0, 0x8
/* AED98 80118698 AF020000 */ sw $v0, 0x0($t8)
/* AED9C 8011869C 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* AEDA0 801186A0 AC620000 */ sw $v0, 0x0($v1)
/* AEDA4 801186A4 AC600004 */ sw $zero, 0x4($v1)
.L801186A8:
/* AEDA8 801186A8 9584002A */ lhu $a0, 0x2A($t4)
/* AEDAC 801186AC 00041A82 */ srl $v1, $a0, 10
/* AEDB0 801186B0 2C620003 */ sltiu $v0, $v1, 0x3
/* AEDB4 801186B4 10400008 */ beqz $v0, .L801186D8
/* AEDB8 801186B8 2463000A */ addiu $v1, $v1, 0xA
/* AEDBC 801186BC 91820029 */ lbu $v0, 0x29($t4)
/* AEDC0 801186C0 00021840 */ sll $v1, $v0, 1
/* AEDC4 801186C4 00621821 */ addu $v1, $v1, $v0
/* AEDC8 801186C8 00041202 */ srl $v0, $a0, 8
/* AEDCC 801186CC 30420003 */ andi $v0, $v0, 0x3
/* AEDD0 801186D0 24420001 */ addiu $v0, $v0, 0x1
/* AEDD4 801186D4 00621821 */ addu $v1, $v1, $v0
.L801186D8:
/* AEDD8 801186D8 00031080 */ sll $v0, $v1, 2
/* AEDDC 801186DC 00431021 */ addu $v0, $v0, $v1
/* AEDE0 801186E0 8F030000 */ lw $v1, 0x0($t8)
/* AEDE4 801186E4 000210C0 */ sll $v0, $v0, 3
/* AEDE8 801186E8 3C168015 */ lui $s6, %hi(D_8014B0B8)
/* AEDEC 801186EC 02C2B021 */ addu $s6, $s6, $v0
/* AEDF0 801186F0 8ED6B0B8 */ lw $s6, %lo(D_8014B0B8)($s6)
/* AEDF4 801186F4 3C108015 */ lui $s0, %hi(D_8014B0BC)
/* AEDF8 801186F8 02028021 */ addu $s0, $s0, $v0
/* AEDFC 801186FC 8E10B0BC */ lw $s0, %lo(D_8014B0BC)($s0)
/* AEE00 80118700 AC760000 */ sw $s6, 0x0($v1)
/* AEE04 80118704 AC700004 */ sw $s0, 0x4($v1)
/* AEE08 80118708 8F040000 */ lw $a0, 0x0($t8)
/* AEE0C 8011870C 24060001 */ addiu $a2, $zero, 0x1
/* AEE10 80118710 24820008 */ addiu $v0, $a0, 0x8
/* AEE14 80118714 116601B3 */ beq $t3, $a2, .L80118DE4
/* AEE18 80118718 AF020000 */ sw $v0, 0x0($t8)
/* AEE1C 8011871C 29620002 */ slti $v0, $t3, 0x2
/* AEE20 80118720 10400005 */ beqz $v0, .L80118738
/* AEE24 80118724 24070002 */ addiu $a3, $zero, 0x2
/* AEE28 80118728 11600009 */ beqz $t3, .L80118750
/* AEE2C 8011872C 3C03E300 */ lui $v1, (0xE3000C0F >> 16)
/* AEE30 80118730 08046B32 */ j .L8011ACC8
/* AEE34 80118734 00000000 */ nop
.L80118738:
/* AEE38 80118738 11670469 */ beq $t3, $a3, .L801198E0
/* AEE3C 8011873C 24020003 */ addiu $v0, $zero, 0x3
/* AEE40 80118740 116206A5 */ beq $t3, $v0, .L8011A1D8
/* AEE44 80118744 3C03E300 */ lui $v1, (0xE3000C0F >> 16)
/* AEE48 80118748 08046B32 */ j .L8011ACC8
/* AEE4C 8011874C 00000000 */ nop
.L80118750:
/* AEE50 80118750 3C02D700 */ lui $v0, (0xD7000002 >> 16)
/* AEE54 80118754 34420002 */ ori $v0, $v0, (0xD7000002 & 0xFFFF)
/* AEE58 80118758 24830010 */ addiu $v1, $a0, 0x10
/* AEE5C 8011875C AFA00038 */ sw $zero, 0x38($sp)
/* AEE60 80118760 AF030000 */ sw $v1, 0x0($t8)
/* AEE64 80118764 AC820008 */ sw $v0, 0x8($a0)
/* AEE68 80118768 2402FFFF */ addiu $v0, $zero, -0x1
/* AEE6C 8011876C 10A6006C */ beq $a1, $a2, .L80118920
/* AEE70 80118770 AC82000C */ sw $v0, 0xC($a0)
/* AEE74 80118774 28A20002 */ slti $v0, $a1, 0x2
/* AEE78 80118778 10400005 */ beqz $v0, .L80118790
/* AEE7C 8011877C 24020002 */ addiu $v0, $zero, 0x2
/* AEE80 80118780 10A00009 */ beqz $a1, .L801187A8
/* AEE84 80118784 3C03E300 */ lui $v1, (0xE3000C0F >> 16)
/* AEE88 80118788 08046B32 */ j .L8011ACC8
/* AEE8C 8011878C 00000000 */ nop
.L80118790:
/* AEE90 80118790 10A200C1 */ beq $a1, $v0, .L80118A98
/* AEE94 80118794 24020003 */ addiu $v0, $zero, 0x3
/* AEE98 80118798 10A20117 */ beq $a1, $v0, .L80118BF8
/* AEE9C 8011879C 3C03E300 */ lui $v1, (0xE3000C0F >> 16)
/* AEEA0 801187A0 08046B32 */ j .L8011ACC8
/* AEEA4 801187A4 00000000 */ nop
.L801187A8:
/* AEEA8 801187A8 31030007 */ andi $v1, $t0, 0x7
/* AEEAC 801187AC 8F020000 */ lw $v0, 0x0($t8)
/* AEEB0 801187B0 00031D40 */ sll $v1, $v1, 21
/* AEEB4 801187B4 0040202D */ daddu $a0, $v0, $zero
/* AEEB8 801187B8 24420008 */ addiu $v0, $v0, 0x8
/* AEEBC 801187BC AF020000 */ sw $v0, 0x0($t8)
/* AEEC0 801187C0 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* AEEC4 801187C4 00621025 */ or $v0, $v1, $v0
/* AEEC8 801187C8 AC820000 */ sw $v0, 0x0($a0)
/* AEECC 801187CC AC9E0004 */ sw $fp, 0x4($a0)
/* AEED0 801187D0 8F020000 */ lw $v0, 0x0($t8)
/* AEED4 801187D4 3C070700 */ lui $a3, (0x7000000 >> 16)
/* AEED8 801187D8 0040202D */ daddu $a0, $v0, $zero
/* AEEDC 801187DC 24420008 */ addiu $v0, $v0, 0x8
/* AEEE0 801187E0 AF020000 */ sw $v0, 0x0($t8)
/* AEEE4 801187E4 3C02F510 */ lui $v0, (0xF5100000 >> 16)
/* AEEE8 801187E8 00621825 */ or $v1, $v1, $v0
/* AEEEC 801187EC AC830000 */ sw $v1, 0x0($a0)
/* AEEF0 801187F0 32E30003 */ andi $v1, $s7, 0x3
/* AEEF4 801187F4 00031C80 */ sll $v1, $v1, 18
/* AEEF8 801187F8 8FB60044 */ lw $s6, 0x44($sp)
/* AEEFC 801187FC 8FB00048 */ lw $s0, 0x48($sp)
/* AEF00 80118800 00161380 */ sll $v0, $s6, 14
/* AEF04 80118804 00471025 */ or $v0, $v0, $a3
/* AEF08 80118808 00621825 */ or $v1, $v1, $v0
/* AEF0C 8011880C 31220003 */ andi $v0, $t1, 0x3
/* AEF10 80118810 00021200 */ sll $v0, $v0, 8
/* AEF14 80118814 00621825 */ or $v1, $v1, $v0
/* AEF18 80118818 00101100 */ sll $v0, $s0, 4
/* AEF1C 8011881C 00621825 */ or $v1, $v1, $v0
/* AEF20 80118820 AC830004 */ sw $v1, 0x4($a0)
/* AEF24 80118824 8F020000 */ lw $v0, 0x0($t8)
/* AEF28 80118828 0040182D */ daddu $v1, $v0, $zero
/* AEF2C 8011882C 24420008 */ addiu $v0, $v0, 0x8
/* AEF30 80118830 AF020000 */ sw $v0, 0x0($t8)
/* AEF34 80118834 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* AEF38 80118838 AC620000 */ sw $v0, 0x0($v1)
/* AEF3C 8011883C AC600004 */ sw $zero, 0x4($v1)
/* AEF40 80118840 8F020000 */ lw $v0, 0x0($t8)
/* AEF44 80118844 0320202D */ daddu $a0, $t9, $zero
/* AEF48 80118848 0040302D */ daddu $a2, $v0, $zero
/* AEF4C 8011884C 24420008 */ addiu $v0, $v0, 0x8
/* AEF50 80118850 AF020000 */ sw $v0, 0x0($t8)
/* AEF54 80118854 3C02F300 */ lui $v0, (0xF3000000 >> 16)
/* AEF58 80118858 07210002 */ bgez $t9, .L80118864
/* AEF5C 8011885C ACC20000 */ sw $v0, 0x0($a2)
/* AEF60 80118860 2724000F */ addiu $a0, $t9, 0xF
.L80118864:
/* AEF64 80118864 00042903 */ sra $a1, $a0, 4
/* AEF68 80118868 18A00002 */ blez $a1, .L80118874
/* AEF6C 8011886C 24030800 */ addiu $v1, $zero, 0x800
/* AEF70 80118870 24A307FF */ addiu $v1, $a1, 0x7FF
.L80118874:
/* AEF74 80118874 03320018 */ mult $t9, $s2
/* AEF78 80118878 00008012 */ mflo $s0
/* AEF7C 8011887C 26020003 */ addiu $v0, $s0, 0x3
/* AEF80 80118880 00021083 */ sra $v0, $v0, 2
/* AEF84 80118884 2444FFFF */ addiu $a0, $v0, -0x1
/* AEF88 80118888 28820800 */ slti $v0, $a0, 0x800
/* AEF8C 8011888C 50400001 */ beql $v0, $zero, .L80118894
/* AEF90 80118890 240407FF */ addiu $a0, $zero, 0x7FF
.L80118894:
/* AEF94 80118894 30820FFF */ andi $v0, $a0, 0xFFF
/* AEF98 80118898 00021300 */ sll $v0, $v0, 12
/* AEF9C 8011889C 18A0000D */ blez $a1, .L801188D4
/* AEFA0 801188A0 00472025 */ or $a0, $v0, $a3
/* AEFA4 801188A4 14A00002 */ bnez $a1, .L801188B0
/* AEFA8 801188A8 0065001A */ div $zero, $v1, $a1
/* AEFAC 801188AC 0007000D */ break 7
.L801188B0:
/* AEFB0 801188B0 2401FFFF */ addiu $at, $zero, -0x1
/* AEFB4 801188B4 14A10004 */ bne $a1, $at, .L801188C8
/* AEFB8 801188B8 3C018000 */ lui $at, (0x80000000 >> 16)
/* AEFBC 801188BC 14610002 */ bne $v1, $at, .L801188C8
/* AEFC0 801188C0 00000000 */ nop
/* AEFC4 801188C4 0006000D */ break 6
.L801188C8:
/* AEFC8 801188C8 00001012 */ mflo $v0
/* AEFCC 801188CC 08046236 */ j .L801188D8
/* AEFD0 801188D0 30420FFF */ andi $v0, $v0, 0xFFF
.L801188D4:
/* AEFD4 801188D4 30620FFF */ andi $v0, $v1, 0xFFF
.L801188D8:
/* AEFD8 801188D8 00821025 */ or $v0, $a0, $v0
/* AEFDC 801188DC ACC20004 */ sw $v0, 0x4($a2)
/* AEFE0 801188E0 31040007 */ andi $a0, $t0, 0x7
/* AEFE4 801188E4 8F020000 */ lw $v0, 0x0($t8)
/* AEFE8 801188E8 00042540 */ sll $a0, $a0, 21
/* AEFEC 801188EC 0040182D */ daddu $v1, $v0, $zero
/* AEFF0 801188F0 24420008 */ addiu $v0, $v0, 0x8
/* AEFF4 801188F4 AF020000 */ sw $v0, 0x0($t8)
/* AEFF8 801188F8 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* AEFFC 801188FC AC620000 */ sw $v0, 0x0($v1)
/* AF000 80118900 AC600004 */ sw $zero, 0x4($v1)
/* AF004 80118904 8F020000 */ lw $v0, 0x0($t8)
/* AF008 80118908 3C03F500 */ lui $v1, (0xF5000000 >> 16)
/* AF00C 8011890C 0040282D */ daddu $a1, $v0, $zero
/* AF010 80118910 24420008 */ addiu $v0, $v0, 0x8
/* AF014 80118914 AF020000 */ sw $v0, 0x0($t8)
/* AF018 80118918 08046356 */ j .L80118D58
/* AF01C 8011891C 00191043 */ sra $v0, $t9, 1
.L80118920:
/* AF020 80118920 31030007 */ andi $v1, $t0, 0x7
/* AF024 80118924 8F020000 */ lw $v0, 0x0($t8)
/* AF028 80118928 00031D40 */ sll $v1, $v1, 21
/* AF02C 8011892C 0040202D */ daddu $a0, $v0, $zero
/* AF030 80118930 24420008 */ addiu $v0, $v0, 0x8
/* AF034 80118934 AF020000 */ sw $v0, 0x0($t8)
/* AF038 80118938 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* AF03C 8011893C 00621025 */ or $v0, $v1, $v0
/* AF040 80118940 AC820000 */ sw $v0, 0x0($a0)
/* AF044 80118944 AC9E0004 */ sw $fp, 0x4($a0)
/* AF048 80118948 8F020000 */ lw $v0, 0x0($t8)
/* AF04C 8011894C 3C070700 */ lui $a3, (0x7000000 >> 16)
/* AF050 80118950 0040202D */ daddu $a0, $v0, $zero
/* AF054 80118954 24420008 */ addiu $v0, $v0, 0x8
/* AF058 80118958 AF020000 */ sw $v0, 0x0($t8)
/* AF05C 8011895C 3C02F510 */ lui $v0, (0xF5100000 >> 16)
/* AF060 80118960 00621825 */ or $v1, $v1, $v0
/* AF064 80118964 AC830000 */ sw $v1, 0x0($a0)
/* AF068 80118968 32E30003 */ andi $v1, $s7, 0x3
/* AF06C 8011896C 00031C80 */ sll $v1, $v1, 18
/* AF070 80118970 8FB50044 */ lw $s5, 0x44($sp)
/* AF074 80118974 8FB60048 */ lw $s6, 0x48($sp)
/* AF078 80118978 00151380 */ sll $v0, $s5, 14
/* AF07C 8011897C 00471025 */ or $v0, $v0, $a3
/* AF080 80118980 00621825 */ or $v1, $v1, $v0
/* AF084 80118984 31220003 */ andi $v0, $t1, 0x3
/* AF088 80118988 00021200 */ sll $v0, $v0, 8
/* AF08C 8011898C 00621825 */ or $v1, $v1, $v0
/* AF090 80118990 00161100 */ sll $v0, $s6, 4
/* AF094 80118994 00621825 */ or $v1, $v1, $v0
/* AF098 80118998 AC830004 */ sw $v1, 0x4($a0)
/* AF09C 8011899C 8F020000 */ lw $v0, 0x0($t8)
/* AF0A0 801189A0 0040182D */ daddu $v1, $v0, $zero
/* AF0A4 801189A4 24420008 */ addiu $v0, $v0, 0x8
/* AF0A8 801189A8 AF020000 */ sw $v0, 0x0($t8)
/* AF0AC 801189AC 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* AF0B0 801189B0 AC620000 */ sw $v0, 0x0($v1)
/* AF0B4 801189B4 AC600004 */ sw $zero, 0x4($v1)
/* AF0B8 801189B8 8F020000 */ lw $v0, 0x0($t8)
/* AF0BC 801189BC 0320202D */ daddu $a0, $t9, $zero
/* AF0C0 801189C0 0040302D */ daddu $a2, $v0, $zero
/* AF0C4 801189C4 24420008 */ addiu $v0, $v0, 0x8
/* AF0C8 801189C8 AF020000 */ sw $v0, 0x0($t8)
/* AF0CC 801189CC 3C02F300 */ lui $v0, (0xF3000000 >> 16)
/* AF0D0 801189D0 07210002 */ bgez $t9, .L801189DC
/* AF0D4 801189D4 ACC20000 */ sw $v0, 0x0($a2)
/* AF0D8 801189D8 27240007 */ addiu $a0, $t9, 0x7
.L801189DC:
/* AF0DC 801189DC 000428C3 */ sra $a1, $a0, 3
/* AF0E0 801189E0 18A00002 */ blez $a1, .L801189EC
/* AF0E4 801189E4 24030800 */ addiu $v1, $zero, 0x800
/* AF0E8 801189E8 24A307FF */ addiu $v1, $a1, 0x7FF
.L801189EC:
/* AF0EC 801189EC 03320018 */ mult $t9, $s2
/* AF0F0 801189F0 00008012 */ mflo $s0
/* AF0F4 801189F4 26020001 */ addiu $v0, $s0, 0x1
/* AF0F8 801189F8 00021043 */ sra $v0, $v0, 1
/* AF0FC 801189FC 2444FFFF */ addiu $a0, $v0, -0x1
/* AF100 80118A00 28820800 */ slti $v0, $a0, 0x800
/* AF104 80118A04 50400001 */ beql $v0, $zero, .L80118A0C
/* AF108 80118A08 240407FF */ addiu $a0, $zero, 0x7FF
.L80118A0C:
/* AF10C 80118A0C 30820FFF */ andi $v0, $a0, 0xFFF
/* AF110 80118A10 00021300 */ sll $v0, $v0, 12
/* AF114 80118A14 18A0000D */ blez $a1, .L80118A4C
/* AF118 80118A18 00472025 */ or $a0, $v0, $a3
/* AF11C 80118A1C 14A00002 */ bnez $a1, .L80118A28
/* AF120 80118A20 0065001A */ div $zero, $v1, $a1
/* AF124 80118A24 0007000D */ break 7
.L80118A28:
/* AF128 80118A28 2401FFFF */ addiu $at, $zero, -0x1
/* AF12C 80118A2C 14A10004 */ bne $a1, $at, .L80118A40
/* AF130 80118A30 3C018000 */ lui $at, (0x80000000 >> 16)
/* AF134 80118A34 14610002 */ bne $v1, $at, .L80118A40
/* AF138 80118A38 00000000 */ nop
/* AF13C 80118A3C 0006000D */ break 6
.L80118A40:
/* AF140 80118A40 00001012 */ mflo $v0
/* AF144 80118A44 08046294 */ j .L80118A50
/* AF148 80118A48 30420FFF */ andi $v0, $v0, 0xFFF
.L80118A4C:
/* AF14C 80118A4C 30620FFF */ andi $v0, $v1, 0xFFF
.L80118A50:
/* AF150 80118A50 00821025 */ or $v0, $a0, $v0
/* AF154 80118A54 ACC20004 */ sw $v0, 0x4($a2)
/* AF158 80118A58 31040007 */ andi $a0, $t0, 0x7
/* AF15C 80118A5C 8F020000 */ lw $v0, 0x0($t8)
/* AF160 80118A60 00042540 */ sll $a0, $a0, 21
/* AF164 80118A64 0040182D */ daddu $v1, $v0, $zero
/* AF168 80118A68 24420008 */ addiu $v0, $v0, 0x8
/* AF16C 80118A6C AF020000 */ sw $v0, 0x0($t8)
/* AF170 80118A70 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* AF174 80118A74 AC620000 */ sw $v0, 0x0($v1)
/* AF178 80118A78 AC600004 */ sw $zero, 0x4($v1)
/* AF17C 80118A7C 8F020000 */ lw $v0, 0x0($t8)
/* AF180 80118A80 3C03F508 */ lui $v1, (0xF5080000 >> 16)
/* AF184 80118A84 0040282D */ daddu $a1, $v0, $zero
/* AF188 80118A88 24420008 */ addiu $v0, $v0, 0x8
/* AF18C 80118A8C AF020000 */ sw $v0, 0x0($t8)
/* AF190 80118A90 08046357 */ j .L80118D5C
/* AF194 80118A94 27220007 */ addiu $v0, $t9, 0x7
.L80118A98:
/* AF198 80118A98 31030007 */ andi $v1, $t0, 0x7
/* AF19C 80118A9C 8F020000 */ lw $v0, 0x0($t8)
/* AF1A0 80118AA0 00031D40 */ sll $v1, $v1, 21
/* AF1A4 80118AA4 0040202D */ daddu $a0, $v0, $zero
/* AF1A8 80118AA8 24420008 */ addiu $v0, $v0, 0x8
/* AF1AC 80118AAC AF020000 */ sw $v0, 0x0($t8)
/* AF1B0 80118AB0 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* AF1B4 80118AB4 00621025 */ or $v0, $v1, $v0
/* AF1B8 80118AB8 AC820000 */ sw $v0, 0x0($a0)
/* AF1BC 80118ABC AC9E0004 */ sw $fp, 0x4($a0)
/* AF1C0 80118AC0 8F020000 */ lw $v0, 0x0($t8)
/* AF1C4 80118AC4 3C070700 */ lui $a3, (0x7000000 >> 16)
/* AF1C8 80118AC8 0040202D */ daddu $a0, $v0, $zero
/* AF1CC 80118ACC 24420008 */ addiu $v0, $v0, 0x8
/* AF1D0 80118AD0 AF020000 */ sw $v0, 0x0($t8)
/* AF1D4 80118AD4 3C02F510 */ lui $v0, (0xF5100000 >> 16)
/* AF1D8 80118AD8 00621825 */ or $v1, $v1, $v0
/* AF1DC 80118ADC AC830000 */ sw $v1, 0x0($a0)
/* AF1E0 80118AE0 32E30003 */ andi $v1, $s7, 0x3
/* AF1E4 80118AE4 00031C80 */ sll $v1, $v1, 18
/* AF1E8 80118AE8 8FB50044 */ lw $s5, 0x44($sp)
/* AF1EC 80118AEC 8FB60048 */ lw $s6, 0x48($sp)
/* AF1F0 80118AF0 00151380 */ sll $v0, $s5, 14
/* AF1F4 80118AF4 00471025 */ or $v0, $v0, $a3
/* AF1F8 80118AF8 00621825 */ or $v1, $v1, $v0
/* AF1FC 80118AFC 31220003 */ andi $v0, $t1, 0x3
/* AF200 80118B00 00021200 */ sll $v0, $v0, 8
/* AF204 80118B04 00621825 */ or $v1, $v1, $v0
/* AF208 80118B08 00161100 */ sll $v0, $s6, 4
/* AF20C 80118B0C 00621825 */ or $v1, $v1, $v0
/* AF210 80118B10 AC830004 */ sw $v1, 0x4($a0)
/* AF214 80118B14 8F020000 */ lw $v0, 0x0($t8)
/* AF218 80118B18 0040182D */ daddu $v1, $v0, $zero
/* AF21C 80118B1C 24420008 */ addiu $v0, $v0, 0x8
/* AF220 80118B20 AF020000 */ sw $v0, 0x0($t8)
/* AF224 80118B24 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* AF228 80118B28 AC620000 */ sw $v0, 0x0($v1)
/* AF22C 80118B2C AC600004 */ sw $zero, 0x4($v1)
/* AF230 80118B30 8F020000 */ lw $v0, 0x0($t8)
/* AF234 80118B34 0320202D */ daddu $a0, $t9, $zero
/* AF238 80118B38 0040302D */ daddu $a2, $v0, $zero
/* AF23C 80118B3C 24420008 */ addiu $v0, $v0, 0x8
/* AF240 80118B40 AF020000 */ sw $v0, 0x0($t8)
/* AF244 80118B44 3C02F300 */ lui $v0, (0xF3000000 >> 16)
/* AF248 80118B48 07210002 */ bgez $t9, .L80118B54
/* AF24C 80118B4C ACC20000 */ sw $v0, 0x0($a2)
/* AF250 80118B50 27240003 */ addiu $a0, $t9, 0x3
.L80118B54:
/* AF254 80118B54 00042883 */ sra $a1, $a0, 2
/* AF258 80118B58 18A00002 */ blez $a1, .L80118B64
/* AF25C 80118B5C 24030800 */ addiu $v1, $zero, 0x800
/* AF260 80118B60 24A307FF */ addiu $v1, $a1, 0x7FF
.L80118B64:
/* AF264 80118B64 03320018 */ mult $t9, $s2
/* AF268 80118B68 00008012 */ mflo $s0
/* AF26C 80118B6C 2604FFFF */ addiu $a0, $s0, -0x1
/* AF270 80118B70 28820800 */ slti $v0, $a0, 0x800
/* AF274 80118B74 50400001 */ beql $v0, $zero, .L80118B7C
/* AF278 80118B78 240407FF */ addiu $a0, $zero, 0x7FF
.L80118B7C:
/* AF27C 80118B7C 30820FFF */ andi $v0, $a0, 0xFFF
/* AF280 80118B80 00021300 */ sll $v0, $v0, 12
/* AF284 80118B84 18A0000D */ blez $a1, .L80118BBC
/* AF288 80118B88 00472025 */ or $a0, $v0, $a3
/* AF28C 80118B8C 14A00002 */ bnez $a1, .L80118B98
/* AF290 80118B90 0065001A */ div $zero, $v1, $a1
/* AF294 80118B94 0007000D */ break 7
.L80118B98:
/* AF298 80118B98 2401FFFF */ addiu $at, $zero, -0x1
/* AF29C 80118B9C 14A10004 */ bne $a1, $at, .L80118BB0
/* AF2A0 80118BA0 3C018000 */ lui $at, (0x80000000 >> 16)
/* AF2A4 80118BA4 14610002 */ bne $v1, $at, .L80118BB0
/* AF2A8 80118BA8 00000000 */ nop
/* AF2AC 80118BAC 0006000D */ break 6
glabel .L80118BB0
/* AF2B0 80118BB0 00001012 */ mflo $v0
/* AF2B4 80118BB4 080462F0 */ j .L80118BC0
/* AF2B8 80118BB8 30420FFF */ andi $v0, $v0, 0xFFF
.L80118BBC:
/* AF2BC 80118BBC 30620FFF */ andi $v0, $v1, 0xFFF
.L80118BC0:
/* AF2C0 80118BC0 00821025 */ or $v0, $a0, $v0
/* AF2C4 80118BC4 ACC20004 */ sw $v0, 0x4($a2)
/* AF2C8 80118BC8 31040007 */ andi $a0, $t0, 0x7
/* AF2CC 80118BCC 8F020000 */ lw $v0, 0x0($t8)
/* AF2D0 80118BD0 00042540 */ sll $a0, $a0, 21
/* AF2D4 80118BD4 0040182D */ daddu $v1, $v0, $zero
/* AF2D8 80118BD8 24420008 */ addiu $v0, $v0, 0x8
/* AF2DC 80118BDC AF020000 */ sw $v0, 0x0($t8)
/* AF2E0 80118BE0 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* AF2E4 80118BE4 AC620000 */ sw $v0, 0x0($v1)
/* AF2E8 80118BE8 AC600004 */ sw $zero, 0x4($v1)
/* AF2EC 80118BEC 8F020000 */ lw $v0, 0x0($t8)
/* AF2F0 80118BF0 08046352 */ j .L80118D48
/* AF2F4 80118BF4 3C03F510 */ lui $v1, (0xF5100000 >> 16)
.L80118BF8:
/* AF2F8 80118BF8 31030007 */ andi $v1, $t0, 0x7
/* AF2FC 80118BFC 8F020000 */ lw $v0, 0x0($t8)
/* AF300 80118C00 00031D40 */ sll $v1, $v1, 21
/* AF304 80118C04 0040202D */ daddu $a0, $v0, $zero
/* AF308 80118C08 24420008 */ addiu $v0, $v0, 0x8
/* AF30C 80118C0C AF020000 */ sw $v0, 0x0($t8)
/* AF310 80118C10 3C02FD18 */ lui $v0, (0xFD180000 >> 16)
/* AF314 80118C14 00621025 */ or $v0, $v1, $v0
/* AF318 80118C18 AC820000 */ sw $v0, 0x0($a0)
/* AF31C 80118C1C AC9E0004 */ sw $fp, 0x4($a0)
/* AF320 80118C20 8F020000 */ lw $v0, 0x0($t8)
/* AF324 80118C24 3C070700 */ lui $a3, (0x7000000 >> 16)
/* AF328 80118C28 0040202D */ daddu $a0, $v0, $zero
/* AF32C 80118C2C 24420008 */ addiu $v0, $v0, 0x8
/* AF330 80118C30 AF020000 */ sw $v0, 0x0($t8)
/* AF334 80118C34 3C02F518 */ lui $v0, (0xF5180000 >> 16)
/* AF338 80118C38 00621825 */ or $v1, $v1, $v0
/* AF33C 80118C3C AC830000 */ sw $v1, 0x0($a0)
/* AF340 80118C40 32E30003 */ andi $v1, $s7, 0x3
/* AF344 80118C44 00031C80 */ sll $v1, $v1, 18
/* AF348 80118C48 8FB50044 */ lw $s5, 0x44($sp)
/* AF34C 80118C4C 8FB60048 */ lw $s6, 0x48($sp)
/* AF350 80118C50 00151380 */ sll $v0, $s5, 14
/* AF354 80118C54 00471025 */ or $v0, $v0, $a3
/* AF358 80118C58 00621825 */ or $v1, $v1, $v0
/* AF35C 80118C5C 31220003 */ andi $v0, $t1, 0x3
/* AF360 80118C60 00021200 */ sll $v0, $v0, 8
/* AF364 80118C64 00621825 */ or $v1, $v1, $v0
/* AF368 80118C68 00161100 */ sll $v0, $s6, 4
/* AF36C 80118C6C 00621825 */ or $v1, $v1, $v0
/* AF370 80118C70 AC830004 */ sw $v1, 0x4($a0)
/* AF374 80118C74 8F020000 */ lw $v0, 0x0($t8)
/* AF378 80118C78 00192842 */ srl $a1, $t9, 1
/* AF37C 80118C7C 0040182D */ daddu $v1, $v0, $zero
/* AF380 80118C80 24420008 */ addiu $v0, $v0, 0x8
/* AF384 80118C84 AF020000 */ sw $v0, 0x0($t8)
/* AF388 80118C88 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* AF38C 80118C8C AC620000 */ sw $v0, 0x0($v1)
/* AF390 80118C90 AC600004 */ sw $zero, 0x4($v1)
/* AF394 80118C94 8F020000 */ lw $v0, 0x0($t8)
/* AF398 80118C98 24030800 */ addiu $v1, $zero, 0x800
/* AF39C 80118C9C 0040302D */ daddu $a2, $v0, $zero
/* AF3A0 80118CA0 24420008 */ addiu $v0, $v0, 0x8
/* AF3A4 80118CA4 AF020000 */ sw $v0, 0x0($t8)
/* AF3A8 80118CA8 3C02F300 */ lui $v0, (0xF3000000 >> 16)
/* AF3AC 80118CAC 18A00002 */ blez $a1, .L80118CB8
/* AF3B0 80118CB0 ACC20000 */ sw $v0, 0x0($a2)
/* AF3B4 80118CB4 24A307FF */ addiu $v1, $a1, 0x7FF
.L80118CB8:
/* AF3B8 80118CB8 03320018 */ mult $t9, $s2
/* AF3BC 80118CBC 00008012 */ mflo $s0
/* AF3C0 80118CC0 2604FFFF */ addiu $a0, $s0, -0x1
/* AF3C4 80118CC4 28820800 */ slti $v0, $a0, 0x800
/* AF3C8 80118CC8 50400001 */ beql $v0, $zero, .L80118CD0
/* AF3CC 80118CCC 240407FF */ addiu $a0, $zero, 0x7FF
.L80118CD0:
/* AF3D0 80118CD0 30820FFF */ andi $v0, $a0, 0xFFF
/* AF3D4 80118CD4 00021300 */ sll $v0, $v0, 12
/* AF3D8 80118CD8 18A0000D */ blez $a1, .L80118D10
/* AF3DC 80118CDC 00472025 */ or $a0, $v0, $a3
/* AF3E0 80118CE0 14A00002 */ bnez $a1, .L80118CEC
/* AF3E4 80118CE4 0065001A */ div $zero, $v1, $a1
/* AF3E8 80118CE8 0007000D */ break 7
.L80118CEC:
/* AF3EC 80118CEC 2401FFFF */ addiu $at, $zero, -0x1
/* AF3F0 80118CF0 14A10004 */ bne $a1, $at, .L80118D04
/* AF3F4 80118CF4 3C018000 */ lui $at, (0x80000000 >> 16)
/* AF3F8 80118CF8 14610002 */ bne $v1, $at, .L80118D04
/* AF3FC 80118CFC 00000000 */ nop
/* AF400 80118D00 0006000D */ break 6
.L80118D04:
/* AF404 80118D04 00001012 */ mflo $v0
/* AF408 80118D08 08046345 */ j .L80118D14
/* AF40C 80118D0C 30420FFF */ andi $v0, $v0, 0xFFF
.L80118D10:
/* AF410 80118D10 30620FFF */ andi $v0, $v1, 0xFFF
.L80118D14:
/* AF414 80118D14 00821025 */ or $v0, $a0, $v0
/* AF418 80118D18 ACC20004 */ sw $v0, 0x4($a2)
/* AF41C 80118D1C 31040007 */ andi $a0, $t0, 0x7
/* AF420 80118D20 8F020000 */ lw $v0, 0x0($t8)
/* AF424 80118D24 00042540 */ sll $a0, $a0, 21
/* AF428 80118D28 0040182D */ daddu $v1, $v0, $zero
/* AF42C 80118D2C 24420008 */ addiu $v0, $v0, 0x8
/* AF430 80118D30 AF020000 */ sw $v0, 0x0($t8)
/* AF434 80118D34 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* AF438 80118D38 AC620000 */ sw $v0, 0x0($v1)
/* AF43C 80118D3C AC600004 */ sw $zero, 0x4($v1)
/* AF440 80118D40 8F020000 */ lw $v0, 0x0($t8)
/* AF444 80118D44 3C03F518 */ lui $v1, (0xF5180000 >> 16)
.L80118D48:
/* AF448 80118D48 0040282D */ daddu $a1, $v0, $zero
/* AF44C 80118D4C 24420008 */ addiu $v0, $v0, 0x8
/* AF450 80118D50 AF020000 */ sw $v0, 0x0($t8)
/* AF454 80118D54 00191040 */ sll $v0, $t9, 1
.L80118D58:
/* AF458 80118D58 24420007 */ addiu $v0, $v0, 0x7
.L80118D5C:
/* AF45C 80118D5C 000210C3 */ sra $v0, $v0, 3
/* AF460 80118D60 304201FF */ andi $v0, $v0, 0x1FF
/* AF464 80118D64 00021240 */ sll $v0, $v0, 9
/* AF468 80118D68 00431025 */ or $v0, $v0, $v1
/* AF46C 80118D6C 00822025 */ or $a0, $a0, $v0
/* AF470 80118D70 32E30003 */ andi $v1, $s7, 0x3
/* AF474 80118D74 00031C80 */ sll $v1, $v1, 18
/* AF478 80118D78 ACA40000 */ sw $a0, 0x0($a1)
/* AF47C 80118D7C 8FB00044 */ lw $s0, 0x44($sp)
/* AF480 80118D80 8FB40048 */ lw $s4, 0x48($sp)
/* AF484 80118D84 00101380 */ sll $v0, $s0, 14
/* AF488 80118D88 00621825 */ or $v1, $v1, $v0
/* AF48C 80118D8C 31220003 */ andi $v0, $t1, 0x3
/* AF490 80118D90 00021200 */ sll $v0, $v0, 8
/* AF494 80118D94 00621825 */ or $v1, $v1, $v0
/* AF498 80118D98 00141100 */ sll $v0, $s4, 4
/* AF49C 80118D9C 00621825 */ or $v1, $v1, $v0
/* AF4A0 80118DA0 ACA30004 */ sw $v1, 0x4($a1)
/* AF4A4 80118DA4 2723FFFF */ addiu $v1, $t9, -0x1
/* AF4A8 80118DA8 00031880 */ sll $v1, $v1, 2
/* AF4AC 80118DAC 30630FFF */ andi $v1, $v1, 0xFFF
/* AF4B0 80118DB0 8F020000 */ lw $v0, 0x0($t8)
/* AF4B4 80118DB4 00031B00 */ sll $v1, $v1, 12
/* AF4B8 80118DB8 0040202D */ daddu $a0, $v0, $zero
/* AF4BC 80118DBC 24420008 */ addiu $v0, $v0, 0x8
/* AF4C0 80118DC0 AF020000 */ sw $v0, 0x0($t8)
/* AF4C4 80118DC4 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* AF4C8 80118DC8 AC820000 */ sw $v0, 0x0($a0)
/* AF4CC 80118DCC 2642FFFF */ addiu $v0, $s2, -0x1
/* AF4D0 80118DD0 00021080 */ sll $v0, $v0, 2
/* AF4D4 80118DD4 30420FFF */ andi $v0, $v0, 0xFFF
/* AF4D8 80118DD8 00621825 */ or $v1, $v1, $v0
/* AF4DC 80118DDC 08046B31 */ j .L8011ACC4
/* AF4E0 80118DE0 AC830004 */ sw $v1, 0x4($a0)
.L80118DE4:
/* AF4E4 80118DE4 3C150001 */ lui $s5, (0x10000 >> 16)
/* AF4E8 80118DE8 10AB00BF */ beq $a1, $t3, .L801190E8
/* AF4EC 80118DEC AFB50038 */ sw $s5, 0x38($sp)
/* AF4F0 80118DF0 28A20002 */ slti $v0, $a1, 0x2
/* AF4F4 80118DF4 10400005 */ beqz $v0, .L80118E0C
/* AF4F8 80118DF8 24020002 */ addiu $v0, $zero, 0x2
/* AF4FC 80118DFC 10A00009 */ beqz $a1, .L80118E24
/* AF500 80118E00 3C04D700 */ lui $a0, (0xD7000002 >> 16)
/* AF504 80118E04 0804662B */ j .L801198AC
/* AF508 80118E08 00000000 */ nop
.L80118E0C:
/* AF50C 80118E0C 10A2015A */ beq $a1, $v0, .L80119378
/* AF510 80118E10 24020003 */ addiu $v0, $zero, 0x3
/* AF514 80118E14 10A201FF */ beq $a1, $v0, .L80119614
/* AF518 80118E18 3C04D700 */ lui $a0, (0xD7000002 >> 16)
/* AF51C 80118E1C 0804662B */ j .L801198AC
/* AF520 80118E20 00000000 */ nop
.L80118E24:
/* AF524 80118E24 03C0702D */ daddu $t6, $fp, $zero
/* AF528 80118E28 0000882D */ daddu $s1, $zero, $zero
/* AF52C 80118E2C 00191080 */ sll $v0, $t9, 2
/* AF530 80118E30 28420040 */ slti $v0, $v0, 0x40
/* AF534 80118E34 1440029C */ bnez $v0, .L801198A8
/* AF538 80118E38 240F0001 */ addiu $t7, $zero, 0x1
/* AF53C 80118E3C 31020007 */ andi $v0, $t0, 0x7
/* AF540 80118E40 00029D40 */ sll $s3, $v0, 21
/* AF544 80118E44 32E20003 */ andi $v0, $s7, 0x3
/* AF548 80118E48 0002BC80 */ sll $s7, $v0, 18
/* AF54C 80118E4C 31220003 */ andi $v0, $t1, 0x3
/* AF550 80118E50 00021200 */ sll $v0, $v0, 8
/* AF554 80118E54 AFA20040 */ sw $v0, 0x40($sp)
.L80118E58:
/* AF558 80118E58 15E00002 */ bnez $t7, .L80118E64
/* AF55C 80118E5C 024F001A */ div $zero, $s2, $t7
/* AF560 80118E60 0007000D */ break 7
.L80118E64:
/* AF564 80118E64 2401FFFF */ addiu $at, $zero, -0x1
/* AF568 80118E68 15E10004 */ bne $t7, $at, .L80118E7C
/* AF56C 80118E6C 3C018000 */ lui $at, (0x80000000 >> 16)
/* AF570 80118E70 16410002 */ bne $s2, $at, .L80118E7C
/* AF574 80118E74 00000000 */ nop
/* AF578 80118E78 0006000D */ break 6
.L80118E7C:
/* AF57C 80118E7C 00008012 */ mflo $s0
/* AF580 80118E80 12000289 */ beqz $s0, .L801198A8
/* AF584 80118E84 AFB0004C */ sw $s0, 0x4C($sp)
/* AF588 80118E88 15E00002 */ bnez $t7, .L80118E94
/* AF58C 80118E8C 032F001A */ div $zero, $t9, $t7
/* AF590 80118E90 0007000D */ break 7
.L80118E94:
/* AF594 80118E94 2401FFFF */ addiu $at, $zero, -0x1
/* AF598 80118E98 15E10004 */ bne $t7, $at, .L80118EAC
/* AF59C 80118E9C 3C018000 */ lui $at, (0x80000000 >> 16)
/* AF5A0 80118EA0 17210002 */ bne $t9, $at, .L80118EAC
/* AF5A4 80118EA4 00000000 */ nop
/* AF5A8 80118EA8 0006000D */ break 6
.L80118EAC:
/* AF5AC 80118EAC 00003012 */ mflo $a2
/* AF5B0 80118EB0 3C03FD08 */ lui $v1, (0xFD080000 >> 16)
/* AF5B4 80118EB4 01DE4823 */ subu $t1, $t6, $fp
/* AF5B8 80118EB8 000948C2 */ srl $t1, $t1, 3
/* AF5BC 80118EBC 312901FF */ andi $t1, $t1, 0x1FF
/* AF5C0 80118EC0 3C140700 */ lui $s4, (0x7000000 >> 16)
/* AF5C4 80118EC4 322C000F */ andi $t4, $s1, 0xF
/* AF5C8 80118EC8 8F020000 */ lw $v0, 0x0($t8)
/* AF5CC 80118ECC 000C6A80 */ sll $t5, $t4, 10
/* AF5D0 80118ED0 0040282D */ daddu $a1, $v0, $zero
/* AF5D4 80118ED4 24420008 */ addiu $v0, $v0, 0x8
/* AF5D8 80118ED8 AF020000 */ sw $v0, 0x0($t8)
/* AF5DC 80118EDC ACAE0004 */ sw $t6, 0x4($a1)
/* AF5E0 80118EE0 00062043 */ sra $a0, $a2, 1
/* AF5E4 80118EE4 2482FFFF */ addiu $v0, $a0, -0x1
/* AF5E8 80118EE8 30420FFF */ andi $v0, $v0, 0xFFF
/* AF5EC 80118EEC 00431025 */ or $v0, $v0, $v1
/* AF5F0 80118EF0 02621025 */ or $v0, $s3, $v0
/* AF5F4 80118EF4 24840007 */ addiu $a0, $a0, 0x7
/* AF5F8 80118EF8 000420C3 */ sra $a0, $a0, 3
/* AF5FC 80118EFC 308401FF */ andi $a0, $a0, 0x1FF
/* AF600 80118F00 00042240 */ sll $a0, $a0, 9
/* AF604 80118F04 ACA20000 */ sw $v0, 0x0($a1)
/* AF608 80118F08 8F020000 */ lw $v0, 0x0($t8)
/* AF60C 80118F0C 00D20018 */ mult $a2, $s2
/* AF610 80118F10 0040282D */ daddu $a1, $v0, $zero
/* AF614 80118F14 24420008 */ addiu $v0, $v0, 0x8
/* AF618 80118F18 AF020000 */ sw $v0, 0x0($t8)
/* AF61C 80118F1C 3C02F508 */ lui $v0, (0xF5080000 >> 16)
/* AF620 80118F20 00821025 */ or $v0, $a0, $v0
/* AF624 80118F24 02621025 */ or $v0, $s3, $v0
/* AF628 80118F28 00491025 */ or $v0, $v0, $t1
/* AF62C 80118F2C ACA20000 */ sw $v0, 0x0($a1)
/* AF630 80118F30 8FB00044 */ lw $s0, 0x44($sp)
/* AF634 80118F34 8FB50040 */ lw $s5, 0x40($sp)
/* AF638 80118F38 02115023 */ subu $t2, $s0, $s1
/* AF63C 80118F3C 314A000F */ andi $t2, $t2, 0xF
/* AF640 80118F40 000A5380 */ sll $t2, $t2, 14
/* AF644 80118F44 01541025 */ or $v0, $t2, $s4
/* AF648 80118F48 02E21025 */ or $v0, $s7, $v0
/* AF64C 80118F4C 004D1025 */ or $v0, $v0, $t5
/* AF650 80118F50 00551025 */ or $v0, $v0, $s5
/* AF654 80118F54 8FB00048 */ lw $s0, 0x48($sp)
/* AF658 80118F58 00001812 */ mflo $v1
/* AF65C 80118F5C 02114023 */ subu $t0, $s0, $s1
/* AF660 80118F60 3108000F */ andi $t0, $t0, 0xF
/* AF664 80118F64 15E00002 */ bnez $t7, .L80118F70
/* AF668 80118F68 006F001A */ div $zero, $v1, $t7
/* AF66C 80118F6C 0007000D */ break 7
.L80118F70:
/* AF670 80118F70 2401FFFF */ addiu $at, $zero, -0x1
/* AF674 80118F74 15E10004 */ bne $t7, $at, .L80118F88
/* AF678 80118F78 3C018000 */ lui $at, (0x80000000 >> 16)
/* AF67C 80118F7C 14610002 */ bne $v1, $at, .L80118F88
/* AF680 80118F80 00000000 */ nop
/* AF684 80118F84 0006000D */ break 6
.L80118F88:
/* AF688 80118F88 00005812 */ mflo $t3
/* AF68C 80118F8C 00084100 */ sll $t0, $t0, 4
/* AF690 80118F90 00481025 */ or $v0, $v0, $t0
/* AF694 80118F94 004C1025 */ or $v0, $v0, $t4
/* AF698 80118F98 ACA20004 */ sw $v0, 0x4($a1)
/* AF69C 80118F9C 8F020000 */ lw $v0, 0x0($t8)
/* AF6A0 80118FA0 0040182D */ daddu $v1, $v0, $zero
/* AF6A4 80118FA4 24420008 */ addiu $v0, $v0, 0x8
/* AF6A8 80118FA8 AF020000 */ sw $v0, 0x0($t8)
/* AF6AC 80118FAC 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* AF6B0 80118FB0 AC620000 */ sw $v0, 0x0($v1)
/* AF6B4 80118FB4 AC600004 */ sw $zero, 0x4($v1)
/* AF6B8 80118FB8 8F020000 */ lw $v0, 0x0($t8)
/* AF6BC 80118FBC 24C6FFFF */ addiu $a2, $a2, -0x1
/* AF6C0 80118FC0 0040382D */ daddu $a3, $v0, $zero
/* AF6C4 80118FC4 24420008 */ addiu $v0, $v0, 0x8
/* AF6C8 80118FC8 AF020000 */ sw $v0, 0x0($t8)
/* AF6CC 80118FCC 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* AF6D0 80118FD0 ACE20000 */ sw $v0, 0x0($a3)
/* AF6D4 80118FD4 00061040 */ sll $v0, $a2, 1
/* AF6D8 80118FD8 30420FFF */ andi $v0, $v0, 0xFFF
/* AF6DC 80118FDC 8FB0004C */ lw $s0, 0x4C($sp)
/* AF6E0 80118FE0 00021300 */ sll $v0, $v0, 12
/* AF6E4 80118FE4 2605FFFF */ addiu $a1, $s0, -0x1
/* AF6E8 80118FE8 00052880 */ sll $a1, $a1, 2
/* AF6EC 80118FEC 30A50FFF */ andi $a1, $a1, 0xFFF
/* AF6F0 80118FF0 00B41825 */ or $v1, $a1, $s4
/* AF6F4 80118FF4 00431025 */ or $v0, $v0, $v1
/* AF6F8 80118FF8 ACE20004 */ sw $v0, 0x4($a3)
/* AF6FC 80118FFC 8F020000 */ lw $v0, 0x0($t8)
/* AF700 80119000 000F7840 */ sll $t7, $t7, 1
/* AF704 80119004 0040182D */ daddu $v1, $v0, $zero
/* AF708 80119008 24420008 */ addiu $v0, $v0, 0x8
/* AF70C 8011900C AF020000 */ sw $v0, 0x0($t8)
/* AF710 80119010 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* AF714 80119014 AC620000 */ sw $v0, 0x0($v1)
/* AF718 80119018 15E00002 */ bnez $t7, .L80119024
/* AF71C 8011901C 032F001A */ div $zero, $t9, $t7
/* AF720 80119020 0007000D */ break 7
.L80119024:
/* AF724 80119024 2401FFFF */ addiu $at, $zero, -0x1
/* AF728 80119028 15E10004 */ bne $t7, $at, .L8011903C
/* AF72C 8011902C 3C018000 */ lui $at, (0x80000000 >> 16)
/* AF730 80119030 17210002 */ bne $t9, $at, .L8011903C
/* AF734 80119034 00000000 */ nop
/* AF738 80119038 0006000D */ break 6
.L8011903C:
/* AF73C 8011903C 00008012 */ mflo $s0
/* AF740 80119040 00063080 */ sll $a2, $a2, 2
/* AF744 80119044 30C60FFF */ andi $a2, $a2, 0xFFF
/* AF748 80119048 00063300 */ sll $a2, $a2, 12
/* AF74C 8011904C AC600004 */ sw $zero, 0x4($v1)
/* AF750 80119050 32230007 */ andi $v1, $s1, 0x7
/* AF754 80119054 00031E00 */ sll $v1, $v1, 24
/* AF758 80119058 AFB0004C */ sw $s0, 0x4C($sp)
/* AF75C 8011905C 8F020000 */ lw $v0, 0x0($t8)
/* AF760 80119060 26310001 */ addiu $s1, $s1, 0x1
/* AF764 80119064 0040382D */ daddu $a3, $v0, $zero
/* AF768 80119068 24420008 */ addiu $v0, $v0, 0x8
/* AF76C 8011906C AF020000 */ sw $v0, 0x0($t8)
/* AF770 80119070 3C02F500 */ lui $v0, (0xF5000000 >> 16)
/* AF774 80119074 00822025 */ or $a0, $a0, $v0
/* AF778 80119078 02642025 */ or $a0, $s3, $a0
/* AF77C 8011907C 00892025 */ or $a0, $a0, $t1
/* AF780 80119080 00771025 */ or $v0, $v1, $s7
/* AF784 80119084 004A1025 */ or $v0, $v0, $t2
/* AF788 80119088 004D1025 */ or $v0, $v0, $t5
/* AF78C 8011908C 00551025 */ or $v0, $v0, $s5
/* AF790 80119090 00481025 */ or $v0, $v0, $t0
/* AF794 80119094 004C1025 */ or $v0, $v0, $t4
/* AF798 80119098 00661825 */ or $v1, $v1, $a2
/* AF79C 8011909C ACE40000 */ sw $a0, 0x0($a3)
/* AF7A0 801190A0 ACE20004 */ sw $v0, 0x4($a3)
/* AF7A4 801190A4 8F020000 */ lw $v0, 0x0($t8)
/* AF7A8 801190A8 00651825 */ or $v1, $v1, $a1
/* AF7AC 801190AC 0040202D */ daddu $a0, $v0, $zero
/* AF7B0 801190B0 24420008 */ addiu $v0, $v0, 0x8
/* AF7B4 801190B4 AF020000 */ sw $v0, 0x0($t8)
/* AF7B8 801190B8 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* AF7BC 801190BC AC820000 */ sw $v0, 0x0($a0)
/* AF7C0 801190C0 000B17C2 */ srl $v0, $t3, 31
/* AF7C4 801190C4 01625821 */ addu $t3, $t3, $v0
/* AF7C8 801190C8 000B5843 */ sra $t3, $t3, 1
/* AF7CC 801190CC 01CB7021 */ addu $t6, $t6, $t3
/* AF7D0 801190D0 00101080 */ sll $v0, $s0, 2
/* AF7D4 801190D4 28420040 */ slti $v0, $v0, 0x40
/* AF7D8 801190D8 144001F3 */ bnez $v0, .L801198A8
/* AF7DC 801190DC AC830004 */ sw $v1, 0x4($a0)
/* AF7E0 801190E0 08046396 */ j .L80118E58
/* AF7E4 801190E4 00000000 */ nop
.L801190E8:
/* AF7E8 801190E8 03C0702D */ daddu $t6, $fp, $zero
/* AF7EC 801190EC 0000882D */ daddu $s1, $zero, $zero
/* AF7F0 801190F0 001910C0 */ sll $v0, $t9, 3
/* AF7F4 801190F4 28420040 */ slti $v0, $v0, 0x40
/* AF7F8 801190F8 144001EB */ bnez $v0, .L801198A8
/* AF7FC 801190FC 240F0001 */ addiu $t7, $zero, 0x1
/* AF800 80119100 31020007 */ andi $v0, $t0, 0x7
/* AF804 80119104 00021540 */ sll $v0, $v0, 21
/* AF808 80119108 AFA20040 */ sw $v0, 0x40($sp)
/* AF80C 8011910C 32E20003 */ andi $v0, $s7, 0x3
/* AF810 80119110 00029C80 */ sll $s3, $v0, 18
/* AF814 80119114 3C170700 */ lui $s7, (0x7000000 >> 16)
/* AF818 80119118 31220003 */ andi $v0, $t1, 0x3
/* AF81C 8011911C 00021200 */ sll $v0, $v0, 8
/* AF820 80119120 AFA2004C */ sw $v0, 0x4C($sp)
.L80119124:
/* AF824 80119124 15E00002 */ bnez $t7, .L80119130
/* AF828 80119128 024F001A */ div $zero, $s2, $t7
/* AF82C 8011912C 0007000D */ break 7
.L80119130:
/* AF830 80119130 2401FFFF */ addiu $at, $zero, -0x1
/* AF834 80119134 15E10004 */ bne $t7, $at, .L80119148
/* AF838 80119138 3C018000 */ lui $at, (0x80000000 >> 16)
/* AF83C 8011913C 16410002 */ bne $s2, $at, .L80119148
/* AF840 80119140 00000000 */ nop
/* AF844 80119144 0006000D */ break 6
.L80119148:
/* AF848 80119148 00003012 */ mflo $a2
/* AF84C 8011914C 10C001D6 */ beqz $a2, .L801198A8
/* AF850 80119150 3C10FD08 */ lui $s0, (0xFD080000 >> 16)
/* AF854 80119154 15E00002 */ bnez $t7, .L80119160
/* AF858 80119158 032F001A */ div $zero, $t9, $t7
/* AF85C 8011915C 0007000D */ break 7
.L80119160:
/* AF860 80119160 2401FFFF */ addiu $at, $zero, -0x1
/* AF864 80119164 15E10004 */ bne $t7, $at, .L80119178
/* AF868 80119168 3C018000 */ lui $at, (0x80000000 >> 16)
/* AF86C 8011916C 17210002 */ bne $t9, $at, .L80119178
/* AF870 80119170 00000000 */ nop
/* AF874 80119174 0006000D */ break 6
.L80119178:
/* AF878 80119178 00002812 */ mflo $a1
/* AF87C 8011917C 8F020000 */ lw $v0, 0x0($t8)
/* AF880 80119180 0040182D */ daddu $v1, $v0, $zero
/* AF884 80119184 24420008 */ addiu $v0, $v0, 0x8
/* AF888 80119188 AF020000 */ sw $v0, 0x0($t8)
/* AF88C 8011918C AC6E0004 */ sw $t6, 0x4($v1)
/* AF890 80119190 8FB40040 */ lw $s4, 0x40($sp)
/* AF894 80119194 24A7FFFF */ addiu $a3, $a1, -0x1
/* AF898 80119198 30E20FFF */ andi $v0, $a3, 0xFFF
/* AF89C 8011919C 00501025 */ or $v0, $v0, $s0
/* AF8A0 801191A0 02821025 */ or $v0, $s4, $v0
/* AF8A4 801191A4 24A40007 */ addiu $a0, $a1, 0x7
/* AF8A8 801191A8 000420C3 */ sra $a0, $a0, 3
/* AF8AC 801191AC 308401FF */ andi $a0, $a0, 0x1FF
/* AF8B0 801191B0 00042240 */ sll $a0, $a0, 9
/* AF8B4 801191B4 AC620000 */ sw $v0, 0x0($v1)
/* AF8B8 801191B8 8F020000 */ lw $v0, 0x0($t8)
/* AF8BC 801191BC 00B20018 */ mult $a1, $s2
/* AF8C0 801191C0 0040182D */ daddu $v1, $v0, $zero
/* AF8C4 801191C4 24420008 */ addiu $v0, $v0, 0x8
/* AF8C8 801191C8 AF020000 */ sw $v0, 0x0($t8)
/* AF8CC 801191CC 3C02F508 */ lui $v0, (0xF5080000 >> 16)
/* AF8D0 801191D0 00822025 */ or $a0, $a0, $v0
/* AF8D4 801191D4 02842025 */ or $a0, $s4, $a0
/* AF8D8 801191D8 01DE1023 */ subu $v0, $t6, $fp
/* AF8DC 801191DC 000210C2 */ srl $v0, $v0, 3
/* AF8E0 801191E0 00004012 */ mflo $t0
/* AF8E4 801191E4 304201FF */ andi $v0, $v0, 0x1FF
/* AF8E8 801191E8 00822025 */ or $a0, $a0, $v0
/* AF8EC 801191EC 15E00002 */ bnez $t7, .L801191F8
/* AF8F0 801191F0 010F001A */ div $zero, $t0, $t7
/* AF8F4 801191F4 0007000D */ break 7
.L801191F8:
/* AF8F8 801191F8 2401FFFF */ addiu $at, $zero, -0x1
/* AF8FC 801191FC 15E10004 */ bne $t7, $at, .L80119210
/* AF900 80119200 3C018000 */ lui $at, (0x80000000 >> 16)
/* AF904 80119204 15010002 */ bne $t0, $at, .L80119210
/* AF908 80119208 00000000 */ nop
/* AF90C 8011920C 0006000D */ break 6
.L80119210:
/* AF910 80119210 00006012 */ mflo $t4
/* AF914 80119214 322A000F */ andi $t2, $s1, 0xF
/* AF918 80119218 000A5A80 */ sll $t3, $t2, 10
/* AF91C 8011921C 00073880 */ sll $a3, $a3, 2
/* AF920 80119220 30E70FFF */ andi $a3, $a3, 0xFFF
/* AF924 80119224 00073B00 */ sll $a3, $a3, 12
/* AF928 80119228 24C5FFFF */ addiu $a1, $a2, -0x1
/* AF92C 8011922C 00052880 */ sll $a1, $a1, 2
/* AF930 80119230 30A50FFF */ andi $a1, $a1, 0xFFF
/* AF934 80119234 AC640000 */ sw $a0, 0x0($v1)
/* AF938 80119238 8FB00044 */ lw $s0, 0x44($sp)
/* AF93C 8011923C 8FB40048 */ lw $s4, 0x48($sp)
/* AF940 80119240 02114823 */ subu $t1, $s0, $s1
/* AF944 80119244 3129000F */ andi $t1, $t1, 0xF
/* AF948 80119248 00094B80 */ sll $t1, $t1, 14
/* AF94C 8011924C 8FB0004C */ lw $s0, 0x4C($sp)
/* AF950 80119250 01371025 */ or $v0, $t1, $s7
/* AF954 80119254 02621025 */ or $v0, $s3, $v0
/* AF958 80119258 004B1025 */ or $v0, $v0, $t3
/* AF95C 8011925C 00501025 */ or $v0, $v0, $s0
/* AF960 80119260 02914023 */ subu $t0, $s4, $s1
/* AF964 80119264 3108000F */ andi $t0, $t0, 0xF
/* AF968 80119268 00084100 */ sll $t0, $t0, 4
/* AF96C 8011926C 00481025 */ or $v0, $v0, $t0
/* AF970 80119270 004A1025 */ or $v0, $v0, $t2
/* AF974 80119274 AC620004 */ sw $v0, 0x4($v1)
/* AF978 80119278 8F020000 */ lw $v0, 0x0($t8)
/* AF97C 8011927C 000F7840 */ sll $t7, $t7, 1
/* AF980 80119280 0040182D */ daddu $v1, $v0, $zero
/* AF984 80119284 24420008 */ addiu $v0, $v0, 0x8
/* AF988 80119288 AF020000 */ sw $v0, 0x0($t8)
/* AF98C 8011928C 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* AF990 80119290 AC620000 */ sw $v0, 0x0($v1)
/* AF994 80119294 AC600004 */ sw $zero, 0x4($v1)
/* AF998 80119298 8F020000 */ lw $v0, 0x0($t8)
/* AF99C 8011929C 15E00002 */ bnez $t7, .L801192A8
/* AF9A0 801192A0 032F001A */ div $zero, $t9, $t7
/* AF9A4 801192A4 0007000D */ break 7
.L801192A8:
/* AF9A8 801192A8 2401FFFF */ addiu $at, $zero, -0x1
/* AF9AC 801192AC 15E10004 */ bne $t7, $at, .L801192C0
/* AF9B0 801192B0 3C018000 */ lui $at, (0x80000000 >> 16)
/* AF9B4 801192B4 17210002 */ bne $t9, $at, .L801192C0
/* AF9B8 801192B8 00000000 */ nop
/* AF9BC 801192BC 0006000D */ break 6
.L801192C0:
/* AF9C0 801192C0 00006812 */ mflo $t5
/* AF9C4 801192C4 0040182D */ daddu $v1, $v0, $zero
/* AF9C8 801192C8 24420008 */ addiu $v0, $v0, 0x8
/* AF9CC 801192CC AF020000 */ sw $v0, 0x0($t8)
/* AF9D0 801192D0 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* AF9D4 801192D4 AC620000 */ sw $v0, 0x0($v1)
/* AF9D8 801192D8 00B71025 */ or $v0, $a1, $s7
/* AF9DC 801192DC 00E21025 */ or $v0, $a3, $v0
/* AF9E0 801192E0 AC620004 */ sw $v0, 0x4($v1)
/* AF9E4 801192E4 8F020000 */ lw $v0, 0x0($t8)
/* AF9E8 801192E8 0040182D */ daddu $v1, $v0, $zero
/* AF9EC 801192EC 24420008 */ addiu $v0, $v0, 0x8
/* AF9F0 801192F0 AF020000 */ sw $v0, 0x0($t8)
/* AF9F4 801192F4 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* AF9F8 801192F8 AC620000 */ sw $v0, 0x0($v1)
/* AF9FC 801192FC AC600004 */ sw $zero, 0x4($v1)
/* AFA00 80119300 32230007 */ andi $v1, $s1, 0x7
/* AFA04 80119304 00031E00 */ sll $v1, $v1, 24
/* AFA08 80119308 8F020000 */ lw $v0, 0x0($t8)
/* AFA0C 8011930C 26310001 */ addiu $s1, $s1, 0x1
/* AFA10 80119310 0040302D */ daddu $a2, $v0, $zero
/* AFA14 80119314 24420008 */ addiu $v0, $v0, 0x8
/* AFA18 80119318 AF020000 */ sw $v0, 0x0($t8)
/* AFA1C 8011931C 00731025 */ or $v0, $v1, $s3
/* AFA20 80119320 00491025 */ or $v0, $v0, $t1
/* AFA24 80119324 004B1025 */ or $v0, $v0, $t3
/* AFA28 80119328 00501025 */ or $v0, $v0, $s0
/* AFA2C 8011932C 00481025 */ or $v0, $v0, $t0
/* AFA30 80119330 004A1025 */ or $v0, $v0, $t2
/* AFA34 80119334 00671825 */ or $v1, $v1, $a3
/* AFA38 80119338 ACC40000 */ sw $a0, 0x0($a2)
/* AFA3C 8011933C ACC20004 */ sw $v0, 0x4($a2)
/* AFA40 80119340 8F020000 */ lw $v0, 0x0($t8)
/* AFA44 80119344 00651825 */ or $v1, $v1, $a1
/* AFA48 80119348 0040202D */ daddu $a0, $v0, $zero
/* AFA4C 8011934C 24420008 */ addiu $v0, $v0, 0x8
/* AFA50 80119350 AF020000 */ sw $v0, 0x0($t8)
/* AFA54 80119354 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* AFA58 80119358 AC820000 */ sw $v0, 0x0($a0)
/* AFA5C 8011935C AC830004 */ sw $v1, 0x4($a0)
/* AFA60 80119360 000D10C0 */ sll $v0, $t5, 3
/* AFA64 80119364 28420040 */ slti $v0, $v0, 0x40
/* AFA68 80119368 1440014F */ bnez $v0, .L801198A8
/* AFA6C 8011936C 01CC7021 */ addu $t6, $t6, $t4
/* AFA70 80119370 08046449 */ j .L80119124
/* AFA74 80119374 00000000 */ nop
.L80119378:
/* AFA78 80119378 03C0702D */ daddu $t6, $fp, $zero
/* AFA7C 8011937C 0000882D */ daddu $s1, $zero, $zero
/* AFA80 80119380 00191100 */ sll $v0, $t9, 4
/* AFA84 80119384 28420040 */ slti $v0, $v0, 0x40
/* AFA88 80119388 14400147 */ bnez $v0, .L801198A8
/* AFA8C 8011938C 240F0001 */ addiu $t7, $zero, 0x1
/* AFA90 80119390 31020007 */ andi $v0, $t0, 0x7
/* AFA94 80119394 00021540 */ sll $v0, $v0, 21
/* AFA98 80119398 AFA20040 */ sw $v0, 0x40($sp)
/* AFA9C 8011939C 32E20003 */ andi $v0, $s7, 0x3
/* AFAA0 801193A0 00029C80 */ sll $s3, $v0, 18
/* AFAA4 801193A4 3C170700 */ lui $s7, (0x7000000 >> 16)
/* AFAA8 801193A8 31220003 */ andi $v0, $t1, 0x3
/* AFAAC 801193AC 00021200 */ sll $v0, $v0, 8
/* AFAB0 801193B0 AFA2004C */ sw $v0, 0x4C($sp)
.L801193B4:
/* AFAB4 801193B4 15E00002 */ bnez $t7, .L801193C0
/* AFAB8 801193B8 024F001A */ div $zero, $s2, $t7
/* AFABC 801193BC 0007000D */ break 7
.L801193C0:
/* AFAC0 801193C0 2401FFFF */ addiu $at, $zero, -0x1
/* AFAC4 801193C4 15E10004 */ bne $t7, $at, .L801193D8
/* AFAC8 801193C8 3C018000 */ lui $at, (0x80000000 >> 16)
/* AFACC 801193CC 16410002 */ bne $s2, $at, .L801193D8
/* AFAD0 801193D0 00000000 */ nop
/* AFAD4 801193D4 0006000D */ break 6
.L801193D8:
/* AFAD8 801193D8 00006012 */ mflo $t4
/* AFADC 801193DC 11800132 */ beqz $t4, .L801198A8
/* AFAE0 801193E0 3C10FD10 */ lui $s0, (0xFD100000 >> 16)
/* AFAE4 801193E4 15E00002 */ bnez $t7, .L801193F0
/* AFAE8 801193E8 032F001A */ div $zero, $t9, $t7
/* AFAEC 801193EC 0007000D */ break 7
.L801193F0:
/* AFAF0 801193F0 2401FFFF */ addiu $at, $zero, -0x1
/* AFAF4 801193F4 15E10004 */ bne $t7, $at, .L80119408
/* AFAF8 801193F8 3C018000 */ lui $at, (0x80000000 >> 16)
/* AFAFC 801193FC 17210002 */ bne $t9, $at, .L80119408
/* AFB00 80119400 00000000 */ nop
/* AFB04 80119404 0006000D */ break 6
.L80119408:
/* AFB08 80119408 00002012 */ mflo $a0
/* AFB0C 8011940C 8F020000 */ lw $v0, 0x0($t8)
/* AFB10 80119410 0040182D */ daddu $v1, $v0, $zero
/* AFB14 80119414 24420008 */ addiu $v0, $v0, 0x8
/* AFB18 80119418 AF020000 */ sw $v0, 0x0($t8)
/* AFB1C 8011941C AC6E0004 */ sw $t6, 0x4($v1)
/* AFB20 80119420 8FB40040 */ lw $s4, 0x40($sp)
/* AFB24 80119424 2486FFFF */ addiu $a2, $a0, -0x1
/* AFB28 80119428 30C20FFF */ andi $v0, $a2, 0xFFF
/* AFB2C 8011942C 00501025 */ or $v0, $v0, $s0
/* AFB30 80119430 02821025 */ or $v0, $s4, $v0
/* AFB34 80119434 AC620000 */ sw $v0, 0x0($v1)
/* AFB38 80119438 00041840 */ sll $v1, $a0, 1
/* AFB3C 8011943C 24630007 */ addiu $v1, $v1, 0x7
/* AFB40 80119440 000318C3 */ sra $v1, $v1, 3
/* AFB44 80119444 306301FF */ andi $v1, $v1, 0x1FF
/* AFB48 80119448 00031A40 */ sll $v1, $v1, 9
/* AFB4C 8011944C 8F020000 */ lw $v0, 0x0($t8)
/* AFB50 80119450 00920018 */ mult $a0, $s2
/* AFB54 80119454 0040282D */ daddu $a1, $v0, $zero
/* AFB58 80119458 24420008 */ addiu $v0, $v0, 0x8
/* AFB5C 8011945C AF020000 */ sw $v0, 0x0($t8)
/* AFB60 80119460 3C02F510 */ lui $v0, (0xF5100000 >> 16)
/* AFB64 80119464 00621825 */ or $v1, $v1, $v0
/* AFB68 80119468 02831825 */ or $v1, $s4, $v1
/* AFB6C 8011946C 01DE1023 */ subu $v0, $t6, $fp
/* AFB70 80119470 000210C2 */ srl $v0, $v0, 3
/* AFB74 80119474 304201FF */ andi $v0, $v0, 0x1FF
/* AFB78 80119478 00621825 */ or $v1, $v1, $v0
/* AFB7C 8011947C 00001012 */ mflo $v0
/* AFB80 80119480 00000000 */ nop
/* AFB84 80119484 15E00002 */ bnez $t7, .L80119490
/* AFB88 80119488 004F001A */ div $zero, $v0, $t7
/* AFB8C 8011948C 0007000D */ break 7
.L80119490:
/* AFB90 80119490 2401FFFF */ addiu $at, $zero, -0x1
/* AFB94 80119494 15E10004 */ bne $t7, $at, .L801194A8
/* AFB98 80119498 3C018000 */ lui $at, (0x80000000 >> 16)
/* AFB9C 8011949C 14410002 */ bne $v0, $at, .L801194A8
/* AFBA0 801194A0 00000000 */ nop
/* AFBA4 801194A4 0006000D */ break 6
.L801194A8:
/* AFBA8 801194A8 00005012 */ mflo $t2
/* AFBAC 801194AC 3229000F */ andi $t1, $s1, 0xF
/* AFBB0 801194B0 00095A80 */ sll $t3, $t1, 10
/* AFBB4 801194B4 00063080 */ sll $a2, $a2, 2
/* AFBB8 801194B8 30C60FFF */ andi $a2, $a2, 0xFFF
/* AFBBC 801194BC 00063300 */ sll $a2, $a2, 12
/* AFBC0 801194C0 ACA30000 */ sw $v1, 0x0($a1)
/* AFBC4 801194C4 8FB00044 */ lw $s0, 0x44($sp)
/* AFBC8 801194C8 8FB40048 */ lw $s4, 0x48($sp)
/* AFBCC 801194CC 02114023 */ subu $t0, $s0, $s1
/* AFBD0 801194D0 3108000F */ andi $t0, $t0, 0xF
/* AFBD4 801194D4 00084380 */ sll $t0, $t0, 14
/* AFBD8 801194D8 02913823 */ subu $a3, $s4, $s1
/* AFBDC 801194DC 30E7000F */ andi $a3, $a3, 0xF
/* AFBE0 801194E0 00073900 */ sll $a3, $a3, 4
/* AFBE4 801194E4 8FB0004C */ lw $s0, 0x4C($sp)
/* AFBE8 801194E8 01171025 */ or $v0, $t0, $s7
/* AFBEC 801194EC 02621025 */ or $v0, $s3, $v0
/* AFBF0 801194F0 004B1025 */ or $v0, $v0, $t3
/* AFBF4 801194F4 00501025 */ or $v0, $v0, $s0
/* AFBF8 801194F8 00471025 */ or $v0, $v0, $a3
/* AFBFC 801194FC 00491025 */ or $v0, $v0, $t1
/* AFC00 80119500 000F7840 */ sll $t7, $t7, 1
/* AFC04 80119504 ACA20004 */ sw $v0, 0x4($a1)
/* AFC08 80119508 2585FFFF */ addiu $a1, $t4, -0x1
/* AFC0C 8011950C 00052880 */ sll $a1, $a1, 2
/* AFC10 80119510 8F020000 */ lw $v0, 0x0($t8)
/* AFC14 80119514 30A50FFF */ andi $a1, $a1, 0xFFF
/* AFC18 80119518 0040202D */ daddu $a0, $v0, $zero
/* AFC1C 8011951C 24420008 */ addiu $v0, $v0, 0x8
/* AFC20 80119520 AF020000 */ sw $v0, 0x0($t8)
/* AFC24 80119524 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* AFC28 80119528 AC820000 */ sw $v0, 0x0($a0)
/* AFC2C 8011952C AC800004 */ sw $zero, 0x4($a0)
/* AFC30 80119530 8F020000 */ lw $v0, 0x0($t8)
/* AFC34 80119534 15E00002 */ bnez $t7, .L80119540
/* AFC38 80119538 032F001A */ div $zero, $t9, $t7
/* AFC3C 8011953C 0007000D */ break 7
.L80119540:
/* AFC40 80119540 2401FFFF */ addiu $at, $zero, -0x1
/* AFC44 80119544 15E10004 */ bne $t7, $at, .L80119558
/* AFC48 80119548 3C018000 */ lui $at, (0x80000000 >> 16)
/* AFC4C 8011954C 17210002 */ bne $t9, $at, .L80119558
/* AFC50 80119550 00000000 */ nop
/* AFC54 80119554 0006000D */ break 6
.L80119558:
/* AFC58 80119558 00006812 */ mflo $t5
/* AFC5C 8011955C 0040202D */ daddu $a0, $v0, $zero
/* AFC60 80119560 24420008 */ addiu $v0, $v0, 0x8
/* AFC64 80119564 AF020000 */ sw $v0, 0x0($t8)
/* AFC68 80119568 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* AFC6C 8011956C AC820000 */ sw $v0, 0x0($a0)
/* AFC70 80119570 00B71025 */ or $v0, $a1, $s7
/* AFC74 80119574 00C21025 */ or $v0, $a2, $v0
/* AFC78 80119578 AC820004 */ sw $v0, 0x4($a0)
/* AFC7C 8011957C 8F020000 */ lw $v0, 0x0($t8)
/* AFC80 80119580 0040202D */ daddu $a0, $v0, $zero
/* AFC84 80119584 24420008 */ addiu $v0, $v0, 0x8
/* AFC88 80119588 AF020000 */ sw $v0, 0x0($t8)
/* AFC8C 8011958C 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* AFC90 80119590 AC820000 */ sw $v0, 0x0($a0)
/* AFC94 80119594 AC800004 */ sw $zero, 0x4($a0)
/* AFC98 80119598 8F020000 */ lw $v0, 0x0($t8)
/* AFC9C 8011959C 0040202D */ daddu $a0, $v0, $zero
/* AFCA0 801195A0 24420008 */ addiu $v0, $v0, 0x8
/* AFCA4 801195A4 AF020000 */ sw $v0, 0x0($t8)
/* AFCA8 801195A8 AC830000 */ sw $v1, 0x0($a0)
/* AFCAC 801195AC 32230007 */ andi $v1, $s1, 0x7
/* AFCB0 801195B0 00031E00 */ sll $v1, $v1, 24
/* AFCB4 801195B4 00731025 */ or $v0, $v1, $s3
/* AFCB8 801195B8 00481025 */ or $v0, $v0, $t0
/* AFCBC 801195BC 004B1025 */ or $v0, $v0, $t3
/* AFCC0 801195C0 00501025 */ or $v0, $v0, $s0
/* AFCC4 801195C4 00471025 */ or $v0, $v0, $a3
/* AFCC8 801195C8 00491025 */ or $v0, $v0, $t1
/* AFCCC 801195CC 26310001 */ addiu $s1, $s1, 0x1
/* AFCD0 801195D0 00661825 */ or $v1, $v1, $a2
/* AFCD4 801195D4 AC820004 */ sw $v0, 0x4($a0)
/* AFCD8 801195D8 8F020000 */ lw $v0, 0x0($t8)
/* AFCDC 801195DC 00651825 */ or $v1, $v1, $a1
/* AFCE0 801195E0 0040202D */ daddu $a0, $v0, $zero
/* AFCE4 801195E4 24420008 */ addiu $v0, $v0, 0x8
/* AFCE8 801195E8 AF020000 */ sw $v0, 0x0($t8)
/* AFCEC 801195EC 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* AFCF0 801195F0 AC820000 */ sw $v0, 0x0($a0)
/* AFCF4 801195F4 AC830004 */ sw $v1, 0x4($a0)
/* AFCF8 801195F8 000A5040 */ sll $t2, $t2, 1
/* AFCFC 801195FC 000D1100 */ sll $v0, $t5, 4
/* AFD00 80119600 28420040 */ slti $v0, $v0, 0x40
/* AFD04 80119604 144000A8 */ bnez $v0, .L801198A8
/* AFD08 80119608 01CA7021 */ addu $t6, $t6, $t2
/* AFD0C 8011960C 080464ED */ j .L801193B4
/* AFD10 80119610 00000000 */ nop
.L80119614:
/* AFD14 80119614 03C0702D */ daddu $t6, $fp, $zero
/* AFD18 80119618 0000882D */ daddu $s1, $zero, $zero
/* AFD1C 8011961C 00191140 */ sll $v0, $t9, 5
/* AFD20 80119620 28420040 */ slti $v0, $v0, 0x40
/* AFD24 80119624 144000A0 */ bnez $v0, .L801198A8
/* AFD28 80119628 240F0001 */ addiu $t7, $zero, 0x1
/* AFD2C 8011962C 31020007 */ andi $v0, $t0, 0x7
/* AFD30 80119630 00021540 */ sll $v0, $v0, 21
/* AFD34 80119634 AFA20040 */ sw $v0, 0x40($sp)
/* AFD38 80119638 32E20003 */ andi $v0, $s7, 0x3
/* AFD3C 8011963C 00029C80 */ sll $s3, $v0, 18
/* AFD40 80119640 3C170700 */ lui $s7, (0x7000000 >> 16)
/* AFD44 80119644 31220003 */ andi $v0, $t1, 0x3
/* AFD48 80119648 00021200 */ sll $v0, $v0, 8
/* AFD4C 8011964C AFA2004C */ sw $v0, 0x4C($sp)
.L80119650:
/* AFD50 80119650 15E00002 */ bnez $t7, .L8011965C
/* AFD54 80119654 024F001A */ div $zero, $s2, $t7
/* AFD58 80119658 0007000D */ break 7
.L8011965C:
/* AFD5C 8011965C 2401FFFF */ addiu $at, $zero, -0x1
/* AFD60 80119660 15E10004 */ bne $t7, $at, .L80119674
/* AFD64 80119664 3C018000 */ lui $at, (0x80000000 >> 16)
/* AFD68 80119668 16410002 */ bne $s2, $at, .L80119674
/* AFD6C 8011966C 00000000 */ nop
/* AFD70 80119670 0006000D */ break 6
.L80119674:
/* AFD74 80119674 00006012 */ mflo $t4
/* AFD78 80119678 1180008B */ beqz $t4, .L801198A8
/* AFD7C 8011967C 3C10FD18 */ lui $s0, (0xFD180000 >> 16)
/* AFD80 80119680 15E00002 */ bnez $t7, .L8011968C
/* AFD84 80119684 032F001A */ div $zero, $t9, $t7
/* AFD88 80119688 0007000D */ break 7
.L8011968C:
/* AFD8C 8011968C 2401FFFF */ addiu $at, $zero, -0x1
/* AFD90 80119690 15E10004 */ bne $t7, $at, .L801196A4
/* AFD94 80119694 3C018000 */ lui $at, (0x80000000 >> 16)
/* AFD98 80119698 17210002 */ bne $t9, $at, .L801196A4
/* AFD9C 8011969C 00000000 */ nop
/* AFDA0 801196A0 0006000D */ break 6
.L801196A4:
/* AFDA4 801196A4 00002012 */ mflo $a0
/* AFDA8 801196A8 8F020000 */ lw $v0, 0x0($t8)
/* AFDAC 801196AC 0040182D */ daddu $v1, $v0, $zero
/* AFDB0 801196B0 24420008 */ addiu $v0, $v0, 0x8
/* AFDB4 801196B4 AF020000 */ sw $v0, 0x0($t8)
/* AFDB8 801196B8 AC6E0004 */ sw $t6, 0x4($v1)
/* AFDBC 801196BC 8FB40040 */ lw $s4, 0x40($sp)
/* AFDC0 801196C0 2486FFFF */ addiu $a2, $a0, -0x1
/* AFDC4 801196C4 30C20FFF */ andi $v0, $a2, 0xFFF
/* AFDC8 801196C8 00501025 */ or $v0, $v0, $s0
/* AFDCC 801196CC 02821025 */ or $v0, $s4, $v0
/* AFDD0 801196D0 AC620000 */ sw $v0, 0x0($v1)
/* AFDD4 801196D4 00041840 */ sll $v1, $a0, 1
/* AFDD8 801196D8 24630007 */ addiu $v1, $v1, 0x7
/* AFDDC 801196DC 000318C3 */ sra $v1, $v1, 3
/* AFDE0 801196E0 306301FF */ andi $v1, $v1, 0x1FF
/* AFDE4 801196E4 00031A40 */ sll $v1, $v1, 9
/* AFDE8 801196E8 8F020000 */ lw $v0, 0x0($t8)
/* AFDEC 801196EC 00920018 */ mult $a0, $s2
/* AFDF0 801196F0 0040282D */ daddu $a1, $v0, $zero
/* AFDF4 801196F4 24420008 */ addiu $v0, $v0, 0x8
/* AFDF8 801196F8 AF020000 */ sw $v0, 0x0($t8)
/* AFDFC 801196FC 3C02F518 */ lui $v0, (0xF5180000 >> 16)
/* AFE00 80119700 00621825 */ or $v1, $v1, $v0
/* AFE04 80119704 02831825 */ or $v1, $s4, $v1
/* AFE08 80119708 01DE1023 */ subu $v0, $t6, $fp
/* AFE0C 8011970C 00021102 */ srl $v0, $v0, 4
/* AFE10 80119710 304201FF */ andi $v0, $v0, 0x1FF
/* AFE14 80119714 00621825 */ or $v1, $v1, $v0
/* AFE18 80119718 00001012 */ mflo $v0
/* AFE1C 8011971C 00000000 */ nop
/* AFE20 80119720 15E00002 */ bnez $t7, .L8011972C
/* AFE24 80119724 004F001A */ div $zero, $v0, $t7
/* AFE28 80119728 0007000D */ break 7
.L8011972C:
/* AFE2C 8011972C 2401FFFF */ addiu $at, $zero, -0x1
/* AFE30 80119730 15E10004 */ bne $t7, $at, .L80119744
/* AFE34 80119734 3C018000 */ lui $at, (0x80000000 >> 16)
/* AFE38 80119738 14410002 */ bne $v0, $at, .L80119744
/* AFE3C 8011973C 00000000 */ nop
/* AFE40 80119740 0006000D */ break 6
.L80119744:
/* AFE44 80119744 00005012 */ mflo $t2
/* AFE48 80119748 3229000F */ andi $t1, $s1, 0xF
/* AFE4C 8011974C 00095A80 */ sll $t3, $t1, 10
/* AFE50 80119750 00063080 */ sll $a2, $a2, 2
/* AFE54 80119754 30C60FFF */ andi $a2, $a2, 0xFFF
/* AFE58 80119758 00063300 */ sll $a2, $a2, 12
/* AFE5C 8011975C ACA30000 */ sw $v1, 0x0($a1)
/* AFE60 80119760 8FB00044 */ lw $s0, 0x44($sp)
/* AFE64 80119764 8FB40048 */ lw $s4, 0x48($sp)
/* AFE68 80119768 02114023 */ subu $t0, $s0, $s1
/* AFE6C 8011976C 3108000F */ andi $t0, $t0, 0xF
/* AFE70 80119770 00084380 */ sll $t0, $t0, 14
/* AFE74 80119774 02913823 */ subu $a3, $s4, $s1
/* AFE78 80119778 30E7000F */ andi $a3, $a3, 0xF
/* AFE7C 8011977C 00073900 */ sll $a3, $a3, 4
/* AFE80 80119780 8FB0004C */ lw $s0, 0x4C($sp)
/* AFE84 80119784 01171025 */ or $v0, $t0, $s7
/* AFE88 80119788 02621025 */ or $v0, $s3, $v0
/* AFE8C 8011978C 004B1025 */ or $v0, $v0, $t3
/* AFE90 80119790 00501025 */ or $v0, $v0, $s0
/* AFE94 80119794 00471025 */ or $v0, $v0, $a3
/* AFE98 80119798 00491025 */ or $v0, $v0, $t1
/* AFE9C 8011979C 000F7840 */ sll $t7, $t7, 1
/* AFEA0 801197A0 ACA20004 */ sw $v0, 0x4($a1)
/* AFEA4 801197A4 2585FFFF */ addiu $a1, $t4, -0x1
/* AFEA8 801197A8 00052880 */ sll $a1, $a1, 2
/* AFEAC 801197AC 8F020000 */ lw $v0, 0x0($t8)
/* AFEB0 801197B0 30A50FFF */ andi $a1, $a1, 0xFFF
/* AFEB4 801197B4 0040202D */ daddu $a0, $v0, $zero
/* AFEB8 801197B8 24420008 */ addiu $v0, $v0, 0x8
/* AFEBC 801197BC AF020000 */ sw $v0, 0x0($t8)
/* AFEC0 801197C0 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* AFEC4 801197C4 AC820000 */ sw $v0, 0x0($a0)
/* AFEC8 801197C8 AC800004 */ sw $zero, 0x4($a0)
/* AFECC 801197CC 8F020000 */ lw $v0, 0x0($t8)
/* AFED0 801197D0 15E00002 */ bnez $t7, .L801197DC
/* AFED4 801197D4 032F001A */ div $zero, $t9, $t7
/* AFED8 801197D8 0007000D */ break 7
.L801197DC:
/* AFEDC 801197DC 2401FFFF */ addiu $at, $zero, -0x1
/* AFEE0 801197E0 15E10004 */ bne $t7, $at, .L801197F4
/* AFEE4 801197E4 3C018000 */ lui $at, (0x80000000 >> 16)
/* AFEE8 801197E8 17210002 */ bne $t9, $at, .L801197F4
/* AFEEC 801197EC 00000000 */ nop
/* AFEF0 801197F0 0006000D */ break 6
.L801197F4:
/* AFEF4 801197F4 00006812 */ mflo $t5
/* AFEF8 801197F8 0040202D */ daddu $a0, $v0, $zero
/* AFEFC 801197FC 24420008 */ addiu $v0, $v0, 0x8
/* AFF00 80119800 AF020000 */ sw $v0, 0x0($t8)
/* AFF04 80119804 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* AFF08 80119808 AC820000 */ sw $v0, 0x0($a0)
/* AFF0C 8011980C 00B71025 */ or $v0, $a1, $s7
/* AFF10 80119810 00C21025 */ or $v0, $a2, $v0
/* AFF14 80119814 AC820004 */ sw $v0, 0x4($a0)
/* AFF18 80119818 8F020000 */ lw $v0, 0x0($t8)
/* AFF1C 8011981C 0040202D */ daddu $a0, $v0, $zero
/* AFF20 80119820 24420008 */ addiu $v0, $v0, 0x8
/* AFF24 80119824 AF020000 */ sw $v0, 0x0($t8)
/* AFF28 80119828 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* AFF2C 8011982C AC820000 */ sw $v0, 0x0($a0)
/* AFF30 80119830 AC800004 */ sw $zero, 0x4($a0)
/* AFF34 80119834 8F020000 */ lw $v0, 0x0($t8)
/* AFF38 80119838 0040202D */ daddu $a0, $v0, $zero
/* AFF3C 8011983C 24420008 */ addiu $v0, $v0, 0x8
/* AFF40 80119840 AF020000 */ sw $v0, 0x0($t8)
/* AFF44 80119844 AC830000 */ sw $v1, 0x0($a0)
/* AFF48 80119848 32230007 */ andi $v1, $s1, 0x7
/* AFF4C 8011984C 00031E00 */ sll $v1, $v1, 24
/* AFF50 80119850 00731025 */ or $v0, $v1, $s3
/* AFF54 80119854 00481025 */ or $v0, $v0, $t0
/* AFF58 80119858 004B1025 */ or $v0, $v0, $t3
/* AFF5C 8011985C 00501025 */ or $v0, $v0, $s0
/* AFF60 80119860 00471025 */ or $v0, $v0, $a3
/* AFF64 80119864 00491025 */ or $v0, $v0, $t1
/* AFF68 80119868 26310001 */ addiu $s1, $s1, 0x1
/* AFF6C 8011986C 00661825 */ or $v1, $v1, $a2
/* AFF70 80119870 AC820004 */ sw $v0, 0x4($a0)
/* AFF74 80119874 8F020000 */ lw $v0, 0x0($t8)
/* AFF78 80119878 00651825 */ or $v1, $v1, $a1
/* AFF7C 8011987C 0040202D */ daddu $a0, $v0, $zero
/* AFF80 80119880 24420008 */ addiu $v0, $v0, 0x8
/* AFF84 80119884 AF020000 */ sw $v0, 0x0($t8)
/* AFF88 80119888 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* AFF8C 8011988C AC820000 */ sw $v0, 0x0($a0)
/* AFF90 80119890 AC830004 */ sw $v1, 0x4($a0)
/* AFF94 80119894 000A5080 */ sll $t2, $t2, 2
/* AFF98 80119898 000D1140 */ sll $v0, $t5, 5
/* AFF9C 8011989C 28420040 */ slti $v0, $v0, 0x40
/* AFFA0 801198A0 1040FF6B */ beqz $v0, .L80119650
/* AFFA4 801198A4 01CA7021 */ addu $t6, $t6, $t2
.L801198A8:
/* AFFA8 801198A8 3C04D700 */ lui $a0, (0xD7000002 >> 16)
.L801198AC:
/* AFFAC 801198AC 8F020000 */ lw $v0, 0x0($t8)
/* AFFB0 801198B0 34840002 */ ori $a0, $a0, (0xD7000002 & 0xFFFF)
/* AFFB4 801198B4 0040182D */ daddu $v1, $v0, $zero
/* AFFB8 801198B8 24420008 */ addiu $v0, $v0, 0x8
/* AFFBC 801198BC AF020000 */ sw $v0, 0x0($t8)
/* AFFC0 801198C0 2622FFFF */ addiu $v0, $s1, -0x1
/* AFFC4 801198C4 30420007 */ andi $v0, $v0, 0x7
/* AFFC8 801198C8 000212C0 */ sll $v0, $v0, 11
/* AFFCC 801198CC 00441025 */ or $v0, $v0, $a0
/* AFFD0 801198D0 AC620000 */ sw $v0, 0x0($v1)
/* AFFD4 801198D4 2402FFFF */ addiu $v0, $zero, -0x1
/* AFFD8 801198D8 08046B31 */ j .L8011ACC4
/* AFFDC 801198DC AC620004 */ sw $v0, 0x4($v1)
.L801198E0:
/* AFFE0 801198E0 3C03D700 */ lui $v1, (0xD7000002 >> 16)
/* AFFE4 801198E4 34630002 */ ori $v1, $v1, (0xD7000002 & 0xFFFF)
/* AFFE8 801198E8 24820010 */ addiu $v0, $a0, 0x10
/* AFFEC 801198EC AF020000 */ sw $v0, 0x0($t8)
/* AFFF0 801198F0 2402FFFF */ addiu $v0, $zero, -0x1
/* AFFF4 801198F4 AC830008 */ sw $v1, 0x8($a0)
/* AFFF8 801198F8 AC82000C */ sw $v0, 0xC($a0)
/* AFFFC 801198FC 8F020000 */ lw $v0, 0x0($t8)
/* B0000 80119900 AFA00038 */ sw $zero, 0x38($sp)
/* B0004 80119904 0040182D */ daddu $v1, $v0, $zero
/* B0008 80119908 24420008 */ addiu $v0, $v0, 0x8
/* B000C 8011990C AF020000 */ sw $v0, 0x0($t8)
/* B0010 80119910 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B0014 80119914 AC620000 */ sw $v0, 0x0($v1)
/* B0018 80119918 10A60098 */ beq $a1, $a2, .L80119B7C
/* B001C 8011991C AC600004 */ sw $zero, 0x4($v1)
/* B0020 80119920 28A20002 */ slti $v0, $a1, 0x2
/* B0024 80119924 10400005 */ beqz $v0, .L8011993C
/* B0028 80119928 00000000 */ nop
/* B002C 8011992C 10A00009 */ beqz $a1, .L80119954
/* B0030 80119930 3C03E300 */ lui $v1, (0xE3000C0F >> 16)
/* B0034 80119934 08046B32 */ j .L8011ACC8
/* B0038 80119938 00000000 */ nop
.L8011993C:
/* B003C 8011993C 10AB0118 */ beq $a1, $t3, .L80119DA0
/* B0040 80119940 24020003 */ addiu $v0, $zero, 0x3
/* B0044 80119944 10A20177 */ beq $a1, $v0, .L80119F24
/* B0048 80119948 3C03E300 */ lui $v1, (0xE3000C0F >> 16)
/* B004C 8011994C 08046B32 */ j .L8011ACC8
/* B0050 80119950 00000000 */ nop
.L80119954:
/* B0054 80119954 31030007 */ andi $v1, $t0, 0x7
/* B0058 80119958 8F020000 */ lw $v0, 0x0($t8)
/* B005C 8011995C 00031D40 */ sll $v1, $v1, 21
/* B0060 80119960 0040202D */ daddu $a0, $v0, $zero
/* B0064 80119964 24420008 */ addiu $v0, $v0, 0x8
/* B0068 80119968 AF020000 */ sw $v0, 0x0($t8)
/* B006C 8011996C 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* B0070 80119970 00621025 */ or $v0, $v1, $v0
/* B0074 80119974 AC820000 */ sw $v0, 0x0($a0)
/* B0078 80119978 AC9E0004 */ sw $fp, 0x4($a0)
/* B007C 8011997C 8F020000 */ lw $v0, 0x0($t8)
/* B0080 80119980 3C070700 */ lui $a3, (0x7000000 >> 16)
/* B0084 80119984 0040202D */ daddu $a0, $v0, $zero
/* B0088 80119988 24420008 */ addiu $v0, $v0, 0x8
/* B008C 8011998C AF020000 */ sw $v0, 0x0($t8)
/* B0090 80119990 3C02F510 */ lui $v0, (0xF5100000 >> 16)
/* B0094 80119994 00621825 */ or $v1, $v1, $v0
/* B0098 80119998 AC830000 */ sw $v1, 0x0($a0)
/* B009C 8011999C 32E30003 */ andi $v1, $s7, 0x3
/* B00A0 801199A0 00031C80 */ sll $v1, $v1, 18
/* B00A4 801199A4 8FB00044 */ lw $s0, 0x44($sp)
/* B00A8 801199A8 8FB40048 */ lw $s4, 0x48($sp)
/* B00AC 801199AC 00101380 */ sll $v0, $s0, 14
/* B00B0 801199B0 00471025 */ or $v0, $v0, $a3
/* B00B4 801199B4 00621825 */ or $v1, $v1, $v0
/* B00B8 801199B8 31220003 */ andi $v0, $t1, 0x3
/* B00BC 801199BC 00021200 */ sll $v0, $v0, 8
/* B00C0 801199C0 00621825 */ or $v1, $v1, $v0
/* B00C4 801199C4 00141100 */ sll $v0, $s4, 4
/* B00C8 801199C8 00621825 */ or $v1, $v1, $v0
/* B00CC 801199CC AC830004 */ sw $v1, 0x4($a0)
/* B00D0 801199D0 8F020000 */ lw $v0, 0x0($t8)
/* B00D4 801199D4 0040182D */ daddu $v1, $v0, $zero
/* B00D8 801199D8 24420008 */ addiu $v0, $v0, 0x8
/* B00DC 801199DC AF020000 */ sw $v0, 0x0($t8)
/* B00E0 801199E0 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* B00E4 801199E4 AC620000 */ sw $v0, 0x0($v1)
/* B00E8 801199E8 AC600004 */ sw $zero, 0x4($v1)
/* B00EC 801199EC 8F020000 */ lw $v0, 0x0($t8)
/* B00F0 801199F0 0320202D */ daddu $a0, $t9, $zero
/* B00F4 801199F4 0040302D */ daddu $a2, $v0, $zero
/* B00F8 801199F8 24420008 */ addiu $v0, $v0, 0x8
/* B00FC 801199FC AF020000 */ sw $v0, 0x0($t8)
/* B0100 80119A00 3C02F300 */ lui $v0, (0xF3000000 >> 16)
/* B0104 80119A04 07210002 */ bgez $t9, .L80119A10
/* B0108 80119A08 ACC20000 */ sw $v0, 0x0($a2)
/* B010C 80119A0C 2724000F */ addiu $a0, $t9, 0xF
.L80119A10:
/* B0110 80119A10 00042903 */ sra $a1, $a0, 4
/* B0114 80119A14 18A00002 */ blez $a1, .L80119A20
/* B0118 80119A18 24030800 */ addiu $v1, $zero, 0x800
/* B011C 80119A1C 24A307FF */ addiu $v1, $a1, 0x7FF
.L80119A20:
/* B0120 80119A20 03320018 */ mult $t9, $s2
/* B0124 80119A24 00008012 */ mflo $s0
/* B0128 80119A28 26020003 */ addiu $v0, $s0, 0x3
/* B012C 80119A2C 00021083 */ sra $v0, $v0, 2
/* B0130 80119A30 2444FFFF */ addiu $a0, $v0, -0x1
/* B0134 80119A34 28820800 */ slti $v0, $a0, 0x800
/* B0138 80119A38 50400001 */ beql $v0, $zero, .L80119A40
/* B013C 80119A3C 240407FF */ addiu $a0, $zero, 0x7FF
.L80119A40:
/* B0140 80119A40 30820FFF */ andi $v0, $a0, 0xFFF
/* B0144 80119A44 00021300 */ sll $v0, $v0, 12
/* B0148 80119A48 18A0000D */ blez $a1, .L80119A80
/* B014C 80119A4C 00472025 */ or $a0, $v0, $a3
/* B0150 80119A50 14A00002 */ bnez $a1, .L80119A5C
/* B0154 80119A54 0065001A */ div $zero, $v1, $a1
/* B0158 80119A58 0007000D */ break 7
.L80119A5C:
/* B015C 80119A5C 2401FFFF */ addiu $at, $zero, -0x1
/* B0160 80119A60 14A10004 */ bne $a1, $at, .L80119A74
/* B0164 80119A64 3C018000 */ lui $at, (0x80000000 >> 16)
/* B0168 80119A68 14610002 */ bne $v1, $at, .L80119A74
/* B016C 80119A6C 00000000 */ nop
/* B0170 80119A70 0006000D */ break 6
.L80119A74:
/* B0174 80119A74 00001012 */ mflo $v0
/* B0178 80119A78 080466A1 */ j .L80119A84
/* B017C 80119A7C 30420FFF */ andi $v0, $v0, 0xFFF
.L80119A80:
/* B0180 80119A80 30620FFF */ andi $v0, $v1, 0xFFF
.L80119A84:
/* B0184 80119A84 00821025 */ or $v0, $a0, $v0
/* B0188 80119A88 ACC20004 */ sw $v0, 0x4($a2)
/* B018C 80119A8C 31080007 */ andi $t0, $t0, 0x7
/* B0190 80119A90 00084540 */ sll $t0, $t0, 21
/* B0194 80119A94 32E40003 */ andi $a0, $s7, 0x3
/* B0198 80119A98 00042480 */ sll $a0, $a0, 18
/* B019C 80119A9C 312A0003 */ andi $t2, $t1, 0x3
/* B01A0 80119AA0 000A5200 */ sll $t2, $t2, 8
/* B01A4 80119AA4 3C0DF200 */ lui $t5, (0xF2000000 >> 16)
/* B01A8 80119AA8 00124843 */ sra $t1, $s2, 1
/* B01AC 80119AAC 2526FFFF */ addiu $a2, $t1, -0x1
/* B01B0 80119AB0 00063080 */ sll $a2, $a2, 2
/* B01B4 80119AB4 8F020000 */ lw $v0, 0x0($t8)
/* B01B8 80119AB8 03290018 */ mult $t9, $t1
/* B01BC 80119ABC 0040182D */ daddu $v1, $v0, $zero
/* B01C0 80119AC0 24420008 */ addiu $v0, $v0, 0x8
/* B01C4 80119AC4 AF020000 */ sw $v0, 0x0($t8)
/* B01C8 80119AC8 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B01CC 80119ACC AC620000 */ sw $v0, 0x0($v1)
/* B01D0 80119AD0 AC600004 */ sw $zero, 0x4($v1)
/* B01D4 80119AD4 8F020000 */ lw $v0, 0x0($t8)
/* B01D8 80119AD8 3C03F500 */ lui $v1, (0xF5000000 >> 16)
/* B01DC 80119ADC 0040282D */ daddu $a1, $v0, $zero
/* B01E0 80119AE0 24420008 */ addiu $v0, $v0, 0x8
/* B01E4 80119AE4 AF020000 */ sw $v0, 0x0($t8)
/* B01E8 80119AE8 00191043 */ sra $v0, $t9, 1
/* B01EC 80119AEC 24420007 */ addiu $v0, $v0, 0x7
/* B01F0 80119AF0 000210C3 */ sra $v0, $v0, 3
/* B01F4 80119AF4 304201FF */ andi $v0, $v0, 0x1FF
/* B01F8 80119AF8 00021240 */ sll $v0, $v0, 9
/* B01FC 80119AFC 00431025 */ or $v0, $v0, $v1
/* B0200 80119B00 01024025 */ or $t0, $t0, $v0
/* B0204 80119B04 ACA80000 */ sw $t0, 0x0($a1)
/* B0208 80119B08 8FB00044 */ lw $s0, 0x44($sp)
/* B020C 80119B0C 8FB40048 */ lw $s4, 0x48($sp)
/* B0210 80119B10 2607FFFF */ addiu $a3, $s0, -0x1
/* B0214 80119B14 30E7000F */ andi $a3, $a3, 0xF
/* B0218 80119B18 00073B80 */ sll $a3, $a3, 14
/* B021C 80119B1C 00871025 */ or $v0, $a0, $a3
/* B0220 80119B20 004A1025 */ or $v0, $v0, $t2
/* B0224 80119B24 00146100 */ sll $t4, $s4, 4
/* B0228 80119B28 004C1025 */ or $v0, $v0, $t4
/* B022C 80119B2C ACA20004 */ sw $v0, 0x4($a1)
/* B0230 80119B30 2725FFFF */ addiu $a1, $t9, -0x1
/* B0234 80119B34 00052880 */ sll $a1, $a1, 2
/* B0238 80119B38 30A30FFF */ andi $v1, $a1, 0xFFF
/* B023C 80119B3C 8F020000 */ lw $v0, 0x0($t8)
/* B0240 80119B40 00031B00 */ sll $v1, $v1, 12
/* B0244 80119B44 0040582D */ daddu $t3, $v0, $zero
/* B0248 80119B48 24420008 */ addiu $v0, $v0, 0x8
/* B024C 80119B4C AF020000 */ sw $v0, 0x0($t8)
/* B0250 80119B50 30C20FFF */ andi $v0, $a2, 0xFFF
/* B0254 80119B54 00621825 */ or $v1, $v1, $v0
/* B0258 80119B58 AD6D0000 */ sw $t5, 0x0($t3)
/* B025C 80119B5C AD630004 */ sw $v1, 0x4($t3)
/* B0260 80119B60 8F020000 */ lw $v0, 0x0($t8)
/* B0264 80119B64 00008012 */ mflo $s0
/* B0268 80119B68 0040182D */ daddu $v1, $v0, $zero
/* B026C 80119B6C 24420008 */ addiu $v0, $v0, 0x8
/* B0270 80119B70 AF020000 */ sw $v0, 0x0($t8)
/* B0274 80119B74 0804684D */ j .L8011A134
/* B0278 80119B78 00101043 */ sra $v0, $s0, 1
.L80119B7C:
/* B027C 80119B7C 31030007 */ andi $v1, $t0, 0x7
/* B0280 80119B80 8F020000 */ lw $v0, 0x0($t8)
/* B0284 80119B84 00031D40 */ sll $v1, $v1, 21
/* B0288 80119B88 0040202D */ daddu $a0, $v0, $zero
/* B028C 80119B8C 24420008 */ addiu $v0, $v0, 0x8
/* B0290 80119B90 AF020000 */ sw $v0, 0x0($t8)
/* B0294 80119B94 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* B0298 80119B98 00621025 */ or $v0, $v1, $v0
/* B029C 80119B9C AC820000 */ sw $v0, 0x0($a0)
/* B02A0 80119BA0 AC9E0004 */ sw $fp, 0x4($a0)
/* B02A4 80119BA4 8F020000 */ lw $v0, 0x0($t8)
/* B02A8 80119BA8 3C070700 */ lui $a3, (0x7000000 >> 16)
/* B02AC 80119BAC 0040202D */ daddu $a0, $v0, $zero
/* B02B0 80119BB0 24420008 */ addiu $v0, $v0, 0x8
/* B02B4 80119BB4 AF020000 */ sw $v0, 0x0($t8)
/* B02B8 80119BB8 3C02F510 */ lui $v0, (0xF5100000 >> 16)
/* B02BC 80119BBC 00621825 */ or $v1, $v1, $v0
/* B02C0 80119BC0 AC830000 */ sw $v1, 0x0($a0)
/* B02C4 80119BC4 32E30003 */ andi $v1, $s7, 0x3
/* B02C8 80119BC8 00031C80 */ sll $v1, $v1, 18
/* B02CC 80119BCC 8FB40044 */ lw $s4, 0x44($sp)
/* B02D0 80119BD0 8FB50048 */ lw $s5, 0x48($sp)
/* B02D4 80119BD4 00141380 */ sll $v0, $s4, 14
/* B02D8 80119BD8 00471025 */ or $v0, $v0, $a3
/* B02DC 80119BDC 00621825 */ or $v1, $v1, $v0
/* B02E0 80119BE0 31220003 */ andi $v0, $t1, 0x3
/* B02E4 80119BE4 00021200 */ sll $v0, $v0, 8
/* B02E8 80119BE8 00621825 */ or $v1, $v1, $v0
/* B02EC 80119BEC 00151100 */ sll $v0, $s5, 4
/* B02F0 80119BF0 00621825 */ or $v1, $v1, $v0
/* B02F4 80119BF4 AC830004 */ sw $v1, 0x4($a0)
/* B02F8 80119BF8 8F020000 */ lw $v0, 0x0($t8)
/* B02FC 80119BFC 0040182D */ daddu $v1, $v0, $zero
/* B0300 80119C00 24420008 */ addiu $v0, $v0, 0x8
/* B0304 80119C04 AF020000 */ sw $v0, 0x0($t8)
/* B0308 80119C08 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* B030C 80119C0C AC620000 */ sw $v0, 0x0($v1)
/* B0310 80119C10 AC600004 */ sw $zero, 0x4($v1)
/* B0314 80119C14 8F020000 */ lw $v0, 0x0($t8)
/* B0318 80119C18 0320202D */ daddu $a0, $t9, $zero
/* B031C 80119C1C 0040302D */ daddu $a2, $v0, $zero
/* B0320 80119C20 24420008 */ addiu $v0, $v0, 0x8
/* B0324 80119C24 AF020000 */ sw $v0, 0x0($t8)
/* B0328 80119C28 3C02F300 */ lui $v0, (0xF3000000 >> 16)
/* B032C 80119C2C 07210002 */ bgez $t9, .L80119C38
/* B0330 80119C30 ACC20000 */ sw $v0, 0x0($a2)
/* B0334 80119C34 27240007 */ addiu $a0, $t9, 0x7
.L80119C38:
/* B0338 80119C38 000428C3 */ sra $a1, $a0, 3
/* B033C 80119C3C 18A00002 */ blez $a1, .L80119C48
/* B0340 80119C40 24030800 */ addiu $v1, $zero, 0x800
/* B0344 80119C44 24A307FF */ addiu $v1, $a1, 0x7FF
.L80119C48:
/* B0348 80119C48 03320018 */ mult $t9, $s2
/* B034C 80119C4C 00008012 */ mflo $s0
/* B0350 80119C50 26020001 */ addiu $v0, $s0, 0x1
/* B0354 80119C54 00021043 */ sra $v0, $v0, 1
/* B0358 80119C58 2444FFFF */ addiu $a0, $v0, -0x1
/* B035C 80119C5C 28820800 */ slti $v0, $a0, 0x800
/* B0360 80119C60 50400001 */ beql $v0, $zero, .L80119C68
/* B0364 80119C64 240407FF */ addiu $a0, $zero, 0x7FF
.L80119C68:
/* B0368 80119C68 30820FFF */ andi $v0, $a0, 0xFFF
/* B036C 80119C6C 00021300 */ sll $v0, $v0, 12
/* B0370 80119C70 18A0000D */ blez $a1, .L80119CA8
/* B0374 80119C74 00472025 */ or $a0, $v0, $a3
/* B0378 80119C78 14A00002 */ bnez $a1, .L80119C84
/* B037C 80119C7C 0065001A */ div $zero, $v1, $a1
/* B0380 80119C80 0007000D */ break 7
.L80119C84:
/* B0384 80119C84 2401FFFF */ addiu $at, $zero, -0x1
/* B0388 80119C88 14A10004 */ bne $a1, $at, .L80119C9C
/* B038C 80119C8C 3C018000 */ lui $at, (0x80000000 >> 16)
/* B0390 80119C90 14610002 */ bne $v1, $at, .L80119C9C
/* B0394 80119C94 00000000 */ nop
/* B0398 80119C98 0006000D */ break 6
.L80119C9C:
/* B039C 80119C9C 00001012 */ mflo $v0
/* B03A0 80119CA0 0804672B */ j .L80119CAC
/* B03A4 80119CA4 30420FFF */ andi $v0, $v0, 0xFFF
.L80119CA8:
/* B03A8 80119CA8 30620FFF */ andi $v0, $v1, 0xFFF
.L80119CAC:
/* B03AC 80119CAC 00821025 */ or $v0, $a0, $v0
/* B03B0 80119CB0 ACC20004 */ sw $v0, 0x4($a2)
/* B03B4 80119CB4 31080007 */ andi $t0, $t0, 0x7
/* B03B8 80119CB8 00084540 */ sll $t0, $t0, 21
/* B03BC 80119CBC 32E40003 */ andi $a0, $s7, 0x3
/* B03C0 80119CC0 00042480 */ sll $a0, $a0, 18
/* B03C4 80119CC4 312A0003 */ andi $t2, $t1, 0x3
/* B03C8 80119CC8 000A5200 */ sll $t2, $t2, 8
/* B03CC 80119CCC 3C0DF200 */ lui $t5, (0xF2000000 >> 16)
/* B03D0 80119CD0 00124843 */ sra $t1, $s2, 1
/* B03D4 80119CD4 2526FFFF */ addiu $a2, $t1, -0x1
/* B03D8 80119CD8 00063080 */ sll $a2, $a2, 2
/* B03DC 80119CDC 8F020000 */ lw $v0, 0x0($t8)
/* B03E0 80119CE0 03290018 */ mult $t9, $t1
/* B03E4 80119CE4 0040182D */ daddu $v1, $v0, $zero
/* B03E8 80119CE8 24420008 */ addiu $v0, $v0, 0x8
/* B03EC 80119CEC AF020000 */ sw $v0, 0x0($t8)
/* B03F0 80119CF0 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B03F4 80119CF4 AC620000 */ sw $v0, 0x0($v1)
/* B03F8 80119CF8 AC600004 */ sw $zero, 0x4($v1)
/* B03FC 80119CFC 8F020000 */ lw $v0, 0x0($t8)
/* B0400 80119D00 3C03F508 */ lui $v1, (0xF5080000 >> 16)
/* B0404 80119D04 0040282D */ daddu $a1, $v0, $zero
/* B0408 80119D08 24420008 */ addiu $v0, $v0, 0x8
/* B040C 80119D0C AF020000 */ sw $v0, 0x0($t8)
/* B0410 80119D10 27220007 */ addiu $v0, $t9, 0x7
/* B0414 80119D14 000210C3 */ sra $v0, $v0, 3
/* B0418 80119D18 304201FF */ andi $v0, $v0, 0x1FF
/* B041C 80119D1C 00021240 */ sll $v0, $v0, 9
/* B0420 80119D20 00431025 */ or $v0, $v0, $v1
/* B0424 80119D24 01024025 */ or $t0, $t0, $v0
/* B0428 80119D28 ACA80000 */ sw $t0, 0x0($a1)
/* B042C 80119D2C 8FB00044 */ lw $s0, 0x44($sp)
/* B0430 80119D30 8FB40048 */ lw $s4, 0x48($sp)
/* B0434 80119D34 2607FFFF */ addiu $a3, $s0, -0x1
/* B0438 80119D38 30E7000F */ andi $a3, $a3, 0xF
/* B043C 80119D3C 00073B80 */ sll $a3, $a3, 14
/* B0440 80119D40 00871025 */ or $v0, $a0, $a3
/* B0444 80119D44 004A1025 */ or $v0, $v0, $t2
/* B0448 80119D48 00146100 */ sll $t4, $s4, 4
/* B044C 80119D4C 004C1025 */ or $v0, $v0, $t4
/* B0450 80119D50 ACA20004 */ sw $v0, 0x4($a1)
/* B0454 80119D54 2725FFFF */ addiu $a1, $t9, -0x1
/* B0458 80119D58 00052880 */ sll $a1, $a1, 2
/* B045C 80119D5C 30A30FFF */ andi $v1, $a1, 0xFFF
/* B0460 80119D60 8F020000 */ lw $v0, 0x0($t8)
/* B0464 80119D64 00031B00 */ sll $v1, $v1, 12
/* B0468 80119D68 0040582D */ daddu $t3, $v0, $zero
/* B046C 80119D6C 24420008 */ addiu $v0, $v0, 0x8
/* B0470 80119D70 AF020000 */ sw $v0, 0x0($t8)
/* B0474 80119D74 30C20FFF */ andi $v0, $a2, 0xFFF
/* B0478 80119D78 00621825 */ or $v1, $v1, $v0
/* B047C 80119D7C AD6D0000 */ sw $t5, 0x0($t3)
/* B0480 80119D80 AD630004 */ sw $v1, 0x4($t3)
/* B0484 80119D84 8F020000 */ lw $v0, 0x0($t8)
/* B0488 80119D88 00008012 */ mflo $s0
/* B048C 80119D8C 0040182D */ daddu $v1, $v0, $zero
/* B0490 80119D90 24420008 */ addiu $v0, $v0, 0x8
/* B0494 80119D94 AF020000 */ sw $v0, 0x0($t8)
/* B0498 80119D98 0804684E */ j .L8011A138
/* B049C 80119D9C 26020007 */ addiu $v0, $s0, 0x7
.L80119DA0:
/* B04A0 80119DA0 31030007 */ andi $v1, $t0, 0x7
/* B04A4 80119DA4 8F020000 */ lw $v0, 0x0($t8)
/* B04A8 80119DA8 00031D40 */ sll $v1, $v1, 21
/* B04AC 80119DAC 0040202D */ daddu $a0, $v0, $zero
/* B04B0 80119DB0 24420008 */ addiu $v0, $v0, 0x8
/* B04B4 80119DB4 AF020000 */ sw $v0, 0x0($t8)
/* B04B8 80119DB8 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* B04BC 80119DBC 00621025 */ or $v0, $v1, $v0
/* B04C0 80119DC0 AC820000 */ sw $v0, 0x0($a0)
/* B04C4 80119DC4 AC9E0004 */ sw $fp, 0x4($a0)
/* B04C8 80119DC8 8F020000 */ lw $v0, 0x0($t8)
/* B04CC 80119DCC 3C070700 */ lui $a3, (0x7000000 >> 16)
/* B04D0 80119DD0 0040202D */ daddu $a0, $v0, $zero
/* B04D4 80119DD4 24420008 */ addiu $v0, $v0, 0x8
/* B04D8 80119DD8 AF020000 */ sw $v0, 0x0($t8)
/* B04DC 80119DDC 3C02F510 */ lui $v0, (0xF5100000 >> 16)
/* B04E0 80119DE0 00621825 */ or $v1, $v1, $v0
/* B04E4 80119DE4 AC830000 */ sw $v1, 0x0($a0)
/* B04E8 80119DE8 32E30003 */ andi $v1, $s7, 0x3
/* B04EC 80119DEC 00031C80 */ sll $v1, $v1, 18
/* B04F0 80119DF0 8FB40044 */ lw $s4, 0x44($sp)
/* B04F4 80119DF4 8FB50048 */ lw $s5, 0x48($sp)
/* B04F8 80119DF8 00141380 */ sll $v0, $s4, 14
/* B04FC 80119DFC 00471025 */ or $v0, $v0, $a3
/* B0500 80119E00 00621825 */ or $v1, $v1, $v0
/* B0504 80119E04 31220003 */ andi $v0, $t1, 0x3
/* B0508 80119E08 00021200 */ sll $v0, $v0, 8
/* B050C 80119E0C 00621825 */ or $v1, $v1, $v0
/* B0510 80119E10 00151100 */ sll $v0, $s5, 4
/* B0514 80119E14 00621825 */ or $v1, $v1, $v0
/* B0518 80119E18 AC830004 */ sw $v1, 0x4($a0)
/* B051C 80119E1C 8F020000 */ lw $v0, 0x0($t8)
/* B0520 80119E20 0040182D */ daddu $v1, $v0, $zero
/* B0524 80119E24 24420008 */ addiu $v0, $v0, 0x8
/* B0528 80119E28 AF020000 */ sw $v0, 0x0($t8)
/* B052C 80119E2C 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* B0530 80119E30 AC620000 */ sw $v0, 0x0($v1)
/* B0534 80119E34 AC600004 */ sw $zero, 0x4($v1)
/* B0538 80119E38 8F020000 */ lw $v0, 0x0($t8)
/* B053C 80119E3C 0320202D */ daddu $a0, $t9, $zero
/* B0540 80119E40 0040302D */ daddu $a2, $v0, $zero
/* B0544 80119E44 24420008 */ addiu $v0, $v0, 0x8
/* B0548 80119E48 AF020000 */ sw $v0, 0x0($t8)
/* B054C 80119E4C 3C02F300 */ lui $v0, (0xF3000000 >> 16)
/* B0550 80119E50 07210002 */ bgez $t9, .L80119E5C
/* B0554 80119E54 ACC20000 */ sw $v0, 0x0($a2)
/* B0558 80119E58 27240003 */ addiu $a0, $t9, 0x3
.L80119E5C:
/* B055C 80119E5C 00042883 */ sra $a1, $a0, 2
/* B0560 80119E60 18A00002 */ blez $a1, .L80119E6C
/* B0564 80119E64 24030800 */ addiu $v1, $zero, 0x800
/* B0568 80119E68 24A307FF */ addiu $v1, $a1, 0x7FF
.L80119E6C:
/* B056C 80119E6C 03320018 */ mult $t9, $s2
/* B0570 80119E70 00008012 */ mflo $s0
/* B0574 80119E74 2604FFFF */ addiu $a0, $s0, -0x1
/* B0578 80119E78 28820800 */ slti $v0, $a0, 0x800
/* B057C 80119E7C 50400001 */ beql $v0, $zero, .L80119E84
/* B0580 80119E80 240407FF */ addiu $a0, $zero, 0x7FF
.L80119E84:
/* B0584 80119E84 30820FFF */ andi $v0, $a0, 0xFFF
/* B0588 80119E88 00021300 */ sll $v0, $v0, 12
/* B058C 80119E8C 18A0000D */ blez $a1, .L80119EC4
/* B0590 80119E90 00472025 */ or $a0, $v0, $a3
/* B0594 80119E94 14A00002 */ bnez $a1, .L80119EA0
/* B0598 80119E98 0065001A */ div $zero, $v1, $a1
/* B059C 80119E9C 0007000D */ break 7
.L80119EA0:
/* B05A0 80119EA0 2401FFFF */ addiu $at, $zero, -0x1
/* B05A4 80119EA4 14A10004 */ bne $a1, $at, .L80119EB8
/* B05A8 80119EA8 3C018000 */ lui $at, (0x80000000 >> 16)
/* B05AC 80119EAC 14610002 */ bne $v1, $at, .L80119EB8
/* B05B0 80119EB0 00000000 */ nop
/* B05B4 80119EB4 0006000D */ break 6
.L80119EB8:
/* B05B8 80119EB8 00001012 */ mflo $v0
/* B05BC 80119EBC 080467B2 */ j .L80119EC8
/* B05C0 80119EC0 30420FFF */ andi $v0, $v0, 0xFFF
.L80119EC4:
/* B05C4 80119EC4 30620FFF */ andi $v0, $v1, 0xFFF
.L80119EC8:
/* B05C8 80119EC8 00821025 */ or $v0, $a0, $v0
/* B05CC 80119ECC ACC20004 */ sw $v0, 0x4($a2)
/* B05D0 80119ED0 31080007 */ andi $t0, $t0, 0x7
/* B05D4 80119ED4 00084540 */ sll $t0, $t0, 21
/* B05D8 80119ED8 32E40003 */ andi $a0, $s7, 0x3
/* B05DC 80119EDC 00042480 */ sll $a0, $a0, 18
/* B05E0 80119EE0 312A0003 */ andi $t2, $t1, 0x3
/* B05E4 80119EE4 000A5200 */ sll $t2, $t2, 8
/* B05E8 80119EE8 3C0DF200 */ lui $t5, (0xF2000000 >> 16)
/* B05EC 80119EEC 00124843 */ sra $t1, $s2, 1
/* B05F0 80119EF0 2526FFFF */ addiu $a2, $t1, -0x1
/* B05F4 80119EF4 00063080 */ sll $a2, $a2, 2
/* B05F8 80119EF8 8F020000 */ lw $v0, 0x0($t8)
/* B05FC 80119EFC 03290018 */ mult $t9, $t1
/* B0600 80119F00 0040182D */ daddu $v1, $v0, $zero
/* B0604 80119F04 24420008 */ addiu $v0, $v0, 0x8
/* B0608 80119F08 AF020000 */ sw $v0, 0x0($t8)
/* B060C 80119F0C 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B0610 80119F10 AC620000 */ sw $v0, 0x0($v1)
/* B0614 80119F14 AC600004 */ sw $zero, 0x4($v1)
/* B0618 80119F18 8F020000 */ lw $v0, 0x0($t8)
/* B061C 80119F1C 08046826 */ j .L8011A098
/* B0620 80119F20 3C03F510 */ lui $v1, (0xF5100000 >> 16)
.L80119F24:
/* B0624 80119F24 31030007 */ andi $v1, $t0, 0x7
/* B0628 80119F28 8F020000 */ lw $v0, 0x0($t8)
/* B062C 80119F2C 00031D40 */ sll $v1, $v1, 21
/* B0630 80119F30 0040202D */ daddu $a0, $v0, $zero
/* B0634 80119F34 24420008 */ addiu $v0, $v0, 0x8
/* B0638 80119F38 AF020000 */ sw $v0, 0x0($t8)
/* B063C 80119F3C 3C02FD18 */ lui $v0, (0xFD180000 >> 16)
/* B0640 80119F40 00621025 */ or $v0, $v1, $v0
/* B0644 80119F44 AC820000 */ sw $v0, 0x0($a0)
/* B0648 80119F48 AC9E0004 */ sw $fp, 0x4($a0)
/* B064C 80119F4C 8F020000 */ lw $v0, 0x0($t8)
/* B0650 80119F50 3C070700 */ lui $a3, (0x7000000 >> 16)
/* B0654 80119F54 0040202D */ daddu $a0, $v0, $zero
/* B0658 80119F58 24420008 */ addiu $v0, $v0, 0x8
/* B065C 80119F5C AF020000 */ sw $v0, 0x0($t8)
/* B0660 80119F60 3C02F518 */ lui $v0, (0xF5180000 >> 16)
/* B0664 80119F64 00621825 */ or $v1, $v1, $v0
/* B0668 80119F68 AC830000 */ sw $v1, 0x0($a0)
/* B066C 80119F6C 32E30003 */ andi $v1, $s7, 0x3
/* B0670 80119F70 00031C80 */ sll $v1, $v1, 18
/* B0674 80119F74 8FB40044 */ lw $s4, 0x44($sp)
/* B0678 80119F78 8FB50048 */ lw $s5, 0x48($sp)
/* B067C 80119F7C 00141380 */ sll $v0, $s4, 14
/* B0680 80119F80 00471025 */ or $v0, $v0, $a3
/* B0684 80119F84 00621825 */ or $v1, $v1, $v0
/* B0688 80119F88 31220003 */ andi $v0, $t1, 0x3
/* B068C 80119F8C 00021200 */ sll $v0, $v0, 8
/* B0690 80119F90 00621825 */ or $v1, $v1, $v0
/* B0694 80119F94 00151100 */ sll $v0, $s5, 4
/* B0698 80119F98 00621825 */ or $v1, $v1, $v0
/* B069C 80119F9C AC830004 */ sw $v1, 0x4($a0)
/* B06A0 80119FA0 8F020000 */ lw $v0, 0x0($t8)
/* B06A4 80119FA4 00192842 */ srl $a1, $t9, 1
/* B06A8 80119FA8 0040182D */ daddu $v1, $v0, $zero
/* B06AC 80119FAC 24420008 */ addiu $v0, $v0, 0x8
/* B06B0 80119FB0 AF020000 */ sw $v0, 0x0($t8)
/* B06B4 80119FB4 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* B06B8 80119FB8 AC620000 */ sw $v0, 0x0($v1)
/* B06BC 80119FBC AC600004 */ sw $zero, 0x4($v1)
/* B06C0 80119FC0 8F020000 */ lw $v0, 0x0($t8)
/* B06C4 80119FC4 24030800 */ addiu $v1, $zero, 0x800
/* B06C8 80119FC8 0040302D */ daddu $a2, $v0, $zero
/* B06CC 80119FCC 24420008 */ addiu $v0, $v0, 0x8
/* B06D0 80119FD0 AF020000 */ sw $v0, 0x0($t8)
/* B06D4 80119FD4 3C02F300 */ lui $v0, (0xF3000000 >> 16)
/* B06D8 80119FD8 18A00002 */ blez $a1, .L80119FE4
/* B06DC 80119FDC ACC20000 */ sw $v0, 0x0($a2)
/* B06E0 80119FE0 24A307FF */ addiu $v1, $a1, 0x7FF
.L80119FE4:
/* B06E4 80119FE4 03320018 */ mult $t9, $s2
/* B06E8 80119FE8 00008012 */ mflo $s0
/* B06EC 80119FEC 2604FFFF */ addiu $a0, $s0, -0x1
/* B06F0 80119FF0 28820800 */ slti $v0, $a0, 0x800
/* B06F4 80119FF4 50400001 */ beql $v0, $zero, .L80119FFC
/* B06F8 80119FF8 240407FF */ addiu $a0, $zero, 0x7FF
.L80119FFC:
/* B06FC 80119FFC 30820FFF */ andi $v0, $a0, 0xFFF
/* B0700 8011A000 00021300 */ sll $v0, $v0, 12
/* B0704 8011A004 18A0000D */ blez $a1, .L8011A03C
/* B0708 8011A008 00472025 */ or $a0, $v0, $a3
/* B070C 8011A00C 14A00002 */ bnez $a1, .L8011A018
/* B0710 8011A010 0065001A */ div $zero, $v1, $a1
/* B0714 8011A014 0007000D */ break 7
.L8011A018:
/* B0718 8011A018 2401FFFF */ addiu $at, $zero, -0x1
/* B071C 8011A01C 14A10004 */ bne $a1, $at, .L8011A030
/* B0720 8011A020 3C018000 */ lui $at, (0x80000000 >> 16)
/* B0724 8011A024 14610002 */ bne $v1, $at, .L8011A030
/* B0728 8011A028 00000000 */ nop
/* B072C 8011A02C 0006000D */ break 6
.L8011A030:
/* B0730 8011A030 00001012 */ mflo $v0
/* B0734 8011A034 08046810 */ j .L8011A040
/* B0738 8011A038 30420FFF */ andi $v0, $v0, 0xFFF
.L8011A03C:
/* B073C 8011A03C 30620FFF */ andi $v0, $v1, 0xFFF
.L8011A040:
/* B0740 8011A040 00821025 */ or $v0, $a0, $v0
/* B0744 8011A044 ACC20004 */ sw $v0, 0x4($a2)
/* B0748 8011A048 31080007 */ andi $t0, $t0, 0x7
/* B074C 8011A04C 00084540 */ sll $t0, $t0, 21
/* B0750 8011A050 32E40003 */ andi $a0, $s7, 0x3
/* B0754 8011A054 00042480 */ sll $a0, $a0, 18
/* B0758 8011A058 312A0003 */ andi $t2, $t1, 0x3
/* B075C 8011A05C 000A5200 */ sll $t2, $t2, 8
/* B0760 8011A060 3C0DF200 */ lui $t5, (0xF2000000 >> 16)
/* B0764 8011A064 00124843 */ sra $t1, $s2, 1
/* B0768 8011A068 2526FFFF */ addiu $a2, $t1, -0x1
/* B076C 8011A06C 00063080 */ sll $a2, $a2, 2
/* B0770 8011A070 8F020000 */ lw $v0, 0x0($t8)
/* B0774 8011A074 03290018 */ mult $t9, $t1
/* B0778 8011A078 0040182D */ daddu $v1, $v0, $zero
/* B077C 8011A07C 24420008 */ addiu $v0, $v0, 0x8
/* B0780 8011A080 AF020000 */ sw $v0, 0x0($t8)
/* B0784 8011A084 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B0788 8011A088 AC620000 */ sw $v0, 0x0($v1)
/* B078C 8011A08C AC600004 */ sw $zero, 0x4($v1)
/* B0790 8011A090 8F020000 */ lw $v0, 0x0($t8)
/* B0794 8011A094 3C03F518 */ lui $v1, (0xF5180000 >> 16)
.L8011A098:
/* B0798 8011A098 0040282D */ daddu $a1, $v0, $zero
/* B079C 8011A09C 24420008 */ addiu $v0, $v0, 0x8
/* B07A0 8011A0A0 AF020000 */ sw $v0, 0x0($t8)
/* B07A4 8011A0A4 00191040 */ sll $v0, $t9, 1
/* B07A8 8011A0A8 24420007 */ addiu $v0, $v0, 0x7
/* B07AC 8011A0AC 000210C3 */ sra $v0, $v0, 3
/* B07B0 8011A0B0 304201FF */ andi $v0, $v0, 0x1FF
/* B07B4 8011A0B4 00021240 */ sll $v0, $v0, 9
/* B07B8 8011A0B8 00431025 */ or $v0, $v0, $v1
/* B07BC 8011A0BC 01024025 */ or $t0, $t0, $v0
/* B07C0 8011A0C0 ACA80000 */ sw $t0, 0x0($a1)
/* B07C4 8011A0C4 8FB00044 */ lw $s0, 0x44($sp)
/* B07C8 8011A0C8 8FB40048 */ lw $s4, 0x48($sp)
/* B07CC 8011A0CC 2607FFFF */ addiu $a3, $s0, -0x1
/* B07D0 8011A0D0 30E7000F */ andi $a3, $a3, 0xF
/* B07D4 8011A0D4 00073B80 */ sll $a3, $a3, 14
/* B07D8 8011A0D8 00871025 */ or $v0, $a0, $a3
/* B07DC 8011A0DC 004A1025 */ or $v0, $v0, $t2
/* B07E0 8011A0E0 00146100 */ sll $t4, $s4, 4
/* B07E4 8011A0E4 004C1025 */ or $v0, $v0, $t4
/* B07E8 8011A0E8 ACA20004 */ sw $v0, 0x4($a1)
/* B07EC 8011A0EC 2725FFFF */ addiu $a1, $t9, -0x1
/* B07F0 8011A0F0 00052880 */ sll $a1, $a1, 2
/* B07F4 8011A0F4 30A30FFF */ andi $v1, $a1, 0xFFF
/* B07F8 8011A0F8 8F020000 */ lw $v0, 0x0($t8)
/* B07FC 8011A0FC 00031B00 */ sll $v1, $v1, 12
/* B0800 8011A100 0040582D */ daddu $t3, $v0, $zero
/* B0804 8011A104 24420008 */ addiu $v0, $v0, 0x8
/* B0808 8011A108 AF020000 */ sw $v0, 0x0($t8)
/* B080C 8011A10C 30C20FFF */ andi $v0, $a2, 0xFFF
/* B0810 8011A110 00621825 */ or $v1, $v1, $v0
/* B0814 8011A114 AD6D0000 */ sw $t5, 0x0($t3)
/* B0818 8011A118 AD630004 */ sw $v1, 0x4($t3)
/* B081C 8011A11C 8F020000 */ lw $v0, 0x0($t8)
/* B0820 8011A120 00008012 */ mflo $s0
/* B0824 8011A124 0040182D */ daddu $v1, $v0, $zero
/* B0828 8011A128 24420008 */ addiu $v0, $v0, 0x8
/* B082C 8011A12C AF020000 */ sw $v0, 0x0($t8)
/* B0830 8011A130 00101040 */ sll $v0, $s0, 1
.L8011A134:
/* B0834 8011A134 24420007 */ addiu $v0, $v0, 0x7
.L8011A138:
/* B0838 8011A138 000210C3 */ sra $v0, $v0, 3
/* B083C 8011A13C 304201FF */ andi $v0, $v0, 0x1FF
/* B0840 8011A140 01024025 */ or $t0, $t0, $v0
/* B0844 8011A144 AC680000 */ sw $t0, 0x0($v1)
/* B0848 8011A148 3C080100 */ lui $t0, (0x1000000 >> 16)
/* B084C 8011A14C 00E83825 */ or $a3, $a3, $t0
/* B0850 8011A150 00872025 */ or $a0, $a0, $a3
/* B0854 8011A154 93B4000F */ lbu $s4, 0xF($sp)
/* B0858 8011A158 93B50007 */ lbu $s5, 0x7($sp)
/* B085C 8011A15C 3282000F */ andi $v0, $s4, 0xF
/* B0860 8011A160 00021280 */ sll $v0, $v0, 10
/* B0864 8011A164 00822025 */ or $a0, $a0, $v0
/* B0868 8011A168 008A2025 */ or $a0, $a0, $t2
/* B086C 8011A16C 008C2025 */ or $a0, $a0, $t4
/* B0870 8011A170 32A2000F */ andi $v0, $s5, 0xF
/* B0874 8011A174 00822025 */ or $a0, $a0, $v0
/* B0878 8011A178 AC640004 */ sw $a0, 0x4($v1)
/* B087C 8011A17C 8F020000 */ lw $v0, 0x0($t8)
/* B0880 8011A180 0040202D */ daddu $a0, $v0, $zero
/* B0884 8011A184 24420008 */ addiu $v0, $v0, 0x8
/* B0888 8011A188 AF020000 */ sw $v0, 0x0($t8)
/* B088C 8011A18C 97B60016 */ lhu $s6, 0x16($sp)
/* B0890 8011A190 97B0001E */ lhu $s0, 0x1E($sp)
/* B0894 8011A194 32C30FFF */ andi $v1, $s6, 0xFFF
/* B0898 8011A198 00031B00 */ sll $v1, $v1, 12
/* B089C 8011A19C 32020FFF */ andi $v0, $s0, 0xFFF
/* B08A0 8011A1A0 004D1025 */ or $v0, $v0, $t5
/* B08A4 8011A1A4 00621825 */ or $v1, $v1, $v0
/* B08A8 8011A1A8 AC830000 */ sw $v1, 0x0($a0)
/* B08AC 8011A1AC 97A20016 */ lhu $v0, 0x16($sp)
/* B08B0 8011A1B0 00A22821 */ addu $a1, $a1, $v0
/* B08B4 8011A1B4 30A50FFF */ andi $a1, $a1, 0xFFF
/* B08B8 8011A1B8 97A2001E */ lhu $v0, 0x1E($sp)
/* B08BC 8011A1BC 00052B00 */ sll $a1, $a1, 12
/* B08C0 8011A1C0 00C23021 */ addu $a2, $a2, $v0
/* B08C4 8011A1C4 30C60FFF */ andi $a2, $a2, 0xFFF
/* B08C8 8011A1C8 00C83025 */ or $a2, $a2, $t0
/* B08CC 8011A1CC 00A62825 */ or $a1, $a1, $a2
/* B08D0 8011A1D0 08046B31 */ j .L8011ACC4
/* B08D4 8011A1D4 AC850004 */ sw $a1, 0x4($a0)
.L8011A1D8:
/* B08D8 8011A1D8 3C02D700 */ lui $v0, (0xD7000002 >> 16)
/* B08DC 8011A1DC 34420002 */ ori $v0, $v0, (0xD7000002 & 0xFFFF)
/* B08E0 8011A1E0 24830010 */ addiu $v1, $a0, 0x10
/* B08E4 8011A1E4 AFA00038 */ sw $zero, 0x38($sp)
/* B08E8 8011A1E8 AF030000 */ sw $v1, 0x0($t8)
/* B08EC 8011A1EC AC820008 */ sw $v0, 0x8($a0)
/* B08F0 8011A1F0 2402FFFF */ addiu $v0, $zero, -0x1
/* B08F4 8011A1F4 10A60070 */ beq $a1, $a2, .L8011A3B8
/* B08F8 8011A1F8 AC82000C */ sw $v0, 0xC($a0)
/* B08FC 8011A1FC 28A20002 */ slti $v0, $a1, 0x2
/* B0900 8011A200 10400005 */ beqz $v0, .L8011A218
/* B0904 8011A204 00000000 */ nop
/* B0908 8011A208 10A00009 */ beqz $a1, .L8011A230
/* B090C 8011A20C 31080007 */ andi $t0, $t0, 0x7
/* B0910 8011A210 080469FD */ j .L8011A7F4
/* B0914 8011A214 00000000 */ nop
.L8011A218:
/* B0918 8011A218 10A700BF */ beq $a1, $a3, .L8011A518
/* B091C 8011A21C 31080007 */ andi $t0, $t0, 0x7
/* B0920 8011A220 10AB0118 */ beq $a1, $t3, .L8011A684
/* B0924 8011A224 00084540 */ sll $t0, $t0, 21
/* B0928 8011A228 080469FD */ j .L8011A7F4
/* B092C 8011A22C 00000000 */ nop
.L8011A230:
/* B0930 8011A230 00084540 */ sll $t0, $t0, 21
/* B0934 8011A234 00192843 */ sra $a1, $t9, 1
/* B0938 8011A238 3C03FD08 */ lui $v1, (0xFD080000 >> 16)
/* B093C 8011A23C 3C060700 */ lui $a2, (0x7000000 >> 16)
/* B0940 8011A240 31290003 */ andi $t1, $t1, 0x3
/* B0944 8011A244 00094A00 */ sll $t1, $t1, 8
/* B0948 8011A248 2647FFFF */ addiu $a3, $s2, -0x1
/* B094C 8011A24C 00073880 */ sll $a3, $a3, 2
/* B0950 8011A250 30E70FFF */ andi $a3, $a3, 0xFFF
/* B0954 8011A254 8F020000 */ lw $v0, 0x0($t8)
/* B0958 8011A258 03320018 */ mult $t9, $s2
/* B095C 8011A25C 0040202D */ daddu $a0, $v0, $zero
/* B0960 8011A260 24420008 */ addiu $v0, $v0, 0x8
/* B0964 8011A264 AF020000 */ sw $v0, 0x0($t8)
/* B0968 8011A268 24A2FFFF */ addiu $v0, $a1, -0x1
/* B096C 8011A26C 30420FFF */ andi $v0, $v0, 0xFFF
/* B0970 8011A270 00431025 */ or $v0, $v0, $v1
/* B0974 8011A274 01021025 */ or $v0, $t0, $v0
/* B0978 8011A278 24A50007 */ addiu $a1, $a1, 0x7
/* B097C 8011A27C 000528C3 */ sra $a1, $a1, 3
/* B0980 8011A280 30A501FF */ andi $a1, $a1, 0x1FF
/* B0984 8011A284 00052A40 */ sll $a1, $a1, 9
/* B0988 8011A288 32E30003 */ andi $v1, $s7, 0x3
/* B098C 8011A28C AC820000 */ sw $v0, 0x0($a0)
/* B0990 8011A290 AC9E0004 */ sw $fp, 0x4($a0)
/* B0994 8011A294 8F020000 */ lw $v0, 0x0($t8)
/* B0998 8011A298 00031C80 */ sll $v1, $v1, 18
/* B099C 8011A29C 0040202D */ daddu $a0, $v0, $zero
/* B09A0 8011A2A0 24420008 */ addiu $v0, $v0, 0x8
/* B09A4 8011A2A4 AF020000 */ sw $v0, 0x0($t8)
/* B09A8 8011A2A8 3C02F508 */ lui $v0, (0xF5080000 >> 16)
/* B09AC 8011A2AC 00A21025 */ or $v0, $a1, $v0
/* B09B0 8011A2B0 01021025 */ or $v0, $t0, $v0
/* B09B4 8011A2B4 AC820000 */ sw $v0, 0x0($a0)
/* B09B8 8011A2B8 8FB40044 */ lw $s4, 0x44($sp)
/* B09BC 8011A2BC 8FB50048 */ lw $s5, 0x48($sp)
/* B09C0 8011A2C0 00146380 */ sll $t4, $s4, 14
/* B09C4 8011A2C4 01861025 */ or $v0, $t4, $a2
/* B09C8 8011A2C8 00621025 */ or $v0, $v1, $v0
/* B09CC 8011A2CC 00491025 */ or $v0, $v0, $t1
/* B09D0 8011A2D0 00155900 */ sll $t3, $s5, 4
/* B09D4 8011A2D4 004B1025 */ or $v0, $v0, $t3
/* B09D8 8011A2D8 00E63025 */ or $a2, $a3, $a2
/* B09DC 8011A2DC 006C1825 */ or $v1, $v1, $t4
/* B09E0 8011A2E0 00691825 */ or $v1, $v1, $t1
/* B09E4 8011A2E4 AC820004 */ sw $v0, 0x4($a0)
/* B09E8 8011A2E8 8F020000 */ lw $v0, 0x0($t8)
/* B09EC 8011A2EC 006B1825 */ or $v1, $v1, $t3
/* B09F0 8011A2F0 0040202D */ daddu $a0, $v0, $zero
/* B09F4 8011A2F4 24420008 */ addiu $v0, $v0, 0x8
/* B09F8 8011A2F8 AF020000 */ sw $v0, 0x0($t8)
/* B09FC 8011A2FC 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* B0A00 8011A300 AC820000 */ sw $v0, 0x0($a0)
/* B0A04 8011A304 AC800004 */ sw $zero, 0x4($a0)
/* B0A08 8011A308 2724FFFF */ addiu $a0, $t9, -0x1
/* B0A0C 8011A30C 8F020000 */ lw $v0, 0x0($t8)
/* B0A10 8011A310 00008012 */ mflo $s0
/* B0A14 8011A314 0040502D */ daddu $t2, $v0, $zero
/* B0A18 8011A318 24420008 */ addiu $v0, $v0, 0x8
/* B0A1C 8011A31C AF020000 */ sw $v0, 0x0($t8)
/* B0A20 8011A320 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* B0A24 8011A324 AD420000 */ sw $v0, 0x0($t2)
/* B0A28 8011A328 00041040 */ sll $v0, $a0, 1
/* B0A2C 8011A32C 30420FFF */ andi $v0, $v0, 0xFFF
/* B0A30 8011A330 00021300 */ sll $v0, $v0, 12
/* B0A34 8011A334 00461025 */ or $v0, $v0, $a2
/* B0A38 8011A338 00042080 */ sll $a0, $a0, 2
/* B0A3C 8011A33C 30840FFF */ andi $a0, $a0, 0xFFF
/* B0A40 8011A340 AD420004 */ sw $v0, 0x4($t2)
/* B0A44 8011A344 8F020000 */ lw $v0, 0x0($t8)
/* B0A48 8011A348 00042300 */ sll $a0, $a0, 12
/* B0A4C 8011A34C 0040302D */ daddu $a2, $v0, $zero
/* B0A50 8011A350 24420008 */ addiu $v0, $v0, 0x8
/* B0A54 8011A354 AF020000 */ sw $v0, 0x0($t8)
/* B0A58 8011A358 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B0A5C 8011A35C ACC20000 */ sw $v0, 0x0($a2)
/* B0A60 8011A360 ACC00004 */ sw $zero, 0x4($a2)
/* B0A64 8011A364 8F020000 */ lw $v0, 0x0($t8)
/* B0A68 8011A368 00872025 */ or $a0, $a0, $a3
/* B0A6C 8011A36C 0040302D */ daddu $a2, $v0, $zero
/* B0A70 8011A370 24420008 */ addiu $v0, $v0, 0x8
/* B0A74 8011A374 AF020000 */ sw $v0, 0x0($t8)
/* B0A78 8011A378 3C02F500 */ lui $v0, (0xF5000000 >> 16)
/* B0A7C 8011A37C 00A22825 */ or $a1, $a1, $v0
/* B0A80 8011A380 01054025 */ or $t0, $t0, $a1
/* B0A84 8011A384 00101043 */ sra $v0, $s0, 1
/* B0A88 8011A388 24420007 */ addiu $v0, $v0, 0x7
/* B0A8C 8011A38C 000278C3 */ sra $t7, $v0, 3
/* B0A90 8011A390 ACC80000 */ sw $t0, 0x0($a2)
/* B0A94 8011A394 ACC30004 */ sw $v1, 0x4($a2)
/* B0A98 8011A398 8F030000 */ lw $v1, 0x0($t8)
/* B0A9C 8011A39C 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* B0AA0 8011A3A0 0060282D */ daddu $a1, $v1, $zero
/* B0AA4 8011A3A4 24630008 */ addiu $v1, $v1, 0x8
/* B0AA8 8011A3A8 AF030000 */ sw $v1, 0x0($t8)
/* B0AAC 8011A3AC ACA20000 */ sw $v0, 0x0($a1)
/* B0AB0 8011A3B0 080469FD */ j .L8011A7F4
/* B0AB4 8011A3B4 ACA40004 */ sw $a0, 0x4($a1)
.L8011A3B8:
/* B0AB8 8011A3B8 31080007 */ andi $t0, $t0, 0x7
/* B0ABC 8011A3BC 00084540 */ sll $t0, $t0, 21
/* B0AC0 8011A3C0 2726FFFF */ addiu $a2, $t9, -0x1
/* B0AC4 8011A3C4 3C03FD08 */ lui $v1, (0xFD080000 >> 16)
/* B0AC8 8011A3C8 3C050700 */ lui $a1, (0x7000000 >> 16)
/* B0ACC 8011A3CC 31290003 */ andi $t1, $t1, 0x3
/* B0AD0 8011A3D0 00094A00 */ sll $t1, $t1, 8
/* B0AD4 8011A3D4 2647FFFF */ addiu $a3, $s2, -0x1
/* B0AD8 8011A3D8 00073880 */ sll $a3, $a3, 2
/* B0ADC 8011A3DC 30E70FFF */ andi $a3, $a3, 0xFFF
/* B0AE0 8011A3E0 8F020000 */ lw $v0, 0x0($t8)
/* B0AE4 8011A3E4 03320018 */ mult $t9, $s2
/* B0AE8 8011A3E8 0040202D */ daddu $a0, $v0, $zero
/* B0AEC 8011A3EC 24420008 */ addiu $v0, $v0, 0x8
/* B0AF0 8011A3F0 AF020000 */ sw $v0, 0x0($t8)
/* B0AF4 8011A3F4 30C20FFF */ andi $v0, $a2, 0xFFF
/* B0AF8 8011A3F8 00431025 */ or $v0, $v0, $v1
/* B0AFC 8011A3FC 01021025 */ or $v0, $t0, $v0
/* B0B00 8011A400 3C03F508 */ lui $v1, (0xF5080000 >> 16)
/* B0B04 8011A404 00063080 */ sll $a2, $a2, 2
/* B0B08 8011A408 30C60FFF */ andi $a2, $a2, 0xFFF
/* B0B0C 8011A40C AC820000 */ sw $v0, 0x0($a0)
/* B0B10 8011A410 AC9E0004 */ sw $fp, 0x4($a0)
/* B0B14 8011A414 8F020000 */ lw $v0, 0x0($t8)
/* B0B18 8011A418 00063300 */ sll $a2, $a2, 12
/* B0B1C 8011A41C 0040202D */ daddu $a0, $v0, $zero
/* B0B20 8011A420 24420008 */ addiu $v0, $v0, 0x8
/* B0B24 8011A424 AF020000 */ sw $v0, 0x0($t8)
/* B0B28 8011A428 27220007 */ addiu $v0, $t9, 0x7
/* B0B2C 8011A42C 000210C3 */ sra $v0, $v0, 3
/* B0B30 8011A430 304201FF */ andi $v0, $v0, 0x1FF
/* B0B34 8011A434 00021240 */ sll $v0, $v0, 9
/* B0B38 8011A438 00431025 */ or $v0, $v0, $v1
/* B0B3C 8011A43C 01024025 */ or $t0, $t0, $v0
/* B0B40 8011A440 32E30003 */ andi $v1, $s7, 0x3
/* B0B44 8011A444 00031C80 */ sll $v1, $v1, 18
/* B0B48 8011A448 AC880000 */ sw $t0, 0x0($a0)
/* B0B4C 8011A44C 8FB40044 */ lw $s4, 0x44($sp)
/* B0B50 8011A450 8FB50048 */ lw $s5, 0x48($sp)
/* B0B54 8011A454 00145B80 */ sll $t3, $s4, 14
/* B0B58 8011A458 01651025 */ or $v0, $t3, $a1
/* B0B5C 8011A45C 00621025 */ or $v0, $v1, $v0
/* B0B60 8011A460 00491025 */ or $v0, $v0, $t1
/* B0B64 8011A464 00155100 */ sll $t2, $s5, 4
/* B0B68 8011A468 004A1025 */ or $v0, $v0, $t2
/* B0B6C 8011A46C 00E52825 */ or $a1, $a3, $a1
/* B0B70 8011A470 00C52825 */ or $a1, $a2, $a1
/* B0B74 8011A474 006B1825 */ or $v1, $v1, $t3
/* B0B78 8011A478 AC820004 */ sw $v0, 0x4($a0)
/* B0B7C 8011A47C 8F020000 */ lw $v0, 0x0($t8)
/* B0B80 8011A480 00691825 */ or $v1, $v1, $t1
/* B0B84 8011A484 0040202D */ daddu $a0, $v0, $zero
/* B0B88 8011A488 24420008 */ addiu $v0, $v0, 0x8
/* B0B8C 8011A48C AF020000 */ sw $v0, 0x0($t8)
/* B0B90 8011A490 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* B0B94 8011A494 AC820000 */ sw $v0, 0x0($a0)
/* B0B98 8011A498 AC800004 */ sw $zero, 0x4($a0)
/* B0B9C 8011A49C 8F020000 */ lw $v0, 0x0($t8)
/* B0BA0 8011A4A0 006A1825 */ or $v1, $v1, $t2
/* B0BA4 8011A4A4 0040202D */ daddu $a0, $v0, $zero
/* B0BA8 8011A4A8 24420008 */ addiu $v0, $v0, 0x8
/* B0BAC 8011A4AC AF020000 */ sw $v0, 0x0($t8)
/* B0BB0 8011A4B0 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* B0BB4 8011A4B4 AC820000 */ sw $v0, 0x0($a0)
/* B0BB8 8011A4B8 AC850004 */ sw $a1, 0x4($a0)
/* B0BBC 8011A4BC 8F020000 */ lw $v0, 0x0($t8)
/* B0BC0 8011A4C0 00C73025 */ or $a2, $a2, $a3
/* B0BC4 8011A4C4 0040202D */ daddu $a0, $v0, $zero
/* B0BC8 8011A4C8 24420008 */ addiu $v0, $v0, 0x8
/* B0BCC 8011A4CC AF020000 */ sw $v0, 0x0($t8)
/* B0BD0 8011A4D0 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B0BD4 8011A4D4 AC820000 */ sw $v0, 0x0($a0)
/* B0BD8 8011A4D8 AC800004 */ sw $zero, 0x4($a0)
/* B0BDC 8011A4DC 8F020000 */ lw $v0, 0x0($t8)
/* B0BE0 8011A4E0 00008012 */ mflo $s0
/* B0BE4 8011A4E4 0040202D */ daddu $a0, $v0, $zero
/* B0BE8 8011A4E8 24420008 */ addiu $v0, $v0, 0x8
/* B0BEC 8011A4EC AF020000 */ sw $v0, 0x0($t8)
/* B0BF0 8011A4F0 AC830004 */ sw $v1, 0x4($a0)
/* B0BF4 8011A4F4 26030007 */ addiu $v1, $s0, 0x7
/* B0BF8 8011A4F8 AC880000 */ sw $t0, 0x0($a0)
/* B0BFC 8011A4FC 8F020000 */ lw $v0, 0x0($t8)
/* B0C00 8011A500 000378C3 */ sra $t7, $v1, 3
/* B0C04 8011A504 0040182D */ daddu $v1, $v0, $zero
/* B0C08 8011A508 24420008 */ addiu $v0, $v0, 0x8
/* B0C0C 8011A50C AF020000 */ sw $v0, 0x0($t8)
/* B0C10 8011A510 080469FB */ j .L8011A7EC
/* B0C14 8011A514 3C02F200 */ lui $v0, (0xF2000000 >> 16)
.L8011A518:
/* B0C18 8011A518 00084540 */ sll $t0, $t0, 21
/* B0C1C 8011A51C 2726FFFF */ addiu $a2, $t9, -0x1
/* B0C20 8011A520 3C03FD10 */ lui $v1, (0xFD100000 >> 16)
/* B0C24 8011A524 3C050700 */ lui $a1, (0x7000000 >> 16)
/* B0C28 8011A528 31290003 */ andi $t1, $t1, 0x3
/* B0C2C 8011A52C 00094A00 */ sll $t1, $t1, 8
/* B0C30 8011A530 2647FFFF */ addiu $a3, $s2, -0x1
/* B0C34 8011A534 00073880 */ sll $a3, $a3, 2
/* B0C38 8011A538 30E70FFF */ andi $a3, $a3, 0xFFF
/* B0C3C 8011A53C 8F020000 */ lw $v0, 0x0($t8)
/* B0C40 8011A540 03320018 */ mult $t9, $s2
/* B0C44 8011A544 0040202D */ daddu $a0, $v0, $zero
/* B0C48 8011A548 24420008 */ addiu $v0, $v0, 0x8
/* B0C4C 8011A54C AF020000 */ sw $v0, 0x0($t8)
/* B0C50 8011A550 30C20FFF */ andi $v0, $a2, 0xFFF
/* B0C54 8011A554 00431025 */ or $v0, $v0, $v1
/* B0C58 8011A558 01021025 */ or $v0, $t0, $v0
/* B0C5C 8011A55C 3C03F510 */ lui $v1, (0xF5100000 >> 16)
/* B0C60 8011A560 00063080 */ sll $a2, $a2, 2
/* B0C64 8011A564 30C60FFF */ andi $a2, $a2, 0xFFF
/* B0C68 8011A568 AC820000 */ sw $v0, 0x0($a0)
/* B0C6C 8011A56C AC9E0004 */ sw $fp, 0x4($a0)
/* B0C70 8011A570 8F020000 */ lw $v0, 0x0($t8)
/* B0C74 8011A574 00063300 */ sll $a2, $a2, 12
/* B0C78 8011A578 0040202D */ daddu $a0, $v0, $zero
/* B0C7C 8011A57C 24420008 */ addiu $v0, $v0, 0x8
/* B0C80 8011A580 AF020000 */ sw $v0, 0x0($t8)
/* B0C84 8011A584 00191040 */ sll $v0, $t9, 1
/* B0C88 8011A588 24420007 */ addiu $v0, $v0, 0x7
/* B0C8C 8011A58C 000210C3 */ sra $v0, $v0, 3
/* B0C90 8011A590 304201FF */ andi $v0, $v0, 0x1FF
/* B0C94 8011A594 00021240 */ sll $v0, $v0, 9
/* B0C98 8011A598 00431025 */ or $v0, $v0, $v1
/* B0C9C 8011A59C 01024025 */ or $t0, $t0, $v0
/* B0CA0 8011A5A0 32E30003 */ andi $v1, $s7, 0x3
/* B0CA4 8011A5A4 00031C80 */ sll $v1, $v1, 18
/* B0CA8 8011A5A8 AC880000 */ sw $t0, 0x0($a0)
/* B0CAC 8011A5AC 8FB40044 */ lw $s4, 0x44($sp)
/* B0CB0 8011A5B0 8FB50048 */ lw $s5, 0x48($sp)
/* B0CB4 8011A5B4 00145B80 */ sll $t3, $s4, 14
/* B0CB8 8011A5B8 01651025 */ or $v0, $t3, $a1
/* B0CBC 8011A5BC 00621025 */ or $v0, $v1, $v0
/* B0CC0 8011A5C0 00491025 */ or $v0, $v0, $t1
/* B0CC4 8011A5C4 00155100 */ sll $t2, $s5, 4
/* B0CC8 8011A5C8 004A1025 */ or $v0, $v0, $t2
/* B0CCC 8011A5CC 00E52825 */ or $a1, $a3, $a1
/* B0CD0 8011A5D0 00C52825 */ or $a1, $a2, $a1
/* B0CD4 8011A5D4 006B1825 */ or $v1, $v1, $t3
/* B0CD8 8011A5D8 AC820004 */ sw $v0, 0x4($a0)
/* B0CDC 8011A5DC 8F020000 */ lw $v0, 0x0($t8)
/* B0CE0 8011A5E0 00691825 */ or $v1, $v1, $t1
/* B0CE4 8011A5E4 0040202D */ daddu $a0, $v0, $zero
/* B0CE8 8011A5E8 24420008 */ addiu $v0, $v0, 0x8
/* B0CEC 8011A5EC AF020000 */ sw $v0, 0x0($t8)
/* B0CF0 8011A5F0 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* B0CF4 8011A5F4 AC820000 */ sw $v0, 0x0($a0)
/* B0CF8 8011A5F8 AC800004 */ sw $zero, 0x4($a0)
/* B0CFC 8011A5FC 8F020000 */ lw $v0, 0x0($t8)
/* B0D00 8011A600 006A1825 */ or $v1, $v1, $t2
/* B0D04 8011A604 0040202D */ daddu $a0, $v0, $zero
/* B0D08 8011A608 24420008 */ addiu $v0, $v0, 0x8
/* B0D0C 8011A60C AF020000 */ sw $v0, 0x0($t8)
/* B0D10 8011A610 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* B0D14 8011A614 AC820000 */ sw $v0, 0x0($a0)
/* B0D18 8011A618 AC850004 */ sw $a1, 0x4($a0)
/* B0D1C 8011A61C 8F020000 */ lw $v0, 0x0($t8)
/* B0D20 8011A620 00C73025 */ or $a2, $a2, $a3
/* B0D24 8011A624 0040202D */ daddu $a0, $v0, $zero
/* B0D28 8011A628 24420008 */ addiu $v0, $v0, 0x8
/* B0D2C 8011A62C AF020000 */ sw $v0, 0x0($t8)
/* B0D30 8011A630 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B0D34 8011A634 AC820000 */ sw $v0, 0x0($a0)
/* B0D38 8011A638 AC800004 */ sw $zero, 0x4($a0)
/* B0D3C 8011A63C 8F020000 */ lw $v0, 0x0($t8)
/* B0D40 8011A640 00008012 */ mflo $s0
/* B0D44 8011A644 0040202D */ daddu $a0, $v0, $zero
/* B0D48 8011A648 24420008 */ addiu $v0, $v0, 0x8
/* B0D4C 8011A64C AF020000 */ sw $v0, 0x0($t8)
/* B0D50 8011A650 00101040 */ sll $v0, $s0, 1
/* B0D54 8011A654 24420007 */ addiu $v0, $v0, 0x7
/* B0D58 8011A658 000278C3 */ sra $t7, $v0, 3
/* B0D5C 8011A65C AC880000 */ sw $t0, 0x0($a0)
/* B0D60 8011A660 AC830004 */ sw $v1, 0x4($a0)
/* B0D64 8011A664 8F030000 */ lw $v1, 0x0($t8)
/* B0D68 8011A668 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* B0D6C 8011A66C 0060202D */ daddu $a0, $v1, $zero
/* B0D70 8011A670 24630008 */ addiu $v1, $v1, 0x8
/* B0D74 8011A674 AF030000 */ sw $v1, 0x0($t8)
/* B0D78 8011A678 AC820000 */ sw $v0, 0x0($a0)
/* B0D7C 8011A67C 080469FD */ j .L8011A7F4
/* B0D80 8011A680 AC860004 */ sw $a2, 0x4($a0)
.L8011A684:
/* B0D84 8011A684 2726FFFF */ addiu $a2, $t9, -0x1
/* B0D88 8011A688 3C03FD18 */ lui $v1, (0xFD180000 >> 16)
/* B0D8C 8011A68C 3C050700 */ lui $a1, (0x7000000 >> 16)
/* B0D90 8011A690 31290003 */ andi $t1, $t1, 0x3
/* B0D94 8011A694 00094A00 */ sll $t1, $t1, 8
/* B0D98 8011A698 2647FFFF */ addiu $a3, $s2, -0x1
/* B0D9C 8011A69C 00073880 */ sll $a3, $a3, 2
/* B0DA0 8011A6A0 30E70FFF */ andi $a3, $a3, 0xFFF
/* B0DA4 8011A6A4 8F020000 */ lw $v0, 0x0($t8)
/* B0DA8 8011A6A8 03320018 */ mult $t9, $s2
/* B0DAC 8011A6AC 0040202D */ daddu $a0, $v0, $zero
/* B0DB0 8011A6B0 24420008 */ addiu $v0, $v0, 0x8
/* B0DB4 8011A6B4 AF020000 */ sw $v0, 0x0($t8)
/* B0DB8 8011A6B8 30C20FFF */ andi $v0, $a2, 0xFFF
/* B0DBC 8011A6BC 00431025 */ or $v0, $v0, $v1
/* B0DC0 8011A6C0 01021025 */ or $v0, $t0, $v0
/* B0DC4 8011A6C4 3C03F518 */ lui $v1, (0xF5180000 >> 16)
/* B0DC8 8011A6C8 00063080 */ sll $a2, $a2, 2
/* B0DCC 8011A6CC 30C60FFF */ andi $a2, $a2, 0xFFF
/* B0DD0 8011A6D0 AC820000 */ sw $v0, 0x0($a0)
/* B0DD4 8011A6D4 AC9E0004 */ sw $fp, 0x4($a0)
/* B0DD8 8011A6D8 8F020000 */ lw $v0, 0x0($t8)
/* B0DDC 8011A6DC 00063300 */ sll $a2, $a2, 12
/* B0DE0 8011A6E0 0040202D */ daddu $a0, $v0, $zero
/* B0DE4 8011A6E4 24420008 */ addiu $v0, $v0, 0x8
/* B0DE8 8011A6E8 AF020000 */ sw $v0, 0x0($t8)
/* B0DEC 8011A6EC 00191040 */ sll $v0, $t9, 1
/* B0DF0 8011A6F0 24420007 */ addiu $v0, $v0, 0x7
/* B0DF4 8011A6F4 000210C3 */ sra $v0, $v0, 3
/* B0DF8 8011A6F8 304201FF */ andi $v0, $v0, 0x1FF
/* B0DFC 8011A6FC 00021240 */ sll $v0, $v0, 9
/* B0E00 8011A700 00431025 */ or $v0, $v0, $v1
/* B0E04 8011A704 01024025 */ or $t0, $t0, $v0
/* B0E08 8011A708 32E30003 */ andi $v1, $s7, 0x3
/* B0E0C 8011A70C 00031C80 */ sll $v1, $v1, 18
/* B0E10 8011A710 AC880000 */ sw $t0, 0x0($a0)
/* B0E14 8011A714 8FB40044 */ lw $s4, 0x44($sp)
/* B0E18 8011A718 8FB50048 */ lw $s5, 0x48($sp)
/* B0E1C 8011A71C 00145B80 */ sll $t3, $s4, 14
/* B0E20 8011A720 01651025 */ or $v0, $t3, $a1
/* B0E24 8011A724 00621025 */ or $v0, $v1, $v0
/* B0E28 8011A728 00491025 */ or $v0, $v0, $t1
/* B0E2C 8011A72C 00155100 */ sll $t2, $s5, 4
/* B0E30 8011A730 004A1025 */ or $v0, $v0, $t2
/* B0E34 8011A734 00E52825 */ or $a1, $a3, $a1
/* B0E38 8011A738 00C52825 */ or $a1, $a2, $a1
/* B0E3C 8011A73C AC820004 */ sw $v0, 0x4($a0)
/* B0E40 8011A740 8F020000 */ lw $v0, 0x0($t8)
/* B0E44 8011A744 006B1825 */ or $v1, $v1, $t3
/* B0E48 8011A748 0040202D */ daddu $a0, $v0, $zero
/* B0E4C 8011A74C 24420008 */ addiu $v0, $v0, 0x8
/* B0E50 8011A750 AF020000 */ sw $v0, 0x0($t8)
/* B0E54 8011A754 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* B0E58 8011A758 AC820000 */ sw $v0, 0x0($a0)
/* B0E5C 8011A75C AC800004 */ sw $zero, 0x4($a0)
/* B0E60 8011A760 8F020000 */ lw $v0, 0x0($t8)
/* B0E64 8011A764 00691825 */ or $v1, $v1, $t1
/* B0E68 8011A768 0040202D */ daddu $a0, $v0, $zero
/* B0E6C 8011A76C 24420008 */ addiu $v0, $v0, 0x8
/* B0E70 8011A770 AF020000 */ sw $v0, 0x0($t8)
/* B0E74 8011A774 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* B0E78 8011A778 AC820000 */ sw $v0, 0x0($a0)
/* B0E7C 8011A77C AC850004 */ sw $a1, 0x4($a0)
/* B0E80 8011A780 8F020000 */ lw $v0, 0x0($t8)
/* B0E84 8011A784 006A1825 */ or $v1, $v1, $t2
/* B0E88 8011A788 0040202D */ daddu $a0, $v0, $zero
/* B0E8C 8011A78C 24420008 */ addiu $v0, $v0, 0x8
/* B0E90 8011A790 AF020000 */ sw $v0, 0x0($t8)
/* B0E94 8011A794 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B0E98 8011A798 AC820000 */ sw $v0, 0x0($a0)
/* B0E9C 8011A79C AC800004 */ sw $zero, 0x4($a0)
/* B0EA0 8011A7A0 8F020000 */ lw $v0, 0x0($t8)
/* B0EA4 8011A7A4 00C73025 */ or $a2, $a2, $a3
/* B0EA8 8011A7A8 0040202D */ daddu $a0, $v0, $zero
/* B0EAC 8011A7AC 24420008 */ addiu $v0, $v0, 0x8
/* B0EB0 8011A7B0 AF020000 */ sw $v0, 0x0($t8)
/* B0EB4 8011A7B4 00001012 */ mflo $v0
/* B0EB8 8011A7B8 AC830004 */ sw $v1, 0x4($a0)
/* B0EBC 8011A7BC 00021FC2 */ srl $v1, $v0, 31
/* B0EC0 8011A7C0 00431021 */ addu $v0, $v0, $v1
/* B0EC4 8011A7C4 00021043 */ sra $v0, $v0, 1
/* B0EC8 8011A7C8 00021040 */ sll $v0, $v0, 1
/* B0ECC 8011A7CC 24420007 */ addiu $v0, $v0, 0x7
/* B0ED0 8011A7D0 000278C3 */ sra $t7, $v0, 3
/* B0ED4 8011A7D4 AC880000 */ sw $t0, 0x0($a0)
/* B0ED8 8011A7D8 8F040000 */ lw $a0, 0x0($t8)
/* B0EDC 8011A7DC 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* B0EE0 8011A7E0 0080182D */ daddu $v1, $a0, $zero
/* B0EE4 8011A7E4 24840008 */ addiu $a0, $a0, 0x8
/* B0EE8 8011A7E8 AF040000 */ sw $a0, 0x0($t8)
.L8011A7EC:
/* B0EEC 8011A7EC AC620000 */ sw $v0, 0x0($v1)
/* B0EF0 8011A7F0 AC660004 */ sw $a2, 0x4($v1)
.L8011A7F4:
/* B0EF4 8011A7F4 8FB0004C */ lw $s0, 0x4C($sp)
/* B0EF8 8011A7F8 24020001 */ addiu $v0, $zero, 0x1
/* B0EFC 8011A7FC 1202008E */ beq $s0, $v0, .L8011AA38
/* B0F00 8011A800 2666FFFF */ addiu $a2, $s3, -0x1
/* B0F04 8011A804 2A020002 */ slti $v0, $s0, 0x2
/* B0F08 8011A808 10400005 */ beqz $v0, .L8011A820
/* B0F0C 8011A80C 24020002 */ addiu $v0, $zero, 0x2
/* B0F10 8011A810 1200000A */ beqz $s0, .L8011A83C
/* B0F14 8011A814 3C03E300 */ lui $v1, (0xE3000C0F >> 16)
/* B0F18 8011A818 08046B32 */ j .L8011ACC8
/* B0F1C 8011A81C 00000000 */ nop
.L8011A820:
/* B0F20 8011A820 8FB4004C */ lw $s4, 0x4C($sp)
/* B0F24 8011A824 1282009C */ beq $s4, $v0, .L8011AA98
/* B0F28 8011A828 24020003 */ addiu $v0, $zero, 0x3
/* B0F2C 8011A82C 128200AF */ beq $s4, $v0, .L8011AAEC
/* B0F30 8011A830 3C03E300 */ lui $v1, (0xE3000C0F >> 16)
/* B0F34 8011A834 08046B32 */ j .L8011ACC8
/* B0F38 8011A838 00000000 */ nop
.L8011A83C:
/* B0F3C 8011A83C 00132043 */ sra $a0, $s3, 1
/* B0F40 8011A840 3C03FD08 */ lui $v1, (0xFD080000 >> 16)
/* B0F44 8011A844 31EF01FF */ andi $t7, $t7, 0x1FF
/* B0F48 8011A848 000E7380 */ sll $t6, $t6, 14
/* B0F4C 8011A84C 8F020000 */ lw $v0, 0x0($t8)
/* B0F50 8011A850 3C0C0700 */ lui $t4, (0x7000000 >> 16)
/* B0F54 8011A854 0040282D */ daddu $a1, $v0, $zero
/* B0F58 8011A858 24420008 */ addiu $v0, $v0, 0x8
/* B0F5C 8011A85C AF020000 */ sw $v0, 0x0($t8)
/* B0F60 8011A860 2482FFFF */ addiu $v0, $a0, -0x1
/* B0F64 8011A864 30420FFF */ andi $v0, $v0, 0xFFF
/* B0F68 8011A868 00431025 */ or $v0, $v0, $v1
/* B0F6C 8011A86C 24840007 */ addiu $a0, $a0, 0x7
/* B0F70 8011A870 8FB50020 */ lw $s5, 0x20($sp)
/* B0F74 8011A874 000420C3 */ sra $a0, $a0, 3
/* B0F78 8011A878 32A70007 */ andi $a3, $s5, 0x7
/* B0F7C 8011A87C 00073D40 */ sll $a3, $a3, 21
/* B0F80 8011A880 00E21025 */ or $v0, $a3, $v0
/* B0F84 8011A884 ACA20000 */ sw $v0, 0x0($a1)
/* B0F88 8011A888 8FB60088 */ lw $s6, 0x88($sp)
/* B0F8C 8011A88C 308401FF */ andi $a0, $a0, 0x1FF
/* B0F90 8011A890 ACB60004 */ sw $s6, 0x4($a1)
/* B0F94 8011A894 8F020000 */ lw $v0, 0x0($t8)
/* B0F98 8011A898 00042240 */ sll $a0, $a0, 9
/* B0F9C 8011A89C 0040182D */ daddu $v1, $v0, $zero
/* B0FA0 8011A8A0 24420008 */ addiu $v0, $v0, 0x8
/* B0FA4 8011A8A4 AF020000 */ sw $v0, 0x0($t8)
/* B0FA8 8011A8A8 3C02F508 */ lui $v0, (0xF5080000 >> 16)
/* B0FAC 8011A8AC 00821025 */ or $v0, $a0, $v0
/* B0FB0 8011A8B0 00E21025 */ or $v0, $a3, $v0
/* B0FB4 8011A8B4 004F1025 */ or $v0, $v0, $t7
/* B0FB8 8011A8B8 AC620000 */ sw $v0, 0x0($v1)
/* B0FBC 8011A8BC 01CC1025 */ or $v0, $t6, $t4
/* B0FC0 8011A8C0 AFAE004C */ sw $t6, 0x4C($sp)
/* B0FC4 8011A8C4 000D7100 */ sll $t6, $t5, 4
/* B0FC8 8011A8C8 8FB00028 */ lw $s0, 0x28($sp)
/* B0FCC 8011A8CC 93B4000F */ lbu $s4, 0xF($sp)
/* B0FD0 8011A8D0 8FB50024 */ lw $s5, 0x24($sp)
/* B0FD4 8011A8D4 93B60007 */ lbu $s6, 0x7($sp)
/* B0FD8 8011A8D8 32080003 */ andi $t0, $s0, 0x3
/* B0FDC 8011A8DC 00084480 */ sll $t0, $t0, 18
/* B0FE0 8011A8E0 01021025 */ or $v0, $t0, $v0
/* B0FE4 8011A8E4 328B000F */ andi $t3, $s4, 0xF
/* B0FE8 8011A8E8 000B5A80 */ sll $t3, $t3, 10
/* B0FEC 8011A8EC 004B1025 */ or $v0, $v0, $t3
/* B0FF0 8011A8F0 32AA0003 */ andi $t2, $s5, 0x3
/* B0FF4 8011A8F4 000A5200 */ sll $t2, $t2, 8
/* B0FF8 8011A8F8 004A1025 */ or $v0, $v0, $t2
/* B0FFC 8011A8FC 004E1025 */ or $v0, $v0, $t6
/* B1000 8011A900 32CD000F */ andi $t5, $s6, 0xF
/* B1004 8011A904 004D1025 */ or $v0, $v0, $t5
/* B1008 8011A908 AC620004 */ sw $v0, 0x4($v1)
/* B100C 8011A90C 8F020000 */ lw $v0, 0x0($t8)
/* B1010 8011A910 2665FFFF */ addiu $a1, $s3, -0x1
/* B1014 8011A914 0040182D */ daddu $v1, $v0, $zero
/* B1018 8011A918 24420008 */ addiu $v0, $v0, 0x8
/* B101C 8011A91C AF020000 */ sw $v0, 0x0($t8)
/* B1020 8011A920 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* B1024 8011A924 AC620000 */ sw $v0, 0x0($v1)
/* B1028 8011A928 AC600004 */ sw $zero, 0x4($v1)
/* B102C 8011A92C 00051840 */ sll $v1, $a1, 1
/* B1030 8011A930 30630FFF */ andi $v1, $v1, 0xFFF
/* B1034 8011A934 8F020000 */ lw $v0, 0x0($t8)
/* B1038 8011A938 00031B00 */ sll $v1, $v1, 12
/* B103C 8011A93C 0040482D */ daddu $t1, $v0, $zero
/* B1040 8011A940 24420008 */ addiu $v0, $v0, 0x8
/* B1044 8011A944 AF020000 */ sw $v0, 0x0($t8)
/* B1048 8011A948 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* B104C 8011A94C AD220000 */ sw $v0, 0x0($t1)
/* B1050 8011A950 8FB00040 */ lw $s0, 0x40($sp)
/* B1054 8011A954 00052880 */ sll $a1, $a1, 2
/* B1058 8011A958 2606FFFF */ addiu $a2, $s0, -0x1
/* B105C 8011A95C 00063080 */ sll $a2, $a2, 2
/* B1060 8011A960 30C20FFF */ andi $v0, $a2, 0xFFF
/* B1064 8011A964 004C1025 */ or $v0, $v0, $t4
/* B1068 8011A968 00621825 */ or $v1, $v1, $v0
/* B106C 8011A96C AD230004 */ sw $v1, 0x4($t1)
/* B1070 8011A970 8F020000 */ lw $v0, 0x0($t8)
/* B1074 8011A974 3C0C0100 */ lui $t4, (0x1000000 >> 16)
/* B1078 8011A978 0040182D */ daddu $v1, $v0, $zero
/* B107C 8011A97C 24420008 */ addiu $v0, $v0, 0x8
/* B1080 8011A980 AF020000 */ sw $v0, 0x0($t8)
/* B1084 8011A984 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B1088 8011A988 AC620000 */ sw $v0, 0x0($v1)
/* B108C 8011A98C AC600004 */ sw $zero, 0x4($v1)
/* B1090 8011A990 8F020000 */ lw $v0, 0x0($t8)
/* B1094 8011A994 010C4025 */ or $t0, $t0, $t4
/* B1098 8011A998 0040182D */ daddu $v1, $v0, $zero
/* B109C 8011A99C 24420008 */ addiu $v0, $v0, 0x8
/* B10A0 8011A9A0 AF020000 */ sw $v0, 0x0($t8)
/* B10A4 8011A9A4 3C02F500 */ lui $v0, (0xF5000000 >> 16)
/* B10A8 8011A9A8 00822025 */ or $a0, $a0, $v0
/* B10AC 8011A9AC 00E43825 */ or $a3, $a3, $a0
/* B10B0 8011A9B0 00EF3825 */ or $a3, $a3, $t7
/* B10B4 8011A9B4 AC670000 */ sw $a3, 0x0($v1)
/* B10B8 8011A9B8 8FB40030 */ lw $s4, 0x30($sp)
/* B10BC 8011A9BC 8FB5004C */ lw $s5, 0x4C($sp)
/* B10C0 8011A9C0 00141500 */ sll $v0, $s4, 20
/* B10C4 8011A9C4 00481025 */ or $v0, $v0, $t0
/* B10C8 8011A9C8 00551025 */ or $v0, $v0, $s5
/* B10CC 8011A9CC 004B1025 */ or $v0, $v0, $t3
/* B10D0 8011A9D0 004A1025 */ or $v0, $v0, $t2
/* B10D4 8011A9D4 004E1025 */ or $v0, $v0, $t6
/* B10D8 8011A9D8 004D1025 */ or $v0, $v0, $t5
/* B10DC 8011A9DC AC620004 */ sw $v0, 0x4($v1)
/* B10E0 8011A9E0 8F020000 */ lw $v0, 0x0($t8)
/* B10E4 8011A9E4 3C03F200 */ lui $v1, (0xF2000000 >> 16)
/* B10E8 8011A9E8 0040482D */ daddu $t1, $v0, $zero
/* B10EC 8011A9EC 24420008 */ addiu $v0, $v0, 0x8
/* B10F0 8011A9F0 AF020000 */ sw $v0, 0x0($t8)
/* B10F4 8011A9F4 97A70016 */ lhu $a3, 0x16($sp)
/* B10F8 8011A9F8 97A8001E */ lhu $t0, 0x1E($sp)
/* B10FC 8011A9FC 30E40FFF */ andi $a0, $a3, 0xFFF
/* B1100 8011AA00 00042300 */ sll $a0, $a0, 12
/* B1104 8011AA04 31020FFF */ andi $v0, $t0, 0xFFF
/* B1108 8011AA08 00431025 */ or $v0, $v0, $v1
/* B110C 8011AA0C 00822025 */ or $a0, $a0, $v0
/* B1110 8011AA10 00A72821 */ addu $a1, $a1, $a3
/* B1114 8011AA14 30A50FFF */ andi $a1, $a1, 0xFFF
/* B1118 8011AA18 00052B00 */ sll $a1, $a1, 12
/* B111C 8011AA1C 00C83021 */ addu $a2, $a2, $t0
/* B1120 8011AA20 30C60FFF */ andi $a2, $a2, 0xFFF
/* B1124 8011AA24 00CC3025 */ or $a2, $a2, $t4
/* B1128 8011AA28 00A62825 */ or $a1, $a1, $a2
/* B112C 8011AA2C AD240000 */ sw $a0, 0x0($t1)
/* B1130 8011AA30 08046B31 */ j .L8011ACC4
/* B1134 8011AA34 AD250004 */ sw $a1, 0x4($t1)
.L8011AA38:
/* B1138 8011AA38 3C03FD08 */ lui $v1, (0xFD080000 >> 16)
/* B113C 8011AA3C 000E7380 */ sll $t6, $t6, 14
/* B1140 8011AA40 8F020000 */ lw $v0, 0x0($t8)
/* B1144 8011AA44 3C0B0700 */ lui $t3, (0x7000000 >> 16)
/* B1148 8011AA48 0040282D */ daddu $a1, $v0, $zero
/* B114C 8011AA4C 24420008 */ addiu $v0, $v0, 0x8
/* B1150 8011AA50 AF020000 */ sw $v0, 0x0($t8)
/* B1154 8011AA54 30C20FFF */ andi $v0, $a2, 0xFFF
/* B1158 8011AA58 8FB60020 */ lw $s6, 0x20($sp)
/* B115C 8011AA5C 00431025 */ or $v0, $v0, $v1
/* B1160 8011AA60 32C40007 */ andi $a0, $s6, 0x7
/* B1164 8011AA64 00042540 */ sll $a0, $a0, 21
/* B1168 8011AA68 00821025 */ or $v0, $a0, $v0
/* B116C 8011AA6C ACA20000 */ sw $v0, 0x0($a1)
/* B1170 8011AA70 8FB00088 */ lw $s0, 0x88($sp)
/* B1174 8011AA74 000D6900 */ sll $t5, $t5, 4
/* B1178 8011AA78 ACB00004 */ sw $s0, 0x4($a1)
/* B117C 8011AA7C 8F020000 */ lw $v0, 0x0($t8)
/* B1180 8011AA80 3C03F508 */ lui $v1, (0xF5080000 >> 16)
/* B1184 8011AA84 0040282D */ daddu $a1, $v0, $zero
/* B1188 8011AA88 24420008 */ addiu $v0, $v0, 0x8
/* B118C 8011AA8C AF020000 */ sw $v0, 0x0($t8)
/* B1190 8011AA90 08046AD4 */ j .L8011AB50
/* B1194 8011AA94 26620007 */ addiu $v0, $s3, 0x7
.L8011AA98:
/* B1198 8011AA98 2666FFFF */ addiu $a2, $s3, -0x1
/* B119C 8011AA9C 3C03FD10 */ lui $v1, (0xFD100000 >> 16)
/* B11A0 8011AAA0 000E7380 */ sll $t6, $t6, 14
/* B11A4 8011AAA4 8F020000 */ lw $v0, 0x0($t8)
/* B11A8 8011AAA8 3C0B0700 */ lui $t3, (0x7000000 >> 16)
/* B11AC 8011AAAC 0040282D */ daddu $a1, $v0, $zero
/* B11B0 8011AAB0 24420008 */ addiu $v0, $v0, 0x8
glabel func_8011AAB4
/* B11B4 8011AAB4 AF020000 */ sw $v0, 0x0($t8)
/* B11B8 8011AAB8 30C20FFF */ andi $v0, $a2, 0xFFF
/* B11BC 8011AABC 8FB60020 */ lw $s6, 0x20($sp)
/* B11C0 8011AAC0 00431025 */ or $v0, $v0, $v1
/* B11C4 8011AAC4 32C40007 */ andi $a0, $s6, 0x7
/* B11C8 8011AAC8 00042540 */ sll $a0, $a0, 21
/* B11CC 8011AACC 00821025 */ or $v0, $a0, $v0
/* B11D0 8011AAD0 ACA20000 */ sw $v0, 0x0($a1)
/* B11D4 8011AAD4 8FB00088 */ lw $s0, 0x88($sp)
/* B11D8 8011AAD8 000D6900 */ sll $t5, $t5, 4
/* B11DC 8011AADC ACB00004 */ sw $s0, 0x4($a1)
/* B11E0 8011AAE0 8F020000 */ lw $v0, 0x0($t8)
/* B11E4 8011AAE4 08046ACF */ j .L8011AB3C
/* B11E8 8011AAE8 3C03F510 */ lui $v1, (0xF5100000 >> 16)
.L8011AAEC:
/* B11EC 8011AAEC 2666FFFF */ addiu $a2, $s3, -0x1
/* B11F0 8011AAF0 3C03FD18 */ lui $v1, (0xFD180000 >> 16)
/* B11F4 8011AAF4 000E7380 */ sll $t6, $t6, 14
/* B11F8 8011AAF8 8F020000 */ lw $v0, 0x0($t8)
/* B11FC 8011AAFC 3C0B0700 */ lui $t3, (0x7000000 >> 16)
/* B1200 8011AB00 0040282D */ daddu $a1, $v0, $zero
/* B1204 8011AB04 24420008 */ addiu $v0, $v0, 0x8
/* B1208 8011AB08 AF020000 */ sw $v0, 0x0($t8)
/* B120C 8011AB0C 30C20FFF */ andi $v0, $a2, 0xFFF
/* B1210 8011AB10 8FB60020 */ lw $s6, 0x20($sp)
/* B1214 8011AB14 00431025 */ or $v0, $v0, $v1
/* B1218 8011AB18 32C40007 */ andi $a0, $s6, 0x7
/* B121C 8011AB1C 00042540 */ sll $a0, $a0, 21
/* B1220 8011AB20 00821025 */ or $v0, $a0, $v0
/* B1224 8011AB24 ACA20000 */ sw $v0, 0x0($a1)
/* B1228 8011AB28 8FB00088 */ lw $s0, 0x88($sp)
/* B122C 8011AB2C 000D6900 */ sll $t5, $t5, 4
/* B1230 8011AB30 ACB00004 */ sw $s0, 0x4($a1)
/* B1234 8011AB34 8F020000 */ lw $v0, 0x0($t8)
/* B1238 8011AB38 3C03F518 */ lui $v1, (0xF5180000 >> 16)
.L8011AB3C:
/* B123C 8011AB3C 0040282D */ daddu $a1, $v0, $zero
/* B1240 8011AB40 24420008 */ addiu $v0, $v0, 0x8
/* B1244 8011AB44 AF020000 */ sw $v0, 0x0($t8)
/* B1248 8011AB48 00131040 */ sll $v0, $s3, 1
/* B124C 8011AB4C 24420007 */ addiu $v0, $v0, 0x7
.L8011AB50:
/* B1250 8011AB50 000210C3 */ sra $v0, $v0, 3
/* B1254 8011AB54 304201FF */ andi $v0, $v0, 0x1FF
/* B1258 8011AB58 00021240 */ sll $v0, $v0, 9
/* B125C 8011AB5C 00431025 */ or $v0, $v0, $v1
/* B1260 8011AB60 00822025 */ or $a0, $a0, $v0
/* B1264 8011AB64 31E201FF */ andi $v0, $t7, 0x1FF
/* B1268 8011AB68 00822025 */ or $a0, $a0, $v0
/* B126C 8011AB6C 01CB1025 */ or $v0, $t6, $t3
/* B1270 8011AB70 ACA40000 */ sw $a0, 0x0($a1)
/* B1274 8011AB74 8FB40028 */ lw $s4, 0x28($sp)
/* B1278 8011AB78 93B5000F */ lbu $s5, 0xF($sp)
/* B127C 8011AB7C 8FB60024 */ lw $s6, 0x24($sp)
/* B1280 8011AB80 93B00007 */ lbu $s0, 0x7($sp)
/* B1284 8011AB84 32870003 */ andi $a3, $s4, 0x3
/* B1288 8011AB88 00073C80 */ sll $a3, $a3, 18
/* B128C 8011AB8C 00E21025 */ or $v0, $a3, $v0
/* B1290 8011AB90 32AA000F */ andi $t2, $s5, 0xF
/* B1294 8011AB94 000A5280 */ sll $t2, $t2, 10
/* B1298 8011AB98 004A1025 */ or $v0, $v0, $t2
/* B129C 8011AB9C 32C90003 */ andi $t1, $s6, 0x3
/* B12A0 8011ABA0 00094A00 */ sll $t1, $t1, 8
/* B12A4 8011ABA4 00491025 */ or $v0, $v0, $t1
/* B12A8 8011ABA8 004D1025 */ or $v0, $v0, $t5
/* B12AC 8011ABAC 320C000F */ andi $t4, $s0, 0xF
/* B12B0 8011ABB0 004C1025 */ or $v0, $v0, $t4
/* B12B4 8011ABB4 ACA20004 */ sw $v0, 0x4($a1)
/* B12B8 8011ABB8 8F020000 */ lw $v0, 0x0($t8)
/* B12BC 8011ABBC 00063080 */ sll $a2, $a2, 2
/* B12C0 8011ABC0 0040182D */ daddu $v1, $v0, $zero
/* B12C4 8011ABC4 24420008 */ addiu $v0, $v0, 0x8
/* B12C8 8011ABC8 AF020000 */ sw $v0, 0x0($t8)
/* B12CC 8011ABCC 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* B12D0 8011ABD0 AC620000 */ sw $v0, 0x0($v1)
/* B12D4 8011ABD4 AC600004 */ sw $zero, 0x4($v1)
/* B12D8 8011ABD8 8F020000 */ lw $v0, 0x0($t8)
/* B12DC 8011ABDC 30C30FFF */ andi $v1, $a2, 0xFFF
/* B12E0 8011ABE0 0040402D */ daddu $t0, $v0, $zero
/* B12E4 8011ABE4 24420008 */ addiu $v0, $v0, 0x8
/* B12E8 8011ABE8 AF020000 */ sw $v0, 0x0($t8)
/* B12EC 8011ABEC 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* B12F0 8011ABF0 AD020000 */ sw $v0, 0x0($t0)
/* B12F4 8011ABF4 8FB40040 */ lw $s4, 0x40($sp)
/* B12F8 8011ABF8 00031B00 */ sll $v1, $v1, 12
/* B12FC 8011ABFC 2685FFFF */ addiu $a1, $s4, -0x1
/* B1300 8011AC00 00052880 */ sll $a1, $a1, 2
/* B1304 8011AC04 30A20FFF */ andi $v0, $a1, 0xFFF
/* B1308 8011AC08 004B1025 */ or $v0, $v0, $t3
/* B130C 8011AC0C 00621825 */ or $v1, $v1, $v0
/* B1310 8011AC10 AD030004 */ sw $v1, 0x4($t0)
/* B1314 8011AC14 8F020000 */ lw $v0, 0x0($t8)
/* B1318 8011AC18 0040182D */ daddu $v1, $v0, $zero
/* B131C 8011AC1C 24420008 */ addiu $v0, $v0, 0x8
/* B1320 8011AC20 AF020000 */ sw $v0, 0x0($t8)
/* B1324 8011AC24 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B1328 8011AC28 AC620000 */ sw $v0, 0x0($v1)
/* B132C 8011AC2C AC600004 */ sw $zero, 0x4($v1)
/* B1330 8011AC30 8F020000 */ lw $v0, 0x0($t8)
/* B1334 8011AC34 3C0B0100 */ lui $t3, (0x1000000 >> 16)
/* B1338 8011AC38 0040182D */ daddu $v1, $v0, $zero
/* B133C 8011AC3C 24420008 */ addiu $v0, $v0, 0x8
/* B1340 8011AC40 AF020000 */ sw $v0, 0x0($t8)
/* B1344 8011AC44 AC640000 */ sw $a0, 0x0($v1)
/* B1348 8011AC48 8FB50030 */ lw $s5, 0x30($sp)
/* B134C 8011AC4C 00EB3825 */ or $a3, $a3, $t3
/* B1350 8011AC50 00151500 */ sll $v0, $s5, 20
/* B1354 8011AC54 00471025 */ or $v0, $v0, $a3
/* B1358 8011AC58 004E1025 */ or $v0, $v0, $t6
/* B135C 8011AC5C 004A1025 */ or $v0, $v0, $t2
/* B1360 8011AC60 00491025 */ or $v0, $v0, $t1
/* B1364 8011AC64 004D1025 */ or $v0, $v0, $t5
/* B1368 8011AC68 004C1025 */ or $v0, $v0, $t4
/* B136C 8011AC6C AC620004 */ sw $v0, 0x4($v1)
/* B1370 8011AC70 8F020000 */ lw $v0, 0x0($t8)
/* B1374 8011AC74 3C03F200 */ lui $v1, (0xF2000000 >> 16)
/* B1378 8011AC78 0040482D */ daddu $t1, $v0, $zero
/* B137C 8011AC7C 24420008 */ addiu $v0, $v0, 0x8
/* B1380 8011AC80 AF020000 */ sw $v0, 0x0($t8)
/* B1384 8011AC84 97A70016 */ lhu $a3, 0x16($sp)
/* B1388 8011AC88 97A8001E */ lhu $t0, 0x1E($sp)
/* B138C 8011AC8C 30E40FFF */ andi $a0, $a3, 0xFFF
/* B1390 8011AC90 00042300 */ sll $a0, $a0, 12
/* B1394 8011AC94 31020FFF */ andi $v0, $t0, 0xFFF
/* B1398 8011AC98 00431025 */ or $v0, $v0, $v1
/* B139C 8011AC9C 00822025 */ or $a0, $a0, $v0
/* B13A0 8011ACA0 00C73021 */ addu $a2, $a2, $a3
/* B13A4 8011ACA4 30C60FFF */ andi $a2, $a2, 0xFFF
/* B13A8 8011ACA8 00063300 */ sll $a2, $a2, 12
/* B13AC 8011ACAC 00A82821 */ addu $a1, $a1, $t0
/* B13B0 8011ACB0 30A50FFF */ andi $a1, $a1, 0xFFF
/* B13B4 8011ACB4 00AB2825 */ or $a1, $a1, $t3
/* B13B8 8011ACB8 00C53025 */ or $a2, $a2, $a1
/* B13BC 8011ACBC AD240000 */ sw $a0, 0x0($t1)
/* B13C0 8011ACC0 AD260004 */ sw $a2, 0x4($t1)
.L8011ACC4:
/* B13C4 8011ACC4 3C03E300 */ lui $v1, (0xE3000C0F >> 16)
.L8011ACC8:
/* B13C8 8011ACC8 8F020000 */ lw $v0, 0x0($t8)
/* B13CC 8011ACCC 34630C0F */ ori $v1, $v1, (0xE3000C0F & 0xFFFF)
/* B13D0 8011ACD0 0040202D */ daddu $a0, $v0, $zero
/* B13D4 8011ACD4 24420008 */ addiu $v0, $v0, 0x8
/* B13D8 8011ACD8 AF020000 */ sw $v0, 0x0($t8)
/* B13DC 8011ACDC AC830000 */ sw $v1, 0x0($a0)
/* B13E0 8011ACE0 3C030008 */ lui $v1, (0x80000 >> 16)
/* B13E4 8011ACE4 8FB60034 */ lw $s6, 0x34($sp)
/* B13E8 8011ACE8 8FB0002C */ lw $s0, 0x2C($sp)
/* B13EC 8011ACEC 8FB40038 */ lw $s4, 0x38($sp)
/* B13F0 8011ACF0 36C20C00 */ ori $v0, $s6, 0xC00
/* B13F4 8011ACF4 02021025 */ or $v0, $s0, $v0
/* B13F8 8011ACF8 00541025 */ or $v0, $v0, $s4
/* B13FC 8011ACFC 00431025 */ or $v0, $v0, $v1
/* B1400 8011AD00 AC820004 */ sw $v0, 0x4($a0)
/* B1404 8011AD04 8FBE0070 */ lw $fp, 0x70($sp)
/* B1408 8011AD08 8FB7006C */ lw $s7, 0x6C($sp)
/* B140C 8011AD0C 8FB60068 */ lw $s6, 0x68($sp)
/* B1410 8011AD10 8FB50064 */ lw $s5, 0x64($sp)
/* B1414 8011AD14 8FB40060 */ lw $s4, 0x60($sp)
/* B1418 8011AD18 8FB3005C */ lw $s3, 0x5C($sp)
/* B141C 8011AD1C 8FB20058 */ lw $s2, 0x58($sp)
/* B1420 8011AD20 8FB10054 */ lw $s1, 0x54($sp)
/* B1424 8011AD24 8FB00050 */ lw $s0, 0x50($sp)
/* B1428 8011AD28 03E00008 */ jr $ra
/* B142C 8011AD2C 27BD0078 */ addiu $sp, $sp, 0x78
### DECOMPILED C INSTRUCTIONS:
void func_801180E8(TextureHeader* header, Gfx** gfxPos, IMG_PTR raster, PAL_PTR palette, IMG_PTR auxRaster, PAL_PTR auxPalette, u8 arg6, u8 arg7, u16 arg8, u16 arg9) {
s32 mainWidth, mainHeight;
s32 auxWidth, auxHeight;
s32 mainFmt;
s32 auxFmt;
s32 mainWrapW, mainWrapH;
s32 auxWrapW, auxWrapH;
s32 extraTileType;
u32 renderType;
s32 lod;
s32 lodDivisor;
IMG_PTR rasterPtr;
s32 filteringMode;
s32 auxPaletteIndex;
s32 lutMode;
s32 lodMode;
s32 mainMasks, mainMaskt;
s32 auxMasks, auxMaskt;
s32 mainBitDepth;
s32 auxBitDepth;
s32 temp;
mainWidth = header->mainW;
mainHeight = header->mainH;
lod = 0;
auxPaletteIndex = 0;
mainMasks = INTEGER_LOG2(mainWidth);
mainMaskt = INTEGER_LOG2(mainHeight);
mainWrapW = header->mainWrapW;
mainWrapH = header->mainWrapH;
mainFmt = header->mainFmt;
mainBitDepth = header->mainBitDepth;
extraTileType = header->extraTiles;
filteringMode = header->filtering << G_MDSFT_TEXTFILT;
auxWidth = header->auxW;
auxHeight = header->auxH;
auxMasks = INTEGER_LOG2(auxWidth);
auxMaskt = INTEGER_LOG2(auxHeight);
auxWrapW = header->auxWrapW;
auxWrapH = header->auxWrapH;
auxFmt = header->auxFmt;
auxBitDepth = header->auxBitDepth;
if (extraTileType == EXTRA_TILE_AUX_INDEPENDENT) {
if (palette != NULL) {
auxPaletteIndex = 1;
} else {
auxPaletteIndex = 0;
}
}
if (palette != NULL || auxPalette != NULL) {
lutMode = G_TT_RGBA16;
if (palette != NULL) {
if (mainBitDepth == G_IM_SIZ_4b) {
gDPLoadTLUT_pal16((*gfxPos)++, 0, palette);
} else if (mainBitDepth == G_IM_SIZ_8b) {
gDPLoadTLUT_pal256((*gfxPos)++, palette);
}
}
if (auxPalette != NULL) {
if (auxBitDepth == G_IM_SIZ_4b) {
gDPLoadTLUT_pal16((*gfxPos)++, auxPaletteIndex, auxPalette);
} else if (auxBitDepth == G_IM_SIZ_8b) {
gDPLoadTLUT_pal256((*gfxPos)++, auxPalette);
}
}
} else {
lutMode = G_TT_NONE;
}
renderType = header->colorCombineType;
if (renderType >= 3) {
renderType += 10;
} else {
renderType = header->extraTiles * 3 + 1 + header->colorCombineSubType;
}
**gfxPos = D_8014B0B8[renderType][0];
(*gfxPos)++;
switch (extraTileType) {
case EXTRA_TILE_NONE:
lodMode = G_TL_TILE;
gSPTexture((*gfxPos)++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
switch (mainBitDepth) {
case G_IM_SIZ_4b:
gDPLoadTextureBlock_4b((*gfxPos)++, raster, mainFmt,
mainWidth, mainHeight, 0,
mainWrapW, mainWrapH, mainMasks, mainMaskt, G_TX_NOLOD, G_TX_NOLOD);
break;
case G_IM_SIZ_8b:
gDPLoadTextureBlock((*gfxPos)++, raster, mainFmt, G_IM_SIZ_8b,
mainWidth, mainHeight, 0,
mainWrapW, mainWrapH, mainMasks, mainMaskt, G_TX_NOLOD, G_TX_NOLOD);
break;
case G_IM_SIZ_16b:
gDPLoadTextureBlock((*gfxPos)++, raster, mainFmt, G_IM_SIZ_16b,
mainWidth, mainHeight, 0,
mainWrapW, mainWrapH, mainMasks, mainMaskt, G_TX_NOLOD, G_TX_NOLOD);
break;
case 3:
gDPLoadTextureBlock((*gfxPos)++, raster, mainFmt, G_IM_SIZ_32b,
mainWidth, mainHeight, 0,
mainWrapW, mainWrapH, mainMasks, mainMaskt, G_TX_NOLOD, G_TX_NOLOD);
break;
}
break;
case EXTRA_TILE_MIPMAPS:
lodMode = G_TL_LOD;
switch (mainBitDepth) {
case G_IM_SIZ_4b:
for (rasterPtr = raster, lod = 0, lodDivisor = 1;
mainWidth / lodDivisor * 4 >= 64 && mainHeight / lodDivisor != 0;
rasterPtr += mainWidth / lodDivisor * mainHeight / lodDivisor / 2, lodDivisor *= 2, lod++)
{
gDPLoadMultiTile_4b((*gfxPos)++, rasterPtr, (u32)(rasterPtr - raster) >> 3, lod, mainFmt,
mainWidth / lodDivisor, mainHeight / lodDivisor,
0, 0, mainWidth / lodDivisor - 1, mainHeight / lodDivisor - 1, 0,
mainWrapW, mainWrapH, mainMasks - lod, mainMaskt - lod, lod, lod);
}
break;
case G_IM_SIZ_8b:
for (rasterPtr = raster, lod = 0, lodDivisor = 1;
mainWidth / lodDivisor * 8 >= 64 && mainHeight / lodDivisor != 0;
rasterPtr += mainWidth / lodDivisor * mainHeight / lodDivisor, lodDivisor *= 2, lod++)
{
gDPLoadMultiTile((*gfxPos)++, rasterPtr, ((u32)(rasterPtr - raster)) >> 3, lod, mainFmt, G_IM_SIZ_8b,
mainWidth / lodDivisor, mainHeight / lodDivisor,
0, 0, mainWidth / lodDivisor - 1, mainHeight / lodDivisor - 1, 0,
mainWrapW, mainWrapH, mainMasks - lod, mainMaskt - lod, lod, lod);
}
break;
case G_IM_SIZ_16b:
for (rasterPtr = raster, lod = 0, lodDivisor = 1;
mainWidth / lodDivisor * 16 >= 64 && mainHeight / lodDivisor != 0;
rasterPtr += mainWidth / lodDivisor * mainHeight / lodDivisor * 2, lodDivisor *= 2, lod++)
{
gDPLoadMultiTile((*gfxPos)++, rasterPtr, ((u32)(rasterPtr - raster)) >> 3, lod, mainFmt, G_IM_SIZ_16b,
mainWidth / lodDivisor, mainHeight / lodDivisor,
0, 0, mainWidth / lodDivisor - 1, mainHeight / lodDivisor - 1, 0,
mainWrapW, mainWrapH, mainMasks - lod, mainMaskt - lod, lod, lod);
}
break;
case G_IM_SIZ_32b:
for (rasterPtr = raster, lod = 0, lodDivisor = 1;
mainWidth / lodDivisor * 32 >= 64 && mainHeight / lodDivisor != 0;
rasterPtr += mainWidth / lodDivisor * mainHeight / lodDivisor * 4, lodDivisor *= 2, lod++)
{
gDPLoadMultiTile((*gfxPos)++, rasterPtr, ((u32)(rasterPtr - raster)) >> 4, lod, mainFmt, G_IM_SIZ_32b,
mainWidth / lodDivisor, mainHeight / lodDivisor,
0, 0, mainWidth / lodDivisor - 1, mainHeight / lodDivisor - 1, 0,
mainWrapW, mainWrapH, mainMasks - lod, mainMaskt - lod, lod, lod);
}
break;
}
gSPTexture((*gfxPos)++, 0xFFFF, 0xFFFF, lod - 1, G_TX_RENDERTILE, G_ON);
break;
case EXTRA_TILE_AUX_SAME_AS_MAIN:
gSPTexture((*gfxPos)++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gDPPipeSync((*gfxPos)++);
lodMode = G_TL_TILE;
switch (mainBitDepth) {
case G_IM_SIZ_4b:
gDPScrollTextureBlockHalfHeight_4b((*gfxPos)++, raster, mainFmt, mainWidth, mainHeight, 0,
mainWrapW, mainWrapH, mainMasks, mainMaskt, G_TX_NOLOD, G_TX_NOLOD,
arg8, arg9, arg6, arg7);
break;
case G_IM_SIZ_8b:
gDPScrollTextureBlockHalfHeight((*gfxPos)++, raster, mainFmt, G_IM_SIZ_8b, mainWidth, mainHeight, 0,
mainWrapW, mainWrapH, mainMasks, mainMaskt, G_TX_NOLOD, G_TX_NOLOD,
arg8, arg9, arg6, arg7);
break;
case G_IM_SIZ_16b:
gDPScrollTextureBlockHalfHeight((*gfxPos)++, raster, mainFmt, G_IM_SIZ_16b, mainWidth, mainHeight, 0,
mainWrapW, mainWrapH, mainMasks, mainMaskt, G_TX_NOLOD, G_TX_NOLOD,
arg8, arg9, arg6, arg7);
break;
case G_IM_SIZ_32b:
gDPScrollTextureBlockHalfHeight((*gfxPos)++, raster, mainFmt, G_IM_SIZ_32b, mainWidth, mainHeight, 0,
mainWrapW, mainWrapH, mainMasks, mainMaskt, G_TX_NOLOD, G_TX_NOLOD,
arg8, arg9, arg6, arg7);
break;
}
break;
case EXTRA_TILE_AUX_INDEPENDENT:
gSPTexture((*gfxPos)++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
lodMode = G_TL_TILE;
switch (mainBitDepth) {
case G_IM_SIZ_4b:
gDPLoadTextureTile_4b((*gfxPos)++, raster, mainFmt, mainWidth, mainHeight,
0, 0, mainWidth - 1, mainHeight - 1, 0,
mainWrapW, mainWrapH, mainMasks, mainMaskt, G_TX_NOLOD, G_TX_NOLOD);
lodDivisor = (((mainWidth * mainHeight) >> 1) + 7)>>3; // required to use lodDivisor here
break;
case G_IM_SIZ_8b:
gDPLoadTextureTile((*gfxPos)++, raster, mainFmt, G_IM_SIZ_8b, mainWidth, mainHeight,
0, 0, mainWidth - 1, mainHeight - 1, 0,
mainWrapW, mainWrapH, mainMasks, mainMaskt, G_TX_NOLOD, G_TX_NOLOD);
lodDivisor = ((mainWidth * mainHeight) + 7)>>3;
break;
case G_IM_SIZ_16b:
gDPLoadTextureTile((*gfxPos)++, raster, mainFmt, G_IM_SIZ_16b, mainWidth, mainHeight,
0, 0, mainWidth - 1, mainHeight - 1, 0,
mainWrapW, mainWrapH, mainMasks, mainMaskt, G_TX_NOLOD, G_TX_NOLOD);
lodDivisor = ((mainWidth * mainHeight) * 2 + 7)>>3;
break;
case G_IM_SIZ_32b:
gDPLoadTextureTile((*gfxPos)++, raster, mainFmt, G_IM_SIZ_32b, mainWidth, mainHeight,
0, 0, mainWidth - 1, mainHeight - 1, 0,
mainWrapW, mainWrapH, mainMasks, mainMaskt, G_TX_NOLOD, G_TX_NOLOD);
lodDivisor = ((mainWidth * mainHeight / 2) * 2 + 7)>>3;
break;
}
switch (auxBitDepth) {
case G_IM_SIZ_4b:
gDPScrollMultiTile_4b((*gfxPos)++, auxRaster, lodDivisor, 1, auxFmt, auxWidth, auxHeight,
0, 0, auxWidth - 1, auxHeight - 1, auxPaletteIndex,
auxWrapW, auxWrapH, auxMasks, auxMaskt,
arg6, arg7, arg8, arg9);
break;
case G_IM_SIZ_8b:
gDPScrollMultiTile((*gfxPos)++, auxRaster, lodDivisor, 1, auxFmt, G_IM_SIZ_8b, auxWidth, auxHeight,
0, 0, auxWidth - 1, auxHeight - 1, auxPaletteIndex,
auxWrapW, auxWrapH, auxMasks, auxMaskt,
arg6, arg7, arg8, arg9);
break;
case G_IM_SIZ_16b:
gDPScrollMultiTile((*gfxPos)++, auxRaster, lodDivisor, 1, auxFmt, G_IM_SIZ_16b, auxWidth, auxHeight,
0, 0, auxWidth - 1, auxHeight - 1, auxPaletteIndex,
auxWrapW, auxWrapH, auxMasks, auxMaskt,
arg6, arg7, arg8, arg9);
break;
case G_IM_SIZ_32b:
gDPScrollMultiTile((*gfxPos)++, auxRaster, lodDivisor, 1, auxFmt, G_IM_SIZ_32b, auxWidth, auxHeight,
0, 0, auxWidth - 1, auxHeight - 1, auxPaletteIndex,
auxWrapW, auxWrapH, auxMasks, auxMaskt,
arg6, arg7, arg8, arg9);
break;
}
}
gSPSetOtherMode((*gfxPos)++, G_SETOTHERMODE_H, 4, 16, filteringMode | G_TC_FILT | lutMode | lodMode | G_TP_PERSP );
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_8025E190
/* 18CA70 8025E190 3C03800E */ lui $v1, %hi(gBattleSubState)
/* 18CA74 8025E194 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
/* 18CA78 8025E198 27BDFF98 */ addiu $sp, $sp, -0x68
/* 18CA7C 8025E19C AFBE0060 */ sw $fp, 0x60($sp)
/* 18CA80 8025E1A0 3C1E800E */ lui $fp, %hi(gBattleStatus)
/* 18CA84 8025E1A4 27DEC070 */ addiu $fp, $fp, %lo(gBattleStatus)
/* 18CA88 8025E1A8 AFB50054 */ sw $s5, 0x54($sp)
/* 18CA8C 8025E1AC 3C158011 */ lui $s5, %hi(gPlayerData)
/* 18CA90 8025E1B0 26B5F290 */ addiu $s5, $s5, %lo(gPlayerData)
/* 18CA94 8025E1B4 AFBF0064 */ sw $ra, 0x64($sp)
/* 18CA98 8025E1B8 AFB7005C */ sw $s7, 0x5C($sp)
/* 18CA9C 8025E1BC AFB60058 */ sw $s6, 0x58($sp)
/* 18CAA0 8025E1C0 AFB40050 */ sw $s4, 0x50($sp)
/* 18CAA4 8025E1C4 AFB3004C */ sw $s3, 0x4C($sp)
/* 18CAA8 8025E1C8 AFB20048 */ sw $s2, 0x48($sp)
/* 18CAAC 8025E1CC AFB10044 */ sw $s1, 0x44($sp)
/* 18CAB0 8025E1D0 AFB00040 */ sw $s0, 0x40($sp)
/* 18CAB4 8025E1D4 8FD100D8 */ lw $s1, 0xD8($fp)
/* 18CAB8 8025E1D8 8FD200DC */ lw $s2, 0xDC($fp)
/* 18CABC 8025E1DC 2C620017 */ sltiu $v0, $v1, 0x17
/* 18CAC0 8025E1E0 10400759 */ beqz $v0, .L8025FF48
/* 18CAC4 8025E1E4 00031080 */ sll $v0, $v1, 2
/* 18CAC8 8025E1E8 3C01802A */ lui $at, %hi(jtbl_8029D4F0)
/* 18CACC 8025E1EC 00220821 */ addu $at, $at, $v0
/* 18CAD0 8025E1F0 8C22D4F0 */ lw $v0, %lo(jtbl_8029D4F0)($at)
/* 18CAD4 8025E1F4 00400008 */ jr $v0
/* 18CAD8 8025E1F8 00000000 */ nop
glabel .L8025E1FC
/* 18CADC 8025E1FC 83C20079 */ lb $v0, 0x79($fp)
/* 18CAE0 8025E200 1C400751 */ bgtz $v0, .L8025FF48
/* 18CAE4 8025E204 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16)
D_8025E208:
/* 18CAE8 8025E208 8E220000 */ lw $v0, 0x0($s1)
/* 18CAEC 8025E20C 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF)
/* 18CAF0 8025E210 00431024 */ and $v0, $v0, $v1
/* 18CAF4 8025E214 AE220000 */ sw $v0, 0x0($s1)
/* 18CAF8 8025E218 83C30078 */ lb $v1, 0x78($fp)
/* 18CAFC 8025E21C 3C01802A */ lui $at, %hi(D_8029FB74)
/* 18CB00 8025E220 AC20FB74 */ sw $zero, %lo(D_8029FB74)($at)
/* 18CB04 8025E224 3C01802A */ lui $at, %hi(D_8029FB50)
/* 18CB08 8025E228 AC20FB50 */ sw $zero, %lo(D_8029FB50)($at)
/* 18CB0C 8025E22C 3C018028 */ lui $at, %hi(D_80284150)
/* 18CB10 8025E230 AC204150 */ sw $zero, %lo(D_80284150)($at)
/* 18CB14 8025E234 3C01802A */ lui $at, %hi(LevelUpSelectTextOffsetX)
/* 18CB18 8025E238 AC20FB88 */ sw $zero, %lo(LevelUpSelectTextOffsetX)($at)
/* 18CB1C 8025E23C 3C01802A */ lui $at, %hi(LevelUpSelectTextVelX)
/* 18CB20 8025E240 AC20FB8C */ sw $zero, %lo(LevelUpSelectTextVelX)($at)
/* 18CB24 8025E244 00031040 */ sll $v0, $v1, 1
/* 18CB28 8025E248 00431021 */ addu $v0, $v0, $v1
/* 18CB2C 8025E24C 000210C0 */ sll $v0, $v0, 3
/* 18CB30 8025E250 00431021 */ addu $v0, $v0, $v1
/* 18CB34 8025E254 00021080 */ sll $v0, $v0, 2
/* 18CB38 8025E258 3C01802A */ lui $at, %hi(EndBattleRewardTotal)
/* 18CB3C 8025E25C AC22FB6C */ sw $v0, %lo(EndBattleRewardTotal)($at)
/* 18CB40 8025E260 0C05272D */ jal sfx_play_sound
/* 18CB44 8025E264 240400D4 */ addiu $a0, $zero, 0xD4
/* 18CB48 8025E268 82A30010 */ lb $v1, 0x10($s5)
/* 18CB4C 8025E26C 83C20078 */ lb $v0, 0x78($fp)
/* 18CB50 8025E270 00622821 */ addu $a1, $v1, $v0
/* 18CB54 8025E274 28A20064 */ slti $v0, $a1, 0x64
/* 18CB58 8025E278 14400005 */ bnez $v0, .L8025E290
/* 18CB5C 8025E27C 24020008 */ addiu $v0, $zero, 0x8
/* 18CB60 8025E280 AFA20010 */ sw $v0, 0x10($sp)
/* 18CB64 8025E284 0000202D */ daddu $a0, $zero, $zero
/* 18CB68 8025E288 080978A7 */ j .L8025E29C
/* 18CB6C 8025E28C 2405008E */ addiu $a1, $zero, 0x8E
.L8025E290:
/* 18CB70 8025E290 AFA20010 */ sw $v0, 0x10($sp)
/* 18CB74 8025E294 0000202D */ daddu $a0, $zero, $zero
/* 18CB78 8025E298 2405008B */ addiu $a1, $zero, 0x8B
.L8025E29C:
/* 18CB7C 8025E29C 0080302D */ daddu $a2, $a0, $zero
/* 18CB80 8025E2A0 0C052A46 */ jal bgm_set_song
/* 18CB84 8025E2A4 240700FA */ addiu $a3, $zero, 0xFA
/* 18CB88 8025E2A8 3C01802A */ lui $at, %hi(CelebrateStateTime)
/* 18CB8C 8025E2AC AC20FB84 */ sw $zero, %lo(CelebrateStateTime)($at)
/* 18CB90 8025E2B0 0C093903 */ jal func_8024E40C
/* 18CB94 8025E2B4 24040017 */ addiu $a0, $zero, 0x17
/* 18CB98 8025E2B8 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 18CB9C 8025E2BC 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
/* 18CBA0 8025E2C0 8C430004 */ lw $v1, 0x4($v0)
/* 18CBA4 8025E2C4 24040001 */ addiu $a0, $zero, 0x1
/* 18CBA8 8025E2C8 3C01802A */ lui $at, %hi(EndBattleRewardStep)
/* 18CBAC 8025E2CC AC20FB54 */ sw $zero, %lo(EndBattleRewardStep)($at)
/* 18CBB0 8025E2D0 3C01802A */ lui $at, %hi(CelebrateSubstateTime)
/* 18CBB4 8025E2D4 AC24FB4C */ sw $a0, %lo(CelebrateSubstateTime)($at)
/* 18CBB8 8025E2D8 3C01800E */ lui $at, %hi(gBattleSubState)
/* 18CBBC 8025E2DC AC24C4DC */ sw $a0, %lo(gBattleSubState)($at)
/* 18CBC0 8025E2E0 00641825 */ or $v1, $v1, $a0
/* 18CBC4 8025E2E4 08097FD2 */ j .L8025FF48
/* 18CBC8 8025E2E8 AC430004 */ sw $v1, 0x4($v0)
glabel .L8025E2EC
/* 18CBCC 8025E2EC 3C10802A */ lui $s0, %hi(CelebrateSubstateTime)
/* 18CBD0 8025E2F0 2610FB4C */ addiu $s0, $s0, %lo(CelebrateSubstateTime)
/* 18CBD4 8025E2F4 8E020000 */ lw $v0, 0x0($s0)
/* 18CBD8 8025E2F8 10400003 */ beqz $v0, .L8025E308
/* 18CBDC 8025E2FC 2442FFFF */ addiu $v0, $v0, -0x1
/* 18CBE0 8025E300 08097FD2 */ j .L8025FF48
/* 18CBE4 8025E304 AE020000 */ sw $v0, 0x0($s0)
.L8025E308:
/* 18CBE8 8025E308 0C093961 */ jal func_8024E584
/* 18CBEC 8025E30C 00000000 */ nop
/* 18CBF0 8025E310 1040070D */ beqz $v0, .L8025FF48
/* 18CBF4 8025E314 00000000 */ nop
/* 18CBF8 8025E318 3C04007B */ lui $a0, %hi(D_7A89A0)
/* 18CBFC 8025E31C 248489A0 */ addiu $a0, $a0, %lo(D_7A89A0)
/* 18CC00 8025E320 3C05007B */ lui $a1, %hi(D_7B5960)
/* 18CC04 8025E324 24A55960 */ addiu $a1, $a1, %lo(D_7B5960)
/* 18CC08 8025E328 3C06802A */ lui $a2, %hi(func_802A1000_7A89A0)
/* 18CC0C 8025E32C 24C61000 */ addiu $a2, $a2, %lo(func_802A1000_7A89A0)
/* 18CC10 8025E330 0C00A5CF */ jal dma_copy
/* 18CC14 8025E334 00000000 */ nop
/* 18CC18 8025E338 3C048028 */ lui $a0, %hi(D_802842B0)
/* 18CC1C 8025E33C 248442B0 */ addiu $a0, $a0, %lo(D_802842B0)
/* 18CC20 8025E340 2405000A */ addiu $a1, $zero, 0xA
/* 18CC24 8025E344 0C0B0CF8 */ jal start_script
/* 18CC28 8025E348 0000302D */ daddu $a2, $zero, $zero
/* 18CC2C 8025E34C 3C04802A */ lui $a0, %hi(EndBattleRewardTotal)
/* 18CC30 8025E350 8C84FB6C */ lw $a0, %lo(EndBattleRewardTotal)($a0)
/* 18CC34 8025E354 24030014 */ addiu $v1, $zero, 0x14
/* 18CC38 8025E358 14600002 */ bnez $v1, .L8025E364
/* 18CC3C 8025E35C 0083001A */ div $zero, $a0, $v1
/* 18CC40 8025E360 0007000D */ break 7
.L8025E364:
/* 18CC44 8025E364 2401FFFF */ addiu $at, $zero, -0x1
/* 18CC48 8025E368 14610004 */ bne $v1, $at, .L8025E37C
/* 18CC4C 8025E36C 3C018000 */ lui $at, (0x80000000 >> 16)
/* 18CC50 8025E370 14810002 */ bne $a0, $at, .L8025E37C
/* 18CC54 8025E374 00000000 */ nop
/* 18CC58 8025E378 0006000D */ break 6
.L8025E37C:
/* 18CC5C 8025E37C 00002012 */ mflo $a0
/* 18CC60 8025E380 3C01802A */ lui $at, %hi(EndBattleRewardsDone)
/* 18CC64 8025E384 AC20FB78 */ sw $zero, %lo(EndBattleRewardsDone)($at)
/* 18CC68 8025E388 3C01802A */ lui $at, %hi(EndBattleRewardStep)
/* 18CC6C 8025E38C AC23FB54 */ sw $v1, %lo(EndBattleRewardStep)($at)
/* 18CC70 8025E390 0040282D */ daddu $a1, $v0, $zero
/* 18CC74 8025E394 24020001 */ addiu $v0, $zero, 0x1
/* 18CC78 8025E398 AE2501D4 */ sw $a1, 0x1D4($s1)
/* 18CC7C 8025E39C AE020000 */ sw $v0, 0x0($s0)
/* 18CC80 8025E3A0 8CA30144 */ lw $v1, 0x144($a1)
/* 18CC84 8025E3A4 24020002 */ addiu $v0, $zero, 0x2
/* 18CC88 8025E3A8 3C01800E */ lui $at, %hi(gBattleSubState)
/* 18CC8C 8025E3AC AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 18CC90 8025E3B0 AE2301E4 */ sw $v1, 0x1E4($s1)
/* 18CC94 8025E3B4 ACA00148 */ sw $zero, 0x148($a1)
/* 18CC98 8025E3B8 3C01802A */ lui $at, %hi(EndBattleRewardIncrement)
/* 18CC9C 8025E3BC AC24FB70 */ sw $a0, %lo(EndBattleRewardIncrement)($at)
/* 18CCA0 8025E3C0 08097FD2 */ j .L8025FF48
/* 18CCA4 8025E3C4 00000000 */ nop
glabel .L8025E3C8
/* 18CCA8 8025E3C8 3C03802A */ lui $v1, %hi(CelebrateSubstateTime)
/* 18CCAC 8025E3CC 2463FB4C */ addiu $v1, $v1, %lo(CelebrateSubstateTime)
/* 18CCB0 8025E3D0 8C620000 */ lw $v0, 0x0($v1)
/* 18CCB4 8025E3D4 14400662 */ bnez $v0, .L8025FD60
/* 18CCB8 8025E3D8 2442FFFF */ addiu $v0, $v0, -0x1
/* 18CCBC 8025E3DC 83C20078 */ lb $v0, 0x78($fp)
/* 18CCC0 8025E3E0 10400028 */ beqz $v0, .L8025E484
/* 18CCC4 8025E3E4 3C0551EB */ lui $a1, (0x51EB851F >> 16)
/* 18CCC8 8025E3E8 3C04802A */ lui $a0, %hi(EndBattleRewardTotal)
/* 18CCCC 8025E3EC 2484FB6C */ addiu $a0, $a0, %lo(EndBattleRewardTotal)
/* 18CCD0 8025E3F0 8C830000 */ lw $v1, 0x0($a0)
/* 18CCD4 8025E3F4 3C02802A */ lui $v0, %hi(EndBattleRewardIncrement)
D_8025E3F8:
/* 18CCD8 8025E3F8 8C42FB70 */ lw $v0, %lo(EndBattleRewardIncrement)($v0)
/* 18CCDC 8025E3FC 34A5851F */ ori $a1, $a1, (0x51EB851F & 0xFFFF)
/* 18CCE0 8025E400 00621823 */ subu $v1, $v1, $v0
/* 18CCE4 8025E404 00650018 */ mult $v1, $a1
/* 18CCE8 8025E408 83C50078 */ lb $a1, 0x78($fp)
/* 18CCEC 8025E40C AC830000 */ sw $v1, 0x0($a0)
/* 18CCF0 8025E410 00031FC3 */ sra $v1, $v1, 31
/* 18CCF4 8025E414 00004810 */ mfhi $t1
/* 18CCF8 8025E418 00091143 */ sra $v0, $t1, 5
/* 18CCFC 8025E41C 00431023 */ subu $v0, $v0, $v1
/* 18CD00 8025E420 A3C20078 */ sb $v0, 0x78($fp)
/* 18CD04 8025E424 00021600 */ sll $v0, $v0, 24
/* 18CD08 8025E428 00021603 */ sra $v0, $v0, 24
/* 18CD0C 8025E42C 00A28023 */ subu $s0, $a1, $v0
/* 18CD10 8025E430 1A000003 */ blez $s0, .L8025E440
/* 18CD14 8025E434 00000000 */ nop
/* 18CD18 8025E438 0C05272D */ jal sfx_play_sound
/* 18CD1C 8025E43C 24040215 */ addiu $a0, $zero, 0x215
.L8025E440:
/* 18CD20 8025E440 92A20010 */ lbu $v0, 0x10($s5)
/* 18CD24 8025E444 3C038028 */ lui $v1, %hi(D_80284150)
/* 18CD28 8025E448 24634150 */ addiu $v1, $v1, %lo(D_80284150)
/* 18CD2C 8025E44C 00501021 */ addu $v0, $v0, $s0
/* 18CD30 8025E450 A2A20010 */ sb $v0, 0x10($s5)
/* 18CD34 8025E454 8C620000 */ lw $v0, 0x0($v1)
/* 18CD38 8025E458 3C04802A */ lui $a0, %hi(EndBattleRewardStep)
/* 18CD3C 8025E45C 8C84FB54 */ lw $a0, %lo(EndBattleRewardStep)($a0)
/* 18CD40 8025E460 24420001 */ addiu $v0, $v0, 0x1
/* 18CD44 8025E464 14800007 */ bnez $a0, .L8025E484
/* 18CD48 8025E468 AC620000 */ sw $v0, 0x0($v1)
/* 18CD4C 8025E46C 83C20078 */ lb $v0, 0x78($fp)
/* 18CD50 8025E470 10400004 */ beqz $v0, .L8025E484
/* 18CD54 8025E474 00000000 */ nop
/* 18CD58 8025E478 92A20010 */ lbu $v0, 0x10($s5)
/* 18CD5C 8025E47C 24420001 */ addiu $v0, $v0, 0x1
/* 18CD60 8025E480 A2A20010 */ sb $v0, 0x10($s5)
.L8025E484:
/* 18CD64 8025E484 82A20009 */ lb $v0, 0x9($s5)
/* 18CD68 8025E488 2842001B */ slti $v0, $v0, 0x1B
/* 18CD6C 8025E48C 50400001 */ beql $v0, $zero, .L8025E494
/* 18CD70 8025E490 A2A00010 */ sb $zero, 0x10($s5)
.L8025E494:
/* 18CD74 8025E494 82A20010 */ lb $v0, 0x10($s5)
/* 18CD78 8025E498 28420064 */ slti $v0, $v0, 0x64
/* 18CD7C 8025E49C 14400006 */ bnez $v0, .L8025E4B8
/* 18CD80 8025E4A0 24030001 */ addiu $v1, $zero, 0x1
/* 18CD84 8025E4A4 92A20010 */ lbu $v0, 0x10($s5)
/* 18CD88 8025E4A8 3C01802A */ lui $at, %hi(D_8029FB74)
/* 18CD8C 8025E4AC AC23FB74 */ sw $v1, %lo(D_8029FB74)($at)
/* 18CD90 8025E4B0 2442FF9C */ addiu $v0, $v0, -0x64
/* 18CD94 8025E4B4 A2A20010 */ sb $v0, 0x10($s5)
.L8025E4B8:
/* 18CD98 8025E4B8 82A20009 */ lb $v0, 0x9($s5)
/* 18CD9C 8025E4BC 3C03802A */ lui $v1, %hi(D_8029FB74)
/* 18CDA0 8025E4C0 8C63FB74 */ lw $v1, %lo(D_8029FB74)($v1)
/* 18CDA4 8025E4C4 00431021 */ addu $v0, $v0, $v1
/* 18CDA8 8025E4C8 2403001B */ addiu $v1, $zero, 0x1B
/* 18CDAC 8025E4CC 50430001 */ beql $v0, $v1, .L8025E4D4
/* 18CDB0 8025E4D0 A2A00010 */ sb $zero, 0x10($s5)
.L8025E4D4:
/* 18CDB4 8025E4D4 83C20078 */ lb $v0, 0x78($fp)
/* 18CDB8 8025E4D8 1440069B */ bnez $v0, .L8025FF48
/* 18CDBC 8025E4DC 00000000 */ nop
/* 18CDC0 8025E4E0 3C03802A */ lui $v1, %hi(EndBattleRewardStep)
/* 18CDC4 8025E4E4 2463FB54 */ addiu $v1, $v1, %lo(EndBattleRewardStep)
/* 18CDC8 8025E4E8 8C620000 */ lw $v0, 0x0($v1)
/* 18CDCC 8025E4EC 1440061C */ bnez $v0, .L8025FD60
/* 18CDD0 8025E4F0 2442FFFF */ addiu $v0, $v0, -0x1
/* 18CDD4 8025E4F4 3C04F3FF */ lui $a0, (0xF3FFFFFF >> 16)
/* 18CDD8 8025E4F8 3484FFFF */ ori $a0, $a0, (0xF3FFFFFF & 0xFFFF)
/* 18CDDC 8025E4FC 8E220000 */ lw $v0, 0x0($s1)
/* 18CDE0 8025E500 24030001 */ addiu $v1, $zero, 0x1
/* 18CDE4 8025E504 3C01802A */ lui $at, %hi(EndBattleRewardsDone)
/* 18CDE8 8025E508 AC23FB78 */ sw $v1, %lo(EndBattleRewardsDone)($at)
/* 18CDEC 8025E50C 00441024 */ and $v0, $v0, $a0
/* 18CDF0 8025E510 12400004 */ beqz $s2, .L8025E524
/* 18CDF4 8025E514 AE220000 */ sw $v0, 0x0($s1)
/* 18CDF8 8025E518 8E420000 */ lw $v0, 0x0($s2)
/* 18CDFC 8025E51C 00441024 */ and $v0, $v0, $a0
/* 18CE00 8025E520 AE420000 */ sw $v0, 0x0($s2)
.L8025E524:
/* 18CE04 8025E524 3C048028 */ lui $a0, %hi(EVS_Mario_HandlePhase)
/* 18CE08 8025E528 24844EBC */ addiu $a0, $a0, %lo(EVS_Mario_HandlePhase)
/* 18CE0C 8025E52C 2405000A */ addiu $a1, $zero, 0xA
/* 18CE10 8025E530 0000302D */ daddu $a2, $zero, $zero
/* 18CE14 8025E534 24020005 */ addiu $v0, $zero, 0x5
/* 18CE18 8025E538 0C0B0CF8 */ jal start_script
/* 18CE1C 8025E53C A3C201A7 */ sb $v0, 0x1A7($fp)
/* 18CE20 8025E540 0040282D */ daddu $a1, $v0, $zero
/* 18CE24 8025E544 AE2501D4 */ sw $a1, 0x1D4($s1)
/* 18CE28 8025E548 8CA20144 */ lw $v0, 0x144($a1)
/* 18CE2C 8025E54C AE2201E4 */ sw $v0, 0x1E4($s1)
/* 18CE30 8025E550 1240000B */ beqz $s2, .L8025E580
/* 18CE34 8025E554 ACA00148 */ sw $zero, 0x148($a1)
/* 18CE38 8025E558 2405000A */ addiu $a1, $zero, 0xA
/* 18CE3C 8025E55C 8E4401C4 */ lw $a0, 0x1C4($s2)
/* 18CE40 8025E560 0C0B0CF8 */ jal start_script
/* 18CE44 8025E564 0000302D */ daddu $a2, $zero, $zero
/* 18CE48 8025E568 0040282D */ daddu $a1, $v0, $zero
/* 18CE4C 8025E56C AE4501D4 */ sw $a1, 0x1D4($s2)
/* 18CE50 8025E570 8CA20144 */ lw $v0, 0x144($a1)
/* 18CE54 8025E574 AE4201E4 */ sw $v0, 0x1E4($s2)
/* 18CE58 8025E578 24020100 */ addiu $v0, $zero, 0x100
/* 18CE5C 8025E57C ACA20148 */ sw $v0, 0x148($a1)
.L8025E580:
/* 18CE60 8025E580 24020028 */ addiu $v0, $zero, 0x28
/* 18CE64 8025E584 3C01802A */ lui $at, %hi(CelebrateSubstateTime)
/* 18CE68 8025E588 AC22FB4C */ sw $v0, %lo(CelebrateSubstateTime)($at)
/* 18CE6C 8025E58C 08097FD0 */ j .L8025FF40
/* 18CE70 8025E590 24020003 */ addiu $v0, $zero, 0x3
glabel .L8025E594
/* 18CE74 8025E594 3C03802A */ lui $v1, %hi(CelebrateSubstateTime)
/* 18CE78 8025E598 2463FB4C */ addiu $v1, $v1, %lo(CelebrateSubstateTime)
/* 18CE7C 8025E59C 8C620000 */ lw $v0, 0x0($v1)
/* 18CE80 8025E5A0 144005EF */ bnez $v0, .L8025FD60
/* 18CE84 8025E5A4 2442FFFF */ addiu $v0, $v0, -0x1
/* 18CE88 8025E5A8 3C02802A */ lui $v0, %hi(D_8029FB74)
/* 18CE8C 8025E5AC 8C42FB74 */ lw $v0, %lo(D_8029FB74)($v0)
/* 18CE90 8025E5B0 14400663 */ bnez $v0, .L8025FF40
/* 18CE94 8025E5B4 24020004 */ addiu $v0, $zero, 0x4
/* 18CE98 8025E5B8 08097FD0 */ j .L8025FF40
/* 18CE9C 8025E5BC 24020014 */ addiu $v0, $zero, 0x14
glabel .L8025E5C0
/* 18CEA0 8025E5C0 3C10802A */ lui $s0, %hi(CelebrateStateTime)
/* 18CEA4 8025E5C4 2610FB84 */ addiu $s0, $s0, %lo(CelebrateStateTime)
/* 18CEA8 8025E5C8 8E020000 */ lw $v0, 0x0($s0)
/* 18CEAC 8025E5CC 28420063 */ slti $v0, $v0, 0x63
/* 18CEB0 8025E5D0 1440065D */ bnez $v0, .L8025FF48
/* 18CEB4 8025E5D4 00000000 */ nop
/* 18CEB8 8025E5D8 92A20009 */ lbu $v0, 0x9($s5)
/* 18CEBC 8025E5DC 24040002 */ addiu $a0, $zero, 0x2
/* 18CEC0 8025E5E0 24420001 */ addiu $v0, $v0, 0x1
/* 18CEC4 8025E5E4 0C093903 */ jal func_8024E40C
/* 18CEC8 8025E5E8 A2A20009 */ sb $v0, 0x9($s5)
/* 18CECC 8025E5EC 0C093936 */ jal D_8024E4D8_C0BD58
/* 18CED0 8025E5F0 24040005 */ addiu $a0, $zero, 0x5
/* 18CED4 8025E5F4 3C04007A */ lui $a0, %hi(D_79EF40)
/* 18CED8 8025E5F8 2484EF40 */ addiu $a0, $a0, %lo(D_79EF40)
/* 18CEDC 8025E5FC 3C05007B */ lui $a1, %hi(D_7A89A0)
/* 18CEE0 8025E600 24A589A0 */ addiu $a1, $a1, %lo(D_7A89A0)
/* 18CEE4 8025E604 3C06802A */ lui $a2, %hi(func_802A1000_7A89A0)
/* 18CEE8 8025E608 24C61000 */ addiu $a2, $a2, %lo(func_802A1000_7A89A0)
/* 18CEEC 8025E60C 0C00A5CF */ jal dma_copy
/* 18CEF0 8025E610 00000000 */ nop
/* 18CEF4 8025E614 3C048000 */ lui $a0, (0x80000008 >> 16)
/* 18CEF8 8025E618 0C05272D */ jal sfx_play_sound
/* 18CEFC 8025E61C 34840008 */ ori $a0, $a0, (0x80000008 & 0xFFFF)
/* 18CF00 8025E620 24020005 */ addiu $v0, $zero, 0x5
/* 18CF04 8025E624 08097FD0 */ j .L8025FF40
/* 18CF08 8025E628 AE000000 */ sw $zero, 0x0($s0)
glabel .L8025E62C
/* 18CF0C 8025E62C 3C048028 */ lui $a0, %hi(D_80284880)
/* 18CF10 8025E630 24844880 */ addiu $a0, $a0, %lo(D_80284880)
/* 18CF14 8025E634 2405000A */ addiu $a1, $zero, 0xA
/* 18CF18 8025E638 0C0B0CF8 */ jal start_script
/* 18CF1C 8025E63C 0000302D */ daddu $a2, $zero, $zero
/* 18CF20 8025E640 24030019 */ addiu $v1, $zero, 0x19
/* 18CF24 8025E644 3C01802A */ lui $at, %hi(CelebrateSubstateTime)
/* 18CF28 8025E648 AC23FB4C */ sw $v1, %lo(CelebrateSubstateTime)($at)
/* 18CF2C 8025E64C 8C430144 */ lw $v1, 0x144($v0)
/* 18CF30 8025E650 3C01802A */ lui $at, %hi(LevelUpScriptPtr)
/* 18CF34 8025E654 AC22FB7C */ sw $v0, %lo(LevelUpScriptPtr)($at)
/* 18CF38 8025E658 24020006 */ addiu $v0, $zero, 0x6
/* 18CF3C 8025E65C 3C01800E */ lui $at, %hi(gBattleSubState)
/* 18CF40 8025E660 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 18CF44 8025E664 3C01802A */ lui $at, %hi(LevelUpScriptID)
/* 18CF48 8025E668 AC23FB80 */ sw $v1, %lo(LevelUpScriptID)($at)
/* 18CF4C 8025E66C 0C04760B */ jal mdl_set_all_fog_mode
/* 18CF50 8025E670 24040001 */ addiu $a0, $zero, 0x1
/* 18CF54 8025E674 0000202D */ daddu $a0, $zero, $zero
/* 18CF58 8025E678 0080282D */ daddu $a1, $a0, $zero
/* 18CF5C 8025E67C 0080302D */ daddu $a2, $a0, $zero
/* 18CF60 8025E680 0080382D */ daddu $a3, $a0, $zero
/* 18CF64 8025E684 3C038015 */ lui $v1, %hi(gBackgroundFogModePtr)
/* 18CF68 8025E688 8C6312F0 */ lw $v1, %lo(gBackgroundFogModePtr)($v1)
/* 18CF6C 8025E68C 24020001 */ addiu $v0, $zero, 0x1
/* 18CF70 8025E690 0C046F97 */ jal set_background_color_blend
/* 18CF74 8025E694 A0620000 */ sb $v0, 0x0($v1)
/* 18CF78 8025E698 08097FD2 */ j .L8025FF48
/* 18CF7C 8025E69C 00000000 */ nop
glabel .L8025E6A0
/* 18CF80 8025E6A0 3C10802A */ lui $s0, %hi(CelebrateSubstateTime)
/* 18CF84 8025E6A4 2610FB4C */ addiu $s0, $s0, %lo(CelebrateSubstateTime)
/* 18CF88 8025E6A8 8E030000 */ lw $v1, 0x0($s0)
/* 18CF8C 8025E6AC 24020012 */ addiu $v0, $zero, 0x12
/* 18CF90 8025E6B0 1462004E */ bne $v1, $v0, .L8025E7EC
/* 18CF94 8025E6B4 0000202D */ daddu $a0, $zero, $zero
/* 18CF98 8025E6B8 92A20003 */ lbu $v0, 0x3($s5)
/* 18CF9C 8025E6BC 92A30006 */ lbu $v1, 0x6($s5)
/* 18CFA0 8025E6C0 44801000 */ mtc1 $zero, $f2
/* 18CFA4 8025E6C4 A2A20002 */ sb $v0, 0x2($s5)
/* 18CFA8 8025E6C8 A2A30005 */ sb $v1, 0x5($s5)
/* 18CFAC 8025E6CC C6240144 */ lwc1 $f4, 0x144($s1)
/* 18CFB0 8025E6D0 C620014C */ lwc1 $f0, 0x14C($s1)
/* 18CFB4 8025E6D4 82A80002 */ lb $t0, 0x2($s5)
/* 18CFB8 8025E6D8 4600018D */ trunc.w.s $f6, $f0
/* 18CFBC 8025E6DC 44073000 */ mfc1 $a3, $f6
/* 18CFC0 8025E6E0 00000000 */ nop
/* 18CFC4 8025E6E4 44873000 */ mtc1 $a3, $f6
/* 18CFC8 8025E6E8 00000000 */ nop
/* 18CFCC 8025E6EC 468031A0 */ cvt.s.w $f6, $f6
/* 18CFD0 8025E6F0 46022100 */ add.s $f4, $f4, $f2
/* 18CFD4 8025E6F4 C6200148 */ lwc1 $f0, 0x148($s1)
/* 18CFD8 8025E6F8 3C01420C */ lui $at, (0x420C0000 >> 16)
/* 18CFDC 8025E6FC 44811000 */ mtc1 $at, $f2
/* 18CFE0 8025E700 44073000 */ mfc1 $a3, $f6
/* 18CFE4 8025E704 46020000 */ add.s $f0, $f0, $f2
/* 18CFE8 8025E708 4600218D */ trunc.w.s $f6, $f4
/* 18CFEC 8025E70C 44033000 */ mfc1 $v1, $f6
/* 18CFF0 8025E710 00000000 */ nop
/* 18CFF4 8025E714 44833000 */ mtc1 $v1, $f6
/* 18CFF8 8025E718 00000000 */ nop
/* 18CFFC 8025E71C 468031A0 */ cvt.s.w $f6, $f6
/* 18D000 8025E720 44053000 */ mfc1 $a1, $f6
/* 18D004 8025E724 4600018D */ trunc.w.s $f6, $f0
/* 18D008 8025E728 44023000 */ mfc1 $v0, $f6
/* 18D00C 8025E72C 00000000 */ nop
/* 18D010 8025E730 44823000 */ mtc1 $v0, $f6
/* 18D014 8025E734 00000000 */ nop
/* 18D018 8025E738 468031A0 */ cvt.s.w $f6, $f6
/* 18D01C 8025E73C 44063000 */ mfc1 $a2, $f6
/* 18D020 8025E740 AFA30028 */ sw $v1, 0x28($sp)
/* 18D024 8025E744 AFA2002C */ sw $v0, 0x2C($sp)
/* 18D028 8025E748 0C01C424 */ jal fx_recover
/* 18D02C 8025E74C AFA80010 */ sw $t0, 0x10($sp)
/* 18D030 8025E750 C6240144 */ lwc1 $f4, 0x144($s1)
/* 18D034 8025E754 C620014C */ lwc1 $f0, 0x14C($s1)
/* 18D038 8025E758 3C0141A0 */ lui $at, (0x41A00000 >> 16)
/* 18D03C 8025E75C 44811000 */ mtc1 $at, $f2
/* 18D040 8025E760 82A80005 */ lb $t0, 0x5($s5)
/* 18D044 8025E764 4600018D */ trunc.w.s $f6, $f0
/* 18D048 8025E768 44073000 */ mfc1 $a3, $f6
/* 18D04C 8025E76C 00000000 */ nop
/* 18D050 8025E770 44873000 */ mtc1 $a3, $f6
/* 18D054 8025E774 00000000 */ nop
/* 18D058 8025E778 468031A0 */ cvt.s.w $f6, $f6
/* 18D05C 8025E77C 46022100 */ add.s $f4, $f4, $f2
/* 18D060 8025E780 C6200148 */ lwc1 $f0, 0x148($s1)
/* 18D064 8025E784 3C0141C8 */ lui $at, (0x41C80000 >> 16)
/* 18D068 8025E788 44811000 */ mtc1 $at, $f2
/* 18D06C 8025E78C 44073000 */ mfc1 $a3, $f6
/* 18D070 8025E790 46020000 */ add.s $f0, $f0, $f2
/* 18D074 8025E794 4600218D */ trunc.w.s $f6, $f4
/* 18D078 8025E798 44033000 */ mfc1 $v1, $f6
/* 18D07C 8025E79C 00000000 */ nop
/* 18D080 8025E7A0 44833000 */ mtc1 $v1, $f6
/* 18D084 8025E7A4 00000000 */ nop
/* 18D088 8025E7A8 468031A0 */ cvt.s.w $f6, $f6
/* 18D08C 8025E7AC 44053000 */ mfc1 $a1, $f6
/* 18D090 8025E7B0 4600018D */ trunc.w.s $f6, $f0
/* 18D094 8025E7B4 44023000 */ mfc1 $v0, $f6
/* 18D098 8025E7B8 00000000 */ nop
/* 18D09C 8025E7BC 44823000 */ mtc1 $v0, $f6
/* 18D0A0 8025E7C0 00000000 */ nop
/* 18D0A4 8025E7C4 468031A0 */ cvt.s.w $f6, $f6
/* 18D0A8 8025E7C8 44063000 */ mfc1 $a2, $f6
/* 18D0AC 8025E7CC 24040001 */ addiu $a0, $zero, 0x1
/* 18D0B0 8025E7D0 AFA30028 */ sw $v1, 0x28($sp)
/* 18D0B4 8025E7D4 AFA2002C */ sw $v0, 0x2C($sp)
/* 18D0B8 8025E7D8 0C01C424 */ jal fx_recover
/* 18D0BC 8025E7DC AFA80010 */ sw $t0, 0x10($sp)
/* 18D0C0 8025E7E0 82A2028E */ lb $v0, 0x28E($s5)
/* 18D0C4 8025E7E4 00021200 */ sll $v0, $v0, 8
/* 18D0C8 8025E7E8 A6A20290 */ sh $v0, 0x290($s5)
.L8025E7EC:
/* 18D0CC 8025E7EC 8E020000 */ lw $v0, 0x0($s0)
/* 18D0D0 8025E7F0 1040000E */ beqz $v0, .L8025E82C
/* 18D0D4 8025E7F4 2443FFFF */ addiu $v1, $v0, -0x1
/* 18D0D8 8025E7F8 2862000A */ slti $v0, $v1, 0xA
/* 18D0DC 8025E7FC 104005D2 */ beqz $v0, .L8025FF48
/* 18D0E0 8025E800 AE030000 */ sw $v1, 0x0($s0)
/* 18D0E4 8025E804 0000202D */ daddu $a0, $zero, $zero
/* 18D0E8 8025E808 0080282D */ daddu $a1, $a0, $zero
/* 18D0EC 8025E80C 0080302D */ daddu $a2, $a0, $zero
/* 18D0F0 8025E810 2407000A */ addiu $a3, $zero, 0xA
/* 18D0F4 8025E814 00E33823 */ subu $a3, $a3, $v1
/* 18D0F8 8025E818 00073900 */ sll $a3, $a3, 4
/* 18D0FC 8025E81C 0C046F97 */ jal set_background_color_blend
/* 18D100 8025E820 30E700F0 */ andi $a3, $a3, 0xF0
/* 18D104 8025E824 08097FD2 */ j .L8025FF48
/* 18D108 8025E828 00000000 */ nop
.L8025E82C:
/* 18D10C 8025E82C 3C04802B */ lui $a0, %hi(D_802A9F0C_7B18AC)
/* 18D110 8025E830 24849F0C */ addiu $a0, $a0, %lo(D_802A9F0C_7B18AC)
/* 18D114 8025E834 0C050529 */ jal hud_element_create
/* 18D118 8025E838 24130001 */ addiu $s3, $zero, 0x1
/* 18D11C 8025E83C 0040A02D */ daddu $s4, $v0, $zero
/* 18D120 8025E840 0280202D */ daddu $a0, $s4, $zero
/* 18D124 8025E844 24050136 */ addiu $a1, $zero, 0x136
/* 18D128 8025E848 2406008C */ addiu $a2, $zero, 0x8C
/* 18D12C 8025E84C 3C10802A */ lui $s0, %hi(LevelUpStatEmblemIDs)
/* 18D130 8025E850 2610FA80 */ addiu $s0, $s0, %lo(LevelUpStatEmblemIDs)
/* 18D134 8025E854 0C051261 */ jal hud_element_set_render_pos
/* 18D138 8025E858 AE140000 */ sw $s4, 0x0($s0)
/* 18D13C 8025E85C 0280202D */ daddu $a0, $s4, $zero
/* 18D140 8025E860 0C051280 */ jal hud_element_set_flags
/* 18D144 8025E864 24050080 */ addiu $a1, $zero, 0x80
/* 18D148 8025E868 3C04802B */ lui $a0, %hi(D_802A9F5C_7B18FC)
/* 18D14C 8025E86C 24849F5C */ addiu $a0, $a0, %lo(D_802A9F5C_7B18FC)
/* 18D150 8025E870 0C050529 */ jal hud_element_create
/* 18D154 8025E874 00000000 */ nop
/* 18D158 8025E878 0040A02D */ daddu $s4, $v0, $zero
/* 18D15C 8025E87C 0280202D */ daddu $a0, $s4, $zero
/* 18D160 8025E880 2405009E */ addiu $a1, $zero, 0x9E
/* 18D164 8025E884 24060154 */ addiu $a2, $zero, 0x154
/* 18D168 8025E888 0C051261 */ jal hud_element_set_render_pos
/* 18D16C 8025E88C AE140004 */ sw $s4, 0x4($s0)
/* 18D170 8025E890 0280202D */ daddu $a0, $s4, $zero
/* 18D174 8025E894 0C051280 */ jal hud_element_set_flags
/* 18D178 8025E898 24050080 */ addiu $a1, $zero, 0x80
/* 18D17C 8025E89C 3C04802B */ lui $a0, %hi(.L802A9F84_7B1924)
/* 18D180 8025E8A0 24849F84 */ addiu $a0, $a0, %lo(.L802A9F84_7B1924)
/* 18D184 8025E8A4 0C050529 */ jal hud_element_create
/* 18D188 8025E8A8 00000000 */ nop
/* 18D18C 8025E8AC 0040A02D */ daddu $s4, $v0, $zero
/* 18D190 8025E8B0 0280202D */ daddu $a0, $s4, $zero
/* 18D194 8025E8B4 2405009E */ addiu $a1, $zero, 0x9E
/* 18D198 8025E8B8 24060154 */ addiu $a2, $zero, 0x154
/* 18D19C 8025E8BC 0C051261 */ jal hud_element_set_render_pos
/* 18D1A0 8025E8C0 AE14000C */ sw $s4, 0xC($s0)
/* 18D1A4 8025E8C4 0280202D */ daddu $a0, $s4, $zero
/* 18D1A8 8025E8C8 0C051280 */ jal hud_element_set_flags
/* 18D1AC 8025E8CC 24050080 */ addiu $a1, $zero, 0x80
/* 18D1B0 8025E8D0 3C04802B */ lui $a0, %hi(D_802A9FAC_7B194C)
/* 18D1B4 8025E8D4 24849FAC */ addiu $a0, $a0, %lo(D_802A9FAC_7B194C)
/* 18D1B8 8025E8D8 0C050529 */ jal hud_element_create
/* 18D1BC 8025E8DC 00000000 */ nop
/* 18D1C0 8025E8E0 0040A02D */ daddu $s4, $v0, $zero
/* 18D1C4 8025E8E4 0280202D */ daddu $a0, $s4, $zero
/* 18D1C8 8025E8E8 24050006 */ addiu $a1, $zero, 0x6
/* 18D1CC 8025E8EC 2406008C */ addiu $a2, $zero, 0x8C
/* 18D1D0 8025E8F0 0C051261 */ jal hud_element_set_render_pos
/* 18D1D4 8025E8F4 AE140008 */ sw $s4, 0x8($s0)
/* 18D1D8 8025E8F8 0280202D */ daddu $a0, $s4, $zero
/* 18D1DC 8025E8FC 0C051280 */ jal hud_element_set_flags
/* 18D1E0 8025E900 24050080 */ addiu $a1, $zero, 0x80
/* 18D1E4 8025E904 3C10802A */ lui $s0, %hi(LevelUpStatTextIDs)
/* 18D1E8 8025E908 2610FA90 */ addiu $s0, $s0, %lo(LevelUpStatTextIDs)
/* 18D1EC 8025E90C 3C048028 */ lui $a0, %hi(D_802841B4)
/* 18D1F0 8025E910 8C8441B4 */ lw $a0, %lo(D_802841B4)($a0)
/* 18D1F4 8025E914 0C050529 */ jal hud_element_create
/* 18D1F8 8025E918 26110004 */ addiu $s1, $s0, 0x4
/* 18D1FC 8025E91C 0040A02D */ daddu $s4, $v0, $zero
/* 18D200 8025E920 0280202D */ daddu $a0, $s4, $zero
/* 18D204 8025E924 240500A0 */ addiu $a1, $zero, 0xA0
/* 18D208 8025E928 2406013D */ addiu $a2, $zero, 0x13D
/* 18D20C 8025E92C 0C051261 */ jal hud_element_set_render_pos
/* 18D210 8025E930 AE140000 */ sw $s4, 0x0($s0)
/* 18D214 8025E934 0280202D */ daddu $a0, $s4, $zero
/* 18D218 8025E938 0C051280 */ jal hud_element_set_flags
/* 18D21C 8025E93C 24050080 */ addiu $a1, $zero, 0x80
.L8025E940:
/* 18D220 8025E940 3C048028 */ lui $a0, %hi(D_802841C0)
/* 18D224 8025E944 8C8441C0 */ lw $a0, %lo(D_802841C0)($a0)
/* 18D228 8025E948 0C050529 */ jal hud_element_create
/* 18D22C 8025E94C 26730001 */ addiu $s3, $s3, 0x1
/* 18D230 8025E950 0040A02D */ daddu $s4, $v0, $zero
/* 18D234 8025E954 0280202D */ daddu $a0, $s4, $zero
/* 18D238 8025E958 240500A0 */ addiu $a1, $zero, 0xA0
/* 18D23C 8025E95C 2406013D */ addiu $a2, $zero, 0x13D
/* 18D240 8025E960 0C051261 */ jal hud_element_set_render_pos
/* 18D244 8025E964 AE340000 */ sw $s4, 0x0($s1)
/* 18D248 8025E968 0280202D */ daddu $a0, $s4, $zero
/* 18D24C 8025E96C 0C051280 */ jal hud_element_set_flags
/* 18D250 8025E970 24050082 */ addiu $a1, $zero, 0x82
/* 18D254 8025E974 2A620007 */ slti $v0, $s3, 0x7
/* 18D258 8025E978 1440FFF1 */ bnez $v0, .L8025E940
/* 18D25C 8025E97C 26310004 */ addiu $s1, $s1, 0x4
/* 18D260 8025E980 24130001 */ addiu $s3, $zero, 0x1
/* 18D264 8025E984 3C128028 */ lui $s2, %hi(D_802841C0)
/* 18D268 8025E988 265241C0 */ addiu $s2, $s2, %lo(D_802841C0)
/* 18D26C 8025E98C 3C10802A */ lui $s0, %hi(LevelUpStatTextIDs)
/* 18D270 8025E990 2610FA90 */ addiu $s0, $s0, %lo(LevelUpStatTextIDs)
/* 18D274 8025E994 3C048028 */ lui $a0, %hi(D_802841B8)
/* 18D278 8025E998 8C8441B8 */ lw $a0, %lo(D_802841B8)($a0)
/* 18D27C 8025E99C 0C050529 */ jal hud_element_create
/* 18D280 8025E9A0 26110004 */ addiu $s1, $s0, 0x4
/* 18D284 8025E9A4 0040A02D */ daddu $s4, $v0, $zero
/* 18D288 8025E9A8 0280202D */ daddu $a0, $s4, $zero
/* 18D28C 8025E9AC 24050138 */ addiu $a1, $zero, 0x138
/* 18D290 8025E9B0 24060075 */ addiu $a2, $zero, 0x75
/* 18D294 8025E9B4 0C051261 */ jal hud_element_set_render_pos
/* 18D298 8025E9B8 AE14001C */ sw $s4, 0x1C($s0)
/* 18D29C 8025E9BC 0280202D */ daddu $a0, $s4, $zero
/* 18D2A0 8025E9C0 0C051280 */ jal hud_element_set_flags
/* 18D2A4 8025E9C4 24050080 */ addiu $a1, $zero, 0x80
.L8025E9C8:
/* 18D2A8 8025E9C8 8E440028 */ lw $a0, 0x28($s2)
/* 18D2AC 8025E9CC 0C050529 */ jal hud_element_create
/* 18D2B0 8025E9D0 26730001 */ addiu $s3, $s3, 0x1
/* 18D2B4 8025E9D4 0040A02D */ daddu $s4, $v0, $zero
/* 18D2B8 8025E9D8 0280202D */ daddu $a0, $s4, $zero
/* 18D2BC 8025E9DC 24050138 */ addiu $a1, $zero, 0x138
/* 18D2C0 8025E9E0 24060075 */ addiu $a2, $zero, 0x75
/* 18D2C4 8025E9E4 0C051261 */ jal hud_element_set_render_pos
/* 18D2C8 8025E9E8 AE34001C */ sw $s4, 0x1C($s1)
/* 18D2CC 8025E9EC 0280202D */ daddu $a0, $s4, $zero
/* 18D2D0 8025E9F0 0C051280 */ jal hud_element_set_flags
/* 18D2D4 8025E9F4 24050082 */ addiu $a1, $zero, 0x82
/* 18D2D8 8025E9F8 2A620007 */ slti $v0, $s3, 0x7
/* 18D2DC 8025E9FC 1440FFF2 */ bnez $v0, .L8025E9C8
/* 18D2E0 8025EA00 26310004 */ addiu $s1, $s1, 0x4
/* 18D2E4 8025EA04 24130001 */ addiu $s3, $zero, 0x1
/* 18D2E8 8025EA08 3C128028 */ lui $s2, %hi(D_802841C0)
/* 18D2EC 8025EA0C 265241C0 */ addiu $s2, $s2, %lo(D_802841C0)
/* 18D2F0 8025EA10 3C10802A */ lui $s0, %hi(LevelUpStatTextIDs)
/* 18D2F4 8025EA14 2610FA90 */ addiu $s0, $s0, %lo(LevelUpStatTextIDs)
/* 18D2F8 8025EA18 3C048028 */ lui $a0, %hi(D_802841BC)
/* 18D2FC 8025EA1C 8C8441BC */ lw $a0, %lo(D_802841BC)($a0)
/* 18D300 8025EA20 0C050529 */ jal hud_element_create
/* 18D304 8025EA24 26110004 */ addiu $s1, $s0, 0x4
/* 18D308 8025EA28 0040A02D */ daddu $s4, $v0, $zero
/* 18D30C 8025EA2C 0280202D */ daddu $a0, $s4, $zero
/* 18D310 8025EA30 24050008 */ addiu $a1, $zero, 0x8
/* 18D314 8025EA34 24060075 */ addiu $a2, $zero, 0x75
/* 18D318 8025EA38 0C051261 */ jal hud_element_set_render_pos
/* 18D31C 8025EA3C AE140038 */ sw $s4, 0x38($s0)
/* 18D320 8025EA40 0280202D */ daddu $a0, $s4, $zero
/* 18D324 8025EA44 0C051280 */ jal hud_element_set_flags
/* 18D328 8025EA48 24050080 */ addiu $a1, $zero, 0x80
.L8025EA4C:
/* 18D32C 8025EA4C 8E440050 */ lw $a0, 0x50($s2)
/* 18D330 8025EA50 0C050529 */ jal hud_element_create
/* 18D334 8025EA54 26730001 */ addiu $s3, $s3, 0x1
/* 18D338 8025EA58 0040A02D */ daddu $s4, $v0, $zero
/* 18D33C 8025EA5C 0280202D */ daddu $a0, $s4, $zero
/* 18D340 8025EA60 24050008 */ addiu $a1, $zero, 0x8
/* 18D344 8025EA64 24060075 */ addiu $a2, $zero, 0x75
/* 18D348 8025EA68 0C051261 */ jal hud_element_set_render_pos
/* 18D34C 8025EA6C AE340038 */ sw $s4, 0x38($s1)
/* 18D350 8025EA70 0280202D */ daddu $a0, $s4, $zero
/* 18D354 8025EA74 0C051280 */ jal hud_element_set_flags
/* 18D358 8025EA78 24050082 */ addiu $a1, $zero, 0x82
/* 18D35C 8025EA7C 2A620007 */ slti $v0, $s3, 0x7
/* 18D360 8025EA80 1440FFF2 */ bnez $v0, .L8025EA4C
/* 18D364 8025EA84 26310004 */ addiu $s1, $s1, 0x4
/* 18D368 8025EA88 3C16802A */ lui $s6, %hi(CantLevelUpStat)
/* 18D36C 8025EA8C 26D6FB60 */ addiu $s6, $s6, %lo(CantLevelUpStat)
/* 18D370 8025EA90 AEC00000 */ sw $zero, 0x0($s6)
/* 18D374 8025EA94 AEC00004 */ sw $zero, 0x4($s6)
/* 18D378 8025EA98 AEC00008 */ sw $zero, 0x8($s6)
/* 18D37C 8025EA9C 82A30007 */ lb $v1, 0x7($s5)
/* 18D380 8025EAA0 24020032 */ addiu $v0, $zero, 0x32
/* 18D384 8025EAA4 1062008C */ beq $v1, $v0, .L8025ECD8
/* 18D388 8025EAA8 3C096666 */ lui $t1, (0x66666667 >> 16)
/* 18D38C 8025EAAC 35296667 */ ori $t1, $t1, (0x66666667 & 0xFFFF)
/* 18D390 8025EAB0 3C17802A */ lui $s7, %hi(LevelUpStatTextIDs)
/* 18D394 8025EAB4 26F7FA90 */ addiu $s7, $s7, %lo(LevelUpStatTextIDs)
/* 18D398 8025EAB8 92A20006 */ lbu $v0, 0x6($s5)
/* 18D39C 8025EABC 00021600 */ sll $v0, $v0, 24
/* 18D3A0 8025EAC0 00022E03 */ sra $a1, $v0, 24
/* 18D3A4 8025EAC4 00A90018 */ mult $a1, $t1
/* 18D3A8 8025EAC8 3C118028 */ lui $s1, %hi(D_80284238)
/* 18D3AC 8025EACC 26314238 */ addiu $s1, $s1, %lo(D_80284238)
/* 18D3B0 8025EAD0 AFA90030 */ sw $t1, 0x30($sp)
/* 18D3B4 8025EAD4 8EF40004 */ lw $s4, 0x4($s7)
/* 18D3B8 8025EAD8 000217C3 */ sra $v0, $v0, 31
/* 18D3BC 8025EADC 00004810 */ mfhi $t1
/* 18D3C0 8025EAE0 00091883 */ sra $v1, $t1, 2
/* 18D3C4 8025EAE4 00621823 */ subu $v1, $v1, $v0
/* 18D3C8 8025EAE8 00031600 */ sll $v0, $v1, 24
/* 18D3CC 8025EAEC 00028603 */ sra $s0, $v0, 24
/* 18D3D0 8025EAF0 00031080 */ sll $v0, $v1, 2
/* 18D3D4 8025EAF4 00431021 */ addu $v0, $v0, $v1
/* 18D3D8 8025EAF8 00021040 */ sll $v0, $v0, 1
/* 18D3DC 8025EAFC 00A22823 */ subu $a1, $a1, $v0
/* 18D3E0 8025EB00 00052E00 */ sll $a1, $a1, 24
/* 18D3E4 8025EB04 00059603 */ sra $s2, $a1, 24
/* 18D3E8 8025EB08 00101080 */ sll $v0, $s0, 2
/* 18D3EC 8025EB0C 3C058028 */ lui $a1, %hi(D_80284238)
/* 18D3F0 8025EB10 00A22821 */ addu $a1, $a1, $v0
/* 18D3F4 8025EB14 8CA54238 */ lw $a1, %lo(D_80284238)($a1)
/* 18D3F8 8025EB18 0C0511FF */ jal hud_element_set_script
/* 18D3FC 8025EB1C 0280202D */ daddu $a0, $s4, $zero
/* 18D400 8025EB20 12000004 */ beqz $s0, .L8025EB34
/* 18D404 8025EB24 0280202D */ daddu $a0, $s4, $zero
/* 18D408 8025EB28 0C05128B */ jal hud_element_clear_flags
/* 18D40C 8025EB2C 24050002 */ addiu $a1, $zero, 0x2
/* 18D410 8025EB30 0280202D */ daddu $a0, $s4, $zero
.L8025EB34:
/* 18D414 8025EB34 27B60028 */ addiu $s6, $sp, 0x28
/* 18D418 8025EB38 02C0282D */ daddu $a1, $s6, $zero
/* 18D41C 8025EB3C 27B3002C */ addiu $s3, $sp, 0x2C
/* 18D420 8025EB40 0C05126B */ jal hud_element_get_render_pos
/* 18D424 8025EB44 0260302D */ daddu $a2, $s3, $zero
/* 18D428 8025EB48 0280202D */ daddu $a0, $s4, $zero
/* 18D42C 8025EB4C 8FA50028 */ lw $a1, 0x28($sp)
/* 18D430 8025EB50 8FA6002C */ lw $a2, 0x2C($sp)
/* 18D434 8025EB54 24A5FFF2 */ addiu $a1, $a1, -0xE
/* 18D438 8025EB58 0C051261 */ jal hud_element_set_render_pos
/* 18D43C 8025EB5C 24C6002E */ addiu $a2, $a2, 0x2E
/* 18D440 8025EB60 00121080 */ sll $v0, $s2, 2
/* 18D444 8025EB64 00511021 */ addu $v0, $v0, $s1
/* 18D448 8025EB68 8EF40008 */ lw $s4, 0x8($s7)
/* 18D44C 8025EB6C 8C450000 */ lw $a1, 0x0($v0)
/* 18D450 8025EB70 0C0511FF */ jal hud_element_set_script
/* 18D454 8025EB74 0280202D */ daddu $a0, $s4, $zero
/* 18D458 8025EB78 0280202D */ daddu $a0, $s4, $zero
/* 18D45C 8025EB7C 0C05128B */ jal hud_element_clear_flags
/* 18D460 8025EB80 24050002 */ addiu $a1, $zero, 0x2
/* 18D464 8025EB84 0280202D */ daddu $a0, $s4, $zero
/* 18D468 8025EB88 02C0282D */ daddu $a1, $s6, $zero
/* 18D46C 8025EB8C 0C05126B */ jal hud_element_get_render_pos
/* 18D470 8025EB90 0260302D */ daddu $a2, $s3, $zero
/* 18D474 8025EB94 0280202D */ daddu $a0, $s4, $zero
/* 18D478 8025EB98 8FA50028 */ lw $a1, 0x28($sp)
/* 18D47C 8025EB9C 8FA6002C */ lw $a2, 0x2C($sp)
/* 18D480 8025EBA0 24A5FFF8 */ addiu $a1, $a1, -0x8
/* 18D484 8025EBA4 0C051261 */ jal hud_element_set_render_pos
/* 18D488 8025EBA8 24C6002E */ addiu $a2, $a2, 0x2E
/* 18D48C 8025EBAC 8EF4000C */ lw $s4, 0xC($s7)
/* 18D490 8025EBB0 3C05802B */ lui $a1, %hi(D_802AA320_7B1CC0)
/* 18D494 8025EBB4 24A5A320 */ addiu $a1, $a1, %lo(D_802AA320_7B1CC0)
D_8025EBB8:
/* 18D498 8025EBB8 0C0511FF */ jal hud_element_set_script
/* 18D49C 8025EBBC 0280202D */ daddu $a0, $s4, $zero
/* 18D4A0 8025EBC0 0280202D */ daddu $a0, $s4, $zero
/* 18D4A4 8025EBC4 0C05128B */ jal hud_element_clear_flags
D_8025EBC8:
/* 18D4A8 8025EBC8 24050002 */ addiu $a1, $zero, 0x2
/* 18D4AC 8025EBCC 0280202D */ daddu $a0, $s4, $zero
/* 18D4B0 8025EBD0 02C0282D */ daddu $a1, $s6, $zero
/* 18D4B4 8025EBD4 0C05126B */ jal hud_element_get_render_pos
/* 18D4B8 8025EBD8 0260302D */ daddu $a2, $s3, $zero
/* 18D4BC 8025EBDC 0280202D */ daddu $a0, $s4, $zero
/* 18D4C0 8025EBE0 8FA50028 */ lw $a1, 0x28($sp)
/* 18D4C4 8025EBE4 8FA6002C */ lw $a2, 0x2C($sp)
/* 18D4C8 8025EBE8 24A5FFFD */ addiu $a1, $a1, -0x3
/* 18D4CC 8025EBEC 0C051261 */ jal hud_element_set_render_pos
/* 18D4D0 8025EBF0 24C6002E */ addiu $a2, $a2, 0x2E
/* 18D4D4 8025EBF4 82A30006 */ lb $v1, 0x6($s5)
/* 18D4D8 8025EBF8 8FA90030 */ lw $t1, 0x30($sp)
/* 18D4DC 8025EBFC 24630005 */ addiu $v1, $v1, 0x5
/* 18D4E0 8025EC00 00690018 */ mult $v1, $t1
/* 18D4E4 8025EC04 3C118028 */ lui $s1, %hi(D_802841C0)
/* 18D4E8 8025EC08 263141C0 */ addiu $s1, $s1, %lo(D_802841C0)
/* 18D4EC 8025EC0C 8EF40010 */ lw $s4, 0x10($s7)
/* 18D4F0 8025EC10 000317C3 */ sra $v0, $v1, 31
/* 18D4F4 8025EC14 00004810 */ mfhi $t1
/* 18D4F8 8025EC18 00092883 */ sra $a1, $t1, 2
/* 18D4FC 8025EC1C 00A29023 */ subu $s2, $a1, $v0
/* 18D500 8025EC20 0240802D */ daddu $s0, $s2, $zero
/* 18D504 8025EC24 00101080 */ sll $v0, $s0, 2
/* 18D508 8025EC28 00501021 */ addu $v0, $v0, $s0
/* 18D50C 8025EC2C 00021040 */ sll $v0, $v0, 1
/* 18D510 8025EC30 00629023 */ subu $s2, $v1, $v0
/* 18D514 8025EC34 00101080 */ sll $v0, $s0, 2
/* 18D518 8025EC38 3C058028 */ lui $a1, %hi(D_802841C0)
/* 18D51C 8025EC3C 00A22821 */ addu $a1, $a1, $v0
/* 18D520 8025EC40 8CA541C0 */ lw $a1, %lo(D_802841C0)($a1)
/* 18D524 8025EC44 0C0511FF */ jal hud_element_set_script
/* 18D528 8025EC48 0280202D */ daddu $a0, $s4, $zero
/* 18D52C 8025EC4C 12000003 */ beqz $s0, .L8025EC5C
/* 18D530 8025EC50 0280202D */ daddu $a0, $s4, $zero
/* 18D534 8025EC54 0C05128B */ jal hud_element_clear_flags
/* 18D538 8025EC58 24050002 */ addiu $a1, $zero, 0x2
.L8025EC5C:
/* 18D53C 8025EC5C 0280202D */ daddu $a0, $s4, $zero
/* 18D540 8025EC60 02C0282D */ daddu $a1, $s6, $zero
/* 18D544 8025EC64 0C05126B */ jal hud_element_get_render_pos
/* 18D548 8025EC68 0260302D */ daddu $a2, $s3, $zero
/* 18D54C 8025EC6C 0280202D */ daddu $a0, $s4, $zero
/* 18D550 8025EC70 8FA50028 */ lw $a1, 0x28($sp)
/* 18D554 8025EC74 8FA6002C */ lw $a2, 0x2C($sp)
/* 18D558 8025EC78 24A50003 */ addiu $a1, $a1, 0x3
/* 18D55C 8025EC7C 0C051261 */ jal hud_element_set_render_pos
/* 18D560 8025EC80 24C6002E */ addiu $a2, $a2, 0x2E
/* 18D564 8025EC84 00121080 */ sll $v0, $s2, 2
/* 18D568 8025EC88 00511021 */ addu $v0, $v0, $s1
/* 18D56C 8025EC8C 8EF40014 */ lw $s4, 0x14($s7)
/* 18D570 8025EC90 8C450000 */ lw $a1, 0x0($v0)
/* 18D574 8025EC94 0C0511FF */ jal hud_element_set_script
/* 18D578 8025EC98 0280202D */ daddu $a0, $s4, $zero
/* 18D57C 8025EC9C 0280202D */ daddu $a0, $s4, $zero
/* 18D580 8025ECA0 0C05128B */ jal hud_element_clear_flags
/* 18D584 8025ECA4 24050002 */ addiu $a1, $zero, 0x2
/* 18D588 8025ECA8 0280202D */ daddu $a0, $s4, $zero
/* 18D58C 8025ECAC 02C0282D */ daddu $a1, $s6, $zero
/* 18D590 8025ECB0 0C05126B */ jal hud_element_get_render_pos
/* 18D594 8025ECB4 0260302D */ daddu $a2, $s3, $zero
/* 18D598 8025ECB8 0280202D */ daddu $a0, $s4, $zero
/* 18D59C 8025ECBC 8FA50028 */ lw $a1, 0x28($sp)
/* 18D5A0 8025ECC0 8FA6002C */ lw $a2, 0x2C($sp)
/* 18D5A4 8025ECC4 24A5000A */ addiu $a1, $a1, 0xA
/* 18D5A8 8025ECC8 0C051261 */ jal hud_element_set_render_pos
/* 18D5AC 8025ECCC 24C6002E */ addiu $a2, $a2, 0x2E
/* 18D5B0 8025ECD0 08097B78 */ j .L8025EDE0
/* 18D5B4 8025ECD4 00000000 */ nop
.L8025ECD8:
/* 18D5B8 8025ECD8 3C036666 */ lui $v1, (0x66666667 >> 16)
/* 18D5BC 8025ECDC 34636667 */ ori $v1, $v1, (0x66666667 & 0xFFFF)
/* 18D5C0 8025ECE0 92A20006 */ lbu $v0, 0x6($s5)
/* 18D5C4 8025ECE4 3C17802A */ lui $s7, %hi(LevelUpStatTextIDs)
/* 18D5C8 8025ECE8 26F7FA90 */ addiu $s7, $s7, %lo(LevelUpStatTextIDs)
/* 18D5CC 8025ECEC 00021600 */ sll $v0, $v0, 24
/* 18D5D0 8025ECF0 00022E03 */ sra $a1, $v0, 24
/* 18D5D4 8025ECF4 00A30018 */ mult $a1, $v1
/* 18D5D8 8025ECF8 3C138028 */ lui $s3, %hi(D_802841C0)
/* 18D5DC 8025ECFC 267341C0 */ addiu $s3, $s3, %lo(D_802841C0)
/* 18D5E0 8025ED00 8EF40010 */ lw $s4, 0x10($s7)
/* 18D5E4 8025ED04 000217C3 */ sra $v0, $v0, 31
/* 18D5E8 8025ED08 00004810 */ mfhi $t1
/* 18D5EC 8025ED0C 00091883 */ sra $v1, $t1, 2
/* 18D5F0 8025ED10 00621823 */ subu $v1, $v1, $v0
/* 18D5F4 8025ED14 00031600 */ sll $v0, $v1, 24
/* 18D5F8 8025ED18 00028603 */ sra $s0, $v0, 24
/* 18D5FC 8025ED1C 00031080 */ sll $v0, $v1, 2
/* 18D600 8025ED20 00431021 */ addu $v0, $v0, $v1
/* 18D604 8025ED24 00021040 */ sll $v0, $v0, 1
/* 18D608 8025ED28 00A22823 */ subu $a1, $a1, $v0
/* 18D60C 8025ED2C 00052E00 */ sll $a1, $a1, 24
/* 18D610 8025ED30 00059603 */ sra $s2, $a1, 24
/* 18D614 8025ED34 00101080 */ sll $v0, $s0, 2
/* 18D618 8025ED38 3C058028 */ lui $a1, %hi(D_802841C0)
/* 18D61C 8025ED3C 00A22821 */ addu $a1, $a1, $v0
/* 18D620 8025ED40 8CA541C0 */ lw $a1, %lo(D_802841C0)($a1)
/* 18D624 8025ED44 0C0511FF */ jal hud_element_set_script
/* 18D628 8025ED48 0280202D */ daddu $a0, $s4, $zero
/* 18D62C 8025ED4C 12000004 */ beqz $s0, .L8025ED60
/* 18D630 8025ED50 0280202D */ daddu $a0, $s4, $zero
/* 18D634 8025ED54 0C05128B */ jal hud_element_clear_flags
/* 18D638 8025ED58 24050002 */ addiu $a1, $zero, 0x2
/* 18D63C 8025ED5C 0280202D */ daddu $a0, $s4, $zero
.L8025ED60:
/* 18D640 8025ED60 27B10028 */ addiu $s1, $sp, 0x28
/* 18D644 8025ED64 0220282D */ daddu $a1, $s1, $zero
/* 18D648 8025ED68 27B0002C */ addiu $s0, $sp, 0x2C
/* 18D64C 8025ED6C 0C05126B */ jal hud_element_get_render_pos
/* 18D650 8025ED70 0200302D */ daddu $a2, $s0, $zero
/* 18D654 8025ED74 0280202D */ daddu $a0, $s4, $zero
/* 18D658 8025ED78 8FA50028 */ lw $a1, 0x28($sp)
/* 18D65C 8025ED7C 8FA6002C */ lw $a2, 0x2C($sp)
/* 18D660 8025ED80 24A5FFFA */ addiu $a1, $a1, -0x6
/* 18D664 8025ED84 0C051261 */ jal hud_element_set_render_pos
/* 18D668 8025ED88 24C6002E */ addiu $a2, $a2, 0x2E
/* 18D66C 8025ED8C 00121080 */ sll $v0, $s2, 2
/* 18D670 8025ED90 00531021 */ addu $v0, $v0, $s3
/* 18D674 8025ED94 8EF40014 */ lw $s4, 0x14($s7)
/* 18D678 8025ED98 8C450000 */ lw $a1, 0x0($v0)
/* 18D67C 8025ED9C 0C0511FF */ jal hud_element_set_script
/* 18D680 8025EDA0 0280202D */ daddu $a0, $s4, $zero
/* 18D684 8025EDA4 0280202D */ daddu $a0, $s4, $zero
/* 18D688 8025EDA8 0C05128B */ jal hud_element_clear_flags
/* 18D68C 8025EDAC 24050002 */ addiu $a1, $zero, 0x2
/* 18D690 8025EDB0 0280202D */ daddu $a0, $s4, $zero
/* 18D694 8025EDB4 0220282D */ daddu $a1, $s1, $zero
D_8025EDB8:
/* 18D698 8025EDB8 0C05126B */ jal hud_element_get_render_pos
/* 18D69C 8025EDBC 0200302D */ daddu $a2, $s0, $zero
/* 18D6A0 8025EDC0 0280202D */ daddu $a0, $s4, $zero
/* 18D6A4 8025EDC4 8FA50028 */ lw $a1, 0x28($sp)
/* 18D6A8 8025EDC8 8FA6002C */ lw $a2, 0x2C($sp)
/* 18D6AC 8025EDCC 24A50002 */ addiu $a1, $a1, 0x2
/* 18D6B0 8025EDD0 0C051261 */ jal hud_element_set_render_pos
/* 18D6B4 8025EDD4 24C6002E */ addiu $a2, $a2, 0x2E
/* 18D6B8 8025EDD8 24020001 */ addiu $v0, $zero, 0x1
/* 18D6BC 8025EDDC AEC20004 */ sw $v0, 0x4($s6)
.L8025EDE0:
/* 18D6C0 8025EDE0 0C03A752 */ jal is_ability_active
/* 18D6C4 8025EDE4 2404000C */ addiu $a0, $zero, 0xC
/* 18D6C8 8025EDE8 1040001B */ beqz $v0, .L8025EE58
/* 18D6CC 8025EDEC 00000000 */ nop
/* 18D6D0 8025EDF0 3C028009 */ lui $v0, %hi(gItemTable + 0x1F04)
/* 18D6D4 8025EDF4 844297E4 */ lh $v0, %lo(gItemTable + 0x1F04)($v0)
/* 18D6D8 8025EDF8 3C14802A */ lui $s4, %hi(D_8029FAA8)
/* 18D6DC 8025EDFC 8E94FAA8 */ lw $s4, %lo(D_8029FAA8)($s4)
/* 18D6E0 8025EE00 000210C0 */ sll $v0, $v0, 3
/* 18D6E4 8025EE04 3C058009 */ lui $a1, %hi(gItemHudScripts)
/* 18D6E8 8025EE08 00A22821 */ addu $a1, $a1, $v0
/* 18D6EC 8025EE0C 8CA5A680 */ lw $a1, %lo(gItemHudScripts)($a1)
/* 18D6F0 8025EE10 0C0511FF */ jal hud_element_set_script
/* 18D6F4 8025EE14 0280202D */ daddu $a0, $s4, $zero
/* 18D6F8 8025EE18 0280202D */ daddu $a0, $s4, $zero
/* 18D6FC 8025EE1C 0C05128B */ jal hud_element_clear_flags
/* 18D700 8025EE20 24050002 */ addiu $a1, $zero, 0x2
/* 18D704 8025EE24 3C053F00 */ lui $a1, (0x3F000000 >> 16)
/* 18D708 8025EE28 0C051308 */ jal hud_element_set_scale
/* 18D70C 8025EE2C 0280202D */ daddu $a0, $s4, $zero
/* 18D710 8025EE30 0280202D */ daddu $a0, $s4, $zero
/* 18D714 8025EE34 27A50028 */ addiu $a1, $sp, 0x28
/* 18D718 8025EE38 0C05126B */ jal hud_element_get_render_pos
/* 18D71C 8025EE3C 27A6002C */ addiu $a2, $sp, 0x2C
/* 18D720 8025EE40 0280202D */ daddu $a0, $s4, $zero
/* 18D724 8025EE44 8FA50028 */ lw $a1, 0x28($sp)
/* 18D728 8025EE48 8FA6002C */ lw $a2, 0x2C($sp)
/* 18D72C 8025EE4C 24A50011 */ addiu $a1, $a1, 0x11
/* 18D730 8025EE50 0C051261 */ jal hud_element_set_render_pos
/* 18D734 8025EE54 24C6002E */ addiu $a2, $a2, 0x2E
.L8025EE58:
/* 18D738 8025EE58 82A30004 */ lb $v1, 0x4($s5)
/* 18D73C 8025EE5C 24020032 */ addiu $v0, $zero, 0x32
/* 18D740 8025EE60 1062008C */ beq $v1, $v0, .L8025F094
/* 18D744 8025EE64 3C096666 */ lui $t1, (0x66666667 >> 16)
/* 18D748 8025EE68 35296667 */ ori $t1, $t1, (0x66666667 & 0xFFFF)
/* 18D74C 8025EE6C 3C17802A */ lui $s7, %hi(LevelUpStatTextIDs)
/* 18D750 8025EE70 26F7FA90 */ addiu $s7, $s7, %lo(LevelUpStatTextIDs)
/* 18D754 8025EE74 92A20003 */ lbu $v0, 0x3($s5)
/* 18D758 8025EE78 00021600 */ sll $v0, $v0, 24
/* 18D75C 8025EE7C 00022E03 */ sra $a1, $v0, 24
/* 18D760 8025EE80 00A90018 */ mult $a1, $t1
/* 18D764 8025EE84 3C118028 */ lui $s1, %hi(D_80284238)
/* 18D768 8025EE88 26314238 */ addiu $s1, $s1, %lo(D_80284238)
/* 18D76C 8025EE8C AFA90034 */ sw $t1, 0x34($sp)
/* 18D770 8025EE90 8EF40020 */ lw $s4, 0x20($s7)
/* 18D774 8025EE94 000217C3 */ sra $v0, $v0, 31
/* 18D778 8025EE98 00004810 */ mfhi $t1
/* 18D77C 8025EE9C 00091883 */ sra $v1, $t1, 2
/* 18D780 8025EEA0 00621823 */ subu $v1, $v1, $v0
/* 18D784 8025EEA4 00031600 */ sll $v0, $v1, 24
/* 18D788 8025EEA8 00028603 */ sra $s0, $v0, 24
/* 18D78C 8025EEAC 00031080 */ sll $v0, $v1, 2
/* 18D790 8025EEB0 00431021 */ addu $v0, $v0, $v1
/* 18D794 8025EEB4 00021040 */ sll $v0, $v0, 1
/* 18D798 8025EEB8 00A22823 */ subu $a1, $a1, $v0
/* 18D79C 8025EEBC 00052E00 */ sll $a1, $a1, 24
/* 18D7A0 8025EEC0 00059603 */ sra $s2, $a1, 24
/* 18D7A4 8025EEC4 00101080 */ sll $v0, $s0, 2
/* 18D7A8 8025EEC8 3C058028 */ lui $a1, %hi(D_80284260)
/* 18D7AC 8025EECC 00A22821 */ addu $a1, $a1, $v0
/* 18D7B0 8025EED0 8CA54260 */ lw $a1, %lo(D_80284260)($a1)
/* 18D7B4 8025EED4 0C0511FF */ jal hud_element_set_script
/* 18D7B8 8025EED8 0280202D */ daddu $a0, $s4, $zero
/* 18D7BC 8025EEDC 12000004 */ beqz $s0, .L8025EEF0
/* 18D7C0 8025EEE0 0280202D */ daddu $a0, $s4, $zero
/* 18D7C4 8025EEE4 0C05128B */ jal hud_element_clear_flags
/* 18D7C8 8025EEE8 24050002 */ addiu $a1, $zero, 0x2
/* 18D7CC 8025EEEC 0280202D */ daddu $a0, $s4, $zero
.L8025EEF0:
/* 18D7D0 8025EEF0 27B60028 */ addiu $s6, $sp, 0x28
/* 18D7D4 8025EEF4 02C0282D */ daddu $a1, $s6, $zero
/* 18D7D8 8025EEF8 27B3002C */ addiu $s3, $sp, 0x2C
/* 18D7DC 8025EEFC 0C05126B */ jal hud_element_get_render_pos
/* 18D7E0 8025EF00 0260302D */ daddu $a2, $s3, $zero
/* 18D7E4 8025EF04 0280202D */ daddu $a0, $s4, $zero
/* 18D7E8 8025EF08 8FA50028 */ lw $a1, 0x28($sp)
/* 18D7EC 8025EF0C 8FA6002C */ lw $a2, 0x2C($sp)
/* 18D7F0 8025EF10 24A5FFF2 */ addiu $a1, $a1, -0xE
/* 18D7F4 8025EF14 0C051261 */ jal hud_element_set_render_pos
/* 18D7F8 8025EF18 24C6002E */ addiu $a2, $a2, 0x2E
/* 18D7FC 8025EF1C 00121080 */ sll $v0, $s2, 2
/* 18D800 8025EF20 00511021 */ addu $v0, $v0, $s1
/* 18D804 8025EF24 8EF40024 */ lw $s4, 0x24($s7)
/* 18D808 8025EF28 8C450028 */ lw $a1, 0x28($v0)
/* 18D80C 8025EF2C 0C0511FF */ jal hud_element_set_script
/* 18D810 8025EF30 0280202D */ daddu $a0, $s4, $zero
/* 18D814 8025EF34 0280202D */ daddu $a0, $s4, $zero
/* 18D818 8025EF38 0C05128B */ jal hud_element_clear_flags
/* 18D81C 8025EF3C 24050002 */ addiu $a1, $zero, 0x2
/* 18D820 8025EF40 0280202D */ daddu $a0, $s4, $zero
/* 18D824 8025EF44 02C0282D */ daddu $a1, $s6, $zero
/* 18D828 8025EF48 0C05126B */ jal hud_element_get_render_pos
/* 18D82C 8025EF4C 0260302D */ daddu $a2, $s3, $zero
/* 18D830 8025EF50 0280202D */ daddu $a0, $s4, $zero
/* 18D834 8025EF54 8FA50028 */ lw $a1, 0x28($sp)
/* 18D838 8025EF58 8FA6002C */ lw $a2, 0x2C($sp)
/* 18D83C 8025EF5C 24A5FFF8 */ addiu $a1, $a1, -0x8
/* 18D840 8025EF60 0C051261 */ jal hud_element_set_render_pos
/* 18D844 8025EF64 24C6002E */ addiu $a2, $a2, 0x2E
/* 18D848 8025EF68 8EF40028 */ lw $s4, 0x28($s7)
/* 18D84C 8025EF6C 3C05802B */ lui $a1, %hi(D_802AA694_7B2034)
/* 18D850 8025EF70 24A5A694 */ addiu $a1, $a1, %lo(D_802AA694_7B2034)
/* 18D854 8025EF74 0C0511FF */ jal hud_element_set_script
/* 18D858 8025EF78 0280202D */ daddu $a0, $s4, $zero
/* 18D85C 8025EF7C 0280202D */ daddu $a0, $s4, $zero
/* 18D860 8025EF80 0C05128B */ jal hud_element_clear_flags
/* 18D864 8025EF84 24050002 */ addiu $a1, $zero, 0x2
/* 18D868 8025EF88 0280202D */ daddu $a0, $s4, $zero
/* 18D86C 8025EF8C 02C0282D */ daddu $a1, $s6, $zero
/* 18D870 8025EF90 0C05126B */ jal hud_element_get_render_pos
/* 18D874 8025EF94 0260302D */ daddu $a2, $s3, $zero
/* 18D878 8025EF98 0280202D */ daddu $a0, $s4, $zero
/* 18D87C 8025EF9C 8FA50028 */ lw $a1, 0x28($sp)
/* 18D880 8025EFA0 8FA6002C */ lw $a2, 0x2C($sp)
/* 18D884 8025EFA4 24A5FFFD */ addiu $a1, $a1, -0x3
D_8025EFA8:
/* 18D888 8025EFA8 0C051261 */ jal hud_element_set_render_pos
/* 18D88C 8025EFAC 24C6002E */ addiu $a2, $a2, 0x2E
/* 18D890 8025EFB0 82A30003 */ lb $v1, 0x3($s5)
/* 18D894 8025EFB4 8FA90034 */ lw $t1, 0x34($sp)
/* 18D898 8025EFB8 24630005 */ addiu $v1, $v1, 0x5
/* 18D89C 8025EFBC 00690018 */ mult $v1, $t1
/* 18D8A0 8025EFC0 3C118028 */ lui $s1, %hi(D_802841C0)
/* 18D8A4 8025EFC4 263141C0 */ addiu $s1, $s1, %lo(D_802841C0)
/* 18D8A8 8025EFC8 8EF4002C */ lw $s4, 0x2C($s7)
/* 18D8AC 8025EFCC 000317C3 */ sra $v0, $v1, 31
/* 18D8B0 8025EFD0 00004810 */ mfhi $t1
/* 18D8B4 8025EFD4 00092883 */ sra $a1, $t1, 2
/* 18D8B8 8025EFD8 00A29023 */ subu $s2, $a1, $v0
/* 18D8BC 8025EFDC 0240802D */ daddu $s0, $s2, $zero
/* 18D8C0 8025EFE0 00101080 */ sll $v0, $s0, 2
/* 18D8C4 8025EFE4 00501021 */ addu $v0, $v0, $s0
/* 18D8C8 8025EFE8 00021040 */ sll $v0, $v0, 1
/* 18D8CC 8025EFEC 00629023 */ subu $s2, $v1, $v0
D_8025EFF0:
/* 18D8D0 8025EFF0 00101080 */ sll $v0, $s0, 2
/* 18D8D4 8025EFF4 3C058028 */ lui $a1, %hi(D_802841E8)
/* 18D8D8 8025EFF8 00A22821 */ addu $a1, $a1, $v0
/* 18D8DC 8025EFFC 8CA541E8 */ lw $a1, %lo(D_802841E8)($a1)
/* 18D8E0 8025F000 0C0511FF */ jal hud_element_set_script
/* 18D8E4 8025F004 0280202D */ daddu $a0, $s4, $zero
/* 18D8E8 8025F008 12000003 */ beqz $s0, .L8025F018
/* 18D8EC 8025F00C 0280202D */ daddu $a0, $s4, $zero
/* 18D8F0 8025F010 0C05128B */ jal hud_element_clear_flags
/* 18D8F4 8025F014 24050002 */ addiu $a1, $zero, 0x2
.L8025F018:
/* 18D8F8 8025F018 0280202D */ daddu $a0, $s4, $zero
/* 18D8FC 8025F01C 02C0282D */ daddu $a1, $s6, $zero
/* 18D900 8025F020 0C05126B */ jal hud_element_get_render_pos
/* 18D904 8025F024 0260302D */ daddu $a2, $s3, $zero
/* 18D908 8025F028 0280202D */ daddu $a0, $s4, $zero
/* 18D90C 8025F02C 8FA50028 */ lw $a1, 0x28($sp)
/* 18D910 8025F030 8FA6002C */ lw $a2, 0x2C($sp)
/* 18D914 8025F034 24A50003 */ addiu $a1, $a1, 0x3
/* 18D918 8025F038 0C051261 */ jal hud_element_set_render_pos
/* 18D91C 8025F03C 24C6002E */ addiu $a2, $a2, 0x2E
/* 18D920 8025F040 00121080 */ sll $v0, $s2, 2
D_8025F044:
/* 18D924 8025F044 00511021 */ addu $v0, $v0, $s1
/* 18D928 8025F048 8EF40030 */ lw $s4, 0x30($s7)
/* 18D92C 8025F04C 8C450028 */ lw $a1, 0x28($v0)
/* 18D930 8025F050 0C0511FF */ jal hud_element_set_script
/* 18D934 8025F054 0280202D */ daddu $a0, $s4, $zero
/* 18D938 8025F058 0280202D */ daddu $a0, $s4, $zero
/* 18D93C 8025F05C 0C05128B */ jal hud_element_clear_flags
/* 18D940 8025F060 24050002 */ addiu $a1, $zero, 0x2
/* 18D944 8025F064 0280202D */ daddu $a0, $s4, $zero
/* 18D948 8025F068 02C0282D */ daddu $a1, $s6, $zero
/* 18D94C 8025F06C 0C05126B */ jal hud_element_get_render_pos
/* 18D950 8025F070 0260302D */ daddu $a2, $s3, $zero
/* 18D954 8025F074 0280202D */ daddu $a0, $s4, $zero
/* 18D958 8025F078 8FA50028 */ lw $a1, 0x28($sp)
/* 18D95C 8025F07C 8FA6002C */ lw $a2, 0x2C($sp)
D_8025F080:
/* 18D960 8025F080 24A5000A */ addiu $a1, $a1, 0xA
/* 18D964 8025F084 0C051261 */ jal hud_element_set_render_pos
/* 18D968 8025F088 24C6002E */ addiu $a2, $a2, 0x2E
/* 18D96C 8025F08C 08097C68 */ j .L8025F1A0
/* 18D970 8025F090 00000000 */ nop
.L8025F094:
/* 18D974 8025F094 3C036666 */ lui $v1, (0x66666667 >> 16)
/* 18D978 8025F098 34636667 */ ori $v1, $v1, (0x66666667 & 0xFFFF)
/* 18D97C 8025F09C 92A20003 */ lbu $v0, 0x3($s5)
/* 18D980 8025F0A0 3C16802A */ lui $s6, %hi(LevelUpStatTextIDs)
/* 18D984 8025F0A4 26D6FA90 */ addiu $s6, $s6, %lo(LevelUpStatTextIDs)
/* 18D988 8025F0A8 00021600 */ sll $v0, $v0, 24
/* 18D98C 8025F0AC 00022E03 */ sra $a1, $v0, 24
/* 18D990 8025F0B0 00A30018 */ mult $a1, $v1
/* 18D994 8025F0B4 3C138028 */ lui $s3, %hi(D_802841C0)
/* 18D998 8025F0B8 267341C0 */ addiu $s3, $s3, %lo(D_802841C0)
D_8025F0BC:
/* 18D99C 8025F0BC 8ED4002C */ lw $s4, 0x2C($s6)
/* 18D9A0 8025F0C0 000217C3 */ sra $v0, $v0, 31
/* 18D9A4 8025F0C4 00004810 */ mfhi $t1
/* 18D9A8 8025F0C8 00091883 */ sra $v1, $t1, 2
/* 18D9AC 8025F0CC 00621823 */ subu $v1, $v1, $v0
/* 18D9B0 8025F0D0 00031600 */ sll $v0, $v1, 24
/* 18D9B4 8025F0D4 00028603 */ sra $s0, $v0, 24
/* 18D9B8 8025F0D8 00031080 */ sll $v0, $v1, 2
/* 18D9BC 8025F0DC 00431021 */ addu $v0, $v0, $v1
/* 18D9C0 8025F0E0 00021040 */ sll $v0, $v0, 1
/* 18D9C4 8025F0E4 00A22823 */ subu $a1, $a1, $v0
/* 18D9C8 8025F0E8 00052E00 */ sll $a1, $a1, 24
/* 18D9CC 8025F0EC 00059603 */ sra $s2, $a1, 24
/* 18D9D0 8025F0F0 00101080 */ sll $v0, $s0, 2
/* 18D9D4 8025F0F4 3C058028 */ lui $a1, %hi(D_802841E8)
D_8025F0F8:
/* 18D9D8 8025F0F8 00A22821 */ addu $a1, $a1, $v0
/* 18D9DC 8025F0FC 8CA541E8 */ lw $a1, %lo(D_802841E8)($a1)
/* 18D9E0 8025F100 0C0511FF */ jal hud_element_set_script
/* 18D9E4 8025F104 0280202D */ daddu $a0, $s4, $zero
/* 18D9E8 8025F108 12000004 */ beqz $s0, .L8025F11C
/* 18D9EC 8025F10C 0280202D */ daddu $a0, $s4, $zero
/* 18D9F0 8025F110 0C05128B */ jal hud_element_clear_flags
/* 18D9F4 8025F114 24050002 */ addiu $a1, $zero, 0x2
/* 18D9F8 8025F118 0280202D */ daddu $a0, $s4, $zero
.L8025F11C:
/* 18D9FC 8025F11C 27B10028 */ addiu $s1, $sp, 0x28
/* 18DA00 8025F120 0220282D */ daddu $a1, $s1, $zero
/* 18DA04 8025F124 27B0002C */ addiu $s0, $sp, 0x2C
/* 18DA08 8025F128 0C05126B */ jal hud_element_get_render_pos
/* 18DA0C 8025F12C 0200302D */ daddu $a2, $s0, $zero
/* 18DA10 8025F130 0280202D */ daddu $a0, $s4, $zero
/* 18DA14 8025F134 8FA50028 */ lw $a1, 0x28($sp)
/* 18DA18 8025F138 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DA1C 8025F13C 24A5FFFA */ addiu $a1, $a1, -0x6
D_8025F140:
/* 18DA20 8025F140 0C051261 */ jal hud_element_set_render_pos
/* 18DA24 8025F144 24C6002E */ addiu $a2, $a2, 0x2E
/* 18DA28 8025F148 00121080 */ sll $v0, $s2, 2
/* 18DA2C 8025F14C 00531021 */ addu $v0, $v0, $s3
/* 18DA30 8025F150 8ED40030 */ lw $s4, 0x30($s6)
/* 18DA34 8025F154 8C450028 */ lw $a1, 0x28($v0)
/* 18DA38 8025F158 0C0511FF */ jal hud_element_set_script
/* 18DA3C 8025F15C 0280202D */ daddu $a0, $s4, $zero
/* 18DA40 8025F160 0280202D */ daddu $a0, $s4, $zero
/* 18DA44 8025F164 0C05128B */ jal hud_element_clear_flags
/* 18DA48 8025F168 24050002 */ addiu $a1, $zero, 0x2
D_8025F16C:
/* 18DA4C 8025F16C 0280202D */ daddu $a0, $s4, $zero
/* 18DA50 8025F170 0220282D */ daddu $a1, $s1, $zero
/* 18DA54 8025F174 0C05126B */ jal hud_element_get_render_pos
/* 18DA58 8025F178 0200302D */ daddu $a2, $s0, $zero
/* 18DA5C 8025F17C 0280202D */ daddu $a0, $s4, $zero
/* 18DA60 8025F180 8FA50028 */ lw $a1, 0x28($sp)
/* 18DA64 8025F184 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DA68 8025F188 24A50002 */ addiu $a1, $a1, 0x2
/* 18DA6C 8025F18C 0C051261 */ jal hud_element_set_render_pos
/* 18DA70 8025F190 24C6002E */ addiu $a2, $a2, 0x2E
/* 18DA74 8025F194 24020001 */ addiu $v0, $zero, 0x1
/* 18DA78 8025F198 3C01802A */ lui $at, %hi(CantLevelUpStat)
D_8025F19C:
/* 18DA7C 8025F19C AC22FB60 */ sw $v0, %lo(CantLevelUpStat)($at)
.L8025F1A0:
/* 18DA80 8025F1A0 0C03A752 */ jal is_ability_active
/* 18DA84 8025F1A4 24040004 */ addiu $a0, $zero, 0x4
/* 18DA88 8025F1A8 1040001B */ beqz $v0, .L8025F218
/* 18DA8C 8025F1AC 00000000 */ nop
/* 18DA90 8025F1B0 3C028009 */ lui $v0, %hi(gItemTable + 0x1CE4)
/* 18DA94 8025F1B4 844295C4 */ lh $v0, %lo(gItemTable + 0x1CE4)($v0)
/* 18DA98 8025F1B8 3C14802A */ lui $s4, %hi(D_8029FAC4)
/* 18DA9C 8025F1BC 8E94FAC4 */ lw $s4, %lo(D_8029FAC4)($s4)
/* 18DAA0 8025F1C0 000210C0 */ sll $v0, $v0, 3
/* 18DAA4 8025F1C4 3C058009 */ lui $a1, %hi(gItemHudScripts)
/* 18DAA8 8025F1C8 00A22821 */ addu $a1, $a1, $v0
/* 18DAAC 8025F1CC 8CA5A680 */ lw $a1, %lo(gItemHudScripts)($a1)
/* 18DAB0 8025F1D0 0C0511FF */ jal hud_element_set_script
/* 18DAB4 8025F1D4 0280202D */ daddu $a0, $s4, $zero
/* 18DAB8 8025F1D8 0280202D */ daddu $a0, $s4, $zero
/* 18DABC 8025F1DC 0C05128B */ jal hud_element_clear_flags
/* 18DAC0 8025F1E0 24050002 */ addiu $a1, $zero, 0x2
/* 18DAC4 8025F1E4 3C053F00 */ lui $a1, (0x3F000000 >> 16)
/* 18DAC8 8025F1E8 0C051308 */ jal hud_element_set_scale
/* 18DACC 8025F1EC 0280202D */ daddu $a0, $s4, $zero
/* 18DAD0 8025F1F0 0280202D */ daddu $a0, $s4, $zero
/* 18DAD4 8025F1F4 27A50028 */ addiu $a1, $sp, 0x28
/* 18DAD8 8025F1F8 0C05126B */ jal hud_element_get_render_pos
/* 18DADC 8025F1FC 27A6002C */ addiu $a2, $sp, 0x2C
/* 18DAE0 8025F200 0280202D */ daddu $a0, $s4, $zero
/* 18DAE4 8025F204 8FA50028 */ lw $a1, 0x28($sp)
/* 18DAE8 8025F208 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DAEC 8025F20C 24A50011 */ addiu $a1, $a1, 0x11
/* 18DAF0 8025F210 0C051261 */ jal hud_element_set_render_pos
D_8025F214:
/* 18DAF4 8025F214 24C6002E */ addiu $a2, $a2, 0x2E
.L8025F218:
/* 18DAF8 8025F218 92A20008 */ lbu $v0, 0x8($s5)
/* 18DAFC 8025F21C 00023600 */ sll $a2, $v0, 24
/* 18DB00 8025F220 00062E03 */ sra $a1, $a2, 24
/* 18DB04 8025F224 2402001E */ addiu $v0, $zero, 0x1E
/* 18DB08 8025F228 10A20089 */ beq $a1, $v0, .L8025F450
/* 18DB0C 8025F22C 3C096666 */ lui $t1, (0x66666667 >> 16)
/* 18DB10 8025F230 35296667 */ ori $t1, $t1, (0x66666667 & 0xFFFF)
/* 18DB14 8025F234 3C17802A */ lui $s7, %hi(LevelUpStatTextIDs)
/* 18DB18 8025F238 26F7FA90 */ addiu $s7, $s7, %lo(LevelUpStatTextIDs)
/* 18DB1C 8025F23C 00A90018 */ mult $a1, $t1
/* 18DB20 8025F240 000617C3 */ sra $v0, $a2, 31
/* 18DB24 8025F244 3C118028 */ lui $s1, %hi(D_80284238)
/* 18DB28 8025F248 26314238 */ addiu $s1, $s1, %lo(D_80284238)
/* 18DB2C 8025F24C AFA90038 */ sw $t1, 0x38($sp)
/* 18DB30 8025F250 8EF4003C */ lw $s4, 0x3C($s7)
/* 18DB34 8025F254 00004810 */ mfhi $t1
/* 18DB38 8025F258 00091883 */ sra $v1, $t1, 2
/* 18DB3C 8025F25C 00621823 */ subu $v1, $v1, $v0
/* 18DB40 8025F260 00031600 */ sll $v0, $v1, 24
/* 18DB44 8025F264 00028603 */ sra $s0, $v0, 24
/* 18DB48 8025F268 00031080 */ sll $v0, $v1, 2
D_8025F26C:
/* 18DB4C 8025F26C 00431021 */ addu $v0, $v0, $v1
/* 18DB50 8025F270 00021040 */ sll $v0, $v0, 1
/* 18DB54 8025F274 00A21023 */ subu $v0, $a1, $v0
/* 18DB58 8025F278 00021600 */ sll $v0, $v0, 24
/* 18DB5C 8025F27C 00029603 */ sra $s2, $v0, 24
/* 18DB60 8025F280 00101080 */ sll $v0, $s0, 2
/* 18DB64 8025F284 3C058028 */ lui $a1, %hi(D_80284288)
/* 18DB68 8025F288 00A22821 */ addu $a1, $a1, $v0
/* 18DB6C 8025F28C 8CA54288 */ lw $a1, %lo(D_80284288)($a1)
/* 18DB70 8025F290 0C0511FF */ jal hud_element_set_script
/* 18DB74 8025F294 0280202D */ daddu $a0, $s4, $zero
/* 18DB78 8025F298 12000004 */ beqz $s0, .L8025F2AC
/* 18DB7C 8025F29C 0280202D */ daddu $a0, $s4, $zero
/* 18DB80 8025F2A0 0C05128B */ jal hud_element_clear_flags
/* 18DB84 8025F2A4 24050002 */ addiu $a1, $zero, 0x2
/* 18DB88 8025F2A8 0280202D */ daddu $a0, $s4, $zero
.L8025F2AC:
/* 18DB8C 8025F2AC 27B60028 */ addiu $s6, $sp, 0x28
/* 18DB90 8025F2B0 02C0282D */ daddu $a1, $s6, $zero
/* 18DB94 8025F2B4 27B3002C */ addiu $s3, $sp, 0x2C
/* 18DB98 8025F2B8 0C05126B */ jal hud_element_get_render_pos
/* 18DB9C 8025F2BC 0260302D */ daddu $a2, $s3, $zero
/* 18DBA0 8025F2C0 0280202D */ daddu $a0, $s4, $zero
/* 18DBA4 8025F2C4 8FA50028 */ lw $a1, 0x28($sp)
/* 18DBA8 8025F2C8 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DBAC 8025F2CC 24A5FFF2 */ addiu $a1, $a1, -0xE
/* 18DBB0 8025F2D0 0C051261 */ jal hud_element_set_render_pos
/* 18DBB4 8025F2D4 24C6002E */ addiu $a2, $a2, 0x2E
/* 18DBB8 8025F2D8 00121080 */ sll $v0, $s2, 2
/* 18DBBC 8025F2DC 00511021 */ addu $v0, $v0, $s1
/* 18DBC0 8025F2E0 8EF40040 */ lw $s4, 0x40($s7)
/* 18DBC4 8025F2E4 8C450050 */ lw $a1, 0x50($v0)
/* 18DBC8 8025F2E8 0C0511FF */ jal hud_element_set_script
/* 18DBCC 8025F2EC 0280202D */ daddu $a0, $s4, $zero
/* 18DBD0 8025F2F0 0280202D */ daddu $a0, $s4, $zero
/* 18DBD4 8025F2F4 0C05128B */ jal hud_element_clear_flags
/* 18DBD8 8025F2F8 24050002 */ addiu $a1, $zero, 0x2
/* 18DBDC 8025F2FC 0280202D */ daddu $a0, $s4, $zero
/* 18DBE0 8025F300 02C0282D */ daddu $a1, $s6, $zero
/* 18DBE4 8025F304 0C05126B */ jal hud_element_get_render_pos
/* 18DBE8 8025F308 0260302D */ daddu $a2, $s3, $zero
/* 18DBEC 8025F30C 0280202D */ daddu $a0, $s4, $zero
/* 18DBF0 8025F310 8FA50028 */ lw $a1, 0x28($sp)
/* 18DBF4 8025F314 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DBF8 8025F318 24A5FFF8 */ addiu $a1, $a1, -0x8
/* 18DBFC 8025F31C 0C051261 */ jal hud_element_set_render_pos
/* 18DC00 8025F320 24C6002E */ addiu $a2, $a2, 0x2E
/* 18DC04 8025F324 8EF40044 */ lw $s4, 0x44($s7)
/* 18DC08 8025F328 3C05802B */ lui $a1, %hi(D_802AAA08_7B23A8)
/* 18DC0C 8025F32C 24A5AA08 */ addiu $a1, $a1, %lo(D_802AAA08_7B23A8)
/* 18DC10 8025F330 0C0511FF */ jal hud_element_set_script
/* 18DC14 8025F334 0280202D */ daddu $a0, $s4, $zero
/* 18DC18 8025F338 0280202D */ daddu $a0, $s4, $zero
/* 18DC1C 8025F33C 0C05128B */ jal hud_element_clear_flags
/* 18DC20 8025F340 24050002 */ addiu $a1, $zero, 0x2
/* 18DC24 8025F344 0280202D */ daddu $a0, $s4, $zero
/* 18DC28 8025F348 02C0282D */ daddu $a1, $s6, $zero
/* 18DC2C 8025F34C 0C05126B */ jal hud_element_get_render_pos
/* 18DC30 8025F350 0260302D */ daddu $a2, $s3, $zero
/* 18DC34 8025F354 0280202D */ daddu $a0, $s4, $zero
/* 18DC38 8025F358 8FA50028 */ lw $a1, 0x28($sp)
/* 18DC3C 8025F35C 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DC40 8025F360 24A5FFFD */ addiu $a1, $a1, -0x3
/* 18DC44 8025F364 0C051261 */ jal hud_element_set_render_pos
/* 18DC48 8025F368 24C6002E */ addiu $a2, $a2, 0x2E
/* 18DC4C 8025F36C 82A30008 */ lb $v1, 0x8($s5)
/* 18DC50 8025F370 8FA90038 */ lw $t1, 0x38($sp)
/* 18DC54 8025F374 24630003 */ addiu $v1, $v1, 0x3
/* 18DC58 8025F378 00690018 */ mult $v1, $t1
/* 18DC5C 8025F37C 3C118028 */ lui $s1, %hi(D_802841C0)
/* 18DC60 8025F380 263141C0 */ addiu $s1, $s1, %lo(D_802841C0)
/* 18DC64 8025F384 8EF40048 */ lw $s4, 0x48($s7)
/* 18DC68 8025F388 000317C3 */ sra $v0, $v1, 31
/* 18DC6C 8025F38C 00004810 */ mfhi $t1
/* 18DC70 8025F390 00092883 */ sra $a1, $t1, 2
/* 18DC74 8025F394 00A29023 */ subu $s2, $a1, $v0
/* 18DC78 8025F398 0240802D */ daddu $s0, $s2, $zero
/* 18DC7C 8025F39C 00101080 */ sll $v0, $s0, 2
/* 18DC80 8025F3A0 00501021 */ addu $v0, $v0, $s0
/* 18DC84 8025F3A4 00021040 */ sll $v0, $v0, 1
/* 18DC88 8025F3A8 00629023 */ subu $s2, $v1, $v0
/* 18DC8C 8025F3AC 00101080 */ sll $v0, $s0, 2
/* 18DC90 8025F3B0 3C058028 */ lui $a1, %hi(D_80284210)
/* 18DC94 8025F3B4 00A22821 */ addu $a1, $a1, $v0
/* 18DC98 8025F3B8 8CA54210 */ lw $a1, %lo(D_80284210)($a1)
/* 18DC9C 8025F3BC 0C0511FF */ jal hud_element_set_script
/* 18DCA0 8025F3C0 0280202D */ daddu $a0, $s4, $zero
/* 18DCA4 8025F3C4 12000004 */ beqz $s0, .L8025F3D8
/* 18DCA8 8025F3C8 0280202D */ daddu $a0, $s4, $zero
/* 18DCAC 8025F3CC 0C05128B */ jal hud_element_clear_flags
/* 18DCB0 8025F3D0 24050002 */ addiu $a1, $zero, 0x2
/* 18DCB4 8025F3D4 0280202D */ daddu $a0, $s4, $zero
.L8025F3D8:
/* 18DCB8 8025F3D8 02C0282D */ daddu $a1, $s6, $zero
/* 18DCBC 8025F3DC 0C05126B */ jal hud_element_get_render_pos
/* 18DCC0 8025F3E0 0260302D */ daddu $a2, $s3, $zero
/* 18DCC4 8025F3E4 0280202D */ daddu $a0, $s4, $zero
/* 18DCC8 8025F3E8 8FA50028 */ lw $a1, 0x28($sp)
/* 18DCCC 8025F3EC 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DCD0 8025F3F0 24A50003 */ addiu $a1, $a1, 0x3
/* 18DCD4 8025F3F4 0C051261 */ jal hud_element_set_render_pos
/* 18DCD8 8025F3F8 24C6002E */ addiu $a2, $a2, 0x2E
/* 18DCDC 8025F3FC 00121080 */ sll $v0, $s2, 2
/* 18DCE0 8025F400 00511021 */ addu $v0, $v0, $s1
/* 18DCE4 8025F404 8EF4004C */ lw $s4, 0x4C($s7)
/* 18DCE8 8025F408 8C450050 */ lw $a1, 0x50($v0)
/* 18DCEC 8025F40C 0C0511FF */ jal hud_element_set_script
/* 18DCF0 8025F410 0280202D */ daddu $a0, $s4, $zero
/* 18DCF4 8025F414 0280202D */ daddu $a0, $s4, $zero
/* 18DCF8 8025F418 0C05128B */ jal hud_element_clear_flags
/* 18DCFC 8025F41C 24050002 */ addiu $a1, $zero, 0x2
/* 18DD00 8025F420 0280202D */ daddu $a0, $s4, $zero
/* 18DD04 8025F424 02C0282D */ daddu $a1, $s6, $zero
/* 18DD08 8025F428 0C05126B */ jal hud_element_get_render_pos
/* 18DD0C 8025F42C 0260302D */ daddu $a2, $s3, $zero
/* 18DD10 8025F430 0280202D */ daddu $a0, $s4, $zero
/* 18DD14 8025F434 8FA50028 */ lw $a1, 0x28($sp)
/* 18DD18 8025F438 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DD1C 8025F43C 24A5000A */ addiu $a1, $a1, 0xA
/* 18DD20 8025F440 0C051261 */ jal hud_element_set_render_pos
/* 18DD24 8025F444 24C6002E */ addiu $a2, $a2, 0x2E
/* 18DD28 8025F448 08097D3F */ j .L8025F4FC
/* 18DD2C 8025F44C 00000000 */ nop
.L8025F450:
/* 18DD30 8025F450 3C13802A */ lui $s3, %hi(LevelUpStatTextIDs)
/* 18DD34 8025F454 2673FA90 */ addiu $s3, $s3, %lo(LevelUpStatTextIDs)
/* 18DD38 8025F458 3C128028 */ lui $s2, %hi(D_802841C0)
/* 18DD3C 8025F45C 265241C0 */ addiu $s2, $s2, %lo(D_802841C0)
/* 18DD40 8025F460 8E740048 */ lw $s4, 0x48($s3)
/* 18DD44 8025F464 8E45005C */ lw $a1, 0x5C($s2)
/* 18DD48 8025F468 0C0511FF */ jal hud_element_set_script
/* 18DD4C 8025F46C 0280202D */ daddu $a0, $s4, $zero
/* 18DD50 8025F470 0280202D */ daddu $a0, $s4, $zero
/* 18DD54 8025F474 0C05128B */ jal hud_element_clear_flags
/* 18DD58 8025F478 24050002 */ addiu $a1, $zero, 0x2
/* 18DD5C 8025F47C 0280202D */ daddu $a0, $s4, $zero
/* 18DD60 8025F480 27B10028 */ addiu $s1, $sp, 0x28
/* 18DD64 8025F484 0220282D */ daddu $a1, $s1, $zero
/* 18DD68 8025F488 27B0002C */ addiu $s0, $sp, 0x2C
/* 18DD6C 8025F48C 0C05126B */ jal hud_element_get_render_pos
/* 18DD70 8025F490 0200302D */ daddu $a2, $s0, $zero
/* 18DD74 8025F494 0280202D */ daddu $a0, $s4, $zero
/* 18DD78 8025F498 8FA50028 */ lw $a1, 0x28($sp)
/* 18DD7C 8025F49C 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DD80 8025F4A0 24A5FFFA */ addiu $a1, $a1, -0x6
/* 18DD84 8025F4A4 0C051261 */ jal hud_element_set_render_pos
/* 18DD88 8025F4A8 24C6002E */ addiu $a2, $a2, 0x2E
/* 18DD8C 8025F4AC 8E74004C */ lw $s4, 0x4C($s3)
/* 18DD90 8025F4B0 8E450050 */ lw $a1, 0x50($s2)
/* 18DD94 8025F4B4 0C0511FF */ jal hud_element_set_script
/* 18DD98 8025F4B8 0280202D */ daddu $a0, $s4, $zero
/* 18DD9C 8025F4BC 0280202D */ daddu $a0, $s4, $zero
/* 18DDA0 8025F4C0 0C05128B */ jal hud_element_clear_flags
/* 18DDA4 8025F4C4 24050002 */ addiu $a1, $zero, 0x2
/* 18DDA8 8025F4C8 0280202D */ daddu $a0, $s4, $zero
/* 18DDAC 8025F4CC 0220282D */ daddu $a1, $s1, $zero
/* 18DDB0 8025F4D0 0C05126B */ jal hud_element_get_render_pos
/* 18DDB4 8025F4D4 0200302D */ daddu $a2, $s0, $zero
/* 18DDB8 8025F4D8 0280202D */ daddu $a0, $s4, $zero
/* 18DDBC 8025F4DC 8FA50028 */ lw $a1, 0x28($sp)
/* 18DDC0 8025F4E0 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DDC4 8025F4E4 24A50002 */ addiu $a1, $a1, 0x2
/* 18DDC8 8025F4E8 0C051261 */ jal hud_element_set_render_pos
/* 18DDCC 8025F4EC 24C6002E */ addiu $a2, $a2, 0x2E
/* 18DDD0 8025F4F0 24020001 */ addiu $v0, $zero, 0x1
/* 18DDD4 8025F4F4 3C01802A */ lui $at, %hi(D_8029FB68)
/* 18DDD8 8025F4F8 AC22FB68 */ sw $v0, %lo(D_8029FB68)($at)
.L8025F4FC:
/* 18DDDC 8025F4FC 3C048029 */ lui $a0, %hi(HES_ProjectorBeam)
/* 18DDE0 8025F500 24842C28 */ addiu $a0, $a0, %lo(HES_ProjectorBeam)
/* 18DDE4 8025F504 0C050529 */ jal hud_element_create
/* 18DDE8 8025F508 00000000 */ nop
/* 18DDEC 8025F50C 0040A02D */ daddu $s4, $v0, $zero
/* 18DDF0 8025F510 3C01802A */ lui $at, %hi(D_8029FAE8)
/* 18DDF4 8025F514 AC34FAE8 */ sw $s4, %lo(D_8029FAE8)($at)
/* 18DDF8 8025F518 0C0513F6 */ jal hud_element_create_transform_B
/* 18DDFC 8025F51C 0280202D */ daddu $a0, $s4, $zero
/* 18DE00 8025F520 0280202D */ daddu $a0, $s4, $zero
/* 18DE04 8025F524 2405009C */ addiu $a1, $zero, 0x9C
/* 18DE08 8025F528 0C051261 */ jal hud_element_set_render_pos
/* 18DE0C 8025F52C 2406000D */ addiu $a2, $zero, 0xD
/* 18DE10 8025F530 0280202D */ daddu $a0, $s4, $zero
/* 18DE14 8025F534 240500FF */ addiu $a1, $zero, 0xFF
/* 18DE18 8025F538 00A0302D */ daddu $a2, $a1, $zero
/* 18DE1C 8025F53C 0C0513BF */ jal hud_element_set_tint
/* 18DE20 8025F540 00A0382D */ daddu $a3, $a1, $zero
/* 18DE24 8025F544 0280202D */ daddu $a0, $s4, $zero
/* 18DE28 8025F548 0000282D */ daddu $a1, $zero, $zero
/* 18DE2C 8025F54C 0C05149D */ jal hud_element_set_transform_rotation_pivot
/* 18DE30 8025F550 2406FFDD */ addiu $a2, $zero, -0x23
/* 18DE34 8025F554 44800000 */ mtc1 $zero, $f0
/* 18DE38 8025F558 0280202D */ daddu $a0, $s4, $zero
/* 18DE3C 8025F55C 44050000 */ mfc1 $a1, $f0
/* 18DE40 8025F560 3C074334 */ lui $a3, (0x43340000 >> 16)
/* 18DE44 8025F564 0C051489 */ jal hud_element_set_transform_rotation
/* 18DE48 8025F568 00A0302D */ daddu $a2, $a1, $zero
/* 18DE4C 8025F56C 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 18DE50 8025F570 44810000 */ mtc1 $at, $f0
/* 18DE54 8025F574 0280202D */ daddu $a0, $s4, $zero
/* 18DE58 8025F578 44050000 */ mfc1 $a1, $f0
/* 18DE5C 8025F57C 3C063FC0 */ lui $a2, (0x3FC00000 >> 16)
/* 18DE60 8025F580 0C051475 */ jal hud_element_set_transform_scale
/* 18DE64 8025F584 00A0382D */ daddu $a3, $a1, $zero
/* 18DE68 8025F588 0280202D */ daddu $a0, $s4, $zero
/* 18DE6C 8025F58C 0C0513AC */ jal hud_element_set_alpha
/* 18DE70 8025F590 240500C8 */ addiu $a1, $zero, 0xC8
/* 18DE74 8025F594 0280202D */ daddu $a0, $s4, $zero
/* 18DE78 8025F598 0C051280 */ jal hud_element_set_flags
/* 18DE7C 8025F59C 34058080 */ ori $a1, $zero, 0x8080
/* 18DE80 8025F5A0 3C04802B */ lui $a0, %hi(D_802AAA30_7B23D0)
/* 18DE84 8025F5A4 2484AA30 */ addiu $a0, $a0, %lo(D_802AAA30_7B23D0)
/* 18DE88 8025F5A8 0C050529 */ jal hud_element_create
/* 18DE8C 8025F5AC 00000000 */ nop
/* 18DE90 8025F5B0 0040A02D */ daddu $s4, $v0, $zero
/* 18DE94 8025F5B4 0280202D */ daddu $a0, $s4, $zero
/* 18DE98 8025F5B8 0000282D */ daddu $a1, $zero, $zero
/* 18DE9C 8025F5BC 3C01802A */ lui $at, %hi(LevelUpSelectTextID)
/* 18DEA0 8025F5C0 AC34FB48 */ sw $s4, %lo(LevelUpSelectTextID)($at)
/* 18DEA4 8025F5C4 0C051261 */ jal hud_element_set_render_pos
/* 18DEA8 8025F5C8 00A0302D */ daddu $a2, $a1, $zero
/* 18DEAC 8025F5CC 0280202D */ daddu $a0, $s4, $zero
/* 18DEB0 8025F5D0 0C051280 */ jal hud_element_set_flags
/* 18DEB4 8025F5D4 24050080 */ addiu $a1, $zero, 0x80
/* 18DEB8 8025F5D8 24020001 */ addiu $v0, $zero, 0x1
/* 18DEBC 8025F5DC A3C20048 */ sb $v0, 0x48($fp)
/* 18DEC0 8025F5E0 2402000A */ addiu $v0, $zero, 0xA
/* 18DEC4 8025F5E4 3C01802A */ lui $at, %hi(CelebrateSubstateTime)
/* 18DEC8 8025F5E8 AC22FB4C */ sw $v0, %lo(CelebrateSubstateTime)($at)
/* 18DECC 8025F5EC 08097FD0 */ j .L8025FF40
/* 18DED0 8025F5F0 24020007 */ addiu $v0, $zero, 0x7
glabel .L8025F5F4
/* 18DED4 8025F5F4 27A50028 */ addiu $a1, $sp, 0x28
/* 18DED8 8025F5F8 27A6002C */ addiu $a2, $sp, 0x2C
/* 18DEDC 8025F5FC 0000982D */ daddu $s3, $zero, $zero
/* 18DEE0 8025F600 3C14802A */ lui $s4, %hi(LevelUpStatEmblemIDs)
/* 18DEE4 8025F604 8E94FA80 */ lw $s4, %lo(LevelUpStatEmblemIDs)($s4)
/* 18DEE8 8025F608 3C10802A */ lui $s0, %hi(LevelUpStatTextIDs)
/* 18DEEC 8025F60C 2610FA90 */ addiu $s0, $s0, %lo(LevelUpStatTextIDs)
/* 18DEF0 8025F610 0C05126B */ jal hud_element_get_render_pos
/* 18DEF4 8025F614 0280202D */ daddu $a0, $s4, $zero
/* 18DEF8 8025F618 0280202D */ daddu $a0, $s4, $zero
/* 18DEFC 8025F61C 8FA50028 */ lw $a1, 0x28($sp)
/* 18DF00 8025F620 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DF04 8025F624 24A5FFEC */ addiu $a1, $a1, -0x14
/* 18DF08 8025F628 0C051261 */ jal hud_element_set_render_pos
/* 18DF0C 8025F62C AFA50028 */ sw $a1, 0x28($sp)
/* 18DF10 8025F630 27A50028 */ addiu $a1, $sp, 0x28
.L8025F634:
/* 18DF14 8025F634 27A6002C */ addiu $a2, $sp, 0x2C
/* 18DF18 8025F638 8E14001C */ lw $s4, 0x1C($s0)
/* 18DF1C 8025F63C 26100004 */ addiu $s0, $s0, 0x4
/* 18DF20 8025F640 26730001 */ addiu $s3, $s3, 0x1
/* 18DF24 8025F644 0C05126B */ jal hud_element_get_render_pos
/* 18DF28 8025F648 0280202D */ daddu $a0, $s4, $zero
/* 18DF2C 8025F64C 0280202D */ daddu $a0, $s4, $zero
/* 18DF30 8025F650 8FA50028 */ lw $a1, 0x28($sp)
/* 18DF34 8025F654 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DF38 8025F658 24A5FFEC */ addiu $a1, $a1, -0x14
/* 18DF3C 8025F65C 0C051261 */ jal hud_element_set_render_pos
/* 18DF40 8025F660 AFA50028 */ sw $a1, 0x28($sp)
/* 18DF44 8025F664 2A620007 */ slti $v0, $s3, 0x7
/* 18DF48 8025F668 1440FFF2 */ bnez $v0, .L8025F634
/* 18DF4C 8025F66C 27A50028 */ addiu $a1, $sp, 0x28
/* 18DF50 8025F670 27B10028 */ addiu $s1, $sp, 0x28
/* 18DF54 8025F674 0220282D */ daddu $a1, $s1, $zero
/* 18DF58 8025F678 27B2002C */ addiu $s2, $sp, 0x2C
/* 18DF5C 8025F67C 0240302D */ daddu $a2, $s2, $zero
/* 18DF60 8025F680 0000982D */ daddu $s3, $zero, $zero
/* 18DF64 8025F684 3C10802A */ lui $s0, %hi(LevelUpStatEmblemIDs)
/* 18DF68 8025F688 2610FA80 */ addiu $s0, $s0, %lo(LevelUpStatEmblemIDs)
/* 18DF6C 8025F68C 8E140004 */ lw $s4, 0x4($s0)
/* 18DF70 8025F690 3C15802A */ lui $s5, %hi(LevelUpStatTextIDs)
/* 18DF74 8025F694 26B5FA90 */ addiu $s5, $s5, %lo(LevelUpStatTextIDs)
/* 18DF78 8025F698 0C05126B */ jal hud_element_get_render_pos
/* 18DF7C 8025F69C 0280202D */ daddu $a0, $s4, $zero
/* 18DF80 8025F6A0 0280202D */ daddu $a0, $s4, $zero
/* 18DF84 8025F6A4 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DF88 8025F6A8 8FA50028 */ lw $a1, 0x28($sp)
/* 18DF8C 8025F6AC 24C6FFEC */ addiu $a2, $a2, -0x14
/* 18DF90 8025F6B0 0C051261 */ jal hud_element_set_render_pos
/* 18DF94 8025F6B4 AFA6002C */ sw $a2, 0x2C($sp)
/* 18DF98 8025F6B8 0220282D */ daddu $a1, $s1, $zero
/* 18DF9C 8025F6BC 8E14000C */ lw $s4, 0xC($s0)
/* 18DFA0 8025F6C0 0240302D */ daddu $a2, $s2, $zero
/* 18DFA4 8025F6C4 0C05126B */ jal hud_element_get_render_pos
/* 18DFA8 8025F6C8 0280202D */ daddu $a0, $s4, $zero
/* 18DFAC 8025F6CC 0280202D */ daddu $a0, $s4, $zero
/* 18DFB0 8025F6D0 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DFB4 8025F6D4 8FA50028 */ lw $a1, 0x28($sp)
/* 18DFB8 8025F6D8 24C6FFEC */ addiu $a2, $a2, -0x14
/* 18DFBC 8025F6DC 0C051261 */ jal hud_element_set_render_pos
/* 18DFC0 8025F6E0 AFA6002C */ sw $a2, 0x2C($sp)
/* 18DFC4 8025F6E4 27A50028 */ addiu $a1, $sp, 0x28
.L8025F6E8:
/* 18DFC8 8025F6E8 27A6002C */ addiu $a2, $sp, 0x2C
/* 18DFCC 8025F6EC 8EB40000 */ lw $s4, 0x0($s5)
/* 18DFD0 8025F6F0 26B50004 */ addiu $s5, $s5, 0x4
/* 18DFD4 8025F6F4 26730001 */ addiu $s3, $s3, 0x1
/* 18DFD8 8025F6F8 0C05126B */ jal hud_element_get_render_pos
/* 18DFDC 8025F6FC 0280202D */ daddu $a0, $s4, $zero
/* 18DFE0 8025F700 0280202D */ daddu $a0, $s4, $zero
/* 18DFE4 8025F704 8FA6002C */ lw $a2, 0x2C($sp)
/* 18DFE8 8025F708 8FA50028 */ lw $a1, 0x28($sp)
/* 18DFEC 8025F70C 24C6FFEC */ addiu $a2, $a2, -0x14
/* 18DFF0 8025F710 0C051261 */ jal hud_element_set_render_pos
/* 18DFF4 8025F714 AFA6002C */ sw $a2, 0x2C($sp)
/* 18DFF8 8025F718 2A620007 */ slti $v0, $s3, 0x7
/* 18DFFC 8025F71C 1440FFF2 */ bnez $v0, .L8025F6E8
/* 18E000 8025F720 27A50028 */ addiu $a1, $sp, 0x28
/* 18E004 8025F724 27A6002C */ addiu $a2, $sp, 0x2C
/* 18E008 8025F728 0000982D */ daddu $s3, $zero, $zero
/* 18E00C 8025F72C 3C14802A */ lui $s4, %hi(D_8029FA88)
/* 18E010 8025F730 8E94FA88 */ lw $s4, %lo(D_8029FA88)($s4)
/* 18E014 8025F734 3C10802A */ lui $s0, %hi(LevelUpStatTextIDs)
/* 18E018 8025F738 2610FA90 */ addiu $s0, $s0, %lo(LevelUpStatTextIDs)
/* 18E01C 8025F73C 0C05126B */ jal hud_element_get_render_pos
/* 18E020 8025F740 0280202D */ daddu $a0, $s4, $zero
/* 18E024 8025F744 0280202D */ daddu $a0, $s4, $zero
/* 18E028 8025F748 8FA50028 */ lw $a1, 0x28($sp)
/* 18E02C 8025F74C 8FA6002C */ lw $a2, 0x2C($sp)
/* 18E030 8025F750 24A50014 */ addiu $a1, $a1, 0x14
/* 18E034 8025F754 0C051261 */ jal hud_element_set_render_pos
/* 18E038 8025F758 AFA50028 */ sw $a1, 0x28($sp)
/* 18E03C 8025F75C 27A50028 */ addiu $a1, $sp, 0x28
.L8025F760:
/* 18E040 8025F760 27A6002C */ addiu $a2, $sp, 0x2C
/* 18E044 8025F764 8E140038 */ lw $s4, 0x38($s0)
/* 18E048 8025F768 26100004 */ addiu $s0, $s0, 0x4
/* 18E04C 8025F76C 26730001 */ addiu $s3, $s3, 0x1
/* 18E050 8025F770 0C05126B */ jal hud_element_get_render_pos
/* 18E054 8025F774 0280202D */ daddu $a0, $s4, $zero
/* 18E058 8025F778 0280202D */ daddu $a0, $s4, $zero
/* 18E05C 8025F77C 8FA50028 */ lw $a1, 0x28($sp)
/* 18E060 8025F780 8FA6002C */ lw $a2, 0x2C($sp)
/* 18E064 8025F784 24A50014 */ addiu $a1, $a1, 0x14
/* 18E068 8025F788 0C051261 */ jal hud_element_set_render_pos
/* 18E06C 8025F78C AFA50028 */ sw $a1, 0x28($sp)
/* 18E070 8025F790 2A620007 */ slti $v0, $s3, 0x7
/* 18E074 8025F794 1440FFF2 */ bnez $v0, .L8025F760
/* 18E078 8025F798 27A50028 */ addiu $a1, $sp, 0x28
/* 18E07C 8025F79C 3C03802A */ lui $v1, %hi(CelebrateSubstateTime)
/* 18E080 8025F7A0 2463FB4C */ addiu $v1, $v1, %lo(CelebrateSubstateTime)
/* 18E084 8025F7A4 8C620000 */ lw $v0, 0x0($v1)
/* 18E088 8025F7A8 2442FFFF */ addiu $v0, $v0, -0x1
/* 18E08C 8025F7AC 144001E6 */ bnez $v0, .L8025FF48
/* 18E090 8025F7B0 AC620000 */ sw $v0, 0x0($v1)
/* 18E094 8025F7B4 0280202D */ daddu $a0, $s4, $zero
/* 18E098 8025F7B8 24050080 */ addiu $a1, $zero, 0x80
/* 18E09C 8025F7BC 00A0302D */ daddu $a2, $a1, $zero
/* 18E0A0 8025F7C0 0C0513BF */ jal hud_element_set_tint
/* 18E0A4 8025F7C4 00A0382D */ daddu $a3, $a1, $zero
/* 18E0A8 8025F7C8 24040008 */ addiu $a0, $zero, 0x8
/* 18E0AC 8025F7CC 24050014 */ addiu $a1, $zero, 0x14
/* 18E0B0 8025F7D0 240600BA */ addiu $a2, $zero, 0xBA
/* 18E0B4 8025F7D4 24070118 */ addiu $a3, $zero, 0x118
/* 18E0B8 8025F7D8 00A0182D */ daddu $v1, $a1, $zero
/* 18E0BC 8025F7DC 00C0102D */ daddu $v0, $a2, $zero
/* 18E0C0 8025F7E0 AFA2002C */ sw $v0, 0x2C($sp)
/* 18E0C4 8025F7E4 24020020 */ addiu $v0, $zero, 0x20
/* 18E0C8 8025F7E8 AFA30028 */ sw $v1, 0x28($sp)
/* 18E0CC 8025F7EC AFA20010 */ sw $v0, 0x10($sp)
/* 18E0D0 8025F7F0 3C028026 */ lui $v0, %hi(func_80260948)
/* 18E0D4 8025F7F4 24420948 */ addiu $v0, $v0, %lo(func_80260948)
/* 18E0D8 8025F7F8 AFA20018 */ sw $v0, 0x18($sp)
/* 18E0DC 8025F7FC 2402FFFF */ addiu $v0, $zero, -0x1
/* 18E0E0 8025F800 AFA30014 */ sw $v1, 0x14($sp)
/* 18E0E4 8025F804 AFA0001C */ sw $zero, 0x1C($sp)
/* 18E0E8 8025F808 0C051F32 */ jal set_window_properties
/* 18E0EC 8025F80C AFA20020 */ sw $v0, 0x20($sp)
/* 18E0F0 8025F810 24040008 */ addiu $a0, $zero, 0x8
/* 18E0F4 8025F814 0C051F9F */ jal set_window_update
/* 18E0F8 8025F818 24050001 */ addiu $a1, $zero, 0x1
/* 18E0FC 8025F81C 08097FD0 */ j .L8025FF40
/* 18E100 8025F820 24020008 */ addiu $v0, $zero, 0x8
glabel .L8025F824
/* 18E104 8025F824 8FC20214 */ lw $v0, 0x214($fp)
/* 18E108 8025F828 30428000 */ andi $v0, $v0, 0x8000
/* 18E10C 8025F82C 10400012 */ beqz $v0, .L8025F878
/* 18E110 8025F830 00000000 */ nop
/* 18E114 8025F834 83C20048 */ lb $v0, 0x48($fp)
/* 18E118 8025F838 00021080 */ sll $v0, $v0, 2
/* 18E11C 8025F83C 3C01802A */ lui $at, %hi(CantLevelUpStat)
/* 18E120 8025F840 00220821 */ addu $at, $at, $v0
/* 18E124 8025F844 8C22FB60 */ lw $v0, %lo(CantLevelUpStat)($at)
/* 18E128 8025F848 14400007 */ bnez $v0, .L8025F868
/* 18E12C 8025F84C 00000000 */ nop
/* 18E130 8025F850 0C05272D */ jal sfx_play_sound
/* 18E134 8025F854 240400C9 */ addiu $a0, $zero, 0xC9
/* 18E138 8025F858 0C05272D */ jal sfx_play_sound
/* 18E13C 8025F85C 24040749 */ addiu $a0, $zero, 0x749
/* 18E140 8025F860 08097FD0 */ j .L8025FF40
/* 18E144 8025F864 24020009 */ addiu $v0, $zero, 0x9
.L8025F868:
/* 18E148 8025F868 0C05272D */ jal sfx_play_sound
/* 18E14C 8025F86C 2404021D */ addiu $a0, $zero, 0x21D
/* 18E150 8025F870 08097FD0 */ j .L8025FF40
/* 18E154 8025F874 2402000F */ addiu $v0, $zero, 0xF
.L8025F878:
/* 18E158 8025F878 93C20048 */ lbu $v0, 0x48($fp)
/* 18E15C 8025F87C 8FC30218 */ lw $v1, 0x218($fp)
/* 18E160 8025F880 00022600 */ sll $a0, $v0, 24
/* 18E164 8025F884 3C020004 */ lui $v0, (0x40000 >> 16)
/* 18E168 8025F888 00621024 */ and $v0, $v1, $v0
/* 18E16C 8025F88C 10400002 */ beqz $v0, .L8025F898
/* 18E170 8025F890 00048603 */ sra $s0, $a0, 24
/* 18E174 8025F894 2610FFFF */ addiu $s0, $s0, -0x1
.L8025F898:
/* 18E178 8025F898 3C020008 */ lui $v0, (0x80000 >> 16)
/* 18E17C 8025F89C 00621024 */ and $v0, $v1, $v0
/* 18E180 8025F8A0 54400001 */ bnel $v0, $zero, .L8025F8A8
/* 18E184 8025F8A4 26100001 */ addiu $s0, $s0, 0x1
.L8025F8A8:
/* 18E188 8025F8A8 06020001 */ bltzl $s0, .L8025F8B0
/* 18E18C 8025F8AC 0000802D */ daddu $s0, $zero, $zero
.L8025F8B0:
/* 18E190 8025F8B0 2A020003 */ slti $v0, $s0, 0x3
/* 18E194 8025F8B4 50400001 */ beql $v0, $zero, .L8025F8BC
/* 18E198 8025F8B8 24100002 */ addiu $s0, $zero, 0x2
.L8025F8BC:
/* 18E19C 8025F8BC 00041603 */ sra $v0, $a0, 24
/* 18E1A0 8025F8C0 12020004 */ beq $s0, $v0, .L8025F8D4
/* 18E1A4 8025F8C4 00000000 */ nop
/* 18E1A8 8025F8C8 0C05272D */ jal sfx_play_sound
/* 18E1AC 8025F8CC 240400C7 */ addiu $a0, $zero, 0xC7
/* 18E1B0 8025F8D0 A3D00048 */ sb $s0, 0x48($fp)
.L8025F8D4:
/* 18E1B4 8025F8D4 3C10802A */ lui $s0, %hi(CelebrateStateTime)
/* 18E1B8 8025F8D8 2610FB84 */ addiu $s0, $s0, %lo(CelebrateStateTime)
/* 18E1BC 8025F8DC 8E020000 */ lw $v0, 0x0($s0)
/* 18E1C0 8025F8E0 24420001 */ addiu $v0, $v0, 0x1
/* 18E1C4 8025F8E4 AE020000 */ sw $v0, 0x0($s0)
/* 18E1C8 8025F8E8 28420065 */ slti $v0, $v0, 0x65
/* 18E1CC 8025F8EC 14400196 */ bnez $v0, .L8025FF48
/* 18E1D0 8025F8F0 24020078 */ addiu $v0, $zero, 0x78
/* 18E1D4 8025F8F4 24040003 */ addiu $a0, $zero, 0x3
/* 18E1D8 8025F8F8 44800000 */ mtc1 $zero, $f0
/* 18E1DC 8025F8FC 3C0642C8 */ lui $a2, (0x42C80000 >> 16)
/* 18E1E0 8025F900 AFA20014 */ sw $v0, 0x14($sp)
/* 18E1E4 8025F904 44050000 */ mfc1 $a1, $f0
/* 18E1E8 8025F908 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 18E1EC 8025F90C 44810000 */ mtc1 $at, $f0
/* 18E1F0 8025F910 00A0382D */ daddu $a3, $a1, $zero
/* 18E1F4 8025F914 0C01C484 */ jal fx_confetti
/* 18E1F8 8025F918 E7A00010 */ swc1 $f0, 0x10($sp)
/* 18E1FC 8025F91C 08097FD2 */ j .L8025FF48
/* 18E200 8025F920 AE000000 */ sw $zero, 0x0($s0)
glabel .L8025F924
/* 18E204 8025F924 3C04802A */ lui $a0, %hi(D_8029FAE8)
/* 18E208 8025F928 8C84FAE8 */ lw $a0, %lo(D_8029FAE8)($a0)
/* 18E20C 8025F92C 0C05123D */ jal hud_element_free
/* 18E210 8025F930 00000000 */ nop
/* 18E214 8025F934 24040008 */ addiu $a0, $zero, 0x8
/* 18E218 8025F938 0C051F9F */ jal set_window_update
/* 18E21C 8025F93C 24050002 */ addiu $a1, $zero, 0x2
/* 18E220 8025F940 83C30048 */ lb $v1, 0x48($fp)
/* 18E224 8025F944 24020001 */ addiu $v0, $zero, 0x1
/* 18E228 8025F948 10620024 */ beq $v1, $v0, .L8025F9DC
/* 18E22C 8025F94C 28620002 */ slti $v0, $v1, 0x2
/* 18E230 8025F950 10400005 */ beqz $v0, .L8025F968
/* 18E234 8025F954 24020002 */ addiu $v0, $zero, 0x2
/* 18E238 8025F958 10600007 */ beqz $v1, .L8025F978
/* 18E23C 8025F95C 0000202D */ daddu $a0, $zero, $zero
/* 18E240 8025F960 08097E99 */ j .L8025FA64
/* 18E244 8025F964 0080282D */ daddu $a1, $a0, $zero
.L8025F968:
/* 18E248 8025F968 10620032 */ beq $v1, $v0, .L8025FA34
/* 18E24C 8025F96C 0000202D */ daddu $a0, $zero, $zero
/* 18E250 8025F970 08097E99 */ j .L8025FA64
/* 18E254 8025F974 0080282D */ daddu $a1, $a0, $zero
.L8025F978:
/* 18E258 8025F978 92A20004 */ lbu $v0, 0x4($s5)
/* 18E25C 8025F97C 92A30003 */ lbu $v1, 0x3($s5)
/* 18E260 8025F980 24420005 */ addiu $v0, $v0, 0x5
/* 18E264 8025F984 A2A20004 */ sb $v0, 0x4($s5)
/* 18E268 8025F988 92A20002 */ lbu $v0, 0x2($s5)
/* 18E26C 8025F98C 24630005 */ addiu $v1, $v1, 0x5
/* 18E270 8025F990 A2A30003 */ sb $v1, 0x3($s5)
/* 18E274 8025F994 82A30003 */ lb $v1, 0x3($s5)
/* 18E278 8025F998 24420005 */ addiu $v0, $v0, 0x5
/* 18E27C 8025F99C 2863004C */ slti $v1, $v1, 0x4C
/* 18E280 8025F9A0 14600003 */ bnez $v1, .L8025F9B0
/* 18E284 8025F9A4 A2A20002 */ sb $v0, 0x2($s5)
/* 18E288 8025F9A8 2402004B */ addiu $v0, $zero, 0x4B
/* 18E28C 8025F9AC A2A20003 */ sb $v0, 0x3($s5)
.L8025F9B0:
/* 18E290 8025F9B0 82A30002 */ lb $v1, 0x2($s5)
/* 18E294 8025F9B4 82A20003 */ lb $v0, 0x3($s5)
/* 18E298 8025F9B8 0043102A */ slt $v0, $v0, $v1
/* 18E29C 8025F9BC 92A30003 */ lbu $v1, 0x3($s5)
/* 18E2A0 8025F9C0 54400001 */ bnel $v0, $zero, .L8025F9C8
/* 18E2A4 8025F9C4 A2A30002 */ sb $v1, 0x2($s5)
.L8025F9C8:
/* 18E2A8 8025F9C8 92A20003 */ lbu $v0, 0x3($s5)
/* 18E2AC 8025F9CC A22201B9 */ sb $v0, 0x1B9($s1)
/* 18E2B0 8025F9D0 92A20002 */ lbu $v0, 0x2($s5)
/* 18E2B4 8025F9D4 08097E97 */ j .L8025FA5C
/* 18E2B8 8025F9D8 A22201B8 */ sb $v0, 0x1B8($s1)
.L8025F9DC:
/* 18E2BC 8025F9DC 92A20007 */ lbu $v0, 0x7($s5)
/* 18E2C0 8025F9E0 92A30006 */ lbu $v1, 0x6($s5)
/* 18E2C4 8025F9E4 24420005 */ addiu $v0, $v0, 0x5
/* 18E2C8 8025F9E8 A2A20007 */ sb $v0, 0x7($s5)
/* 18E2CC 8025F9EC 92A20005 */ lbu $v0, 0x5($s5)
/* 18E2D0 8025F9F0 24630005 */ addiu $v1, $v1, 0x5
/* 18E2D4 8025F9F4 A2A30006 */ sb $v1, 0x6($s5)
/* 18E2D8 8025F9F8 82A30006 */ lb $v1, 0x6($s5)
/* 18E2DC 8025F9FC 24420005 */ addiu $v0, $v0, 0x5
/* 18E2E0 8025FA00 2863004C */ slti $v1, $v1, 0x4C
/* 18E2E4 8025FA04 14600003 */ bnez $v1, .L8025FA14
/* 18E2E8 8025FA08 A2A20005 */ sb $v0, 0x5($s5)
/* 18E2EC 8025FA0C 2402004B */ addiu $v0, $zero, 0x4B
/* 18E2F0 8025FA10 A2A20006 */ sb $v0, 0x6($s5)
.L8025FA14:
/* 18E2F4 8025FA14 82A30005 */ lb $v1, 0x5($s5)
/* 18E2F8 8025FA18 82A20006 */ lb $v0, 0x6($s5)
/* 18E2FC 8025FA1C 0043102A */ slt $v0, $v0, $v1
/* 18E300 8025FA20 92A30006 */ lbu $v1, 0x6($s5)
/* 18E304 8025FA24 5440000D */ bnel $v0, $zero, .L8025FA5C
/* 18E308 8025FA28 A2A30005 */ sb $v1, 0x5($s5)
D_8025FA2C:
/* 18E30C 8025FA2C 08097E98 */ j .L8025FA60
/* 18E310 8025FA30 0000202D */ daddu $a0, $zero, $zero
.L8025FA34:
/* 18E314 8025FA34 92A20008 */ lbu $v0, 0x8($s5)
/* 18E318 8025FA38 24420003 */ addiu $v0, $v0, 0x3
/* 18E31C 8025FA3C A2A20008 */ sb $v0, 0x8($s5)
/* 18E320 8025FA40 00021600 */ sll $v0, $v0, 24
/* 18E324 8025FA44 00021603 */ sra $v0, $v0, 24
/* 18E328 8025FA48 2842001F */ slti $v0, $v0, 0x1F
/* 18E32C 8025FA4C 14400005 */ bnez $v0, .L8025FA64
D_8025FA50:
/* 18E330 8025FA50 0080282D */ daddu $a1, $a0, $zero
/* 18E334 8025FA54 2402001E */ addiu $v0, $zero, 0x1E
/* 18E338 8025FA58 A2A20008 */ sb $v0, 0x8($s5)
.L8025FA5C:
/* 18E33C 8025FA5C 0000202D */ daddu $a0, $zero, $zero
.L8025FA60:
/* 18E340 8025FA60 0080282D */ daddu $a1, $a0, $zero
.L8025FA64:
/* 18E344 8025FA64 3C060003 */ lui $a2, (0x30009 >> 16)
/* 18E348 8025FA68 0C098F3F */ jal set_animation
/* 18E34C 8025FA6C 34C60009 */ ori $a2, $a2, (0x30009 & 0xFFFF)
/* 18E350 8025FA70 1240000A */ beqz $s2, .L8025FA9C
/* 18E354 8025FA74 2405000A */ addiu $a1, $zero, 0xA
/* 18E358 8025FA78 8E4401C4 */ lw $a0, 0x1C4($s2)
D_8025FA7C:
/* 18E35C 8025FA7C 0C0B0CF8 */ jal start_script
/* 18E360 8025FA80 0000302D */ daddu $a2, $zero, $zero
/* 18E364 8025FA84 0040282D */ daddu $a1, $v0, $zero
/* 18E368 8025FA88 AE4501D4 */ sw $a1, 0x1D4($s2)
/* 18E36C 8025FA8C 8CA20144 */ lw $v0, 0x144($a1)
/* 18E370 8025FA90 AE4201E4 */ sw $v0, 0x1E4($s2)
/* 18E374 8025FA94 24020100 */ addiu $v0, $zero, 0x100
/* 18E378 8025FA98 ACA20148 */ sw $v0, 0x148($a1)
.L8025FA9C:
/* 18E37C 8025FA9C 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4)
/* 18E380 8025FAA0 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0)
/* 18E384 8025FAA4 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 18E388 8025FAA8 00431024 */ and $v0, $v0, $v1
/* 18E38C 8025FAAC 14400007 */ bnez $v0, .L8025FACC
/* 18E390 8025FAB0 24020008 */ addiu $v0, $zero, 0x8
/* 18E394 8025FAB4 AFA20010 */ sw $v0, 0x10($sp)
/* 18E398 8025FAB8 0000202D */ daddu $a0, $zero, $zero
/* 18E39C 8025FABC 2405FFFF */ addiu $a1, $zero, -0x1
/* 18E3A0 8025FAC0 0080302D */ daddu $a2, $a0, $zero
/* 18E3A4 8025FAC4 0C052A46 */ jal bgm_set_song
/* 18E3A8 8025FAC8 240707D0 */ addiu $a3, $zero, 0x7D0
.L8025FACC:
/* 18E3AC 8025FACC 3C018028 */ lui $at, %hi(D_80284150)
/* 18E3B0 8025FAD0 AC204150 */ sw $zero, %lo(D_80284150)($at)
D_8025FAD4:
/* 18E3B4 8025FAD4 08097FD0 */ j .L8025FF40
/* 18E3B8 8025FAD8 2402000A */ addiu $v0, $zero, 0xA
glabel .L8025FADC
/* 18E3BC 8025FADC 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 18E3C0 8025FAE0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 18E3C4 8025FAE4 94420134 */ lhu $v0, 0x134($v0)
/* 18E3C8 8025FAE8 30420001 */ andi $v0, $v0, 0x1
/* 18E3CC 8025FAEC 10400020 */ beqz $v0, .L8025FB70
/* 18E3D0 8025FAF0 24020001 */ addiu $v0, $zero, 0x1
/* 18E3D4 8025FAF4 83C30048 */ lb $v1, 0x48($fp)
/* 18E3D8 8025FAF8 1062000F */ beq $v1, $v0, .L8025FB38
/* 18E3DC 8025FAFC 28620002 */ slti $v0, $v1, 0x2
D_8025FB00:
/* 18E3E0 8025FB00 10400005 */ beqz $v0, .L8025FB18
/* 18E3E4 8025FB04 24020002 */ addiu $v0, $zero, 0x2
/* 18E3E8 8025FB08 10600007 */ beqz $v1, .L8025FB28
/* 18E3EC 8025FB0C 00000000 */ nop
/* 18E3F0 8025FB10 08097EF9 */ j .L8025FBE4
/* 18E3F4 8025FB14 00000000 */ nop
.L8025FB18:
/* 18E3F8 8025FB18 1062000F */ beq $v1, $v0, .L8025FB58
/* 18E3FC 8025FB1C 00000000 */ nop
/* 18E400 8025FB20 08097EF9 */ j .L8025FBE4
/* 18E404 8025FB24 00000000 */ nop
.L8025FB28:
/* 18E408 8025FB28 3C04802A */ lui $a0, %hi(LevelUpStatEmblemIDs)
D_8025FB2C:
/* 18E40C 8025FB2C 8C84FA80 */ lw $a0, %lo(LevelUpStatEmblemIDs)($a0)
/* 18E410 8025FB30 08097ED8 */ j .L8025FB60
/* 18E414 8025FB34 00000000 */ nop
.L8025FB38:
/* 18E418 8025FB38 3C10802A */ lui $s0, %hi(LevelUpStatEmblemIDs)
/* 18E41C 8025FB3C 2610FA80 */ addiu $s0, $s0, %lo(LevelUpStatEmblemIDs)
/* 18E420 8025FB40 8E040004 */ lw $a0, 0x4($s0)
/* 18E424 8025FB44 0C051280 */ jal hud_element_set_flags
/* 18E428 8025FB48 24050002 */ addiu $a1, $zero, 0x2
/* 18E42C 8025FB4C 8E04000C */ lw $a0, 0xC($s0)
/* 18E430 8025FB50 08097ED8 */ j .L8025FB60
/* 18E434 8025FB54 00000000 */ nop
.L8025FB58:
/* 18E438 8025FB58 3C04802A */ lui $a0, %hi(D_8029FA88)
/* 18E43C 8025FB5C 8C84FA88 */ lw $a0, %lo(D_8029FA88)($a0)
.L8025FB60:
/* 18E440 8025FB60 0C051280 */ jal hud_element_set_flags
/* 18E444 8025FB64 24050002 */ addiu $a1, $zero, 0x2
/* 18E448 8025FB68 08097EF9 */ j .L8025FBE4
/* 18E44C 8025FB6C 00000000 */ nop
.L8025FB70:
/* 18E450 8025FB70 83C30048 */ lb $v1, 0x48($fp)
/* 18E454 8025FB74 1062000F */ beq $v1, $v0, .L8025FBB4
/* 18E458 8025FB78 28620002 */ slti $v0, $v1, 0x2
/* 18E45C 8025FB7C 10400005 */ beqz $v0, .L8025FB94
/* 18E460 8025FB80 24020002 */ addiu $v0, $zero, 0x2
D_8025FB84:
/* 18E464 8025FB84 10600007 */ beqz $v1, .L8025FBA4
/* 18E468 8025FB88 00000000 */ nop
/* 18E46C 8025FB8C 08097EF9 */ j .L8025FBE4
/* 18E470 8025FB90 00000000 */ nop
.L8025FB94:
/* 18E474 8025FB94 1062000F */ beq $v1, $v0, .L8025FBD4
/* 18E478 8025FB98 00000000 */ nop
/* 18E47C 8025FB9C 08097EF9 */ j .L8025FBE4
/* 18E480 8025FBA0 00000000 */ nop
.L8025FBA4:
/* 18E484 8025FBA4 3C04802A */ lui $a0, %hi(LevelUpStatEmblemIDs)
/* 18E488 8025FBA8 8C84FA80 */ lw $a0, %lo(LevelUpStatEmblemIDs)($a0)
/* 18E48C 8025FBAC 08097EF7 */ j .L8025FBDC
D_8025FBB0:
/* 18E490 8025FBB0 00000000 */ nop
.L8025FBB4:
/* 18E494 8025FBB4 3C10802A */ lui $s0, %hi(LevelUpStatEmblemIDs)
/* 18E498 8025FBB8 2610FA80 */ addiu $s0, $s0, %lo(LevelUpStatEmblemIDs)
/* 18E49C 8025FBBC 8E040004 */ lw $a0, 0x4($s0)
/* 18E4A0 8025FBC0 0C05128B */ jal hud_element_clear_flags
/* 18E4A4 8025FBC4 24050002 */ addiu $a1, $zero, 0x2
/* 18E4A8 8025FBC8 8E04000C */ lw $a0, 0xC($s0)
/* 18E4AC 8025FBCC 08097EF7 */ j .L8025FBDC
/* 18E4B0 8025FBD0 00000000 */ nop
.L8025FBD4:
/* 18E4B4 8025FBD4 3C04802A */ lui $a0, %hi(D_8029FA88)
/* 18E4B8 8025FBD8 8C84FA88 */ lw $a0, %lo(D_8029FA88)($a0)
.L8025FBDC:
/* 18E4BC 8025FBDC 0C05128B */ jal hud_element_clear_flags
/* 18E4C0 8025FBE0 24050002 */ addiu $a1, $zero, 0x2
.L8025FBE4:
/* 18E4C4 8025FBE4 3C038028 */ lui $v1, %hi(D_80284150)
/* 18E4C8 8025FBE8 24634150 */ addiu $v1, $v1, %lo(D_80284150)
/* 18E4CC 8025FBEC 8C620000 */ lw $v0, 0x0($v1)
/* 18E4D0 8025FBF0 240400FF */ addiu $a0, $zero, 0xFF
/* 18E4D4 8025FBF4 144400BB */ bne $v0, $a0, .L8025FEE4
/* 18E4D8 8025FBF8 2442000A */ addiu $v0, $v0, 0xA
/* 18E4DC 8025FBFC 08097FD0 */ j .L8025FF40
/* 18E4E0 8025FC00 2402000B */ addiu $v0, $zero, 0xB
glabel .L8025FC04
/* 18E4E4 8025FC04 3C10802A */ lui $s0, %hi(LevelUpStatEmblemIDs)
/* 18E4E8 8025FC08 2610FA80 */ addiu $s0, $s0, %lo(LevelUpStatEmblemIDs)
D_8025FC0C:
/* 18E4EC 8025FC0C 8E040000 */ lw $a0, 0x0($s0)
/* 18E4F0 8025FC10 0C05123D */ jal hud_element_free
/* 18E4F4 8025FC14 0000982D */ daddu $s3, $zero, $zero
/* 18E4F8 8025FC18 8E040004 */ lw $a0, 0x4($s0)
/* 18E4FC 8025FC1C 0C05123D */ jal hud_element_free
/* 18E500 8025FC20 0260902D */ daddu $s2, $s3, $zero
/* 18E504 8025FC24 8E04000C */ lw $a0, 0xC($s0)
/* 18E508 8025FC28 3C14802A */ lui $s4, %hi(LevelUpStatTextIDs)
/* 18E50C 8025FC2C 2694FA90 */ addiu $s4, $s4, %lo(LevelUpStatTextIDs)
D_8025FC30:
/* 18E510 8025FC30 0C05123D */ jal hud_element_free
/* 18E514 8025FC34 00000000 */ nop
/* 18E518 8025FC38 0C05123D */ jal hud_element_free
/* 18E51C 8025FC3C 8E040008 */ lw $a0, 0x8($s0)
.L8025FC40:
/* 18E520 8025FC40 0000882D */ daddu $s1, $zero, $zero
/* 18E524 8025FC44 0240802D */ daddu $s0, $s2, $zero
/* 18E528 8025FC48 02141021 */ addu $v0, $s0, $s4
.L8025FC4C:
/* 18E52C 8025FC4C 8C440000 */ lw $a0, 0x0($v0)
/* 18E530 8025FC50 26100004 */ addiu $s0, $s0, 0x4
/* 18E534 8025FC54 0C05123D */ jal hud_element_free
/* 18E538 8025FC58 26310001 */ addiu $s1, $s1, 0x1
/* 18E53C 8025FC5C 2A220007 */ slti $v0, $s1, 0x7
D_8025FC60:
/* 18E540 8025FC60 1440FFFA */ bnez $v0, .L8025FC4C
/* 18E544 8025FC64 02141021 */ addu $v0, $s0, $s4
/* 18E548 8025FC68 26730001 */ addiu $s3, $s3, 0x1
/* 18E54C 8025FC6C 2A620003 */ slti $v0, $s3, 0x3
/* 18E550 8025FC70 1440FFF3 */ bnez $v0, .L8025FC40
/* 18E554 8025FC74 2652001C */ addiu $s2, $s2, 0x1C
/* 18E558 8025FC78 3C04802A */ lui $a0, %hi(LevelUpSelectTextID)
/* 18E55C 8025FC7C 8C84FB48 */ lw $a0, %lo(LevelUpSelectTextID)($a0)
/* 18E560 8025FC80 0C05123D */ jal hud_element_free
D_8025FC84:
/* 18E564 8025FC84 00000000 */ nop
/* 18E568 8025FC88 0000202D */ daddu $a0, $zero, $zero
/* 18E56C 8025FC8C 0080282D */ daddu $a1, $a0, $zero
/* 18E570 8025FC90 0080302D */ daddu $a2, $a0, $zero
/* 18E574 8025FC94 0C046F97 */ jal set_background_color_blend
/* 18E578 8025FC98 0080382D */ daddu $a3, $a0, $zero
/* 18E57C 8025FC9C 08097FCD */ j .L8025FF34
/* 18E580 8025FCA0 00000000 */ nop
glabel .L8025FCA4
/* 18E584 8025FCA4 3C04001D */ lui $a0, (0x1D00AB >> 16)
/* 18E588 8025FCA8 348400AB */ ori $a0, $a0, (0x1D00AB & 0xFFFF)
/* 18E58C 8025FCAC 0C04991D */ jal get_msg_width
/* 18E590 8025FCB0 0000282D */ daddu $a1, $zero, $zero
D_8025FCB4:
/* 18E594 8025FCB4 24040009 */ addiu $a0, $zero, 0x9
/* 18E598 8025FCB8 2447001F */ addiu $a3, $v0, 0x1F
/* 18E59C 8025FCBC 000717C2 */ srl $v0, $a3, 31
/* 18E5A0 8025FCC0 00E21021 */ addu $v0, $a3, $v0
/* 18E5A4 8025FCC4 00021043 */ sra $v0, $v0, 1
/* 18E5A8 8025FCC8 240500A0 */ addiu $a1, $zero, 0xA0
/* 18E5AC 8025FCCC 00A22823 */ subu $a1, $a1, $v0
/* 18E5B0 8025FCD0 24060050 */ addiu $a2, $zero, 0x50
/* 18E5B4 8025FCD4 00C0102D */ daddu $v0, $a2, $zero
D_8025FCD8:
/* 18E5B8 8025FCD8 AFA2002C */ sw $v0, 0x2C($sp)
/* 18E5BC 8025FCDC 2402001C */ addiu $v0, $zero, 0x1C
/* 18E5C0 8025FCE0 AFA50028 */ sw $a1, 0x28($sp)
/* 18E5C4 8025FCE4 AFA20010 */ sw $v0, 0x10($sp)
/* 18E5C8 8025FCE8 2402000A */ addiu $v0, $zero, 0xA
/* 18E5CC 8025FCEC AFA20014 */ sw $v0, 0x14($sp)
/* 18E5D0 8025FCF0 3C028026 */ lui $v0, %hi(func_80260A20)
/* 18E5D4 8025FCF4 24420A20 */ addiu $v0, $v0, %lo(func_80260A20)
/* 18E5D8 8025FCF8 AFA20018 */ sw $v0, 0x18($sp)
/* 18E5DC 8025FCFC 2402FFFF */ addiu $v0, $zero, -0x1
/* 18E5E0 8025FD00 AFA0001C */ sw $zero, 0x1C($sp)
/* 18E5E4 8025FD04 0C051F32 */ jal set_window_properties
D_8025FD08:
/* 18E5E8 8025FD08 AFA20020 */ sw $v0, 0x20($sp)
/* 18E5EC 8025FD0C 24040009 */ addiu $a0, $zero, 0x9
/* 18E5F0 8025FD10 0C051F9F */ jal set_window_update
/* 18E5F4 8025FD14 24050001 */ addiu $a1, $zero, 0x1
/* 18E5F8 8025FD18 2402003C */ addiu $v0, $zero, 0x3C
/* 18E5FC 8025FD1C 3C01802A */ lui $at, %hi(CelebrateSubstateTime)
/* 18E600 8025FD20 AC22FB4C */ sw $v0, %lo(CelebrateSubstateTime)($at)
/* 18E604 8025FD24 08097FD0 */ j .L8025FF40
/* 18E608 8025FD28 24020010 */ addiu $v0, $zero, 0x10
glabel .L8025FD2C
/* 18E60C 8025FD2C 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 18E610 8025FD30 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 18E614 8025FD34 8C420010 */ lw $v0, 0x10($v0)
/* 18E618 8025FD38 3042C000 */ andi $v0, $v0, 0xC000
/* 18E61C 8025FD3C 10400003 */ beqz $v0, .L8025FD4C
/* 18E620 8025FD40 00000000 */ nop
/* 18E624 8025FD44 3C01802A */ lui $at, %hi(CelebrateSubstateTime)
/* 18E628 8025FD48 AC20FB4C */ sw $zero, %lo(CelebrateSubstateTime)($at)
.L8025FD4C:
/* 18E62C 8025FD4C 3C03802A */ lui $v1, %hi(CelebrateSubstateTime)
/* 18E630 8025FD50 2463FB4C */ addiu $v1, $v1, %lo(CelebrateSubstateTime)
/* 18E634 8025FD54 8C620000 */ lw $v0, 0x0($v1)
/* 18E638 8025FD58 10400003 */ beqz $v0, .L8025FD68
D_8025FD5C:
/* 18E63C 8025FD5C 2442FFFF */ addiu $v0, $v0, -0x1
.L8025FD60:
/* 18E640 8025FD60 08097FD2 */ j .L8025FF48
/* 18E644 8025FD64 AC620000 */ sw $v0, 0x0($v1)
.L8025FD68:
/* 18E648 8025FD68 24040009 */ addiu $a0, $zero, 0x9
/* 18E64C 8025FD6C 0C051F9F */ jal set_window_update
/* 18E650 8025FD70 24050002 */ addiu $a1, $zero, 0x2
/* 18E654 8025FD74 08097FD0 */ j .L8025FF40
/* 18E658 8025FD78 24020008 */ addiu $v0, $zero, 0x8
glabel .L8025FD7C
/* 18E65C 8025FD7C 8FC20214 */ lw $v0, 0x214($fp)
D_8025FD80:
/* 18E660 8025FD80 3042C000 */ andi $v0, $v0, 0xC000
/* 18E664 8025FD84 10400003 */ beqz $v0, .L8025FD94
/* 18E668 8025FD88 24020063 */ addiu $v0, $zero, 0x63
/* 18E66C 8025FD8C 3C01802A */ lui $at, %hi(CelebrateStateTime)
/* 18E670 8025FD90 AC22FB84 */ sw $v0, %lo(CelebrateStateTime)($at)
.L8025FD94:
/* 18E674 8025FD94 3C02802A */ lui $v0, %hi(CelebrateStateTime)
/* 18E678 8025FD98 8C42FB84 */ lw $v0, %lo(CelebrateStateTime)($v0)
/* 18E67C 8025FD9C 28420063 */ slti $v0, $v0, 0x63
/* 18E680 8025FDA0 14400069 */ bnez $v0, .L8025FF48
/* 18E684 8025FDA4 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 18E688 8025FDA8 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4)
/* 18E68C 8025FDAC 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0)
D_8025FDB0:
/* 18E690 8025FDB0 00431024 */ and $v0, $v0, $v1
/* 18E694 8025FDB4 14400009 */ bnez $v0, .L8025FDDC
/* 18E698 8025FDB8 24040001 */ addiu $a0, $zero, 0x1
/* 18E69C 8025FDBC 24020008 */ addiu $v0, $zero, 0x8
/* 18E6A0 8025FDC0 AFA20010 */ sw $v0, 0x10($sp)
/* 18E6A4 8025FDC4 0000202D */ daddu $a0, $zero, $zero
/* 18E6A8 8025FDC8 2405FFFF */ addiu $a1, $zero, -0x1
/* 18E6AC 8025FDCC 0080302D */ daddu $a2, $a0, $zero
/* 18E6B0 8025FDD0 0C052A46 */ jal bgm_set_song
/* 18E6B4 8025FDD4 240705DC */ addiu $a3, $zero, 0x5DC
/* 18E6B8 8025FDD8 24040001 */ addiu $a0, $zero, 0x1
.L8025FDDC:
/* 18E6BC 8025FDDC 2405010E */ addiu $a1, $zero, 0x10E
/* 18E6C0 8025FDE0 24060064 */ addiu $a2, $zero, 0x64
/* 18E6C4 8025FDE4 24070008 */ addiu $a3, $zero, 0x8
/* 18E6C8 8025FDE8 24022400 */ addiu $v0, $zero, 0x2400
/* 18E6CC 8025FDEC AFA20014 */ sw $v0, 0x14($sp)
/* 18E6D0 8025FDF0 00C0102D */ daddu $v0, $a2, $zero
/* 18E6D4 8025FDF4 3C018028 */ lui $at, %hi(D_80284150)
/* 18E6D8 8025FDF8 AC204150 */ sw $zero, %lo(D_80284150)($at)
/* 18E6DC 8025FDFC AFA00010 */ sw $zero, 0x10($sp)
/* 18E6E0 8025FE00 AFA00018 */ sw $zero, 0x18($sp)
D_8025FE04:
/* 18E6E4 8025FE04 0C093921 */ jal func_8024E484
/* 18E6E8 8025FE08 AFA2001C */ sw $v0, 0x1C($sp)
/* 18E6EC 8025FE0C 0000202D */ daddu $a0, $zero, $zero
/* 18E6F0 8025FE10 0080282D */ daddu $a1, $a0, $zero
/* 18E6F4 8025FE14 3C060003 */ lui $a2, (0x30009 >> 16)
/* 18E6F8 8025FE18 0C098F3F */ jal set_animation
/* 18E6FC 8025FE1C 34C60009 */ ori $a2, $a2, (0x30009 & 0xFFFF)
/* 18E700 8025FE20 12400008 */ beqz $s2, .L8025FE44
/* 18E704 8025FE24 24040100 */ addiu $a0, $zero, 0x100
/* 18E708 8025FE28 82A20012 */ lb $v0, 0x12($s5)
/* 18E70C 8025FE2C 00021080 */ sll $v0, $v0, 2
/* 18E710 8025FE30 3C068028 */ lui $a2, %hi(D_80284154)
D_8025FE34:
/* 18E714 8025FE34 00C23021 */ addu $a2, $a2, $v0
/* 18E718 8025FE38 8CC64154 */ lw $a2, %lo(D_80284154)($a2)
/* 18E71C 8025FE3C 0C098F3F */ jal set_animation
/* 18E720 8025FE40 0000282D */ daddu $a1, $zero, $zero
.L8025FE44:
/* 18E724 8025FE44 24020006 */ addiu $v0, $zero, 0x6
/* 18E728 8025FE48 3C01802A */ lui $at, %hi(CelebrateSubstateTime)
/* 18E72C 8025FE4C AC22FB4C */ sw $v0, %lo(CelebrateSubstateTime)($at)
/* 18E730 8025FE50 08097FD0 */ j .L8025FF40
/* 18E734 8025FE54 24020015 */ addiu $v0, $zero, 0x15
glabel .L8025FE58
/* 18E738 8025FE58 3C03802A */ lui $v1, %hi(CelebrateSubstateTime)
/* 18E73C 8025FE5C 2463FB4C */ addiu $v1, $v1, %lo(CelebrateSubstateTime)
/* 18E740 8025FE60 8C620000 */ lw $v0, 0x0($v1)
/* 18E744 8025FE64 1040000A */ beqz $v0, .L8025FE90
/* 18E748 8025FE68 2442FFFF */ addiu $v0, $v0, -0x1
/* 18E74C 8025FE6C 14400015 */ bnez $v0, .L8025FEC4
/* 18E750 8025FE70 AC620000 */ sw $v0, 0x0($v1)
/* 18E754 8025FE74 0000202D */ daddu $a0, $zero, $zero
/* 18E758 8025FE78 0080282D */ daddu $a1, $a0, $zero
/* 18E75C 8025FE7C 3C060001 */ lui $a2, (0x10004 >> 16)
/* 18E760 8025FE80 0C098F3F */ jal set_animation
/* 18E764 8025FE84 34C60004 */ ori $a2, $a2, (0x10004 & 0xFFFF)
/* 18E768 8025FE88 08097FB1 */ j .L8025FEC4
/* 18E76C 8025FE8C 00000000 */ nop
.L8025FE90:
/* 18E770 8025FE90 12400002 */ beqz $s2, .L8025FE9C
/* 18E774 8025FE94 AE20018C */ sw $zero, 0x18C($s1)
/* 18E778 8025FE98 AE40018C */ sw $zero, 0x18C($s2)
.L8025FE9C:
/* 18E77C 8025FE9C C6200144 */ lwc1 $f0, 0x144($s1)
/* 18E780 8025FEA0 3C014080 */ lui $at, (0x40800000 >> 16)
D_8025FEA4:
/* 18E784 8025FEA4 44811000 */ mtc1 $at, $f2
/* 18E788 8025FEA8 00000000 */ nop
/* 18E78C 8025FEAC 46020000 */ add.s $f0, $f0, $f2
/* 18E790 8025FEB0 12400004 */ beqz $s2, .L8025FEC4
/* 18E794 8025FEB4 E6200144 */ swc1 $f0, 0x144($s1)
/* 18E798 8025FEB8 C6400144 */ lwc1 $f0, 0x144($s2)
/* 18E79C 8025FEBC 46020000 */ add.s $f0, $f0, $f2
/* 18E7A0 8025FEC0 E6400144 */ swc1 $f0, 0x144($s2)
.L8025FEC4:
/* 18E7A4 8025FEC4 3C038028 */ lui $v1, %hi(D_80284150)
/* 18E7A8 8025FEC8 24634150 */ addiu $v1, $v1, %lo(D_80284150)
/* 18E7AC 8025FECC 8C620000 */ lw $v0, 0x0($v1)
/* 18E7B0 8025FED0 240400FF */ addiu $a0, $zero, 0xFF
D_8025FED4:
/* 18E7B4 8025FED4 14440003 */ bne $v0, $a0, .L8025FEE4
/* 18E7B8 8025FED8 24420014 */ addiu $v0, $v0, 0x14
/* 18E7BC 8025FEDC 08097FD0 */ j .L8025FF40
/* 18E7C0 8025FEE0 24020016 */ addiu $v0, $zero, 0x16
.L8025FEE4:
/* 18E7C4 8025FEE4 AC620000 */ sw $v0, 0x0($v1)
/* 18E7C8 8025FEE8 28420100 */ slti $v0, $v0, 0x100
/* 18E7CC 8025FEEC 50400016 */ beql $v0, $zero, .L8025FF48
/* 18E7D0 8025FEF0 AC640000 */ sw $a0, 0x0($v1)
/* 18E7D4 8025FEF4 08097FD2 */ j .L8025FF48
D_8025FEF8:
/* 18E7D8 8025FEF8 00000000 */ nop
glabel .L8025FEFC
/* 18E7DC 8025FEFC 0C0B1059 */ jal does_script_exist
/* 18E7E0 8025FF00 8E2401E4 */ lw $a0, 0x1E4($s1)
/* 18E7E4 8025FF04 10400003 */ beqz $v0, .L8025FF14
/* 18E7E8 8025FF08 00000000 */ nop
/* 18E7EC 8025FF0C 0C0B102B */ jal kill_script_by_ID
/* 18E7F0 8025FF10 8E2401E4 */ lw $a0, 0x1E4($s1)
.L8025FF14:
/* 18E7F4 8025FF14 12400007 */ beqz $s2, .L8025FF34
/* 18E7F8 8025FF18 00000000 */ nop
/* 18E7FC 8025FF1C 0C0B1059 */ jal does_script_exist
/* 18E800 8025FF20 8E4401E4 */ lw $a0, 0x1E4($s2)
/* 18E804 8025FF24 10400003 */ beqz $v0, .L8025FF34
D_8025FF28:
/* 18E808 8025FF28 00000000 */ nop
/* 18E80C 8025FF2C 0C0B102B */ jal kill_script_by_ID
/* 18E810 8025FF30 8E4401E4 */ lw $a0, 0x1E4($s2)
.L8025FF34:
/* 18E814 8025FF34 0C090464 */ jal func_80241190
/* 18E818 8025FF38 24040020 */ addiu $a0, $zero, 0x20
/* 18E81C 8025FF3C 24020002 */ addiu $v0, $zero, 0x2
.L8025FF40:
/* 18E820 8025FF40 3C01800E */ lui $at, %hi(gBattleSubState)
/* 18E824 8025FF44 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
glabel .L8025FF48
/* 18E828 8025FF48 3C03802A */ lui $v1, %hi(CelebrateStateTime)
D_8025FF4C:
/* 18E82C 8025FF4C 2463FB84 */ addiu $v1, $v1, %lo(CelebrateStateTime)
/* 18E830 8025FF50 8C620000 */ lw $v0, 0x0($v1)
/* 18E834 8025FF54 24420001 */ addiu $v0, $v0, 0x1
/* 18E838 8025FF58 AC620000 */ sw $v0, 0x0($v1)
/* 18E83C 8025FF5C 8FBF0064 */ lw $ra, 0x64($sp)
/* 18E840 8025FF60 8FBE0060 */ lw $fp, 0x60($sp)
/* 18E844 8025FF64 8FB7005C */ lw $s7, 0x5C($sp)
/* 18E848 8025FF68 8FB60058 */ lw $s6, 0x58($sp)
/* 18E84C 8025FF6C 8FB50054 */ lw $s5, 0x54($sp)
/* 18E850 8025FF70 8FB40050 */ lw $s4, 0x50($sp)
/* 18E854 8025FF74 8FB3004C */ lw $s3, 0x4C($sp)
/* 18E858 8025FF78 8FB20048 */ lw $s2, 0x48($sp)
D_8025FF7C:
/* 18E85C 8025FF7C 8FB10044 */ lw $s1, 0x44($sp)
/* 18E860 8025FF80 8FB00040 */ lw $s0, 0x40($sp)
/* 18E864 8025FF84 03E00008 */ jr $ra
/* 18E868 8025FF88 27BD0068 */ addiu $sp, $sp, 0x68
### DECOMPILED C INSTRUCTIONS:
void btl_state_update_celebration(void) {
BattleStatus* battleStatus = &gBattleStatus;
PlayerData* playerData = &gPlayerData;
Actor* player = battleStatus->playerActor;
Actor* partner = battleStatus->partnerActor;
s8 currentSubmenu;
s32 newSubmenu;
s32 id;
s32 x, y, z;
s32 width;
s32 itemHudElemID;
Evt* takeTurnScript;
Evt* script;
s32 tensDigit;
s32 onesDigit;
s32 deltaSP;
s32 prevSP;
s32 i;
s32 j;
HudScript* new_var;
switch (gBattleSubState) {
case BTL_SUBSTATE_CELEBRATE_INIT:
if (battleStatus->pendingStarPoints <= 0) {
player->flags &= ~ACTOR_FLAG_8000000;
EndBattleRewardTotal = battleStatus->totalStarPoints * 100;
pendingLevelUps = 0;
D_8029FB50 = 0;
bFadeToBlackAmt = 0;
LevelUpSelectTextOffsetX = 0;
LevelUpSelectTextVelX = 0;
sfx_play_sound(SOUND_D4);
prevSP = playerData->starPoints + battleStatus->totalStarPoints;
if (prevSP > 99) {
bgm_set_song(0, SONG_LEVEL_UP, 0, 250, 8);
} else {
bgm_set_song(0, SONG_BATTLE_END, 0, 250, 8);
}
CelebrateStateTime = 0;
btl_cam_use_preset(BTL_CAM_VICTORY);
EndBattleRewardStep = 0;
CelebrateSubstateTime = 1;
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LOAD_STAR_POINTS;
gBattleStatus.flags2 |= BS_FLAGS2_1;
}
break;
case BTL_SUBSTATE_CELEBRATE_LOAD_STAR_POINTS:
if (CelebrateSubstateTime != 0) {
CelebrateSubstateTime--;
} else if (btl_cam_is_moving_done()) {
dma_copy(starpoint_ROM_START, starpoint_ROM_END, starpoint_VRAM);
script = start_script(&EVS_ShowStarpoints, EVT_PRIORITY_A, 0);
EndBattleRewardsDone = FALSE;
// divide reward into 20 increments
EndBattleRewardStep = 20;
EndBattleRewardIncrement = EndBattleRewardTotal / EndBattleRewardStep;
player->takeTurnScript = script;
CelebrateSubstateTime = 1;
player->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PLAYER;
gBattleSubState = BTL_SUBSTATE_CELEBRATE_TALLY_STAR_POINTS;
}
break;
case BTL_SUBSTATE_CELEBRATE_TALLY_STAR_POINTS:
if (CelebrateSubstateTime == 0) {
if (battleStatus->totalStarPoints != 0) {
// determine the remaining star point reward after this step and give the difference to the player
EndBattleRewardTotal -= EndBattleRewardIncrement;
prevSP = battleStatus->totalStarPoints;
battleStatus->totalStarPoints = EndBattleRewardTotal / 100;
deltaSP = prevSP - battleStatus->totalStarPoints;
if (deltaSP > 0) {
sfx_play_sound(SOUND_215);
}
playerData->starPoints += deltaSP;
bFadeToBlackAmt++; // ??
if (EndBattleRewardStep == 0 && battleStatus->totalStarPoints != 0) {
playerData->starPoints++;
}
}
if (playerData->level >= 27) {
playerData->starPoints = 0;
}
if (playerData->starPoints >= 100) {
pendingLevelUps = 1;
playerData->starPoints -= 100;
}
if (playerData->level + pendingLevelUps == 27) {
playerData->starPoints = 0;
}
if (battleStatus->totalStarPoints == 0) {
if (EndBattleRewardStep == 0) {
EndBattleRewardsDone = TRUE;
player->flags &= ~(ACTOR_FLAG_4000000 | ACTOR_FLAG_8000000);
if (partner != NULL) {
partner->flags &= ~(ACTOR_FLAG_4000000 | ACTOR_FLAG_8000000);
}
battleStatus->battlePhase = PHASE_CELEBRATE;
script = start_script(&EVS_Mario_HandlePhase, EVT_PRIORITY_A, 0);
player->takeTurnScript = script;
player->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PLAYER;
if (partner != NULL) {
script = start_script(partner->takeTurnSource, EVT_PRIORITY_A, 0);
partner->takeTurnScript = script;
partner->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PARTNER;
}
CelebrateSubstateTime = 40;
gBattleSubState = BTL_SUBSTATE_CELEBRATE_POST_STAR_POINTS;
} else {
EndBattleRewardStep--;
}
}
} else {
CelebrateSubstateTime--;
}
break;
case BTL_SUBSTATE_CELEBRATE_POST_STAR_POINTS:
if (CelebrateSubstateTime == 0) {
if (pendingLevelUps == 0) {
gBattleSubState = BTL_SUBSTATE_CELEBRATE_SKIPPABLE_END_DELAY;
} else {
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_LOAD;
}
break;
}
CelebrateSubstateTime--;
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_LOAD:
if (CelebrateStateTime >= 99) {
playerData->level++;
btl_cam_use_preset(BTL_CAM_DEFAULT);
btl_cam_move(5);
dma_copy(level_up_ROM_START, level_up_ROM_END, level_up_VRAM);
sfx_play_sound(SOUND_80000008);
CelebrateStateTime = 0;
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_BEGIN;
}
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_BEGIN:
LevelUpScriptPtr = start_script(&EVS_ShowLevelUp, EVT_PRIORITY_A, 0);
LevelUpScriptID = LevelUpScriptPtr->id;
CelebrateSubstateTime = 25;
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CREATE_HUD;
mdl_set_all_fog_mode(FOG_MODE_1);
*gBackgroundFogModePtr = FOG_MODE_1;
set_background_color_blend(0, 0, 0, 0);
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CREATE_HUD:
if (CelebrateSubstateTime == 18) {
playerData->curHP = playerData->curMaxHP;
playerData->curFP = playerData->curMaxFP;
x = player->currentPos.x + 0.0f;
y = player->currentPos.y + 35.0f;
z = player->currentPos.z;
fx_recover(0, x, y, z, playerData->curHP);
x = player->currentPos.x + 20.0f;
y = player->currentPos.y + 25.0f;
z = player->currentPos.z;
fx_recover(1, x, y, z, playerData->curFP);
playerData->specialBarsFilled = playerData->maxStarPower * 256;
}
if (CelebrateSubstateTime != 0) {
CelebrateSubstateTime--;
if (CelebrateSubstateTime < 10) {
set_background_color_blend(0, 0, 0, ((10 - CelebrateSubstateTime) * 16) & 0xF0);
}
} else {
id = hud_element_create(&HES_level_up_heart);
LevelUpStatEmblemIDs[0] = id;
hud_element_set_render_pos(id, 310, 140);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
id = hud_element_create(&HES_level_up_flower);
LevelUpStatEmblemIDs[1] = id;
hud_element_set_render_pos(id, 158, 340);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
id = hud_element_create(&HES_level_up_leaves);
LevelUpStatEmblemIDs[3] = id;
hud_element_set_render_pos(id, 158, 340);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
id = hud_element_create(&HES_level_up_badge);
LevelUpStatEmblemIDs[2] = id;
hud_element_set_render_pos(id, 6, 140);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
id = hud_element_create(levelup_stat_scripts[0]);
LevelUpStatTextIDs[LVL_UP_FP][LVL_UP_TITLE] = id;
hud_element_set_render_pos(id, 160, 317);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
for (i = 1; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
id = hud_element_create(HES_LevelUpDigits[LVL_UP_FP][0]);
LevelUpStatTextIDs[LVL_UP_FP][i] = id;
hud_element_set_render_pos(id, 160, 317);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
}
id = hud_element_create(levelup_stat_scripts[1]);
LevelUpStatTextIDs[LVL_UP_HP][LVL_UP_TITLE] = id;
hud_element_set_render_pos(id, 312, 117);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
for (i = 1; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
id = hud_element_create(HES_LevelUpDigits[LVL_UP_HP][0]);
LevelUpStatTextIDs[LVL_UP_HP][i] = id;
hud_element_set_render_pos(id, 312, 117);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
}
id = hud_element_create(levelup_stat_scripts[2]);
LevelUpStatTextIDs[LVL_UP_BP][LVL_UP_TITLE] = id;
hud_element_set_render_pos(id, 8, 117);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
for (i = 1; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
id = hud_element_create(HES_LevelUpDigits[LVL_UP_BP][0]);
LevelUpStatTextIDs[LVL_UP_BP][i] = id;
hud_element_set_render_pos(id, 8, 117);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
}
CantLevelUpStat[MENU_HP] = FALSE;
CantLevelUpStat[MENU_FP] = FALSE;
CantLevelUpStat[MENU_BP] = FALSE;
if (playerData->hardMaxFP != 50) {
// current FP
tensDigit = playerData->curMaxFP / 10;
onesDigit = playerData->curMaxFP % 10;
id = LevelUpStatTextIDs[LVL_UP_FP][LVL_UP_CUR_TENS];
hud_element_set_script(id, level_up_small_digit_scripts[LVL_UP_FP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 14, y + 46);
id = LevelUpStatTextIDs[LVL_UP_FP][LVL_UP_CUR_ONES];
hud_element_set_script(id, level_up_small_digit_scripts[LVL_UP_FP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 8, y + 46);
id = LevelUpStatTextIDs[LVL_UP_FP][LVL_UP_ARROW];
hud_element_set_script(id, &HES_level_up_small_green_arrow);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 3, y + 46);
// upgraded FP
tensDigit = (playerData->curMaxFP + 5) / 10;
onesDigit = (playerData->curMaxFP + 5) % 10;
id = LevelUpStatTextIDs[LVL_UP_FP][LVL_UP_NEXT_TENS];
hud_element_set_script(id, HES_LevelUpDigits[LVL_UP_FP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 3, y + 46);
id = LevelUpStatTextIDs[LVL_UP_FP][LVL_UP_NEXT_ONES];
hud_element_set_script(id, HES_LevelUpDigits[LVL_UP_FP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 10, y + 46);
} else {
// upgraded FP only
id = LevelUpStatTextIDs[LVL_UP_FP][LVL_UP_NEXT_TENS];
tensDigit = playerData->curMaxFP / 10;
onesDigit = playerData->curMaxFP % 10;
hud_element_set_script(id, HES_LevelUpDigits[LVL_UP_FP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 6, y + 46);
id = LevelUpStatTextIDs[LVL_UP_FP][LVL_UP_NEXT_ONES];
hud_element_set_script(id, HES_LevelUpDigits[LVL_UP_FP][onesDigit]);
hud_element_clear_flags(id, 2);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 2, y + 46);
CantLevelUpStat[MENU_FP] = TRUE;
}
if (is_ability_active(ABILITY_FP_PLUS)) {
id = LevelUpStatTextIDs[LVL_UP_FP][LVL_UP_BONUS];
itemHudElemID = gItemTable[ITEM_FP_PLUS_A].hudElemID;
hud_element_set_script(id, gItemHudScripts[itemHudElemID].enabled);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_scale(id, 0.5f);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 17, y + 46);
}
if (playerData->hardMaxHP != 50) {
// current HP
tensDigit = playerData->curMaxHP / 10;
onesDigit = playerData->curMaxHP % 10;
id = LevelUpStatTextIDs[LVL_UP_HP][LVL_UP_CUR_TENS];
hud_element_set_script(id, level_up_small_digit_scripts[LVL_UP_HP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 14, y + 46);
id = LevelUpStatTextIDs[LVL_UP_HP][LVL_UP_CUR_ONES];
hud_element_set_script(id, level_up_small_digit_scripts[LVL_UP_HP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 8, y + 46);
id = LevelUpStatTextIDs[LVL_UP_HP][LVL_UP_ARROW];
hud_element_set_script(id, &HES_level_up_small_red_arrow);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 3, y + 46);
tensDigit = (playerData->curMaxHP + 5) / 10;
onesDigit = (playerData->curMaxHP + 5) % 10;
id = LevelUpStatTextIDs[LVL_UP_HP][LVL_UP_NEXT_TENS];
hud_element_set_script(id, HES_LevelUpDigits[LVL_UP_HP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 3, y + 46);
id = LevelUpStatTextIDs[LVL_UP_HP][LVL_UP_NEXT_ONES];
hud_element_set_script(id, HES_LevelUpDigits[LVL_UP_HP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 10, y + 46);
} else {
tensDigit = playerData->curMaxHP / 10;
onesDigit = playerData->curMaxHP % 10;
id = LevelUpStatTextIDs[LVL_UP_HP][LVL_UP_NEXT_TENS];
hud_element_set_script(id, HES_LevelUpDigits[LVL_UP_HP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 6, y + 46);
id = LevelUpStatTextIDs[LVL_UP_HP][LVL_UP_NEXT_ONES];
hud_element_set_script(id, HES_LevelUpDigits[LVL_UP_HP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 2, y + 46);
CantLevelUpStat[MENU_HP] = TRUE;
}
if (is_ability_active(ABILITY_HP_PLUS)) {
id = LevelUpStatTextIDs[LVL_UP_HP][LVL_UP_BONUS];
itemHudElemID = gItemTable[ITEM_HP_PLUS_A].hudElemID;
hud_element_set_script(id, gItemHudScripts[itemHudElemID].enabled);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_scale(id, 0.5f);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 17, y + 46);
}
if (playerData->maxBP != 30) {
tensDigit = playerData->maxBP / 10;
onesDigit = playerData->maxBP % 10;
id = LevelUpStatTextIDs[LVL_UP_BP][LVL_UP_CUR_TENS];
hud_element_set_script(id, level_up_small_digit_scripts[LVL_UP_BP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 14, y + 46);
id = LevelUpStatTextIDs[LVL_UP_BP][LVL_UP_CUR_ONES];
hud_element_set_script(id, level_up_small_digit_scripts[LVL_UP_BP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 8, y + 46);
id = LevelUpStatTextIDs[LVL_UP_BP][LVL_UP_ARROW];
hud_element_set_script(id, &HES_level_up_small_blue_arrow);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 3, y + 46);
tensDigit = (playerData->maxBP + 3) / 10;
onesDigit = (playerData->maxBP + 3) % 10;
id = LevelUpStatTextIDs[LVL_UP_BP][LVL_UP_NEXT_TENS];
hud_element_set_script(id, HES_LevelUpDigits[LVL_UP_BP][tensDigit]);
if (tensDigit != 0) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 3, y + 46);
id = LevelUpStatTextIDs[LVL_UP_BP][LVL_UP_NEXT_ONES];
hud_element_set_script(id, HES_LevelUpDigits[LVL_UP_BP][onesDigit]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 10, y + 46);
} else {
id = LevelUpStatTextIDs[LVL_UP_BP][LVL_UP_NEXT_TENS];
hud_element_set_script(id, HES_LevelUpDigits[LVL_UP_BP][3]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x - 6, y + 46);
id = LevelUpStatTextIDs[LVL_UP_BP][LVL_UP_NEXT_ONES];
hud_element_set_script(id, HES_LevelUpDigits[LVL_UP_BP][0]);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_get_render_pos(id, &x, &y);
hud_element_set_render_pos(id, x + 2, y + 46);
CantLevelUpStat[MENU_BP] = TRUE;
}
id = LevelUpSpotlightID = hud_element_create(&HES_ProjectorBeam);
hud_element_create_transform_B(id);
hud_element_set_render_pos(id, 156, 13);
hud_element_set_tint(id, 255, 255, 255);
hud_element_set_transform_rotation_pivot(id, 0, -35);
hud_element_set_transform_rotation(id, 0.0f, 0.0f, 180.0f);
hud_element_set_transform_scale(id, 1.0f, 1.5f, 1.0f);
hud_element_set_alpha(id, 200);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
id = LevelUpSelectTextID = hud_element_create(&HES_level_up_select_one_to_upgrade);
hud_element_set_render_pos(id, 0, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
battleStatus->currentSubmenu = 1;
CelebrateSubstateTime = 10;
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_SHOW_HUD;
}
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_SHOW_HUD:
id = LevelUpStatEmblemIDs[0];
hud_element_get_render_pos(id, &x, &y);
x -= 20;
hud_element_set_render_pos(id, x, y);
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
id = LevelUpStatTextIDs[LVL_UP_HP][i];
hud_element_get_render_pos(id, &x, &y);
x -= 20;
hud_element_set_render_pos(id, x, y);
}
id = LevelUpStatEmblemIDs[1];
hud_element_get_render_pos(id, &x, &y);
y -= 20;
hud_element_set_render_pos(id, x, y);
id = LevelUpStatEmblemIDs[3];
hud_element_get_render_pos(id, &x, &y);
y -= 20;
hud_element_set_render_pos(id, x, y);
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
id = LevelUpStatTextIDs[LVL_UP_FP][i];
hud_element_get_render_pos(id, &x, &y);
y -= 20;
hud_element_set_render_pos(id, x, y);
}
id = LevelUpStatEmblemIDs[2];
hud_element_get_render_pos(id, &x, &y);
x += 20;
hud_element_set_render_pos(id, x, y);
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
id = LevelUpStatTextIDs[LVL_UP_BP][i];
hud_element_get_render_pos(id, &x, &y);
x += 20;
hud_element_set_render_pos(id, x, y);
}
CelebrateSubstateTime--;
if (CelebrateSubstateTime == 0) {
hud_element_set_tint(id, 128, 128, 128);
x = 20;
y = 186;
set_window_properties(WINDOW_ID_8, 20, 186, 280, 32, WINDOW_PRIORITY_20, draw_content_level_up_textbox, NULL, -1);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CHOOSE;
}
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CHOOSE:
if (battleStatus->currentButtonsPressed & BUTTON_A) {
if (!CantLevelUpStat[battleStatus->currentSubmenu]) {
sfx_play_sound(SOUND_MENU_NEXT);
sfx_play_sound(SOUND_349 | SOUND_ID_TRIGGER_CHANGE_SOUND);
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_UPGRADE;
} else {
sfx_play_sound(SOUND_MENU_ERROR);
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_INVALID;
}
break;
}
newSubmenu = currentSubmenu = battleStatus->currentSubmenu;
if (battleStatus->currentButtonsHeld & BUTTON_STICK_LEFT) {
newSubmenu--;
}
if (battleStatus->currentButtonsHeld & BUTTON_STICK_RIGHT) {
newSubmenu++;
}
if (newSubmenu < 0) {
newSubmenu = 0;
}
if (newSubmenu > 2) {
newSubmenu = 2;
}
if (newSubmenu != currentSubmenu) {
sfx_play_sound(SOUND_MENU_CHANGE_SELECTION);
battleStatus->currentSubmenu = newSubmenu;
}
CelebrateStateTime++;
if (CelebrateStateTime > 100) {
fx_confetti(3, 0.0f, 100.0f, 0.0f, 1.0f, 120);
CelebrateStateTime = 0;
}
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_UPGRADE:
hud_element_free(LevelUpSpotlightID);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
switch (battleStatus->currentSubmenu) {
case 0:
playerData->hardMaxHP += 5;
playerData->curMaxHP += 5;
playerData->curHP += 5;
if (playerData->curMaxHP > 75) {
playerData->curMaxHP = 75;
}
if (playerData->curHP > playerData->curMaxHP) {
playerData->curHP = playerData->curMaxHP;
}
player->maxHP = playerData->curMaxHP;
player->currentHP = playerData->curHP;
break;
case 1:
playerData->hardMaxFP += 5;
playerData->curMaxFP += 5;
playerData->curFP += 5;
if (playerData->curMaxFP > 75) {
playerData->curMaxFP = 75;
}
if (playerData->curFP > playerData->curMaxFP) {
playerData->curFP = playerData->curMaxFP;
}
break;
case 2:
playerData->maxBP += 3;
if (playerData->maxBP > 30) {
playerData->maxBP = 30;
}
break;
}
set_animation(0, 0, ANIM_MarioB1_AdjustCap);
if (partner != NULL) {
script = start_script(partner->takeTurnSource, EVT_PRIORITY_A, 0);
partner->takeTurnScript = script;
partner->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PARTNER;
}
if (!(gBattleStatus.flags2 & BS_FLAGS2_DONT_STOP_MUSIC)) {
bgm_set_song(0, -1, 0, 2000, 8);
}
bFadeToBlackAmt = 0;
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_FADE_OUT;
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_FADE_OUT:
if ((gGameStatusPtr->frameCounter % 2) != 0) {
switch (battleStatus->currentSubmenu) {
case 0:
hud_element_set_flags(LevelUpStatEmblemIDs[0], HUD_ELEMENT_FLAG_DISABLED);
break;
case 1:
hud_element_set_flags(LevelUpStatEmblemIDs[1], HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_flags(LevelUpStatEmblemIDs[3], HUD_ELEMENT_FLAG_DISABLED);
break;
case 2:
hud_element_set_flags(LevelUpStatEmblemIDs[2], HUD_ELEMENT_FLAG_DISABLED);
break;
}
} else {
switch (battleStatus->currentSubmenu) {
case 0:
hud_element_clear_flags(LevelUpStatEmblemIDs[0], HUD_ELEMENT_FLAG_DISABLED);
break;
case 1:
hud_element_clear_flags(LevelUpStatEmblemIDs[1], HUD_ELEMENT_FLAG_DISABLED);
hud_element_clear_flags(LevelUpStatEmblemIDs[3], HUD_ELEMENT_FLAG_DISABLED);
break;
case 2:
hud_element_clear_flags(LevelUpStatEmblemIDs[2], HUD_ELEMENT_FLAG_DISABLED);
break;
}
}
if (bFadeToBlackAmt == 255) {
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_DESTROY_HUD;
break;
}
bFadeToBlackAmt += 10;
if (bFadeToBlackAmt > 255) {
bFadeToBlackAmt = 255;
}
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_DESTROY_HUD:
hud_element_free(LevelUpStatEmblemIDs[0]);
hud_element_free(LevelUpStatEmblemIDs[1]);
hud_element_free(LevelUpStatEmblemIDs[3]);
hud_element_free(LevelUpStatEmblemIDs[2]);
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs); i++) {
for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); j++) {
hud_element_free(LevelUpStatTextIDs[i][j]);
}
}
hud_element_free(LevelUpSelectTextID);
set_background_color_blend(0, 0, 0, 0);
btl_set_state(BATTLE_STATE_END_BATTLE);
gBattleSubState = BTL_SUBSTATE_END_BATTLE_EXEC_STAGE_SCRIPT;
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_INVALID:
width = get_msg_width(MSG_Menus_CantIncrease, 0) + 31;
x = 160 - (width / 2);
y = 80;
set_window_properties(WINDOW_ID_BATTLE_POPUP, x, y, width, 28, WINDOW_PRIORITY_10, draw_content_cant_increase_popup, NULL, -1);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
CelebrateSubstateTime = 60;
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_INVALID_DELAY;
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_INVALID_DELAY:
if (gGameStatusPtr->pressedButtons[0] & (BUTTON_A | BUTTON_B)) {
CelebrateSubstateTime = 0;
}
if (CelebrateSubstateTime != 0) {
CelebrateSubstateTime--;
break;
}
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE);
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CHOOSE;
break;
case BTL_SUBSTATE_CELEBRATE_SKIPPABLE_END_DELAY:
if (battleStatus->currentButtonsPressed & (BUTTON_A | BUTTON_B)) {
CelebrateStateTime = 99;
}
if (CelebrateStateTime >= 99) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_DONT_STOP_MUSIC)) {
bgm_set_song(0, -1, 0, 1500, 8);
}
bFadeToBlackAmt = 0;
btl_cam_set_params(1, 270, 100, 8, 0, 0x2400, 0, 100);
set_animation(0, 0, ANIM_MarioB1_AdjustCap);
if (partner != NULL) {
set_animation(ACTOR_PARTNER, 0, D_80284154[playerData->currentPartner]);
}
CelebrateSubstateTime = 6;
gBattleSubState = BTL_SUBSTATE_CELEBRATE_WALK_AWAY;
break;
}
break;
case BTL_SUBSTATE_CELEBRATE_WALK_AWAY:
if (CelebrateSubstateTime != 0) {
CelebrateSubstateTime--;
if (CelebrateSubstateTime == 0) {
set_animation(0, 0, ANIM_Mario1_Walk);
}
} else {
player->yaw = 0.0f;
if (partner != NULL) {
partner->yaw = 0.0f;
}
player->currentPos.x += 4.0f;
if (partner != NULL) {
partner->currentPos.x += 4.0f;
}
}
if (bFadeToBlackAmt == 255) {
gBattleSubState = BTL_SUBSTATE_CELEBRATE_DONE;
break;
}
bFadeToBlackAmt += 20;
if (bFadeToBlackAmt > 255) {
bFadeToBlackAmt = 255;
}
break;
case BTL_SUBSTATE_CELEBRATE_DONE:
if (does_script_exist(player->takeTurnScriptID)) {
kill_script_by_ID(player->takeTurnScriptID);
}
if (partner != NULL && does_script_exist(partner->takeTurnScriptID)) {
kill_script_by_ID(partner->takeTurnScriptID);
}
btl_set_state(BATTLE_STATE_END_BATTLE);
gBattleSubState = BTL_SUBSTATE_END_BATTLE_EXEC_STAGE_SCRIPT;
break;
}
CelebrateStateTime++;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel popup_menu_update
/* 8AEC0 800F1A10 3C028011 */ lui $v0, %hi(gPopupState)
/* 8AEC4 800F1A14 8C42D640 */ lw $v0, %lo(gPopupState)($v0)
/* 8AEC8 800F1A18 27BDFFC0 */ addiu $sp, $sp, -0x40
/* 8AECC 800F1A1C AFBF0038 */ sw $ra, 0x38($sp)
/* 8AED0 800F1A20 AFB30034 */ sw $s3, 0x34($sp)
/* 8AED4 800F1A24 AFB20030 */ sw $s2, 0x30($sp)
/* 8AED8 800F1A28 AFB1002C */ sw $s1, 0x2C($sp)
/* 8AEDC 800F1A2C 24430007 */ addiu $v1, $v0, 0x7
/* 8AEE0 800F1A30 2C62006F */ sltiu $v0, $v1, 0x6F
/* 8AEE4 800F1A34 10400707 */ beqz $v0, .L800F3654
/* 8AEE8 800F1A38 AFB00028 */ sw $s0, 0x28($sp)
/* 8AEEC 800F1A3C 00031080 */ sll $v0, $v1, 2
/* 8AEF0 800F1A40 3C018011 */ lui $at, %hi(jtbl_8010C410)
/* 8AEF4 800F1A44 00220821 */ addu $at, $at, $v0
/* 8AEF8 800F1A48 8C22C410 */ lw $v0, %lo(jtbl_8010C410)($at)
/* 8AEFC 800F1A4C 00400008 */ jr $v0
/* 8AF00 800F1A50 00000000 */ nop
glabel .L800F1A54
/* 8AF04 800F1A54 3C048011 */ lui $a0, %hi(D_8010D67C)
/* 8AF08 800F1A58 2484D67C */ addiu $a0, $a0, %lo(D_8010D67C)
/* 8AF0C 800F1A5C 24030014 */ addiu $v1, $zero, 0x14
/* 8AF10 800F1A60 3C058011 */ lui $a1, %hi(D_8010D67E)
/* 8AF14 800F1A64 24A5D67E */ addiu $a1, $a1, %lo(D_8010D67E)
/* 8AF18 800F1A68 24020048 */ addiu $v0, $zero, 0x48
/* 8AF1C 800F1A6C A4830000 */ sh $v1, 0x0($a0)
/* 8AF20 800F1A70 A4A20000 */ sh $v0, 0x0($a1)
/* 8AF24 800F1A74 3C018011 */ lui $at, %hi(D_8010D680)
/* 8AF28 800F1A78 A423D680 */ sh $v1, %lo(D_8010D680)($at)
/* 8AF2C 800F1A7C 3C038011 */ lui $v1, %hi(PopupNotBattle)
/* 8AF30 800F1A80 8063D68E */ lb $v1, %lo(PopupNotBattle)($v1)
/* 8AF34 800F1A84 240200BA */ addiu $v0, $zero, 0xBA
/* 8AF38 800F1A88 3C018011 */ lui $at, %hi(D_8010D682)
/* 8AF3C 800F1A8C A422D682 */ sh $v0, %lo(D_8010D682)($at)
/* 8AF40 800F1A90 24020010 */ addiu $v0, $zero, 0x10
/* 8AF44 800F1A94 3C018011 */ lui $at, %hi(D_8010D684)
/* 8AF48 800F1A98 A422D684 */ sh $v0, %lo(D_8010D684)($at)
/* 8AF4C 800F1A9C 24020058 */ addiu $v0, $zero, 0x58
/* 8AF50 800F1AA0 3C018011 */ lui $at, %hi(D_8010D686)
/* 8AF54 800F1AA4 A422D686 */ sh $v0, %lo(D_8010D686)($at)
/* 8AF58 800F1AA8 24020020 */ addiu $v0, $zero, 0x20
/* 8AF5C 800F1AAC 3C018011 */ lui $at, %hi(PopupMenu_StarPieceCounterPosX)
/* 8AF60 800F1AB0 A422D688 */ sh $v0, %lo(PopupMenu_StarPieceCounterPosX)($at)
/* 8AF64 800F1AB4 240200A4 */ addiu $v0, $zero, 0xA4
/* 8AF68 800F1AB8 3C018011 */ lui $at, %hi(PopupMenu_StarPieceCounterPosY)
/* 8AF6C 800F1ABC A422D68A */ sh $v0, %lo(PopupMenu_StarPieceCounterPosY)($at)
/* 8AF70 800F1AC0 1060000A */ beqz $v1, .L800F1AEC
/* 8AF74 800F1AC4 00000000 */ nop
/* 8AF78 800F1AC8 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8AF7C 800F1ACC 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8AF80 800F1AD0 8C420318 */ lw $v0, 0x318($v0)
/* 8AF84 800F1AD4 00021040 */ sll $v0, $v0, 1
/* 8AF88 800F1AD8 3C018011 */ lui $at, %hi(D_801098A0)
/* 8AF8C 800F1ADC 00220821 */ addu $at, $at, $v0
/* 8AF90 800F1AE0 942298A0 */ lhu $v0, %lo(D_801098A0)($at)
/* 8AF94 800F1AE4 24420014 */ addiu $v0, $v0, 0x14
/* 8AF98 800F1AE8 A4820000 */ sh $v0, 0x0($a0)
.L800F1AEC:
/* 8AF9C 800F1AEC 3C028011 */ lui $v0, %hi(PopupMenu_MaxDisplayableEntryCount)
/* 8AFA0 800F1AF0 8042D68F */ lb $v0, %lo(PopupMenu_MaxDisplayableEntryCount)($v0)
/* 8AFA4 800F1AF4 28420007 */ slti $v0, $v0, 0x7
/* 8AFA8 800F1AF8 14400002 */ bnez $v0, .L800F1B04
/* 8AFAC 800F1AFC 2402003E */ addiu $v0, $zero, 0x3E
/* 8AFB0 800F1B00 A4A20000 */ sh $v0, 0x0($a1)
.L800F1B04:
/* 8AFB4 800F1B04 3C048010 */ lui $a0, %hi(HES_EmptyBar)
/* 8AFB8 800F1B08 2484790C */ addiu $a0, $a0, %lo(HES_EmptyBar)
/* 8AFBC 800F1B0C 3C018011 */ lui $at, %hi(D_8010D68C)
/* 8AFC0 800F1B10 A420D68C */ sh $zero, %lo(D_8010D68C)($at)
/* 8AFC4 800F1B14 0C050529 */ jal hud_element_create
/* 8AFC8 800F1B18 00000000 */ nop
/* 8AFCC 800F1B1C 0040802D */ daddu $s0, $v0, $zero
/* 8AFD0 800F1B20 0200202D */ daddu $a0, $s0, $zero
/* 8AFD4 800F1B24 3C018011 */ lui $at, %hi(PopupMenu_EmptybarHEID)
/* 8AFD8 800F1B28 AC30D65C */ sw $s0, %lo(PopupMenu_EmptybarHEID)($at)
/* 8AFDC 800F1B2C 0C051280 */ jal hud_element_set_flags
/* 8AFE0 800F1B30 24050080 */ addiu $a1, $zero, 0x80
/* 8AFE4 800F1B34 0200202D */ daddu $a0, $s0, $zero
/* 8AFE8 800F1B38 240500FF */ addiu $a1, $zero, 0xFF
/* 8AFEC 800F1B3C 00A0302D */ daddu $a2, $a1, $zero
/* 8AFF0 800F1B40 0C0513BF */ jal hud_element_set_tint
/* 8AFF4 800F1B44 00A0382D */ daddu $a3, $a1, $zero
/* 8AFF8 800F1B48 3C118011 */ lui $s1, %hi(gPopupMenu)
/* 8AFFC 800F1B4C 2631D69C */ addiu $s1, $s1, %lo(gPopupMenu)
/* 8B000 800F1B50 8E220000 */ lw $v0, 0x0($s1)
/* 8B004 800F1B54 8C430318 */ lw $v1, 0x318($v0)
/* 8B008 800F1B58 24020002 */ addiu $v0, $zero, 0x2
/* 8B00C 800F1B5C 10620004 */ beq $v1, $v0, .L800F1B70
/* 8B010 800F1B60 00000000 */ nop
/* 8B014 800F1B64 0200202D */ daddu $a0, $s0, $zero
/* 8B018 800F1B68 0C051280 */ jal hud_element_set_flags
/* 8B01C 800F1B6C 0040282D */ daddu $a1, $v0, $zero
.L800F1B70:
/* 8B020 800F1B70 8E220000 */ lw $v0, 0x0($s1)
/* 8B024 800F1B74 8C440000 */ lw $a0, 0x0($v0)
/* 8B028 800F1B78 0C050529 */ jal hud_element_create
/* 8B02C 800F1B7C 24130001 */ addiu $s3, $zero, 0x1
/* 8B030 800F1B80 0040802D */ daddu $s0, $v0, $zero
/* 8B034 800F1B84 3C053EE6 */ lui $a1, (0x3EE66666 >> 16)
/* 8B038 800F1B88 34A56666 */ ori $a1, $a1, (0x3EE66666 & 0xFFFF)
/* 8B03C 800F1B8C 3C018011 */ lui $at, %hi(D_8010D678)
/* 8B040 800F1B90 AC30D678 */ sw $s0, %lo(D_8010D678)($at)
/* 8B044 800F1B94 0C051308 */ jal hud_element_set_scale
/* 8B048 800F1B98 0200202D */ daddu $a0, $s0, $zero
/* 8B04C 800F1B9C 0200202D */ daddu $a0, $s0, $zero
/* 8B050 800F1BA0 0C051280 */ jal hud_element_set_flags
/* 8B054 800F1BA4 34058080 */ ori $a1, $zero, 0x8080
/* 8B058 800F1BA8 3C048010 */ lui $a0, %hi(HES_AnimatedHandPointer)
/* 8B05C 800F1BAC 24844A28 */ addiu $a0, $a0, %lo(HES_AnimatedHandPointer)
/* 8B060 800F1BB0 0C050529 */ jal hud_element_create
/* 8B064 800F1BB4 00000000 */ nop
/* 8B068 800F1BB8 0040802D */ daddu $s0, $v0, $zero
/* 8B06C 800F1BBC 0200202D */ daddu $a0, $s0, $zero
/* 8B070 800F1BC0 3C052000 */ lui $a1, (0x20000080 >> 16)
/* 8B074 800F1BC4 3C018011 */ lui $at, %hi(D_8010D66C)
/* 8B078 800F1BC8 AC24D66C */ sw $a0, %lo(D_8010D66C)($at)
/* 8B07C 800F1BCC 0C051280 */ jal hud_element_set_flags
/* 8B080 800F1BD0 34A50080 */ ori $a1, $a1, (0x20000080 & 0xFFFF)
/* 8B084 800F1BD4 3C048010 */ lui $a0, %hi(HES_GreenArrowUp)
/* 8B088 800F1BD8 248477E4 */ addiu $a0, $a0, %lo(HES_GreenArrowUp)
/* 8B08C 800F1BDC 0C050529 */ jal hud_element_create
/* 8B090 800F1BE0 00000000 */ nop
/* 8B094 800F1BE4 0040802D */ daddu $s0, $v0, $zero
/* 8B098 800F1BE8 0200202D */ daddu $a0, $s0, $zero
/* 8B09C 800F1BEC 3C052000 */ lui $a1, (0x20000080 >> 16)
/* 8B0A0 800F1BF0 3C018011 */ lui $at, %hi(D_8010D670)
/* 8B0A4 800F1BF4 AC24D670 */ sw $a0, %lo(D_8010D670)($at)
/* 8B0A8 800F1BF8 0C051280 */ jal hud_element_set_flags
/* 8B0AC 800F1BFC 34A50080 */ ori $a1, $a1, (0x20000080 & 0xFFFF)
/* 8B0B0 800F1C00 3C048010 */ lui $a0, %hi(HES_GreenArrowDown)
/* 8B0B4 800F1C04 24847798 */ addiu $a0, $a0, %lo(HES_GreenArrowDown)
/* 8B0B8 800F1C08 0C050529 */ jal hud_element_create
/* 8B0BC 800F1C0C 00000000 */ nop
/* 8B0C0 800F1C10 0040802D */ daddu $s0, $v0, $zero
/* 8B0C4 800F1C14 0200202D */ daddu $a0, $s0, $zero
/* 8B0C8 800F1C18 3C052000 */ lui $a1, (0x20000080 >> 16)
/* 8B0CC 800F1C1C 3C018011 */ lui $at, %hi(D_8010D674)
/* 8B0D0 800F1C20 AC24D674 */ sw $a0, %lo(D_8010D674)($at)
/* 8B0D4 800F1C24 0C051280 */ jal hud_element_set_flags
/* 8B0D8 800F1C28 34A50080 */ ori $a1, $a1, (0x20000080 & 0xFFFF)
/* 8B0DC 800F1C2C 8E220000 */ lw $v0, 0x0($s1)
/* 8B0E0 800F1C30 8C430318 */ lw $v1, 0x318($v0)
/* 8B0E4 800F1C34 24020003 */ addiu $v0, $zero, 0x3
/* 8B0E8 800F1C38 14620010 */ bne $v1, $v0, .L800F1C7C
/* 8B0EC 800F1C3C 00000000 */ nop
/* 8B0F0 800F1C40 3C048010 */ lui $a0, %hi(HES_StatusStarPiece)
/* 8B0F4 800F1C44 24844C10 */ addiu $a0, $a0, %lo(HES_StatusStarPiece)
/* 8B0F8 800F1C48 0C050529 */ jal hud_element_create
/* 8B0FC 800F1C4C 00000000 */ nop
/* 8B100 800F1C50 3C018011 */ lui $at, %hi(PopupTitleIconHEID)
/* 8B104 800F1C54 AC22D660 */ sw $v0, %lo(PopupTitleIconHEID)($at)
/* 8B108 800F1C58 0040802D */ daddu $s0, $v0, $zero
/* 8B10C 800F1C5C 0040202D */ daddu $a0, $v0, $zero
/* 8B110 800F1C60 0C051280 */ jal hud_element_set_flags
/* 8B114 800F1C64 24050080 */ addiu $a1, $zero, 0x80
/* 8B118 800F1C68 0200202D */ daddu $a0, $s0, $zero
/* 8B11C 800F1C6C 240500FF */ addiu $a1, $zero, 0xFF
/* 8B120 800F1C70 00A0302D */ daddu $a2, $a1, $zero
/* 8B124 800F1C74 0C0513BF */ jal hud_element_set_tint
/* 8B128 800F1C78 00A0382D */ daddu $a3, $a1, $zero
.L800F1C7C:
/* 8B12C 800F1C7C 8E220000 */ lw $v0, 0x0($s1)
/* 8B130 800F1C80 8C420318 */ lw $v0, 0x318($v0)
/* 8B134 800F1C84 24120004 */ addiu $s2, $zero, 0x4
/* 8B138 800F1C88 14520010 */ bne $v0, $s2, .L800F1CCC
/* 8B13C 800F1C8C 00000000 */ nop
/* 8B140 800F1C90 3C048010 */ lui $a0, %hi(HES_StatusStarPiece)
/* 8B144 800F1C94 24844C10 */ addiu $a0, $a0, %lo(HES_StatusStarPiece)
/* 8B148 800F1C98 0C050529 */ jal hud_element_create
/* 8B14C 800F1C9C 00000000 */ nop
/* 8B150 800F1CA0 3C018011 */ lui $at, %hi(PopupTitleIconHEID)
/* 8B154 800F1CA4 AC22D660 */ sw $v0, %lo(PopupTitleIconHEID)($at)
/* 8B158 800F1CA8 0040802D */ daddu $s0, $v0, $zero
/* 8B15C 800F1CAC 0040202D */ daddu $a0, $v0, $zero
/* 8B160 800F1CB0 0C051280 */ jal hud_element_set_flags
/* 8B164 800F1CB4 34058080 */ ori $a1, $zero, 0x8080
/* 8B168 800F1CB8 0200202D */ daddu $a0, $s0, $zero
/* 8B16C 800F1CBC 240500FF */ addiu $a1, $zero, 0xFF
/* 8B170 800F1CC0 00A0302D */ daddu $a2, $a1, $zero
/* 8B174 800F1CC4 0C0513BF */ jal hud_element_set_tint
/* 8B178 800F1CC8 00A0382D */ daddu $a3, $a1, $zero
.L800F1CCC:
/* 8B17C 800F1CCC 8E220000 */ lw $v0, 0x0($s1)
/* 8B180 800F1CD0 8C430318 */ lw $v1, 0x318($v0)
/* 8B184 800F1CD4 24020005 */ addiu $v0, $zero, 0x5
/* 8B188 800F1CD8 14620010 */ bne $v1, $v0, .L800F1D1C
/* 8B18C 800F1CDC 00000000 */ nop
/* 8B190 800F1CE0 3C048011 */ lui $a0, %hi(HES_StatusCoin)
/* 8B194 800F1CE4 24848558 */ addiu $a0, $a0, %lo(HES_StatusCoin)
/* 8B198 800F1CE8 0C050529 */ jal hud_element_create
/* 8B19C 800F1CEC 00000000 */ nop
/* 8B1A0 800F1CF0 3C018011 */ lui $at, %hi(PopupTitleIconHEID)
/* 8B1A4 800F1CF4 AC22D660 */ sw $v0, %lo(PopupTitleIconHEID)($at)
/* 8B1A8 800F1CF8 0040802D */ daddu $s0, $v0, $zero
/* 8B1AC 800F1CFC 0040202D */ daddu $a0, $v0, $zero
/* 8B1B0 800F1D00 0C051280 */ jal hud_element_set_flags
/* 8B1B4 800F1D04 24050080 */ addiu $a1, $zero, 0x80
/* 8B1B8 800F1D08 0200202D */ daddu $a0, $s0, $zero
/* 8B1BC 800F1D0C 240500FF */ addiu $a1, $zero, 0xFF
/* 8B1C0 800F1D10 00A0302D */ daddu $a2, $a1, $zero
/* 8B1C4 800F1D14 0C0513BF */ jal hud_element_set_tint
/* 8B1C8 800F1D18 00A0382D */ daddu $a3, $a1, $zero
.L800F1D1C:
/* 8B1CC 800F1D1C 8E220000 */ lw $v0, 0x0($s1)
/* 8B1D0 800F1D20 8C420318 */ lw $v0, 0x318($v0)
/* 8B1D4 800F1D24 2442FFFD */ addiu $v0, $v0, -0x3
/* 8B1D8 800F1D28 2C420002 */ sltiu $v0, $v0, 0x2
/* 8B1DC 800F1D2C 10400010 */ beqz $v0, .L800F1D70
/* 8B1E0 800F1D30 00000000 */ nop
/* 8B1E4 800F1D34 3C048011 */ lui $a0, %hi(HES_MenuTimes)
/* 8B1E8 800F1D38 24849270 */ addiu $a0, $a0, %lo(HES_MenuTimes)
/* 8B1EC 800F1D3C 0C050529 */ jal hud_element_create
/* 8B1F0 800F1D40 00000000 */ nop
/* 8B1F4 800F1D44 3C018011 */ lui $at, %hi(D_8010D664)
/* 8B1F8 800F1D48 AC22D664 */ sw $v0, %lo(D_8010D664)($at)
/* 8B1FC 800F1D4C 0040802D */ daddu $s0, $v0, $zero
/* 8B200 800F1D50 0040202D */ daddu $a0, $v0, $zero
/* 8B204 800F1D54 0C051280 */ jal hud_element_set_flags
/* 8B208 800F1D58 24050080 */ addiu $a1, $zero, 0x80
/* 8B20C 800F1D5C 0200202D */ daddu $a0, $s0, $zero
/* 8B210 800F1D60 240500FF */ addiu $a1, $zero, 0xFF
/* 8B214 800F1D64 00A0302D */ daddu $a2, $a1, $zero
/* 8B218 800F1D68 0C0513BF */ jal hud_element_set_tint
/* 8B21C 800F1D6C 00A0382D */ daddu $a3, $a1, $zero
.L800F1D70:
/* 8B220 800F1D70 8E220000 */ lw $v0, 0x0($s1)
/* 8B224 800F1D74 8C420318 */ lw $v0, 0x318($v0)
/* 8B228 800F1D78 10530003 */ beq $v0, $s3, .L800F1D88
/* 8B22C 800F1D7C 00000000 */ nop
/* 8B230 800F1D80 14520010 */ bne $v0, $s2, .L800F1DC4
/* 8B234 800F1D84 2402FF38 */ addiu $v0, $zero, -0xC8
.L800F1D88:
/* 8B238 800F1D88 3C048011 */ lui $a0, %hi(D_80109890)
/* 8B23C 800F1D8C 0C050529 */ jal hud_element_create
/* 8B240 800F1D90 8C849890 */ lw $a0, %lo(D_80109890)($a0)
/* 8B244 800F1D94 0040802D */ daddu $s0, $v0, $zero
/* 8B248 800F1D98 0200202D */ daddu $a0, $s0, $zero
glabel func_800F1D9C
/* 8B24C 800F1D9C 3C018011 */ lui $at, %hi(D_8010D668)
/* 8B250 800F1DA0 AC30D668 */ sw $s0, %lo(D_8010D668)($at)
/* 8B254 800F1DA4 0C051280 */ jal hud_element_set_flags
/* 8B258 800F1DA8 24050080 */ addiu $a1, $zero, 0x80
/* 8B25C 800F1DAC 0200202D */ daddu $a0, $s0, $zero
/* 8B260 800F1DB0 240500FF */ addiu $a1, $zero, 0xFF
/* 8B264 800F1DB4 00A0302D */ daddu $a2, $a1, $zero
/* 8B268 800F1DB8 0C0513BF */ jal hud_element_set_tint
/* 8B26C 800F1DBC 00A0382D */ daddu $a3, $a1, $zero
/* 8B270 800F1DC0 2402FF38 */ addiu $v0, $zero, -0xC8
.L800F1DC4:
/* 8B274 800F1DC4 3C018011 */ lui $at, %hi(D_8010D65A)
/* 8B278 800F1DC8 A422D65A */ sh $v0, %lo(D_8010D65A)($at)
/* 8B27C 800F1DCC 3C028011 */ lui $v0, %hi(D_8010D691)
/* 8B280 800F1DD0 8042D691 */ lb $v0, %lo(D_8010D691)($v0)
/* 8B284 800F1DD4 3C038011 */ lui $v1, %hi(PopupNotBattle)
/* 8B288 800F1DD8 8063D68E */ lb $v1, %lo(PopupNotBattle)($v1)
/* 8B28C 800F1DDC 3C048011 */ lui $a0, %hi(D_8010D644)
/* 8B290 800F1DE0 2484D644 */ addiu $a0, $a0, %lo(D_8010D644)
/* 8B294 800F1DE4 14600003 */ bnez $v1, .L800F1DF4
/* 8B298 800F1DE8 AC820000 */ sw $v0, 0x0($a0)
/* 8B29C 800F1DEC 24020001 */ addiu $v0, $zero, 0x1
/* 8B2A0 800F1DF0 AC820000 */ sw $v0, 0x0($a0)
.L800F1DF4:
/* 8B2A4 800F1DF4 3C058011 */ lui $a1, %hi(D_8010D67C)
/* 8B2A8 800F1DF8 84A5D67C */ lh $a1, %lo(D_8010D67C)($a1)
/* 8B2AC 800F1DFC 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8B2B0 800F1E00 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8B2B4 800F1E04 3C068011 */ lui $a2, %hi(D_8010D67E)
/* 8B2B8 800F1E08 84C6D67E */ lh $a2, %lo(D_8010D67E)($a2)
/* 8B2BC 800F1E0C 8C430318 */ lw $v1, 0x318($v0)
/* 8B2C0 800F1E10 2402000A */ addiu $v0, $zero, 0xA
/* 8B2C4 800F1E14 3C018011 */ lui $at, %hi(D_8010D690)
/* 8B2C8 800F1E18 A022D690 */ sb $v0, %lo(D_8010D690)($at)
/* 8B2CC 800F1E1C 2C62000E */ sltiu $v0, $v1, 0xE
/* 8B2D0 800F1E20 1040017B */ beqz $v0, .L800F2410
/* 8B2D4 800F1E24 00031080 */ sll $v0, $v1, 2
/* 8B2D8 800F1E28 3C018011 */ lui $at, %hi(jtbl_8010C5D0)
/* 8B2DC 800F1E2C 00220821 */ addu $at, $at, $v0
/* 8B2E0 800F1E30 8C22C5D0 */ lw $v0, %lo(jtbl_8010C5D0)($at)
/* 8B2E4 800F1E34 00400008 */ jr $v0
/* 8B2E8 800F1E38 00000000 */ nop
glabel .L800F1E3C
/* 8B2EC 800F1E3C 2404000E */ addiu $a0, $zero, 0xE
/* 8B2F0 800F1E40 24070091 */ addiu $a3, $zero, 0x91
/* 8B2F4 800F1E44 3C038011 */ lui $v1, %hi(PopupMenu_DisplayedEntryCount)
/* 8B2F8 800F1E48 8063D656 */ lb $v1, %lo(PopupMenu_DisplayedEntryCount)($v1)
/* 8B2FC 800F1E4C 24020014 */ addiu $v0, $zero, 0x14
/* 8B300 800F1E50 AFA20014 */ sw $v0, 0x14($sp)
/* 8B304 800F1E54 3C02800F */ lui $v0, %hi(popup_menu_draw_menu_contents)
/* 8B308 800F1E58 24423680 */ addiu $v0, $v0, %lo(popup_menu_draw_menu_contents)
/* 8B30C 800F1E5C AFA20018 */ sw $v0, 0x18($sp)
/* 8B310 800F1E60 2402FFFF */ addiu $v0, $zero, -0x1
/* 8B314 800F1E64 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B318 800F1E68 AFA20020 */ sw $v0, 0x20($sp)
/* 8B31C 800F1E6C 00031040 */ sll $v0, $v1, 1
/* 8B320 800F1E70 00431021 */ addu $v0, $v0, $v1
/* 8B324 800F1E74 00021080 */ sll $v0, $v0, 2
/* 8B328 800F1E78 00431021 */ addu $v0, $v0, $v1
/* 8B32C 800F1E7C 2442001A */ addiu $v0, $v0, 0x1A
/* 8B330 800F1E80 0C051F32 */ jal set_window_properties
/* 8B334 800F1E84 AFA20010 */ sw $v0, 0x10($sp)
/* 8B338 800F1E88 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8B33C 800F1E8C 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8B340 800F1E90 8C42031C */ lw $v0, 0x31C($v0)
/* 8B344 800F1E94 14400005 */ bnez $v0, .L800F1EAC
/* 8B348 800F1E98 2404000F */ addiu $a0, $zero, 0xF
/* 8B34C 800F1E9C 24050019 */ addiu $a1, $zero, 0x19
/* 8B350 800F1EA0 2406FFFA */ addiu $a2, $zero, -0x6
/* 8B354 800F1EA4 0803C7AE */ j .L800F1EB8
/* 8B358 800F1EA8 2407005F */ addiu $a3, $zero, 0x5F
.L800F1EAC:
/* 8B35C 800F1EAC 2405000C */ addiu $a1, $zero, 0xC
/* 8B360 800F1EB0 2406FFFA */ addiu $a2, $zero, -0x6
/* 8B364 800F1EB4 24070079 */ addiu $a3, $zero, 0x79
.L800F1EB8:
/* 8B368 800F1EB8 24020010 */ addiu $v0, $zero, 0x10
/* 8B36C 800F1EBC AFA20010 */ sw $v0, 0x10($sp)
/* 8B370 800F1EC0 24020015 */ addiu $v0, $zero, 0x15
/* 8B374 800F1EC4 AFA20014 */ sw $v0, 0x14($sp)
/* 8B378 800F1EC8 3C02800F */ lui $v0, %hi(popup_menu_draw_title_contents)
/* 8B37C 800F1ECC 24424648 */ addiu $v0, $v0, %lo(popup_menu_draw_title_contents)
/* 8B380 800F1ED0 AFA20018 */ sw $v0, 0x18($sp)
/* 8B384 800F1ED4 2402000E */ addiu $v0, $zero, 0xE
/* 8B388 800F1ED8 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B38C 800F1EDC 0C051F32 */ jal set_window_properties
/* 8B390 800F1EE0 AFA20020 */ sw $v0, 0x20($sp)
/* 8B394 800F1EE4 2404000F */ addiu $a0, $zero, 0xF
/* 8B398 800F1EE8 0C051F9F */ jal set_window_update
/* 8B39C 800F1EEC 24050001 */ addiu $a1, $zero, 0x1
/* 8B3A0 800F1EF0 24040011 */ addiu $a0, $zero, 0x11
/* 8B3A4 800F1EF4 0803C902 */ j .L800F2408
glabel func_800F1EF8
/* 8B3A8 800F1EF8 24050002 */ addiu $a1, $zero, 0x2
glabel .L800F1EFC
/* 8B3AC 800F1EFC 2404000E */ addiu $a0, $zero, 0xE
/* 8B3B0 800F1F00 2407008B */ addiu $a3, $zero, 0x8B
/* 8B3B4 800F1F04 3C038011 */ lui $v1, %hi(PopupMenu_DisplayedEntryCount)
/* 8B3B8 800F1F08 8063D656 */ lb $v1, %lo(PopupMenu_DisplayedEntryCount)($v1)
/* 8B3BC 800F1F0C 24020014 */ addiu $v0, $zero, 0x14
/* 8B3C0 800F1F10 AFA20014 */ sw $v0, 0x14($sp)
/* 8B3C4 800F1F14 3C02800F */ lui $v0, %hi(popup_menu_draw_menu_contents)
/* 8B3C8 800F1F18 24423680 */ addiu $v0, $v0, %lo(popup_menu_draw_menu_contents)
/* 8B3CC 800F1F1C AFA20018 */ sw $v0, 0x18($sp)
/* 8B3D0 800F1F20 2402FFFF */ addiu $v0, $zero, -0x1
/* 8B3D4 800F1F24 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B3D8 800F1F28 AFA20020 */ sw $v0, 0x20($sp)
/* 8B3DC 800F1F2C 00031040 */ sll $v0, $v1, 1
/* 8B3E0 800F1F30 00431021 */ addu $v0, $v0, $v1
/* 8B3E4 800F1F34 00021080 */ sll $v0, $v0, 2
/* 8B3E8 800F1F38 00431021 */ addu $v0, $v0, $v1
/* 8B3EC 800F1F3C 2442001A */ addiu $v0, $v0, 0x1A
/* 8B3F0 800F1F40 0C051F32 */ jal set_window_properties
/* 8B3F4 800F1F44 AFA20010 */ sw $v0, 0x10($sp)
/* 8B3F8 800F1F48 24040011 */ addiu $a0, $zero, 0x11
/* 8B3FC 800F1F4C 0803C8F0 */ j .L800F23C0
/* 8B400 800F1F50 2405000D */ addiu $a1, $zero, 0xD
glabel .L800F1F54
/* 8B404 800F1F54 2404000E */ addiu $a0, $zero, 0xE
/* 8B408 800F1F58 240700A2 */ addiu $a3, $zero, 0xA2
/* 8B40C 800F1F5C 3C038011 */ lui $v1, %hi(PopupMenu_DisplayedEntryCount)
/* 8B410 800F1F60 8063D656 */ lb $v1, %lo(PopupMenu_DisplayedEntryCount)($v1)
/* 8B414 800F1F64 24020014 */ addiu $v0, $zero, 0x14
/* 8B418 800F1F68 AFA20014 */ sw $v0, 0x14($sp)
/* 8B41C 800F1F6C 3C02800F */ lui $v0, %hi(popup_menu_draw_menu_contents)
/* 8B420 800F1F70 24423680 */ addiu $v0, $v0, %lo(popup_menu_draw_menu_contents)
/* 8B424 800F1F74 AFA20018 */ sw $v0, 0x18($sp)
/* 8B428 800F1F78 2402FFFF */ addiu $v0, $zero, -0x1
/* 8B42C 800F1F7C AFA0001C */ sw $zero, 0x1C($sp)
/* 8B430 800F1F80 AFA20020 */ sw $v0, 0x20($sp)
/* 8B434 800F1F84 00031040 */ sll $v0, $v1, 1
/* 8B438 800F1F88 00431021 */ addu $v0, $v0, $v1
/* 8B43C 800F1F8C 00021080 */ sll $v0, $v0, 2
/* 8B440 800F1F90 00431021 */ addu $v0, $v0, $v1
/* 8B444 800F1F94 2442001A */ addiu $v0, $v0, 0x1A
/* 8B448 800F1F98 0C051F32 */ jal set_window_properties
/* 8B44C 800F1F9C AFA20010 */ sw $v0, 0x10($sp)
/* 8B450 800F1FA0 2404000F */ addiu $a0, $zero, 0xF
/* 8B454 800F1FA4 24050011 */ addiu $a1, $zero, 0x11
/* 8B458 800F1FA8 2406FFFA */ addiu $a2, $zero, -0x6
/* 8B45C 800F1FAC 24070060 */ addiu $a3, $zero, 0x60
/* 8B460 800F1FB0 24020010 */ addiu $v0, $zero, 0x10
/* 8B464 800F1FB4 AFA20010 */ sw $v0, 0x10($sp)
/* 8B468 800F1FB8 24020015 */ addiu $v0, $zero, 0x15
/* 8B46C 800F1FBC AFA20014 */ sw $v0, 0x14($sp)
/* 8B470 800F1FC0 3C02800F */ lui $v0, %hi(popup_menu_draw_title_contents)
/* 8B474 800F1FC4 24424648 */ addiu $v0, $v0, %lo(popup_menu_draw_title_contents)
/* 8B478 800F1FC8 AFA20018 */ sw $v0, 0x18($sp)
/* 8B47C 800F1FCC 2402000E */ addiu $v0, $zero, 0xE
/* 8B480 800F1FD0 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B484 800F1FD4 0C051F32 */ jal set_window_properties
/* 8B488 800F1FD8 AFA20020 */ sw $v0, 0x20($sp)
/* 8B48C 800F1FDC 2404000F */ addiu $a0, $zero, 0xF
/* 8B490 800F1FE0 0C051F9F */ jal set_window_update
/* 8B494 800F1FE4 24050001 */ addiu $a1, $zero, 0x1
/* 8B498 800F1FE8 24040011 */ addiu $a0, $zero, 0x11
/* 8B49C 800F1FEC 0803C902 */ j .L800F2408
/* 8B4A0 800F1FF0 24050002 */ addiu $a1, $zero, 0x2
glabel .L800F1FF4
/* 8B4A4 800F1FF4 2404000E */ addiu $a0, $zero, 0xE
/* 8B4A8 800F1FF8 24070092 */ addiu $a3, $zero, 0x92
/* 8B4AC 800F1FFC 3C038011 */ lui $v1, %hi(PopupMenu_DisplayedEntryCount)
/* 8B4B0 800F2000 8063D656 */ lb $v1, %lo(PopupMenu_DisplayedEntryCount)($v1)
/* 8B4B4 800F2004 24020014 */ addiu $v0, $zero, 0x14
/* 8B4B8 800F2008 AFA20014 */ sw $v0, 0x14($sp)
/* 8B4BC 800F200C 3C02800F */ lui $v0, %hi(popup_menu_draw_menu_contents)
/* 8B4C0 800F2010 24423680 */ addiu $v0, $v0, %lo(popup_menu_draw_menu_contents)
/* 8B4C4 800F2014 AFA20018 */ sw $v0, 0x18($sp)
/* 8B4C8 800F2018 2402FFFF */ addiu $v0, $zero, -0x1
/* 8B4CC 800F201C AFA0001C */ sw $zero, 0x1C($sp)
/* 8B4D0 800F2020 AFA20020 */ sw $v0, 0x20($sp)
/* 8B4D4 800F2024 00031040 */ sll $v0, $v1, 1
/* 8B4D8 800F2028 00431021 */ addu $v0, $v0, $v1
/* 8B4DC 800F202C 00021080 */ sll $v0, $v0, 2
/* 8B4E0 800F2030 00431021 */ addu $v0, $v0, $v1
/* 8B4E4 800F2034 2442001A */ addiu $v0, $v0, 0x1A
/* 8B4E8 800F2038 0C051F32 */ jal set_window_properties
/* 8B4EC 800F203C AFA20010 */ sw $v0, 0x10($sp)
/* 8B4F0 800F2040 24040011 */ addiu $a0, $zero, 0x11
/* 8B4F4 800F2044 0803C8F0 */ j .L800F23C0
/* 8B4F8 800F2048 2405000C */ addiu $a1, $zero, 0xC
glabel .L800F204C
/* 8B4FC 800F204C 2404000E */ addiu $a0, $zero, 0xE
/* 8B500 800F2050 240700A7 */ addiu $a3, $zero, 0xA7
/* 8B504 800F2054 3C038011 */ lui $v1, %hi(PopupMenu_DisplayedEntryCount)
/* 8B508 800F2058 8063D656 */ lb $v1, %lo(PopupMenu_DisplayedEntryCount)($v1)
/* 8B50C 800F205C 24020014 */ addiu $v0, $zero, 0x14
/* 8B510 800F2060 AFA20014 */ sw $v0, 0x14($sp)
/* 8B514 800F2064 3C02800F */ lui $v0, %hi(popup_menu_draw_menu_contents)
/* 8B518 800F2068 24423680 */ addiu $v0, $v0, %lo(popup_menu_draw_menu_contents)
/* 8B51C 800F206C AFA20018 */ sw $v0, 0x18($sp)
/* 8B520 800F2070 2402FFFF */ addiu $v0, $zero, -0x1
/* 8B524 800F2074 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B528 800F2078 AFA20020 */ sw $v0, 0x20($sp)
/* 8B52C 800F207C 00031040 */ sll $v0, $v1, 1
/* 8B530 800F2080 00431021 */ addu $v0, $v0, $v1
/* 8B534 800F2084 00021080 */ sll $v0, $v0, 2
/* 8B538 800F2088 00431021 */ addu $v0, $v0, $v1
/* 8B53C 800F208C 2442001A */ addiu $v0, $v0, 0x1A
/* 8B540 800F2090 0C051F32 */ jal set_window_properties
/* 8B544 800F2094 AFA20010 */ sw $v0, 0x10($sp)
/* 8B548 800F2098 2404000F */ addiu $a0, $zero, 0xF
/* 8B54C 800F209C 24050016 */ addiu $a1, $zero, 0x16
/* 8B550 800F20A0 2406FFFA */ addiu $a2, $zero, -0x6
/* 8B554 800F20A4 2407005F */ addiu $a3, $zero, 0x5F
/* 8B558 800F20A8 24020010 */ addiu $v0, $zero, 0x10
/* 8B55C 800F20AC AFA20010 */ sw $v0, 0x10($sp)
/* 8B560 800F20B0 24020015 */ addiu $v0, $zero, 0x15
/* 8B564 800F20B4 AFA20014 */ sw $v0, 0x14($sp)
/* 8B568 800F20B8 3C02800F */ lui $v0, %hi(popup_menu_draw_title_contents)
/* 8B56C 800F20BC 24424648 */ addiu $v0, $v0, %lo(popup_menu_draw_title_contents)
/* 8B570 800F20C0 AFA20018 */ sw $v0, 0x18($sp)
/* 8B574 800F20C4 2402000E */ addiu $v0, $zero, 0xE
/* 8B578 800F20C8 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B57C 800F20CC 0C051F32 */ jal set_window_properties
/* 8B580 800F20D0 AFA20020 */ sw $v0, 0x20($sp)
/* 8B584 800F20D4 2404000F */ addiu $a0, $zero, 0xF
/* 8B588 800F20D8 0C051F9F */ jal set_window_update
/* 8B58C 800F20DC 24050001 */ addiu $a1, $zero, 0x1
/* 8B590 800F20E0 24040011 */ addiu $a0, $zero, 0x11
/* 8B594 800F20E4 0803C902 */ j .L800F2408
/* 8B598 800F20E8 24050002 */ addiu $a1, $zero, 0x2
glabel .L800F20EC
/* 8B59C 800F20EC 2404000E */ addiu $a0, $zero, 0xE
/* 8B5A0 800F20F0 240700AA */ addiu $a3, $zero, 0xAA
/* 8B5A4 800F20F4 3C038011 */ lui $v1, %hi(PopupMenu_DisplayedEntryCount)
/* 8B5A8 800F20F8 8063D656 */ lb $v1, %lo(PopupMenu_DisplayedEntryCount)($v1)
/* 8B5AC 800F20FC 24020014 */ addiu $v0, $zero, 0x14
/* 8B5B0 800F2100 AFA20014 */ sw $v0, 0x14($sp)
/* 8B5B4 800F2104 3C02800F */ lui $v0, %hi(popup_menu_draw_menu_contents)
/* 8B5B8 800F2108 24423680 */ addiu $v0, $v0, %lo(popup_menu_draw_menu_contents)
/* 8B5BC 800F210C AFA20018 */ sw $v0, 0x18($sp)
/* 8B5C0 800F2110 2402FFFF */ addiu $v0, $zero, -0x1
/* 8B5C4 800F2114 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B5C8 800F2118 AFA20020 */ sw $v0, 0x20($sp)
/* 8B5CC 800F211C 00031040 */ sll $v0, $v1, 1
/* 8B5D0 800F2120 00431021 */ addu $v0, $v0, $v1
/* 8B5D4 800F2124 00021080 */ sll $v0, $v0, 2
/* 8B5D8 800F2128 00431021 */ addu $v0, $v0, $v1
/* 8B5DC 800F212C 2442001A */ addiu $v0, $v0, 0x1A
/* 8B5E0 800F2130 0C051F32 */ jal set_window_properties
/* 8B5E4 800F2134 AFA20010 */ sw $v0, 0x10($sp)
/* 8B5E8 800F2138 2404000F */ addiu $a0, $zero, 0xF
/* 8B5EC 800F213C 24050020 */ addiu $a1, $zero, 0x20
/* 8B5F0 800F2140 2406FFFA */ addiu $a2, $zero, -0x6
/* 8B5F4 800F2144 24070068 */ addiu $a3, $zero, 0x68
/* 8B5F8 800F2148 24020010 */ addiu $v0, $zero, 0x10
/* 8B5FC 800F214C AFA20010 */ sw $v0, 0x10($sp)
/* 8B600 800F2150 24020015 */ addiu $v0, $zero, 0x15
/* 8B604 800F2154 AFA20014 */ sw $v0, 0x14($sp)
/* 8B608 800F2158 3C02800F */ lui $v0, %hi(popup_menu_draw_title_contents)
/* 8B60C 800F215C 24424648 */ addiu $v0, $v0, %lo(popup_menu_draw_title_contents)
/* 8B610 800F2160 AFA20018 */ sw $v0, 0x18($sp)
/* 8B614 800F2164 2402000E */ addiu $v0, $zero, 0xE
/* 8B618 800F2168 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B61C 800F216C 0C051F32 */ jal set_window_properties
/* 8B620 800F2170 AFA20020 */ sw $v0, 0x20($sp)
/* 8B624 800F2174 2404000F */ addiu $a0, $zero, 0xF
/* 8B628 800F2178 0C051F9F */ jal set_window_update
/* 8B62C 800F217C 24050001 */ addiu $a1, $zero, 0x1
/* 8B630 800F2180 24040011 */ addiu $a0, $zero, 0x11
/* 8B634 800F2184 0803C902 */ j .L800F2408
/* 8B638 800F2188 24050002 */ addiu $a1, $zero, 0x2
glabel .L800F218C
/* 8B63C 800F218C 2404000E */ addiu $a0, $zero, 0xE
/* 8B640 800F2190 24070091 */ addiu $a3, $zero, 0x91
/* 8B644 800F2194 3C038011 */ lui $v1, %hi(PopupMenu_DisplayedEntryCount)
/* 8B648 800F2198 8063D656 */ lb $v1, %lo(PopupMenu_DisplayedEntryCount)($v1)
/* 8B64C 800F219C 24020014 */ addiu $v0, $zero, 0x14
/* 8B650 800F21A0 AFA20014 */ sw $v0, 0x14($sp)
/* 8B654 800F21A4 3C02800F */ lui $v0, %hi(popup_menu_draw_menu_contents)
/* 8B658 800F21A8 24423680 */ addiu $v0, $v0, %lo(popup_menu_draw_menu_contents)
/* 8B65C 800F21AC AFA20018 */ sw $v0, 0x18($sp)
/* 8B660 800F21B0 2402FFFF */ addiu $v0, $zero, -0x1
/* 8B664 800F21B4 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B668 800F21B8 AFA20020 */ sw $v0, 0x20($sp)
/* 8B66C 800F21BC 00031040 */ sll $v0, $v1, 1
/* 8B670 800F21C0 00431021 */ addu $v0, $v0, $v1
/* 8B674 800F21C4 00021080 */ sll $v0, $v0, 2
/* 8B678 800F21C8 00431021 */ addu $v0, $v0, $v1
/* 8B67C 800F21CC 2442001A */ addiu $v0, $v0, 0x1A
/* 8B680 800F21D0 0C051F32 */ jal set_window_properties
/* 8B684 800F21D4 AFA20010 */ sw $v0, 0x10($sp)
/* 8B688 800F21D8 2404000F */ addiu $a0, $zero, 0xF
/* 8B68C 800F21DC 2405000C */ addiu $a1, $zero, 0xC
/* 8B690 800F21E0 2406FFFA */ addiu $a2, $zero, -0x6
/* 8B694 800F21E4 24070079 */ addiu $a3, $zero, 0x79
/* 8B698 800F21E8 24020010 */ addiu $v0, $zero, 0x10
/* 8B69C 800F21EC AFA20010 */ sw $v0, 0x10($sp)
/* 8B6A0 800F21F0 24020015 */ addiu $v0, $zero, 0x15
/* 8B6A4 800F21F4 AFA20014 */ sw $v0, 0x14($sp)
/* 8B6A8 800F21F8 3C02800F */ lui $v0, %hi(popup_menu_draw_title_contents)
/* 8B6AC 800F21FC 24424648 */ addiu $v0, $v0, %lo(popup_menu_draw_title_contents)
/* 8B6B0 800F2200 AFA20018 */ sw $v0, 0x18($sp)
/* 8B6B4 800F2204 2402000E */ addiu $v0, $zero, 0xE
/* 8B6B8 800F2208 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B6BC 800F220C 0C051F32 */ jal set_window_properties
/* 8B6C0 800F2210 AFA20020 */ sw $v0, 0x20($sp)
/* 8B6C4 800F2214 2404000F */ addiu $a0, $zero, 0xF
/* 8B6C8 800F2218 0C051F9F */ jal set_window_update
/* 8B6CC 800F221C 24050001 */ addiu $a1, $zero, 0x1
/* 8B6D0 800F2220 24040011 */ addiu $a0, $zero, 0x11
/* 8B6D4 800F2224 0803C902 */ j .L800F2408
/* 8B6D8 800F2228 24050002 */ addiu $a1, $zero, 0x2
glabel .L800F222C
/* 8B6DC 800F222C 2404000E */ addiu $a0, $zero, 0xE
/* 8B6E0 800F2230 24070080 */ addiu $a3, $zero, 0x80
/* 8B6E4 800F2234 3C038011 */ lui $v1, %hi(PopupMenu_DisplayedEntryCount)
/* 8B6E8 800F2238 8063D656 */ lb $v1, %lo(PopupMenu_DisplayedEntryCount)($v1)
/* 8B6EC 800F223C 24020014 */ addiu $v0, $zero, 0x14
/* 8B6F0 800F2240 AFA20014 */ sw $v0, 0x14($sp)
/* 8B6F4 800F2244 3C02800F */ lui $v0, %hi(popup_menu_draw_menu_contents)
/* 8B6F8 800F2248 24423680 */ addiu $v0, $v0, %lo(popup_menu_draw_menu_contents)
/* 8B6FC 800F224C AFA20018 */ sw $v0, 0x18($sp)
/* 8B700 800F2250 2402FFFF */ addiu $v0, $zero, -0x1
/* 8B704 800F2254 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B708 800F2258 AFA20020 */ sw $v0, 0x20($sp)
/* 8B70C 800F225C 00031040 */ sll $v0, $v1, 1
/* 8B710 800F2260 00431021 */ addu $v0, $v0, $v1
/* 8B714 800F2264 00021080 */ sll $v0, $v0, 2
/* 8B718 800F2268 00431021 */ addu $v0, $v0, $v1
/* 8B71C 800F226C 2442001A */ addiu $v0, $v0, 0x1A
/* 8B720 800F2270 0C051F32 */ jal set_window_properties
/* 8B724 800F2274 AFA20010 */ sw $v0, 0x10($sp)
/* 8B728 800F2278 2404000F */ addiu $a0, $zero, 0xF
/* 8B72C 800F227C 2405000C */ addiu $a1, $zero, 0xC
/* 8B730 800F2280 2406FFFA */ addiu $a2, $zero, -0x6
/* 8B734 800F2284 24070068 */ addiu $a3, $zero, 0x68
/* 8B738 800F2288 24020010 */ addiu $v0, $zero, 0x10
/* 8B73C 800F228C AFA20010 */ sw $v0, 0x10($sp)
/* 8B740 800F2290 24020015 */ addiu $v0, $zero, 0x15
/* 8B744 800F2294 AFA20014 */ sw $v0, 0x14($sp)
/* 8B748 800F2298 3C02800F */ lui $v0, %hi(popup_menu_draw_title_contents)
/* 8B74C 800F229C 24424648 */ addiu $v0, $v0, %lo(popup_menu_draw_title_contents)
/* 8B750 800F22A0 AFA20018 */ sw $v0, 0x18($sp)
/* 8B754 800F22A4 2402000E */ addiu $v0, $zero, 0xE
/* 8B758 800F22A8 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B75C 800F22AC 0C051F32 */ jal set_window_properties
/* 8B760 800F22B0 AFA20020 */ sw $v0, 0x20($sp)
/* 8B764 800F22B4 2404000F */ addiu $a0, $zero, 0xF
/* 8B768 800F22B8 0C051F9F */ jal set_window_update
/* 8B76C 800F22BC 24050001 */ addiu $a1, $zero, 0x1
/* 8B770 800F22C0 24040011 */ addiu $a0, $zero, 0x11
/* 8B774 800F22C4 0803C902 */ j .L800F2408
/* 8B778 800F22C8 24050002 */ addiu $a1, $zero, 0x2
glabel .L800F22CC
/* 8B77C 800F22CC 2404000E */ addiu $a0, $zero, 0xE
/* 8B780 800F22D0 24070095 */ addiu $a3, $zero, 0x95
/* 8B784 800F22D4 3C038011 */ lui $v1, %hi(PopupMenu_DisplayedEntryCount)
/* 8B788 800F22D8 8063D656 */ lb $v1, %lo(PopupMenu_DisplayedEntryCount)($v1)
/* 8B78C 800F22DC 24020014 */ addiu $v0, $zero, 0x14
/* 8B790 800F22E0 AFA20014 */ sw $v0, 0x14($sp)
/* 8B794 800F22E4 3C02800F */ lui $v0, %hi(popup_menu_draw_menu_contents)
/* 8B798 800F22E8 24423680 */ addiu $v0, $v0, %lo(popup_menu_draw_menu_contents)
/* 8B79C 800F22EC AFA20018 */ sw $v0, 0x18($sp)
/* 8B7A0 800F22F0 2402FFFF */ addiu $v0, $zero, -0x1
/* 8B7A4 800F22F4 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B7A8 800F22F8 AFA20020 */ sw $v0, 0x20($sp)
/* 8B7AC 800F22FC 00031040 */ sll $v0, $v1, 1
/* 8B7B0 800F2300 00431021 */ addu $v0, $v0, $v1
/* 8B7B4 800F2304 00021080 */ sll $v0, $v0, 2
/* 8B7B8 800F2308 00431021 */ addu $v0, $v0, $v1
/* 8B7BC 800F230C 2442001A */ addiu $v0, $v0, 0x1A
/* 8B7C0 800F2310 0C051F32 */ jal set_window_properties
/* 8B7C4 800F2314 AFA20010 */ sw $v0, 0x10($sp)
/* 8B7C8 800F2318 2404000F */ addiu $a0, $zero, 0xF
/* 8B7CC 800F231C 24050006 */ addiu $a1, $zero, 0x6
/* 8B7D0 800F2320 2406FFFA */ addiu $a2, $zero, -0x6
/* 8B7D4 800F2324 2407008B */ addiu $a3, $zero, 0x8B
/* 8B7D8 800F2328 24020010 */ addiu $v0, $zero, 0x10
/* 8B7DC 800F232C AFA20010 */ sw $v0, 0x10($sp)
/* 8B7E0 800F2330 24020015 */ addiu $v0, $zero, 0x15
/* 8B7E4 800F2334 AFA20014 */ sw $v0, 0x14($sp)
/* 8B7E8 800F2338 3C02800F */ lui $v0, %hi(popup_menu_draw_title_contents)
/* 8B7EC 800F233C 24424648 */ addiu $v0, $v0, %lo(popup_menu_draw_title_contents)
/* 8B7F0 800F2340 AFA20018 */ sw $v0, 0x18($sp)
/* 8B7F4 800F2344 2402000E */ addiu $v0, $zero, 0xE
/* 8B7F8 800F2348 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B7FC 800F234C 0C051F32 */ jal set_window_properties
/* 8B800 800F2350 AFA20020 */ sw $v0, 0x20($sp)
/* 8B804 800F2354 2404000F */ addiu $a0, $zero, 0xF
/* 8B808 800F2358 0C051F9F */ jal set_window_update
/* 8B80C 800F235C 24050001 */ addiu $a1, $zero, 0x1
/* 8B810 800F2360 24040011 */ addiu $a0, $zero, 0x11
/* 8B814 800F2364 0803C902 */ j .L800F2408
/* 8B818 800F2368 24050002 */ addiu $a1, $zero, 0x2
glabel .L800F236C
/* 8B81C 800F236C 2404000E */ addiu $a0, $zero, 0xE
/* 8B820 800F2370 24070083 */ addiu $a3, $zero, 0x83
/* 8B824 800F2374 3C038011 */ lui $v1, %hi(PopupMenu_DisplayedEntryCount)
/* 8B828 800F2378 8063D656 */ lb $v1, %lo(PopupMenu_DisplayedEntryCount)($v1)
/* 8B82C 800F237C 24020014 */ addiu $v0, $zero, 0x14
/* 8B830 800F2380 AFA20014 */ sw $v0, 0x14($sp)
/* 8B834 800F2384 3C02800F */ lui $v0, %hi(popup_menu_draw_menu_contents)
/* 8B838 800F2388 24423680 */ addiu $v0, $v0, %lo(popup_menu_draw_menu_contents)
/* 8B83C 800F238C AFA20018 */ sw $v0, 0x18($sp)
/* 8B840 800F2390 2402FFFF */ addiu $v0, $zero, -0x1
/* 8B844 800F2394 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B848 800F2398 AFA20020 */ sw $v0, 0x20($sp)
/* 8B84C 800F239C 00031040 */ sll $v0, $v1, 1
/* 8B850 800F23A0 00431021 */ addu $v0, $v0, $v1
/* 8B854 800F23A4 00021080 */ sll $v0, $v0, 2
/* 8B858 800F23A8 00431021 */ addu $v0, $v0, $v1
/* 8B85C 800F23AC 2442001A */ addiu $v0, $v0, 0x1A
/* 8B860 800F23B0 0C051F32 */ jal set_window_properties
/* 8B864 800F23B4 AFA20010 */ sw $v0, 0x10($sp)
/* 8B868 800F23B8 24040011 */ addiu $a0, $zero, 0x11
/* 8B86C 800F23BC 2405000A */ addiu $a1, $zero, 0xA
.L800F23C0:
/* 8B870 800F23C0 2406FFFA */ addiu $a2, $zero, -0x6
/* 8B874 800F23C4 24070072 */ addiu $a3, $zero, 0x72
/* 8B878 800F23C8 24020010 */ addiu $v0, $zero, 0x10
/* 8B87C 800F23CC AFA20010 */ sw $v0, 0x10($sp)
/* 8B880 800F23D0 24020015 */ addiu $v0, $zero, 0x15
/* 8B884 800F23D4 AFA20014 */ sw $v0, 0x14($sp)
/* 8B888 800F23D8 3C02800F */ lui $v0, %hi(popup_menu_draw_title_contents)
/* 8B88C 800F23DC 24424648 */ addiu $v0, $v0, %lo(popup_menu_draw_title_contents)
/* 8B890 800F23E0 AFA20018 */ sw $v0, 0x18($sp)
/* 8B894 800F23E4 2402000E */ addiu $v0, $zero, 0xE
/* 8B898 800F23E8 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B89C 800F23EC 0C051F32 */ jal set_window_properties
/* 8B8A0 800F23F0 AFA20020 */ sw $v0, 0x20($sp)
/* 8B8A4 800F23F4 2404000F */ addiu $a0, $zero, 0xF
/* 8B8A8 800F23F8 0C051F9F */ jal set_window_update
/* 8B8AC 800F23FC 24050002 */ addiu $a1, $zero, 0x2
/* 8B8B0 800F2400 24040011 */ addiu $a0, $zero, 0x11
/* 8B8B4 800F2404 24050001 */ addiu $a1, $zero, 0x1
.L800F2408:
/* 8B8B8 800F2408 0C051F9F */ jal set_window_update
/* 8B8BC 800F240C 00000000 */ nop
.L800F2410:
/* 8B8C0 800F2410 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8B8C4 800F2414 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8B8C8 800F2418 8C430318 */ lw $v1, 0x318($v0)
/* 8B8CC 800F241C 24020003 */ addiu $v0, $zero, 0x3
/* 8B8D0 800F2420 10620005 */ beq $v1, $v0, .L800F2438
/* 8B8D4 800F2424 24020005 */ addiu $v0, $zero, 0x5
/* 8B8D8 800F2428 10620006 */ beq $v1, $v0, .L800F2444
/* 8B8DC 800F242C 24040010 */ addiu $a0, $zero, 0x10
/* 8B8E0 800F2430 0803C91F */ j .L800F247C
/* 8B8E4 800F2434 00000000 */ nop
.L800F2438:
/* 8B8E8 800F2438 24040010 */ addiu $a0, $zero, 0x10
/* 8B8EC 800F243C 0803C912 */ j .L800F2448
/* 8B8F0 800F2440 2405007E */ addiu $a1, $zero, 0x7E
.L800F2444:
/* 8B8F4 800F2444 24050083 */ addiu $a1, $zero, 0x83
.L800F2448:
/* 8B8F8 800F2448 2406FFF2 */ addiu $a2, $zero, -0xE
/* 8B8FC 800F244C 24070020 */ addiu $a3, $zero, 0x20
/* 8B900 800F2450 00E0102D */ daddu $v0, $a3, $zero
/* 8B904 800F2454 AFA20010 */ sw $v0, 0x10($sp)
/* 8B908 800F2458 24020015 */ addiu $v0, $zero, 0x15
/* 8B90C 800F245C AFA20014 */ sw $v0, 0x14($sp)
/* 8B910 800F2460 3C02800F */ lui $v0, %hi(popup_draw_cost_icon)
/* 8B914 800F2464 24424C6C */ addiu $v0, $v0, %lo(popup_draw_cost_icon)
/* 8B918 800F2468 AFA20018 */ sw $v0, 0x18($sp)
/* 8B91C 800F246C 2402000E */ addiu $v0, $zero, 0xE
/* 8B920 800F2470 AFA0001C */ sw $zero, 0x1C($sp)
/* 8B924 800F2474 0C051F32 */ jal set_window_properties
/* 8B928 800F2478 AFA20020 */ sw $v0, 0x20($sp)
.L800F247C:
/* 8B92C 800F247C 3C108011 */ lui $s0, %hi(gPopupMenu)
/* 8B930 800F2480 2610D69C */ addiu $s0, $s0, %lo(gPopupMenu)
/* 8B934 800F2484 8E020000 */ lw $v0, 0x0($s0)
/* 8B938 800F2488 8C430318 */ lw $v1, 0x318($v0)
/* 8B93C 800F248C 24020003 */ addiu $v0, $zero, 0x3
/* 8B940 800F2490 14620011 */ bne $v1, $v0, .L800F24D8
/* 8B944 800F2494 24040014 */ addiu $a0, $zero, 0x14
/* 8B948 800F2498 24070040 */ addiu $a3, $zero, 0x40
/* 8B94C 800F249C 3C058011 */ lui $a1, %hi(PopupMenu_StarPieceCounterPosX)
/* 8B950 800F24A0 84A5D688 */ lh $a1, %lo(PopupMenu_StarPieceCounterPosX)($a1)
/* 8B954 800F24A4 3C068011 */ lui $a2, %hi(PopupMenu_StarPieceCounterPosY)
/* 8B958 800F24A8 84C6D68A */ lh $a2, %lo(PopupMenu_StarPieceCounterPosY)($a2)
/* 8B95C 800F24AC 0080102D */ daddu $v0, $a0, $zero
/* 8B960 800F24B0 AFA20010 */ sw $v0, 0x10($sp)
/* 8B964 800F24B4 24020015 */ addiu $v0, $zero, 0x15
/* 8B968 800F24B8 AFA20014 */ sw $v0, 0x14($sp)
/* 8B96C 800F24BC 3C02800F */ lui $v0, %hi(func_800F4D28)
/* 8B970 800F24C0 24424D28 */ addiu $v0, $v0, %lo(func_800F4D28)
/* 8B974 800F24C4 AFA20018 */ sw $v0, 0x18($sp)
/* 8B978 800F24C8 2402FFFF */ addiu $v0, $zero, -0x1
/* 8B97C 800F24CC AFA0001C */ sw $zero, 0x1C($sp)
/* 8B980 800F24D0 0C051F32 */ jal set_window_properties
/* 8B984 800F24D4 AFA20020 */ sw $v0, 0x20($sp)
.L800F24D8:
/* 8B988 800F24D8 3C078011 */ lui $a3, %hi(PopupMenu_FirstDisplayIndex)
/* 8B98C 800F24DC 24E7D654 */ addiu $a3, $a3, %lo(PopupMenu_FirstDisplayIndex)
/* 8B990 800F24E0 0200582D */ daddu $t3, $s0, $zero
/* 8B994 800F24E4 3C0A8011 */ lui $t2, %hi(PopupMenu_MaxDisplayableEntryCount)
/* 8B998 800F24E8 254AD68F */ addiu $t2, $t2, %lo(PopupMenu_MaxDisplayableEntryCount)
/* 8B99C 800F24EC 3C098011 */ lui $t1, %hi(PopupMenu_LastDisplayIndex)
/* 8B9A0 800F24F0 8129D655 */ lb $t1, %lo(PopupMenu_LastDisplayIndex)($t1)
/* 8B9A4 800F24F4 3C088011 */ lui $t0, %hi(PopupMenu_SelectedIndex)
/* 8B9A8 800F24F8 8D08D648 */ lw $t0, %lo(PopupMenu_SelectedIndex)($t0)
.L800F24FC:
/* 8B9AC 800F24FC 80E20000 */ lb $v0, 0x0($a3)
/* 8B9B0 800F2500 90E30000 */ lbu $v1, 0x0($a3)
/* 8B9B4 800F2504 00491021 */ addu $v0, $v0, $t1
/* 8B9B8 800F2508 2442FFFF */ addiu $v0, $v0, -0x1
/* 8B9BC 800F250C 0102102A */ slt $v0, $t0, $v0
/* 8B9C0 800F2510 14400013 */ bnez $v0, .L800F2560
/* 8B9C4 800F2514 0000302D */ daddu $a2, $zero, $zero
/* 8B9C8 800F2518 24620001 */ addiu $v0, $v1, 0x1
/* 8B9CC 800F251C A0E20000 */ sb $v0, 0x0($a3)
/* 8B9D0 800F2520 00021600 */ sll $v0, $v0, 24
/* 8B9D4 800F2524 8D650000 */ lw $a1, 0x0($t3)
/* 8B9D8 800F2528 81440000 */ lb $a0, 0x0($t2)
/* 8B9DC 800F252C 8CA30324 */ lw $v1, 0x324($a1)
/* 8B9E0 800F2530 00021603 */ sra $v0, $v0, 24
/* 8B9E4 800F2534 00641823 */ subu $v1, $v1, $a0
/* 8B9E8 800F2538 0062182A */ slt $v1, $v1, $v0
/* 8B9EC 800F253C 91440000 */ lbu $a0, 0x0($t2)
/* 8B9F0 800F2540 50600007 */ beql $v1, $zero, .L800F2560
/* 8B9F4 800F2544 24060001 */ addiu $a2, $zero, 0x1
/* 8B9F8 800F2548 90A20327 */ lbu $v0, 0x327($a1)
/* 8B9FC 800F254C 00441023 */ subu $v0, $v0, $a0
/* 8BA00 800F2550 A0E20000 */ sb $v0, 0x0($a3)
/* 8BA04 800F2554 00021600 */ sll $v0, $v0, 24
/* 8BA08 800F2558 04420001 */ bltzl $v0, .L800F2560
/* 8BA0C 800F255C A0E00000 */ sb $zero, 0x0($a3)
.L800F2560:
/* 8BA10 800F2560 14C0FFE6 */ bnez $a2, .L800F24FC
/* 8BA14 800F2564 00000000 */ nop
/* 8BA18 800F2568 3C038011 */ lui $v1, %hi(PopupMenu_FirstDisplayIndex)
/* 8BA1C 800F256C 9063D654 */ lbu $v1, %lo(PopupMenu_FirstDisplayIndex)($v1)
/* 8BA20 800F2570 3C028011 */ lui $v0, %hi(PopupMenu_MaxDisplayableEntryCount)
/* 8BA24 800F2574 9042D68F */ lbu $v0, %lo(PopupMenu_MaxDisplayableEntryCount)($v0)
/* 8BA28 800F2578 3C048011 */ lui $a0, %hi(gPopupMenu)
/* 8BA2C 800F257C 8C84D69C */ lw $a0, %lo(gPopupMenu)($a0)
/* 8BA30 800F2580 00621021 */ addu $v0, $v1, $v0
/* 8BA34 800F2584 00031E00 */ sll $v1, $v1, 24
/* 8BA38 800F2588 00031E03 */ sra $v1, $v1, 24
/* 8BA3C 800F258C 00031823 */ negu $v1, $v1
/* 8BA40 800F2590 3C018011 */ lui $at, %hi(PopupMenu_LastDisplayIndex)
/* 8BA44 800F2594 A022D655 */ sb $v0, %lo(PopupMenu_LastDisplayIndex)($at)
/* 8BA48 800F2598 00031040 */ sll $v0, $v1, 1
/* 8BA4C 800F259C 00431021 */ addu $v0, $v0, $v1
/* 8BA50 800F25A0 00021080 */ sll $v0, $v0, 2
/* 8BA54 800F25A4 8C840318 */ lw $a0, 0x318($a0)
/* 8BA58 800F25A8 00431021 */ addu $v0, $v0, $v1
/* 8BA5C 800F25AC 3C018011 */ lui $at, %hi(D_8010D658)
/* 8BA60 800F25B0 A422D658 */ sh $v0, %lo(D_8010D658)($at)
/* 8BA64 800F25B4 04800016 */ bltz $a0, .L800F2610
/* 8BA68 800F25B8 2882000A */ slti $v0, $a0, 0xA
/* 8BA6C 800F25BC 54400004 */ bnel $v0, $zero, .L800F25D0
/* 8BA70 800F25C0 24040013 */ addiu $a0, $zero, 0x13
/* 8BA74 800F25C4 2402000C */ addiu $v0, $zero, 0xC
/* 8BA78 800F25C8 14820011 */ bne $a0, $v0, .L800F2610
/* 8BA7C 800F25CC 24040013 */ addiu $a0, $zero, 0x13
.L800F25D0:
/* 8BA80 800F25D0 24070118 */ addiu $a3, $zero, 0x118
/* 8BA84 800F25D4 3C058011 */ lui $a1, %hi(D_8010D680)
/* 8BA88 800F25D8 84A5D680 */ lh $a1, %lo(D_8010D680)($a1)
/* 8BA8C 800F25DC 3C068011 */ lui $a2, %hi(D_8010D682)
/* 8BA90 800F25E0 84C6D682 */ lh $a2, %lo(D_8010D682)($a2)
/* 8BA94 800F25E4 24020020 */ addiu $v0, $zero, 0x20
/* 8BA98 800F25E8 AFA20010 */ sw $v0, 0x10($sp)
/* 8BA9C 800F25EC 24020014 */ addiu $v0, $zero, 0x14
/* 8BAA0 800F25F0 AFA20014 */ sw $v0, 0x14($sp)
/* 8BAA4 800F25F4 3C02800F */ lui $v0, %hi(func_800F48F4)
/* 8BAA8 800F25F8 244248F4 */ addiu $v0, $v0, %lo(func_800F48F4)
/* 8BAAC 800F25FC AFA20018 */ sw $v0, 0x18($sp)
/* 8BAB0 800F2600 2402FFFF */ addiu $v0, $zero, -0x1
/* 8BAB4 800F2604 AFA0001C */ sw $zero, 0x1C($sp)
/* 8BAB8 800F2608 0C051F32 */ jal set_window_properties
/* 8BABC 800F260C AFA20020 */ sw $v0, 0x20($sp)
.L800F2610:
/* 8BAC0 800F2610 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8BAC4 800F2614 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8BAC8 800F2618 3C058011 */ lui $a1, %hi(D_8010D684)
/* 8BACC 800F261C 84A5D684 */ lh $a1, %lo(D_8010D684)($a1)
/* 8BAD0 800F2620 8C430318 */ lw $v1, 0x318($v0)
/* 8BAD4 800F2624 3C068011 */ lui $a2, %hi(D_8010D686)
/* 8BAD8 800F2628 84C6D686 */ lh $a2, %lo(D_8010D686)($a2)
/* 8BADC 800F262C 2C62000E */ sltiu $v0, $v1, 0xE
/* 8BAE0 800F2630 10400026 */ beqz $v0, .L800F26CC
/* 8BAE4 800F2634 00031080 */ sll $v0, $v1, 2
/* 8BAE8 800F2638 3C018011 */ lui $at, %hi(jtbl_8010C608)
/* 8BAEC 800F263C 00220821 */ addu $at, $at, $v0
/* 8BAF0 800F2640 8C22C608 */ lw $v0, %lo(jtbl_8010C608)($at)
/* 8BAF4 800F2644 00400008 */ jr $v0
/* 8BAF8 800F2648 00000000 */ nop
glabel .L800F264C
/* 8BAFC 800F264C 24040015 */ addiu $a0, $zero, 0x15
/* 8BB00 800F2650 0803C9A8 */ j .L800F26A0
/* 8BB04 800F2654 24070090 */ addiu $a3, $zero, 0x90
glabel .L800F2658
/* 8BB08 800F2658 24040015 */ addiu $a0, $zero, 0x15
/* 8BB0C 800F265C 24070090 */ addiu $a3, $zero, 0x90
/* 8BB10 800F2660 0803C9A9 */ j .L800F26A4
/* 8BB14 800F2664 24020028 */ addiu $v0, $zero, 0x28
glabel .L800F2668
/* 8BB18 800F2668 24040015 */ addiu $a0, $zero, 0x15
/* 8BB1C 800F266C 24070080 */ addiu $a3, $zero, 0x80
/* 8BB20 800F2670 0803C9A9 */ j .L800F26A4
/* 8BB24 800F2674 24020028 */ addiu $v0, $zero, 0x28
glabel .L800F2678
/* 8BB28 800F2678 24040015 */ addiu $a0, $zero, 0x15
/* 8BB2C 800F267C 24070088 */ addiu $a3, $zero, 0x88
/* 8BB30 800F2680 0803C9A9 */ j .L800F26A4
/* 8BB34 800F2684 24020028 */ addiu $v0, $zero, 0x28
glabel .L800F2688
/* 8BB38 800F2688 24040015 */ addiu $a0, $zero, 0x15
/* 8BB3C 800F268C 24070070 */ addiu $a3, $zero, 0x70
/* 8BB40 800F2690 0803C9A9 */ j .L800F26A4
/* 8BB44 800F2694 24020028 */ addiu $v0, $zero, 0x28
glabel .L800F2698
/* 8BB48 800F2698 24040015 */ addiu $a0, $zero, 0x15
/* 8BB4C 800F269C 24070078 */ addiu $a3, $zero, 0x78
.L800F26A0:
/* 8BB50 800F26A0 24020020 */ addiu $v0, $zero, 0x20
.L800F26A4:
/* 8BB54 800F26A4 AFA20010 */ sw $v0, 0x10($sp)
/* 8BB58 800F26A8 24020014 */ addiu $v0, $zero, 0x14
/* 8BB5C 800F26AC AFA20014 */ sw $v0, 0x14($sp)
/* 8BB60 800F26B0 3C02800F */ lui $v0, %hi(func_800F4944)
/* 8BB64 800F26B4 24424944 */ addiu $v0, $v0, %lo(func_800F4944)
/* 8BB68 800F26B8 AFA20018 */ sw $v0, 0x18($sp)
/* 8BB6C 800F26BC 2402FFFF */ addiu $v0, $zero, -0x1
/* 8BB70 800F26C0 AFA0001C */ sw $zero, 0x1C($sp)
/* 8BB74 800F26C4 0C051F32 */ jal set_window_properties
/* 8BB78 800F26C8 AFA20020 */ sw $v0, 0x20($sp)
.L800F26CC:
/* 8BB7C 800F26CC 3C028011 */ lui $v0, %hi(PopupNotBattle)
/* 8BB80 800F26D0 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0)
/* 8BB84 800F26D4 14400018 */ bnez $v0, .L800F2738
/* 8BB88 800F26D8 00000000 */ nop
/* 8BB8C 800F26DC 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8BB90 800F26E0 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8BB94 800F26E4 8C430318 */ lw $v1, 0x318($v0)
/* 8BB98 800F26E8 2C62000E */ sltiu $v0, $v1, 0xE
/* 8BB9C 800F26EC 1040003A */ beqz $v0, .L800F27D8
/* 8BBA0 800F26F0 00031080 */ sll $v0, $v1, 2
/* 8BBA4 800F26F4 3C018011 */ lui $at, %hi(jtbl_8010C640)
/* 8BBA8 800F26F8 00220821 */ addu $at, $at, $v0
/* 8BBAC 800F26FC 8C22C640 */ lw $v0, %lo(jtbl_8010C640)($at)
/* 8BBB0 800F2700 00400008 */ jr $v0
/* 8BBB4 800F2704 00000000 */ nop
glabel .L800F2708
/* 8BBB8 800F2708 2404000E */ addiu $a0, $zero, 0xE
/* 8BBBC 800F270C 0C051F9F */ jal set_window_update
/* 8BBC0 800F2710 24050001 */ addiu $a1, $zero, 0x1
/* 8BBC4 800F2714 0803C9F4 */ j .L800F27D0
/* 8BBC8 800F2718 24040013 */ addiu $a0, $zero, 0x13
glabel .L800F271C
/* 8BBCC 800F271C 2404000E */ addiu $a0, $zero, 0xE
/* 8BBD0 800F2720 0C051F9F */ jal set_window_update
/* 8BBD4 800F2724 24050001 */ addiu $a1, $zero, 0x1
/* 8BBD8 800F2728 0803C9F4 */ j .L800F27D0
/* 8BBDC 800F272C 24040013 */ addiu $a0, $zero, 0x13
glabel .L800F2730
/* 8BBE0 800F2730 0803C9F4 */ j .L800F27D0
/* 8BBE4 800F2734 2404000E */ addiu $a0, $zero, 0xE
.L800F2738:
/* 8BBE8 800F2738 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8BBEC 800F273C 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8BBF0 800F2740 8C430318 */ lw $v1, 0x318($v0)
/* 8BBF4 800F2744 2C62000E */ sltiu $v0, $v1, 0xE
/* 8BBF8 800F2748 10400020 */ beqz $v0, .L800F27CC
/* 8BBFC 800F274C 00031080 */ sll $v0, $v1, 2
/* 8BC00 800F2750 3C018011 */ lui $at, %hi(jtbl_8010C678)
/* 8BC04 800F2754 00220821 */ addu $at, $at, $v0
/* 8BC08 800F2758 8C22C678 */ lw $v0, %lo(jtbl_8010C678)($at)
/* 8BC0C 800F275C 00400008 */ jr $v0
/* 8BC10 800F2760 00000000 */ nop
glabel .L800F2764
/* 8BC14 800F2764 2404000E */ addiu $a0, $zero, 0xE
/* 8BC18 800F2768 3C108014 */ lui $s0, %hi(basic_window_update)
/* 8BC1C 800F276C 26107474 */ addiu $s0, $s0, %lo(basic_window_update)
/* 8BC20 800F2770 0C051F9F */ jal set_window_update
/* 8BC24 800F2774 0200282D */ daddu $a1, $s0, $zero
/* 8BC28 800F2778 0803C9E6 */ j .L800F2798
/* 8BC2C 800F277C 24040001 */ addiu $a0, $zero, 0x1
glabel .L800F2780
/* 8BC30 800F2780 2404000E */ addiu $a0, $zero, 0xE
/* 8BC34 800F2784 3C108014 */ lui $s0, %hi(basic_window_update)
/* 8BC38 800F2788 26107474 */ addiu $s0, $s0, %lo(basic_window_update)
/* 8BC3C 800F278C 0C051F9F */ jal set_window_update
/* 8BC40 800F2790 0200282D */ daddu $a1, $s0, $zero
/* 8BC44 800F2794 24040002 */ addiu $a0, $zero, 0x2
.L800F2798:
/* 8BC48 800F2798 0C05272D */ jal sfx_play_sound
/* 8BC4C 800F279C 00000000 */ nop
/* 8BC50 800F27A0 24040013 */ addiu $a0, $zero, 0x13
/* 8BC54 800F27A4 0C051F9F */ jal set_window_update
/* 8BC58 800F27A8 0200282D */ daddu $a1, $s0, $zero
/* 8BC5C 800F27AC 0803C9F4 */ j .L800F27D0
/* 8BC60 800F27B0 24040015 */ addiu $a0, $zero, 0x15
glabel .L800F27B4
/* 8BC64 800F27B4 3C058014 */ lui $a1, %hi(basic_window_update)
/* 8BC68 800F27B8 24A57474 */ addiu $a1, $a1, %lo(basic_window_update)
/* 8BC6C 800F27BC 0C051F9F */ jal set_window_update
/* 8BC70 800F27C0 2404000E */ addiu $a0, $zero, 0xE
/* 8BC74 800F27C4 0C05272D */ jal sfx_play_sound
/* 8BC78 800F27C8 24040001 */ addiu $a0, $zero, 0x1
.L800F27CC:
/* 8BC7C 800F27CC 24040015 */ addiu $a0, $zero, 0x15
.L800F27D0:
/* 8BC80 800F27D0 0C051F9F */ jal set_window_update
/* 8BC84 800F27D4 24050001 */ addiu $a1, $zero, 0x1
.L800F27D8:
/* 8BC88 800F27D8 3C118011 */ lui $s1, %hi(gPopupMenu)
/* 8BC8C 800F27DC 2631D69C */ addiu $s1, $s1, %lo(gPopupMenu)
/* 8BC90 800F27E0 8E220000 */ lw $v0, 0x0($s1)
/* 8BC94 800F27E4 8C430318 */ lw $v1, 0x318($v0)
/* 8BC98 800F27E8 24020003 */ addiu $v0, $zero, 0x3
/* 8BC9C 800F27EC 14620008 */ bne $v1, $v0, .L800F2810
/* 8BCA0 800F27F0 24040010 */ addiu $a0, $zero, 0x10
/* 8BCA4 800F27F4 3C108014 */ lui $s0, %hi(basic_window_update)
/* 8BCA8 800F27F8 26107474 */ addiu $s0, $s0, %lo(basic_window_update)
/* 8BCAC 800F27FC 0C051F9F */ jal set_window_update
/* 8BCB0 800F2800 0200282D */ daddu $a1, $s0, $zero
/* 8BCB4 800F2804 24040014 */ addiu $a0, $zero, 0x14
/* 8BCB8 800F2808 0C051F9F */ jal set_window_update
/* 8BCBC 800F280C 0200282D */ daddu $a1, $s0, $zero
.L800F2810:
/* 8BCC0 800F2810 8E220000 */ lw $v0, 0x0($s1)
/* 8BCC4 800F2814 8C430318 */ lw $v1, 0x318($v0)
/* 8BCC8 800F2818 24020004 */ addiu $v0, $zero, 0x4
/* 8BCCC 800F281C 14620005 */ bne $v1, $v0, .L800F2834
/* 8BCD0 800F2820 00000000 */ nop
/* 8BCD4 800F2824 3C058014 */ lui $a1, %hi(basic_window_update)
/* 8BCD8 800F2828 24A57474 */ addiu $a1, $a1, %lo(basic_window_update)
/* 8BCDC 800F282C 0C051F9F */ jal set_window_update
/* 8BCE0 800F2830 24040012 */ addiu $a0, $zero, 0x12
.L800F2834:
/* 8BCE4 800F2834 8E220000 */ lw $v0, 0x0($s1)
/* 8BCE8 800F2838 8C430318 */ lw $v1, 0x318($v0)
/* 8BCEC 800F283C 24020005 */ addiu $v0, $zero, 0x5
/* 8BCF0 800F2840 14620382 */ bne $v1, $v0, .L800F364C
/* 8BCF4 800F2844 24020001 */ addiu $v0, $zero, 0x1
/* 8BCF8 800F2848 3C058014 */ lui $a1, %hi(basic_window_update)
/* 8BCFC 800F284C 24A57474 */ addiu $a1, $a1, %lo(basic_window_update)
/* 8BD00 800F2850 0C051F9F */ jal set_window_update
/* 8BD04 800F2854 24040010 */ addiu $a0, $zero, 0x10
/* 8BD08 800F2858 0803CD93 */ j .L800F364C
/* 8BD0C 800F285C 24020001 */ addiu $v0, $zero, 0x1
glabel .L800F2860
/* 8BD10 800F2860 3C038011 */ lui $v1, %hi(D_8010D644)
/* 8BD14 800F2864 2463D644 */ addiu $v1, $v1, %lo(D_8010D644)
/* 8BD18 800F2868 8C620000 */ lw $v0, 0x0($v1)
/* 8BD1C 800F286C 10400003 */ beqz $v0, .L800F287C
/* 8BD20 800F2870 2442FFFF */ addiu $v0, $v0, -0x1
/* 8BD24 800F2874 0803CD95 */ j .L800F3654
/* 8BD28 800F2878 AC620000 */ sw $v0, 0x0($v1)
.L800F287C:
/* 8BD2C 800F287C 3C060001 */ lui $a2, (0x12000 >> 16)
/* 8BD30 800F2880 3C058011 */ lui $a1, %hi(PopupMenu_SelectedIndex)
/* 8BD34 800F2884 24A5D648 */ addiu $a1, $a1, %lo(PopupMenu_SelectedIndex)
/* 8BD38 800F2888 3C048007 */ lui $a0, %hi(gGameStatusPtr)
/* 8BD3C 800F288C 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0)
/* 8BD40 800F2890 8CA30000 */ lw $v1, 0x0($a1)
/* 8BD44 800F2894 8C820020 */ lw $v0, 0x20($a0)
/* 8BD48 800F2898 34C62000 */ ori $a2, $a2, (0x12000 & 0xFFFF)
/* 8BD4C 800F289C 3C018011 */ lui $at, %hi(PopupMenu_PrevSelectedIndex)
/* 8BD50 800F28A0 AC23D64C */ sw $v1, %lo(PopupMenu_PrevSelectedIndex)($at)
/* 8BD54 800F28A4 00461024 */ and $v0, $v0, $a2
/* 8BD58 800F28A8 10400008 */ beqz $v0, .L800F28CC
/* 8BD5C 800F28AC 00000000 */ nop
/* 8BD60 800F28B0 1C600005 */ bgtz $v1, .L800F28C8
/* 8BD64 800F28B4 2462FFFF */ addiu $v0, $v1, -0x1
/* 8BD68 800F28B8 8C820010 */ lw $v0, 0x10($a0)
/* 8BD6C 800F28BC 00461024 */ and $v0, $v0, $a2
/* 8BD70 800F28C0 10400002 */ beqz $v0, .L800F28CC
/* 8BD74 800F28C4 2462FFFF */ addiu $v0, $v1, -0x1
.L800F28C8:
/* 8BD78 800F28C8 ACA20000 */ sw $v0, 0x0($a1)
.L800F28CC:
/* 8BD7C 800F28CC 3C058007 */ lui $a1, %hi(gGameStatusPtr)
/* 8BD80 800F28D0 8CA5419C */ lw $a1, %lo(gGameStatusPtr)($a1)
/* 8BD84 800F28D4 3C060002 */ lui $a2, (0x20010 >> 16)
/* 8BD88 800F28D8 8CA20020 */ lw $v0, 0x20($a1)
/* 8BD8C 800F28DC 34C60010 */ ori $a2, $a2, (0x20010 & 0xFFFF)
/* 8BD90 800F28E0 00461024 */ and $v0, $v0, $a2
/* 8BD94 800F28E4 10400010 */ beqz $v0, .L800F2928
/* 8BD98 800F28E8 00000000 */ nop
/* 8BD9C 800F28EC 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8BDA0 800F28F0 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8BDA4 800F28F4 3C048011 */ lui $a0, %hi(PopupMenu_SelectedIndex)
/* 8BDA8 800F28F8 2484D648 */ addiu $a0, $a0, %lo(PopupMenu_SelectedIndex)
/* 8BDAC 800F28FC 8C420324 */ lw $v0, 0x324($v0)
/* 8BDB0 800F2900 8C830000 */ lw $v1, 0x0($a0)
/* 8BDB4 800F2904 2442FFFF */ addiu $v0, $v0, -0x1
/* 8BDB8 800F2908 0062102A */ slt $v0, $v1, $v0
/* 8BDBC 800F290C 14400005 */ bnez $v0, .L800F2924
/* 8BDC0 800F2910 24620001 */ addiu $v0, $v1, 0x1
/* 8BDC4 800F2914 8CA20010 */ lw $v0, 0x10($a1)
/* 8BDC8 800F2918 00461024 */ and $v0, $v0, $a2
/* 8BDCC 800F291C 10400002 */ beqz $v0, .L800F2928
/* 8BDD0 800F2920 24620001 */ addiu $v0, $v1, 0x1
.L800F2924:
/* 8BDD4 800F2924 AC820000 */ sw $v0, 0x0($a0)
.L800F2928:
/* 8BDD8 800F2928 3C108011 */ lui $s0, %hi(PopupMenu_SelectedIndex)
/* 8BDDC 800F292C 2610D648 */ addiu $s0, $s0, %lo(PopupMenu_SelectedIndex)
/* 8BDE0 800F2930 8E020000 */ lw $v0, 0x0($s0)
/* 8BDE4 800F2934 04410006 */ bgez $v0, .L800F2950
/* 8BDE8 800F2938 00000000 */ nop
/* 8BDEC 800F293C 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8BDF0 800F2940 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8BDF4 800F2944 8C420324 */ lw $v0, 0x324($v0)
/* 8BDF8 800F2948 2442FFFF */ addiu $v0, $v0, -0x1
/* 8BDFC 800F294C AE020000 */ sw $v0, 0x0($s0)
.L800F2950:
/* 8BE00 800F2950 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8BE04 800F2954 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8BE08 800F2958 8C420324 */ lw $v0, 0x324($v0)
/* 8BE0C 800F295C 8E030000 */ lw $v1, 0x0($s0)
/* 8BE10 800F2960 2442FFFF */ addiu $v0, $v0, -0x1
/* 8BE14 800F2964 0043102A */ slt $v0, $v0, $v1
/* 8BE18 800F2968 54400001 */ bnel $v0, $zero, .L800F2970
/* 8BE1C 800F296C AE000000 */ sw $zero, 0x0($s0)
.L800F2970:
/* 8BE20 800F2970 3C038011 */ lui $v1, %hi(PopupMenu_PrevSelectedIndex)
/* 8BE24 800F2974 8C63D64C */ lw $v1, %lo(PopupMenu_PrevSelectedIndex)($v1)
/* 8BE28 800F2978 8E020000 */ lw $v0, 0x0($s0)
/* 8BE2C 800F297C 10620004 */ beq $v1, $v0, .L800F2990
/* 8BE30 800F2980 0000302D */ daddu $a2, $zero, $zero
/* 8BE34 800F2984 0C05272D */ jal sfx_play_sound
/* 8BE38 800F2988 240400C7 */ addiu $a0, $zero, 0xC7
/* 8BE3C 800F298C 0000302D */ daddu $a2, $zero, $zero
.L800F2990:
/* 8BE40 800F2990 3C058011 */ lui $a1, %hi(PopupMenu_FirstDisplayIndex)
/* 8BE44 800F2994 24A5D654 */ addiu $a1, $a1, %lo(PopupMenu_FirstDisplayIndex)
/* 8BE48 800F2998 8E030000 */ lw $v1, 0x0($s0)
.L800F299C:
/* 8BE4C 800F299C 80A20000 */ lb $v0, 0x0($a1)
/* 8BE50 800F29A0 90A40000 */ lbu $a0, 0x0($a1)
/* 8BE54 800F29A4 24420001 */ addiu $v0, $v0, 0x1
/* 8BE58 800F29A8 0062102A */ slt $v0, $v1, $v0
/* 8BE5C 800F29AC 50400007 */ beql $v0, $zero, .L800F29CC
/* 8BE60 800F29B0 24C60001 */ addiu $a2, $a2, 0x1
/* 8BE64 800F29B4 2482FFFF */ addiu $v0, $a0, -0x1
/* 8BE68 800F29B8 A0A20000 */ sb $v0, 0x0($a1)
/* 8BE6C 800F29BC 00021600 */ sll $v0, $v0, 24
/* 8BE70 800F29C0 04420001 */ bltzl $v0, .L800F29C8
/* 8BE74 800F29C4 A0A00000 */ sb $zero, 0x0($a1)
.L800F29C8:
/* 8BE78 800F29C8 24C60001 */ addiu $a2, $a2, 0x1
.L800F29CC:
/* 8BE7C 800F29CC 28C20004 */ slti $v0, $a2, 0x4
/* 8BE80 800F29D0 1440FFF2 */ bnez $v0, .L800F299C
/* 8BE84 800F29D4 00000000 */ nop
/* 8BE88 800F29D8 0000302D */ daddu $a2, $zero, $zero
/* 8BE8C 800F29DC 3C098011 */ lui $t1, %hi(PopupMenu_LastDisplayIndex)
/* 8BE90 800F29E0 2529D655 */ addiu $t1, $t1, %lo(PopupMenu_LastDisplayIndex)
/* 8BE94 800F29E4 3C0A8011 */ lui $t2, %hi(PopupMenu_SelectedIndex)
/* 8BE98 800F29E8 8D4AD648 */ lw $t2, %lo(PopupMenu_SelectedIndex)($t2)
/* 8BE9C 800F29EC 3C078011 */ lui $a3, %hi(PopupMenu_FirstDisplayIndex)
/* 8BEA0 800F29F0 24E7D654 */ addiu $a3, $a3, %lo(PopupMenu_FirstDisplayIndex)
/* 8BEA4 800F29F4 3C0B8011 */ lui $t3, %hi(gPopupMenu)
/* 8BEA8 800F29F8 256BD69C */ addiu $t3, $t3, %lo(gPopupMenu)
/* 8BEAC 800F29FC 3C088011 */ lui $t0, %hi(PopupMenu_MaxDisplayableEntryCount)
/* 8BEB0 800F2A00 2508D68F */ addiu $t0, $t0, %lo(PopupMenu_MaxDisplayableEntryCount)
.L800F2A04:
/* 8BEB4 800F2A04 81220000 */ lb $v0, 0x0($t1)
/* 8BEB8 800F2A08 2442FFFF */ addiu $v0, $v0, -0x1
/* 8BEBC 800F2A0C 0142102A */ slt $v0, $t2, $v0
/* 8BEC0 800F2A10 14400013 */ bnez $v0, .L800F2A60
/* 8BEC4 800F2A14 00000000 */ nop
/* 8BEC8 800F2A18 90E20000 */ lbu $v0, 0x0($a3)
/* 8BECC 800F2A1C 24420001 */ addiu $v0, $v0, 0x1
/* 8BED0 800F2A20 A0E20000 */ sb $v0, 0x0($a3)
/* 8BED4 800F2A24 00021600 */ sll $v0, $v0, 24
/* 8BED8 800F2A28 8D650000 */ lw $a1, 0x0($t3)
/* 8BEDC 800F2A2C 81040000 */ lb $a0, 0x0($t0)
/* 8BEE0 800F2A30 8CA30324 */ lw $v1, 0x324($a1)
/* 8BEE4 800F2A34 00021603 */ sra $v0, $v0, 24
/* 8BEE8 800F2A38 00641823 */ subu $v1, $v1, $a0
/* 8BEEC 800F2A3C 0062182A */ slt $v1, $v1, $v0
/* 8BEF0 800F2A40 10600007 */ beqz $v1, .L800F2A60
/* 8BEF4 800F2A44 91040000 */ lbu $a0, 0x0($t0)
/* 8BEF8 800F2A48 90A20327 */ lbu $v0, 0x327($a1)
/* 8BEFC 800F2A4C 00441023 */ subu $v0, $v0, $a0
/* 8BF00 800F2A50 A0E20000 */ sb $v0, 0x0($a3)
/* 8BF04 800F2A54 00021600 */ sll $v0, $v0, 24
/* 8BF08 800F2A58 04420001 */ bltzl $v0, .L800F2A60
/* 8BF0C 800F2A5C A0E00000 */ sb $zero, 0x0($a3)
.L800F2A60:
/* 8BF10 800F2A60 90E20000 */ lbu $v0, 0x0($a3)
/* 8BF14 800F2A64 91030000 */ lbu $v1, 0x0($t0)
/* 8BF18 800F2A68 24C60001 */ addiu $a2, $a2, 0x1
/* 8BF1C 800F2A6C 00431021 */ addu $v0, $v0, $v1
/* 8BF20 800F2A70 A1220000 */ sb $v0, 0x0($t1)
/* 8BF24 800F2A74 28C20004 */ slti $v0, $a2, 0x4
/* 8BF28 800F2A78 1440FFE2 */ bnez $v0, .L800F2A04
/* 8BF2C 800F2A7C 00000000 */ nop
/* 8BF30 800F2A80 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 8BF34 800F2A84 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 8BF38 800F2A88 8C420010 */ lw $v0, 0x10($v0)
/* 8BF3C 800F2A8C 30428000 */ andi $v0, $v0, 0x8000
/* 8BF40 800F2A90 1040003F */ beqz $v0, .L800F2B90
/* 8BF44 800F2A94 00000000 */ nop
/* 8BF48 800F2A98 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8BF4C 800F2A9C 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8BF50 800F2AA0 8C430318 */ lw $v1, 0x318($v0)
/* 8BF54 800F2AA4 24020008 */ addiu $v0, $zero, 0x8
/* 8BF58 800F2AA8 10620005 */ beq $v1, $v0, .L800F2AC0
/* 8BF5C 800F2AAC 2402000D */ addiu $v0, $zero, 0xD
/* 8BF60 800F2AB0 1062000B */ beq $v1, $v0, .L800F2AE0
/* 8BF64 800F2AB4 00000000 */ nop
/* 8BF68 800F2AB8 0803CAC0 */ j .L800F2B00
/* 8BF6C 800F2ABC 00000000 */ nop
.L800F2AC0:
/* 8BF70 800F2AC0 0C05272D */ jal sfx_play_sound
/* 8BF74 800F2AC4 240400C9 */ addiu $a0, $zero, 0xC9
/* 8BF78 800F2AC8 3C028011 */ lui $v0, %hi(PopupNotBattle)
/* 8BF7C 800F2ACC 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0)
/* 8BF80 800F2AD0 144002DE */ bnez $v0, .L800F364C
/* 8BF84 800F2AD4 2402FFFE */ addiu $v0, $zero, -0x2
/* 8BF88 800F2AD8 0803CD93 */ j .L800F364C
/* 8BF8C 800F2ADC 2402FFFF */ addiu $v0, $zero, -0x1
.L800F2AE0:
/* 8BF90 800F2AE0 0C05272D */ jal sfx_play_sound
/* 8BF94 800F2AE4 240400C9 */ addiu $a0, $zero, 0xC9
/* 8BF98 800F2AE8 3C028011 */ lui $v0, %hi(PopupNotBattle)
/* 8BF9C 800F2AEC 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0)
/* 8BFA0 800F2AF0 144002D6 */ bnez $v0, .L800F364C
/* 8BFA4 800F2AF4 2402FFFE */ addiu $v0, $zero, -0x2
/* 8BFA8 800F2AF8 0803CD93 */ j .L800F364C
/* 8BFAC 800F2AFC 2402FFFF */ addiu $v0, $zero, -0x1
.L800F2B00:
/* 8BFB0 800F2B00 3C028011 */ lui $v0, %hi(PopupMenu_SelectedIndex)
/* 8BFB4 800F2B04 8C42D648 */ lw $v0, %lo(PopupMenu_SelectedIndex)($v0)
/* 8BFB8 800F2B08 3C038011 */ lui $v1, %hi(gPopupMenu)
/* 8BFBC 800F2B0C 8C63D69C */ lw $v1, %lo(gPopupMenu)($v1)
/* 8BFC0 800F2B10 00021080 */ sll $v0, $v0, 2
/* 8BFC4 800F2B14 00621021 */ addu $v0, $v1, $v0
/* 8BFC8 800F2B18 8C42018C */ lw $v0, 0x18C($v0)
/* 8BFCC 800F2B1C 10400009 */ beqz $v0, .L800F2B44
/* 8BFD0 800F2B20 24020001 */ addiu $v0, $zero, 0x1
/* 8BFD4 800F2B24 0C05272D */ jal sfx_play_sound
/* 8BFD8 800F2B28 240400C9 */ addiu $a0, $zero, 0xC9
/* 8BFDC 800F2B2C 3C028011 */ lui $v0, %hi(PopupNotBattle)
/* 8BFE0 800F2B30 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0)
/* 8BFE4 800F2B34 144002C5 */ bnez $v0, .L800F364C
/* 8BFE8 800F2B38 2402FFFE */ addiu $v0, $zero, -0x2
/* 8BFEC 800F2B3C 0803CD93 */ j .L800F364C
/* 8BFF0 800F2B40 2402FFFF */ addiu $v0, $zero, -0x1
.L800F2B44:
/* 8BFF4 800F2B44 8C630318 */ lw $v1, 0x318($v1)
/* 8BFF8 800F2B48 14620005 */ bne $v1, $v0, .L800F2B60
/* 8BFFC 800F2B4C 00000000 */ nop
/* 8C000 800F2B50 0C05272D */ jal sfx_play_sound
/* 8C004 800F2B54 2404021D */ addiu $a0, $zero, 0x21D
/* 8C008 800F2B58 0803CD93 */ j .L800F364C
/* 8C00C 800F2B5C 2402001E */ addiu $v0, $zero, 0x1E
.L800F2B60:
/* 8C010 800F2B60 3C028011 */ lui $v0, %hi(PopupNotBattle)
/* 8C014 800F2B64 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0)
/* 8C018 800F2B68 104002BA */ beqz $v0, .L800F3654
/* 8C01C 800F2B6C 00000000 */ nop
/* 8C020 800F2B70 10600003 */ beqz $v1, .L800F2B80
/* 8C024 800F2B74 24020003 */ addiu $v0, $zero, 0x3
/* 8C028 800F2B78 146202B6 */ bne $v1, $v0, .L800F3654
/* 8C02C 800F2B7C 00000000 */ nop
.L800F2B80:
/* 8C030 800F2B80 0C05272D */ jal sfx_play_sound
/* 8C034 800F2B84 2404021D */ addiu $a0, $zero, 0x21D
/* 8C038 800F2B88 0803CD95 */ j .L800F3654
/* 8C03C 800F2B8C 00000000 */ nop
.L800F2B90:
/* 8C040 800F2B90 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8C044 800F2B94 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8C048 800F2B98 8C430318 */ lw $v1, 0x318($v0)
/* 8C04C 800F2B9C 2C62000E */ sltiu $v0, $v1, 0xE
/* 8C050 800F2BA0 10400014 */ beqz $v0, .L800F2BF4
/* 8C054 800F2BA4 00031080 */ sll $v0, $v1, 2
/* 8C058 800F2BA8 3C018011 */ lui $at, %hi(jtbl_8010C6B0)
/* 8C05C 800F2BAC 00220821 */ addu $at, $at, $v0
/* 8C060 800F2BB0 8C22C6B0 */ lw $v0, %lo(jtbl_8010C6B0)($at)
/* 8C064 800F2BB4 00400008 */ jr $v0
/* 8C068 800F2BB8 00000000 */ nop
glabel .L800F2BBC
/* 8C06C 800F2BBC 3C028011 */ lui $v0, %hi(PopupNotBattle)
/* 8C070 800F2BC0 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0)
/* 8C074 800F2BC4 1040000C */ beqz $v0, .L800F2BF8
/* 8C078 800F2BC8 24034000 */ addiu $v1, $zero, 0x4000
/* 8C07C 800F2BCC 0803CAFE */ j .L800F2BF8
/* 8C080 800F2BD0 24034002 */ addiu $v1, $zero, 0x4002
glabel .L800F2BD4
/* 8C084 800F2BD4 3C028011 */ lui $v0, %hi(PopupNotBattle)
/* 8C088 800F2BD8 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0)
/* 8C08C 800F2BDC 10400006 */ beqz $v0, .L800F2BF8
/* 8C090 800F2BE0 24034000 */ addiu $v1, $zero, 0x4000
/* 8C094 800F2BE4 0803CAFE */ j .L800F2BF8
/* 8C098 800F2BE8 24034001 */ addiu $v1, $zero, 0x4001
glabel .L800F2BEC
/* 8C09C 800F2BEC 0803CAFE */ j .L800F2BF8
/* 8C0A0 800F2BF0 24034000 */ addiu $v1, $zero, 0x4000
.L800F2BF4:
/* 8C0A4 800F2BF4 0000182D */ daddu $v1, $zero, $zero
.L800F2BF8:
/* 8C0A8 800F2BF8 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 8C0AC 800F2BFC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 8C0B0 800F2C00 8C420010 */ lw $v0, 0x10($v0)
/* 8C0B4 800F2C04 00431024 */ and $v0, $v0, $v1
/* 8C0B8 800F2C08 10400013 */ beqz $v0, .L800F2C58
/* 8C0BC 800F2C0C 00000000 */ nop
/* 8C0C0 800F2C10 0C05272D */ jal sfx_play_sound
/* 8C0C4 800F2C14 240400CA */ addiu $a0, $zero, 0xCA
/* 8C0C8 800F2C18 3C028011 */ lui $v0, %hi(PopupNotDipping)
/* 8C0CC 800F2C1C 8042D698 */ lb $v0, %lo(PopupNotDipping)($v0)
/* 8C0D0 800F2C20 10400007 */ beqz $v0, .L800F2C40
/* 8C0D4 800F2C24 00000000 */ nop
/* 8C0D8 800F2C28 3C028011 */ lui $v0, %hi(PopupNotBattle)
/* 8C0DC 800F2C2C 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0)
/* 8C0E0 800F2C30 14400286 */ bnez $v0, .L800F364C
/* 8C0E4 800F2C34 2402FFF9 */ addiu $v0, $zero, -0x7
/* 8C0E8 800F2C38 0803CD93 */ j .L800F364C
/* 8C0EC 800F2C3C 2402FFFD */ addiu $v0, $zero, -0x3
.L800F2C40:
/* 8C0F0 800F2C40 3C028011 */ lui $v0, %hi(PopupDipMode)
/* 8C0F4 800F2C44 8042D699 */ lb $v0, %lo(PopupDipMode)($v0)
/* 8C0F8 800F2C48 14400280 */ bnez $v0, .L800F364C
/* 8C0FC 800F2C4C 24020064 */ addiu $v0, $zero, 0x64
/* 8C100 800F2C50 0803CD93 */ j .L800F364C
/* 8C104 800F2C54 2402001E */ addiu $v0, $zero, 0x1E
.L800F2C58:
/* 8C108 800F2C58 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8C10C 800F2C5C 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8C110 800F2C60 8C430318 */ lw $v1, 0x318($v0)
/* 8C114 800F2C64 10600005 */ beqz $v1, .L800F2C7C
/* 8C118 800F2C68 24020001 */ addiu $v0, $zero, 0x1
/* 8C11C 800F2C6C 10620005 */ beq $v1, $v0, .L800F2C84
/* 8C120 800F2C70 0000182D */ daddu $v1, $zero, $zero
/* 8C124 800F2C74 0803CB22 */ j .L800F2C88
/* 8C128 800F2C78 00000000 */ nop
.L800F2C7C:
/* 8C12C 800F2C7C 0803CB22 */ j .L800F2C88
/* 8C130 800F2C80 24030001 */ addiu $v1, $zero, 0x1
.L800F2C84:
/* 8C134 800F2C84 24030002 */ addiu $v1, $zero, 0x2
.L800F2C88:
/* 8C138 800F2C88 3C028011 */ lui $v0, %hi(PopupNotBattle)
/* 8C13C 800F2C8C 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0)
/* 8C140 800F2C90 10400270 */ beqz $v0, .L800F3654
/* 8C144 800F2C94 00000000 */ nop
/* 8C148 800F2C98 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 8C14C 800F2C9C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 8C150 800F2CA0 8C420010 */ lw $v0, 0x10($v0)
/* 8C154 800F2CA4 00431024 */ and $v0, $v0, $v1
/* 8C158 800F2CA8 1040026A */ beqz $v0, .L800F3654
/* 8C15C 800F2CAC 00000000 */ nop
/* 8C160 800F2CB0 0C05272D */ jal sfx_play_sound
/* 8C164 800F2CB4 240400CA */ addiu $a0, $zero, 0xCA
/* 8C168 800F2CB8 0803CD93 */ j .L800F364C
/* 8C16C 800F2CBC 2402FFFA */ addiu $v0, $zero, -0x6
glabel .L800F2CC0
/* 8C170 800F2CC0 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C174 800F2CC4 00A0302D */ daddu $a2, $a1, $zero
/* 8C178 800F2CC8 3C048011 */ lui $a0, %hi(PopupMenu_EmptybarHEID)
/* 8C17C 800F2CCC 8C84D65C */ lw $a0, %lo(PopupMenu_EmptybarHEID)($a0)
/* 8C180 800F2CD0 0C0513BF */ jal hud_element_set_tint
/* 8C184 800F2CD4 00A0382D */ daddu $a3, $a1, $zero
/* 8C188 800F2CD8 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C18C 800F2CDC 00A0302D */ daddu $a2, $a1, $zero
/* 8C190 800F2CE0 3C048011 */ lui $a0, %hi(D_8010D678)
/* 8C194 800F2CE4 8C84D678 */ lw $a0, %lo(D_8010D678)($a0)
/* 8C198 800F2CE8 0C0513BF */ jal hud_element_set_tint
/* 8C19C 800F2CEC 00A0382D */ daddu $a3, $a1, $zero
/* 8C1A0 800F2CF0 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C1A4 800F2CF4 00A0302D */ daddu $a2, $a1, $zero
/* 8C1A8 800F2CF8 3C108011 */ lui $s0, %hi(D_8010D66C)
/* 8C1AC 800F2CFC 2610D66C */ addiu $s0, $s0, %lo(D_8010D66C)
/* 8C1B0 800F2D00 8E040000 */ lw $a0, 0x0($s0)
/* 8C1B4 800F2D04 0C0513BF */ jal hud_element_set_tint
/* 8C1B8 800F2D08 00A0382D */ daddu $a3, $a1, $zero
/* 8C1BC 800F2D0C 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C1C0 800F2D10 00A0302D */ daddu $a2, $a1, $zero
/* 8C1C4 800F2D14 3C048011 */ lui $a0, %hi(D_8010D670)
/* 8C1C8 800F2D18 8C84D670 */ lw $a0, %lo(D_8010D670)($a0)
/* 8C1CC 800F2D1C 0C0513BF */ jal hud_element_set_tint
/* 8C1D0 800F2D20 00A0382D */ daddu $a3, $a1, $zero
/* 8C1D4 800F2D24 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C1D8 800F2D28 00A0302D */ daddu $a2, $a1, $zero
/* 8C1DC 800F2D2C 3C048011 */ lui $a0, %hi(D_8010D674)
/* 8C1E0 800F2D30 8C84D674 */ lw $a0, %lo(D_8010D674)($a0)
/* 8C1E4 800F2D34 0C0513BF */ jal hud_element_set_tint
/* 8C1E8 800F2D38 00A0382D */ daddu $a3, $a1, $zero
/* 8C1EC 800F2D3C 8E040000 */ lw $a0, 0x0($s0)
/* 8C1F0 800F2D40 3C058010 */ lui $a1, %hi(HES_HandPointer)
/* 8C1F4 800F2D44 24A54A00 */ addiu $a1, $a1, %lo(HES_HandPointer)
/* 8C1F8 800F2D48 0C0511FF */ jal hud_element_set_script
/* 8C1FC 800F2D4C 00000000 */ nop
/* 8C200 800F2D50 3C108011 */ lui $s0, %hi(gPopupMenu)
/* 8C204 800F2D54 2610D69C */ addiu $s0, $s0, %lo(gPopupMenu)
/* 8C208 800F2D58 8E020000 */ lw $v0, 0x0($s0)
glabel func_800F2D5C
/* 8C20C 800F2D5C 8C430318 */ lw $v1, 0x318($v0)
/* 8C210 800F2D60 24020003 */ addiu $v0, $zero, 0x3
/* 8C214 800F2D64 1462000C */ bne $v1, $v0, .L800F2D98
/* 8C218 800F2D68 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C21C 800F2D6C 00A0302D */ daddu $a2, $a1, $zero
/* 8C220 800F2D70 3C048011 */ lui $a0, %hi(PopupTitleIconHEID)
/* 8C224 800F2D74 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0)
/* 8C228 800F2D78 0C0513BF */ jal hud_element_set_tint
/* 8C22C 800F2D7C 00A0382D */ daddu $a3, $a1, $zero
/* 8C230 800F2D80 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C234 800F2D84 00A0302D */ daddu $a2, $a1, $zero
/* 8C238 800F2D88 3C048011 */ lui $a0, %hi(D_8010D664)
/* 8C23C 800F2D8C 8C84D664 */ lw $a0, %lo(D_8010D664)($a0)
/* 8C240 800F2D90 0C0513BF */ jal hud_element_set_tint
/* 8C244 800F2D94 00A0382D */ daddu $a3, $a1, $zero
.L800F2D98:
/* 8C248 800F2D98 8E020000 */ lw $v0, 0x0($s0)
/* 8C24C 800F2D9C 8C420318 */ lw $v0, 0x318($v0)
/* 8C250 800F2DA0 24110004 */ addiu $s1, $zero, 0x4
/* 8C254 800F2DA4 1451000C */ bne $v0, $s1, .L800F2DD8
/* 8C258 800F2DA8 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C25C 800F2DAC 00A0302D */ daddu $a2, $a1, $zero
/* 8C260 800F2DB0 3C048011 */ lui $a0, %hi(PopupTitleIconHEID)
/* 8C264 800F2DB4 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0)
/* 8C268 800F2DB8 0C0513BF */ jal hud_element_set_tint
/* 8C26C 800F2DBC 00A0382D */ daddu $a3, $a1, $zero
/* 8C270 800F2DC0 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C274 800F2DC4 00A0302D */ daddu $a2, $a1, $zero
/* 8C278 800F2DC8 3C048011 */ lui $a0, %hi(D_8010D664)
/* 8C27C 800F2DCC 8C84D664 */ lw $a0, %lo(D_8010D664)($a0)
/* 8C280 800F2DD0 0C0513BF */ jal hud_element_set_tint
/* 8C284 800F2DD4 00A0382D */ daddu $a3, $a1, $zero
.L800F2DD8:
/* 8C288 800F2DD8 8E020000 */ lw $v0, 0x0($s0)
/* 8C28C 800F2DDC 8C430318 */ lw $v1, 0x318($v0)
/* 8C290 800F2DE0 24020001 */ addiu $v0, $zero, 0x1
/* 8C294 800F2DE4 10620003 */ beq $v1, $v0, .L800F2DF4
/* 8C298 800F2DE8 00000000 */ nop
/* 8C29C 800F2DEC 14710007 */ bne $v1, $s1, .L800F2E0C
/* 8C2A0 800F2DF0 00000000 */ nop
.L800F2DF4:
/* 8C2A4 800F2DF4 3C048011 */ lui $a0, %hi(D_8010D668)
/* 8C2A8 800F2DF8 8C84D668 */ lw $a0, %lo(D_8010D668)($a0)
/* 8C2AC 800F2DFC 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C2B0 800F2E00 00A0302D */ daddu $a2, $a1, $zero
/* 8C2B4 800F2E04 0C0513BF */ jal hud_element_set_tint
/* 8C2B8 800F2E08 00A0382D */ daddu $a3, $a1, $zero
.L800F2E0C:
/* 8C2BC 800F2E0C 3C108011 */ lui $s0, %hi(gPopupMenu)
/* 8C2C0 800F2E10 2610D69C */ addiu $s0, $s0, %lo(gPopupMenu)
/* 8C2C4 800F2E14 8E020000 */ lw $v0, 0x0($s0)
/* 8C2C8 800F2E18 8C430318 */ lw $v1, 0x318($v0)
/* 8C2CC 800F2E1C 24020005 */ addiu $v0, $zero, 0x5
/* 8C2D0 800F2E20 14620006 */ bne $v1, $v0, .L800F2E3C
/* 8C2D4 800F2E24 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C2D8 800F2E28 3C048011 */ lui $a0, %hi(PopupTitleIconHEID)
/* 8C2DC 800F2E2C 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0)
/* 8C2E0 800F2E30 00A0302D */ daddu $a2, $a1, $zero
/* 8C2E4 800F2E34 0C0513BF */ jal hud_element_set_tint
/* 8C2E8 800F2E38 00A0382D */ daddu $a3, $a1, $zero
.L800F2E3C:
/* 8C2EC 800F2E3C 3C048011 */ lui $a0, %hi(PopupMenu_SelectedIndex)
/* 8C2F0 800F2E40 2484D648 */ addiu $a0, $a0, %lo(PopupMenu_SelectedIndex)
/* 8C2F4 800F2E44 8C820000 */ lw $v0, 0x0($a0)
/* 8C2F8 800F2E48 2403000D */ addiu $v1, $zero, 0xD
/* 8C2FC 800F2E4C 3C018011 */ lui $at, %hi(D_8010D690)
/* 8C300 800F2E50 A023D690 */ sb $v1, %lo(D_8010D690)($at)
/* 8C304 800F2E54 94830002 */ lhu $v1, 0x2($a0)
/* 8C308 800F2E58 8E040000 */ lw $a0, 0x0($s0)
/* 8C30C 800F2E5C 0803CC01 */ j .L800F3004
/* 8C310 800F2E60 24420001 */ addiu $v0, $v0, 0x1
glabel .L800F2E64
/* 8C314 800F2E64 3C038011 */ lui $v1, %hi(PopupMenu_SelectedIndex)
/* 8C318 800F2E68 2463D648 */ addiu $v1, $v1, %lo(PopupMenu_SelectedIndex)
/* 8C31C 800F2E6C 8C620000 */ lw $v0, 0x0($v1)
/* 8C320 800F2E70 94630002 */ lhu $v1, 0x2($v1)
/* 8C324 800F2E74 3C048011 */ lui $a0, %hi(gPopupMenu)
/* 8C328 800F2E78 8C84D69C */ lw $a0, %lo(gPopupMenu)($a0)
/* 8C32C 800F2E7C 0803CC01 */ j .L800F3004
/* 8C330 800F2E80 24420001 */ addiu $v0, $v0, 0x1
glabel .L800F2E84
/* 8C334 800F2E84 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8C338 800F2E88 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8C33C 800F2E8C 8C430318 */ lw $v1, 0x318($v0)
/* 8C340 800F2E90 2C62000E */ sltiu $v0, $v1, 0xE
/* 8C344 800F2E94 10400013 */ beqz $v0, .L800F2EE4
glabel func_800F2E98
/* 8C348 800F2E98 00031080 */ sll $v0, $v1, 2
/* 8C34C 800F2E9C 3C018011 */ lui $at, %hi(jtbl_8010C6E8)
/* 8C350 800F2EA0 00220821 */ addu $at, $at, $v0
/* 8C354 800F2EA4 8C22C6E8 */ lw $v0, %lo(jtbl_8010C6E8)($at)
/* 8C358 800F2EA8 00400008 */ jr $v0
/* 8C35C 800F2EAC 00000000 */ nop
glabel .L800F2EB0
/* 8C360 800F2EB0 2404000E */ addiu $a0, $zero, 0xE
/* 8C364 800F2EB4 0C051F9F */ jal set_window_update
/* 8C368 800F2EB8 24050002 */ addiu $a1, $zero, 0x2
/* 8C36C 800F2EBC 0803CBB7 */ j .L800F2EDC
/* 8C370 800F2EC0 24040013 */ addiu $a0, $zero, 0x13
glabel .L800F2EC4
/* 8C374 800F2EC4 2404000E */ addiu $a0, $zero, 0xE
/* 8C378 800F2EC8 0C051F9F */ jal set_window_update
/* 8C37C 800F2ECC 24050002 */ addiu $a1, $zero, 0x2
/* 8C380 800F2ED0 0803CBB7 */ j .L800F2EDC
/* 8C384 800F2ED4 24040013 */ addiu $a0, $zero, 0x13
glabel .L800F2ED8
/* 8C388 800F2ED8 2404000E */ addiu $a0, $zero, 0xE
.L800F2EDC:
/* 8C38C 800F2EDC 0C051F9F */ jal set_window_update
/* 8C390 800F2EE0 24050002 */ addiu $a1, $zero, 0x2
.L800F2EE4:
/* 8C394 800F2EE4 0C03C54E */ jal destroy_popup_menu
/* 8C398 800F2EE8 00000000 */ nop
/* 8C39C 800F2EEC 3C048011 */ lui $a0, %hi(gPopupWorker)
/* 8C3A0 800F2EF0 8C84D694 */ lw $a0, %lo(gPopupWorker)($a0)
/* 8C3A4 800F2EF4 0C048D70 */ jal free_worker
/* 8C3A8 800F2EF8 00000000 */ nop
/* 8C3AC 800F2EFC 3C048011 */ lui $a0, %hi(gPopupMenu)
/* 8C3B0 800F2F00 8C84D69C */ lw $a0, %lo(gPopupMenu)($a0)
/* 8C3B4 800F2F04 2403FFFB */ addiu $v1, $zero, -0x5
/* 8C3B8 800F2F08 3C018011 */ lui $at, %hi(gPopupState)
/* 8C3BC 800F2F0C AC23D640 */ sw $v1, %lo(gPopupState)($at)
/* 8C3C0 800F2F10 0803CBDA */ j .L800F2F68
/* 8C3C4 800F2F14 240200FF */ addiu $v0, $zero, 0xFF
glabel .L800F2F18
/* 8C3C8 800F2F18 3C048011 */ lui $a0, %hi(gPopupWorker)
/* 8C3CC 800F2F1C 8C84D694 */ lw $a0, %lo(gPopupWorker)($a0)
/* 8C3D0 800F2F20 0C048D70 */ jal free_worker
/* 8C3D4 800F2F24 00000000 */ nop
/* 8C3D8 800F2F28 3C048011 */ lui $a0, %hi(gPopupMenu)
/* 8C3DC 800F2F2C 8C84D69C */ lw $a0, %lo(gPopupMenu)($a0)
/* 8C3E0 800F2F30 2403FFFB */ addiu $v1, $zero, -0x5
/* 8C3E4 800F2F34 3C018011 */ lui $at, %hi(gPopupState)
/* 8C3E8 800F2F38 AC23D640 */ sw $v1, %lo(gPopupState)($at)
/* 8C3EC 800F2F3C 0803CBDA */ j .L800F2F68
/* 8C3F0 800F2F40 240200FF */ addiu $v0, $zero, 0xFF
glabel .L800F2F44
/* 8C3F4 800F2F44 240200FF */ addiu $v0, $zero, 0xFF
/* 8C3F8 800F2F48 3C048011 */ lui $a0, %hi(gPopupMenu)
/* 8C3FC 800F2F4C 8C84D69C */ lw $a0, %lo(gPopupMenu)($a0)
/* 8C400 800F2F50 2403FFFE */ addiu $v1, $zero, -0x2
/* 8C404 800F2F54 0803CD99 */ j .L800F3664
/* 8C408 800F2F58 A483032C */ sh $v1, 0x32C($a0)
glabel .L800F2F5C
/* 8C40C 800F2F5C 240200FF */ addiu $v0, $zero, 0xFF
/* 8C410 800F2F60 3C048011 */ lui $a0, %hi(gPopupMenu)
/* 8C414 800F2F64 8C84D69C */ lw $a0, %lo(gPopupMenu)($a0)
.L800F2F68:
/* 8C418 800F2F68 0040182D */ daddu $v1, $v0, $zero
/* 8C41C 800F2F6C 0803CD99 */ j .L800F3664
/* 8C420 800F2F70 A483032C */ sh $v1, 0x32C($a0)
glabel .L800F2F74
/* 8C424 800F2F74 3C038011 */ lui $v1, %hi(D_8010D644)
/* 8C428 800F2F78 2463D644 */ addiu $v1, $v1, %lo(D_8010D644)
/* 8C42C 800F2F7C 8C620000 */ lw $v0, 0x0($v1)
/* 8C430 800F2F80 2442FFFF */ addiu $v0, $v0, -0x1
/* 8C434 800F2F84 144001B3 */ bnez $v0, .L800F3654
/* 8C438 800F2F88 AC620000 */ sw $v0, 0x0($v1)
/* 8C43C 800F2F8C 3C048011 */ lui $a0, %hi(PopupMenu_SelectedIndex)
/* 8C440 800F2F90 2484D648 */ addiu $a0, $a0, %lo(PopupMenu_SelectedIndex)
/* 8C444 800F2F94 8C820000 */ lw $v0, 0x0($a0)
/* 8C448 800F2F98 2403000B */ addiu $v1, $zero, 0xB
/* 8C44C 800F2F9C 3C018011 */ lui $at, %hi(gPopupState)
/* 8C450 800F2FA0 AC23D640 */ sw $v1, %lo(gPopupState)($at)
/* 8C454 800F2FA4 94830002 */ lhu $v1, 0x2($a0)
/* 8C458 800F2FA8 3C048011 */ lui $a0, %hi(gPopupMenu)
/* 8C45C 800F2FAC 8C84D69C */ lw $a0, %lo(gPopupMenu)($a0)
/* 8C460 800F2FB0 0803CC01 */ j .L800F3004
/* 8C464 800F2FB4 24420001 */ addiu $v0, $v0, 0x1
glabel .L800F2FB8
/* 8C468 800F2FB8 3C028011 */ lui $v0, %hi(D_8010D644)
/* 8C46C 800F2FBC 2442D644 */ addiu $v0, $v0, %lo(D_8010D644)
/* 8C470 800F2FC0 8C430000 */ lw $v1, 0x0($v0)
/* 8C474 800F2FC4 3C048011 */ lui $a0, %hi(D_8010D692)
/* 8C478 800F2FC8 8084D692 */ lb $a0, %lo(D_8010D692)($a0)
/* 8C47C 800F2FCC 24630001 */ addiu $v1, $v1, 0x1
/* 8C480 800F2FD0 AC430000 */ sw $v1, 0x0($v0)
/* 8C484 800F2FD4 0064182A */ slt $v1, $v1, $a0
/* 8C488 800F2FD8 1460019E */ bnez $v1, .L800F3654
/* 8C48C 800F2FDC 24030001 */ addiu $v1, $zero, 0x1
/* 8C490 800F2FE0 3C048011 */ lui $a0, %hi(PopupMenu_SelectedIndex)
/* 8C494 800F2FE4 2484D648 */ addiu $a0, $a0, %lo(PopupMenu_SelectedIndex)
/* 8C498 800F2FE8 8C820000 */ lw $v0, 0x0($a0)
/* 8C49C 800F2FEC 3C018011 */ lui $at, %hi(gPopupState)
/* 8C4A0 800F2FF0 AC23D640 */ sw $v1, %lo(gPopupState)($at)
/* 8C4A4 800F2FF4 00431021 */ addu $v0, $v0, $v1
/* 8C4A8 800F2FF8 94830002 */ lhu $v1, 0x2($a0)
/* 8C4AC 800F2FFC 3C048011 */ lui $a0, %hi(gPopupMenu)
/* 8C4B0 800F3000 8C84D69C */ lw $a0, %lo(gPopupMenu)($a0)
.L800F3004:
/* 8C4B4 800F3004 24630001 */ addiu $v1, $v1, 0x1
/* 8C4B8 800F3008 0803CD99 */ j .L800F3664
/* 8C4BC 800F300C A483032C */ sh $v1, 0x32C($a0)
glabel .L800F3010
/* 8C4C0 800F3010 0000102D */ daddu $v0, $zero, $zero
/* 8C4C4 800F3014 3C048011 */ lui $a0, %hi(gPopupMenu)
/* 8C4C8 800F3018 8C84D69C */ lw $a0, %lo(gPopupMenu)($a0)
/* 8C4CC 800F301C 2403001F */ addiu $v1, $zero, 0x1F
/* 8C4D0 800F3020 3C018011 */ lui $at, %hi(gPopupState)
/* 8C4D4 800F3024 AC23D640 */ sw $v1, %lo(gPopupState)($at)
/* 8C4D8 800F3028 2403FFFF */ addiu $v1, $zero, -0x1
/* 8C4DC 800F302C 0803CD99 */ j .L800F3664
/* 8C4E0 800F3030 A483032C */ sh $v1, 0x32C($a0)
glabel .L800F3034
/* 8C4E4 800F3034 2404000E */ addiu $a0, $zero, 0xE
/* 8C4E8 800F3038 0C051F9F */ jal set_window_update
/* 8C4EC 800F303C 24050002 */ addiu $a1, $zero, 0x2
/* 8C4F0 800F3040 24040013 */ addiu $a0, $zero, 0x13
/* 8C4F4 800F3044 0C051F9F */ jal set_window_update
/* 8C4F8 800F3048 24050002 */ addiu $a1, $zero, 0x2
/* 8C4FC 800F304C 3C028011 */ lui $v0, %hi(PopupNotBattle)
/* 8C500 800F3050 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0)
/* 8C504 800F3054 10400003 */ beqz $v0, .L800F3064
/* 8C508 800F3058 24040015 */ addiu $a0, $zero, 0x15
/* 8C50C 800F305C 0C051F9F */ jal set_window_update
/* 8C510 800F3060 24050002 */ addiu $a1, $zero, 0x2
.L800F3064:
/* 8C514 800F3064 3C04001D */ lui $a0, (0x1D006B >> 16)
/* 8C518 800F3068 3484006B */ ori $a0, $a0, (0x1D006B & 0xFFFF)
/* 8C51C 800F306C 0C04991D */ jal get_msg_width
/* 8C520 800F3070 0000282D */ daddu $a1, $zero, $zero
/* 8C524 800F3074 24470017 */ addiu $a3, $v0, 0x17
/* 8C528 800F3078 24040009 */ addiu $a0, $zero, 0x9
/* 8C52C 800F307C 00072FC2 */ srl $a1, $a3, 31
/* 8C530 800F3080 00E52821 */ addu $a1, $a3, $a1
/* 8C534 800F3084 00052843 */ sra $a1, $a1, 1
/* 8C538 800F3088 240200A0 */ addiu $v0, $zero, 0xA0
/* 8C53C 800F308C 00452823 */ subu $a1, $v0, $a1
/* 8C540 800F3090 24060050 */ addiu $a2, $zero, 0x50
/* 8C544 800F3094 24020028 */ addiu $v0, $zero, 0x28
/* 8C548 800F3098 AFA20010 */ sw $v0, 0x10($sp)
/* 8C54C 800F309C 24020014 */ addiu $v0, $zero, 0x14
/* 8C550 800F30A0 AFA20014 */ sw $v0, 0x14($sp)
/* 8C554 800F30A4 3C02800F */ lui $v0, %hi(popup_draw_already_have_partner)
/* 8C558 800F30A8 24424CF0 */ addiu $v0, $v0, %lo(popup_draw_already_have_partner)
/* 8C55C 800F30AC AFA20018 */ sw $v0, 0x18($sp)
/* 8C560 800F30B0 2402FFFF */ addiu $v0, $zero, -0x1
/* 8C564 800F30B4 AFA0001C */ sw $zero, 0x1C($sp)
/* 8C568 800F30B8 0C051F32 */ jal set_window_properties
/* 8C56C 800F30BC AFA20020 */ sw $v0, 0x20($sp)
/* 8C570 800F30C0 24040009 */ addiu $a0, $zero, 0x9
/* 8C574 800F30C4 0C051F9F */ jal set_window_update
/* 8C578 800F30C8 24050001 */ addiu $a1, $zero, 0x1
/* 8C57C 800F30CC 2403003C */ addiu $v1, $zero, 0x3C
/* 8C580 800F30D0 3C018011 */ lui $at, %hi(D_8010D644)
/* 8C584 800F30D4 AC23D644 */ sw $v1, %lo(D_8010D644)($at)
/* 8C588 800F30D8 24030020 */ addiu $v1, $zero, 0x20
/* 8C58C 800F30DC 3C018011 */ lui $at, %hi(gPopupState)
/* 8C590 800F30E0 AC23D640 */ sw $v1, %lo(gPopupState)($at)
/* 8C594 800F30E4 0803CD99 */ j .L800F3664
/* 8C598 800F30E8 0000102D */ daddu $v0, $zero, $zero
glabel .L800F30EC
/* 8C59C 800F30EC 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 8C5A0 800F30F0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 8C5A4 800F30F4 8C420010 */ lw $v0, 0x10($v0)
/* 8C5A8 800F30F8 3042C001 */ andi $v0, $v0, 0xC001
/* 8C5AC 800F30FC 10400003 */ beqz $v0, .L800F310C
/* 8C5B0 800F3100 00000000 */ nop
/* 8C5B4 800F3104 3C018011 */ lui $at, %hi(D_8010D644)
/* 8C5B8 800F3108 AC20D644 */ sw $zero, %lo(D_8010D644)($at)
.L800F310C:
/* 8C5BC 800F310C 3C038011 */ lui $v1, %hi(D_8010D644)
/* 8C5C0 800F3110 2463D644 */ addiu $v1, $v1, %lo(D_8010D644)
/* 8C5C4 800F3114 8C620000 */ lw $v0, 0x0($v1)
/* 8C5C8 800F3118 10400004 */ beqz $v0, .L800F312C
/* 8C5CC 800F311C 2442FFFF */ addiu $v0, $v0, -0x1
/* 8C5D0 800F3120 AC620000 */ sw $v0, 0x0($v1)
/* 8C5D4 800F3124 0803CD99 */ j .L800F3664
/* 8C5D8 800F3128 0000102D */ daddu $v0, $zero, $zero
.L800F312C:
/* 8C5DC 800F312C 24040009 */ addiu $a0, $zero, 0x9
/* 8C5E0 800F3130 0C051F9F */ jal set_window_update
/* 8C5E4 800F3134 24050002 */ addiu $a1, $zero, 0x2
/* 8C5E8 800F3138 2404000E */ addiu $a0, $zero, 0xE
/* 8C5EC 800F313C 0C051F9F */ jal set_window_update
/* 8C5F0 800F3140 24050001 */ addiu $a1, $zero, 0x1
/* 8C5F4 800F3144 24040013 */ addiu $a0, $zero, 0x13
/* 8C5F8 800F3148 0C051F9F */ jal set_window_update
/* 8C5FC 800F314C 24050001 */ addiu $a1, $zero, 0x1
/* 8C600 800F3150 3C028011 */ lui $v0, %hi(PopupNotBattle)
/* 8C604 800F3154 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0)
/* 8C608 800F3158 10400003 */ beqz $v0, .L800F3168
/* 8C60C 800F315C 24040015 */ addiu $a0, $zero, 0x15
/* 8C610 800F3160 0C051F9F */ jal set_window_update
/* 8C614 800F3164 24050001 */ addiu $a1, $zero, 0x1
.L800F3168:
/* 8C618 800F3168 3C038011 */ lui $v1, %hi(gPopupMenu)
/* 8C61C 800F316C 8C63D69C */ lw $v1, %lo(gPopupMenu)($v1)
/* 8C620 800F3170 24020001 */ addiu $v0, $zero, 0x1
/* 8C624 800F3174 3C018011 */ lui $at, %hi(gPopupState)
/* 8C628 800F3178 AC22D640 */ sw $v0, %lo(gPopupState)($at)
/* 8C62C 800F317C 0803CD95 */ j .L800F3654
/* 8C630 800F3180 A460032C */ sh $zero, 0x32C($v1)
glabel .L800F3184
/* 8C634 800F3184 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C638 800F3188 00A0302D */ daddu $a2, $a1, $zero
/* 8C63C 800F318C 3C048011 */ lui $a0, %hi(PopupMenu_EmptybarHEID)
/* 8C640 800F3190 8C84D65C */ lw $a0, %lo(PopupMenu_EmptybarHEID)($a0)
/* 8C644 800F3194 0C0513BF */ jal hud_element_set_tint
/* 8C648 800F3198 00A0382D */ daddu $a3, $a1, $zero
/* 8C64C 800F319C 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C650 800F31A0 00A0302D */ daddu $a2, $a1, $zero
/* 8C654 800F31A4 3C048011 */ lui $a0, %hi(D_8010D678)
/* 8C658 800F31A8 8C84D678 */ lw $a0, %lo(D_8010D678)($a0)
/* 8C65C 800F31AC 0C0513BF */ jal hud_element_set_tint
/* 8C660 800F31B0 00A0382D */ daddu $a3, $a1, $zero
/* 8C664 800F31B4 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C668 800F31B8 00A0302D */ daddu $a2, $a1, $zero
/* 8C66C 800F31BC 3C108011 */ lui $s0, %hi(D_8010D66C)
/* 8C670 800F31C0 2610D66C */ addiu $s0, $s0, %lo(D_8010D66C)
/* 8C674 800F31C4 8E040000 */ lw $a0, 0x0($s0)
/* 8C678 800F31C8 0C0513BF */ jal hud_element_set_tint
/* 8C67C 800F31CC 00A0382D */ daddu $a3, $a1, $zero
/* 8C680 800F31D0 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C684 800F31D4 00A0302D */ daddu $a2, $a1, $zero
/* 8C688 800F31D8 3C048011 */ lui $a0, %hi(D_8010D670)
/* 8C68C 800F31DC 8C84D670 */ lw $a0, %lo(D_8010D670)($a0)
/* 8C690 800F31E0 0C0513BF */ jal hud_element_set_tint
/* 8C694 800F31E4 00A0382D */ daddu $a3, $a1, $zero
/* 8C698 800F31E8 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C69C 800F31EC 00A0302D */ daddu $a2, $a1, $zero
/* 8C6A0 800F31F0 3C048011 */ lui $a0, %hi(D_8010D674)
/* 8C6A4 800F31F4 8C84D674 */ lw $a0, %lo(D_8010D674)($a0)
/* 8C6A8 800F31F8 0C0513BF */ jal hud_element_set_tint
/* 8C6AC 800F31FC 00A0382D */ daddu $a3, $a1, $zero
/* 8C6B0 800F3200 8E040000 */ lw $a0, 0x0($s0)
/* 8C6B4 800F3204 3C058010 */ lui $a1, %hi(HES_HandPointer)
/* 8C6B8 800F3208 24A54A00 */ addiu $a1, $a1, %lo(HES_HandPointer)
/* 8C6BC 800F320C 0C0511FF */ jal hud_element_set_script
/* 8C6C0 800F3210 00000000 */ nop
/* 8C6C4 800F3214 3C108011 */ lui $s0, %hi(gPopupMenu)
/* 8C6C8 800F3218 2610D69C */ addiu $s0, $s0, %lo(gPopupMenu)
/* 8C6CC 800F321C 8E020000 */ lw $v0, 0x0($s0)
/* 8C6D0 800F3220 8C430318 */ lw $v1, 0x318($v0)
/* 8C6D4 800F3224 24020003 */ addiu $v0, $zero, 0x3
/* 8C6D8 800F3228 1462000C */ bne $v1, $v0, .L800F325C
/* 8C6DC 800F322C 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C6E0 800F3230 00A0302D */ daddu $a2, $a1, $zero
/* 8C6E4 800F3234 3C048011 */ lui $a0, %hi(PopupTitleIconHEID)
/* 8C6E8 800F3238 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0)
/* 8C6EC 800F323C 0C0513BF */ jal hud_element_set_tint
/* 8C6F0 800F3240 00A0382D */ daddu $a3, $a1, $zero
/* 8C6F4 800F3244 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C6F8 800F3248 00A0302D */ daddu $a2, $a1, $zero
/* 8C6FC 800F324C 3C048011 */ lui $a0, %hi(D_8010D664)
/* 8C700 800F3250 8C84D664 */ lw $a0, %lo(D_8010D664)($a0)
/* 8C704 800F3254 0C0513BF */ jal hud_element_set_tint
/* 8C708 800F3258 00A0382D */ daddu $a3, $a1, $zero
.L800F325C:
/* 8C70C 800F325C 8E020000 */ lw $v0, 0x0($s0)
/* 8C710 800F3260 8C420318 */ lw $v0, 0x318($v0)
/* 8C714 800F3264 24110004 */ addiu $s1, $zero, 0x4
/* 8C718 800F3268 1451000C */ bne $v0, $s1, .L800F329C
/* 8C71C 800F326C 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C720 800F3270 00A0302D */ daddu $a2, $a1, $zero
/* 8C724 800F3274 3C048011 */ lui $a0, %hi(PopupTitleIconHEID)
/* 8C728 800F3278 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0)
/* 8C72C 800F327C 0C0513BF */ jal hud_element_set_tint
/* 8C730 800F3280 00A0382D */ daddu $a3, $a1, $zero
/* 8C734 800F3284 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C738 800F3288 00A0302D */ daddu $a2, $a1, $zero
/* 8C73C 800F328C 3C048011 */ lui $a0, %hi(D_8010D664)
/* 8C740 800F3290 8C84D664 */ lw $a0, %lo(D_8010D664)($a0)
/* 8C744 800F3294 0C0513BF */ jal hud_element_set_tint
/* 8C748 800F3298 00A0382D */ daddu $a3, $a1, $zero
.L800F329C:
/* 8C74C 800F329C 8E020000 */ lw $v0, 0x0($s0)
/* 8C750 800F32A0 8C430318 */ lw $v1, 0x318($v0)
/* 8C754 800F32A4 24020001 */ addiu $v0, $zero, 0x1
/* 8C758 800F32A8 10620003 */ beq $v1, $v0, .L800F32B8
/* 8C75C 800F32AC 00000000 */ nop
/* 8C760 800F32B0 14710007 */ bne $v1, $s1, .L800F32D0
/* 8C764 800F32B4 00000000 */ nop
.L800F32B8:
/* 8C768 800F32B8 3C048011 */ lui $a0, %hi(D_8010D668)
/* 8C76C 800F32BC 8C84D668 */ lw $a0, %lo(D_8010D668)($a0)
/* 8C770 800F32C0 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C774 800F32C4 00A0302D */ daddu $a2, $a1, $zero
/* 8C778 800F32C8 0C0513BF */ jal hud_element_set_tint
/* 8C77C 800F32CC 00A0382D */ daddu $a3, $a1, $zero
.L800F32D0:
/* 8C780 800F32D0 3C108011 */ lui $s0, %hi(gPopupMenu)
/* 8C784 800F32D4 2610D69C */ addiu $s0, $s0, %lo(gPopupMenu)
/* 8C788 800F32D8 8E020000 */ lw $v0, 0x0($s0)
/* 8C78C 800F32DC 8C430318 */ lw $v1, 0x318($v0)
/* 8C790 800F32E0 24020005 */ addiu $v0, $zero, 0x5
/* 8C794 800F32E4 14620006 */ bne $v1, $v0, .L800F3300
/* 8C798 800F32E8 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C79C 800F32EC 3C048011 */ lui $a0, %hi(PopupTitleIconHEID)
/* 8C7A0 800F32F0 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0)
/* 8C7A4 800F32F4 00A0302D */ daddu $a2, $a1, $zero
/* 8C7A8 800F32F8 0C0513BF */ jal hud_element_set_tint
/* 8C7AC 800F32FC 00A0382D */ daddu $a3, $a1, $zero
.L800F3300:
/* 8C7B0 800F3300 8E020000 */ lw $v0, 0x0($s0)
/* 8C7B4 800F3304 8C430318 */ lw $v1, 0x318($v0)
/* 8C7B8 800F3308 2C62000E */ sltiu $v0, $v1, 0xE
/* 8C7BC 800F330C 10400013 */ beqz $v0, .L800F335C
/* 8C7C0 800F3310 00031080 */ sll $v0, $v1, 2
/* 8C7C4 800F3314 3C018011 */ lui $at, %hi(jtbl_8010C720)
/* 8C7C8 800F3318 00220821 */ addu $at, $at, $v0
/* 8C7CC 800F331C 8C22C720 */ lw $v0, %lo(jtbl_8010C720)($at)
/* 8C7D0 800F3320 00400008 */ jr $v0
/* 8C7D4 800F3324 00000000 */ nop
glabel .L800F3328
/* 8C7D8 800F3328 2404000E */ addiu $a0, $zero, 0xE
/* 8C7DC 800F332C 0C051F9F */ jal set_window_update
/* 8C7E0 800F3330 24050002 */ addiu $a1, $zero, 0x2
/* 8C7E4 800F3334 0803CCD5 */ j .L800F3354
/* 8C7E8 800F3338 24040013 */ addiu $a0, $zero, 0x13
glabel .L800F333C
/* 8C7EC 800F333C 2404000E */ addiu $a0, $zero, 0xE
/* 8C7F0 800F3340 0C051F9F */ jal set_window_update
/* 8C7F4 800F3344 24050002 */ addiu $a1, $zero, 0x2
/* 8C7F8 800F3348 0803CCD5 */ j .L800F3354
/* 8C7FC 800F334C 24040013 */ addiu $a0, $zero, 0x13
glabel .L800F3350
/* 8C800 800F3350 2404000E */ addiu $a0, $zero, 0xE
.L800F3354:
/* 8C804 800F3354 0C051F9F */ jal set_window_update
/* 8C808 800F3358 24050002 */ addiu $a1, $zero, 0x2
.L800F335C:
/* 8C80C 800F335C 3C04001D */ lui $a0, (0x1D0069 >> 16)
/* 8C810 800F3360 3C038011 */ lui $v1, %hi(PopupDipMode)
/* 8C814 800F3364 8063D699 */ lb $v1, %lo(PopupDipMode)($v1)
/* 8C818 800F3368 2402000D */ addiu $v0, $zero, 0xD
/* 8C81C 800F336C 3C018011 */ lui $at, %hi(D_8010D690)
/* 8C820 800F3370 A022D690 */ sb $v0, %lo(D_8010D690)($at)
/* 8C824 800F3374 24020001 */ addiu $v0, $zero, 0x1
/* 8C828 800F3378 14620003 */ bne $v1, $v0, .L800F3388
/* 8C82C 800F337C 34840069 */ ori $a0, $a0, (0x1D0069 & 0xFFFF)
/* 8C830 800F3380 3C04001D */ lui $a0, (0x1D0068 >> 16)
/* 8C834 800F3384 34840068 */ ori $a0, $a0, (0x1D0068 & 0xFFFF)
.L800F3388:
/* 8C838 800F3388 0C04991D */ jal get_msg_width
/* 8C83C 800F338C 0000282D */ daddu $a1, $zero, $zero
/* 8C840 800F3390 24470017 */ addiu $a3, $v0, 0x17
/* 8C844 800F3394 24040015 */ addiu $a0, $zero, 0x15
/* 8C848 800F3398 00072FC2 */ srl $a1, $a3, 31
/* 8C84C 800F339C 00E52821 */ addu $a1, $a3, $a1
/* 8C850 800F33A0 00052843 */ sra $a1, $a1, 1
/* 8C854 800F33A4 240200A0 */ addiu $v0, $zero, 0xA0
/* 8C858 800F33A8 00452823 */ subu $a1, $v0, $a1
/* 8C85C 800F33AC 2406004C */ addiu $a2, $zero, 0x4C
/* 8C860 800F33B0 24020020 */ addiu $v0, $zero, 0x20
/* 8C864 800F33B4 AFA20010 */ sw $v0, 0x10($sp)
/* 8C868 800F33B8 24020013 */ addiu $v0, $zero, 0x13
/* 8C86C 800F33BC AFA20014 */ sw $v0, 0x14($sp)
/* 8C870 800F33C0 3C02800F */ lui $v0, %hi(func_800F4C1C)
/* 8C874 800F33C4 24424C1C */ addiu $v0, $v0, %lo(func_800F4C1C)
/* 8C878 800F33C8 AFA20018 */ sw $v0, 0x18($sp)
/* 8C87C 800F33CC 2402FFFF */ addiu $v0, $zero, -0x1
/* 8C880 800F33D0 AFA0001C */ sw $zero, 0x1C($sp)
/* 8C884 800F33D4 0C051F32 */ jal set_window_properties
/* 8C888 800F33D8 AFA20020 */ sw $v0, 0x20($sp)
/* 8C88C 800F33DC 24040015 */ addiu $a0, $zero, 0x15
/* 8C890 800F33E0 0C051F9F */ jal set_window_update
/* 8C894 800F33E4 24050001 */ addiu $a1, $zero, 0x1
/* 8C898 800F33E8 3C04001E */ lui $a0, (0x1E001D >> 16)
/* 8C89C 800F33EC 3C058011 */ lui $a1, %hi(D_8010D6A4)
/* 8C8A0 800F33F0 24A5D6A4 */ addiu $a1, $a1, %lo(D_8010D6A4)
/* 8C8A4 800F33F4 0C049640 */ jal msg_get_printer_for_msg
/* 8C8A8 800F33F8 3484001D */ ori $a0, $a0, (0x1E001D & 0xFFFF)
/* 8C8AC 800F33FC 0040202D */ daddu $a0, $v0, $zero
/* 8C8B0 800F3400 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C8B4 800F3404 3C018011 */ lui $at, %hi(D_8010D6A0)
/* 8C8B8 800F3408 AC24D6A0 */ sw $a0, %lo(D_8010D6A0)($at)
/* 8C8BC 800F340C 0C0496AE */ jal msg_printer_set_origin_pos
/* 8C8C0 800F3410 24060090 */ addiu $a2, $zero, 0x90
/* 8C8C4 800F3414 0803CD93 */ j .L800F364C
/* 8C8C8 800F3418 24020065 */ addiu $v0, $zero, 0x65
glabel .L800F341C
/* 8C8CC 800F341C 3C108011 */ lui $s0, %hi(D_8010D6A4)
/* 8C8D0 800F3420 8E10D6A4 */ lw $s0, %lo(D_8010D6A4)($s0)
/* 8C8D4 800F3424 24020001 */ addiu $v0, $zero, 0x1
/* 8C8D8 800F3428 1602008A */ bne $s0, $v0, .L800F3654
/* 8C8DC 800F342C 24040015 */ addiu $a0, $zero, 0x15
/* 8C8E0 800F3430 0C051F9F */ jal set_window_update
/* 8C8E4 800F3434 24050002 */ addiu $a1, $zero, 0x2
/* 8C8E8 800F3438 3C028011 */ lui $v0, %hi(D_8010D6A0)
/* 8C8EC 800F343C 8C42D6A0 */ lw $v0, %lo(D_8010D6A0)($v0)
/* 8C8F0 800F3440 904204E8 */ lbu $v0, 0x4E8($v0)
/* 8C8F4 800F3444 50400081 */ beql $v0, $zero, .L800F364C
/* 8C8F8 800F3448 24020066 */ addiu $v0, $zero, 0x66
/* 8C8FC 800F344C 1050007F */ beq $v0, $s0, .L800F364C
/* 8C900 800F3450 24020067 */ addiu $v0, $zero, 0x67
/* 8C904 800F3454 0803CD95 */ j .L800F3654
/* 8C908 800F3458 00000000 */ nop
glabel .L800F345C
/* 8C90C 800F345C 0803CD93 */ j .L800F364C
/* 8C910 800F3460 2402FFFD */ addiu $v0, $zero, -0x3
glabel .L800F3464
/* 8C914 800F3464 240500FF */ addiu $a1, $zero, 0xFF
/* 8C918 800F3468 00A0302D */ daddu $a2, $a1, $zero
/* 8C91C 800F346C 3C048011 */ lui $a0, %hi(PopupMenu_EmptybarHEID)
/* 8C920 800F3470 8C84D65C */ lw $a0, %lo(PopupMenu_EmptybarHEID)($a0)
/* 8C924 800F3474 0C0513BF */ jal hud_element_set_tint
/* 8C928 800F3478 00A0382D */ daddu $a3, $a1, $zero
/* 8C92C 800F347C 240500FF */ addiu $a1, $zero, 0xFF
/* 8C930 800F3480 00A0302D */ daddu $a2, $a1, $zero
/* 8C934 800F3484 3C048011 */ lui $a0, %hi(D_8010D678)
/* 8C938 800F3488 8C84D678 */ lw $a0, %lo(D_8010D678)($a0)
/* 8C93C 800F348C 0C0513BF */ jal hud_element_set_tint
/* 8C940 800F3490 00A0382D */ daddu $a3, $a1, $zero
/* 8C944 800F3494 240500FF */ addiu $a1, $zero, 0xFF
/* 8C948 800F3498 00A0302D */ daddu $a2, $a1, $zero
/* 8C94C 800F349C 3C048011 */ lui $a0, %hi(D_8010D66C)
/* 8C950 800F34A0 8C84D66C */ lw $a0, %lo(D_8010D66C)($a0)
/* 8C954 800F34A4 0C0513BF */ jal hud_element_set_tint
/* 8C958 800F34A8 00A0382D */ daddu $a3, $a1, $zero
/* 8C95C 800F34AC 240500FF */ addiu $a1, $zero, 0xFF
/* 8C960 800F34B0 00A0302D */ daddu $a2, $a1, $zero
/* 8C964 800F34B4 3C048011 */ lui $a0, %hi(D_8010D670)
/* 8C968 800F34B8 8C84D670 */ lw $a0, %lo(D_8010D670)($a0)
/* 8C96C 800F34BC 0C0513BF */ jal hud_element_set_tint
/* 8C970 800F34C0 00A0382D */ daddu $a3, $a1, $zero
/* 8C974 800F34C4 240500FF */ addiu $a1, $zero, 0xFF
/* 8C978 800F34C8 00A0302D */ daddu $a2, $a1, $zero
/* 8C97C 800F34CC 3C048011 */ lui $a0, %hi(D_8010D674)
/* 8C980 800F34D0 8C84D674 */ lw $a0, %lo(D_8010D674)($a0)
/* 8C984 800F34D4 0C0513BF */ jal hud_element_set_tint
/* 8C988 800F34D8 00A0382D */ daddu $a3, $a1, $zero
/* 8C98C 800F34DC 3C108011 */ lui $s0, %hi(gPopupMenu)
/* 8C990 800F34E0 2610D69C */ addiu $s0, $s0, %lo(gPopupMenu)
/* 8C994 800F34E4 8E020000 */ lw $v0, 0x0($s0)
/* 8C998 800F34E8 8C430318 */ lw $v1, 0x318($v0)
/* 8C99C 800F34EC 24020003 */ addiu $v0, $zero, 0x3
/* 8C9A0 800F34F0 1462000C */ bne $v1, $v0, .L800F3524
/* 8C9A4 800F34F4 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C9A8 800F34F8 00A0302D */ daddu $a2, $a1, $zero
/* 8C9AC 800F34FC 3C048011 */ lui $a0, %hi(PopupTitleIconHEID)
/* 8C9B0 800F3500 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0)
/* 8C9B4 800F3504 0C0513BF */ jal hud_element_set_tint
/* 8C9B8 800F3508 00A0382D */ daddu $a3, $a1, $zero
/* 8C9BC 800F350C 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C9C0 800F3510 00A0302D */ daddu $a2, $a1, $zero
/* 8C9C4 800F3514 3C048011 */ lui $a0, %hi(D_8010D664)
/* 8C9C8 800F3518 8C84D664 */ lw $a0, %lo(D_8010D664)($a0)
/* 8C9CC 800F351C 0C0513BF */ jal hud_element_set_tint
/* 8C9D0 800F3520 00A0382D */ daddu $a3, $a1, $zero
.L800F3524:
/* 8C9D4 800F3524 8E020000 */ lw $v0, 0x0($s0)
/* 8C9D8 800F3528 8C420318 */ lw $v0, 0x318($v0)
/* 8C9DC 800F352C 24110004 */ addiu $s1, $zero, 0x4
/* 8C9E0 800F3530 1451000C */ bne $v0, $s1, .L800F3564
/* 8C9E4 800F3534 240500A0 */ addiu $a1, $zero, 0xA0
/* 8C9E8 800F3538 00A0302D */ daddu $a2, $a1, $zero
/* 8C9EC 800F353C 3C048011 */ lui $a0, %hi(PopupTitleIconHEID)
/* 8C9F0 800F3540 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0)
/* 8C9F4 800F3544 0C0513BF */ jal hud_element_set_tint
/* 8C9F8 800F3548 00A0382D */ daddu $a3, $a1, $zero
/* 8C9FC 800F354C 240500A0 */ addiu $a1, $zero, 0xA0
/* 8CA00 800F3550 00A0302D */ daddu $a2, $a1, $zero
/* 8CA04 800F3554 3C048011 */ lui $a0, %hi(D_8010D664)
/* 8CA08 800F3558 8C84D664 */ lw $a0, %lo(D_8010D664)($a0)
/* 8CA0C 800F355C 0C0513BF */ jal hud_element_set_tint
/* 8CA10 800F3560 00A0382D */ daddu $a3, $a1, $zero
.L800F3564:
/* 8CA14 800F3564 8E020000 */ lw $v0, 0x0($s0)
/* 8CA18 800F3568 8C430318 */ lw $v1, 0x318($v0)
/* 8CA1C 800F356C 24020001 */ addiu $v0, $zero, 0x1
/* 8CA20 800F3570 10620003 */ beq $v1, $v0, .L800F3580
/* 8CA24 800F3574 00000000 */ nop
/* 8CA28 800F3578 14710007 */ bne $v1, $s1, .L800F3598
/* 8CA2C 800F357C 00000000 */ nop
.L800F3580:
/* 8CA30 800F3580 3C048011 */ lui $a0, %hi(D_8010D668)
/* 8CA34 800F3584 8C84D668 */ lw $a0, %lo(D_8010D668)($a0)
/* 8CA38 800F3588 240500A0 */ addiu $a1, $zero, 0xA0
/* 8CA3C 800F358C 00A0302D */ daddu $a2, $a1, $zero
/* 8CA40 800F3590 0C0513BF */ jal hud_element_set_tint
/* 8CA44 800F3594 00A0382D */ daddu $a3, $a1, $zero
.L800F3598:
/* 8CA48 800F3598 3C108011 */ lui $s0, %hi(gPopupMenu)
/* 8CA4C 800F359C 2610D69C */ addiu $s0, $s0, %lo(gPopupMenu)
/* 8CA50 800F35A0 8E020000 */ lw $v0, 0x0($s0)
/* 8CA54 800F35A4 8C430318 */ lw $v1, 0x318($v0)
/* 8CA58 800F35A8 24020005 */ addiu $v0, $zero, 0x5
/* 8CA5C 800F35AC 14620006 */ bne $v1, $v0, .L800F35C8
/* 8CA60 800F35B0 240500A0 */ addiu $a1, $zero, 0xA0
/* 8CA64 800F35B4 3C048011 */ lui $a0, %hi(PopupTitleIconHEID)
/* 8CA68 800F35B8 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0)
/* 8CA6C 800F35BC 00A0302D */ daddu $a2, $a1, $zero
/* 8CA70 800F35C0 0C0513BF */ jal hud_element_set_tint
/* 8CA74 800F35C4 00A0382D */ daddu $a3, $a1, $zero
.L800F35C8:
/* 8CA78 800F35C8 3C048011 */ lui $a0, %hi(D_8010D66C)
/* 8CA7C 800F35CC 8C84D66C */ lw $a0, %lo(D_8010D66C)($a0)
/* 8CA80 800F35D0 3C058010 */ lui $a1, %hi(HES_HandPointer)
/* 8CA84 800F35D4 24A54A00 */ addiu $a1, $a1, %lo(HES_HandPointer)
/* 8CA88 800F35D8 0C0511FF */ jal hud_element_set_script
/* 8CA8C 800F35DC 00000000 */ nop
/* 8CA90 800F35E0 8E020000 */ lw $v0, 0x0($s0)
/* 8CA94 800F35E4 8C430318 */ lw $v1, 0x318($v0)
/* 8CA98 800F35E8 2C62000E */ sltiu $v0, $v1, 0xE
/* 8CA9C 800F35EC 10400013 */ beqz $v0, .L800F363C
/* 8CAA0 800F35F0 00031080 */ sll $v0, $v1, 2
/* 8CAA4 800F35F4 3C018011 */ lui $at, %hi(jtbl_8010C758)
/* 8CAA8 800F35F8 00220821 */ addu $at, $at, $v0
/* 8CAAC 800F35FC 8C22C758 */ lw $v0, %lo(jtbl_8010C758)($at)
/* 8CAB0 800F3600 00400008 */ jr $v0
/* 8CAB4 800F3604 00000000 */ nop
glabel .L800F3608
/* 8CAB8 800F3608 2404000E */ addiu $a0, $zero, 0xE
/* 8CABC 800F360C 0C051F9F */ jal set_window_update
/* 8CAC0 800F3610 24050001 */ addiu $a1, $zero, 0x1
/* 8CAC4 800F3614 0803CD8D */ j .L800F3634
/* 8CAC8 800F3618 24040013 */ addiu $a0, $zero, 0x13
glabel .L800F361C
/* 8CACC 800F361C 2404000E */ addiu $a0, $zero, 0xE
/* 8CAD0 800F3620 0C051F9F */ jal set_window_update
/* 8CAD4 800F3624 24050001 */ addiu $a1, $zero, 0x1
/* 8CAD8 800F3628 0803CD8D */ j .L800F3634
/* 8CADC 800F362C 24040013 */ addiu $a0, $zero, 0x13
glabel .L800F3630
/* 8CAE0 800F3630 2404000E */ addiu $a0, $zero, 0xE
.L800F3634:
/* 8CAE4 800F3634 0C051F9F */ jal set_window_update
/* 8CAE8 800F3638 24050001 */ addiu $a1, $zero, 0x1
.L800F363C:
/* 8CAEC 800F363C 2402000A */ addiu $v0, $zero, 0xA
/* 8CAF0 800F3640 3C018011 */ lui $at, %hi(D_8010D690)
/* 8CAF4 800F3644 A022D690 */ sb $v0, %lo(D_8010D690)($at)
/* 8CAF8 800F3648 24020001 */ addiu $v0, $zero, 0x1
.L800F364C:
/* 8CAFC 800F364C 3C018011 */ lui $at, %hi(gPopupState)
/* 8CB00 800F3650 AC22D640 */ sw $v0, %lo(gPopupState)($at)
glabel .L800F3654
/* 8CB04 800F3654 3C038011 */ lui $v1, %hi(gPopupMenu)
/* 8CB08 800F3658 8C63D69C */ lw $v1, %lo(gPopupMenu)($v1)
/* 8CB0C 800F365C 0000102D */ daddu $v0, $zero, $zero
/* 8CB10 800F3660 A460032C */ sh $zero, 0x32C($v1)
.L800F3664:
/* 8CB14 800F3664 8FBF0038 */ lw $ra, 0x38($sp)
/* 8CB18 800F3668 8FB30034 */ lw $s3, 0x34($sp)
/* 8CB1C 800F366C 8FB20030 */ lw $s2, 0x30($sp)
/* 8CB20 800F3670 8FB1002C */ lw $s1, 0x2C($sp)
/* 8CB24 800F3674 8FB00028 */ lw $s0, 0x28($sp)
/* 8CB28 800F3678 03E00008 */ jr $ra
/* 8CB2C 800F367C 27BD0040 */ addiu $sp, $sp, 0x40
### DECOMPILED C INSTRUCTIONS:
s32 popup_menu_update(void) {
s32 posX;
s32 posY;
s32 width;
s32 elementID;
s32 cond;
s32 buttons;
s32 msgID;
s32 one;
s32 i;
switch (gPopupState) {
case POPUP_STATE_INIT:
D_8010D67C = 20;
D_8010D67E = 72;
D_8010D680 = 20;
D_8010D682 = 186;
D_8010D684 = 16;
D_8010D686 = 88;
PopupMenu_StarPieceCounterPosX = 32;
PopupMenu_StarPieceCounterPosY = 164;
if (PopupNotBattle) {
D_8010D67C = PopupWorldStartX[gPopupMenu->popupType] + 20;
}
if (PopupMenu_MaxDisplayableEntryCount >= 7) {
D_8010D67E = 62;
}
D_8010D68C = 0;
elementID = hud_element_create(&HES_EmptyBar);
PopupMenu_EmptybarHEID = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80);
hud_element_set_tint(elementID, 255, 255, 255);
if (gPopupMenu->popupType != POPUP_MENU_THROW_AWAY_ITEM) {
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DISABLED);
}
one = POPUP_MENU_SWITCH_PARTNER; // required to match (why is 1 loaded so early?)
elementID = hud_element_create(gPopupMenu->ptrIcon[0]);
PopupMenu_EntryIconHEID = elementID;
hud_element_set_scale(elementID, 0.45f);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
elementID = hud_element_create(&HES_AnimatedHandPointer);
PopupMenu_CursorHEID = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
elementID = hud_element_create(&HES_GreenArrowUp);
PopupMenu_UpArrowHEID = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
elementID = hud_element_create(&HES_GreenArrowDown);
PopupMenu_DownArrowHEID = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) {
PopupMenu_TitleIconHEID = hud_element_create(&HES_StatusStarPiece);
elementID = PopupMenu_TitleIconHEID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80);
hud_element_set_tint(elementID, 255, 255, 255);
}
if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
PopupMenu_TitleIconHEID = hud_element_create(&HES_StatusStarPiece);
elementID = PopupMenu_TitleIconHEID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_tint(elementID, 255, 255, 255);
}
if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) {
PopupMenu_TitleIconHEID = hud_element_create(&HES_StatusCoin);
elementID = PopupMenu_TitleIconHEID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80);
hud_element_set_tint(elementID, 255, 255, 255);
}
if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
PopupMenu_TimesHEID = hud_element_create(&HES_MenuTimes);
elementID = PopupMenu_TimesHEID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80);
hud_element_set_tint(elementID, 255, 255, 255);
}
if (gPopupMenu->popupType == one || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
PopupMenu_PartnerLevelHEID = hud_element_create(D_80109890[0]);
elementID = PopupMenu_PartnerLevelHEID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80);
hud_element_set_tint(elementID, 255, 255, 255);
}
D_8010D65A = -200;
D_8010D644 = D_8010D691;
if (!PopupNotBattle) {
D_8010D644 = 1;
}
D_8010D690 = MSG_PAL_STANDARD;
posX = D_8010D67C;
posY = D_8010D67E;
switch (gPopupMenu->popupType) {
case POPUP_MENU_USE_ITEM:
case POPUP_MENU_THROW_AWAY_ITEM:
case POPUP_MENU_CHECK_ITEM:
case POPUP_MENU_CLAIM_ITEM:
case POPUP_MENU_USEKEY:
set_window_properties(WINDOW_ID_14, posX, posY, 145, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1);
if (gPopupMenu->dipMode == 0) {
set_window_properties(WINDOW_ID_15, 25, -6, 95, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14);
} else {
set_window_properties(WINDOW_ID_15, 12, -6, 121, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14);
}
set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE);
break;
case POPUP_MENU_SWITCH_PARTNER:
set_window_properties(WINDOW_ID_14, posX, posY, 139, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1);
set_window_properties(WINDOW_ID_17, 13, -6, 114, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14);
set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW);
break;
case POPUP_MENU_TRADE_FOR_BADGE:
set_window_properties(WINDOW_ID_14, posX, posY, 162, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1);
set_window_properties(WINDOW_ID_15, 17, -6, 96, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14);
set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE);
break;
case POPUP_MENU_UPGRADE_PARTNER:
set_window_properties(WINDOW_ID_14, posX, posY, 146, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1);
set_window_properties(WINDOW_ID_17, 12, -6, 114, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14);
set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW);
break;
case POPUP_MENU_SELL_ITEM:
set_window_properties(WINDOW_ID_14, posX, posY, 167, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1);
set_window_properties(WINDOW_ID_15, 22, -6, 95, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14);
set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE);
break;
case POPUP_MENU_READ_LETTER:
set_window_properties(WINDOW_ID_14, posX, posY, 170, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1);
set_window_properties(WINDOW_ID_15, 32, -6, 104, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14);
set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE);
break;
case POPUP_MENU_TAKE_FROM_CHEST:
set_window_properties(WINDOW_ID_14, posX, posY, 145, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1);
set_window_properties(WINDOW_ID_15, 12, -6, 121, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14);
set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE);
break;
case POPUP_MENU_READ_DIARY_PAGE:
set_window_properties(WINDOW_ID_14, posX, posY, 128, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1);
set_window_properties(WINDOW_ID_15, 12, -6, 104, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14);
set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE);
break;
case POPUP_MENU_READ_POSTCARD:
set_window_properties(WINDOW_ID_14, posX, posY, 149, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1);
set_window_properties(WINDOW_ID_15, 6, -6, 139, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14);
set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE);
break;
case POPUP_MENU_POST_OFFICE:
set_window_properties(WINDOW_ID_14, posX, posY, 131, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1);
set_window_properties(WINDOW_ID_17, 10, -6, 114, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14);
set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW);
break;
}
switch (gPopupMenu->popupType) {
case POPUP_MENU_TRADE_FOR_BADGE:
set_window_properties(WINDOW_ID_16, 126, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14);
break;
case POPUP_MENU_SELL_ITEM:
set_window_properties(WINDOW_ID_16, 131, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14);
break;
}
if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) {
set_window_properties(WINDOW_ID_CURRENCY_COUNTER, PopupMenu_StarPieceCounterPosX, PopupMenu_StarPieceCounterPosY,
64, 20, WINDOW_PRIORITY_21, func_800F4D28, NULL, -1);
}
do {
cond = FALSE;
if (PopupMenu_SelectedIndex >= PopupMenu_FirstDisplayIndex + PopupMenu_LastDisplayIndex - 1) {
PopupMenu_FirstDisplayIndex++;
if (PopupMenu_FirstDisplayIndex > gPopupMenu->numEntries - PopupMenu_MaxDisplayableEntryCount) {
PopupMenu_FirstDisplayIndex = gPopupMenu->numEntries - PopupMenu_MaxDisplayableEntryCount;
if (PopupMenu_FirstDisplayIndex < 0) {
PopupMenu_FirstDisplayIndex = 0;
}
} else {
cond = TRUE;
}
}
} while (cond);
PopupMenu_LastDisplayIndex = PopupMenu_FirstDisplayIndex + PopupMenu_MaxDisplayableEntryCount;
D_8010D658 = -PopupMenu_FirstDisplayIndex * LINE_HEIGHT;
if (gPopupMenu->popupType >= POPUP_MENU_USE_ITEM
&& (gPopupMenu->popupType < POPUP_MENU_READ_DIARY_PAGE || gPopupMenu->popupType == POPUP_MENU_USEKEY))
{
set_window_properties(WINDOW_ID_19, D_8010D680, D_8010D682, 280, 32, WINDOW_PRIORITY_20, func_800F48F4, NULL, -1);
}
posX = D_8010D684;
posY = D_8010D686;
switch (gPopupMenu->popupType) {
case POPUP_MENU_USE_ITEM:
case POPUP_MENU_CHECK_ITEM:
case POPUP_MENU_CLAIM_ITEM:
case POPUP_MENU_TAKE_FROM_CHEST:
case POPUP_MENU_USEKEY:
set_window_properties(WINDOW_ID_21, posX, posY, 144, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1);
break;
case POPUP_MENU_SWITCH_PARTNER:
case POPUP_MENU_THROW_AWAY_ITEM:
case POPUP_MENU_POST_OFFICE:
set_window_properties(WINDOW_ID_21, posX, posY, 144, 40, WINDOW_PRIORITY_20, func_800F4944, NULL, -1);
break;
case POPUP_MENU_TRADE_FOR_BADGE:
case POPUP_MENU_READ_DIARY_PAGE:
case POPUP_MENU_READ_POSTCARD:
set_window_properties(WINDOW_ID_21, posX, posY, 128, 40, WINDOW_PRIORITY_20, func_800F4944, NULL, -1);
break;
case POPUP_MENU_UPGRADE_PARTNER:
set_window_properties(WINDOW_ID_21, posX, posY, 136, 40, WINDOW_PRIORITY_20, func_800F4944, NULL, -1);
break;
case POPUP_MENU_READ_LETTER:
set_window_properties(WINDOW_ID_21, posX, posY, 112, 40, WINDOW_PRIORITY_20, func_800F4944, NULL, -1);
break;
case POPUP_MENU_SELL_ITEM:
set_window_properties(WINDOW_ID_21, posX, posY, 120, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1);
break;
}
if (!PopupNotBattle) {
switch (gPopupMenu->popupType) {
case POPUP_MENU_USE_ITEM:
case POPUP_MENU_THROW_AWAY_ITEM:
case POPUP_MENU_TRADE_FOR_BADGE:
case POPUP_MENU_SELL_ITEM:
case POPUP_MENU_CHECK_ITEM:
case POPUP_MENU_CLAIM_ITEM:
case POPUP_MENU_READ_LETTER:
case POPUP_MENU_TAKE_FROM_CHEST:
case POPUP_MENU_USEKEY:
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW);
break;
case POPUP_MENU_SWITCH_PARTNER:
case POPUP_MENU_UPGRADE_PARTNER:
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW);
break;
case POPUP_MENU_READ_DIARY_PAGE:
case POPUP_MENU_READ_POSTCARD:
case POPUP_MENU_POST_OFFICE:
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
break;
}
} else {
switch (gPopupMenu->popupType) {
case POPUP_MENU_USE_ITEM:
case POPUP_MENU_THROW_AWAY_ITEM:
case POPUP_MENU_TRADE_FOR_BADGE:
case POPUP_MENU_SELL_ITEM:
case POPUP_MENU_CHECK_ITEM:
case POPUP_MENU_CLAIM_ITEM:
case POPUP_MENU_READ_LETTER:
case POPUP_MENU_TAKE_FROM_CHEST:
case POPUP_MENU_USEKEY:
set_window_update(WINDOW_ID_14, (s32)basic_window_update);
sfx_play_sound(SOUND_1);
set_window_update(WINDOW_ID_19, (s32)basic_window_update);
break;
case POPUP_MENU_SWITCH_PARTNER:
case POPUP_MENU_UPGRADE_PARTNER:
set_window_update(WINDOW_ID_14, (s32)basic_window_update);
sfx_play_sound(SOUND_2);
set_window_update(WINDOW_ID_19, (s32)basic_window_update);
break;
case POPUP_MENU_READ_DIARY_PAGE:
case POPUP_MENU_READ_POSTCARD:
case POPUP_MENU_POST_OFFICE:
set_window_update(WINDOW_ID_14, (s32)basic_window_update);
sfx_play_sound(SOUND_1);
break;
}
set_window_update(WINDOW_ID_21, WINDOW_UPDATE_SHOW);
}
if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) {
set_window_update(WINDOW_ID_16, (s32)basic_window_update);
set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32)basic_window_update);
}
if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
set_window_update(WINDOW_ID_18, (s32)basic_window_update);
}
if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) {
set_window_update(WINDOW_ID_16, (s32)basic_window_update);
}
gPopupState = POPUP_STATE_CHOOSING;
break;
case POPUP_STATE_CHOOSING:
if (D_8010D644 != 0) {
D_8010D644--;
} else {
PopupMenu_PrevSelectedIndex = PopupMenu_SelectedIndex;
// change selection on up input
if (gGameStatusPtr->heldButtons[0] & (BUTTON_STICK_UP | BUTTON_Z) &&
(PopupMenu_SelectedIndex > 0 || (gGameStatusPtr->pressedButtons[0] & (BUTTON_STICK_UP | BUTTON_Z))))
{
do {
PopupMenu_SelectedIndex--;
} while (0); // required to match
}
// change selection on down input
if (gGameStatusPtr->heldButtons[0] & (BUTTON_STICK_DOWN | BUTTON_R) &&
((PopupMenu_SelectedIndex < gPopupMenu->numEntries - 1) || (gGameStatusPtr->pressedButtons[0] & (BUTTON_STICK_DOWN | BUTTON_R))))
{
do {
PopupMenu_SelectedIndex++;
} while (0); // required to match
}
// wrap selected index
if (PopupMenu_SelectedIndex < 0) {
PopupMenu_SelectedIndex = gPopupMenu->numEntries - 1;
}
if (PopupMenu_SelectedIndex > gPopupMenu->numEntries - 1) {
PopupMenu_SelectedIndex = 0;
}
if (PopupMenu_PrevSelectedIndex != PopupMenu_SelectedIndex) {
sfx_play_sound(SOUND_MENU_CHANGE_SELECTION);
}
// ensure one option is displayed above the selected index, if applicable
// shift up to 4 entries at a time on list wrap
for (i = 0; i < 4; i++) {
if (PopupMenu_SelectedIndex < PopupMenu_FirstDisplayIndex + 1) {
PopupMenu_FirstDisplayIndex--;
if (PopupMenu_FirstDisplayIndex < 0) {
PopupMenu_FirstDisplayIndex = 0;
}
}
}
// ensure one option is displayed after the selected index, if applicable
// shift up to 4 entries at a time on list wrap
for (i = 0; i < 4; i++) {
if (PopupMenu_SelectedIndex >= PopupMenu_LastDisplayIndex - 1) {
PopupMenu_FirstDisplayIndex++;
if (PopupMenu_FirstDisplayIndex > gPopupMenu->numEntries - PopupMenu_MaxDisplayableEntryCount) {
PopupMenu_FirstDisplayIndex = gPopupMenu->numEntries - PopupMenu_MaxDisplayableEntryCount;
if (PopupMenu_FirstDisplayIndex < 0) {
PopupMenu_FirstDisplayIndex = 0;
}
}
}
PopupMenu_LastDisplayIndex = PopupMenu_FirstDisplayIndex + PopupMenu_MaxDisplayableEntryCount;
}
// make selection on A button input
if (gGameStatusPtr->pressedButtons[0] & BUTTON_A) {
switch (gPopupMenu->popupType) {
case POPUP_MENU_READ_LETTER:
sfx_play_sound(SOUND_MENU_NEXT);
if (!PopupNotBattle) {
gPopupState = POPUP_STATE_CHOSE_WORLD;
} else {
gPopupState = POPUP_STATE_CHOSE_BATTLE;
}
break;
case POPUP_MENU_POST_OFFICE:
sfx_play_sound(SOUND_MENU_NEXT);
if (!PopupNotBattle) {
gPopupState = POPUP_STATE_CHOSE_WORLD;
} else {
gPopupState = POPUP_STATE_CHOSE_BATTLE;
}
break;
default:
if (gPopupMenu->enabled[PopupMenu_SelectedIndex]) {
sfx_play_sound(SOUND_MENU_NEXT);
if (!PopupNotBattle) {
gPopupState = POPUP_STATE_CHOSE_WORLD;
} else {
gPopupState = POPUP_STATE_CHOSE_BATTLE;
}
break;
}
if (gPopupMenu->popupType == POPUP_MENU_SWITCH_PARTNER) {
sfx_play_sound(SOUND_MENU_ERROR);
gPopupState = POPUP_STATE_ALREADY_HAVE_PARTNER_BEGIN;
break;
}
if (PopupNotBattle && (gPopupMenu->popupType == POPUP_MENU_USE_ITEM || gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE)) {
sfx_play_sound(SOUND_MENU_ERROR);
}
break;
}
} else {
switch (gPopupMenu->popupType) {
case POPUP_MENU_USE_ITEM:
case POPUP_MENU_THROW_AWAY_ITEM:
case POPUP_MENU_TRADE_FOR_BADGE:
case POPUP_MENU_SELL_ITEM:
case POPUP_MENU_CHECK_ITEM:
case POPUP_MENU_CLAIM_ITEM:
case POPUP_MENU_USEKEY:
if (PopupNotBattle) {
buttons = BUTTON_B | BUTTON_C_LEFT;
} else {
buttons = BUTTON_B;
}
break;
case POPUP_MENU_SWITCH_PARTNER:
case POPUP_MENU_UPGRADE_PARTNER:
if (PopupNotBattle) {
buttons = BUTTON_B | BUTTON_C_RIGHT;
} else {
buttons = BUTTON_B;
}
break;
case POPUP_MENU_READ_LETTER:
case POPUP_MENU_TAKE_FROM_CHEST:
case POPUP_MENU_READ_DIARY_PAGE:
case POPUP_MENU_READ_POSTCARD:
case POPUP_MENU_POST_OFFICE:
buttons = BUTTON_B;
break;
default:
buttons = 0;
break;
}
if (gGameStatusPtr->pressedButtons[0] & buttons) {
sfx_play_sound(SOUND_MENU_BACK);
if (PopupNotDipping) {
if (!PopupNotBattle) {
gPopupState = POPUP_STATE_MINUS_3;
} else {
gPopupState = POPUP_STATE_MINUS_7;
}
} else {
if (PopupDipMode == 0) {
gPopupState = POPUP_STATE_ALREADY_HAVE_PARTNER_BEGIN;
} else {
gPopupState = POPUP_STATE_CANCEL_DIP;
}
}
break;
}
switch (gPopupMenu->popupType) {
default:
buttons = 0;
break;
case POPUP_MENU_USE_ITEM:
buttons = BUTTON_C_RIGHT;
break;
case POPUP_MENU_SWITCH_PARTNER:
buttons = BUTTON_C_LEFT;
break;
}
if (PopupNotBattle && (gGameStatusPtr->pressedButtons[0] & buttons)) {
sfx_play_sound(SOUND_MENU_BACK);
gPopupState = POPUP_STATE_MINUS_6;
break;
}
}
}
break;
case POPUP_STATE_CHOSE_WORLD:
hud_element_set_tint(PopupMenu_EmptybarHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_EntryIconHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_CursorHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_UpArrowHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_DownArrowHEID, 160, 160, 160);
hud_element_set_script(PopupMenu_CursorHEID, &HES_HandPointer);
if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) {
hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_TimesHEID, 160, 160, 160);
}
if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_TimesHEID, 160, 160, 160);
}
if (gPopupMenu->popupType == POPUP_MENU_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
hud_element_set_tint(PopupMenu_PartnerLevelHEID, 160, 160, 160);
}
if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) {
hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160);
}
D_8010D690 = MSG_PAL_0D;
gPopupMenu->result = PopupMenu_SelectedIndex + 1;
return PopupMenu_SelectedIndex + 1;
case POPUP_STATE_CHOSE_BATTLE:
gPopupMenu->result = PopupMenu_SelectedIndex + 1;
return PopupMenu_SelectedIndex + 1;
case POPUP_STATE_MINUS_3:
switch (gPopupMenu->popupType) {
case POPUP_MENU_USE_ITEM:
case POPUP_MENU_THROW_AWAY_ITEM:
case POPUP_MENU_TRADE_FOR_BADGE:
case POPUP_MENU_SELL_ITEM:
case POPUP_MENU_CHECK_ITEM:
case POPUP_MENU_CLAIM_ITEM:
case POPUP_MENU_READ_LETTER:
case POPUP_MENU_TAKE_FROM_CHEST:
case POPUP_MENU_USEKEY:
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_HIDE);
break;
case POPUP_MENU_SWITCH_PARTNER:
case POPUP_MENU_UPGRADE_PARTNER:
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_HIDE);
break;
case POPUP_MENU_READ_DIARY_PAGE:
case POPUP_MENU_READ_POSTCARD:
case POPUP_MENU_POST_OFFICE:
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE);
break;
}
destroy_popup_menu();
free_worker(gPopupWorker);
gPopupState = POPUP_STATE_MINUS_5;
gPopupMenu->result = POPUP_RESULT_CANCEL;
return 255;
case POPUP_STATE_MINUS_4:
free_worker(gPopupWorker);
gPopupState = POPUP_STATE_MINUS_5;
gPopupMenu->result = POPUP_RESULT_CANCEL;
return 255;
case POPUP_STATE_MINUS_6:
gPopupMenu->result = POPUP_RESULT_MINUS_2;
return 255;
case POPUP_STATE_MINUS_7:
case POPUP_STATE_MINUS_5:
gPopupMenu->result = POPUP_RESULT_CANCEL;
return 255;
case POPUP_STATE_10:
D_8010D644--;
if (D_8010D644 == 0) {
gPopupState = POPUP_STATE_11;
gPopupMenu->result = PopupMenu_SelectedIndex + 1;
return PopupMenu_SelectedIndex + 1;
}
break;
case POPUP_STATE_20:
D_8010D644++;
if (D_8010D644 >= D_8010D692) {
gPopupState = POPUP_STATE_CHOOSING;
gPopupMenu->result = PopupMenu_SelectedIndex + 1;
return PopupMenu_SelectedIndex + 1;
}
break;
case POPUP_STATE_ALREADY_HAVE_PARTNER_BEGIN:
gPopupState = POPUP_STATE_ALREADY_HAVE_PARTNER_SHOW;
gPopupMenu->result = POPUP_RESULT_MINUS_1;
return 0;
case POPUP_STATE_ALREADY_HAVE_PARTNER_SHOW:
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_HIDE);
if (PopupNotBattle) {
set_window_update(WINDOW_ID_21, WINDOW_UPDATE_HIDE);
}
width = get_msg_width(MSG_Menus_006B, 0) + 23;
set_window_properties(WINDOW_ID_BATTLE_POPUP, 160 - (width / 2), 80, width, 40, WINDOW_PRIORITY_20, popup_draw_already_have_partner, NULL, -1);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
D_8010D644 = 60;
gPopupState = POPUP_STATE_ALREADY_HAVE_PARTNER_AWAIT;
return 0;
case POPUP_STATE_ALREADY_HAVE_PARTNER_AWAIT:
if (gGameStatusPtr->pressedButtons[0] & (BUTTON_A | BUTTON_B | BUTTON_C_RIGHT)) {
D_8010D644 = 0;
}
if (D_8010D644 != 0) {
D_8010D644--;
return 0;
}
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW);
if (PopupNotBattle) {
set_window_update(WINDOW_ID_21, WINDOW_UPDATE_SHOW);
}
gPopupState = POPUP_STATE_CHOOSING;
gPopupMenu->result = POPUP_RESULT_CHOOSING;
break;
case POPUP_STATE_CANCEL_DIP:
hud_element_set_tint(PopupMenu_EmptybarHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_EntryIconHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_CursorHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_UpArrowHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_DownArrowHEID, 160, 160, 160);
hud_element_set_script(PopupMenu_CursorHEID, &HES_HandPointer);
if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) {
hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_TimesHEID, 160, 160, 160);
}
if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_TimesHEID, 160, 160, 160);
}
if (gPopupMenu->popupType == POPUP_MENU_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
hud_element_set_tint(PopupMenu_PartnerLevelHEID, 160, 160, 160);
}
if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) {
hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160);
}
switch (gPopupMenu->popupType) {
case POPUP_MENU_USE_ITEM:
case POPUP_MENU_THROW_AWAY_ITEM:
case POPUP_MENU_TRADE_FOR_BADGE:
case POPUP_MENU_SELL_ITEM:
case POPUP_MENU_CHECK_ITEM:
case POPUP_MENU_CLAIM_ITEM:
case POPUP_MENU_READ_LETTER:
case POPUP_MENU_TAKE_FROM_CHEST:
case POPUP_MENU_USEKEY:
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_HIDE);
break;
case POPUP_MENU_SWITCH_PARTNER:
case POPUP_MENU_UPGRADE_PARTNER:
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_HIDE);
break;
case POPUP_MENU_READ_DIARY_PAGE:
case POPUP_MENU_READ_POSTCARD:
case POPUP_MENU_POST_OFFICE:
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE);
break;
}
D_8010D690 = MSG_PAL_0D;
if (PopupDipMode == 1) {
msgID = MSG_Menus_0068;
} else {
msgID = MSG_Menus_0069;
}
width = get_msg_width(msgID, 0) + 23;
set_window_properties(WINDOW_ID_21, 160 - (width / 2), 76, width, 32, WINDOW_PRIORITY_19, func_800F4C1C, NULL, -1);
set_window_update(WINDOW_ID_21, WINDOW_UPDATE_SHOW);
D_8010D6A0 = msg_get_printer_for_msg(MSG_Choice_001D, &D_8010D6A4);
msg_printer_set_origin_pos(D_8010D6A0, 160, 144);
gPopupState = POPUP_STATE_CANCEL_DIP_AWAIT_CHOICE;
break;
case POPUP_STATE_CANCEL_DIP_AWAIT_CHOICE:
if (D_8010D6A4 == 1) {
set_window_update(WINDOW_ID_21, WINDOW_UPDATE_HIDE);
switch (D_8010D6A0->currentOption) {
case 0:
gPopupState = POPUP_STATE_CANCEL_DIP_ACCEPT;
break;
case 1:
gPopupState = POPUP_STATE_CANCEL_DIP_DECLINE;
break;
}
}
break;
case POPUP_STATE_CANCEL_DIP_ACCEPT:
gPopupState = POPUP_STATE_MINUS_3;
break;
case POPUP_STATE_CANCEL_DIP_DECLINE:
hud_element_set_tint(PopupMenu_EmptybarHEID, 255, 255, 255);
hud_element_set_tint(PopupMenu_EntryIconHEID, 255, 255, 255);
hud_element_set_tint(PopupMenu_CursorHEID, 255, 255, 255);
hud_element_set_tint(PopupMenu_UpArrowHEID, 255, 255, 255);
hud_element_set_tint(PopupMenu_DownArrowHEID, 255, 255, 255);
if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) {
hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_TimesHEID, 160, 160, 160);
}
if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160);
hud_element_set_tint(PopupMenu_TimesHEID, 160, 160, 160);
}
if (gPopupMenu->popupType == POPUP_MENU_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
hud_element_set_tint(PopupMenu_PartnerLevelHEID, 160, 160, 160);
}
if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) {
hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160);
}
hud_element_set_script(PopupMenu_CursorHEID, &HES_HandPointer);
switch (gPopupMenu->popupType) {
case POPUP_MENU_USE_ITEM:
case POPUP_MENU_THROW_AWAY_ITEM:
case POPUP_MENU_TRADE_FOR_BADGE:
case POPUP_MENU_SELL_ITEM:
case POPUP_MENU_CHECK_ITEM:
case POPUP_MENU_CLAIM_ITEM:
case POPUP_MENU_READ_LETTER:
case POPUP_MENU_TAKE_FROM_CHEST:
case POPUP_MENU_USEKEY:
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW);
break;
case POPUP_MENU_SWITCH_PARTNER:
case POPUP_MENU_UPGRADE_PARTNER:
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW);
break;
case POPUP_MENU_READ_DIARY_PAGE:
case POPUP_MENU_READ_POSTCARD:
case POPUP_MENU_POST_OFFICE:
set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
break;
}
D_8010D690 = MSG_PAL_STANDARD;
gPopupState = POPUP_STATE_CHOOSING;
break;
}
gPopupMenu->result = POPUP_RESULT_CHOOSING;
return 0;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel update_encounters_neutral
/* 1ABCC 8003F7CC 27BDFF40 */ addiu $sp, $sp, -0xC0
/* 1ABD0 8003F7D0 AFB30074 */ sw $s3, 0x74($sp)
/* 1ABD4 8003F7D4 3C13800B */ lui $s3, %hi(gCurrentEncounter)
/* 1ABD8 8003F7D8 26730F10 */ addiu $s3, $s3, %lo(gCurrentEncounter)
/* 1ABDC 8003F7DC AFB40078 */ sw $s4, 0x78($sp)
/* 1ABE0 8003F7E0 3C148011 */ lui $s4, %hi(gPlayerStatus)
/* 1ABE4 8003F7E4 2694EFC8 */ addiu $s4, $s4, %lo(gPlayerStatus)
/* 1ABE8 8003F7E8 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 1ABEC 8003F7EC 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 1ABF0 8003F7F0 3C04800B */ lui $a0, %hi(gCameras)
/* 1ABF4 8003F7F4 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* 1ABF8 8003F7F8 AFBF008C */ sw $ra, 0x8C($sp)
/* 1ABFC 8003F7FC AFBE0088 */ sw $fp, 0x88($sp)
/* 1AC00 8003F800 AFB70084 */ sw $s7, 0x84($sp)
/* 1AC04 8003F804 AFB60080 */ sw $s6, 0x80($sp)
/* 1AC08 8003F808 AFB5007C */ sw $s5, 0x7C($sp)
/* 1AC0C 8003F80C AFB20070 */ sw $s2, 0x70($sp)
/* 1AC10 8003F810 AFB1006C */ sw $s1, 0x6C($sp)
/* 1AC14 8003F814 AFB00068 */ sw $s0, 0x68($sp)
/* 1AC18 8003F818 F7BE00B8 */ sdc1 $f30, 0xB8($sp)
/* 1AC1C 8003F81C F7BC00B0 */ sdc1 $f28, 0xB0($sp)
/* 1AC20 8003F820 F7BA00A8 */ sdc1 $f26, 0xA8($sp)
/* 1AC24 8003F824 F7B800A0 */ sdc1 $f24, 0xA0($sp)
/* 1AC28 8003F828 F7B60098 */ sdc1 $f22, 0x98($sp)
/* 1AC2C 8003F82C F7B40090 */ sdc1 $f20, 0x90($sp)
/* 1AC30 8003F830 00031080 */ sll $v0, $v1, 2
/* 1AC34 8003F834 00431021 */ addu $v0, $v0, $v1
/* 1AC38 8003F838 00021080 */ sll $v0, $v0, 2
/* 1AC3C 8003F83C 00431023 */ subu $v0, $v0, $v1
/* 1AC40 8003F840 000218C0 */ sll $v1, $v0, 3
/* 1AC44 8003F844 00431021 */ addu $v0, $v0, $v1
/* 1AC48 8003F848 000210C0 */ sll $v0, $v0, 3
/* 1AC4C 8003F84C 00441021 */ addu $v0, $v0, $a0
/* 1AC50 8003F850 AFA20048 */ sw $v0, 0x48($sp)
/* 1AC54 8003F854 82630005 */ lb $v1, 0x5($s3)
/* 1AC58 8003F858 24020005 */ addiu $v0, $zero, 0x5
/* 1AC5C 8003F85C 10620426 */ beq $v1, $v0, .L800408F8
/* 1AC60 8003F860 2402FFFF */ addiu $v0, $zero, -0x1
/* 1AC64 8003F864 C69000A8 */ lwc1 $f16, 0xA8($s4)
/* 1AC68 8003F868 3C014334 */ lui $at, (0x43340000 >> 16)
/* 1AC6C 8003F86C 44810000 */ mtc1 $at, $f0
/* 1AC70 8003F870 E7B0005C */ swc1 $f16, 0x5C($sp)
/* 1AC74 8003F874 AE620014 */ sw $v0, 0x14($s3)
/* 1AC78 8003F878 AE620018 */ sw $v0, 0x18($s3)
/* 1AC7C 8003F87C 8E620000 */ lw $v0, 0x0($s3)
/* 1AC80 8003F880 2403FFFE */ addiu $v1, $zero, -0x2
/* 1AC84 8003F884 A2600005 */ sb $zero, 0x5($s3)
/* 1AC88 8003F888 A2600011 */ sb $zero, 0x11($s3)
/* 1AC8C 8003F88C A2600013 */ sb $zero, 0x13($s3)
/* 1AC90 8003F890 4600803C */ c.lt.s $f16, $f0
/* 1AC94 8003F894 00431024 */ and $v0, $v0, $v1
/* 1AC98 8003F898 2403FFFD */ addiu $v1, $zero, -0x3
/* 1AC9C 8003F89C 00431024 */ and $v0, $v0, $v1
/* 1ACA0 8003F8A0 2403FFFB */ addiu $v1, $zero, -0x5
/* 1ACA4 8003F8A4 00431024 */ and $v0, $v0, $v1
/* 1ACA8 8003F8A8 AE620000 */ sw $v0, 0x0($s3)
/* 1ACAC 8003F8AC C6920028 */ lwc1 $f18, 0x28($s4)
/* 1ACB0 8003F8B0 E7B20050 */ swc1 $f18, 0x50($sp)
/* 1ACB4 8003F8B4 C690002C */ lwc1 $f16, 0x2C($s4)
/* 1ACB8 8003F8B8 E7B00054 */ swc1 $f16, 0x54($sp)
/* 1ACBC 8003F8BC C6920030 */ lwc1 $f18, 0x30($s4)
/* 1ACC0 8003F8C0 45000007 */ bc1f .L8003F8E0
/* 1ACC4 8003F8C4 E7B20058 */ swc1 $f18, 0x58($sp)
/* 1ACC8 8003F8C8 8FA80048 */ lw $t0, 0x48($sp)
/* 1ACCC 8003F8CC 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1ACD0 8003F8D0 44816000 */ mtc1 $at, $f12
/* 1ACD4 8003F8D4 C500006C */ lwc1 $f0, 0x6C($t0)
/* 1ACD8 8003F8D8 0800FE3D */ j .L8003F8F4
/* 1ACDC 8003F8DC 460C0301 */ sub.s $f12, $f0, $f12
.L8003F8E0:
/* 1ACE0 8003F8E0 8FA80048 */ lw $t0, 0x48($sp)
/* 1ACE4 8003F8E4 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1ACE8 8003F8E8 44816000 */ mtc1 $at, $f12
/* 1ACEC 8003F8EC C500006C */ lwc1 $f0, 0x6C($t0)
/* 1ACF0 8003F8F0 460C0300 */ add.s $f12, $f0, $f12
.L8003F8F4:
/* 1ACF4 8003F8F4 0C00A6C9 */ jal clamp_angle
/* 1ACF8 8003F8F8 00000000 */ nop
/* 1ACFC 8003F8FC E7A0005C */ swc1 $f0, 0x5C($sp)
/* 1AD00 8003F900 8262000A */ lb $v0, 0xA($s3)
/* 1AD04 8003F904 10400059 */ beqz $v0, .L8003FA6C
/* 1AD08 8003F908 9263000A */ lbu $v1, 0xA($s3)
/* 1AD0C 8003F90C 3C02800A */ lui $v0, %hi(gOverrideFlags)
/* 1AD10 8003F910 8C42A650 */ lw $v0, %lo(gOverrideFlags)($v0)
/* 1AD14 8003F914 30420040 */ andi $v0, $v0, 0x40
/* 1AD18 8003F918 14400002 */ bnez $v0, .L8003F924
/* 1AD1C 8003F91C 2462FFFF */ addiu $v0, $v1, -0x1
/* 1AD20 8003F920 A262000A */ sb $v0, 0xA($s3)
.L8003F924:
/* 1AD24 8003F924 86820010 */ lh $v0, 0x10($s4)
/* 1AD28 8003F928 10400050 */ beqz $v0, .L8003FA6C
/* 1AD2C 8003F92C 00000000 */ nop
/* 1AD30 8003F930 8E820000 */ lw $v0, 0x0($s4)
/* 1AD34 8003F934 30422000 */ andi $v0, $v0, 0x2000
/* 1AD38 8003F938 5440004B */ bnel $v0, $zero, .L8003FA68
/* 1AD3C 8003F93C 24020001 */ addiu $v0, $zero, 0x1
/* 1AD40 8003F940 9262000A */ lbu $v0, 0xA($s3)
/* 1AD44 8003F944 00021600 */ sll $v0, $v0, 24
/* 1AD48 8003F948 0800FE9A */ j .L8003FA68
/* 1AD4C 8003F94C 00021603 */ sra $v0, $v0, 24
.L8003F950:
/* 1AD50 8003F950 24020001 */ addiu $v0, $zero, 0x1
/* 1AD54 8003F954 A2620005 */ sb $v0, 0x5($s3)
/* 1AD58 8003F958 A2220005 */ sb $v0, 0x5($s1)
/* 1AD5C 8003F95C AE760088 */ sw $s6, 0x88($s3)
/* 1AD60 8003F960 AE71008C */ sw $s1, 0x8C($s3)
/* 1AD64 8003F964 A2600004 */ sb $zero, 0x4($s3)
/* 1AD68 8003F968 0801023D */ j .L800408F4
/* 1AD6C 8003F96C A2600006 */ sb $zero, 0x6($s3)
.L8003F970:
/* 1AD70 8003F970 8E860028 */ lw $a2, 0x28($s4)
/* 1AD74 8003F974 8E87002C */ lw $a3, 0x2C($s4)
/* 1AD78 8003F978 C6800030 */ lwc1 $f0, 0x30($s4)
/* 1AD7C 8003F97C 0000282D */ daddu $a1, $zero, $zero
/* 1AD80 8003F980 0C052757 */ jal sfx_play_sound_at_position
/* 1AD84 8003F984 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1AD88 8003F988 C6480038 */ lwc1 $f8, 0x38($s2)
/* 1AD8C 8003F98C C68C0028 */ lwc1 $f12, 0x28($s4)
/* 1AD90 8003F990 460C4201 */ sub.s $f8, $f8, $f12
/* 1AD94 8003F994 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 1AD98 8003F998 44815000 */ mtc1 $at, $f10
/* 1AD9C 8003F99C 00000000 */ nop
/* 1ADA0 8003F9A0 460A4202 */ mul.s $f8, $f8, $f10
/* 1ADA4 8003F9A4 00000000 */ nop
/* 1ADA8 8003F9A8 864200A8 */ lh $v0, 0xA8($s2)
/* 1ADAC 8003F9AC C642003C */ lwc1 $f2, 0x3C($s2)
/* 1ADB0 8003F9B0 44820000 */ mtc1 $v0, $f0
/* 1ADB4 8003F9B4 00000000 */ nop
/* 1ADB8 8003F9B8 46800020 */ cvt.s.w $f0, $f0
/* 1ADBC 8003F9BC 46001080 */ add.s $f2, $f2, $f0
/* 1ADC0 8003F9C0 868200B0 */ lh $v0, 0xB0($s4)
/* 1ADC4 8003F9C4 C686002C */ lwc1 $f6, 0x2C($s4)
/* 1ADC8 8003F9C8 44820000 */ mtc1 $v0, $f0
/* 1ADCC 8003F9CC 00000000 */ nop
/* 1ADD0 8003F9D0 46800020 */ cvt.s.w $f0, $f0
/* 1ADD4 8003F9D4 46003000 */ add.s $f0, $f6, $f0
/* 1ADD8 8003F9D8 46001081 */ sub.s $f2, $f2, $f0
/* 1ADDC 8003F9DC 460A1082 */ mul.s $f2, $f2, $f10
/* 1ADE0 8003F9E0 00000000 */ nop
/* 1ADE4 8003F9E4 C6840030 */ lwc1 $f4, 0x30($s4)
/* 1ADE8 8003F9E8 C6400040 */ lwc1 $f0, 0x40($s2)
/* 1ADEC 8003F9EC 46040001 */ sub.s $f0, $f0, $f4
/* 1ADF0 8003F9F0 460A0002 */ mul.s $f0, $f0, $f10
/* 1ADF4 8003F9F4 00000000 */ nop
/* 1ADF8 8003F9F8 46086300 */ add.s $f12, $f12, $f8
/* 1ADFC 8003F9FC 46023180 */ add.s $f6, $f6, $f2
/* 1AE00 8003FA00 24040003 */ addiu $a0, $zero, 0x3
/* 1AE04 8003FA04 44056000 */ mfc1 $a1, $f12
/* 1AE08 8003FA08 46002100 */ add.s $f4, $f4, $f0
/* 1AE0C 8003FA0C 3C01BF80 */ lui $at, (0xBF800000 >> 16)
/* 1AE10 8003FA10 44810000 */ mtc1 $at, $f0
/* 1AE14 8003FA14 44063000 */ mfc1 $a2, $f6
/* 1AE18 8003FA18 44072000 */ mfc1 $a3, $f4
/* 1AE1C 8003FA1C 0080802D */ daddu $s0, $a0, $zero
/* 1AE20 8003FA20 AFA5003C */ sw $a1, 0x3C($sp)
/* 1AE24 8003FA24 AFA60040 */ sw $a2, 0x40($sp)
/* 1AE28 8003FA28 AFA70044 */ sw $a3, 0x44($sp)
/* 1AE2C 8003FA2C AFA00010 */ sw $zero, 0x10($sp)
/* 1AE30 8003FA30 E7A00014 */ swc1 $f0, 0x14($sp)
/* 1AE34 8003FA34 AFA00018 */ sw $zero, 0x18($sp)
/* 1AE38 8003FA38 0C01C064 */ jal fx_damage_stars
/* 1AE3C 8003FA3C AFB0001C */ sw $s0, 0x1C($sp)
/* 1AE40 8003FA40 A2700005 */ sb $s0, 0x5($s3)
/* 1AE44 8003FA44 8E820004 */ lw $v0, 0x4($s4)
/* 1AE48 8003FA48 3C030002 */ lui $v1, (0x20000 >> 16)
/* 1AE4C 8003FA4C 00431025 */ or $v0, $v0, $v1
/* 1AE50 8003FA50 AE820004 */ sw $v0, 0x4($s4)
/* 1AE54 8003FA54 A2300005 */ sb $s0, 0x5($s1)
/* 1AE58 8003FA58 AE760088 */ sw $s6, 0x88($s3)
/* 1AE5C 8003FA5C AE71008C */ sw $s1, 0x8C($s3)
/* 1AE60 8003FA60 0801023D */ j .L800408F4
/* 1AE64 8003FA64 A2600004 */ sb $zero, 0x4($s3)
.L8003FA68:
/* 1AE68 8003FA68 A6820010 */ sh $v0, 0x10($s4)
.L8003FA6C:
/* 1AE6C 8003FA6C 8262001C */ lb $v0, 0x1C($s3)
/* 1AE70 8003FA70 184003A0 */ blez $v0, .L800408F4
/* 1AE74 8003FA74 AFA0004C */ sw $zero, 0x4C($sp)
/* 1AE78 8003FA78 3C087FFF */ lui $t0, (0x7FFFFFFF >> 16)
/* 1AE7C 8003FA7C 3508FFFF */ ori $t0, $t0, (0x7FFFFFFF & 0xFFFF)
/* 1AE80 8003FA80 AFA80060 */ sw $t0, 0x60($sp)
/* 1AE84 8003FA84 27A8003C */ addiu $t0, $sp, 0x3C
/* 1AE88 8003FA88 AFA80064 */ sw $t0, 0x64($sp)
.L8003FA8C:
/* 1AE8C 8003FA8C 8FA8004C */ lw $t0, 0x4C($sp)
/* 1AE90 8003FA90 00081080 */ sll $v0, $t0, 2
/* 1AE94 8003FA94 02621021 */ addu $v0, $s3, $v0
/* 1AE98 8003FA98 8C560028 */ lw $s6, 0x28($v0)
/* 1AE9C 8003FA9C 12C00390 */ beqz $s6, .L800408E0
/* 1AEA0 8003FAA0 00000000 */ nop
/* 1AEA4 8003FAA4 8EC20000 */ lw $v0, 0x0($s6)
/* 1AEA8 8003FAA8 1840038D */ blez $v0, .L800408E0
/* 1AEAC 8003FAAC 0000A82D */ daddu $s5, $zero, $zero
/* 1AEB0 8003FAB0 27BE0040 */ addiu $fp, $sp, 0x40
/* 1AEB4 8003FAB4 27B70044 */ addiu $s7, $sp, 0x44
/* 1AEB8 8003FAB8 00151080 */ sll $v0, $s5, 2
.L8003FABC:
/* 1AEBC 8003FABC 02C21021 */ addu $v0, $s6, $v0
/* 1AEC0 8003FAC0 8C510004 */ lw $s1, 0x4($v0)
/* 1AEC4 8003FAC4 12200380 */ beqz $s1, .L800408C8
/* 1AEC8 8003FAC8 00000000 */ nop
/* 1AECC 8003FACC 8E220000 */ lw $v0, 0x0($s1)
/* 1AED0 8003FAD0 30420020 */ andi $v0, $v0, 0x20
/* 1AED4 8003FAD4 1440037C */ bnez $v0, .L800408C8
/* 1AED8 8003FAD8 00000000 */ nop
/* 1AEDC 8003FADC 0C00EABB */ jal get_npc_unsafe
/* 1AEE0 8003FAE0 86240008 */ lh $a0, 0x8($s1)
/* 1AEE4 8003FAE4 0040902D */ daddu $s2, $v0, $zero
/* 1AEE8 8003FAE8 822200B4 */ lb $v0, 0xB4($s1)
/* 1AEEC 8003FAEC 922300B4 */ lbu $v1, 0xB4($s1)
/* 1AEF0 8003FAF0 50400030 */ beql $v0, $zero, .L8003FBB4
/* 1AEF4 8003FAF4 3C030020 */ lui $v1, (0x200000 >> 16)
/* 1AEF8 8003FAF8 3C02800A */ lui $v0, %hi(gOverrideFlags)
/* 1AEFC 8003FAFC 8C42A650 */ lw $v0, %lo(gOverrideFlags)($v0)
/* 1AF00 8003FB00 30420040 */ andi $v0, $v0, 0x40
/* 1AF04 8003FB04 54400005 */ bnel $v0, $zero, .L8003FB1C
/* 1AF08 8003FB08 0000102D */ daddu $v0, $zero, $zero
/* 1AF0C 8003FB0C 2462FFFF */ addiu $v0, $v1, -0x1
/* 1AF10 8003FB10 A22200B4 */ sb $v0, 0xB4($s1)
/* 1AF14 8003FB14 00021600 */ sll $v0, $v0, 24
/* 1AF18 8003FB18 00021603 */ sra $v0, $v0, 24
.L8003FB1C:
/* 1AF1C 8003FB1C 30420001 */ andi $v0, $v0, 0x1
/* 1AF20 8003FB20 10400007 */ beqz $v0, .L8003FB40
/* 1AF24 8003FB24 3C088000 */ lui $t0, (0x80000000 >> 16)
/* 1AF28 8003FB28 8E420000 */ lw $v0, 0x0($s2)
/* 1AF2C 8003FB2C 00481025 */ or $v0, $v0, $t0
/* 1AF30 8003FB30 AE420000 */ sw $v0, 0x0($s2)
/* 1AF34 8003FB34 8E220000 */ lw $v0, 0x0($s1)
/* 1AF38 8003FB38 0800FED6 */ j .L8003FB58
/* 1AF3C 8003FB3C 00481025 */ or $v0, $v0, $t0
.L8003FB40:
/* 1AF40 8003FB40 8E420000 */ lw $v0, 0x0($s2)
/* 1AF44 8003FB44 8FA80060 */ lw $t0, 0x60($sp)
/* 1AF48 8003FB48 00481024 */ and $v0, $v0, $t0
/* 1AF4C 8003FB4C AE420000 */ sw $v0, 0x0($s2)
/* 1AF50 8003FB50 8E220000 */ lw $v0, 0x0($s1)
/* 1AF54 8003FB54 00481024 */ and $v0, $v0, $t0
.L8003FB58:
/* 1AF58 8003FB58 AE220000 */ sw $v0, 0x0($s1)
/* 1AF5C 8003FB5C 0C0B11EA */ jal get_script_by_id
/* 1AF60 8003FB60 8E24005C */ lw $a0, 0x5C($s1)
/* 1AF64 8003FB64 0040202D */ daddu $a0, $v0, $zero
/* 1AF68 8003FB68 10800003 */ beqz $a0, .L8003FB78
/* 1AF6C 8003FB6C 00000000 */ nop
/* 1AF70 8003FB70 0C0B11FA */ jal set_script_flags
/* 1AF74 8003FB74 24050080 */ addiu $a1, $zero, 0x80
.L8003FB78:
/* 1AF78 8003FB78 8E240054 */ lw $a0, 0x54($s1)
/* 1AF7C 8003FB7C 0C0B11EA */ jal get_script_by_id
/* 1AF80 8003FB80 00000000 */ nop
/* 1AF84 8003FB84 0040202D */ daddu $a0, $v0, $zero
/* 1AF88 8003FB88 10800003 */ beqz $a0, .L8003FB98
/* 1AF8C 8003FB8C 00000000 */ nop
/* 1AF90 8003FB90 0C0B11FA */ jal set_script_flags
/* 1AF94 8003FB94 24050080 */ addiu $a1, $zero, 0x80
.L8003FB98:
/* 1AF98 8003FB98 8E220000 */ lw $v0, 0x0($s1)
/* 1AF9C 8003FB9C 3C030008 */ lui $v1, (0x80000 >> 16)
/* 1AFA0 8003FBA0 00431024 */ and $v0, $v0, $v1
/* 1AFA4 8003FBA4 10400052 */ beqz $v0, .L8003FCF0
/* 1AFA8 8003FBA8 00000000 */ nop
/* 1AFAC 8003FBAC 0800FF2D */ j .L8003FCB4
/* 1AFB0 8003FBB0 8E24005C */ lw $a0, 0x5C($s1)
.L8003FBB4:
/* 1AFB4 8003FBB4 8E220000 */ lw $v0, 0x0($s1)
/* 1AFB8 8003FBB8 00431024 */ and $v0, $v0, $v1
/* 1AFBC 8003FBBC 14400035 */ bnez $v0, .L8003FC94
/* 1AFC0 8003FBC0 27A20020 */ addiu $v0, $sp, 0x20
/* 1AFC4 8003FBC4 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 1AFC8 8003FBC8 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 1AFCC 8003FBCC AFA20010 */ sw $v0, 0x10($sp)
/* 1AFD0 8003FBD0 27A20024 */ addiu $v0, $sp, 0x24
/* 1AFD4 8003FBD4 AFA20014 */ sw $v0, 0x14($sp)
/* 1AFD8 8003FBD8 27A20028 */ addiu $v0, $sp, 0x28
/* 1AFDC 8003FBDC AFA20018 */ sw $v0, 0x18($sp)
/* 1AFE0 8003FBE0 8E450038 */ lw $a1, 0x38($s2)
/* 1AFE4 8003FBE4 8E46003C */ lw $a2, 0x3C($s2)
/* 1AFE8 8003FBE8 0C00B94E */ jal get_screen_coords
/* 1AFEC 8003FBEC 8E470040 */ lw $a3, 0x40($s2)
/* 1AFF0 8003FBF0 8FA20020 */ lw $v0, 0x20($sp)
/* 1AFF4 8003FBF4 244200A0 */ addiu $v0, $v0, 0xA0
/* 1AFF8 8003FBF8 2C420281 */ sltiu $v0, $v0, 0x281
/* 1AFFC 8003FBFC 1040000A */ beqz $v0, .L8003FC28
/* 1B000 8003FC00 00000000 */ nop
/* 1B004 8003FC04 8FA30024 */ lw $v1, 0x24($sp)
/* 1B008 8003FC08 2862FF88 */ slti $v0, $v1, -0x78
/* 1B00C 8003FC0C 14400006 */ bnez $v0, .L8003FC28
/* 1B010 8003FC10 28620169 */ slti $v0, $v1, 0x169
/* 1B014 8003FC14 10400004 */ beqz $v0, .L8003FC28
/* 1B018 8003FC18 00000000 */ nop
/* 1B01C 8003FC1C 8FA20028 */ lw $v0, 0x28($sp)
/* 1B020 8003FC20 0441001C */ bgez $v0, .L8003FC94
/* 1B024 8003FC24 00000000 */ nop
.L8003FC28:
/* 1B028 8003FC28 8E220000 */ lw $v0, 0x0($s1)
/* 1B02C 8003FC2C 30420001 */ andi $v0, $v0, 0x1
/* 1B030 8003FC30 14400018 */ bnez $v0, .L8003FC94
/* 1B034 8003FC34 3C088000 */ lui $t0, (0x80000000 >> 16)
/* 1B038 8003FC38 8E420000 */ lw $v0, 0x0($s2)
/* 1B03C 8003FC3C 00481025 */ or $v0, $v0, $t0
/* 1B040 8003FC40 AE420000 */ sw $v0, 0x0($s2)
/* 1B044 8003FC44 8E220000 */ lw $v0, 0x0($s1)
/* 1B048 8003FC48 8E24005C */ lw $a0, 0x5C($s1)
/* 1B04C 8003FC4C 00481025 */ or $v0, $v0, $t0
/* 1B050 8003FC50 0C0B11EA */ jal get_script_by_id
/* 1B054 8003FC54 AE220000 */ sw $v0, 0x0($s1)
/* 1B058 8003FC58 0040202D */ daddu $a0, $v0, $zero
/* 1B05C 8003FC5C 10800003 */ beqz $a0, .L8003FC6C
/* 1B060 8003FC60 00000000 */ nop
/* 1B064 8003FC64 0C0B11FA */ jal set_script_flags
/* 1B068 8003FC68 24050080 */ addiu $a1, $zero, 0x80
.L8003FC6C:
/* 1B06C 8003FC6C 8E240054 */ lw $a0, 0x54($s1)
/* 1B070 8003FC70 0C0B11EA */ jal get_script_by_id
/* 1B074 8003FC74 00000000 */ nop
/* 1B078 8003FC78 0040202D */ daddu $a0, $v0, $zero
/* 1B07C 8003FC7C 1080001C */ beqz $a0, .L8003FCF0
/* 1B080 8003FC80 00000000 */ nop
/* 1B084 8003FC84 0C0B11FA */ jal set_script_flags
/* 1B088 8003FC88 24050080 */ addiu $a1, $zero, 0x80
/* 1B08C 8003FC8C 0800FF3C */ j .L8003FCF0
/* 1B090 8003FC90 00000000 */ nop
.L8003FC94:
/* 1B094 8003FC94 8E420000 */ lw $v0, 0x0($s2)
/* 1B098 8003FC98 8FA80060 */ lw $t0, 0x60($sp)
/* 1B09C 8003FC9C 00481024 */ and $v0, $v0, $t0
/* 1B0A0 8003FCA0 AE420000 */ sw $v0, 0x0($s2)
/* 1B0A4 8003FCA4 8E220000 */ lw $v0, 0x0($s1)
/* 1B0A8 8003FCA8 8E24005C */ lw $a0, 0x5C($s1)
/* 1B0AC 8003FCAC 00481024 */ and $v0, $v0, $t0
/* 1B0B0 8003FCB0 AE220000 */ sw $v0, 0x0($s1)
.L8003FCB4:
/* 1B0B4 8003FCB4 0C0B11EA */ jal get_script_by_id
/* 1B0B8 8003FCB8 00000000 */ nop
/* 1B0BC 8003FCBC 0040202D */ daddu $a0, $v0, $zero
/* 1B0C0 8003FCC0 10800003 */ beqz $a0, .L8003FCD0
/* 1B0C4 8003FCC4 00000000 */ nop
/* 1B0C8 8003FCC8 0C0B1220 */ jal clear_script_flags
/* 1B0CC 8003FCCC 24050080 */ addiu $a1, $zero, 0x80
.L8003FCD0:
/* 1B0D0 8003FCD0 8E240054 */ lw $a0, 0x54($s1)
/* 1B0D4 8003FCD4 0C0B11EA */ jal get_script_by_id
/* 1B0D8 8003FCD8 00000000 */ nop
/* 1B0DC 8003FCDC 0040202D */ daddu $a0, $v0, $zero
/* 1B0E0 8003FCE0 10800003 */ beqz $a0, .L8003FCF0
/* 1B0E4 8003FCE4 00000000 */ nop
/* 1B0E8 8003FCE8 0C0B1220 */ jal clear_script_flags
/* 1B0EC 8003FCEC 24050080 */ addiu $a1, $zero, 0x80
.L8003FCF0:
/* 1B0F0 8003FCF0 8E230000 */ lw $v1, 0x0($s1)
/* 1B0F4 8003FCF4 3C088000 */ lui $t0, (0x80000000 >> 16)
/* 1B0F8 8003FCF8 00681024 */ and $v0, $v1, $t0
/* 1B0FC 8003FCFC 144002F2 */ bnez $v0, .L800408C8
/* 1B100 8003FD00 30620001 */ andi $v0, $v1, 0x1
/* 1B104 8003FD04 1040002A */ beqz $v0, .L8003FDB0
/* 1B108 8003FD08 3C020040 */ lui $v0, (0x400000 >> 16)
/* 1B10C 8003FD0C 00621024 */ and $v0, $v1, $v0
/* 1B110 8003FD10 14400020 */ bnez $v0, .L8003FD94
/* 1B114 8003FD14 00000000 */ nop
/* 1B118 8003FD18 8E8200C8 */ lw $v0, 0xC8($s4)
/* 1B11C 8003FD1C 16420015 */ bne $s2, $v0, .L8003FD74
/* 1B120 8003FD20 24033039 */ addiu $v1, $zero, 0x3039
/* 1B124 8003FD24 C640000C */ lwc1 $f0, 0xC($s2)
/* 1B128 8003FD28 4600040D */ trunc.w.s $f16, $f0
/* 1B12C 8003FD2C 44028000 */ mfc1 $v0, $f16
/* 1B130 8003FD30 00000000 */ nop
/* 1B134 8003FD34 A62200E0 */ sh $v0, 0xE0($s1)
/* 1B138 8003FD38 C64C0038 */ lwc1 $f12, 0x38($s2)
/* 1B13C 8003FD3C C64E0040 */ lwc1 $f14, 0x40($s2)
/* 1B140 8003FD40 8E860028 */ lw $a2, 0x28($s4)
/* 1B144 8003FD44 0C00A720 */ jal atan2
/* 1B148 8003FD48 8E870030 */ lw $a3, 0x30($s4)
/* 1B14C 8003FD4C E640000C */ swc1 $f0, 0xC($s2)
/* 1B150 8003FD50 0C0B11EA */ jal get_script_by_id
/* 1B154 8003FD54 8E240054 */ lw $a0, 0x54($s1)
/* 1B158 8003FD58 0040202D */ daddu $a0, $v0, $zero
/* 1B15C 8003FD5C 10800014 */ beqz $a0, .L8003FDB0
/* 1B160 8003FD60 00000000 */ nop
/* 1B164 8003FD64 0C0B11FA */ jal set_script_flags
/* 1B168 8003FD68 24050080 */ addiu $a1, $zero, 0x80
/* 1B16C 8003FD6C 0800FF6C */ j .L8003FDB0
/* 1B170 8003FD70 00000000 */ nop
.L8003FD74:
/* 1B174 8003FD74 862200E0 */ lh $v0, 0xE0($s1)
/* 1B178 8003FD78 10430006 */ beq $v0, $v1, .L8003FD94
/* 1B17C 8003FD7C 00000000 */ nop
/* 1B180 8003FD80 44820000 */ mtc1 $v0, $f0
/* 1B184 8003FD84 00000000 */ nop
/* 1B188 8003FD88 46800020 */ cvt.s.w $f0, $f0
/* 1B18C 8003FD8C E640000C */ swc1 $f0, 0xC($s2)
/* 1B190 8003FD90 A62300E0 */ sh $v1, 0xE0($s1)
.L8003FD94:
/* 1B194 8003FD94 0C0B11EA */ jal get_script_by_id
/* 1B198 8003FD98 8E240054 */ lw $a0, 0x54($s1)
/* 1B19C 8003FD9C 0040202D */ daddu $a0, $v0, $zero
/* 1B1A0 8003FDA0 10800003 */ beqz $a0, .L8003FDB0
/* 1B1A4 8003FDA4 00000000 */ nop
/* 1B1A8 8003FDA8 0C0B1220 */ jal clear_script_flags
/* 1B1AC 8003FDAC 24050080 */ addiu $a1, $zero, 0x80
.L8003FDB0:
/* 1B1B0 8003FDB0 8262000A */ lb $v0, 0xA($s3)
/* 1B1B4 8003FDB4 144002C4 */ bnez $v0, .L800408C8
/* 1B1B8 8003FDB8 24080001 */ addiu $t0, $zero, 0x1
/* 1B1BC 8003FDBC 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 1B1C0 8003FDC0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 1B1C4 8003FDC4 80420074 */ lb $v0, 0x74($v0)
/* 1B1C8 8003FDC8 104802BF */ beq $v0, $t0, .L800408C8
/* 1B1CC 8003FDCC 3C030008 */ lui $v1, (0x80000 >> 16)
/* 1B1D0 8003FDD0 8E820000 */ lw $v0, 0x0($s4)
/* 1B1D4 8003FDD4 00431024 */ and $v0, $v0, $v1
/* 1B1D8 8003FDD8 144002BB */ bnez $v0, .L800408C8
/* 1B1DC 8003FDDC 00000000 */ nop
/* 1B1E0 8003FDE0 3C04800A */ lui $a0, %hi(gOverrideFlags)
/* 1B1E4 8003FDE4 8C84A650 */ lw $a0, %lo(gOverrideFlags)($a0)
/* 1B1E8 8003FDE8 30820040 */ andi $v0, $a0, 0x40
/* 1B1EC 8003FDEC 144002B6 */ bnez $v0, .L800408C8
/* 1B1F0 8003FDF0 24020009 */ addiu $v0, $zero, 0x9
/* 1B1F4 8003FDF4 3C038011 */ lui $v1, %hi(gPartnerStatus + 0x3)
/* 1B1F8 8003FDF8 8063EBB3 */ lb $v1, %lo(gPartnerStatus + 0x3)($v1)
/* 1B1FC 8003FDFC 106202B2 */ beq $v1, $v0, .L800408C8
/* 1B200 8003FE00 00000000 */ nop
/* 1B204 8003FE04 8E220000 */ lw $v0, 0x0($s1)
/* 1B208 8003FE08 00481024 */ and $v0, $v0, $t0
/* 1B20C 8003FE0C 144002AE */ bnez $v0, .L800408C8
/* 1B210 8003FE10 30820F00 */ andi $v0, $a0, 0xF00
/* 1B214 8003FE14 144002AC */ bnez $v0, .L800408C8
/* 1B218 8003FE18 00000000 */ nop
/* 1B21C 8003FE1C 0C04D07A */ jal is_picking_up_item
/* 1B220 8003FE20 00000000 */ nop
/* 1B224 8003FE24 144002A8 */ bnez $v0, .L800408C8
/* 1B228 8003FE28 3C021000 */ lui $v0, (0x10000000 >> 16)
/* 1B22C 8003FE2C 8E230000 */ lw $v1, 0x0($s1)
/* 1B230 8003FE30 00621824 */ and $v1, $v1, $v0
/* 1B234 8003FE34 14600007 */ bnez $v1, .L8003FE54
/* 1B238 8003FE38 00000000 */ nop
/* 1B23C 8003FE3C 0C03AD79 */ jal partner_test_enemy_collision
/* 1B240 8003FE40 0240202D */ daddu $a0, $s2, $zero
/* 1B244 8003FE44 10400003 */ beqz $v0, .L8003FE54
/* 1B248 8003FE48 24020006 */ addiu $v0, $zero, 0x6
/* 1B24C 8003FE4C 0801015F */ j .L8004057C
/* 1B250 8003FE50 A2620005 */ sb $v0, 0x5($s3)
.L8003FE54:
/* 1B254 8003FE54 C6400038 */ lwc1 $f0, 0x38($s2)
/* 1B258 8003FE58 C65A003C */ lwc1 $f26, 0x3C($s2)
/* 1B25C 8003FE5C C658000C */ lwc1 $f24, 0xC($s2)
/* 1B260 8003FE60 C6420040 */ lwc1 $f2, 0x40($s2)
/* 1B264 8003FE64 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 1B268 8003FE68 E7A20030 */ swc1 $f2, 0x30($sp)
/* 1B26C 8003FE6C 864300A8 */ lh $v1, 0xA8($s2)
/* 1B270 8003FE70 964200A6 */ lhu $v0, 0xA6($s2)
/* 1B274 8003FE74 4483E000 */ mtc1 $v1, $f28
/* 1B278 8003FE78 00000000 */ nop
/* 1B27C 8003FE7C 4680E720 */ cvt.s.w $f28, $f28
/* 1B280 8003FE80 00021400 */ sll $v0, $v0, 16
/* 1B284 8003FE84 00021C03 */ sra $v1, $v0, 16
/* 1B288 8003FE88 000217C2 */ srl $v0, $v0, 31
/* 1B28C 8003FE8C 00621821 */ addu $v1, $v1, $v0
/* 1B290 8003FE90 00031843 */ sra $v1, $v1, 1
/* 1B294 8003FE94 8E2200DC */ lw $v0, 0xDC($s1)
/* 1B298 8003FE98 4483F000 */ mtc1 $v1, $f30
/* 1B29C 8003FE9C 00000000 */ nop
/* 1B2A0 8003FEA0 10400020 */ beqz $v0, .L8003FF24
/* 1B2A4 8003FEA4 4680F7A0 */ cvt.s.w $f30, $f30
/* 1B2A8 8003FEA8 8642008A */ lh $v0, 0x8A($s2)
/* 1B2AC 8003FEAC 3C014334 */ lui $at, (0x43340000 >> 16)
/* 1B2B0 8003FEB0 44810000 */ mtc1 $at, $f0
/* 1B2B4 8003FEB4 4482C000 */ mtc1 $v0, $f24
/* 1B2B8 8003FEB8 00000000 */ nop
/* 1B2BC 8003FEBC 4680C620 */ cvt.s.w $f24, $f24
/* 1B2C0 8003FEC0 4600C03C */ c.lt.s $f24, $f0
/* 1B2C4 8003FEC4 00000000 */ nop
/* 1B2C8 8003FEC8 45000007 */ bc1f .L8003FEE8
/* 1B2CC 8003FECC 00000000 */ nop
/* 1B2D0 8003FED0 8FA80048 */ lw $t0, 0x48($sp)
/* 1B2D4 8003FED4 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1B2D8 8003FED8 44818000 */ mtc1 $at, $f16
/* 1B2DC 8003FEDC C50C006C */ lwc1 $f12, 0x6C($t0)
/* 1B2E0 8003FEE0 0800FFBF */ j .L8003FEFC
/* 1B2E4 8003FEE4 46106301 */ sub.s $f12, $f12, $f16
.L8003FEE8:
/* 1B2E8 8003FEE8 8FA80048 */ lw $t0, 0x48($sp)
/* 1B2EC 8003FEEC 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1B2F0 8003FEF0 44818000 */ mtc1 $at, $f16
/* 1B2F4 8003FEF4 C50C006C */ lwc1 $f12, 0x6C($t0)
/* 1B2F8 8003FEF8 46106300 */ add.s $f12, $f12, $f16
.L8003FEFC:
/* 1B2FC 8003FEFC 0C00A6C9 */ jal clamp_angle
/* 1B300 8003FF00 00000000 */ nop
/* 1B304 8003FF04 46000606 */ mov.s $f24, $f0
/* 1B308 8003FF08 27A4002C */ addiu $a0, $sp, 0x2C
/* 1B30C 8003FF0C C63200DC */ lwc1 $f18, 0xDC($s1)
/* 1B310 8003FF10 468094A0 */ cvt.s.w $f18, $f18
/* 1B314 8003FF14 4407C000 */ mfc1 $a3, $f24
/* 1B318 8003FF18 44069000 */ mfc1 $a2, $f18
/* 1B31C 8003FF1C 0C00A7E7 */ jal add_vec2D_polar
/* 1B320 8003FF20 27A50030 */ addiu $a1, $sp, 0x30
.L8003FF24:
/* 1B324 8003FF24 C7A0002C */ lwc1 $f0, 0x2C($sp)
/* 1B328 8003FF28 C7B00050 */ lwc1 $f16, 0x50($sp)
/* 1B32C 8003FF2C 46100001 */ sub.s $f0, $f0, $f16
/* 1B330 8003FF30 46000082 */ mul.s $f2, $f0, $f0
/* 1B334 8003FF34 00000000 */ nop
/* 1B338 8003FF38 C7B20058 */ lwc1 $f18, 0x58($sp)
/* 1B33C 8003FF3C C7A00030 */ lwc1 $f0, 0x30($sp)
/* 1B340 8003FF40 46120001 */ sub.s $f0, $f0, $f18
/* 1B344 8003FF44 46000002 */ mul.s $f0, $f0, $f0
/* 1B348 8003FF48 00000000 */ nop
/* 1B34C 8003FF4C 46001300 */ add.s $f12, $f2, $f0
/* 1B350 8003FF50 46006004 */ sqrt.s $f0, $f12
/* 1B354 8003FF54 46000032 */ c.eq.s $f0, $f0
/* 1B358 8003FF58 00000000 */ nop
/* 1B35C 8003FF5C 45010003 */ bc1t .L8003FF6C
/* 1B360 8003FF60 00000000 */ nop
/* 1B364 8003FF64 0C0187BC */ jal sqrtf
/* 1B368 8003FF68 00000000 */ nop
.L8003FF6C:
/* 1B36C 8003FF6C 928200B4 */ lbu $v0, 0xB4($s4)
/* 1B370 8003FF70 2442FFFD */ addiu $v0, $v0, -0x3
/* 1B374 8003FF74 00021600 */ sll $v0, $v0, 24
/* 1B378 8003FF78 00021E03 */ sra $v1, $v0, 24
/* 1B37C 8003FF7C 2C620010 */ sltiu $v0, $v1, 0x10
/* 1B380 8003FF80 10400184 */ beqz $v0, .L80040594
/* 1B384 8003FF84 46000586 */ mov.s $f22, $f0
/* 1B388 8003FF88 00031080 */ sll $v0, $v1, 2
/* 1B38C 8003FF8C 3C01800A */ lui $at, %hi(jtbl_800985F8)
/* 1B390 8003FF90 00220821 */ addu $at, $at, $v0
/* 1B394 8003FF94 8C2285F8 */ lw $v0, %lo(jtbl_800985F8)($at)
/* 1B398 8003FF98 00400008 */ jr $v0
/* 1B39C 8003FF9C 00000000 */ nop
glabel .L8003FFA0
/* 1B3A0 8003FFA0 C7B00050 */ lwc1 $f16, 0x50($sp)
/* 1B3A4 8003FFA4 C68C00A8 */ lwc1 $f12, 0xA8($s4)
/* 1B3A8 8003FFA8 C7B20058 */ lwc1 $f18, 0x58($sp)
/* 1B3AC 8003FFAC E7B00034 */ swc1 $f16, 0x34($sp)
/* 1B3B0 8003FFB0 0C00A6C9 */ jal clamp_angle
/* 1B3B4 8003FFB4 E7B20038 */ swc1 $f18, 0x38($sp)
/* 1B3B8 8003FFB8 3C014334 */ lui $at, (0x43340000 >> 16)
/* 1B3BC 8003FFBC 44811000 */ mtc1 $at, $f2
/* 1B3C0 8003FFC0 C7B40054 */ lwc1 $f20, 0x54($sp)
/* 1B3C4 8003FFC4 4602003C */ c.lt.s $f0, $f2
/* 1B3C8 8003FFC8 00000000 */ nop
/* 1B3CC 8003FFCC 45000010 */ bc1f .L80040010
/* 1B3D0 8003FFD0 00000000 */ nop
/* 1B3D4 8003FFD4 8FA80048 */ lw $t0, 0x48($sp)
/* 1B3D8 8003FFD8 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1B3DC 8003FFDC 44818000 */ mtc1 $at, $f16
/* 1B3E0 8003FFE0 C50C006C */ lwc1 $f12, 0x6C($t0)
/* 1B3E4 8003FFE4 0C00A6C9 */ jal clamp_angle
/* 1B3E8 8003FFE8 46106301 */ sub.s $f12, $f12, $f16
/* 1B3EC 8003FFEC 8E8200A4 */ lw $v0, 0xA4($s4)
/* 1B3F0 8003FFF0 3C030100 */ lui $v1, (0x1000000 >> 16)
/* 1B3F4 8003FFF4 00431024 */ and $v0, $v0, $v1
/* 1B3F8 8003FFF8 10400017 */ beqz $v0, .L80040058
/* 1B3FC 8003FFFC 27A40034 */ addiu $a0, $sp, 0x34
/* 1B400 80040000 3C0141F0 */ lui $at, (0x41F00000 >> 16)
/* 1B404 80040004 44816000 */ mtc1 $at, $f12
/* 1B408 80040008 08010013 */ j .L8004004C
/* 1B40C 8004000C 460C0300 */ add.s $f12, $f0, $f12
.L80040010:
/* 1B410 80040010 8FA80048 */ lw $t0, 0x48($sp)
/* 1B414 80040014 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1B418 80040018 44818000 */ mtc1 $at, $f16
/* 1B41C 8004001C C50C006C */ lwc1 $f12, 0x6C($t0)
/* 1B420 80040020 0C00A6C9 */ jal clamp_angle
/* 1B424 80040024 46106300 */ add.s $f12, $f12, $f16
/* 1B428 80040028 8E8200A4 */ lw $v0, 0xA4($s4)
/* 1B42C 8004002C 3C030100 */ lui $v1, (0x1000000 >> 16)
/* 1B430 80040030 00431024 */ and $v0, $v0, $v1
/* 1B434 80040034 10400008 */ beqz $v0, .L80040058
/* 1B438 80040038 27A40034 */ addiu $a0, $sp, 0x34
/* 1B43C 8004003C 3C0141F0 */ lui $at, (0x41F00000 >> 16)
/* 1B440 80040040 44816000 */ mtc1 $at, $f12
/* 1B444 80040044 00000000 */ nop
/* 1B448 80040048 460C0301 */ sub.s $f12, $f0, $f12
.L8004004C:
/* 1B44C 8004004C 0C00A6C9 */ jal clamp_angle
/* 1B450 80040050 00000000 */ nop
/* 1B454 80040054 27A40034 */ addiu $a0, $sp, 0x34
.L80040058:
/* 1B458 80040058 3C0641C0 */ lui $a2, (0x41C00000 >> 16)
/* 1B45C 8004005C 44070000 */ mfc1 $a3, $f0
/* 1B460 80040060 0C00A7E7 */ jal add_vec2D_polar
/* 1B464 80040064 27A50038 */ addiu $a1, $sp, 0x38
/* 1B468 80040068 C7A2002C */ lwc1 $f2, 0x2C($sp)
/* 1B46C 8004006C C7A00034 */ lwc1 $f0, 0x34($sp)
/* 1B470 80040070 46001001 */ sub.s $f0, $f2, $f0
/* 1B474 80040074 46000102 */ mul.s $f4, $f0, $f0
/* 1B478 80040078 00000000 */ nop
/* 1B47C 8004007C C7A20030 */ lwc1 $f2, 0x30($sp)
/* 1B480 80040080 C7A00038 */ lwc1 $f0, 0x38($sp)
/* 1B484 80040084 46001001 */ sub.s $f0, $f2, $f0
/* 1B488 80040088 46000002 */ mul.s $f0, $f0, $f0
/* 1B48C 8004008C 00000000 */ nop
/* 1B490 80040090 46002300 */ add.s $f12, $f4, $f0
/* 1B494 80040094 46006004 */ sqrt.s $f0, $f12
/* 1B498 80040098 46000032 */ c.eq.s $f0, $f0
/* 1B49C 8004009C 00000000 */ nop
/* 1B4A0 800400A0 45010003 */ bc1t .L800400B0
/* 1B4A4 800400A4 00000000 */ nop
/* 1B4A8 800400A8 0C0187BC */ jal sqrtf
/* 1B4AC 800400AC 00000000 */ nop
.L800400B0:
/* 1B4B0 800400B0 8E220000 */ lw $v0, 0x0($s1)
/* 1B4B4 800400B4 3C030400 */ lui $v1, (0x4000000 >> 16)
/* 1B4B8 800400B8 00431024 */ and $v0, $v0, $v1
/* 1B4BC 800400BC 14400135 */ bnez $v0, .L80040594
/* 1B4C0 800400C0 46000586 */ mov.s $f22, $f0
/* 1B4C4 800400C4 8E820000 */ lw $v0, 0x0($s4)
/* 1B4C8 800400C8 3C030100 */ lui $v1, (0x1000000 >> 16)
/* 1B4CC 800400CC 00431024 */ and $v0, $v0, $v1
/* 1B4D0 800400D0 10400130 */ beqz $v0, .L80040594
/* 1B4D4 800400D4 00000000 */ nop
/* 1B4D8 800400D8 3C014160 */ lui $at, (0x41600000 >> 16)
/* 1B4DC 800400DC 44819000 */ mtc1 $at, $f18
/* 1B4E0 800400E0 00000000 */ nop
/* 1B4E4 800400E4 461E9000 */ add.s $f0, $f18, $f30
/* 1B4E8 800400E8 4616003E */ c.le.s $f0, $f22
/* 1B4EC 800400EC 00000000 */ nop
/* 1B4F0 800400F0 45010128 */ bc1t .L80040594
/* 1B4F4 800400F4 00000000 */ nop
/* 1B4F8 800400F8 461CD000 */ add.s $f0, $f26, $f28
/* 1B4FC 800400FC 4614003C */ c.lt.s $f0, $f20
/* 1B500 80040100 00000000 */ nop
/* 1B504 80040104 45010123 */ bc1t .L80040594
/* 1B508 80040108 00000000 */ nop
/* 1B50C 8004010C 3C014190 */ lui $at, (0x41900000 >> 16)
/* 1B510 80040110 44818000 */ mtc1 $at, $f16
/* 1B514 80040114 00000000 */ nop
/* 1B518 80040118 4610A000 */ add.s $f0, $f20, $f16
/* 1B51C 8004011C 461A003C */ c.lt.s $f0, $f26
/* 1B520 80040120 00000000 */ nop
/* 1B524 80040124 4501011B */ bc1t .L80040594
/* 1B528 80040128 00000000 */ nop
/* 1B52C 8004012C 8FA60050 */ lw $a2, 0x50($sp)
/* 1B530 80040130 8FA70058 */ lw $a3, 0x58($sp)
/* 1B534 80040134 C7AC002C */ lwc1 $f12, 0x2C($sp)
/* 1B538 80040138 C7AE0030 */ lwc1 $f14, 0x30($sp)
/* 1B53C 8004013C E7BA0040 */ swc1 $f26, 0x40($sp)
/* 1B540 80040140 E7AC003C */ swc1 $f12, 0x3C($sp)
/* 1B544 80040144 0C00A720 */ jal atan2
/* 1B548 80040148 E7AE0044 */ swc1 $f14, 0x44($sp)
/* 1B54C 8004014C 3C040001 */ lui $a0, (0x10000 >> 16)
/* 1B550 80040150 03C0302D */ daddu $a2, $fp, $zero
/* 1B554 80040154 02E0382D */ daddu $a3, $s7, $zero
/* 1B558 80040158 8FA50064 */ lw $a1, 0x64($sp)
/* 1B55C 8004015C 461EF500 */ add.s $f20, $f30, $f30
/* 1B560 80040160 E7B60010 */ swc1 $f22, 0x10($sp)
/* 1B564 80040164 E7A00014 */ swc1 $f0, 0x14($sp)
/* 1B568 80040168 E7BC0018 */ swc1 $f28, 0x18($sp)
/* 1B56C 8004016C 0C0376B9 */ jal npc_test_move_taller_with_slipping
/* 1B570 80040170 E7B4001C */ swc1 $f20, 0x1C($sp)
/* 1B574 80040174 10400016 */ beqz $v0, .L800401D0
/* 1B578 80040178 00000000 */ nop
/* 1B57C 8004017C C7AC0050 */ lwc1 $f12, 0x50($sp)
/* 1B580 80040180 8FA6002C */ lw $a2, 0x2C($sp)
/* 1B584 80040184 8FA70030 */ lw $a3, 0x30($sp)
/* 1B588 80040188 C7AE0058 */ lwc1 $f14, 0x58($sp)
/* 1B58C 8004018C C7B20054 */ lwc1 $f18, 0x54($sp)
/* 1B590 80040190 46007406 */ mov.s $f16, $f14
/* 1B594 80040194 E7AC003C */ swc1 $f12, 0x3C($sp)
/* 1B598 80040198 E7B20040 */ swc1 $f18, 0x40($sp)
/* 1B59C 8004019C 0C00A720 */ jal atan2
/* 1B5A0 800401A0 E7B00044 */ swc1 $f16, 0x44($sp)
/* 1B5A4 800401A4 3C040001 */ lui $a0, (0x10000 >> 16)
/* 1B5A8 800401A8 03C0302D */ daddu $a2, $fp, $zero
/* 1B5AC 800401AC 8FA50064 */ lw $a1, 0x64($sp)
/* 1B5B0 800401B0 02E0382D */ daddu $a3, $s7, $zero
/* 1B5B4 800401B4 E7B60010 */ swc1 $f22, 0x10($sp)
/* 1B5B8 800401B8 E7A00014 */ swc1 $f0, 0x14($sp)
/* 1B5BC 800401BC E7BC0018 */ swc1 $f28, 0x18($sp)
/* 1B5C0 800401C0 0C0376B9 */ jal npc_test_move_taller_with_slipping
/* 1B5C4 800401C4 E7B4001C */ swc1 $f20, 0x1C($sp)
/* 1B5C8 800401C8 144000F2 */ bnez $v0, .L80040594
/* 1B5CC 800401CC 00000000 */ nop
.L800401D0:
/* 1B5D0 800401D0 82220007 */ lb $v0, 0x7($s1)
/* 1B5D4 800401D4 1040000F */ beqz $v0, .L80040214
/* 1B5D8 800401D8 00000000 */ nop
/* 1B5DC 800401DC 86220012 */ lh $v0, 0x12($s1)
/* 1B5E0 800401E0 4482D000 */ mtc1 $v0, $f26
/* 1B5E4 800401E4 00000000 */ nop
/* 1B5E8 800401E8 4680D6A0 */ cvt.s.w $f26, $f26
/* 1B5EC 800401EC 86220010 */ lh $v0, 0x10($s1)
/* 1B5F0 800401F0 86230014 */ lh $v1, 0x14($s1)
/* 1B5F4 800401F4 44820000 */ mtc1 $v0, $f0
/* 1B5F8 800401F8 00000000 */ nop
/* 1B5FC 800401FC 46800020 */ cvt.s.w $f0, $f0
/* 1B600 80040200 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 1B604 80040204 44830000 */ mtc1 $v1, $f0
/* 1B608 80040208 00000000 */ nop
/* 1B60C 8004020C 46800020 */ cvt.s.w $f0, $f0
/* 1B610 80040210 E7A00030 */ swc1 $f0, 0x30($sp)
.L80040214:
/* 1B614 80040214 C7AC0050 */ lwc1 $f12, 0x50($sp)
/* 1B618 80040218 C7AE0058 */ lwc1 $f14, 0x58($sp)
/* 1B61C 8004021C 8FA6002C */ lw $a2, 0x2C($sp)
/* 1B620 80040220 8FA70030 */ lw $a3, 0x30($sp)
/* 1B624 80040224 0C00A720 */ jal atan2
/* 1B628 80040228 0000802D */ daddu $s0, $zero, $zero
/* 1B62C 8004022C C7AE005C */ lwc1 $f14, 0x5C($sp)
/* 1B630 80040230 0C00A70A */ jal get_clamped_angle_diff
/* 1B634 80040234 46000306 */ mov.s $f12, $f0
/* 1B638 80040238 C7AC002C */ lwc1 $f12, 0x2C($sp)
/* 1B63C 8004023C C7AE0030 */ lwc1 $f14, 0x30($sp)
/* 1B640 80040240 8FA60050 */ lw $a2, 0x50($sp)
/* 1B644 80040244 8FA70058 */ lw $a3, 0x58($sp)
/* 1B648 80040248 0C00A720 */ jal atan2
/* 1B64C 8004024C 46000505 */ abs.s $f20, $f0
/* 1B650 80040250 46000306 */ mov.s $f12, $f0
/* 1B654 80040254 0C00A70A */ jal get_clamped_angle_diff
/* 1B658 80040258 4600C386 */ mov.s $f14, $f24
/* 1B65C 8004025C 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1B660 80040260 44819000 */ mtc1 $at, $f18
/* 1B664 80040264 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1B668 80040268 44818000 */ mtc1 $at, $f16
/* 1B66C 8004026C 00000000 */ nop
/* 1B670 80040270 4610A03C */ c.lt.s $f20, $f16
/* 1B674 80040274 00000000 */ nop
/* 1B678 80040278 45000008 */ bc1f .L8004029C
/* 1B67C 8004027C 46000005 */ abs.s $f0, $f0
/* 1B680 80040280 4600803E */ c.le.s $f16, $f0
/* 1B684 80040284 00000000 */ nop
/* 1B688 80040288 45030004 */ bc1tl .L8004029C
/* 1B68C 8004028C 24100001 */ addiu $s0, $zero, 0x1
/* 1B690 80040290 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1B694 80040294 44819000 */ mtc1 $at, $f18
/* 1B698 80040298 00000000 */ nop
.L8004029C:
/* 1B69C 8004029C 4614903E */ c.le.s $f18, $f20
/* 1B6A0 800402A0 00000000 */ nop
/* 1B6A4 800402A4 45000005 */ bc1f .L800402BC
/* 1B6A8 800402A8 00000000 */ nop
/* 1B6AC 800402AC 4612003C */ c.lt.s $f0, $f18
/* 1B6B0 800402B0 00000000 */ nop
/* 1B6B4 800402B4 45030001 */ bc1tl .L800402BC
/* 1B6B8 800402B8 0000802D */ daddu $s0, $zero, $zero
.L800402BC:
/* 1B6BC 800402BC 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1B6C0 800402C0 44818000 */ mtc1 $at, $f16
/* 1B6C4 800402C4 00000000 */ nop
/* 1B6C8 800402C8 4610A03C */ c.lt.s $f20, $f16
/* 1B6CC 800402CC 00000000 */ nop
/* 1B6D0 800402D0 45000005 */ bc1f .L800402E8
/* 1B6D4 800402D4 00000000 */ nop
/* 1B6D8 800402D8 4610003C */ c.lt.s $f0, $f16
/* 1B6DC 800402DC 00000000 */ nop
/* 1B6E0 800402E0 45030001 */ bc1tl .L800402E8
/* 1B6E4 800402E4 24100001 */ addiu $s0, $zero, 0x1
.L800402E8:
/* 1B6E8 800402E8 120000AA */ beqz $s0, .L80040594
/* 1B6EC 800402EC 240400E1 */ addiu $a0, $zero, 0xE1
/* 1B6F0 800402F0 8E860028 */ lw $a2, 0x28($s4)
/* 1B6F4 800402F4 8E87002C */ lw $a3, 0x2C($s4)
/* 1B6F8 800402F8 C6800030 */ lwc1 $f0, 0x30($s4)
/* 1B6FC 800402FC 0000282D */ daddu $a1, $zero, $zero
/* 1B700 80040300 0C052757 */ jal sfx_play_sound_at_position
/* 1B704 80040304 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1B708 80040308 3C038011 */ lui $v1, %hi(gPlayerData + 0x1)
/* 1B70C 8004030C 9063F291 */ lbu $v1, %lo(gPlayerData + 0x1)($v1)
/* 1B710 80040310 24020004 */ addiu $v0, $zero, 0x4
/* 1B714 80040314 A2620005 */ sb $v0, 0x5($s3)
/* 1B718 80040318 0801015F */ j .L8004057C
/* 1B71C 8004031C A2630006 */ sb $v1, 0x6($s3)
glabel .L80040320
/* 1B720 80040320 C7B00050 */ lwc1 $f16, 0x50($sp)
/* 1B724 80040324 C7B20058 */ lwc1 $f18, 0x58($sp)
/* 1B728 80040328 E7B00034 */ swc1 $f16, 0x34($sp)
/* 1B72C 8004032C E7B20038 */ swc1 $f18, 0x38($sp)
/* 1B730 80040330 8E220000 */ lw $v0, 0x0($s1)
/* 1B734 80040334 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 1B738 80040338 00431024 */ and $v0, $v0, $v1
/* 1B73C 8004033C 14400095 */ bnez $v0, .L80040594
/* 1B740 80040340 00000000 */ nop
/* 1B744 80040344 3C014160 */ lui $at, (0x41600000 >> 16)
/* 1B748 80040348 44818000 */ mtc1 $at, $f16
/* 1B74C 8004034C 00000000 */ nop
/* 1B750 80040350 461E8000 */ add.s $f0, $f16, $f30
/* 1B754 80040354 4616003E */ c.le.s $f0, $f22
/* 1B758 80040358 00000000 */ nop
/* 1B75C 8004035C 4501015A */ bc1t .L800408C8
/* 1B760 80040360 00000000 */ nop
/* 1B764 80040364 461CD600 */ add.s $f24, $f26, $f28
/* 1B768 80040368 C7B20054 */ lwc1 $f18, 0x54($sp)
/* 1B76C 8004036C 4612C03C */ c.lt.s $f24, $f18
/* 1B770 80040370 00000000 */ nop
/* 1B774 80040374 45010154 */ bc1t .L800408C8
/* 1B778 80040378 00000000 */ nop
/* 1B77C 8004037C 3C014214 */ lui $at, (0x42140000 >> 16)
/* 1B780 80040380 44818000 */ mtc1 $at, $f16
/* 1B784 80040384 00000000 */ nop
/* 1B788 80040388 46109000 */ add.s $f0, $f18, $f16
/* 1B78C 8004038C 461A003C */ c.lt.s $f0, $f26
/* 1B790 80040390 00000000 */ nop
/* 1B794 80040394 4501014C */ bc1t .L800408C8
/* 1B798 80040398 00000000 */ nop
/* 1B79C 8004039C 8FA60050 */ lw $a2, 0x50($sp)
/* 1B7A0 800403A0 8FA70058 */ lw $a3, 0x58($sp)
/* 1B7A4 800403A4 C7AC002C */ lwc1 $f12, 0x2C($sp)
/* 1B7A8 800403A8 C7AE0030 */ lwc1 $f14, 0x30($sp)
/* 1B7AC 800403AC E7BA0040 */ swc1 $f26, 0x40($sp)
/* 1B7B0 800403B0 E7AC003C */ swc1 $f12, 0x3C($sp)
/* 1B7B4 800403B4 0C00A720 */ jal atan2
/* 1B7B8 800403B8 E7AE0044 */ swc1 $f14, 0x44($sp)
/* 1B7BC 800403BC 3C040001 */ lui $a0, (0x10000 >> 16)
/* 1B7C0 800403C0 03C0302D */ daddu $a2, $fp, $zero
/* 1B7C4 800403C4 02E0382D */ daddu $a3, $s7, $zero
/* 1B7C8 800403C8 8FA50064 */ lw $a1, 0x64($sp)
/* 1B7CC 800403CC 461EF500 */ add.s $f20, $f30, $f30
/* 1B7D0 800403D0 E7B60010 */ swc1 $f22, 0x10($sp)
/* 1B7D4 800403D4 E7A00014 */ swc1 $f0, 0x14($sp)
/* 1B7D8 800403D8 E7BC0018 */ swc1 $f28, 0x18($sp)
/* 1B7DC 800403DC 0C0376B9 */ jal npc_test_move_taller_with_slipping
/* 1B7E0 800403E0 E7B4001C */ swc1 $f20, 0x1C($sp)
/* 1B7E4 800403E4 10400016 */ beqz $v0, .L80040440
/* 1B7E8 800403E8 00000000 */ nop
/* 1B7EC 800403EC C7AC0050 */ lwc1 $f12, 0x50($sp)
/* 1B7F0 800403F0 8FA6002C */ lw $a2, 0x2C($sp)
/* 1B7F4 800403F4 8FA70030 */ lw $a3, 0x30($sp)
/* 1B7F8 800403F8 C7AE0058 */ lwc1 $f14, 0x58($sp)
/* 1B7FC 800403FC C7B20054 */ lwc1 $f18, 0x54($sp)
/* 1B800 80040400 46007406 */ mov.s $f16, $f14
/* 1B804 80040404 E7AC003C */ swc1 $f12, 0x3C($sp)
/* 1B808 80040408 E7B20040 */ swc1 $f18, 0x40($sp)
/* 1B80C 8004040C 0C00A720 */ jal atan2
/* 1B810 80040410 E7B00044 */ swc1 $f16, 0x44($sp)
/* 1B814 80040414 3C040001 */ lui $a0, (0x10000 >> 16)
/* 1B818 80040418 03C0302D */ daddu $a2, $fp, $zero
/* 1B81C 8004041C 8FA50064 */ lw $a1, 0x64($sp)
/* 1B820 80040420 02E0382D */ daddu $a3, $s7, $zero
/* 1B824 80040424 E7B60010 */ swc1 $f22, 0x10($sp)
/* 1B828 80040428 E7A00014 */ swc1 $f0, 0x14($sp)
/* 1B82C 8004042C E7BC0018 */ swc1 $f28, 0x18($sp)
/* 1B830 80040430 0C0376B9 */ jal npc_test_move_taller_with_slipping
/* 1B834 80040434 E7B4001C */ swc1 $f20, 0x1C($sp)
/* 1B838 80040438 14400056 */ bnez $v0, .L80040594
/* 1B83C 8004043C 00000000 */ nop
.L80040440:
/* 1B840 80040440 3C014214 */ lui $at, (0x42140000 >> 16)
/* 1B844 80040444 44819000 */ mtc1 $at, $f18
/* 1B848 80040448 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 1B84C 8004044C 44818000 */ mtc1 $at, $f16
/* 1B850 80040450 00000000 */ nop
/* 1B854 80040454 46109002 */ mul.s $f0, $f18, $f16
/* 1B858 80040458 00000000 */ nop
/* 1B85C 8004045C C7B20054 */ lwc1 $f18, 0x54($sp)
/* 1B860 80040460 46009000 */ add.s $f0, $f18, $f0
/* 1B864 80040464 4600C03C */ c.lt.s $f24, $f0
/* 1B868 80040468 00000000 */ nop
/* 1B86C 8004046C 45000015 */ bc1f .L800404C4
/* 1B870 80040470 0000802D */ daddu $s0, $zero, $zero
/* 1B874 80040474 928300B4 */ lbu $v1, 0xB4($s4)
/* 1B878 80040478 2462FFF8 */ addiu $v0, $v1, -0x8
/* 1B87C 8004047C 2C420004 */ sltiu $v0, $v0, 0x4
/* 1B880 80040480 54400010 */ bnel $v0, $zero, .L800404C4
/* 1B884 80040484 24100001 */ addiu $s0, $zero, 0x1
/* 1B888 80040488 00031600 */ sll $v0, $v1, 24
/* 1B88C 8004048C 00021E03 */ sra $v1, $v0, 24
/* 1B890 80040490 2402000D */ addiu $v0, $zero, 0xD
/* 1B894 80040494 10620007 */ beq $v1, $v0, .L800404B4
/* 1B898 80040498 2402000E */ addiu $v0, $zero, 0xE
/* 1B89C 8004049C 10620005 */ beq $v1, $v0, .L800404B4
/* 1B8A0 800404A0 2402000F */ addiu $v0, $zero, 0xF
/* 1B8A4 800404A4 10620003 */ beq $v1, $v0, .L800404B4
/* 1B8A8 800404A8 24020010 */ addiu $v0, $zero, 0x10
/* 1B8AC 800404AC 14620005 */ bne $v1, $v0, .L800404C4
/* 1B8B0 800404B0 00000000 */ nop
.L800404B4:
/* 1B8B4 800404B4 24100001 */ addiu $s0, $zero, 0x1
/* 1B8B8 800404B8 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 1B8BC 800404BC 44818000 */ mtc1 $at, $f16
/* 1B8C0 800404C0 00000000 */ nop
.L800404C4:
/* 1B8C4 800404C4 4610E002 */ mul.s $f0, $f28, $f16
/* 1B8C8 800404C8 00000000 */ nop
/* 1B8CC 800404CC C7B20054 */ lwc1 $f18, 0x54($sp)
/* 1B8D0 800404D0 3C014214 */ lui $at, (0x42140000 >> 16)
/* 1B8D4 800404D4 44818000 */ mtc1 $at, $f16
/* 1B8D8 800404D8 00000000 */ nop
/* 1B8DC 800404DC 46109080 */ add.s $f2, $f18, $f16
/* 1B8E0 800404E0 4600D000 */ add.s $f0, $f26, $f0
/* 1B8E4 800404E4 4600103C */ c.lt.s $f2, $f0
/* 1B8E8 800404E8 00000000 */ nop
/* 1B8EC 800404EC 45030001 */ bc1tl .L800404F4
/* 1B8F0 800404F0 0000802D */ daddu $s0, $zero, $zero
.L800404F4:
/* 1B8F4 800404F4 12000027 */ beqz $s0, .L80040594
/* 1B8F8 800404F8 00000000 */ nop
/* 1B8FC 800404FC 3C028011 */ lui $v0, %hi(gPlayerData)
/* 1B900 80040500 8042F290 */ lb $v0, %lo(gPlayerData)($v0)
/* 1B904 80040504 0440FD12 */ bltz $v0, .L8003F950
/* 1B908 80040508 24030002 */ addiu $v1, $zero, 0x2
/* 1B90C 8004050C 928200B4 */ lbu $v0, 0xB4($s4)
/* 1B910 80040510 A2630005 */ sb $v1, 0x5($s3)
/* 1B914 80040514 2442FFFD */ addiu $v0, $v0, -0x3
/* 1B918 80040518 00021600 */ sll $v0, $v0, 24
/* 1B91C 8004051C 00021E03 */ sra $v1, $v0, 24
/* 1B920 80040520 2C62000E */ sltiu $v0, $v1, 0xE
/* 1B924 80040524 1040000D */ beqz $v0, .L8004055C
/* 1B928 80040528 00031080 */ sll $v0, $v1, 2
/* 1B92C 8004052C 3C01800A */ lui $at, %hi(jtbl_80098638)
/* 1B930 80040530 00220821 */ addu $at, $at, $v0
/* 1B934 80040534 8C228638 */ lw $v0, %lo(jtbl_80098638)($at)
/* 1B938 80040538 00400008 */ jr $v0
/* 1B93C 8004053C 00000000 */ nop
glabel .L80040540
/* 1B940 80040540 08010157 */ j .L8004055C
/* 1B944 80040544 A2600006 */ sb $zero, 0x6($s3)
glabel .L80040548
/* 1B948 80040548 24080001 */ addiu $t0, $zero, 0x1
/* 1B94C 8004054C 08010157 */ j .L8004055C
/* 1B950 80040550 A2680006 */ sb $t0, 0x6($s3)
glabel .L80040554
/* 1B954 80040554 24020002 */ addiu $v0, $zero, 0x2
/* 1B958 80040558 A2620006 */ sb $v0, 0x6($s3)
glabel .L8004055C
/* 1B95C 8004055C 240400E1 */ addiu $a0, $zero, 0xE1
/* 1B960 80040560 8E860028 */ lw $a2, 0x28($s4)
/* 1B964 80040564 8E87002C */ lw $a3, 0x2C($s4)
/* 1B968 80040568 C6800030 */ lwc1 $f0, 0x30($s4)
/* 1B96C 8004056C 0000282D */ daddu $a1, $zero, $zero
/* 1B970 80040570 0C052757 */ jal sfx_play_sound_at_position
/* 1B974 80040574 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1B978 80040578 24020002 */ addiu $v0, $zero, 0x2
.L8004057C:
/* 1B97C 8004057C A2220005 */ sb $v0, 0x5($s1)
/* 1B980 80040580 24080001 */ addiu $t0, $zero, 0x1
/* 1B984 80040584 AE760088 */ sw $s6, 0x88($s3)
/* 1B988 80040588 AE71008C */ sw $s1, 0x8C($s3)
/* 1B98C 8004058C 0801023D */ j .L800408F4
/* 1B990 80040590 A2680004 */ sb $t0, 0x4($s3)
glabel .L80040594
/* 1B994 80040594 8E220000 */ lw $v0, 0x0($s1)
/* 1B998 80040598 3C030100 */ lui $v1, (0x1000000 >> 16)
/* 1B99C 8004059C 00431024 */ and $v0, $v0, $v1
/* 1B9A0 800405A0 144000C9 */ bnez $v0, .L800408C8
/* 1B9A4 800405A4 00000000 */ nop
/* 1B9A8 800405A8 C7A0002C */ lwc1 $f0, 0x2C($sp)
/* 1B9AC 800405AC C7B00050 */ lwc1 $f16, 0x50($sp)
/* 1B9B0 800405B0 46100001 */ sub.s $f0, $f0, $f16
/* 1B9B4 800405B4 46000082 */ mul.s $f2, $f0, $f0
/* 1B9B8 800405B8 00000000 */ nop
/* 1B9BC 800405BC C7B20058 */ lwc1 $f18, 0x58($sp)
/* 1B9C0 800405C0 C7A00030 */ lwc1 $f0, 0x30($sp)
/* 1B9C4 800405C4 46120001 */ sub.s $f0, $f0, $f18
/* 1B9C8 800405C8 46000002 */ mul.s $f0, $f0, $f0
/* 1B9CC 800405CC 00000000 */ nop
/* 1B9D0 800405D0 46001300 */ add.s $f12, $f2, $f0
/* 1B9D4 800405D4 46006104 */ sqrt.s $f4, $f12
/* 1B9D8 800405D8 46042032 */ c.eq.s $f4, $f4
/* 1B9DC 800405DC 00000000 */ nop
/* 1B9E0 800405E0 45010004 */ bc1t .L800405F4
/* 1B9E4 800405E4 00000000 */ nop
/* 1B9E8 800405E8 0C0187BC */ jal sqrtf
/* 1B9EC 800405EC 00000000 */ nop
/* 1B9F0 800405F0 46000106 */ mov.s $f4, $f0
.L800405F4:
/* 1B9F4 800405F4 3C014160 */ lui $at, (0x41600000 >> 16)
/* 1B9F8 800405F8 44818000 */ mtc1 $at, $f16
/* 1B9FC 800405FC 00000000 */ nop
/* 1BA00 80040600 461E8000 */ add.s $f0, $f16, $f30
/* 1BA04 80040604 3C01800A */ lui $at, %hi(D_80098670)
/* 1BA08 80040608 D4228670 */ ldc1 $f2, %lo(D_80098670)($at)
/* 1BA0C 8004060C 46000021 */ cvt.d.s $f0, $f0
/* 1BA10 80040610 46220002 */ mul.d $f0, $f0, $f2
/* 1BA14 80040614 00000000 */ nop
/* 1BA18 80040618 46002586 */ mov.s $f22, $f4
/* 1BA1C 8004061C 4600B0A1 */ cvt.d.s $f2, $f22
/* 1BA20 80040620 4622003E */ c.le.d $f0, $f2
/* 1BA24 80040624 00000000 */ nop
/* 1BA28 80040628 450100A7 */ bc1t .L800408C8
/* 1BA2C 8004062C 00000000 */ nop
/* 1BA30 80040630 461CD000 */ add.s $f0, $f26, $f28
/* 1BA34 80040634 C7B20054 */ lwc1 $f18, 0x54($sp)
/* 1BA38 80040638 4612003C */ c.lt.s $f0, $f18
/* 1BA3C 8004063C 00000000 */ nop
/* 1BA40 80040640 450100A1 */ bc1t .L800408C8
/* 1BA44 80040644 00000000 */ nop
/* 1BA48 80040648 3C014214 */ lui $at, (0x42140000 >> 16)
/* 1BA4C 8004064C 44818000 */ mtc1 $at, $f16
/* 1BA50 80040650 00000000 */ nop
/* 1BA54 80040654 46109000 */ add.s $f0, $f18, $f16
/* 1BA58 80040658 461A003C */ c.lt.s $f0, $f26
/* 1BA5C 8004065C 00000000 */ nop
/* 1BA60 80040660 45010099 */ bc1t .L800408C8
/* 1BA64 80040664 00000000 */ nop
/* 1BA68 80040668 8FA60050 */ lw $a2, 0x50($sp)
/* 1BA6C 8004066C 8FA70058 */ lw $a3, 0x58($sp)
/* 1BA70 80040670 C7AC002C */ lwc1 $f12, 0x2C($sp)
/* 1BA74 80040674 C7AE0030 */ lwc1 $f14, 0x30($sp)
/* 1BA78 80040678 E7BA0040 */ swc1 $f26, 0x40($sp)
/* 1BA7C 8004067C E7AC003C */ swc1 $f12, 0x3C($sp)
/* 1BA80 80040680 0C00A720 */ jal atan2
/* 1BA84 80040684 E7AE0044 */ swc1 $f14, 0x44($sp)
/* 1BA88 80040688 3C040001 */ lui $a0, (0x10000 >> 16)
/* 1BA8C 8004068C 03C0302D */ daddu $a2, $fp, $zero
/* 1BA90 80040690 02E0382D */ daddu $a3, $s7, $zero
/* 1BA94 80040694 8FA50064 */ lw $a1, 0x64($sp)
/* 1BA98 80040698 461EF500 */ add.s $f20, $f30, $f30
/* 1BA9C 8004069C E7B60010 */ swc1 $f22, 0x10($sp)
/* 1BAA0 800406A0 E7A00014 */ swc1 $f0, 0x14($sp)
/* 1BAA4 800406A4 E7BC0018 */ swc1 $f28, 0x18($sp)
/* 1BAA8 800406A8 0C0376B9 */ jal npc_test_move_taller_with_slipping
/* 1BAAC 800406AC E7B4001C */ swc1 $f20, 0x1C($sp)
/* 1BAB0 800406B0 10400016 */ beqz $v0, .L8004070C
/* 1BAB4 800406B4 0000802D */ daddu $s0, $zero, $zero
/* 1BAB8 800406B8 C7AC0050 */ lwc1 $f12, 0x50($sp)
/* 1BABC 800406BC 8FA6002C */ lw $a2, 0x2C($sp)
/* 1BAC0 800406C0 8FA70030 */ lw $a3, 0x30($sp)
/* 1BAC4 800406C4 C7AE0058 */ lwc1 $f14, 0x58($sp)
/* 1BAC8 800406C8 C7B20054 */ lwc1 $f18, 0x54($sp)
/* 1BACC 800406CC 46007406 */ mov.s $f16, $f14
/* 1BAD0 800406D0 E7AC003C */ swc1 $f12, 0x3C($sp)
/* 1BAD4 800406D4 E7B20040 */ swc1 $f18, 0x40($sp)
/* 1BAD8 800406D8 0C00A720 */ jal atan2
/* 1BADC 800406DC E7B00044 */ swc1 $f16, 0x44($sp)
/* 1BAE0 800406E0 3C040001 */ lui $a0, (0x10000 >> 16)
/* 1BAE4 800406E4 03C0302D */ daddu $a2, $fp, $zero
/* 1BAE8 800406E8 8FA50064 */ lw $a1, 0x64($sp)
/* 1BAEC 800406EC 02E0382D */ daddu $a3, $s7, $zero
/* 1BAF0 800406F0 E7B60010 */ swc1 $f22, 0x10($sp)
/* 1BAF4 800406F4 E7A00014 */ swc1 $f0, 0x14($sp)
/* 1BAF8 800406F8 E7BC0018 */ swc1 $f28, 0x18($sp)
/* 1BAFC 800406FC 0C0376B9 */ jal npc_test_move_taller_with_slipping
/* 1BB00 80040700 E7B4001C */ swc1 $f20, 0x1C($sp)
/* 1BB04 80040704 14400070 */ bnez $v0, .L800408C8
/* 1BB08 80040708 0000802D */ daddu $s0, $zero, $zero
.L8004070C:
/* 1BB0C 8004070C 0C03A752 */ jal is_ability_active
/* 1BB10 80040710 24040028 */ addiu $a0, $zero, 0x28
/* 1BB14 80040714 1040000A */ beqz $v0, .L80040740
/* 1BB18 80040718 00000000 */ nop
/* 1BB1C 8004071C 8E220018 */ lw $v0, 0x18($s1)
/* 1BB20 80040720 3C038011 */ lui $v1, %hi(gPlayerData + 0x9)
/* 1BB24 80040724 8063F299 */ lb $v1, %lo(gPlayerData + 0x9)($v1)
/* 1BB28 80040728 84420028 */ lh $v0, 0x28($v0)
/* 1BB2C 8004072C 0062182A */ slt $v1, $v1, $v0
/* 1BB30 80040730 14600003 */ bnez $v1, .L80040740
/* 1BB34 80040734 00000000 */ nop
/* 1BB38 80040738 82620012 */ lb $v0, 0x12($s3)
/* 1BB3C 8004073C 2C500001 */ sltiu $s0, $v0, 0x1
.L80040740:
/* 1BB40 80040740 0C03A752 */ jal is_ability_active
/* 1BB44 80040744 2404002D */ addiu $a0, $zero, 0x2D
/* 1BB48 80040748 54400001 */ bnel $v0, $zero, .L80040750
/* 1BB4C 8004074C 24100001 */ addiu $s0, $zero, 0x1
.L80040750:
/* 1BB50 80040750 8E820004 */ lw $v0, 0x4($s4)
/* 1BB54 80040754 3C030001 */ lui $v1, (0x10000 >> 16)
/* 1BB58 80040758 00431024 */ and $v0, $v0, $v1
/* 1BB5C 8004075C 10400007 */ beqz $v0, .L8004077C
/* 1BB60 80040760 3C032000 */ lui $v1, (0x20000000 >> 16)
/* 1BB64 80040764 8E220000 */ lw $v0, 0x0($s1)
/* 1BB68 80040768 00431024 */ and $v0, $v0, $v1
/* 1BB6C 8004076C 14400004 */ bnez $v0, .L80040780
/* 1BB70 80040770 3C03FFFD */ lui $v1, (0xFFFDFFFF >> 16)
/* 1BB74 80040774 1600FC7E */ bnez $s0, .L8003F970
/* 1BB78 80040778 240400E1 */ addiu $a0, $zero, 0xE1
.L8004077C:
/* 1BB7C 8004077C 3C03FFFD */ lui $v1, (0xFFFDFFFF >> 16)
.L80040780:
/* 1BB80 80040780 3463FFFF */ ori $v1, $v1, (0xFFFDFFFF & 0xFFFF)
/* 1BB84 80040784 8E820004 */ lw $v0, 0x4($s4)
/* 1BB88 80040788 24080001 */ addiu $t0, $zero, 0x1
/* 1BB8C 8004078C A2680005 */ sb $t0, 0x5($s3)
/* 1BB90 80040790 00431024 */ and $v0, $v0, $v1
/* 1BB94 80040794 AE820004 */ sw $v0, 0x4($s4)
/* 1BB98 80040798 A2280005 */ sb $t0, 0x5($s1)
/* 1BB9C 8004079C AE760088 */ sw $s6, 0x88($s3)
/* 1BBA0 800407A0 AE71008C */ sw $s1, 0x8C($s3)
/* 1BBA4 800407A4 C6460038 */ lwc1 $f6, 0x38($s2)
/* 1BBA8 800407A8 C68A0028 */ lwc1 $f10, 0x28($s4)
/* 1BBAC 800407AC 460A3181 */ sub.s $f6, $f6, $f10
/* 1BBB0 800407B0 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 1BBB4 800407B4 44818000 */ mtc1 $at, $f16
/* 1BBB8 800407B8 00000000 */ nop
/* 1BBBC 800407BC 46103182 */ mul.s $f6, $f6, $f16
/* 1BBC0 800407C0 00000000 */ nop
/* 1BBC4 800407C4 864200A8 */ lh $v0, 0xA8($s2)
/* 1BBC8 800407C8 C644003C */ lwc1 $f4, 0x3C($s2)
/* 1BBCC 800407CC 44820000 */ mtc1 $v0, $f0
/* 1BBD0 800407D0 00000000 */ nop
/* 1BBD4 800407D4 46800020 */ cvt.s.w $f0, $f0
/* 1BBD8 800407D8 46002100 */ add.s $f4, $f4, $f0
/* 1BBDC 800407DC 868200B0 */ lh $v0, 0xB0($s4)
/* 1BBE0 800407E0 C688002C */ lwc1 $f8, 0x2C($s4)
/* 1BBE4 800407E4 44820000 */ mtc1 $v0, $f0
/* 1BBE8 800407E8 00000000 */ nop
/* 1BBEC 800407EC 46800020 */ cvt.s.w $f0, $f0
/* 1BBF0 800407F0 46004000 */ add.s $f0, $f8, $f0
/* 1BBF4 800407F4 46002101 */ sub.s $f4, $f4, $f0
/* 1BBF8 800407F8 46102102 */ mul.s $f4, $f4, $f16
/* 1BBFC 800407FC 00000000 */ nop
/* 1BC00 80040800 C6820030 */ lwc1 $f2, 0x30($s4)
/* 1BC04 80040804 C6400040 */ lwc1 $f0, 0x40($s2)
/* 1BC08 80040808 46020001 */ sub.s $f0, $f0, $f2
/* 1BC0C 8004080C 46100002 */ mul.s $f0, $f0, $f16
/* 1BC10 80040810 00000000 */ nop
/* 1BC14 80040814 46065280 */ add.s $f10, $f10, $f6
/* 1BC18 80040818 46044200 */ add.s $f8, $f8, $f4
/* 1BC1C 8004081C 24040003 */ addiu $a0, $zero, 0x3
/* 1BC20 80040820 44055000 */ mfc1 $a1, $f10
/* 1BC24 80040824 46001080 */ add.s $f2, $f2, $f0
/* 1BC28 80040828 3C01BF80 */ lui $at, (0xBF800000 >> 16)
/* 1BC2C 8004082C 44810000 */ mtc1 $at, $f0
/* 1BC30 80040830 44064000 */ mfc1 $a2, $f8
/* 1BC34 80040834 44071000 */ mfc1 $a3, $f2
/* 1BC38 80040838 0080102D */ daddu $v0, $a0, $zero
/* 1BC3C 8004083C AFA5003C */ sw $a1, 0x3C($sp)
/* 1BC40 80040840 AFA60040 */ sw $a2, 0x40($sp)
/* 1BC44 80040844 AFA70044 */ sw $a3, 0x44($sp)
/* 1BC48 80040848 AFA00010 */ sw $zero, 0x10($sp)
/* 1BC4C 8004084C E7A00014 */ swc1 $f0, 0x14($sp)
/* 1BC50 80040850 AFA00018 */ sw $zero, 0x18($sp)
/* 1BC54 80040854 0C01C064 */ jal fx_damage_stars
/* 1BC58 80040858 AFA2001C */ sw $v0, 0x1C($sp)
/* 1BC5C 8004085C 82220007 */ lb $v0, 0x7($s1)
/* 1BC60 80040860 10400005 */ beqz $v0, .L80040878
/* 1BC64 80040864 0000802D */ daddu $s0, $zero, $zero
/* 1BC68 80040868 0C03A752 */ jal is_ability_active
/* 1BC6C 8004086C 24040011 */ addiu $a0, $zero, 0x11
/* 1BC70 80040870 2C420001 */ sltiu $v0, $v0, 0x1
/* 1BC74 80040874 00028040 */ sll $s0, $v0, 1
.L80040878:
/* 1BC78 80040878 0C03A752 */ jal is_ability_active
/* 1BC7C 8004087C 2404002A */ addiu $a0, $zero, 0x2A
/* 1BC80 80040880 5040001C */ beql $v0, $zero, .L800408F4
/* 1BC84 80040884 A2700004 */ sb $s0, 0x4($s3)
/* 1BC88 80040888 8E220018 */ lw $v0, 0x18($s1)
/* 1BC8C 8004088C 3C038011 */ lui $v1, %hi(gPlayerData + 0x9)
/* 1BC90 80040890 8063F299 */ lb $v1, %lo(gPlayerData + 0x9)($v1)
/* 1BC94 80040894 84420028 */ lh $v0, 0x28($v0)
/* 1BC98 80040898 0062182A */ slt $v1, $v1, $v0
/* 1BC9C 8004089C 54600015 */ bnel $v1, $zero, .L800408F4
/* 1BCA0 800408A0 A2700004 */ sb $s0, 0x4($s3)
/* 1BCA4 800408A4 8E220000 */ lw $v0, 0x0($s1)
/* 1BCA8 800408A8 30420040 */ andi $v0, $v0, 0x40
/* 1BCAC 800408AC 54400011 */ bnel $v0, $zero, .L800408F4
/* 1BCB0 800408B0 A2700004 */ sb $s0, 0x4($s3)
/* 1BCB4 800408B4 82620012 */ lb $v0, 0x12($s3)
/* 1BCB8 800408B8 50400001 */ beql $v0, $zero, .L800408C0
/* 1BCBC 800408BC 0000802D */ daddu $s0, $zero, $zero
.L800408C0:
/* 1BCC0 800408C0 0801023D */ j .L800408F4
/* 1BCC4 800408C4 A2700004 */ sb $s0, 0x4($s3)
.L800408C8:
/* 1BCC8 800408C8 8EC20000 */ lw $v0, 0x0($s6)
/* 1BCCC 800408CC 26B50001 */ addiu $s5, $s5, 0x1
/* 1BCD0 800408D0 02A2102A */ slt $v0, $s5, $v0
/* 1BCD4 800408D4 1440FC79 */ bnez $v0, .L8003FABC
/* 1BCD8 800408D8 00151080 */ sll $v0, $s5, 2
/* 1BCDC 800408DC 8FA8004C */ lw $t0, 0x4C($sp)
.L800408E0:
/* 1BCE0 800408E0 8262001C */ lb $v0, 0x1C($s3)
/* 1BCE4 800408E4 25080001 */ addiu $t0, $t0, 0x1
/* 1BCE8 800408E8 0102102A */ slt $v0, $t0, $v0
/* 1BCEC 800408EC 1440FC67 */ bnez $v0, .L8003FA8C
/* 1BCF0 800408F0 AFA8004C */ sw $t0, 0x4C($sp)
.L800408F4:
/* 1BCF4 800408F4 82630005 */ lb $v1, 0x5($s3)
.L800408F8:
/* 1BCF8 800408F8 2C620007 */ sltiu $v0, $v1, 0x7
/* 1BCFC 800408FC 10400285 */ beqz $v0, .L80041314
/* 1BD00 80040900 00031080 */ sll $v0, $v1, 2
/* 1BD04 80040904 3C01800A */ lui $at, %hi(jtbl_80098678)
/* 1BD08 80040908 00220821 */ addu $at, $at, $v0
/* 1BD0C 8004090C 8C228678 */ lw $v0, %lo(jtbl_80098678)($at)
/* 1BD10 80040910 00400008 */ jr $v0
/* 1BD14 80040914 00000000 */ nop
glabel .L80040918
/* 1BD18 80040918 8E71008C */ lw $s1, 0x8C($s3)
/* 1BD1C 8004091C 8E22003C */ lw $v0, 0x3C($s1)
/* 1BD20 80040920 10400004 */ beqz $v0, .L80040934
/* 1BD24 80040924 0220B82D */ daddu $s7, $s1, $zero
/* 1BD28 80040928 8E240054 */ lw $a0, 0x54($s1)
/* 1BD2C 8004092C 0C0B1108 */ jal suspend_all_script
/* 1BD30 80040930 00000000 */ nop
.L80040934:
/* 1BD34 80040934 8E220044 */ lw $v0, 0x44($s1)
/* 1BD38 80040938 10400003 */ beqz $v0, .L80040948
/* 1BD3C 8004093C 00000000 */ nop
/* 1BD40 80040940 0C0B1108 */ jal suspend_all_script
/* 1BD44 80040944 8E24005C */ lw $a0, 0x5C($s1)
.L80040948:
/* 1BD48 80040948 8E760088 */ lw $s6, 0x88($s3)
/* 1BD4C 8004094C 8EC20000 */ lw $v0, 0x0($s6)
/* 1BD50 80040950 1840002B */ blez $v0, .L80040A00
/* 1BD54 80040954 0000A82D */ daddu $s5, $zero, $zero
/* 1BD58 80040958 24120001 */ addiu $s2, $zero, 0x1
/* 1BD5C 8004095C 02C0802D */ daddu $s0, $s6, $zero
.L80040960:
/* 1BD60 80040960 8E110004 */ lw $s1, 0x4($s0)
/* 1BD64 80040964 12200021 */ beqz $s1, .L800409EC
/* 1BD68 80040968 00000000 */ nop
/* 1BD6C 8004096C 8E230000 */ lw $v1, 0x0($s1)
/* 1BD70 80040970 30620008 */ andi $v0, $v1, 0x8
/* 1BD74 80040974 10400004 */ beqz $v0, .L80040988
/* 1BD78 80040978 30620020 */ andi $v0, $v1, 0x20
/* 1BD7C 8004097C 8E62008C */ lw $v0, 0x8C($s3)
/* 1BD80 80040980 1622001A */ bne $s1, $v0, .L800409EC
/* 1BD84 80040984 30620020 */ andi $v0, $v1, 0x20
.L80040988:
/* 1BD88 80040988 14400018 */ bnez $v0, .L800409EC
/* 1BD8C 8004098C 00000000 */ nop
/* 1BD90 80040990 8EE20000 */ lw $v0, 0x0($s7)
/* 1BD94 80040994 30420040 */ andi $v0, $v0, 0x40
/* 1BD98 80040998 10400004 */ beqz $v0, .L800409AC
/* 1BD9C 8004099C 00000000 */ nop
/* 1BDA0 800409A0 8E62008C */ lw $v0, 0x8C($s3)
/* 1BDA4 800409A4 16220011 */ bne $s1, $v0, .L800409EC
/* 1BDA8 800409A8 00000000 */ nop
.L800409AC:
/* 1BDAC 800409AC 8E220028 */ lw $v0, 0x28($s1)
/* 1BDB0 800409B0 1040000E */ beqz $v0, .L800409EC
/* 1BDB4 800409B4 2405000A */ addiu $a1, $zero, 0xA
/* 1BDB8 800409B8 0040202D */ daddu $a0, $v0, $zero
/* 1BDBC 800409BC 0000302D */ daddu $a2, $zero, $zero
/* 1BDC0 800409C0 0C0B0CF8 */ jal start_script
/* 1BDC4 800409C4 A2320005 */ sb $s2, 0x5($s1)
/* 1BDC8 800409C8 0040202D */ daddu $a0, $v0, $zero
/* 1BDCC 800409CC AE240040 */ sw $a0, 0x40($s1)
/* 1BDD0 800409D0 8C820144 */ lw $v0, 0x144($a0)
/* 1BDD4 800409D4 AE220058 */ sw $v0, 0x58($s1)
/* 1BDD8 800409D8 AC910148 */ sw $s1, 0x148($a0)
/* 1BDDC 800409DC 86220008 */ lh $v0, 0x8($s1)
/* 1BDE0 800409E0 AC82014C */ sw $v0, 0x14C($a0)
/* 1BDE4 800409E4 92220006 */ lbu $v0, 0x6($s1)
/* 1BDE8 800409E8 A0820004 */ sb $v0, 0x4($a0)
.L800409EC:
/* 1BDEC 800409EC 8EC20000 */ lw $v0, 0x0($s6)
/* 1BDF0 800409F0 26B50001 */ addiu $s5, $s5, 0x1
/* 1BDF4 800409F4 02A2102A */ slt $v0, $s5, $v0
/* 1BDF8 800409F8 1440FFD9 */ bnez $v0, .L80040960
/* 1BDFC 800409FC 26100004 */ addiu $s0, $s0, 0x4
.L80040A00:
/* 1BE00 80040A00 0C03805E */ jal disable_player_input
/* 1BE04 80040A04 00000000 */ nop
/* 1BE08 80040A08 0C03BD8A */ jal partner_disable_input
/* 1BE0C 80040A0C 00000000 */ nop
/* 1BE10 80040A10 928300B4 */ lbu $v1, 0xB4($s4)
/* 1BE14 80040A14 2462FFF1 */ addiu $v0, $v1, -0xF
/* 1BE18 80040A18 2C420002 */ sltiu $v0, $v0, 0x2
/* 1BE1C 80040A1C 1440000A */ bnez $v0, .L80040A48
/* 1BE20 80040A20 00031600 */ sll $v0, $v1, 24
/* 1BE24 80040A24 00021E03 */ sra $v1, $v0, 24
/* 1BE28 80040A28 2402000D */ addiu $v0, $zero, 0xD
/* 1BE2C 80040A2C 10620006 */ beq $v1, $v0, .L80040A48
/* 1BE30 80040A30 2402000E */ addiu $v0, $zero, 0xE
/* 1BE34 80040A34 10620004 */ beq $v1, $v0, .L80040A48
/* 1BE38 80040A38 3C030004 */ lui $v1, (0x40000 >> 16)
/* 1BE3C 80040A3C 8E820000 */ lw $v0, 0x0($s4)
/* 1BE40 80040A40 00431025 */ or $v0, $v0, $v1
/* 1BE44 80040A44 AE820000 */ sw $v0, 0x0($s4)
.L80040A48:
/* 1BE48 80040A48 0C03A752 */ jal is_ability_active
/* 1BE4C 80040A4C 24040011 */ addiu $a0, $zero, 0x11
/* 1BE50 80040A50 14400013 */ bnez $v0, .L80040AA0
/* 1BE54 80040A54 24020003 */ addiu $v0, $zero, 0x3
/* 1BE58 80040A58 82630004 */ lb $v1, 0x4($s3)
/* 1BE5C 80040A5C 24020002 */ addiu $v0, $zero, 0x2
/* 1BE60 80040A60 1462000F */ bne $v1, $v0, .L80040AA0
/* 1BE64 80040A64 24020003 */ addiu $v0, $zero, 0x3
/* 1BE68 80040A68 0C039769 */ jal set_action_state
/* 1BE6C 80040A6C 2404001B */ addiu $a0, $zero, 0x1B
/* 1BE70 80040A70 86240008 */ lh $a0, 0x8($s1)
/* 1BE74 80040A74 0C00EABB */ jal get_npc_unsafe
/* 1BE78 80040A78 00000000 */ nop
/* 1BE7C 80040A7C 0040902D */ daddu $s2, $v0, $zero
/* 1BE80 80040A80 C6400040 */ lwc1 $f0, 0x40($s2)
/* 1BE84 80040A84 240400E1 */ addiu $a0, $zero, 0xE1
/* 1BE88 80040A88 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1BE8C 80040A8C 8E460038 */ lw $a2, 0x38($s2)
/* 1BE90 80040A90 8E47003C */ lw $a3, 0x3C($s2)
/* 1BE94 80040A94 0C052757 */ jal sfx_play_sound_at_position
/* 1BE98 80040A98 0000282D */ daddu $a1, $zero, $zero
/* 1BE9C 80040A9C 24020003 */ addiu $v0, $zero, 0x3
.L80040AA0:
/* 1BEA0 80040AA0 A2600012 */ sb $zero, 0x12($s3)
/* 1BEA4 80040AA4 3C01800A */ lui $at, %hi(gEncounterState)
/* 1BEA8 80040AA8 AC22A600 */ sw $v0, %lo(gEncounterState)($at)
/* 1BEAC 80040AAC 24020001 */ addiu $v0, $zero, 0x1
/* 1BEB0 80040AB0 AE600090 */ sw $zero, 0x90($s3)
/* 1BEB4 80040AB4 080104C1 */ j .L80041304
/* 1BEB8 80040AB8 AE600094 */ sw $zero, 0x94($s3)
glabel .L80040ABC
/* 1BEBC 80040ABC 8E71008C */ lw $s1, 0x8C($s3)
/* 1BEC0 80040AC0 8E22003C */ lw $v0, 0x3C($s1)
/* 1BEC4 80040AC4 10400004 */ beqz $v0, .L80040AD8
/* 1BEC8 80040AC8 0220B82D */ daddu $s7, $s1, $zero
/* 1BECC 80040ACC 8E240054 */ lw $a0, 0x54($s1)
/* 1BED0 80040AD0 0C0B1108 */ jal suspend_all_script
/* 1BED4 80040AD4 00000000 */ nop
.L80040AD8:
/* 1BED8 80040AD8 8E220044 */ lw $v0, 0x44($s1)
/* 1BEDC 80040ADC 10400003 */ beqz $v0, .L80040AEC
/* 1BEE0 80040AE0 00000000 */ nop
/* 1BEE4 80040AE4 0C0B1108 */ jal suspend_all_script
/* 1BEE8 80040AE8 8E24005C */ lw $a0, 0x5C($s1)
.L80040AEC:
/* 1BEEC 80040AEC 8E760088 */ lw $s6, 0x88($s3)
/* 1BEF0 80040AF0 8EC20000 */ lw $v0, 0x0($s6)
/* 1BEF4 80040AF4 1840002B */ blez $v0, .L80040BA4
/* 1BEF8 80040AF8 0000A82D */ daddu $s5, $zero, $zero
/* 1BEFC 80040AFC 24120003 */ addiu $s2, $zero, 0x3
/* 1BF00 80040B00 02C0802D */ daddu $s0, $s6, $zero
.L80040B04:
/* 1BF04 80040B04 8E110004 */ lw $s1, 0x4($s0)
/* 1BF08 80040B08 12200021 */ beqz $s1, .L80040B90
/* 1BF0C 80040B0C 00000000 */ nop
/* 1BF10 80040B10 8E230000 */ lw $v1, 0x0($s1)
/* 1BF14 80040B14 30620008 */ andi $v0, $v1, 0x8
/* 1BF18 80040B18 10400004 */ beqz $v0, .L80040B2C
/* 1BF1C 80040B1C 30620020 */ andi $v0, $v1, 0x20
/* 1BF20 80040B20 8E62008C */ lw $v0, 0x8C($s3)
/* 1BF24 80040B24 1622001A */ bne $s1, $v0, .L80040B90
/* 1BF28 80040B28 30620020 */ andi $v0, $v1, 0x20
.L80040B2C:
/* 1BF2C 80040B2C 14400018 */ bnez $v0, .L80040B90
/* 1BF30 80040B30 00000000 */ nop
/* 1BF34 80040B34 8EE20000 */ lw $v0, 0x0($s7)
/* 1BF38 80040B38 30420040 */ andi $v0, $v0, 0x40
/* 1BF3C 80040B3C 10400004 */ beqz $v0, .L80040B50
/* 1BF40 80040B40 00000000 */ nop
/* 1BF44 80040B44 8E62008C */ lw $v0, 0x8C($s3)
/* 1BF48 80040B48 16220011 */ bne $s1, $v0, .L80040B90
/* 1BF4C 80040B4C 00000000 */ nop
.L80040B50:
/* 1BF50 80040B50 8E220028 */ lw $v0, 0x28($s1)
/* 1BF54 80040B54 1040000E */ beqz $v0, .L80040B90
/* 1BF58 80040B58 2405000A */ addiu $a1, $zero, 0xA
/* 1BF5C 80040B5C 0040202D */ daddu $a0, $v0, $zero
/* 1BF60 80040B60 0000302D */ daddu $a2, $zero, $zero
/* 1BF64 80040B64 0C0B0CF8 */ jal start_script
/* 1BF68 80040B68 A2320005 */ sb $s2, 0x5($s1)
/* 1BF6C 80040B6C 0040202D */ daddu $a0, $v0, $zero
/* 1BF70 80040B70 AE240040 */ sw $a0, 0x40($s1)
/* 1BF74 80040B74 8C820144 */ lw $v0, 0x144($a0)
/* 1BF78 80040B78 AE220058 */ sw $v0, 0x58($s1)
/* 1BF7C 80040B7C AC910148 */ sw $s1, 0x148($a0)
/* 1BF80 80040B80 86220008 */ lh $v0, 0x8($s1)
/* 1BF84 80040B84 AC82014C */ sw $v0, 0x14C($a0)
/* 1BF88 80040B88 92220006 */ lbu $v0, 0x6($s1)
/* 1BF8C 80040B8C A0820004 */ sb $v0, 0x4($a0)
.L80040B90:
/* 1BF90 80040B90 8EC20000 */ lw $v0, 0x0($s6)
/* 1BF94 80040B94 26B50001 */ addiu $s5, $s5, 0x1
/* 1BF98 80040B98 02A2102A */ slt $v0, $s5, $v0
/* 1BF9C 80040B9C 1440FFD9 */ bnez $v0, .L80040B04
/* 1BFA0 80040BA0 26100004 */ addiu $s0, $s0, 0x4
.L80040BA4:
/* 1BFA4 80040BA4 0C03805E */ jal disable_player_input
/* 1BFA8 80040BA8 00000000 */ nop
/* 1BFAC 80040BAC 0C03BD8A */ jal partner_disable_input
/* 1BFB0 80040BB0 00000000 */ nop
/* 1BFB4 80040BB4 24020003 */ addiu $v0, $zero, 0x3
/* 1BFB8 80040BB8 A2600012 */ sb $zero, 0x12($s3)
/* 1BFBC 80040BBC 3C01800A */ lui $at, %hi(gEncounterState)
/* 1BFC0 80040BC0 AC22A600 */ sw $v0, %lo(gEncounterState)($at)
/* 1BFC4 80040BC4 24020001 */ addiu $v0, $zero, 0x1
/* 1BFC8 80040BC8 AE600090 */ sw $zero, 0x90($s3)
/* 1BFCC 80040BCC AE600094 */ sw $zero, 0x94($s3)
/* 1BFD0 80040BD0 3C01800A */ lui $at, %hi(D_8009A678)
/* 1BFD4 80040BD4 AC22A678 */ sw $v0, %lo(D_8009A678)($at)
/* 1BFD8 80040BD8 8E820000 */ lw $v0, 0x0($s4)
/* 1BFDC 80040BDC 3C030004 */ lui $v1, (0x40000 >> 16)
/* 1BFE0 80040BE0 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1BFE4 80040BE4 AC20A5D0 */ sw $zero, %lo(gEncounterSubState)($at)
/* 1BFE8 80040BE8 00431025 */ or $v0, $v0, $v1
/* 1BFEC 80040BEC 080104C5 */ j .L80041314
/* 1BFF0 80040BF0 AE820000 */ sw $v0, 0x0($s4)
glabel .L80040BF4
/* 1BFF4 80040BF4 8E71008C */ lw $s1, 0x8C($s3)
/* 1BFF8 80040BF8 8E22003C */ lw $v0, 0x3C($s1)
/* 1BFFC 80040BFC 10400004 */ beqz $v0, .L80040C10
/* 1C000 80040C00 0220B82D */ daddu $s7, $s1, $zero
/* 1C004 80040C04 8E240054 */ lw $a0, 0x54($s1)
/* 1C008 80040C08 0C0B1108 */ jal suspend_all_script
/* 1C00C 80040C0C 00000000 */ nop
.L80040C10:
/* 1C010 80040C10 8E220044 */ lw $v0, 0x44($s1)
/* 1C014 80040C14 10400003 */ beqz $v0, .L80040C24
/* 1C018 80040C18 00000000 */ nop
/* 1C01C 80040C1C 0C0B1108 */ jal suspend_all_script
/* 1C020 80040C20 8E24005C */ lw $a0, 0x5C($s1)
.L80040C24:
/* 1C024 80040C24 8E760088 */ lw $s6, 0x88($s3)
/* 1C028 80040C28 0000802D */ daddu $s0, $zero, $zero
/* 1C02C 80040C2C 8EC20000 */ lw $v0, 0x0($s6)
/* 1C030 80040C30 18400070 */ blez $v0, .L80040DF4
/* 1C034 80040C34 0200A82D */ daddu $s5, $s0, $zero
/* 1C038 80040C38 241E0003 */ addiu $fp, $zero, 0x3
/* 1C03C 80040C3C 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 1C040 80040C40 4481A000 */ mtc1 $at, $f20
/* 1C044 80040C44 3C01BF80 */ lui $at, (0xBF800000 >> 16)
/* 1C048 80040C48 4481B000 */ mtc1 $at, $f22
/* 1C04C 80040C4C 00151080 */ sll $v0, $s5, 2
.L80040C50:
/* 1C050 80040C50 02C21021 */ addu $v0, $s6, $v0
/* 1C054 80040C54 8C510004 */ lw $s1, 0x4($v0)
/* 1C058 80040C58 12200061 */ beqz $s1, .L80040DE0
/* 1C05C 80040C5C 00000000 */ nop
/* 1C060 80040C60 8E230000 */ lw $v1, 0x0($s1)
/* 1C064 80040C64 30620008 */ andi $v0, $v1, 0x8
/* 1C068 80040C68 10400004 */ beqz $v0, .L80040C7C
/* 1C06C 80040C6C 30620020 */ andi $v0, $v1, 0x20
/* 1C070 80040C70 8E62008C */ lw $v0, 0x8C($s3)
/* 1C074 80040C74 1622005A */ bne $s1, $v0, .L80040DE0
/* 1C078 80040C78 30620020 */ andi $v0, $v1, 0x20
.L80040C7C:
/* 1C07C 80040C7C 14400058 */ bnez $v0, .L80040DE0
/* 1C080 80040C80 00000000 */ nop
/* 1C084 80040C84 8EE20000 */ lw $v0, 0x0($s7)
/* 1C088 80040C88 30420040 */ andi $v0, $v0, 0x40
/* 1C08C 80040C8C 10400004 */ beqz $v0, .L80040CA0
/* 1C090 80040C90 00000000 */ nop
/* 1C094 80040C94 8E62008C */ lw $v0, 0x8C($s3)
/* 1C098 80040C98 16220051 */ bne $s1, $v0, .L80040DE0
/* 1C09C 80040C9C 00000000 */ nop
.L80040CA0:
/* 1C0A0 80040CA0 8E220028 */ lw $v0, 0x28($s1)
/* 1C0A4 80040CA4 1040001F */ beqz $v0, .L80040D24
/* 1C0A8 80040CA8 2405000A */ addiu $a1, $zero, 0xA
/* 1C0AC 80040CAC 0000302D */ daddu $a2, $zero, $zero
/* 1C0B0 80040CB0 0040202D */ daddu $a0, $v0, $zero
/* 1C0B4 80040CB4 24020002 */ addiu $v0, $zero, 0x2
/* 1C0B8 80040CB8 0C0B0CF8 */ jal start_script
/* 1C0BC 80040CBC A2220005 */ sb $v0, 0x5($s1)
/* 1C0C0 80040CC0 0040202D */ daddu $a0, $v0, $zero
/* 1C0C4 80040CC4 AE240040 */ sw $a0, 0x40($s1)
/* 1C0C8 80040CC8 8C820144 */ lw $v0, 0x144($a0)
/* 1C0CC 80040CCC AE220058 */ sw $v0, 0x58($s1)
/* 1C0D0 80040CD0 AC910148 */ sw $s1, 0x148($a0)
/* 1C0D4 80040CD4 86220008 */ lh $v0, 0x8($s1)
/* 1C0D8 80040CD8 AC82014C */ sw $v0, 0x14C($a0)
/* 1C0DC 80040CDC 92220006 */ lbu $v0, 0x6($s1)
/* 1C0E0 80040CE0 A0820004 */ sb $v0, 0x4($a0)
/* 1C0E4 80040CE4 0C00EABB */ jal get_npc_unsafe
/* 1C0E8 80040CE8 86240008 */ lh $a0, 0x8($s1)
/* 1C0EC 80040CEC 0040902D */ daddu $s2, $v0, $zero
/* 1C0F0 80040CF0 C6460038 */ lwc1 $f6, 0x38($s2)
/* 1C0F4 80040CF4 C68A0028 */ lwc1 $f10, 0x28($s4)
/* 1C0F8 80040CF8 460A3181 */ sub.s $f6, $f6, $f10
/* 1C0FC 80040CFC 46143182 */ mul.s $f6, $f6, $f20
/* 1C100 80040D00 00000000 */ nop
/* 1C104 80040D04 864200A8 */ lh $v0, 0xA8($s2)
/* 1C108 80040D08 C642003C */ lwc1 $f2, 0x3C($s2)
/* 1C10C 80040D0C 44820000 */ mtc1 $v0, $f0
/* 1C110 80040D10 00000000 */ nop
/* 1C114 80040D14 46800020 */ cvt.s.w $f0, $f0
/* 1C118 80040D18 868200B0 */ lh $v0, 0xB0($s4)
/* 1C11C 80040D1C 0801035B */ j .L80040D6C
/* 1C120 80040D20 46001080 */ add.s $f2, $f2, $f0
.L80040D24:
/* 1C124 80040D24 30620001 */ andi $v0, $v1, 0x1
/* 1C128 80040D28 1440002D */ bnez $v0, .L80040DE0
/* 1C12C 80040D2C 00000000 */ nop
/* 1C130 80040D30 0C00EABB */ jal get_npc_unsafe
/* 1C134 80040D34 86240008 */ lh $a0, 0x8($s1)
/* 1C138 80040D38 0040902D */ daddu $s2, $v0, $zero
/* 1C13C 80040D3C C4460038 */ lwc1 $f6, 0x38($v0)
/* 1C140 80040D40 C68A0028 */ lwc1 $f10, 0x28($s4)
/* 1C144 80040D44 460A3181 */ sub.s $f6, $f6, $f10
/* 1C148 80040D48 46143182 */ mul.s $f6, $f6, $f20
/* 1C14C 80040D4C 00000000 */ nop
/* 1C150 80040D50 864200A8 */ lh $v0, 0xA8($s2)
/* 1C154 80040D54 C642003C */ lwc1 $f2, 0x3C($s2)
/* 1C158 80040D58 44820000 */ mtc1 $v0, $f0
/* 1C15C 80040D5C 00000000 */ nop
/* 1C160 80040D60 46800020 */ cvt.s.w $f0, $f0
/* 1C164 80040D64 868200B0 */ lh $v0, 0xB0($s4)
/* 1C168 80040D68 46001080 */ add.s $f2, $f2, $f0
.L80040D6C:
/* 1C16C 80040D6C C688002C */ lwc1 $f8, 0x2C($s4)
/* 1C170 80040D70 44820000 */ mtc1 $v0, $f0
/* 1C174 80040D74 00000000 */ nop
/* 1C178 80040D78 46800020 */ cvt.s.w $f0, $f0
/* 1C17C 80040D7C 46004000 */ add.s $f0, $f8, $f0
/* 1C180 80040D80 46001081 */ sub.s $f2, $f2, $f0
/* 1C184 80040D84 46141082 */ mul.s $f2, $f2, $f20
/* 1C188 80040D88 00000000 */ nop
/* 1C18C 80040D8C C6840030 */ lwc1 $f4, 0x30($s4)
/* 1C190 80040D90 C6400040 */ lwc1 $f0, 0x40($s2)
/* 1C194 80040D94 46040001 */ sub.s $f0, $f0, $f4
/* 1C198 80040D98 46140002 */ mul.s $f0, $f0, $f20
/* 1C19C 80040D9C 00000000 */ nop
/* 1C1A0 80040DA0 46065280 */ add.s $f10, $f10, $f6
/* 1C1A4 80040DA4 46024200 */ add.s $f8, $f8, $f2
/* 1C1A8 80040DA8 24100001 */ addiu $s0, $zero, 0x1
/* 1C1AC 80040DAC 46002100 */ add.s $f4, $f4, $f0
/* 1C1B0 80040DB0 44055000 */ mfc1 $a1, $f10
/* 1C1B4 80040DB4 44064000 */ mfc1 $a2, $f8
/* 1C1B8 80040DB8 44072000 */ mfc1 $a3, $f4
/* 1C1BC 80040DBC 24040003 */ addiu $a0, $zero, 0x3
/* 1C1C0 80040DC0 AFA5003C */ sw $a1, 0x3C($sp)
/* 1C1C4 80040DC4 AFA60040 */ sw $a2, 0x40($sp)
/* 1C1C8 80040DC8 AFA70044 */ sw $a3, 0x44($sp)
/* 1C1CC 80040DCC AFA00010 */ sw $zero, 0x10($sp)
/* 1C1D0 80040DD0 E7B60014 */ swc1 $f22, 0x14($sp)
/* 1C1D4 80040DD4 AFA00018 */ sw $zero, 0x18($sp)
/* 1C1D8 80040DD8 0C01C064 */ jal fx_damage_stars
/* 1C1DC 80040DDC AFBE001C */ sw $fp, 0x1C($sp)
.L80040DE0:
/* 1C1E0 80040DE0 8EC20000 */ lw $v0, 0x0($s6)
/* 1C1E4 80040DE4 26B50001 */ addiu $s5, $s5, 0x1
/* 1C1E8 80040DE8 02A2102A */ slt $v0, $s5, $v0
/* 1C1EC 80040DEC 1440FF98 */ bnez $v0, .L80040C50
/* 1C1F0 80040DF0 00151080 */ sll $v0, $s5, 2
.L80040DF4:
/* 1C1F4 80040DF4 0C03805E */ jal disable_player_input
/* 1C1F8 80040DF8 00000000 */ nop
/* 1C1FC 80040DFC 0C03BD8A */ jal partner_disable_input
/* 1C200 80040E00 00000000 */ nop
/* 1C204 80040E04 8E820000 */ lw $v0, 0x0($s4)
/* 1C208 80040E08 3C030004 */ lui $v1, (0x40000 >> 16)
/* 1C20C 80040E0C 00431025 */ or $v0, $v0, $v1
/* 1C210 80040E10 12000003 */ beqz $s0, .L80040E20
/* 1C214 80040E14 AE820000 */ sw $v0, 0x0($s4)
/* 1C218 80040E18 0C03980D */ jal start_bounce_a
/* 1C21C 80040E1C 00000000 */ nop
.L80040E20:
/* 1C220 80040E20 0000202D */ daddu $a0, $zero, $zero
/* 1C224 80040E24 AE600090 */ sw $zero, 0x90($s3)
/* 1C228 80040E28 AE600094 */ sw $zero, 0x94($s3)
/* 1C22C 80040E2C 080104BB */ j .L800412EC
/* 1C230 80040E30 A2600012 */ sb $zero, 0x12($s3)
glabel .L80040E34
/* 1C234 80040E34 8E71008C */ lw $s1, 0x8C($s3)
/* 1C238 80040E38 8E22003C */ lw $v0, 0x3C($s1)
/* 1C23C 80040E3C 10400004 */ beqz $v0, .L80040E50
/* 1C240 80040E40 0220B82D */ daddu $s7, $s1, $zero
/* 1C244 80040E44 8E240054 */ lw $a0, 0x54($s1)
/* 1C248 80040E48 0C0B1108 */ jal suspend_all_script
/* 1C24C 80040E4C 00000000 */ nop
.L80040E50:
/* 1C250 80040E50 8E220044 */ lw $v0, 0x44($s1)
/* 1C254 80040E54 10400003 */ beqz $v0, .L80040E64
/* 1C258 80040E58 00000000 */ nop
/* 1C25C 80040E5C 0C0B1108 */ jal suspend_all_script
/* 1C260 80040E60 8E24005C */ lw $a0, 0x5C($s1)
.L80040E64:
/* 1C264 80040E64 8E760088 */ lw $s6, 0x88($s3)
/* 1C268 80040E68 8EC20000 */ lw $v0, 0x0($s6)
/* 1C26C 80040E6C 18400113 */ blez $v0, .L800412BC
/* 1C270 80040E70 0000A82D */ daddu $s5, $zero, $zero
/* 1C274 80040E74 24100003 */ addiu $s0, $zero, 0x3
/* 1C278 80040E78 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 1C27C 80040E7C 4481A000 */ mtc1 $at, $f20
/* 1C280 80040E80 3C01BF80 */ lui $at, (0xBF800000 >> 16)
/* 1C284 80040E84 4481B000 */ mtc1 $at, $f22
/* 1C288 80040E88 00151080 */ sll $v0, $s5, 2
.L80040E8C:
/* 1C28C 80040E8C 02C21021 */ addu $v0, $s6, $v0
/* 1C290 80040E90 8C510004 */ lw $s1, 0x4($v0)
/* 1C294 80040E94 12200082 */ beqz $s1, .L800410A0
/* 1C298 80040E98 00000000 */ nop
/* 1C29C 80040E9C 8E230000 */ lw $v1, 0x0($s1)
/* 1C2A0 80040EA0 30620008 */ andi $v0, $v1, 0x8
/* 1C2A4 80040EA4 10400004 */ beqz $v0, .L80040EB8
/* 1C2A8 80040EA8 30620020 */ andi $v0, $v1, 0x20
/* 1C2AC 80040EAC 8E62008C */ lw $v0, 0x8C($s3)
/* 1C2B0 80040EB0 1622007B */ bne $s1, $v0, .L800410A0
/* 1C2B4 80040EB4 30620020 */ andi $v0, $v1, 0x20
.L80040EB8:
/* 1C2B8 80040EB8 14400079 */ bnez $v0, .L800410A0
/* 1C2BC 80040EBC 00000000 */ nop
/* 1C2C0 80040EC0 8EE20000 */ lw $v0, 0x0($s7)
/* 1C2C4 80040EC4 30420040 */ andi $v0, $v0, 0x40
/* 1C2C8 80040EC8 10400004 */ beqz $v0, .L80040EDC
/* 1C2CC 80040ECC 00000000 */ nop
/* 1C2D0 80040ED0 8E62008C */ lw $v0, 0x8C($s3)
/* 1C2D4 80040ED4 16220072 */ bne $s1, $v0, .L800410A0
/* 1C2D8 80040ED8 00000000 */ nop
.L80040EDC:
/* 1C2DC 80040EDC 8E220028 */ lw $v0, 0x28($s1)
/* 1C2E0 80040EE0 1040003A */ beqz $v0, .L80040FCC
/* 1C2E4 80040EE4 2405000A */ addiu $a1, $zero, 0xA
/* 1C2E8 80040EE8 0000302D */ daddu $a2, $zero, $zero
/* 1C2EC 80040EEC 0040202D */ daddu $a0, $v0, $zero
/* 1C2F0 80040EF0 24020004 */ addiu $v0, $zero, 0x4
/* 1C2F4 80040EF4 0C0B0CF8 */ jal start_script
/* 1C2F8 80040EF8 A2220005 */ sb $v0, 0x5($s1)
/* 1C2FC 80040EFC 0040202D */ daddu $a0, $v0, $zero
/* 1C300 80040F00 AE240040 */ sw $a0, 0x40($s1)
/* 1C304 80040F04 8C820144 */ lw $v0, 0x144($a0)
/* 1C308 80040F08 AE220058 */ sw $v0, 0x58($s1)
/* 1C30C 80040F0C AC910148 */ sw $s1, 0x148($a0)
/* 1C310 80040F10 86220008 */ lh $v0, 0x8($s1)
/* 1C314 80040F14 AC82014C */ sw $v0, 0x14C($a0)
/* 1C318 80040F18 92220006 */ lbu $v0, 0x6($s1)
/* 1C31C 80040F1C A0820004 */ sb $v0, 0x4($a0)
/* 1C320 80040F20 0C00EABB */ jal get_npc_unsafe
/* 1C324 80040F24 86240008 */ lh $a0, 0x8($s1)
/* 1C328 80040F28 0040902D */ daddu $s2, $v0, $zero
/* 1C32C 80040F2C C6480038 */ lwc1 $f8, 0x38($s2)
/* 1C330 80040F30 C68A0028 */ lwc1 $f10, 0x28($s4)
/* 1C334 80040F34 460A4201 */ sub.s $f8, $f8, $f10
/* 1C338 80040F38 46144202 */ mul.s $f8, $f8, $f20
/* 1C33C 80040F3C 00000000 */ nop
/* 1C340 80040F40 864200A8 */ lh $v0, 0xA8($s2)
/* 1C344 80040F44 C644003C */ lwc1 $f4, 0x3C($s2)
/* 1C348 80040F48 44820000 */ mtc1 $v0, $f0
/* 1C34C 80040F4C 00000000 */ nop
/* 1C350 80040F50 46800020 */ cvt.s.w $f0, $f0
/* 1C354 80040F54 46002100 */ add.s $f4, $f4, $f0
/* 1C358 80040F58 868200B0 */ lh $v0, 0xB0($s4)
/* 1C35C 80040F5C C686002C */ lwc1 $f6, 0x2C($s4)
/* 1C360 80040F60 44820000 */ mtc1 $v0, $f0
/* 1C364 80040F64 00000000 */ nop
/* 1C368 80040F68 46800020 */ cvt.s.w $f0, $f0
/* 1C36C 80040F6C 46003000 */ add.s $f0, $f6, $f0
/* 1C370 80040F70 46002101 */ sub.s $f4, $f4, $f0
/* 1C374 80040F74 46142102 */ mul.s $f4, $f4, $f20
/* 1C378 80040F78 00000000 */ nop
/* 1C37C 80040F7C C6820030 */ lwc1 $f2, 0x30($s4)
/* 1C380 80040F80 C6400040 */ lwc1 $f0, 0x40($s2)
/* 1C384 80040F84 46020001 */ sub.s $f0, $f0, $f2
/* 1C388 80040F88 46140002 */ mul.s $f0, $f0, $f20
/* 1C38C 80040F8C 00000000 */ nop
/* 1C390 80040F90 46085280 */ add.s $f10, $f10, $f8
/* 1C394 80040F94 46043180 */ add.s $f6, $f6, $f4
/* 1C398 80040F98 46001080 */ add.s $f2, $f2, $f0
/* 1C39C 80040F9C 44055000 */ mfc1 $a1, $f10
/* 1C3A0 80040FA0 44063000 */ mfc1 $a2, $f6
/* 1C3A4 80040FA4 44071000 */ mfc1 $a3, $f2
/* 1C3A8 80040FA8 24040003 */ addiu $a0, $zero, 0x3
/* 1C3AC 80040FAC AFA5003C */ sw $a1, 0x3C($sp)
/* 1C3B0 80040FB0 AFA60040 */ sw $a2, 0x40($sp)
/* 1C3B4 80040FB4 AFA70044 */ sw $a3, 0x44($sp)
/* 1C3B8 80040FB8 AFA00010 */ sw $zero, 0x10($sp)
/* 1C3BC 80040FBC E7B60014 */ swc1 $f22, 0x14($sp)
/* 1C3C0 80040FC0 AFA00018 */ sw $zero, 0x18($sp)
/* 1C3C4 80040FC4 08010426 */ j .L80041098
/* 1C3C8 80040FC8 AFB0001C */ sw $s0, 0x1C($sp)
.L80040FCC:
/* 1C3CC 80040FCC 30620001 */ andi $v0, $v1, 0x1
/* 1C3D0 80040FD0 14400033 */ bnez $v0, .L800410A0
/* 1C3D4 80040FD4 00000000 */ nop
/* 1C3D8 80040FD8 0C00EABB */ jal get_npc_unsafe
/* 1C3DC 80040FDC 86240008 */ lh $a0, 0x8($s1)
/* 1C3E0 80040FE0 0040902D */ daddu $s2, $v0, $zero
/* 1C3E4 80040FE4 C44C0038 */ lwc1 $f12, 0x38($v0)
/* 1C3E8 80040FE8 C68E0028 */ lwc1 $f14, 0x28($s4)
/* 1C3EC 80040FEC 460E6301 */ sub.s $f12, $f12, $f14
/* 1C3F0 80040FF0 46146302 */ mul.s $f12, $f12, $f20
/* 1C3F4 80040FF4 00000000 */ nop
/* 1C3F8 80040FF8 C6420040 */ lwc1 $f2, 0x40($s2)
/* 1C3FC 80040FFC C6880030 */ lwc1 $f8, 0x30($s4)
/* 1C400 80041000 46081081 */ sub.s $f2, $f2, $f8
/* 1C404 80041004 46141082 */ mul.s $f2, $f2, $f20
/* 1C408 80041008 00000000 */ nop
/* 1C40C 8004100C 864200A8 */ lh $v0, 0xA8($s2)
/* 1C410 80041010 C646003C */ lwc1 $f6, 0x3C($s2)
/* 1C414 80041014 44820000 */ mtc1 $v0, $f0
/* 1C418 80041018 00000000 */ nop
/* 1C41C 8004101C 46800020 */ cvt.s.w $f0, $f0
/* 1C420 80041020 868200B0 */ lh $v0, 0xB0($s4)
/* 1C424 80041024 46003180 */ add.s $f6, $f6, $f0
/* 1C428 80041028 C68A002C */ lwc1 $f10, 0x2C($s4)
/* 1C42C 8004102C 44820000 */ mtc1 $v0, $f0
/* 1C430 80041030 00000000 */ nop
/* 1C434 80041034 46800020 */ cvt.s.w $f0, $f0
/* 1C438 80041038 46005000 */ add.s $f0, $f10, $f0
/* 1C43C 8004103C 46003181 */ sub.s $f6, $f6, $f0
/* 1C440 80041040 46143182 */ mul.s $f6, $f6, $f20
/* 1C444 80041044 00000000 */ nop
/* 1C448 80041048 864200A8 */ lh $v0, 0xA8($s2)
/* 1C44C 8004104C C644003C */ lwc1 $f4, 0x3C($s2)
/* 1C450 80041050 44820000 */ mtc1 $v0, $f0
/* 1C454 80041054 00000000 */ nop
/* 1C458 80041058 46800020 */ cvt.s.w $f0, $f0
/* 1C45C 8004105C 46002100 */ add.s $f4, $f4, $f0
/* 1C460 80041060 460C7380 */ add.s $f14, $f14, $f12
/* 1C464 80041064 46024200 */ add.s $f8, $f8, $f2
/* 1C468 80041068 44062000 */ mfc1 $a2, $f4
/* 1C46C 8004106C 46065280 */ add.s $f10, $f10, $f6
/* 1C470 80041070 E7AE003C */ swc1 $f14, 0x3C($sp)
/* 1C474 80041074 E7A80044 */ swc1 $f8, 0x44($sp)
/* 1C478 80041078 E7AA0040 */ swc1 $f10, 0x40($sp)
/* 1C47C 8004107C AFA00010 */ sw $zero, 0x10($sp)
glabel func_80041080
/* 1C480 80041080 E7B60014 */ swc1 $f22, 0x14($sp)
/* 1C484 80041084 AFA00018 */ sw $zero, 0x18($sp)
/* 1C488 80041088 AFB0001C */ sw $s0, 0x1C($sp)
/* 1C48C 8004108C 8E450038 */ lw $a1, 0x38($s2)
/* 1C490 80041090 8E470040 */ lw $a3, 0x40($s2)
/* 1C494 80041094 24040003 */ addiu $a0, $zero, 0x3
.L80041098:
/* 1C498 80041098 0C01C064 */ jal fx_damage_stars
/* 1C49C 8004109C 00000000 */ nop
.L800410A0:
/* 1C4A0 800410A0 8EC20000 */ lw $v0, 0x0($s6)
/* 1C4A4 800410A4 26B50001 */ addiu $s5, $s5, 0x1
/* 1C4A8 800410A8 02A2102A */ slt $v0, $s5, $v0
/* 1C4AC 800410AC 1440FF77 */ bnez $v0, .L80040E8C
/* 1C4B0 800410B0 00151080 */ sll $v0, $s5, 2
/* 1C4B4 800410B4 080104AF */ j .L800412BC
/* 1C4B8 800410B8 00000000 */ nop
glabel .L800410BC
/* 1C4BC 800410BC 0C0B117A */ jal suspend_all_group
/* 1C4C0 800410C0 24040001 */ addiu $a0, $zero, 0x1
/* 1C4C4 800410C4 8E71008C */ lw $s1, 0x8C($s3)
/* 1C4C8 800410C8 12200007 */ beqz $s1, .L800410E8
/* 1C4CC 800410CC 00000000 */ nop
/* 1C4D0 800410D0 8E22003C */ lw $v0, 0x3C($s1)
/* 1C4D4 800410D4 10400004 */ beqz $v0, .L800410E8
/* 1C4D8 800410D8 00000000 */ nop
/* 1C4DC 800410DC 0C0B1108 */ jal suspend_all_script
/* 1C4E0 800410E0 8E240054 */ lw $a0, 0x54($s1)
/* 1C4E4 800410E4 8E71008C */ lw $s1, 0x8C($s3)
.L800410E8:
/* 1C4E8 800410E8 8E220020 */ lw $v0, 0x20($s1)
/* 1C4EC 800410EC 1040000F */ beqz $v0, .L8004112C
/* 1C4F0 800410F0 2405000A */ addiu $a1, $zero, 0xA
/* 1C4F4 800410F4 0000302D */ daddu $a2, $zero, $zero
/* 1C4F8 800410F8 0040202D */ daddu $a0, $v0, $zero
/* 1C4FC 800410FC 24020005 */ addiu $v0, $zero, 0x5
/* 1C500 80041100 0C0B0CF8 */ jal start_script
/* 1C504 80041104 A2220005 */ sb $v0, 0x5($s1)
/* 1C508 80041108 0040202D */ daddu $a0, $v0, $zero
/* 1C50C 8004110C AE240038 */ sw $a0, 0x38($s1)
/* 1C510 80041110 8C820144 */ lw $v0, 0x144($a0)
/* 1C514 80041114 AE220050 */ sw $v0, 0x50($s1)
/* 1C518 80041118 AC910148 */ sw $s1, 0x148($a0)
/* 1C51C 8004111C 86220008 */ lh $v0, 0x8($s1)
/* 1C520 80041120 AC82014C */ sw $v0, 0x14C($a0)
/* 1C524 80041124 92220006 */ lbu $v0, 0x6($s1)
/* 1C528 80041128 A0820004 */ sb $v0, 0x4($a0)
.L8004112C:
/* 1C52C 8004112C 0C03805E */ jal disable_player_input
/* 1C530 80041130 00000000 */ nop
/* 1C534 80041134 0C03BD8A */ jal partner_disable_input
/* 1C538 80041138 00000000 */ nop
/* 1C53C 8004113C 0C039769 */ jal set_action_state
/* 1C540 80041140 2404000C */ addiu $a0, $zero, 0xC
/* 1C544 80041144 24040001 */ addiu $a0, $zero, 0x1
/* 1C548 80041148 AE600090 */ sw $zero, 0x90($s3)
/* 1C54C 8004114C 0C03BCF5 */ jal func_800EF3D4
/* 1C550 80041150 AE600094 */ sw $zero, 0x94($s3)
/* 1C554 80041154 080104BE */ j .L800412F8
/* 1C558 80041158 24020004 */ addiu $v0, $zero, 0x4
glabel .L8004115C
/* 1C55C 8004115C 8E71008C */ lw $s1, 0x8C($s3)
/* 1C560 80041160 8E22003C */ lw $v0, 0x3C($s1)
/* 1C564 80041164 10400004 */ beqz $v0, .L80041178
/* 1C568 80041168 0220B82D */ daddu $s7, $s1, $zero
/* 1C56C 8004116C 8E240054 */ lw $a0, 0x54($s1)
/* 1C570 80041170 0C0B1108 */ jal suspend_all_script
/* 1C574 80041174 00000000 */ nop
.L80041178:
/* 1C578 80041178 8E220044 */ lw $v0, 0x44($s1)
/* 1C57C 8004117C 10400003 */ beqz $v0, .L8004118C
/* 1C580 80041180 00000000 */ nop
/* 1C584 80041184 0C0B1108 */ jal suspend_all_script
/* 1C588 80041188 8E24005C */ lw $a0, 0x5C($s1)
.L8004118C:
/* 1C58C 8004118C 8E760088 */ lw $s6, 0x88($s3)
/* 1C590 80041190 8EC20000 */ lw $v0, 0x0($s6)
/* 1C594 80041194 18400049 */ blez $v0, .L800412BC
/* 1C598 80041198 0000A82D */ daddu $s5, $zero, $zero
/* 1C59C 8004119C 3C01BF80 */ lui $at, (0xBF800000 >> 16)
/* 1C5A0 800411A0 4481A000 */ mtc1 $at, $f20
/* 1C5A4 800411A4 241E0003 */ addiu $fp, $zero, 0x3
/* 1C5A8 800411A8 02C0802D */ daddu $s0, $s6, $zero
.L800411AC:
/* 1C5AC 800411AC 8E110004 */ lw $s1, 0x4($s0)
/* 1C5B0 800411B0 1220003D */ beqz $s1, .L800412A8
/* 1C5B4 800411B4 00000000 */ nop
/* 1C5B8 800411B8 8E230000 */ lw $v1, 0x0($s1)
/* 1C5BC 800411BC 30620008 */ andi $v0, $v1, 0x8
/* 1C5C0 800411C0 10400004 */ beqz $v0, .L800411D4
/* 1C5C4 800411C4 30620020 */ andi $v0, $v1, 0x20
/* 1C5C8 800411C8 8E62008C */ lw $v0, 0x8C($s3)
/* 1C5CC 800411CC 16220036 */ bne $s1, $v0, .L800412A8
/* 1C5D0 800411D0 30620020 */ andi $v0, $v1, 0x20
.L800411D4:
/* 1C5D4 800411D4 14400034 */ bnez $v0, .L800412A8
/* 1C5D8 800411D8 00000000 */ nop
/* 1C5DC 800411DC 8EE20000 */ lw $v0, 0x0($s7)
/* 1C5E0 800411E0 30420040 */ andi $v0, $v0, 0x40
/* 1C5E4 800411E4 10400004 */ beqz $v0, .L800411F8
/* 1C5E8 800411E8 00000000 */ nop
/* 1C5EC 800411EC 8E62008C */ lw $v0, 0x8C($s3)
/* 1C5F0 800411F0 1622002D */ bne $s1, $v0, .L800412A8
/* 1C5F4 800411F4 00000000 */ nop
.L800411F8:
/* 1C5F8 800411F8 8E220028 */ lw $v0, 0x28($s1)
/* 1C5FC 800411FC 10400010 */ beqz $v0, .L80041240
/* 1C600 80041200 2405000A */ addiu $a1, $zero, 0xA
/* 1C604 80041204 0000302D */ daddu $a2, $zero, $zero
/* 1C608 80041208 0040202D */ daddu $a0, $v0, $zero
/* 1C60C 8004120C 24020006 */ addiu $v0, $zero, 0x6
/* 1C610 80041210 0C0B0CF8 */ jal start_script
/* 1C614 80041214 A2220005 */ sb $v0, 0x5($s1)
/* 1C618 80041218 0040202D */ daddu $a0, $v0, $zero
/* 1C61C 8004121C AE240040 */ sw $a0, 0x40($s1)
/* 1C620 80041220 8C820144 */ lw $v0, 0x144($a0)
/* 1C624 80041224 AE220058 */ sw $v0, 0x58($s1)
/* 1C628 80041228 AC910148 */ sw $s1, 0x148($a0)
/* 1C62C 8004122C 86220008 */ lh $v0, 0x8($s1)
/* 1C630 80041230 AC82014C */ sw $v0, 0x14C($a0)
/* 1C634 80041234 92220006 */ lbu $v0, 0x6($s1)
/* 1C638 80041238 08010493 */ j .L8004124C
/* 1C63C 8004123C A0820004 */ sb $v0, 0x4($a0)
.L80041240:
/* 1C640 80041240 30620001 */ andi $v0, $v1, 0x1
/* 1C644 80041244 14400018 */ bnez $v0, .L800412A8
/* 1C648 80041248 00000000 */ nop
.L8004124C:
/* 1C64C 8004124C 0C00EABB */ jal get_npc_unsafe
/* 1C650 80041250 86240008 */ lh $a0, 0x8($s1)
/* 1C654 80041254 0040902D */ daddu $s2, $v0, $zero
/* 1C658 80041258 864200A8 */ lh $v0, 0xA8($s2)
/* 1C65C 8004125C C644003C */ lwc1 $f4, 0x3C($s2)
/* 1C660 80041260 C6420040 */ lwc1 $f2, 0x40($s2)
/* 1C664 80041264 44820000 */ mtc1 $v0, $f0
/* 1C668 80041268 00000000 */ nop
/* 1C66C 8004126C 46800020 */ cvt.s.w $f0, $f0
/* 1C670 80041270 46002100 */ add.s $f4, $f4, $f0
/* 1C674 80041274 C6400038 */ lwc1 $f0, 0x38($s2)
/* 1C678 80041278 44071000 */ mfc1 $a3, $f2
/* 1C67C 8004127C 44050000 */ mfc1 $a1, $f0
/* 1C680 80041280 44062000 */ mfc1 $a2, $f4
/* 1C684 80041284 24040003 */ addiu $a0, $zero, 0x3
/* 1C688 80041288 AFA70044 */ sw $a3, 0x44($sp)
/* 1C68C 8004128C AFA5003C */ sw $a1, 0x3C($sp)
/* 1C690 80041290 AFA60040 */ sw $a2, 0x40($sp)
/* 1C694 80041294 AFA00010 */ sw $zero, 0x10($sp)
/* 1C698 80041298 E7B40014 */ swc1 $f20, 0x14($sp)
/* 1C69C 8004129C AFA00018 */ sw $zero, 0x18($sp)
/* 1C6A0 800412A0 0C01C064 */ jal fx_damage_stars
/* 1C6A4 800412A4 AFBE001C */ sw $fp, 0x1C($sp)
.L800412A8:
/* 1C6A8 800412A8 8EC20000 */ lw $v0, 0x0($s6)
/* 1C6AC 800412AC 26B50001 */ addiu $s5, $s5, 0x1
/* 1C6B0 800412B0 02A2102A */ slt $v0, $s5, $v0
/* 1C6B4 800412B4 1440FFBD */ bnez $v0, .L800411AC
/* 1C6B8 800412B8 26100004 */ addiu $s0, $s0, 0x4
.L800412BC:
/* 1C6BC 800412BC 0C03805E */ jal disable_player_input
/* 1C6C0 800412C0 00000000 */ nop
/* 1C6C4 800412C4 0C03BD8A */ jal partner_disable_input
/* 1C6C8 800412C8 00000000 */ nop
/* 1C6CC 800412CC 0000202D */ daddu $a0, $zero, $zero
/* 1C6D0 800412D0 AE600090 */ sw $zero, 0x90($s3)
/* 1C6D4 800412D4 AE600094 */ sw $zero, 0x94($s3)
/* 1C6D8 800412D8 A2600012 */ sb $zero, 0x12($s3)
/* 1C6DC 800412DC 8E820000 */ lw $v0, 0x0($s4)
/* 1C6E0 800412E0 3C030004 */ lui $v1, (0x40000 >> 16)
/* 1C6E4 800412E4 00431025 */ or $v0, $v0, $v1
/* 1C6E8 800412E8 AE820000 */ sw $v0, 0x0($s4)
.L800412EC:
/* 1C6EC 800412EC 0C05272D */ jal sfx_play_sound
/* 1C6F0 800412F0 00000000 */ nop
/* 1C6F4 800412F4 24020003 */ addiu $v0, $zero, 0x3
.L800412F8:
/* 1C6F8 800412F8 3C01800A */ lui $at, %hi(gEncounterState)
/* 1C6FC 800412FC AC22A600 */ sw $v0, %lo(gEncounterState)($at)
/* 1C700 80041300 24020001 */ addiu $v0, $zero, 0x1
.L80041304:
/* 1C704 80041304 3C01800A */ lui $at, %hi(D_8009A678)
/* 1C708 80041308 AC22A678 */ sw $v0, %lo(D_8009A678)($at)
/* 1C70C 8004130C 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1C710 80041310 AC20A5D0 */ sw $zero, %lo(gEncounterSubState)($at)
glabel .L80041314
/* 1C714 80041314 8FBF008C */ lw $ra, 0x8C($sp)
/* 1C718 80041318 8FBE0088 */ lw $fp, 0x88($sp)
/* 1C71C 8004131C 8FB70084 */ lw $s7, 0x84($sp)
/* 1C720 80041320 8FB60080 */ lw $s6, 0x80($sp)
/* 1C724 80041324 8FB5007C */ lw $s5, 0x7C($sp)
/* 1C728 80041328 8FB40078 */ lw $s4, 0x78($sp)
/* 1C72C 8004132C 8FB30074 */ lw $s3, 0x74($sp)
/* 1C730 80041330 8FB20070 */ lw $s2, 0x70($sp)
/* 1C734 80041334 8FB1006C */ lw $s1, 0x6C($sp)
/* 1C738 80041338 8FB00068 */ lw $s0, 0x68($sp)
/* 1C73C 8004133C D7BE00B8 */ ldc1 $f30, 0xB8($sp)
/* 1C740 80041340 D7BC00B0 */ ldc1 $f28, 0xB0($sp)
/* 1C744 80041344 D7BA00A8 */ ldc1 $f26, 0xA8($sp)
/* 1C748 80041348 D7B800A0 */ ldc1 $f24, 0xA0($sp)
/* 1C74C 8004134C D7B60098 */ ldc1 $f22, 0x98($sp)
/* 1C750 80041350 D7B40090 */ ldc1 $f20, 0x90($sp)
/* 1C754 80041354 03E00008 */ jr $ra
/* 1C758 80041358 27BD00C0 */ addiu $sp, $sp, 0xC0
### DECOMPILED C INSTRUCTIONS:
void update_encounters_neutral(void) {
EncounterStatus* currentEncounter = &gCurrentEncounter;
PlayerStatus* playerStatus = &gPlayerStatus;
Camera* camera = &gCameras[gCurrentCameraID];
s32 screenX, screenY, screenZ;
f32 npcX, npcY, npcZ;
f32 npcYaw;
f32 testX, testY, testZ;
f32 x, y, z;
s32 e;
f32 playerX, playerY, playerZ;
f32 playerYaw;
Encounter* encounter;
Evt* script;
Npc* npc;
f32 distance;
f32 colHeight;
f32 colRadius;
f32 hammerDir;
s32 triggeredBattle;
s32 cond2;
s32 firstStrikeType;
s32 suspendTime;
Enemy* enemy;
Enemy* currentEnemy;
s32 i;
f32 playerJumpColHeight = 37.0f;
f32 playerColRadius = 14.0f;
f32 playerColHeight = 18.0f;
f32 dx, dz;
f32 angle1, angle2;
do {
if (currentEncounter->hitType == ENCOUNTER_TRIGGER_CONVERSATION) {
goto START_BATTLE;
}
} while (0);
currentEncounter->songID = -1;
currentEncounter->unk_18 = -1;
currentEncounter->hitType = 0;
currentEncounter->allowFleeing = FALSE;
currentEncounter->dropWhackaBump = FALSE;
currentEncounter->flags &= ~ENCOUNTER_STATUS_FLAG_1;
currentEncounter->flags &= ~ENCOUNTER_STATUS_FLAG_2;
currentEncounter->flags &= ~ENCOUNTER_STATUS_FLAG_4;
playerX = playerStatus->position.x;
playerY = playerStatus->position.y;
playerZ = playerStatus->position.z;
playerYaw = playerStatus->spriteFacingAngle;
if (playerYaw < 180.0f) {
playerYaw = clamp_angle(camera->currentYaw - 90.0f);
} else {
playerYaw = clamp_angle(camera->currentYaw + 90.0f);
}
if (currentEncounter->battleTriggerCooldown != 0) {
if (!(gOverrideFlags & GLOBAL_OVERRIDES_40)) {
currentEncounter->battleTriggerCooldown--;
}
if (playerStatus->blinkTimer != 0) {
if (!(playerStatus->flags & PS_FLAG_INPUT_DISABLED)) {
playerStatus->blinkTimer = currentEncounter->battleTriggerCooldown;
} else {
playerStatus->blinkTimer = 1;
}
}
}
for (e = 0; e < currentEncounter->numEncounters; e++) {
encounter = currentEncounter->encounterList[e];
if (encounter == NULL) {
continue;
}
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL || (enemy->flags & ENEMY_FLAG_DISABLE_AI)) {
continue;
}
npc = get_npc_unsafe(enemy->npcID);
if (enemy->aiSuspendTime != 0) {
if (!(gOverrideFlags & GLOBAL_OVERRIDES_40)) {
enemy->aiSuspendTime--;
suspendTime = enemy->aiSuspendTime;
} else {
suspendTime = 0;
}
if (suspendTime & 1) {
npc->flags |= NPC_FLAG_SUSPENDED;
enemy->flags |= ENEMY_FLAG_SUSPENDED;
} else {
npc->flags &= ~NPC_FLAG_SUSPENDED;
enemy->flags &= ~ENEMY_FLAG_SUSPENDED;
}
script = get_script_by_id(enemy->auxScriptID);
if (script != NULL) {
set_script_flags(script, EVT_FLAG_SUSPENDED);
}
script = get_script_by_id(enemy->aiScriptID);
if (script != NULL) {
set_script_flags(script, EVT_FLAG_SUSPENDED);
}
if (enemy->flags & ENEMY_FLAG_80000) {
script = get_script_by_id(enemy->auxScriptID);
if (script != NULL) {
clear_script_flags(script, EVT_FLAG_SUSPENDED);
}
script = get_script_by_id(enemy->aiScriptID);
if (script != NULL) {
clear_script_flags(script, EVT_FLAG_SUSPENDED);
}
}
} else if (!(enemy->flags & ENEMY_FLAG_ACTIVE_WHILE_OFFSCREEN)) {
get_screen_coords(gCurrentCameraID, npc->pos.x, npc->pos.y, npc->pos.z, &screenX, &screenY, &screenZ);
if ((screenX < -160 || screenX > 480 || screenY < -120 || screenY > 360 || screenZ < 0) && !(enemy->flags & ENEMY_FLAG_PASSIVE)) {
npc->flags |= NPC_FLAG_SUSPENDED;
enemy->flags |= ENEMY_FLAG_SUSPENDED;
script = get_script_by_id(enemy->auxScriptID);
if (script != NULL) {
set_script_flags(script, EVT_FLAG_SUSPENDED);
}
script = get_script_by_id(enemy->aiScriptID);
if (script != NULL) {
set_script_flags(script, EVT_FLAG_SUSPENDED);
}
} else {
npc->flags &= ~NPC_FLAG_SUSPENDED;
enemy->flags &= ~ENEMY_FLAG_SUSPENDED;
script = get_script_by_id(enemy->auxScriptID);
if (script != NULL) {
clear_script_flags(script, EVT_FLAG_SUSPENDED);
}
script = get_script_by_id(enemy->aiScriptID);
if (script != NULL) {
clear_script_flags(script, EVT_FLAG_SUSPENDED);
}
}
} else {
npc->flags &= ~NPC_FLAG_SUSPENDED;
enemy->flags &= ~ENEMY_FLAG_SUSPENDED;
script = get_script_by_id(enemy->auxScriptID);
if (script != NULL) {
clear_script_flags(script, EVT_FLAG_SUSPENDED);
}
script = get_script_by_id(enemy->aiScriptID);
if (script != NULL) {
clear_script_flags(script, EVT_FLAG_SUSPENDED);
}
}
if (enemy->flags & ENEMY_FLAG_SUSPENDED) {
continue;
}
if (enemy->flags & ENEMY_FLAG_PASSIVE) {
if (!(enemy->flags & ENEMY_FLAG_400000)) {
if (npc == playerStatus->encounteredNPC) {
enemy->savedNpcYaw = npc->yaw;
npc->yaw = atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z);
script = get_script_by_id(enemy->aiScriptID);
if (script != NULL) {
set_script_flags(script, EVT_FLAG_SUSPENDED);
}
} else {
if (enemy->savedNpcYaw != 12345) {
npc->yaw = enemy->savedNpcYaw;
enemy->savedNpcYaw = 12345;
}
script = get_script_by_id(enemy->aiScriptID);
if (script != NULL) {
clear_script_flags(script, EVT_FLAG_SUSPENDED);
}
}
} else {
script = get_script_by_id(enemy->aiScriptID);
if (script != NULL) {
clear_script_flags(script, EVT_FLAG_SUSPENDED);
}
}
}
if (currentEncounter->battleTriggerCooldown != 0 ||
gGameStatusPtr->debugEnemyContact == DEBUG_CONTACT_CANT_TOUCH ||
(playerStatus->flags & PS_FLAG_ARMS_RAISED) ||
(gOverrideFlags & GLOBAL_OVERRIDES_40) ||
gPartnerStatus.actingPartner == PARTNER_BOW ||
(enemy->flags & ENEMY_FLAG_PASSIVE) ||
(gOverrideFlags & (GLOBAL_OVERRIDES_DISABLE_BATTLES | GLOBAL_OVERRIDES_200 | GLOBAL_OVERRIDES_400 | GLOBAL_OVERRIDES_800)) ||
is_picking_up_item()) {
continue;
}
do {
if (!(enemy->flags & ENEMY_FLAG_IGNORE_PARTNER) && partner_test_enemy_collision(npc)) {
currentEncounter->hitType = ENCOUNTER_TRIGGER_PARTNER;
enemy->encountered = ENCOUNTER_TRIGGER_PARTNER;
currentEncounter->currentEncounter = encounter;
currentEncounter->currentEnemy = enemy;
currentEncounter->firstStrikeType = FIRST_STRIKE_PLAYER;
goto START_BATTLE;
}
} while (0);
npcX = npc->pos.x;
npcY = npc->pos.y;
npcZ = npc->pos.z;
npcYaw = npc->yaw;
colHeight = npc->collisionHeight;
colRadius = npc->collisionDiameter / 2;
if (enemy->unk_DC != 0) {
npcYaw = npc->yawCamOffset;
if (npcYaw < 180.0f) {
npcYaw = clamp_angle(camera->currentYaw - 90.0f);
} else {
npcYaw = clamp_angle(camera->currentYaw + 90.0f);
}
add_vec2D_polar(&npcX, &npcZ, enemy->unk_DC, npcYaw);
}
dx = npcX - playerX;
dz = npcZ - playerZ;
distance = sqrtf(SQ(dx) + SQ(dz));
switch (playerStatus->actionState) {
case ACTION_STATE_HAMMER:
x = playerX;
y = playerY;
z = playerZ;
if (clamp_angle(playerStatus->spriteFacingAngle) < 180.0f) {
hammerDir = clamp_angle(camera->currentYaw - 90.0f);
if (playerStatus->trueAnimation & SPRITE_ID_BACK_FACING) {
hammerDir = clamp_angle(hammerDir + 30.0f);
}
} else {
hammerDir = clamp_angle(camera->currentYaw + 90.0f);
if (playerStatus->trueAnimation & SPRITE_ID_BACK_FACING) {
hammerDir = clamp_angle(hammerDir - 30.0f);
}
}
add_vec2D_polar(&x, &z, 24.0f, hammerDir);
dx = npcX - x;
dz = npcZ - z;
distance = sqrtf(SQ(dx) + SQ(dz));
if (enemy->flags & ENEMY_FLAG_IGNORE_HAMMER) {
break;
}
if (!(playerStatus->flags & PS_FLAG_HAMMER_CHECK)) {
break;
}
if (distance >= playerColRadius + colRadius || y > npcY + colHeight || npcY > y + playerColHeight) {
break;
}
testX = npcX;
testY = npcY;
testZ = npcZ;
if (npc_test_move_taller_with_slipping(COLLISION_CHANNEL_10000, &testX, &testY, &testZ, distance, atan2(npcX, npcZ, playerX, playerZ), colHeight, colRadius * 2.0f)) {
testX = playerX;
testY = playerY;
testZ = playerZ;
if (npc_test_move_taller_with_slipping(COLLISION_CHANNEL_10000, &testX, &testY, &testZ, distance, atan2(playerX, playerZ, npcX, npcZ), colHeight, colRadius * 2.0f)) {
break;
}
}
if (enemy->hitboxIsActive) {
npcX = enemy->unk_10.x;
npcY = enemy->unk_10.y;
npcZ = enemy->unk_10.z;
}
angle1 = fabsf(get_clamped_angle_diff(atan2(playerX, playerZ, npcX, npcZ), playerYaw));
angle2 = fabsf(get_clamped_angle_diff(atan2(npcX, npcZ, playerX, playerZ), npcYaw));
triggeredBattle = FALSE;
if (angle1 >= 90.0f && angle2 >= 90.0f) {
triggeredBattle = FALSE;
}
if (angle1 < 90.0f && angle2 >= 90.0f) {
triggeredBattle = TRUE;
}
if (angle1 >= 90.0f && angle2 < 90.0f) {
triggeredBattle = FALSE;
}
if (angle1 < 90.0f && angle2 < 90.0f) {
triggeredBattle = TRUE;
}
if (triggeredBattle) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_MODE_0, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z);
currentEncounter->hitType = ENCOUNTER_TRIGGER_HAMMER;
currentEncounter->hitTier = gPlayerData.hammerLevel;
enemy->encountered = ENCOUNTER_TRIGGER_HAMMER;
currentEncounter->currentEncounter = encounter;
currentEncounter->currentEnemy = enemy;
currentEncounter->firstStrikeType = FIRST_STRIKE_PLAYER;
goto START_BATTLE;
}
break;
case ACTION_STATE_JUMP:
case ACTION_STATE_BOUNCE:
case ACTION_STATE_FALLING:
case ACTION_STATE_STEP_DOWN:
case ACTION_STATE_LAND:
case ACTION_STATE_STEP_DOWN_LAND:
case ACTION_STATE_SPIN_JUMP:
case ACTION_STATE_SPIN_POUND:
case ACTION_STATE_TORNADO_JUMP:
case ACTION_STATE_TORNADO_POUND:
x = playerX;
z = playerZ;
if (!(enemy->flags & ENEMY_FLAG_IGNORE_JUMP)) {
if (distance >= playerColRadius + colRadius) {
continue;
}
if (playerY > npcY + colHeight || npcY > playerY + playerJumpColHeight) {
continue;
}
testX = npcX;
testY = npcY;
testZ = npcZ;
if (npc_test_move_taller_with_slipping(COLLISION_CHANNEL_10000, &testX, &testY, &testZ, distance, atan2(npcX, npcZ, playerX, playerZ), colHeight, colRadius * 2.0f)) {
testX = playerX;
testY = playerY;
testZ = playerZ;
if (npc_test_move_taller_with_slipping(COLLISION_CHANNEL_10000, &testX, &testY, &testZ, distance, atan2(playerX, playerZ, npcX, npcZ), colHeight, colRadius * 2.0f)) {
break;
}
}
triggeredBattle = FALSE;
if (npcY + colHeight < playerY + playerJumpColHeight * 0.5f) {
if (playerStatus->actionState == ACTION_STATE_FALLING ||
playerStatus->actionState == ACTION_STATE_STEP_DOWN ||
playerStatus->actionState == ACTION_STATE_LAND ||
playerStatus->actionState == ACTION_STATE_STEP_DOWN_LAND ||
playerStatus->actionState == ACTION_STATE_SPIN_JUMP ||
playerStatus->actionState == ACTION_STATE_SPIN_POUND ||
playerStatus->actionState == ACTION_STATE_TORNADO_JUMP ||
playerStatus->actionState == ACTION_STATE_TORNADO_POUND) {
triggeredBattle = TRUE;
}
}
if (playerY + playerJumpColHeight < npcY + colHeight * 0.5f) {
triggeredBattle = FALSE;
}
if (triggeredBattle) {
if (gPlayerData.bootsLevel < 0) {
currentEncounter->hitType = ENCOUNTER_TRIGGER_NONE;
enemy->encountered = ENCOUNTER_TRIGGER_NONE;
currentEncounter->currentEncounter = encounter;
currentEncounter->currentEnemy = enemy;
currentEncounter->firstStrikeType = FIRST_STRIKE_NONE;
currentEncounter->hitTier = 0;
goto START_BATTLE;
}
currentEncounter->hitType = ENCOUNTER_TRIGGER_JUMP;
switch (playerStatus->actionState) {
case ACTION_STATE_JUMP:
case ACTION_STATE_BOUNCE:
case ACTION_STATE_FALLING:
case ACTION_STATE_STEP_DOWN:
case ACTION_STATE_LAND:
case ACTION_STATE_STEP_DOWN_LAND:
currentEncounter->hitTier = 0;
break;
case ACTION_STATE_SPIN_JUMP:
case ACTION_STATE_SPIN_POUND:
currentEncounter->hitTier = 1;
break;
case ACTION_STATE_TORNADO_JUMP:
case ACTION_STATE_TORNADO_POUND:
currentEncounter->hitTier = 2;
break;
}
sfx_play_sound_at_position(SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_MODE_0, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z);
enemy->encountered = ENCOUNTER_STATE_NEUTRAL;
currentEncounter->currentEncounter = encounter;
currentEncounter->currentEnemy = enemy;
currentEncounter->firstStrikeType = FIRST_STRIKE_PLAYER;
goto START_BATTLE;
}
}
break;
}
if (enemy->flags & ENEMY_FLAG_IGNORE_TOUCH) {
continue;
}
dx = npcX - playerX;
dz = npcZ - playerZ;
distance = sqrtf(SQ(dx) + SQ(dz));
if (distance >= (playerColRadius + colRadius) * 0.8) {
continue;
}
if (npcY + colHeight < playerY) {
continue;
}
if (playerY + playerJumpColHeight < npcY) {
continue;
}
testX = npcX;
testY = npcY;
testZ = npcZ;
if (npc_test_move_taller_with_slipping(COLLISION_CHANNEL_10000, &testX, &testY, &testZ, distance, atan2(npcX, npcZ, playerX, playerZ), colHeight, colRadius * 2.0f)) {
testX = playerX;
testY = playerY;
testZ = playerZ;
if (npc_test_move_taller_with_slipping(COLLISION_CHANNEL_10000, &testX, &testY, &testZ, distance, atan2(playerX, playerZ, npcX, npcZ), colHeight, colRadius * 2.0f)) {
continue;
}
}
triggeredBattle = FALSE;
if (is_ability_active(ABILITY_SPIN_ATTACK) && gPlayerData.level >= enemy->npcSettings->level) {
triggeredBattle = !currentEncounter->scriptedBattle;
}
if (is_ability_active(ABILITY_DIZZY_ATTACK)) {
triggeredBattle = TRUE;
}
if ((playerStatus->animFlags & PA_FLAG_SPINNING) && !(enemy->flags & ENEMY_FLAG_IGNORE_SPIN) && triggeredBattle) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_MODE_0, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z);
testX = playerStatus->position.x + ((npc->pos.x - playerStatus->position.x) * 0.5f);
testY = playerStatus->position.y + (((npc->pos.y + npc->collisionHeight) - (playerStatus->position.y + playerStatus->colliderHeight)) * 0.5f);
testZ = playerStatus->position.z + ((npc->pos.z - playerStatus->position.z) * 0.5f);
fx_damage_stars(3, testX, testY, testZ, 0.0f, -1.0f, 0.0f, 3);
currentEncounter->hitType = ENCOUNTER_TRIGGER_SPIN;
playerStatus->animFlags |= PA_FLAG_DIZZY_ATTACK_ENCOUNTER;
enemy->encountered = ENCOUNTER_TRIGGER_SPIN;
currentEncounter->currentEncounter = encounter;
currentEncounter->currentEnemy = enemy;
currentEncounter->firstStrikeType = FIRST_STRIKE_NONE;
} else {
currentEncounter->hitType = ENCOUNTER_TRIGGER_NONE;
playerStatus->animFlags &= ~PA_FLAG_DIZZY_ATTACK_ENCOUNTER;
enemy->encountered = ENCOUNTER_TRIGGER_NONE;
currentEncounter->currentEncounter = encounter;
currentEncounter->currentEnemy = enemy;
testX = playerStatus->position.x + ((npc->pos.x - playerStatus->position.x) * 0.5f);
testY = playerStatus->position.y + (((npc->pos.y + npc->collisionHeight) - (playerStatus->position.y + playerStatus->colliderHeight)) * 0.5f);
testZ = playerStatus->position.z + ((npc->pos.z - playerStatus->position.z) * 0.5f);
fx_damage_stars(3, testX, testY, testZ, 0.0f, -1.0f, 0.0f, 3);
// if the hitbox is active, trigger a first strike
firstStrikeType = FIRST_STRIKE_NONE;
if (enemy->hitboxIsActive) {
if (is_ability_active(ABILITY_CHILL_OUT)) {
firstStrikeType = FIRST_STRIKE_NONE;
} else {
firstStrikeType = FIRST_STRIKE_ENEMY;
}
}
// cancel the first strike if bump attack is applicable
if ((is_ability_active(ABILITY_BUMP_ATTACK)
&& (gPlayerData.level >= enemy->npcSettings->level)
&& !(enemy->flags & ENEMY_FLAG_PROJECTILE))
&& !currentEncounter->scriptedBattle
) {
firstStrikeType = FIRST_STRIKE_NONE;
}
currentEncounter->firstStrikeType = firstStrikeType;
}
goto START_BATTLE;
}
}
START_BATTLE:
switch (currentEncounter->hitType) {
case 0:
break;
case ENCOUNTER_TRIGGER_NONE:
currentEnemy = enemy = currentEncounter->currentEnemy;
if (enemy->aiScript != NULL) {
suspend_all_script(enemy->aiScriptID);
}
if (enemy->auxScript != NULL) {
suspend_all_script(enemy->auxScriptID);
}
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if ((enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->flags & ENEMY_FLAG_DISABLE_AI) {
continue;
}
if ((currentEnemy->flags & ENEMY_FLAG_PROJECTILE) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->hitBytecode != NULL) {
enemy->encountered = ENCOUNTER_TRIGGER_NONE;
script = start_script(enemy->hitBytecode, EVT_PRIORITY_A, 0);
enemy->hitScript = script;
enemy->hitScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
}
}
disable_player_input();
partner_disable_input();
if (playerStatus->actionState != ACTION_STATE_TORNADO_JUMP &&
playerStatus->actionState != ACTION_STATE_TORNADO_POUND &&
playerStatus->actionState != ACTION_STATE_SPIN_JUMP &&
playerStatus->actionState != ACTION_STATE_SPIN_POUND) {
playerStatus->flags |= PS_FLAG_ENTERING_BATTLE;
}
if (!is_ability_active(ABILITY_CHILL_OUT) && currentEncounter->firstStrikeType == FIRST_STRIKE_ENEMY) {
set_action_state(ACTION_STATE_ENEMY_FIRST_STRIKE);
npc = get_npc_unsafe(enemy->npcID);
sfx_play_sound_at_position(SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_MODE_0, npc->pos.x, npc->pos.y, npc->pos.z);
}
currentEncounter->scriptedBattle = FALSE;
gEncounterState = ENCOUNTER_STATE_PRE_BATTLE;
currentEncounter->fadeOutAmount = 0;
currentEncounter->unk_94 = 0;
D_8009A678 = 1;
gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT;
break;
case ENCOUNTER_TRIGGER_SPIN:
currentEnemy = enemy = currentEncounter->currentEnemy;
if (enemy->aiScript != NULL) {
suspend_all_script(enemy->aiScriptID);
}
if (enemy->auxScript != NULL) {
suspend_all_script(enemy->auxScriptID);
}
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if ((enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->flags & ENEMY_FLAG_DISABLE_AI) {
continue;
}
if ((currentEnemy->flags & ENEMY_FLAG_PROJECTILE) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->hitBytecode != NULL) {
enemy->encountered = ENCOUNTER_TRIGGER_SPIN;
script = start_script(enemy->hitBytecode, EVT_PRIORITY_A, 0);
enemy->hitScript = script;
enemy->hitScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
}
}
disable_player_input();
partner_disable_input();
currentEncounter->scriptedBattle = FALSE;
gEncounterState = ENCOUNTER_STATE_PRE_BATTLE;
currentEncounter->fadeOutAmount = 0;
currentEncounter->unk_94 = 0;
D_8009A678 = 1;
gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT;
playerStatus->flags |= PS_FLAG_ENTERING_BATTLE;
break;
case ENCOUNTER_TRIGGER_JUMP:
currentEnemy = enemy = currentEncounter->currentEnemy;
if (enemy->aiScript != NULL) {
suspend_all_script(enemy->aiScriptID);
}
if (enemy->auxScript != NULL) {
suspend_all_script(enemy->auxScriptID);
}
encounter = currentEncounter->currentEncounter;
cond2 = FALSE;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if ((enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->flags & ENEMY_FLAG_DISABLE_AI) {
continue;
}
if ((currentEnemy->flags & ENEMY_FLAG_PROJECTILE) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->hitBytecode != NULL) {
enemy->encountered = ENCOUNTER_TRIGGER_JUMP;
script = start_script(enemy->hitBytecode, EVT_PRIORITY_A, 0);
enemy->hitScript = script;
enemy->hitScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
npc = get_npc_unsafe(enemy->npcID);
cond2 = TRUE;
testX = playerStatus->position.x + ((npc->pos.x - playerStatus->position.x) * 0.5f);
testY = playerStatus->position.y + (((npc->pos.y + npc->collisionHeight) - (playerStatus->position.y + playerStatus->colliderHeight)) * 0.5f);
testZ = playerStatus->position.z + ((npc->pos.z - playerStatus->position.z) * 0.5f);
fx_damage_stars(3, testX, testY, testZ, 0.0f, -1.0f, 0.0f, 3);
} else if (!(enemy->flags & ENEMY_FLAG_PASSIVE)) {
npc = get_npc_unsafe(enemy->npcID);
cond2 = TRUE;
testX = playerStatus->position.x + ((npc->pos.x - playerStatus->position.x) * 0.5f);
testY = playerStatus->position.y + (((npc->pos.y + npc->collisionHeight) - (playerStatus->position.y + playerStatus->colliderHeight)) * 0.5f);
testZ = playerStatus->position.z + ((npc->pos.z - playerStatus->position.z) * 0.5f);
fx_damage_stars(3, testX, testY, testZ, 0.0f, -1.0f, 0.0f, 3);
}
}
disable_player_input();
partner_disable_input();
playerStatus->flags |= PS_FLAG_ENTERING_BATTLE;
if (cond2) {
start_bounce_a();
}
currentEncounter->fadeOutAmount = 0;
currentEncounter->unk_94 = 0;
currentEncounter->scriptedBattle = FALSE;
sfx_play_sound(0);
gEncounterState = ENCOUNTER_STATE_PRE_BATTLE;
D_8009A678 = 1;
gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT;
break;
case ENCOUNTER_TRIGGER_HAMMER:
currentEnemy = enemy = currentEncounter->currentEnemy;
if (enemy->aiScript != NULL) {
suspend_all_script(enemy->aiScriptID);
}
if (enemy->auxScript != NULL) {
suspend_all_script(enemy->auxScriptID);
}
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if ((enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->flags & ENEMY_FLAG_DISABLE_AI) {
continue;
}
if ((currentEnemy->flags & ENEMY_FLAG_PROJECTILE) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->hitBytecode != NULL) {
enemy->encountered = ENCOUNTER_TRIGGER_HAMMER;
script = start_script(enemy->hitBytecode, EVT_PRIORITY_A, 0);
enemy->hitScript = script;
enemy->hitScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
npc = get_npc_unsafe(enemy->npcID);
testX = playerStatus->position.x + ((npc->pos.x - playerStatus->position.x) * 0.5f);
testY = playerStatus->position.y + (((npc->pos.y + npc->collisionHeight) - (playerStatus->position.y + playerStatus->colliderHeight)) * 0.5f);
testZ = playerStatus->position.z + ((npc->pos.z - playerStatus->position.z) * 0.5f);
fx_damage_stars(3, testX, testY, testZ, 0.0f, -1.0f, 0.0f, 3);
} else if (!(enemy->flags & ENEMY_FLAG_PASSIVE)) {
npc = get_npc_unsafe(enemy->npcID);
testX = playerStatus->position.x + ((npc->pos.x - playerStatus->position.x) * 0.5f);
testY = playerStatus->position.y + (((npc->pos.y + npc->collisionHeight) - (playerStatus->position.y + playerStatus->colliderHeight)) * 0.5f);
testZ = playerStatus->position.z + ((npc->pos.z - playerStatus->position.z) * 0.5f);
fx_damage_stars(3, npc->pos.x, npc->pos.y + npc->collisionHeight, npc->pos.z, 0.0f, -1.0f, 0.0f, 3);
}
}
disable_player_input();
partner_disable_input();
currentEncounter->fadeOutAmount = 0;
currentEncounter->unk_94 = 0;
currentEncounter->scriptedBattle = FALSE;
playerStatus->flags |= PS_FLAG_ENTERING_BATTLE;
sfx_play_sound(0);
gEncounterState = ENCOUNTER_STATE_PRE_BATTLE;
D_8009A678 = 1;
gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT;
break;
case ENCOUNTER_TRIGGER_CONVERSATION:
suspend_all_group(EVT_GROUP_01);
enemy = currentEncounter->currentEnemy;
if (enemy != NULL && enemy->aiScript != NULL) {
suspend_all_script(enemy->aiScriptID);
}
enemy = currentEncounter->currentEnemy;
if (enemy->interactBytecode != NULL) {
enemy->encountered = ENCOUNTER_TRIGGER_CONVERSATION;
script = start_script(enemy->interactBytecode, EVT_PRIORITY_A, 0);
enemy->interactScript = script;
enemy->interactScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
}
disable_player_input();
partner_disable_input();
set_action_state(ACTION_STATE_TALK);
currentEncounter->fadeOutAmount = 0;
currentEncounter->unk_94 = 0;
func_800EF3D4(1);
gEncounterState = ENCOUNTER_STATE_CONVERSATION;
D_8009A678 = 1;
gEncounterSubState = ENCOUNTER_SUBSTATE_CONVERSATION_INIT;
break;
case ENCOUNTER_TRIGGER_PARTNER:
currentEnemy = enemy = currentEncounter->currentEnemy;
if (enemy->aiScript != NULL) {
suspend_all_script(enemy->aiScriptID);
}
if (enemy->auxScript != NULL) {
suspend_all_script(enemy->auxScriptID);
}
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if ((enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->flags & ENEMY_FLAG_DISABLE_AI) {
continue;
}
if ((currentEnemy->flags & ENEMY_FLAG_PROJECTILE) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->hitBytecode != NULL) {
enemy->encountered = ENCOUNTER_TRIGGER_PARTNER;
script = start_script(enemy->hitBytecode, EVT_PRIORITY_A, 0);
enemy->hitScript = script;
enemy->hitScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
npc = get_npc_unsafe(enemy->npcID);
testX = npc->pos.x;
testY = npc->pos.y + npc->collisionHeight;
testZ = npc->pos.z;
fx_damage_stars(3, testX, testY, testZ, 0.0f, -1.0f, 0.0f, 3);
} else if (!(enemy->flags & ENEMY_FLAG_PASSIVE)) {
npc = get_npc_unsafe(enemy->npcID);
testX = npc->pos.x;
testY = npc->pos.y + npc->collisionHeight;
testZ = npc->pos.z;
fx_damage_stars(3, testX, testY, testZ, 0.0f, -1.0f, 0.0f, 3);
}
}
disable_player_input();
partner_disable_input();
currentEncounter->fadeOutAmount = 0;
currentEncounter->unk_94 = 0;
currentEncounter->scriptedBattle = FALSE;
playerStatus->flags |= PS_FLAG_ENTERING_BATTLE;
sfx_play_sound(0);
gEncounterState = ENCOUNTER_STATE_PRE_BATTLE;
D_8009A678 = 1;
gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT;
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel appendGfx_model
/* A9790 80113090 27BDFF88 */ addiu $sp, $sp, -0x78
/* A9794 80113094 AFB60068 */ sw $s6, 0x68($sp)
/* A9798 80113098 0080B02D */ daddu $s6, $a0, $zero
/* A979C 8011309C AFB7006C */ sw $s7, 0x6C($sp)
/* A97A0 801130A0 24170001 */ addiu $s7, $zero, 0x1
/* A97A4 801130A4 240D0002 */ addiu $t5, $zero, 0x2
/* A97A8 801130A8 AFBF0074 */ sw $ra, 0x74($sp)
/* A97AC 801130AC AFBE0070 */ sw $fp, 0x70($sp)
/* A97B0 801130B0 AFB50064 */ sw $s5, 0x64($sp)
/* A97B4 801130B4 AFB40060 */ sw $s4, 0x60($sp)
/* A97B8 801130B8 AFB3005C */ sw $s3, 0x5C($sp)
/* A97BC 801130BC AFB20058 */ sw $s2, 0x58($sp)
/* A97C0 801130C0 AFB10054 */ sw $s1, 0x54($sp)
/* A97C4 801130C4 AFB00050 */ sw $s0, 0x50($sp)
/* A97C8 801130C8 AFAD0038 */ sw $t5, 0x38($sp)
/* A97CC 801130CC 96D80000 */ lhu $t8, 0x0($s6)
/* A97D0 801130D0 92C200A8 */ lbu $v0, 0xA8($s6)
/* A97D4 801130D4 8ECF0008 */ lw $t7, 0x8($s6)
/* A97D8 801130D8 3C10800A */ lui $s0, %hi(gMainGfxPos)
/* A97DC 801130DC 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos)
/* A97E0 801130E0 10400010 */ beqz $v0, .L80113124
/* A97E4 801130E4 AFAF0028 */ sw $t7, 0x28($sp)
/* A97E8 801130E8 92C300A8 */ lbu $v1, 0xA8($s6)
/* A97EC 801130EC 82C200A9 */ lb $v0, 0xA9($s6)
/* A97F0 801130F0 3C048016 */ lui $a0, %hi(mdl_textureHandles)
/* A97F4 801130F4 2484A590 */ addiu $a0, $a0, %lo(mdl_textureHandles)
/* A97F8 801130F8 00621821 */ addu $v1, $v1, $v0
/* A97FC 801130FC 00031100 */ sll $v0, $v1, 4
/* A9800 80113100 00431021 */ addu $v0, $v0, $v1
/* A9804 80113104 01A21004 */ sllv $v0, $v0, $t5
/* A9808 80113108 00448821 */ addu $s1, $v0, $a0
/* A980C 8011310C 8E220000 */ lw $v0, 0x0($s1)
/* A9810 80113110 10400005 */ beqz $v0, .L80113128
/* A9814 80113114 26320004 */ addiu $s2, $s1, 0x4
/* A9818 80113118 923E002D */ lbu $fp, 0x2D($s1)
/* A981C 8011311C 08044C4C */ j .L80113130
/* A9820 80113120 AFA00044 */ sw $zero, 0x44($sp)
.L80113124:
/* A9824 80113124 0000882D */ daddu $s1, $zero, $zero
.L80113128:
/* A9828 80113128 0000902D */ daddu $s2, $zero, $zero
/* A982C 8011312C AFA00044 */ sw $zero, 0x44($sp)
.L80113130:
/* A9830 80113130 92D400A6 */ lbu $s4, 0xA6($s6)
/* A9834 80113134 12400006 */ beqz $s2, .L80113150
/* A9838 80113138 24130001 */ addiu $s3, $zero, 0x1
/* A983C 8011313C 13C00004 */ beqz $fp, .L80113150
/* A9840 80113140 2FC20004 */ sltiu $v0, $fp, 0x4
/* A9844 80113144 10400002 */ beqz $v0, .L80113150
/* A9848 80113148 00000000 */ nop
/* A984C 8011314C 24130002 */ addiu $s3, $zero, 0x2
.L80113150:
/* A9850 80113150 16400005 */ bnez $s2, .L80113168
/* A9854 80113154 00141600 */ sll $v0, $s4, 24
/* A9858 80113158 00021603 */ sra $v0, $v0, 24
/* A985C 8011315C 28420011 */ slti $v0, $v0, 0x11
/* A9860 80113160 1040000B */ beqz $v0, .L80113190
/* A9864 80113164 00000000 */ nop
.L80113168:
/* A9868 80113168 3C028015 */ lui $v0, %hi(gCurrentFogSettings)
/* A986C 8011316C 8C423264 */ lw $v0, %lo(gCurrentFogSettings)($v0)
/* A9870 80113170 8C420000 */ lw $v0, 0x0($v0)
/* A9874 80113174 10400006 */ beqz $v0, .L80113190
/* A9878 80113178 33020040 */ andi $v0, $t8, 0x40
/* A987C 8011317C 14400004 */ bnez $v0, .L80113190
/* A9880 80113180 00000000 */ nop
/* A9884 80113184 24130003 */ addiu $s3, $zero, 0x3
/* A9888 80113188 24150001 */ addiu $s5, $zero, 0x1
/* A988C 8011318C AFB50044 */ sw $s5, 0x44($sp)
.L80113190:
/* A9890 80113190 92C200A5 */ lbu $v0, 0xA5($s6)
/* A9894 80113194 00021902 */ srl $v1, $v0, 4
/* A9898 80113198 24020002 */ addiu $v0, $zero, 0x2
/* A989C 8011319C 1062000F */ beq $v1, $v0, .L801131DC
/* A98A0 801131A0 2C620003 */ sltiu $v0, $v1, 0x3
/* A98A4 801131A4 10400005 */ beqz $v0, .L801131BC
/* A98A8 801131A8 24020001 */ addiu $v0, $zero, 0x1
/* A98AC 801131AC 50620008 */ beql $v1, $v0, .L801131D0
/* A98B0 801131B0 26730003 */ addiu $s3, $s3, 0x3
/* A98B4 801131B4 08044CF5 */ j .L801133D4
/* A98B8 801131B8 00000000 */ nop
.L801131BC:
/* A98BC 801131BC 24020003 */ addiu $v0, $zero, 0x3
/* A98C0 801131C0 5062005C */ beql $v1, $v0, .L80113334
/* A98C4 801131C4 24130002 */ addiu $s3, $zero, 0x2
/* A98C8 801131C8 08044CF5 */ j .L801133D4
/* A98CC 801131CC 00000000 */ nop
.L801131D0:
/* A98D0 801131D0 24190002 */ addiu $t9, $zero, 0x2
/* A98D4 801131D4 08044CF5 */ j .L801133D4
/* A98D8 801131D8 AFB90044 */ sw $t9, 0x44($sp)
.L801131DC:
/* A98DC 801131DC 00141600 */ sll $v0, $s4, 24
/* A98E0 801131E0 00021603 */ sra $v0, $v0, 24
/* A98E4 801131E4 28420011 */ slti $v0, $v0, 0x11
/* A98E8 801131E8 1040007A */ beqz $v0, .L801133D4
/* A98EC 801131EC 3C070001 */ lui $a3, (0x1F400 >> 16)
/* A98F0 801131F0 3C038015 */ lui $v1, %hi(mdl_renderModelFogEnd)
/* A98F4 801131F4 8C63B75C */ lw $v1, %lo(mdl_renderModelFogEnd)($v1)
/* A98F8 801131F8 3C048015 */ lui $a0, %hi(mdl_renderModelFogStart)
/* A98FC 801131FC 8C84B758 */ lw $a0, %lo(mdl_renderModelFogStart)($a0)
/* A9900 80113200 34E7F400 */ ori $a3, $a3, (0x1F400 & 0xFFFF)
/* A9904 80113204 00641823 */ subu $v1, $v1, $a0
/* A9908 80113208 14600002 */ bnez $v1, .L80113214
/* A990C 8011320C 00E3001A */ div $zero, $a3, $v1
/* A9910 80113210 0007000D */ break 7
.L80113214:
/* A9914 80113214 2401FFFF */ addiu $at, $zero, -0x1
/* A9918 80113218 14610004 */ bne $v1, $at, .L8011322C
/* A991C 8011321C 3C018000 */ lui $at, (0x80000000 >> 16)
/* A9920 80113220 14E10002 */ bne $a3, $at, .L8011322C
/* A9924 80113224 00000000 */ nop
/* A9928 80113228 0006000D */ break 6
.L8011322C:
/* A992C 8011322C 00003812 */ mflo $a3
/* A9930 80113230 26730009 */ addiu $s3, $s3, 0x9
/* A9934 80113234 240D0003 */ addiu $t5, $zero, 0x3
/* A9938 80113238 240501F4 */ addiu $a1, $zero, 0x1F4
/* A993C 8011323C 00A42823 */ subu $a1, $a1, $a0
/* A9940 80113240 00052A00 */ sll $a1, $a1, 8
/* A9944 80113244 8E020000 */ lw $v0, 0x0($s0)
/* A9948 80113248 14600002 */ bnez $v1, .L80113254
/* A994C 8011324C 00A3001A */ div $zero, $a1, $v1
/* A9950 80113250 0007000D */ break 7
.L80113254:
/* A9954 80113254 2401FFFF */ addiu $at, $zero, -0x1
/* A9958 80113258 14610004 */ bne $v1, $at, .L8011326C
/* A995C 8011325C 3C018000 */ lui $at, (0x80000000 >> 16)
/* A9960 80113260 14A10002 */ bne $a1, $at, .L8011326C
/* A9964 80113264 00000000 */ nop
/* A9968 80113268 0006000D */ break 6
.L8011326C:
/* A996C 8011326C 00002812 */ mflo $a1
/* A9970 80113270 AFAD0044 */ sw $t5, 0x44($sp)
/* A9974 80113274 0040402D */ daddu $t0, $v0, $zero
/* A9978 80113278 24420008 */ addiu $v0, $v0, 0x8
/* A997C 8011327C AE020000 */ sw $v0, 0x0($s0)
/* A9980 80113280 0040302D */ daddu $a2, $v0, $zero
/* A9984 80113284 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* A9988 80113288 AD020000 */ sw $v0, 0x0($t0)
/* A998C 8011328C 3C028015 */ lui $v0, %hi(mdl_renderModelFogPrimColorR)
/* A9990 80113290 9042B750 */ lbu $v0, %lo(mdl_renderModelFogPrimColorR)($v0)
/* A9994 80113294 3C038015 */ lui $v1, %hi(mdl_renderModelFogPrimColorG)
/* A9998 80113298 9063B751 */ lbu $v1, %lo(mdl_renderModelFogPrimColorG)($v1)
/* A999C 8011329C 3C048015 */ lui $a0, %hi(mdl_renderModelFogPrimColorB)
/* A99A0 801132A0 9084B752 */ lbu $a0, %lo(mdl_renderModelFogPrimColorB)($a0)
/* A99A4 801132A4 00021600 */ sll $v0, $v0, 24
/* A99A8 801132A8 00031C00 */ sll $v1, $v1, 16
/* A99AC 801132AC 00431025 */ or $v0, $v0, $v1
/* A99B0 801132B0 00042200 */ sll $a0, $a0, 8
/* A99B4 801132B4 3C038015 */ lui $v1, %hi(mdl_renderModelFogPrimColorA)
/* A99B8 801132B8 9063B753 */ lbu $v1, %lo(mdl_renderModelFogPrimColorA)($v1)
/* A99BC 801132BC 00441025 */ or $v0, $v0, $a0
/* A99C0 801132C0 00431025 */ or $v0, $v0, $v1
/* A99C4 801132C4 AD020004 */ sw $v0, 0x4($t0)
/* A99C8 801132C8 00C0402D */ daddu $t0, $a2, $zero
/* A99CC 801132CC 24C60008 */ addiu $a2, $a2, 0x8
/* A99D0 801132D0 3C02F800 */ lui $v0, (0xF8000000 >> 16)
/* A99D4 801132D4 AE060000 */ sw $a2, 0x0($s0)
/* A99D8 801132D8 AD020000 */ sw $v0, 0x0($t0)
/* A99DC 801132DC 3C028015 */ lui $v0, %hi(mdl_renderModelFogColorR)
/* A99E0 801132E0 9042B754 */ lbu $v0, %lo(mdl_renderModelFogColorR)($v0)
/* A99E4 801132E4 3C048015 */ lui $a0, %hi(mdl_renderModelFogColorG)
/* A99E8 801132E8 9084B755 */ lbu $a0, %lo(mdl_renderModelFogColorG)($a0)
/* A99EC 801132EC 3C038015 */ lui $v1, %hi(mdl_renderModelFogColorB)
/* A99F0 801132F0 9063B756 */ lbu $v1, %lo(mdl_renderModelFogColorB)($v1)
/* A99F4 801132F4 00021600 */ sll $v0, $v0, 24
/* A99F8 801132F8 00042400 */ sll $a0, $a0, 16
/* A99FC 801132FC 00441025 */ or $v0, $v0, $a0
/* A9A00 80113300 00031A00 */ sll $v1, $v1, 8
/* A9A04 80113304 00431025 */ or $v0, $v0, $v1
/* A9A08 80113308 00C0182D */ daddu $v1, $a2, $zero
/* A9A0C 8011330C 24C60008 */ addiu $a2, $a2, 0x8
/* A9A10 80113310 AD020004 */ sw $v0, 0x4($t0)
/* A9A14 80113314 3C02DB08 */ lui $v0, (0xDB080000 >> 16)
/* A9A18 80113318 AE060000 */ sw $a2, 0x0($s0)
/* A9A1C 8011331C AC620000 */ sw $v0, 0x0($v1)
/* A9A20 80113320 00073C00 */ sll $a3, $a3, 16
/* A9A24 80113324 30A5FFFF */ andi $a1, $a1, 0xFFFF
/* A9A28 80113328 00E53825 */ or $a3, $a3, $a1
/* A9A2C 8011332C 08044CF5 */ j .L801133D4
/* A9A30 80113330 AC670004 */ sw $a3, 0x4($v1)
.L80113334:
/* A9A34 80113334 8E020000 */ lw $v0, 0x0($s0)
/* A9A38 80113338 240D0004 */ addiu $t5, $zero, 0x4
/* A9A3C 8011333C AFAD0044 */ sw $t5, 0x44($sp)
/* A9A40 80113340 0040302D */ daddu $a2, $v0, $zero
/* A9A44 80113344 24420008 */ addiu $v0, $v0, 0x8
/* A9A48 80113348 AE020000 */ sw $v0, 0x0($s0)
/* A9A4C 8011334C 0040282D */ daddu $a1, $v0, $zero
/* A9A50 80113350 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* A9A54 80113354 ACC20000 */ sw $v0, 0x0($a2)
/* A9A58 80113358 3C028015 */ lui $v0, %hi(gRenderModelPrimR)
/* A9A5C 8011335C 9042B760 */ lbu $v0, %lo(gRenderModelPrimR)($v0)
/* A9A60 80113360 3C048015 */ lui $a0, %hi(gRenderModelPrimG)
/* A9A64 80113364 9084B761 */ lbu $a0, %lo(gRenderModelPrimG)($a0)
/* A9A68 80113368 3C038015 */ lui $v1, %hi(gRenderModelPrimB)
/* A9A6C 8011336C 9063B762 */ lbu $v1, %lo(gRenderModelPrimB)($v1)
/* A9A70 80113370 00021600 */ sll $v0, $v0, 24
/* A9A74 80113374 00042400 */ sll $a0, $a0, 16
/* A9A78 80113378 00441025 */ or $v0, $v0, $a0
/* A9A7C 8011337C 00031A00 */ sll $v1, $v1, 8
/* A9A80 80113380 00431025 */ or $v0, $v0, $v1
/* A9A84 80113384 344200FF */ ori $v0, $v0, 0xFF
/* A9A88 80113388 ACC20004 */ sw $v0, 0x4($a2)
/* A9A8C 8011338C 00A0302D */ daddu $a2, $a1, $zero
/* A9A90 80113390 24A50008 */ addiu $a1, $a1, 0x8
/* A9A94 80113394 3C02FB00 */ lui $v0, (0xFB000000 >> 16)
/* A9A98 80113398 AE050000 */ sw $a1, 0x0($s0)
/* A9A9C 8011339C ACC20000 */ sw $v0, 0x0($a2)
/* A9AA0 801133A0 3C028015 */ lui $v0, %hi(gRenderModelEnvR)
/* A9AA4 801133A4 9042B763 */ lbu $v0, %lo(gRenderModelEnvR)($v0)
/* A9AA8 801133A8 3C048015 */ lui $a0, %hi(gRenderModelEnvG)
/* A9AAC 801133AC 9084B764 */ lbu $a0, %lo(gRenderModelEnvG)($a0)
/* A9AB0 801133B0 3C038015 */ lui $v1, %hi(gRenderModelEnvB)
/* A9AB4 801133B4 9063B765 */ lbu $v1, %lo(gRenderModelEnvB)($v1)
/* A9AB8 801133B8 00021600 */ sll $v0, $v0, 24
/* A9ABC 801133BC 00042400 */ sll $a0, $a0, 16
/* A9AC0 801133C0 00441025 */ or $v0, $v0, $a0
/* A9AC4 801133C4 00031A00 */ sll $v1, $v1, 8
/* A9AC8 801133C8 00431025 */ or $v0, $v0, $v1
/* A9ACC 801133CC 344200FF */ ori $v0, $v0, 0xFF
/* A9AD0 801133D0 ACC20004 */ sw $v0, 0x4($a2)
.L801133D4:
/* A9AD4 801133D4 8E020000 */ lw $v0, 0x0($s0)
/* A9AD8 801133D8 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* A9ADC 801133DC 0040202D */ daddu $a0, $v0, $zero
/* A9AE0 801133E0 AC830000 */ sw $v1, 0x0($a0)
/* A9AE4 801133E4 AC800004 */ sw $zero, 0x4($a0)
/* A9AE8 801133E8 8EC3000C */ lw $v1, 0xC($s6)
/* A9AEC 801133EC 24420008 */ addiu $v0, $v0, 0x8
/* A9AF0 801133F0 10600175 */ beqz $v1, .L801139C8
/* A9AF4 801133F4 AE020000 */ sw $v0, 0x0($s0)
/* A9AF8 801133F8 8C6E0004 */ lw $t6, 0x4($v1)
/* A9AFC 801133FC 11C00172 */ beqz $t6, .L801139C8
/* A9B00 80113400 00000000 */ nop
/* A9B04 80113404 8C630008 */ lw $v1, 0x8($v1)
/* A9B08 80113408 2C620008 */ sltiu $v0, $v1, 0x8
/* A9B0C 8011340C 1040016E */ beqz $v0, .L801139C8
/* A9B10 80113410 00031080 */ sll $v0, $v1, 2
/* A9B14 80113414 3C018015 */ lui $at, %hi(jtbl_8014F990)
/* A9B18 80113418 00220821 */ addu $at, $at, $v0
/* A9B1C 8011341C 8C22F990 */ lw $v0, %lo(jtbl_8014F990)($at)
/* A9B20 80113420 00400008 */ jr $v0
/* A9B24 80113424 00000000 */ nop
glabel .L80113428
/* A9B28 80113428 3C06DC08 */ lui $a2, (0xDC08060A >> 16)
/* A9B2C 8011342C 34C6060A */ ori $a2, $a2, (0xDC08060A & 0xFFFF)
/* A9B30 80113430 3C07DC08 */ lui $a3, (0xDC08090A >> 16)
/* A9B34 80113434 34E7090A */ ori $a3, $a3, (0xDC08090A & 0xFFFF)
/* A9B38 80113438 8E020000 */ lw $v0, 0x0($s0)
/* A9B3C 8011343C 3C03DB02 */ lui $v1, (0xDB020000 >> 16)
/* A9B40 80113440 0040282D */ daddu $a1, $v0, $zero
/* A9B44 80113444 24420008 */ addiu $v0, $v0, 0x8
/* A9B48 80113448 0040202D */ daddu $a0, $v0, $zero
/* A9B4C 8011344C AE020000 */ sw $v0, 0x0($s0)
/* A9B50 80113450 24420008 */ addiu $v0, $v0, 0x8
/* A9B54 80113454 ACA30000 */ sw $v1, 0x0($a1)
/* A9B58 80113458 AE020000 */ sw $v0, 0x0($s0)
/* A9B5C 8011345C 0040182D */ daddu $v1, $v0, $zero
/* A9B60 80113460 24020018 */ addiu $v0, $zero, 0x18
/* A9B64 80113464 ACA20004 */ sw $v0, 0x4($a1)
/* A9B68 80113468 25C20008 */ addiu $v0, $t6, 0x8
/* A9B6C 8011346C AC820004 */ sw $v0, 0x4($a0)
/* A9B70 80113470 0060102D */ daddu $v0, $v1, $zero
/* A9B74 80113474 24630008 */ addiu $v1, $v1, 0x8
/* A9B78 80113478 AC860000 */ sw $a2, 0x0($a0)
/* A9B7C 8011347C AE030000 */ sw $v1, 0x0($s0)
/* A9B80 80113480 08044E71 */ j .L801139C4
/* A9B84 80113484 AC470000 */ sw $a3, 0x0($v0)
glabel .L80113488
/* A9B88 80113488 3C06DC08 */ lui $a2, (0xDC08060A >> 16)
/* A9B8C 8011348C 34C6060A */ ori $a2, $a2, (0xDC08060A & 0xFFFF)
/* A9B90 80113490 3C07DC08 */ lui $a3, (0xDC08090A >> 16)
/* A9B94 80113494 34E7090A */ ori $a3, $a3, (0xDC08090A & 0xFFFF)
/* A9B98 80113498 8E020000 */ lw $v0, 0x0($s0)
/* A9B9C 8011349C 3C03DB02 */ lui $v1, (0xDB020000 >> 16)
/* A9BA0 801134A0 0040282D */ daddu $a1, $v0, $zero
/* A9BA4 801134A4 24420008 */ addiu $v0, $v0, 0x8
/* A9BA8 801134A8 0040202D */ daddu $a0, $v0, $zero
/* A9BAC 801134AC AE020000 */ sw $v0, 0x0($s0)
/* A9BB0 801134B0 24420008 */ addiu $v0, $v0, 0x8
/* A9BB4 801134B4 ACA30000 */ sw $v1, 0x0($a1)
/* A9BB8 801134B8 AE020000 */ sw $v0, 0x0($s0)
/* A9BBC 801134BC 0040182D */ daddu $v1, $v0, $zero
/* A9BC0 801134C0 24020018 */ addiu $v0, $zero, 0x18
/* A9BC4 801134C4 ACA20004 */ sw $v0, 0x4($a1)
/* A9BC8 801134C8 25C20008 */ addiu $v0, $t6, 0x8
/* A9BCC 801134CC AC820004 */ sw $v0, 0x4($a0)
/* A9BD0 801134D0 0060102D */ daddu $v0, $v1, $zero
/* A9BD4 801134D4 24630008 */ addiu $v1, $v1, 0x8
/* A9BD8 801134D8 AC860000 */ sw $a2, 0x0($a0)
/* A9BDC 801134DC AE030000 */ sw $v1, 0x0($s0)
/* A9BE0 801134E0 08044E71 */ j .L801139C4
/* A9BE4 801134E4 AC470000 */ sw $a3, 0x0($v0)
glabel .L801134E8
/* A9BE8 801134E8 3C06DC08 */ lui $a2, (0xDC08060A >> 16)
/* A9BEC 801134EC 34C6060A */ ori $a2, $a2, (0xDC08060A & 0xFFFF)
/* A9BF0 801134F0 3C07DC08 */ lui $a3, (0xDC08090A >> 16)
/* A9BF4 801134F4 34E7090A */ ori $a3, $a3, (0xDC08090A & 0xFFFF)
/* A9BF8 801134F8 3C08DC08 */ lui $t0, (0xDC080C0A >> 16)
/* A9BFC 801134FC 35080C0A */ ori $t0, $t0, (0xDC080C0A & 0xFFFF)
/* A9C00 80113500 8E020000 */ lw $v0, 0x0($s0)
/* A9C04 80113504 3C03DB02 */ lui $v1, (0xDB020000 >> 16)
/* A9C08 80113508 0040202D */ daddu $a0, $v0, $zero
/* A9C0C 8011350C 24420008 */ addiu $v0, $v0, 0x8
/* A9C10 80113510 0040282D */ daddu $a1, $v0, $zero
/* A9C14 80113514 AE020000 */ sw $v0, 0x0($s0)
/* A9C18 80113518 24420008 */ addiu $v0, $v0, 0x8
/* A9C1C 8011351C AC830000 */ sw $v1, 0x0($a0)
/* A9C20 80113520 AE020000 */ sw $v0, 0x0($s0)
/* A9C24 80113524 0040182D */ daddu $v1, $v0, $zero
/* A9C28 80113528 24020030 */ addiu $v0, $zero, 0x30
/* A9C2C 8011352C AC820004 */ sw $v0, 0x4($a0)
/* A9C30 80113530 0060202D */ daddu $a0, $v1, $zero
/* A9C34 80113534 24630008 */ addiu $v1, $v1, 0x8
/* A9C38 80113538 25C20008 */ addiu $v0, $t6, 0x8
/* A9C3C 8011353C ACA60000 */ sw $a2, 0x0($a1)
/* A9C40 80113540 AE030000 */ sw $v1, 0x0($s0)
/* A9C44 80113544 ACA20004 */ sw $v0, 0x4($a1)
/* A9C48 80113548 25C20018 */ addiu $v0, $t6, 0x18
/* A9C4C 8011354C AC820004 */ sw $v0, 0x4($a0)
/* A9C50 80113550 0060102D */ daddu $v0, $v1, $zero
/* A9C54 80113554 24630008 */ addiu $v1, $v1, 0x8
/* A9C58 80113558 AC870000 */ sw $a3, 0x0($a0)
/* A9C5C 8011355C AE030000 */ sw $v1, 0x0($s0)
/* A9C60 80113560 08044E71 */ j .L801139C4
/* A9C64 80113564 AC480000 */ sw $t0, 0x0($v0)
glabel .L80113568
/* A9C68 80113568 3C06DC08 */ lui $a2, (0xDC08060A >> 16)
/* A9C6C 8011356C 34C6060A */ ori $a2, $a2, (0xDC08060A & 0xFFFF)
/* A9C70 80113570 3C07DC08 */ lui $a3, (0xDC08090A >> 16)
/* A9C74 80113574 34E7090A */ ori $a3, $a3, (0xDC08090A & 0xFFFF)
/* A9C78 80113578 3C08DC08 */ lui $t0, (0xDC080C0A >> 16)
/* A9C7C 8011357C 35080C0A */ ori $t0, $t0, (0xDC080C0A & 0xFFFF)
/* A9C80 80113580 3C09DC08 */ lui $t1, (0xDC080F0A >> 16)
/* A9C84 80113584 35290F0A */ ori $t1, $t1, (0xDC080F0A & 0xFFFF)
/* A9C88 80113588 8E020000 */ lw $v0, 0x0($s0)
/* A9C8C 8011358C 3C03DB02 */ lui $v1, (0xDB020000 >> 16)
/* A9C90 80113590 0040202D */ daddu $a0, $v0, $zero
/* A9C94 80113594 24420008 */ addiu $v0, $v0, 0x8
/* A9C98 80113598 0040282D */ daddu $a1, $v0, $zero
/* A9C9C 8011359C AE020000 */ sw $v0, 0x0($s0)
/* A9CA0 801135A0 24420008 */ addiu $v0, $v0, 0x8
/* A9CA4 801135A4 AC830000 */ sw $v1, 0x0($a0)
/* A9CA8 801135A8 AE020000 */ sw $v0, 0x0($s0)
/* A9CAC 801135AC 0040182D */ daddu $v1, $v0, $zero
/* A9CB0 801135B0 24020048 */ addiu $v0, $zero, 0x48
/* A9CB4 801135B4 AC820004 */ sw $v0, 0x4($a0)
/* A9CB8 801135B8 ACA60000 */ sw $a2, 0x0($a1)
/* A9CBC 801135BC 0060302D */ daddu $a2, $v1, $zero
/* A9CC0 801135C0 24630008 */ addiu $v1, $v1, 0x8
/* A9CC4 801135C4 25C20008 */ addiu $v0, $t6, 0x8
/* A9CC8 801135C8 0060202D */ daddu $a0, $v1, $zero
/* A9CCC 801135CC AE030000 */ sw $v1, 0x0($s0)
/* A9CD0 801135D0 24630008 */ addiu $v1, $v1, 0x8
/* A9CD4 801135D4 ACA20004 */ sw $v0, 0x4($a1)
/* A9CD8 801135D8 25C20018 */ addiu $v0, $t6, 0x18
/* A9CDC 801135DC ACC70000 */ sw $a3, 0x0($a2)
/* A9CE0 801135E0 AE030000 */ sw $v1, 0x0($s0)
/* A9CE4 801135E4 ACC20004 */ sw $v0, 0x4($a2)
/* A9CE8 801135E8 25C20028 */ addiu $v0, $t6, 0x28
/* A9CEC 801135EC AC820004 */ sw $v0, 0x4($a0)
/* A9CF0 801135F0 0060102D */ daddu $v0, $v1, $zero
/* A9CF4 801135F4 24630008 */ addiu $v1, $v1, 0x8
/* A9CF8 801135F8 AC880000 */ sw $t0, 0x0($a0)
/* A9CFC 801135FC AE030000 */ sw $v1, 0x0($s0)
/* A9D00 80113600 08044E71 */ j .L801139C4
/* A9D04 80113604 AC490000 */ sw $t1, 0x0($v0)
glabel .L80113608
/* A9D08 80113608 3C06DC08 */ lui $a2, (0xDC08060A >> 16)
/* A9D0C 8011360C 34C6060A */ ori $a2, $a2, (0xDC08060A & 0xFFFF)
/* A9D10 80113610 3C07DC08 */ lui $a3, (0xDC08090A >> 16)
/* A9D14 80113614 34E7090A */ ori $a3, $a3, (0xDC08090A & 0xFFFF)
/* A9D18 80113618 3C08DC08 */ lui $t0, (0xDC080C0A >> 16)
/* A9D1C 8011361C 35080C0A */ ori $t0, $t0, (0xDC080C0A & 0xFFFF)
/* A9D20 80113620 3C09DC08 */ lui $t1, (0xDC080F0A >> 16)
/* A9D24 80113624 35290F0A */ ori $t1, $t1, (0xDC080F0A & 0xFFFF)
/* A9D28 80113628 3C0ADC08 */ lui $t2, (0xDC08120A >> 16)
/* A9D2C 8011362C 354A120A */ ori $t2, $t2, (0xDC08120A & 0xFFFF)
/* A9D30 80113630 8E020000 */ lw $v0, 0x0($s0)
/* A9D34 80113634 3C03DB02 */ lui $v1, (0xDB020000 >> 16)
/* A9D38 80113638 0040202D */ daddu $a0, $v0, $zero
/* A9D3C 8011363C 24420008 */ addiu $v0, $v0, 0x8
/* A9D40 80113640 0040282D */ daddu $a1, $v0, $zero
/* A9D44 80113644 AE020000 */ sw $v0, 0x0($s0)
/* A9D48 80113648 24420008 */ addiu $v0, $v0, 0x8
/* A9D4C 8011364C AC830000 */ sw $v1, 0x0($a0)
/* A9D50 80113650 AE020000 */ sw $v0, 0x0($s0)
/* A9D54 80113654 0040182D */ daddu $v1, $v0, $zero
/* A9D58 80113658 24020060 */ addiu $v0, $zero, 0x60
/* A9D5C 8011365C AC820004 */ sw $v0, 0x4($a0)
/* A9D60 80113660 0060202D */ daddu $a0, $v1, $zero
/* A9D64 80113664 24630008 */ addiu $v1, $v1, 0x8
/* A9D68 80113668 25C20008 */ addiu $v0, $t6, 0x8
/* A9D6C 8011366C ACA60000 */ sw $a2, 0x0($a1)
/* A9D70 80113670 AE030000 */ sw $v1, 0x0($s0)
/* A9D74 80113674 ACA20004 */ sw $v0, 0x4($a1)
/* A9D78 80113678 0060282D */ daddu $a1, $v1, $zero
/* A9D7C 8011367C 24630008 */ addiu $v1, $v1, 0x8
/* A9D80 80113680 25C20018 */ addiu $v0, $t6, 0x18
/* A9D84 80113684 AC870000 */ sw $a3, 0x0($a0)
/* A9D88 80113688 AE030000 */ sw $v1, 0x0($s0)
/* A9D8C 8011368C AC820004 */ sw $v0, 0x4($a0)
/* A9D90 80113690 0060202D */ daddu $a0, $v1, $zero
/* A9D94 80113694 24630008 */ addiu $v1, $v1, 0x8
/* A9D98 80113698 25C20028 */ addiu $v0, $t6, 0x28
/* A9D9C 8011369C ACA80000 */ sw $t0, 0x0($a1)
/* A9DA0 801136A0 AE030000 */ sw $v1, 0x0($s0)
/* A9DA4 801136A4 ACA20004 */ sw $v0, 0x4($a1)
/* A9DA8 801136A8 25C20038 */ addiu $v0, $t6, 0x38
/* A9DAC 801136AC AC820004 */ sw $v0, 0x4($a0)
/* A9DB0 801136B0 0060102D */ daddu $v0, $v1, $zero
/* A9DB4 801136B4 24630008 */ addiu $v1, $v1, 0x8
/* A9DB8 801136B8 AC890000 */ sw $t1, 0x0($a0)
/* A9DBC 801136BC AE030000 */ sw $v1, 0x0($s0)
/* A9DC0 801136C0 08044E71 */ j .L801139C4
/* A9DC4 801136C4 AC4A0000 */ sw $t2, 0x0($v0)
glabel .L801136C8
/* A9DC8 801136C8 3C06DC08 */ lui $a2, (0xDC08060A >> 16)
/* A9DCC 801136CC 34C6060A */ ori $a2, $a2, (0xDC08060A & 0xFFFF)
/* A9DD0 801136D0 3C07DC08 */ lui $a3, (0xDC08090A >> 16)
/* A9DD4 801136D4 34E7090A */ ori $a3, $a3, (0xDC08090A & 0xFFFF)
/* A9DD8 801136D8 3C08DC08 */ lui $t0, (0xDC080C0A >> 16)
/* A9DDC 801136DC 35080C0A */ ori $t0, $t0, (0xDC080C0A & 0xFFFF)
/* A9DE0 801136E0 3C09DC08 */ lui $t1, (0xDC080F0A >> 16)
/* A9DE4 801136E4 35290F0A */ ori $t1, $t1, (0xDC080F0A & 0xFFFF)
/* A9DE8 801136E8 3C0ADC08 */ lui $t2, (0xDC08120A >> 16)
/* A9DEC 801136EC 354A120A */ ori $t2, $t2, (0xDC08120A & 0xFFFF)
/* A9DF0 801136F0 3C0BDC08 */ lui $t3, (0xDC08150A >> 16)
/* A9DF4 801136F4 356B150A */ ori $t3, $t3, (0xDC08150A & 0xFFFF)
/* A9DF8 801136F8 8E020000 */ lw $v0, 0x0($s0)
/* A9DFC 801136FC 3C03DB02 */ lui $v1, (0xDB020000 >> 16)
/* A9E00 80113700 0040202D */ daddu $a0, $v0, $zero
/* A9E04 80113704 24420008 */ addiu $v0, $v0, 0x8
/* A9E08 80113708 0040282D */ daddu $a1, $v0, $zero
/* A9E0C 8011370C AE020000 */ sw $v0, 0x0($s0)
/* A9E10 80113710 24420008 */ addiu $v0, $v0, 0x8
/* A9E14 80113714 AC830000 */ sw $v1, 0x0($a0)
/* A9E18 80113718 AE020000 */ sw $v0, 0x0($s0)
/* A9E1C 8011371C 0040182D */ daddu $v1, $v0, $zero
/* A9E20 80113720 24020078 */ addiu $v0, $zero, 0x78
/* A9E24 80113724 AC820004 */ sw $v0, 0x4($a0)
/* A9E28 80113728 0060202D */ daddu $a0, $v1, $zero
/* A9E2C 8011372C 24630008 */ addiu $v1, $v1, 0x8
/* A9E30 80113730 25C20008 */ addiu $v0, $t6, 0x8
/* A9E34 80113734 ACA60000 */ sw $a2, 0x0($a1)
/* A9E38 80113738 AE030000 */ sw $v1, 0x0($s0)
/* A9E3C 8011373C ACA20004 */ sw $v0, 0x4($a1)
/* A9E40 80113740 0060282D */ daddu $a1, $v1, $zero
/* A9E44 80113744 24630008 */ addiu $v1, $v1, 0x8
/* A9E48 80113748 25C20018 */ addiu $v0, $t6, 0x18
/* A9E4C 8011374C 0060302D */ daddu $a2, $v1, $zero
/* A9E50 80113750 AC870000 */ sw $a3, 0x0($a0)
/* A9E54 80113754 AE030000 */ sw $v1, 0x0($s0)
/* A9E58 80113758 24630008 */ addiu $v1, $v1, 0x8
/* A9E5C 8011375C AC820004 */ sw $v0, 0x4($a0)
/* A9E60 80113760 25C20028 */ addiu $v0, $t6, 0x28
/* A9E64 80113764 0060202D */ daddu $a0, $v1, $zero
/* A9E68 80113768 ACA80000 */ sw $t0, 0x0($a1)
/* A9E6C 8011376C AE030000 */ sw $v1, 0x0($s0)
/* A9E70 80113770 24630008 */ addiu $v1, $v1, 0x8
/* A9E74 80113774 ACA20004 */ sw $v0, 0x4($a1)
/* A9E78 80113778 25C20038 */ addiu $v0, $t6, 0x38
/* A9E7C 8011377C ACC90000 */ sw $t1, 0x0($a2)
/* A9E80 80113780 AE030000 */ sw $v1, 0x0($s0)
/* A9E84 80113784 ACC20004 */ sw $v0, 0x4($a2)
/* A9E88 80113788 25C20048 */ addiu $v0, $t6, 0x48
/* A9E8C 8011378C AC820004 */ sw $v0, 0x4($a0)
/* A9E90 80113790 0060102D */ daddu $v0, $v1, $zero
/* A9E94 80113794 24630008 */ addiu $v1, $v1, 0x8
/* A9E98 80113798 AC8A0000 */ sw $t2, 0x0($a0)
/* A9E9C 8011379C AE030000 */ sw $v1, 0x0($s0)
/* A9EA0 801137A0 08044E71 */ j .L801139C4
/* A9EA4 801137A4 AC4B0000 */ sw $t3, 0x0($v0)
glabel .L801137A8
/* A9EA8 801137A8 3C06DC08 */ lui $a2, (0xDC08060A >> 16)
/* A9EAC 801137AC 34C6060A */ ori $a2, $a2, (0xDC08060A & 0xFFFF)
/* A9EB0 801137B0 3C07DC08 */ lui $a3, (0xDC08090A >> 16)
/* A9EB4 801137B4 34E7090A */ ori $a3, $a3, (0xDC08090A & 0xFFFF)
/* A9EB8 801137B8 3C08DC08 */ lui $t0, (0xDC080C0A >> 16)
/* A9EBC 801137BC 35080C0A */ ori $t0, $t0, (0xDC080C0A & 0xFFFF)
/* A9EC0 801137C0 3C09DC08 */ lui $t1, (0xDC080F0A >> 16)
/* A9EC4 801137C4 35290F0A */ ori $t1, $t1, (0xDC080F0A & 0xFFFF)
/* A9EC8 801137C8 3C0ADC08 */ lui $t2, (0xDC08120A >> 16)
/* A9ECC 801137CC 354A120A */ ori $t2, $t2, (0xDC08120A & 0xFFFF)
/* A9ED0 801137D0 3C0BDC08 */ lui $t3, (0xDC08150A >> 16)
/* A9ED4 801137D4 356B150A */ ori $t3, $t3, (0xDC08150A & 0xFFFF)
/* A9ED8 801137D8 3C0CDC08 */ lui $t4, (0xDC08180A >> 16)
/* A9EDC 801137DC 358C180A */ ori $t4, $t4, (0xDC08180A & 0xFFFF)
/* A9EE0 801137E0 8E020000 */ lw $v0, 0x0($s0)
/* A9EE4 801137E4 3C03DB02 */ lui $v1, (0xDB020000 >> 16)
/* A9EE8 801137E8 0040202D */ daddu $a0, $v0, $zero
/* A9EEC 801137EC 24420008 */ addiu $v0, $v0, 0x8
/* A9EF0 801137F0 0040282D */ daddu $a1, $v0, $zero
/* A9EF4 801137F4 AE020000 */ sw $v0, 0x0($s0)
/* A9EF8 801137F8 24420008 */ addiu $v0, $v0, 0x8
/* A9EFC 801137FC AC830000 */ sw $v1, 0x0($a0)
/* A9F00 80113800 AE020000 */ sw $v0, 0x0($s0)
/* A9F04 80113804 0040182D */ daddu $v1, $v0, $zero
/* A9F08 80113808 24020090 */ addiu $v0, $zero, 0x90
/* A9F0C 8011380C AC820004 */ sw $v0, 0x4($a0)
/* A9F10 80113810 0060202D */ daddu $a0, $v1, $zero
/* A9F14 80113814 24630008 */ addiu $v1, $v1, 0x8
/* A9F18 80113818 25C20008 */ addiu $v0, $t6, 0x8
/* A9F1C 8011381C ACA60000 */ sw $a2, 0x0($a1)
/* A9F20 80113820 AE030000 */ sw $v1, 0x0($s0)
/* A9F24 80113824 ACA20004 */ sw $v0, 0x4($a1)
/* A9F28 80113828 0060282D */ daddu $a1, $v1, $zero
/* A9F2C 8011382C 24630008 */ addiu $v1, $v1, 0x8
/* A9F30 80113830 25C20018 */ addiu $v0, $t6, 0x18
/* A9F34 80113834 AC870000 */ sw $a3, 0x0($a0)
/* A9F38 80113838 AE030000 */ sw $v1, 0x0($s0)
/* A9F3C 8011383C AC820004 */ sw $v0, 0x4($a0)
/* A9F40 80113840 0060202D */ daddu $a0, $v1, $zero
/* A9F44 80113844 24630008 */ addiu $v1, $v1, 0x8
/* A9F48 80113848 25C20028 */ addiu $v0, $t6, 0x28
/* A9F4C 8011384C ACA80000 */ sw $t0, 0x0($a1)
/* A9F50 80113850 AE030000 */ sw $v1, 0x0($s0)
/* A9F54 80113854 ACA20004 */ sw $v0, 0x4($a1)
/* A9F58 80113858 0060282D */ daddu $a1, $v1, $zero
/* A9F5C 8011385C 24630008 */ addiu $v1, $v1, 0x8
/* A9F60 80113860 25C20038 */ addiu $v0, $t6, 0x38
/* A9F64 80113864 AC890000 */ sw $t1, 0x0($a0)
/* A9F68 80113868 AE030000 */ sw $v1, 0x0($s0)
/* A9F6C 8011386C AC820004 */ sw $v0, 0x4($a0)
/* A9F70 80113870 0060202D */ daddu $a0, $v1, $zero
/* A9F74 80113874 24630008 */ addiu $v1, $v1, 0x8
/* A9F78 80113878 25C20048 */ addiu $v0, $t6, 0x48
/* A9F7C 8011387C ACAA0000 */ sw $t2, 0x0($a1)
/* A9F80 80113880 AE030000 */ sw $v1, 0x0($s0)
/* A9F84 80113884 ACA20004 */ sw $v0, 0x4($a1)
/* A9F88 80113888 25C20058 */ addiu $v0, $t6, 0x58
/* A9F8C 8011388C AC820004 */ sw $v0, 0x4($a0)
/* A9F90 80113890 0060102D */ daddu $v0, $v1, $zero
/* A9F94 80113894 24630008 */ addiu $v1, $v1, 0x8
/* A9F98 80113898 AC8B0000 */ sw $t3, 0x0($a0)
/* A9F9C 8011389C AE030000 */ sw $v1, 0x0($s0)
/* A9FA0 801138A0 08044E71 */ j .L801139C4
/* A9FA4 801138A4 AC4C0000 */ sw $t4, 0x0($v0)
glabel .L801138A8
/* A9FA8 801138A8 3C06DC08 */ lui $a2, (0xDC08060A >> 16)
/* A9FAC 801138AC 34C6060A */ ori $a2, $a2, (0xDC08060A & 0xFFFF)
/* A9FB0 801138B0 3C07DC08 */ lui $a3, (0xDC08090A >> 16)
/* A9FB4 801138B4 34E7090A */ ori $a3, $a3, (0xDC08090A & 0xFFFF)
/* A9FB8 801138B8 3C08DC08 */ lui $t0, (0xDC080C0A >> 16)
/* A9FBC 801138BC 35080C0A */ ori $t0, $t0, (0xDC080C0A & 0xFFFF)
/* A9FC0 801138C0 3C09DC08 */ lui $t1, (0xDC080F0A >> 16)
/* A9FC4 801138C4 35290F0A */ ori $t1, $t1, (0xDC080F0A & 0xFFFF)
/* A9FC8 801138C8 3C0ADC08 */ lui $t2, (0xDC08120A >> 16)
/* A9FCC 801138CC 354A120A */ ori $t2, $t2, (0xDC08120A & 0xFFFF)
/* A9FD0 801138D0 3C0BDC08 */ lui $t3, (0xDC08150A >> 16)
/* A9FD4 801138D4 356B150A */ ori $t3, $t3, (0xDC08150A & 0xFFFF)
/* A9FD8 801138D8 3C0CDC08 */ lui $t4, (0xDC08180A >> 16)
/* A9FDC 801138DC 358C180A */ ori $t4, $t4, (0xDC08180A & 0xFFFF)
/* A9FE0 801138E0 3C0DDC08 */ lui $t5, (0xDC081B0A >> 16)
/* A9FE4 801138E4 35AD1B0A */ ori $t5, $t5, (0xDC081B0A & 0xFFFF)
/* A9FE8 801138E8 8E020000 */ lw $v0, 0x0($s0)
/* A9FEC 801138EC 3C03DB02 */ lui $v1, (0xDB020000 >> 16)
/* A9FF0 801138F0 0040202D */ daddu $a0, $v0, $zero
/* A9FF4 801138F4 24420008 */ addiu $v0, $v0, 0x8
/* A9FF8 801138F8 0040282D */ daddu $a1, $v0, $zero
/* A9FFC 801138FC AE020000 */ sw $v0, 0x0($s0)
/* AA000 80113900 24420008 */ addiu $v0, $v0, 0x8
/* AA004 80113904 AC830000 */ sw $v1, 0x0($a0)
/* AA008 80113908 AE020000 */ sw $v0, 0x0($s0)
/* AA00C 8011390C 0040182D */ daddu $v1, $v0, $zero
/* AA010 80113910 240200A8 */ addiu $v0, $zero, 0xA8
/* AA014 80113914 AC820004 */ sw $v0, 0x4($a0)
/* AA018 80113918 0060202D */ daddu $a0, $v1, $zero
/* AA01C 8011391C 24630008 */ addiu $v1, $v1, 0x8
/* AA020 80113920 25C20008 */ addiu $v0, $t6, 0x8
/* AA024 80113924 ACA60000 */ sw $a2, 0x0($a1)
/* AA028 80113928 AE030000 */ sw $v1, 0x0($s0)
/* AA02C 8011392C ACA20004 */ sw $v0, 0x4($a1)
/* AA030 80113930 0060282D */ daddu $a1, $v1, $zero
/* AA034 80113934 24630008 */ addiu $v1, $v1, 0x8
/* AA038 80113938 25C20018 */ addiu $v0, $t6, 0x18
/* AA03C 8011393C AC870000 */ sw $a3, 0x0($a0)
/* AA040 80113940 AE030000 */ sw $v1, 0x0($s0)
/* AA044 80113944 AC820004 */ sw $v0, 0x4($a0)
/* AA048 80113948 0060202D */ daddu $a0, $v1, $zero
/* AA04C 8011394C 24630008 */ addiu $v1, $v1, 0x8
/* AA050 80113950 25C20028 */ addiu $v0, $t6, 0x28
/* AA054 80113954 ACA80000 */ sw $t0, 0x0($a1)
/* AA058 80113958 AE030000 */ sw $v1, 0x0($s0)
/* AA05C 8011395C ACA20004 */ sw $v0, 0x4($a1)
/* AA060 80113960 0060282D */ daddu $a1, $v1, $zero
/* AA064 80113964 24630008 */ addiu $v1, $v1, 0x8
/* AA068 80113968 25C20038 */ addiu $v0, $t6, 0x38
/* AA06C 8011396C 0060302D */ daddu $a2, $v1, $zero
/* AA070 80113970 AC890000 */ sw $t1, 0x0($a0)
/* AA074 80113974 AE030000 */ sw $v1, 0x0($s0)
/* AA078 80113978 24630008 */ addiu $v1, $v1, 0x8
/* AA07C 8011397C AC820004 */ sw $v0, 0x4($a0)
/* AA080 80113980 25C20048 */ addiu $v0, $t6, 0x48
/* AA084 80113984 0060202D */ daddu $a0, $v1, $zero
/* AA088 80113988 ACAA0000 */ sw $t2, 0x0($a1)
/* AA08C 8011398C AE030000 */ sw $v1, 0x0($s0)
/* AA090 80113990 24630008 */ addiu $v1, $v1, 0x8
/* AA094 80113994 ACA20004 */ sw $v0, 0x4($a1)
/* AA098 80113998 25C20058 */ addiu $v0, $t6, 0x58
/* AA09C 8011399C ACCB0000 */ sw $t3, 0x0($a2)
/* AA0A0 801139A0 AE030000 */ sw $v1, 0x0($s0)
/* AA0A4 801139A4 ACC20004 */ sw $v0, 0x4($a2)
/* AA0A8 801139A8 25C20068 */ addiu $v0, $t6, 0x68
/* AA0AC 801139AC AC820004 */ sw $v0, 0x4($a0)
/* AA0B0 801139B0 0060102D */ daddu $v0, $v1, $zero
/* AA0B4 801139B4 24630008 */ addiu $v1, $v1, 0x8
/* AA0B8 801139B8 AC8C0000 */ sw $t4, 0x0($a0)
/* AA0BC 801139BC AE030000 */ sw $v1, 0x0($s0)
/* AA0C0 801139C0 AC4D0000 */ sw $t5, 0x0($v0)
.L801139C4:
/* AA0C4 801139C4 AC4E0004 */ sw $t6, 0x4($v0)
.L801139C8:
/* AA0C8 801139C8 1240002D */ beqz $s2, .L80113A80
/* AA0CC 801139CC 2FC20005 */ sltiu $v0, $fp, 0x5
/* AA0D0 801139D0 10400022 */ beqz $v0, .L80113A5C
/* AA0D4 801139D4 2FC20003 */ sltiu $v0, $fp, 0x3
/* AA0D8 801139D8 14400020 */ bnez $v0, .L80113A5C
/* AA0DC 801139DC 2405005F */ addiu $a1, $zero, 0x5F
/* AA0E0 801139E0 8FA40028 */ lw $a0, 0x28($sp)
/* AA0E4 801139E4 0C0456C3 */ jal get_model_property
/* AA0E8 801139E8 AFB80040 */ sw $t8, 0x40($sp)
/* AA0EC 801139EC 8FB80040 */ lw $t8, 0x40($sp)
/* AA0F0 801139F0 1040001A */ beqz $v0, .L80113A5C
/* AA0F4 801139F4 0240202D */ daddu $a0, $s2, $zero
/* AA0F8 801139F8 8C430008 */ lw $v1, 0x8($v0)
/* AA0FC 801139FC 94460006 */ lhu $a2, 0x6($v0)
/* AA100 80113A00 8C450004 */ lw $a1, 0x4($v0)
/* AA104 80113A04 8E22003C */ lw $v0, 0x3C($s1)
/* AA108 80113A08 AFA20010 */ sw $v0, 0x10($sp)
/* AA10C 80113A0C 00031303 */ sra $v0, $v1, 12
/* AA110 80113A10 3042000F */ andi $v0, $v0, 0xF
/* AA114 80113A14 00031C03 */ sra $v1, $v1, 16
/* AA118 80113A18 3063000F */ andi $v1, $v1, 0xF
/* AA11C 80113A1C 30C60FFF */ andi $a2, $a2, 0xFFF
/* AA120 80113A20 00052B03 */ sra $a1, $a1, 12
/* AA124 80113A24 8E270040 */ lw $a3, 0x40($s1)
/* AA128 80113A28 30A50FFF */ andi $a1, $a1, 0xFFF
/* AA12C 80113A2C AFA20018 */ sw $v0, 0x18($sp)
/* AA130 80113A30 AFA3001C */ sw $v1, 0x1C($sp)
/* AA134 80113A34 AFA60020 */ sw $a2, 0x20($sp)
/* AA138 80113A38 AFA50024 */ sw $a1, 0x24($sp)
/* AA13C 80113A3C AFA70014 */ sw $a3, 0x14($sp)
/* AA140 80113A40 8E260034 */ lw $a2, 0x34($s1)
/* AA144 80113A44 8E270038 */ lw $a3, 0x38($s1)
/* AA148 80113A48 0C04603A */ jal func_801180E8
/* AA14C 80113A4C 0200282D */ daddu $a1, $s0, $zero
/* AA150 80113A50 8FB80040 */ lw $t8, 0x40($sp)
/* AA154 80113A54 08044EBF */ j .L80113AFC
/* AA158 80113A58 00000000 */ nop
.L80113A5C:
/* AA15C 80113A5C 8E030000 */ lw $v1, 0x0($s0)
/* AA160 80113A60 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* AA164 80113A64 0060202D */ daddu $a0, $v1, $zero
/* AA168 80113A68 AC820000 */ sw $v0, 0x0($a0)
/* AA16C 80113A6C 8E220000 */ lw $v0, 0x0($s1)
/* AA170 80113A70 24630008 */ addiu $v1, $v1, 0x8
/* AA174 80113A74 AE030000 */ sw $v1, 0x0($s0)
/* AA178 80113A78 08044EBF */ j .L80113AFC
/* AA17C 80113A7C AC820004 */ sw $v0, 0x4($a0)
.L80113A80:
/* AA180 80113A80 3C0AFCFF */ lui $t2, (0xFCFFFFFF >> 16)
/* AA184 80113A84 354AFFFF */ ori $t2, $t2, (0xFCFFFFFF & 0xFFFF)
/* AA188 80113A88 3C09FFFE */ lui $t1, (0xFFFE793C >> 16)
/* AA18C 80113A8C 3529793C */ ori $t1, $t1, (0xFFFE793C & 0xFFFF)
/* AA190 80113A90 3C08E300 */ lui $t0, (0xE3001801 >> 16)
/* AA194 80113A94 35081801 */ ori $t0, $t0, (0xE3001801 & 0xFFFF)
/* AA198 80113A98 3C07E300 */ lui $a3, (0xE3001A01 >> 16)
/* AA19C 80113A9C 8E020000 */ lw $v0, 0x0($s0)
/* AA1A0 80113AA0 34E71A01 */ ori $a3, $a3, (0xE3001A01 & 0xFFFF)
/* AA1A4 80113AA4 0040302D */ daddu $a2, $v0, $zero
/* AA1A8 80113AA8 24420008 */ addiu $v0, $v0, 0x8
/* AA1AC 80113AAC 0040282D */ daddu $a1, $v0, $zero
/* AA1B0 80113AB0 AE020000 */ sw $v0, 0x0($s0)
/* AA1B4 80113AB4 24420008 */ addiu $v0, $v0, 0x8
/* AA1B8 80113AB8 0040202D */ daddu $a0, $v0, $zero
/* AA1BC 80113ABC AE020000 */ sw $v0, 0x0($s0)
/* AA1C0 80113AC0 24420008 */ addiu $v0, $v0, 0x8
/* AA1C4 80113AC4 AE020000 */ sw $v0, 0x0($s0)
/* AA1C8 80113AC8 0040182D */ daddu $v1, $v0, $zero
/* AA1CC 80113ACC 3C02D700 */ lui $v0, (0xD7000000 >> 16)
/* AA1D0 80113AD0 ACC20000 */ sw $v0, 0x0($a2)
/* AA1D4 80113AD4 0060102D */ daddu $v0, $v1, $zero
/* AA1D8 80113AD8 24630008 */ addiu $v1, $v1, 0x8
/* AA1DC 80113ADC ACC00004 */ sw $zero, 0x4($a2)
/* AA1E0 80113AE0 ACAA0000 */ sw $t2, 0x0($a1)
/* AA1E4 80113AE4 ACA90004 */ sw $t1, 0x4($a1)
/* AA1E8 80113AE8 AC880000 */ sw $t0, 0x0($a0)
/* AA1EC 80113AEC AC800004 */ sw $zero, 0x4($a0)
/* AA1F0 80113AF0 AE030000 */ sw $v1, 0x0($s0)
/* AA1F4 80113AF4 AC470000 */ sw $a3, 0x0($v0)
/* AA1F8 80113AF8 AC400004 */ sw $zero, 0x4($v0)
.L80113AFC:
/* AA1FC 80113AFC 8FAF0044 */ lw $t7, 0x44($sp)
/* AA200 80113B00 15E00007 */ bnez $t7, .L80113B20
/* AA204 80113B04 00141600 */ sll $v0, $s4, 24
/* AA208 80113B08 00021E03 */ sra $v1, $v0, 24
/* AA20C 80113B0C 2402000D */ addiu $v0, $zero, 0xD
/* AA210 80113B10 10620003 */ beq $v1, $v0, .L80113B20
/* AA214 80113B14 2402000F */ addiu $v0, $zero, 0xF
/* AA218 80113B18 14620036 */ bne $v1, $v0, .L80113BF4
/* AA21C 80113B1C 2663FFFF */ addiu $v1, $s3, -0x1
.L80113B20:
/* AA220 80113B20 1240000D */ beqz $s2, .L80113B58
/* AA224 80113B24 0000182D */ daddu $v1, $zero, $zero
/* AA228 80113B28 9644002A */ lhu $a0, 0x2A($s2)
/* AA22C 80113B2C 00041A82 */ srl $v1, $a0, 10
/* AA230 80113B30 2C620003 */ sltiu $v0, $v1, 0x3
/* AA234 80113B34 54400003 */ bnel $v0, $zero, .L80113B44
/* AA238 80113B38 001E1840 */ sll $v1, $fp, 1
/* AA23C 80113B3C 08044ED6 */ j .L80113B58
/* AA240 80113B40 2463000A */ addiu $v1, $v1, 0xA
.L80113B44:
/* AA244 80113B44 007E1821 */ addu $v1, $v1, $fp
/* AA248 80113B48 00041202 */ srl $v0, $a0, 8
/* AA24C 80113B4C 30420003 */ andi $v0, $v0, 0x3
/* AA250 80113B50 24420001 */ addiu $v0, $v0, 0x1
/* AA254 80113B54 00621821 */ addu $v1, $v1, $v0
.L80113B58:
/* AA258 80113B58 00141600 */ sll $v0, $s4, 24
/* AA25C 80113B5C 00022603 */ sra $a0, $v0, 24
/* AA260 80113B60 2402000D */ addiu $v0, $zero, 0xD
/* AA264 80113B64 10820011 */ beq $a0, $v0, .L80113BAC
/* AA268 80113B68 2402000F */ addiu $v0, $zero, 0xF
/* AA26C 80113B6C 1082000F */ beq $a0, $v0, .L80113BAC
/* AA270 80113B70 00031080 */ sll $v0, $v1, 2
/* AA274 80113B74 00431021 */ addu $v0, $v0, $v1
/* AA278 80113B78 8FB50044 */ lw $s5, 0x44($sp)
/* AA27C 80113B7C 8E030000 */ lw $v1, 0x0($s0)
/* AA280 80113B80 00551021 */ addu $v0, $v0, $s5
/* AA284 80113B84 000210C0 */ sll $v0, $v0, 3
/* AA288 80113B88 3C198015 */ lui $t9, %hi(D_8014B0B8)
/* AA28C 80113B8C 0322C821 */ addu $t9, $t9, $v0
/* AA290 80113B90 8F39B0B8 */ lw $t9, %lo(D_8014B0B8)($t9)
/* AA294 80113B94 3C0D8015 */ lui $t5, %hi(D_8014B0BC)
/* AA298 80113B98 01A26821 */ addu $t5, $t5, $v0
/* AA29C 80113B9C 8DADB0BC */ lw $t5, %lo(D_8014B0BC)($t5)
/* AA2A0 80113BA0 AC790000 */ sw $t9, 0x0($v1)
/* AA2A4 80113BA4 08044EF9 */ j .L80113BE4
/* AA2A8 80113BA8 AC6D0004 */ sw $t5, 0x4($v1)
.L80113BAC:
/* AA2AC 80113BAC 00031080 */ sll $v0, $v1, 2
/* AA2B0 80113BB0 00431021 */ addu $v0, $v0, $v1
/* AA2B4 80113BB4 8FB90044 */ lw $t9, 0x44($sp)
/* AA2B8 80113BB8 8E030000 */ lw $v1, 0x0($s0)
/* AA2BC 80113BBC 00591021 */ addu $v0, $v0, $t9
/* AA2C0 80113BC0 000210C0 */ sll $v0, $v0, 3
/* AA2C4 80113BC4 3C0D8015 */ lui $t5, %hi(D_8014B400)
/* AA2C8 80113BC8 01A26821 */ addu $t5, $t5, $v0
/* AA2CC 80113BCC 8DADB400 */ lw $t5, %lo(D_8014B400)($t5)
/* AA2D0 80113BD0 3C0F8015 */ lui $t7, %hi(D_8014B404)
/* AA2D4 80113BD4 01E27821 */ addu $t7, $t7, $v0
/* AA2D8 80113BD8 8DEFB404 */ lw $t7, %lo(D_8014B404)($t7)
/* AA2DC 80113BDC AC6D0000 */ sw $t5, 0x0($v1)
/* AA2E0 80113BE0 AC6F0004 */ sw $t7, 0x4($v1)
.L80113BE4:
/* AA2E4 80113BE4 8E020000 */ lw $v0, 0x0($s0)
/* AA2E8 80113BE8 24420008 */ addiu $v0, $v0, 0x8
/* AA2EC 80113BEC AE020000 */ sw $v0, 0x0($s0)
/* AA2F0 80113BF0 2663FFFF */ addiu $v1, $s3, -0x1
.L80113BF4:
/* AA2F4 80113BF4 2C62000B */ sltiu $v0, $v1, 0xB
/* AA2F8 80113BF8 104002A5 */ beqz $v0, .L80114690
/* AA2FC 80113BFC 00031080 */ sll $v0, $v1, 2
/* AA300 80113C00 3C018015 */ lui $at, %hi(jtbl_8014F9B0)
/* AA304 80113C04 00220821 */ addu $at, $at, $v0
/* AA308 80113C08 8C22F9B0 */ lw $v0, %lo(jtbl_8014F9B0)($at)
/* AA30C 80113C0C 00400008 */ jr $v0
/* AA310 80113C10 00000000 */ nop
glabel .L80113C14
/* AA314 80113C14 2682FFFF */ addiu $v0, $s4, -0x1
/* AA318 80113C18 00021600 */ sll $v0, $v0, 24
/* AA31C 80113C1C 00021E03 */ sra $v1, $v0, 24
/* AA320 80113C20 2C62002F */ sltiu $v0, $v1, 0x2F
/* AA324 80113C24 1040002A */ beqz $v0, .L80113CD0
/* AA328 80113C28 00031080 */ sll $v0, $v1, 2
/* AA32C 80113C2C 3C018015 */ lui $at, %hi(jtbl_8014F9E0)
/* AA330 80113C30 00220821 */ addu $at, $at, $v0
/* AA334 80113C34 8C22F9E0 */ lw $v0, %lo(jtbl_8014F9E0)($at)
/* AA338 80113C38 00400008 */ jr $v0
/* AA33C 80113C3C 00000000 */ nop
glabel .L80113C40
/* AA340 80113C40 08045199 */ j .L80114664
/* AA344 80113C44 24050001 */ addiu $a1, $zero, 0x1
glabel .L80113C48
/* AA348 80113C48 08045199 */ j .L80114664
/* AA34C 80113C4C 24050002 */ addiu $a1, $zero, 0x2
glabel .L80113C50
/* AA350 80113C50 08045199 */ j .L80114664
/* AA354 80113C54 24050003 */ addiu $a1, $zero, 0x3
glabel .L80113C58
/* AA358 80113C58 08045199 */ j .L80114664
/* AA35C 80113C5C 24050004 */ addiu $a1, $zero, 0x4
glabel .L80113C60
/* AA360 80113C60 08045199 */ j .L80114664
/* AA364 80113C64 24050006 */ addiu $a1, $zero, 0x6
glabel .L80113C68
/* AA368 80113C68 08045199 */ j .L80114664
/* AA36C 80113C6C 24050007 */ addiu $a1, $zero, 0x7
glabel .L80113C70
/* AA370 80113C70 08045199 */ j .L80114664
/* AA374 80113C74 24050009 */ addiu $a1, $zero, 0x9
glabel .L80113C78
/* AA378 80113C78 08045199 */ j .L80114664
/* AA37C 80113C7C 24050008 */ addiu $a1, $zero, 0x8
glabel .L80113C80
/* AA380 80113C80 08045199 */ j .L80114664
/* AA384 80113C84 2405000A */ addiu $a1, $zero, 0xA
glabel .L80113C88
/* AA388 80113C88 08045199 */ j .L80114664
/* AA38C 80113C8C 2405000B */ addiu $a1, $zero, 0xB
glabel .L80113C90
/* AA390 80113C90 08045199 */ j .L80114664
/* AA394 80113C94 2405000C */ addiu $a1, $zero, 0xC
glabel .L80113C98
/* AA398 80113C98 08045199 */ j .L80114664
/* AA39C 80113C9C 2405000D */ addiu $a1, $zero, 0xD
glabel .L80113CA0
/* AA3A0 80113CA0 08045199 */ j .L80114664
/* AA3A4 80113CA4 2405000E */ addiu $a1, $zero, 0xE
glabel .L80113CA8
/* AA3A8 80113CA8 08045199 */ j .L80114664
/* AA3AC 80113CAC 2405002E */ addiu $a1, $zero, 0x2E
glabel .L80113CB0
/* AA3B0 80113CB0 08045199 */ j .L80114664
/* AA3B4 80113CB4 2405002F */ addiu $a1, $zero, 0x2F
glabel .L80113CB8
/* AA3B8 80113CB8 08045199 */ j .L80114664
/* AA3BC 80113CBC 24050030 */ addiu $a1, $zero, 0x30
glabel .L80113CC0
/* AA3C0 80113CC0 08045199 */ j .L80114664
/* AA3C4 80113CC4 24050037 */ addiu $a1, $zero, 0x37
glabel .L80113CC8
/* AA3C8 80113CC8 08045199 */ j .L80114664
/* AA3CC 80113CCC 24050038 */ addiu $a1, $zero, 0x38
glabel .L80113CD0
/* AA3D0 80113CD0 08045199 */ j .L80114664
/* AA3D4 80113CD4 0000282D */ daddu $a1, $zero, $zero
glabel .L80113CD8
/* AA3D8 80113CD8 2682FFFF */ addiu $v0, $s4, -0x1
/* AA3DC 80113CDC 00021600 */ sll $v0, $v0, 24
/* AA3E0 80113CE0 00021E03 */ sra $v1, $v0, 24
/* AA3E4 80113CE4 2C62002F */ sltiu $v0, $v1, 0x2F
/* AA3E8 80113CE8 10400028 */ beqz $v0, .L80113D8C
/* AA3EC 80113CEC 00031080 */ sll $v0, $v1, 2
/* AA3F0 80113CF0 3C018015 */ lui $at, %hi(jtbl_8014FAA0)
/* AA3F4 80113CF4 00220821 */ addu $at, $at, $v0
/* AA3F8 80113CF8 8C22FAA0 */ lw $v0, %lo(jtbl_8014FAA0)($at)
/* AA3FC 80113CFC 00400008 */ jr $v0
/* AA400 80113D00 00000000 */ nop
glabel .L80113D04
/* AA404 80113D04 08045199 */ j .L80114664
/* AA408 80113D08 24050011 */ addiu $a1, $zero, 0x11
glabel .L80113D0C
/* AA40C 80113D0C 08045199 */ j .L80114664
/* AA410 80113D10 24050012 */ addiu $a1, $zero, 0x12
glabel .L80113D14
/* AA414 80113D14 08045199 */ j .L80114664
/* AA418 80113D18 24050013 */ addiu $a1, $zero, 0x13
glabel .L80113D1C
/* AA41C 80113D1C 08045199 */ j .L80114664
/* AA420 80113D20 24050014 */ addiu $a1, $zero, 0x14
glabel .L80113D24
/* AA424 80113D24 08045199 */ j .L80114664
/* AA428 80113D28 24050016 */ addiu $a1, $zero, 0x16
glabel .L80113D2C
/* AA42C 80113D2C 08045199 */ j .L80114664
/* AA430 80113D30 24050017 */ addiu $a1, $zero, 0x17
glabel .L80113D34
/* AA434 80113D34 08045199 */ j .L80114664
/* AA438 80113D38 24050018 */ addiu $a1, $zero, 0x18
glabel .L80113D3C
/* AA43C 80113D3C 08045199 */ j .L80114664
/* AA440 80113D40 24050019 */ addiu $a1, $zero, 0x19
glabel .L80113D44
/* AA444 80113D44 08045199 */ j .L80114664
/* AA448 80113D48 2405001A */ addiu $a1, $zero, 0x1A
glabel .L80113D4C
/* AA44C 80113D4C 08045199 */ j .L80114664
/* AA450 80113D50 2405001B */ addiu $a1, $zero, 0x1B
glabel .L80113D54
/* AA454 80113D54 08045199 */ j .L80114664
/* AA458 80113D58 2405001C */ addiu $a1, $zero, 0x1C
glabel .L80113D5C
/* AA45C 80113D5C 08045199 */ j .L80114664
/* AA460 80113D60 2405001D */ addiu $a1, $zero, 0x1D
glabel .L80113D64
/* AA464 80113D64 08045199 */ j .L80114664
/* AA468 80113D68 24050031 */ addiu $a1, $zero, 0x31
glabel .L80113D6C
/* AA46C 80113D6C 08045199 */ j .L80114664
/* AA470 80113D70 24050032 */ addiu $a1, $zero, 0x32
glabel .L80113D74
/* AA474 80113D74 08045199 */ j .L80114664
/* AA478 80113D78 24050033 */ addiu $a1, $zero, 0x33
glabel .L80113D7C
/* AA47C 80113D7C 08045199 */ j .L80114664
/* AA480 80113D80 24050039 */ addiu $a1, $zero, 0x39
glabel .L80113D84
/* AA484 80113D84 08045199 */ j .L80114664
/* AA488 80113D88 2405003A */ addiu $a1, $zero, 0x3A
glabel .L80113D8C
/* AA48C 80113D8C 08045199 */ j .L80114664
/* AA490 80113D90 24050010 */ addiu $a1, $zero, 0x10
glabel .L80113D94
/* AA494 80113D94 2682FFFF */ addiu $v0, $s4, -0x1
/* AA498 80113D98 00021600 */ sll $v0, $v0, 24
/* AA49C 80113D9C 00021E03 */ sra $v1, $v0, 24
/* AA4A0 80113DA0 2C62002F */ sltiu $v0, $v1, 0x2F
/* AA4A4 80113DA4 10400028 */ beqz $v0, .L80113E48
/* AA4A8 80113DA8 00031080 */ sll $v0, $v1, 2
/* AA4AC 80113DAC 3C018015 */ lui $at, %hi(jtbl_8014FB60)
/* AA4B0 80113DB0 00220821 */ addu $at, $at, $v0
/* AA4B4 80113DB4 8C22FB60 */ lw $v0, %lo(jtbl_8014FB60)($at)
/* AA4B8 80113DB8 00400008 */ jr $v0
/* AA4BC 80113DBC 00000000 */ nop
glabel .L80113DC0
/* AA4C0 80113DC0 08044F93 */ j .L80113E4C
/* AA4C4 80113DC4 24050020 */ addiu $a1, $zero, 0x20
glabel .L80113DC8
/* AA4C8 80113DC8 08044F93 */ j .L80113E4C
/* AA4CC 80113DCC 24050021 */ addiu $a1, $zero, 0x21
glabel .L80113DD0
/* AA4D0 80113DD0 08044F93 */ j .L80113E4C
/* AA4D4 80113DD4 24050022 */ addiu $a1, $zero, 0x22
glabel .L80113DD8
/* AA4D8 80113DD8 08044F93 */ j .L80113E4C
/* AA4DC 80113DDC 24050023 */ addiu $a1, $zero, 0x23
glabel .L80113DE0
/* AA4E0 80113DE0 08044F93 */ j .L80113E4C
/* AA4E4 80113DE4 24050025 */ addiu $a1, $zero, 0x25
glabel .L80113DE8
/* AA4E8 80113DE8 08044F93 */ j .L80113E4C
/* AA4EC 80113DEC 24050026 */ addiu $a1, $zero, 0x26
glabel .L80113DF0
/* AA4F0 80113DF0 08044F93 */ j .L80113E4C
/* AA4F4 80113DF4 24050027 */ addiu $a1, $zero, 0x27
glabel .L80113DF8
/* AA4F8 80113DF8 08044F93 */ j .L80113E4C
/* AA4FC 80113DFC 24050028 */ addiu $a1, $zero, 0x28
glabel .L80113E00
/* AA500 80113E00 08044F93 */ j .L80113E4C
/* AA504 80113E04 24050029 */ addiu $a1, $zero, 0x29
glabel .L80113E08
/* AA508 80113E08 08044F93 */ j .L80113E4C
/* AA50C 80113E0C 2405002A */ addiu $a1, $zero, 0x2A
glabel .L80113E10
/* AA510 80113E10 08044F93 */ j .L80113E4C
/* AA514 80113E14 2405002B */ addiu $a1, $zero, 0x2B
glabel .L80113E18
/* AA518 80113E18 08044F93 */ j .L80113E4C
/* AA51C 80113E1C 2405002C */ addiu $a1, $zero, 0x2C
glabel .L80113E20
/* AA520 80113E20 08044F93 */ j .L80113E4C
/* AA524 80113E24 24050034 */ addiu $a1, $zero, 0x34
glabel .L80113E28
/* AA528 80113E28 08044F93 */ j .L80113E4C
/* AA52C 80113E2C 24050035 */ addiu $a1, $zero, 0x35
glabel .L80113E30
/* AA530 80113E30 08044F93 */ j .L80113E4C
/* AA534 80113E34 24050036 */ addiu $a1, $zero, 0x36
glabel .L80113E38
/* AA538 80113E38 08044F93 */ j .L80113E4C
/* AA53C 80113E3C 2405003B */ addiu $a1, $zero, 0x3B
glabel .L80113E40
/* AA540 80113E40 08044F93 */ j .L80113E4C
/* AA544 80113E44 2405003C */ addiu $a1, $zero, 0x3C
glabel .L80113E48
/* AA548 80113E48 2405001F */ addiu $a1, $zero, 0x1F
.L80113E4C:
/* AA54C 80113E4C 3C03DE00 */ lui $v1, (0xDE000000 >> 16)
/* AA550 80113E50 8E020000 */ lw $v0, 0x0($s0)
/* AA554 80113E54 3C060001 */ lui $a2, (0x1F400 >> 16)
/* AA558 80113E58 0040202D */ daddu $a0, $v0, $zero
/* AA55C 80113E5C 24420008 */ addiu $v0, $v0, 0x8
/* AA560 80113E60 0040482D */ daddu $t1, $v0, $zero
/* AA564 80113E64 AE020000 */ sw $v0, 0x0($s0)
/* AA568 80113E68 24420008 */ addiu $v0, $v0, 0x8
/* AA56C 80113E6C AC830000 */ sw $v1, 0x0($a0)
/* AA570 80113E70 AE020000 */ sw $v0, 0x0($s0)
/* AA574 80113E74 0040382D */ daddu $a3, $v0, $zero
/* AA578 80113E78 00051080 */ sll $v0, $a1, 2
/* AA57C 80113E7C 3C018015 */ lui $at, %hi(D_8014AFC0)
/* AA580 80113E80 00220821 */ addu $at, $at, $v0
/* AA584 80113E84 8C22AFC0 */ lw $v0, %lo(D_8014AFC0)($at)
/* AA588 80113E88 3C088015 */ lui $t0, %hi(gCurrentFogSettings)
/* AA58C 80113E8C 25083264 */ addiu $t0, $t0, %lo(gCurrentFogSettings)
/* AA590 80113E90 AC820004 */ sw $v0, 0x4($a0)
/* AA594 80113E94 8D050000 */ lw $a1, 0x0($t0)
/* AA598 80113E98 3C02F800 */ lui $v0, (0xF8000000 >> 16)
/* AA59C 80113E9C AD220000 */ sw $v0, 0x0($t1)
/* AA5A0 80113EA0 90A20007 */ lbu $v0, 0x7($a1)
/* AA5A4 80113EA4 90A3000B */ lbu $v1, 0xB($a1)
/* AA5A8 80113EA8 90A4000F */ lbu $a0, 0xF($a1)
/* AA5AC 80113EAC 00021600 */ sll $v0, $v0, 24
/* AA5B0 80113EB0 00031C00 */ sll $v1, $v1, 16
/* AA5B4 80113EB4 00431025 */ or $v0, $v0, $v1
/* AA5B8 80113EB8 00042200 */ sll $a0, $a0, 8
/* AA5BC 80113EBC 00441025 */ or $v0, $v0, $a0
/* AA5C0 80113EC0 90A30013 */ lbu $v1, 0x13($a1)
/* AA5C4 80113EC4 00E0282D */ daddu $a1, $a3, $zero
/* AA5C8 80113EC8 00431025 */ or $v0, $v0, $v1
/* AA5CC 80113ECC AD220004 */ sw $v0, 0x4($t1)
/* AA5D0 80113ED0 8D040000 */ lw $a0, 0x0($t0)
/* AA5D4 80113ED4 3C02DB08 */ lui $v0, (0xDB080000 >> 16)
/* AA5D8 80113ED8 ACA20000 */ sw $v0, 0x0($a1)
/* AA5DC 80113EDC 8C830018 */ lw $v1, 0x18($a0)
/* AA5E0 80113EE0 8C840014 */ lw $a0, 0x14($a0)
/* AA5E4 80113EE4 34C6F400 */ ori $a2, $a2, (0x1F400 & 0xFFFF)
/* AA5E8 80113EE8 00641823 */ subu $v1, $v1, $a0
/* AA5EC 80113EEC 14600002 */ bnez $v1, .L80113EF8
/* AA5F0 80113EF0 00C3001A */ div $zero, $a2, $v1
/* AA5F4 80113EF4 0007000D */ break 7
.L80113EF8:
/* AA5F8 80113EF8 2401FFFF */ addiu $at, $zero, -0x1
/* AA5FC 80113EFC 14610004 */ bne $v1, $at, .L80113F10
/* AA600 80113F00 3C018000 */ lui $at, (0x80000000 >> 16)
/* AA604 80113F04 14C10002 */ bne $a2, $at, .L80113F10
/* AA608 80113F08 00000000 */ nop
/* AA60C 80113F0C 0006000D */ break 6
.L80113F10:
/* AA610 80113F10 00003012 */ mflo $a2
/* AA614 80113F14 240201F4 */ addiu $v0, $zero, 0x1F4
/* AA618 80113F18 00441023 */ subu $v0, $v0, $a0
/* AA61C 80113F1C 00021200 */ sll $v0, $v0, 8
/* AA620 80113F20 14600002 */ bnez $v1, .L80113F2C
/* AA624 80113F24 0043001A */ div $zero, $v0, $v1
/* AA628 80113F28 0007000D */ break 7
.L80113F2C:
/* AA62C 80113F2C 2401FFFF */ addiu $at, $zero, -0x1
/* AA630 80113F30 14610004 */ bne $v1, $at, .L80113F44
/* AA634 80113F34 3C018000 */ lui $at, (0x80000000 >> 16)
/* AA638 80113F38 14410002 */ bne $v0, $at, .L80113F44
/* AA63C 80113F3C 00000000 */ nop
/* AA640 80113F40 0006000D */ break 6
.L80113F44:
/* AA644 80113F44 00001012 */ mflo $v0
/* AA648 80113F48 24E70008 */ addiu $a3, $a3, 0x8
/* AA64C 80113F4C AE070000 */ sw $a3, 0x0($s0)
/* AA650 80113F50 00063400 */ sll $a2, $a2, 16
/* AA654 80113F54 3042FFFF */ andi $v0, $v0, 0xFFFF
/* AA658 80113F58 00C23025 */ or $a2, $a2, $v0
/* AA65C 80113F5C 080451A4 */ j .L80114690
/* AA660 80113F60 ACA60004 */ sw $a2, 0x4($a1)
glabel .L80113F64
/* AA664 80113F64 3C038015 */ lui $v1, %hi(mdl_bgMultiplyColorA)
/* AA668 80113F68 9063B74C */ lbu $v1, %lo(mdl_bgMultiplyColorA)($v1)
/* AA66C 80113F6C 240200FF */ addiu $v0, $zero, 0xFF
/* AA670 80113F70 106202ED */ beq $v1, $v0, .L80114B28
/* AA674 80113F74 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* AA678 80113F78 8E030000 */ lw $v1, 0x0($s0)
/* AA67C 80113F7C 0060202D */ daddu $a0, $v1, $zero
/* AA680 80113F80 AC820000 */ sw $v0, 0x0($a0)
/* AA684 80113F84 3C028015 */ lui $v0, %hi(D_8014B000)
/* AA688 80113F88 8C42B000 */ lw $v0, %lo(D_8014B000)($v0)
/* AA68C 80113F8C 24630008 */ addiu $v1, $v1, 0x8
/* AA690 80113F90 AE030000 */ sw $v1, 0x0($s0)
/* AA694 80113F94 AC820004 */ sw $v0, 0x4($a0)
/* AA698 80113F98 2682FFFF */ addiu $v0, $s4, -0x1
/* AA69C 80113F9C 00021600 */ sll $v0, $v0, 24
/* AA6A0 80113FA0 00021E03 */ sra $v1, $v0, 24
/* AA6A4 80113FA4 2C62002F */ sltiu $v0, $v1, 0x2F
/* AA6A8 80113FA8 104000A2 */ beqz $v0, .L80114234
/* AA6AC 80113FAC 00031080 */ sll $v0, $v1, 2
/* AA6B0 80113FB0 3C018015 */ lui $at, %hi(jtbl_8014FC20)
/* AA6B4 80113FB4 00220821 */ addu $at, $at, $v0
/* AA6B8 80113FB8 8C22FC20 */ lw $v0, %lo(jtbl_8014FC20)($at)
/* AA6BC 80113FBC 00400008 */ jr $v0
/* AA6C0 80113FC0 00000000 */ nop
glabel .L80113FC4
/* AA6C4 80113FC4 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA6C8 80113FC8 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA6CC 80113FCC 3C058411 */ lui $a1, (0x84112078 >> 16)
/* AA6D0 80113FD0 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA6D4 80113FD4 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA6D8 80113FD8 8C820000 */ lw $v0, 0x0($a0)
/* AA6DC 80113FDC 08045088 */ j .L80114220
/* AA6E0 80113FE0 34A52078 */ ori $a1, $a1, (0x84112078 & 0xFFFF)
glabel .L80113FE4
/* AA6E4 80113FE4 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA6E8 80113FE8 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA6EC 80113FEC 3C058411 */ lui $a1, (0x84112230 >> 16)
/* AA6F0 80113FF0 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA6F4 80113FF4 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA6F8 80113FF8 8C820000 */ lw $v0, 0x0($a0)
/* AA6FC 80113FFC 08045088 */ j .L80114220
/* AA700 80114000 34A52230 */ ori $a1, $a1, (0x84112230 & 0xFFFF)
glabel .L80114004
/* AA704 80114004 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA708 80114008 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA70C 8011400C 3C058411 */ lui $a1, (0x84112D58 >> 16)
/* AA710 80114010 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA714 80114014 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA718 80114018 8C820000 */ lw $v0, 0x0($a0)
/* AA71C 8011401C 08045088 */ j .L80114220
/* AA720 80114020 34A52D58 */ ori $a1, $a1, (0x84112D58 & 0xFFFF)
glabel .L80114024
/* AA724 80114024 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA728 80114028 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA72C 8011402C 3C058411 */ lui $a1, (0x84112E10 >> 16)
/* AA730 80114030 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA734 80114034 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA738 80114038 8C820000 */ lw $v0, 0x0($a0)
/* AA73C 8011403C 08045088 */ j .L80114220
/* AA740 80114040 34A52E10 */ ori $a1, $a1, (0x84112E10 & 0xFFFF)
glabel .L80114044
/* AA744 80114044 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA748 80114048 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA74C 8011404C 3C058411 */ lui $a1, (0x84112478 >> 16)
/* AA750 80114050 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA754 80114054 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA758 80114058 8C820000 */ lw $v0, 0x0($a0)
/* AA75C 8011405C 08045088 */ j .L80114220
/* AA760 80114060 34A52478 */ ori $a1, $a1, (0x84112478 & 0xFFFF)
glabel .L80114064
/* AA764 80114064 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA768 80114068 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA76C 8011406C 3C058411 */ lui $a1, (0x84113078 >> 16)
/* AA770 80114070 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA774 80114074 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA778 80114078 8C820000 */ lw $v0, 0x0($a0)
/* AA77C 8011407C 08045088 */ j .L80114220
/* AA780 80114080 34A53078 */ ori $a1, $a1, (0x84113078 & 0xFFFF)
glabel .L80114084
/* AA784 80114084 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA788 80114088 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA78C 8011408C 3C058411 */ lui $a1, (0x84113078 >> 16)
/* AA790 80114090 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA794 80114094 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA798 80114098 8C820000 */ lw $v0, 0x0($a0)
/* AA79C 8011409C 08045088 */ j .L80114220
/* AA7A0 801140A0 34A53078 */ ori $a1, $a1, (0x84113078 & 0xFFFF)
glabel .L801140A4
/* AA7A4 801140A4 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA7A8 801140A8 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA7AC 801140AC 3C058410 */ lui $a1, (0x841049D8 >> 16)
/* AA7B0 801140B0 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA7B4 801140B4 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA7B8 801140B8 8C820000 */ lw $v0, 0x0($a0)
/* AA7BC 801140BC 08045088 */ j .L80114220
/* AA7C0 801140C0 34A549D8 */ ori $a1, $a1, (0x841049D8 & 0xFFFF)
glabel .L801140C4
/* AA7C4 801140C4 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA7C8 801140C8 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA7CC 801140CC 3C058410 */ lui $a1, (0x841049D8 >> 16)
/* AA7D0 801140D0 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA7D4 801140D4 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA7D8 801140D8 8C820000 */ lw $v0, 0x0($a0)
/* AA7DC 801140DC 08045088 */ j .L80114220
/* AA7E0 801140E0 34A549D8 */ ori $a1, $a1, (0x841049D8 & 0xFFFF)
glabel .L801140E4
/* AA7E4 801140E4 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA7E8 801140E8 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA7EC 801140EC 3C058410 */ lui $a1, (0x841049D8 >> 16)
/* AA7F0 801140F0 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA7F4 801140F4 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA7F8 801140F8 8C820000 */ lw $v0, 0x0($a0)
/* AA7FC 801140FC 08045088 */ j .L80114220
/* AA800 80114100 34A549D8 */ ori $a1, $a1, (0x841049D8 & 0xFFFF)
glabel .L80114104
/* AA804 80114104 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA808 80114108 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA80C 8011410C 3C058410 */ lui $a1, (0x84104A50 >> 16)
/* AA810 80114110 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA814 80114114 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA818 80114118 8C820000 */ lw $v0, 0x0($a0)
/* AA81C 8011411C 08045088 */ j .L80114220
/* AA820 80114120 34A54A50 */ ori $a1, $a1, (0x84104A50 & 0xFFFF)
glabel .L80114124
/* AA824 80114124 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA828 80114128 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA82C 8011412C 3C058410 */ lui $a1, (0x84104DD8 >> 16)
/* AA830 80114130 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA834 80114134 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA838 80114138 8C820000 */ lw $v0, 0x0($a0)
/* AA83C 8011413C 08045088 */ j .L80114220
/* AA840 80114140 34A54DD8 */ ori $a1, $a1, (0x84104DD8 & 0xFFFF)
glabel .L80114144
/* AA844 80114144 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA848 80114148 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA84C 8011414C 3C058410 */ lui $a1, (0x84104DD8 >> 16)
/* AA850 80114150 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA854 80114154 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA858 80114158 8C820000 */ lw $v0, 0x0($a0)
/* AA85C 8011415C 08045088 */ j .L80114220
/* AA860 80114160 34A54DD8 */ ori $a1, $a1, (0x84104DD8 & 0xFFFF)
glabel .L80114164
/* AA864 80114164 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA868 80114168 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA86C 8011416C 3C058410 */ lui $a1, (0x841045D8 >> 16)
/* AA870 80114170 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA874 80114174 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA878 80114178 8C820000 */ lw $v0, 0x0($a0)
/* AA87C 8011417C 08045088 */ j .L80114220
/* AA880 80114180 34A545D8 */ ori $a1, $a1, (0x841045D8 & 0xFFFF)
glabel .L80114184
/* AA884 80114184 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA888 80114188 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA88C 8011418C 3C058411 */ lui $a1, (0x84112048 >> 16)
/* AA890 80114190 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA894 80114194 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA898 80114198 8C820000 */ lw $v0, 0x0($a0)
/* AA89C 8011419C 08045088 */ j .L80114220
/* AA8A0 801141A0 34A52048 */ ori $a1, $a1, (0x84112048 & 0xFFFF)
glabel .L801141A4
/* AA8A4 801141A4 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA8A8 801141A8 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA8AC 801141AC 3C058411 */ lui $a1, (0x84113048 >> 16)
/* AA8B0 801141B0 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA8B4 801141B4 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA8B8 801141B8 8C820000 */ lw $v0, 0x0($a0)
/* AA8BC 801141BC 08045088 */ j .L80114220
/* AA8C0 801141C0 34A53048 */ ori $a1, $a1, (0x84113048 & 0xFFFF)
glabel .L801141C4
/* AA8C4 801141C4 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA8C8 801141C8 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA8CC 801141CC 3C058410 */ lui $a1, (0x841041C8 >> 16)
/* AA8D0 801141D0 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA8D4 801141D4 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA8D8 801141D8 8C820000 */ lw $v0, 0x0($a0)
/* AA8DC 801141DC 08045088 */ j .L80114220
/* AA8E0 801141E0 34A541C8 */ ori $a1, $a1, (0x841041C8 & 0xFFFF)
glabel .L801141E4
/* AA8E4 801141E4 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA8E8 801141E8 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA8EC 801141EC 3C058410 */ lui $a1, (0x84104B50 >> 16)
/* AA8F0 801141F0 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA8F4 801141F4 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA8F8 801141F8 8C820000 */ lw $v0, 0x0($a0)
/* AA8FC 801141FC 08045088 */ j .L80114220
/* AA900 80114200 34A54B50 */ ori $a1, $a1, (0x84104B50 & 0xFFFF)
glabel .L80114204
/* AA904 80114204 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* AA908 80114208 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* AA90C 8011420C 3C058410 */ lui $a1, (0x84104340 >> 16)
/* AA910 80114210 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AA914 80114214 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AA918 80114218 8C820000 */ lw $v0, 0x0($a0)
/* AA91C 8011421C 34A54340 */ ori $a1, $a1, (0x84104340 & 0xFFFF)
.L80114220:
/* AA920 80114220 0040182D */ daddu $v1, $v0, $zero
/* AA924 80114224 24420008 */ addiu $v0, $v0, 0x8
/* AA928 80114228 AC820000 */ sw $v0, 0x0($a0)
/* AA92C 8011422C AC660000 */ sw $a2, 0x0($v1)
/* AA930 80114230 AC650004 */ sw $a1, 0x4($v1)
glabel .L80114234
/* AA934 80114234 3C0910AA */ lui $t1, (0x10AAF056 >> 16)
/* AA938 80114238 8E020000 */ lw $v0, 0x0($s0)
/* AA93C 8011423C 3529F056 */ ori $t1, $t1, (0x10AAF056 & 0xFFFF)
/* AA940 80114240 0040382D */ daddu $a3, $v0, $zero
/* AA944 80114244 24420008 */ addiu $v0, $v0, 0x8
/* AA948 80114248 AE020000 */ sw $v0, 0x0($s0)
/* AA94C 8011424C 0040282D */ daddu $a1, $v0, $zero
/* AA950 80114250 3C02F800 */ lui $v0, (0xF8000000 >> 16)
/* AA954 80114254 3C038015 */ lui $v1, %hi(gCurrentFogSettings)
/* AA958 80114258 8C633264 */ lw $v1, %lo(gCurrentFogSettings)($v1)
/* AA95C 8011425C 00A0402D */ daddu $t0, $a1, $zero
/* AA960 80114260 ACE20000 */ sw $v0, 0x0($a3)
/* AA964 80114264 90620007 */ lbu $v0, 0x7($v1)
/* AA968 80114268 9064000B */ lbu $a0, 0xB($v1)
/* AA96C 8011426C 9066000F */ lbu $a2, 0xF($v1)
/* AA970 80114270 24A50008 */ addiu $a1, $a1, 0x8
/* AA974 80114274 AE050000 */ sw $a1, 0x0($s0)
/* AA978 80114278 3C038015 */ lui $v1, %hi(mdl_bgMultiplyColorA)
/* AA97C 8011427C 9063B74C */ lbu $v1, %lo(mdl_bgMultiplyColorA)($v1)
/* AA980 80114280 00021600 */ sll $v0, $v0, 24
/* AA984 80114284 00042400 */ sll $a0, $a0, 16
/* AA988 80114288 00441025 */ or $v0, $v0, $a0
/* AA98C 8011428C 00063200 */ sll $a2, $a2, 8
/* AA990 80114290 00461025 */ or $v0, $v0, $a2
/* AA994 80114294 00431025 */ or $v0, $v0, $v1
/* AA998 80114298 ACE20004 */ sw $v0, 0x4($a3)
/* AA99C 8011429C 3C02F900 */ lui $v0, (0xF9000000 >> 16)
/* AA9A0 801142A0 AD020000 */ sw $v0, 0x0($t0)
/* AA9A4 801142A4 3C028015 */ lui $v0, %hi(mdl_bgMultiplyColorR)
/* AA9A8 801142A8 9042B74D */ lbu $v0, %lo(mdl_bgMultiplyColorR)($v0)
/* AA9AC 801142AC 3C048015 */ lui $a0, %hi(mdl_bgMultiplyColorG)
/* AA9B0 801142B0 9084B74E */ lbu $a0, %lo(mdl_bgMultiplyColorG)($a0)
/* AA9B4 801142B4 3C038015 */ lui $v1, %hi(mdl_bgMultiplyColorB)
/* AA9B8 801142B8 9063B74F */ lbu $v1, %lo(mdl_bgMultiplyColorB)($v1)
/* AA9BC 801142BC 00021600 */ sll $v0, $v0, 24
/* AA9C0 801142C0 00042400 */ sll $a0, $a0, 16
/* AA9C4 801142C4 00441025 */ or $v0, $v0, $a0
/* AA9C8 801142C8 00031A00 */ sll $v1, $v1, 8
/* AA9CC 801142CC 00431025 */ or $v0, $v0, $v1
/* AA9D0 801142D0 344200FF */ ori $v0, $v0, 0xFF
/* AA9D4 801142D4 00A0182D */ daddu $v1, $a1, $zero
/* AA9D8 801142D8 24A50008 */ addiu $a1, $a1, 0x8
/* AA9DC 801142DC AD020004 */ sw $v0, 0x4($t0)
/* AA9E0 801142E0 3C02DB08 */ lui $v0, (0xDB080000 >> 16)
/* AA9E4 801142E4 AE050000 */ sw $a1, 0x0($s0)
/* AA9E8 801142E8 AC620000 */ sw $v0, 0x0($v1)
/* AA9EC 801142EC 080451A4 */ j .L80114690
/* AA9F0 801142F0 AC690004 */ sw $t1, 0x4($v1)
glabel .L801142F4
/* AA9F4 801142F4 2682FFFF */ addiu $v0, $s4, -0x1
/* AA9F8 801142F8 00021600 */ sll $v0, $v0, 24
/* AA9FC 801142FC 00021E03 */ sra $v1, $v0, 24
/* AAA00 80114300 2C62002F */ sltiu $v0, $v1, 0x2F
/* AAA04 80114304 10400028 */ beqz $v0, .L801143A8
/* AAA08 80114308 00031080 */ sll $v0, $v1, 2
/* AAA0C 8011430C 3C018015 */ lui $at, %hi(jtbl_8014FCE0)
/* AAA10 80114310 00220821 */ addu $at, $at, $v0
/* AAA14 80114314 8C22FCE0 */ lw $v0, %lo(jtbl_8014FCE0)($at)
/* AAA18 80114318 00400008 */ jr $v0
/* AAA1C 8011431C 00000000 */ nop
glabel .L80114320
/* AAA20 80114320 080450EB */ j .L801143AC
/* AAA24 80114324 24050020 */ addiu $a1, $zero, 0x20
glabel .L80114328
/* AAA28 80114328 080450EB */ j .L801143AC
/* AAA2C 8011432C 24050021 */ addiu $a1, $zero, 0x21
glabel .L80114330
/* AAA30 80114330 080450EB */ j .L801143AC
/* AAA34 80114334 24050022 */ addiu $a1, $zero, 0x22
glabel .L80114338
/* AAA38 80114338 080450EB */ j .L801143AC
/* AAA3C 8011433C 24050023 */ addiu $a1, $zero, 0x23
glabel .L80114340
/* AAA40 80114340 080450EB */ j .L801143AC
/* AAA44 80114344 24050025 */ addiu $a1, $zero, 0x25
glabel .L80114348
/* AAA48 80114348 080450EB */ j .L801143AC
/* AAA4C 8011434C 24050026 */ addiu $a1, $zero, 0x26
glabel .L80114350
/* AAA50 80114350 080450EB */ j .L801143AC
/* AAA54 80114354 24050027 */ addiu $a1, $zero, 0x27
glabel .L80114358
/* AAA58 80114358 080450EB */ j .L801143AC
/* AAA5C 8011435C 24050028 */ addiu $a1, $zero, 0x28
glabel .L80114360
/* AAA60 80114360 080450EB */ j .L801143AC
/* AAA64 80114364 24050029 */ addiu $a1, $zero, 0x29
glabel .L80114368
/* AAA68 80114368 080450EB */ j .L801143AC
/* AAA6C 8011436C 2405002A */ addiu $a1, $zero, 0x2A
glabel .L80114370
/* AAA70 80114370 080450EB */ j .L801143AC
/* AAA74 80114374 2405002B */ addiu $a1, $zero, 0x2B
glabel .L80114378
/* AAA78 80114378 080450EB */ j .L801143AC
/* AAA7C 8011437C 2405002C */ addiu $a1, $zero, 0x2C
glabel .L80114380
/* AAA80 80114380 080450EB */ j .L801143AC
/* AAA84 80114384 24050034 */ addiu $a1, $zero, 0x34
glabel .L80114388
/* AAA88 80114388 080450EB */ j .L801143AC
/* AAA8C 8011438C 24050035 */ addiu $a1, $zero, 0x35
glabel .L80114390
/* AAA90 80114390 080450EB */ j .L801143AC
/* AAA94 80114394 24050036 */ addiu $a1, $zero, 0x36
glabel .L80114398
/* AAA98 80114398 080450EB */ j .L801143AC
/* AAA9C 8011439C 2405003B */ addiu $a1, $zero, 0x3B
glabel .L801143A0
/* AAAA0 801143A0 080450EB */ j .L801143AC
/* AAAA4 801143A4 2405003C */ addiu $a1, $zero, 0x3C
glabel .L801143A8
/* AAAA8 801143A8 2405001F */ addiu $a1, $zero, 0x1F
.L801143AC:
/* AAAAC 801143AC 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* AAAB0 801143B0 8E0B0000 */ lw $t3, 0x0($s0)
/* AAAB4 801143B4 3C0A8015 */ lui $t2, %hi(gCurrentFogSettings)
/* AAAB8 801143B8 8D4A3264 */ lw $t2, %lo(gCurrentFogSettings)($t2)
/* AAABC 801143BC 0160182D */ daddu $v1, $t3, $zero
/* AAAC0 801143C0 AC620000 */ sw $v0, 0x0($v1)
/* AAAC4 801143C4 00051080 */ sll $v0, $a1, 2
/* AAAC8 801143C8 3C018015 */ lui $at, %hi(D_8014AFC0)
/* AAACC 801143CC 00220821 */ addu $at, $at, $v0
/* AAAD0 801143D0 8C22AFC0 */ lw $v0, %lo(D_8014AFC0)($at)
/* AAAD4 801143D4 3C058015 */ lui $a1, %hi(mdl_bgMultiplyColorA)
/* AAAD8 801143D8 90A5B74C */ lbu $a1, %lo(mdl_bgMultiplyColorA)($a1)
/* AAADC 801143DC 240700FF */ addiu $a3, $zero, 0xFF
/* AAAE0 801143E0 AC620004 */ sw $v0, 0x4($v1)
/* AAAE4 801143E4 8D420014 */ lw $v0, 0x14($t2)
/* AAAE8 801143E8 00E53823 */ subu $a3, $a3, $a1
/* AAAEC 801143EC 00470018 */ mult $v0, $a3
/* AAAF0 801143F0 3C0C8080 */ lui $t4, (0x80808081 >> 16)
/* AAAF4 801143F4 358C8081 */ ori $t4, $t4, (0x80808081 & 0xFFFF)
/* AAAF8 801143F8 3C090001 */ lui $t1, (0x1F400 >> 16)
/* AAAFC 801143FC 00004012 */ mflo $t0
/* AAB00 80114400 8D420018 */ lw $v0, 0x18($t2)
/* AAB04 80114404 3529F400 */ ori $t1, $t1, (0x1F400 & 0xFFFF)
/* AAB08 80114408 00470018 */ mult $v0, $a3
/* AAB0C 8011440C 000518C0 */ sll $v1, $a1, 3
/* AAB10 80114410 00651823 */ subu $v1, $v1, $a1
/* AAB14 80114414 00031940 */ sll $v1, $v1, 5
/* AAB18 80114418 00651821 */ addu $v1, $v1, $a1
/* AAB1C 8011441C 00003012 */ mflo $a2
/* AAB20 80114420 00031880 */ sll $v1, $v1, 2
/* AAB24 80114424 01031821 */ addu $v1, $t0, $v1
/* AAB28 80114428 006C0018 */ mult $v1, $t4
/* AAB2C 8011442C 00051140 */ sll $v0, $a1, 5
/* AAB30 80114430 00451023 */ subu $v0, $v0, $a1
/* AAB34 80114434 00021080 */ sll $v0, $v0, 2
/* AAB38 80114438 00451021 */ addu $v0, $v0, $a1
/* AAB3C 8011443C 00002010 */ mfhi $a0
/* AAB40 80114440 000210C0 */ sll $v0, $v0, 3
/* AAB44 80114444 00C21021 */ addu $v0, $a2, $v0
/* AAB48 80114448 004C0018 */ mult $v0, $t4
/* AAB4C 8011444C 00832021 */ addu $a0, $a0, $v1
/* AAB50 80114450 000421C3 */ sra $a0, $a0, 7
/* AAB54 80114454 00031FC3 */ sra $v1, $v1, 31
/* AAB58 80114458 00832023 */ subu $a0, $a0, $v1
/* AAB5C 8011445C 00004010 */ mfhi $t0
/* AAB60 80114460 01021821 */ addu $v1, $t0, $v0
/* AAB64 80114464 000319C3 */ sra $v1, $v1, 7
/* AAB68 80114468 000217C3 */ sra $v0, $v0, 31
/* AAB6C 8011446C 00621823 */ subu $v1, $v1, $v0
/* AAB70 80114470 00641823 */ subu $v1, $v1, $a0
/* AAB74 80114474 14600002 */ bnez $v1, .L80114480
/* AAB78 80114478 0123001A */ div $zero, $t1, $v1
/* AAB7C 8011447C 0007000D */ break 7
.L80114480:
/* AAB80 80114480 2401FFFF */ addiu $at, $zero, -0x1
/* AAB84 80114484 14610004 */ bne $v1, $at, .L80114498
/* AAB88 80114488 3C018000 */ lui $at, (0x80000000 >> 16)
/* AAB8C 8011448C 15210002 */ bne $t1, $at, .L80114498
/* AAB90 80114490 00000000 */ nop
/* AAB94 80114494 0006000D */ break 6
.L80114498:
/* AAB98 80114498 00004812 */ mflo $t1
/* AAB9C 8011449C 240601F4 */ addiu $a2, $zero, 0x1F4
/* AABA0 801144A0 00C43023 */ subu $a2, $a2, $a0
/* AABA4 801144A4 00063200 */ sll $a2, $a2, 8
/* AABA8 801144A8 14600002 */ bnez $v1, .L801144B4
/* AABAC 801144AC 00C3001A */ div $zero, $a2, $v1
/* AABB0 801144B0 0007000D */ break 7
.L801144B4:
/* AABB4 801144B4 2401FFFF */ addiu $at, $zero, -0x1
/* AABB8 801144B8 14610004 */ bne $v1, $at, .L801144CC
/* AABBC 801144BC 3C018000 */ lui $at, (0x80000000 >> 16)
/* AABC0 801144C0 14C10002 */ bne $a2, $at, .L801144CC
/* AABC4 801144C4 00000000 */ nop
/* AABC8 801144C8 0006000D */ break 6
.L801144CC:
/* AABCC 801144CC 00003012 */ mflo $a2
/* AABD0 801144D0 8D420004 */ lw $v0, 0x4($t2)
/* AABD4 801144D4 00000000 */ nop
/* AABD8 801144D8 00470018 */ mult $v0, $a3
/* AABDC 801144DC 00001812 */ mflo $v1
/* AABE0 801144E0 3C028015 */ lui $v0, %hi(mdl_bgMultiplyColorR)
/* AABE4 801144E4 9042B74D */ lbu $v0, %lo(mdl_bgMultiplyColorR)($v0)
/* AABE8 801144E8 00450018 */ mult $v0, $a1
/* AABEC 801144EC 00004012 */ mflo $t0
/* AABF0 801144F0 00684021 */ addu $t0, $v1, $t0
/* AABF4 801144F4 00000000 */ nop
/* AABF8 801144F8 010C0018 */ mult $t0, $t4
/* AABFC 801144FC 256B0008 */ addiu $t3, $t3, 0x8
/* AAC00 80114500 AE0B0000 */ sw $t3, 0x0($s0)
/* AAC04 80114504 0000A010 */ mfhi $s4
/* AAC08 80114508 8D430008 */ lw $v1, 0x8($t2)
/* AAC0C 8011450C 00000000 */ nop
/* AAC10 80114510 00670018 */ mult $v1, $a3
/* AAC14 80114514 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* AAC18 80114518 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* AAC1C 8011451C 00008812 */ mflo $s1
/* AAC20 80114520 3C038015 */ lui $v1, %hi(mdl_bgMultiplyColorG)
/* AAC24 80114524 9063B74E */ lbu $v1, %lo(mdl_bgMultiplyColorG)($v1)
/* AAC28 80114528 8C820000 */ lw $v0, 0x0($a0)
/* AAC2C 8011452C 00650018 */ mult $v1, $a1
/* AAC30 80114530 0040582D */ daddu $t3, $v0, $zero
/* AAC34 80114534 24420008 */ addiu $v0, $v0, 0x8
/* AAC38 80114538 AC820000 */ sw $v0, 0x0($a0)
/* AAC3C 8011453C 00009812 */ mflo $s3
/* AAC40 80114540 8D43000C */ lw $v1, 0xC($t2)
/* AAC44 80114544 00000000 */ nop
/* AAC48 80114548 00670018 */ mult $v1, $a3
/* AAC4C 8011454C 8E020000 */ lw $v0, 0x0($s0)
/* AAC50 80114550 3C04F800 */ lui $a0, (0xF8000000 >> 16)
/* AAC54 80114554 AD640000 */ sw $a0, 0x0($t3)
/* AAC58 80114558 02882021 */ addu $a0, $s4, $t0
/* AAC5C 8011455C 00007012 */ mflo $t6
/* AAC60 80114560 3C038015 */ lui $v1, %hi(mdl_bgMultiplyColorB)
/* AAC64 80114564 9063B74F */ lbu $v1, %lo(mdl_bgMultiplyColorB)($v1)
/* AAC68 80114568 000421C3 */ sra $a0, $a0, 7
/* AAC6C 8011456C 00650018 */ mult $v1, $a1
/* AAC70 80114570 000847C3 */ sra $t0, $t0, 31
/* AAC74 80114574 914A0013 */ lbu $t2, 0x13($t2)
/* AAC78 80114578 0040382D */ daddu $a3, $v0, $zero
/* AAC7C 8011457C 24420008 */ addiu $v0, $v0, 0x8
/* AAC80 80114580 00006812 */ mflo $t5
/* AAC84 80114584 AFAD0048 */ sw $t5, 0x48($sp)
/* AAC88 80114588 AE020000 */ sw $v0, 0x0($s0)
/* AAC8C 8011458C 02331021 */ addu $v0, $s1, $s3
/* AAC90 80114590 004C0018 */ mult $v0, $t4
/* AAC94 80114594 00882023 */ subu $a0, $a0, $t0
/* AAC98 80114598 8FAD0048 */ lw $t5, 0x48($sp)
/* AAC9C 8011459C 00042600 */ sll $a0, $a0, 24
/* AACA0 801145A0 01CD2821 */ addu $a1, $t6, $t5
/* AACA4 801145A4 00001810 */ mfhi $v1
/* AACA8 801145A8 00621821 */ addu $v1, $v1, $v0
/* AACAC 801145AC 000319C3 */ sra $v1, $v1, 7
/* AACB0 801145B0 000217C3 */ sra $v0, $v0, 31
/* AACB4 801145B4 00621823 */ subu $v1, $v1, $v0
/* AACB8 801145B8 306300FF */ andi $v1, $v1, 0xFF
/* AACBC 801145BC 00031C00 */ sll $v1, $v1, 16
/* AACC0 801145C0 00AC0018 */ mult $a1, $t4
/* AACC4 801145C4 00832025 */ or $a0, $a0, $v1
/* AACC8 801145C8 00094C00 */ sll $t1, $t1, 16
/* AACCC 801145CC 30C6FFFF */ andi $a2, $a2, 0xFFFF
/* AACD0 801145D0 01264825 */ or $t1, $t1, $a2
/* AACD4 801145D4 00004010 */ mfhi $t0
/* AACD8 801145D8 01051021 */ addu $v0, $t0, $a1
/* AACDC 801145DC 000211C3 */ sra $v0, $v0, 7
/* AACE0 801145E0 00052FC3 */ sra $a1, $a1, 31
/* AACE4 801145E4 00451023 */ subu $v0, $v0, $a1
/* AACE8 801145E8 304200FF */ andi $v0, $v0, 0xFF
/* AACEC 801145EC 00021200 */ sll $v0, $v0, 8
/* AACF0 801145F0 00822025 */ or $a0, $a0, $v0
/* AACF4 801145F4 008A2025 */ or $a0, $a0, $t2
/* AACF8 801145F8 3C02DB08 */ lui $v0, (0xDB080000 >> 16)
/* AACFC 801145FC AD640004 */ sw $a0, 0x4($t3)
/* AAD00 80114600 ACE20000 */ sw $v0, 0x0($a3)
/* AAD04 80114604 080451A4 */ j .L80114690
/* AAD08 80114608 ACE90004 */ sw $t1, 0x4($a3)
glabel .L8011460C
/* AAD0C 8011460C 2682FFFF */ addiu $v0, $s4, -0x1
/* AAD10 80114610 00021600 */ sll $v0, $v0, 24
/* AAD14 80114614 00021E03 */ sra $v1, $v0, 24
/* AAD18 80114618 2C62002F */ sltiu $v0, $v1, 0x2F
/* AAD1C 8011461C 10400010 */ beqz $v0, .L80114660
/* AAD20 80114620 00031080 */ sll $v0, $v1, 2
/* AAD24 80114624 3C018015 */ lui $at, %hi(jtbl_8014FDA0)
/* AAD28 80114628 00220821 */ addu $at, $at, $v0
/* AAD2C 8011462C 8C22FDA0 */ lw $v0, %lo(jtbl_8014FDA0)($at)
/* AAD30 80114630 00400008 */ jr $v0
/* AAD34 80114634 00000000 */ nop
glabel .L80114638
/* AAD38 80114638 08045199 */ j .L80114664
/* AAD3C 8011463C 24050021 */ addiu $a1, $zero, 0x21
glabel .L80114640
/* AAD40 80114640 08045199 */ j .L80114664
/* AAD44 80114644 24050023 */ addiu $a1, $zero, 0x23
glabel .L80114648
/* AAD48 80114648 08045199 */ j .L80114664
/* AAD4C 8011464C 24050025 */ addiu $a1, $zero, 0x25
glabel .L80114650
/* AAD50 80114650 08045199 */ j .L80114664
/* AAD54 80114654 2405003B */ addiu $a1, $zero, 0x3B
glabel .L80114658
/* AAD58 80114658 08045199 */ j .L80114664
/* AAD5C 8011465C 2405003C */ addiu $a1, $zero, 0x3C
glabel .L80114660
/* AAD60 80114660 2405001F */ addiu $a1, $zero, 0x1F
.L80114664:
/* AAD64 80114664 8E030000 */ lw $v1, 0x0($s0)
/* AAD68 80114668 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* AAD6C 8011466C 0060202D */ daddu $a0, $v1, $zero
/* AAD70 80114670 AC820000 */ sw $v0, 0x0($a0)
/* AAD74 80114674 00051080 */ sll $v0, $a1, 2
/* AAD78 80114678 3C018015 */ lui $at, %hi(D_8014AFC0)
/* AAD7C 8011467C 00220821 */ addu $at, $at, $v0
/* AAD80 80114680 8C22AFC0 */ lw $v0, %lo(D_8014AFC0)($at)
/* AAD84 80114684 24630008 */ addiu $v1, $v1, 0x8
/* AAD88 80114688 AE030000 */ sw $v1, 0x0($s0)
/* AAD8C 8011468C AC820004 */ sw $v0, 0x4($a0)
glabel .L80114690
/* AAD90 80114690 33020008 */ andi $v0, $t8, 0x8
/* AAD94 80114694 14400016 */ bnez $v0, .L801146F0
/* AAD98 80114698 33022000 */ andi $v0, $t8, 0x2000
/* AAD9C 8011469C 14400023 */ bnez $v0, .L8011472C
/* AADA0 801146A0 33020010 */ andi $v0, $t8, 0x10
/* AADA4 801146A4 3C03DA38 */ lui $v1, (0xDA380000 >> 16)
/* AADA8 801146A8 8E040000 */ lw $a0, 0x0($s0)
/* AADAC 801146AC 8FAD0038 */ lw $t5, 0x38($sp)
/* AADB0 801146B0 0080282D */ daddu $a1, $a0, $zero
/* AADB4 801146B4 01B71025 */ or $v0, $t5, $s7
/* AADB8 801146B8 38420001 */ xori $v0, $v0, 0x1
/* AADBC 801146BC 00431025 */ or $v0, $v0, $v1
/* AADC0 801146C0 ACA20000 */ sw $v0, 0x0($a1)
/* AADC4 801146C4 8EC20010 */ lw $v0, 0x10($s6)
/* AADC8 801146C8 24840008 */ addiu $a0, $a0, 0x8
/* AADCC 801146CC AE040000 */ sw $a0, 0x0($s0)
/* AADD0 801146D0 12E00002 */ beqz $s7, .L801146DC
/* AADD4 801146D4 ACA20004 */ sw $v0, 0x4($a1)
/* AADD8 801146D8 0000B82D */ daddu $s7, $zero, $zero
.L801146DC:
/* AADDC 801146DC 8FAF0038 */ lw $t7, 0x38($sp)
/* AADE0 801146E0 55E00011 */ bnel $t7, $zero, .L80114728
/* AADE4 801146E4 AFA00038 */ sw $zero, 0x38($sp)
/* AADE8 801146E8 080451CB */ j .L8011472C
/* AADEC 801146EC 33020010 */ andi $v0, $t8, 0x10
.L801146F0:
/* AADF0 801146F0 1440000D */ bnez $v0, .L80114728
/* AADF4 801146F4 AFA00038 */ sw $zero, 0x38($sp)
/* AADF8 801146F8 3AE20001 */ xori $v0, $s7, 0x1
/* AADFC 801146FC 3C03DA38 */ lui $v1, (0xDA380000 >> 16)
/* AAE00 80114700 8E040000 */ lw $a0, 0x0($s0)
/* AAE04 80114704 00431025 */ or $v0, $v0, $v1
/* AAE08 80114708 0080282D */ daddu $a1, $a0, $zero
/* AAE0C 8011470C ACA20000 */ sw $v0, 0x0($a1)
/* AAE10 80114710 8EC20010 */ lw $v0, 0x10($s6)
/* AAE14 80114714 24840008 */ addiu $a0, $a0, 0x8
/* AAE18 80114718 AE040000 */ sw $a0, 0x0($s0)
/* AAE1C 8011471C 12E00002 */ beqz $s7, .L80114728
/* AAE20 80114720 ACA20004 */ sw $v0, 0x4($a1)
/* AAE24 80114724 0000B82D */ daddu $s7, $zero, $zero
.L80114728:
/* AAE28 80114728 33020010 */ andi $v0, $t8, 0x10
.L8011472C:
/* AAE2C 8011472C 10400018 */ beqz $v0, .L80114790
/* AAE30 80114730 00000000 */ nop
/* AAE34 80114734 92C200A5 */ lbu $v0, 0xA5($s6)
/* AAE38 80114738 3C038015 */ lui $v1, %hi(gCurrentCustomModelGfxPtr)
/* AAE3C 8011473C 246312E8 */ addiu $v1, $v1, %lo(gCurrentCustomModelGfxPtr)
/* AAE40 80114740 3042000F */ andi $v0, $v0, 0xF
/* AAE44 80114744 00021040 */ sll $v0, $v0, 1
/* AAE48 80114748 A7A20036 */ sh $v0, 0x36($sp)
/* AAE4C 8011474C 97B50036 */ lhu $s5, 0x36($sp)
/* AAE50 80114750 8C620000 */ lw $v0, 0x0($v1)
/* AAE54 80114754 00153080 */ sll $a2, $s5, 2
/* AAE58 80114758 00C21021 */ addu $v0, $a2, $v0
/* AAE5C 8011475C 8C420000 */ lw $v0, 0x0($v0)
/* AAE60 80114760 1040000B */ beqz $v0, .L80114790
/* AAE64 80114764 00000000 */ nop
/* AAE68 80114768 8E040000 */ lw $a0, 0x0($s0)
/* AAE6C 8011476C 8C620000 */ lw $v0, 0x0($v1)
/* AAE70 80114770 3C03DE00 */ lui $v1, (0xDE000000 >> 16)
/* AAE74 80114774 0080282D */ daddu $a1, $a0, $zero
/* AAE78 80114778 00C21021 */ addu $v0, $a2, $v0
/* AAE7C 8011477C ACA30000 */ sw $v1, 0x0($a1)
/* AAE80 80114780 8C420000 */ lw $v0, 0x0($v0)
/* AAE84 80114784 24840008 */ addiu $a0, $a0, 0x8
/* AAE88 80114788 AE040000 */ sw $a0, 0x0($s0)
/* AAE8C 8011478C ACA20004 */ sw $v0, 0x4($a1)
.L80114790:
/* AAE90 80114790 12400093 */ beqz $s2, .L801149E0
/* AAE94 80114794 33020800 */ andi $v0, $t8, 0x800
/* AAE98 80114798 10400092 */ beqz $v0, .L801149E4
/* AAE9C 8011479C 33020100 */ andi $v0, $t8, 0x100
/* AAEA0 801147A0 92C200A4 */ lbu $v0, 0xA4($s6)
/* AAEA4 801147A4 00021080 */ sll $v0, $v0, 2
/* AAEA8 801147A8 3C038015 */ lui $v1, %hi(texPannerMainU)
/* AAEAC 801147AC 00621821 */ addu $v1, $v1, $v0
/* AAEB0 801147B0 8C633268 */ lw $v1, %lo(texPannerMainU)($v1)
/* AAEB4 801147B4 3C048015 */ lui $a0, %hi(texPannerMainV)
/* AAEB8 801147B8 00822021 */ addu $a0, $a0, $v0
/* AAEBC 801147BC 8C8432A8 */ lw $a0, %lo(texPannerMainV)($a0)
/* AAEC0 801147C0 00033A03 */ sra $a3, $v1, 8
/* AAEC4 801147C4 00044203 */ sra $t0, $a0, 8
/* AAEC8 801147C8 3C038015 */ lui $v1, %hi(texPannerAuxU)
/* AAECC 801147CC 00621821 */ addu $v1, $v1, $v0
/* AAED0 801147D0 8C6332E8 */ lw $v1, %lo(texPannerAuxU)($v1)
/* AAED4 801147D4 3C018015 */ lui $at, %hi(texPannerAuxV)
/* AAED8 801147D8 00220821 */ addu $at, $at, $v0
/* AAEDC 801147DC 8C223328 */ lw $v0, %lo(texPannerAuxV)($at)
/* AAEE0 801147E0 00025203 */ sra $t2, $v0, 8
/* AAEE4 801147E4 24020002 */ addiu $v0, $zero, 0x2
/* AAEE8 801147E8 13C20006 */ beq $fp, $v0, .L80114804
/* AAEEC 801147EC 00034A03 */ sra $t1, $v1, 8
/* AAEF0 801147F0 24020003 */ addiu $v0, $zero, 0x3
/* AAEF4 801147F4 13C20035 */ beq $fp, $v0, .L801148CC
/* AAEF8 801147F8 30E30FFF */ andi $v1, $a3, 0xFFF
/* AAEFC 801147FC 08045262 */ j .L80114988
/* AAF00 80114800 00031B00 */ sll $v1, $v1, 12
.L80114804:
/* AAF04 80114804 30E30FFF */ andi $v1, $a3, 0xFFF
/* AAF08 80114808 00031B00 */ sll $v1, $v1, 12
/* AAF0C 8011480C 8E020000 */ lw $v0, 0x0($s0)
/* AAF10 80114810 3C05F200 */ lui $a1, (0xF2000000 >> 16)
/* AAF14 80114814 0040302D */ daddu $a2, $v0, $zero
/* AAF18 80114818 24420008 */ addiu $v0, $v0, 0x8
/* AAF1C 8011481C AE020000 */ sw $v0, 0x0($s0)
/* AAF20 80114820 31020FFF */ andi $v0, $t0, 0xFFF
/* AAF24 80114824 00451025 */ or $v0, $v0, $a1
/* AAF28 80114828 00621825 */ or $v1, $v1, $v0
/* AAF2C 8011482C ACC30000 */ sw $v1, 0x0($a2)
/* AAF30 80114830 96430022 */ lhu $v1, 0x22($s2)
/* AAF34 80114834 8E040000 */ lw $a0, 0x0($s0)
/* AAF38 80114838 96420026 */ lhu $v0, 0x26($s2)
/* AAF3C 8011483C 2463FFFF */ addiu $v1, $v1, -0x1
/* AAF40 80114840 00031880 */ sll $v1, $v1, 2
/* AAF44 80114844 00671821 */ addu $v1, $v1, $a3
/* AAF48 80114848 30630FFF */ andi $v1, $v1, 0xFFF
/* AAF4C 8011484C 00031B00 */ sll $v1, $v1, 12
/* AAF50 80114850 00021042 */ srl $v0, $v0, 1
/* AAF54 80114854 2442FFFF */ addiu $v0, $v0, -0x1
/* AAF58 80114858 00021080 */ sll $v0, $v0, 2
/* AAF5C 8011485C 00481021 */ addu $v0, $v0, $t0
/* AAF60 80114860 30420FFF */ andi $v0, $v0, 0xFFF
/* AAF64 80114864 00621825 */ or $v1, $v1, $v0
/* AAF68 80114868 ACC30004 */ sw $v1, 0x4($a2)
/* AAF6C 8011486C 0080302D */ daddu $a2, $a0, $zero
/* AAF70 80114870 31230FFF */ andi $v1, $t1, 0xFFF
/* AAF74 80114874 00031B00 */ sll $v1, $v1, 12
/* AAF78 80114878 31420FFF */ andi $v0, $t2, 0xFFF
/* AAF7C 8011487C 00451025 */ or $v0, $v0, $a1
/* AAF80 80114880 00621825 */ or $v1, $v1, $v0
/* AAF84 80114884 ACC30000 */ sw $v1, 0x0($a2)
/* AAF88 80114888 96430022 */ lhu $v1, 0x22($s2)
/* AAF8C 8011488C 24840008 */ addiu $a0, $a0, 0x8
/* AAF90 80114890 AE040000 */ sw $a0, 0x0($s0)
/* AAF94 80114894 3C040100 */ lui $a0, (0x1000000 >> 16)
/* AAF98 80114898 96420026 */ lhu $v0, 0x26($s2)
/* AAF9C 8011489C 2463FFFF */ addiu $v1, $v1, -0x1
/* AAFA0 801148A0 00031880 */ sll $v1, $v1, 2
/* AAFA4 801148A4 00691821 */ addu $v1, $v1, $t1
/* AAFA8 801148A8 30630FFF */ andi $v1, $v1, 0xFFF
/* AAFAC 801148AC 00031B00 */ sll $v1, $v1, 12
/* AAFB0 801148B0 00021042 */ srl $v0, $v0, 1
/* AAFB4 801148B4 2442FFFF */ addiu $v0, $v0, -0x1
/* AAFB8 801148B8 00021080 */ sll $v0, $v0, 2
/* AAFBC 801148BC 004A1021 */ addu $v0, $v0, $t2
/* AAFC0 801148C0 30420FFF */ andi $v0, $v0, 0xFFF
/* AAFC4 801148C4 08045276 */ j .L801149D8
/* AAFC8 801148C8 00441025 */ or $v0, $v0, $a0
.L801148CC:
/* AAFCC 801148CC 00031B00 */ sll $v1, $v1, 12
/* AAFD0 801148D0 8E020000 */ lw $v0, 0x0($s0)
/* AAFD4 801148D4 3C05F200 */ lui $a1, (0xF2000000 >> 16)
/* AAFD8 801148D8 0040302D */ daddu $a2, $v0, $zero
/* AAFDC 801148DC 24420008 */ addiu $v0, $v0, 0x8
/* AAFE0 801148E0 AE020000 */ sw $v0, 0x0($s0)
/* AAFE4 801148E4 31020FFF */ andi $v0, $t0, 0xFFF
/* AAFE8 801148E8 00451025 */ or $v0, $v0, $a1
/* AAFEC 801148EC 00621825 */ or $v1, $v1, $v0
/* AAFF0 801148F0 ACC30000 */ sw $v1, 0x0($a2)
/* AAFF4 801148F4 96430022 */ lhu $v1, 0x22($s2)
/* AAFF8 801148F8 8E040000 */ lw $a0, 0x0($s0)
/* AAFFC 801148FC 96420026 */ lhu $v0, 0x26($s2)
/* AB000 80114900 2463FFFF */ addiu $v1, $v1, -0x1
/* AB004 80114904 00031880 */ sll $v1, $v1, 2
/* AB008 80114908 00671821 */ addu $v1, $v1, $a3
/* AB00C 8011490C 30630FFF */ andi $v1, $v1, 0xFFF
/* AB010 80114910 00031B00 */ sll $v1, $v1, 12
/* AB014 80114914 2442FFFF */ addiu $v0, $v0, -0x1
/* AB018 80114918 00021080 */ sll $v0, $v0, 2
/* AB01C 8011491C 00481021 */ addu $v0, $v0, $t0
/* AB020 80114920 30420FFF */ andi $v0, $v0, 0xFFF
/* AB024 80114924 00621825 */ or $v1, $v1, $v0
/* AB028 80114928 ACC30004 */ sw $v1, 0x4($a2)
/* AB02C 8011492C 0080302D */ daddu $a2, $a0, $zero
/* AB030 80114930 31230FFF */ andi $v1, $t1, 0xFFF
/* AB034 80114934 00031B00 */ sll $v1, $v1, 12
/* AB038 80114938 31420FFF */ andi $v0, $t2, 0xFFF
/* AB03C 8011493C 00451025 */ or $v0, $v0, $a1
/* AB040 80114940 00621825 */ or $v1, $v1, $v0
/* AB044 80114944 ACC30000 */ sw $v1, 0x0($a2)
/* AB048 80114948 96430020 */ lhu $v1, 0x20($s2)
/* AB04C 8011494C 24840008 */ addiu $a0, $a0, 0x8
/* AB050 80114950 AE040000 */ sw $a0, 0x0($s0)
/* AB054 80114954 3C040100 */ lui $a0, (0x1000000 >> 16)
/* AB058 80114958 96420024 */ lhu $v0, 0x24($s2)
/* AB05C 8011495C 2463FFFF */ addiu $v1, $v1, -0x1
/* AB060 80114960 00031880 */ sll $v1, $v1, 2
/* AB064 80114964 00691821 */ addu $v1, $v1, $t1
/* AB068 80114968 30630FFF */ andi $v1, $v1, 0xFFF
/* AB06C 8011496C 00031B00 */ sll $v1, $v1, 12
/* AB070 80114970 2442FFFF */ addiu $v0, $v0, -0x1
/* AB074 80114974 00021080 */ sll $v0, $v0, 2
/* AB078 80114978 004A1021 */ addu $v0, $v0, $t2
/* AB07C 8011497C 30420FFF */ andi $v0, $v0, 0xFFF
/* AB080 80114980 08045276 */ j .L801149D8
/* AB084 80114984 00441025 */ or $v0, $v0, $a0
.L80114988:
/* AB088 80114988 31020FFF */ andi $v0, $t0, 0xFFF
/* AB08C 8011498C 3C04F200 */ lui $a0, (0xF2000000 >> 16)
/* AB090 80114990 00441025 */ or $v0, $v0, $a0
/* AB094 80114994 8E050000 */ lw $a1, 0x0($s0)
/* AB098 80114998 00621825 */ or $v1, $v1, $v0
/* AB09C 8011499C 00A0302D */ daddu $a2, $a1, $zero
/* AB0A0 801149A0 ACC30000 */ sw $v1, 0x0($a2)
/* AB0A4 801149A4 96430022 */ lhu $v1, 0x22($s2)
/* AB0A8 801149A8 24A50008 */ addiu $a1, $a1, 0x8
/* AB0AC 801149AC AE050000 */ sw $a1, 0x0($s0)
/* AB0B0 801149B0 96420026 */ lhu $v0, 0x26($s2)
/* AB0B4 801149B4 2463FFFF */ addiu $v1, $v1, -0x1
/* AB0B8 801149B8 00031880 */ sll $v1, $v1, 2
/* AB0BC 801149BC 00671821 */ addu $v1, $v1, $a3
/* AB0C0 801149C0 30630FFF */ andi $v1, $v1, 0xFFF
/* AB0C4 801149C4 00031B00 */ sll $v1, $v1, 12
/* AB0C8 801149C8 2442FFFF */ addiu $v0, $v0, -0x1
/* AB0CC 801149CC 00021080 */ sll $v0, $v0, 2
/* AB0D0 801149D0 00481021 */ addu $v0, $v0, $t0
/* AB0D4 801149D4 30420FFF */ andi $v0, $v0, 0xFFF
.L801149D8:
/* AB0D8 801149D8 00621825 */ or $v1, $v1, $v0
/* AB0DC 801149DC ACC30004 */ sw $v1, 0x4($a2)
.L801149E0:
/* AB0E0 801149E0 33020100 */ andi $v0, $t8, 0x100
.L801149E4:
/* AB0E4 801149E4 1040001A */ beqz $v0, .L80114A50
/* AB0E8 801149E8 3C04DA38 */ lui $a0, (0xDA380000 >> 16)
/* AB0EC 801149EC 8E050000 */ lw $a1, 0x0($s0)
/* AB0F0 801149F0 8FB90038 */ lw $t9, 0x38($sp)
/* AB0F4 801149F4 3C03800A */ lui $v1, %hi(gCurrentCamID)
/* AB0F8 801149F8 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1)
/* AB0FC 801149FC 00A0302D */ daddu $a2, $a1, $zero
/* AB100 80114A00 03371025 */ or $v0, $t9, $s7
/* AB104 80114A04 38420001 */ xori $v0, $v0, 0x1
/* AB108 80114A08 00441025 */ or $v0, $v0, $a0
/* AB10C 80114A0C ACC20000 */ sw $v0, 0x0($a2)
/* AB110 80114A10 00031080 */ sll $v0, $v1, 2
/* AB114 80114A14 00431021 */ addu $v0, $v0, $v1
/* AB118 80114A18 00021080 */ sll $v0, $v0, 2
/* AB11C 80114A1C 00431023 */ subu $v0, $v0, $v1
/* AB120 80114A20 000218C0 */ sll $v1, $v0, 3
/* AB124 80114A24 00431021 */ addu $v0, $v0, $v1
/* AB128 80114A28 000210C0 */ sll $v0, $v0, 3
/* AB12C 80114A2C 3C01800B */ lui $at, %hi(gCameras + 0x204)
/* AB130 80114A30 00220821 */ addu $at, $at, $v0
/* AB134 80114A34 8C221F84 */ lw $v0, %lo(gCameras + 0x204)($at)
/* AB138 80114A38 24A50008 */ addiu $a1, $a1, 0x8
/* AB13C 80114A3C AE050000 */ sw $a1, 0x0($s0)
/* AB140 80114A40 12E00002 */ beqz $s7, .L80114A4C
/* AB144 80114A44 ACC20004 */ sw $v0, 0x4($a2)
/* AB148 80114A48 0000B82D */ daddu $s7, $zero, $zero
.L80114A4C:
/* AB14C 80114A4C 8FAD0038 */ lw $t5, 0x38($sp)
.L80114A50:
/* AB150 80114A50 33020080 */ andi $v0, $t8, 0x80
/* AB154 80114A54 1440000C */ bnez $v0, .L80114A88
/* AB158 80114A58 33020010 */ andi $v0, $t8, 0x10
/* AB15C 80114A5C 8E030000 */ lw $v1, 0x0($s0)
/* AB160 80114A60 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* AB164 80114A64 0060202D */ daddu $a0, $v1, $zero
/* AB168 80114A68 AC820000 */ sw $v0, 0x0($a0)
/* AB16C 80114A6C 8FAF0028 */ lw $t7, 0x28($sp)
/* AB170 80114A70 8DE20004 */ lw $v0, 0x4($t7)
/* AB174 80114A74 8C420000 */ lw $v0, 0x0($v0)
/* AB178 80114A78 24630008 */ addiu $v1, $v1, 0x8
/* AB17C 80114A7C AE030000 */ sw $v1, 0x0($s0)
/* AB180 80114A80 AC820004 */ sw $v0, 0x4($a0)
/* AB184 80114A84 33020010 */ andi $v0, $t8, 0x10
.L80114A88:
/* AB188 80114A88 10400016 */ beqz $v0, .L80114AE4
/* AB18C 80114A8C 00000000 */ nop
/* AB190 80114A90 97B50036 */ lhu $s5, 0x36($sp)
/* AB194 80114A94 3C078015 */ lui $a3, %hi(gCurrentCustomModelGfxPtr)
/* AB198 80114A98 24E712E8 */ addiu $a3, $a3, %lo(gCurrentCustomModelGfxPtr)
/* AB19C 80114A9C 26B50001 */ addiu $s5, $s5, 0x1
/* AB1A0 80114AA0 A7B50036 */ sh $s5, 0x36($sp)
/* AB1A4 80114AA4 32A2FFFF */ andi $v0, $s5, 0xFFFF
/* AB1A8 80114AA8 8CE30000 */ lw $v1, 0x0($a3)
/* AB1AC 80114AAC 00023080 */ sll $a2, $v0, 2
/* AB1B0 80114AB0 00C31821 */ addu $v1, $a2, $v1
/* AB1B4 80114AB4 8C620000 */ lw $v0, 0x0($v1)
/* AB1B8 80114AB8 1040000A */ beqz $v0, .L80114AE4
/* AB1BC 80114ABC 3C03DE00 */ lui $v1, (0xDE000000 >> 16)
/* AB1C0 80114AC0 8E040000 */ lw $a0, 0x0($s0)
/* AB1C4 80114AC4 8CE20000 */ lw $v0, 0x0($a3)
/* AB1C8 80114AC8 0080282D */ daddu $a1, $a0, $zero
/* AB1CC 80114ACC 00C21021 */ addu $v0, $a2, $v0
/* AB1D0 80114AD0 ACA30000 */ sw $v1, 0x0($a1)
/* AB1D4 80114AD4 8C420000 */ lw $v0, 0x0($v0)
/* AB1D8 80114AD8 24840008 */ addiu $a0, $a0, 0x8
/* AB1DC 80114ADC AE040000 */ sw $a0, 0x0($s0)
/* AB1E0 80114AE0 ACA20004 */ sw $v0, 0x4($a1)
.L80114AE4:
/* AB1E4 80114AE4 16E00009 */ bnez $s7, .L80114B0C
/* AB1E8 80114AE8 3C04D838 */ lui $a0, (0xD8380002 >> 16)
/* AB1EC 80114AEC 8E020000 */ lw $v0, 0x0($s0)
/* AB1F0 80114AF0 34840002 */ ori $a0, $a0, (0xD8380002 & 0xFFFF)
/* AB1F4 80114AF4 0040182D */ daddu $v1, $v0, $zero
/* AB1F8 80114AF8 24420008 */ addiu $v0, $v0, 0x8
/* AB1FC 80114AFC AE020000 */ sw $v0, 0x0($s0)
/* AB200 80114B00 24020040 */ addiu $v0, $zero, 0x40
/* AB204 80114B04 AC640000 */ sw $a0, 0x0($v1)
/* AB208 80114B08 AC620004 */ sw $v0, 0x4($v1)
.L80114B0C:
/* AB20C 80114B0C 8E020000 */ lw $v0, 0x0($s0)
/* AB210 80114B10 0040182D */ daddu $v1, $v0, $zero
/* AB214 80114B14 24420008 */ addiu $v0, $v0, 0x8
/* AB218 80114B18 AE020000 */ sw $v0, 0x0($s0)
/* AB21C 80114B1C 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* AB220 80114B20 AC620000 */ sw $v0, 0x0($v1)
/* AB224 80114B24 AC600004 */ sw $zero, 0x4($v1)
.L80114B28:
/* AB228 80114B28 8FBF0074 */ lw $ra, 0x74($sp)
/* AB22C 80114B2C 8FBE0070 */ lw $fp, 0x70($sp)
/* AB230 80114B30 8FB7006C */ lw $s7, 0x6C($sp)
/* AB234 80114B34 8FB60068 */ lw $s6, 0x68($sp)
/* AB238 80114B38 8FB50064 */ lw $s5, 0x64($sp)
/* AB23C 80114B3C 8FB40060 */ lw $s4, 0x60($sp)
/* AB240 80114B40 8FB3005C */ lw $s3, 0x5C($sp)
/* AB244 80114B44 8FB20058 */ lw $s2, 0x58($sp)
/* AB248 80114B48 8FB10054 */ lw $s1, 0x54($sp)
/* AB24C 80114B4C 8FB00050 */ lw $s0, 0x50($sp)
/* AB250 80114B50 03E00008 */ jr $ra
/* AB254 80114B54 27BD0078 */ addiu $sp, $sp, 0x78
### DECOMPILED C INSTRUCTIONS:
void appendGfx_model(void* data) {
Model* model = data;
s32 mtxPushMode;
TextureHandle* textureHandle;
TextureHeader* textureHeader;
u32 extraTileType;
s8 renderMode;
s32 texturingMode;
s32 renderModeIdx;
s32 flags = model->flags;
ModelNode* modelNode;
u16 customGfxIndex;
s32 mtxLoadMode;
s32 combineSubType;
ModelNodeProperty* prop;
s32 temp;
s32 fogMin, fogMax;
s32 fogR, fogG, fogB, fogA;
Gfx** gfxPos = &gMainGfxPos;
mtxPushMode = G_MTX_PUSH;
mtxLoadMode = G_MTX_LOAD;
modelNode = model->modelNode;
if (model->textureID != 0) {
textureHandle = &mdl_textureHandles[model->textureID + model->textureVariation];
textureHeader = &textureHandle->header;
if (textureHandle->gfx != NULL) {
extraTileType = textureHandle->header.extraTiles;
} else {
textureHeader = NULL;
}
} else {
textureHandle = NULL;
textureHeader = NULL;
}
renderMode = model->renderMode;
combineSubType = 0;
if (textureHeader != NULL) {
switch (extraTileType) {
case EXTRA_TILE_NONE:
texturingMode = 1;
break;
case EXTRA_TILE_MIPMAPS:
case EXTRA_TILE_AUX_SAME_AS_MAIN:
case EXTRA_TILE_AUX_INDEPENDENT:
texturingMode = 2;
break;
default:
texturingMode = 1;
break;
}
} else {
texturingMode = 1;
}
if ((textureHeader != NULL || renderMode <= RENDER_MODE_ALPHATEST_NO_ZB) && gCurrentFogSettings->enabled && !(flags & MODEL_FLAG_FLAG_40)) {
texturingMode = 3;
combineSubType = 1;
}
// fog mode
switch ((u32)(model->customGfxIndex >> 4)) {
case FOG_MODE_1:
texturingMode += 3;
combineSubType = 2;
break;
case FOG_MODE_2:
if (renderMode <= RENDER_MODE_ALPHATEST_NO_ZB) {
gDPSetPrimColor((*gfxPos)++, 0, 0, mdl_renderModelFogPrimColorR,
mdl_renderModelFogPrimColorG,
mdl_renderModelFogPrimColorB,
mdl_renderModelFogPrimColorA);
gDPSetFogColor((*gfxPos)++, mdl_renderModelFogColorR,
mdl_renderModelFogColorG,
mdl_renderModelFogColorB, 0);
gSPFogPosition((*gfxPos)++, mdl_renderModelFogStart, mdl_renderModelFogEnd);
texturingMode += 9;
combineSubType = 3;
}
break;
case FOG_MODE_3:
texturingMode = 2;
combineSubType = 4;
gDPSetPrimColor((*gfxPos)++, 0, 0, gRenderModelPrimR,
gRenderModelPrimG,
gRenderModelPrimB, 255);
gDPSetEnvColor((*gfxPos)++, gRenderModelEnvR,
gRenderModelEnvG,
gRenderModelEnvB, 255);
break;
}
gDPPipeSync((*gfxPos)++);
if (model->groupData != NULL) {
Lightsn* lightningGroup = model->groupData->lightingGroup;
if (model->groupData->lightingGroup != NULL) {
switch (model->groupData->numLights) {
case 0:
gSPSetLights0((*gfxPos)++, lightningGroup[0]);
break;
case 1:
gSPSetLights1((*gfxPos)++, lightningGroup[0]);
break;
case 2:
gSPSetLights2((*gfxPos)++, lightningGroup[0]);
break;
case 3:
gSPSetLights3((*gfxPos)++, lightningGroup[0]);
break;
case 4:
gSPSetLights4((*gfxPos)++, lightningGroup[0]);
break;
case 5:
gSPSetLights5((*gfxPos)++, lightningGroup[0]);
break;
case 6:
gSPSetLights6((*gfxPos)++, lightningGroup[0]);
break;
case 7:
gSPSetLights7((*gfxPos)++, lightningGroup[0]);
break;
}
}
}
if (textureHeader != NULL) {
switch (extraTileType) {
case EXTRA_TILE_AUX_INDEPENDENT:
case EXTRA_TILE_4:
prop = get_model_property(modelNode, MODEL_PROP_KEY_SPECIAL);
if (prop != NULL) {
s32 v1 = prop->data.s;
u16 a2 = prop->dataType;
s32 a1 = prop->dataType;
func_801180E8(textureHeader, gfxPos, textureHandle->raster, textureHandle->palette, textureHandle->auxRaster, textureHandle->auxPalette,
(v1 >> 12) & 0xF, (v1 >> 16) & 0xF,
a2 & 0xFFF, (a1 >> 12) & 0xFFF);
} else {
gSPDisplayList((*gfxPos)++, textureHandle->gfx);
}
break;
default:
gSPDisplayList((*gfxPos)++, textureHandle->gfx);
break;
}
} else {
gSPTexture((*gfxPos)++, 0, 0, 0, G_TX_RENDERTILE, G_OFF);
gDPSetCombineMode((*gfxPos)++, G_CC_SHADE, G_CC_SHADE);
gDPSetColorDither((*gfxPos)++, G_CD_MAGICSQ);
gDPSetAlphaDither((*gfxPos)++, G_AD_PATTERN);
}
if (combineSubType != 0 || renderMode == RENDER_MODE_ALPHATEST || renderMode == RENDER_MODE_ALPHATEST_ONESIDED) {
u32 v1 = 0;
if (textureHeader != NULL) {
u32 colorCombineType = textureHeader->colorCombineType;
if (colorCombineType >= 3) {
v1 = colorCombineType + 10;
} else {
v1 = extraTileType * 3 + 1 + textureHeader->colorCombineSubType;
}
}
if (renderMode != RENDER_MODE_ALPHATEST && renderMode != RENDER_MODE_ALPHATEST_ONESIDED) {
*(*gfxPos) = D_8014B0B8[v1][combineSubType];
} else {
*(*gfxPos) = D_8014B400[v1][combineSubType];
}
(*gfxPos)++;
}
switch (texturingMode) {
case 1:
switch (renderMode) {
case RENDER_MODE_SURFACE_OPA:
renderModeIdx = 0;
break;
case RENDER_MODE_SURFACE_OPA_NO_AA:
renderModeIdx = 1;
break;
case RENDER_MODE_DECAL_OPA:
renderModeIdx = 2;
break;
case RENDER_MODE_DECAL_OPA_NO_AA:
renderModeIdx = 3;
break;
case RENDER_MODE_INTERSECTING_OPA:
renderModeIdx = 4;
break;
case RENDER_MODE_ALPHATEST:
renderModeIdx = 6;
break;
case RENDER_MODE_ALPHATEST_ONESIDED:
renderModeIdx = 7;
break;
case RENDER_MODE_SURFXLU_AA_ZB_ZUPD:
renderModeIdx = 9;
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
case RENDER_MODE_SURFACE_XLU_LAYER2:
case RENDER_MODE_SURFACE_XLU_LAYER3:
renderModeIdx = 8;
break;
case RENDER_MODE_SURFACE_XLU_NO_AA:
renderModeIdx = 10;
break;
case RENDER_MODE_SURFXLU_ZB_ZUPD:
renderModeIdx = 11;
break;
case RENDER_MODE_DECAL_XLU:
renderModeIdx = 12;
break;
case RENDER_MODE_DECAL_XLU_NOAA:
renderModeIdx = 13;
break;
case RENDER_MODE_INTERSECTING_XLU:
renderModeIdx = 14;
break;
case RENDER_MODE_SURFACE_OPA_NO_ZB:
renderModeIdx = 0x2E;
break;
case RENDER_MODE_ALPHATEST_NO_ZB:
renderModeIdx = 0x2F;
break;
case RENDER_MODE_SURFACE_XLU_NO_ZB:
renderModeIdx = 0x30;
break;
case RENDER_MODE_CLOUD:
renderModeIdx = 0x37;
break;
case RENDER_MODE_CLOUD_NO_ZB:
renderModeIdx = 0x38;
break;
default:
renderModeIdx = 0;
break;
}
gSPDisplayList((*gfxPos)++, D_8014AFC0[renderModeIdx]);
break;
case 2:
switch (renderMode) {
case RENDER_MODE_SURFACE_OPA_NO_AA:
renderModeIdx = 0x11;
break;
case RENDER_MODE_DECAL_OPA:
renderModeIdx = 0x12;
break;
case RENDER_MODE_DECAL_OPA_NO_AA:
renderModeIdx = 0x13;
break;
case RENDER_MODE_INTERSECTING_OPA:
renderModeIdx = 0x14;
break;
case RENDER_MODE_ALPHATEST:
renderModeIdx = 0x16;
break;
case RENDER_MODE_ALPHATEST_ONESIDED:
renderModeIdx = 0x17;
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
case RENDER_MODE_SURFACE_XLU_LAYER2:
case RENDER_MODE_SURFACE_XLU_LAYER3:
renderModeIdx = 0x18;
break;
case RENDER_MODE_SURFXLU_AA_ZB_ZUPD:
renderModeIdx = 0x19;
break;
case RENDER_MODE_SURFACE_XLU_NO_AA:
renderModeIdx = 0x1A;
break;
case RENDER_MODE_DECAL_XLU:
renderModeIdx = 0x1B;
break;
case RENDER_MODE_DECAL_XLU_NOAA:
renderModeIdx = 0x1C;
break;
case RENDER_MODE_INTERSECTING_XLU:
renderModeIdx = 0x1D;
break;
case RENDER_MODE_SURFACE_OPA_NO_ZB:
renderModeIdx = 0x31;
break;
case RENDER_MODE_ALPHATEST_NO_ZB:
renderModeIdx = 0x32;
break;
case RENDER_MODE_SURFACE_XLU_NO_ZB:
renderModeIdx = 0x33;
break;
case RENDER_MODE_CLOUD:
renderModeIdx = 0x39;
break;
case RENDER_MODE_CLOUD_NO_ZB:
renderModeIdx = 0x3A;
break;
case RENDER_MODE_SURFACE_OPA:
renderModeIdx = 0x10;
break;
default:
renderModeIdx = 0x10;
break;
}
gSPDisplayList((*gfxPos)++, D_8014AFC0[renderModeIdx]);
break;
case 3:
temp = 0x25; // required to match
switch (renderMode) {
case RENDER_MODE_SURFACE_OPA_NO_AA:
renderModeIdx = 0x20;
break;
case RENDER_MODE_DECAL_OPA:
renderModeIdx = 0x21;
break;
case RENDER_MODE_DECAL_OPA_NO_AA:
renderModeIdx = 0x22;
break;
case RENDER_MODE_INTERSECTING_OPA:
renderModeIdx = 0x23;
break;
case RENDER_MODE_ALPHATEST:
renderModeIdx = temp;
break;
case RENDER_MODE_ALPHATEST_ONESIDED:
renderModeIdx = 0x26;
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
case RENDER_MODE_SURFACE_XLU_LAYER2:
case RENDER_MODE_SURFACE_XLU_LAYER3:
renderModeIdx = 0x27;
break;
case RENDER_MODE_SURFXLU_AA_ZB_ZUPD:
renderModeIdx = 0x28;
break;
case RENDER_MODE_SURFACE_XLU_NO_AA:
renderModeIdx = 0x29;
break;
case RENDER_MODE_DECAL_XLU:
renderModeIdx = 0x2A;
break;
case RENDER_MODE_DECAL_XLU_NOAA:
renderModeIdx = 0x2B;
break;
case RENDER_MODE_INTERSECTING_XLU:
renderModeIdx = 0x2C;
break;
case RENDER_MODE_SURFACE_OPA_NO_ZB:
renderModeIdx = 0x34;
break;
case RENDER_MODE_ALPHATEST_NO_ZB:
renderModeIdx = 0x35;
break;
case RENDER_MODE_SURFACE_XLU_NO_ZB:
renderModeIdx = 0x36;
break;
case RENDER_MODE_CLOUD:
renderModeIdx = 0x3B;
break;
case RENDER_MODE_CLOUD_NO_ZB:
renderModeIdx = 0x3C;
break;
case RENDER_MODE_SURFACE_OPA:
renderModeIdx = 0x1F;
break;
default:
renderModeIdx = 0x1F;
break;
}
gSPDisplayList((*gfxPos)++, D_8014AFC0[renderModeIdx]);
gDPSetFogColor((*gfxPos)++, gCurrentFogSettings->color.r,
gCurrentFogSettings->color.g,
gCurrentFogSettings->color.b,
gCurrentFogSettings->color.a);
gSPFogPosition((*gfxPos)++, gCurrentFogSettings->startDistance, gCurrentFogSettings->endDistance);
break;
case 4:
case 5:
if (mdl_bgMultiplyColorA == 255) {
return;
}
gSPDisplayList((*gfxPos)++, D_8014AFC0[0x10]);
switch (renderMode) {
case RENDER_MODE_SURFACE_OPA:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_SURF2);
break;
case RENDER_MODE_SURFACE_OPA_NO_AA:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_OPA_SURF2);
break;
case RENDER_MODE_DECAL_OPA:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_DECAL2);
break;
case RENDER_MODE_DECAL_OPA_NO_AA:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_OPA_DECAL2);
break;
case RENDER_MODE_INTERSECTING_OPA:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_INTER2);
break;
case RENDER_MODE_ALPHATEST:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_TEX_EDGE2);
break;
case RENDER_MODE_ALPHATEST_ONESIDED:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_TEX_EDGE2);
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2);
break;
case RENDER_MODE_SURFACE_XLU_LAYER2:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2);
break;
case RENDER_MODE_SURFACE_XLU_LAYER3:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2);
break;
case RENDER_MODE_SURFACE_XLU_NO_AA:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_XLU_SURF2);
break;
case RENDER_MODE_DECAL_XLU:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_DECAL2);
break;
case RENDER_MODE_DECAL_XLU_NOAA:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_DECAL2);
break;
case RENDER_MODE_INTERSECTING_XLU:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_INTER2);
break;
case RENDER_MODE_SURFACE_OPA_NO_ZB:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_OPA_SURF2);
break;
case RENDER_MODE_ALPHATEST_NO_ZB:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_TEX_EDGE2);
break;
case RENDER_MODE_SURFACE_XLU_NO_ZB:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_XLU_SURF2);
break;
case RENDER_MODE_CLOUD:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_CLD_SURF2);
break;
case RENDER_MODE_CLOUD_NO_ZB:
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_CLD_SURF2);
break;
}
gDPSetFogColor((*gfxPos)++, gCurrentFogSettings->color.r,
gCurrentFogSettings->color.g,
gCurrentFogSettings->color.b,
mdl_bgMultiplyColorA);
gDPSetBlendColor((*gfxPos)++, mdl_bgMultiplyColorR,
mdl_bgMultiplyColorG,
mdl_bgMultiplyColorB,
255);
gSPFogPosition((*gfxPos)++, 970, 1000);
break;
case 6:
switch (renderMode) {
case RENDER_MODE_SURFACE_OPA_NO_AA:
renderModeIdx = 0x20;
break;
case RENDER_MODE_DECAL_OPA:
renderModeIdx = 0x21;
break;
case RENDER_MODE_DECAL_OPA_NO_AA:
renderModeIdx = 0x22;
break;
case RENDER_MODE_INTERSECTING_OPA:
renderModeIdx = 0x23;
break;
case RENDER_MODE_ALPHATEST:
renderModeIdx = 0x25;
break;
case RENDER_MODE_ALPHATEST_ONESIDED:
renderModeIdx = 0x26;
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
case RENDER_MODE_SURFACE_XLU_LAYER2:
case RENDER_MODE_SURFACE_XLU_LAYER3:
renderModeIdx = 0x27;
break;
case RENDER_MODE_SURFXLU_AA_ZB_ZUPD:
renderModeIdx = 0x28;
break;
case RENDER_MODE_SURFACE_XLU_NO_AA:
renderModeIdx = 0x29;
break;
case RENDER_MODE_DECAL_XLU:
renderModeIdx = 0x2A;
break;
case RENDER_MODE_DECAL_XLU_NOAA:
renderModeIdx = 0x2B;
break;
case RENDER_MODE_INTERSECTING_XLU:
renderModeIdx = 0x2C;
break;
case RENDER_MODE_SURFACE_OPA_NO_ZB:
renderModeIdx = 0x34;
break;
case RENDER_MODE_ALPHATEST_NO_ZB:
renderModeIdx = 0x35;
break;
case RENDER_MODE_SURFACE_XLU_NO_ZB:
renderModeIdx = 0x36;
break;
case RENDER_MODE_CLOUD:
renderModeIdx = 0x3B;
break;
case RENDER_MODE_CLOUD_NO_ZB:
renderModeIdx = 0x3C;
break;
case RENDER_MODE_SURFACE_OPA:
renderModeIdx = 0x1F;
break;
default:
renderModeIdx = 0x1F;
break;
}
gSPDisplayList((*gfxPos)++, D_8014AFC0[renderModeIdx]);
fogR = (gCurrentFogSettings->color.r * (255 - mdl_bgMultiplyColorA) + mdl_bgMultiplyColorR * mdl_bgMultiplyColorA) / 255;
fogG = (gCurrentFogSettings->color.g * (255 - mdl_bgMultiplyColorA) + mdl_bgMultiplyColorG * mdl_bgMultiplyColorA) / 255;
fogB = (gCurrentFogSettings->color.b * (255 - mdl_bgMultiplyColorA) + mdl_bgMultiplyColorB * mdl_bgMultiplyColorA) / 255;
fogMin = (gCurrentFogSettings->startDistance * (255 - mdl_bgMultiplyColorA) + 900 * mdl_bgMultiplyColorA) / 255;
fogMax = (gCurrentFogSettings->endDistance * (255 - mdl_bgMultiplyColorA) + 1000 * mdl_bgMultiplyColorA) / 255;
gDPSetFogColor(gMainGfxPos++, fogR, fogG, fogB, gCurrentFogSettings->color.a);
gSPFogPosition((*gfxPos)++, fogMin, fogMax);
break;
case 10:
case 11:
switch (renderMode) {
case RENDER_MODE_DECAL_OPA:
renderModeIdx = 0x21;
break;
case RENDER_MODE_INTERSECTING_OPA:
renderModeIdx = 0x23;
break;
case RENDER_MODE_ALPHATEST:
renderModeIdx = 0x25;
break;
case RENDER_MODE_CLOUD:
renderModeIdx = 0x3B;
break;
case RENDER_MODE_CLOUD_NO_ZB:
renderModeIdx = 0x3C;
break;
case RENDER_MODE_SURFACE_OPA:
default:
renderModeIdx = 0x1F;
break;
}
gSPDisplayList((*gfxPos)++, D_8014AFC0[renderModeIdx]);
break;
}
if (!(flags & MODEL_FLAG_TRANSFORM_GROUP_MEMBER)) {
if (!(flags & MODEL_FLAG_FLAG_2000)) {
gSPMatrix((*gfxPos)++, model->currentSpecialMatrix, mtxLoadMode | mtxPushMode | G_MTX_MODELVIEW);
if (mtxPushMode != G_MTX_NOPUSH) {
mtxPushMode = G_MTX_NOPUSH;
}
if (mtxLoadMode != G_MTX_MUL) {
mtxLoadMode = G_MTX_MUL;
}
}
} else {
mtxLoadMode = G_MTX_MUL;
if (!(flags & MODEL_FLAG_FLAG_2000)) {
gSPMatrix((*gfxPos)++, model->currentSpecialMatrix, mtxLoadMode | mtxPushMode | G_MTX_MODELVIEW);
if (mtxPushMode != G_MTX_NOPUSH) {
mtxPushMode = G_MTX_NOPUSH;
}
}
}
if (flags & MODEL_FLAG_USES_CUSTOM_GFX) {
customGfxIndex = (model->customGfxIndex & 0xF) * 2;
if ((*gCurrentCustomModelGfxPtr)[customGfxIndex] != NULL) {
gSPDisplayList((*gfxPos)++, (*gCurrentCustomModelGfxPtr)[customGfxIndex]);
}
}
if (textureHeader != NULL) {
if (flags & MODEL_FLAG_HAS_TEX_PANNER) {
s32 panMainU = texPannerMainU[model->texPannerID] >> 8;
s32 panMainV = texPannerMainV[model->texPannerID] >> 8;
s32 panAuxU = texPannerAuxU[model->texPannerID] >> 8;
s32 panAuxV = texPannerAuxV[model->texPannerID] >> 8;
switch (extraTileType) {
case EXTRA_TILE_AUX_SAME_AS_MAIN:
gDPSetTileSize((*gfxPos)++, G_TX_RENDERTILE, panMainU, panMainV, (textureHeader->mainW - 1) * 4 + panMainU, (textureHeader->mainH / 2 - 1) * 4 + panMainV);
gDPSetTileSize((*gfxPos)++, G_TX_RENDERTILE + 1, panAuxU, panAuxV, (textureHeader->mainW - 1) * 4 + panAuxU, (textureHeader->mainH / 2 - 1) * 4 + panAuxV);
break;
case EXTRA_TILE_AUX_INDEPENDENT:
gDPSetTileSize((*gfxPos)++, G_TX_RENDERTILE, panMainU, panMainV, (textureHeader->mainW - 1) * 4 + panMainU, (textureHeader->mainH - 1) * 4 + panMainV);
gDPSetTileSize((*gfxPos)++, G_TX_RENDERTILE + 1, panAuxU, panAuxV, (textureHeader->auxW - 1) * 4 + panAuxU, (textureHeader->auxH - 1) * 4 + panAuxV);
break;
default:
gDPSetTileSize((*gfxPos)++, G_TX_RENDERTILE, panMainU, panMainV, (textureHeader->mainW - 1) * 4 + panMainU, (textureHeader->mainH - 1) * 4 + panMainV);
break;
}
}
}
if (flags & MODEL_FLAG_USE_CAMERA_UNK_MATRIX) {
gSPMatrix((*gfxPos)++, gCameras[gCurrentCamID].unkMatrix, mtxLoadMode | mtxPushMode | G_MTX_MODELVIEW);
if (mtxPushMode != G_MTX_NOPUSH) {
mtxPushMode = G_MTX_NOPUSH;
}
if (mtxLoadMode != G_MTX_MUL) {
mtxLoadMode = G_MTX_MUL;
}
}
if (!(flags & MODEL_FLAG_HAS_LOCAL_VERTEX_COPY)) {
gSPDisplayList((*gfxPos)++, modelNode->displayData->displayList);
}
if (flags & MODEL_FLAG_USES_CUSTOM_GFX) {
customGfxIndex++;
if ((*gCurrentCustomModelGfxPtr)[customGfxIndex] != NULL) {
gSPDisplayList((*gfxPos)++, (*gCurrentCustomModelGfxPtr)[customGfxIndex]);
}
}
if (mtxPushMode == G_MTX_NOPUSH) {
gSPPopMatrix((*gfxPos)++, G_MTX_MODELVIEW);
}
gDPPipeSync((*gfxPos)++);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_802A81C8_7AFB68
/* 41CF58 802A81C8 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 41CF5C 802A81CC AFB40020 */ sw $s4, 0x20($sp)
/* 41CF60 802A81D0 3C14800E */ lui $s4, %hi(gBattleStatus)
/* 41CF64 802A81D4 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
/* 41CF68 802A81D8 AFB7002C */ sw $s7, 0x2C($sp)
/* 41CF6C 802A81DC 3C178011 */ lui $s7, %hi(gPlayerData)
/* 41CF70 802A81E0 26F7F290 */ addiu $s7, $s7, %lo(gPlayerData)
/* 41CF74 802A81E4 AFB20018 */ sw $s2, 0x18($sp)
/* 41CF78 802A81E8 3C12802B */ lui $s2, %hi(D_802ACCD0)
/* 41CF7C 802A81EC 2652CCD0 */ addiu $s2, $s2, %lo(D_802ACCD0)
/* 41CF80 802A81F0 AFB10014 */ sw $s1, 0x14($sp)
/* 41CF84 802A81F4 3C11800E */ lui $s1, %hi(gBattleSubState)
/* 41CF88 802A81F8 2631C4DC */ addiu $s1, $s1, %lo(gBattleSubState)
/* 41CF8C 802A81FC AFBF0034 */ sw $ra, 0x34($sp)
/* 41CF90 802A8200 AFBE0030 */ sw $fp, 0x30($sp)
/* 41CF94 802A8204 AFB60028 */ sw $s6, 0x28($sp)
/* 41CF98 802A8208 AFB50024 */ sw $s5, 0x24($sp)
/* 41CF9C 802A820C AFB3001C */ sw $s3, 0x1C($sp)
/* 41CFA0 802A8210 AFB00010 */ sw $s0, 0x10($sp)
/* 41CFA4 802A8214 F7B80048 */ sdc1 $f24, 0x48($sp)
/* 41CFA8 802A8218 F7B60040 */ sdc1 $f22, 0x40($sp)
/* 41CFAC 802A821C F7B40038 */ sdc1 $f20, 0x38($sp)
/* 41CFB0 802A8220 8E9300D8 */ lw $s3, 0xD8($s4)
/* 41CFB4 802A8224 8E220000 */ lw $v0, 0x0($s1)
/* 41CFB8 802A8228 8E9000DC */ lw $s0, 0xDC($s4)
/* 41CFBC 802A822C 1440002E */ bnez $v0, .L802A82E8_7AFC88
/* 41CFC0 802A8230 2402FFFF */ addiu $v0, $zero, -0x1
/* 41CFC4 802A8234 A2820178 */ sb $v0, 0x178($s4)
/* 41CFC8 802A8238 A680017C */ sh $zero, 0x17C($s4)
/* 41CFCC 802A823C 0C0A9634 */ jal func_802A58D0_7AD270
/* 41CFD0 802A8240 AE800188 */ sw $zero, 0x188($s4)
/* 41CFD4 802A8244 14400005 */ bnez $v0, .L802A825C_7AFBFC
/* 41CFD8 802A8248 00000000 */ nop
/* 41CFDC 802A824C 0C090464 */ jal func_80241190
/* 41CFE0 802A8250 24040009 */ addiu $a0, $zero, 0x9
/* 41CFE4 802A8254 080AA0B8 */ j .L802A82E0_7AFC80
/* 41CFE8 802A8258 00000000 */ nop
.L802A825C_7AFBFC:
/* 41CFEC 802A825C 0C093903 */ jal func_8024E40C
/* 41CFF0 802A8260 24040002 */ addiu $a0, $zero, 0x2
/* 41CFF4 802A8264 8E820000 */ lw $v0, 0x0($s4)
/* 41CFF8 802A8268 3C03F3FF */ lui $v1, (0xF3FFFFFF >> 16)
/* 41CFFC 802A826C 34420002 */ ori $v0, $v0, 0x2
/* 41D000 802A8270 AE820000 */ sw $v0, 0x0($s4)
/* 41D004 802A8274 8E620000 */ lw $v0, 0x0($s3)
/* 41D008 802A8278 3463FFFF */ ori $v1, $v1, (0xF3FFFFFF & 0xFFFF)
/* 41D00C 802A827C 00431024 */ and $v0, $v0, $v1
/* 41D010 802A8280 AE620000 */ sw $v0, 0x0($s3)
/* 41D014 802A8284 8E020000 */ lw $v0, 0x0($s0)
/* 41D018 802A8288 00431024 */ and $v0, $v0, $v1
/* 41D01C 802A828C AE020000 */ sw $v0, 0x0($s0)
/* 41D020 802A8290 8E820000 */ lw $v0, 0x0($s4)
/* 41D024 802A8294 3C030010 */ lui $v1, (0x100000 >> 16)
/* 41D028 802A8298 00431024 */ and $v0, $v0, $v1
/* 41D02C 802A829C 10400003 */ beqz $v0, .L802A82AC_7AFC4C
/* 41D030 802A82A0 2402012E */ addiu $v0, $zero, 0x12E
/* 41D034 802A82A4 080AA0B8 */ j .L802A82E0_7AFC80
/* 41D038 802A82A8 AE220000 */ sw $v0, 0x0($s1)
.L802A82AC_7AFC4C:
/* 41D03C 802A82AC C6000138 */ lwc1 $f0, 0x138($s0)
/* 41D040 802A82B0 C6020140 */ lwc1 $f2, 0x140($s0)
/* 41D044 802A82B4 E600000C */ swc1 $f0, 0xC($s0)
/* 41D048 802A82B8 E6020014 */ swc1 $f2, 0x14($s0)
/* 41D04C 802A82BC C6600138 */ lwc1 $f0, 0x138($s3)
/* 41D050 802A82C0 2402012D */ addiu $v0, $zero, 0x12D
/* 41D054 802A82C4 AE220000 */ sw $v0, 0x0($s1)
/* 41D058 802A82C8 E6000018 */ swc1 $f0, 0x18($s0)
/* 41D05C 802A82CC C6600140 */ lwc1 $f0, 0x140($s3)
/* 41D060 802A82D0 24020004 */ addiu $v0, $zero, 0x4
/* 41D064 802A82D4 A6020070 */ sh $v0, 0x70($s0)
/* 41D068 802A82D8 AE000054 */ sw $zero, 0x54($s0)
/* 41D06C 802A82DC E6000020 */ swc1 $f0, 0x20($s0)
.L802A82E0_7AFC80:
/* 41D070 802A82E0 3C11800E */ lui $s1, %hi(gBattleSubState)
/* 41D074 802A82E4 2631C4DC */ addiu $s1, $s1, %lo(gBattleSubState)
.L802A82E8_7AFC88:
/* 41D078 802A82E8 8E230000 */ lw $v1, 0x0($s1)
/* 41D07C 802A82EC 2402012D */ addiu $v0, $zero, 0x12D
/* 41D080 802A82F0 1462006C */ bne $v1, $v0, .L802A84A4_7AFE44
/* 41D084 802A82F4 00000000 */ nop
/* 41D088 802A82F8 86020070 */ lh $v0, 0x70($s0)
/* 41D08C 802A82FC 10400022 */ beqz $v0, .L802A8388_7AFD28
/* 41D090 802A8300 00000000 */ nop
/* 41D094 802A8304 C6000018 */ lwc1 $f0, 0x18($s0)
/* 41D098 802A8308 C6080144 */ lwc1 $f8, 0x144($s0)
/* 41D09C 802A830C C6020020 */ lwc1 $f2, 0x20($s0)
/* 41D0A0 802A8310 46080001 */ sub.s $f0, $f0, $f8
/* 41D0A4 802A8314 C604014C */ lwc1 $f4, 0x14C($s0)
/* 41D0A8 802A8318 46041081 */ sub.s $f2, $f2, $f4
/* 41D0AC 802A831C 44823000 */ mtc1 $v0, $f6
/* 41D0B0 802A8320 00000000 */ nop
/* 41D0B4 802A8324 468031A0 */ cvt.s.w $f6, $f6
/* 41D0B8 802A8328 46060003 */ div.s $f0, $f0, $f6
/* 41D0BC 802A832C 46004200 */ add.s $f8, $f8, $f0
/* 41D0C0 802A8330 46003006 */ mov.s $f0, $f6
/* 41D0C4 802A8334 46061083 */ div.s $f2, $f2, $f6
/* 41D0C8 802A8338 C600000C */ lwc1 $f0, 0xC($s0)
/* 41D0CC 802A833C 46022100 */ add.s $f4, $f4, $f2
/* 41D0D0 802A8340 E6080144 */ swc1 $f8, 0x144($s0)
/* 41D0D4 802A8344 E604014C */ swc1 $f4, 0x14C($s0)
/* 41D0D8 802A8348 C6640144 */ lwc1 $f4, 0x144($s3)
/* 41D0DC 802A834C 46040001 */ sub.s $f0, $f0, $f4
/* 41D0E0 802A8350 46003086 */ mov.s $f2, $f6
/* 41D0E4 802A8354 46060003 */ div.s $f0, $f0, $f6
/* 41D0E8 802A8358 46002100 */ add.s $f4, $f4, $f0
/* 41D0EC 802A835C E6640144 */ swc1 $f4, 0x144($s3)
/* 41D0F0 802A8360 C6000014 */ lwc1 $f0, 0x14($s0)
/* 41D0F4 802A8364 C664014C */ lwc1 $f4, 0x14C($s3)
/* 41D0F8 802A8368 86020070 */ lh $v0, 0x70($s0)
/* 41D0FC 802A836C 46040001 */ sub.s $f0, $f0, $f4
/* 41D100 802A8370 44821000 */ mtc1 $v0, $f2
/* 41D104 802A8374 00000000 */ nop
/* 41D108 802A8378 468010A0 */ cvt.s.w $f2, $f2
/* 41D10C 802A837C 46020003 */ div.s $f0, $f0, $f2
/* 41D110 802A8380 46002100 */ add.s $f4, $f4, $f0
/* 41D114 802A8384 E664014C */ swc1 $f4, 0x14C($s3)
.L802A8388_7AFD28:
/* 41D118 802A8388 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 41D11C 802A838C 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 41D120 802A8390 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 41D124 802A8394 4481B000 */ mtc1 $at, $f22
/* 41D128 802A8398 00000000 */ nop
/* 41D12C 802A839C 46166302 */ mul.s $f12, $f12, $f22
/* 41D130 802A83A0 00000000 */ nop
/* 41D134 802A83A4 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 41D138 802A83A8 4481C000 */ mtc1 $at, $f24
/* 41D13C 802A83AC 3C014180 */ lui $at, (0x41800000 >> 16)
/* 41D140 802A83B0 4481A000 */ mtc1 $at, $f20
/* 41D144 802A83B4 0C00A85B */ jal sin_rad
/* 41D148 802A83B8 46186303 */ div.s $f12, $f12, $f24
/* 41D14C 802A83BC 46140002 */ mul.s $f0, $f0, $f20
/* 41D150 802A83C0 00000000 */ nop
/* 41D154 802A83C4 C602014C */ lwc1 $f2, 0x14C($s0)
/* 41D158 802A83C8 46001080 */ add.s $f2, $f2, $f0
/* 41D15C 802A83CC C60C0054 */ lwc1 $f12, 0x54($s0)
/* 41D160 802A83D0 46006307 */ neg.s $f12, $f12
/* 41D164 802A83D4 0C00A6C9 */ jal clamp_angle
/* 41D168 802A83D8 E602014C */ swc1 $f2, 0x14C($s0)
/* 41D16C 802A83DC C60C0054 */ lwc1 $f12, 0x54($s0)
/* 41D170 802A83E0 46166302 */ mul.s $f12, $f12, $f22
/* 41D174 802A83E4 00000000 */ nop
/* 41D178 802A83E8 E600018C */ swc1 $f0, 0x18C($s0)
/* 41D17C 802A83EC 0C00A85B */ jal sin_rad
/* 41D180 802A83F0 46186303 */ div.s $f12, $f12, $f24
/* 41D184 802A83F4 46140002 */ mul.s $f0, $f0, $f20
/* 41D188 802A83F8 00000000 */ nop
/* 41D18C 802A83FC C662014C */ lwc1 $f2, 0x14C($s3)
/* 41D190 802A8400 46001081 */ sub.s $f2, $f2, $f0
/* 41D194 802A8404 E662014C */ swc1 $f2, 0x14C($s3)
/* 41D198 802A8408 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 41D19C 802A840C 0C00A6C9 */ jal clamp_angle
/* 41D1A0 802A8410 46006307 */ neg.s $f12, $f12
/* 41D1A4 802A8414 E660018C */ swc1 $f0, 0x18C($s3)
/* 41D1A8 802A8418 C6000054 */ lwc1 $f0, 0x54($s0)
/* 41D1AC 802A841C 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 41D1B0 802A8420 44811000 */ mtc1 $at, $f2
/* 41D1B4 802A8424 86020070 */ lh $v0, 0x70($s0)
/* 41D1B8 802A8428 46020000 */ add.s $f0, $f0, $f2
/* 41D1BC 802A842C 96030070 */ lhu $v1, 0x70($s0)
/* 41D1C0 802A8430 10400004 */ beqz $v0, .L802A8444_7AFDE4
/* 41D1C4 802A8434 E6000054 */ swc1 $f0, 0x54($s0)
/* 41D1C8 802A8438 2462FFFF */ addiu $v0, $v1, -0x1
/* 41D1CC 802A843C 080AA129 */ j .L802A84A4_7AFE44
/* 41D1D0 802A8440 A6020070 */ sh $v0, 0x70($s0)
.L802A8444_7AFDE4:
/* 41D1D4 802A8444 C6000018 */ lwc1 $f0, 0x18($s0)
/* 41D1D8 802A8448 C6020020 */ lwc1 $f2, 0x20($s0)
/* 41D1DC 802A844C C604000C */ lwc1 $f4, 0xC($s0)
D_802A8450_7AFDF0:
/* 41D1E0 802A8450 E6000144 */ swc1 $f0, 0x144($s0)
/* 41D1E4 802A8454 E602014C */ swc1 $f2, 0x14C($s0)
/* 41D1E8 802A8458 E6640144 */ swc1 $f4, 0x144($s3)
/* 41D1EC 802A845C C6000014 */ lwc1 $f0, 0x14($s0)
/* 41D1F0 802A8460 E660014C */ swc1 $f0, 0x14C($s3)
/* 41D1F4 802A8464 C6000144 */ lwc1 $f0, 0x144($s0)
/* 41D1F8 802A8468 C602014C */ lwc1 $f2, 0x14C($s0)
/* 41D1FC 802A846C 2402012E */ addiu $v0, $zero, 0x12E
D_802A8470_7AFE10:
/* 41D200 802A8470 E6000138 */ swc1 $f0, 0x138($s0)
/* 41D204 802A8474 E6020140 */ swc1 $f2, 0x140($s0)
/* 41D208 802A8478 C6600144 */ lwc1 $f0, 0x144($s3)
/* 41D20C 802A847C C662014C */ lwc1 $f2, 0x14C($s3)
/* 41D210 802A8480 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 41D214 802A8484 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 41D218 802A8488 AE220000 */ sw $v0, 0x0($s1)
/* 41D21C 802A848C E6600138 */ swc1 $f0, 0x138($s3)
/* 41D220 802A8490 E6620140 */ swc1 $f2, 0x140($s3)
/* 41D224 802A8494 8C820000 */ lw $v0, 0x0($a0)
/* 41D228 802A8498 3C030010 */ lui $v1, (0x100000 >> 16)
/* 41D22C 802A849C 00431025 */ or $v0, $v0, $v1
/* 41D230 802A84A0 AC820000 */ sw $v0, 0x0($a0)
.L802A84A4_7AFE44:
/* 41D234 802A84A4 3C02800E */ lui $v0, %hi(gBattleSubState)
/* 41D238 802A84A8 8C42C4DC */ lw $v0, %lo(gBattleSubState)($v0)
/* 41D23C 802A84AC 2443FFFE */ addiu $v1, $v0, -0x2
/* 41D240 802A84B0 2C62012D */ sltiu $v0, $v1, 0x12D
/* 41D244 802A84B4 1040057D */ beqz $v0, .L802A9AAC_7B144C
/* 41D248 802A84B8 00031080 */ sll $v0, $v1, 2
/* 41D24C 802A84BC 3C01802B */ lui $at, %hi(jtbl_802AC3C8_7B3D68)
/* 41D250 802A84C0 00220821 */ addu $at, $at, $v0
/* 41D254 802A84C4 8C22C3C8 */ lw $v0, %lo(jtbl_802AC3C8_7B3D68)($at)
/* 41D258 802A84C8 00400008 */ jr $v0
/* 41D25C 802A84CC 00000000 */ nop
/* 41D260 802A84D0 3C03FBFF */ lui $v1, (0xFBFFFFFF >> 16)
/* 41D264 802A84D4 3463FFFF */ ori $v1, $v1, (0xFBFFFFFF & 0xFFFF)
/* 41D268 802A84D8 8E020000 */ lw $v0, 0x0($s0)
/* 41D26C 802A84DC 3C040800 */ lui $a0, (0x8000000 >> 16)
/* 41D270 802A84E0 00441025 */ or $v0, $v0, $a0
/* 41D274 802A84E4 00431024 */ and $v0, $v0, $v1
/* 41D278 802A84E8 AE020000 */ sw $v0, 0x0($s0)
/* 41D27C 802A84EC 8E620000 */ lw $v0, 0x0($s3)
/* 41D280 802A84F0 3C030400 */ lui $v1, (0x4000000 >> 16)
/* 41D284 802A84F4 00431025 */ or $v0, $v0, $v1
/* 41D288 802A84F8 00441025 */ or $v0, $v0, $a0
/* 41D28C 802A84FC 0C098CC0 */ jal func_80263300
/* 41D290 802A8500 AE620000 */ sw $v0, 0x0($s3)
/* 41D294 802A8504 0C098C9A */ jal func_80263268
/* 41D298 802A8508 24110001 */ addiu $s1, $zero, 0x1
/* 41D29C 802A850C 8282005C */ lb $v0, 0x5C($s4)
/* 41D2A0 802A8510 04410002 */ bgez $v0, .L802A851C_7AFEBC
/* 41D2A4 802A8514 24020006 */ addiu $v0, $zero, 0x6
/* 41D2A8 802A8518 A282005C */ sb $v0, 0x5C($s4)
.L802A851C_7AFEBC:
/* 41D2AC 802A851C 0C098E45 */ jal btl_init_menu_partner
/* 41D2B0 802A8520 00000000 */ nop
/* 41D2B4 802A8524 0C098C9A */ jal func_80263268
/* 41D2B8 802A8528 00000000 */ nop
/* 41D2BC 802A852C 24040007 */ addiu $a0, $zero, 0x7
/* 41D2C0 802A8530 3C13802B */ lui $s3, %hi(BattleMenu_OptionEnabled)
/* 41D2C4 802A8534 2673D0D0 */ addiu $s3, $s3, %lo(BattleMenu_OptionEnabled)
/* 41D2C8 802A8538 3C15802B */ lui $s5, %hi(battle_menu_isMessageDisabled)
/* 41D2CC 802A853C 26B5D0E8 */ addiu $s5, $s5, %lo(battle_menu_isMessageDisabled)
/* 41D2D0 802A8540 3C03802B */ lui $v1, %hi(D_802AB478_7B2E18)
/* 41D2D4 802A8544 2463B478 */ addiu $v1, $v1, %lo(D_802AB478_7B2E18)
/* 41D2D8 802A8548 3C12802B */ lui $s2, %hi(BattleMenu_HudScripts)
/* 41D2DC 802A854C 2652D078 */ addiu $s2, $s2, %lo(BattleMenu_HudScripts)
/* 41D2E0 802A8550 3C01802B */ lui $at, %hi(battle_menu_submenuIDs)
/* 41D2E4 802A8554 AC24D0B8 */ sw $a0, %lo(battle_menu_submenuIDs)($at)
/* 41D2E8 802A8558 AE710000 */ sw $s1, 0x0($s3)
/* 41D2EC 802A855C AEA00000 */ sw $zero, 0x0($s5)
/* 41D2F0 802A8560 8C620000 */ lw $v0, 0x0($v1)
/* 41D2F4 802A8564 3C16802B */ lui $s6, %hi(D_802AB4C0_7B2E60)
/* 41D2F8 802A8568 26D6B4C0 */ addiu $s6, $s6, %lo(D_802AB4C0_7B2E60)
/* 41D2FC 802A856C AE420000 */ sw $v0, 0x0($s2)
/* 41D300 802A8570 8EC2001C */ lw $v0, 0x1C($s6)
/* 41D304 802A8574 3C1E802B */ lui $fp, %hi(BattleMenu_TitleMessages)
/* 41D308 802A8578 27DED090 */ addiu $fp, $fp, %lo(BattleMenu_TitleMessages)
/* 41D30C 802A857C AFC20000 */ sw $v0, 0x0($fp)
/* 41D310 802A8580 96820070 */ lhu $v0, 0x70($s4)
/* 41D314 802A8584 30420080 */ andi $v0, $v0, 0x80
/* 41D318 802A8588 14400005 */ bnez $v0, .L802A85A0_7AFF40
/* 41D31C 802A858C 24020048 */ addiu $v0, $zero, 0x48
/* 41D320 802A8590 AE600000 */ sw $zero, 0x0($s3)
/* 41D324 802A8594 8C630004 */ lw $v1, 0x4($v1)
/* 41D328 802A8598 AEA20000 */ sw $v0, 0x0($s5)
/* 41D32C 802A859C AE430000 */ sw $v1, 0x0($s2)
.L802A85A0_7AFF40:
/* 41D330 802A85A0 8282005C */ lb $v0, 0x5C($s4)
/* 41D334 802A85A4 50440001 */ beql $v0, $a0, .L802A85AC_7AFF4C
/* 41D338 802A85A8 0000882D */ daddu $s1, $zero, $zero
.L802A85AC_7AFF4C:
/* 41D33C 802A85AC 82E30012 */ lb $v1, 0x12($s7)
/* 41D340 802A85B0 24100001 */ addiu $s0, $zero, 0x1
/* 41D344 802A85B4 00031080 */ sll $v0, $v1, 2
/* 41D348 802A85B8 00431021 */ addu $v0, $v0, $v1
/* 41D34C 802A85BC 000210C0 */ sll $v0, $v0, 3
/* 41D350 802A85C0 3C03802B */ lui $v1, %hi(D_802AB590_7B2F30)
/* 41D354 802A85C4 00621821 */ addu $v1, $v1, $v0
/* 41D358 802A85C8 8C63B590 */ lw $v1, %lo(D_802AB590_7B2F30)($v1)
/* 41D35C 802A85CC 8EC20018 */ lw $v0, 0x18($s6)
/* 41D360 802A85D0 24050006 */ addiu $a1, $zero, 0x6
/* 41D364 802A85D4 3C01802B */ lui $at, %hi(D_802AD0BC_7B4A5C)
/* 41D368 802A85D8 AC25D0BC */ sw $a1, %lo(D_802AD0BC_7B4A5C)($at)
/* 41D36C 802A85DC AE700004 */ sw $s0, 0x4($s3)
/* 41D370 802A85E0 AFC20004 */ sw $v0, 0x4($fp)
/* 41D374 802A85E4 AE430004 */ sw $v1, 0x4($s2)
/* 41D378 802A85E8 82820080 */ lb $v0, 0x80($s4)
/* 41D37C 802A85EC 3C04802B */ lui $a0, %hi(D_802AB590_7B2F30)
/* 41D380 802A85F0 1C40000B */ bgtz $v0, .L802A8620_7AFFC0
/* 41D384 802A85F4 2484B590 */ addiu $a0, $a0, %lo(D_802AB590_7B2F30)
/* 41D388 802A85F8 82E30012 */ lb $v1, 0x12($s7)
/* 41D38C 802A85FC 00031080 */ sll $v0, $v1, 2
/* 41D390 802A8600 00431021 */ addu $v0, $v0, $v1
/* 41D394 802A8604 000210C0 */ sll $v0, $v0, 3
/* 41D398 802A8608 00441021 */ addu $v0, $v0, $a0
/* 41D39C 802A860C 8C430004 */ lw $v1, 0x4($v0)
/* 41D3A0 802A8610 24020048 */ addiu $v0, $zero, 0x48
/* 41D3A4 802A8614 AE600004 */ sw $zero, 0x4($s3)
/* 41D3A8 802A8618 AEA20004 */ sw $v0, 0x4($s5)
/* 41D3AC 802A861C AE430004 */ sw $v1, 0x4($s2)
.L802A8620_7AFFC0:
/* 41D3B0 802A8620 96820070 */ lhu $v0, 0x70($s4)
/* 41D3B4 802A8624 30420040 */ andi $v0, $v0, 0x40
/* 41D3B8 802A8628 1440000B */ bnez $v0, .L802A8658_7AFFF8
/* 41D3BC 802A862C 00000000 */ nop
/* 41D3C0 802A8630 82E30012 */ lb $v1, 0x12($s7)
/* 41D3C4 802A8634 00031080 */ sll $v0, $v1, 2
/* 41D3C8 802A8638 00431021 */ addu $v0, $v0, $v1
/* 41D3CC 802A863C 000210C0 */ sll $v0, $v0, 3
/* 41D3D0 802A8640 00441021 */ addu $v0, $v0, $a0
/* 41D3D4 802A8644 8C430004 */ lw $v1, 0x4($v0)
/* 41D3D8 802A8648 24020048 */ addiu $v0, $zero, 0x48
/* 41D3DC 802A864C AE600004 */ sw $zero, 0x4($s3)
/* 41D3E0 802A8650 AEA20004 */ sw $v0, 0x4($s5)
/* 41D3E4 802A8654 AE430004 */ sw $v1, 0x4($s2)
.L802A8658_7AFFF8:
/* 41D3E8 802A8658 8282005C */ lb $v0, 0x5C($s4)
/* 41D3EC 802A865C 50450001 */ beql $v0, $a1, .L802A8664_7B0004
/* 41D3F0 802A8660 24110001 */ addiu $s1, $zero, 0x1
.L802A8664_7B0004:
/* 41D3F4 802A8664 82E2028E */ lb $v0, 0x28E($s7)
/* 41D3F8 802A8668 1040001C */ beqz $v0, .L802A86DC_7B007C
/* 41D3FC 802A866C 24100002 */ addiu $s0, $zero, 0x2
/* 41D400 802A8670 0C03A752 */ jal is_ability_active
/* 41D404 802A8674 24040035 */ addiu $a0, $zero, 0x35
/* 41D408 802A8678 10400018 */ beqz $v0, .L802A86DC_7B007C
/* 41D40C 802A867C 2407000B */ addiu $a3, $zero, 0xB
/* 41D410 802A8680 3C06802B */ lui $a2, %hi(D_802AB390_7B2D30)
/* 41D414 802A8684 24C6B390 */ addiu $a2, $a2, %lo(D_802AB390_7B2D30)
/* 41D418 802A8688 8CC40000 */ lw $a0, 0x0($a2)
/* 41D41C 802A868C 8EC5002C */ lw $a1, 0x2C($s6)
/* 41D420 802A8690 96830070 */ lhu $v1, 0x70($s4)
/* 41D424 802A8694 24020001 */ addiu $v0, $zero, 0x1
/* 41D428 802A8698 3C01802B */ lui $at, %hi(D_802AD0C0_7B4A60)
/* 41D42C 802A869C AC27D0C0 */ sw $a3, %lo(D_802AD0C0_7B4A60)($at)
/* 41D430 802A86A0 AE620008 */ sw $v0, 0x8($s3)
/* 41D434 802A86A4 AEA00008 */ sw $zero, 0x8($s5)
/* 41D438 802A86A8 30630800 */ andi $v1, $v1, 0x800
/* 41D43C 802A86AC AE440008 */ sw $a0, 0x8($s2)
/* 41D440 802A86B0 14600006 */ bnez $v1, .L802A86CC_7B006C
/* 41D444 802A86B4 AFC50008 */ sw $a1, 0x8($fp)
/* 41D448 802A86B8 AE600008 */ sw $zero, 0x8($s3)
/* 41D44C 802A86BC 8CC30004 */ lw $v1, 0x4($a2)
/* 41D450 802A86C0 24020048 */ addiu $v0, $zero, 0x48
/* 41D454 802A86C4 AEA20008 */ sw $v0, 0x8($s5)
/* 41D458 802A86C8 AE430008 */ sw $v1, 0x8($s2)
.L802A86CC_7B006C:
/* 41D45C 802A86CC 8282005C */ lb $v0, 0x5C($s4)
/* 41D460 802A86D0 50470001 */ beql $v0, $a3, .L802A86D8_7B0078
/* 41D464 802A86D4 24110002 */ addiu $s1, $zero, 0x2
.L802A86D8_7B0078:
/* 41D468 802A86D8 24100003 */ addiu $s0, $zero, 0x3
.L802A86DC_7B007C:
/* 41D46C 802A86DC 3C01802B */ lui $at, %hi(BattleMenu_NumOptions)
/* 41D470 802A86E0 AC30D0AC */ sw $s0, %lo(BattleMenu_NumOptions)($at)
/* 41D474 802A86E4 24100001 */ addiu $s0, $zero, 0x1
/* 41D478 802A86E8 24020002 */ addiu $v0, $zero, 0x2
/* 41D47C 802A86EC 00511023 */ subu $v0, $v0, $s1
/* 41D480 802A86F0 3C01802B */ lui $at, %hi(D_802AD0A8)
/* 41D484 802A86F4 AC30D0A8 */ sw $s0, %lo(D_802AD0A8)($at)
/* 41D488 802A86F8 3C01802B */ lui $at, %hi(D_802AD0B0)
/* 41D48C 802A86FC AC31D0B0 */ sw $s1, %lo(D_802AD0B0)($at)
/* 41D490 802A8700 3C01802B */ lui $at, %hi(D_802AD100)
/* 41D494 802A8704 AC22D100 */ sw $v0, %lo(D_802AD100)($at)
/* 41D498 802A8708 0C0A9606 */ jal func_802A5818_7AD1B8
/* 41D49C 802A870C 00000000 */ nop
/* 41D4A0 802A8710 10400005 */ beqz $v0, .L802A8728_7B00C8
/* 41D4A4 802A8714 00000000 */ nop
/* 41D4A8 802A8718 3C01802B */ lui $at, %hi(BattleMenu_ShowSwapIcons)
/* 41D4AC 802A871C AC30D104 */ sw $s0, %lo(BattleMenu_ShowSwapIcons)($at)
/* 41D4B0 802A8720 080AA1CC */ j .L802A8730_7B00D0
/* 41D4B4 802A8724 00000000 */ nop
.L802A8728_7B00C8:
/* 41D4B8 802A8728 3C01802B */ lui $at, %hi(BattleMenu_ShowSwapIcons)
/* 41D4BC 802A872C AC20D104 */ sw $zero, %lo(BattleMenu_ShowSwapIcons)($at)
.L802A8730_7B00D0:
/* 41D4C0 802A8730 0C0A8400 */ jal func_802A1000_7A89A0
/* 41D4C4 802A8734 00000000 */ nop
/* 41D4C8 802A8738 24020008 */ addiu $v0, $zero, 0x8
/* 41D4CC 802A873C 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41D4D0 802A8740 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41D4D4 802A8744 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41D4D8 802A8748 AC20CC6C */ sw $zero, %lo(D_802ACC6C)($at)
/* 41D4DC 802A874C 080AA6A9 */ j .L802A9AA4_7B1444
/* 41D4E0 802A8750 24020002 */ addiu $v0, $zero, 0x2
glabel .L802A8754_7B00F4
/* 41D4E4 802A8754 82E20012 */ lb $v0, 0x12($s7)
/* 41D4E8 802A8758 24040100 */ addiu $a0, $zero, 0x100
/* 41D4EC 802A875C 00021080 */ sll $v0, $v0, 2
/* 41D4F0 802A8760 3C06802B */ lui $a2, %hi(D_802AB520_7B2EC0)
/* 41D4F4 802A8764 00C23021 */ addu $a2, $a2, $v0
/* 41D4F8 802A8768 8CC6B520 */ lw $a2, %lo(D_802AB520_7B2EC0)($a2)
/* 41D4FC 802A876C 0C098F3F */ jal set_animation
/* 41D500 802A8770 0000282D */ daddu $a1, $zero, $zero
/* 41D504 802A8774 24020003 */ addiu $v0, $zero, 0x3
/* 41D508 802A8778 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41D50C 802A877C AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
glabel .L802A8780_7B0120
/* 41D510 802A8780 0C0A846C */ jal func_802A11B0_7A8B50
/* 41D514 802A8784 00000000 */ nop
/* 41D518 802A8788 3C04802B */ lui $a0, %hi(D_802ACC6C)
/* 41D51C 802A878C 2484CC6C */ addiu $a0, $a0, %lo(D_802ACC6C)
D_802A8790_7B0130:
/* 41D520 802A8790 8C830000 */ lw $v1, 0x0($a0)
/* 41D524 802A8794 10600004 */ beqz $v1, .L802A87A8_7B0148
/* 41D528 802A8798 0040802D */ daddu $s0, $v0, $zero
/* 41D52C 802A879C 2462FFFF */ addiu $v0, $v1, -0x1
/* 41D530 802A87A0 080AA20D */ j .L802A8834_7B01D4
/* 41D534 802A87A4 AC820000 */ sw $v0, 0x0($a0)
.L802A87A8_7B0148:
/* 41D538 802A87A8 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 41D53C 802A87AC 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
D_802A87B0_7B0150:
/* 41D540 802A87B0 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 41D544 802A87B4 00431024 */ and $v0, $v0, $v1
/* 41D548 802A87B8 1440001E */ bnez $v0, .L802A8834_7B01D4
/* 41D54C 802A87BC 00000000 */ nop
D_802A87C0_7B0160:
/* 41D550 802A87C0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 41D554 802A87C4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 41D558 802A87C8 8C420010 */ lw $v0, 0x10($v0)
/* 41D55C 802A87CC 30422000 */ andi $v0, $v0, 0x2000
/* 41D560 802A87D0 10400018 */ beqz $v0, .L802A8834_7B01D4
/* 41D564 802A87D4 00000000 */ nop
/* 41D568 802A87D8 0C0A9606 */ jal func_802A5818_7AD1B8
/* 41D56C 802A87DC 00000000 */ nop
/* 41D570 802A87E0 10400010 */ beqz $v0, .L802A8824_7B01C4
/* 41D574 802A87E4 00000000 */ nop
/* 41D578 802A87E8 0C05272D */ jal sfx_play_sound
/* 41D57C 802A87EC 2404000F */ addiu $a0, $zero, 0xF
/* 41D580 802A87F0 3C02802B */ lui $v0, %hi(BattleMenu_CurPos)
/* 41D584 802A87F4 8042D002 */ lb $v0, %lo(BattleMenu_CurPos)($v0)
/* 41D588 802A87F8 3C03802B */ lui $v1, %hi(BattleMenu_HomePos)
/* 41D58C 802A87FC 8063D06B */ lb $v1, %lo(BattleMenu_HomePos)($v1)
/* 41D590 802A8800 00431021 */ addu $v0, $v0, $v1
/* 41D594 802A8804 00021080 */ sll $v0, $v0, 2
/* 41D598 802A8808 3C01802B */ lui $at, %hi(D_802AD0BB)
/* 41D59C 802A880C 00220821 */ addu $at, $at, $v0
/* 41D5A0 802A8810 9022D0BB */ lbu $v0, %lo(D_802AD0BB)($at)
/* 41D5A4 802A8814 0C0A842E */ jal func_802A10B8_7A8A58
/* 41D5A8 802A8818 A282005C */ sb $v0, 0x5C($s4)
/* 41D5AC 802A881C 080AA5DD */ j .L802A9774_7B1114
/* 41D5B0 802A8820 00000000 */ nop
.L802A8824_7B01C4:
/* 41D5B4 802A8824 0C05272D */ jal sfx_play_sound
/* 41D5B8 802A8828 2404021D */ addiu $a0, $zero, 0x21D
/* 41D5BC 802A882C 080AA6A9 */ j .L802A9AA4_7B1444
/* 41D5C0 802A8830 24020008 */ addiu $v0, $zero, 0x8
.L802A8834_7B01D4:
/* 41D5C4 802A8834 3C03802B */ lui $v1, %hi(D_802ACC60)
D_802A8838_7B01D8:
/* 41D5C8 802A8838 2463CC60 */ addiu $v1, $v1, %lo(D_802ACC60)
/* 41D5CC 802A883C 8C620000 */ lw $v0, 0x0($v1)
/* 41D5D0 802A8840 10400003 */ beqz $v0, .L802A8850_7B01F0
/* 41D5D4 802A8844 2442FFFF */ addiu $v0, $v0, -0x1
/* 41D5D8 802A8848 080AA6AB */ j .L802A9AAC_7B144C
/* 41D5DC 802A884C AC620000 */ sw $v0, 0x0($v1)
.L802A8850_7B01F0:
/* 41D5E0 802A8850 12000496 */ beqz $s0, .L802A9AAC_7B144C
/* 41D5E4 802A8854 24040100 */ addiu $a0, $zero, 0x100
/* 41D5E8 802A8858 82E20012 */ lb $v0, 0x12($s7)
/* 41D5EC 802A885C 00021080 */ sll $v0, $v0, 2
/* 41D5F0 802A8860 3C06802B */ lui $a2, %hi(D_802AB558_7B2EF8)
/* 41D5F4 802A8864 00C23021 */ addu $a2, $a2, $v0
/* 41D5F8 802A8868 8CC6B558 */ lw $a2, %lo(D_802AB558_7B2EF8)($a2)
/* 41D5FC 802A886C 0C098F3F */ jal set_animation
/* 41D600 802A8870 0000282D */ daddu $a1, $zero, $zero
/* 41D604 802A8874 2602FFFF */ addiu $v0, $s0, -0x1
/* 41D608 802A8878 00021080 */ sll $v0, $v0, 2
/* 41D60C 802A887C 3C01802B */ lui $at, %hi(D_802AD0BB)
D_802A8880_7B0220:
/* 41D610 802A8880 00220821 */ addu $at, $at, $v0
/* 41D614 802A8884 9022D0BB */ lbu $v0, %lo(D_802AD0BB)($at)
/* 41D618 802A8888 A282004A */ sb $v0, 0x4A($s4)
/* 41D61C 802A888C 8283004A */ lb $v1, 0x4A($s4)
D_802A8890_7B0230:
/* 41D620 802A8890 24050007 */ addiu $a1, $zero, 0x7
/* 41D624 802A8894 14650003 */ bne $v1, $a1, .L802A88A4_7B0244
/* 41D628 802A8898 A282005C */ sb $v0, 0x5C($s4)
/* 41D62C 802A889C 080AA641 */ j .L802A9904_7B12A4
D_802A88A0_7B0240:
/* 41D630 802A88A0 240200C8 */ addiu $v0, $zero, 0xC8
.L802A88A4_7B0244:
/* 41D634 802A88A4 24040006 */ addiu $a0, $zero, 0x6
/* 41D638 802A88A8 14640003 */ bne $v1, $a0, .L802A88B8_7B0258
/* 41D63C 802A88AC 24020008 */ addiu $v0, $zero, 0x8
/* 41D640 802A88B0 080AA641 */ j .L802A9904_7B12A4
/* 41D644 802A88B4 2402000A */ addiu $v0, $zero, 0xA
.L802A88B8_7B0258:
/* 41D648 802A88B8 14620003 */ bne $v1, $v0, .L802A88C8_7B0268
/* 41D64C 802A88BC 24020002 */ addiu $v0, $zero, 0x2
/* 41D650 802A88C0 080AA641 */ j .L802A9904_7B12A4
/* 41D654 802A88C4 2402003C */ addiu $v0, $zero, 0x3C
.L802A88C8_7B0268:
/* 41D658 802A88C8 14620003 */ bne $v1, $v0, .L802A88D8_7B0278
/* 41D65C 802A88CC 24020005 */ addiu $v0, $zero, 0x5
/* 41D660 802A88D0 080AA641 */ j .L802A9904_7B12A4
/* 41D664 802A88D4 24020028 */ addiu $v0, $zero, 0x28
.L802A88D8_7B0278:
/* 41D668 802A88D8 54620003 */ bnel $v1, $v0, .L802A88E8_7B0288
/* 41D66C 802A88DC A684006C */ sh $a0, 0x6C($s4)
D_802A88E0_7B0280:
/* 41D670 802A88E0 080AA641 */ j .L802A9904_7B12A4
/* 41D674 802A88E4 24020032 */ addiu $v0, $zero, 0x32
.L802A88E8_7B0288:
/* 41D678 802A88E8 0C0A840C */ jal func_802A1030_7A89D0
/* 41D67C 802A88EC A685006E */ sh $a1, 0x6E($s4)
/* 41D680 802A88F0 080AA6A9 */ j .L802A9AA4_7B1444
/* 41D684 802A88F4 24020004 */ addiu $v0, $zero, 0x4
glabel .L802A88F8_7B0298
/* 41D688 802A88F8 0C0A846C */ jal func_802A11B0_7A8B50
/* 41D68C 802A88FC 00000000 */ nop
/* 41D690 802A8900 8E830214 */ lw $v1, 0x214($s4)
/* 41D694 802A8904 30634000 */ andi $v1, $v1, 0x4000
/* 41D698 802A8908 10600007 */ beqz $v1, .L802A8928_7B02C8
/* 41D69C 802A890C 0040802D */ daddu $s0, $v0, $zero
/* 41D6A0 802A8910 16000007 */ bnez $s0, D_802A8930_7B02D0
/* 41D6A4 802A8914 24040011 */ addiu $a0, $zero, 0x11
/* 41D6A8 802A8918 0C0A841E */ jal func_802A1078_7A8A18
/* 41D6AC 802A891C 00000000 */ nop
/* 41D6B0 802A8920 080AA6A9 */ j .L802A9AA4_7B1444
/* 41D6B4 802A8924 24020005 */ addiu $v0, $zero, 0x5
.L802A8928_7B02C8:
/* 41D6B8 802A8928 12000460 */ beqz $s0, .L802A9AAC_7B144C
/* 41D6BC 802A892C 24040011 */ addiu $a0, $zero, 0x11
D_802A8930_7B02D0:
/* 41D6C0 802A8930 24020008 */ addiu $v0, $zero, 0x8
/* 41D6C4 802A8934 A2820178 */ sb $v0, 0x178($s4)
/* 41D6C8 802A8938 3C038009 */ lui $v1, %hi(D_8008F9B0)
/* 41D6CC 802A893C 8C63F9B0 */ lw $v1, %lo(D_8008F9B0)($v1)
/* 41D6D0 802A8940 24020077 */ addiu $v0, $zero, 0x77
/* 41D6D4 802A8944 A682017C */ sh $v0, 0x17C($s4)
/* 41D6D8 802A8948 080AA34A */ j .L802A8D28_7B06C8
/* 41D6DC 802A894C A680017A */ sh $zero, 0x17A($s4)
D_802A8950_7B02F0:
/* 41D6E0 802A8950 0C0A846C */ jal func_802A11B0_7A8B50
/* 41D6E4 802A8954 00000000 */ nop
/* 41D6E8 802A8958 10400454 */ beqz $v0, .L802A9AAC_7B144C
/* 41D6EC 802A895C 24020008 */ addiu $v0, $zero, 0x8
/* 41D6F0 802A8960 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41D6F4 802A8964 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41D6F8 802A8968 24020004 */ addiu $v0, $zero, 0x4
/* 41D6FC 802A896C 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41D700 802A8970 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41D704 802A8974 080AA6A9 */ j .L802A9AA4_7B1444
/* 41D708 802A8978 24020002 */ addiu $v0, $zero, 0x2
glabel .L802A897C_7B031C
/* 41D70C 802A897C 0C0A841E */ jal func_802A1078_7A8A18
/* 41D710 802A8980 00000000 */ nop
/* 41D714 802A8984 080AA6A9 */ j .L802A9AA4_7B1444
/* 41D718 802A8988 24020005 */ addiu $v0, $zero, 0x5
glabel .L802A898C_7B032C
/* 41D71C 802A898C 0C0A9606 */ jal func_802A5818_7AD1B8
/* 41D720 802A8990 00000000 */ nop
/* 41D724 802A8994 14400002 */ bnez $v0, .L802A89A0_7B0340
/* 41D728 802A8998 24040050 */ addiu $a0, $zero, 0x50
/* 41D72C 802A899C 24040051 */ addiu $a0, $zero, 0x51
.L802A89A0_7B0340:
/* 41D730 802A89A0 2405003C */ addiu $a1, $zero, 0x3C
/* 41D734 802A89A4 0C093E81 */ jal func_8024FA04
/* 41D738 802A89A8 0000302D */ daddu $a2, $zero, $zero
/* 41D73C 802A89AC 24020001 */ addiu $v0, $zero, 0x1
/* 41D740 802A89B0 3C01802B */ lui $at, %hi(D_802AD607)
/* 41D744 802A89B4 A022D607 */ sb $v0, %lo(D_802AD607)($at)
/* 41D748 802A89B8 080AA6A9 */ j .L802A9AA4_7B1444
/* 41D74C 802A89BC 24020009 */ addiu $v0, $zero, 0x9
glabel .L802A89C0_7B0360
/* 41D750 802A89C0 0C093EAD */ jal func_8024FAB4
/* 41D754 802A89C4 00000000 */ nop
/* 41D758 802A89C8 14400438 */ bnez $v0, .L802A9AAC_7B144C
/* 41D75C 802A89CC 24020004 */ addiu $v0, $zero, 0x4
/* 41D760 802A89D0 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41D764 802A89D4 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41D768 802A89D8 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41D76C 802A89DC AC20CC60 */ sw $zero, %lo(D_802ACC60)($at)
/* 41D770 802A89E0 3C01802B */ lui $at, %hi(D_802AD607)
/* 41D774 802A89E4 A020D607 */ sb $zero, %lo(D_802AD607)($at)
/* 41D778 802A89E8 080AA6A9 */ j .L802A9AA4_7B1444
/* 41D77C 802A89EC 24020002 */ addiu $v0, $zero, 0x2
glabel .L802A89F0_7B0390
/* 41D780 802A89F0 9282020E */ lbu $v0, 0x20E($s4)
/* 41D784 802A89F4 1040007A */ beqz $v0, .L802A8BE0_7B0580
/* 41D788 802A89F8 0000882D */ daddu $s1, $zero, $zero
/* 41D78C 802A89FC 3C1E802B */ lui $fp, %hi(D_802AB590_7B2F30)
/* 41D790 802A8A00 27DEB590 */ addiu $fp, $fp, %lo(D_802AB590_7B2F30)
/* 41D794 802A8A04 2416000C */ addiu $s6, $zero, 0xC
/* 41D798 802A8A08 24150008 */ addiu $s5, $zero, 0x8
.L802A8A0C_7B03AC:
/* 41D79C 802A8A0C 02912821 */ addu $a1, $s4, $s1
/* 41D7A0 802A8A10 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCantUseMessages)
/* 41D7A4 802A8A14 2442D5E8 */ addiu $v0, $v0, %lo(BattleMenu_Moves_OptionCantUseMessages)
/* 41D7A8 802A8A18 02222021 */ addu $a0, $s1, $v0
/* 41D7AC 802A8A1C 90A301DE */ lbu $v1, 0x1DE($a1)
/* 41D7B0 802A8A20 3C188009 */ lui $t8, %hi(gMoveTable)
/* 41D7B4 802A8A24 2718F060 */ addiu $t8, $t8, %lo(gMoveTable)
/* 41D7B8 802A8A28 A0800000 */ sb $zero, 0x0($a0)
/* 41D7BC 802A8A2C 00031080 */ sll $v0, $v1, 2
/* 41D7C0 802A8A30 00431021 */ addu $v0, $v0, $v1
/* 41D7C4 802A8A34 00021080 */ sll $v0, $v0, 2
/* 41D7C8 802A8A38 80A301F6 */ lb $v1, 0x1F6($a1)
/* 41D7CC 802A8A3C 14600003 */ bnez $v1, .L802A8A4C_7B03EC
/* 41D7D0 802A8A40 00583821 */ addu $a3, $v0, $t8
/* 41D7D4 802A8A44 A0800000 */ sb $zero, 0x0($a0)
/* 41D7D8 802A8A48 80A301F6 */ lb $v1, 0x1F6($a1)
.L802A8A4C_7B03EC:
/* 41D7DC 802A8A4C 2402FFFF */ addiu $v0, $zero, -0x1
/* 41D7E0 802A8A50 14620005 */ bne $v1, $v0, .L802A8A68_7B0408
/* 41D7E4 802A8A54 2402FFFE */ addiu $v0, $zero, -0x2
/* 41D7E8 802A8A58 A0A001F6 */ sb $zero, 0x1F6($a1)
/* 41D7EC 802A8A5C 24180048 */ addiu $t8, $zero, 0x48
/* 41D7F0 802A8A60 A0980000 */ sb $t8, 0x0($a0)
/* 41D7F4 802A8A64 80A301F6 */ lb $v1, 0x1F6($a1)
.L802A8A68_7B0408:
/* 41D7F8 802A8A68 14620003 */ bne $v1, $v0, .L802A8A78_7B0418
/* 41D7FC 802A8A6C 24180048 */ addiu $t8, $zero, 0x48
/* 41D800 802A8A70 A0A001F6 */ sb $zero, 0x1F6($a1)
/* 41D804 802A8A74 A0980000 */ sb $t8, 0x0($a0)
.L802A8A78_7B0418:
/* 41D808 802A8A78 3C04802B */ lui $a0, %hi(battle_menu_moveOptionIconScripts)
/* 41D80C 802A8A7C 2484D260 */ addiu $a0, $a0, %lo(battle_menu_moveOptionIconScripts)
/* 41D810 802A8A80 82E30012 */ lb $v1, 0x12($s7)
/* 41D814 802A8A84 00113080 */ sll $a2, $s1, 2
/* 41D818 802A8A88 00031080 */ sll $v0, $v1, 2
/* 41D81C 802A8A8C 00431021 */ addu $v0, $v0, $v1
/* 41D820 802A8A90 000210C0 */ sll $v0, $v0, 3
/* 41D824 802A8A94 02A21021 */ addu $v0, $s5, $v0
/* 41D828 802A8A98 005E1021 */ addu $v0, $v0, $fp
/* 41D82C 802A8A9C 8C420000 */ lw $v0, 0x0($v0)
/* 41D830 802A8AA0 00C42021 */ addu $a0, $a2, $a0
/* 41D834 802A8AA4 AC820000 */ sw $v0, 0x0($a0)
/* 41D838 802A8AA8 80A201F6 */ lb $v0, 0x1F6($a1)
/* 41D83C 802A8AAC 14400009 */ bnez $v0, .L802A8AD4_7B0474
/* 41D840 802A8AB0 00000000 */ nop
/* 41D844 802A8AB4 82E20012 */ lb $v0, 0x12($s7)
/* 41D848 802A8AB8 00021880 */ sll $v1, $v0, 2
/* 41D84C 802A8ABC 00621821 */ addu $v1, $v1, $v0
/* 41D850 802A8AC0 000318C0 */ sll $v1, $v1, 3
/* 41D854 802A8AC4 02C31821 */ addu $v1, $s6, $v1
/* 41D858 802A8AC8 007E1821 */ addu $v1, $v1, $fp
/* 41D85C 802A8ACC 8C620000 */ lw $v0, 0x0($v1)
D_802A8AD0_7B0470:
/* 41D860 802A8AD0 AC820000 */ sw $v0, 0x0($a0)
.L802A8AD4_7B0474:
/* 41D864 802A8AD4 90A201DE */ lbu $v0, 0x1DE($a1)
/* 41D868 802A8AD8 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionIndices)
/* 41D86C 802A8ADC 00260821 */ addu $at, $at, $a2
/* 41D870 802A8AE0 AC22D4B0 */ sw $v0, %lo(BattleMenu_Moves_OptionIndices)($at)
/* 41D874 802A8AE4 80A201F6 */ lb $v0, 0x1F6($a1)
/* 41D878 802A8AE8 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionEnabled)
/* 41D87C 802A8AEC 00260821 */ addu $at, $at, $a2
D_802A8AF0_7B0490:
/* 41D880 802A8AF0 AC22D510 */ sw $v0, %lo(BattleMenu_Moves_OptionEnabled)($at)
/* 41D884 802A8AF4 8CE20000 */ lw $v0, 0x0($a3)
/* 41D888 802A8AF8 3C01802B */ lui $at, %hi(battle_menu_moveOptionNames)
/* 41D88C 802A8AFC 00260821 */ addu $at, $at, $a2
/* 41D890 802A8B00 AC22D2C0 */ sw $v0, %lo(battle_menu_moveOptionNames)($at)
/* 41D894 802A8B04 8CE20008 */ lw $v0, 0x8($a3)
/* 41D898 802A8B08 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionDescMessages)
/* 41D89C 802A8B0C 00260821 */ addu $at, $at, $a2
/* 41D8A0 802A8B10 AC22D570 */ sw $v0, %lo(BattleMenu_Moves_OptionDescMessages)($at)
/* 41D8A4 802A8B14 80E20011 */ lb $v0, 0x11($a3)
/* 41D8A8 802A8B18 0260202D */ daddu $a0, $s3, $zero
/* 41D8AC 802A8B1C 3C01802B */ lui $at, %hi(battle_menu_moveOptionDisplayCosts)
/* 41D8B0 802A8B20 00260821 */ addu $at, $at, $a2
/* 41D8B4 802A8B24 AC22D320 */ sw $v0, %lo(battle_menu_moveOptionDisplayCosts)($at)
/* 41D8B8 802A8B28 80E20012 */ lb $v0, 0x12($a3)
/* 41D8BC 802A8B2C 24050018 */ addiu $a1, $zero, 0x18
/* 41D8C0 802A8B30 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionSortPriority)
/* 41D8C4 802A8B34 00310821 */ addu $at, $at, $s1
/* 41D8C8 802A8B38 A031D5D0 */ sb $s1, %lo(BattleMenu_Moves_OptionSortPriority)($at)
/* 41D8CC 802A8B3C 3C01802B */ lui $at, %hi(battle_menu_moveOptionBPCosts)
/* 41D8D0 802A8B40 00260821 */ addu $at, $at, $a2
/* 41D8D4 802A8B44 AC22D440 */ sw $v0, %lo(battle_menu_moveOptionBPCosts)($at)
/* 41D8D8 802A8B48 3C02802B */ lui $v0, %hi(battle_menu_moveOptionDisplayCostReductions)
/* 41D8DC 802A8B4C 2442D380 */ addiu $v0, $v0, %lo(battle_menu_moveOptionDisplayCostReductions)
/* 41D8E0 802A8B50 00C28021 */ addu $s0, $a2, $v0
/* 41D8E4 802A8B54 3C02802B */ lui $v0, %hi(battle_menu_moveOptionDisplayCostReductionColors)
/* 41D8E8 802A8B58 2442D3E0 */ addiu $v0, $v0, %lo(battle_menu_moveOptionDisplayCostReductionColors)
/* 41D8EC 802A8B5C 00C29021 */ addu $s2, $a2, $v0
/* 41D8F0 802A8B60 AE000000 */ sw $zero, 0x0($s0)
/* 41D8F4 802A8B64 0C099CAB */ jal player_team_is_ability_active
/* 41D8F8 802A8B68 AE400000 */ sw $zero, 0x0($s2)
/* 41D8FC 802A8B6C 10400008 */ beqz $v0, .L802A8B90_7B0530
/* 41D900 802A8B70 0260202D */ daddu $a0, $s3, $zero
/* 41D904 802A8B74 0C099CAB */ jal player_team_is_ability_active
/* 41D908 802A8B78 24050018 */ addiu $a1, $zero, 0x18
/* 41D90C 802A8B7C 8E030000 */ lw $v1, 0x0($s0)
/* 41D910 802A8B80 00621821 */ addu $v1, $v1, $v0
/* 41D914 802A8B84 24020001 */ addiu $v0, $zero, 0x1
/* 41D918 802A8B88 AE030000 */ sw $v1, 0x0($s0)
/* 41D91C 802A8B8C AE420000 */ sw $v0, 0x0($s2)
.L802A8B90_7B0530:
/* 41D920 802A8B90 0260202D */ daddu $a0, $s3, $zero
/* 41D924 802A8B94 0C099CAB */ jal player_team_is_ability_active
/* 41D928 802A8B98 24050026 */ addiu $a1, $zero, 0x26
/* 41D92C 802A8B9C 5040000B */ beql $v0, $zero, .L802A8BCC_7B056C
/* 41D930 802A8BA0 26D60008 */ addiu $s6, $s6, 0x8
/* 41D934 802A8BA4 0260202D */ daddu $a0, $s3, $zero
/* 41D938 802A8BA8 0C099CAB */ jal player_team_is_ability_active
/* 41D93C 802A8BAC 24050026 */ addiu $a1, $zero, 0x26
/* 41D940 802A8BB0 8E030000 */ lw $v1, 0x0($s0)
/* 41D944 802A8BB4 00021040 */ sll $v0, $v0, 1
/* 41D948 802A8BB8 00621821 */ addu $v1, $v1, $v0
/* 41D94C 802A8BBC 24020002 */ addiu $v0, $zero, 0x2
/* 41D950 802A8BC0 AE030000 */ sw $v1, 0x0($s0)
/* 41D954 802A8BC4 AE420000 */ sw $v0, 0x0($s2)
/* 41D958 802A8BC8 26D60008 */ addiu $s6, $s6, 0x8
.L802A8BCC_7B056C:
/* 41D95C 802A8BCC 9282020E */ lbu $v0, 0x20E($s4)
/* 41D960 802A8BD0 26310001 */ addiu $s1, $s1, 0x1
/* 41D964 802A8BD4 0222102A */ slt $v0, $s1, $v0
/* 41D968 802A8BD8 1440FF8C */ bnez $v0, .L802A8A0C_7B03AC
/* 41D96C 802A8BDC 26B50008 */ addiu $s5, $s5, 0x8
.L802A8BE0_7B0580:
/* 41D970 802A8BE0 8282005D */ lb $v0, 0x5D($s4)
/* 41D974 802A8BE4 04420001 */ bltzl $v0, .L802A8BEC_7B058C
/* 41D978 802A8BE8 A280005D */ sb $zero, 0x5D($s4)
.L802A8BEC_7B058C:
/* 41D97C 802A8BEC 8291005D */ lb $s1, 0x5D($s4)
/* 41D980 802A8BF0 9282020E */ lbu $v0, 0x20E($s4)
/* 41D984 802A8BF4 3C01802B */ lui $at, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 41D988 802A8BF8 AC20D4A0 */ sw $zero, %lo(BattleMenu_UsingSpiritsSubmenu)($at)
/* 41D98C 802A8BFC 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionCount)
/* 41D990 802A8C00 AC22D4A4 */ sw $v0, %lo(BattleMenu_Moves_OptionCount)($at)
/* 41D994 802A8C04 3C01802B */ lui $at, %hi(D_802AD4A8)
/* 41D998 802A8C08 AC31D4A8 */ sw $s1, %lo(D_802AD4A8)($at)
/* 41D99C 802A8C0C 0C0A89A1 */ jal func_802A2684_7AA024
/* 41D9A0 802A8C10 00000000 */ nop
/* 41D9A4 802A8C14 080AA6A9 */ j .L802A9AA4_7B1444
/* 41D9A8 802A8C18 2402000B */ addiu $v0, $zero, 0xB
glabel .L802A8C1C_7B05BC
/* 41D9AC 802A8C1C 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41D9B0 802A8C20 00000000 */ nop
/* 41D9B4 802A8C24 0040802D */ daddu $s0, $v0, $zero
/* 41D9B8 802A8C28 2402FFFF */ addiu $v0, $zero, -0x1
/* 41D9BC 802A8C2C 1202039D */ beq $s0, $v0, .L802A9AA4_7B1444
/* 41D9C0 802A8C30 24020010 */ addiu $v0, $zero, 0x10
/* 41D9C4 802A8C34 1200039D */ beqz $s0, .L802A9AAC_7B144C
/* 41D9C8 802A8C38 240200FF */ addiu $v0, $zero, 0xFF
/* 41D9CC 802A8C3C 5602000B */ bnel $s0, $v0, .L802A8C6C_7B060C
/* 41D9D0 802A8C40 2602FFFF */ addiu $v0, $s0, -0x1
/* 41D9D4 802A8C44 0C0A8414 */ jal func_802A1050_7A89F0
/* 41D9D8 802A8C48 00000000 */ nop
/* 41D9DC 802A8C4C 24020008 */ addiu $v0, $zero, 0x8
/* 41D9E0 802A8C50 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41D9E4 802A8C54 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41D9E8 802A8C58 24020004 */ addiu $v0, $zero, 0x4
/* 41D9EC 802A8C5C 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41D9F0 802A8C60 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41D9F4 802A8C64 080AA641 */ j .L802A9904_7B12A4
/* 41D9F8 802A8C68 24020002 */ addiu $v0, $zero, 0x2
.L802A8C6C_7B060C:
/* 41D9FC 802A8C6C 0C0A89F4 */ jal D_802A27D0_7AA170
D_802A8C70_7B0610:
/* 41DA00 802A8C70 A282004B */ sb $v0, 0x4B($s4)
/* 41DA04 802A8C74 0C0A840C */ jal func_802A1030_7A89D0
/* 41DA08 802A8C78 00000000 */ nop
/* 41DA0C 802A8C7C 080AA6A9 */ j .L802A9AA4_7B1444
/* 41DA10 802A8C80 2402000C */ addiu $v0, $zero, 0xC
glabel .L802A8C84_7B0624
/* 41DA14 802A8C84 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41DA18 802A8C88 00000000 */ nop
/* 41DA1C 802A8C8C 8E830214 */ lw $v1, 0x214($s4)
D_802A8C90_7B0630:
/* 41DA20 802A8C90 30634000 */ andi $v1, $v1, 0x4000
/* 41DA24 802A8C94 10600009 */ beqz $v1, .L802A8CBC_7B065C
/* 41DA28 802A8C98 0040802D */ daddu $s0, $v0, $zero
/* 41DA2C 802A8C9C 16000007 */ bnez $s0, .L802A8CBC_7B065C
/* 41DA30 802A8CA0 00000000 */ nop
/* 41DA34 802A8CA4 0C0A8AAE */ jal func_802A2AB8_7AA458
/* 41DA38 802A8CA8 00000000 */ nop
/* 41DA3C 802A8CAC 0C0A8426 */ jal func_802A1098_7A8A38
/* 41DA40 802A8CB0 00000000 */ nop
/* 41DA44 802A8CB4 080AA6A9 */ j .L802A9AA4_7B1444
/* 41DA48 802A8CB8 2402000D */ addiu $v0, $zero, 0xD
.L802A8CBC_7B065C:
/* 41DA4C 802A8CBC 0C0A846C */ jal func_802A11B0_7A8B50
/* 41DA50 802A8CC0 00000000 */ nop
/* 41DA54 802A8CC4 10400379 */ beqz $v0, .L802A9AAC_7B144C
/* 41DA58 802A8CC8 24030006 */ addiu $v1, $zero, 0x6
/* 41DA5C 802A8CCC 8282004B */ lb $v0, 0x4B($s4)
D_802A8CD0_7B0670:
/* 41DA60 802A8CD0 A2830178 */ sb $v1, 0x178($s4)
/* 41DA64 802A8CD4 00021080 */ sll $v0, $v0, 2
/* 41DA68 802A8CD8 3C01802B */ lui $at, %hi(D_802AD4B2)
/* 41DA6C 802A8CDC 00220821 */ addu $at, $at, $v0
/* 41DA70 802A8CE0 9422D4B2 */ lhu $v0, %lo(D_802AD4B2)($at)
/* 41DA74 802A8CE4 A682017C */ sh $v0, 0x17C($s4)
/* 41DA78 802A8CE8 00021400 */ sll $v0, $v0, 16
/* 41DA7C 802A8CEC 00021403 */ sra $v0, $v0, 16
D_802A8CF0_7B0690:
/* 41DA80 802A8CF0 00021880 */ sll $v1, $v0, 2
/* 41DA84 802A8CF4 00621821 */ addu $v1, $v1, $v0
/* 41DA88 802A8CF8 00031880 */ sll $v1, $v1, 2
/* 41DA8C 802A8CFC 3C018009 */ lui $at, %hi(D_8008F064)
/* 41DA90 802A8D00 00230821 */ addu $at, $at, $v1
/* 41DA94 802A8D04 8C23F064 */ lw $v1, %lo(D_8008F064)($at)
/* 41DA98 802A8D08 3C02802B */ lui $v0, %hi(D_802AD603)
/* 41DA9C 802A8D0C 9042D603 */ lbu $v0, %lo(D_802AD603)($v0)
/* 41DAA0 802A8D10 24040011 */ addiu $a0, $zero, 0x11
/* 41DAA4 802A8D14 A282005D */ sb $v0, 0x5D($s4)
/* 41DAA8 802A8D18 2402000E */ addiu $v0, $zero, 0xE
/* 41DAAC 802A8D1C A682006C */ sh $v0, 0x6C($s4)
/* 41DAB0 802A8D20 2402000F */ addiu $v0, $zero, 0xF
/* 41DAB4 802A8D24 A682006E */ sh $v0, 0x6E($s4)
.L802A8D28_7B06C8:
/* 41DAB8 802A8D28 0C090464 */ jal func_80241190
/* 41DABC 802A8D2C AE830184 */ sw $v1, 0x184($s4)
D_802A8D30_7B06D0:
/* 41DAC0 802A8D30 080AA6AB */ j .L802A9AAC_7B144C
/* 41DAC4 802A8D34 00000000 */ nop
glabel .L802A8D38_7B06D8
/* 41DAC8 802A8D38 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41DACC 802A8D3C 00000000 */ nop
/* 41DAD0 802A8D40 0C0A846C */ jal func_802A11B0_7A8B50
/* 41DAD4 802A8D44 00000000 */ nop
/* 41DAD8 802A8D48 10400358 */ beqz $v0, .L802A9AAC_7B144C
/* 41DADC 802A8D4C 2402000B */ addiu $v0, $zero, 0xB
D_802A8D50_7B06F0:
/* 41DAE0 802A8D50 080AA6A9 */ j .L802A9AA4_7B1444
/* 41DAE4 802A8D54 00000000 */ nop
glabel .L802A8D58_7B06F8
/* 41DAE8 802A8D58 0C0A8AAE */ jal func_802A2AB8_7AA458
/* 41DAEC 802A8D5C 00000000 */ nop
/* 41DAF0 802A8D60 0C0A8426 */ jal func_802A1098_7A8A38
/* 41DAF4 802A8D64 00000000 */ nop
/* 41DAF8 802A8D68 080AA6A9 */ j .L802A9AA4_7B1444
/* 41DAFC 802A8D6C 2402000D */ addiu $v0, $zero, 0xD
glabel .L802A8D70_7B0710
/* 41DB00 802A8D70 0C0A8B21 */ jal func_802A2C84_7AA624
/* 41DB04 802A8D74 00000000 */ nop
/* 41DB08 802A8D78 2403FFFF */ addiu $v1, $zero, -0x1
/* 41DB0C 802A8D7C 1043034B */ beq $v0, $v1, .L802A9AAC_7B144C
/* 41DB10 802A8D80 2402000B */ addiu $v0, $zero, 0xB
/* 41DB14 802A8D84 080AA6A9 */ j .L802A9AA4_7B1444
/* 41DB18 802A8D88 00000000 */ nop
/* 41DB1C 802A8D8C 0000802D */ daddu $s0, $zero, $zero
D_802A8D90_7B0730:
/* 41DB20 802A8D90 0200882D */ daddu $s1, $s0, $zero
/* 41DB24 802A8D94 3C098008 */ lui $t1, %hi(gItemTable)
/* 41DB28 802A8D98 252978E0 */ addiu $t1, $t1, %lo(gItemTable)
/* 41DB2C 802A8D9C 3C088009 */ lui $t0, %hi(gItemHudScripts)
/* 41DB30 802A8DA0 2508A680 */ addiu $t0, $t0, %lo(gItemHudScripts)
/* 41DB34 802A8DA4 24070001 */ addiu $a3, $zero, 0x1
/* 41DB38 802A8DA8 02E0302D */ daddu $a2, $s7, $zero
/* 41DB3C 802A8DAC 0240282D */ daddu $a1, $s2, $zero
D_802A8DB0_7B0750:
/* 41DB40 802A8DB0 84C201B4 */ lh $v0, 0x1B4($a2)
/* 41DB44 802A8DB4 50400015 */ beql $v0, $zero, .L802A8E0C_7B07AC
/* 41DB48 802A8DB8 26310001 */ addiu $s1, $s1, 0x1
/* 41DB4C 802A8DBC 00021140 */ sll $v0, $v0, 5
/* 41DB50 802A8DC0 00492021 */ addu $a0, $v0, $t1
/* 41DB54 802A8DC4 84820004 */ lh $v0, 0x4($a0)
/* 41DB58 802A8DC8 94830018 */ lhu $v1, 0x18($a0)
/* 41DB5C 802A8DCC 000210C0 */ sll $v0, $v0, 3
/* 41DB60 802A8DD0 30630002 */ andi $v1, $v1, 0x2
/* 41DB64 802A8DD4 1060000C */ beqz $v1, .L802A8E08_7B07A8
/* 41DB68 802A8DD8 00481021 */ addu $v0, $v0, $t0
/* 41DB6C 802A8DDC 8C420000 */ lw $v0, 0x0($v0)
/* 41DB70 802A8DE0 ACA20000 */ sw $v0, 0x0($a1)
/* 41DB74 802A8DE4 84C201B4 */ lh $v0, 0x1B4($a2)
/* 41DB78 802A8DE8 ACA7018C */ sw $a3, 0x18C($a1)
/* 41DB7C 802A8DEC ACA20108 */ sw $v0, 0x108($a1)
D_802A8DF0_7B0790:
/* 41DB80 802A8DF0 8C820000 */ lw $v0, 0x0($a0)
/* 41DB84 802A8DF4 ACA20084 */ sw $v0, 0x84($a1)
/* 41DB88 802A8DF8 8C820014 */ lw $v0, 0x14($a0)
/* 41DB8C 802A8DFC 26100001 */ addiu $s0, $s0, 0x1
/* 41DB90 802A8E00 ACA20294 */ sw $v0, 0x294($a1)
/* 41DB94 802A8E04 24A50004 */ addiu $a1, $a1, 0x4
.L802A8E08_7B07A8:
/* 41DB98 802A8E08 26310001 */ addiu $s1, $s1, 0x1
.L802A8E0C_7B07AC:
/* 41DB9C 802A8E0C 2A22000A */ slti $v0, $s1, 0xA
D_802A8E10_7B07B0:
/* 41DBA0 802A8E10 1440FFE7 */ bnez $v0, D_802A8DB0_7B0750
/* 41DBA4 802A8E14 24C60002 */ addiu $a2, $a2, 0x2
/* 41DBA8 802A8E18 82820060 */ lb $v0, 0x60($s4)
/* 41DBAC 802A8E1C 04420001 */ bltzl $v0, .L802A8E24_7B07C4
/* 41DBB0 802A8E20 A2800060 */ sb $zero, 0x60($s4)
.L802A8E24_7B07C4:
/* 41DBB4 802A8E24 82910060 */ lb $s1, 0x60($s4)
/* 41DBB8 802A8E28 0240202D */ daddu $a0, $s2, $zero
/* 41DBBC 802A8E2C AC800318 */ sw $zero, 0x318($a0)
/* 41DBC0 802A8E30 AC900324 */ sw $s0, 0x324($a0)
/* 41DBC4 802A8E34 AC80031C */ sw $zero, 0x31C($a0)
/* 41DBC8 802A8E38 AC800320 */ sw $zero, 0x320($a0)
/* 41DBCC 802A8E3C 0C03D44F */ jal create_battle_popup_menu
/* 41DBD0 802A8E40 AC910328 */ sw $s1, 0x328($a0)
/* 41DBD4 802A8E44 0C03D4AF */ jal func_800F52BC
/* 41DBD8 802A8E48 00000000 */ nop
/* 41DBDC 802A8E4C 080AA6A9 */ j .L802A9AA4_7B1444
D_802A8E50_7B07F0:
/* 41DBE0 802A8E50 24020029 */ addiu $v0, $zero, 0x29
/* 41DBE4 802A8E54 8643032C */ lh $v1, 0x32C($s2)
/* 41DBE8 802A8E58 10600314 */ beqz $v1, .L802A9AAC_7B144C
/* 41DBEC 802A8E5C 240200FF */ addiu $v0, $zero, 0xFF
/* 41DBF0 802A8E60 5462000B */ bnel $v1, $v0, .L802A8E90_7B0830
/* 41DBF4 802A8E64 2402002C */ addiu $v0, $zero, 0x2C
/* 41DBF8 802A8E68 0C0A8414 */ jal func_802A1050_7A89F0
/* 41DBFC 802A8E6C 00000000 */ nop
D_802A8E70_7B0810:
/* 41DC00 802A8E70 24020008 */ addiu $v0, $zero, 0x8
/* 41DC04 802A8E74 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41DC08 802A8E78 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41DC0C 802A8E7C 24020004 */ addiu $v0, $zero, 0x4
/* 41DC10 802A8E80 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41DC14 802A8E84 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41DC18 802A8E88 080AA641 */ j .L802A9904_7B12A4
/* 41DC1C 802A8E8C 24020002 */ addiu $v0, $zero, 0x2
.L802A8E90_7B0830:
/* 41DC20 802A8E90 A682006C */ sh $v0, 0x6C($s4)
/* 41DC24 802A8E94 8642032C */ lh $v0, 0x32C($s2)
/* 41DC28 802A8E98 2403002D */ addiu $v1, $zero, 0x2D
/* 41DC2C 802A8E9C A683006E */ sh $v1, 0x6E($s4)
/* 41DC30 802A8EA0 2442FFFF */ addiu $v0, $v0, -0x1
/* 41DC34 802A8EA4 00021080 */ sll $v0, $v0, 2
/* 41DC38 802A8EA8 02421021 */ addu $v0, $s2, $v0
/* 41DC3C 802A8EAC 9442010A */ lhu $v0, 0x10A($v0)
D_802A8EB0_7B0850:
/* 41DC40 802A8EB0 24030002 */ addiu $v1, $zero, 0x2
/* 41DC44 802A8EB4 A2830178 */ sb $v1, 0x178($s4)
/* 41DC48 802A8EB8 A68201AA */ sh $v0, 0x1AA($s4)
/* 41DC4C 802A8EBC A682017A */ sh $v0, 0x17A($s4)
/* 41DC50 802A8EC0 00021400 */ sll $v0, $v0, 16
/* 41DC54 802A8EC4 000212C3 */ sra $v0, $v0, 11
/* 41DC58 802A8EC8 3C038008 */ lui $v1, %hi(gItemTable + 0x8)
/* 41DC5C 802A8ECC 00621821 */ addu $v1, $v1, $v0
D_802A8ED0_7B0870:
/* 41DC60 802A8ED0 8C6378E8 */ lw $v1, %lo(gItemTable + 0x8)($v1)
/* 41DC64 802A8ED4 9242032D */ lbu $v0, 0x32D($s2)
/* 41DC68 802A8ED8 AE800188 */ sw $zero, 0x188($s4)
/* 41DC6C 802A8EDC 2442FFFF */ addiu $v0, $v0, -0x1
/* 41DC70 802A8EE0 34638000 */ ori $v1, $v1, 0x8000
/* 41DC74 802A8EE4 A2820060 */ sb $v0, 0x60($s4)
/* 41DC78 802A8EE8 0C03C4EC */ jal hide_popup_menu
/* 41DC7C 802A8EEC AE830184 */ sw $v1, 0x184($s4)
/* 41DC80 802A8EF0 0C0A840C */ jal func_802A1030_7A89D0
/* 41DC84 802A8EF4 00000000 */ nop
/* 41DC88 802A8EF8 080AA6A9 */ j .L802A9AA4_7B1444
/* 41DC8C 802A8EFC 2402002A */ addiu $v0, $zero, 0x2A
/* 41DC90 802A8F00 8E820214 */ lw $v0, 0x214($s4)
/* 41DC94 802A8F04 30424000 */ andi $v0, $v0, 0x4000
/* 41DC98 802A8F08 1040000A */ beqz $v0, .L802A8F34_7B08D4
/* 41DC9C 802A8F0C 00000000 */ nop
D_802A8F10_7B08B0:
/* 41DCA0 802A8F10 8642032C */ lh $v0, 0x32C($s2)
/* 41DCA4 802A8F14 14400007 */ bnez $v0, .L802A8F34_7B08D4
/* 41DCA8 802A8F18 00000000 */ nop
/* 41DCAC 802A8F1C 0C03C5B3 */ jal func_800F16CC
/* 41DCB0 802A8F20 00000000 */ nop
/* 41DCB4 802A8F24 0C0A8426 */ jal func_802A1098_7A8A38
/* 41DCB8 802A8F28 00000000 */ nop
/* 41DCBC 802A8F2C 080AA6A9 */ j .L802A9AA4_7B1444
D_802A8F30_7B08D0:
/* 41DCC0 802A8F30 2402002B */ addiu $v0, $zero, 0x2B
.L802A8F34_7B08D4:
/* 41DCC4 802A8F34 0C0A846C */ jal func_802A11B0_7A8B50
/* 41DCC8 802A8F38 00000000 */ nop
/* 41DCCC 802A8F3C 104002DB */ beqz $v0, .L802A9AAC_7B144C
/* 41DCD0 802A8F40 00000000 */ nop
/* 41DCD4 802A8F44 0C090464 */ jal func_80241190
/* 41DCD8 802A8F48 24040011 */ addiu $a0, $zero, 0x11
/* 41DCDC 802A8F4C 080AA6AB */ j .L802A9AAC_7B144C
/* 41DCE0 802A8F50 00000000 */ nop
/* 41DCE4 802A8F54 0C0A846C */ jal func_802A11B0_7A8B50
/* 41DCE8 802A8F58 00000000 */ nop
/* 41DCEC 802A8F5C 104002D3 */ beqz $v0, .L802A9AAC_7B144C
/* 41DCF0 802A8F60 24020029 */ addiu $v0, $zero, 0x29
/* 41DCF4 802A8F64 080AA6A9 */ j .L802A9AA4_7B1444
/* 41DCF8 802A8F68 00000000 */ nop
/* 41DCFC 802A8F6C 0C03C5B3 */ jal func_800F16CC
D_802A8F70_7B0910:
/* 41DD00 802A8F70 00000000 */ nop
/* 41DD04 802A8F74 0C0A8426 */ jal func_802A1098_7A8A38
/* 41DD08 802A8F78 00000000 */ nop
/* 41DD0C 802A8F7C 080AA6A9 */ j .L802A9AA4_7B1444
/* 41DD10 802A8F80 2402002B */ addiu $v0, $zero, 0x2B
/* 41DD14 802A8F84 0000802D */ daddu $s0, $zero, $zero
/* 41DD18 802A8F88 24110001 */ addiu $s1, $zero, 0x1
/* 41DD1C 802A8F8C 3C0C8009 */ lui $t4, %hi(gPartnerPopupProperties)
D_802A8F90_7B0930:
/* 41DD20 802A8F90 258CEF20 */ addiu $t4, $t4, %lo(gPartnerPopupProperties)
/* 41DD24 802A8F94 3C0B802B */ lui $t3, %hi(D_802AB3F8_7B2D98)
/* 41DD28 802A8F98 256BB3F8 */ addiu $t3, $t3, %lo(D_802AB3F8_7B2D98)
/* 41DD2C 802A8F9C 0220502D */ daddu $t2, $s1, $zero
/* 41DD30 802A8FA0 3C09802B */ lui $t1, %hi(D_802AB438_7B2DD8)
/* 41DD34 802A8FA4 2529B438 */ addiu $t1, $t1, %lo(D_802AB438_7B2DD8)
/* 41DD38 802A8FA8 3C088009 */ lui $t0, %hi(D_8008EEC4)
/* 41DD3C 802A8FAC 2508EEC4 */ addiu $t0, $t0, %lo(D_8008EEC4)
/* 41DD40 802A8FB0 0240202D */ daddu $a0, $s2, $zero
.L802A8FB4_7B0954:
/* 41DD44 802A8FB4 8D050000 */ lw $a1, 0x0($t0)
/* 41DD48 802A8FB8 000510C0 */ sll $v0, $a1, 3
/* 41DD4C 802A8FBC 02E23021 */ addu $a2, $s7, $v0
/* 41DD50 802A8FC0 90C20014 */ lbu $v0, 0x14($a2)
/* 41DD54 802A8FC4 50400019 */ beql $v0, $zero, .L802A902C_7B09CC
/* 41DD58 802A8FC8 26310001 */ addiu $s1, $s1, 0x1
/* 41DD5C 802A8FCC 00051900 */ sll $v1, $a1, 4
D_802A8FD0_7B0970:
/* 41DD60 802A8FD0 00053880 */ sll $a3, $a1, 2
/* 41DD64 802A8FD4 00EB1021 */ addu $v0, $a3, $t3
/* 41DD68 802A8FD8 8C420000 */ lw $v0, 0x0($v0)
/* 41DD6C 802A8FDC 006C1821 */ addu $v1, $v1, $t4
/* 41DD70 802A8FE0 AC850108 */ sw $a1, 0x108($a0)
/* 41DD74 802A8FE4 AC8A018C */ sw $t2, 0x18C($a0)
/* 41DD78 802A8FE8 AC820000 */ sw $v0, 0x0($a0)
/* 41DD7C 802A8FEC 8C620000 */ lw $v0, 0x0($v1)
D_802A8FF0_7B0990:
/* 41DD80 802A8FF0 AC820084 */ sw $v0, 0x84($a0)
/* 41DD84 802A8FF4 8C62000C */ lw $v0, 0xC($v1)
/* 41DD88 802A8FF8 AC820294 */ sw $v0, 0x294($a0)
/* 41DD8C 802A8FFC 80C20015 */ lb $v0, 0x15($a2)
glabel func_802A9000_7B09A0
/* 41DD90 802A9000 AC820210 */ sw $v0, 0x210($a0)
/* 41DD94 802A9004 82E20012 */ lb $v0, 0x12($s7)
/* 41DD98 802A9008 54450006 */ bnel $v0, $a1, .L802A9024_7B09C4
/* 41DD9C 802A900C 24840004 */ addiu $a0, $a0, 0x4
/* 41DDA0 802A9010 00E91021 */ addu $v0, $a3, $t1
/* 41DDA4 802A9014 AC80018C */ sw $zero, 0x18C($a0)
/* 41DDA8 802A9018 8C420000 */ lw $v0, 0x0($v0)
/* 41DDAC 802A901C AC820000 */ sw $v0, 0x0($a0)
/* 41DDB0 802A9020 24840004 */ addiu $a0, $a0, 0x4
.L802A9024_7B09C4:
/* 41DDB4 802A9024 26100001 */ addiu $s0, $s0, 0x1
/* 41DDB8 802A9028 26310001 */ addiu $s1, $s1, 0x1
.L802A902C_7B09CC:
/* 41DDBC 802A902C 2A22000C */ slti $v0, $s1, 0xC
D_802A9030_7B09D0:
/* 41DDC0 802A9030 1440FFE0 */ bnez $v0, .L802A8FB4_7B0954
/* 41DDC4 802A9034 25080004 */ addiu $t0, $t0, 0x4
/* 41DDC8 802A9038 82820061 */ lb $v0, 0x61($s4)
/* 41DDCC 802A903C 04420001 */ bltzl $v0, .L802A9044_7B09E4
/* 41DDD0 802A9040 A2800061 */ sb $zero, 0x61($s4)
.L802A9044_7B09E4:
/* 41DDD4 802A9044 82E30012 */ lb $v1, 0x12($s7)
/* 41DDD8 802A9048 24020001 */ addiu $v0, $zero, 0x1
/* 41DDDC 802A904C AE420318 */ sw $v0, 0x318($s2)
D_802A9050_7B09F0:
/* 41DDE0 802A9050 AE500324 */ sw $s0, 0x324($s2)
/* 41DDE4 802A9054 00031880 */ sll $v1, $v1, 2
.L802A9058_7B09F8:
/* 41DDE8 802A9058 3C028009 */ lui $v0, %hi(D_8008EEF0)
.L802A905C_7B09FC:
/* 41DDEC 802A905C 00431021 */ addu $v0, $v0, $v1
/* 41DDF0 802A9060 8C42EEF0 */ lw $v0, %lo(D_8008EEF0)($v0)
/* 41DDF4 802A9064 0240202D */ daddu $a0, $s2, $zero
/* 41DDF8 802A9068 AC80031C */ sw $zero, 0x31C($a0)
/* 41DDFC 802A906C AC800320 */ sw $zero, 0x320($a0)
D_802A9070_7B0A10:
/* 41DE00 802A9070 2442FFFF */ addiu $v0, $v0, -0x1
/* 41DE04 802A9074 0C03D44F */ jal create_battle_popup_menu
/* 41DE08 802A9078 AC820328 */ sw $v0, 0x328($a0)
/* 41DE0C 802A907C 0C03D4AF */ jal func_800F52BC
/* 41DE10 802A9080 00000000 */ nop
/* 41DE14 802A9084 080AA6A9 */ j .L802A9AA4_7B1444
/* 41DE18 802A9088 24020033 */ addiu $v0, $zero, 0x33
/* 41DE1C 802A908C 8643032C */ lh $v1, 0x32C($s2)
D_802A9090_7B0A30:
/* 41DE20 802A9090 2402FFFF */ addiu $v0, $zero, -0x1
/* 41DE24 802A9094 10620283 */ beq $v1, $v0, .L802A9AA4_7B1444
/* 41DE28 802A9098 24020038 */ addiu $v0, $zero, 0x38
.L802A909C_7B0A3C:
/* 41DE2C 802A909C 10600283 */ beqz $v1, .L802A9AAC_7B144C
/* 41DE30 802A90A0 240200FF */ addiu $v0, $zero, 0xFF
.L802A90A4_7B0A44:
/* 41DE34 802A90A4 5462000B */ bnel $v1, $v0, .L802A90D4_7B0A74
/* 41DE38 802A90A8 24020036 */ addiu $v0, $zero, 0x36
/* 41DE3C 802A90AC 0C0A8414 */ jal func_802A1050_7A89F0
D_802A90B0_7B0A50:
/* 41DE40 802A90B0 00000000 */ nop
/* 41DE44 802A90B4 24020008 */ addiu $v0, $zero, 0x8
/* 41DE48 802A90B8 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41DE4C 802A90BC AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41DE50 802A90C0 24020004 */ addiu $v0, $zero, 0x4
/* 41DE54 802A90C4 3C01802B */ lui $at, %hi(D_802ACC6C)
.L802A90C8_7B0A68:
/* 41DE58 802A90C8 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41DE5C 802A90CC 080AA641 */ j .L802A9904_7B12A4
D_802A90D0_7B0A70:
/* 41DE60 802A90D0 24020002 */ addiu $v0, $zero, 0x2
.L802A90D4_7B0A74:
/* 41DE64 802A90D4 A682006C */ sh $v0, 0x6C($s4)
/* 41DE68 802A90D8 8642032C */ lh $v0, 0x32C($s2)
/* 41DE6C 802A90DC 24030037 */ addiu $v1, $zero, 0x37
/* 41DE70 802A90E0 A683006E */ sh $v1, 0x6E($s4)
/* 41DE74 802A90E4 2442FFFF */ addiu $v0, $v0, -0x1
/* 41DE78 802A90E8 00021080 */ sll $v0, $v0, 2
/* 41DE7C 802A90EC 02421021 */ addu $v0, $s2, $v0
D_802A90F0_7B0A90:
/* 41DE80 802A90F0 9044010B */ lbu $a0, 0x10B($v0)
/* 41DE84 802A90F4 24020005 */ addiu $v0, $zero, 0x5
.L802A90F8_7B0A98:
/* 41DE88 802A90F8 A2820178 */ sb $v0, 0x178($s4)
.L802A90FC_7B0A9C:
/* 41DE8C 802A90FC 24020002 */ addiu $v0, $zero, 0x2
.L802A9100_7B0AA0:
/* 41DE90 802A9100 A683017C */ sh $v1, 0x17C($s4)
.L802A9104_7B0AA4:
/* 41DE94 802A9104 AE820184 */ sw $v0, 0x184($s4)
.L802A9108_7B0AA8:
/* 41DE98 802A9108 A28401AC */ sb $a0, 0x1AC($s4)
.L802A910C_7B0AAC:
/* 41DE9C 802A910C 0080182D */ daddu $v1, $a0, $zero
D_802A9110_7B0AB0:
/* 41DEA0 802A9110 00031E00 */ sll $v1, $v1, 24
/* 41DEA4 802A9114 9242032D */ lbu $v0, 0x32D($s2)
.L802A9118_7B0AB8:
/* 41DEA8 802A9118 00031E03 */ sra $v1, $v1, 24
glabel func_802A911C_7B0ABC
/* 41DEAC 802A911C A683017A */ sh $v1, 0x17A($s4)
glabel func_802A9120_7B0AC0
/* 41DEB0 802A9120 2442FFFF */ addiu $v0, $v0, -0x1
/* 41DEB4 802A9124 0C03C4EC */ jal hide_popup_menu
/* 41DEB8 802A9128 A2820061 */ sb $v0, 0x61($s4)
/* 41DEBC 802A912C 0C0A840C */ jal func_802A1030_7A89D0
D_802A9130_7B0AD0:
/* 41DEC0 802A9130 00000000 */ nop
/* 41DEC4 802A9134 080AA6A9 */ j .L802A9AA4_7B1444
glabel func_802A9138_7B0AD8
/* 41DEC8 802A9138 24020034 */ addiu $v0, $zero, 0x34
/* 41DECC 802A913C 8E820214 */ lw $v0, 0x214($s4)
/* 41DED0 802A9140 30424000 */ andi $v0, $v0, 0x4000
/* 41DED4 802A9144 10400224 */ beqz $v0, .L802A99D8_7B1378
/* 41DED8 802A9148 00000000 */ nop
/* 41DEDC 802A914C 8642032C */ lh $v0, 0x32C($s2)
D_802A9150_7B0AF0:
/* 41DEE0 802A9150 14400221 */ bnez $v0, .L802A99D8_7B1378
.L802A9154_7B0AF4:
/* 41DEE4 802A9154 00000000 */ nop
.L802A9158_7B0AF8:
/* 41DEE8 802A9158 0C03C5B3 */ jal func_800F16CC
.L802A915C_7B0AFC:
/* 41DEEC 802A915C 00000000 */ nop
.L802A9160_7B0B00:
/* 41DEF0 802A9160 0C0A8426 */ jal func_802A1098_7A8A38
.L802A9164_7B0B04:
/* 41DEF4 802A9164 00000000 */ nop
.L802A9168_7B0B08:
/* 41DEF8 802A9168 080AA6A9 */ j .L802A9AA4_7B1444
glabel func_802A916C_7B0B0C
/* 41DEFC 802A916C 24020035 */ addiu $v0, $zero, 0x35
D_802A9170_7B0B10:
/* 41DF00 802A9170 0C0A846C */ jal func_802A11B0_7A8B50
/* 41DF04 802A9174 00000000 */ nop
glabel func_802A9178_7B0B18
/* 41DF08 802A9178 1040024C */ beqz $v0, .L802A9AAC_7B144C
glabel func_802A917C_7B0B1C
/* 41DF0C 802A917C 24020033 */ addiu $v0, $zero, 0x33
/* 41DF10 802A9180 080AA6A9 */ j .L802A9AA4_7B1444
glabel func_802A9184_7B0B24
/* 41DF14 802A9184 00000000 */ nop
.L802A9188_7B0B28:
/* 41DF18 802A9188 0C03C5B3 */ jal func_800F16CC
.L802A918C_7B0B2C:
/* 41DF1C 802A918C 00000000 */ nop
D_802A9190_7B0B30:
/* 41DF20 802A9190 0C0A8426 */ jal func_802A1098_7A8A38
.L802A9194_7B0B34:
/* 41DF24 802A9194 00000000 */ nop
/* 41DF28 802A9198 080AA6A9 */ j .L802A9AA4_7B1444
.L802A919C_7B0B3C:
/* 41DF2C 802A919C 24020035 */ addiu $v0, $zero, 0x35
glabel func_802A91A0_7B0B40
/* 41DF30 802A91A0 0C03C54E */ jal destroy_popup_menu
.L802A91A4_7B0B44:
/* 41DF34 802A91A4 00000000 */ nop
glabel .L802A91A8_7B0B48
/* 41DF38 802A91A8 0C0A842E */ jal func_802A10B8_7A8A58
/* 41DF3C 802A91AC 00000000 */ nop
D_802A91B0_7B0B50:
/* 41DF40 802A91B0 080AA6AB */ j .L802A9AAC_7B144C
/* 41DF44 802A91B4 00000000 */ nop
glabel func_802A91B8_7B0B58
/* 41DF48 802A91B8 8643032C */ lh $v1, 0x32C($s2)
.L802A91BC_7B0B5C:
/* 41DF4C 802A91BC 2402FFFF */ addiu $v0, $zero, -0x1
/* 41DF50 802A91C0 1062023A */ beq $v1, $v0, .L802A9AAC_7B144C
/* 41DF54 802A91C4 24020033 */ addiu $v0, $zero, 0x33
/* 41DF58 802A91C8 080AA6A9 */ j .L802A9AA4_7B1444
/* 41DF5C 802A91CC 00000000 */ nop
D_802A91D0_7B0B70:
/* 41DF60 802A91D0 24100001 */ addiu $s0, $zero, 0x1
.L802A91D4_7B0B74:
/* 41DF64 802A91D4 0000882D */ daddu $s1, $zero, $zero
/* 41DF68 802A91D8 24020077 */ addiu $v0, $zero, 0x77
.L802A91DC_7B0B7C:
/* 41DF6C 802A91DC A28201DE */ sb $v0, 0x1DE($s4)
glabel func_802A91E0_7B0B80
/* 41DF70 802A91E0 24020155 */ addiu $v0, $zero, 0x155
.L802A91E4_7B0B84:
/* 41DF74 802A91E4 A290020E */ sb $s0, 0x20E($s4)
/* 41DF78 802A91E8 320300FF */ andi $v1, $s0, 0xFF
.L802A91EC_7B0B8C:
/* 41DF7C 802A91EC A68201AE */ sh $v0, 0x1AE($s4)
D_802A91F0_7B0B90:
/* 41DF80 802A91F0 0200102D */ daddu $v0, $s0, $zero
/* 41DF84 802A91F4 10600049 */ beqz $v1, .L802A931C_7B0CBC
glabel func_802A91F8
/* 41DF88 802A91F8 A28201F6 */ sb $v0, 0x1F6($s4)
.L802A91FC_7B0B9C:
/* 41DF8C 802A91FC 3C128009 */ lui $s2, %hi(gMoveTable)
/* 41DF90 802A9200 2652F060 */ addiu $s2, $s2, %lo(gMoveTable)
.L802A9204_7B0BA4:
/* 41DF94 802A9204 3C0F802B */ lui $t7, %hi(D_802AB398_7B2D38)
glabel func_802A9208
/* 41DF98 802A9208 25EFB398 */ addiu $t7, $t7, %lo(D_802AB398_7B2D38)
.L802A920C_7B0BAC:
/* 41DF9C 802A920C 3C10802B */ lui $s0, %hi(BattleMenu_Moves_OptionSortPriority)
D_802A9210_7B0BB0:
/* 41DFA0 802A9210 2610D5D0 */ addiu $s0, $s0, %lo(BattleMenu_Moves_OptionSortPriority)
/* 41DFA4 802A9214 3C0E802B */ lui $t6, %hi(battle_menu_moveOptionDisplayCostReductionColors)
/* 41DFA8 802A9218 25CED3E0 */ addiu $t6, $t6, %lo(battle_menu_moveOptionDisplayCostReductionColors)
/* 41DFAC 802A921C 3C0D802B */ lui $t5, %hi(battle_menu_moveOptionDisplayCostReductions)
/* 41DFB0 802A9220 25ADD380 */ addiu $t5, $t5, %lo(battle_menu_moveOptionDisplayCostReductions)
/* 41DFB4 802A9224 3C0C802B */ lui $t4, %hi(BattleMenu_Moves_OptionDescMessages)
glabel func_802A9228
/* 41DFB8 802A9228 258CD570 */ addiu $t4, $t4, %lo(BattleMenu_Moves_OptionDescMessages)
.L802A922C_7B0BCC:
/* 41DFBC 802A922C 3C0B802B */ lui $t3, %hi(battle_menu_moveOptionNames)
D_802A9230_7B0BD0:
/* 41DFC0 802A9230 256BD2C0 */ addiu $t3, $t3, %lo(battle_menu_moveOptionNames)
glabel func_802A9234
/* 41DFC4 802A9234 3C0A802B */ lui $t2, %hi(BattleMenu_Moves_OptionEnabled)
.L802A9238_7B0BD8:
/* 41DFC8 802A9238 254AD510 */ addiu $t2, $t2, %lo(BattleMenu_Moves_OptionEnabled)
glabel .L802A923C_7B0BDC
/* 41DFCC 802A923C 3C09802B */ lui $t1, %hi(BattleMenu_Moves_OptionIndices)
/* 41DFD0 802A9240 2529D4B0 */ addiu $t1, $t1, %lo(BattleMenu_Moves_OptionIndices)
.L802A9244_7B0BE4:
/* 41DFD4 802A9244 3C08802B */ lui $t0, %hi(battle_menu_moveOptionBPCosts)
/* 41DFD8 802A9248 2508D440 */ addiu $t0, $t0, %lo(battle_menu_moveOptionBPCosts)
/* 41DFDC 802A924C 3C06802B */ lui $a2, %hi(battle_menu_moveOptionDisplayCosts)
D_802A9250_7B0BF0:
/* 41DFE0 802A9250 24C6D320 */ addiu $a2, $a2, %lo(battle_menu_moveOptionDisplayCosts)
glabel func_802A9254
/* 41DFE4 802A9254 3C05802B */ lui $a1, %hi(battle_menu_moveOptionIconScripts)
glabel func_802A9258_7B0BF8
/* 41DFE8 802A9258 24A5D260 */ addiu $a1, $a1, %lo(battle_menu_moveOptionIconScripts)
.L802A925C_7B0BFC:
/* 41DFEC 802A925C 02912021 */ addu $a0, $s4, $s1
.L802A9260_7B0C00:
/* 41DFF0 802A9260 908301DE */ lbu $v1, 0x1DE($a0)
/* 41DFF4 802A9264 2462FF89 */ addiu $v0, $v1, -0x77
.L802A9268_7B0C08:
/* 41DFF8 802A9268 000210C0 */ sll $v0, $v0, 3
glabel .L802A926C_7B0C0C
/* 41DFFC 802A926C 004F1021 */ addu $v0, $v0, $t7
D_802A9270_7B0C10:
/* 41E000 802A9270 8C420000 */ lw $v0, 0x0($v0)
.L802A9274_7B0C14:
/* 41E004 802A9274 ACA20000 */ sw $v0, 0x0($a1)
glabel func_802A9278
/* 41E008 802A9278 00031080 */ sll $v0, $v1, 2
.L802A927C_7B0C1C:
/* 41E00C 802A927C 00431021 */ addu $v0, $v0, $v1
/* 41E010 802A9280 00021080 */ sll $v0, $v0, 2
.L802A9284_7B0C24:
/* 41E014 802A9284 808301F6 */ lb $v1, 0x1F6($a0)
glabel .L802A9288_7B0C28
/* 41E018 802A9288 14600008 */ bnez $v1, .L802A92AC_7B0C4C
glabel func_802A928C
/* 41E01C 802A928C 00523821 */ addu $a3, $v0, $s2
D_802A9290_7B0C30:
/* 41E020 802A9290 908201DE */ lbu $v0, 0x1DE($a0)
glabel func_802A9294
/* 41E024 802A9294 2442FF89 */ addiu $v0, $v0, -0x77
glabel func_802A9298
/* 41E028 802A9298 000210C0 */ sll $v0, $v0, 3
glabel .L802A929C_7B0C3C
/* 41E02C 802A929C 34420004 */ ori $v0, $v0, 0x4
glabel func_802A92A0
/* 41E030 802A92A0 004F1021 */ addu $v0, $v0, $t7
.L802A92A4_7B0C44:
/* 41E034 802A92A4 8C420000 */ lw $v0, 0x0($v0)
.L802A92A8_7B0C48:
/* 41E038 802A92A8 ACA20000 */ sw $v0, 0x0($a1)
.L802A92AC_7B0C4C:
/* 41E03C 802A92AC 80E20011 */ lb $v0, 0x11($a3)
D_802A92B0_7B0C50:
/* 41E040 802A92B0 24A50004 */ addiu $a1, $a1, 0x4
/* 41E044 802A92B4 ACC20000 */ sw $v0, 0x0($a2)
.L802A92B8_7B0C58:
/* 41E048 802A92B8 80E20012 */ lb $v0, 0x12($a3)
.L802A92BC_7B0C5C:
/* 41E04C 802A92BC 24C60004 */ addiu $a2, $a2, 0x4
glabel .L802A92C0_7B0C60
/* 41E050 802A92C0 AD020000 */ sw $v0, 0x0($t0)
.L802A92C4_7B0C64:
/* 41E054 802A92C4 AD310000 */ sw $s1, 0x0($t1)
.L802A92C8_7B0C68:
/* 41E058 802A92C8 25290004 */ addiu $t1, $t1, 0x4
/* 41E05C 802A92CC 25080004 */ addiu $t0, $t0, 0x4
D_802A92D0_7B0C70:
/* 41E060 802A92D0 02301021 */ addu $v0, $s1, $s0
glabel func_802A92D4
/* 41E064 802A92D4 A0510000 */ sb $s1, 0x0($v0)
/* 41E068 802A92D8 808201F6 */ lb $v0, 0x1F6($a0)
glabel func_802A92DC
/* 41E06C 802A92DC 26310001 */ addiu $s1, $s1, 0x1
glabel .L802A92E0_7B0C80
/* 41E070 802A92E0 AD420000 */ sw $v0, 0x0($t2)
glabel .L802A92E4_7B0C84
/* 41E074 802A92E4 8CE20000 */ lw $v0, 0x0($a3)
glabel .L802A92E8_7B0C88
/* 41E078 802A92E8 254A0004 */ addiu $t2, $t2, 0x4
glabel .L802A92EC_7B0C8C
/* 41E07C 802A92EC AD620000 */ sw $v0, 0x0($t3)
glabel func_802A92F0
/* 41E080 802A92F0 8CE20008 */ lw $v0, 0x8($a3)
.L802A92F4_7B0C94:
/* 41E084 802A92F4 256B0004 */ addiu $t3, $t3, 0x4
glabel .L802A92F8_7B0C98
/* 41E088 802A92F8 AD820000 */ sw $v0, 0x0($t4)
/* 41E08C 802A92FC ADA00000 */ sw $zero, 0x0($t5)
.L802A9300_7B0CA0:
/* 41E090 802A9300 ADC00000 */ sw $zero, 0x0($t6)
.L802A9304_7B0CA4:
/* 41E094 802A9304 25CE0004 */ addiu $t6, $t6, 0x4
.L802A9308_7B0CA8:
/* 41E098 802A9308 25AD0004 */ addiu $t5, $t5, 0x4
glabel .L802A930C_7B0CAC
/* 41E09C 802A930C 9282020E */ lbu $v0, 0x20E($s4)
func_802A9310:
/* 41E0A0 802A9310 0222102A */ slt $v0, $s1, $v0
.L802A9314_7B0CB4:
/* 41E0A4 802A9314 1440FFD1 */ bnez $v0, .L802A925C_7B0BFC
.L802A9318_7B0CB8:
/* 41E0A8 802A9318 258C0004 */ addiu $t4, $t4, 0x4
glabel .L802A931C_7B0CBC
/* 41E0AC 802A931C 82820062 */ lb $v0, 0x62($s4)
glabel .L802A9320_7B0CC0
/* 41E0B0 802A9320 04420001 */ bltzl $v0, .L802A9328_7B0CC8
.L802A9324_7B0CC4:
/* 41E0B4 802A9324 A2800062 */ sb $zero, 0x62($s4)
.L802A9328_7B0CC8:
/* 41E0B8 802A9328 82910062 */ lb $s1, 0x62($s4)
.L802A932C_7B0CCC:
/* 41E0BC 802A932C 9282020E */ lbu $v0, 0x20E($s4)
D_802A9330_7B0CD0:
/* 41E0C0 802A9330 24030001 */ addiu $v1, $zero, 0x1
.L802A9334_7B0CD4:
/* 41E0C4 802A9334 3C01802B */ lui $at, %hi(BattleMenu_UsingSpiritsSubmenu)
glabel .L802A9338_7B0CD8
/* 41E0C8 802A9338 AC23D4A0 */ sw $v1, %lo(BattleMenu_UsingSpiritsSubmenu)($at)
glabel .L802A933C_7B0CDC
/* 41E0CC 802A933C 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionCount)
glabel .L802A9340_7B0CE0
/* 41E0D0 802A9340 AC22D4A4 */ sw $v0, %lo(BattleMenu_Moves_OptionCount)($at)
glabel .L802A9344_7B0CE4
/* 41E0D4 802A9344 3C01802B */ lui $at, %hi(D_802AD4A8)
/* 41E0D8 802A9348 AC31D4A8 */ sw $s1, %lo(D_802AD4A8)($at)
.L802A934C_7B0CEC:
/* 41E0DC 802A934C 0C0A89A1 */ jal func_802A2684_7AA024
D_802A9350_7B0CF0:
/* 41E0E0 802A9350 00000000 */ nop
glabel .L802A9354_7B0CF4
/* 41E0E4 802A9354 080AA6A9 */ j .L802A9AA4_7B1444
glabel .L802A9358_7B0CF8
/* 41E0E8 802A9358 2402003D */ addiu $v0, $zero, 0x3D
glabel .L802A935C_7B0CFC
/* 41E0EC 802A935C 0C0A8B21 */ jal func_802A2C84_7AA624
.L802A9360_7B0D00:
/* 41E0F0 802A9360 00000000 */ nop
.L802A9364_7B0D04:
/* 41E0F4 802A9364 0040802D */ daddu $s0, $v0, $zero
glabel .L802A9368_7B0D08
/* 41E0F8 802A9368 120001D0 */ beqz $s0, .L802A9AAC_7B144C
glabel func_802A936C
/* 41E0FC 802A936C 240200FF */ addiu $v0, $zero, 0xFF
D_802A9370_7B0D10:
/* 41E100 802A9370 5602000B */ bnel $s0, $v0, .L802A93A0_7B0D40
/* 41E104 802A9374 2602FFFF */ addiu $v0, $s0, -0x1
glabel func_802A9378
/* 41E108 802A9378 0C0A8414 */ jal func_802A1050_7A89F0
.L802A937C_7B0D1C:
/* 41E10C 802A937C 00000000 */ nop
.L802A9380_7B0D20:
/* 41E110 802A9380 24020008 */ addiu $v0, $zero, 0x8
.L802A9384_7B0D24:
/* 41E114 802A9384 3C01802B */ lui $at, %hi(D_802ACC60)
glabel .L802A9388_7B0D28
/* 41E118 802A9388 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
glabel .L802A938C_7B0D2C
/* 41E11C 802A938C 24020004 */ addiu $v0, $zero, 0x4
D_802A9390_7B0D30:
/* 41E120 802A9390 3C01802B */ lui $at, %hi(D_802ACC6C)
glabel .L802A9394_7B0D34
/* 41E124 802A9394 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
glabel func_802A9398_7B0D38
/* 41E128 802A9398 080AA641 */ j .L802A9904_7B12A4
/* 41E12C 802A939C 24020002 */ addiu $v0, $zero, 0x2
.L802A93A0_7B0D40:
/* 41E130 802A93A0 00021080 */ sll $v0, $v0, 2
/* 41E134 802A93A4 3C01802B */ lui $at, %hi(D_802AD4B3)
.L802A93A8_7B0D48:
/* 41E138 802A93A8 00220821 */ addu $at, $at, $v0
.L802A93AC_7B0D4C:
/* 41E13C 802A93AC 9022D4B3 */ lbu $v0, %lo(D_802AD4B3)($at)
D_802A93B0_7B0D50:
/* 41E140 802A93B0 0C0A89F4 */ jal D_802A27D0_7AA170
glabel .L802A93B4_7B0D54
/* 41E144 802A93B4 A282004B */ sb $v0, 0x4B($s4)
.L802A93B8_7B0D58:
/* 41E148 802A93B8 0C0A840C */ jal func_802A1030_7A89D0
glabel .L802A93BC_7B0D5C
/* 41E14C 802A93BC 00000000 */ nop
.L802A93C0_7B0D60:
/* 41E150 802A93C0 080AA6A9 */ j .L802A9AA4_7B1444
glabel .L802A93C4_7B0D64
/* 41E154 802A93C4 2402003E */ addiu $v0, $zero, 0x3E
/* 41E158 802A93C8 0C0A8B21 */ jal func_802A2C84_7AA624
.L802A93CC_7B0D6C:
/* 41E15C 802A93CC 00000000 */ nop
D_802A93D0_7B0D70:
/* 41E160 802A93D0 8E830214 */ lw $v1, 0x214($s4)
.L802A93D4_7B0D74:
/* 41E164 802A93D4 30634000 */ andi $v1, $v1, 0x4000
glabel .L802A93D8_7B0D78
/* 41E168 802A93D8 10600009 */ beqz $v1, .L802A9400_7B0DA0
glabel .L802A93DC_7B0D7C
/* 41E16C 802A93DC 0040802D */ daddu $s0, $v0, $zero
/* 41E170 802A93E0 16000007 */ bnez $s0, .L802A9400_7B0DA0
.L802A93E4_7B0D84:
/* 41E174 802A93E4 00000000 */ nop
glabel .L802A93E8_7B0D88
/* 41E178 802A93E8 0C0A8AAE */ jal func_802A2AB8_7AA458
.L802A93EC_7B0D8C:
/* 41E17C 802A93EC 00000000 */ nop
D_802A93F0_7B0D90:
/* 41E180 802A93F0 0C0A8426 */ jal func_802A1098_7A8A38
glabel .L802A93F4_7B0D94
/* 41E184 802A93F4 00000000 */ nop
.L802A93F8_7B0D98:
/* 41E188 802A93F8 080AA6A9 */ j .L802A9AA4_7B1444
glabel .L802A93FC_7B0D9C
/* 41E18C 802A93FC 2402003F */ addiu $v0, $zero, 0x3F
glabel .L802A9400_7B0DA0
/* 41E190 802A9400 0C0A846C */ jal func_802A11B0_7A8B50
.L802A9404_7B0DA4:
/* 41E194 802A9404 00000000 */ nop
.L802A9408_7B0DA8:
/* 41E198 802A9408 104001A8 */ beqz $v0, .L802A9AAC_7B144C
/* 41E19C 802A940C 24020040 */ addiu $v0, $zero, 0x40
D_802A9410_7B0DB0:
/* 41E1A0 802A9410 A682006C */ sh $v0, 0x6C($s4)
.L802A9414_7B0DB4:
/* 41E1A4 802A9414 24020041 */ addiu $v0, $zero, 0x41
glabel .L802A9418_7B0DB8
/* 41E1A8 802A9418 A682006E */ sh $v0, 0x6E($s4)
glabel .L802A941C_7B0DBC
/* 41E1AC 802A941C 8282004B */ lb $v0, 0x4B($s4)
.L802A9420_7B0DC0:
/* 41E1B0 802A9420 24030008 */ addiu $v1, $zero, 0x8
.L802A9424_7B0DC4:
/* 41E1B4 802A9424 A2830178 */ sb $v1, 0x178($s4)
.L802A9428_7B0DC8:
/* 41E1B8 802A9428 02821021 */ addu $v0, $s4, $v0
.L802A942C_7B0DCC:
/* 41E1BC 802A942C 904301DE */ lbu $v1, 0x1DE($v0)
D_802A9430_7B0DD0:
/* 41E1C0 802A9430 8282004B */ lb $v0, 0x4B($s4)
.L802A9434_7B0DD4:
/* 41E1C4 802A9434 02821021 */ addu $v0, $s4, $v0
.L802A9438_7B0DD8:
/* 41E1C8 802A9438 A683017C */ sh $v1, 0x17C($s4)
.L802A943C_7B0DDC:
/* 41E1CC 802A943C 904301DE */ lbu $v1, 0x1DE($v0)
.L802A9440_7B0DE0:
/* 41E1D0 802A9440 24040011 */ addiu $a0, $zero, 0x11
/* 41E1D4 802A9444 00031080 */ sll $v0, $v1, 2
.L802A9448_7B0DE8:
/* 41E1D8 802A9448 00431021 */ addu $v0, $v0, $v1
glabel .L802A944C_7B0DEC
/* 41E1DC 802A944C 00021080 */ sll $v0, $v0, 2
D_802A9450_7B0DF0:
/* 41E1E0 802A9450 9283004B */ lbu $v1, 0x4B($s4)
.L802A9454_7B0DF4:
/* 41E1E4 802A9454 3C058009 */ lui $a1, %hi(D_8008F064)
.L802A9458_7B0DF8:
/* 41E1E8 802A9458 00A22821 */ addu $a1, $a1, $v0
.L802A945C_7B0DFC:
/* 41E1EC 802A945C 8CA5F064 */ lw $a1, %lo(D_8008F064)($a1)
/* 41E1F0 802A9460 3C02802B */ lui $v0, %hi(D_802AD603)
glabel .L802A9464_7B0E04
/* 41E1F4 802A9464 9042D603 */ lbu $v0, %lo(D_802AD603)($v0)
.L802A9468_7B0E08:
/* 41E1F8 802A9468 00031E00 */ sll $v1, $v1, 24
.L802A946C_7B0E0C:
/* 41E1FC 802A946C 00031E03 */ sra $v1, $v1, 24
D_802A9470_7B0E10:
/* 41E200 802A9470 A683017A */ sh $v1, 0x17A($s4)
.L802A9474_7B0E14:
/* 41E204 802A9474 A2820062 */ sb $v0, 0x62($s4)
/* 41E208 802A9478 0C090464 */ jal func_80241190
.L802A947C_7B0E1C:
/* 41E20C 802A947C AE850184 */ sw $a1, 0x184($s4)
.L802A9480_7B0E20:
/* 41E210 802A9480 080AA6AB */ j .L802A9AAC_7B144C
.L802A9484_7B0E24:
/* 41E214 802A9484 00000000 */ nop
.L802A9488_7B0E28:
/* 41E218 802A9488 0C0A8B21 */ jal func_802A2C84_7AA624
glabel func_802A948C
/* 41E21C 802A948C 00000000 */ nop
D_802A9490_7B0E30:
/* 41E220 802A9490 0C0A846C */ jal func_802A11B0_7A8B50
.L802A9494_7B0E34:
/* 41E224 802A9494 00000000 */ nop
.L802A9498_7B0E38:
/* 41E228 802A9498 10400184 */ beqz $v0, .L802A9AAC_7B144C
glabel .L802A949C_7B0E3C
/* 41E22C 802A949C 2402003D */ addiu $v0, $zero, 0x3D
.L802A94A0_7B0E40:
/* 41E230 802A94A0 080AA6A9 */ j .L802A9AA4_7B1444
glabel func_802A94A4
/* 41E234 802A94A4 00000000 */ nop
glabel .L802A94A8_7B0E48
/* 41E238 802A94A8 0C0A8AAE */ jal func_802A2AB8_7AA458
glabel .L802A94AC_7B0E4C
/* 41E23C 802A94AC 00000000 */ nop
D_802A94B0_7B0E50:
/* 41E240 802A94B0 0C0A8426 */ jal func_802A1098_7A8A38
.L802A94B4_7B0E54:
/* 41E244 802A94B4 00000000 */ nop
.L802A94B8_7B0E58:
/* 41E248 802A94B8 080AA6A9 */ j .L802A9AA4_7B1444
.L802A94BC_7B0E5C:
/* 41E24C 802A94BC 2402003F */ addiu $v0, $zero, 0x3F
glabel .L802A94C0_7B0E60
/* 41E250 802A94C0 0C0A89F9 */ jal func_802A27E4_7AA184
glabel .L802A94C4_7B0E64
/* 41E254 802A94C4 00000000 */ nop
/* 41E258 802A94C8 080AA46A */ j .L802A91A8_7B0B48
/* 41E25C 802A94CC 00000000 */ nop
D_802A94D0_7B0E70:
/* 41E260 802A94D0 0C098C9A */ jal func_80263268
.L802A94D4_7B0E74:
/* 41E264 802A94D4 0000802D */ daddu $s0, $zero, $zero
glabel func_802A94D8
/* 41E268 802A94D8 8282007C */ lb $v0, 0x7C($s4)
/* 41E26C 802A94DC 04400023 */ bltz $v0, .L802A956C_7B0F0C
.L802A94E0_7B0E80:
/* 41E270 802A94E0 3C05001D */ lui $a1, (0x1D00A1 >> 16)
.L802A94E4_7B0E84:
/* 41E274 802A94E4 34A500A1 */ ori $a1, $a1, (0x1D00A1 & 0xFFFF)
/* 41E278 802A94E8 24020005 */ addiu $v0, $zero, 0x5
.L802A94EC_7B0E8C:
/* 41E27C 802A94EC 3C04802B */ lui $a0, %hi(D_802AB4A4_7B2E44)
D_802A94F0_7B0E90:
/* 41E280 802A94F0 8C84B4A4 */ lw $a0, %lo(D_802AB4A4_7B2E44)($a0)
.L802A94F4_7B0E94:
/* 41E284 802A94F4 82E30012 */ lb $v1, 0x12($s7)
.L802A94F8_7B0E98:
/* 41E288 802A94F8 3C06802B */ lui $a2, %hi(D_802AD690)
.L802A94FC_7B0E9C:
/* 41E28C 802A94FC 24C6D690 */ addiu $a2, $a2, %lo(D_802AD690)
/* 41E290 802A9500 3C01802B */ lui $at, %hi(D_802AD678)
.L802A9504_7B0EA4:
/* 41E294 802A9504 AC22D678 */ sw $v0, %lo(D_802AD678)($at)
.L802A9508_7B0EA8:
/* 41E298 802A9508 00031880 */ sll $v1, $v1, 2
glabel .L802A950C_7B0EAC
/* 41E29C 802A950C 3C01802B */ lui $at, %hi(D_802AD658)
D_802A9510_7B0EB0:
/* 41E2A0 802A9510 AC24D658 */ sw $a0, %lo(D_802AD658)($at)
.L802A9514_7B0EB4:
/* 41E2A4 802A9514 3C01802B */ lui $at, %hi(D_802AB3F8_7B2D98)
.L802A9518_7B0EB8:
/* 41E2A8 802A9518 00230821 */ addu $at, $at, $v1
.L802A951C_7B0EBC:
/* 41E2AC 802A951C 8C23B3F8 */ lw $v1, %lo(D_802AB3F8_7B2D98)($at)
.L802A9520_7B0EC0:
/* 41E2B0 802A9520 24020001 */ addiu $v0, $zero, 0x1
glabel .L802A9524_7B0EC4
/* 41E2B4 802A9524 ACC20000 */ sw $v0, 0x0($a2)
.L802A9528_7B0EC8:
/* 41E2B8 802A9528 3C01802B */ lui $at, %hi(D_802AD6C0)
.L802A952C_7B0ECC:
/* 41E2BC 802A952C AC25D6C0 */ sw $a1, %lo(D_802AD6C0)($at)
D_802A9530_7B0ED0:
/* 41E2C0 802A9530 8282007C */ lb $v0, 0x7C($s4)
.L802A9534_7B0ED4:
/* 41E2C4 802A9534 3C04802B */ lui $a0, %hi(D_802AD640)
.L802A9538_7B0ED8:
/* 41E2C8 802A9538 2484D640 */ addiu $a0, $a0, %lo(D_802AD640)
.L802A953C_7B0EDC:
/* 41E2CC 802A953C 1C40000A */ bgtz $v0, .L802A9568_7B0F08
.L802A9540_7B0EE0:
/* 41E2D0 802A9540 AC830000 */ sw $v1, 0x0($a0)
glabel func_802A9544
/* 41E2D4 802A9544 82E20012 */ lb $v0, 0x12($s7)
.L802A9548_7B0EE8:
/* 41E2D8 802A9548 00021080 */ sll $v0, $v0, 2
.L802A954C_7B0EEC:
/* 41E2DC 802A954C 3C01802B */ lui $at, %hi(D_802AB438_7B2DD8)
D_802A9550_7B0EF0:
/* 41E2E0 802A9550 00220821 */ addu $at, $at, $v0
.L802A9554_7B0EF4:
/* 41E2E4 802A9554 8C22B438 */ lw $v0, %lo(D_802AB438_7B2DD8)($at)
.L802A9558_7B0EF8:
/* 41E2E8 802A9558 ACC00000 */ sw $zero, 0x0($a2)
glabel func_802A955C
/* 41E2EC 802A955C 3C01802B */ lui $at, %hi(D_802AD6A8)
/* 41E2F0 802A9560 AC20D6A8 */ sw $zero, %lo(D_802AD6A8)($at)
.L802A9564_7B0F04:
/* 41E2F4 802A9564 AC820000 */ sw $v0, 0x0($a0)
.L802A9568_7B0F08:
/* 41E2F8 802A9568 24100001 */ addiu $s0, $zero, 0x1
.L802A956C_7B0F0C:
/* 41E2FC 802A956C 3C05001D */ lui $a1, (0x1D00A2 >> 16)
D_802A9570_7B0F10:
/* 41E300 802A9570 00101880 */ sll $v1, $s0, 2
.L802A9574_7B0F14:
/* 41E304 802A9574 3C04802B */ lui $a0, %hi(D_802AB480_7B2E20)
.L802A9578_7B0F18:
/* 41E308 802A9578 8C84B480 */ lw $a0, %lo(D_802AB480_7B2E20)($a0)
/* 41E30C 802A957C 24020009 */ addiu $v0, $zero, 0x9
.L802A9580_7B0F20:
/* 41E310 802A9580 3C01802B */ lui $at, %hi(D_802AD678)
.L802A9584_7B0F24:
/* 41E314 802A9584 00230821 */ addu $at, $at, $v1
/* 41E318 802A9588 AC22D678 */ sw $v0, %lo(D_802AD678)($at)
.L802A958C_7B0F2C:
/* 41E31C 802A958C 24020001 */ addiu $v0, $zero, 0x1
func_802A9590:
/* 41E320 802A9590 3C01802B */ lui $at, %hi(D_802AD690)
/* 41E324 802A9594 00230821 */ addu $at, $at, $v1
glabel .L802A9598_7B0F38
/* 41E328 802A9598 AC22D690 */ sw $v0, %lo(D_802AD690)($at)
glabel func_802A959C
/* 41E32C 802A959C 3C01802B */ lui $at, %hi(D_802AD640)
.L802A95A0_7B0F40:
/* 41E330 802A95A0 00230821 */ addu $at, $at, $v1
.L802A95A4_7B0F44:
/* 41E334 802A95A4 AC24D640 */ sw $a0, %lo(D_802AD640)($at)
.L802A95A8_7B0F48:
/* 41E338 802A95A8 3C02802B */ lui $v0, %hi(D_802AB4B4_7B2E54)
.L802A95AC_7B0F4C:
/* 41E33C 802A95AC 8C42B4B4 */ lw $v0, %lo(D_802AB4B4_7B2E54)($v0)
D_802A95B0_7B0F50:
/* 41E340 802A95B0 34A500A2 */ ori $a1, $a1, (0x1D00A2 & 0xFFFF)
.L802A95B4_7B0F54:
/* 41E344 802A95B4 3C01802B */ lui $at, %hi(D_802AD6C0)
.L802A95B8_7B0F58:
/* 41E348 802A95B8 00230821 */ addu $at, $at, $v1
/* 41E34C 802A95BC AC25D6C0 */ sw $a1, %lo(D_802AD6C0)($at)
/* 41E350 802A95C0 3C01802B */ lui $at, %hi(D_802AD658)
.L802A95C4_7B0F64:
/* 41E354 802A95C4 00230821 */ addu $at, $at, $v1
.L802A95C8_7B0F68:
/* 41E358 802A95C8 AC22D658 */ sw $v0, %lo(D_802AD658)($at)
.L802A95CC_7B0F6C:
/* 41E35C 802A95CC 82820063 */ lb $v0, 0x63($s4)
D_802A95D0_7B0F70:
/* 41E360 802A95D0 04410002 */ bgez $v0, func_802A95DC_7B0F7C
.L802A95D4_7B0F74:
/* 41E364 802A95D4 26100001 */ addiu $s0, $s0, 0x1
.L802A95D8_7B0F78:
/* 41E368 802A95D8 A2800063 */ sb $zero, 0x63($s4)
glabel func_802A95DC_7B0F7C
/* 41E36C 802A95DC 82910063 */ lb $s1, 0x63($s4)
.L802A95E0_7B0F80:
/* 41E370 802A95E0 3C01802B */ lui $at, %hi(D_802AD66C)
.L802A95E4_7B0F84:
/* 41E374 802A95E4 AC30D66C */ sw $s0, %lo(D_802AD66C)($at)
.L802A95E8_7B0F88:
/* 41E378 802A95E8 3C01802B */ lui $at, %hi(D_802AD670)
.L802A95EC_7B0F8C:
/* 41E37C 802A95EC AC31D670 */ sw $s1, %lo(D_802AD670)($at)
D_802A95F0_7B0F90:
/* 41E380 802A95F0 0C0A9176 */ jal func_802A45D8_7ABF78
/* 41E384 802A95F4 00000000 */ nop
.L802A95F8_7B0F98:
/* 41E388 802A95F8 080AA6A9 */ j .L802A9AA4_7B1444
.L802A95FC_7B0F9C:
/* 41E38C 802A95FC 240200C9 */ addiu $v0, $zero, 0xC9
.L802A9600_7B0FA0:
/* 41E390 802A9600 0C0A9295 */ jal func_802A4A54_7AC3F4
.L802A9604_7B0FA4:
/* 41E394 802A9604 00000000 */ nop
.L802A9608_7B0FA8:
/* 41E398 802A9608 0040802D */ daddu $s0, $v0, $zero
.L802A960C_7B0FAC:
/* 41E39C 802A960C 12000127 */ beqz $s0, .L802A9AAC_7B144C
D_802A9610_7B0FB0:
/* 41E3A0 802A9610 240200FF */ addiu $v0, $zero, 0xFF
.L802A9614_7B0FB4:
/* 41E3A4 802A9614 1602000B */ bne $s0, $v0, .L802A9644_7B0FE4
.L802A9618_7B0FB8:
/* 41E3A8 802A9618 2603FFFF */ addiu $v1, $s0, -0x1
.L802A961C_7B0FBC:
/* 41E3AC 802A961C 0C0A8414 */ jal func_802A1050_7A89F0
### DECOMPILED C INSTRUCTIONS:
void btl_state_update_partner_menu(void) {
BattleStatus* battleStatus = &gBattleStatus;
PlayerData* playerData = &gPlayerData;
Actor* playerActor = battleStatus->playerActor;
Actor* partnerActor = battleStatus->partnerActor;
PopupMenu* popupMenu = &D_802ACCD0;
s32 entryIdx;
s32 i;
s32 popupIndex;
s32 initialPos;
MoveData* moveData;
PartnerPopupProperties* popupProps;
if (gBattleSubState == BTL_SUBSTATE_PARTNER_MENU_NONE) {
battleStatus->moveCategory = BTL_MENU_TYPE_INVALID;
battleStatus->selectedMoveID = MOVE_NONE;
battleStatus->currentAttackElement = 0;
if (!func_802A58D0()) {
btl_set_state(BATTLE_STATE_9);
} else {
btl_cam_use_preset(BTL_CAM_DEFAULT);
battleStatus->flags1 |= BS_FLAGS1_MENU_OPEN;
playerActor->flags &= ~(ACTOR_FLAG_4000000 | ACTOR_FLAG_8000000);
partnerActor->flags &= ~(ACTOR_FLAG_4000000 | ACTOR_FLAG_8000000);
if (battleStatus->flags1 & BS_FLAGS1_PLAYER_IN_BACK) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_INIT_MENU;
} else {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_12D;
partnerActor->state.currentPos.x = partnerActor->homePos.x;
partnerActor->state.currentPos.z = partnerActor->homePos.z;
partnerActor->state.goalPos.x = playerActor->homePos.x;
partnerActor->state.goalPos.z = playerActor->homePos.z;
partnerActor->state.moveTime = 4;
partnerActor->state.angle = 0.0f;
}
}
}
if (gBattleSubState == BTL_SUBSTATE_PARTNER_MENU_12D) {
if (partnerActor->state.moveTime != 0) {
partnerActor->currentPos.x += (partnerActor->state.goalPos.x - partnerActor->currentPos.x) / partnerActor->state.moveTime;
partnerActor->currentPos.z += (partnerActor->state.goalPos.z - partnerActor->currentPos.z) / partnerActor->state.moveTime;
playerActor->currentPos.x += (partnerActor->state.currentPos.x - playerActor->currentPos.x) / partnerActor->state.moveTime;
playerActor->currentPos.z += (partnerActor->state.currentPos.z - playerActor->currentPos.z) / partnerActor->state.moveTime;
}
partnerActor->currentPos.z += sin_rad(DEG_TO_RAD(partnerActor->state.angle)) * 16.0f;
partnerActor->yaw = clamp_angle(-partnerActor->state.angle);
playerActor->currentPos.z -= sin_rad(DEG_TO_RAD(partnerActor->state.angle)) * 16.0f;
playerActor->yaw = clamp_angle(-partnerActor->state.angle);
partnerActor->state.angle += 90.0f;
if (partnerActor->state.moveTime != 0) {
partnerActor->state.moveTime--;
} else {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_INIT_MENU;
partnerActor->currentPos.x = partnerActor->state.goalPos.x;
partnerActor->currentPos.z = partnerActor->state.goalPos.z;
playerActor->currentPos.x = partnerActor->state.currentPos.x;
playerActor->currentPos.z = partnerActor->state.currentPos.z;
partnerActor->homePos.x = partnerActor->currentPos.x;
partnerActor->homePos.z = partnerActor->currentPos.z;
playerActor->homePos.x = playerActor->currentPos.x;
playerActor->homePos.z = playerActor->currentPos.z;
gBattleStatus.flags1 |= BS_FLAGS1_PLAYER_IN_BACK;
}
}
switch (gBattleSubState) {
case BTL_SUBSTATE_PARTNER_MENU_INIT_MENU:
partnerActor->flags |= ACTOR_FLAG_8000000;
partnerActor->flags &= ~ACTOR_FLAG_4000000;
playerActor->flags |= ACTOR_FLAG_4000000;
playerActor->flags |= ACTOR_FLAG_8000000;
func_80263300();
func_80263268();
entryIdx = 0;
initialPos = 1;
if (battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_MAIN] < 0) {
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_MAIN] = BTL_MENU_TYPE_ABILITY;
}
btl_init_menu_partner();
func_80263268();
// strategies menu category
battle_menu_submenuIDs[entryIdx] = BTL_MENU_TYPE_STRATEGIES;
BattleMenu_OptionEnabled[entryIdx] = TRUE;
battle_menu_isMessageDisabled[entryIdx] = 0;
BattleMenu_HudScripts[entryIdx] = battle_menu_StrategiesHudScript.enabled;
BattleMenu_TitleMessages[entryIdx] = BattleMenu_CenteredMessages[BTL_MENU_TYPE_STRATEGIES];
if (!(battleStatus->enabledMenusFlags & BTL_MENU_ENABLED_STRATEGIES)) {
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW;
BattleMenu_HudScripts[entryIdx] = battle_menu_StrategiesHudScript.disabled;
}
if (battleStatus->lastPartnerMenuSelection[entryIdx] == BTL_MENU_TYPE_STRATEGIES) {
initialPos = entryIdx;
}
entryIdx++;
// abilities menu category
BattleMenu_HudScripts[entryIdx] = battle_menu_PartnerMoveHudScripts[playerData->currentPartner][0];
battle_menu_submenuIDs[entryIdx] = BTL_MENU_TYPE_ABILITY;
BattleMenu_OptionEnabled[entryIdx] = TRUE;
BattleMenu_TitleMessages[entryIdx] = BattleMenu_CenteredMessages[BTL_MENU_TYPE_ABILITY];
if (battleStatus->menuStatus[3] <= 0) {
BattleMenu_HudScripts[entryIdx] = battle_menu_PartnerMoveHudScripts[playerData->currentPartner][1];
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW;
}
if (!(battleStatus->enabledMenusFlags & BTL_MENU_ENABLED_ABILITIES)) {
BattleMenu_HudScripts[entryIdx] = battle_menu_PartnerMoveHudScripts[playerData->currentPartner][1];
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW;
}
if (battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_MAIN] == BTL_MENU_TYPE_ABILITY) {
initialPos = entryIdx;
}
entryIdx++;
// focus menu category
if (playerData->maxStarPower != 0 && is_ability_active(ABILITY_GROUP_FOCUS)) {
battle_menu_submenuIDs[entryIdx] = BTL_MENU_TYPE_PARTNER_FOCUS;
BattleMenu_OptionEnabled[entryIdx] = TRUE;
battle_menu_isMessageDisabled[entryIdx] = 0;
BattleMenu_HudScripts[entryIdx] = battle_menu_StarPowerHudScripts.enabled;
BattleMenu_TitleMessages[entryIdx] = BattleMenu_CenteredMessages[BTL_MENU_TYPE_PARTNER_FOCUS];
if (!(battleStatus->enabledMenusFlags & BTL_MENU_ENABLED_PARTNER_FOCUS)) {
BattleMenu_OptionEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW;
BattleMenu_HudScripts[entryIdx] = battle_menu_StarPowerHudScripts.disabled;
}
if (battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_MAIN] == BTL_MENU_TYPE_PARTNER_FOCUS) {
initialPos = entryIdx;
}
entryIdx++;
}
BattleMenu_NumOptions = entryIdx;
D_802AD0A8 = 1;
D_802AD0B0 = initialPos;
D_802AD100 = 2 - initialPos;
if (can_btl_state_update_switch_to_player()) {
BattleMenu_ShowSwapIcons = TRUE;
} else {
BattleMenu_ShowSwapIcons = FALSE;
}
btl_main_menu_init();
D_802ACC60 = 8;
D_802ACC6C = 0;
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_1;
return;
case BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_1:
set_animation(ACTOR_PARTNER, 0, BattleMenu_PartnerThinkAnims[playerData->currentPartner]);
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_2;
case BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_2:
entryIdx = btl_main_menu_update();
if (D_802ACC6C != 0) {
D_802ACC6C--;
} else if (!(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE) && (gGameStatusPtr->pressedButtons[0] & BUTTON_Z)) {
if (can_btl_state_update_switch_to_player()) {
sfx_play_sound(SOUND_F);
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_MAIN] = battle_menu_submenuIDs[BattleMenu_CurPos + BattleMenu_HomePos];
btl_main_menu_destroy();
btl_set_state(BATTLE_STATE_SWITCH_TO_PLAYER);
} else {
sfx_play_sound(SOUND_MENU_ERROR);
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_7;
}
break;
}
if (D_802ACC60 != 0) {
D_802ACC60--;
} else if (entryIdx != 0) {
set_animation(ACTOR_PARTNER, 0, BattleMenu_PartnerIdleAnims[playerData->currentPartner]);
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_MAIN] = battleStatus->unk_4A = battle_menu_submenuIDs[entryIdx - 1];
if (battleStatus->unk_4A == 7) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_1;
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else if (battleStatus->unk_4A == 6) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_1;
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else if (battleStatus->unk_4A == 8) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_FOCUS_1;
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else if (battleStatus->unk_4A == 2) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ITEMS_1;
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else if (battleStatus->unk_4A == 5) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_1;
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else {
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_6;
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_3;
}
}
break;
case BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_3:
entryIdx = btl_main_menu_update();
if ((battleStatus->currentButtonsPressed & BUTTON_B) && entryIdx == 0) {
func_802A1078();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_4;
return;
}
if (entryIdx != 0) {
battleStatus->moveCategory = BTL_MENU_TYPE_STAR_POWERS;
battleStatus->selectedMoveID = MOVE_FOCUS;
battleStatus->moveArgument = 0;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_FOCUS].flags;
btl_set_state(BATTLE_STATE_SELECT_TARGET);
return;
}
break;
case BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_4:
if (btl_main_menu_update() != 0) {
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_1;
}
break;
case BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_5:
func_802A1078();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_4;
break;
case BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_6:
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_7:
if (can_btl_state_update_switch_to_player() == 0) {
btl_show_variable_battle_message(BTL_MSG_CANT_MOVE, 60, 0);
} else {
btl_show_variable_battle_message(BTL_MSG_CANT_SWITCH, 60, 0);
}
D_802AD607 = 1;
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_8;
break;
case BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_8:
if (btl_is_popup_displayed() == 0) {
D_802ACC6C = 4;
D_802ACC60 = 0;
D_802AD607 = 0;
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_1;
}
break;
case BTL_SUBSTATE_PARTNER_MENU_ABILITIES_1:
for (i = 0; i < battleStatus->submenuMoveCount; i++) {
moveData = &gMoveTable[battleStatus->submenuMoves[i]];
BattleMenu_Moves_OptionCantUseMessages[i] = 0;
if (battleStatus->submenuStatus[i] == 0) {
BattleMenu_Moves_OptionCantUseMessages[i] = 0;
}
if (battleStatus->submenuStatus[i] == -1) {
battleStatus->submenuStatus[i] = 0;
BattleMenu_Moves_OptionCantUseMessages[i] = BTL_MSG_CANT_SELECT_NOW;
}
if (battleStatus->submenuStatus[i] == -2) {
battleStatus->submenuStatus[i] = 0;
BattleMenu_Moves_OptionCantUseMessages[i] = BTL_MSG_CANT_SELECT_NOW;
}
battle_menu_moveOptionIconScripts[i] = battle_menu_PartnerMoveHudScripts[playerData->currentPartner][2 * i + 2];
if (battleStatus->submenuStatus[i] == 0) {
battle_menu_moveOptionIconScripts[i] = battle_menu_PartnerMoveHudScripts[playerData->currentPartner][2 * i + 3];
}
BattleMenu_Moves_OptionIndices[i] = battleStatus->submenuMoves[i];
BattleMenu_Moves_OptionEnabled[i] = battleStatus->submenuStatus[i];
battle_menu_moveOptionNames[i] = moveData->nameMsg;
BattleMenu_Moves_OptionDescMessages[i] = moveData->shortDescMsg;
battle_menu_moveOptionDisplayCosts[i] = moveData->costFP;
battle_menu_moveOptionBPCosts[i] = moveData->costBP;
BattleMenu_Moves_OptionSortPriority[i] = i;
battle_menu_moveOptionDisplayCostReductions[i] = 0;
battle_menu_moveOptionDisplayCostReductionColors[i] = 0;
if (player_team_is_ability_active(playerActor, ABILITY_FLOWER_SAVER)) {
battle_menu_moveOptionDisplayCostReductions[i] += player_team_is_ability_active(playerActor, ABILITY_FLOWER_SAVER);
battle_menu_moveOptionDisplayCostReductionColors[i] = 1;
}
if (player_team_is_ability_active(playerActor, ABILITY_FLOWER_FANATIC)) {
battle_menu_moveOptionDisplayCostReductions[i] += player_team_is_ability_active(playerActor, ABILITY_FLOWER_FANATIC) * 2;
battle_menu_moveOptionDisplayCostReductionColors[i] = 2;
}
}
if (battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_ABILITY] < 0) {
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_ABILITY] = 0;
}
BattleMenu_UsingSpiritsSubmenu = FALSE;
BattleMenu_Moves_OptionCount = battleStatus->submenuMoveCount;
initialPos = battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_ABILITY];
D_802AD4A8 = initialPos;
func_802A2684();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_2;
break;
case BTL_SUBSTATE_PARTNER_MENU_ABILITIES_2:
entryIdx = btl_submenu_moves_update();
if (entryIdx == -1) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_7;
} else if (entryIdx != 0) {
if (entryIdx == 255) {
func_802A1050();
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_1;
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else {
battleStatus->unk_4B = entryIdx - 1;
func_802A27D0();
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_3;
}
}
break;
case BTL_SUBSTATE_PARTNER_MENU_ABILITIES_3:
entryIdx = btl_submenu_moves_update();
if ((battleStatus->currentButtonsPressed & BUTTON_B) && entryIdx == 0) {
func_802A2AB8();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_4;
} else if (btl_main_menu_update() != 0) {
battleStatus->moveCategory = BTL_MENU_TYPE_ABILITY;
battleStatus->selectedMoveID = BattleMenu_Moves_OptionIndices[battleStatus->unk_4B];
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags;
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_ABILITY] = battle_menu_moveOptionActive;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_6;
btl_set_state(BATTLE_STATE_SELECT_TARGET);
}
break;
case BTL_SUBSTATE_PARTNER_MENU_ABILITIES_4:
btl_submenu_moves_update();
if (btl_main_menu_update() != 0) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_2;
}
break;
case BTL_SUBSTATE_PARTNER_MENU_ABILITIES_5:
func_802A2AB8();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_4;
break;
case BTL_SUBSTATE_PARTNER_MENU_ABILITIES_6:
func_802A27E4();
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PARTNER_MENU_ABILITIES_7:
if (btl_submenu_moves_update() != -1) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_2;
}
break;
case BTL_SUBSTATE_PARTNER_MENU_ITEMS_1:
popupIndex = 0;
for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
ItemData* item;
HudScript** hudScript;
if (playerData->invItems[i] == 0) {
continue;
}
item = &gItemTable[playerData->invItems[i]];
hudScript = &gItemHudScripts[item->hudElemID].enabled;
if (!(item->typeFlags & ITEM_TYPE_FLAG_BATTLE_USABLE)) {
continue;
}
popupMenu->ptrIcon[popupIndex] = hudScript[0];
popupMenu->userIndex[popupIndex] = playerData->invItems[i];
popupMenu->enabled[popupIndex] = TRUE;
popupMenu->nameMsg[popupIndex] = item->nameMsg;
popupMenu->descMsg[popupIndex] = item->shortDescMsg;
popupIndex++;
}
if (battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_PARTNER_ITEM] < 0) {
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_PARTNER_ITEM] = 0;
}
popupMenu->popupType = POPUP_MENU_USE_ITEM;
popupMenu->numEntries = popupIndex;
popupMenu->dipMode = 0;
popupMenu->titleNumber = 0;
initialPos = battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_PARTNER_ITEM];
popupMenu->initialPos = initialPos;
create_battle_popup_menu(popupMenu);
func_800F52BC();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ITEMS_2;
break;
case BTL_SUBSTATE_PARTNER_MENU_ITEMS_2:
if (popupMenu->result != POPUP_RESULT_CHOOSING) {
if (popupMenu->result == POPUP_RESULT_CANCEL) {
func_802A1050();
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_1;
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else {
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_ITEMS_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_ITEMS_6;
battleStatus->unk_1AA = popupMenu->userIndex[popupMenu->result - 1];
battleStatus->moveCategory = BTL_MENU_TYPE_ITEMS;
battleStatus->moveArgument = battleStatus->unk_1AA;
battleStatus->currentTargetListFlags = gItemTable[battleStatus->moveArgument].targetFlags | TARGET_FLAG_8000;
battleStatus->currentAttackElement = 0;
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_PARTNER_ITEM] = popupMenu->result - 1;
hide_popup_menu();
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ITEMS_3;
}
}
break;
case BTL_SUBSTATE_PARTNER_MENU_ITEMS_3:
if ((battleStatus->currentButtonsPressed & BUTTON_B) && popupMenu->result == POPUP_RESULT_CHOOSING) {
func_800F16CC();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ITEMS_4;
} else if (btl_main_menu_update() != 0) {
btl_set_state(BATTLE_STATE_SELECT_TARGET);
}
break;
case BTL_SUBSTATE_PARTNER_MENU_ITEMS_4:
if (btl_main_menu_update() != 0) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ITEMS_2;
}
break;
case BTL_SUBSTATE_PARTNER_MENU_ITEMS_5:
func_800F16CC();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ITEMS_4;
break;
case BTL_SUBSTATE_PARTNER_MENU_ITEMS_6:
destroy_popup_menu();
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_1:
popupIndex = 0;
for (i = 1; i < ARRAY_COUNT(D_8008EEC0); i++) {
s32 partnerId = D_8008EEC0[i];
if (playerData->partners[partnerId].enabled) {
popupProps = &gPartnerPopupProperties[partnerId];
popupMenu->ptrIcon[popupIndex] = battle_menu_PartnerHudScripts[partnerId];
popupMenu->userIndex[popupIndex] = partnerId;
popupMenu->enabled[popupIndex] = 1;
popupMenu->nameMsg[popupIndex] = popupProps->nameMsg;
popupMenu->descMsg[popupIndex] = popupProps->battleDescMsg;
popupMenu->value[popupIndex] = playerData->partners[partnerId].level;
if (playerData->currentPartner == partnerId) {
popupMenu->enabled[popupIndex] = 0;
popupMenu->ptrIcon[popupIndex] = battle_menu_DisabledPartnerHudScripts[partnerId];
}
popupIndex++;
}
}
if (battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_PARTNER] < 0) {
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_PARTNER] = 0;
}
popupMenu->popupType = POPUP_MENU_SWITCH_PARTNER;
popupMenu->numEntries = popupIndex;
popupMenu->initialPos = D_8008EEF0[playerData->currentPartner] - 1;
popupMenu->dipMode = 0;
popupMenu->titleNumber = 0;
create_battle_popup_menu(popupMenu);
func_800F52BC();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_2;
break;
case BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_2:
if (popupMenu->result == POPUP_RESULT_MINUS_1) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_7;
} else if (popupMenu->result != POPUP_RESULT_CHOOSING) {
if (popupMenu->result == POPUP_RESULT_CANCEL) {
func_802A1050();
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_1;
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else {
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_6;
battleStatus->unk_1AC = popupMenu->userIndex[popupMenu->result - 1];
battleStatus->moveCategory = BTL_MENU_TYPE_CHANGE_PARTNER;
battleStatus->selectedMoveID = MOVE_UNUSED_37;
battleStatus->currentTargetListFlags = TARGET_FLAG_2;
battleStatus->moveArgument = battleStatus->unk_1AC;
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_PARTNER] = popupMenu->result - 1;
hide_popup_menu();
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_3;
}
}
break;
case BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_3:
if ((battleStatus->currentButtonsPressed & BUTTON_B) && (popupMenu->result == POPUP_RESULT_CHOOSING)) {
func_800F16CC();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_4;
} else if (btl_main_menu_update() != 0) {
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
btl_state_update_partner_menu();
btl_set_state(BATTLE_STATE_CHANGE_PARTNER);
}
break;
case BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_4:
if (btl_main_menu_update() != 0) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_2;
}
break;
case BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_5:
func_800F16CC();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_4;
break;
case BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_6:
destroy_popup_menu();
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_7:
if (popupMenu->result != POPUP_RESULT_MINUS_1) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_2;
}
break;
case BTL_SUBSTATE_PARTNER_MENU_FOCUS_1:
entryIdx = 1;
battleStatus->submenuMoves[0] = MOVE_FOCUS;
battleStatus->submenuMoveCount = entryIdx;
battleStatus->submenuIcons[0] = ITEM_PARTNER_ATTACK;
battleStatus->submenuStatus[0] = 1;
for (i = 0; i < battleStatus->submenuMoveCount; i++) {
moveData = &gMoveTable[battleStatus->submenuMoves[i]];
battle_menu_moveOptionIconScripts[i] = battle_menu_StarPowerMovesHudScripts[2 * STAR_POWER_INDEX(battleStatus->submenuMoves[i]) + 0];
if (battleStatus->submenuStatus[i] == 0) {
battle_menu_moveOptionIconScripts[i] = battle_menu_StarPowerMovesHudScripts[2 * STAR_POWER_INDEX(battleStatus->submenuMoves[i]) + 1];
}
battle_menu_moveOptionDisplayCosts[i] = moveData->costFP;
battle_menu_moveOptionBPCosts[i] = moveData->costBP;
BattleMenu_Moves_OptionIndices[i] = i;
BattleMenu_Moves_OptionSortPriority[i] = i;
BattleMenu_Moves_OptionEnabled[i] = battleStatus->submenuStatus[i];
battle_menu_moveOptionNames[i] = moveData->nameMsg;
BattleMenu_Moves_OptionDescMessages[i] = moveData->shortDescMsg;
battle_menu_moveOptionDisplayCostReductions[i] = 0;
battle_menu_moveOptionDisplayCostReductionColors[i] = 0;
}
if (battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_STAR_POWER] < 0) {
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_STAR_POWER] = 0;
}
BattleMenu_UsingSpiritsSubmenu = TRUE;
BattleMenu_Moves_OptionCount = battleStatus->submenuMoveCount;
initialPos = battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_STAR_POWER];
D_802AD4A8 = initialPos;
func_802A2684();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_FOCUS_2;
break;
case BTL_SUBSTATE_PARTNER_MENU_FOCUS_2:
entryIdx = btl_submenu_moves_update();
if (entryIdx != 0) {
if (entryIdx == 255) {
func_802A1050();
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_1;
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else {
battleStatus->unk_4B = BattleMenu_Moves_OptionIndices[entryIdx - 1];
func_802A27D0();
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_FOCUS_3;
}
}
break;
case BTL_SUBSTATE_PARTNER_MENU_FOCUS_3:
entryIdx = btl_submenu_moves_update();
if ((battleStatus->currentButtonsPressed & BUTTON_B) && (entryIdx == 0)) {
func_802A2AB8();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_FOCUS_4;
} else if (btl_main_menu_update() != 0) {
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_FOCUS_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_FOCUS_6;
battleStatus->moveCategory = BTL_MENU_TYPE_STAR_POWERS;
battleStatus->selectedMoveID = battleStatus->submenuMoves[battleStatus->unk_4B];
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->submenuMoves[battleStatus->unk_4B]].flags;
battleStatus->moveArgument = battleStatus->unk_4B;
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_STAR_POWER] = battle_menu_moveOptionActive;
btl_set_state(BATTLE_STATE_SELECT_TARGET);
}
break;
case BTL_SUBSTATE_PARTNER_MENU_FOCUS_4:
btl_submenu_moves_update();
if (btl_main_menu_update() != 0) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_FOCUS_2;
}
break;
case BTL_SUBSTATE_PARTNER_MENU_FOCUS_5:
func_802A2AB8();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_FOCUS_4;
break;
case BTL_SUBSTATE_PARTNER_MENU_FOCUS_6:
func_802A27E4();
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_1:
popupIndex = 0;
func_80263268();
if (battleStatus->changePartnerAllowed >= 0) {
D_802AD678[popupIndex] = BTL_MENU_TYPE_CHANGE_PARTNER;
D_802AD658[popupIndex] = BattleMenu_LeftJustMessages[BTL_MENU_TYPE_CHANGE_PARTNER];
D_802AD640[popupIndex] = battle_menu_PartnerHudScripts[playerData->currentPartner];
D_802AD690[popupIndex] = 1;
D_802AD6C0[popupIndex] = MSG_Menus_Action_ChangePartner;
if (battleStatus->changePartnerAllowed <= 0) {
D_802AD640[popupIndex] = battle_menu_DisabledPartnerHudScripts[playerData->currentPartner];
D_802AD690[popupIndex] = 0;
D_802AD6A8[popupIndex] = 0;
}
popupIndex++;
}
D_802AD640[popupIndex] = battle_menu_DoNothingHudScripts.enabled;
D_802AD678[popupIndex] = BTL_MENU_TYPE_DO_NOTHING;
D_802AD690[popupIndex] = 1;
D_802AD658[popupIndex] = BattleMenu_LeftJustMessages[BTL_MENU_TYPE_DO_NOTHING];
D_802AD6C0[popupIndex] = MSG_Menus_Action_DoNothing;
popupIndex++;
if (battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_STRATEGY] < 0) {
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_STRATEGY] = 0;
}
D_802AD66C = popupIndex;
initialPos = battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_STRATEGY];
D_802AD670 = initialPos;
func_802A45D8();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_2;
break;
case BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_2:
entryIdx = func_802A4A54();
if (entryIdx != 0) {
if (entryIdx == 255) {
func_802A1050();
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_1;
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else {
battleStatus->unk_4A = D_802AD678[entryIdx - 1];
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_STRATEGY] = entryIdx - 1;
if (battleStatus->unk_4A == 5) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_1;
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else {
func_802A4718();
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_3;
}
}
}
break;
case BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_3:
entryIdx = func_802A4A54();
if ((battleStatus->currentButtonsPressed & BUTTON_B) && entryIdx == 0) {
func_802A48FC();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_4;
} else if (btl_main_menu_update() != 0) {
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_6;
entryIdx = battleStatus->unk_4A;
switch (entryIdx) {
case 9:
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_6;
btl_state_update_partner_menu();
btl_set_state(BATTLE_STATE_END_PARTNER_TURN);
break;
case 3:
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_6;
btl_state_update_partner_menu();
battleStatus->moveCategory = entryIdx;
battleStatus->selectedMoveID = MOVE_UNUSED_39;
btl_set_state(BATTLE_STATE_RUN_AWAY);
break;
case 10:
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_6;
btl_state_update_partner_menu();
btl_set_state(BATTLE_STATE_SWITCH_TO_PLAYER);
break;
}
}
break;
case BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_4:
func_802A4A54();
if (btl_main_menu_update() != 0) {
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_1;
}
break;
case BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_5:
func_802A48FC();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_4;
break;
case BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_6:
func_802A472C();
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_1:
popupIndex = 0;
for (i = 1; i < 12; i++) {
s32 partnerId = D_8008EEC0[i];
if (playerData->partners[partnerId].enabled) {
popupProps = &gPartnerPopupProperties[partnerId];
popupMenu->ptrIcon[popupIndex] = battle_menu_PartnerHudScripts[partnerId];
popupMenu->userIndex[popupIndex] = partnerId;
popupMenu->enabled[popupIndex] = 1;
popupMenu->nameMsg[popupIndex] = popupProps->nameMsg;
popupMenu->descMsg[popupIndex] = popupProps->battleDescMsg;
popupMenu->value[popupIndex] = playerData->partners[partnerId].level;
if (playerData->currentPartner == partnerId) {
popupMenu->enabled[popupIndex] = 0;
popupMenu->ptrIcon[popupIndex] = battle_menu_DisabledPartnerHudScripts[partnerId];
}
popupIndex++;
}
}
if (battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_PARTNER] < 0) {
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_PARTNER] = 0;
}
popupMenu->popupType = POPUP_MENU_SWITCH_PARTNER;
popupMenu->numEntries = popupIndex;
popupMenu->initialPos = D_8008EEF0[playerData->currentPartner] - 1;
popupMenu->dipMode = 0;
popupMenu->titleNumber = 0;
create_battle_popup_menu(popupMenu);
func_800F52BC();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_2;
break;
case BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_2:
if (popupMenu->result == POPUP_RESULT_MINUS_1) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_7;
} else if (popupMenu->result != POPUP_RESULT_CHOOSING) {
if (popupMenu->result == POPUP_RESULT_CANCEL) {
func_802A47E0();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_2;
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else {
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_6;
battleStatus->unk_1AC = popupMenu->userIndex[popupMenu->result - 1];
battleStatus->moveCategory = BTL_MENU_TYPE_CHANGE_PARTNER;
battleStatus->selectedMoveID = MOVE_UNUSED_37;
battleStatus->currentTargetListFlags = TARGET_FLAG_2;
battleStatus->moveArgument = battleStatus->unk_1AC;
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_PARTNER] = popupMenu->result - 1;
hide_popup_menu();
func_802A4718();
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_3;
}
}
break;
case BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_3:
if ((battleStatus->currentButtonsPressed & BUTTON_B) && popupMenu->result == POPUP_RESULT_CHOOSING) {
func_800F16CC();
func_802A4A10();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_4;
} else {
func_802A4A54();
if (btl_main_menu_update() != 0) {
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
btl_state_update_partner_menu();
btl_set_state(BATTLE_STATE_CHANGE_PARTNER);
}
}
break;
case BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_4:
func_802A4A54();
if (btl_main_menu_update() != 0) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_2;
}
break;
case BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_5:
func_800F16CC();
func_802A4A10();
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_4;
break;
case BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_6:
destroy_popup_menu();
func_802A472C();
btl_main_menu_destroy();
break;
case BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_7:
set_window_update(WINDOW_ID_6, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_7, WINDOW_UPDATE_HIDE);
if (popupMenu->result != POPUP_RESULT_MINUS_1) {
set_window_update(WINDOW_ID_6, WINDOW_UPDATE_9);
set_window_update(WINDOW_ID_7, WINDOW_UPDATE_9);
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_2;
}
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel calc_player_damage_enemy
/* 1A0224 80271944 27BDFFA0 */ addiu $sp, $sp, -0x60
/* 1A0228 80271948 AFB40048 */ sw $s4, 0x48($sp)
/* 1A022C 8027194C 3C14800E */ lui $s4, %hi(gBattleStatus)
/* 1A0230 80271950 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
/* 1A0234 80271954 AFBF005C */ sw $ra, 0x5C($sp)
/* 1A0238 80271958 AFBE0058 */ sw $fp, 0x58($sp)
/* 1A023C 8027195C AFB70054 */ sw $s7, 0x54($sp)
/* 1A0240 80271960 AFB60050 */ sw $s6, 0x50($sp)
/* 1A0244 80271964 AFB5004C */ sw $s5, 0x4C($sp)
/* 1A0248 80271968 AFB30044 */ sw $s3, 0x44($sp)
/* 1A024C 8027196C AFB20040 */ sw $s2, 0x40($sp)
/* 1A0250 80271970 AFB1003C */ sw $s1, 0x3C($sp)
/* 1A0254 80271974 AFB00038 */ sw $s0, 0x38($sp)
/* 1A0258 80271978 AFA00020 */ sw $zero, 0x20($sp)
/* 1A025C 8027197C AFA00028 */ sw $zero, 0x28($sp)
/* 1A0260 80271980 AFA0002C */ sw $zero, 0x2C($sp)
/* 1A0264 80271984 AFA00030 */ sw $zero, 0x30($sp)
/* 1A0268 80271988 AFA0001C */ sw $zero, 0x1C($sp)
/* 1A026C 8027198C AFA00024 */ sw $zero, 0x24($sp)
/* 1A0270 80271990 8E8800D8 */ lw $t0, 0xD8($s4)
/* 1A0274 80271994 0000B02D */ daddu $s6, $zero, $zero
/* 1A0278 80271998 A2800199 */ sb $zero, 0x199($s4)
/* 1A027C 8027199C A6800180 */ sh $zero, 0x180($s4)
/* 1A0280 802719A0 AFA80018 */ sw $t0, 0x18($sp)
/* 1A0284 802719A4 968301A0 */ lhu $v1, 0x1A0($s4)
/* 1A0288 802719A8 868401A0 */ lh $a0, 0x1A0($s4)
/* 1A028C 802719AC 928201A2 */ lbu $v0, 0x1A2($s4)
/* 1A0290 802719B0 95050192 */ lhu $a1, 0x192($t0)
/* 1A0294 802719B4 829001A2 */ lb $s0, 0x1A2($s4)
/* 1A0298 802719B8 02C0B82D */ daddu $s7, $s6, $zero
/* 1A029C 802719BC A68301A4 */ sh $v1, 0x1A4($s4)
/* 1A02A0 802719C0 A28201A6 */ sb $v0, 0x1A6($s4)
/* 1A02A4 802719C4 0C09A75B */ jal get_actor
/* 1A02A8 802719C8 A68501A8 */ sh $a1, 0x1A8($s4)
/* 1A02AC 802719CC 8FA80018 */ lw $t0, 0x18($sp)
/* 1A02B0 802719D0 0040982D */ daddu $s3, $v0, $zero
/* 1A02B4 802719D4 16600003 */ bnez $s3, .L802719E4
/* 1A02B8 802719D8 2512000C */ addiu $s2, $t0, 0xC
/* 1A02BC 802719DC 0809CC63 */ j .L8027318C
/* 1A02C0 802719E0 02C0102D */ daddu $v0, $s6, $zero
.L802719E4:
/* 1A02C4 802719E4 0260202D */ daddu $a0, $s3, $zero
/* 1A02C8 802719E8 0C099117 */ jal get_actor_part
/* 1A02CC 802719EC 0200282D */ daddu $a1, $s0, $zero
/* 1A02D0 802719F0 0040F02D */ daddu $fp, $v0, $zero
/* 1A02D4 802719F4 57C00003 */ bnel $fp, $zero, .L80271A04
/* 1A02D8 802719F8 A66001F8 */ sh $zero, 0x1F8($s3)
.L802719FC:
/* 1A02DC 802719FC 0809C67F */ j .L802719FC
/* 1A02E0 80271A00 00000000 */ nop
.L80271A04:
/* 1A02E4 80271A04 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A02E8 80271A08 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A02EC 80271A0C 30420800 */ andi $v0, $v0, 0x800
/* 1A02F0 80271A10 10400003 */ beqz $v0, .L80271A20
/* 1A02F4 80271A14 24150002 */ addiu $s5, $zero, 0x2
/* 1A02F8 80271A18 0809C965 */ j .L80272594
/* 1A02FC 80271A1C 24110017 */ addiu $s1, $zero, 0x17
.L80271A20:
/* 1A0300 80271A20 8FA40018 */ lw $a0, 0x18($sp)
/* 1A0304 80271A24 0C099CAB */ jal player_team_is_ability_active
/* 1A0308 80271A28 2405000D */ addiu $a1, $zero, 0xD
/* 1A030C 80271A2C 10400006 */ beqz $v0, .L80271A48
/* 1A0310 80271A30 3C021000 */ lui $v0, (0x10000000 >> 16)
/* 1A0314 80271A34 8E830188 */ lw $v1, 0x188($s4)
/* 1A0318 80271A38 00621024 */ and $v0, $v1, $v0
/* 1A031C 80271A3C 14400002 */ bnez $v0, .L80271A48
/* 1A0320 80271A40 34620008 */ ori $v0, $v1, 0x8
/* 1A0324 80271A44 AE820188 */ sw $v0, 0x188($s4)
.L80271A48:
/* 1A0328 80271A48 8FC4007C */ lw $a0, 0x7C($fp)
/* 1A032C 80271A4C 30820020 */ andi $v0, $a0, 0x20
/* 1A0330 80271A50 144005CE */ bnez $v0, .L8027318C
/* 1A0334 80271A54 24020006 */ addiu $v0, $zero, 0x6
/* 1A0338 80271A58 82630218 */ lb $v1, 0x218($s3)
/* 1A033C 80271A5C 2402000E */ addiu $v0, $zero, 0xE
/* 1A0340 80271A60 10620007 */ beq $v1, $v0, .L80271A80
/* 1A0344 80271A64 30820800 */ andi $v0, $a0, 0x800
/* 1A0348 80271A68 10400007 */ beqz $v0, .L80271A88
/* 1A034C 80271A6C 00000000 */ nop
/* 1A0350 80271A70 8E820188 */ lw $v0, 0x188($s4)
/* 1A0354 80271A74 30420800 */ andi $v0, $v0, 0x800
/* 1A0358 80271A78 14400003 */ bnez $v0, .L80271A88
/* 1A035C 80271A7C 00000000 */ nop
.L80271A80:
/* 1A0360 80271A80 0809CC63 */ j .L8027318C
/* 1A0364 80271A84 24020006 */ addiu $v0, $zero, 0x6
.L80271A88:
/* 1A0368 80271A88 82630214 */ lb $v1, 0x214($s3)
/* 1A036C 80271A8C 2402000C */ addiu $v0, $zero, 0xC
/* 1A0370 80271A90 14620019 */ bne $v1, $v0, .L80271AF8
/* 1A0374 80271A94 2404010C */ addiu $a0, $zero, 0x10C
/* 1A0378 80271A98 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A037C 80271A9C E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A0380 80271AA0 8E46000C */ lw $a2, 0xC($s2)
/* 1A0384 80271AA4 8E470010 */ lw $a3, 0x10($s2)
/* 1A0388 80271AA8 0C052757 */ jal sfx_play_sound_at_position
/* 1A038C 80271AAC 0000282D */ daddu $a1, $zero, $zero
/* 1A0390 80271AB0 24020001 */ addiu $v0, $zero, 0x1
/* 1A0394 80271AB4 AFA20010 */ sw $v0, 0x10($sp)
/* 1A0398 80271AB8 AFA20014 */ sw $v0, 0x14($sp)
/* 1A039C 80271ABC C64C000C */ lwc1 $f12, 0xC($s2)
/* 1A03A0 80271AC0 C64E0010 */ lwc1 $f14, 0x10($s2)
/* 1A03A4 80271AC4 8E460014 */ lw $a2, 0x14($s2)
/* 1A03A8 80271AC8 0C093BF8 */ jal func_8024EFE0
/* 1A03AC 80271ACC 0000382D */ daddu $a3, $zero, $zero
/* 1A03B0 80271AD0 AFA00010 */ sw $zero, 0x10($sp)
/* 1A03B4 80271AD4 C64C000C */ lwc1 $f12, 0xC($s2)
/* 1A03B8 80271AD8 C64E0010 */ lwc1 $f14, 0x10($s2)
/* 1A03BC 80271ADC 8E460014 */ lw $a2, 0x14($s2)
/* 1A03C0 80271AE0 0C09996B */ jal show_next_damage_popup
/* 1A03C4 80271AE4 0000382D */ daddu $a3, $zero, $zero
/* 1A03C8 80271AE8 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A03CC 80271AEC 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A03D0 80271AF0 0809C963 */ j .L8027258C
/* 1A03D4 80271AF4 30420240 */ andi $v0, $v0, 0x240
.L80271AF8:
/* 1A03D8 80271AF8 8FC20080 */ lw $v0, 0x80($fp)
/* 1A03DC 80271AFC 8E830188 */ lw $v1, 0x188($s4)
/* 1A03E0 80271B00 00431024 */ and $v0, $v0, $v1
/* 1A03E4 80271B04 10400003 */ beqz $v0, .L80271B14
/* 1A03E8 80271B08 30620080 */ andi $v0, $v1, 0x80
/* 1A03EC 80271B0C 24080001 */ addiu $t0, $zero, 0x1
/* 1A03F0 80271B10 AFA8001C */ sw $t0, 0x1C($sp)
.L80271B14:
/* 1A03F4 80271B14 1040000A */ beqz $v0, .L80271B40
/* 1A03F8 80271B18 3C031000 */ lui $v1, (0x10000040 >> 16)
/* 1A03FC 80271B1C 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A0400 80271B20 30420010 */ andi $v0, $v0, 0x10
/* 1A0404 80271B24 10400006 */ beqz $v0, .L80271B40
/* 1A0408 80271B28 00000000 */ nop
/* 1A040C 80271B2C 8FA40018 */ lw $a0, 0x18($sp)
/* 1A0410 80271B30 0C099CAB */ jal player_team_is_ability_active
/* 1A0414 80271B34 24050002 */ addiu $a1, $zero, 0x2
/* 1A0418 80271B38 1040005C */ beqz $v0, .L80271CAC
/* 1A041C 80271B3C 3C031000 */ lui $v1, (0x10000040 >> 16)
.L80271B40:
/* 1A0420 80271B40 8E820188 */ lw $v0, 0x188($s4)
/* 1A0424 80271B44 34630040 */ ori $v1, $v1, (0x10000040 & 0xFFFF)
/* 1A0428 80271B48 00431024 */ and $v0, $v0, $v1
/* 1A042C 80271B4C 1440002E */ bnez $v0, .L80271C08
/* 1A0430 80271B50 00000000 */ nop
/* 1A0434 80271B54 8FC3007C */ lw $v1, 0x7C($fp)
/* 1A0438 80271B58 30628000 */ andi $v0, $v1, 0x8000
/* 1A043C 80271B5C 1040000D */ beqz $v0, .L80271B94
/* 1A0440 80271B60 240400E2 */ addiu $a0, $zero, 0xE2
/* 1A0444 80271B64 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A0448 80271B68 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A044C 80271B6C 8E46000C */ lw $a2, 0xC($s2)
/* 1A0450 80271B70 8E470010 */ lw $a3, 0x10($s2)
/* 1A0454 80271B74 0C052757 */ jal sfx_play_sound_at_position
/* 1A0458 80271B78 0000282D */ daddu $a1, $zero, $zero
/* 1A045C 80271B7C 24040001 */ addiu $a0, $zero, 0x1
/* 1A0460 80271B80 0C09CCEA */ jal dispatch_damage_event_player_1
/* 1A0464 80271B84 2405002C */ addiu $a1, $zero, 0x2C
/* 1A0468 80271B88 0260202D */ daddu $a0, $s3, $zero
/* 1A046C 80271B8C 0809C737 */ j .L80271CDC
/* 1A0470 80271B90 24050022 */ addiu $a1, $zero, 0x22
.L80271B94:
/* 1A0474 80271B94 30620002 */ andi $v0, $v1, 0x2
/* 1A0478 80271B98 1040001B */ beqz $v0, .L80271C08
/* 1A047C 80271B9C 00000000 */ nop
/* 1A0480 80271BA0 8E82018C */ lw $v0, 0x18C($s4)
/* 1A0484 80271BA4 30420010 */ andi $v0, $v0, 0x10
/* 1A0488 80271BA8 14400017 */ bnez $v0, .L80271C08
/* 1A048C 80271BAC 00000000 */ nop
/* 1A0490 80271BB0 8FA40018 */ lw $a0, 0x18($sp)
/* 1A0494 80271BB4 0C099CAB */ jal player_team_is_ability_active
/* 1A0498 80271BB8 24050007 */ addiu $a1, $zero, 0x7
/* 1A049C 80271BBC 14400012 */ bnez $v0, .L80271C08
/* 1A04A0 80271BC0 00000000 */ nop
/* 1A04A4 80271BC4 8FA40018 */ lw $a0, 0x18($sp)
/* 1A04A8 80271BC8 0C099CAB */ jal player_team_is_ability_active
/* 1A04AC 80271BCC 2405000D */ addiu $a1, $zero, 0xD
/* 1A04B0 80271BD0 1440000D */ bnez $v0, .L80271C08
/* 1A04B4 80271BD4 240400E2 */ addiu $a0, $zero, 0xE2
/* 1A04B8 80271BD8 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A04BC 80271BDC E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A04C0 80271BE0 8E46000C */ lw $a2, 0xC($s2)
/* 1A04C4 80271BE4 8E470010 */ lw $a3, 0x10($s2)
/* 1A04C8 80271BE8 0C052757 */ jal sfx_play_sound_at_position
/* 1A04CC 80271BEC 0000282D */ daddu $a1, $zero, $zero
/* 1A04D0 80271BF0 24040001 */ addiu $a0, $zero, 0x1
/* 1A04D4 80271BF4 0C09CCEA */ jal dispatch_damage_event_player_1
/* 1A04D8 80271BF8 2405002C */ addiu $a1, $zero, 0x2C
/* 1A04DC 80271BFC 0260202D */ daddu $a0, $s3, $zero
/* 1A04E0 80271C00 0809C737 */ j .L80271CDC
/* 1A04E4 80271C04 2405001C */ addiu $a1, $zero, 0x1C
.L80271C08:
/* 1A04E8 80271C08 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 1A04EC 80271C0C 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 1A04F0 80271C10 8E020000 */ lw $v0, 0x0($s0)
/* 1A04F4 80271C14 30420020 */ andi $v0, $v0, 0x20
/* 1A04F8 80271C18 10400012 */ beqz $v0, .L80271C64
/* 1A04FC 80271C1C 3C031000 */ lui $v1, (0x10000040 >> 16)
/* 1A0500 80271C20 8E820188 */ lw $v0, 0x188($s4)
/* 1A0504 80271C24 30420002 */ andi $v0, $v0, 0x2
/* 1A0508 80271C28 1040000E */ beqz $v0, .L80271C64
/* 1A050C 80271C2C 00000000 */ nop
/* 1A0510 80271C30 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A0514 80271C34 30420600 */ andi $v0, $v0, 0x600
/* 1A0518 80271C38 1040000A */ beqz $v0, .L80271C64
/* 1A051C 80271C3C 240400E2 */ addiu $a0, $zero, 0xE2
/* 1A0520 80271C40 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A0524 80271C44 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A0528 80271C48 8E46000C */ lw $a2, 0xC($s2)
/* 1A052C 80271C4C 8E470010 */ lw $a3, 0x10($s2)
/* 1A0530 80271C50 0C052757 */ jal sfx_play_sound_at_position
/* 1A0534 80271C54 0000282D */ daddu $a1, $zero, $zero
/* 1A0538 80271C58 0260202D */ daddu $a0, $s3, $zero
/* 1A053C 80271C5C 0809C95F */ j .L8027257C
/* 1A0540 80271C60 24050022 */ addiu $a1, $zero, 0x22
.L80271C64:
/* 1A0544 80271C64 8E820188 */ lw $v0, 0x188($s4)
/* 1A0548 80271C68 34630040 */ ori $v1, $v1, (0x10000040 & 0xFFFF)
/* 1A054C 80271C6C 00431024 */ and $v0, $v0, $v1
/* 1A0550 80271C70 1440001E */ bnez $v0, .L80271CEC
/* 1A0554 80271C74 3C030020 */ lui $v1, (0x200000 >> 16)
/* 1A0558 80271C78 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A055C 80271C7C 00431024 */ and $v0, $v0, $v1
/* 1A0560 80271C80 1040001A */ beqz $v0, .L80271CEC
/* 1A0564 80271C84 00000000 */ nop
/* 1A0568 80271C88 8E82018C */ lw $v0, 0x18C($s4)
/* 1A056C 80271C8C 30420080 */ andi $v0, $v0, 0x80
/* 1A0570 80271C90 14400016 */ bnez $v0, .L80271CEC
/* 1A0574 80271C94 00000000 */ nop
/* 1A0578 80271C98 8FA40018 */ lw $a0, 0x18($sp)
/* 1A057C 80271C9C 0C099CAB */ jal player_team_is_ability_active
/* 1A0580 80271CA0 24050002 */ addiu $a1, $zero, 0x2
/* 1A0584 80271CA4 14400011 */ bnez $v0, .L80271CEC
/* 1A0588 80271CA8 00000000 */ nop
.L80271CAC:
/* 1A058C 80271CAC C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A0590 80271CB0 24040108 */ addiu $a0, $zero, 0x108
/* 1A0594 80271CB4 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A0598 80271CB8 8E46000C */ lw $a2, 0xC($s2)
/* 1A059C 80271CBC 8E470010 */ lw $a3, 0x10($s2)
/* 1A05A0 80271CC0 0C052757 */ jal sfx_play_sound_at_position
/* 1A05A4 80271CC4 0000282D */ daddu $a1, $zero, $zero
/* 1A05A8 80271CC8 24040001 */ addiu $a0, $zero, 0x1
/* 1A05AC 80271CCC 0C09CCEA */ jal dispatch_damage_event_player_1
/* 1A05B0 80271CD0 2405002A */ addiu $a1, $zero, 0x2A
/* 1A05B4 80271CD4 0260202D */ daddu $a0, $s3, $zero
/* 1A05B8 80271CD8 2405001B */ addiu $a1, $zero, 0x1B
.L80271CDC:
/* 1A05BC 80271CDC 0C09DC58 */ jal dispatch_event_actor
/* 1A05C0 80271CE0 00000000 */ nop
/* 1A05C4 80271CE4 0809CC63 */ j .L8027318C
/* 1A05C8 80271CE8 2402FFFF */ addiu $v0, $zero, -0x1
.L80271CEC:
/* 1A05CC 80271CEC 8E820188 */ lw $v0, 0x188($s4)
/* 1A05D0 80271CF0 30420002 */ andi $v0, $v0, 0x2
/* 1A05D4 80271CF4 10400011 */ beqz $v0, .L80271D3C
/* 1A05D8 80271CF8 0000202D */ daddu $a0, $zero, $zero
/* 1A05DC 80271CFC 24020018 */ addiu $v0, $zero, 0x18
/* 1A05E0 80271D00 C6440014 */ lwc1 $f4, 0x14($s2)
/* 1A05E4 80271D04 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 1A05E8 80271D08 44810000 */ mtc1 $at, $f0
/* 1A05EC 80271D0C 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1A05F0 80271D10 44811000 */ mtc1 $at, $f2
/* 1A05F4 80271D14 46002102 */ mul.s $f4, $f4, $f0
/* 1A05F8 80271D18 00000000 */ nop
/* 1A05FC 80271D1C AFA20014 */ sw $v0, 0x14($sp)
/* 1A0600 80271D20 E7A20010 */ swc1 $f2, 0x10($sp)
/* 1A0604 80271D24 8E45000C */ lw $a1, 0xC($s2)
/* 1A0608 80271D28 8E460010 */ lw $a2, 0x10($s2)
/* 1A060C 80271D2C 44072000 */ mfc1 $a3, $f4
/* 1A0610 80271D30 24080001 */ addiu $t0, $zero, 0x1
/* 1A0614 80271D34 0C01C184 */ jal fx_ring_blast
/* 1A0618 80271D38 AFA80028 */ sw $t0, 0x28($sp)
.L80271D3C:
/* 1A061C 80271D3C 8E820188 */ lw $v0, 0x188($s4)
/* 1A0620 80271D40 30420020 */ andi $v0, $v0, 0x20
/* 1A0624 80271D44 10400005 */ beqz $v0, .L80271D5C
/* 1A0628 80271D48 00000000 */ nop
/* 1A062C 80271D4C 0C09451D */ jal apply_shock_effect
/* 1A0630 80271D50 0260202D */ daddu $a0, $s3, $zero
/* 1A0634 80271D54 24080001 */ addiu $t0, $zero, 0x1
/* 1A0638 80271D58 AFA8002C */ sw $t0, 0x2C($sp)
.L80271D5C:
/* 1A063C 80271D5C 8E820188 */ lw $v0, 0x188($s4)
/* 1A0640 80271D60 30420004 */ andi $v0, $v0, 0x4
/* 1A0644 80271D64 1040000E */ beqz $v0, .L80271DA0
/* 1A0648 80271D68 24020018 */ addiu $v0, $zero, 0x18
/* 1A064C 80271D6C C6440014 */ lwc1 $f4, 0x14($s2)
/* 1A0650 80271D70 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 1A0654 80271D74 44810000 */ mtc1 $at, $f0
/* 1A0658 80271D78 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1A065C 80271D7C 44811000 */ mtc1 $at, $f2
/* 1A0660 80271D80 AFA20014 */ sw $v0, 0x14($sp)
/* 1A0664 80271D84 46002100 */ add.s $f4, $f4, $f0
/* 1A0668 80271D88 E7A20010 */ swc1 $f2, 0x10($sp)
/* 1A066C 80271D8C 8E45000C */ lw $a1, 0xC($s2)
/* 1A0670 80271D90 8E460010 */ lw $a2, 0x10($s2)
/* 1A0674 80271D94 44072000 */ mfc1 $a3, $f4
/* 1A0678 80271D98 0C01C70C */ jal fx_water_splash
/* 1A067C 80271D9C 0000202D */ daddu $a0, $zero, $zero
.L80271DA0:
/* 1A0680 80271DA0 8E820188 */ lw $v0, 0x188($s4)
/* 1A0684 80271DA4 30420008 */ andi $v0, $v0, 0x8
/* 1A0688 80271DA8 1040000C */ beqz $v0, .L80271DDC
/* 1A068C 80271DAC 0000202D */ daddu $a0, $zero, $zero
/* 1A0690 80271DB0 C6420014 */ lwc1 $f2, 0x14($s2)
/* 1A0694 80271DB4 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 1A0698 80271DB8 44810000 */ mtc1 $at, $f0
/* 1A069C 80271DBC 00000000 */ nop
/* 1A06A0 80271DC0 46001080 */ add.s $f2, $f2, $f0
/* 1A06A4 80271DC4 8E45000C */ lw $a1, 0xC($s2)
/* 1A06A8 80271DC8 8E460010 */ lw $a2, 0x10($s2)
/* 1A06AC 80271DCC 44071000 */ mfc1 $a3, $f2
/* 1A06B0 80271DD0 24080001 */ addiu $t0, $zero, 0x1
/* 1A06B4 80271DD4 0C01C2A4 */ jal fx_big_snowflakes
/* 1A06B8 80271DD8 AFA80030 */ sw $t0, 0x30($sp)
.L80271DDC:
/* 1A06BC 80271DDC 8FA40018 */ lw $a0, 0x18($sp)
/* 1A06C0 80271DE0 0C099CAB */ jal player_team_is_ability_active
/* 1A06C4 80271DE4 2405000F */ addiu $a1, $zero, 0xF
/* 1A06C8 80271DE8 0040802D */ daddu $s0, $v0, $zero
/* 1A06CC 80271DEC 1200002D */ beqz $s0, .L80271EA4
/* 1A06D0 80271DF0 2402001E */ addiu $v0, $zero, 0x1E
/* 1A06D4 80271DF4 C6440014 */ lwc1 $f4, 0x14($s2)
/* 1A06D8 80271DF8 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 1A06DC 80271DFC 44810000 */ mtc1 $at, $f0
/* 1A06E0 80271E00 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1A06E4 80271E04 44811000 */ mtc1 $at, $f2
/* 1A06E8 80271E08 AFA20014 */ sw $v0, 0x14($sp)
/* 1A06EC 80271E0C 46002100 */ add.s $f4, $f4, $f0
/* 1A06F0 80271E10 E7A20010 */ swc1 $f2, 0x10($sp)
/* 1A06F4 80271E14 8E45000C */ lw $a1, 0xC($s2)
/* 1A06F8 80271E18 8E460010 */ lw $a2, 0x10($s2)
/* 1A06FC 80271E1C 44072000 */ mfc1 $a3, $f4
/* 1A0700 80271E20 0C01C9F4 */ jal fx_breaking_junk
/* 1A0704 80271E24 0000202D */ daddu $a0, $zero, $zero
/* 1A0708 80271E28 2603FFFF */ addiu $v1, $s0, -0x1
/* 1A070C 80271E2C 2C620006 */ sltiu $v0, $v1, 0x6
/* 1A0710 80271E30 1040001C */ beqz $v0, .L80271EA4
/* 1A0714 80271E34 00031080 */ sll $v0, $v1, 2
/* 1A0718 80271E38 3C01802A */ lui $at, %hi(jtbl_8029D880)
/* 1A071C 80271E3C 00220821 */ addu $at, $at, $v0
/* 1A0720 80271E40 8C22D880 */ lw $v0, %lo(jtbl_8029D880)($at)
/* 1A0724 80271E44 00400008 */ jr $v0
/* 1A0728 80271E48 00000000 */ nop
glabel .L80271E4C
/* 1A072C 80271E4C C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A0730 80271E50 0809C7A4 */ j .L80271E90
/* 1A0734 80271E54 24040372 */ addiu $a0, $zero, 0x372
glabel .L80271E58
/* 1A0738 80271E58 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A073C 80271E5C 0809C7A4 */ j .L80271E90
/* 1A0740 80271E60 240400F1 */ addiu $a0, $zero, 0xF1
glabel .L80271E64
/* 1A0744 80271E64 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A0748 80271E68 0809C7A4 */ j .L80271E90
/* 1A074C 80271E6C 240400DC */ addiu $a0, $zero, 0xDC
glabel .L80271E70
/* 1A0750 80271E70 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A0754 80271E74 0809C7A4 */ j .L80271E90
/* 1A0758 80271E78 24042072 */ addiu $a0, $zero, 0x2072
glabel .L80271E7C
/* 1A075C 80271E7C C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A0760 80271E80 0809C7A4 */ j .L80271E90
/* 1A0764 80271E84 24042073 */ addiu $a0, $zero, 0x2073
glabel .L80271E88
/* 1A0768 80271E88 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A076C 80271E8C 2404205B */ addiu $a0, $zero, 0x205B
.L80271E90:
/* 1A0770 80271E90 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A0774 80271E94 8E46000C */ lw $a2, 0xC($s2)
/* 1A0778 80271E98 8E470010 */ lw $a3, 0x10($s2)
/* 1A077C 80271E9C 0C052757 */ jal sfx_play_sound_at_position
/* 1A0780 80271EA0 0000282D */ daddu $a1, $zero, $zero
.L80271EA4:
/* 1A0784 80271EA4 0C03A752 */ jal is_ability_active
/* 1A0788 80271EA8 24040013 */ addiu $a0, $zero, 0x13
/* 1A078C 80271EAC 1440001B */ bnez $v0, .L80271F1C
/* 1A0790 80271EB0 2403000B */ addiu $v1, $zero, 0xB
/* 1A0794 80271EB4 8FA80018 */ lw $t0, 0x18($sp)
/* 1A0798 80271EB8 81020212 */ lb $v0, 0x212($t0)
/* 1A079C 80271EBC 10430017 */ beq $v0, $v1, .L80271F1C
/* 1A07A0 80271EC0 00000000 */ nop
/* 1A07A4 80271EC4 82620212 */ lb $v0, 0x212($s3)
/* 1A07A8 80271EC8 10430005 */ beq $v0, $v1, .L80271EE0
/* 1A07AC 80271ECC 3C031000 */ lui $v1, (0x10000020 >> 16)
/* 1A07B0 80271ED0 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A07B4 80271ED4 30420080 */ andi $v0, $v0, 0x80
/* 1A07B8 80271ED8 10400010 */ beqz $v0, .L80271F1C
/* 1A07BC 80271EDC 00000000 */ nop
.L80271EE0:
/* 1A07C0 80271EE0 8E820188 */ lw $v0, 0x188($s4)
/* 1A07C4 80271EE4 34630020 */ ori $v1, $v1, (0x10000020 & 0xFFFF)
/* 1A07C8 80271EE8 00431024 */ and $v0, $v0, $v1
/* 1A07CC 80271EEC 1440000B */ bnez $v0, .L80271F1C
/* 1A07D0 80271EF0 00000000 */ nop
/* 1A07D4 80271EF4 8E82018C */ lw $v0, 0x18C($s4)
/* 1A07D8 80271EF8 30420008 */ andi $v0, $v0, 0x8
/* 1A07DC 80271EFC 14400007 */ bnez $v0, .L80271F1C
/* 1A07E0 80271F00 24080001 */ addiu $t0, $zero, 0x1
/* 1A07E4 80271F04 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1A07E8 80271F08 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 1A07EC 80271F0C 8C620000 */ lw $v0, 0x0($v1)
/* 1A07F0 80271F10 AFA80020 */ sw $t0, 0x20($sp)
/* 1A07F4 80271F14 34420020 */ ori $v0, $v0, 0x20
/* 1A07F8 80271F18 AC620000 */ sw $v0, 0x0($v1)
.L80271F1C:
/* 1A07FC 80271F1C 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A0800 80271F20 3C03000C */ lui $v1, (0xC0000 >> 16)
/* 1A0804 80271F24 00431024 */ and $v0, $v0, $v1
/* 1A0808 80271F28 10400005 */ beqz $v0, .L80271F40
/* 1A080C 80271F2C 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16)
/* 1A0810 80271F30 8E820188 */ lw $v0, 0x188($s4)
/* 1A0814 80271F34 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF)
/* 1A0818 80271F38 00431024 */ and $v0, $v0, $v1
/* 1A081C 80271F3C AE820188 */ sw $v0, 0x188($s4)
.L80271F40:
/* 1A0820 80271F40 8FC50078 */ lw $a1, 0x78($fp)
/* 1A0824 80271F44 8E860188 */ lw $a2, 0x188($s4)
/* 1A0828 80271F48 0C0998AF */ jal get_defense
/* 1A082C 80271F4C 0260202D */ daddu $a0, $s3, $zero
/* 1A0830 80271F50 0040A82D */ daddu $s5, $v0, $zero
/* 1A0834 80271F54 8E840188 */ lw $a0, 0x188($s4)
/* 1A0838 80271F58 3C020800 */ lui $v0, (0x8000000 >> 16)
/* 1A083C 80271F5C 00821024 */ and $v0, $a0, $v0
/* 1A0840 80271F60 14400003 */ bnez $v0, .L80271F70
/* 1A0844 80271F64 00000000 */ nop
/* 1A0848 80271F68 82620222 */ lb $v0, 0x222($s3)
/* 1A084C 80271F6C 02A2A821 */ addu $s5, $s5, $v0
.L80271F70:
/* 1A0850 80271F70 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A0854 80271F74 30422000 */ andi $v0, $v0, 0x2000
/* 1A0858 80271F78 54400001 */ bnel $v0, $zero, .L80271F80
/* 1A085C 80271F7C 26B5007F */ addiu $s5, $s5, 0x7F
.L80271F80:
/* 1A0860 80271F80 8690017E */ lh $s0, 0x17E($s4)
/* 1A0864 80271F84 0C098EC4 */ jal count_power_plus
/* 1A0868 80271F88 00000000 */ nop
/* 1A086C 80271F8C 828300AC */ lb $v1, 0xAC($s4)
/* 1A0870 80271F90 1860000A */ blez $v1, .L80271FBC
/* 1A0874 80271F94 02028021 */ addu $s0, $s0, $v0
/* 1A0878 80271F98 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A087C 80271F9C 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A0880 80271FA0 30420010 */ andi $v0, $v0, 0x10
/* 1A0884 80271FA4 54400005 */ bnel $v0, $zero, .L80271FBC
/* 1A0888 80271FA8 02038021 */ addu $s0, $s0, $v1
/* 1A088C 80271FAC 8E820188 */ lw $v0, 0x188($s4)
/* 1A0890 80271FB0 30420080 */ andi $v0, $v0, 0x80
/* 1A0894 80271FB4 54400001 */ bnel $v0, $zero, .L80271FBC
/* 1A0898 80271FB8 02038021 */ addu $s0, $s0, $v1
.L80271FBC:
/* 1A089C 80271FBC 82830097 */ lb $v1, 0x97($s4)
/* 1A08A0 80271FC0 1060000C */ beqz $v1, .L80271FF4
/* 1A08A4 80271FC4 00000000 */ nop
/* 1A08A8 80271FC8 8E820188 */ lw $v0, 0x188($s4)
/* 1A08AC 80271FCC 30420080 */ andi $v0, $v0, 0x80
/* 1A08B0 80271FD0 10400008 */ beqz $v0, .L80271FF4
/* 1A08B4 80271FD4 3C04DFFF */ lui $a0, (0xDFFFFFFF >> 16)
/* 1A08B8 80271FD8 02038021 */ addu $s0, $s0, $v1
/* 1A08BC 80271FDC 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1A08C0 80271FE0 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 1A08C4 80271FE4 8C620000 */ lw $v0, 0x0($v1)
/* 1A08C8 80271FE8 3484FFFF */ ori $a0, $a0, (0xDFFFFFFF & 0xFFFF)
/* 1A08CC 80271FEC 00441024 */ and $v0, $v0, $a0
/* 1A08D0 80271FF0 AC620000 */ sw $v0, 0x0($v1)
.L80271FF4:
/* 1A08D4 80271FF4 82840096 */ lb $a0, 0x96($s4)
/* 1A08D8 80271FF8 1080000E */ beqz $a0, .L80272034
/* 1A08DC 80271FFC 3C030024 */ lui $v1, (0x240040 >> 16)
/* 1A08E0 80272000 8E820188 */ lw $v0, 0x188($s4)
/* 1A08E4 80272004 34630040 */ ori $v1, $v1, (0x240040 & 0xFFFF)
/* 1A08E8 80272008 00431024 */ and $v0, $v0, $v1
/* 1A08EC 8027200C 10400009 */ beqz $v0, .L80272034
/* 1A08F0 80272010 00000000 */ nop
/* 1A08F4 80272014 02048021 */ addu $s0, $s0, $a0
/* 1A08F8 80272018 3C04EFFF */ lui $a0, (0xEFFFFFFF >> 16)
/* 1A08FC 8027201C 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1A0900 80272020 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 1A0904 80272024 8C620000 */ lw $v0, 0x0($v1)
/* 1A0908 80272028 3484FFFF */ ori $a0, $a0, (0xEFFFFFFF & 0xFFFF)
/* 1A090C 8027202C 00441024 */ and $v0, $v0, $a0
/* 1A0910 80272030 AC620000 */ sw $v0, 0x0($v1)
.L80272034:
/* 1A0914 80272034 82820098 */ lb $v0, 0x98($s4)
/* 1A0918 80272038 54400001 */ bnel $v0, $zero, .L80272040
/* 1A091C 8027203C 26100002 */ addiu $s0, $s0, 0x2
.L80272040:
/* 1A0920 80272040 8FA40018 */ lw $a0, 0x18($sp)
/* 1A0924 80272044 0C099CAB */ jal player_team_is_ability_active
/* 1A0928 80272048 24050015 */ addiu $a1, $zero, 0x15
/* 1A092C 8027204C 54400001 */ bnel $v0, $zero, .L80272054
/* 1A0930 80272050 26100002 */ addiu $s0, $s0, 0x2
.L80272054:
/* 1A0934 80272054 8FA40018 */ lw $a0, 0x18($sp)
/* 1A0938 80272058 0C099CAB */ jal player_team_is_ability_active
/* 1A093C 8027205C 24050022 */ addiu $a1, $zero, 0x22
/* 1A0940 80272060 54400001 */ bnel $v0, $zero, .L80272068
/* 1A0944 80272064 26100001 */ addiu $s0, $s0, 0x1
.L80272068:
/* 1A0948 80272068 8FA40018 */ lw $a0, 0x18($sp)
/* 1A094C 8027206C 0C099CAB */ jal player_team_is_ability_active
/* 1A0950 80272070 24050025 */ addiu $a1, $zero, 0x25
/* 1A0954 80272074 54400001 */ bnel $v0, $zero, .L8027207C
/* 1A0958 80272078 2610FFFF */ addiu $s0, $s0, -0x1
.L8027207C:
/* 1A095C 8027207C 8282009B */ lb $v0, 0x9B($s4)
/* 1A0960 80272080 54400001 */ bnel $v0, $zero, .L80272088
/* 1A0964 80272084 26100001 */ addiu $s0, $s0, 0x1
.L80272088:
/* 1A0968 80272088 8FA40018 */ lw $a0, 0x18($sp)
/* 1A096C 8027208C 80820221 */ lb $v0, 0x221($a0)
/* 1A0970 80272090 24050009 */ addiu $a1, $zero, 0x9
/* 1A0974 80272094 0C099CAB */ jal player_team_is_ability_active
/* 1A0978 80272098 02028021 */ addu $s0, $s0, $v0
/* 1A097C 8027209C 10400013 */ beqz $v0, .L802720EC
/* 1A0980 802720A0 00000000 */ nop
/* 1A0984 802720A4 92820089 */ lbu $v0, 0x89($s4)
/* 1A0988 802720A8 2610FFFF */ addiu $s0, $s0, -0x1
/* 1A098C 802720AC 24420001 */ addiu $v0, $v0, 0x1
/* 1A0990 802720B0 06010003 */ bgez $s0, .L802720C0
/* 1A0994 802720B4 A2820089 */ sb $v0, 0x89($s4)
/* 1A0998 802720B8 00501021 */ addu $v0, $v0, $s0
/* 1A099C 802720BC A2820089 */ sb $v0, 0x89($s4)
.L802720C0:
/* 1A09A0 802720C0 3C05800E */ lui $a1, %hi(gBattleStatus)
/* 1A09A4 802720C4 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus)
/* 1A09A8 802720C8 3C040400 */ lui $a0, (0x4000000 >> 16)
/* 1A09AC 802720CC 8CA20004 */ lw $v0, 0x4($a1)
/* 1A09B0 802720D0 82830089 */ lb $v1, 0x89($s4)
/* 1A09B4 802720D4 00441025 */ or $v0, $v0, $a0
/* 1A09B8 802720D8 28630006 */ slti $v1, $v1, 0x6
/* 1A09BC 802720DC 14600003 */ bnez $v1, .L802720EC
/* 1A09C0 802720E0 ACA20004 */ sw $v0, 0x4($a1)
/* 1A09C4 802720E4 24020005 */ addiu $v0, $zero, 0x5
/* 1A09C8 802720E8 A2820089 */ sb $v0, 0x89($s4)
.L802720EC:
/* 1A09CC 802720EC 8FA40018 */ lw $a0, 0x18($sp)
/* 1A09D0 802720F0 0C099CAB */ jal player_team_is_ability_active
/* 1A09D4 802720F4 24050024 */ addiu $a1, $zero, 0x24
/* 1A09D8 802720F8 10400013 */ beqz $v0, .L80272148
/* 1A09DC 802720FC 00000000 */ nop
/* 1A09E0 80272100 92820089 */ lbu $v0, 0x89($s4)
/* 1A09E4 80272104 2610FFFE */ addiu $s0, $s0, -0x2
/* 1A09E8 80272108 24420002 */ addiu $v0, $v0, 0x2
/* 1A09EC 8027210C 06010003 */ bgez $s0, .L8027211C
/* 1A09F0 80272110 A2820089 */ sb $v0, 0x89($s4)
/* 1A09F4 80272114 00501021 */ addu $v0, $v0, $s0
/* 1A09F8 80272118 A2820089 */ sb $v0, 0x89($s4)
.L8027211C:
/* 1A09FC 8027211C 3C05800E */ lui $a1, %hi(gBattleStatus)
/* 1A0A00 80272120 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus)
/* 1A0A04 80272124 3C040400 */ lui $a0, (0x4000000 >> 16)
/* 1A0A08 80272128 8CA20004 */ lw $v0, 0x4($a1)
/* 1A0A0C 8027212C 82830089 */ lb $v1, 0x89($s4)
/* 1A0A10 80272130 00441025 */ or $v0, $v0, $a0
/* 1A0A14 80272134 28630006 */ slti $v1, $v1, 0x6
/* 1A0A18 80272138 14600003 */ bnez $v1, .L80272148
/* 1A0A1C 8027213C ACA20004 */ sw $v0, 0x4($a1)
/* 1A0A20 80272140 24020005 */ addiu $v0, $zero, 0x5
/* 1A0A24 80272144 A2820089 */ sb $v0, 0x89($s4)
.L80272148:
/* 1A0A28 80272148 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 1A0A2C 8027214C 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 1A0A30 80272150 8C820004 */ lw $v0, 0x4($a0)
/* 1A0A34 80272154 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 1A0A38 80272158 00431024 */ and $v0, $v0, $v1
/* 1A0A3C 8027215C 1040001A */ beqz $v0, .L802721C8
/* 1A0A40 80272160 00000000 */ nop
/* 1A0A44 80272164 8C820000 */ lw $v0, 0x0($a0)
/* 1A0A48 80272168 30420010 */ andi $v0, $v0, 0x10
/* 1A0A4C 8027216C 14400005 */ bnez $v0, .L80272184
/* 1A0A50 80272170 00000000 */ nop
/* 1A0A54 80272174 8E820188 */ lw $v0, 0x188($s4)
/* 1A0A58 80272178 30420080 */ andi $v0, $v0, 0x80
/* 1A0A5C 8027217C 10400012 */ beqz $v0, .L802721C8
/* 1A0A60 80272180 00000000 */ nop
.L80272184:
/* 1A0A64 80272184 92830099 */ lbu $v1, 0x99($s4)
/* 1A0A68 80272188 30620002 */ andi $v0, $v1, 0x2
/* 1A0A6C 8027218C 54400001 */ bnel $v0, $zero, .L80272194
/* 1A0A70 80272190 26100002 */ addiu $s0, $s0, 0x2
.L80272194:
/* 1A0A74 80272194 30620001 */ andi $v0, $v1, 0x1
/* 1A0A78 80272198 54400001 */ bnel $v0, $zero, .L802721A0
/* 1A0A7C 8027219C 26100004 */ addiu $s0, $s0, 0x4
.L802721A0:
/* 1A0A80 802721A0 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 1A0A84 802721A4 44810000 */ mtc1 $at, $f0
/* 1A0A88 802721A8 24020014 */ addiu $v0, $zero, 0x14
/* 1A0A8C 802721AC AFA20014 */ sw $v0, 0x14($sp)
/* 1A0A90 802721B0 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A0A94 802721B4 8E45000C */ lw $a1, 0xC($s2)
/* 1A0A98 802721B8 8E460010 */ lw $a2, 0x10($s2)
/* 1A0A9C 802721BC 8E470014 */ lw $a3, 0x14($s2)
/* 1A0AA0 802721C0 0C01C2EC */ jal fx_radial_shimmer
/* 1A0AA4 802721C4 24040009 */ addiu $a0, $zero, 0x9
.L802721C8:
/* 1A0AA8 802721C8 3C11800E */ lui $s1, %hi(gBattleStatus)
/* 1A0AAC 802721CC 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus)
/* 1A0AB0 802721D0 8E220004 */ lw $v0, 0x4($s1)
/* 1A0AB4 802721D4 3C030100 */ lui $v1, (0x1000000 >> 16)
/* 1A0AB8 802721D8 00431024 */ and $v0, $v0, $v1
/* 1A0ABC 802721DC 14400016 */ bnez $v0, .L80272238
/* 1A0AC0 802721E0 00000000 */ nop
/* 1A0AC4 802721E4 8FA40018 */ lw $a0, 0x18($sp)
/* 1A0AC8 802721E8 0C099CAB */ jal player_team_is_ability_active
/* 1A0ACC 802721EC 2405000A */ addiu $a1, $zero, 0xA
/* 1A0AD0 802721F0 10400011 */ beqz $v0, .L80272238
/* 1A0AD4 802721F4 00000000 */ nop
/* 1A0AD8 802721F8 8E230000 */ lw $v1, 0x0($s1)
/* 1A0ADC 802721FC 30620240 */ andi $v0, $v1, 0x240
/* 1A0AE0 80272200 1440000D */ bnez $v0, .L80272238
/* 1A0AE4 80272204 26100001 */ addiu $s0, $s0, 0x1
/* 1A0AE8 80272208 24080001 */ addiu $t0, $zero, 0x1
/* 1A0AEC 8027220C 0000802D */ daddu $s0, $zero, $zero
/* 1A0AF0 80272210 0200A82D */ daddu $s5, $s0, $zero
/* 1A0AF4 80272214 2402FFBF */ addiu $v0, $zero, -0x41
/* 1A0AF8 80272218 00621024 */ and $v0, $v1, $v0
/* 1A0AFC 8027221C 2403FDFF */ addiu $v1, $zero, -0x201
/* 1A0B00 80272220 00431024 */ and $v0, $v0, $v1
/* 1A0B04 80272224 2403FFEF */ addiu $v1, $zero, -0x11
/* 1A0B08 80272228 00431024 */ and $v0, $v0, $v1
/* 1A0B0C 8027222C 34420020 */ ori $v0, $v0, 0x20
/* 1A0B10 80272230 AFA80024 */ sw $t0, 0x24($sp)
/* 1A0B14 80272234 AE220000 */ sw $v0, 0x0($s1)
.L80272238:
/* 1A0B18 80272238 8FA80018 */ lw $t0, 0x18($sp)
/* 1A0B1C 8027223C 81030210 */ lb $v1, 0x210($t0)
/* 1A0B20 80272240 2402000A */ addiu $v0, $zero, 0xA
/* 1A0B24 80272244 14620007 */ bne $v1, $v0, .L80272264
/* 1A0B28 80272248 00000000 */ nop
/* 1A0B2C 8027224C 1A000005 */ blez $s0, .L80272264
/* 1A0B30 80272250 001017C2 */ srl $v0, $s0, 31
/* 1A0B34 80272254 02021021 */ addu $v0, $s0, $v0
/* 1A0B38 80272258 00028043 */ sra $s0, $v0, 1
/* 1A0B3C 8027225C 52000001 */ beql $s0, $zero, .L80272264
/* 1A0B40 80272260 24100001 */ addiu $s0, $zero, 0x1
.L80272264:
/* 1A0B44 80272264 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A0B48 80272268 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A0B4C 8027226C 30420020 */ andi $v0, $v0, 0x20
/* 1A0B50 80272270 1040000B */ beqz $v0, .L802722A0
/* 1A0B54 80272274 00000000 */ nop
/* 1A0B58 80272278 8E820188 */ lw $v0, 0x188($s4)
/* 1A0B5C 8027227C 30420200 */ andi $v0, $v0, 0x200
/* 1A0B60 80272280 10400007 */ beqz $v0, .L802722A0
/* 1A0B64 80272284 00000000 */ nop
/* 1A0B68 80272288 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A0B6C 8027228C 30420200 */ andi $v0, $v0, 0x200
/* 1A0B70 80272290 10400003 */ beqz $v0, .L802722A0
/* 1A0B74 80272294 00000000 */ nop
/* 1A0B78 80272298 0000A82D */ daddu $s5, $zero, $zero
/* 1A0B7C 8027229C 827001B8 */ lb $s0, 0x1B8($s3)
.L802722A0:
/* 1A0B80 802722A0 8E820188 */ lw $v0, 0x188($s4)
/* 1A0B84 802722A4 3C034000 */ lui $v1, (0x40000000 >> 16)
/* 1A0B88 802722A8 00431024 */ and $v0, $v0, $v1
/* 1A0B8C 802722AC 10400004 */ beqz $v0, .L802722C0
/* 1A0B90 802722B0 2A020064 */ slti $v0, $s0, 0x64
/* 1A0B94 802722B4 0000A82D */ daddu $s5, $zero, $zero
/* 1A0B98 802722B8 02A0802D */ daddu $s0, $s5, $zero
/* 1A0B9C 802722BC 2A020064 */ slti $v0, $s0, 0x64
.L802722C0:
/* 1A0BA0 802722C0 50400001 */ beql $v0, $zero, .L802722C8
/* 1A0BA4 802722C4 24100063 */ addiu $s0, $zero, 0x63
.L802722C8:
/* 1A0BA8 802722C8 06020001 */ bltzl $s0, .L802722D0
/* 1A0BAC 802722CC 0000A82D */ daddu $s5, $zero, $zero
.L802722D0:
/* 1A0BB0 802722D0 02158023 */ subu $s0, $s0, $s5
/* 1A0BB4 802722D4 06010002 */ bgez $s0, .L802722E0
/* 1A0BB8 802722D8 A66001FA */ sh $zero, 0x1FA($s3)
/* 1A0BBC 802722DC 0000802D */ daddu $s0, $zero, $zero
.L802722E0:
/* 1A0BC0 802722E0 8E820188 */ lw $v0, 0x188($s4)
/* 1A0BC4 802722E4 3C030010 */ lui $v1, (0x100000 >> 16)
/* 1A0BC8 802722E8 00431024 */ and $v0, $v0, $v1
/* 1A0BCC 802722EC 10400007 */ beqz $v0, .L8027230C
/* 1A0BD0 802722F0 00000000 */ nop
/* 1A0BD4 802722F4 1A000005 */ blez $s0, .L8027230C
/* 1A0BD8 802722F8 00000000 */ nop
/* 1A0BDC 802722FC 82820198 */ lb $v0, 0x198($s4)
/* 1A0BE0 80272300 02028021 */ addu $s0, $s0, $v0
/* 1A0BE4 80272304 5A000001 */ blezl $s0, .L8027230C
/* 1A0BE8 80272308 24100001 */ addiu $s0, $zero, 0x1
.L8027230C:
/* 1A0BEC 8027230C 1E000017 */ bgtz $s0, .L8027236C
/* 1A0BF0 80272310 A6800180 */ sh $zero, 0x180($s4)
/* 1A0BF4 80272314 A66001FA */ sh $zero, 0x1FA($s3)
/* 1A0BF8 80272318 8E820188 */ lw $v0, 0x188($s4)
/* 1A0BFC 8027231C 3C034000 */ lui $v1, (0x40000000 >> 16)
/* 1A0C00 80272320 00431024 */ and $v0, $v0, $v1
/* 1A0C04 80272324 1440000B */ bnez $v0, .L80272354
/* 1A0C08 80272328 24150002 */ addiu $s5, $zero, 0x2
/* 1A0C0C 8027232C 24110017 */ addiu $s1, $zero, 0x17
/* 1A0C10 80272330 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A0C14 80272334 2404010C */ addiu $a0, $zero, 0x10C
/* 1A0C18 80272338 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A0C1C 8027233C 8E46000C */ lw $a2, 0xC($s2)
/* 1A0C20 80272340 8E470010 */ lw $a3, 0x10($s2)
/* 1A0C24 80272344 0C052757 */ jal sfx_play_sound_at_position
/* 1A0C28 80272348 0000282D */ daddu $a1, $zero, $zero
/* 1A0C2C 8027234C 0809C900 */ j .L80272400
/* 1A0C30 80272350 A6800180 */ sh $zero, 0x180($s4)
.L80272354:
/* 1A0C34 80272354 826201B8 */ lb $v0, 0x1B8($s3)
/* 1A0C38 80272358 1C400002 */ bgtz $v0, .L80272364
/* 1A0C3C 8027235C 24110017 */ addiu $s1, $zero, 0x17
/* 1A0C40 80272360 24110020 */ addiu $s1, $zero, 0x20
.L80272364:
/* 1A0C44 80272364 0809C900 */ j .L80272400
/* 1A0C48 80272368 A6800180 */ sh $zero, 0x180($s4)
.L8027236C:
/* 1A0C4C 8027236C 24110009 */ addiu $s1, $zero, 0x9
/* 1A0C50 80272370 966201FC */ lhu $v0, 0x1FC($s3)
/* 1A0C54 80272374 966301FA */ lhu $v1, 0x1FA($s3)
/* 1A0C58 80272378 00501021 */ addu $v0, $v0, $s0
/* 1A0C5C 8027237C 00701823 */ subu $v1, $v1, $s0
/* 1A0C60 80272380 A66201FC */ sh $v0, 0x1FC($s3)
/* 1A0C64 80272384 A66301FA */ sh $v1, 0x1FA($s3)
/* 1A0C68 80272388 8FC20000 */ lw $v0, 0x0($fp)
/* 1A0C6C 8027238C 30422000 */ andi $v0, $v0, 0x2000
/* 1A0C70 80272390 14400016 */ bnez $v0, .L802723EC
/* 1A0C74 80272394 0000A82D */ daddu $s5, $zero, $zero
/* 1A0C78 80272398 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A0C7C 8027239C 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A0C80 802723A0 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 1A0C84 802723A4 00431024 */ and $v0, $v0, $v1
/* 1A0C88 802723A8 14400010 */ bnez $v0, .L802723EC
/* 1A0C8C 802723AC 00000000 */ nop
/* 1A0C90 802723B0 8FA8001C */ lw $t0, 0x1C($sp)
/* 1A0C94 802723B4 1500000D */ bnez $t0, .L802723EC
/* 1A0C98 802723B8 00000000 */ nop
/* 1A0C9C 802723BC 8FC20004 */ lw $v0, 0x4($fp)
/* 1A0CA0 802723C0 30420004 */ andi $v0, $v0, 0x4
/* 1A0CA4 802723C4 14400009 */ bnez $v0, .L802723EC
/* 1A0CA8 802723C8 00000000 */ nop
/* 1A0CAC 802723CC 926201B8 */ lbu $v0, 0x1B8($s3)
/* 1A0CB0 802723D0 00501023 */ subu $v0, $v0, $s0
/* 1A0CB4 802723D4 A26201B8 */ sb $v0, 0x1B8($s3)
/* 1A0CB8 802723D8 00021600 */ sll $v0, $v0, 24
/* 1A0CBC 802723DC 1C400003 */ bgtz $v0, .L802723EC
/* 1A0CC0 802723E0 00000000 */ nop
/* 1A0CC4 802723E4 A26001B8 */ sb $zero, 0x1B8($s3)
/* 1A0CC8 802723E8 24110020 */ addiu $s1, $zero, 0x20
.L802723EC:
/* 1A0CCC 802723EC 96820180 */ lhu $v0, 0x180($s4)
/* 1A0CD0 802723F0 00501021 */ addu $v0, $v0, $s0
/* 1A0CD4 802723F4 A6820180 */ sh $v0, 0x180($s4)
/* 1A0CD8 802723F8 A66201F8 */ sh $v0, 0x1F8($s3)
/* 1A0CDC 802723FC A66001FA */ sh $zero, 0x1FA($s3)
.L80272400:
/* 1A0CE0 80272400 8FC20000 */ lw $v0, 0x0($fp)
/* 1A0CE4 80272404 30422000 */ andi $v0, $v0, 0x2000
/* 1A0CE8 80272408 10400037 */ beqz $v0, .L802724E8
/* 1A0CEC 8027240C 00000000 */ nop
/* 1A0CF0 80272410 0C03A752 */ jal is_ability_active
/* 1A0CF4 80272414 24040013 */ addiu $a0, $zero, 0x13
/* 1A0CF8 80272418 14400017 */ bnez $v0, .L80272478
/* 1A0CFC 8027241C 2403000B */ addiu $v1, $zero, 0xB
/* 1A0D00 80272420 8FA80018 */ lw $t0, 0x18($sp)
/* 1A0D04 80272424 81020212 */ lb $v0, 0x212($t0)
/* 1A0D08 80272428 10430013 */ beq $v0, $v1, .L80272478
/* 1A0D0C 8027242C 00000000 */ nop
/* 1A0D10 80272430 82620212 */ lb $v0, 0x212($s3)
/* 1A0D14 80272434 10430005 */ beq $v0, $v1, .L8027244C
/* 1A0D18 80272438 00000000 */ nop
/* 1A0D1C 8027243C 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A0D20 80272440 30420080 */ andi $v0, $v0, 0x80
/* 1A0D24 80272444 1040000C */ beqz $v0, .L80272478
/* 1A0D28 80272448 00000000 */ nop
.L8027244C:
/* 1A0D2C 8027244C 8E830188 */ lw $v1, 0x188($s4)
/* 1A0D30 80272450 3C021000 */ lui $v0, (0x10000000 >> 16)
/* 1A0D34 80272454 00621024 */ and $v0, $v1, $v0
/* 1A0D38 80272458 14400007 */ bnez $v0, .L80272478
/* 1A0D3C 8027245C 00000000 */ nop
/* 1A0D40 80272460 8E82018C */ lw $v0, 0x18C($s4)
/* 1A0D44 80272464 30420008 */ andi $v0, $v0, 0x8
/* 1A0D48 80272468 14400003 */ bnez $v0, .L80272478
/* 1A0D4C 8027246C 30620020 */ andi $v0, $v1, 0x20
/* 1A0D50 80272470 10400338 */ beqz $v0, .L80273154
/* 1A0D54 80272474 00000000 */ nop
.L80272478:
/* 1A0D58 80272478 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 1A0D5C 8027247C 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 1A0D60 80272480 8E020000 */ lw $v0, 0x0($s0)
/* 1A0D64 80272484 30420020 */ andi $v0, $v0, 0x20
/* 1A0D68 80272488 14400002 */ bnez $v0, .L80272494
/* 1A0D6C 8027248C 24110019 */ addiu $s1, $zero, 0x19
/* 1A0D70 80272490 24110017 */ addiu $s1, $zero, 0x17
.L80272494:
/* 1A0D74 80272494 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A0D78 80272498 2404010C */ addiu $a0, $zero, 0x10C
/* 1A0D7C 8027249C E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A0D80 802724A0 8E46000C */ lw $a2, 0xC($s2)
/* 1A0D84 802724A4 8E470010 */ lw $a3, 0x10($s2)
/* 1A0D88 802724A8 0C052757 */ jal sfx_play_sound_at_position
/* 1A0D8C 802724AC 0000282D */ daddu $a1, $zero, $zero
/* 1A0D90 802724B0 0260202D */ daddu $a0, $s3, $zero
/* 1A0D94 802724B4 0C09DC58 */ jal dispatch_event_actor
/* 1A0D98 802724B8 0220282D */ daddu $a1, $s1, $zero
/* 1A0D9C 802724BC 24020001 */ addiu $v0, $zero, 0x1
/* 1A0DA0 802724C0 AFA20010 */ sw $v0, 0x10($sp)
/* 1A0DA4 802724C4 24020003 */ addiu $v0, $zero, 0x3
/* 1A0DA8 802724C8 AFA20014 */ sw $v0, 0x14($sp)
/* 1A0DAC 802724CC C64C000C */ lwc1 $f12, 0xC($s2)
/* 1A0DB0 802724D0 C64E0010 */ lwc1 $f14, 0x10($s2)
/* 1A0DB4 802724D4 8E460014 */ lw $a2, 0x14($s2)
/* 1A0DB8 802724D8 0C093BF8 */ jal func_8024EFE0
/* 1A0DBC 802724DC 0000382D */ daddu $a3, $zero, $zero
/* 1A0DC0 802724E0 0809C961 */ j .L80272584
/* 1A0DC4 802724E4 00000000 */ nop
.L802724E8:
/* 1A0DC8 802724E8 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 1A0DCC 802724EC 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 1A0DD0 802724F0 8E020000 */ lw $v0, 0x0($s0)
/* 1A0DD4 802724F4 30420020 */ andi $v0, $v0, 0x20
/* 1A0DD8 802724F8 10400038 */ beqz $v0, .L802725DC
/* 1A0DDC 802724FC 24020020 */ addiu $v0, $zero, 0x20
/* 1A0DE0 80272500 8E820188 */ lw $v0, 0x188($s4)
/* 1A0DE4 80272504 30421000 */ andi $v0, $v0, 0x1000
/* 1A0DE8 80272508 10400022 */ beqz $v0, .L80272594
/* 1A0DEC 8027250C 00000000 */ nop
/* 1A0DF0 80272510 0C00A67F */ jal rand_int
/* 1A0DF4 80272514 24040063 */ addiu $a0, $zero, 0x63
/* 1A0DF8 80272518 8E630008 */ lw $v1, 0x8($s3)
/* 1A0DFC 8027251C 90640018 */ lbu $a0, 0x18($v1)
/* 1A0E00 80272520 92830194 */ lbu $v1, 0x194($s4)
/* 1A0E04 80272524 00830018 */ mult $a0, $v1
/* 1A0E08 80272528 00002012 */ mflo $a0
/* 1A0E0C 8027252C 3C0351EB */ lui $v1, (0x51EB851F >> 16)
/* 1A0E10 80272530 3463851F */ ori $v1, $v1, (0x51EB851F & 0xFFFF)
/* 1A0E14 80272534 00830018 */ mult $a0, $v1
/* 1A0E18 80272538 000427C3 */ sra $a0, $a0, 31
/* 1A0E1C 8027253C 00001810 */ mfhi $v1
/* 1A0E20 80272540 00031943 */ sra $v1, $v1, 5
/* 1A0E24 80272544 00641823 */ subu $v1, $v1, $a0
/* 1A0E28 80272548 0043102A */ slt $v0, $v0, $v1
/* 1A0E2C 8027254C 10400011 */ beqz $v0, .L80272594
/* 1A0E30 80272550 00000000 */ nop
/* 1A0E34 80272554 92620210 */ lbu $v0, 0x210($s3)
/* 1A0E38 80272558 2442FFFD */ addiu $v0, $v0, -0x3
/* 1A0E3C 8027255C 2C420006 */ sltiu $v0, $v0, 0x6
/* 1A0E40 80272560 1440000C */ bnez $v0, .L80272594
/* 1A0E44 80272564 00000000 */ nop
/* 1A0E48 80272568 8E620000 */ lw $v0, 0x0($s3)
/* 1A0E4C 8027256C 30420400 */ andi $v0, $v0, 0x400
/* 1A0E50 80272570 14400008 */ bnez $v0, .L80272594
/* 1A0E54 80272574 0260202D */ daddu $a0, $s3, $zero
/* 1A0E58 80272578 24050039 */ addiu $a1, $zero, 0x39
.L8027257C:
/* 1A0E5C 8027257C 0C09DC58 */ jal dispatch_event_actor
/* 1A0E60 80272580 00000000 */ nop
.L80272584:
/* 1A0E64 80272584 8E020000 */ lw $v0, 0x0($s0)
/* 1A0E68 80272588 30420240 */ andi $v0, $v0, 0x240
.L8027258C:
/* 1A0E6C 8027258C 0809CC63 */ j .L8027318C
/* 1A0E70 80272590 0002102B */ sltu $v0, $zero, $v0
.L80272594:
/* 1A0E74 80272594 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A0E78 80272598 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A0E7C 8027259C 30420020 */ andi $v0, $v0, 0x20
/* 1A0E80 802725A0 1040000D */ beqz $v0, .L802725D8
/* 1A0E84 802725A4 24020009 */ addiu $v0, $zero, 0x9
/* 1A0E88 802725A8 52220001 */ beql $s1, $v0, .L802725B0
/* 1A0E8C 802725AC 2411000A */ addiu $s1, $zero, 0xA
.L802725B0:
/* 1A0E90 802725B0 24020017 */ addiu $v0, $zero, 0x17
/* 1A0E94 802725B4 52220001 */ beql $s1, $v0, .L802725BC
/* 1A0E98 802725B8 24110019 */ addiu $s1, $zero, 0x19
.L802725BC:
/* 1A0E9C 802725BC 826201B8 */ lb $v0, 0x1B8($s3)
/* 1A0EA0 802725C0 1C400008 */ bgtz $v0, .L802725E4
/* 1A0EA4 802725C4 24020019 */ addiu $v0, $zero, 0x19
/* 1A0EA8 802725C8 52220006 */ beql $s1, $v0, .L802725E4
/* 1A0EAC 802725CC 24110020 */ addiu $s1, $zero, 0x20
/* 1A0EB0 802725D0 0809C979 */ j .L802725E4
/* 1A0EB4 802725D4 00000000 */ nop
.L802725D8:
/* 1A0EB8 802725D8 24020020 */ addiu $v0, $zero, 0x20
.L802725DC:
/* 1A0EBC 802725DC 52220001 */ beql $s1, $v0, .L802725E4
/* 1A0EC0 802725E0 24110009 */ addiu $s1, $zero, 0x9
.L802725E4:
/* 1A0EC4 802725E4 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 1A0EC8 802725E8 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 1A0ECC 802725EC 8E020000 */ lw $v0, 0x0($s0)
/* 1A0ED0 802725F0 30420020 */ andi $v0, $v0, 0x20
/* 1A0ED4 802725F4 14400007 */ bnez $v0, .L80272614
/* 1A0ED8 802725F8 00000000 */ nop
/* 1A0EDC 802725FC 0C099B85 */ jal clear_part_pal_adjustment
/* 1A0EE0 80272600 03C0202D */ daddu $a0, $fp, $zero
/* 1A0EE4 80272604 8E020000 */ lw $v0, 0x0($s0)
/* 1A0EE8 80272608 30420020 */ andi $v0, $v0, 0x20
/* 1A0EEC 8027260C 1040006F */ beqz $v0, .L802727CC
/* 1A0EF0 80272610 00000000 */ nop
.L80272614:
/* 1A0EF4 80272614 8E820188 */ lw $v0, 0x188($s4)
/* 1A0EF8 80272618 3C030400 */ lui $v1, (0x4000000 >> 16)
/* 1A0EFC 8027261C 00431024 */ and $v0, $v0, $v1
/* 1A0F00 80272620 10400021 */ beqz $v0, .L802726A8
/* 1A0F04 80272624 240200FF */ addiu $v0, $zero, 0xFF
/* 1A0F08 80272628 8E640008 */ lw $a0, 0x8($s3)
/* 1A0F0C 8027262C 9083001D */ lbu $v1, 0x1D($a0)
/* 1A0F10 80272630 1062001D */ beq $v1, $v0, .L802726A8
/* 1A0F14 80272634 00000000 */ nop
/* 1A0F18 80272638 3C028011 */ lui $v0, %hi(gPlayerData)
/* 1A0F1C 8027263C 2442F290 */ addiu $v0, $v0, %lo(gPlayerData)
/* 1A0F20 80272640 80420001 */ lb $v0, 0x1($v0)
/* 1A0F24 80272644 24420001 */ addiu $v0, $v0, 0x1
/* 1A0F28 80272648 0043102A */ slt $v0, $v0, $v1
/* 1A0F2C 8027264C 14400016 */ bnez $v0, .L802726A8
/* 1A0F30 80272650 00000000 */ nop
/* 1A0F34 80272654 86820180 */ lh $v0, 0x180($s4)
/* 1A0F38 80272658 18400013 */ blez $v0, .L802726A8
/* 1A0F3C 8027265C 00000000 */ nop
/* 1A0F40 80272660 8E020000 */ lw $v0, 0x0($s0)
/* 1A0F44 80272664 30420040 */ andi $v0, $v0, 0x40
/* 1A0F48 80272668 1040000F */ beqz $v0, .L802726A8
/* 1A0F4C 8027266C 24020009 */ addiu $v0, $zero, 0x9
/* 1A0F50 80272670 52220001 */ beql $s1, $v0, .L80272678
/* 1A0F54 80272674 2411000B */ addiu $s1, $zero, 0xB
.L80272678:
/* 1A0F58 80272678 2402000A */ addiu $v0, $zero, 0xA
/* 1A0F5C 8027267C 52220001 */ beql $s1, $v0, .L80272684
/* 1A0F60 80272680 2411000B */ addiu $s1, $zero, 0xB
.L80272684:
/* 1A0F64 80272684 24020017 */ addiu $v0, $zero, 0x17
/* 1A0F68 80272688 52220001 */ beql $s1, $v0, .L80272690
/* 1A0F6C 8027268C 2411000B */ addiu $s1, $zero, 0xB
.L80272690:
/* 1A0F70 80272690 24020019 */ addiu $v0, $zero, 0x19
/* 1A0F74 80272694 52220001 */ beql $s1, $v0, .L8027269C
/* 1A0F78 80272698 2411000B */ addiu $s1, $zero, 0xB
.L8027269C:
/* 1A0F7C 8027269C 24020020 */ addiu $v0, $zero, 0x20
/* 1A0F80 802726A0 52220001 */ beql $s1, $v0, .L802726A8
/* 1A0F84 802726A4 24110021 */ addiu $s1, $zero, 0x21
.L802726A8:
/* 1A0F88 802726A8 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A0F8C 802726AC 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A0F90 802726B0 30420020 */ andi $v0, $v0, 0x20
/* 1A0F94 802726B4 10400045 */ beqz $v0, .L802727CC
/* 1A0F98 802726B8 3C031000 */ lui $v1, (0x10000000 >> 16)
/* 1A0F9C 802726BC 8E820188 */ lw $v0, 0x188($s4)
/* 1A0FA0 802726C0 00431024 */ and $v0, $v0, $v1
/* 1A0FA4 802726C4 14400013 */ bnez $v0, .L80272714
/* 1A0FA8 802726C8 3C030010 */ lui $v1, (0x100000 >> 16)
/* 1A0FAC 802726CC 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A0FB0 802726D0 00431024 */ and $v0, $v0, $v1
/* 1A0FB4 802726D4 1040000F */ beqz $v0, .L80272714
/* 1A0FB8 802726D8 24020009 */ addiu $v0, $zero, 0x9
/* 1A0FBC 802726DC 52220001 */ beql $s1, $v0, .L802726E4
/* 1A0FC0 802726E0 24110015 */ addiu $s1, $zero, 0x15
.L802726E4:
/* 1A0FC4 802726E4 2402000A */ addiu $v0, $zero, 0xA
/* 1A0FC8 802726E8 52220001 */ beql $s1, $v0, .L802726F0
/* 1A0FCC 802726EC 24110015 */ addiu $s1, $zero, 0x15
.L802726F0:
/* 1A0FD0 802726F0 24020017 */ addiu $v0, $zero, 0x17
/* 1A0FD4 802726F4 52220001 */ beql $s1, $v0, .L802726FC
/* 1A0FD8 802726F8 24110015 */ addiu $s1, $zero, 0x15
.L802726FC:
/* 1A0FDC 802726FC 24020019 */ addiu $v0, $zero, 0x19
/* 1A0FE0 80272700 52220001 */ beql $s1, $v0, .L80272708
/* 1A0FE4 80272704 24110015 */ addiu $s1, $zero, 0x15
.L80272708:
/* 1A0FE8 80272708 24020020 */ addiu $v0, $zero, 0x20
/* 1A0FEC 8027270C 52220001 */ beql $s1, $v0, .L80272714
/* 1A0FF0 80272710 24110028 */ addiu $s1, $zero, 0x28
.L80272714:
/* 1A0FF4 80272714 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A0FF8 80272718 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A0FFC 8027271C 30420020 */ andi $v0, $v0, 0x20
/* 1A1000 80272720 1040002A */ beqz $v0, .L802727CC
/* 1A1004 80272724 00000000 */ nop
/* 1A1008 80272728 8E820188 */ lw $v0, 0x188($s4)
/* 1A100C 8027272C 30420480 */ andi $v0, $v0, 0x480
/* 1A1010 80272730 1040000B */ beqz $v0, .L80272760
/* 1A1014 80272734 00000000 */ nop
/* 1A1018 80272738 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A101C 8027273C 30424000 */ andi $v0, $v0, 0x4000
/* 1A1020 80272740 10400007 */ beqz $v0, .L80272760
/* 1A1024 80272744 2402000A */ addiu $v0, $zero, 0xA
/* 1A1028 80272748 52220001 */ beql $s1, $v0, .L80272750
/* 1A102C 8027274C 2411000C */ addiu $s1, $zero, 0xC
.L80272750:
/* 1A1030 80272750 24020019 */ addiu $v0, $zero, 0x19
/* 1A1034 80272754 52220001 */ beql $s1, $v0, .L8027275C
/* 1A1038 80272758 2411000C */ addiu $s1, $zero, 0xC
.L8027275C:
/* 1A103C 8027275C 24160001 */ addiu $s6, $zero, 0x1
.L80272760:
/* 1A1040 80272760 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A1044 80272764 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A1048 80272768 30420020 */ andi $v0, $v0, 0x20
/* 1A104C 8027276C 10400017 */ beqz $v0, .L802727CC
/* 1A1050 80272770 00000000 */ nop
/* 1A1054 80272774 8E820188 */ lw $v0, 0x188($s4)
/* 1A1058 80272778 30420C80 */ andi $v0, $v0, 0xC80
/* 1A105C 8027277C 1040000E */ beqz $v0, .L802727B8
/* 1A1060 80272780 00000000 */ nop
/* 1A1064 80272784 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A1068 80272788 30421000 */ andi $v0, $v0, 0x1000
/* 1A106C 8027278C 1040000A */ beqz $v0, .L802727B8
/* 1A1070 80272790 2402000A */ addiu $v0, $zero, 0xA
/* 1A1074 80272794 52220001 */ beql $s1, $v0, .L8027279C
/* 1A1078 80272798 2411000D */ addiu $s1, $zero, 0xD
.L8027279C:
/* 1A107C 8027279C 24020019 */ addiu $v0, $zero, 0x19
/* 1A1080 802727A0 52220001 */ beql $s1, $v0, .L802727A8
/* 1A1084 802727A4 2411000D */ addiu $s1, $zero, 0xD
.L802727A8:
/* 1A1088 802727A8 8E620000 */ lw $v0, 0x0($s3)
/* 1A108C 802727AC 30420400 */ andi $v0, $v0, 0x400
/* 1A1090 802727B0 50400001 */ beql $v0, $zero, .L802727B8
/* 1A1094 802727B4 24160001 */ addiu $s6, $zero, 0x1
.L802727B8:
/* 1A1098 802727B8 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A109C 802727BC 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A10A0 802727C0 30420020 */ andi $v0, $v0, 0x20
/* 1A10A4 802727C4 14400017 */ bnez $v0, .L80272824
/* 1A10A8 802727C8 00000000 */ nop
.L802727CC:
/* 1A10AC 802727CC 8E820188 */ lw $v0, 0x188($s4)
/* 1A10B0 802727D0 30420C80 */ andi $v0, $v0, 0xC80
/* 1A10B4 802727D4 1040000E */ beqz $v0, .L80272810
/* 1A10B8 802727D8 00000000 */ nop
/* 1A10BC 802727DC 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A10C0 802727E0 30421000 */ andi $v0, $v0, 0x1000
/* 1A10C4 802727E4 1040000A */ beqz $v0, .L80272810
/* 1A10C8 802727E8 24020009 */ addiu $v0, $zero, 0x9
/* 1A10CC 802727EC 52220001 */ beql $s1, $v0, .L802727F4
/* 1A10D0 802727F0 2411000D */ addiu $s1, $zero, 0xD
.L802727F4:
/* 1A10D4 802727F4 24020017 */ addiu $v0, $zero, 0x17
/* 1A10D8 802727F8 52220001 */ beql $s1, $v0, .L80272800
/* 1A10DC 802727FC 2411000D */ addiu $s1, $zero, 0xD
.L80272800:
/* 1A10E0 80272800 8E620000 */ lw $v0, 0x0($s3)
/* 1A10E4 80272804 30420400 */ andi $v0, $v0, 0x400
/* 1A10E8 80272808 50400001 */ beql $v0, $zero, .L80272810
/* 1A10EC 8027280C 24160001 */ addiu $s6, $zero, 0x1
.L80272810:
/* 1A10F0 80272810 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A10F4 80272814 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A10F8 80272818 30420020 */ andi $v0, $v0, 0x20
/* 1A10FC 8027281C 504000A2 */ beql $v0, $zero, .L80272AA8
/* 1A1100 80272820 0260202D */ daddu $a0, $s3, $zero
.L80272824:
/* 1A1104 80272824 8E820188 */ lw $v0, 0x188($s4)
/* 1A1108 80272828 3C030002 */ lui $v1, (0x20000 >> 16)
/* 1A110C 8027282C 00431024 */ and $v0, $v0, $v1
/* 1A1110 80272830 1040000B */ beqz $v0, .L80272860
/* 1A1114 80272834 00000000 */ nop
/* 1A1118 80272838 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A111C 8027283C 30421000 */ andi $v0, $v0, 0x1000
/* 1A1120 80272840 10400007 */ beqz $v0, .L80272860
/* 1A1124 80272844 2402000A */ addiu $v0, $zero, 0xA
/* 1A1128 80272848 52220001 */ beql $s1, $v0, .L80272850
/* 1A112C 8027284C 24110012 */ addiu $s1, $zero, 0x12
.L80272850:
/* 1A1130 80272850 24020019 */ addiu $v0, $zero, 0x19
/* 1A1134 80272854 52220001 */ beql $s1, $v0, .L8027285C
/* 1A1138 80272858 24110012 */ addiu $s1, $zero, 0x12
.L8027285C:
/* 1A113C 8027285C 24160001 */ addiu $s6, $zero, 0x1
.L80272860:
/* 1A1140 80272860 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A1144 80272864 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A1148 80272868 30420020 */ andi $v0, $v0, 0x20
/* 1A114C 8027286C 5040008E */ beql $v0, $zero, .L80272AA8
/* 1A1150 80272870 0260202D */ daddu $a0, $s3, $zero
/* 1A1154 80272874 8E820188 */ lw $v0, 0x188($s4)
/* 1A1158 80272878 30420202 */ andi $v0, $v0, 0x202
/* 1A115C 8027287C 10400008 */ beqz $v0, .L802728A0
/* 1A1160 80272880 2402000A */ addiu $v0, $zero, 0xA
/* 1A1164 80272884 52220001 */ beql $s1, $v0, .L8027288C
/* 1A1168 80272888 2411000E */ addiu $s1, $zero, 0xE
.L8027288C:
/* 1A116C 8027288C 24020020 */ addiu $v0, $zero, 0x20
/* 1A1170 80272890 52220001 */ beql $s1, $v0, .L80272898
/* 1A1174 80272894 24110024 */ addiu $s1, $zero, 0x24
.L80272898:
/* 1A1178 80272898 24080001 */ addiu $t0, $zero, 0x1
/* 1A117C 8027289C AFA80028 */ sw $t0, 0x28($sp)
.L802728A0:
/* 1A1180 802728A0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A1184 802728A4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A1188 802728A8 30420020 */ andi $v0, $v0, 0x20
/* 1A118C 802728AC 5040007E */ beql $v0, $zero, .L80272AA8
/* 1A1190 802728B0 0260202D */ daddu $a0, $s3, $zero
/* 1A1194 802728B4 86820180 */ lh $v0, 0x180($s4)
/* 1A1198 802728B8 0440007A */ bltz $v0, .L80272AA4
/* 1A119C 802728BC 24020020 */ addiu $v0, $zero, 0x20
/* 1A11A0 802728C0 12220078 */ beq $s1, $v0, .L80272AA4
/* 1A11A4 802728C4 24020021 */ addiu $v0, $zero, 0x21
/* 1A11A8 802728C8 12220076 */ beq $s1, $v0, .L80272AA4
/* 1A11AC 802728CC 24020022 */ addiu $v0, $zero, 0x22
/* 1A11B0 802728D0 52220075 */ beql $s1, $v0, .L80272AA8
/* 1A11B4 802728D4 0260202D */ daddu $a0, $s3, $zero
/* 1A11B8 802728D8 8FC20004 */ lw $v0, 0x4($fp)
/* 1A11BC 802728DC 30420004 */ andi $v0, $v0, 0x4
/* 1A11C0 802728E0 14400070 */ bnez $v0, .L80272AA4
/* 1A11C4 802728E4 3C030008 */ lui $v1, (0x80000 >> 16)
/* 1A11C8 802728E8 8E820190 */ lw $v0, 0x190($s4)
/* 1A11CC 802728EC 00431024 */ and $v0, $v0, $v1
/* 1A11D0 802728F0 10400008 */ beqz $v0, .L80272914
/* 1A11D4 802728F4 0260202D */ daddu $a0, $s3, $zero
/* 1A11D8 802728F8 2405000A */ addiu $a1, $zero, 0xA
/* 1A11DC 802728FC 0C099ADE */ jal try_inflict_status
/* 1A11E0 80272900 24060027 */ addiu $a2, $zero, 0x27
/* 1A11E4 80272904 10400003 */ beqz $v0, .L80272914
/* 1A11E8 80272908 00000000 */ nop
/* 1A11EC 8027290C 24160001 */ addiu $s6, $zero, 0x1
/* 1A11F0 80272910 02C0B82D */ daddu $s7, $s6, $zero
.L80272914:
/* 1A11F4 80272914 8E820190 */ lw $v0, 0x190($s4)
/* 1A11F8 80272918 3C030002 */ lui $v1, (0x20000 >> 16)
/* 1A11FC 8027291C 00431024 */ and $v0, $v0, $v1
/* 1A1200 80272920 10400008 */ beqz $v0, .L80272944
/* 1A1204 80272924 0260202D */ daddu $a0, $s3, $zero
/* 1A1208 80272928 24050009 */ addiu $a1, $zero, 0x9
/* 1A120C 8027292C 0C099ADE */ jal try_inflict_status
/* 1A1210 80272930 24060025 */ addiu $a2, $zero, 0x25
/* 1A1214 80272934 10400003 */ beqz $v0, .L80272944
/* 1A1218 80272938 00000000 */ nop
/* 1A121C 8027293C 24160001 */ addiu $s6, $zero, 0x1
/* 1A1220 80272940 02C0B82D */ daddu $s7, $s6, $zero
.L80272944:
/* 1A1224 80272944 8E820190 */ lw $v0, 0x190($s4)
/* 1A1228 80272948 3C030010 */ lui $v1, (0x100000 >> 16)
/* 1A122C 8027294C 00431024 */ and $v0, $v0, $v1
/* 1A1230 80272950 10400008 */ beqz $v0, .L80272974
/* 1A1234 80272954 0260202D */ daddu $a0, $s3, $zero
/* 1A1238 80272958 2405000C */ addiu $a1, $zero, 0xC
/* 1A123C 8027295C 0C099ADE */ jal try_inflict_status
/* 1A1240 80272960 24060028 */ addiu $a2, $zero, 0x28
/* 1A1244 80272964 10400003 */ beqz $v0, .L80272974
/* 1A1248 80272968 00000000 */ nop
/* 1A124C 8027296C 24160001 */ addiu $s6, $zero, 0x1
/* 1A1250 80272970 02C0B82D */ daddu $s7, $s6, $zero
.L80272974:
/* 1A1254 80272974 8E820190 */ lw $v0, 0x190($s4)
/* 1A1258 80272978 30421000 */ andi $v0, $v0, 0x1000
/* 1A125C 8027297C 10400008 */ beqz $v0, .L802729A0
/* 1A1260 80272980 0260202D */ daddu $a0, $s3, $zero
/* 1A1264 80272984 24050006 */ addiu $a1, $zero, 0x6
/* 1A1268 80272988 0C099ADE */ jal try_inflict_status
/* 1A126C 8027298C 24060020 */ addiu $a2, $zero, 0x20
/* 1A1270 80272990 10400003 */ beqz $v0, .L802729A0
/* 1A1274 80272994 00000000 */ nop
/* 1A1278 80272998 24160001 */ addiu $s6, $zero, 0x1
/* 1A127C 8027299C 02C0B82D */ daddu $s7, $s6, $zero
.L802729A0:
/* 1A1280 802729A0 8E820190 */ lw $v0, 0x190($s4)
/* 1A1284 802729A4 3C030020 */ lui $v1, (0x200000 >> 16)
/* 1A1288 802729A8 00431024 */ and $v0, $v0, $v1
/* 1A128C 802729AC 10400008 */ beqz $v0, .L802729D0
/* 1A1290 802729B0 0260202D */ daddu $a0, $s3, $zero
/* 1A1294 802729B4 24050008 */ addiu $a1, $zero, 0x8
/* 1A1298 802729B8 0C099ADE */ jal try_inflict_status
/* 1A129C 802729BC 24060029 */ addiu $a2, $zero, 0x29
/* 1A12A0 802729C0 10400003 */ beqz $v0, .L802729D0
/* 1A12A4 802729C4 00000000 */ nop
/* 1A12A8 802729C8 24160001 */ addiu $s6, $zero, 0x1
/* 1A12AC 802729CC 02C0B82D */ daddu $s7, $s6, $zero
.L802729D0:
/* 1A12B0 802729D0 8E820190 */ lw $v0, 0x190($s4)
/* 1A12B4 802729D4 30422000 */ andi $v0, $v0, 0x2000
/* 1A12B8 802729D8 10400008 */ beqz $v0, .L802729FC
/* 1A12BC 802729DC 0260202D */ daddu $a0, $s3, $zero
/* 1A12C0 802729E0 2405000B */ addiu $a1, $zero, 0xB
/* 1A12C4 802729E4 0C099ADE */ jal try_inflict_status
/* 1A12C8 802729E8 24060021 */ addiu $a2, $zero, 0x21
/* 1A12CC 802729EC 10400003 */ beqz $v0, .L802729FC
/* 1A12D0 802729F0 00000000 */ nop
/* 1A12D4 802729F4 24160001 */ addiu $s6, $zero, 0x1
/* 1A12D8 802729F8 02C0B82D */ daddu $s7, $s6, $zero
.L802729FC:
/* 1A12DC 802729FC 8E820190 */ lw $v0, 0x190($s4)
/* 1A12E0 80272A00 30428000 */ andi $v0, $v0, 0x8000
/* 1A12E4 80272A04 10400008 */ beqz $v0, .L80272A28
/* 1A12E8 80272A08 0260202D */ daddu $a0, $s3, $zero
/* 1A12EC 80272A0C 24050003 */ addiu $a1, $zero, 0x3
/* 1A12F0 80272A10 0C099ADE */ jal try_inflict_status
/* 1A12F4 80272A14 24060023 */ addiu $a2, $zero, 0x23
/* 1A12F8 80272A18 10400003 */ beqz $v0, .L80272A28
/* 1A12FC 80272A1C 00000000 */ nop
/* 1A1300 80272A20 24160001 */ addiu $s6, $zero, 0x1
/* 1A1304 80272A24 02C0B82D */ daddu $s7, $s6, $zero
.L80272A28:
/* 1A1308 80272A28 8E820190 */ lw $v0, 0x190($s4)
/* 1A130C 80272A2C 3C030001 */ lui $v1, (0x10000 >> 16)
/* 1A1310 80272A30 00431024 */ and $v0, $v0, $v1
/* 1A1314 80272A34 10400008 */ beqz $v0, .L80272A58
/* 1A1318 80272A38 0260202D */ daddu $a0, $s3, $zero
/* 1A131C 80272A3C 24050005 */ addiu $a1, $zero, 0x5
/* 1A1320 80272A40 0C099ADE */ jal try_inflict_status
/* 1A1324 80272A44 24060026 */ addiu $a2, $zero, 0x26
/* 1A1328 80272A48 10400003 */ beqz $v0, .L80272A58
/* 1A132C 80272A4C 00000000 */ nop
/* 1A1330 80272A50 24160001 */ addiu $s6, $zero, 0x1
/* 1A1334 80272A54 02C0B82D */ daddu $s7, $s6, $zero
.L80272A58:
/* 1A1338 80272A58 8E820190 */ lw $v0, 0x190($s4)
/* 1A133C 80272A5C 3C030004 */ lui $v1, (0x40000 >> 16)
/* 1A1340 80272A60 00431024 */ and $v0, $v0, $v1
/* 1A1344 80272A64 10400008 */ beqz $v0, .L80272A88
/* 1A1348 80272A68 0260202D */ daddu $a0, $s3, $zero
/* 1A134C 80272A6C 24050004 */ addiu $a1, $zero, 0x4
/* 1A1350 80272A70 0C099ADE */ jal try_inflict_status
/* 1A1354 80272A74 24060024 */ addiu $a2, $zero, 0x24
/* 1A1358 80272A78 10400003 */ beqz $v0, .L80272A88
/* 1A135C 80272A7C 00000000 */ nop
/* 1A1360 80272A80 24160001 */ addiu $s6, $zero, 0x1
/* 1A1364 80272A84 02C0B82D */ daddu $s7, $s6, $zero
.L80272A88:
/* 1A1368 80272A88 12E00006 */ beqz $s7, .L80272AA4
/* 1A136C 80272A8C 24020017 */ addiu $v0, $zero, 0x17
/* 1A1370 80272A90 52220001 */ beql $s1, $v0, .L80272A98
/* 1A1374 80272A94 24110009 */ addiu $s1, $zero, 0x9
.L80272A98:
/* 1A1378 80272A98 24020019 */ addiu $v0, $zero, 0x19
/* 1A137C 80272A9C 52220001 */ beql $s1, $v0, .L80272AA4
/* 1A1380 80272AA0 2411000A */ addiu $s1, $zero, 0xA
.L80272AA4:
/* 1A1384 80272AA4 0260202D */ daddu $a0, $s3, $zero
.L80272AA8:
/* 1A1388 80272AA8 0220282D */ daddu $a1, $s1, $zero
/* 1A138C 80272AAC 0C09DC58 */ jal dispatch_event_actor
/* 1A1390 80272AB0 A2970199 */ sb $s7, 0x199($s4)
/* 1A1394 80272AB4 8E620000 */ lw $v0, 0x0($s3)
/* 1A1398 80272AB8 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 1A139C 80272ABC 00431024 */ and $v0, $v0, $v1
/* 1A13A0 80272AC0 1440002F */ bnez $v0, .L80272B80
/* 1A13A4 80272AC4 00000000 */ nop
/* 1A13A8 80272AC8 86870180 */ lh $a3, 0x180($s4)
/* 1A13AC 80272ACC 14E0000F */ bnez $a3, .L80272B0C
/* 1A13B0 80272AD0 00000000 */ nop
/* 1A13B4 80272AD4 16C0002C */ bnez $s6, .L80272B88
/* 1A13B8 80272AD8 00000000 */ nop
/* 1A13BC 80272ADC 16E00028 */ bnez $s7, .L80272B80
/* 1A13C0 80272AE0 24020001 */ addiu $v0, $zero, 0x1
/* 1A13C4 80272AE4 AFA20010 */ sw $v0, 0x10($sp)
/* 1A13C8 80272AE8 24020003 */ addiu $v0, $zero, 0x3
/* 1A13CC 80272AEC AFA20014 */ sw $v0, 0x14($sp)
/* 1A13D0 80272AF0 C64C000C */ lwc1 $f12, 0xC($s2)
/* 1A13D4 80272AF4 C64E0010 */ lwc1 $f14, 0x10($s2)
/* 1A13D8 80272AF8 8E460014 */ lw $a2, 0x14($s2)
/* 1A13DC 80272AFC 0C093BF8 */ jal func_8024EFE0
/* 1A13E0 80272B00 0000382D */ daddu $a3, $zero, $zero
/* 1A13E4 80272B04 0809CAE0 */ j .L80272B80
/* 1A13E8 80272B08 00000000 */ nop
.L80272B0C:
/* 1A13EC 80272B0C 8FA8001C */ lw $t0, 0x1C($sp)
/* 1A13F0 80272B10 1500001B */ bnez $t0, .L80272B80
/* 1A13F4 80272B14 3C032000 */ lui $v1, (0x20000040 >> 16)
/* 1A13F8 80272B18 8E820188 */ lw $v0, 0x188($s4)
/* 1A13FC 80272B1C 34630040 */ ori $v1, $v1, (0x20000040 & 0xFFFF)
/* 1A1400 80272B20 00431024 */ and $v0, $v0, $v1
/* 1A1404 80272B24 10400007 */ beqz $v0, .L80272B44
/* 1A1408 80272B28 AFA00010 */ sw $zero, 0x10($sp)
/* 1A140C 80272B2C C64C000C */ lwc1 $f12, 0xC($s2)
/* 1A1410 80272B30 C64E0010 */ lwc1 $f14, 0x10($s2)
/* 1A1414 80272B34 0C09996B */ jal show_next_damage_popup
/* 1A1418 80272B38 8E460014 */ lw $a2, 0x14($s2)
/* 1A141C 80272B3C 0809CAD5 */ j .L80272B54
/* 1A1420 80272B40 00000000 */ nop
.L80272B44:
/* 1A1424 80272B44 C64C000C */ lwc1 $f12, 0xC($s2)
/* 1A1428 80272B48 C64E0010 */ lwc1 $f14, 0x10($s2)
/* 1A142C 80272B4C 0C099937 */ jal show_primary_damage_popup
/* 1A1430 80272B50 8E460014 */ lw $a2, 0x14($s2)
.L80272B54:
/* 1A1434 80272B54 8FC20004 */ lw $v0, 0x4($fp)
/* 1A1438 80272B58 30420004 */ andi $v0, $v0, 0x4
/* 1A143C 80272B5C 14400008 */ bnez $v0, .L80272B80
/* 1A1440 80272B60 00000000 */ nop
/* 1A1444 80272B64 86820180 */ lh $v0, 0x180($s4)
/* 1A1448 80272B68 AFA20010 */ sw $v0, 0x10($sp)
/* 1A144C 80272B6C 8E45000C */ lw $a1, 0xC($s2)
/* 1A1450 80272B70 8E460010 */ lw $a2, 0x10($s2)
/* 1A1454 80272B74 8E470014 */ lw $a3, 0x14($s2)
/* 1A1458 80272B78 0C0999B9 */ jal show_damage_fx
/* 1A145C 80272B7C 0260202D */ daddu $a0, $s3, $zero
.L80272B80:
/* 1A1460 80272B80 12C00006 */ beqz $s6, .L80272B9C
/* 1A1464 80272B84 00000000 */ nop
.L80272B88:
/* 1A1468 80272B88 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A146C 80272B8C 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A1470 80272B90 30420040 */ andi $v0, $v0, 0x40
/* 1A1474 80272B94 14400006 */ bnez $v0, .L80272BB0
/* 1A1478 80272B98 00000000 */ nop
.L80272B9C:
/* 1A147C 80272B9C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A1480 80272BA0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A1484 80272BA4 30420040 */ andi $v0, $v0, 0x40
/* 1A1488 80272BA8 1040002E */ beqz $v0, .L80272C64
/* 1A148C 80272BAC 00000000 */ nop
.L80272BB0:
/* 1A1490 80272BB0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A1494 80272BB4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A1498 80272BB8 30420080 */ andi $v0, $v0, 0x80
/* 1A149C 80272BBC 14400029 */ bnez $v0, .L80272C64
/* 1A14A0 80272BC0 00000000 */ nop
/* 1A14A4 80272BC4 8FA80018 */ lw $t0, 0x18($sp)
/* 1A14A8 80272BC8 8D0201B0 */ lw $v0, 0x1B0($t0)
/* 1A14AC 80272BCC 10400008 */ beqz $v0, .L80272BF0
/* 1A14B0 80272BD0 00000000 */ nop
/* 1A14B4 80272BD4 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A14B8 80272BD8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A14BC 80272BDC 8D0401B0 */ lw $a0, 0x1B0($t0)
/* 1A14C0 80272BE0 8E46000C */ lw $a2, 0xC($s2)
/* 1A14C4 80272BE4 8E470010 */ lw $a3, 0x10($s2)
/* 1A14C8 80272BE8 0C052757 */ jal sfx_play_sound_at_position
/* 1A14CC 80272BEC 0000282D */ daddu $a1, $zero, $zero
.L80272BF0:
/* 1A14D0 80272BF0 86820180 */ lh $v0, 0x180($s4)
/* 1A14D4 80272BF4 18400006 */ blez $v0, .L80272C10
/* 1A14D8 80272BF8 00000000 */ nop
/* 1A14DC 80272BFC 0C05272D */ jal sfx_play_sound
/* 1A14E0 80272C00 24040231 */ addiu $a0, $zero, 0x231
/* 1A14E4 80272C04 86820180 */ lh $v0, 0x180($s4)
/* 1A14E8 80272C08 1C400008 */ bgtz $v0, .L80272C2C
/* 1A14EC 80272C0C 00000000 */ nop
.L80272C10:
/* 1A14F0 80272C10 8E820188 */ lw $v0, 0x188($s4)
/* 1A14F4 80272C14 3C034000 */ lui $v1, (0x40000000 >> 16)
/* 1A14F8 80272C18 00431024 */ and $v0, $v0, $v1
/* 1A14FC 80272C1C 10400011 */ beqz $v0, .L80272C64
/* 1A1500 80272C20 00000000 */ nop
/* 1A1504 80272C24 12C0000F */ beqz $s6, .L80272C64
/* 1A1508 80272C28 00000000 */ nop
.L80272C2C:
/* 1A150C 80272C2C 8E820188 */ lw $v0, 0x188($s4)
/* 1A1510 80272C30 3C030100 */ lui $v1, (0x1000000 >> 16)
/* 1A1514 80272C34 00431024 */ and $v0, $v0, $v1
/* 1A1518 80272C38 14400004 */ bnez $v0, .L80272C4C
/* 1A151C 80272C3C 24040005 */ addiu $a0, $zero, 0x5
/* 1A1520 80272C40 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A1524 80272C44 0809CB14 */ j .L80272C50
/* 1A1528 80272C48 0000202D */ daddu $a0, $zero, $zero
.L80272C4C:
/* 1A152C 80272C4C C6400014 */ lwc1 $f0, 0x14($s2)
.L80272C50:
/* 1A1530 80272C50 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A1534 80272C54 8E46000C */ lw $a2, 0xC($s2)
/* 1A1538 80272C58 8E470010 */ lw $a3, 0x10($s2)
/* 1A153C 80272C5C 0C0999FC */ jal show_action_rating
/* 1A1540 80272C60 0260282D */ daddu $a1, $s3, $zero
.L80272C64:
/* 1A1544 80272C64 8FA80024 */ lw $t0, 0x24($sp)
/* 1A1548 80272C68 11000007 */ beqz $t0, .L80272C88
/* 1A154C 80272C6C 24040001 */ addiu $a0, $zero, 0x1
/* 1A1550 80272C70 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A1554 80272C74 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A1558 80272C78 8E46000C */ lw $a2, 0xC($s2)
/* 1A155C 80272C7C 8E470010 */ lw $a3, 0x10($s2)
/* 1A1560 80272C80 0C0999FC */ jal show_action_rating
/* 1A1564 80272C84 0260282D */ daddu $a1, $s3, $zero
.L80272C88:
/* 1A1568 80272C88 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A156C 80272C8C 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A1570 80272C90 30420020 */ andi $v0, $v0, 0x20
/* 1A1574 80272C94 10400003 */ beqz $v0, .L80272CA4
/* 1A1578 80272C98 00000000 */ nop
/* 1A157C 80272C9C 0C099A5C */ jal func_80266970
/* 1A1580 80272CA0 0260202D */ daddu $a0, $s3, $zero
.L80272CA4:
/* 1A1584 80272CA4 86820180 */ lh $v0, 0x180($s4)
/* 1A1588 80272CA8 1C400003 */ bgtz $v0, .L80272CB8
/* 1A158C 80272CAC 00000000 */ nop
/* 1A1590 80272CB0 12C00020 */ beqz $s6, .L80272D34
/* 1A1594 80272CB4 00000000 */ nop
.L80272CB8:
/* 1A1598 80272CB8 8FA8001C */ lw $t0, 0x1C($sp)
/* 1A159C 80272CBC 1500001C */ bnez $t0, .L80272D30
/* 1A15A0 80272CC0 0260202D */ daddu $a0, $s3, $zero
/* 1A15A4 80272CC4 0C099C06 */ jal func_80267018
/* 1A15A8 80272CC8 24050001 */ addiu $a1, $zero, 0x1
/* 1A15AC 80272CCC 8FA80028 */ lw $t0, 0x28($sp)
/* 1A15B0 80272CD0 11000004 */ beqz $t0, .L80272CE4
/* 1A15B4 80272CD4 240400EA */ addiu $a0, $zero, 0xEA
/* 1A15B8 80272CD8 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A15BC 80272CDC 0809CB48 */ j .L80272D20
/* 1A15C0 80272CE0 E7A00010 */ swc1 $f0, 0x10($sp)
.L80272CE4:
/* 1A15C4 80272CE4 8FA8002C */ lw $t0, 0x2C($sp)
/* 1A15C8 80272CE8 11000004 */ beqz $t0, .L80272CFC
/* 1A15CC 80272CEC 2404037B */ addiu $a0, $zero, 0x37B
/* 1A15D0 80272CF0 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A15D4 80272CF4 0809CB48 */ j .L80272D20
/* 1A15D8 80272CF8 E7A00010 */ swc1 $f0, 0x10($sp)
.L80272CFC:
/* 1A15DC 80272CFC 8FA80030 */ lw $t0, 0x30($sp)
/* 1A15E0 80272D00 11000004 */ beqz $t0, .L80272D14
/* 1A15E4 80272D04 240400EB */ addiu $a0, $zero, 0xEB
/* 1A15E8 80272D08 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A15EC 80272D0C 0809CB48 */ j .L80272D20
/* 1A15F0 80272D10 E7A00010 */ swc1 $f0, 0x10($sp)
.L80272D14:
/* 1A15F4 80272D14 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A15F8 80272D18 240400E9 */ addiu $a0, $zero, 0xE9
/* 1A15FC 80272D1C E7A00010 */ swc1 $f0, 0x10($sp)
.L80272D20:
/* 1A1600 80272D20 8E46000C */ lw $a2, 0xC($s2)
/* 1A1604 80272D24 8E470010 */ lw $a3, 0x10($s2)
/* 1A1608 80272D28 0C052757 */ jal sfx_play_sound_at_position
/* 1A160C 80272D2C 0000282D */ daddu $a1, $zero, $zero
.L80272D30:
/* 1A1610 80272D30 86820180 */ lh $v0, 0x180($s4)
.L80272D34:
/* 1A1614 80272D34 1C400006 */ bgtz $v0, .L80272D50
/* 1A1618 80272D38 00000000 */ nop
/* 1A161C 80272D3C 16C00004 */ bnez $s6, .L80272D50
/* 1A1620 80272D40 00000000 */ nop
/* 1A1624 80272D44 8FA80020 */ lw $t0, 0x20($sp)
/* 1A1628 80272D48 11000005 */ beqz $t0, .L80272D60
/* 1A162C 80272D4C 00000000 */ nop
.L80272D50:
/* 1A1630 80272D50 8FC20000 */ lw $v0, 0x0($fp)
/* 1A1634 80272D54 30422000 */ andi $v0, $v0, 0x2000
/* 1A1638 80272D58 10400008 */ beqz $v0, .L80272D7C
/* 1A163C 80272D5C 00000000 */ nop
.L80272D60:
/* 1A1640 80272D60 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A1644 80272D64 2404010C */ addiu $a0, $zero, 0x10C
/* 1A1648 80272D68 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A164C 80272D6C 8E46000C */ lw $a2, 0xC($s2)
/* 1A1650 80272D70 8E470010 */ lw $a3, 0x10($s2)
/* 1A1654 80272D74 0C052757 */ jal sfx_play_sound_at_position
/* 1A1658 80272D78 0000282D */ daddu $a1, $zero, $zero
.L80272D7C:
/* 1A165C 80272D7C 8E820190 */ lw $v0, 0x190($s4)
/* 1A1660 80272D80 30421000 */ andi $v0, $v0, 0x1000
/* 1A1664 80272D84 10400018 */ beqz $v0, .L80272DE8
/* 1A1668 80272D88 00000000 */ nop
/* 1A166C 80272D8C 12E00016 */ beqz $s7, .L80272DE8
/* 1A1670 80272D90 00000000 */ nop
/* 1A1674 80272D94 3C048029 */ lui $a0, %hi(EVS_PlaySleepHitFX)
/* 1A1678 80272D98 248445E0 */ addiu $a0, $a0, %lo(EVS_PlaySleepHitFX)
/* 1A167C 80272D9C 2405000A */ addiu $a1, $zero, 0xA
/* 1A1680 80272DA0 0C0B0CF8 */ jal start_script
/* 1A1684 80272DA4 0000302D */ daddu $a2, $zero, $zero
/* 1A1688 80272DA8 C640000C */ lwc1 $f0, 0xC($s2)
/* 1A168C 80272DAC 4600018D */ trunc.w.s $f6, $f0
/* 1A1690 80272DB0 E4460084 */ swc1 $f6, 0x84($v0)
/* 1A1694 80272DB4 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1A1698 80272DB8 4600018D */ trunc.w.s $f6, $f0
/* 1A169C 80272DBC E4460088 */ swc1 $f6, 0x88($v0)
/* 1A16A0 80272DC0 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A16A4 80272DC4 4600018D */ trunc.w.s $f6, $f0
/* 1A16A8 80272DC8 E446008C */ swc1 $f6, 0x8C($v0)
/* 1A16AC 80272DCC C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A16B0 80272DD0 24042031 */ addiu $a0, $zero, 0x2031
/* 1A16B4 80272DD4 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A16B8 80272DD8 8E46000C */ lw $a2, 0xC($s2)
/* 1A16BC 80272DDC 8E470010 */ lw $a3, 0x10($s2)
/* 1A16C0 80272DE0 0C052757 */ jal sfx_play_sound_at_position
/* 1A16C4 80272DE4 0000282D */ daddu $a1, $zero, $zero
.L80272DE8:
/* 1A16C8 80272DE8 8E820190 */ lw $v0, 0x190($s4)
/* 1A16CC 80272DEC 3C030004 */ lui $v1, (0x40000 >> 16)
/* 1A16D0 80272DF0 00431024 */ and $v0, $v0, $v1
/* 1A16D4 80272DF4 10400018 */ beqz $v0, .L80272E58
/* 1A16D8 80272DF8 00000000 */ nop
/* 1A16DC 80272DFC 12E00016 */ beqz $s7, .L80272E58
/* 1A16E0 80272E00 00000000 */ nop
/* 1A16E4 80272E04 3C048029 */ lui $a0, %hi(EVS_PlayDizzyHitFX)
/* 1A16E8 80272E08 248445FC */ addiu $a0, $a0, %lo(EVS_PlayDizzyHitFX)
/* 1A16EC 80272E0C 2405000A */ addiu $a1, $zero, 0xA
/* 1A16F0 80272E10 0C0B0CF8 */ jal start_script
/* 1A16F4 80272E14 0000302D */ daddu $a2, $zero, $zero
/* 1A16F8 80272E18 C640000C */ lwc1 $f0, 0xC($s2)
/* 1A16FC 80272E1C 4600018D */ trunc.w.s $f6, $f0
/* 1A1700 80272E20 E4460084 */ swc1 $f6, 0x84($v0)
/* 1A1704 80272E24 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1A1708 80272E28 4600018D */ trunc.w.s $f6, $f0
/* 1A170C 80272E2C E4460088 */ swc1 $f6, 0x88($v0)
/* 1A1710 80272E30 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A1714 80272E34 4600018D */ trunc.w.s $f6, $f0
/* 1A1718 80272E38 E446008C */ swc1 $f6, 0x8C($v0)
/* 1A171C 80272E3C C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A1720 80272E40 24042032 */ addiu $a0, $zero, 0x2032
/* 1A1724 80272E44 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A1728 80272E48 8E46000C */ lw $a2, 0xC($s2)
/* 1A172C 80272E4C 8E470010 */ lw $a3, 0x10($s2)
/* 1A1730 80272E50 0C052757 */ jal sfx_play_sound_at_position
/* 1A1734 80272E54 0000282D */ daddu $a1, $zero, $zero
.L80272E58:
/* 1A1738 80272E58 8E820190 */ lw $v0, 0x190($s4)
/* 1A173C 80272E5C 3C030001 */ lui $v1, (0x10000 >> 16)
/* 1A1740 80272E60 00431024 */ and $v0, $v0, $v1
/* 1A1744 80272E64 10400018 */ beqz $v0, .L80272EC8
/* 1A1748 80272E68 00000000 */ nop
/* 1A174C 80272E6C 12E00016 */ beqz $s7, .L80272EC8
/* 1A1750 80272E70 00000000 */ nop
/* 1A1754 80272E74 3C048029 */ lui $a0, %hi(EVS_PlayParalyzeHitFX)
/* 1A1758 80272E78 24844618 */ addiu $a0, $a0, %lo(EVS_PlayParalyzeHitFX)
/* 1A175C 80272E7C 2405000A */ addiu $a1, $zero, 0xA
/* 1A1760 80272E80 0C0B0CF8 */ jal start_script
/* 1A1764 80272E84 0000302D */ daddu $a2, $zero, $zero
/* 1A1768 80272E88 C640000C */ lwc1 $f0, 0xC($s2)
/* 1A176C 80272E8C 4600018D */ trunc.w.s $f6, $f0
/* 1A1770 80272E90 E4460084 */ swc1 $f6, 0x84($v0)
/* 1A1774 80272E94 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1A1778 80272E98 4600018D */ trunc.w.s $f6, $f0
/* 1A177C 80272E9C E4460088 */ swc1 $f6, 0x88($v0)
/* 1A1780 80272EA0 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A1784 80272EA4 4600018D */ trunc.w.s $f6, $f0
/* 1A1788 80272EA8 E446008C */ swc1 $f6, 0x8C($v0)
/* 1A178C 80272EAC C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A1790 80272EB0 24042032 */ addiu $a0, $zero, 0x2032
/* 1A1794 80272EB4 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A1798 80272EB8 8E46000C */ lw $a2, 0xC($s2)
/* 1A179C 80272EBC 8E470010 */ lw $a3, 0x10($s2)
/* 1A17A0 80272EC0 0C052757 */ jal sfx_play_sound_at_position
/* 1A17A4 80272EC4 0000282D */ daddu $a1, $zero, $zero
.L80272EC8:
/* 1A17A8 80272EC8 8E820190 */ lw $v0, 0x190($s4)
/* 1A17AC 80272ECC 3C030002 */ lui $v1, (0x20000 >> 16)
/* 1A17B0 80272ED0 00431024 */ and $v0, $v0, $v1
/* 1A17B4 80272ED4 10400018 */ beqz $v0, .L80272F38
/* 1A17B8 80272ED8 00000000 */ nop
/* 1A17BC 80272EDC 12E00016 */ beqz $s7, .L80272F38
/* 1A17C0 80272EE0 00000000 */ nop
/* 1A17C4 80272EE4 3C048029 */ lui $a0, %hi(EVS_PlayPoisonHitFX)
/* 1A17C8 80272EE8 24844634 */ addiu $a0, $a0, %lo(EVS_PlayPoisonHitFX)
/* 1A17CC 80272EEC 2405000A */ addiu $a1, $zero, 0xA
/* 1A17D0 80272EF0 0C0B0CF8 */ jal start_script
/* 1A17D4 80272EF4 0000302D */ daddu $a2, $zero, $zero
/* 1A17D8 80272EF8 C640000C */ lwc1 $f0, 0xC($s2)
/* 1A17DC 80272EFC 4600018D */ trunc.w.s $f6, $f0
/* 1A17E0 80272F00 E4460084 */ swc1 $f6, 0x84($v0)
/* 1A17E4 80272F04 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1A17E8 80272F08 4600018D */ trunc.w.s $f6, $f0
/* 1A17EC 80272F0C E4460088 */ swc1 $f6, 0x88($v0)
/* 1A17F0 80272F10 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A17F4 80272F14 4600018D */ trunc.w.s $f6, $f0
/* 1A17F8 80272F18 E446008C */ swc1 $f6, 0x8C($v0)
/* 1A17FC 80272F1C C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A1800 80272F20 24042032 */ addiu $a0, $zero, 0x2032
/* 1A1804 80272F24 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A1808 80272F28 8E46000C */ lw $a2, 0xC($s2)
/* 1A180C 80272F2C 8E470010 */ lw $a3, 0x10($s2)
/* 1A1810 80272F30 0C052757 */ jal sfx_play_sound_at_position
/* 1A1814 80272F34 0000282D */ daddu $a1, $zero, $zero
.L80272F38:
/* 1A1818 80272F38 8E820190 */ lw $v0, 0x190($s4)
/* 1A181C 80272F3C 3C030020 */ lui $v1, (0x200000 >> 16)
/* 1A1820 80272F40 00431024 */ and $v0, $v0, $v1
/* 1A1824 80272F44 10400018 */ beqz $v0, .L80272FA8
/* 1A1828 80272F48 00000000 */ nop
/* 1A182C 80272F4C 12E00016 */ beqz $s7, .L80272FA8
/* 1A1830 80272F50 00000000 */ nop
/* 1A1834 80272F54 3C048029 */ lui $a0, %hi(EVS_PlayStopHitFX)
/* 1A1838 80272F58 24844650 */ addiu $a0, $a0, %lo(EVS_PlayStopHitFX)
/* 1A183C 80272F5C 2405000A */ addiu $a1, $zero, 0xA
/* 1A1840 80272F60 0C0B0CF8 */ jal start_script
/* 1A1844 80272F64 0000302D */ daddu $a2, $zero, $zero
/* 1A1848 80272F68 C640000C */ lwc1 $f0, 0xC($s2)
/* 1A184C 80272F6C 4600018D */ trunc.w.s $f6, $f0
/* 1A1850 80272F70 E4460084 */ swc1 $f6, 0x84($v0)
/* 1A1854 80272F74 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1A1858 80272F78 4600018D */ trunc.w.s $f6, $f0
/* 1A185C 80272F7C E4460088 */ swc1 $f6, 0x88($v0)
/* 1A1860 80272F80 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A1864 80272F84 4600018D */ trunc.w.s $f6, $f0
/* 1A1868 80272F88 E446008C */ swc1 $f6, 0x8C($v0)
/* 1A186C 80272F8C C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A1870 80272F90 24042032 */ addiu $a0, $zero, 0x2032
/* 1A1874 80272F94 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A1878 80272F98 8E46000C */ lw $a2, 0xC($s2)
/* 1A187C 80272F9C 8E470010 */ lw $a3, 0x10($s2)
/* 1A1880 80272FA0 0C052757 */ jal sfx_play_sound_at_position
/* 1A1884 80272FA4 0000282D */ daddu $a1, $zero, $zero
.L80272FA8:
/* 1A1888 80272FA8 8E820190 */ lw $v0, 0x190($s4)
/* 1A188C 80272FAC 30424000 */ andi $v0, $v0, 0x4000
/* 1A1890 80272FB0 10400019 */ beqz $v0, .L80273018
/* 1A1894 80272FB4 00000000 */ nop
/* 1A1898 80272FB8 12E00017 */ beqz $s7, .L80273018
/* 1A189C 80272FBC 00000000 */ nop
/* 1A18A0 80272FC0 3C048029 */ lui $a0, %hi(EVS_PlayFreezeHitFX)
/* 1A18A4 80272FC4 2484466C */ addiu $a0, $a0, %lo(EVS_PlayFreezeHitFX)
/* 1A18A8 80272FC8 2405000A */ addiu $a1, $zero, 0xA
/* 1A18AC 80272FCC 0C0B0CF8 */ jal start_script
/* 1A18B0 80272FD0 0000302D */ daddu $a2, $zero, $zero
/* 1A18B4 80272FD4 C640000C */ lwc1 $f0, 0xC($s2)
/* 1A18B8 80272FD8 4600018D */ trunc.w.s $f6, $f0
/* 1A18BC 80272FDC E4460084 */ swc1 $f6, 0x84($v0)
/* 1A18C0 80272FE0 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1A18C4 80272FE4 4600018D */ trunc.w.s $f6, $f0
/* 1A18C8 80272FE8 E4460088 */ swc1 $f6, 0x88($v0)
/* 1A18CC 80272FEC C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A18D0 80272FF0 AC530090 */ sw $s3, 0x90($v0)
/* 1A18D4 80272FF4 4600018D */ trunc.w.s $f6, $f0
/* 1A18D8 80272FF8 E446008C */ swc1 $f6, 0x8C($v0)
/* 1A18DC 80272FFC C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A18E0 80273000 240400E3 */ addiu $a0, $zero, 0xE3
/* 1A18E4 80273004 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A18E8 80273008 8E46000C */ lw $a2, 0xC($s2)
/* 1A18EC 8027300C 8E470010 */ lw $a3, 0x10($s2)
/* 1A18F0 80273010 0C052757 */ jal sfx_play_sound_at_position
/* 1A18F4 80273014 0000282D */ daddu $a1, $zero, $zero
.L80273018:
/* 1A18F8 80273018 8E820190 */ lw $v0, 0x190($s4)
/* 1A18FC 8027301C 3C030008 */ lui $v1, (0x80000 >> 16)
/* 1A1900 80273020 00431024 */ and $v0, $v0, $v1
/* 1A1904 80273024 10400019 */ beqz $v0, .L8027308C
/* 1A1908 80273028 00000000 */ nop
/* 1A190C 8027302C 12E00017 */ beqz $s7, .L8027308C
/* 1A1910 80273030 00000000 */ nop
/* 1A1914 80273034 3C048029 */ lui $a0, %hi(EVS_PlayShrinkHitFX)
/* 1A1918 80273038 248446B8 */ addiu $a0, $a0, %lo(EVS_PlayShrinkHitFX)
/* 1A191C 8027303C 2405000A */ addiu $a1, $zero, 0xA
/* 1A1920 80273040 0C0B0CF8 */ jal start_script
/* 1A1924 80273044 0000302D */ daddu $a2, $zero, $zero
/* 1A1928 80273048 C640000C */ lwc1 $f0, 0xC($s2)
/* 1A192C 8027304C 4600018D */ trunc.w.s $f6, $f0
/* 1A1930 80273050 E4460084 */ swc1 $f6, 0x84($v0)
/* 1A1934 80273054 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1A1938 80273058 4600018D */ trunc.w.s $f6, $f0
/* 1A193C 8027305C E4460088 */ swc1 $f6, 0x88($v0)
/* 1A1940 80273060 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A1944 80273064 AC530090 */ sw $s3, 0x90($v0)
/* 1A1948 80273068 4600018D */ trunc.w.s $f6, $f0
/* 1A194C 8027306C E446008C */ swc1 $f6, 0x8C($v0)
/* 1A1950 80273070 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A1954 80273074 24042032 */ addiu $a0, $zero, 0x2032
/* 1A1958 80273078 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A195C 8027307C 8E46000C */ lw $a2, 0xC($s2)
/* 1A1960 80273080 8E470010 */ lw $a3, 0x10($s2)
/* 1A1964 80273084 0C052757 */ jal sfx_play_sound_at_position
/* 1A1968 80273088 0000282D */ daddu $a1, $zero, $zero
.L8027308C:
/* 1A196C 8027308C 8E820188 */ lw $v0, 0x188($s4)
/* 1A1970 80273090 30420040 */ andi $v0, $v0, 0x40
/* 1A1974 80273094 1040000A */ beqz $v0, .L802730C0
/* 1A1978 80273098 24020093 */ addiu $v0, $zero, 0x93
/* 1A197C 8027309C 92630136 */ lbu $v1, 0x136($s3)
/* 1A1980 802730A0 14620007 */ bne $v1, $v0, .L802730C0
/* 1A1984 802730A4 24040165 */ addiu $a0, $zero, 0x165
/* 1A1988 802730A8 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A198C 802730AC E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A1990 802730B0 8E46000C */ lw $a2, 0xC($s2)
/* 1A1994 802730B4 8E470010 */ lw $a3, 0x10($s2)
/* 1A1998 802730B8 0C052757 */ jal sfx_play_sound_at_position
/* 1A199C 802730BC 0000282D */ daddu $a1, $zero, $zero
.L802730C0:
/* 1A19A0 802730C0 0C099AB7 */ jal show_actor_health_bar
/* 1A19A4 802730C4 0260202D */ daddu $a0, $s3, $zero
/* 1A19A8 802730C8 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A19AC 802730CC 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A19B0 802730D0 30420240 */ andi $v0, $v0, 0x240
/* 1A19B4 802730D4 10400006 */ beqz $v0, .L802730F0
/* 1A19B8 802730D8 00000000 */ nop
/* 1A19BC 802730DC 52A00001 */ beql $s5, $zero, .L802730E4
/* 1A19C0 802730E0 24150001 */ addiu $s5, $zero, 0x1
.L802730E4:
/* 1A19C4 802730E4 24020002 */ addiu $v0, $zero, 0x2
/* 1A19C8 802730E8 52A20001 */ beql $s5, $v0, .L802730F0
/* 1A19CC 802730EC 24150003 */ addiu $s5, $zero, 0x3
.L802730F0:
/* 1A19D0 802730F0 0C03A752 */ jal is_ability_active
/* 1A19D4 802730F4 24040013 */ addiu $a0, $zero, 0x13
/* 1A19D8 802730F8 14400024 */ bnez $v0, .L8027318C
/* 1A19DC 802730FC 02A0102D */ daddu $v0, $s5, $zero
/* 1A19E0 80273100 8FA80018 */ lw $t0, 0x18($sp)
/* 1A19E4 80273104 81020212 */ lb $v0, 0x212($t0)
/* 1A19E8 80273108 2403000B */ addiu $v1, $zero, 0xB
/* 1A19EC 8027310C 1043001F */ beq $v0, $v1, .L8027318C
/* 1A19F0 80273110 02A0102D */ daddu $v0, $s5, $zero
/* 1A19F4 80273114 82620212 */ lb $v0, 0x212($s3)
/* 1A19F8 80273118 10430005 */ beq $v0, $v1, .L80273130
/* 1A19FC 8027311C 3C031000 */ lui $v1, (0x10000020 >> 16)
/* 1A1A00 80273120 8FC2007C */ lw $v0, 0x7C($fp)
/* 1A1A04 80273124 30420080 */ andi $v0, $v0, 0x80
/* 1A1A08 80273128 10400018 */ beqz $v0, .L8027318C
/* 1A1A0C 8027312C 02A0102D */ daddu $v0, $s5, $zero
.L80273130:
/* 1A1A10 80273130 8E820188 */ lw $v0, 0x188($s4)
/* 1A1A14 80273134 34630020 */ ori $v1, $v1, (0x10000020 & 0xFFFF)
/* 1A1A18 80273138 00431024 */ and $v0, $v0, $v1
/* 1A1A1C 8027313C 14400013 */ bnez $v0, .L8027318C
/* 1A1A20 80273140 02A0102D */ daddu $v0, $s5, $zero
/* 1A1A24 80273144 8E82018C */ lw $v0, 0x18C($s4)
/* 1A1A28 80273148 30420008 */ andi $v0, $v0, 0x8
/* 1A1A2C 8027314C 1440000F */ bnez $v0, .L8027318C
/* 1A1A30 80273150 02A0102D */ daddu $v0, $s5, $zero
.L80273154:
/* 1A1A34 80273154 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A1A38 80273158 2404037A */ addiu $a0, $zero, 0x37A
/* 1A1A3C 8027315C E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A1A40 80273160 8E46000C */ lw $a2, 0xC($s2)
/* 1A1A44 80273164 8E470010 */ lw $a3, 0x10($s2)
/* 1A1A48 80273168 0C052757 */ jal sfx_play_sound_at_position
/* 1A1A4C 8027316C 0000282D */ daddu $a1, $zero, $zero
/* 1A1A50 80273170 8FA40018 */ lw $a0, 0x18($sp)
/* 1A1A54 80273174 0C09451D */ jal apply_shock_effect
/* 1A1A58 80273178 00000000 */ nop
/* 1A1A5C 8027317C 24040001 */ addiu $a0, $zero, 0x1
/* 1A1A60 80273180 0C09CCEA */ jal dispatch_damage_event_player_1
/* 1A1A64 80273184 2405002F */ addiu $a1, $zero, 0x2F
/* 1A1A68 80273188 2402FFFF */ addiu $v0, $zero, -0x1
.L8027318C:
/* 1A1A6C 8027318C 8FBF005C */ lw $ra, 0x5C($sp)
/* 1A1A70 80273190 8FBE0058 */ lw $fp, 0x58($sp)
/* 1A1A74 80273194 8FB70054 */ lw $s7, 0x54($sp)
/* 1A1A78 80273198 8FB60050 */ lw $s6, 0x50($sp)
/* 1A1A7C 8027319C 8FB5004C */ lw $s5, 0x4C($sp)
/* 1A1A80 802731A0 8FB40048 */ lw $s4, 0x48($sp)
/* 1A1A84 802731A4 8FB30044 */ lw $s3, 0x44($sp)
/* 1A1A88 802731A8 8FB20040 */ lw $s2, 0x40($sp)
/* 1A1A8C 802731AC 8FB1003C */ lw $s1, 0x3C($sp)
/* 1A1A90 802731B0 8FB00038 */ lw $s0, 0x38($sp)
/* 1A1A94 802731B4 03E00008 */ jr $ra
/* 1A1A98 802731B8 27BD0060 */ addiu $sp, $sp, 0x60
### DECOMPILED C INSTRUCTIONS:
HitResult calc_player_damage_enemy(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor;
s32 currentTargetID = battleStatus->currentTargetID;
s32 currentTargetPartID = battleStatus->currentTargetPart;
ActorState* state;
Evt* evt;
Actor* target;
ActorPart* targetPart;
s32 hitResult;
s32 currentAttackDamage;
s32 targetDefense;
s32 dispatchEvent;
s32 partImmuneToElement;
s32 sp20;
s32 sp24;
s32 isFireDamage;
s32 isShockDamage;
s32 isWaterDamage;
s32 isIceDamage;
s32 tempBinary;
s32 wasStatusInflicted;
s32 attackFxType;
sp20 = FALSE;
isFireDamage = FALSE;
isWaterDamage = FALSE;
isShockDamage = FALSE;
isIceDamage = FALSE;
tempBinary = FALSE;
partImmuneToElement = FALSE;
wasStatusInflicted = FALSE;
sp24 = FALSE;
battleStatus->wasStatusInflicted = FALSE;
battleStatus->lastAttackDamage = 0;
battleStatus->attackerActorID = player->actorID;
battleStatus->currentTargetID2 = battleStatus->currentTargetID;
battleStatus->currentTargetPart2 = battleStatus->currentTargetPart;
target = get_actor(currentTargetID);
state = &player->state;
if (target == NULL) {
return HIT_RESULT_HIT;
}
targetPart = get_actor_part(target, currentTargetPartID);
ASSERT(targetPart != NULL);
target->lastDamageTaken = 0;
if (gBattleStatus.flags1 & BS_FLAGS1_FORCE_HIT_IMMUNE) {
hitResult = HIT_RESULT_NO_DAMAGE;
dispatchEvent = EVENT_ZERO_DAMAGE;
} else {
if (player_team_is_ability_active(player, ABILITY_ICE_POWER)) {
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)) {
battleStatus->currentAttackElement |= DAMAGE_TYPE_ICE;
}
}
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY
|| (target->transparentStatus == STATUS_KEY_TRANSPARENT
|| targetPart->eventFlags & ACTOR_EVENT_FLAG_800
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE))
) {
return HIT_RESULT_MISS;
}
if (target->stoneStatus == STATUS_KEY_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 1);
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
if (targetPart->elementalImmunities & battleStatus->currentAttackElement) {
partImmuneToElement = TRUE;
}
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP)
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP)
&& !player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD))
{
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
}
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH))) {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_CONTACT) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_BURN_CONTACT);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
return HIT_RESULT_BACKFIRE;
}
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_FIREY
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_BURN_CONTACT)
&& !(player_team_is_ability_active(player, ABILITY_FIRE_SHIELD))
&& !(player_team_is_ability_active(player, ABILITY_ICE_POWER))
) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_BURN_CONTACT);
dispatch_event_actor(target, EVENT_BURN_TAUNT);
return HIT_RESULT_BACKFIRE;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE
&& targetPart->eventFlags & (ACTOR_EVENT_FLAG_FIRE_EXPLODE | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH))
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_200000
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_FLAG_80)
&& !player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD)
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
fx_ring_blast(0, state->goalPos.x, state->goalPos.y, state->goalPos.z * 5.0f, 1.0f, 24);
isFireDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SHOCK) {
apply_shock_effect(target);
isShockDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_WATER) {
fx_water_splash(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
isWaterDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_ICE) {
fx_big_snowflakes(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f);
isIceDamage = TRUE;
}
attackFxType = player_team_is_ability_active(player, ABILITY_ATTACK_FX);
if (attackFxType) {
fx_breaking_junk(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 30);
switch (attackFxType) {
case 1:
sfx_play_sound_at_position(SOUND_372, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
case 2:
sfx_play_sound_at_position(SOUND_F1, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
case 3:
sfx_play_sound_at_position(SOUND_DC, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
case 4:
sfx_play_sound_at_position(SOUND_2072, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
case 5:
sfx_play_sound_at_position(SOUND_2073, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
case 6:
sfx_play_sound_at_position(SOUND_205B, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
}
}
if (!is_ability_active(ABILITY_ZAP_TAP)
&& player->staticStatus != STATUS_KEY_STATIC
&& (target->staticStatus == STATUS_KEY_STATIC || targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)
&& !(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SHOCK))
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
) {
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
sp20 = TRUE;
}
if (targetPart->eventFlags & (ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED | ACTOR_EVENT_FLAG_ENCHANTED)) {
battleStatus->currentAttackElement &= ~DAMAGE_TYPE_IGNORE_DEFENSE;
}
targetDefense = get_defense(target, targetPart->defenseTable, battleStatus->currentAttackElement);
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_IGNORE_DEFENSE)) {
targetDefense += target->defenseBoost;
}
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_2000) {
targetDefense += 127;
}
currentAttackDamage = battleStatus->currentAttackDamage;
currentAttackDamage += count_power_plus(battleStatus->currentAttackElement);
if (battleStatus->merleeAttackBoost > 0 && (gBattleStatus.flags1 & BS_FLAGS1_10 || battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP)) {
currentAttackDamage += battleStatus->merleeAttackBoost;
}
if (battleStatus->jumpCharge && battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP) {
currentAttackDamage += battleStatus->jumpCharge;
gBattleStatus.flags1 &= ~BS_FLAGS1_JUMP_CHARGED;
}
if (battleStatus->hammerCharge && battleStatus->currentAttackElement & (DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_THROW | DAMAGE_TYPE_SMASH)) {
currentAttackDamage += battleStatus->hammerCharge;
gBattleStatus.flags1 &= ~BS_FLAGS1_HAMMER_CHARGED;
}
if (battleStatus->unk_98 != 0) {
currentAttackDamage += 2;
}
if (player_team_is_ability_active(player, ABILITY_BERSERKER)) {
currentAttackDamage += 2;
}
if (player_team_is_ability_active(player, ABILITY_P_UP_D_DOWN)) {
currentAttackDamage++;
}
if (player_team_is_ability_active(player, ABILITY_P_DOWN_D_UP)) {
currentAttackDamage--;
}
if (battleStatus->turboChargeTurnsLeft != 0) {
currentAttackDamage++;
}
currentAttackDamage += player->attackBoost;
if (player_team_is_ability_active(player, ABILITY_HP_DRAIN)) {
battleStatus->hpDrainCount++;
currentAttackDamage--;
if (currentAttackDamage < 0) {
battleStatus->hpDrainCount += currentAttackDamage;
}
gBattleStatus.flags2 |= BS_FLAGS2_HAS_DRAINED_HP;
if (battleStatus->hpDrainCount > 5) {
battleStatus->hpDrainCount = 5;
}
}
if (player_team_is_ability_active(player, ABILITY_MEGA_HP_DRAIN)) {
battleStatus->hpDrainCount += 2;
currentAttackDamage -= 2;
if (currentAttackDamage < 0) {
battleStatus->hpDrainCount += currentAttackDamage;
}
gBattleStatus.flags2 |= BS_FLAGS2_HAS_DRAINED_HP;
if (battleStatus->hpDrainCount > 5) {
battleStatus->hpDrainCount = 5;
}
}
if (gBattleStatus.flags2 & BS_FLAGS2_HAS_RUSH && (gBattleStatus.flags1 & BS_FLAGS1_10 ||
battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP)) {
if (battleStatus->rushFlags & RUSH_FLAG_POWER) {
currentAttackDamage += 2;
}
if (battleStatus->rushFlags & RUSH_FLAG_MEGA) {
currentAttackDamage += 4;
}
fx_radial_shimmer(9, state->goalPos.x, state->goalPos.y, state->goalPos.z, 0.5f, 20);
}
if (!(gBattleStatus.flags2 & BS_FLAGS2_1000000) && player_team_is_ability_active(player, ABILITY_ALL_OR_NOTHING)) {
currentAttackDamage++;
if (!(gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40))) {
sp24 = TRUE;
currentAttackDamage = 0;
targetDefense = 0;
gBattleStatus.flags1 &= ~BS_FLAGS1_40;
gBattleStatus.flags1 &= ~BS_FLAGS1_200;
gBattleStatus.flags1 &= ~BS_FLAGS1_10;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
}
}
if (player->debuff == STATUS_KEY_SHRINK) {
if (currentAttackDamage > 0) {
currentAttackDamage /= 2;
if (currentAttackDamage == 0) {
currentAttackDamage = 1;
}
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->currentAttackElement & DAMAGE_TYPE_BLAST
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION
) {
targetDefense = 0;
currentAttackDamage = target->currentHP;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS) {
targetDefense = 0;
currentAttackDamage = 0;
}
if (currentAttackDamage > 99) {
currentAttackDamage = 99;
}
if (currentAttackDamage < 0) {
targetDefense = 0;
}
target->hpChangeCounter = 0;
currentAttackDamage -= targetDefense;
if (currentAttackDamage < 0) {
currentAttackDamage = 0;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_POWER_BOUNCE && currentAttackDamage > 0) {
currentAttackDamage += battleStatus->powerBounceCounter;
if (currentAttackDamage < 1) {
currentAttackDamage = 1;
}
}
battleStatus->lastAttackDamage = 0;
if (currentAttackDamage < 1) {
target->hpChangeCounter = 0;
hitResult = HIT_RESULT_NO_DAMAGE;
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
dispatchEvent = EVENT_ZERO_DAMAGE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
if (target->currentHP < 1) {
dispatchEvent = EVENT_DEATH;
} else {
dispatchEvent = EVENT_ZERO_DAMAGE;
}
}
battleStatus->lastAttackDamage = 0;
} else {
target->damageCounter += currentAttackDamage;
dispatchEvent = EVENT_HIT_COMBO;
hitResult = HIT_RESULT_HIT;
target->hpChangeCounter -= currentAttackDamage;
if (!(targetPart->flags & ACTOR_PART_FLAG_2000)
&& !(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE)
&& !partImmuneToElement
&& !(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)
) {
target->currentHP -= currentAttackDamage;
if (target->currentHP < 1) {
target->currentHP = 0;
dispatchEvent = EVENT_DEATH;
}
}
battleStatus->lastAttackDamage += currentAttackDamage;
target->lastDamageTaken = battleStatus->lastAttackDamage;
target->hpChangeCounter = 0;
}
if (targetPart->flags & ACTOR_PART_FLAG_2000) {
if (!is_ability_active(ABILITY_ZAP_TAP)
&& player->staticStatus != STATUS_KEY_STATIC
&& (target->staticStatus == STATUS_KEY_STATIC || (targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED))
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_SHOCK)
) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(player);
dispatch_damage_event_player_1(1, EVENT_SHOCK_HIT);
return HIT_RESULT_BACKFIRE;
} else {
dispatchEvent = (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) ? EVENT_ZERO_DAMAGE : EVENT_IMMUNE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, dispatchEvent);
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FEAR
&& rand_int(99) < (target->actorBlueprint->escapeChance * battleStatus->statusChance) / 100
&& (target->debuff != STATUS_KEY_FEAR
&& target->debuff != STATUS_KEY_DIZZY
&& target->debuff != STATUS_KEY_PARALYZE
&& target->debuff != STATUS_KEY_SLEEP
&& target->debuff != STATUS_KEY_FROZEN
&& target->debuff != STATUS_KEY_STOP)
&& !(target->flags & ACTOR_FLAG_FLIPPED)
) {
dispatch_event_actor(target, EVENT_SCARE_AWAY);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_IMMUNE;
}
if (target->currentHP < 1) {
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_DEATH;
}
}
} else if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_HIT_COMBO;
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) {
clear_part_pal_adjustment(targetPart);
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SPIN_SMASH) {
PlayerData* playerData = &gPlayerData;
if (target->actorBlueprint->spinSmashReq != 255
&& playerData->hammerLevel + 1 >= target->actorBlueprint->spinSmashReq
&& battleStatus->lastAttackDamage > 0
&& gBattleStatus.flags1 & BS_FLAGS1_40
) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_SPIN_SMASH_HIT;
}
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_SPIN_SMASH_HIT;
}
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_SPIN_SMASH_HIT;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_SPIN_SMASH_HIT;
}
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_SPIN_SMASH_DEATH;
}
}
}
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_POWER_BOUNCE
) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_POWER_BOUNCE_DEATH;
}
}
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& (battleStatus->currentAttackElement & (DAMAGE_TYPE_POW | DAMAGE_TYPE_JUMP))
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_GROUNDABLE
) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
tempBinary = TRUE;
}
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& (battleStatus->currentAttackElement & (DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_POW | DAMAGE_TYPE_JUMP))
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE
) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (!(target->flags & ACTOR_FLAG_FLIPPED)) {
tempBinary = TRUE;
}
}
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& battleStatus->currentAttackElement & (DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_POW | DAMAGE_TYPE_JUMP)
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE
) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (!(target->flags & ACTOR_FLAG_FLIPPED)) {
tempBinary = TRUE;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->currentAttackElement & DAMAGE_TYPE_SHELL_CRACK
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE
) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_SHELL_CRACK_HIT;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_SHELL_CRACK_HIT;
}
tempBinary = TRUE;
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& (battleStatus->currentAttackElement & (DAMAGE_TYPE_BLAST | DAMAGE_TYPE_FIRE))
) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_BURN_HIT;
}
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_BURN_DEATH;
}
isFireDamage = TRUE;
}
do { // TODO remove this do while
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->lastAttackDamage >= 0
&& dispatchEvent != EVENT_DEATH
&& dispatchEvent != EVENT_SPIN_SMASH_DEATH
&& dispatchEvent != EVENT_EXPLODE_TRIGGER
&& !(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)
) {
#define INFLICT_STATUS(STATUS_TYPE) \
if ((battleStatus->currentAttackStatus & STATUS_FLAG_##STATUS_TYPE) && \
try_inflict_status(target, STATUS_KEY_##STATUS_TYPE, STATUS_TURN_MOD_##STATUS_TYPE)) { \
tempBinary = TRUE; \
wasStatusInflicted = TRUE; \
} \
INFLICT_STATUS(SHRINK);
INFLICT_STATUS(POISON);
INFLICT_STATUS(STONE);
INFLICT_STATUS(SLEEP);
INFLICT_STATUS(STOP);
INFLICT_STATUS(STATIC);
INFLICT_STATUS(FEAR);
INFLICT_STATUS(PARALYZE);
INFLICT_STATUS(DIZZY);
#undef INFLICT_STATUS
if (wasStatusInflicted) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_HIT_COMBO;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_HIT;
}
}
}
} while (0);
battleStatus->wasStatusInflicted = wasStatusInflicted;
dispatch_event_actor(target, dispatchEvent);
if (!(target->flags & ACTOR_FLAG_NO_DMG_POPUP)) {
if (battleStatus->lastAttackDamage == 0) {
if (!tempBinary) {
if (!wasStatusInflicted) {
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
}
}
} else if (!partImmuneToElement) {
if (battleStatus->currentAttackElement & (DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_SMASH)) {
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
} else {
show_primary_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
}
if (!(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)) {
show_damage_fx(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
}
}
}
if (tempBinary && gBattleStatus.flags1 & BS_FLAGS1_40 || gBattleStatus.flags1 & BS_FLAGS1_40) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_80)) {
if (player->actorTypeData1[5]) {
sfx_play_sound_at_position(player->actorTypeData1[5], SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->lastAttackDamage > 0) {
sfx_play_sound(SOUND_231);
}
if (battleStatus->lastAttackDamage > 0 || battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS && tempBinary) {
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_MULTI_BOUNCE)) {
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
show_action_rating(ACTION_RATING_NICE_SUPER_COMBO, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
}
}
if (sp24) {
show_action_rating(ACTION_RATING_MISS, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
func_80266970(target);
}
if ((battleStatus->lastAttackDamage > 0 || tempBinary) && !partImmuneToElement) {
func_80267018(target, 1);
if (isFireDamage) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isShockDamage) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isIceDamage) {
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
if (battleStatus->lastAttackDamage < 1 && !tempBinary && !sp20 || targetPart->flags & ACTOR_PART_FLAG_2000) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP && wasStatusInflicted) {
evt = start_script(&EVS_PlaySleepHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY && wasStatusInflicted) {
evt = start_script(&EVS_PlayDizzyHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE && wasStatusInflicted) {
evt = start_script(&EVS_PlayParalyzeHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_POISON && wasStatusInflicted) {
evt = start_script(&EVS_PlayPoisonHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_STOP && wasStatusInflicted) {
evt = start_script(&EVS_PlayStopHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_FROZEN && wasStatusInflicted) {
evt = start_script(&EVS_PlayFreezeHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
evt->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_HIT_PLAYER_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK && wasStatusInflicted) {
evt = start_script(&EVS_PlayShrinkHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
evt->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SMASH && target->actorType == ACTOR_TYPE_GOOMNUT_TREE) {
sfx_play_sound_at_position(SOUND_SMASH_GOOMNUT_TREE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
show_actor_health_bar(target);
if (gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)) {
if (hitResult == HIT_RESULT_HIT) {
hitResult = HIT_RESULT_1;
}
if (hitResult == HIT_RESULT_NO_DAMAGE) {
hitResult = HIT_RESULT_3;
}
}
if (!is_ability_active(ABILITY_ZAP_TAP)
&& (player->staticStatus != STATUS_KEY_STATIC)
&& (target->staticStatus == STATUS_KEY_STATIC || targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)
&& !(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SHOCK))
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(player);
dispatch_damage_event_player_1(1, EVENT_SHOCK_HIT);
return HIT_RESULT_BACKFIRE;
}
return hitResult;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel calc_partner_damage_enemy
/* 1ACC08 8027E328 27BDFFA8 */ addiu $sp, $sp, -0x58
/* 1ACC0C 8027E32C AFB40040 */ sw $s4, 0x40($sp)
/* 1ACC10 8027E330 3C14800E */ lui $s4, %hi(gBattleStatus)
/* 1ACC14 8027E334 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
/* 1ACC18 8027E338 AFBF0054 */ sw $ra, 0x54($sp)
/* 1ACC1C 8027E33C AFBE0050 */ sw $fp, 0x50($sp)
/* 1ACC20 8027E340 AFB7004C */ sw $s7, 0x4C($sp)
/* 1ACC24 8027E344 AFB60048 */ sw $s6, 0x48($sp)
/* 1ACC28 8027E348 AFB50044 */ sw $s5, 0x44($sp)
/* 1ACC2C 8027E34C AFB3003C */ sw $s3, 0x3C($sp)
/* 1ACC30 8027E350 AFB20038 */ sw $s2, 0x38($sp)
/* 1ACC34 8027E354 AFB10034 */ sw $s1, 0x34($sp)
/* 1ACC38 8027E358 AFB00030 */ sw $s0, 0x30($sp)
/* 1ACC3C 8027E35C AFA00020 */ sw $zero, 0x20($sp)
/* 1ACC40 8027E360 AFA00024 */ sw $zero, 0x24($sp)
/* 1ACC44 8027E364 AFA00028 */ sw $zero, 0x28($sp)
/* 1ACC48 8027E368 AFA0002C */ sw $zero, 0x2C($sp)
/* 1ACC4C 8027E36C 8E8800DC */ lw $t0, 0xDC($s4)
/* 1ACC50 8027E370 0000F02D */ daddu $fp, $zero, $zero
/* 1ACC54 8027E374 A2800199 */ sb $zero, 0x199($s4)
/* 1ACC58 8027E378 A6800180 */ sh $zero, 0x180($s4)
/* 1ACC5C 8027E37C AFA80018 */ sw $t0, 0x18($sp)
/* 1ACC60 8027E380 968301A0 */ lhu $v1, 0x1A0($s4)
/* 1ACC64 8027E384 868401A0 */ lh $a0, 0x1A0($s4)
/* 1ACC68 8027E388 928201A2 */ lbu $v0, 0x1A2($s4)
/* 1ACC6C 8027E38C 95050192 */ lhu $a1, 0x192($t0)
/* 1ACC70 8027E390 829001A2 */ lb $s0, 0x1A2($s4)
/* 1ACC74 8027E394 03C0A82D */ daddu $s5, $fp, $zero
/* 1ACC78 8027E398 A68301A4 */ sh $v1, 0x1A4($s4)
/* 1ACC7C 8027E39C A28201A6 */ sb $v0, 0x1A6($s4)
/* 1ACC80 8027E3A0 0C09A75B */ jal get_actor
/* 1ACC84 8027E3A4 A68501A8 */ sh $a1, 0x1A8($s4)
/* 1ACC88 8027E3A8 8FA80018 */ lw $t0, 0x18($sp)
/* 1ACC8C 8027E3AC 0040982D */ daddu $s3, $v0, $zero
/* 1ACC90 8027E3B0 16600003 */ bnez $s3, .L8027E3C0
/* 1ACC94 8027E3B4 2512000C */ addiu $s2, $t0, 0xC
.L8027E3B8:
/* 1ACC98 8027E3B8 0809FE67 */ j .L8027F99C
/* 1ACC9C 8027E3BC 0000102D */ daddu $v0, $zero, $zero
.L8027E3C0:
/* 1ACCA0 8027E3C0 0260202D */ daddu $a0, $s3, $zero
/* 1ACCA4 8027E3C4 0C099117 */ jal get_actor_part
/* 1ACCA8 8027E3C8 0200282D */ daddu $a1, $s0, $zero
/* 1ACCAC 8027E3CC 0040B02D */ daddu $s6, $v0, $zero
/* 1ACCB0 8027E3D0 56C00003 */ bnel $s6, $zero, .L8027E3E0
/* 1ACCB4 8027E3D4 A66001F8 */ sh $zero, 0x1F8($s3)
.L8027E3D8:
/* 1ACCB8 8027E3D8 0809F8F6 */ j .L8027E3D8
/* 1ACCBC 8027E3DC 00000000 */ nop
.L8027E3E0:
/* 1ACCC0 8027E3E0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1ACCC4 8027E3E4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1ACCC8 8027E3E8 30420800 */ andi $v0, $v0, 0x800
/* 1ACCCC 8027E3EC 1040000C */ beqz $v0, .L8027E420
/* 1ACCD0 8027E3F0 24080002 */ addiu $t0, $zero, 0x2
/* 1ACCD4 8027E3F4 24110017 */ addiu $s1, $zero, 0x17
/* 1ACCD8 8027E3F8 AFA8001C */ sw $t0, 0x1C($sp)
/* 1ACCDC 8027E3FC C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ACCE0 8027E400 2404010C */ addiu $a0, $zero, 0x10C
/* 1ACCE4 8027E404 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ACCE8 8027E408 8E46000C */ lw $a2, 0xC($s2)
/* 1ACCEC 8027E40C 8E470010 */ lw $a3, 0x10($s2)
/* 1ACCF0 8027E410 0C052757 */ jal sfx_play_sound_at_position
/* 1ACCF4 8027E414 0000282D */ daddu $a1, $zero, $zero
/* 1ACCF8 8027E418 0809FB1B */ j .L8027EC6C
/* 1ACCFC 8027E41C 00000000 */ nop
.L8027E420:
/* 1ACD00 8027E420 8EC4007C */ lw $a0, 0x7C($s6)
/* 1ACD04 8027E424 30820020 */ andi $v0, $a0, 0x20
/* 1ACD08 8027E428 1440055C */ bnez $v0, .L8027F99C
/* 1ACD0C 8027E42C 24020006 */ addiu $v0, $zero, 0x6
/* 1ACD10 8027E430 82630218 */ lb $v1, 0x218($s3)
/* 1ACD14 8027E434 2402000E */ addiu $v0, $zero, 0xE
/* 1ACD18 8027E438 10620007 */ beq $v1, $v0, .L8027E458
/* 1ACD1C 8027E43C 30820800 */ andi $v0, $a0, 0x800
/* 1ACD20 8027E440 10400007 */ beqz $v0, .L8027E460
/* 1ACD24 8027E444 00000000 */ nop
/* 1ACD28 8027E448 8E820188 */ lw $v0, 0x188($s4)
/* 1ACD2C 8027E44C 30420800 */ andi $v0, $v0, 0x800
/* 1ACD30 8027E450 14400003 */ bnez $v0, .L8027E460
/* 1ACD34 8027E454 00000000 */ nop
.L8027E458:
/* 1ACD38 8027E458 0809FE67 */ j .L8027F99C
/* 1ACD3C 8027E45C 24020006 */ addiu $v0, $zero, 0x6
.L8027E460:
/* 1ACD40 8027E460 82630214 */ lb $v1, 0x214($s3)
/* 1ACD44 8027E464 2402000C */ addiu $v0, $zero, 0xC
/* 1ACD48 8027E468 14620019 */ bne $v1, $v0, .L8027E4D0
/* 1ACD4C 8027E46C 2404010C */ addiu $a0, $zero, 0x10C
/* 1ACD50 8027E470 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ACD54 8027E474 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ACD58 8027E478 8E46000C */ lw $a2, 0xC($s2)
/* 1ACD5C 8027E47C 8E470010 */ lw $a3, 0x10($s2)
/* 1ACD60 8027E480 0C052757 */ jal sfx_play_sound_at_position
/* 1ACD64 8027E484 0000282D */ daddu $a1, $zero, $zero
/* 1ACD68 8027E488 24020001 */ addiu $v0, $zero, 0x1
/* 1ACD6C 8027E48C AFA20010 */ sw $v0, 0x10($sp)
/* 1ACD70 8027E490 AFA20014 */ sw $v0, 0x14($sp)
/* 1ACD74 8027E494 C64C000C */ lwc1 $f12, 0xC($s2)
/* 1ACD78 8027E498 C64E0010 */ lwc1 $f14, 0x10($s2)
/* 1ACD7C 8027E49C 8E460014 */ lw $a2, 0x14($s2)
/* 1ACD80 8027E4A0 0C093BF8 */ jal func_8024EFE0
/* 1ACD84 8027E4A4 0000382D */ daddu $a3, $zero, $zero
/* 1ACD88 8027E4A8 AFA00010 */ sw $zero, 0x10($sp)
/* 1ACD8C 8027E4AC C64C000C */ lwc1 $f12, 0xC($s2)
/* 1ACD90 8027E4B0 C64E0010 */ lwc1 $f14, 0x10($s2)
/* 1ACD94 8027E4B4 8E460014 */ lw $a2, 0x14($s2)
/* 1ACD98 8027E4B8 0C09996B */ jal show_next_damage_popup
/* 1ACD9C 8027E4BC 0000382D */ daddu $a3, $zero, $zero
/* 1ACDA0 8027E4C0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1ACDA4 8027E4C4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1ACDA8 8027E4C8 0809FB19 */ j .L8027EC64
/* 1ACDAC 8027E4CC 30420240 */ andi $v0, $v0, 0x240
.L8027E4D0:
/* 1ACDB0 8027E4D0 8EC20080 */ lw $v0, 0x80($s6)
/* 1ACDB4 8027E4D4 8E830188 */ lw $v1, 0x188($s4)
/* 1ACDB8 8027E4D8 00431024 */ and $v0, $v0, $v1
/* 1ACDBC 8027E4DC 10400003 */ beqz $v0, .L8027E4EC
/* 1ACDC0 8027E4E0 30620080 */ andi $v0, $v1, 0x80
/* 1ACDC4 8027E4E4 24080001 */ addiu $t0, $zero, 0x1
/* 1ACDC8 8027E4E8 AFA80020 */ sw $t0, 0x20($sp)
.L8027E4EC:
/* 1ACDCC 8027E4EC 10400005 */ beqz $v0, .L8027E504
/* 1ACDD0 8027E4F0 00000000 */ nop
/* 1ACDD4 8027E4F4 8EC2007C */ lw $v0, 0x7C($s6)
/* 1ACDD8 8027E4F8 30420010 */ andi $v0, $v0, 0x10
/* 1ACDDC 8027E4FC 14400084 */ bnez $v0, .L8027E710
/* 1ACDE0 8027E500 00000000 */ nop
.L8027E504:
/* 1ACDE4 8027E504 8E820188 */ lw $v0, 0x188($s4)
/* 1ACDE8 8027E508 3C031000 */ lui $v1, (0x10000040 >> 16)
/* 1ACDEC 8027E50C 00431024 */ and $v0, $v0, $v1
/* 1ACDF0 8027E510 1440001E */ bnez $v0, .L8027E58C
/* 1ACDF4 8027E514 00000000 */ nop
/* 1ACDF8 8027E518 8EC2007C */ lw $v0, 0x7C($s6)
/* 1ACDFC 8027E51C 30428000 */ andi $v0, $v0, 0x8000
/* 1ACE00 8027E520 1040001A */ beqz $v0, .L8027E58C
/* 1ACE04 8027E524 0260202D */ daddu $a0, $s3, $zero
/* 1ACE08 8027E528 0C09DC58 */ jal dispatch_event_actor
/* 1ACE0C 8027E52C 24050022 */ addiu $a1, $zero, 0x22
/* 1ACE10 8027E530 8E82018C */ lw $v0, 0x18C($s4)
/* 1ACE14 8027E534 30420002 */ andi $v0, $v0, 0x2
/* 1ACE18 8027E538 1440000A */ bnez $v0, .L8027E564
/* 1ACE1C 8027E53C 240400EA */ addiu $a0, $zero, 0xEA
/* 1ACE20 8027E540 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ACE24 8027E544 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ACE28 8027E548 8E46000C */ lw $a2, 0xC($s2)
/* 1ACE2C 8027E54C 8E470010 */ lw $a3, 0x10($s2)
/* 1ACE30 8027E550 0C052757 */ jal sfx_play_sound_at_position
/* 1ACE34 8027E554 0000282D */ daddu $a1, $zero, $zero
/* 1ACE38 8027E558 24040001 */ addiu $a0, $zero, 0x1
/* 1ACE3C 8027E55C 0809FE62 */ j .L8027F988
/* 1ACE40 8027E560 2405002C */ addiu $a1, $zero, 0x2C
.L8027E564:
/* 1ACE44 8027E564 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ACE48 8027E568 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ACE4C 8027E56C 8E46000C */ lw $a2, 0xC($s2)
/* 1ACE50 8027E570 8E470010 */ lw $a3, 0x10($s2)
/* 1ACE54 8027E574 0C052757 */ jal sfx_play_sound_at_position
/* 1ACE58 8027E578 0000282D */ daddu $a1, $zero, $zero
/* 1ACE5C 8027E57C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1ACE60 8027E580 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1ACE64 8027E584 0809FB19 */ j .L8027EC64
/* 1ACE68 8027E588 30420240 */ andi $v0, $v0, 0x240
.L8027E58C:
/* 1ACE6C 8027E58C 8E820188 */ lw $v0, 0x188($s4)
/* 1ACE70 8027E590 34630040 */ ori $v1, $v1, (0x10000040 & 0xFFFF)
/* 1ACE74 8027E594 00431024 */ and $v0, $v0, $v1
/* 1ACE78 8027E598 14400015 */ bnez $v0, .L8027E5F0
/* 1ACE7C 8027E59C 3C031000 */ lui $v1, (0x10000080 >> 16)
/* 1ACE80 8027E5A0 8EC2007C */ lw $v0, 0x7C($s6)
/* 1ACE84 8027E5A4 30420002 */ andi $v0, $v0, 0x2
/* 1ACE88 8027E5A8 10400011 */ beqz $v0, .L8027E5F0
/* 1ACE8C 8027E5AC 00000000 */ nop
/* 1ACE90 8027E5B0 8E82018C */ lw $v0, 0x18C($s4)
/* 1ACE94 8027E5B4 30420010 */ andi $v0, $v0, 0x10
/* 1ACE98 8027E5B8 1440000D */ bnez $v0, .L8027E5F0
/* 1ACE9C 8027E5BC 240400EA */ addiu $a0, $zero, 0xEA
/* 1ACEA0 8027E5C0 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ACEA4 8027E5C4 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ACEA8 8027E5C8 8E46000C */ lw $a2, 0xC($s2)
/* 1ACEAC 8027E5CC 8E470010 */ lw $a3, 0x10($s2)
/* 1ACEB0 8027E5D0 0C052757 */ jal sfx_play_sound_at_position
/* 1ACEB4 8027E5D4 0000282D */ daddu $a1, $zero, $zero
/* 1ACEB8 8027E5D8 24040001 */ addiu $a0, $zero, 0x1
/* 1ACEBC 8027E5DC 0C09FEE7 */ jal dispatch_damage_event_partner_1
/* 1ACEC0 8027E5E0 2405002C */ addiu $a1, $zero, 0x2C
/* 1ACEC4 8027E5E4 0260202D */ daddu $a0, $s3, $zero
/* 1ACEC8 8027E5E8 0809F9D0 */ j .L8027E740
/* 1ACECC 8027E5EC 2405001C */ addiu $a1, $zero, 0x1C
.L8027E5F0:
/* 1ACED0 8027E5F0 8E820188 */ lw $v0, 0x188($s4)
/* 1ACED4 8027E5F4 34630080 */ ori $v1, $v1, (0x10000080 & 0xFFFF)
/* 1ACED8 8027E5F8 00431024 */ and $v0, $v0, $v1
/* 1ACEDC 8027E5FC 14400009 */ bnez $v0, .L8027E624
/* 1ACEE0 8027E600 3C030001 */ lui $v1, (0x10000 >> 16)
/* 1ACEE4 8027E604 8EC2007C */ lw $v0, 0x7C($s6)
/* 1ACEE8 8027E608 00431024 */ and $v0, $v0, $v1
/* 1ACEEC 8027E60C 10400005 */ beqz $v0, .L8027E624
/* 1ACEF0 8027E610 00000000 */ nop
/* 1ACEF4 8027E614 8E82018C */ lw $v0, 0x18C($s4)
/* 1ACEF8 8027E618 30420004 */ andi $v0, $v0, 0x4
/* 1ACEFC 8027E61C 1040003C */ beqz $v0, .L8027E710
/* 1ACF00 8027E620 00000000 */ nop
.L8027E624:
/* 1ACF04 8027E624 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 1ACF08 8027E628 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 1ACF0C 8027E62C 8E020000 */ lw $v0, 0x0($s0)
/* 1ACF10 8027E630 30420020 */ andi $v0, $v0, 0x20
/* 1ACF14 8027E634 10400014 */ beqz $v0, .L8027E688
/* 1ACF18 8027E638 00000000 */ nop
/* 1ACF1C 8027E63C 8E820188 */ lw $v0, 0x188($s4)
/* 1ACF20 8027E640 30420002 */ andi $v0, $v0, 0x2
/* 1ACF24 8027E644 10400010 */ beqz $v0, .L8027E688
/* 1ACF28 8027E648 00000000 */ nop
/* 1ACF2C 8027E64C 8EC2007C */ lw $v0, 0x7C($s6)
/* 1ACF30 8027E650 30420600 */ andi $v0, $v0, 0x600
/* 1ACF34 8027E654 1040000C */ beqz $v0, .L8027E688
/* 1ACF38 8027E658 240400EA */ addiu $a0, $zero, 0xEA
/* 1ACF3C 8027E65C C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ACF40 8027E660 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ACF44 8027E664 8E46000C */ lw $a2, 0xC($s2)
/* 1ACF48 8027E668 8E470010 */ lw $a3, 0x10($s2)
/* 1ACF4C 8027E66C 0C052757 */ jal sfx_play_sound_at_position
/* 1ACF50 8027E670 0000282D */ daddu $a1, $zero, $zero
/* 1ACF54 8027E674 0260202D */ daddu $a0, $s3, $zero
/* 1ACF58 8027E678 0C09DC58 */ jal dispatch_event_actor
/* 1ACF5C 8027E67C 24050022 */ addiu $a1, $zero, 0x22
/* 1ACF60 8027E680 0809FB17 */ j .L8027EC5C
/* 1ACF64 8027E684 00000000 */ nop
.L8027E688:
/* 1ACF68 8027E688 8E820188 */ lw $v0, 0x188($s4)
/* 1ACF6C 8027E68C 3C031000 */ lui $v1, (0x10000000 >> 16)
/* 1ACF70 8027E690 00431024 */ and $v0, $v0, $v1
/* 1ACF74 8027E694 1440002E */ bnez $v0, .L8027E750
/* 1ACF78 8027E698 3C030020 */ lui $v1, (0x200000 >> 16)
/* 1ACF7C 8027E69C 8EC2007C */ lw $v0, 0x7C($s6)
/* 1ACF80 8027E6A0 00431024 */ and $v0, $v0, $v1
/* 1ACF84 8027E6A4 10400009 */ beqz $v0, .L8027E6CC
/* 1ACF88 8027E6A8 00000000 */ nop
/* 1ACF8C 8027E6AC 8E620000 */ lw $v0, 0x0($s3)
/* 1ACF90 8027E6B0 30420800 */ andi $v0, $v0, 0x800
/* 1ACF94 8027E6B4 14400005 */ bnez $v0, .L8027E6CC
/* 1ACF98 8027E6B8 00000000 */ nop
/* 1ACF9C 8027E6BC 8E82018C */ lw $v0, 0x18C($s4)
/* 1ACFA0 8027E6C0 30420080 */ andi $v0, $v0, 0x80
/* 1ACFA4 8027E6C4 10400012 */ beqz $v0, .L8027E710
/* 1ACFA8 8027E6C8 00000000 */ nop
.L8027E6CC:
/* 1ACFAC 8027E6CC 8E820188 */ lw $v0, 0x188($s4)
/* 1ACFB0 8027E6D0 3C031000 */ lui $v1, (0x10000000 >> 16)
/* 1ACFB4 8027E6D4 00431024 */ and $v0, $v0, $v1
/* 1ACFB8 8027E6D8 1440001D */ bnez $v0, .L8027E750
/* 1ACFBC 8027E6DC 00000000 */ nop
/* 1ACFC0 8027E6E0 8EC2007C */ lw $v0, 0x7C($s6)
/* 1ACFC4 8027E6E4 30420010 */ andi $v0, $v0, 0x10
/* 1ACFC8 8027E6E8 10400019 */ beqz $v0, .L8027E750
/* 1ACFCC 8027E6EC 00000000 */ nop
/* 1ACFD0 8027E6F0 8E620000 */ lw $v0, 0x0($s3)
/* 1ACFD4 8027E6F4 30420800 */ andi $v0, $v0, 0x800
/* 1ACFD8 8027E6F8 14400015 */ bnez $v0, .L8027E750
/* 1ACFDC 8027E6FC 00000000 */ nop
/* 1ACFE0 8027E700 8E82018C */ lw $v0, 0x18C($s4)
/* 1ACFE4 8027E704 30420001 */ andi $v0, $v0, 0x1
/* 1ACFE8 8027E708 14400011 */ bnez $v0, .L8027E750
/* 1ACFEC 8027E70C 00000000 */ nop
.L8027E710:
/* 1ACFF0 8027E710 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ACFF4 8027E714 24040108 */ addiu $a0, $zero, 0x108
/* 1ACFF8 8027E718 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ACFFC 8027E71C 8E46000C */ lw $a2, 0xC($s2)
/* 1AD000 8027E720 8E470010 */ lw $a3, 0x10($s2)
/* 1AD004 8027E724 0C052757 */ jal sfx_play_sound_at_position
/* 1AD008 8027E728 0000282D */ daddu $a1, $zero, $zero
/* 1AD00C 8027E72C 24040001 */ addiu $a0, $zero, 0x1
/* 1AD010 8027E730 0C09FEE7 */ jal dispatch_damage_event_partner_1
/* 1AD014 8027E734 2405002A */ addiu $a1, $zero, 0x2A
/* 1AD018 8027E738 0260202D */ daddu $a0, $s3, $zero
/* 1AD01C 8027E73C 2405001B */ addiu $a1, $zero, 0x1B
.L8027E740:
/* 1AD020 8027E740 0C09DC58 */ jal dispatch_event_actor
/* 1AD024 8027E744 00000000 */ nop
/* 1AD028 8027E748 0809FE67 */ j .L8027F99C
/* 1AD02C 8027E74C 2402FFFF */ addiu $v0, $zero, -0x1
.L8027E750:
/* 1AD030 8027E750 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 1AD034 8027E754 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 1AD038 8027E758 8E020000 */ lw $v0, 0x0($s0)
/* 1AD03C 8027E75C 30420020 */ andi $v0, $v0, 0x20
/* 1AD040 8027E760 10400014 */ beqz $v0, .L8027E7B4
/* 1AD044 8027E764 00000000 */ nop
/* 1AD048 8027E768 8E820188 */ lw $v0, 0x188($s4)
/* 1AD04C 8027E76C 30420002 */ andi $v0, $v0, 0x2
/* 1AD050 8027E770 10400010 */ beqz $v0, .L8027E7B4
/* 1AD054 8027E774 00000000 */ nop
/* 1AD058 8027E778 8EC2007C */ lw $v0, 0x7C($s6)
/* 1AD05C 8027E77C 30420600 */ andi $v0, $v0, 0x600
/* 1AD060 8027E780 1040000C */ beqz $v0, .L8027E7B4
/* 1AD064 8027E784 240400EA */ addiu $a0, $zero, 0xEA
/* 1AD068 8027E788 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1AD06C 8027E78C E7A00010 */ swc1 $f0, 0x10($sp)
/* 1AD070 8027E790 8E46000C */ lw $a2, 0xC($s2)
/* 1AD074 8027E794 8E470010 */ lw $a3, 0x10($s2)
/* 1AD078 8027E798 0C052757 */ jal sfx_play_sound_at_position
/* 1AD07C 8027E79C 0000282D */ daddu $a1, $zero, $zero
/* 1AD080 8027E7A0 0260202D */ daddu $a0, $s3, $zero
/* 1AD084 8027E7A4 0C09DC58 */ jal dispatch_event_actor
/* 1AD088 8027E7A8 24050022 */ addiu $a1, $zero, 0x22
/* 1AD08C 8027E7AC 0809FB17 */ j .L8027EC5C
/* 1AD090 8027E7B0 00000000 */ nop
.L8027E7B4:
/* 1AD094 8027E7B4 8E830188 */ lw $v1, 0x188($s4)
/* 1AD098 8027E7B8 30628000 */ andi $v0, $v1, 0x8000
/* 1AD09C 8027E7BC 10400015 */ beqz $v0, .L8027E814
/* 1AD0A0 8027E7C0 2404000B */ addiu $a0, $zero, 0xB
/* 1AD0A4 8027E7C4 8FA80018 */ lw $t0, 0x18($sp)
/* 1AD0A8 8027E7C8 81020212 */ lb $v0, 0x212($t0)
/* 1AD0AC 8027E7CC 10440473 */ beq $v0, $a0, .L8027F99C
/* 1AD0B0 8027E7D0 0000102D */ daddu $v0, $zero, $zero
/* 1AD0B4 8027E7D4 82620212 */ lb $v0, 0x212($s3)
/* 1AD0B8 8027E7D8 10440005 */ beq $v0, $a0, .L8027E7F0
/* 1AD0BC 8027E7DC 3C021000 */ lui $v0, (0x10000000 >> 16)
/* 1AD0C0 8027E7E0 8EC2007C */ lw $v0, 0x7C($s6)
/* 1AD0C4 8027E7E4 30420080 */ andi $v0, $v0, 0x80
/* 1AD0C8 8027E7E8 1040FEF3 */ beqz $v0, .L8027E3B8
/* 1AD0CC 8027E7EC 3C021000 */ lui $v0, (0x10000000 >> 16)
.L8027E7F0:
/* 1AD0D0 8027E7F0 00621024 */ and $v0, $v1, $v0
/* 1AD0D4 8027E7F4 14400469 */ bnez $v0, .L8027F99C
/* 1AD0D8 8027E7F8 0000102D */ daddu $v0, $zero, $zero
/* 1AD0DC 8027E7FC 8E82018C */ lw $v0, 0x18C($s4)
/* 1AD0E0 8027E800 30420008 */ andi $v0, $v0, 0x8
/* 1AD0E4 8027E804 10400454 */ beqz $v0, .L8027F958
/* 1AD0E8 8027E808 0000102D */ daddu $v0, $zero, $zero
/* 1AD0EC 8027E80C 0809FE67 */ j .L8027F99C
/* 1AD0F0 8027E810 00000000 */ nop
.L8027E814:
/* 1AD0F4 8027E814 30620002 */ andi $v0, $v1, 0x2
/* 1AD0F8 8027E818 10400010 */ beqz $v0, .L8027E85C
/* 1AD0FC 8027E81C 0000202D */ daddu $a0, $zero, $zero
/* 1AD100 8027E820 C6440014 */ lwc1 $f4, 0x14($s2)
/* 1AD104 8027E824 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 1AD108 8027E828 44810000 */ mtc1 $at, $f0
/* 1AD10C 8027E82C 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1AD110 8027E830 44811000 */ mtc1 $at, $f2
/* 1AD114 8027E834 24020018 */ addiu $v0, $zero, 0x18
/* 1AD118 8027E838 AFA20014 */ sw $v0, 0x14($sp)
/* 1AD11C 8027E83C 46002100 */ add.s $f4, $f4, $f0
/* 1AD120 8027E840 E7A20010 */ swc1 $f2, 0x10($sp)
/* 1AD124 8027E844 8E45000C */ lw $a1, 0xC($s2)
/* 1AD128 8027E848 8E460010 */ lw $a2, 0x10($s2)
/* 1AD12C 8027E84C 44072000 */ mfc1 $a3, $f4
/* 1AD130 8027E850 24080001 */ addiu $t0, $zero, 0x1
/* 1AD134 8027E854 0C01C184 */ jal fx_ring_blast
/* 1AD138 8027E858 AFA80024 */ sw $t0, 0x24($sp)
.L8027E85C:
/* 1AD13C 8027E85C 8E820188 */ lw $v0, 0x188($s4)
/* 1AD140 8027E860 30420020 */ andi $v0, $v0, 0x20
/* 1AD144 8027E864 10400005 */ beqz $v0, .L8027E87C
/* 1AD148 8027E868 00000000 */ nop
/* 1AD14C 8027E86C 0C09451D */ jal apply_shock_effect
/* 1AD150 8027E870 0260202D */ daddu $a0, $s3, $zero
/* 1AD154 8027E874 24080001 */ addiu $t0, $zero, 0x1
/* 1AD158 8027E878 AFA80028 */ sw $t0, 0x28($sp)
.L8027E87C:
/* 1AD15C 8027E87C 8E820188 */ lw $v0, 0x188($s4)
/* 1AD160 8027E880 30420004 */ andi $v0, $v0, 0x4
/* 1AD164 8027E884 1040000E */ beqz $v0, .L8027E8C0
/* 1AD168 8027E888 24020018 */ addiu $v0, $zero, 0x18
/* 1AD16C 8027E88C C6440014 */ lwc1 $f4, 0x14($s2)
/* 1AD170 8027E890 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 1AD174 8027E894 44810000 */ mtc1 $at, $f0
/* 1AD178 8027E898 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1AD17C 8027E89C 44811000 */ mtc1 $at, $f2
/* 1AD180 8027E8A0 AFA20014 */ sw $v0, 0x14($sp)
/* 1AD184 8027E8A4 46002100 */ add.s $f4, $f4, $f0
/* 1AD188 8027E8A8 E7A20010 */ swc1 $f2, 0x10($sp)
/* 1AD18C 8027E8AC 8E45000C */ lw $a1, 0xC($s2)
/* 1AD190 8027E8B0 8E460010 */ lw $a2, 0x10($s2)
/* 1AD194 8027E8B4 44072000 */ mfc1 $a3, $f4
/* 1AD198 8027E8B8 0C01C70C */ jal fx_water_splash
/* 1AD19C 8027E8BC 0000202D */ daddu $a0, $zero, $zero
.L8027E8C0:
/* 1AD1A0 8027E8C0 8E820188 */ lw $v0, 0x188($s4)
/* 1AD1A4 8027E8C4 30420008 */ andi $v0, $v0, 0x8
/* 1AD1A8 8027E8C8 1040000C */ beqz $v0, .L8027E8FC
/* 1AD1AC 8027E8CC 0000202D */ daddu $a0, $zero, $zero
/* 1AD1B0 8027E8D0 C6420014 */ lwc1 $f2, 0x14($s2)
/* 1AD1B4 8027E8D4 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 1AD1B8 8027E8D8 44810000 */ mtc1 $at, $f0
/* 1AD1BC 8027E8DC 00000000 */ nop
/* 1AD1C0 8027E8E0 46001080 */ add.s $f2, $f2, $f0
/* 1AD1C4 8027E8E4 8E45000C */ lw $a1, 0xC($s2)
/* 1AD1C8 8027E8E8 8E460010 */ lw $a2, 0x10($s2)
/* 1AD1CC 8027E8EC 44071000 */ mfc1 $a3, $f2
/* 1AD1D0 8027E8F0 24080001 */ addiu $t0, $zero, 0x1
/* 1AD1D4 8027E8F4 0C01C2A4 */ jal fx_big_snowflakes
/* 1AD1D8 8027E8F8 AFA8002C */ sw $t0, 0x2C($sp)
.L8027E8FC:
/* 1AD1DC 8027E8FC 8FA80018 */ lw $t0, 0x18($sp)
/* 1AD1E0 8027E900 81020212 */ lb $v0, 0x212($t0)
/* 1AD1E4 8027E904 2403000B */ addiu $v1, $zero, 0xB
/* 1AD1E8 8027E908 10430016 */ beq $v0, $v1, .L8027E964
/* 1AD1EC 8027E90C 00000000 */ nop
/* 1AD1F0 8027E910 82620212 */ lb $v0, 0x212($s3)
/* 1AD1F4 8027E914 10430005 */ beq $v0, $v1, .L8027E92C
/* 1AD1F8 8027E918 3C031000 */ lui $v1, (0x10000020 >> 16)
/* 1AD1FC 8027E91C 8EC2007C */ lw $v0, 0x7C($s6)
/* 1AD200 8027E920 30420080 */ andi $v0, $v0, 0x80
/* 1AD204 8027E924 1040000F */ beqz $v0, .L8027E964
/* 1AD208 8027E928 00000000 */ nop
.L8027E92C:
/* 1AD20C 8027E92C 8E820188 */ lw $v0, 0x188($s4)
/* 1AD210 8027E930 34630020 */ ori $v1, $v1, (0x10000020 & 0xFFFF)
/* 1AD214 8027E934 00431024 */ and $v0, $v0, $v1
/* 1AD218 8027E938 1440000A */ bnez $v0, .L8027E964
/* 1AD21C 8027E93C 00000000 */ nop
/* 1AD220 8027E940 8E82018C */ lw $v0, 0x18C($s4)
/* 1AD224 8027E944 30420008 */ andi $v0, $v0, 0x8
/* 1AD228 8027E948 14400006 */ bnez $v0, .L8027E964
/* 1AD22C 8027E94C 00000000 */ nop
/* 1AD230 8027E950 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1AD234 8027E954 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 1AD238 8027E958 8C620000 */ lw $v0, 0x0($v1)
/* 1AD23C 8027E95C 34420020 */ ori $v0, $v0, 0x20
/* 1AD240 8027E960 AC620000 */ sw $v0, 0x0($v1)
.L8027E964:
/* 1AD244 8027E964 8EC2007C */ lw $v0, 0x7C($s6)
/* 1AD248 8027E968 3C03000C */ lui $v1, (0xC0000 >> 16)
/* 1AD24C 8027E96C 00431024 */ and $v0, $v0, $v1
/* 1AD250 8027E970 10400005 */ beqz $v0, .L8027E988
/* 1AD254 8027E974 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16)
/* 1AD258 8027E978 8E820188 */ lw $v0, 0x188($s4)
/* 1AD25C 8027E97C 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF)
/* 1AD260 8027E980 00431024 */ and $v0, $v0, $v1
/* 1AD264 8027E984 AE820188 */ sw $v0, 0x188($s4)
.L8027E988:
/* 1AD268 8027E988 8EC50078 */ lw $a1, 0x78($s6)
/* 1AD26C 8027E98C 8E860188 */ lw $a2, 0x188($s4)
/* 1AD270 8027E990 0C0998AF */ jal get_defense
/* 1AD274 8027E994 0260202D */ daddu $a0, $s3, $zero
/* 1AD278 8027E998 0040802D */ daddu $s0, $v0, $zero
/* 1AD27C 8027E99C 8E850188 */ lw $a1, 0x188($s4)
/* 1AD280 8027E9A0 3C020800 */ lui $v0, (0x8000000 >> 16)
/* 1AD284 8027E9A4 00A21024 */ and $v0, $a1, $v0
/* 1AD288 8027E9A8 14400003 */ bnez $v0, .L8027E9B8
/* 1AD28C 8027E9AC 00000000 */ nop
/* 1AD290 8027E9B0 82620222 */ lb $v0, 0x222($s3)
/* 1AD294 8027E9B4 02028021 */ addu $s0, $s0, $v0
.L8027E9B8:
/* 1AD298 8027E9B8 8684017E */ lh $a0, 0x17E($s4)
/* 1AD29C 8027E9BC 8FA80018 */ lw $t0, 0x18($sp)
/* 1AD2A0 8027E9C0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1AD2A4 8027E9C4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1AD2A8 8027E9C8 81030221 */ lb $v1, 0x221($t0)
/* 1AD2AC 8027E9CC 30420020 */ andi $v0, $v0, 0x20
/* 1AD2B0 8027E9D0 1040000A */ beqz $v0, .L8027E9FC
/* 1AD2B4 8027E9D4 00832021 */ addu $a0, $a0, $v1
/* 1AD2B8 8027E9D8 30A20200 */ andi $v0, $a1, 0x200
/* 1AD2BC 8027E9DC 10400007 */ beqz $v0, .L8027E9FC
/* 1AD2C0 8027E9E0 00000000 */ nop
/* 1AD2C4 8027E9E4 8EC2007C */ lw $v0, 0x7C($s6)
/* 1AD2C8 8027E9E8 30420200 */ andi $v0, $v0, 0x200
/* 1AD2CC 8027E9EC 10400003 */ beqz $v0, .L8027E9FC
/* 1AD2D0 8027E9F0 00000000 */ nop
/* 1AD2D4 8027E9F4 0000802D */ daddu $s0, $zero, $zero
/* 1AD2D8 8027E9F8 826401B8 */ lb $a0, 0x1B8($s3)
.L8027E9FC:
/* 1AD2DC 8027E9FC 8E820188 */ lw $v0, 0x188($s4)
/* 1AD2E0 8027EA00 3C034000 */ lui $v1, (0x40000000 >> 16)
/* 1AD2E4 8027EA04 00431024 */ and $v0, $v0, $v1
/* 1AD2E8 8027EA08 10400003 */ beqz $v0, .L8027EA18
/* 1AD2EC 8027EA0C 00000000 */ nop
/* 1AD2F0 8027EA10 0000802D */ daddu $s0, $zero, $zero
/* 1AD2F4 8027EA14 0200202D */ daddu $a0, $s0, $zero
.L8027EA18:
/* 1AD2F8 8027EA18 8FA80018 */ lw $t0, 0x18($sp)
/* 1AD2FC 8027EA1C 81030210 */ lb $v1, 0x210($t0)
/* 1AD300 8027EA20 2402000A */ addiu $v0, $zero, 0xA
/* 1AD304 8027EA24 14620008 */ bne $v1, $v0, .L8027EA48
/* 1AD308 8027EA28 28820064 */ slti $v0, $a0, 0x64
/* 1AD30C 8027EA2C 10800005 */ beqz $a0, .L8027EA44
/* 1AD310 8027EA30 000417C2 */ srl $v0, $a0, 31
/* 1AD314 8027EA34 00821021 */ addu $v0, $a0, $v0
/* 1AD318 8027EA38 00022043 */ sra $a0, $v0, 1
/* 1AD31C 8027EA3C 50800001 */ beql $a0, $zero, .L8027EA44
/* 1AD320 8027EA40 24040001 */ addiu $a0, $zero, 0x1
.L8027EA44:
/* 1AD324 8027EA44 28820064 */ slti $v0, $a0, 0x64
.L8027EA48:
/* 1AD328 8027EA48 50400001 */ beql $v0, $zero, .L8027EA50
/* 1AD32C 8027EA4C 24040063 */ addiu $a0, $zero, 0x63
.L8027EA50:
/* 1AD330 8027EA50 04820001 */ bltzl $a0, .L8027EA58
/* 1AD334 8027EA54 0000802D */ daddu $s0, $zero, $zero
.L8027EA58:
/* 1AD338 8027EA58 00902023 */ subu $a0, $a0, $s0
/* 1AD33C 8027EA5C 04810002 */ bgez $a0, .L8027EA68
/* 1AD340 8027EA60 A66001FA */ sh $zero, 0x1FA($s3)
/* 1AD344 8027EA64 0000202D */ daddu $a0, $zero, $zero
.L8027EA68:
/* 1AD348 8027EA68 8E820188 */ lw $v0, 0x188($s4)
/* 1AD34C 8027EA6C 3C030010 */ lui $v1, (0x100000 >> 16)
/* 1AD350 8027EA70 00431024 */ and $v0, $v0, $v1
/* 1AD354 8027EA74 10400007 */ beqz $v0, .L8027EA94
/* 1AD358 8027EA78 00000000 */ nop
/* 1AD35C 8027EA7C 18800005 */ blez $a0, .L8027EA94
/* 1AD360 8027EA80 00000000 */ nop
/* 1AD364 8027EA84 82820198 */ lb $v0, 0x198($s4)
/* 1AD368 8027EA88 00822021 */ addu $a0, $a0, $v0
/* 1AD36C 8027EA8C 58800001 */ blezl $a0, .L8027EA94
/* 1AD370 8027EA90 24040001 */ addiu $a0, $zero, 0x1
.L8027EA94:
/* 1AD374 8027EA94 1C800019 */ bgtz $a0, .L8027EAFC
/* 1AD378 8027EA98 A6800180 */ sh $zero, 0x180($s4)
/* 1AD37C 8027EA9C A66001FA */ sh $zero, 0x1FA($s3)
/* 1AD380 8027EAA0 8E820188 */ lw $v0, 0x188($s4)
/* 1AD384 8027EAA4 3C034000 */ lui $v1, (0x40000000 >> 16)
/* 1AD388 8027EAA8 00431024 */ and $v0, $v0, $v1
/* 1AD38C 8027EAAC 1440000C */ bnez $v0, .L8027EAE0
/* 1AD390 8027EAB0 24080002 */ addiu $t0, $zero, 0x2
/* 1AD394 8027EAB4 24110017 */ addiu $s1, $zero, 0x17
/* 1AD398 8027EAB8 AFA8001C */ sw $t0, 0x1C($sp)
/* 1AD39C 8027EABC C6400014 */ lwc1 $f0, 0x14($s2)
/* 1AD3A0 8027EAC0 2404010C */ addiu $a0, $zero, 0x10C
/* 1AD3A4 8027EAC4 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1AD3A8 8027EAC8 8E46000C */ lw $a2, 0xC($s2)
/* 1AD3AC 8027EACC 8E470010 */ lw $a3, 0x10($s2)
/* 1AD3B0 8027EAD0 0C052757 */ jal sfx_play_sound_at_position
/* 1AD3B4 8027EAD4 0000282D */ daddu $a1, $zero, $zero
/* 1AD3B8 8027EAD8 0809FAE5 */ j .L8027EB94
/* 1AD3BC 8027EADC A6800180 */ sh $zero, 0x180($s4)
.L8027EAE0:
/* 1AD3C0 8027EAE0 AFA8001C */ sw $t0, 0x1C($sp)
/* 1AD3C4 8027EAE4 826201B8 */ lb $v0, 0x1B8($s3)
/* 1AD3C8 8027EAE8 1C400002 */ bgtz $v0, .L8027EAF4
/* 1AD3CC 8027EAEC 24110017 */ addiu $s1, $zero, 0x17
/* 1AD3D0 8027EAF0 24110020 */ addiu $s1, $zero, 0x20
.L8027EAF4:
/* 1AD3D4 8027EAF4 0809FAE5 */ j .L8027EB94
/* 1AD3D8 8027EAF8 A6800180 */ sh $zero, 0x180($s4)
.L8027EAFC:
/* 1AD3DC 8027EAFC 966201FC */ lhu $v0, 0x1FC($s3)
/* 1AD3E0 8027EB00 966301FA */ lhu $v1, 0x1FA($s3)
/* 1AD3E4 8027EB04 00441021 */ addu $v0, $v0, $a0
/* 1AD3E8 8027EB08 00641823 */ subu $v1, $v1, $a0
/* 1AD3EC 8027EB0C A66201FC */ sh $v0, 0x1FC($s3)
/* 1AD3F0 8027EB10 A66301FA */ sh $v1, 0x1FA($s3)
/* 1AD3F4 8027EB14 A6800180 */ sh $zero, 0x180($s4)
/* 1AD3F8 8027EB18 8EC20000 */ lw $v0, 0x0($s6)
/* 1AD3FC 8027EB1C 24110009 */ addiu $s1, $zero, 0x9
/* 1AD400 8027EB20 30422000 */ andi $v0, $v0, 0x2000
/* 1AD404 8027EB24 14400016 */ bnez $v0, .L8027EB80
/* 1AD408 8027EB28 AFA0001C */ sw $zero, 0x1C($sp)
/* 1AD40C 8027EB2C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1AD410 8027EB30 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1AD414 8027EB34 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 1AD418 8027EB38 00431024 */ and $v0, $v0, $v1
/* 1AD41C 8027EB3C 14400010 */ bnez $v0, .L8027EB80
/* 1AD420 8027EB40 00000000 */ nop
/* 1AD424 8027EB44 8FA80020 */ lw $t0, 0x20($sp)
/* 1AD428 8027EB48 1500000D */ bnez $t0, .L8027EB80
/* 1AD42C 8027EB4C 00000000 */ nop
/* 1AD430 8027EB50 8EC20004 */ lw $v0, 0x4($s6)
/* 1AD434 8027EB54 30420004 */ andi $v0, $v0, 0x4
/* 1AD438 8027EB58 14400009 */ bnez $v0, .L8027EB80
/* 1AD43C 8027EB5C 00000000 */ nop
/* 1AD440 8027EB60 926201B8 */ lbu $v0, 0x1B8($s3)
/* 1AD444 8027EB64 00441023 */ subu $v0, $v0, $a0
/* 1AD448 8027EB68 A26201B8 */ sb $v0, 0x1B8($s3)
/* 1AD44C 8027EB6C 00021600 */ sll $v0, $v0, 24
/* 1AD450 8027EB70 1C400003 */ bgtz $v0, .L8027EB80
/* 1AD454 8027EB74 00000000 */ nop
/* 1AD458 8027EB78 A26001B8 */ sb $zero, 0x1B8($s3)
/* 1AD45C 8027EB7C 24110020 */ addiu $s1, $zero, 0x20
.L8027EB80:
/* 1AD460 8027EB80 96820180 */ lhu $v0, 0x180($s4)
/* 1AD464 8027EB84 00441021 */ addu $v0, $v0, $a0
/* 1AD468 8027EB88 A6820180 */ sh $v0, 0x180($s4)
/* 1AD46C 8027EB8C A66201F8 */ sh $v0, 0x1F8($s3)
/* 1AD470 8027EB90 A66001FA */ sh $zero, 0x1FA($s3)
.L8027EB94:
/* 1AD474 8027EB94 8EC20000 */ lw $v0, 0x0($s6)
/* 1AD478 8027EB98 30422000 */ andi $v0, $v0, 0x2000
/* 1AD47C 8027EB9C 10400033 */ beqz $v0, .L8027EC6C
/* 1AD480 8027EBA0 2403000B */ addiu $v1, $zero, 0xB
/* 1AD484 8027EBA4 8FA80018 */ lw $t0, 0x18($sp)
/* 1AD488 8027EBA8 81020212 */ lb $v0, 0x212($t0)
/* 1AD48C 8027EBAC 10430011 */ beq $v0, $v1, .L8027EBF4
/* 1AD490 8027EBB0 00000000 */ nop
/* 1AD494 8027EBB4 82620212 */ lb $v0, 0x212($s3)
/* 1AD498 8027EBB8 10430005 */ beq $v0, $v1, .L8027EBD0
/* 1AD49C 8027EBBC 00000000 */ nop
/* 1AD4A0 8027EBC0 8EC2007C */ lw $v0, 0x7C($s6)
/* 1AD4A4 8027EBC4 30420080 */ andi $v0, $v0, 0x80
/* 1AD4A8 8027EBC8 1040000A */ beqz $v0, .L8027EBF4
/* 1AD4AC 8027EBCC 00000000 */ nop
.L8027EBD0:
/* 1AD4B0 8027EBD0 8E820188 */ lw $v0, 0x188($s4)
/* 1AD4B4 8027EBD4 3C031000 */ lui $v1, (0x10000000 >> 16)
/* 1AD4B8 8027EBD8 00431024 */ and $v0, $v0, $v1
/* 1AD4BC 8027EBDC 14400005 */ bnez $v0, .L8027EBF4
/* 1AD4C0 8027EBE0 00000000 */ nop
/* 1AD4C4 8027EBE4 8E82018C */ lw $v0, 0x18C($s4)
/* 1AD4C8 8027EBE8 30420008 */ andi $v0, $v0, 0x8
/* 1AD4CC 8027EBEC 1040035A */ beqz $v0, .L8027F958
/* 1AD4D0 8027EBF0 00000000 */ nop
.L8027EBF4:
/* 1AD4D4 8027EBF4 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 1AD4D8 8027EBF8 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 1AD4DC 8027EBFC 8E020000 */ lw $v0, 0x0($s0)
/* 1AD4E0 8027EC00 30420020 */ andi $v0, $v0, 0x20
/* 1AD4E4 8027EC04 14400002 */ bnez $v0, .L8027EC10
/* 1AD4E8 8027EC08 24110019 */ addiu $s1, $zero, 0x19
/* 1AD4EC 8027EC0C 24110017 */ addiu $s1, $zero, 0x17
.L8027EC10:
/* 1AD4F0 8027EC10 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1AD4F4 8027EC14 2404010C */ addiu $a0, $zero, 0x10C
/* 1AD4F8 8027EC18 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1AD4FC 8027EC1C 8E46000C */ lw $a2, 0xC($s2)
/* 1AD500 8027EC20 8E470010 */ lw $a3, 0x10($s2)
/* 1AD504 8027EC24 0C052757 */ jal sfx_play_sound_at_position
/* 1AD508 8027EC28 0000282D */ daddu $a1, $zero, $zero
/* 1AD50C 8027EC2C 0260202D */ daddu $a0, $s3, $zero
/* 1AD510 8027EC30 0C09DC58 */ jal dispatch_event_actor
/* 1AD514 8027EC34 0220282D */ daddu $a1, $s1, $zero
/* 1AD518 8027EC38 24020001 */ addiu $v0, $zero, 0x1
/* 1AD51C 8027EC3C AFA20010 */ sw $v0, 0x10($sp)
/* 1AD520 8027EC40 24020003 */ addiu $v0, $zero, 0x3
/* 1AD524 8027EC44 AFA20014 */ sw $v0, 0x14($sp)
/* 1AD528 8027EC48 C64C000C */ lwc1 $f12, 0xC($s2)
/* 1AD52C 8027EC4C C64E0010 */ lwc1 $f14, 0x10($s2)
/* 1AD530 8027EC50 8E460014 */ lw $a2, 0x14($s2)
/* 1AD534 8027EC54 0C093BF8 */ jal func_8024EFE0
/* 1AD538 8027EC58 0000382D */ daddu $a3, $zero, $zero
.L8027EC5C:
/* 1AD53C 8027EC5C 8E020000 */ lw $v0, 0x0($s0)
/* 1AD540 8027EC60 30420240 */ andi $v0, $v0, 0x240
.L8027EC64:
/* 1AD544 8027EC64 0809FE67 */ j .L8027F99C
/* 1AD548 8027EC68 0002102B */ sltu $v0, $zero, $v0
.L8027EC6C:
/* 1AD54C 8027EC6C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1AD550 8027EC70 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1AD554 8027EC74 30420020 */ andi $v0, $v0, 0x20
/* 1AD558 8027EC78 1040000D */ beqz $v0, .L8027ECB0
/* 1AD55C 8027EC7C 24020009 */ addiu $v0, $zero, 0x9
/* 1AD560 8027EC80 52220001 */ beql $s1, $v0, .L8027EC88
/* 1AD564 8027EC84 2411000A */ addiu $s1, $zero, 0xA
.L8027EC88:
/* 1AD568 8027EC88 24020017 */ addiu $v0, $zero, 0x17
/* 1AD56C 8027EC8C 52220001 */ beql $s1, $v0, .L8027EC94
/* 1AD570 8027EC90 24110019 */ addiu $s1, $zero, 0x19
.L8027EC94:
/* 1AD574 8027EC94 826201B8 */ lb $v0, 0x1B8($s3)
/* 1AD578 8027EC98 1C400008 */ bgtz $v0, .L8027ECBC
/* 1AD57C 8027EC9C 24020019 */ addiu $v0, $zero, 0x19
/* 1AD580 8027ECA0 52220006 */ beql $s1, $v0, .L8027ECBC
/* 1AD584 8027ECA4 24110020 */ addiu $s1, $zero, 0x20
/* 1AD588 8027ECA8 0809FB2F */ j .L8027ECBC
/* 1AD58C 8027ECAC 00000000 */ nop
.L8027ECB0:
/* 1AD590 8027ECB0 24020020 */ addiu $v0, $zero, 0x20
/* 1AD594 8027ECB4 52220001 */ beql $s1, $v0, .L8027ECBC
/* 1AD598 8027ECB8 24110009 */ addiu $s1, $zero, 0x9
.L8027ECBC:
/* 1AD59C 8027ECBC 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 1AD5A0 8027ECC0 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 1AD5A4 8027ECC4 8E020000 */ lw $v0, 0x0($s0)
/* 1AD5A8 8027ECC8 30420020 */ andi $v0, $v0, 0x20
/* 1AD5AC 8027ECCC 14400007 */ bnez $v0, .L8027ECEC
/* 1AD5B0 8027ECD0 00000000 */ nop
/* 1AD5B4 8027ECD4 0C099B85 */ jal clear_part_pal_adjustment
/* 1AD5B8 8027ECD8 02C0202D */ daddu $a0, $s6, $zero
/* 1AD5BC 8027ECDC 8E020000 */ lw $v0, 0x0($s0)
/* 1AD5C0 8027ECE0 30420020 */ andi $v0, $v0, 0x20
/* 1AD5C4 8027ECE4 10400055 */ beqz $v0, .L8027EE3C
/* 1AD5C8 8027ECE8 00000000 */ nop
.L8027ECEC:
/* 1AD5CC 8027ECEC 8E820188 */ lw $v0, 0x188($s4)
/* 1AD5D0 8027ECF0 3C030400 */ lui $v1, (0x4000000 >> 16)
/* 1AD5D4 8027ECF4 00431024 */ and $v0, $v0, $v1
/* 1AD5D8 8027ECF8 10400007 */ beqz $v0, .L8027ED18
/* 1AD5DC 8027ECFC 2402000A */ addiu $v0, $zero, 0xA
/* 1AD5E0 8027ED00 52220001 */ beql $s1, $v0, .L8027ED08
/* 1AD5E4 8027ED04 2411000B */ addiu $s1, $zero, 0xB
.L8027ED08:
/* 1AD5E8 8027ED08 24020020 */ addiu $v0, $zero, 0x20
/* 1AD5EC 8027ED0C 52220001 */ beql $s1, $v0, .L8027ED14
/* 1AD5F0 8027ED10 24110021 */ addiu $s1, $zero, 0x21
.L8027ED14:
/* 1AD5F4 8027ED14 241E0001 */ addiu $fp, $zero, 0x1
.L8027ED18:
/* 1AD5F8 8027ED18 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1AD5FC 8027ED1C 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1AD600 8027ED20 30420020 */ andi $v0, $v0, 0x20
/* 1AD604 8027ED24 10400045 */ beqz $v0, .L8027EE3C
/* 1AD608 8027ED28 3C031000 */ lui $v1, (0x10000000 >> 16)
/* 1AD60C 8027ED2C 8E820188 */ lw $v0, 0x188($s4)
/* 1AD610 8027ED30 00431024 */ and $v0, $v0, $v1
/* 1AD614 8027ED34 14400013 */ bnez $v0, .L8027ED84
/* 1AD618 8027ED38 3C030010 */ lui $v1, (0x100000 >> 16)
/* 1AD61C 8027ED3C 8EC2007C */ lw $v0, 0x7C($s6)
/* 1AD620 8027ED40 00431024 */ and $v0, $v0, $v1
/* 1AD624 8027ED44 1040000F */ beqz $v0, .L8027ED84
/* 1AD628 8027ED48 24020009 */ addiu $v0, $zero, 0x9
/* 1AD62C 8027ED4C 52220001 */ beql $s1, $v0, .L8027ED54
/* 1AD630 8027ED50 24110015 */ addiu $s1, $zero, 0x15
.L8027ED54:
/* 1AD634 8027ED54 2402000A */ addiu $v0, $zero, 0xA
/* 1AD638 8027ED58 52220001 */ beql $s1, $v0, .L8027ED60
/* 1AD63C 8027ED5C 24110015 */ addiu $s1, $zero, 0x15
.L8027ED60:
/* 1AD640 8027ED60 24020017 */ addiu $v0, $zero, 0x17
/* 1AD644 8027ED64 52220001 */ beql $s1, $v0, .L8027ED6C
/* 1AD648 8027ED68 24110015 */ addiu $s1, $zero, 0x15
.L8027ED6C:
/* 1AD64C 8027ED6C 24020019 */ addiu $v0, $zero, 0x19
/* 1AD650 8027ED70 52220001 */ beql $s1, $v0, .L8027ED78
/* 1AD654 8027ED74 24110015 */ addiu $s1, $zero, 0x15
.L8027ED78:
/* 1AD658 8027ED78 24020020 */ addiu $v0, $zero, 0x20
/* 1AD65C 8027ED7C 52220001 */ beql $s1, $v0, .L8027ED84
/* 1AD660 8027ED80 24110028 */ addiu $s1, $zero, 0x28
.L8027ED84:
/* 1AD664 8027ED84 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1AD668 8027ED88 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1AD66C 8027ED8C 30420020 */ andi $v0, $v0, 0x20
/* 1AD670 8027ED90 1040002A */ beqz $v0, .L8027EE3C
/* 1AD674 8027ED94 00000000 */ nop
/* 1AD678 8027ED98 8E820188 */ lw $v0, 0x188($s4)
/* 1AD67C 8027ED9C 30420080 */ andi $v0, $v0, 0x80
/* 1AD680 8027EDA0 1040000B */ beqz $v0, .L8027EDD0
/* 1AD684 8027EDA4 00000000 */ nop
/* 1AD688 8027EDA8 8EC2007C */ lw $v0, 0x7C($s6)
/* 1AD68C 8027EDAC 30424000 */ andi $v0, $v0, 0x4000
/* 1AD690 8027EDB0 10400007 */ beqz $v0, .L8027EDD0
/* 1AD694 8027EDB4 2402000A */ addiu $v0, $zero, 0xA
/* 1AD698 8027EDB8 52220001 */ beql $s1, $v0, .L8027EDC0
/* 1AD69C 8027EDBC 2411000C */ addiu $s1, $zero, 0xC
.L8027EDC0:
/* 1AD6A0 8027EDC0 24020019 */ addiu $v0, $zero, 0x19
/* 1AD6A4 8027EDC4 52220001 */ beql $s1, $v0, .L8027EDCC
/* 1AD6A8 8027EDC8 2411000C */ addiu $s1, $zero, 0xC
.L8027EDCC:
/* 1AD6AC 8027EDCC 241E0001 */ addiu $fp, $zero, 0x1
.L8027EDD0:
/* 1AD6B0 8027EDD0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1AD6B4 8027EDD4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1AD6B8 8027EDD8 30420020 */ andi $v0, $v0, 0x20
/* 1AD6BC 8027EDDC 10400017 */ beqz $v0, .L8027EE3C
/* 1AD6C0 8027EDE0 00000000 */ nop
/* 1AD6C4 8027EDE4 8E820188 */ lw $v0, 0x188($s4)
/* 1AD6C8 8027EDE8 30420080 */ andi $v0, $v0, 0x80
/* 1AD6CC 8027EDEC 1040000E */ beqz $v0, .L8027EE28
/* 1AD6D0 8027EDF0 00000000 */ nop
/* 1AD6D4 8027EDF4 8EC2007C */ lw $v0, 0x7C($s6)
/* 1AD6D8 8027EDF8 30421000 */ andi $v0, $v0, 0x1000
/* 1AD6DC 8027EDFC 1040000A */ beqz $v0, .L8027EE28
/* 1AD6E0 8027EE00 2402000A */ addiu $v0, $zero, 0xA
/* 1AD6E4 8027EE04 52220001 */ beql $s1, $v0, .L8027EE0C
/* 1AD6E8 8027EE08 2411000D */ addiu $s1, $zero, 0xD
.L8027EE0C:
/* 1AD6EC 8027EE0C 24020019 */ addiu $v0, $zero, 0x19
/* 1AD6F0 8027EE10 52220001 */ beql $s1, $v0, .L8027EE18
/* 1AD6F4 8027EE14 2411000D */ addiu $s1, $zero, 0xD
.L8027EE18:
/* 1AD6F8 8027EE18 8E620000 */ lw $v0, 0x0($s3)
/* 1AD6FC 8027EE1C 30420400 */ andi $v0, $v0, 0x400
/* 1AD700 8027EE20 50400001 */ beql $v0, $zero, .L8027EE28
/* 1AD704 8027EE24 241E0001 */ addiu $fp, $zero, 0x1
.L8027EE28:
/* 1AD708 8027EE28 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1AD70C 8027EE2C 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1AD710 8027EE30 30420020 */ andi $v0, $v0, 0x20
/* 1AD714 8027EE34 14400017 */ bnez $v0, .L8027EE94
/* 1AD718 8027EE38 00000000 */ nop
.L8027EE3C:
/* 1AD71C 8027EE3C 8E820188 */ lw $v0, 0x188($s4)
/* 1AD720 8027EE40 30420080 */ andi $v0, $v0, 0x80
/* 1AD724 8027EE44 1040000E */ beqz $v0, .L8027EE80
/* 1AD728 8027EE48 00000000 */ nop
/* 1AD72C 8027EE4C 8EC2007C */ lw $v0, 0x7C($s6)
/* 1AD730 8027EE50 30421000 */ andi $v0, $v0, 0x1000
/* 1AD734 8027EE54 1040000A */ beqz $v0, .L8027EE80
/* 1AD738 8027EE58 24020009 */ addiu $v0, $zero, 0x9
/* 1AD73C 8027EE5C 52220001 */ beql $s1, $v0, .L8027EE64
/* 1AD740 8027EE60 2411000D */ addiu $s1, $zero, 0xD
.L8027EE64:
/* 1AD744 8027EE64 24020017 */ addiu $v0, $zero, 0x17
/* 1AD748 8027EE68 52220001 */ beql $s1, $v0, .L8027EE70
/* 1AD74C 8027EE6C 2411000D */ addiu $s1, $zero, 0xD
.L8027EE70:
/* 1AD750 8027EE70 8E620000 */ lw $v0, 0x0($s3)
/* 1AD754 8027EE74 30420400 */ andi $v0, $v0, 0x400
/* 1AD758 8027EE78 50400001 */ beql $v0, $zero, .L8027EE80
/* 1AD75C 8027EE7C 241E0001 */ addiu $fp, $zero, 0x1
.L8027EE80:
/* 1AD760 8027EE80 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1AD764 8027EE84 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1AD768 8027EE88 30420020 */ andi $v0, $v0, 0x20
/* 1AD76C 8027EE8C 104000DA */ beqz $v0, .L8027F1F8
/* 1AD770 8027EE90 00000000 */ nop
.L8027EE94:
/* 1AD774 8027EE94 8E820188 */ lw $v0, 0x188($s4)
/* 1AD778 8027EE98 30420200 */ andi $v0, $v0, 0x200
/* 1AD77C 8027EE9C 10400010 */ beqz $v0, .L8027EEE0
/* 1AD780 8027EEA0 00000000 */ nop
/* 1AD784 8027EEA4 8EC2007C */ lw $v0, 0x7C($s6)
/* 1AD788 8027EEA8 30420200 */ andi $v0, $v0, 0x200
/* 1AD78C 8027EEAC 1040000C */ beqz $v0, .L8027EEE0
/* 1AD790 8027EEB0 24020020 */ addiu $v0, $zero, 0x20
/* 1AD794 8027EEB4 52220001 */ beql $s1, $v0, .L8027EEBC
/* 1AD798 8027EEB8 24110022 */ addiu $s1, $zero, 0x22
.L8027EEBC:
/* 1AD79C 8027EEBC 24020019 */ addiu $v0, $zero, 0x19
/* 1AD7A0 8027EEC0 52220001 */ beql $s1, $v0, .L8027EEC8
/* 1AD7A4 8027EEC4 24110022 */ addiu $s1, $zero, 0x22
.L8027EEC8:
/* 1AD7A8 8027EEC8 2402000A */ addiu $v0, $zero, 0xA
/* 1AD7AC 8027EECC 52220001 */ beql $s1, $v0, .L8027EED4
/* 1AD7B0 8027EED0 24110022 */ addiu $s1, $zero, 0x22
.L8027EED4:
/* 1AD7B4 8027EED4 241E0001 */ addiu $fp, $zero, 0x1
/* 1AD7B8 8027EED8 03C0402D */ daddu $t0, $fp, $zero
/* 1AD7BC 8027EEDC AFA80024 */ sw $t0, 0x24($sp)
.L8027EEE0:
/* 1AD7C0 8027EEE0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1AD7C4 8027EEE4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1AD7C8 8027EEE8 30420020 */ andi $v0, $v0, 0x20
/* 1AD7CC 8027EEEC 104000C2 */ beqz $v0, .L8027F1F8
/* 1AD7D0 8027EEF0 00000000 */ nop
/* 1AD7D4 8027EEF4 8E820188 */ lw $v0, 0x188($s4)
/* 1AD7D8 8027EEF8 30420202 */ andi $v0, $v0, 0x202
/* 1AD7DC 8027EEFC 10400008 */ beqz $v0, .L8027EF20
/* 1AD7E0 8027EF00 2402000A */ addiu $v0, $zero, 0xA
/* 1AD7E4 8027EF04 52220001 */ beql $s1, $v0, .L8027EF0C
/* 1AD7E8 8027EF08 2411000E */ addiu $s1, $zero, 0xE
.L8027EF0C:
/* 1AD7EC 8027EF0C 24020020 */ addiu $v0, $zero, 0x20
/* 1AD7F0 8027EF10 52220001 */ beql $s1, $v0, .L8027EF18
/* 1AD7F4 8027EF14 24110024 */ addiu $s1, $zero, 0x24
.L8027EF18:
/* 1AD7F8 8027EF18 24080001 */ addiu $t0, $zero, 0x1
/* 1AD7FC 8027EF1C AFA80024 */ sw $t0, 0x24($sp)
.L8027EF20:
/* 1AD800 8027EF20 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1AD804 8027EF24 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1AD808 8027EF28 30420020 */ andi $v0, $v0, 0x20
/* 1AD80C 8027EF2C 104000B2 */ beqz $v0, .L8027F1F8
/* 1AD810 8027EF30 00000000 */ nop
/* 1AD814 8027EF34 86820180 */ lh $v0, 0x180($s4)
/* 1AD818 8027EF38 044000AF */ bltz $v0, .L8027F1F8
/* 1AD81C 8027EF3C 24020020 */ addiu $v0, $zero, 0x20
/* 1AD820 8027EF40 122200AD */ beq $s1, $v0, .L8027F1F8
/* 1AD824 8027EF44 24020021 */ addiu $v0, $zero, 0x21
/* 1AD828 8027EF48 122200AB */ beq $s1, $v0, .L8027F1F8
/* 1AD82C 8027EF4C 24020022 */ addiu $v0, $zero, 0x22
/* 1AD830 8027EF50 122200A9 */ beq $s1, $v0, .L8027F1F8
/* 1AD834 8027EF54 00000000 */ nop
/* 1AD838 8027EF58 8EC20004 */ lw $v0, 0x4($s6)
/* 1AD83C 8027EF5C 30420004 */ andi $v0, $v0, 0x4
/* 1AD840 8027EF60 144000A5 */ bnez $v0, .L8027F1F8
/* 1AD844 8027EF64 3C030008 */ lui $v1, (0x80000 >> 16)
/* 1AD848 8027EF68 8E820190 */ lw $v0, 0x190($s4)
/* 1AD84C 8027EF6C 00431024 */ and $v0, $v0, $v1
/* 1AD850 8027EF70 10400008 */ beqz $v0, .L8027EF94
/* 1AD854 8027EF74 0260202D */ daddu $a0, $s3, $zero
/* 1AD858 8027EF78 2405000A */ addiu $a1, $zero, 0xA
/* 1AD85C 8027EF7C 0C099ADE */ jal try_inflict_status
/* 1AD860 8027EF80 24060027 */ addiu $a2, $zero, 0x27
/* 1AD864 8027EF84 10400003 */ beqz $v0, .L8027EF94
/* 1AD868 8027EF88 00000000 */ nop
/* 1AD86C 8027EF8C 241E0001 */ addiu $fp, $zero, 0x1
/* 1AD870 8027EF90 03C0A82D */ daddu $s5, $fp, $zero
.L8027EF94:
/* 1AD874 8027EF94 8E820190 */ lw $v0, 0x190($s4)
/* 1AD878 8027EF98 3C030002 */ lui $v1, (0x20000 >> 16)
/* 1AD87C 8027EF9C 00431024 */ and $v0, $v0, $v1
/* 1AD880 8027EFA0 10400008 */ beqz $v0, .L8027EFC4
/* 1AD884 8027EFA4 0260202D */ daddu $a0, $s3, $zero
/* 1AD888 8027EFA8 24050009 */ addiu $a1, $zero, 0x9
/* 1AD88C 8027EFAC 0C099ADE */ jal try_inflict_status
/* 1AD890 8027EFB0 24060025 */ addiu $a2, $zero, 0x25
/* 1AD894 8027EFB4 10400003 */ beqz $v0, .L8027EFC4
/* 1AD898 8027EFB8 00000000 */ nop
/* 1AD89C 8027EFBC 241E0001 */ addiu $fp, $zero, 0x1
/* 1AD8A0 8027EFC0 03C0A82D */ daddu $s5, $fp, $zero
.L8027EFC4:
/* 1AD8A4 8027EFC4 8E820190 */ lw $v0, 0x190($s4)
/* 1AD8A8 8027EFC8 3C030010 */ lui $v1, (0x100000 >> 16)
/* 1AD8AC 8027EFCC 00431024 */ and $v0, $v0, $v1
/* 1AD8B0 8027EFD0 10400008 */ beqz $v0, .L8027EFF4
/* 1AD8B4 8027EFD4 0260202D */ daddu $a0, $s3, $zero
/* 1AD8B8 8027EFD8 2405000C */ addiu $a1, $zero, 0xC
/* 1AD8BC 8027EFDC 0C099ADE */ jal try_inflict_status
/* 1AD8C0 8027EFE0 24060028 */ addiu $a2, $zero, 0x28
/* 1AD8C4 8027EFE4 10400003 */ beqz $v0, .L8027EFF4
/* 1AD8C8 8027EFE8 00000000 */ nop
/* 1AD8CC 8027EFEC 241E0001 */ addiu $fp, $zero, 0x1
/* 1AD8D0 8027EFF0 03C0A82D */ daddu $s5, $fp, $zero
.L8027EFF4:
/* 1AD8D4 8027EFF4 8E820190 */ lw $v0, 0x190($s4)
/* 1AD8D8 8027EFF8 30421000 */ andi $v0, $v0, 0x1000
/* 1AD8DC 8027EFFC 10400008 */ beqz $v0, .L8027F020
/* 1AD8E0 8027F000 0260202D */ daddu $a0, $s3, $zero
/* 1AD8E4 8027F004 24050006 */ addiu $a1, $zero, 0x6
/* 1AD8E8 8027F008 0C099ADE */ jal try_inflict_status
/* 1AD8EC 8027F00C 24060020 */ addiu $a2, $zero, 0x20
/* 1AD8F0 8027F010 10400003 */ beqz $v0, .L8027F020
/* 1AD8F4 8027F014 00000000 */ nop
/* 1AD8F8 8027F018 241E0001 */ addiu $fp, $zero, 0x1
/* 1AD8FC 8027F01C 03C0A82D */ daddu $s5, $fp, $zero
.L8027F020:
/* 1AD900 8027F020 8E820190 */ lw $v0, 0x190($s4)
/* 1AD904 8027F024 3C030020 */ lui $v1, (0x200000 >> 16)
/* 1AD908 8027F028 00431024 */ and $v0, $v0, $v1
/* 1AD90C 8027F02C 10400008 */ beqz $v0, .L8027F050
/* 1AD910 8027F030 0260202D */ daddu $a0, $s3, $zero
/* 1AD914 8027F034 24050008 */ addiu $a1, $zero, 0x8
/* 1AD918 8027F038 0C099ADE */ jal try_inflict_status
/* 1AD91C 8027F03C 24060029 */ addiu $a2, $zero, 0x29
/* 1AD920 8027F040 10400003 */ beqz $v0, .L8027F050
/* 1AD924 8027F044 00000000 */ nop
/* 1AD928 8027F048 241E0001 */ addiu $fp, $zero, 0x1
/* 1AD92C 8027F04C 03C0A82D */ daddu $s5, $fp, $zero
.L8027F050:
/* 1AD930 8027F050 8E820190 */ lw $v0, 0x190($s4)
/* 1AD934 8027F054 30422000 */ andi $v0, $v0, 0x2000
/* 1AD938 8027F058 10400008 */ beqz $v0, .L8027F07C
/* 1AD93C 8027F05C 0260202D */ daddu $a0, $s3, $zero
/* 1AD940 8027F060 2405000B */ addiu $a1, $zero, 0xB
/* 1AD944 8027F064 0C099ADE */ jal try_inflict_status
/* 1AD948 8027F068 24060021 */ addiu $a2, $zero, 0x21
/* 1AD94C 8027F06C 10400003 */ beqz $v0, .L8027F07C
/* 1AD950 8027F070 00000000 */ nop
/* 1AD954 8027F074 241E0001 */ addiu $fp, $zero, 0x1
/* 1AD958 8027F078 03C0A82D */ daddu $s5, $fp, $zero
.L8027F07C:
/* 1AD95C 8027F07C 8E820190 */ lw $v0, 0x190($s4)
/* 1AD960 8027F080 30428000 */ andi $v0, $v0, 0x8000
/* 1AD964 8027F084 10400008 */ beqz $v0, .L8027F0A8
/* 1AD968 8027F088 0260202D */ daddu $a0, $s3, $zero
/* 1AD96C 8027F08C 24050003 */ addiu $a1, $zero, 0x3
/* 1AD970 8027F090 0C099ADE */ jal try_inflict_status
/* 1AD974 8027F094 24060023 */ addiu $a2, $zero, 0x23
/* 1AD978 8027F098 10400003 */ beqz $v0, .L8027F0A8
/* 1AD97C 8027F09C 00000000 */ nop
/* 1AD980 8027F0A0 241E0001 */ addiu $fp, $zero, 0x1
/* 1AD984 8027F0A4 03C0A82D */ daddu $s5, $fp, $zero
.L8027F0A8:
/* 1AD988 8027F0A8 8E820190 */ lw $v0, 0x190($s4)
/* 1AD98C 8027F0AC 3C030001 */ lui $v1, (0x10000 >> 16)
/* 1AD990 8027F0B0 00431024 */ and $v0, $v0, $v1
/* 1AD994 8027F0B4 10400008 */ beqz $v0, .L8027F0D8
/* 1AD998 8027F0B8 0260202D */ daddu $a0, $s3, $zero
/* 1AD99C 8027F0BC 24050005 */ addiu $a1, $zero, 0x5
/* 1AD9A0 8027F0C0 0C099ADE */ jal try_inflict_status
/* 1AD9A4 8027F0C4 24060026 */ addiu $a2, $zero, 0x26
/* 1AD9A8 8027F0C8 10400003 */ beqz $v0, .L8027F0D8
/* 1AD9AC 8027F0CC 00000000 */ nop
/* 1AD9B0 8027F0D0 241E0001 */ addiu $fp, $zero, 0x1
/* 1AD9B4 8027F0D4 03C0A82D */ daddu $s5, $fp, $zero
.L8027F0D8:
/* 1AD9B8 8027F0D8 8E820190 */ lw $v0, 0x190($s4)
/* 1AD9BC 8027F0DC 3C030004 */ lui $v1, (0x40000 >> 16)
/* 1AD9C0 8027F0E0 00431024 */ and $v0, $v0, $v1
/* 1AD9C4 8027F0E4 10400008 */ beqz $v0, .L8027F108
/* 1AD9C8 8027F0E8 0260202D */ daddu $a0, $s3, $zero
/* 1AD9CC 8027F0EC 24050004 */ addiu $a1, $zero, 0x4
/* 1AD9D0 8027F0F0 0C099ADE */ jal try_inflict_status
/* 1AD9D4 8027F0F4 24060024 */ addiu $a2, $zero, 0x24
/* 1AD9D8 8027F0F8 10400003 */ beqz $v0, .L8027F108
/* 1AD9DC 8027F0FC 00000000 */ nop
/* 1AD9E0 8027F100 241E0001 */ addiu $fp, $zero, 0x1
/* 1AD9E4 8027F104 03C0A82D */ daddu $s5, $fp, $zero
.L8027F108:
/* 1AD9E8 8027F108 8E620008 */ lw $v0, 0x8($s3)
/* 1AD9EC 8027F10C 9050001B */ lbu $s0, 0x1B($v0)
/* 1AD9F0 8027F110 5E000001 */ bgtzl $s0, .L8027F118
/* 1AD9F4 8027F114 24100064 */ addiu $s0, $zero, 0x64
.L8027F118:
/* 1AD9F8 8027F118 92820194 */ lbu $v0, 0x194($s4)
/* 1AD9FC 8027F11C 00500018 */ mult $v0, $s0
/* 1ADA00 8027F120 00001012 */ mflo $v0
/* 1ADA04 8027F124 3C0351EB */ lui $v1, (0x51EB851F >> 16)
/* 1ADA08 8027F128 3463851F */ ori $v1, $v1, (0x51EB851F & 0xFFFF)
/* 1ADA0C 8027F12C 00430018 */ mult $v0, $v1
/* 1ADA10 8027F130 000217C3 */ sra $v0, $v0, 31
/* 1ADA14 8027F134 00001810 */ mfhi $v1
/* 1ADA18 8027F138 00031943 */ sra $v1, $v1, 5
/* 1ADA1C 8027F13C 00628023 */ subu $s0, $v1, $v0
/* 1ADA20 8027F140 8E820190 */ lw $v0, 0x190($s4)
/* 1ADA24 8027F144 3C030040 */ lui $v1, (0x400000 >> 16)
/* 1ADA28 8027F148 00431024 */ and $v0, $v0, $v1
/* 1ADA2C 8027F14C 10400023 */ beqz $v0, .L8027F1DC
/* 1ADA30 8027F150 00000000 */ nop
/* 1ADA34 8027F154 0C00A67F */ jal rand_int
/* 1ADA38 8027F158 24040063 */ addiu $a0, $zero, 0x63
/* 1ADA3C 8027F15C 0050102A */ slt $v0, $v0, $s0
/* 1ADA40 8027F160 1040001C */ beqz $v0, .L8027F1D4
/* 1ADA44 8027F164 24110019 */ addiu $s1, $zero, 0x19
/* 1ADA48 8027F168 92620210 */ lbu $v0, 0x210($s3)
/* 1ADA4C 8027F16C 2442FFFD */ addiu $v0, $v0, -0x3
/* 1ADA50 8027F170 2C420006 */ sltiu $v0, $v0, 0x6
/* 1ADA54 8027F174 14400018 */ bnez $v0, .L8027F1D8
/* 1ADA58 8027F178 24080002 */ addiu $t0, $zero, 0x2
/* 1ADA5C 8027F17C 8E620000 */ lw $v0, 0x0($s3)
/* 1ADA60 8027F180 30420400 */ andi $v0, $v0, 0x400
/* 1ADA64 8027F184 14400014 */ bnez $v0, .L8027F1D8
/* 1ADA68 8027F188 00000000 */ nop
/* 1ADA6C 8027F18C 24110039 */ addiu $s1, $zero, 0x39
/* 1ADA70 8027F190 24150001 */ addiu $s5, $zero, 0x1
/* 1ADA74 8027F194 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1ADA78 8027F198 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
/* 1ADA7C 8027F19C AFA0001C */ sw $zero, 0x1C($sp)
/* 1ADA80 8027F1A0 8C430000 */ lw $v1, 0x0($v0)
/* 1ADA84 8027F1A4 02A0F02D */ daddu $fp, $s5, $zero
/* 1ADA88 8027F1A8 34630079 */ ori $v1, $v1, 0x79
/* 1ADA8C 8027F1AC AC430000 */ sw $v1, 0x0($v0)
/* 1ADA90 8027F1B0 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADA94 8027F1B4 24040231 */ addiu $a0, $zero, 0x231
/* 1ADA98 8027F1B8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ADA9C 8027F1BC 8E46000C */ lw $a2, 0xC($s2)
/* 1ADAA0 8027F1C0 8E470010 */ lw $a3, 0x10($s2)
/* 1ADAA4 8027F1C4 0C052757 */ jal sfx_play_sound_at_position
/* 1ADAA8 8027F1C8 0000282D */ daddu $a1, $zero, $zero
/* 1ADAAC 8027F1CC 0809FC77 */ j .L8027F1DC
/* 1ADAB0 8027F1D0 00000000 */ nop
.L8027F1D4:
/* 1ADAB4 8027F1D4 24080002 */ addiu $t0, $zero, 0x2
.L8027F1D8:
/* 1ADAB8 8027F1D8 AFA8001C */ sw $t0, 0x1C($sp)
.L8027F1DC:
/* 1ADABC 8027F1DC 12A00006 */ beqz $s5, .L8027F1F8
/* 1ADAC0 8027F1E0 24020017 */ addiu $v0, $zero, 0x17
/* 1ADAC4 8027F1E4 52220001 */ beql $s1, $v0, .L8027F1EC
/* 1ADAC8 8027F1E8 24110009 */ addiu $s1, $zero, 0x9
.L8027F1EC:
/* 1ADACC 8027F1EC 24020019 */ addiu $v0, $zero, 0x19
/* 1ADAD0 8027F1F0 52220001 */ beql $s1, $v0, .L8027F1F8
/* 1ADAD4 8027F1F4 2411000A */ addiu $s1, $zero, 0xA
.L8027F1F8:
/* 1ADAD8 8027F1F8 8E620008 */ lw $v0, 0x8($s3)
/* 1ADADC 8027F1FC 92830194 */ lbu $v1, 0x194($s4)
/* 1ADAE0 8027F200 9050001B */ lbu $s0, 0x1B($v0)
/* 1ADAE4 8027F204 00700018 */ mult $v1, $s0
/* 1ADAE8 8027F208 00001812 */ mflo $v1
/* 1ADAEC 8027F20C 3C0251EB */ lui $v0, (0x51EB851F >> 16)
/* 1ADAF0 8027F210 3442851F */ ori $v0, $v0, (0x51EB851F & 0xFFFF)
/* 1ADAF4 8027F214 00620018 */ mult $v1, $v0
/* 1ADAF8 8027F218 3C17800E */ lui $s7, %hi(gBattleStatus)
/* 1ADAFC 8027F21C 26F7C070 */ addiu $s7, $s7, %lo(gBattleStatus)
/* 1ADB00 8027F220 8EE20000 */ lw $v0, 0x0($s7)
/* 1ADB04 8027F224 00031FC3 */ sra $v1, $v1, 31
/* 1ADB08 8027F228 30420020 */ andi $v0, $v0, 0x20
/* 1ADB0C 8027F22C 00004810 */ mfhi $t1
/* 1ADB10 8027F230 00092143 */ sra $a0, $t1, 5
/* 1ADB14 8027F234 10400025 */ beqz $v0, .L8027F2CC
/* 1ADB18 8027F238 00838023 */ subu $s0, $a0, $v1
/* 1ADB1C 8027F23C 8E820188 */ lw $v0, 0x188($s4)
/* 1ADB20 8027F240 30421000 */ andi $v0, $v0, 0x1000
/* 1ADB24 8027F244 10400022 */ beqz $v0, .L8027F2D0
/* 1ADB28 8027F248 0260202D */ daddu $a0, $s3, $zero
/* 1ADB2C 8027F24C 0C00A67F */ jal rand_int
/* 1ADB30 8027F250 24040063 */ addiu $a0, $zero, 0x63
/* 1ADB34 8027F254 0050102A */ slt $v0, $v0, $s0
/* 1ADB38 8027F258 1040001A */ beqz $v0, .L8027F2C4
/* 1ADB3C 8027F25C 24110019 */ addiu $s1, $zero, 0x19
/* 1ADB40 8027F260 92620210 */ lbu $v0, 0x210($s3)
/* 1ADB44 8027F264 2442FFFD */ addiu $v0, $v0, -0x3
/* 1ADB48 8027F268 2C420006 */ sltiu $v0, $v0, 0x6
/* 1ADB4C 8027F26C 14400016 */ bnez $v0, .L8027F2C8
/* 1ADB50 8027F270 24080002 */ addiu $t0, $zero, 0x2
/* 1ADB54 8027F274 8E620000 */ lw $v0, 0x0($s3)
/* 1ADB58 8027F278 30420400 */ andi $v0, $v0, 0x400
/* 1ADB5C 8027F27C 14400012 */ bnez $v0, .L8027F2C8
/* 1ADB60 8027F280 00000000 */ nop
/* 1ADB64 8027F284 24110039 */ addiu $s1, $zero, 0x39
/* 1ADB68 8027F288 24150001 */ addiu $s5, $zero, 0x1
/* 1ADB6C 8027F28C AFA0001C */ sw $zero, 0x1C($sp)
/* 1ADB70 8027F290 8EE20000 */ lw $v0, 0x0($s7)
/* 1ADB74 8027F294 02A0F02D */ daddu $fp, $s5, $zero
/* 1ADB78 8027F298 34420079 */ ori $v0, $v0, 0x79
/* 1ADB7C 8027F29C AEE20000 */ sw $v0, 0x0($s7)
/* 1ADB80 8027F2A0 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADB84 8027F2A4 24040231 */ addiu $a0, $zero, 0x231
/* 1ADB88 8027F2A8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ADB8C 8027F2AC 8E46000C */ lw $a2, 0xC($s2)
/* 1ADB90 8027F2B0 8E470010 */ lw $a3, 0x10($s2)
/* 1ADB94 8027F2B4 0C052757 */ jal sfx_play_sound_at_position
/* 1ADB98 8027F2B8 0000282D */ daddu $a1, $zero, $zero
/* 1ADB9C 8027F2BC 0809FCB4 */ j .L8027F2D0
/* 1ADBA0 8027F2C0 0260202D */ daddu $a0, $s3, $zero
.L8027F2C4:
/* 1ADBA4 8027F2C4 24080002 */ addiu $t0, $zero, 0x2
.L8027F2C8:
/* 1ADBA8 8027F2C8 AFA8001C */ sw $t0, 0x1C($sp)
.L8027F2CC:
/* 1ADBAC 8027F2CC 0260202D */ daddu $a0, $s3, $zero
.L8027F2D0:
/* 1ADBB0 8027F2D0 0220282D */ daddu $a1, $s1, $zero
/* 1ADBB4 8027F2D4 0C09DC58 */ jal dispatch_event_actor
/* 1ADBB8 8027F2D8 A2950199 */ sb $s5, 0x199($s4)
/* 1ADBBC 8027F2DC 8E620000 */ lw $v0, 0x0($s3)
/* 1ADBC0 8027F2E0 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 1ADBC4 8027F2E4 00431024 */ and $v0, $v0, $v1
/* 1ADBC8 8027F2E8 1440002F */ bnez $v0, .L8027F3A8
/* 1ADBCC 8027F2EC 00000000 */ nop
/* 1ADBD0 8027F2F0 86870180 */ lh $a3, 0x180($s4)
/* 1ADBD4 8027F2F4 14E0000F */ bnez $a3, .L8027F334
/* 1ADBD8 8027F2F8 00000000 */ nop
/* 1ADBDC 8027F2FC 17C0002C */ bnez $fp, .L8027F3B0
/* 1ADBE0 8027F300 00000000 */ nop
/* 1ADBE4 8027F304 16A00028 */ bnez $s5, .L8027F3A8
/* 1ADBE8 8027F308 24020001 */ addiu $v0, $zero, 0x1
/* 1ADBEC 8027F30C AFA20010 */ sw $v0, 0x10($sp)
/* 1ADBF0 8027F310 24020003 */ addiu $v0, $zero, 0x3
/* 1ADBF4 8027F314 AFA20014 */ sw $v0, 0x14($sp)
/* 1ADBF8 8027F318 C64C000C */ lwc1 $f12, 0xC($s2)
/* 1ADBFC 8027F31C C64E0010 */ lwc1 $f14, 0x10($s2)
/* 1ADC00 8027F320 8E460014 */ lw $a2, 0x14($s2)
/* 1ADC04 8027F324 0C093BF8 */ jal func_8024EFE0
/* 1ADC08 8027F328 0000382D */ daddu $a3, $zero, $zero
/* 1ADC0C 8027F32C 0809FCEA */ j .L8027F3A8
/* 1ADC10 8027F330 00000000 */ nop
.L8027F334:
/* 1ADC14 8027F334 8FA80020 */ lw $t0, 0x20($sp)
/* 1ADC18 8027F338 1500001B */ bnez $t0, .L8027F3A8
/* 1ADC1C 8027F33C 3C032000 */ lui $v1, (0x20000040 >> 16)
/* 1ADC20 8027F340 8E820188 */ lw $v0, 0x188($s4)
/* 1ADC24 8027F344 34630040 */ ori $v1, $v1, (0x20000040 & 0xFFFF)
/* 1ADC28 8027F348 00431024 */ and $v0, $v0, $v1
/* 1ADC2C 8027F34C 10400007 */ beqz $v0, .L8027F36C
/* 1ADC30 8027F350 AFA00010 */ sw $zero, 0x10($sp)
/* 1ADC34 8027F354 C64C000C */ lwc1 $f12, 0xC($s2)
/* 1ADC38 8027F358 C64E0010 */ lwc1 $f14, 0x10($s2)
/* 1ADC3C 8027F35C 0C09996B */ jal show_next_damage_popup
/* 1ADC40 8027F360 8E460014 */ lw $a2, 0x14($s2)
/* 1ADC44 8027F364 0809FCDF */ j .L8027F37C
/* 1ADC48 8027F368 00000000 */ nop
.L8027F36C:
/* 1ADC4C 8027F36C C64C000C */ lwc1 $f12, 0xC($s2)
/* 1ADC50 8027F370 C64E0010 */ lwc1 $f14, 0x10($s2)
/* 1ADC54 8027F374 0C099937 */ jal show_primary_damage_popup
/* 1ADC58 8027F378 8E460014 */ lw $a2, 0x14($s2)
.L8027F37C:
/* 1ADC5C 8027F37C 8EC20004 */ lw $v0, 0x4($s6)
/* 1ADC60 8027F380 30420004 */ andi $v0, $v0, 0x4
/* 1ADC64 8027F384 14400008 */ bnez $v0, .L8027F3A8
/* 1ADC68 8027F388 00000000 */ nop
/* 1ADC6C 8027F38C 86820180 */ lh $v0, 0x180($s4)
/* 1ADC70 8027F390 AFA20010 */ sw $v0, 0x10($sp)
/* 1ADC74 8027F394 8E45000C */ lw $a1, 0xC($s2)
/* 1ADC78 8027F398 8E460010 */ lw $a2, 0x10($s2)
/* 1ADC7C 8027F39C 8E470014 */ lw $a3, 0x14($s2)
/* 1ADC80 8027F3A0 0C0999B9 */ jal show_damage_fx
/* 1ADC84 8027F3A4 0260202D */ daddu $a0, $s3, $zero
.L8027F3A8:
/* 1ADC88 8027F3A8 13C00006 */ beqz $fp, .L8027F3C4
/* 1ADC8C 8027F3AC 00000000 */ nop
.L8027F3B0:
/* 1ADC90 8027F3B0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1ADC94 8027F3B4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1ADC98 8027F3B8 30420240 */ andi $v0, $v0, 0x240
/* 1ADC9C 8027F3BC 14400008 */ bnez $v0, .L8027F3E0
/* 1ADCA0 8027F3C0 00000000 */ nop
.L8027F3C4:
/* 1ADCA4 8027F3C4 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1ADCA8 8027F3C8 8C63C070 */ lw $v1, %lo(gBattleStatus)($v1)
/* 1ADCAC 8027F3CC 30620240 */ andi $v0, $v1, 0x240
/* 1ADCB0 8027F3D0 10400025 */ beqz $v0, .L8027F468
/* 1ADCB4 8027F3D4 30620080 */ andi $v0, $v1, 0x80
/* 1ADCB8 8027F3D8 14400023 */ bnez $v0, .L8027F468
/* 1ADCBC 8027F3DC 00000000 */ nop
.L8027F3E0:
/* 1ADCC0 8027F3E0 86820180 */ lh $v0, 0x180($s4)
/* 1ADCC4 8027F3E4 1840000A */ blez $v0, .L8027F410
/* 1ADCC8 8027F3E8 24040231 */ addiu $a0, $zero, 0x231
/* 1ADCCC 8027F3EC C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADCD0 8027F3F0 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ADCD4 8027F3F4 8E46000C */ lw $a2, 0xC($s2)
/* 1ADCD8 8027F3F8 8E470010 */ lw $a3, 0x10($s2)
/* 1ADCDC 8027F3FC 0C052757 */ jal sfx_play_sound_at_position
/* 1ADCE0 8027F400 0000282D */ daddu $a1, $zero, $zero
/* 1ADCE4 8027F404 86820180 */ lh $v0, 0x180($s4)
/* 1ADCE8 8027F408 1C400008 */ bgtz $v0, .L8027F42C
/* 1ADCEC 8027F40C 00000000 */ nop
.L8027F410:
/* 1ADCF0 8027F410 8E820188 */ lw $v0, 0x188($s4)
/* 1ADCF4 8027F414 3C034000 */ lui $v1, (0x40000000 >> 16)
/* 1ADCF8 8027F418 00431024 */ and $v0, $v0, $v1
/* 1ADCFC 8027F41C 10400012 */ beqz $v0, .L8027F468
/* 1ADD00 8027F420 00000000 */ nop
/* 1ADD04 8027F424 13C00010 */ beqz $fp, .L8027F468
/* 1ADD08 8027F428 00000000 */ nop
.L8027F42C:
/* 1ADD0C 8027F42C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1ADD10 8027F430 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1ADD14 8027F434 30420040 */ andi $v0, $v0, 0x40
/* 1ADD18 8027F438 10400004 */ beqz $v0, .L8027F44C
/* 1ADD1C 8027F43C 0000202D */ daddu $a0, $zero, $zero
/* 1ADD20 8027F440 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADD24 8027F444 0809FD16 */ j .L8027F458
/* 1ADD28 8027F448 E7A00010 */ swc1 $f0, 0x10($sp)
.L8027F44C:
/* 1ADD2C 8027F44C C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADD30 8027F450 24040003 */ addiu $a0, $zero, 0x3
/* 1ADD34 8027F454 E7A00010 */ swc1 $f0, 0x10($sp)
.L8027F458:
/* 1ADD38 8027F458 8E46000C */ lw $a2, 0xC($s2)
/* 1ADD3C 8027F45C 8E470010 */ lw $a3, 0x10($s2)
/* 1ADD40 8027F460 0C0999FC */ jal show_action_rating
/* 1ADD44 8027F464 0260282D */ daddu $a1, $s3, $zero
.L8027F468:
/* 1ADD48 8027F468 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1ADD4C 8027F46C 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1ADD50 8027F470 30420020 */ andi $v0, $v0, 0x20
/* 1ADD54 8027F474 10400003 */ beqz $v0, .L8027F484
/* 1ADD58 8027F478 00000000 */ nop
/* 1ADD5C 8027F47C 0C099A5C */ jal func_80266970
/* 1ADD60 8027F480 0260202D */ daddu $a0, $s3, $zero
.L8027F484:
/* 1ADD64 8027F484 86820180 */ lh $v0, 0x180($s4)
/* 1ADD68 8027F488 1840002E */ blez $v0, .L8027F544
/* 1ADD6C 8027F48C 00000000 */ nop
/* 1ADD70 8027F490 8FA80020 */ lw $t0, 0x20($sp)
/* 1ADD74 8027F494 15000029 */ bnez $t0, .L8027F53C
/* 1ADD78 8027F498 00000000 */ nop
/* 1ADD7C 8027F49C 8FA80018 */ lw $t0, 0x18($sp)
/* 1ADD80 8027F4A0 8D0201B0 */ lw $v0, 0x1B0($t0)
/* 1ADD84 8027F4A4 10400009 */ beqz $v0, .L8027F4CC
/* 1ADD88 8027F4A8 0260202D */ daddu $a0, $s3, $zero
/* 1ADD8C 8027F4AC C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADD90 8027F4B0 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ADD94 8027F4B4 8D0401B0 */ lw $a0, 0x1B0($t0)
/* 1ADD98 8027F4B8 8E46000C */ lw $a2, 0xC($s2)
/* 1ADD9C 8027F4BC 8E470010 */ lw $a3, 0x10($s2)
/* 1ADDA0 8027F4C0 0C052757 */ jal sfx_play_sound_at_position
/* 1ADDA4 8027F4C4 0000282D */ daddu $a1, $zero, $zero
/* 1ADDA8 8027F4C8 0260202D */ daddu $a0, $s3, $zero
.L8027F4CC:
/* 1ADDAC 8027F4CC 0C099C06 */ jal func_80267018
/* 1ADDB0 8027F4D0 24050001 */ addiu $a1, $zero, 0x1
/* 1ADDB4 8027F4D4 8FA80024 */ lw $t0, 0x24($sp)
/* 1ADDB8 8027F4D8 11000004 */ beqz $t0, .L8027F4EC
/* 1ADDBC 8027F4DC 240400EA */ addiu $a0, $zero, 0xEA
/* 1ADDC0 8027F4E0 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADDC4 8027F4E4 0809FD4A */ j .L8027F528
/* 1ADDC8 8027F4E8 E7A00010 */ swc1 $f0, 0x10($sp)
.L8027F4EC:
/* 1ADDCC 8027F4EC 8FA80028 */ lw $t0, 0x28($sp)
/* 1ADDD0 8027F4F0 11000004 */ beqz $t0, .L8027F504
/* 1ADDD4 8027F4F4 2404037B */ addiu $a0, $zero, 0x37B
/* 1ADDD8 8027F4F8 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADDDC 8027F4FC 0809FD4A */ j .L8027F528
/* 1ADDE0 8027F500 E7A00010 */ swc1 $f0, 0x10($sp)
.L8027F504:
/* 1ADDE4 8027F504 8FA8002C */ lw $t0, 0x2C($sp)
/* 1ADDE8 8027F508 11000004 */ beqz $t0, .L8027F51C
/* 1ADDEC 8027F50C 240400EB */ addiu $a0, $zero, 0xEB
/* 1ADDF0 8027F510 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADDF4 8027F514 0809FD4A */ j .L8027F528
/* 1ADDF8 8027F518 E7A00010 */ swc1 $f0, 0x10($sp)
.L8027F51C:
/* 1ADDFC 8027F51C C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADE00 8027F520 240400E9 */ addiu $a0, $zero, 0xE9
/* 1ADE04 8027F524 E7A00010 */ swc1 $f0, 0x10($sp)
.L8027F528:
/* 1ADE08 8027F528 8E46000C */ lw $a2, 0xC($s2)
/* 1ADE0C 8027F52C 8E470010 */ lw $a3, 0x10($s2)
/* 1ADE10 8027F530 0C052757 */ jal sfx_play_sound_at_position
/* 1ADE14 8027F534 0000282D */ daddu $a1, $zero, $zero
/* 1ADE18 8027F538 86820180 */ lh $v0, 0x180($s4)
.L8027F53C:
/* 1ADE1C 8027F53C 1C400005 */ bgtz $v0, .L8027F554
/* 1ADE20 8027F540 00000000 */ nop
.L8027F544:
/* 1ADE24 8027F544 17C00003 */ bnez $fp, .L8027F554
/* 1ADE28 8027F548 00000000 */ nop
/* 1ADE2C 8027F54C 12A00005 */ beqz $s5, .L8027F564
/* 1ADE30 8027F550 00000000 */ nop
.L8027F554:
/* 1ADE34 8027F554 8EC20000 */ lw $v0, 0x0($s6)
/* 1ADE38 8027F558 30422000 */ andi $v0, $v0, 0x2000
/* 1ADE3C 8027F55C 10400008 */ beqz $v0, .L8027F580
/* 1ADE40 8027F560 00000000 */ nop
.L8027F564:
/* 1ADE44 8027F564 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADE48 8027F568 2404010C */ addiu $a0, $zero, 0x10C
/* 1ADE4C 8027F56C E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ADE50 8027F570 8E46000C */ lw $a2, 0xC($s2)
/* 1ADE54 8027F574 8E470010 */ lw $a3, 0x10($s2)
/* 1ADE58 8027F578 0C052757 */ jal sfx_play_sound_at_position
/* 1ADE5C 8027F57C 0000282D */ daddu $a1, $zero, $zero
.L8027F580:
/* 1ADE60 8027F580 8E820190 */ lw $v0, 0x190($s4)
/* 1ADE64 8027F584 30421000 */ andi $v0, $v0, 0x1000
/* 1ADE68 8027F588 10400018 */ beqz $v0, .L8027F5EC
/* 1ADE6C 8027F58C 00000000 */ nop
/* 1ADE70 8027F590 12A00016 */ beqz $s5, .L8027F5EC
/* 1ADE74 8027F594 00000000 */ nop
/* 1ADE78 8027F598 3C048029 */ lui $a0, %hi(EVS_PlaySleepHitFX)
/* 1ADE7C 8027F59C 248445E0 */ addiu $a0, $a0, %lo(EVS_PlaySleepHitFX)
/* 1ADE80 8027F5A0 2405000A */ addiu $a1, $zero, 0xA
/* 1ADE84 8027F5A4 0C0B0CF8 */ jal start_script
/* 1ADE88 8027F5A8 0000302D */ daddu $a2, $zero, $zero
/* 1ADE8C 8027F5AC C640000C */ lwc1 $f0, 0xC($s2)
/* 1ADE90 8027F5B0 4600018D */ trunc.w.s $f6, $f0
/* 1ADE94 8027F5B4 E4460084 */ swc1 $f6, 0x84($v0)
/* 1ADE98 8027F5B8 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1ADE9C 8027F5BC 4600018D */ trunc.w.s $f6, $f0
/* 1ADEA0 8027F5C0 E4460088 */ swc1 $f6, 0x88($v0)
/* 1ADEA4 8027F5C4 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADEA8 8027F5C8 4600018D */ trunc.w.s $f6, $f0
/* 1ADEAC 8027F5CC E446008C */ swc1 $f6, 0x8C($v0)
/* 1ADEB0 8027F5D0 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADEB4 8027F5D4 24042031 */ addiu $a0, $zero, 0x2031
/* 1ADEB8 8027F5D8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ADEBC 8027F5DC 8E46000C */ lw $a2, 0xC($s2)
/* 1ADEC0 8027F5E0 8E470010 */ lw $a3, 0x10($s2)
/* 1ADEC4 8027F5E4 0C052757 */ jal sfx_play_sound_at_position
/* 1ADEC8 8027F5E8 0000282D */ daddu $a1, $zero, $zero
.L8027F5EC:
/* 1ADECC 8027F5EC 8E820190 */ lw $v0, 0x190($s4)
/* 1ADED0 8027F5F0 3C030004 */ lui $v1, (0x40000 >> 16)
/* 1ADED4 8027F5F4 00431024 */ and $v0, $v0, $v1
/* 1ADED8 8027F5F8 10400018 */ beqz $v0, .L8027F65C
/* 1ADEDC 8027F5FC 00000000 */ nop
/* 1ADEE0 8027F600 12A00016 */ beqz $s5, .L8027F65C
/* 1ADEE4 8027F604 00000000 */ nop
/* 1ADEE8 8027F608 3C048029 */ lui $a0, %hi(EVS_PlayDizzyHitFX)
/* 1ADEEC 8027F60C 248445FC */ addiu $a0, $a0, %lo(EVS_PlayDizzyHitFX)
/* 1ADEF0 8027F610 2405000A */ addiu $a1, $zero, 0xA
/* 1ADEF4 8027F614 0C0B0CF8 */ jal start_script
/* 1ADEF8 8027F618 0000302D */ daddu $a2, $zero, $zero
/* 1ADEFC 8027F61C C640000C */ lwc1 $f0, 0xC($s2)
/* 1ADF00 8027F620 4600018D */ trunc.w.s $f6, $f0
/* 1ADF04 8027F624 E4460084 */ swc1 $f6, 0x84($v0)
/* 1ADF08 8027F628 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1ADF0C 8027F62C 4600018D */ trunc.w.s $f6, $f0
/* 1ADF10 8027F630 E4460088 */ swc1 $f6, 0x88($v0)
/* 1ADF14 8027F634 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADF18 8027F638 4600018D */ trunc.w.s $f6, $f0
/* 1ADF1C 8027F63C E446008C */ swc1 $f6, 0x8C($v0)
/* 1ADF20 8027F640 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADF24 8027F644 24042032 */ addiu $a0, $zero, 0x2032
/* 1ADF28 8027F648 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ADF2C 8027F64C 8E46000C */ lw $a2, 0xC($s2)
/* 1ADF30 8027F650 8E470010 */ lw $a3, 0x10($s2)
/* 1ADF34 8027F654 0C052757 */ jal sfx_play_sound_at_position
/* 1ADF38 8027F658 0000282D */ daddu $a1, $zero, $zero
.L8027F65C:
/* 1ADF3C 8027F65C 8E820190 */ lw $v0, 0x190($s4)
/* 1ADF40 8027F660 3C030001 */ lui $v1, (0x10000 >> 16)
/* 1ADF44 8027F664 00431024 */ and $v0, $v0, $v1
/* 1ADF48 8027F668 10400018 */ beqz $v0, .L8027F6CC
/* 1ADF4C 8027F66C 00000000 */ nop
/* 1ADF50 8027F670 12A00016 */ beqz $s5, .L8027F6CC
/* 1ADF54 8027F674 00000000 */ nop
/* 1ADF58 8027F678 3C048029 */ lui $a0, %hi(EVS_PlayParalyzeHitFX)
/* 1ADF5C 8027F67C 24844618 */ addiu $a0, $a0, %lo(EVS_PlayParalyzeHitFX)
/* 1ADF60 8027F680 2405000A */ addiu $a1, $zero, 0xA
/* 1ADF64 8027F684 0C0B0CF8 */ jal start_script
/* 1ADF68 8027F688 0000302D */ daddu $a2, $zero, $zero
/* 1ADF6C 8027F68C C640000C */ lwc1 $f0, 0xC($s2)
/* 1ADF70 8027F690 4600018D */ trunc.w.s $f6, $f0
/* 1ADF74 8027F694 E4460084 */ swc1 $f6, 0x84($v0)
/* 1ADF78 8027F698 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1ADF7C 8027F69C 4600018D */ trunc.w.s $f6, $f0
/* 1ADF80 8027F6A0 E4460088 */ swc1 $f6, 0x88($v0)
/* 1ADF84 8027F6A4 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADF88 8027F6A8 4600018D */ trunc.w.s $f6, $f0
/* 1ADF8C 8027F6AC E446008C */ swc1 $f6, 0x8C($v0)
/* 1ADF90 8027F6B0 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADF94 8027F6B4 24042032 */ addiu $a0, $zero, 0x2032
/* 1ADF98 8027F6B8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1ADF9C 8027F6BC 8E46000C */ lw $a2, 0xC($s2)
/* 1ADFA0 8027F6C0 8E470010 */ lw $a3, 0x10($s2)
/* 1ADFA4 8027F6C4 0C052757 */ jal sfx_play_sound_at_position
/* 1ADFA8 8027F6C8 0000282D */ daddu $a1, $zero, $zero
.L8027F6CC:
/* 1ADFAC 8027F6CC 8E820190 */ lw $v0, 0x190($s4)
/* 1ADFB0 8027F6D0 3C030002 */ lui $v1, (0x20000 >> 16)
/* 1ADFB4 8027F6D4 00431024 */ and $v0, $v0, $v1
/* 1ADFB8 8027F6D8 10400018 */ beqz $v0, .L8027F73C
/* 1ADFBC 8027F6DC 00000000 */ nop
/* 1ADFC0 8027F6E0 12A00016 */ beqz $s5, .L8027F73C
/* 1ADFC4 8027F6E4 00000000 */ nop
/* 1ADFC8 8027F6E8 3C048029 */ lui $a0, %hi(EVS_PlayPoisonHitFX)
/* 1ADFCC 8027F6EC 24844634 */ addiu $a0, $a0, %lo(EVS_PlayPoisonHitFX)
/* 1ADFD0 8027F6F0 2405000A */ addiu $a1, $zero, 0xA
/* 1ADFD4 8027F6F4 0C0B0CF8 */ jal start_script
/* 1ADFD8 8027F6F8 0000302D */ daddu $a2, $zero, $zero
/* 1ADFDC 8027F6FC C640000C */ lwc1 $f0, 0xC($s2)
/* 1ADFE0 8027F700 4600018D */ trunc.w.s $f6, $f0
/* 1ADFE4 8027F704 E4460084 */ swc1 $f6, 0x84($v0)
/* 1ADFE8 8027F708 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1ADFEC 8027F70C 4600018D */ trunc.w.s $f6, $f0
/* 1ADFF0 8027F710 E4460088 */ swc1 $f6, 0x88($v0)
/* 1ADFF4 8027F714 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1ADFF8 8027F718 4600018D */ trunc.w.s $f6, $f0
/* 1ADFFC 8027F71C E446008C */ swc1 $f6, 0x8C($v0)
/* 1AE000 8027F720 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1AE004 8027F724 24042032 */ addiu $a0, $zero, 0x2032
/* 1AE008 8027F728 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1AE00C 8027F72C 8E46000C */ lw $a2, 0xC($s2)
/* 1AE010 8027F730 8E470010 */ lw $a3, 0x10($s2)
/* 1AE014 8027F734 0C052757 */ jal sfx_play_sound_at_position
/* 1AE018 8027F738 0000282D */ daddu $a1, $zero, $zero
.L8027F73C:
/* 1AE01C 8027F73C 8E820190 */ lw $v0, 0x190($s4)
/* 1AE020 8027F740 3C030020 */ lui $v1, (0x200000 >> 16)
/* 1AE024 8027F744 00431024 */ and $v0, $v0, $v1
/* 1AE028 8027F748 10400018 */ beqz $v0, .L8027F7AC
/* 1AE02C 8027F74C 00000000 */ nop
/* 1AE030 8027F750 12A00016 */ beqz $s5, .L8027F7AC
/* 1AE034 8027F754 00000000 */ nop
/* 1AE038 8027F758 3C048029 */ lui $a0, %hi(EVS_PlayStopHitFX)
/* 1AE03C 8027F75C 24844650 */ addiu $a0, $a0, %lo(EVS_PlayStopHitFX)
/* 1AE040 8027F760 2405000A */ addiu $a1, $zero, 0xA
/* 1AE044 8027F764 0C0B0CF8 */ jal start_script
/* 1AE048 8027F768 0000302D */ daddu $a2, $zero, $zero
/* 1AE04C 8027F76C C640000C */ lwc1 $f0, 0xC($s2)
/* 1AE050 8027F770 4600018D */ trunc.w.s $f6, $f0
/* 1AE054 8027F774 E4460084 */ swc1 $f6, 0x84($v0)
/* 1AE058 8027F778 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1AE05C 8027F77C 4600018D */ trunc.w.s $f6, $f0
/* 1AE060 8027F780 E4460088 */ swc1 $f6, 0x88($v0)
/* 1AE064 8027F784 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1AE068 8027F788 4600018D */ trunc.w.s $f6, $f0
/* 1AE06C 8027F78C E446008C */ swc1 $f6, 0x8C($v0)
/* 1AE070 8027F790 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1AE074 8027F794 24042032 */ addiu $a0, $zero, 0x2032
/* 1AE078 8027F798 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1AE07C 8027F79C 8E46000C */ lw $a2, 0xC($s2)
/* 1AE080 8027F7A0 8E470010 */ lw $a3, 0x10($s2)
/* 1AE084 8027F7A4 0C052757 */ jal sfx_play_sound_at_position
/* 1AE088 8027F7A8 0000282D */ daddu $a1, $zero, $zero
.L8027F7AC:
/* 1AE08C 8027F7AC 8E820190 */ lw $v0, 0x190($s4)
/* 1AE090 8027F7B0 30424000 */ andi $v0, $v0, 0x4000
/* 1AE094 8027F7B4 10400019 */ beqz $v0, .L8027F81C
/* 1AE098 8027F7B8 00000000 */ nop
/* 1AE09C 8027F7BC 12A00017 */ beqz $s5, .L8027F81C
/* 1AE0A0 8027F7C0 00000000 */ nop
/* 1AE0A4 8027F7C4 3C048029 */ lui $a0, %hi(EVS_PlayFreezeHitFX)
/* 1AE0A8 8027F7C8 2484466C */ addiu $a0, $a0, %lo(EVS_PlayFreezeHitFX)
/* 1AE0AC 8027F7CC 2405000A */ addiu $a1, $zero, 0xA
/* 1AE0B0 8027F7D0 0C0B0CF8 */ jal start_script
/* 1AE0B4 8027F7D4 0000302D */ daddu $a2, $zero, $zero
/* 1AE0B8 8027F7D8 C640000C */ lwc1 $f0, 0xC($s2)
/* 1AE0BC 8027F7DC 4600018D */ trunc.w.s $f6, $f0
/* 1AE0C0 8027F7E0 E4460084 */ swc1 $f6, 0x84($v0)
/* 1AE0C4 8027F7E4 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1AE0C8 8027F7E8 4600018D */ trunc.w.s $f6, $f0
/* 1AE0CC 8027F7EC E4460088 */ swc1 $f6, 0x88($v0)
/* 1AE0D0 8027F7F0 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1AE0D4 8027F7F4 AC530090 */ sw $s3, 0x90($v0)
/* 1AE0D8 8027F7F8 4600018D */ trunc.w.s $f6, $f0
/* 1AE0DC 8027F7FC E446008C */ swc1 $f6, 0x8C($v0)
/* 1AE0E0 8027F800 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1AE0E4 8027F804 240400EB */ addiu $a0, $zero, 0xEB
/* 1AE0E8 8027F808 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1AE0EC 8027F80C 8E46000C */ lw $a2, 0xC($s2)
/* 1AE0F0 8027F810 8E470010 */ lw $a3, 0x10($s2)
/* 1AE0F4 8027F814 0C052757 */ jal sfx_play_sound_at_position
/* 1AE0F8 8027F818 0000282D */ daddu $a1, $zero, $zero
.L8027F81C:
/* 1AE0FC 8027F81C 8E820190 */ lw $v0, 0x190($s4)
/* 1AE100 8027F820 3C030008 */ lui $v1, (0x80000 >> 16)
/* 1AE104 8027F824 00431024 */ and $v0, $v0, $v1
/* 1AE108 8027F828 10400019 */ beqz $v0, .L8027F890
/* 1AE10C 8027F82C 00000000 */ nop
/* 1AE110 8027F830 12A00017 */ beqz $s5, .L8027F890
/* 1AE114 8027F834 00000000 */ nop
/* 1AE118 8027F838 3C048029 */ lui $a0, %hi(EVS_PlayShrinkHitFX)
/* 1AE11C 8027F83C 248446B8 */ addiu $a0, $a0, %lo(EVS_PlayShrinkHitFX)
/* 1AE120 8027F840 2405000A */ addiu $a1, $zero, 0xA
/* 1AE124 8027F844 0C0B0CF8 */ jal start_script
/* 1AE128 8027F848 0000302D */ daddu $a2, $zero, $zero
/* 1AE12C 8027F84C C640000C */ lwc1 $f0, 0xC($s2)
/* 1AE130 8027F850 4600018D */ trunc.w.s $f6, $f0
/* 1AE134 8027F854 E4460084 */ swc1 $f6, 0x84($v0)
/* 1AE138 8027F858 C6400010 */ lwc1 $f0, 0x10($s2)
/* 1AE13C 8027F85C 4600018D */ trunc.w.s $f6, $f0
/* 1AE140 8027F860 E4460088 */ swc1 $f6, 0x88($v0)
/* 1AE144 8027F864 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1AE148 8027F868 AC530090 */ sw $s3, 0x90($v0)
/* 1AE14C 8027F86C 4600018D */ trunc.w.s $f6, $f0
/* 1AE150 8027F870 E446008C */ swc1 $f6, 0x8C($v0)
/* 1AE154 8027F874 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1AE158 8027F878 24042032 */ addiu $a0, $zero, 0x2032
/* 1AE15C 8027F87C E7A00010 */ swc1 $f0, 0x10($sp)
/* 1AE160 8027F880 8E46000C */ lw $a2, 0xC($s2)
/* 1AE164 8027F884 8E470010 */ lw $a3, 0x10($s2)
/* 1AE168 8027F888 0C052757 */ jal sfx_play_sound_at_position
/* 1AE16C 8027F88C 0000282D */ daddu $a1, $zero, $zero
.L8027F890:
/* 1AE170 8027F890 8E820188 */ lw $v0, 0x188($s4)
/* 1AE174 8027F894 30420040 */ andi $v0, $v0, 0x40
/* 1AE178 8027F898 1040000A */ beqz $v0, .L8027F8C4
/* 1AE17C 8027F89C 24020093 */ addiu $v0, $zero, 0x93
/* 1AE180 8027F8A0 92630136 */ lbu $v1, 0x136($s3)
/* 1AE184 8027F8A4 14620007 */ bne $v1, $v0, .L8027F8C4
/* 1AE188 8027F8A8 24040165 */ addiu $a0, $zero, 0x165
/* 1AE18C 8027F8AC C6400014 */ lwc1 $f0, 0x14($s2)
/* 1AE190 8027F8B0 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1AE194 8027F8B4 8E46000C */ lw $a2, 0xC($s2)
/* 1AE198 8027F8B8 8E470010 */ lw $a3, 0x10($s2)
/* 1AE19C 8027F8BC 0C052757 */ jal sfx_play_sound_at_position
/* 1AE1A0 8027F8C0 0000282D */ daddu $a1, $zero, $zero
.L8027F8C4:
/* 1AE1A4 8027F8C4 0C099AB7 */ jal show_actor_health_bar
/* 1AE1A8 8027F8C8 0260202D */ daddu $a0, $s3, $zero
/* 1AE1AC 8027F8CC 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1AE1B0 8027F8D0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1AE1B4 8027F8D4 30420240 */ andi $v0, $v0, 0x240
/* 1AE1B8 8027F8D8 1040000A */ beqz $v0, .L8027F904
/* 1AE1BC 8027F8DC 00000000 */ nop
/* 1AE1C0 8027F8E0 8FA8001C */ lw $t0, 0x1C($sp)
/* 1AE1C4 8027F8E4 15000004 */ bnez $t0, .L8027F8F8
/* 1AE1C8 8027F8E8 24020002 */ addiu $v0, $zero, 0x2
/* 1AE1CC 8027F8EC 24080001 */ addiu $t0, $zero, 0x1
/* 1AE1D0 8027F8F0 AFA8001C */ sw $t0, 0x1C($sp)
/* 1AE1D4 8027F8F4 8FA8001C */ lw $t0, 0x1C($sp)
.L8027F8F8:
/* 1AE1D8 8027F8F8 15020002 */ bne $t0, $v0, .L8027F904
/* 1AE1DC 8027F8FC 24080003 */ addiu $t0, $zero, 0x3
/* 1AE1E0 8027F900 AFA8001C */ sw $t0, 0x1C($sp)
.L8027F904:
/* 1AE1E4 8027F904 8FA80018 */ lw $t0, 0x18($sp)
/* 1AE1E8 8027F908 81020212 */ lb $v0, 0x212($t0)
/* 1AE1EC 8027F90C 2403000B */ addiu $v1, $zero, 0xB
/* 1AE1F0 8027F910 10430021 */ beq $v0, $v1, .L8027F998
/* 1AE1F4 8027F914 00000000 */ nop
/* 1AE1F8 8027F918 82620212 */ lb $v0, 0x212($s3)
/* 1AE1FC 8027F91C 10430005 */ beq $v0, $v1, .L8027F934
/* 1AE200 8027F920 00000000 */ nop
/* 1AE204 8027F924 8EC2007C */ lw $v0, 0x7C($s6)
/* 1AE208 8027F928 30420080 */ andi $v0, $v0, 0x80
/* 1AE20C 8027F92C 1040001A */ beqz $v0, .L8027F998
/* 1AE210 8027F930 00000000 */ nop
.L8027F934:
/* 1AE214 8027F934 8E820188 */ lw $v0, 0x188($s4)
/* 1AE218 8027F938 3C031000 */ lui $v1, (0x10000000 >> 16)
/* 1AE21C 8027F93C 00431024 */ and $v0, $v0, $v1
/* 1AE220 8027F940 14400015 */ bnez $v0, .L8027F998
/* 1AE224 8027F944 00000000 */ nop
/* 1AE228 8027F948 8E82018C */ lw $v0, 0x18C($s4)
/* 1AE22C 8027F94C 30420008 */ andi $v0, $v0, 0x8
/* 1AE230 8027F950 14400011 */ bnez $v0, .L8027F998
/* 1AE234 8027F954 00000000 */ nop
.L8027F958:
/* 1AE238 8027F958 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1AE23C 8027F95C 2404037B */ addiu $a0, $zero, 0x37B
/* 1AE240 8027F960 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1AE244 8027F964 8E46000C */ lw $a2, 0xC($s2)
/* 1AE248 8027F968 8E470010 */ lw $a3, 0x10($s2)
/* 1AE24C 8027F96C 0C052757 */ jal sfx_play_sound_at_position
/* 1AE250 8027F970 0000282D */ daddu $a1, $zero, $zero
/* 1AE254 8027F974 8FA40018 */ lw $a0, 0x18($sp)
/* 1AE258 8027F978 0C09451D */ jal apply_shock_effect
/* 1AE25C 8027F97C 00000000 */ nop
/* 1AE260 8027F980 24040001 */ addiu $a0, $zero, 0x1
/* 1AE264 8027F984 2405002F */ addiu $a1, $zero, 0x2F
.L8027F988:
/* 1AE268 8027F988 0C09FEE7 */ jal dispatch_damage_event_partner_1
/* 1AE26C 8027F98C 00000000 */ nop
/* 1AE270 8027F990 0809FE67 */ j .L8027F99C
/* 1AE274 8027F994 2402FFFF */ addiu $v0, $zero, -0x1
.L8027F998:
/* 1AE278 8027F998 8FA2001C */ lw $v0, 0x1C($sp)
.L8027F99C:
/* 1AE27C 8027F99C 8FBF0054 */ lw $ra, 0x54($sp)
/* 1AE280 8027F9A0 8FBE0050 */ lw $fp, 0x50($sp)
/* 1AE284 8027F9A4 8FB7004C */ lw $s7, 0x4C($sp)
/* 1AE288 8027F9A8 8FB60048 */ lw $s6, 0x48($sp)
/* 1AE28C 8027F9AC 8FB50044 */ lw $s5, 0x44($sp)
/* 1AE290 8027F9B0 8FB40040 */ lw $s4, 0x40($sp)
/* 1AE294 8027F9B4 8FB3003C */ lw $s3, 0x3C($sp)
/* 1AE298 8027F9B8 8FB20038 */ lw $s2, 0x38($sp)
/* 1AE29C 8027F9BC 8FB10034 */ lw $s1, 0x34($sp)
/* 1AE2A0 8027F9C0 8FB00030 */ lw $s0, 0x30($sp)
/* 1AE2A4 8027F9C4 03E00008 */ jr $ra
/* 1AE2A8 8027F9C8 27BD0058 */ addiu $sp, $sp, 0x58
### DECOMPILED C INSTRUCTIONS:
HitResult calc_partner_damage_enemy(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* partner = battleStatus->partnerActor;
s32 currentTargetID = battleStatus->currentTargetID;
s32 currentTargetPartID = battleStatus->currentTargetPart;
s32 retVal;
s32 partImmuneToElement = FALSE;
s32 isFireDamage = FALSE;
s32 isWaterDamage = FALSE;
s32 isShockDamage = FALSE;
s32 isIceDamage = FALSE;
s32 tempBinary = FALSE;
s32 wasStatusInflicted = FALSE;
Actor* target;
ActorPart* targetPart;
ActorState* state;
Evt* evt;
s32 statusChanceOrDefense;
s32 damageDealt;
s32 dispatchEvent;
battleStatus->wasStatusInflicted = FALSE;
battleStatus->lastAttackDamage = 0;
battleStatus->attackerActorID = partner->actorID;
battleStatus->currentTargetID2 = battleStatus->currentTargetID;
battleStatus->currentTargetPart2 = battleStatus->currentTargetPart;
target = get_actor(currentTargetID);
state = &partner->state;
if (target == NULL) {
return HIT_RESULT_HIT;
}
targetPart = get_actor_part(target, currentTargetPartID);
ASSERT(targetPart != NULL);
target->lastDamageTaken = 0;
if (gBattleStatus.flags1 & BS_FLAGS1_FORCE_HIT_IMMUNE) {
retVal = 2;
dispatchEvent = EVENT_ZERO_DAMAGE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY
|| target->transparentStatus == STATUS_KEY_TRANSPARENT
|| (targetPart->eventFlags & ACTOR_EVENT_FLAG_800 && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE))
) {
return HIT_RESULT_MISS;
}
if (target->stoneStatus == STATUS_KEY_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 1);
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
if (targetPart->elementalImmunities & battleStatus->currentAttackElement) {
partImmuneToElement = TRUE;
}
// check jumping on spiky enemy
if (battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
}
// check explode on contact
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_CONTACT
) {
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
if (!(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_EXPLODE_CONTACT)) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_BURN_CONTACT);
return HIT_RESULT_BACKFIRE;
}
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
// check touching fiery enemy
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH))
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_FIREY
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_BURN_CONTACT)
) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_BURN_CONTACT);
dispatch_event_actor(target, EVENT_BURN_TAUNT);
return HIT_RESULT_BACKFIRE;
}
// check touching spiky-front enemy
if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_JUMP))
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_FRONT
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SPIKY_FRONT)
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
}
// check explode on ignition
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE
&& targetPart->eventFlags & (ACTOR_EVENT_FLAG_FIRE_EXPLODE | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
// unknown alternate spiky #1
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_200000
&& !(target->flags & ACTOR_FLAG_UPSIDE_DOWN)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_FLAG_80)
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
}
// unknown alternate spiky top
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP
&& !(target->flags & ACTOR_FLAG_UPSIDE_DOWN)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SPIKY_TOP)
) {
sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
}
// check explode on ignition (duplicate of previous check)
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE
&& targetPart->eventFlags & (ACTOR_EVENT_FLAG_FIRE_EXPLODE | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
// check shock contact for airlift
if (battleStatus->currentAttackElement & DAMAGE_TYPE_AIR_LIFT) {
if (partner->staticStatus != STATUS_KEY_STATIC
&& (target->staticStatus == STATUS_KEY_STATIC || targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(partner);
dispatch_damage_event_partner_1(1, EVENT_SHOCK_HIT);
return HIT_RESULT_BACKFIRE;
}
return HIT_RESULT_HIT;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
fx_ring_blast(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
isFireDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SHOCK) {
apply_shock_effect(target);
isShockDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_WATER) {
fx_water_splash(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
isWaterDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_ICE) {
fx_big_snowflakes(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f);
isIceDamage = TRUE;
}
if (partner->staticStatus != STATUS_KEY_STATIC
&& (target->staticStatus == STATUS_KEY_STATIC || targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)
&& !(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SHOCK))
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
) {
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
}
if (targetPart->eventFlags & (ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED | ACTOR_EVENT_FLAG_ENCHANTED)) {
battleStatus->currentAttackElement &= ~DAMAGE_TYPE_IGNORE_DEFENSE;
}
statusChanceOrDefense = get_defense(target, targetPart->defenseTable, battleStatus->currentAttackElement);
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_IGNORE_DEFENSE)) {
statusChanceOrDefense += target->defenseBoost;
}
damageDealt = battleStatus->currentAttackDamage + partner->attackBoost;
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_BLAST
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION
) {
statusChanceOrDefense = 0;
damageDealt = target->currentHP;
}
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS) {
statusChanceOrDefense = 0;
damageDealt = 0;
}
if (partner->debuff == STATUS_KEY_SHRINK) {
if (damageDealt != 0) {
damageDealt /= 2;
if (damageDealt == 0) {
damageDealt = 1;
}
}
}
if (damageDealt > 99) {
damageDealt = 99;
}
if (damageDealt < 0) {
statusChanceOrDefense = 0;
}
damageDealt -= statusChanceOrDefense;
target->hpChangeCounter = 0;
if (damageDealt < 0) {
damageDealt = 0;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_POWER_BOUNCE && damageDealt > 0) {
damageDealt += battleStatus->powerBounceCounter;
if (damageDealt < 1) {
damageDealt = 1;
}
}
battleStatus->lastAttackDamage = 0;
if (damageDealt < 1) {
target->hpChangeCounter = 0;
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
retVal = 2;
dispatchEvent = EVENT_ZERO_DAMAGE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
retVal = 2;
if (target->currentHP < 1) {
dispatchEvent = EVENT_DEATH;
} else {
dispatchEvent = EVENT_ZERO_DAMAGE;
}
}
battleStatus->lastAttackDamage = 0;
} else {
target->damageCounter += damageDealt;
target->hpChangeCounter -= damageDealt;
battleStatus->lastAttackDamage = 0;
dispatchEvent = EVENT_HIT_COMBO;
retVal = 0;
if (!(targetPart->flags & ACTOR_PART_FLAG_2000)
&& !(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE)
&& !partImmuneToElement
&& !(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)
) {
target->currentHP -= damageDealt;
if (target->currentHP < 1) {
target->currentHP = 0;
dispatchEvent = EVENT_DEATH;
}
}
battleStatus->lastAttackDamage += damageDealt;
target->lastDamageTaken = battleStatus->lastAttackDamage;
target->hpChangeCounter = 0;
}
if (targetPart->flags & ACTOR_PART_FLAG_2000) {
if (partner->staticStatus == STATUS_KEY_STATIC
|| !(target->staticStatus == STATUS_KEY_STATIC || (targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED))
|| battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT
|| battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT
) {
dispatchEvent = (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) ? EVENT_ZERO_DAMAGE : EVENT_IMMUNE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, dispatchEvent);
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(partner);
dispatch_damage_event_partner_1(1, EVENT_SHOCK_HIT);
return HIT_RESULT_BACKFIRE;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_IMMUNE;
}
if (target->currentHP < 1) {
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_DEATH;
}
}
} else if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_HIT_COMBO;
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) {
clear_part_pal_adjustment(targetPart);
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SPIN_SMASH) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_SPIN_SMASH_HIT;
}
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_SPIN_SMASH_DEATH;
}
tempBinary = TRUE;
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT) && targetPart->eventFlags & ACTOR_EVENT_FLAG_POWER_BOUNCE) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_POWER_BOUNCE_DEATH;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP && targetPart->eventFlags & ACTOR_EVENT_FLAG_GROUNDABLE) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
tempBinary = TRUE;
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP && targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (!(target->flags & ACTOR_FLAG_FLIPPED)) {
tempBinary = TRUE;
}
}
}
}
}
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE
) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (!(target->flags & ACTOR_FLAG_FLIPPED)) {
tempBinary = TRUE;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->currentAttackElement & DAMAGE_TYPE_BLAST
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION
) {
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_EXPLODE_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_EXPLODE_TRIGGER;
}
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_EXPLODE_TRIGGER;
}
tempBinary = TRUE;
isFireDamage = TRUE;
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & (DAMAGE_TYPE_BLAST | DAMAGE_TYPE_FIRE)) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_BURN_HIT;
}
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_BURN_DEATH;
}
isFireDamage = TRUE;
}
do { // TODO remove this do while
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->lastAttackDamage >= 0
&& dispatchEvent != EVENT_DEATH
&& dispatchEvent != EVENT_SPIN_SMASH_DEATH
&& dispatchEvent != EVENT_EXPLODE_TRIGGER
&& !(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)
) {
#define INFLICT_STATUS(STATUS_TYPE) \
if ((battleStatus->currentAttackStatus & STATUS_FLAG_##STATUS_TYPE) && \
try_inflict_status(target, STATUS_KEY_##STATUS_TYPE, STATUS_TURN_MOD_##STATUS_TYPE)) { \
tempBinary = TRUE; \
wasStatusInflicted = TRUE; \
} \
INFLICT_STATUS(SHRINK);
INFLICT_STATUS(POISON);
INFLICT_STATUS(STONE);
INFLICT_STATUS(SLEEP);
INFLICT_STATUS(STOP);
INFLICT_STATUS(STATIC);
INFLICT_STATUS(FEAR);
INFLICT_STATUS(PARALYZE);
INFLICT_STATUS(DIZZY);
#undef INFLICT_STATUS
statusChanceOrDefense = target->actorBlueprint->spookChance;
if (statusChanceOrDefense > 0) {
statusChanceOrDefense = 100;
}
statusChanceOrDefense = (battleStatus->statusChance * statusChanceOrDefense) / 100;
if (battleStatus->currentAttackStatus & STATUS_FLAG_400000) {
if (rand_int(99) < statusChanceOrDefense) {
if (!(target->debuff == STATUS_KEY_FEAR
|| target->debuff == STATUS_KEY_DIZZY
|| target->debuff == STATUS_KEY_PARALYZE
|| target->debuff == STATUS_KEY_SLEEP
|| target->debuff == STATUS_KEY_FROZEN
|| target->debuff == STATUS_KEY_STOP)
&& !(target->flags & ACTOR_FLAG_FLIPPED)
) {
dispatchEvent = EVENT_SCARE_AWAY;
wasStatusInflicted = TRUE;
retVal = 0;
tempBinary = TRUE;
gBattleStatus.flags1 |= (BS_FLAGS1_40 | BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_SHOW_PLAYER_DECORATIONS | BS_FLAGS1_ACTORS_VISIBLE);
sfx_play_sound_at_position(SOUND_231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
dispatchEvent = EVENT_IMMUNE;
retVal = 2;
}
} else {
dispatchEvent = EVENT_IMMUNE;
retVal = 2;
}
}
if (wasStatusInflicted) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_HIT_COMBO;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_HIT;
}
}
}
} while (0);
}
statusChanceOrDefense = target->actorBlueprint->spookChance;
statusChanceOrDefense = (battleStatus->statusChance * statusChanceOrDefense) / 100;
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FEAR) {
if (rand_int(99) < statusChanceOrDefense) {
if (!(target->debuff == STATUS_KEY_FEAR ||
target->debuff == STATUS_KEY_DIZZY ||
target->debuff == STATUS_KEY_PARALYZE ||
target->debuff == STATUS_KEY_SLEEP ||
target->debuff == STATUS_KEY_FROZEN ||
target->debuff == STATUS_KEY_STOP) && !(target->flags & ACTOR_FLAG_FLIPPED)) {
dispatchEvent = EVENT_SCARE_AWAY;
wasStatusInflicted = TRUE;
retVal = 0;
tempBinary = TRUE;
gBattleStatus.flags1 |= (BS_FLAGS1_40 | BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_SHOW_PLAYER_DECORATIONS | BS_FLAGS1_ACTORS_VISIBLE);
sfx_play_sound_at_position(SOUND_231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
dispatchEvent = EVENT_IMMUNE;
retVal = 2;
}
} else {
dispatchEvent = EVENT_IMMUNE;
retVal = 2;
}
}
}
battleStatus->wasStatusInflicted = wasStatusInflicted;
dispatch_event_actor(target, dispatchEvent);
if (!(target->flags & ACTOR_FLAG_NO_DMG_POPUP)) {
if (battleStatus->lastAttackDamage == 0) {
if (!tempBinary && !wasStatusInflicted) {
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
}
} else if (!partImmuneToElement) {
if (battleStatus->currentAttackElement & (DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_SMASH)) {
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
} else {
show_primary_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
}
if (!(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)) {
show_damage_fx(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
}
}
}
if (tempBinary
&& gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)
|| gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)
&& !(gBattleStatus.flags1 & BS_FLAGS1_80)
) {
if (battleStatus->lastAttackDamage > 0) {
sfx_play_sound_at_position(SOUND_231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->lastAttackDamage > 0 || (battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS && tempBinary)) {
if (gBattleStatus.flags1 & BS_FLAGS1_40) {
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
show_action_rating(ACTION_RATING_SUPER, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
func_80266970(target);
}
if (battleStatus->lastAttackDamage > 0) {
if (partImmuneToElement == 0) {
if (partner->actorTypeData1[5] != 0) {
sfx_play_sound_at_position(partner->actorTypeData1[5], SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
func_80267018(target, 1);
if (isFireDamage) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isShockDamage) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isIceDamage) {
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
}
if (battleStatus->lastAttackDamage < 1
&& !(tempBinary || wasStatusInflicted)
|| targetPart->flags & ACTOR_PART_FLAG_2000
) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP && wasStatusInflicted) {
evt = start_script((EvtScript*) EVS_PlaySleepHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY && wasStatusInflicted) {
evt = start_script((EvtScript*) EVS_PlayDizzyHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE && wasStatusInflicted) {
evt = start_script((EvtScript*) EVS_PlayParalyzeHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_POISON && wasStatusInflicted) {
evt = start_script((EvtScript*) EVS_PlayPoisonHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_STOP && wasStatusInflicted) {
evt = start_script((EvtScript*) EVS_PlayStopHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_FROZEN && wasStatusInflicted) {
evt = start_script((EvtScript*) EVS_PlayFreezeHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
evt->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK && wasStatusInflicted) {
evt = start_script((EvtScript*) EVS_PlayShrinkHitFX, EVT_PRIORITY_A, 0);
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
evt->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SMASH && target->actorType == ACTOR_TYPE_GOOMNUT_TREE) {
sfx_play_sound_at_position(SOUND_SMASH_GOOMNUT_TREE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
show_actor_health_bar(target);
if (gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)) {
if (retVal == 0) {
retVal = 1;
}
if (retVal == 2) {
retVal = 3;
}
}
if (partner->staticStatus != STATUS_KEY_STATIC && (target->staticStatus == STATUS_KEY_STATIC ||
targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED) && !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT) &&
!(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(partner);
dispatch_damage_event_partner_1(1, EVENT_SHOCK_HIT);
return -1;
}
return retVal;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel partner_walking_follow_player
/* 85124 800EBC74 3C038011 */ lui $v1, %hi(wPartnerFollowState)
/* 85128 800EBC78 8463CFC8 */ lh $v1, %lo(wPartnerFollowState)($v1)
/* 8512C 800EBC7C 27BDFF98 */ addiu $sp, $sp, -0x68
/* 85130 800EBC80 AFB1003C */ sw $s1, 0x3C($sp)
/* 85134 800EBC84 AFB30044 */ sw $s3, 0x44($sp)
/* 85138 800EBC88 3C138011 */ lui $s3, %hi(gPlayerStatus)
/* 8513C 800EBC8C 2673EFC8 */ addiu $s3, $s3, %lo(gPlayerStatus)
/* 85140 800EBC90 AFB5004C */ sw $s5, 0x4C($sp)
/* 85144 800EBC94 3C15800B */ lui $s5, %hi(gCameras)
/* 85148 800EBC98 26B51D80 */ addiu $s5, $s5, %lo(gCameras)
/* 8514C 800EBC9C AFBF0050 */ sw $ra, 0x50($sp)
/* 85150 800EBCA0 AFB40048 */ sw $s4, 0x48($sp)
/* 85154 800EBCA4 AFB20040 */ sw $s2, 0x40($sp)
/* 85158 800EBCA8 AFB00038 */ sw $s0, 0x38($sp)
/* 8515C 800EBCAC F7B60060 */ sdc1 $f22, 0x60($sp)
/* 85160 800EBCB0 F7B40058 */ sdc1 $f20, 0x58($sp)
/* 85164 800EBCB4 2C620033 */ sltiu $v0, $v1, 0x33
/* 85168 800EBCB8 1040058A */ beqz $v0, .L800ED2E4
/* 8516C 800EBCBC 0080882D */ daddu $s1, $a0, $zero
/* 85170 800EBCC0 00031080 */ sll $v0, $v1, 2
/* 85174 800EBCC4 3C018011 */ lui $at, %hi(jtbl_8010C148)
/* 85178 800EBCC8 00220821 */ addu $at, $at, $v0
/* 8517C 800EBCCC 8C22C148 */ lw $v0, %lo(jtbl_8010C148)($at)
/* 85180 800EBCD0 00400008 */ jr $v0
/* 85184 800EBCD4 00000000 */ nop
.L800EBCD8:
/* 85188 800EBCD8 C634000C */ lwc1 $f20, 0xC($s1)
/* 8518C 800EBCDC 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 85190 800EBCE0 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 85194 800EBCE4 AE200018 */ sw $zero, 0x18($s1)
/* 85198 800EBCE8 AE200014 */ sw $zero, 0x14($s1)
/* 8519C 800EBCEC 000310C0 */ sll $v0, $v1, 3
/* 851A0 800EBCF0 00431021 */ addu $v0, $v0, $v1
/* 851A4 800EBCF4 00021080 */ sll $v0, $v0, 2
/* 851A8 800EBCF8 3C038010 */ lui $v1, %hi(gPartnerAnimations + 0x14)
/* 851AC 800EBCFC 00621821 */ addu $v1, $v1, $v0
/* 851B0 800EBD00 8C63835C */ lw $v1, %lo(gPartnerAnimations + 0x14)($v1)
/* 851B4 800EBD04 24020005 */ addiu $v0, $zero, 0x5
/* 851B8 800EBD08 3C018011 */ lui $at, %hi(wPartnerFollowState)
/* 851BC 800EBD0C A422CFC8 */ sh $v0, %lo(wPartnerFollowState)($at)
/* 851C0 800EBD10 0803B005 */ j .L800EC014
/* 851C4 800EBD14 AE230028 */ sw $v1, 0x28($s1)
glabel .L800EBD18
/* 851C8 800EBD18 3C038011 */ lui $v1, %hi(D_8010CD38)
/* 851CC 800EBD1C 2463CD38 */ addiu $v1, $v1, %lo(D_8010CD38)
/* 851D0 800EBD20 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 851D4 800EBD24 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 851D8 800EBD28 3C028011 */ lui $v0, %hi(D_8010CFBC)
/* 851DC 800EBD2C 8C42CFBC */ lw $v0, %lo(D_8010CFBC)($v0)
/* 851E0 800EBD30 3C014040 */ lui $at, (0x40400000 >> 16)
/* 851E4 800EBD34 44810000 */ mtc1 $at, $f0
/* 851E8 800EBD38 C622003C */ lwc1 $f2, 0x3C($s1)
/* 851EC 800EBD3C 00021100 */ sll $v0, $v0, 4
/* 851F0 800EBD40 00438021 */ addu $s0, $v0, $v1
/* 851F4 800EBD44 C6060004 */ lwc1 $f6, 0x4($s0)
/* 851F8 800EBD48 C608000C */ lwc1 $f8, 0xC($s0)
/* 851FC 800EBD4C E6200018 */ swc1 $f0, 0x18($s1)
/* 85200 800EBD50 46006006 */ mov.s $f0, $f12
/* 85204 800EBD54 8E660028 */ lw $a2, 0x28($s3)
/* 85208 800EBD58 8E670030 */ lw $a3, 0x30($s3)
/* 8520C 800EBD5C 46007106 */ mov.s $f4, $f14
/* 85210 800EBD60 E7A00028 */ swc1 $f0, 0x28($sp)
/* 85214 800EBD64 E7A2002C */ swc1 $f2, 0x2C($sp)
/* 85218 800EBD68 E7A40030 */ swc1 $f4, 0x30($sp)
/* 8521C 800EBD6C E7A60020 */ swc1 $f6, 0x20($sp)
/* 85220 800EBD70 0C00A7B5 */ jal dist2D
/* 85224 800EBD74 E7A80024 */ swc1 $f8, 0x24($sp)
/* 85228 800EBD78 3C014049 */ lui $at, (0x40490000 >> 16)
/* 8522C 800EBD7C 44811800 */ mtc1 $at, $f3
/* 85230 800EBD80 44801000 */ mtc1 $zero, $f2
/* 85234 800EBD84 E7A00034 */ swc1 $f0, 0x34($sp)
/* 85238 800EBD88 46000021 */ cvt.d.s $f0, $f0
/* 8523C 800EBD8C 4620103E */ c.le.d $f2, $f0
/* 85240 800EBD90 00000000 */ nop
/* 85244 800EBD94 4500000B */ bc1f .L800EBDC4
/* 85248 800EBD98 3C030001 */ lui $v1, (0x10000 >> 16)
/* 8524C 800EBD9C 8E620004 */ lw $v0, 0x4($s3)
/* 85250 800EBDA0 3C0140E0 */ lui $at, (0x40E00000 >> 16)
/* 85254 800EBDA4 44810000 */ mtc1 $at, $f0
/* 85258 800EBDA8 00431024 */ and $v0, $v0, $v1
/* 8525C 800EBDAC 54400005 */ bnel $v0, $zero, .L800EBDC4
/* 85260 800EBDB0 E6200018 */ swc1 $f0, 0x18($s1)
/* 85264 800EBDB4 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 85268 800EBDB8 44810000 */ mtc1 $at, $f0
/* 8526C 800EBDBC 00000000 */ nop
/* 85270 800EBDC0 E6200018 */ swc1 $f0, 0x18($s1)
.L800EBDC4:
/* 85274 800EBDC4 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 85278 800EBDC8 C420CFC0 */ lwc1 $f0, %lo(wPartnerTetherDistance)($at)
/* 8527C 800EBDCC 3C014034 */ lui $at, (0x40340000 >> 16)
/* 85280 800EBDD0 44811800 */ mtc1 $at, $f3
/* 85284 800EBDD4 44801000 */ mtc1 $zero, $f2
/* 85288 800EBDD8 46000021 */ cvt.d.s $f0, $f0
/* 8528C 800EBDDC 4622003C */ c.lt.d $f0, $f2
/* 85290 800EBDE0 00000000 */ nop
/* 85294 800EBDE4 45000005 */ bc1f .L800EBDFC
/* 85298 800EBDE8 00000000 */ nop
/* 8529C 800EBDEC 3C014080 */ lui $at, (0x40800000 >> 16)
/* 852A0 800EBDF0 44810000 */ mtc1 $at, $f0
/* 852A4 800EBDF4 00000000 */ nop
/* 852A8 800EBDF8 E6200018 */ swc1 $f0, 0x18($s1)
.L800EBDFC:
/* 852AC 800EBDFC 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 852B0 800EBE00 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 852B4 800EBE04 3C048010 */ lui $a0, %hi(gPartnerAnimations)
/* 852B8 800EBE08 24848348 */ addiu $a0, $a0, %lo(gPartnerAnimations)
/* 852BC 800EBE0C 000310C0 */ sll $v0, $v1, 3
/* 852C0 800EBE10 00431021 */ addu $v0, $v0, $v1
/* 852C4 800EBE14 00021080 */ sll $v0, $v0, 2
/* 852C8 800EBE18 00442021 */ addu $a0, $v0, $a0
/* 852CC 800EBE1C 8E220000 */ lw $v0, 0x0($s1)
/* 852D0 800EBE20 8C830018 */ lw $v1, 0x18($a0)
/* 852D4 800EBE24 30421000 */ andi $v0, $v0, 0x1000
/* 852D8 800EBE28 14400003 */ bnez $v0, .L800EBE38
/* 852DC 800EBE2C AE230028 */ sw $v1, 0x28($s1)
/* 852E0 800EBE30 8C82000C */ lw $v0, 0xC($a0)
/* 852E4 800EBE34 AE220028 */ sw $v0, 0x28($s1)
.L800EBE38:
/* 852E8 800EBE38 3C128011 */ lui $s2, %hi(D_8010CFBC)
/* 852EC 800EBE3C 2652CFBC */ addiu $s2, $s2, %lo(D_8010CFBC)
/* 852F0 800EBE40 3C148011 */ lui $s4, %hi(D_8010CD38)
/* 852F4 800EBE44 2694CD38 */ addiu $s4, $s4, %lo(D_8010CD38)
.L800EBE48:
/* 852F8 800EBE48 C7AC0028 */ lwc1 $f12, 0x28($sp)
/* 852FC 800EBE4C C7AE0030 */ lwc1 $f14, 0x30($sp)
/* 85300 800EBE50 8FA60020 */ lw $a2, 0x20($sp)
/* 85304 800EBE54 0C00A7B5 */ jal dist2D
/* 85308 800EBE58 8FA70024 */ lw $a3, 0x24($sp)
/* 8530C 800EBE5C C7AC0028 */ lwc1 $f12, 0x28($sp)
/* 85310 800EBE60 C7AE0030 */ lwc1 $f14, 0x30($sp)
/* 85314 800EBE64 8FA60020 */ lw $a2, 0x20($sp)
/* 85318 800EBE68 8FA70024 */ lw $a3, 0x24($sp)
/* 8531C 800EBE6C 0C00A720 */ jal atan2
/* 85320 800EBE70 E7A00034 */ swc1 $f0, 0x34($sp)
/* 85324 800EBE74 C6240018 */ lwc1 $f4, 0x18($s1)
/* 85328 800EBE78 C7A20034 */ lwc1 $f2, 0x34($sp)
/* 8532C 800EBE7C 4602203C */ c.lt.s $f4, $f2
/* 85330 800EBE80 00000000 */ nop
/* 85334 800EBE84 4500003B */ bc1f .L800EBF74
/* 85338 800EBE88 46000506 */ mov.s $f20, $f0
/* 8533C 800EBE8C C7AC0028 */ lwc1 $f12, 0x28($sp)
/* 85340 800EBE90 C7AE0030 */ lwc1 $f14, 0x30($sp)
/* 85344 800EBE94 8E660028 */ lw $a2, 0x28($s3)
/* 85348 800EBE98 0C00A7B5 */ jal dist2D
/* 8534C 800EBE9C 8E670030 */ lw $a3, 0x30($s3)
/* 85350 800EBEA0 3C014049 */ lui $at, (0x40490000 >> 16)
/* 85354 800EBEA4 44811800 */ mtc1 $at, $f3
/* 85358 800EBEA8 44801000 */ mtc1 $zero, $f2
/* 8535C 800EBEAC 46000106 */ mov.s $f4, $f0
/* 85360 800EBEB0 E7A00034 */ swc1 $f0, 0x34($sp)
/* 85364 800EBEB4 46002021 */ cvt.d.s $f0, $f4
/* 85368 800EBEB8 4620103E */ c.le.d $f2, $f0
/* 8536C 800EBEBC 00000000 */ nop
/* 85370 800EBEC0 45010054 */ bc1t .L800EC014
/* 85374 800EBEC4 00000000 */ nop
/* 85378 800EBEC8 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 8537C 800EBECC C426CFC0 */ lwc1 $f6, %lo(wPartnerTetherDistance)($at)
/* 85380 800EBED0 4604303C */ c.lt.s $f6, $f4
/* 85384 800EBED4 00000000 */ nop
/* 85388 800EBED8 4500001F */ bc1f .L800EBF58
/* 8538C 800EBEDC 00000000 */ nop
/* 85390 800EBEE0 46062081 */ sub.s $f2, $f4, $f6
/* 85394 800EBEE4 3C014008 */ lui $at, (0x40080000 >> 16)
/* 85398 800EBEE8 44810800 */ mtc1 $at, $f1
/* 8539C 800EBEEC 44800000 */ mtc1 $zero, $f0
/* 853A0 800EBEF0 E6220018 */ swc1 $f2, 0x18($s1)
/* 853A4 800EBEF4 460010A1 */ cvt.d.s $f2, $f2
/* 853A8 800EBEF8 4622003C */ c.lt.d $f0, $f2
/* 853AC 800EBEFC 00000000 */ nop
/* 853B0 800EBF00 4500000D */ bc1f .L800EBF38
/* 853B4 800EBF04 00000000 */ nop
/* 853B8 800EBF08 3C0141A0 */ lui $at, (0x41A00000 >> 16)
/* 853BC 800EBF0C 44810000 */ mtc1 $at, $f0
/* 853C0 800EBF10 3C014040 */ lui $at, (0x40400000 >> 16)
/* 853C4 800EBF14 44811000 */ mtc1 $at, $f2
/* 853C8 800EBF18 4600303C */ c.lt.s $f6, $f0
/* 853CC 800EBF1C 00000000 */ nop
/* 853D0 800EBF20 4500003C */ bc1f .L800EC014
/* 853D4 800EBF24 E6220018 */ swc1 $f2, 0x18($s1)
/* 853D8 800EBF28 3C014080 */ lui $at, (0x40800000 >> 16)
/* 853DC 800EBF2C 44810000 */ mtc1 $at, $f0
/* 853E0 800EBF30 0803B005 */ j .L800EC014
/* 853E4 800EBF34 E6200018 */ swc1 $f0, 0x18($s1)
.L800EBF38:
/* 853E8 800EBF38 3C013FF0 */ lui $at, (0x3FF00000 >> 16)
/* 853EC 800EBF3C 44810800 */ mtc1 $at, $f1
/* 853F0 800EBF40 44800000 */ mtc1 $zero, $f0
/* 853F4 800EBF44 00000000 */ nop
/* 853F8 800EBF48 46201000 */ add.d $f0, $f2, $f0
/* 853FC 800EBF4C 46200020 */ cvt.s.d $f0, $f0
/* 85400 800EBF50 0803B005 */ j .L800EC014
/* 85404 800EBF54 E6200018 */ swc1 $f0, 0x18($s1)
.L800EBF58:
/* 85408 800EBF58 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 8540C 800EBF5C C62E0040 */ lwc1 $f14, 0x40($s1)
/* 85410 800EBF60 AE200018 */ sw $zero, 0x18($s1)
/* 85414 800EBF64 8E660028 */ lw $a2, 0x28($s3)
/* 85418 800EBF68 0C00A720 */ jal atan2
/* 8541C 800EBF6C 8E670030 */ lw $a3, 0x30($s3)
/* 85420 800EBF70 E620000C */ swc1 $f0, 0xC($s1)
.L800EBF74:
/* 85424 800EBF74 8E430000 */ lw $v1, 0x0($s2)
/* 85428 800EBF78 3C028011 */ lui $v0, %hi(gPlayerMoveHistoryIndex)
/* 8542C 800EBF7C 8C42CFB8 */ lw $v0, %lo(gPlayerMoveHistoryIndex)($v0)
/* 85430 800EBF80 1062FF55 */ beq $v1, $v0, .L800EBCD8
/* 85434 800EBF84 24620001 */ addiu $v0, $v1, 0x1
/* 85438 800EBF88 AE420000 */ sw $v0, 0x0($s2)
/* 8543C 800EBF8C 28420028 */ slti $v0, $v0, 0x28
/* 85440 800EBF90 50400001 */ beql $v0, $zero, .L800EBF98
/* 85444 800EBF94 AE400000 */ sw $zero, 0x0($s2)
.L800EBF98:
/* 85448 800EBF98 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 8544C 800EBF9C 8E420000 */ lw $v0, 0x0($s2)
/* 85450 800EBFA0 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 85454 800EBFA4 00021100 */ sll $v0, $v0, 4
/* 85458 800EBFA8 00548021 */ addu $s0, $v0, $s4
/* 8545C 800EBFAC C6000004 */ lwc1 $f0, 0x4($s0)
/* 85460 800EBFB0 C602000C */ lwc1 $f2, 0xC($s0)
/* 85464 800EBFB4 44060000 */ mfc1 $a2, $f0
/* 85468 800EBFB8 44071000 */ mfc1 $a3, $f2
/* 8546C 800EBFBC AFA60020 */ sw $a2, 0x20($sp)
/* 85470 800EBFC0 0C00A720 */ jal atan2
/* 85474 800EBFC4 AFA70024 */ sw $a3, 0x24($sp)
/* 85478 800EBFC8 C62C000C */ lwc1 $f12, 0xC($s1)
/* 8547C 800EBFCC 0C00A70A */ jal get_clamped_angle_diff
/* 85480 800EBFD0 46000386 */ mov.s $f14, $f0
/* 85484 800EBFD4 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 85488 800EBFD8 44811000 */ mtc1 $at, $f2
/* 8548C 800EBFDC 46000005 */ abs.s $f0, $f0
/* 85490 800EBFE0 4600103C */ c.lt.s $f2, $f0
/* 85494 800EBFE4 00000000 */ nop
/* 85498 800EBFE8 45010008 */ bc1t .L800EC00C
/* 8549C 800EBFEC 24020005 */ addiu $v0, $zero, 0x5
/* 854A0 800EBFF0 8E220000 */ lw $v0, 0x0($s1)
/* 854A4 800EBFF4 30421000 */ andi $v0, $v0, 0x1000
/* 854A8 800EBFF8 1040FF93 */ beqz $v0, .L800EBE48
/* 854AC 800EBFFC 00000000 */ nop
/* 854B0 800EC000 82020000 */ lb $v0, 0x0($s0)
/* 854B4 800EC004 1040FF90 */ beqz $v0, .L800EBE48
/* 854B8 800EC008 24020001 */ addiu $v0, $zero, 0x1
.L800EC00C:
/* 854BC 800EC00C 3C018011 */ lui $at, %hi(wPartnerFollowState)
/* 854C0 800EC010 A422CFC8 */ sh $v0, %lo(wPartnerFollowState)($at)
.L800EC014:
/* 854C4 800EC014 8E220000 */ lw $v0, 0x0($s1)
/* 854C8 800EC018 30421000 */ andi $v0, $v0, 0x1000
/* 854CC 800EC01C 14400008 */ bnez $v0, .L800EC040
/* 854D0 800EC020 00000000 */ nop
/* 854D4 800EC024 C6200018 */ lwc1 $f0, 0x18($s1)
/* 854D8 800EC028 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 854DC 800EC02C 44811000 */ mtc1 $at, $f2
/* 854E0 800EC030 00000000 */ nop
/* 854E4 800EC034 46020002 */ mul.s $f0, $f0, $f2
/* 854E8 800EC038 00000000 */ nop
/* 854EC 800EC03C E6200018 */ swc1 $f0, 0x18($s1)
.L800EC040:
/* 854F0 800EC040 8E250018 */ lw $a1, 0x18($s1)
/* 854F4 800EC044 4406A000 */ mfc1 $a2, $f20
/* 854F8 800EC048 0220202D */ daddu $a0, $s1, $zero
/* 854FC 800EC04C 0C00EA95 */ jal npc_move_heading
/* 85500 800EC050 AE26000C */ sw $a2, 0xC($s1)
/* 85504 800EC054 C6200018 */ lwc1 $f0, 0x18($s1)
/* 85508 800EC058 3C014010 */ lui $at, (0x40100000 >> 16)
/* 8550C 800EC05C 44811800 */ mtc1 $at, $f3
/* 85510 800EC060 44801000 */ mtc1 $zero, $f2
/* 85514 800EC064 46000021 */ cvt.d.s $f0, $f0
/* 85518 800EC068 4622003C */ c.lt.d $f0, $f2
/* 8551C 800EC06C 00000000 */ nop
/* 85520 800EC070 45000002 */ bc1f .L800EC07C
/* 85524 800EC074 24050001 */ addiu $a1, $zero, 0x1
/* 85528 800EC078 0000282D */ daddu $a1, $zero, $zero
.L800EC07C:
/* 8552C 800EC07C 0C00F598 */ jal spawn_surface_effects
/* 85530 800EC080 0220202D */ daddu $a0, $s1, $zero
/* 85534 800EC084 86240084 */ lh $a0, 0x84($s1)
/* 85538 800EC088 0C016F6A */ jal get_collider_flags
/* 8553C 800EC08C 00000000 */ nop
/* 85540 800EC090 2442FFFE */ addiu $v0, $v0, -0x2
/* 85544 800EC094 2C420002 */ sltiu $v0, $v0, 0x2
/* 85548 800EC098 14400005 */ bnez $v0, .L800EC0B0
/* 8554C 800EC09C 24035000 */ addiu $v1, $zero, 0x5000
/* 85550 800EC0A0 8E220000 */ lw $v0, 0x0($s1)
/* 85554 800EC0A4 30425000 */ andi $v0, $v0, 0x5000
/* 85558 800EC0A8 1443048E */ bne $v0, $v1, .L800ED2E4
/* 8555C 800EC0AC 00000000 */ nop
.L800EC0B0:
/* 85560 800EC0B0 0C03A92C */ jal func_800EA4B0
/* 85564 800EC0B4 86240086 */ lh $a0, 0x86($s1)
/* 85568 800EC0B8 14400488 */ bnez $v0, .L800ED2DC
/* 8556C 800EC0BC 24020001 */ addiu $v0, $zero, 0x1
/* 85570 800EC0C0 3C038011 */ lui $v1, %hi(D_8010CFBC)
/* 85574 800EC0C4 2463CFBC */ addiu $v1, $v1, %lo(D_8010CFBC)
/* 85578 800EC0C8 8C620000 */ lw $v0, 0x0($v1)
/* 8557C 800EC0CC 24420001 */ addiu $v0, $v0, 0x1
/* 85580 800EC0D0 AC620000 */ sw $v0, 0x0($v1)
/* 85584 800EC0D4 28420028 */ slti $v0, $v0, 0x28
/* 85588 800EC0D8 50400001 */ beql $v0, $zero, .L800EC0E0
/* 8558C 800EC0DC AC600000 */ sw $zero, 0x0($v1)
.L800EC0E0:
/* 85590 800EC0E0 8C620000 */ lw $v0, 0x0($v1)
/* 85594 800EC0E4 3C038011 */ lui $v1, %hi(D_8010CD38)
/* 85598 800EC0E8 2463CD38 */ addiu $v1, $v1, %lo(D_8010CD38)
/* 8559C 800EC0EC C62C0038 */ lwc1 $f12, 0x38($s1)
/* 855A0 800EC0F0 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 855A4 800EC0F4 00021100 */ sll $v0, $v0, 4
/* 855A8 800EC0F8 00438021 */ addu $s0, $v0, $v1
/* 855AC 800EC0FC C6000004 */ lwc1 $f0, 0x4($s0)
/* 855B0 800EC100 C602000C */ lwc1 $f2, 0xC($s0)
/* 855B4 800EC104 44060000 */ mfc1 $a2, $f0
/* 855B8 800EC108 44071000 */ mfc1 $a3, $f2
/* 855BC 800EC10C AFA60020 */ sw $a2, 0x20($sp)
/* 855C0 800EC110 0C00A720 */ jal atan2
/* 855C4 800EC114 AFA70024 */ sw $a3, 0x24($sp)
/* 855C8 800EC118 C62C000C */ lwc1 $f12, 0xC($s1)
/* 855CC 800EC11C 0C00A70A */ jal get_clamped_angle_diff
/* 855D0 800EC120 46000386 */ mov.s $f14, $f0
/* 855D4 800EC124 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 855D8 800EC128 44811000 */ mtc1 $at, $f2
/* 855DC 800EC12C 46000005 */ abs.s $f0, $f0
/* 855E0 800EC130 4600103C */ c.lt.s $f2, $f0
/* 855E4 800EC134 00000000 */ nop
/* 855E8 800EC138 4500046A */ bc1f .L800ED2E4
/* 855EC 800EC13C 24020005 */ addiu $v0, $zero, 0x5
/* 855F0 800EC140 0803B4B7 */ j .L800ED2DC
/* 855F4 800EC144 00000000 */ nop
glabel .L800EC148
/* 855F8 800EC148 0C016F6A */ jal get_collider_flags
/* 855FC 800EC14C 86240084 */ lh $a0, 0x84($s1)
/* 85600 800EC150 3C058011 */ lui $a1, %hi(D_8010CFBC)
/* 85604 800EC154 24A5CFBC */ addiu $a1, $a1, %lo(D_8010CFBC)
/* 85608 800EC158 8CA40000 */ lw $a0, 0x0($a1)
/* 8560C 800EC15C 3C038011 */ lui $v1, %hi(gPlayerMoveHistoryIndex)
/* 85610 800EC160 8C63CFB8 */ lw $v1, %lo(gPlayerMoveHistoryIndex)($v1)
/* 85614 800EC164 14830016 */ bne $a0, $v1, .L800EC1C0
/* 85618 800EC168 0040902D */ daddu $s2, $v0, $zero
/* 8561C 800EC16C 2642FFFE */ addiu $v0, $s2, -0x2
/* 85620 800EC170 2C420002 */ sltiu $v0, $v0, 0x2
/* 85624 800EC174 1040045B */ beqz $v0, .L800ED2E4
/* 85628 800EC178 00000000 */ nop
/* 8562C 800EC17C C674002C */ lwc1 $f20, 0x2C($s3)
/* 85630 800EC180 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 85634 800EC184 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 85638 800EC188 8E660028 */ lw $a2, 0x28($s3)
/* 8563C 800EC18C 8E670030 */ lw $a3, 0x30($s3)
/* 85640 800EC190 46006006 */ mov.s $f0, $f12
/* 85644 800EC194 46007086 */ mov.s $f2, $f14
/* 85648 800EC198 E7A00020 */ swc1 $f0, 0x20($sp)
/* 8564C 800EC19C 0C00A720 */ jal atan2
/* 85650 800EC1A0 E7A20024 */ swc1 $f2, 0x24($sp)
/* 85654 800EC1A4 27A40020 */ addiu $a0, $sp, 0x20
/* 85658 800EC1A8 3C0640C0 */ lui $a2, (0x40C00000 >> 16)
/* 8565C 800EC1AC 44070000 */ mfc1 $a3, $f0
/* 85660 800EC1B0 0C00A7E7 */ jal add_vec2D_polar
/* 85664 800EC1B4 27A50024 */ addiu $a1, $sp, 0x24
/* 85668 800EC1B8 0803B07F */ j .L800EC1FC
/* 8566C 800EC1BC 00000000 */ nop
.L800EC1C0:
/* 85670 800EC1C0 24820001 */ addiu $v0, $a0, 0x1
/* 85674 800EC1C4 ACA20000 */ sw $v0, 0x0($a1)
/* 85678 800EC1C8 28420028 */ slti $v0, $v0, 0x28
/* 8567C 800EC1CC 50400001 */ beql $v0, $zero, .L800EC1D4
/* 85680 800EC1D0 ACA00000 */ sw $zero, 0x0($a1)
.L800EC1D4:
/* 85684 800EC1D4 8CA20000 */ lw $v0, 0x0($a1)
/* 85688 800EC1D8 3C038011 */ lui $v1, %hi(D_8010CD38)
/* 8568C 800EC1DC 2463CD38 */ addiu $v1, $v1, %lo(D_8010CD38)
/* 85690 800EC1E0 00021100 */ sll $v0, $v0, 4
/* 85694 800EC1E4 00438021 */ addu $s0, $v0, $v1
/* 85698 800EC1E8 C6000004 */ lwc1 $f0, 0x4($s0)
/* 8569C 800EC1EC C6140008 */ lwc1 $f20, 0x8($s0)
/* 856A0 800EC1F0 C602000C */ lwc1 $f2, 0xC($s0)
/* 856A4 800EC1F4 E7A00020 */ swc1 $f0, 0x20($sp)
/* 856A8 800EC1F8 E7A20024 */ swc1 $f2, 0x24($sp)
.L800EC1FC:
/* 856AC 800EC1FC C7A00020 */ lwc1 $f0, 0x20($sp)
/* 856B0 800EC200 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 856B4 800EC204 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 856B8 800EC208 3C0140C0 */ lui $at, (0x40C00000 >> 16)
/* 856BC 800EC20C 44811000 */ mtc1 $at, $f2
/* 856C0 800EC210 E6200060 */ swc1 $f0, 0x60($s1)
/* 856C4 800EC214 44060000 */ mfc1 $a2, $f0
/* 856C8 800EC218 C7A00024 */ lwc1 $f0, 0x24($sp)
/* 856CC 800EC21C E6200068 */ swc1 $f0, 0x68($s1)
/* 856D0 800EC220 44070000 */ mfc1 $a3, $f0
/* 856D4 800EC224 3C014040 */ lui $at, (0x40400000 >> 16)
/* 856D8 800EC228 44810000 */ mtc1 $at, $f0
/* 856DC 800EC22C E6340064 */ swc1 $f20, 0x64($s1)
/* 856E0 800EC230 A620008E */ sh $zero, 0x8E($s1)
/* 856E4 800EC234 E6220018 */ swc1 $f2, 0x18($s1)
/* 856E8 800EC238 0C00A7B5 */ jal dist2D
/* 856EC 800EC23C E6200014 */ swc1 $f0, 0x14($s1)
/* 856F0 800EC240 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 856F4 800EC244 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 856F8 800EC248 8E260060 */ lw $a2, 0x60($s1)
/* 856FC 800EC24C 8E270068 */ lw $a3, 0x68($s1)
/* 85700 800EC250 0C00A720 */ jal atan2
/* 85704 800EC254 E6200010 */ swc1 $f0, 0x10($s1)
/* 85708 800EC258 E620000C */ swc1 $f0, 0xC($s1)
/* 8570C 800EC25C C6200010 */ lwc1 $f0, 0x10($s1)
/* 85710 800EC260 3C014049 */ lui $at, (0x40490000 >> 16)
/* 85714 800EC264 44811800 */ mtc1 $at, $f3
/* 85718 800EC268 44801000 */ mtc1 $zero, $f2
/* 8571C 800EC26C 46000021 */ cvt.d.s $f0, $f0
/* 85720 800EC270 4620103C */ c.lt.d $f2, $f0
/* 85724 800EC274 00000000 */ nop
/* 85728 800EC278 45000005 */ bc1f .L800EC290
/* 8572C 800EC27C 00000000 */ nop
/* 85730 800EC280 3C014248 */ lui $at, (0x42480000 >> 16)
/* 85734 800EC284 44810000 */ mtc1 $at, $f0
/* 85738 800EC288 00000000 */ nop
/* 8573C 800EC28C E6200010 */ swc1 $f0, 0x10($s1)
.L800EC290:
/* 85740 800EC290 C6220064 */ lwc1 $f2, 0x64($s1)
/* 85744 800EC294 C620003C */ lwc1 $f0, 0x3C($s1)
/* 85748 800EC298 C6240010 */ lwc1 $f4, 0x10($s1)
/* 8574C 800EC29C 46001081 */ sub.s $f2, $f2, $f0
/* 85750 800EC2A0 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 85754 800EC2A4 C420CFC0 */ lwc1 $f0, %lo(wPartnerTetherDistance)($at)
/* 85758 800EC2A8 E7A40034 */ swc1 $f4, 0x34($sp)
/* 8575C 800EC2AC 4600203C */ c.lt.s $f4, $f0
/* 85760 800EC2B0 00000000 */ nop
/* 85764 800EC2B4 45000010 */ bc1f .L800EC2F8
/* 85768 800EC2B8 E7A2002C */ swc1 $f2, 0x2C($sp)
/* 8576C 800EC2BC 2642FFFE */ addiu $v0, $s2, -0x2
/* 85770 800EC2C0 2C420002 */ sltiu $v0, $v0, 0x2
/* 85774 800EC2C4 1440000C */ bnez $v0, .L800EC2F8
/* 85778 800EC2C8 00000000 */ nop
/* 8577C 800EC2CC C62C0038 */ lwc1 $f12, 0x38($s1)
/* 85780 800EC2D0 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 85784 800EC2D4 AE20001C */ sw $zero, 0x1C($s1)
/* 85788 800EC2D8 8E660028 */ lw $a2, 0x28($s3)
/* 8578C 800EC2DC 0C00A720 */ jal atan2
/* 85790 800EC2E0 8E670030 */ lw $a3, 0x30($s3)
/* 85794 800EC2E4 E620000C */ swc1 $f0, 0xC($s1)
.L800EC2E8:
/* 85798 800EC2E8 3C018011 */ lui $at, %hi(wPartnerFollowState)
/* 8579C 800EC2EC A420CFC8 */ sh $zero, %lo(wPartnerFollowState)($at)
/* 857A0 800EC2F0 0803B4B9 */ j .L800ED2E4
/* 857A4 800EC2F4 00000000 */ nop
.L800EC2F8:
/* 857A8 800EC2F8 C6220018 */ lwc1 $f2, 0x18($s1)
/* 857AC 800EC2FC C7A00034 */ lwc1 $f0, 0x34($sp)
/* 857B0 800EC300 46020003 */ div.s $f0, $f0, $f2
/* 857B4 800EC304 4600028D */ trunc.w.s $f10, $f0
/* 857B8 800EC308 44025000 */ mfc1 $v0, $f10
/* 857BC 800EC30C 00000000 */ nop
/* 857C0 800EC310 A622008E */ sh $v0, 0x8E($s1)
/* 857C4 800EC314 00021400 */ sll $v0, $v0, 16
/* 857C8 800EC318 00021403 */ sra $v0, $v0, 16
/* 857CC 800EC31C 2842000A */ slti $v0, $v0, 0xA
/* 857D0 800EC320 10400002 */ beqz $v0, .L800EC32C
/* 857D4 800EC324 2402000A */ addiu $v0, $zero, 0xA
/* 857D8 800EC328 A622008E */ sh $v0, 0x8E($s1)
.L800EC32C:
/* 857DC 800EC32C 8622008E */ lh $v0, 0x8E($s1)
/* 857E0 800EC330 C6220014 */ lwc1 $f2, 0x14($s1)
/* 857E4 800EC334 44823000 */ mtc1 $v0, $f6
/* 857E8 800EC338 00000000 */ nop
/* 857EC 800EC33C 468031A0 */ cvt.s.w $f6, $f6
/* 857F0 800EC340 46061082 */ mul.s $f2, $f2, $f6
/* 857F4 800EC344 00000000 */ nop
/* 857F8 800EC348 46061082 */ mul.s $f2, $f2, $f6
/* 857FC 800EC34C 00000000 */ nop
/* 85800 800EC350 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 85804 800EC354 44810000 */ mtc1 $at, $f0
/* 85808 800EC358 00000000 */ nop
/* 8580C 800EC35C 46001082 */ mul.s $f2, $f2, $f0
/* 85810 800EC360 00000000 */ nop
/* 85814 800EC364 C7A4002C */ lwc1 $f4, 0x2C($sp)
/* 85818 800EC368 C6200010 */ lwc1 $f0, 0x10($s1)
/* 8581C 800EC36C 46003206 */ mov.s $f8, $f6
/* 85820 800EC370 46080003 */ div.s $f0, $f0, $f8
/* 85824 800EC374 46022100 */ add.s $f4, $f4, $f2
/* 85828 800EC378 E6200018 */ swc1 $f0, 0x18($s1)
/* 8582C 800EC37C 3C014034 */ lui $at, (0x40340000 >> 16)
/* 85830 800EC380 44811800 */ mtc1 $at, $f3
/* 85834 800EC384 44801000 */ mtc1 $zero, $f2
/* 85838 800EC388 46062103 */ div.s $f4, $f4, $f6
/* 8583C 800EC38C 46002021 */ cvt.d.s $f0, $f4
/* 85840 800EC390 4620103C */ c.lt.d $f2, $f0
/* 85844 800EC394 00000000 */ nop
/* 85848 800EC398 45000005 */ bc1f .L800EC3B0
/* 8584C 800EC39C E624001C */ swc1 $f4, 0x1C($s1)
/* 85850 800EC3A0 3C0141A0 */ lui $at, (0x41A00000 >> 16)
/* 85854 800EC3A4 44810000 */ mtc1 $at, $f0
/* 85858 800EC3A8 00000000 */ nop
/* 8585C 800EC3AC E620001C */ swc1 $f0, 0x1C($s1)
.L800EC3B0:
/* 85860 800EC3B0 C620001C */ lwc1 $f0, 0x1C($s1)
/* 85864 800EC3B4 44801000 */ mtc1 $zero, $f2
/* 85868 800EC3B8 44801800 */ mtc1 $zero, $f3
/* 8586C 800EC3BC 46000021 */ cvt.d.s $f0, $f0
/* 85870 800EC3C0 4622003C */ c.lt.d $f0, $f2
/* 85874 800EC3C4 00000000 */ nop
/* 85878 800EC3C8 45030001 */ bc1tl .L800EC3D0
/* 8587C 800EC3CC AE20001C */ sw $zero, 0x1C($s1)
.L800EC3D0:
/* 85880 800EC3D0 2642FFFE */ addiu $v0, $s2, -0x2
/* 85884 800EC3D4 2C420002 */ sltiu $v0, $v0, 0x2
/* 85888 800EC3D8 1440000B */ bnez $v0, .L800EC408
/* 8588C 800EC3DC 00000000 */ nop
/* 85890 800EC3E0 3C028011 */ lui $v0, %hi(wCurrentPartnerId)
/* 85894 800EC3E4 8C42CFD8 */ lw $v0, %lo(wCurrentPartnerId)($v0)
/* 85898 800EC3E8 000218C0 */ sll $v1, $v0, 3
/* 8589C 800EC3EC 00621821 */ addu $v1, $v1, $v0
/* 858A0 800EC3F0 00031880 */ sll $v1, $v1, 2
/* 858A4 800EC3F4 3C028010 */ lui $v0, %hi(gPartnerAnimations + 0x8)
/* 858A8 800EC3F8 00431021 */ addu $v0, $v0, $v1
/* 858AC 800EC3FC 8C428350 */ lw $v0, %lo(gPartnerAnimations + 0x8)($v0)
/* 858B0 800EC400 0803B10B */ j .L800EC42C
/* 858B4 800EC404 AE220028 */ sw $v0, 0x28($s1)
.L800EC408:
/* 858B8 800EC408 3C028011 */ lui $v0, %hi(wCurrentPartnerId)
/* 858BC 800EC40C 8C42CFD8 */ lw $v0, %lo(wCurrentPartnerId)($v0)
/* 858C0 800EC410 000218C0 */ sll $v1, $v0, 3
/* 858C4 800EC414 00621821 */ addu $v1, $v1, $v0
/* 858C8 800EC418 00031880 */ sll $v1, $v1, 2
/* 858CC 800EC41C 3C028010 */ lui $v0, %hi(gPartnerAnimations + 0x20)
/* 858D0 800EC420 00431021 */ addu $v0, $v0, $v1
/* 858D4 800EC424 8C428368 */ lw $v0, %lo(gPartnerAnimations + 0x20)($v0)
/* 858D8 800EC428 AE220028 */ sw $v0, 0x28($s1)
.L800EC42C:
/* 858DC 800EC42C C6200038 */ lwc1 $f0, 0x38($s1)
/* 858E0 800EC430 C622003C */ lwc1 $f2, 0x3C($s1)
/* 858E4 800EC434 C6240040 */ lwc1 $f4, 0x40($s1)
/* 858E8 800EC438 8E230000 */ lw $v1, 0x0($s1)
/* 858EC 800EC43C 24020002 */ addiu $v0, $zero, 0x2
/* 858F0 800EC440 3C018011 */ lui $at, %hi(wPartnerFollowState)
/* 858F4 800EC444 A422CFC8 */ sh $v0, %lo(wPartnerFollowState)($at)
/* 858F8 800EC448 34630800 */ ori $v1, $v1, 0x800
/* 858FC 800EC44C E6200060 */ swc1 $f0, 0x60($s1)
/* 85900 800EC450 E6220064 */ swc1 $f2, 0x64($s1)
/* 85904 800EC454 E6240068 */ swc1 $f4, 0x68($s1)
/* 85908 800EC458 AE230000 */ sw $v1, 0x0($s1)
glabel .L800EC45C
/* 8590C 800EC45C C620001C */ lwc1 $f0, 0x1C($s1)
/* 85910 800EC460 C6220014 */ lwc1 $f2, 0x14($s1)
/* 85914 800EC464 46020001 */ sub.s $f0, $f0, $f2
/* 85918 800EC468 C622003C */ lwc1 $f2, 0x3C($s1)
/* 8591C 800EC46C 46001080 */ add.s $f2, $f2, $f0
/* 85920 800EC470 4480A000 */ mtc1 $zero, $f20
/* 85924 800EC474 00000000 */ nop
/* 85928 800EC478 4614003E */ c.le.s $f0, $f20
/* 8592C 800EC47C E620001C */ swc1 $f0, 0x1C($s1)
/* 85930 800EC480 4500000A */ bc1f .L800EC4AC
/* 85934 800EC484 E622003C */ swc1 $f2, 0x3C($s1)
/* 85938 800EC488 3C028011 */ lui $v0, %hi(wCurrentPartnerId)
/* 8593C 800EC48C 8C42CFD8 */ lw $v0, %lo(wCurrentPartnerId)($v0)
/* 85940 800EC490 000218C0 */ sll $v1, $v0, 3
/* 85944 800EC494 00621821 */ addu $v1, $v1, $v0
/* 85948 800EC498 00031880 */ sll $v1, $v1, 2
/* 8594C 800EC49C 3C028010 */ lui $v0, %hi(gPartnerAnimations + 0xC)
/* 85950 800EC4A0 00431021 */ addu $v0, $v0, $v1
/* 85954 800EC4A4 8C428354 */ lw $v0, %lo(gPartnerAnimations + 0xC)($v0)
/* 85958 800EC4A8 AE220028 */ sw $v0, 0x28($s1)
.L800EC4AC:
/* 8595C 800EC4AC C622003C */ lwc1 $f2, 0x3C($s1)
/* 85960 800EC4B0 3C01C4FA */ lui $at, (0xC4FA0000 >> 16)
/* 85964 800EC4B4 44810000 */ mtc1 $at, $f0
/* 85968 800EC4B8 00000000 */ nop
/* 8596C 800EC4BC 4600103C */ c.lt.s $f2, $f0
/* 85970 800EC4C0 00000000 */ nop
/* 85974 800EC4C4 4500001B */ bc1f .L800EC534
/* 85978 800EC4C8 2404F7FF */ addiu $a0, $zero, -0x801
/* 8597C 800EC4CC C62C0038 */ lwc1 $f12, 0x38($s1)
/* 85980 800EC4D0 3C028011 */ lui $v0, %hi(wCurrentPartnerId)
/* 85984 800EC4D4 8C42CFD8 */ lw $v0, %lo(wCurrentPartnerId)($v0)
/* 85988 800EC4D8 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 8598C 800EC4DC 000218C0 */ sll $v1, $v0, 3
/* 85990 800EC4E0 00621821 */ addu $v1, $v1, $v0
/* 85994 800EC4E4 00031880 */ sll $v1, $v1, 2
/* 85998 800EC4E8 8E220000 */ lw $v0, 0x0($s1)
/* 8599C 800EC4EC 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x10)
/* 859A0 800EC4F0 00230821 */ addu $at, $at, $v1
/* 859A4 800EC4F4 8C238358 */ lw $v1, %lo(gPartnerAnimations + 0x10)($at)
/* 859A8 800EC4F8 E634001C */ swc1 $f20, 0x1C($s1)
/* 859AC 800EC4FC 00441024 */ and $v0, $v0, $a0
/* 859B0 800EC500 AE220000 */ sw $v0, 0x0($s1)
/* 859B4 800EC504 AE230028 */ sw $v1, 0x28($s1)
/* 859B8 800EC508 8E660028 */ lw $a2, 0x28($s3)
/* 859BC 800EC50C 0C00A720 */ jal atan2
/* 859C0 800EC510 8E670030 */ lw $a3, 0x30($s3)
/* 859C4 800EC514 E620000C */ swc1 $f0, 0xC($s1)
/* 859C8 800EC518 C6600028 */ lwc1 $f0, 0x28($s3)
/* 859CC 800EC51C E6200038 */ swc1 $f0, 0x38($s1)
/* 859D0 800EC520 C660002C */ lwc1 $f0, 0x2C($s3)
/* 859D4 800EC524 E620003C */ swc1 $f0, 0x3C($s1)
/* 859D8 800EC528 C6600030 */ lwc1 $f0, 0x30($s3)
/* 859DC 800EC52C 0803B47C */ j .L800ED1F0
/* 859E0 800EC530 24020005 */ addiu $v0, $zero, 0x5
.L800EC534:
/* 859E4 800EC534 C624001C */ lwc1 $f4, 0x1C($s1)
/* 859E8 800EC538 4614203E */ c.le.s $f4, $f20
/* 859EC 800EC53C 00000000 */ nop
/* 859F0 800EC540 45000068 */ bc1f .L800EC6E4
/* 859F4 800EC544 27A50028 */ addiu $a1, $sp, 0x28
/* 859F8 800EC548 27A20034 */ addiu $v0, $sp, 0x34
/* 859FC 800EC54C C6200038 */ lwc1 $f0, 0x38($s1)
/* 85A00 800EC550 3C014130 */ lui $at, (0x41300000 >> 16)
/* 85A04 800EC554 44811000 */ mtc1 $at, $f2
/* 85A08 800EC558 27A6002C */ addiu $a2, $sp, 0x2C
/* 85A0C 800EC55C E7A00028 */ swc1 $f0, 0x28($sp)
/* 85A10 800EC560 46002005 */ abs.s $f0, $f4
/* 85A14 800EC564 46020000 */ add.s $f0, $f0, $f2
/* 85A18 800EC568 C622003C */ lwc1 $f2, 0x3C($s1)
/* 85A1C 800EC56C C6240040 */ lwc1 $f4, 0x40($s1)
/* 85A20 800EC570 46001080 */ add.s $f2, $f2, $f0
/* 85A24 800EC574 E7A40030 */ swc1 $f4, 0x30($sp)
/* 85A28 800EC578 E7A00034 */ swc1 $f0, 0x34($sp)
/* 85A2C 800EC57C E7A2002C */ swc1 $f2, 0x2C($sp)
/* 85A30 800EC580 AFA20010 */ sw $v0, 0x10($sp)
/* 85A34 800EC584 C620000C */ lwc1 $f0, 0xC($s1)
/* 85A38 800EC588 27A70030 */ addiu $a3, $sp, 0x30
/* 85A3C 800EC58C E7A00014 */ swc1 $f0, 0x14($sp)
/* 85A40 800EC590 862200A6 */ lh $v0, 0xA6($s1)
/* 85A44 800EC594 26320038 */ addiu $s2, $s1, 0x38
/* 85A48 800EC598 44820000 */ mtc1 $v0, $f0
/* 85A4C 800EC59C 00000000 */ nop
/* 85A50 800EC5A0 46800020 */ cvt.s.w $f0, $f0
/* 85A54 800EC5A4 E7A00018 */ swc1 $f0, 0x18($sp)
/* 85A58 800EC5A8 8E240080 */ lw $a0, 0x80($s1)
/* 85A5C 800EC5AC 0C0371DE */ jal npc_raycast_down_around
/* 85A60 800EC5B0 26340040 */ addiu $s4, $s1, 0x40
/* 85A64 800EC5B4 1040004B */ beqz $v0, .L800EC6E4
/* 85A68 800EC5B8 00000000 */ nop
/* 85A6C 800EC5BC C620001C */ lwc1 $f0, 0x1C($s1)
/* 85A70 800EC5C0 3C0141B0 */ lui $at, (0x41B00000 >> 16)
/* 85A74 800EC5C4 44811000 */ mtc1 $at, $f2
/* 85A78 800EC5C8 46000005 */ abs.s $f0, $f0
/* 85A7C 800EC5CC 46020000 */ add.s $f0, $f0, $f2
/* 85A80 800EC5D0 C7A20034 */ lwc1 $f2, 0x34($sp)
/* 85A84 800EC5D4 4600103E */ c.le.s $f2, $f0
/* 85A88 800EC5D8 00000000 */ nop
/* 85A8C 800EC5DC 45000041 */ bc1f .L800EC6E4
/* 85A90 800EC5E0 00000000 */ nop
/* 85A94 800EC5E4 C7AC0028 */ lwc1 $f12, 0x28($sp)
/* 85A98 800EC5E8 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 85A9C 800EC5EC 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 85AA0 800EC5F0 C7AE0030 */ lwc1 $f14, 0x30($sp)
/* 85AA4 800EC5F4 C7A0002C */ lwc1 $f0, 0x2C($sp)
/* 85AA8 800EC5F8 000310C0 */ sll $v0, $v1, 3
/* 85AAC 800EC5FC 00431021 */ addu $v0, $v0, $v1
/* 85AB0 800EC600 00021080 */ sll $v0, $v0, 2
/* 85AB4 800EC604 3C048010 */ lui $a0, %hi(gPartnerAnimations + 0x10)
/* 85AB8 800EC608 00822021 */ addu $a0, $a0, $v0
/* 85ABC 800EC60C 8C848358 */ lw $a0, %lo(gPartnerAnimations + 0x10)($a0)
/* 85AC0 800EC610 8E220000 */ lw $v0, 0x0($s1)
/* 85AC4 800EC614 2403F7FF */ addiu $v1, $zero, -0x801
/* 85AC8 800EC618 E634001C */ swc1 $f20, 0x1C($s1)
/* 85ACC 800EC61C E620003C */ swc1 $f0, 0x3C($s1)
/* 85AD0 800EC620 00431024 */ and $v0, $v0, $v1
/* 85AD4 800EC624 AE220000 */ sw $v0, 0x0($s1)
/* 85AD8 800EC628 AE240028 */ sw $a0, 0x28($s1)
/* 85ADC 800EC62C 8E660028 */ lw $a2, 0x28($s3)
/* 85AE0 800EC630 0C00A720 */ jal atan2
/* 85AE4 800EC634 8E670030 */ lw $a3, 0x30($s3)
/* 85AE8 800EC638 0220202D */ daddu $a0, $s1, $zero
/* 85AEC 800EC63C 24050002 */ addiu $a1, $zero, 0x2
/* 85AF0 800EC640 0C00F598 */ jal spawn_surface_effects
/* 85AF4 800EC644 E620000C */ swc1 $f0, 0xC($s1)
/* 85AF8 800EC648 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 85AFC 800EC64C C62E0040 */ lwc1 $f14, 0x40($s1)
/* 85B00 800EC650 8E260060 */ lw $a2, 0x60($s1)
/* 85B04 800EC654 8E270068 */ lw $a3, 0x68($s1)
/* 85B08 800EC658 3C108011 */ lui $s0, %hi(wPartnerFollowState)
/* 85B0C 800EC65C 2610CFC8 */ addiu $s0, $s0, %lo(wPartnerFollowState)
/* 85B10 800EC660 0C00A7B5 */ jal dist2D
/* 85B14 800EC664 A6000000 */ sh $zero, 0x0($s0)
/* 85B18 800EC668 3C014014 */ lui $at, (0x40140000 >> 16)
/* 85B1C 800EC66C 44811800 */ mtc1 $at, $f3
/* 85B20 800EC670 44801000 */ mtc1 $zero, $f2
/* 85B24 800EC674 E7A00034 */ swc1 $f0, 0x34($sp)
/* 85B28 800EC678 46000021 */ cvt.d.s $f0, $f0
/* 85B2C 800EC67C 4622003C */ c.lt.d $f0, $f2
/* 85B30 800EC680 00000000 */ nop
/* 85B34 800EC684 45000317 */ bc1f .L800ED2E4
/* 85B38 800EC688 00000000 */ nop
/* 85B3C 800EC68C C6600028 */ lwc1 $f0, 0x28($s3)
/* 85B40 800EC690 E6200038 */ swc1 $f0, 0x38($s1)
/* 85B44 800EC694 C660002C */ lwc1 $f0, 0x2C($s3)
/* 85B48 800EC698 E620003C */ swc1 $f0, 0x3C($s1)
/* 85B4C 800EC69C C6600030 */ lwc1 $f0, 0x30($s3)
/* 85B50 800EC6A0 E6200040 */ swc1 $f0, 0x40($s1)
/* 85B54 800EC6A4 C6AC006C */ lwc1 $f12, 0x6C($s5)
/* 85B58 800EC6A8 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 85B5C 800EC6AC 44810000 */ mtc1 $at, $f0
/* 85B60 800EC6B0 00000000 */ nop
/* 85B64 800EC6B4 46006300 */ add.s $f12, $f12, $f0
/* 85B68 800EC6B8 C66000A8 */ lwc1 $f0, 0xA8($s3)
/* 85B6C 800EC6BC 0C00A6C9 */ jal clamp_angle
/* 85B70 800EC6C0 46006301 */ sub.s $f12, $f12, $f0
/* 85B74 800EC6C4 0240202D */ daddu $a0, $s2, $zero
/* 85B78 800EC6C8 3C0640A0 */ lui $a2, (0x40A00000 >> 16)
/* 85B7C 800EC6CC 44070000 */ mfc1 $a3, $f0
/* 85B80 800EC6D0 0C00A7E7 */ jal add_vec2D_polar
/* 85B84 800EC6D4 0280282D */ daddu $a1, $s4, $zero
/* 85B88 800EC6D8 24020005 */ addiu $v0, $zero, 0x5
/* 85B8C 800EC6DC 0803B4B9 */ j .L800ED2E4
/* 85B90 800EC6E0 A6020000 */ sh $v0, 0x0($s0)
.L800EC6E4:
/* 85B94 800EC6E4 8E250018 */ lw $a1, 0x18($s1)
/* 85B98 800EC6E8 8E26000C */ lw $a2, 0xC($s1)
/* 85B9C 800EC6EC 0C00EA95 */ jal npc_move_heading
/* 85BA0 800EC6F0 0220202D */ daddu $a0, $s1, $zero
/* 85BA4 800EC6F4 0803B4B9 */ j .L800ED2E4
/* 85BA8 800EC6F8 00000000 */ nop
glabel .L800EC6FC
/* 85BAC 800EC6FC 3C038011 */ lui $v1, %hi(D_8010CD38)
/* 85BB0 800EC700 2463CD38 */ addiu $v1, $v1, %lo(D_8010CD38)
/* 85BB4 800EC704 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 85BB8 800EC708 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 85BBC 800EC70C 8E660028 */ lw $a2, 0x28($s3)
/* 85BC0 800EC710 8E670030 */ lw $a3, 0x30($s3)
/* 85BC4 800EC714 3C028011 */ lui $v0, %hi(D_8010CFBC)
/* 85BC8 800EC718 8C42CFBC */ lw $v0, %lo(D_8010CFBC)($v0)
/* 85BCC 800EC71C C620003C */ lwc1 $f0, 0x3C($s1)
/* 85BD0 800EC720 00021100 */ sll $v0, $v0, 4
/* 85BD4 800EC724 00438021 */ addu $s0, $v0, $v1
/* 85BD8 800EC728 46006106 */ mov.s $f4, $f12
/* 85BDC 800EC72C C6060004 */ lwc1 $f6, 0x4($s0)
/* 85BE0 800EC730 C608000C */ lwc1 $f8, 0xC($s0)
/* 85BE4 800EC734 46007086 */ mov.s $f2, $f14
/* 85BE8 800EC738 E7A40028 */ swc1 $f4, 0x28($sp)
/* 85BEC 800EC73C E7A0002C */ swc1 $f0, 0x2C($sp)
/* 85BF0 800EC740 E7A20030 */ swc1 $f2, 0x30($sp)
/* 85BF4 800EC744 E7A60020 */ swc1 $f6, 0x20($sp)
/* 85BF8 800EC748 0C00A7B5 */ jal dist2D
/* 85BFC 800EC74C E7A80024 */ swc1 $f8, 0x24($sp)
/* 85C00 800EC750 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 85C04 800EC754 C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
/* 85C08 800EC758 4602003E */ c.le.s $f0, $f2
/* 85C0C 800EC75C 00000000 */ nop
/* 85C10 800EC760 450000E3 */ bc1f .L800ECAF0
/* 85C14 800EC764 E7A00034 */ swc1 $f0, 0x34($sp)
/* 85C18 800EC768 3C048011 */ lui $a0, %hi(D_8010CFCA)
/* 85C1C 800EC76C 2484CFCA */ addiu $a0, $a0, %lo(D_8010CFCA)
/* 85C20 800EC770 84820000 */ lh $v0, 0x0($a0)
/* 85C24 800EC774 14400019 */ bnez $v0, .L800EC7DC
/* 85C28 800EC778 00000000 */ nop
/* 85C2C 800EC77C 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 85C30 800EC780 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 85C34 800EC784 AE200018 */ sw $zero, 0x18($s1)
/* 85C38 800EC788 AE200014 */ sw $zero, 0x14($s1)
/* 85C3C 800EC78C 000310C0 */ sll $v0, $v1, 3
/* 85C40 800EC790 00431021 */ addu $v0, $v0, $v1
/* 85C44 800EC794 00021080 */ sll $v0, $v0, 2
/* 85C48 800EC798 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x14)
/* 85C4C 800EC79C 00220821 */ addu $at, $at, $v0
/* 85C50 800EC7A0 8C22835C */ lw $v0, %lo(gPartnerAnimations + 0x14)($at)
/* 85C54 800EC7A4 AE220028 */ sw $v0, 0x28($s1)
/* 85C58 800EC7A8 826300B4 */ lb $v1, 0xB4($s3)
/* 85C5C 800EC7AC 2402000C */ addiu $v0, $zero, 0xC
/* 85C60 800EC7B0 50620001 */ beql $v1, $v0, .L800EC7B8
/* 85C64 800EC7B4 A4800000 */ sh $zero, 0x0($a0)
.L800EC7B8:
/* 85C68 800EC7B8 86240084 */ lh $a0, 0x84($s1)
/* 85C6C 800EC7BC 0C016F6A */ jal get_collider_flags
/* 85C70 800EC7C0 00000000 */ nop
/* 85C74 800EC7C4 2442FFFE */ addiu $v0, $v0, -0x2
/* 85C78 800EC7C8 2C420002 */ sltiu $v0, $v0, 0x2
/* 85C7C 800EC7CC 104000C8 */ beqz $v0, .L800ECAF0
/* 85C80 800EC7D0 00000000 */ nop
/* 85C84 800EC7D4 0803B0BA */ j .L800EC2E8
/* 85C88 800EC7D8 00000000 */ nop
.L800EC7DC:
/* 85C8C 800EC7DC C66200A8 */ lwc1 $f2, 0xA8($s3)
/* 85C90 800EC7E0 3C014334 */ lui $at, (0x43340000 >> 16)
/* 85C94 800EC7E4 44810000 */ mtc1 $at, $f0
/* 85C98 800EC7E8 C6AC006C */ lwc1 $f12, 0x6C($s5)
/* 85C9C 800EC7EC 4600103C */ c.lt.s $f2, $f0
/* 85CA0 800EC7F0 3C01C2B4 */ lui $at, (0xC2B40000 >> 16)
/* 85CA4 800EC7F4 44810000 */ mtc1 $at, $f0
/* 85CA8 800EC7F8 45000003 */ bc1f .L800EC808
/* 85CAC 800EC7FC 00000000 */ nop
/* 85CB0 800EC800 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 85CB4 800EC804 44810000 */ mtc1 $at, $f0
.L800EC808:
/* 85CB8 800EC808 0C00A6C9 */ jal clamp_angle
/* 85CBC 800EC80C 46006300 */ add.s $f12, $f12, $f0
/* 85CC0 800EC810 44070000 */ mfc1 $a3, $f0
/* 85CC4 800EC814 C6600028 */ lwc1 $f0, 0x28($s3)
/* 85CC8 800EC818 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 85CCC 800EC81C C424CFC0 */ lwc1 $f4, %lo(wPartnerTetherDistance)($at)
/* 85CD0 800EC820 26240060 */ addiu $a0, $s1, 0x60
/* 85CD4 800EC824 E6200060 */ swc1 $f0, 0x60($s1)
/* 85CD8 800EC828 3C014120 */ lui $at, (0x41200000 >> 16)
/* 85CDC 800EC82C 44810000 */ mtc1 $at, $f0
/* 85CE0 800EC830 C662002C */ lwc1 $f2, 0x2C($s3)
/* 85CE4 800EC834 46002101 */ sub.s $f4, $f4, $f0
/* 85CE8 800EC838 E6220064 */ swc1 $f2, 0x64($s1)
/* 85CEC 800EC83C C6600030 */ lwc1 $f0, 0x30($s3)
/* 85CF0 800EC840 44062000 */ mfc1 $a2, $f4
/* 85CF4 800EC844 26250068 */ addiu $a1, $s1, 0x68
/* 85CF8 800EC848 0C00A7E7 */ jal add_vec2D_polar
/* 85CFC 800EC84C E6200068 */ swc1 $f0, 0x68($s1)
/* 85D00 800EC850 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 85D04 800EC854 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 85D08 800EC858 8E260060 */ lw $a2, 0x60($s1)
/* 85D0C 800EC85C 0C00A720 */ jal atan2
/* 85D10 800EC860 8E270068 */ lw $a3, 0x68($s1)
/* 85D14 800EC864 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 85D18 800EC868 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 85D1C 800EC86C 8E260060 */ lw $a2, 0x60($s1)
/* 85D20 800EC870 8E270068 */ lw $a3, 0x68($s1)
/* 85D24 800EC874 0C00A7B5 */ jal dist2D
/* 85D28 800EC878 46000506 */ mov.s $f20, $f0
/* 85D2C 800EC87C 3C014000 */ lui $at, (0x40000000 >> 16)
/* 85D30 800EC880 44811000 */ mtc1 $at, $f2
/* 85D34 800EC884 E7A00034 */ swc1 $f0, 0x34($sp)
/* 85D38 800EC888 4600103C */ c.lt.s $f2, $f0
/* 85D3C 800EC88C 00000000 */ nop
/* 85D40 800EC890 45000022 */ bc1f .L800EC91C
/* 85D44 800EC894 E6220018 */ swc1 $f2, 0x18($s1)
/* 85D48 800EC898 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 85D4C 800EC89C 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 85D50 800EC8A0 3C048010 */ lui $a0, %hi(gPartnerAnimations)
/* 85D54 800EC8A4 24848348 */ addiu $a0, $a0, %lo(gPartnerAnimations)
/* 85D58 800EC8A8 E634000C */ swc1 $f20, 0xC($s1)
/* 85D5C 800EC8AC 000310C0 */ sll $v0, $v1, 3
/* 85D60 800EC8B0 00431021 */ addu $v0, $v0, $v1
/* 85D64 800EC8B4 00021080 */ sll $v0, $v0, 2
/* 85D68 800EC8B8 00442021 */ addu $a0, $v0, $a0
/* 85D6C 800EC8BC 8E220000 */ lw $v0, 0x0($s1)
/* 85D70 800EC8C0 8C830018 */ lw $v1, 0x18($a0)
/* 85D74 800EC8C4 30424000 */ andi $v0, $v0, 0x4000
/* 85D78 800EC8C8 14400004 */ bnez $v0, .L800EC8DC
/* 85D7C 800EC8CC AE230028 */ sw $v1, 0x28($s1)
/* 85D80 800EC8D0 3C018010 */ lui $at, %hi(D_800F803A)
/* 85D84 800EC8D4 0803B263 */ j .L800EC98C
/* 85D88 800EC8D8 A420803A */ sh $zero, %lo(D_800F803A)($at)
.L800EC8DC:
/* 85D8C 800EC8DC 3C038010 */ lui $v1, %hi(D_800F803A)
/* 85D90 800EC8E0 2463803A */ addiu $v1, $v1, %lo(D_800F803A)
/* 85D94 800EC8E4 94620000 */ lhu $v0, 0x0($v1)
/* 85D98 800EC8E8 24420001 */ addiu $v0, $v0, 0x1
/* 85D9C 800EC8EC A4620000 */ sh $v0, 0x0($v1)
/* 85DA0 800EC8F0 00021400 */ sll $v0, $v0, 16
/* 85DA4 800EC8F4 00021403 */ sra $v0, $v0, 16
/* 85DA8 800EC8F8 2842000B */ slti $v0, $v0, 0xB
/* 85DAC 800EC8FC 14400023 */ bnez $v0, .L800EC98C
/* 85DB0 800EC900 00000000 */ nop
/* 85DB4 800EC904 C6740080 */ lwc1 $f20, 0x80($s3)
/* 85DB8 800EC908 AE200018 */ sw $zero, 0x18($s1)
/* 85DBC 800EC90C AE200014 */ sw $zero, 0x14($s1)
/* 85DC0 800EC910 E6340034 */ swc1 $f20, 0x34($s1)
/* 85DC4 800EC914 0803B258 */ j .L800EC960
/* 85DC8 800EC918 8C820014 */ lw $v0, 0x14($a0)
.L800EC91C:
/* 85DCC 800EC91C C62C0038 */ lwc1 $f12, 0x38($s1)
/* 85DD0 800EC920 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 85DD4 800EC924 8E660028 */ lw $a2, 0x28($s3)
/* 85DD8 800EC928 0C00A720 */ jal atan2
/* 85DDC 800EC92C 8E670030 */ lw $a3, 0x30($s3)
/* 85DE0 800EC930 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 85DE4 800EC934 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 85DE8 800EC938 46000506 */ mov.s $f20, $f0
/* 85DEC 800EC93C E634000C */ swc1 $f20, 0xC($s1)
/* 85DF0 800EC940 AE200018 */ sw $zero, 0x18($s1)
/* 85DF4 800EC944 AE200014 */ sw $zero, 0x14($s1)
/* 85DF8 800EC948 000310C0 */ sll $v0, $v1, 3
/* 85DFC 800EC94C 00431021 */ addu $v0, $v0, $v1
/* 85E00 800EC950 00021080 */ sll $v0, $v0, 2
/* 85E04 800EC954 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x14)
/* 85E08 800EC958 00220821 */ addu $at, $at, $v0
/* 85E0C 800EC95C 8C22835C */ lw $v0, %lo(gPartnerAnimations + 0x14)($at)
.L800EC960:
/* 85E10 800EC960 3C048011 */ lui $a0, %hi(D_8010CFCA)
/* 85E14 800EC964 2484CFCA */ addiu $a0, $a0, %lo(D_8010CFCA)
/* 85E18 800EC968 AE220028 */ sw $v0, 0x28($s1)
/* 85E1C 800EC96C 84830000 */ lh $v1, 0x0($a0)
/* 85E20 800EC970 24020002 */ addiu $v0, $zero, 0x2
/* 85E24 800EC974 10620004 */ beq $v1, $v0, .L800EC988
/* 85E28 800EC978 2402000C */ addiu $v0, $zero, 0xC
/* 85E2C 800EC97C 826300B4 */ lb $v1, 0xB4($s3)
/* 85E30 800EC980 14620002 */ bne $v1, $v0, .L800EC98C
/* 85E34 800EC984 00000000 */ nop
.L800EC988:
/* 85E38 800EC988 A4800000 */ sh $zero, 0x0($a0)
.L800EC98C:
/* 85E3C 800EC98C 8E250018 */ lw $a1, 0x18($s1)
/* 85E40 800EC990 4406A000 */ mfc1 $a2, $f20
/* 85E44 800EC994 0220202D */ daddu $a0, $s1, $zero
/* 85E48 800EC998 0C00EA95 */ jal npc_move_heading
/* 85E4C 800EC99C E634000C */ swc1 $f20, 0xC($s1)
/* 85E50 800EC9A0 C6200018 */ lwc1 $f0, 0x18($s1)
/* 85E54 800EC9A4 3C014010 */ lui $at, (0x40100000 >> 16)
/* 85E58 800EC9A8 44811800 */ mtc1 $at, $f3
/* 85E5C 800EC9AC 44801000 */ mtc1 $zero, $f2
/* 85E60 800EC9B0 46000021 */ cvt.d.s $f0, $f0
/* 85E64 800EC9B4 4622003C */ c.lt.d $f0, $f2
/* 85E68 800EC9B8 00000000 */ nop
/* 85E6C 800EC9BC 45000002 */ bc1f .L800EC9C8
/* 85E70 800EC9C0 24050001 */ addiu $a1, $zero, 0x1
/* 85E74 800EC9C4 0000282D */ daddu $a1, $zero, $zero
.L800EC9C8:
/* 85E78 800EC9C8 0C00F598 */ jal spawn_surface_effects
/* 85E7C 800EC9CC 0220202D */ daddu $a0, $s1, $zero
/* 85E80 800EC9D0 862200A8 */ lh $v0, 0xA8($s1)
/* 85E84 800EC9D4 3C01447A */ lui $at, (0x447A0000 >> 16)
/* 85E88 800EC9D8 44810000 */ mtc1 $at, $f0
/* 85E8C 800EC9DC 44822000 */ mtc1 $v0, $f4
/* 85E90 800EC9E0 00000000 */ nop
/* 85E94 800EC9E4 46802120 */ cvt.s.w $f4, $f4
/* 85E98 800EC9E8 27A20034 */ addiu $v0, $sp, 0x34
/* 85E9C 800EC9EC E7A00034 */ swc1 $f0, 0x34($sp)
/* 85EA0 800EC9F0 C6260038 */ lwc1 $f6, 0x38($s1)
/* 85EA4 800EC9F4 C620003C */ lwc1 $f0, 0x3C($s1)
/* 85EA8 800EC9F8 C6220040 */ lwc1 $f2, 0x40($s1)
/* 85EAC 800EC9FC 46040000 */ add.s $f0, $f0, $f4
/* 85EB0 800ECA00 E7A60028 */ swc1 $f6, 0x28($sp)
/* 85EB4 800ECA04 E7A20030 */ swc1 $f2, 0x30($sp)
/* 85EB8 800ECA08 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 85EBC 800ECA0C AFA20010 */ sw $v0, 0x10($sp)
/* 85EC0 800ECA10 C620000C */ lwc1 $f0, 0xC($s1)
/* 85EC4 800ECA14 27A50028 */ addiu $a1, $sp, 0x28
/* 85EC8 800ECA18 E7A00014 */ swc1 $f0, 0x14($sp)
/* 85ECC 800ECA1C 862200A6 */ lh $v0, 0xA6($s1)
/* 85ED0 800ECA20 27A6002C */ addiu $a2, $sp, 0x2C
/* 85ED4 800ECA24 44820000 */ mtc1 $v0, $f0
/* 85ED8 800ECA28 00000000 */ nop
/* 85EDC 800ECA2C 46800020 */ cvt.s.w $f0, $f0
/* 85EE0 800ECA30 E7A00018 */ swc1 $f0, 0x18($sp)
/* 85EE4 800ECA34 8E240080 */ lw $a0, 0x80($s1)
/* 85EE8 800ECA38 0C0371DE */ jal npc_raycast_down_around
/* 85EEC 800ECA3C 27A70030 */ addiu $a3, $sp, 0x30
/* 85EF0 800ECA40 10400228 */ beqz $v0, .L800ED2E4
/* 85EF4 800ECA44 00000000 */ nop
/* 85EF8 800ECA48 3C108011 */ lui $s0, %hi(NpcHitQueryColliderID)
/* 85EFC 800ECA4C 2610C978 */ addiu $s0, $s0, %lo(NpcHitQueryColliderID)
/* 85F00 800ECA50 0C016F6A */ jal get_collider_flags
/* 85F04 800ECA54 8E040000 */ lw $a0, 0x0($s0)
/* 85F08 800ECA58 2442FFFE */ addiu $v0, $v0, -0x2
/* 85F0C 800ECA5C 2C420002 */ sltiu $v0, $v0, 0x2
/* 85F10 800ECA60 10400020 */ beqz $v0, .L800ECAE4
/* 85F14 800ECA64 00000000 */ nop
/* 85F18 800ECA68 3C014334 */ lui $at, (0x43340000 >> 16)
/* 85F1C 800ECA6C 44816000 */ mtc1 $at, $f12
/* 85F20 800ECA70 0C00A6C9 */ jal clamp_angle
/* 85F24 800ECA74 460CA300 */ add.s $f12, $f20, $f12
/* 85F28 800ECA78 8E250018 */ lw $a1, 0x18($s1)
/* 85F2C 800ECA7C 44060000 */ mfc1 $a2, $f0
/* 85F30 800ECA80 0220202D */ daddu $a0, $s1, $zero
/* 85F34 800ECA84 0C00EA95 */ jal npc_move_heading
/* 85F38 800ECA88 AE26000C */ sw $a2, 0xC($s1)
/* 85F3C 800ECA8C 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 85F40 800ECA90 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 85F44 800ECA94 AE200018 */ sw $zero, 0x18($s1)
/* 85F48 800ECA98 AE200014 */ sw $zero, 0x14($s1)
/* 85F4C 800ECA9C 000310C0 */ sll $v0, $v1, 3
/* 85F50 800ECAA0 00431021 */ addu $v0, $v0, $v1
/* 85F54 800ECAA4 00021080 */ sll $v0, $v0, 2
/* 85F58 800ECAA8 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x14)
/* 85F5C 800ECAAC 00220821 */ addu $at, $at, $v0
/* 85F60 800ECAB0 8C22835C */ lw $v0, %lo(gPartnerAnimations + 0x14)($at)
/* 85F64 800ECAB4 3C048011 */ lui $a0, %hi(D_8010CFCA)
/* 85F68 800ECAB8 2484CFCA */ addiu $a0, $a0, %lo(D_8010CFCA)
/* 85F6C 800ECABC AE220028 */ sw $v0, 0x28($s1)
/* 85F70 800ECAC0 84830000 */ lh $v1, 0x0($a0)
/* 85F74 800ECAC4 24020002 */ addiu $v0, $zero, 0x2
/* 85F78 800ECAC8 10620177 */ beq $v1, $v0, .L800ED0A8
/* 85F7C 800ECACC 2402000C */ addiu $v0, $zero, 0xC
/* 85F80 800ECAD0 826300B4 */ lb $v1, 0xB4($s3)
/* 85F84 800ECAD4 14620203 */ bne $v1, $v0, .L800ED2E4
/* 85F88 800ECAD8 00000000 */ nop
/* 85F8C 800ECADC 0803B4B9 */ j .L800ED2E4
/* 85F90 800ECAE0 A4800000 */ sh $zero, 0x0($a0)
.L800ECAE4:
/* 85F94 800ECAE4 8E040000 */ lw $a0, 0x0($s0)
/* 85F98 800ECAE8 0803B2C9 */ j .L800ECB24
/* 85F9C 800ECAEC 00000000 */ nop
.L800ECAF0:
/* 85FA0 800ECAF0 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 85FA4 800ECAF4 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 85FA8 800ECAF8 8E660028 */ lw $a2, 0x28($s3)
/* 85FAC 800ECAFC 0C00A7B5 */ jal dist2D
/* 85FB0 800ECB00 8E670030 */ lw $a3, 0x30($s3)
/* 85FB4 800ECB04 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 85FB8 800ECB08 C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
/* 85FBC 800ECB0C 4602003E */ c.le.s $f0, $f2
/* 85FC0 800ECB10 00000000 */ nop
/* 85FC4 800ECB14 4500000B */ bc1f .L800ECB44
/* 85FC8 800ECB18 E7A00034 */ swc1 $f0, 0x34($sp)
/* 85FCC 800ECB1C 3C048011 */ lui $a0, %hi(NpcHitQueryColliderID)
/* 85FD0 800ECB20 8C84C978 */ lw $a0, %lo(NpcHitQueryColliderID)($a0)
.L800ECB24:
/* 85FD4 800ECB24 0C03A92C */ jal func_800EA4B0
/* 85FD8 800ECB28 00000000 */ nop
/* 85FDC 800ECB2C 144001ED */ bnez $v0, .L800ED2E4
/* 85FE0 800ECB30 24020002 */ addiu $v0, $zero, 0x2
/* 85FE4 800ECB34 3C018011 */ lui $at, %hi(D_8010CFCA)
/* 85FE8 800ECB38 A422CFCA */ sh $v0, %lo(D_8010CFCA)($at)
/* 85FEC 800ECB3C 0803B4B9 */ j .L800ED2E4
/* 85FF0 800ECB40 00000000 */ nop
.L800ECB44:
/* 85FF4 800ECB44 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 85FF8 800ECB48 4481B000 */ mtc1 $at, $f22
/* 85FFC 800ECB4C 3C128011 */ lui $s2, %hi(D_8010CFBC)
/* 86000 800ECB50 2652CFBC */ addiu $s2, $s2, %lo(D_8010CFBC)
/* 86004 800ECB54 3C148011 */ lui $s4, %hi(D_8010CD38)
/* 86008 800ECB58 2694CD38 */ addiu $s4, $s4, %lo(D_8010CD38)
.L800ECB5C:
/* 8600C 800ECB5C 82020000 */ lb $v0, 0x0($s0)
/* 86010 800ECB60 14400028 */ bnez $v0, .L800ECC04
/* 86014 800ECB64 00000000 */ nop
/* 86018 800ECB68 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 8601C 800ECB6C C62E0040 */ lwc1 $f14, 0x40($s1)
/* 86020 800ECB70 8FA60020 */ lw $a2, 0x20($sp)
/* 86024 800ECB74 0C00A720 */ jal atan2
/* 86028 800ECB78 8FA70024 */ lw $a3, 0x24($sp)
/* 8602C 800ECB7C C62C0038 */ lwc1 $f12, 0x38($s1)
/* 86030 800ECB80 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 86034 800ECB84 8E660028 */ lw $a2, 0x28($s3)
/* 86038 800ECB88 8E670030 */ lw $a3, 0x30($s3)
/* 8603C 800ECB8C 0C00A720 */ jal atan2
/* 86040 800ECB90 46000506 */ mov.s $f20, $f0
/* 86044 800ECB94 4600A306 */ mov.s $f12, $f20
/* 86048 800ECB98 0C00A70A */ jal get_clamped_angle_diff
/* 8604C 800ECB9C 46000386 */ mov.s $f14, $f0
/* 86050 800ECBA0 46000005 */ abs.s $f0, $f0
/* 86054 800ECBA4 4616003C */ c.lt.s $f0, $f22
/* 86058 800ECBA8 00000000 */ nop
/* 8605C 800ECBAC 45010012 */ bc1t .L800ECBF8
/* 86060 800ECBB0 00000000 */ nop
/* 86064 800ECBB4 8E430000 */ lw $v1, 0x0($s2)
/* 86068 800ECBB8 3C028011 */ lui $v0, %hi(gPlayerMoveHistoryIndex)
/* 8606C 800ECBBC 8C42CFB8 */ lw $v0, %lo(gPlayerMoveHistoryIndex)($v0)
/* 86070 800ECBC0 1062000D */ beq $v1, $v0, .L800ECBF8
/* 86074 800ECBC4 24620001 */ addiu $v0, $v1, 0x1
/* 86078 800ECBC8 AE420000 */ sw $v0, 0x0($s2)
/* 8607C 800ECBCC 28420028 */ slti $v0, $v0, 0x28
/* 86080 800ECBD0 50400001 */ beql $v0, $zero, .L800ECBD8
/* 86084 800ECBD4 AE400000 */ sw $zero, 0x0($s2)
.L800ECBD8:
/* 86088 800ECBD8 8E420000 */ lw $v0, 0x0($s2)
/* 8608C 800ECBDC 00021100 */ sll $v0, $v0, 4
/* 86090 800ECBE0 00548021 */ addu $s0, $v0, $s4
/* 86094 800ECBE4 C6000004 */ lwc1 $f0, 0x4($s0)
/* 86098 800ECBE8 C602000C */ lwc1 $f2, 0xC($s0)
/* 8609C 800ECBEC E7A00020 */ swc1 $f0, 0x20($sp)
/* 860A0 800ECBF0 0803B2D7 */ j .L800ECB5C
/* 860A4 800ECBF4 E7A20024 */ swc1 $f2, 0x24($sp)
.L800ECBF8:
/* 860A8 800ECBF8 82020000 */ lb $v0, 0x0($s0)
/* 860AC 800ECBFC 1040FDBA */ beqz $v0, .L800EC2E8
/* 860B0 800ECC00 00000000 */ nop
.L800ECC04:
/* 860B4 800ECC04 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 860B8 800ECC08 4481B000 */ mtc1 $at, $f22
/* 860BC 800ECC0C 3C128011 */ lui $s2, %hi(D_8010CFBC)
/* 860C0 800ECC10 2652CFBC */ addiu $s2, $s2, %lo(D_8010CFBC)
/* 860C4 800ECC14 3C148011 */ lui $s4, %hi(D_8010CD38)
/* 860C8 800ECC18 2694CD38 */ addiu $s4, $s4, %lo(D_8010CD38)
.L800ECC1C:
/* 860CC 800ECC1C 82020000 */ lb $v0, 0x0($s0)
/* 860D0 800ECC20 104001AE */ beqz $v0, .L800ED2DC
/* 860D4 800ECC24 24020001 */ addiu $v0, $zero, 0x1
/* 860D8 800ECC28 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 860DC 800ECC2C C62E0040 */ lwc1 $f14, 0x40($s1)
/* 860E0 800ECC30 8FA60020 */ lw $a2, 0x20($sp)
/* 860E4 800ECC34 0C00A720 */ jal atan2
/* 860E8 800ECC38 8FA70024 */ lw $a3, 0x24($sp)
/* 860EC 800ECC3C C62C0038 */ lwc1 $f12, 0x38($s1)
/* 860F0 800ECC40 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 860F4 800ECC44 8E660028 */ lw $a2, 0x28($s3)
/* 860F8 800ECC48 8E670030 */ lw $a3, 0x30($s3)
/* 860FC 800ECC4C 0C00A720 */ jal atan2
/* 86100 800ECC50 46000506 */ mov.s $f20, $f0
/* 86104 800ECC54 4600A306 */ mov.s $f12, $f20
/* 86108 800ECC58 0C00A70A */ jal get_clamped_angle_diff
/* 8610C 800ECC5C 46000386 */ mov.s $f14, $f0
/* 86110 800ECC60 46000005 */ abs.s $f0, $f0
/* 86114 800ECC64 4616003C */ c.lt.s $f0, $f22
/* 86118 800ECC68 00000000 */ nop
/* 8611C 800ECC6C 4501019B */ bc1t .L800ED2DC
/* 86120 800ECC70 24020001 */ addiu $v0, $zero, 0x1
/* 86124 800ECC74 8E430000 */ lw $v1, 0x0($s2)
/* 86128 800ECC78 3C028011 */ lui $v0, %hi(gPlayerMoveHistoryIndex)
/* 8612C 800ECC7C 8C42CFB8 */ lw $v0, %lo(gPlayerMoveHistoryIndex)($v0)
/* 86130 800ECC80 1062000D */ beq $v1, $v0, .L800ECCB8
/* 86134 800ECC84 24620001 */ addiu $v0, $v1, 0x1
/* 86138 800ECC88 AE420000 */ sw $v0, 0x0($s2)
/* 8613C 800ECC8C 28420028 */ slti $v0, $v0, 0x28
/* 86140 800ECC90 50400001 */ beql $v0, $zero, .L800ECC98
/* 86144 800ECC94 AE400000 */ sw $zero, 0x0($s2)
.L800ECC98:
/* 86148 800ECC98 8E420000 */ lw $v0, 0x0($s2)
/* 8614C 800ECC9C 00021100 */ sll $v0, $v0, 4
/* 86150 800ECCA0 00548021 */ addu $s0, $v0, $s4
/* 86154 800ECCA4 C6000004 */ lwc1 $f0, 0x4($s0)
/* 86158 800ECCA8 C602000C */ lwc1 $f2, 0xC($s0)
/* 8615C 800ECCAC E7A00020 */ swc1 $f0, 0x20($sp)
/* 86160 800ECCB0 0803B307 */ j .L800ECC1C
/* 86164 800ECCB4 E7A20024 */ swc1 $f2, 0x24($sp)
.L800ECCB8:
/* 86168 800ECCB8 0803B4B7 */ j .L800ED2DC
/* 8616C 800ECCBC 24020001 */ addiu $v0, $zero, 0x1
glabel .L800ECCC0
/* 86170 800ECCC0 3C048011 */ lui $a0, %hi(D_8010CFCE)
/* 86174 800ECCC4 2484CFCE */ addiu $a0, $a0, %lo(D_8010CFCE)
/* 86178 800ECCC8 84830000 */ lh $v1, 0x0($a0)
/* 8617C 800ECCCC 24020001 */ addiu $v0, $zero, 0x1
/* 86180 800ECCD0 10620050 */ beq $v1, $v0, .L800ECE14
/* 86184 800ECCD4 28620002 */ slti $v0, $v1, 0x2
/* 86188 800ECCD8 50400005 */ beql $v0, $zero, .L800ECCF0
/* 8618C 800ECCDC 24020002 */ addiu $v0, $zero, 0x2
/* 86190 800ECCE0 10600007 */ beqz $v1, .L800ECD00
/* 86194 800ECCE4 00000000 */ nop
/* 86198 800ECCE8 0803B4B9 */ j .L800ED2E4
/* 8619C 800ECCEC 00000000 */ nop
.L800ECCF0:
/* 861A0 800ECCF0 106200E2 */ beq $v1, $v0, .L800ED07C
/* 861A4 800ECCF4 00000000 */ nop
/* 861A8 800ECCF8 0803B4B9 */ j .L800ED2E4
/* 861AC 800ECCFC 00000000 */ nop
.L800ECD00:
/* 861B0 800ECD00 0C0394D2 */ jal func_800E5348
/* 861B4 800ECD04 00000000 */ nop
/* 861B8 800ECD08 3C014334 */ lui $at, (0x43340000 >> 16)
/* 861BC 800ECD0C 44816000 */ mtc1 $at, $f12
/* 861C0 800ECD10 0C00A6C9 */ jal clamp_angle
/* 861C4 800ECD14 460C0300 */ add.s $f12, $f0, $f12
/* 861C8 800ECD18 C6620028 */ lwc1 $f2, 0x28($s3)
/* 861CC 800ECD1C E6220060 */ swc1 $f2, 0x60($s1)
/* 861D0 800ECD20 C662002C */ lwc1 $f2, 0x2C($s3)
/* 861D4 800ECD24 E6220064 */ swc1 $f2, 0x64($s1)
/* 861D8 800ECD28 C6620030 */ lwc1 $f2, 0x30($s3)
/* 861DC 800ECD2C 26240060 */ addiu $a0, $s1, 0x60
/* 861E0 800ECD30 E6220068 */ swc1 $f2, 0x68($s1)
/* 861E4 800ECD34 866200B2 */ lh $v0, 0xB2($s3)
/* 861E8 800ECD38 44070000 */ mfc1 $a3, $f0
/* 861EC 800ECD3C 44825000 */ mtc1 $v0, $f10
/* 861F0 800ECD40 00000000 */ nop
/* 861F4 800ECD44 468052A0 */ cvt.s.w $f10, $f10
/* 861F8 800ECD48 44065000 */ mfc1 $a2, $f10
/* 861FC 800ECD4C 0C00A7E7 */ jal add_vec2D_polar
/* 86200 800ECD50 26250068 */ addiu $a1, $s1, 0x68
/* 86204 800ECD54 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 86208 800ECD58 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 8620C 800ECD5C 8E260060 */ lw $a2, 0x60($s1)
/* 86210 800ECD60 0C00A7B5 */ jal dist2D
/* 86214 800ECD64 8E270068 */ lw $a3, 0x68($s1)
/* 86218 800ECD68 3C018010 */ lui $at, %hi(wPartnerMoveTime)
/* 8621C 800ECD6C C422802C */ lwc1 $f2, %lo(wPartnerMoveTime)($at)
/* 86220 800ECD70 468010A0 */ cvt.s.w $f2, $f2
/* 86224 800ECD74 E7A00034 */ swc1 $f0, 0x34($sp)
/* 86228 800ECD78 46020003 */ div.s $f0, $f0, $f2
/* 8622C 800ECD7C 3C018010 */ lui $at, %hi(wPartnerMoveSpeed)
/* 86230 800ECD80 E4208030 */ swc1 $f0, %lo(wPartnerMoveSpeed)($at)
/* 86234 800ECD84 E6200018 */ swc1 $f0, 0x18($s1)
/* 86238 800ECD88 46000021 */ cvt.d.s $f0, $f0
/* 8623C 800ECD8C 26240028 */ addiu $a0, $s1, 0x28
/* 86240 800ECD90 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 86244 800ECD94 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 86248 800ECD98 3C014010 */ lui $at, (0x40100000 >> 16)
/* 8624C 800ECD9C 44811800 */ mtc1 $at, $f3
/* 86250 800ECDA0 44801000 */ mtc1 $zero, $f2
/* 86254 800ECDA4 000310C0 */ sll $v0, $v1, 3
/* 86258 800ECDA8 00431021 */ addu $v0, $v0, $v1
/* 8625C 800ECDAC 4620103E */ c.le.d $f2, $f0
/* 86260 800ECDB0 00000000 */ nop
/* 86264 800ECDB4 45000003 */ bc1f .L800ECDC4
/* 86268 800ECDB8 00021080 */ sll $v0, $v0, 2
/* 8626C 800ECDBC 0803B372 */ j .L800ECDC8
/* 86270 800ECDC0 24430018 */ addiu $v1, $v0, 0x18
.L800ECDC4:
/* 86274 800ECDC4 24430004 */ addiu $v1, $v0, 0x4
.L800ECDC8:
/* 86278 800ECDC8 3C028010 */ lui $v0, %hi(gPartnerAnimations)
/* 8627C 800ECDCC 24428348 */ addiu $v0, $v0, %lo(gPartnerAnimations)
/* 86280 800ECDD0 00431021 */ addu $v0, $v0, $v1
/* 86284 800ECDD4 8C420000 */ lw $v0, 0x0($v0)
/* 86288 800ECDD8 AC820000 */ sw $v0, 0x0($a0)
/* 8628C 800ECDDC C62C0038 */ lwc1 $f12, 0x38($s1)
/* 86290 800ECDE0 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 86294 800ECDE4 8E260060 */ lw $a2, 0x60($s1)
/* 86298 800ECDE8 0C00A720 */ jal atan2
/* 8629C 800ECDEC 8E270068 */ lw $a3, 0x68($s1)
/* 862A0 800ECDF0 3C038011 */ lui $v1, %hi(D_8010CFCE)
/* 862A4 800ECDF4 2463CFCE */ addiu $v1, $v1, %lo(D_8010CFCE)
/* 862A8 800ECDF8 94620000 */ lhu $v0, 0x0($v1)
/* 862AC 800ECDFC 46000506 */ mov.s $f20, $f0
/* 862B0 800ECE00 3C018010 */ lui $at, %hi(D_800F8034)
/* 862B4 800ECE04 E4348034 */ swc1 $f20, %lo(D_800F8034)($at)
/* 862B8 800ECE08 E634000C */ swc1 $f20, 0xC($s1)
/* 862BC 800ECE0C 24420001 */ addiu $v0, $v0, 0x1
/* 862C0 800ECE10 A4620000 */ sh $v0, 0x0($v1)
.L800ECE14:
/* 862C4 800ECE14 3C108010 */ lui $s0, %hi(wPartnerMoveTime)
/* 862C8 800ECE18 2610802C */ addiu $s0, $s0, %lo(wPartnerMoveTime)
/* 862CC 800ECE1C 8E020000 */ lw $v0, 0x0($s0)
/* 862D0 800ECE20 10400079 */ beqz $v0, .L800ED008
/* 862D4 800ECE24 2442FFFF */ addiu $v0, $v0, -0x1
/* 862D8 800ECE28 C6220014 */ lwc1 $f2, 0x14($s1)
/* 862DC 800ECE2C 44803000 */ mtc1 $zero, $f6
/* 862E0 800ECE30 00000000 */ nop
/* 862E4 800ECE34 46061032 */ c.eq.s $f2, $f6
/* 862E8 800ECE38 00000000 */ nop
/* 862EC 800ECE3C 4501005A */ bc1t .L800ECFA8
/* 862F0 800ECE40 AE020000 */ sw $v0, 0x0($s0)
/* 862F4 800ECE44 C620001C */ lwc1 $f0, 0x1C($s1)
/* 862F8 800ECE48 46020001 */ sub.s $f0, $f0, $f2
/* 862FC 800ECE4C C622003C */ lwc1 $f2, 0x3C($s1)
/* 86300 800ECE50 46001080 */ add.s $f2, $f2, $f0
/* 86304 800ECE54 E620001C */ swc1 $f0, 0x1C($s1)
/* 86308 800ECE58 4606003E */ c.le.s $f0, $f6
/* 8630C 800ECE5C 00000000 */ nop
/* 86310 800ECE60 4500000A */ bc1f .L800ECE8C
/* 86314 800ECE64 E622003C */ swc1 $f2, 0x3C($s1)
/* 86318 800ECE68 3C028011 */ lui $v0, %hi(wCurrentPartnerId)
/* 8631C 800ECE6C 8C42CFD8 */ lw $v0, %lo(wCurrentPartnerId)($v0)
/* 86320 800ECE70 000218C0 */ sll $v1, $v0, 3
/* 86324 800ECE74 00621821 */ addu $v1, $v1, $v0
/* 86328 800ECE78 00031880 */ sll $v1, $v1, 2
/* 8632C 800ECE7C 3C028010 */ lui $v0, %hi(gPartnerAnimations + 0xC)
/* 86330 800ECE80 00431021 */ addu $v0, $v0, $v1
/* 86334 800ECE84 8C428354 */ lw $v0, %lo(gPartnerAnimations + 0xC)($v0)
/* 86338 800ECE88 AE220028 */ sw $v0, 0x28($s1)
.L800ECE8C:
/* 8633C 800ECE8C C624001C */ lwc1 $f4, 0x1C($s1)
/* 86340 800ECE90 4606203E */ c.le.s $f4, $f6
/* 86344 800ECE94 00000000 */ nop
/* 86348 800ECE98 45000043 */ bc1f .L800ECFA8
/* 8634C 800ECE9C 27A20034 */ addiu $v0, $sp, 0x34
/* 86350 800ECEA0 C6200038 */ lwc1 $f0, 0x38($s1)
/* 86354 800ECEA4 3C014130 */ lui $at, (0x41300000 >> 16)
/* 86358 800ECEA8 44811000 */ mtc1 $at, $f2
/* 8635C 800ECEAC E7A00028 */ swc1 $f0, 0x28($sp)
/* 86360 800ECEB0 46002005 */ abs.s $f0, $f4
/* 86364 800ECEB4 46020000 */ add.s $f0, $f0, $f2
/* 86368 800ECEB8 C622003C */ lwc1 $f2, 0x3C($s1)
/* 8636C 800ECEBC C6240040 */ lwc1 $f4, 0x40($s1)
/* 86370 800ECEC0 46001080 */ add.s $f2, $f2, $f0
/* 86374 800ECEC4 E7A40030 */ swc1 $f4, 0x30($sp)
/* 86378 800ECEC8 E7A00034 */ swc1 $f0, 0x34($sp)
/* 8637C 800ECECC E7A2002C */ swc1 $f2, 0x2C($sp)
/* 86380 800ECED0 AFA20010 */ sw $v0, 0x10($sp)
/* 86384 800ECED4 C620000C */ lwc1 $f0, 0xC($s1)
/* 86388 800ECED8 27A50028 */ addiu $a1, $sp, 0x28
/* 8638C 800ECEDC E7A00014 */ swc1 $f0, 0x14($sp)
/* 86390 800ECEE0 862200A6 */ lh $v0, 0xA6($s1)
/* 86394 800ECEE4 27A6002C */ addiu $a2, $sp, 0x2C
/* 86398 800ECEE8 44820000 */ mtc1 $v0, $f0
/* 8639C 800ECEEC 00000000 */ nop
/* 863A0 800ECEF0 46800020 */ cvt.s.w $f0, $f0
/* 863A4 800ECEF4 E7A00018 */ swc1 $f0, 0x18($sp)
/* 863A8 800ECEF8 8E240080 */ lw $a0, 0x80($s1)
/* 863AC 800ECEFC 0C0371DE */ jal npc_raycast_down_around
/* 863B0 800ECF00 27A70030 */ addiu $a3, $sp, 0x30
/* 863B4 800ECF04 10400028 */ beqz $v0, .L800ECFA8
/* 863B8 800ECF08 00000000 */ nop
/* 863BC 800ECF0C C620001C */ lwc1 $f0, 0x1C($s1)
/* 863C0 800ECF10 3C0141B0 */ lui $at, (0x41B00000 >> 16)
/* 863C4 800ECF14 44811000 */ mtc1 $at, $f2
/* 863C8 800ECF18 46000005 */ abs.s $f0, $f0
/* 863CC 800ECF1C 46020000 */ add.s $f0, $f0, $f2
/* 863D0 800ECF20 C7A20034 */ lwc1 $f2, 0x34($sp)
/* 863D4 800ECF24 4600103E */ c.le.s $f2, $f0
/* 863D8 800ECF28 00000000 */ nop
/* 863DC 800ECF2C 4500001E */ bc1f .L800ECFA8
/* 863E0 800ECF30 26240028 */ addiu $a0, $s1, 0x28
/* 863E4 800ECF34 C6200018 */ lwc1 $f0, 0x18($s1)
/* 863E8 800ECF38 3C014010 */ lui $at, (0x40100000 >> 16)
/* 863EC 800ECF3C 44811800 */ mtc1 $at, $f3
/* 863F0 800ECF40 44801000 */ mtc1 $zero, $f2
/* 863F4 800ECF44 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 863F8 800ECF48 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 863FC 800ECF4C 46000021 */ cvt.d.s $f0, $f0
/* 86400 800ECF50 000310C0 */ sll $v0, $v1, 3
/* 86404 800ECF54 00431021 */ addu $v0, $v0, $v1
/* 86408 800ECF58 4620103E */ c.le.d $f2, $f0
/* 8640C 800ECF5C 00000000 */ nop
/* 86410 800ECF60 45000003 */ bc1f .L800ECF70
/* 86414 800ECF64 00021080 */ sll $v0, $v0, 2
/* 86418 800ECF68 0803B3DD */ j .L800ECF74
/* 8641C 800ECF6C 24430018 */ addiu $v1, $v0, 0x18
.L800ECF70:
/* 86420 800ECF70 24430004 */ addiu $v1, $v0, 0x4
.L800ECF74:
/* 86424 800ECF74 3C028010 */ lui $v0, %hi(gPartnerAnimations)
/* 86428 800ECF78 24428348 */ addiu $v0, $v0, %lo(gPartnerAnimations)
/* 8642C 800ECF7C 00431021 */ addu $v0, $v0, $v1
/* 86430 800ECF80 8C420000 */ lw $v0, 0x0($v0)
/* 86434 800ECF84 C7A0002C */ lwc1 $f0, 0x2C($sp)
/* 86438 800ECF88 AC820000 */ sw $v0, 0x0($a0)
/* 8643C 800ECF8C 8E220000 */ lw $v0, 0x0($s1)
/* 86440 800ECF90 2403F7FF */ addiu $v1, $zero, -0x801
/* 86444 800ECF94 AE200014 */ sw $zero, 0x14($s1)
/* 86448 800ECF98 AE20001C */ sw $zero, 0x1C($s1)
/* 8644C 800ECF9C E620003C */ swc1 $f0, 0x3C($s1)
/* 86450 800ECFA0 00431024 */ and $v0, $v0, $v1
/* 86454 800ECFA4 AE220000 */ sw $v0, 0x0($s1)
.L800ECFA8:
/* 86458 800ECFA8 3C018010 */ lui $at, %hi(wPartnerMoveSpeed)
/* 8645C 800ECFAC C4208030 */ lwc1 $f0, %lo(wPartnerMoveSpeed)($at)
/* 86460 800ECFB0 E6200018 */ swc1 $f0, 0x18($s1)
/* 86464 800ECFB4 3C018010 */ lui $at, %hi(D_800F8034)
/* 86468 800ECFB8 C4208034 */ lwc1 $f0, %lo(D_800F8034)($at)
/* 8646C 800ECFBC 8E250018 */ lw $a1, 0x18($s1)
/* 86470 800ECFC0 44060000 */ mfc1 $a2, $f0
/* 86474 800ECFC4 0220202D */ daddu $a0, $s1, $zero
/* 86478 800ECFC8 0C00EA95 */ jal npc_move_heading
/* 8647C 800ECFCC AE26000C */ sw $a2, 0xC($s1)
/* 86480 800ECFD0 C6200018 */ lwc1 $f0, 0x18($s1)
/* 86484 800ECFD4 3C014010 */ lui $at, (0x40100000 >> 16)
/* 86488 800ECFD8 44811800 */ mtc1 $at, $f3
/* 8648C 800ECFDC 44801000 */ mtc1 $zero, $f2
/* 86490 800ECFE0 46000021 */ cvt.d.s $f0, $f0
/* 86494 800ECFE4 4622003C */ c.lt.d $f0, $f2
/* 86498 800ECFE8 00000000 */ nop
/* 8649C 800ECFEC 45000002 */ bc1f .L800ECFF8
/* 864A0 800ECFF0 24050001 */ addiu $a1, $zero, 0x1
/* 864A4 800ECFF4 0000282D */ daddu $a1, $zero, $zero
.L800ECFF8:
/* 864A8 800ECFF8 0C00F598 */ jal spawn_surface_effects
/* 864AC 800ECFFC 0220202D */ daddu $a0, $s1, $zero
/* 864B0 800ED000 0803B4B9 */ j .L800ED2E4
/* 864B4 800ED004 00000000 */ nop
.L800ED008:
/* 864B8 800ED008 0C03BD17 */ jal partner_clear_player_tracking
/* 864BC 800ED00C 0220202D */ daddu $a0, $s1, $zero
/* 864C0 800ED010 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 864C4 800ED014 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 864C8 800ED018 3C014387 */ lui $at, (0x43870000 >> 16)
/* 864CC 800ED01C 44810000 */ mtc1 $at, $f0
/* 864D0 800ED020 AE200018 */ sw $zero, 0x18($s1)
/* 864D4 800ED024 AE200014 */ sw $zero, 0x14($s1)
/* 864D8 800ED028 000310C0 */ sll $v0, $v1, 3
/* 864DC 800ED02C 00431021 */ addu $v0, $v0, $v1
/* 864E0 800ED030 00021080 */ sll $v0, $v0, 2
/* 864E4 800ED034 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x14)
/* 864E8 800ED038 00220821 */ addu $at, $at, $v0
/* 864EC 800ED03C 8C22835C */ lw $v0, %lo(gPartnerAnimations + 0x14)($at)
/* 864F0 800ED040 AE220028 */ sw $v0, 0x28($s1)
/* 864F4 800ED044 C6AC006C */ lwc1 $f12, 0x6C($s5)
/* 864F8 800ED048 46006300 */ add.s $f12, $f12, $f0
/* 864FC 800ED04C C66000A8 */ lwc1 $f0, 0xA8($s3)
/* 86500 800ED050 0C00A6C9 */ jal clamp_angle
/* 86504 800ED054 46006301 */ sub.s $f12, $f12, $f0
/* 86508 800ED058 3C048011 */ lui $a0, %hi(D_8010CFCE)
/* 8650C 800ED05C 2484CFCE */ addiu $a0, $a0, %lo(D_8010CFCE)
/* 86510 800ED060 E620000C */ swc1 $f0, 0xC($s1)
/* 86514 800ED064 94820000 */ lhu $v0, 0x0($a0)
/* 86518 800ED068 2403001E */ addiu $v1, $zero, 0x1E
/* 8651C 800ED06C AE030000 */ sw $v1, 0x0($s0)
/* 86520 800ED070 24420001 */ addiu $v0, $v0, 0x1
/* 86524 800ED074 0803B4B9 */ j .L800ED2E4
/* 86528 800ED078 A4820000 */ sh $v0, 0x0($a0)
.L800ED07C:
/* 8652C 800ED07C 3C038010 */ lui $v1, %hi(wPartnerMoveTime)
/* 86530 800ED080 2463802C */ addiu $v1, $v1, %lo(wPartnerMoveTime)
/* 86534 800ED084 8C620000 */ lw $v0, 0x0($v1)
/* 86538 800ED088 10400003 */ beqz $v0, .L800ED098
/* 8653C 800ED08C 2442FFFF */ addiu $v0, $v0, -0x1
/* 86540 800ED090 0803B4B9 */ j .L800ED2E4
/* 86544 800ED094 AC620000 */ sw $v0, 0x0($v1)
.L800ED098:
/* 86548 800ED098 3C018011 */ lui $at, %hi(wPartnerFollowState)
/* 8654C 800ED09C A420CFC8 */ sh $zero, %lo(wPartnerFollowState)($at)
/* 86550 800ED0A0 3C018011 */ lui $at, %hi(D_8010CFCA)
/* 86554 800ED0A4 A420CFCA */ sh $zero, %lo(D_8010CFCA)($at)
.L800ED0A8:
/* 86558 800ED0A8 0803B4B9 */ j .L800ED2E4
/* 8655C 800ED0AC A4800000 */ sh $zero, 0x0($a0)
glabel .L800ED0B0
/* 86560 800ED0B0 0220202D */ daddu $a0, $s1, $zero
/* 86564 800ED0B4 0C03BE0B */ jal partner_move_to_goal
/* 86568 800ED0B8 0000282D */ daddu $a1, $zero, $zero
/* 8656C 800ED0BC 0803B4B9 */ j .L800ED2E4
/* 86570 800ED0C0 00000000 */ nop
glabel .L800ED0C4
/* 86574 800ED0C4 8E220000 */ lw $v0, 0x0($s1)
/* 86578 800ED0C8 30421000 */ andi $v0, $v0, 0x1000
/* 8657C 800ED0CC 10400012 */ beqz $v0, .L800ED118
/* 86580 800ED0D0 00000000 */ nop
/* 86584 800ED0D4 0C03A92C */ jal func_800EA4B0
/* 86588 800ED0D8 86240084 */ lh $a0, 0x84($s1)
/* 8658C 800ED0DC 1040007F */ beqz $v0, .L800ED2DC
/* 86590 800ED0E0 24020001 */ addiu $v0, $zero, 0x1
/* 86594 800ED0E4 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 86598 800ED0E8 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 8659C 800ED0EC 000310C0 */ sll $v0, $v1, 3
/* 865A0 800ED0F0 00431021 */ addu $v0, $v0, $v1
/* 865A4 800ED0F4 00021080 */ sll $v0, $v0, 2
/* 865A8 800ED0F8 3C038010 */ lui $v1, %hi(gPartnerAnimations + 0x14)
/* 865AC 800ED0FC 00621821 */ addu $v1, $v1, $v0
/* 865B0 800ED100 8C63835C */ lw $v1, %lo(gPartnerAnimations + 0x14)($v1)
/* 865B4 800ED104 24020032 */ addiu $v0, $zero, 0x32
/* 865B8 800ED108 3C018011 */ lui $at, %hi(wPartnerFollowState)
/* 865BC 800ED10C A422CFC8 */ sh $v0, %lo(wPartnerFollowState)($at)
/* 865C0 800ED110 0803B4B9 */ j .L800ED2E4
/* 865C4 800ED114 AE230028 */ sw $v1, 0x28($s1)
.L800ED118:
/* 865C8 800ED118 3C014040 */ lui $at, (0x40400000 >> 16)
/* 865CC 800ED11C 44812000 */ mtc1 $at, $f4
/* 865D0 800ED120 C620001C */ lwc1 $f0, 0x1C($s1)
/* 865D4 800ED124 46040001 */ sub.s $f0, $f0, $f4
/* 865D8 800ED128 C622003C */ lwc1 $f2, 0x3C($s1)
/* 865DC 800ED12C 4480A000 */ mtc1 $zero, $f20
/* 865E0 800ED130 46001080 */ add.s $f2, $f2, $f0
/* 865E4 800ED134 E6240014 */ swc1 $f4, 0x14($s1)
/* 865E8 800ED138 4614003E */ c.le.s $f0, $f20
/* 865EC 800ED13C E620001C */ swc1 $f0, 0x1C($s1)
/* 865F0 800ED140 4500000A */ bc1f .L800ED16C
/* 865F4 800ED144 E622003C */ swc1 $f2, 0x3C($s1)
/* 865F8 800ED148 3C028011 */ lui $v0, %hi(wCurrentPartnerId)
/* 865FC 800ED14C 8C42CFD8 */ lw $v0, %lo(wCurrentPartnerId)($v0)
/* 86600 800ED150 000218C0 */ sll $v1, $v0, 3
/* 86604 800ED154 00621821 */ addu $v1, $v1, $v0
/* 86608 800ED158 00031880 */ sll $v1, $v1, 2
/* 8660C 800ED15C 3C028010 */ lui $v0, %hi(gPartnerAnimations + 0xC)
/* 86610 800ED160 00431021 */ addu $v0, $v0, $v1
/* 86614 800ED164 8C428354 */ lw $v0, %lo(gPartnerAnimations + 0xC)($v0)
/* 86618 800ED168 AE220028 */ sw $v0, 0x28($s1)
.L800ED16C:
/* 8661C 800ED16C C622003C */ lwc1 $f2, 0x3C($s1)
/* 86620 800ED170 3C01C4FA */ lui $at, (0xC4FA0000 >> 16)
/* 86624 800ED174 44810000 */ mtc1 $at, $f0
/* 86628 800ED178 00000000 */ nop
/* 8662C 800ED17C 4600103C */ c.lt.s $f2, $f0
/* 86630 800ED180 00000000 */ nop
/* 86634 800ED184 4500001E */ bc1f .L800ED200
/* 86638 800ED188 2404F7FF */ addiu $a0, $zero, -0x801
/* 8663C 800ED18C C62C0038 */ lwc1 $f12, 0x38($s1)
/* 86640 800ED190 3C028011 */ lui $v0, %hi(wCurrentPartnerId)
/* 86644 800ED194 8C42CFD8 */ lw $v0, %lo(wCurrentPartnerId)($v0)
/* 86648 800ED198 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 8664C 800ED19C 000218C0 */ sll $v1, $v0, 3
/* 86650 800ED1A0 00621821 */ addu $v1, $v1, $v0
/* 86654 800ED1A4 00031880 */ sll $v1, $v1, 2
/* 86658 800ED1A8 8E220000 */ lw $v0, 0x0($s1)
/* 8665C 800ED1AC 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x14)
/* 86660 800ED1B0 00230821 */ addu $at, $at, $v1
/* 86664 800ED1B4 8C23835C */ lw $v1, %lo(gPartnerAnimations + 0x14)($at)
/* 86668 800ED1B8 E634001C */ swc1 $f20, 0x1C($s1)
/* 8666C 800ED1BC 00441024 */ and $v0, $v0, $a0
/* 86670 800ED1C0 AE220000 */ sw $v0, 0x0($s1)
/* 86674 800ED1C4 AE230028 */ sw $v1, 0x28($s1)
/* 86678 800ED1C8 8E660028 */ lw $a2, 0x28($s3)
/* 8667C 800ED1CC 0C00A720 */ jal atan2
/* 86680 800ED1D0 8E670030 */ lw $a3, 0x30($s3)
/* 86684 800ED1D4 E620000C */ swc1 $f0, 0xC($s1)
/* 86688 800ED1D8 C6600028 */ lwc1 $f0, 0x28($s3)
/* 8668C 800ED1DC E6200038 */ swc1 $f0, 0x38($s1)
/* 86690 800ED1E0 C660002C */ lwc1 $f0, 0x2C($s3)
/* 86694 800ED1E4 E620003C */ swc1 $f0, 0x3C($s1)
/* 86698 800ED1E8 C6600030 */ lwc1 $f0, 0x30($s3)
/* 8669C 800ED1EC 24020032 */ addiu $v0, $zero, 0x32
.L800ED1F0:
/* 866A0 800ED1F0 3C018011 */ lui $at, %hi(wPartnerFollowState)
/* 866A4 800ED1F4 A422CFC8 */ sh $v0, %lo(wPartnerFollowState)($at)
/* 866A8 800ED1F8 0803B4B9 */ j .L800ED2E4
/* 866AC 800ED1FC E6200040 */ swc1 $f0, 0x40($s1)
.L800ED200:
/* 866B0 800ED200 C6200038 */ lwc1 $f0, 0x38($s1)
/* 866B4 800ED204 27A20034 */ addiu $v0, $sp, 0x34
/* 866B8 800ED208 E7A00028 */ swc1 $f0, 0x28($sp)
/* 866BC 800ED20C C620001C */ lwc1 $f0, 0x1C($s1)
/* 866C0 800ED210 3C014130 */ lui $at, (0x41300000 >> 16)
/* 866C4 800ED214 44811000 */ mtc1 $at, $f2
/* 866C8 800ED218 46000005 */ abs.s $f0, $f0
/* 866CC 800ED21C 46020000 */ add.s $f0, $f0, $f2
/* 866D0 800ED220 C622003C */ lwc1 $f2, 0x3C($s1)
/* 866D4 800ED224 C6240040 */ lwc1 $f4, 0x40($s1)
/* 866D8 800ED228 46001080 */ add.s $f2, $f2, $f0
/* 866DC 800ED22C E7A40030 */ swc1 $f4, 0x30($sp)
/* 866E0 800ED230 E7A00034 */ swc1 $f0, 0x34($sp)
/* 866E4 800ED234 E7A2002C */ swc1 $f2, 0x2C($sp)
/* 866E8 800ED238 AFA20010 */ sw $v0, 0x10($sp)
/* 866EC 800ED23C C620000C */ lwc1 $f0, 0xC($s1)
/* 866F0 800ED240 27A50028 */ addiu $a1, $sp, 0x28
/* 866F4 800ED244 E7A00014 */ swc1 $f0, 0x14($sp)
/* 866F8 800ED248 862200A6 */ lh $v0, 0xA6($s1)
/* 866FC 800ED24C 27A6002C */ addiu $a2, $sp, 0x2C
/* 86700 800ED250 44820000 */ mtc1 $v0, $f0
/* 86704 800ED254 00000000 */ nop
/* 86708 800ED258 46800020 */ cvt.s.w $f0, $f0
/* 8670C 800ED25C E7A00018 */ swc1 $f0, 0x18($sp)
/* 86710 800ED260 8E240080 */ lw $a0, 0x80($s1)
/* 86714 800ED264 0C0371DE */ jal npc_raycast_down_around
/* 86718 800ED268 27A70030 */ addiu $a3, $sp, 0x30
/* 8671C 800ED26C 1040001D */ beqz $v0, .L800ED2E4
/* 86720 800ED270 00000000 */ nop
/* 86724 800ED274 C7AC0028 */ lwc1 $f12, 0x28($sp)
/* 86728 800ED278 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 8672C 800ED27C 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 86730 800ED280 C7AE0030 */ lwc1 $f14, 0x30($sp)
/* 86734 800ED284 C7A0002C */ lwc1 $f0, 0x2C($sp)
/* 86738 800ED288 000310C0 */ sll $v0, $v1, 3
/* 8673C 800ED28C 00431021 */ addu $v0, $v0, $v1
/* 86740 800ED290 00021080 */ sll $v0, $v0, 2
/* 86744 800ED294 3C048010 */ lui $a0, %hi(gPartnerAnimations + 0x14)
/* 86748 800ED298 00822021 */ addu $a0, $a0, $v0
/* 8674C 800ED29C 8C84835C */ lw $a0, %lo(gPartnerAnimations + 0x14)($a0)
/* 86750 800ED2A0 8E220000 */ lw $v0, 0x0($s1)
/* 86754 800ED2A4 2403F7FF */ addiu $v1, $zero, -0x801
/* 86758 800ED2A8 E634001C */ swc1 $f20, 0x1C($s1)
/* 8675C 800ED2AC E620003C */ swc1 $f0, 0x3C($s1)
/* 86760 800ED2B0 00431024 */ and $v0, $v0, $v1
/* 86764 800ED2B4 AE220000 */ sw $v0, 0x0($s1)
/* 86768 800ED2B8 AE240028 */ sw $a0, 0x28($s1)
/* 8676C 800ED2BC 8E660028 */ lw $a2, 0x28($s3)
/* 86770 800ED2C0 0C00A720 */ jal atan2
/* 86774 800ED2C4 8E670030 */ lw $a3, 0x30($s3)
/* 86778 800ED2C8 0220202D */ daddu $a0, $s1, $zero
/* 8677C 800ED2CC 24050002 */ addiu $a1, $zero, 0x2
/* 86780 800ED2D0 0C00F598 */ jal spawn_surface_effects
/* 86784 800ED2D4 E480000C */ swc1 $f0, 0xC($a0)
/* 86788 800ED2D8 24020032 */ addiu $v0, $zero, 0x32
.L800ED2DC:
/* 8678C 800ED2DC 3C018011 */ lui $at, %hi(wPartnerFollowState)
/* 86790 800ED2E0 A422CFC8 */ sh $v0, %lo(wPartnerFollowState)($at)
glabel .L800ED2E4
/* 86794 800ED2E4 8FBF0050 */ lw $ra, 0x50($sp)
/* 86798 800ED2E8 8FB5004C */ lw $s5, 0x4C($sp)
/* 8679C 800ED2EC 8FB40048 */ lw $s4, 0x48($sp)
/* 867A0 800ED2F0 8FB30044 */ lw $s3, 0x44($sp)
/* 867A4 800ED2F4 8FB20040 */ lw $s2, 0x40($sp)
/* 867A8 800ED2F8 8FB1003C */ lw $s1, 0x3C($sp)
/* 867AC 800ED2FC 8FB00038 */ lw $s0, 0x38($sp)
/* 867B0 800ED300 D7B60060 */ ldc1 $f22, 0x60($sp)
/* 867B4 800ED304 D7B40058 */ ldc1 $f20, 0x58($sp)
/* 867B8 800ED308 03E00008 */ jr $ra
/* 867BC 800ED30C 27BD0068 */ addiu $sp, $sp, 0x68
### DECOMPILED C INSTRUCTIONS:
void partner_walking_follow_player(Npc* partner) {
PlayerStatus* playerStatus = &gPlayerStatus;
Camera* cameras = &gCameras[CAM_DEFAULT];
s32 surfaceType;
f32 moveHistoryX, moveHistoryY, moveHistoryZ;
f32 x, y, z;
f32 distance;
f32 yaw;
f32 temp_a3;
f32 angle;
s32 var_a1;
PlayerPathElement* currentSnapshot;
switch (wPartnerFollowState) {
case 0:
currentSnapshot = &gPlayerMoveHistory[D_8010CFBC];
moveHistoryX = currentSnapshot->pos.x;
moveHistoryZ = currentSnapshot->pos.z;
x = partner->pos.x;
y = partner->pos.y;
z = partner->pos.z;
partner->moveSpeed = 3.0f;
distance = dist2D(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
if (distance >= 50.0) {
partner->moveSpeed = !(playerStatus->animFlags & PA_FLAG_SPINNING) ? 5.0f : 7.0f;
}
if (wPartnerTetherDistance < 20.0) {
partner->moveSpeed = 4.0f;
}
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].run;
if (!(partner->flags & NPC_FLAG_GROUNDED)) {
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].fall;
}
while (TRUE) {
distance = dist2D(x, z, moveHistoryX, moveHistoryZ);
yaw = atan2(x, z, moveHistoryX, moveHistoryZ);
if (partner->moveSpeed < distance) {
distance = dist2D(x, z, playerStatus->position.x, playerStatus->position.z);
if (distance >= 50.0) {
break;
}
if (wPartnerTetherDistance < distance) {
partner->moveSpeed = distance - wPartnerTetherDistance;
if (partner->moveSpeed > 3.0) {
partner->moveSpeed = 3.0f;
if (wPartnerTetherDistance < 20.0f) {
partner->moveSpeed = 4.0f;
}
} else {
partner->moveSpeed += 1.0;
}
break;
} else {
partner->moveSpeed = 0.0f;
partner->yaw = atan2(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
}
}
if (D_8010CFBC == gPlayerMoveHistoryIndex) {
yaw = partner->yaw;
partner->moveSpeed = 0.0f;
partner->jumpScale = 0.0f;
wPartnerFollowState = 5;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
break;
} else {
D_8010CFBC++;
if (D_8010CFBC >= 40) {
D_8010CFBC = 0;
}
currentSnapshot = &gPlayerMoveHistory[D_8010CFBC];
moveHistoryX = currentSnapshot->pos.x;
moveHistoryZ = currentSnapshot->pos.z;
if (fabsf(get_clamped_angle_diff(partner->yaw, atan2(partner->pos.x, partner->pos.z, moveHistoryX, moveHistoryZ))) > 90.0f) {
wPartnerFollowState = 5;
break;
}
if ((partner->flags & NPC_FLAG_GROUNDED) && currentSnapshot->isJumping) {
wPartnerFollowState = 1;
break;
}
}
}
if (!(partner->flags & NPC_FLAG_GROUNDED)) {
partner->moveSpeed *= 0.5f;
}
partner->yaw = yaw;
npc_move_heading(partner, partner->moveSpeed, partner->yaw);
spawn_surface_effects(partner, (partner->moveSpeed < 4.0) ? SURFACE_INTERACT_WALK : SURFACE_INTERACT_RUN);
surfaceType = get_collider_flags(partner->currentFloor);
if (surfaceType == SURFACE_TYPE_SPIKES ||
surfaceType == SURFACE_TYPE_LAVA ||
(partner->flags & (NPC_FLAG_GROUNDED | NPC_FLAG_COLLDING_FORWARD_WITH_WORLD)) == (NPC_FLAG_GROUNDED | NPC_FLAG_COLLDING_FORWARD_WITH_WORLD)) {
if (!func_800EA4B0(partner->currentWall)) {
D_8010CFBC++;
if (D_8010CFBC >= 40) {
D_8010CFBC = 0;
}
currentSnapshot = &gPlayerMoveHistory[D_8010CFBC];
moveHistoryX = currentSnapshot->pos.x;
moveHistoryZ = currentSnapshot->pos.z;
if (fabsf(get_clamped_angle_diff(partner->yaw, atan2(partner->pos.x, partner->pos.z, moveHistoryX, moveHistoryZ))) > 90.0f) {
wPartnerFollowState = 5;
return;
}
} else {
wPartnerFollowState = 1;
return;
}
}
break;
case 1:
surfaceType = get_collider_flags(partner->currentFloor);
if (D_8010CFBC == gPlayerMoveHistoryIndex) {
if (surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA) {
moveHistoryX = partner->pos.x;
moveHistoryY = playerStatus->position.y;
moveHistoryZ = partner->pos.z;
add_vec2D_polar(&moveHistoryX, &moveHistoryZ, 6.0f, atan2(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z));
} else {
break;
}
} else {
D_8010CFBC++;
if (D_8010CFBC >= 40) {
D_8010CFBC = 0;
}
currentSnapshot = &gPlayerMoveHistory[D_8010CFBC];
moveHistoryX = currentSnapshot->pos.x;
moveHistoryY = currentSnapshot->pos.y;
moveHistoryZ = currentSnapshot->pos.z;
}
partner->moveToPos.x = moveHistoryX;
partner->moveToPos.y = moveHistoryY;
partner->moveToPos.z = moveHistoryZ;
partner->duration = 0;
partner->jumpScale = 3.0f;
partner->moveSpeed = 6.0f;
partner->planarFlyDist = dist2D(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
partner->yaw = atan2(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
if (partner->planarFlyDist > 50.0) {
partner->planarFlyDist = 50.0f;
}
distance = partner->planarFlyDist;
y = partner->moveToPos.y - partner->pos.y;
if (distance < wPartnerTetherDistance && !(surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA)) {
partner->jumpVelocity = 0.0f;
partner->yaw = atan2(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
wPartnerFollowState = 0;
return;
}
partner->duration = distance / partner->moveSpeed;
if (partner->duration < 10) {
partner->duration = 10;
}
partner->moveSpeed = partner->planarFlyDist / partner->duration;
partner->jumpVelocity = (y + partner->jumpScale * partner->duration * partner->duration * 0.5f) / partner->duration;
if (partner->jumpVelocity > 20.0) {
partner->jumpVelocity = 20.0f;
}
if (partner->jumpVelocity < 0.0) {
partner->jumpVelocity = 0.0f;
}
if (!(surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA)) {
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].jump;
} else {
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].hurt;
}
partner->moveToPos.x = partner->pos.x;
partner->moveToPos.y = partner->pos.y;
partner->moveToPos.z = partner->pos.z;
partner->flags |= NPC_FLAG_JUMPING;
wPartnerFollowState = 2;
// fallthrough
case 2:
partner->jumpVelocity -= partner->jumpScale;
partner->pos.y += partner->jumpVelocity;
if (partner->jumpVelocity <= 0.0f) {
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].fall;
}
if (partner->pos.y < -2000.0f) {
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].fly;
partner->flags &= ~NPC_FLAG_JUMPING;
partner->jumpVelocity = 0.0f;
partner->yaw = atan2(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
partner->pos.x = playerStatus->position.x;
partner->pos.y = playerStatus->position.y;
partner->pos.z = playerStatus->position.z;
wPartnerFollowState = 5;
return;
}
if (partner->jumpVelocity <= 0.0f) {
distance = fabsf(partner->jumpVelocity) + 11.0f;
x = partner->pos.x;
y = partner->pos.y + distance;
z = partner->pos.z;
if (npc_raycast_down_around(partner->collisionChannel, &x, &y, &z, &distance, partner->yaw, partner->collisionDiameter) != 0) {
if (distance <= fabsf(partner->jumpVelocity) + 22.0f) {
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].fly;
partner->flags &= ~NPC_FLAG_JUMPING;
partner->jumpVelocity = 0.0f;
partner->pos.y = y;
partner->yaw = atan2(x, z, playerStatus->position.x, playerStatus->position.z);
spawn_surface_effects(partner, SURFACE_INTERACT_LAND);
wPartnerFollowState = 0;
distance = dist2D(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
if (distance < 5.0) {
partner->pos.x = playerStatus->position.x;
partner->pos.y = playerStatus->position.y;
partner->pos.z = playerStatus->position.z;
add_vec2D_polar(&partner->pos.x, &partner->pos.z, 5.0f, clamp_angle((cameras[CAM_DEFAULT].currentYaw + 90.0f) - playerStatus->spriteFacingAngle));
wPartnerFollowState = 5;
}
break;
}
}
}
npc_move_heading(partner, partner->moveSpeed, partner->yaw);
break;
case 5:
currentSnapshot = &gPlayerMoveHistory[D_8010CFBC];
moveHistoryX = currentSnapshot->pos.x;
moveHistoryZ = currentSnapshot->pos.z;
x = partner->pos.x;
y = partner->pos.y;
z = partner->pos.z;
distance = dist2D(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
if (distance <= wPartnerTetherDistance) {
if (D_8010CFCA == 0) {
partner->moveSpeed = 0.0f;
partner->jumpScale = 0.0f;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
if (playerStatus->actionState == ACTION_STATE_TALK) {
D_8010CFCA = 0;
}
surfaceType = get_collider_flags(partner->currentFloor);
if (surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA) {
wPartnerFollowState = 0;
return;
}
} else {
temp_a3 = clamp_angle(cameras[CAM_DEFAULT].currentYaw + (playerStatus->spriteFacingAngle < 180.0f ? 90.0f : -90.0f));
partner->moveToPos.x = playerStatus->position.x;
partner->moveToPos.y = playerStatus->position.y;
partner->moveToPos.z = playerStatus->position.z;
add_vec2D_polar(&partner->moveToPos.x, &partner->moveToPos.z, wPartnerTetherDistance - 10.0f, temp_a3);
yaw = atan2(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
distance = dist2D(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
partner->moveSpeed = 2.0f;
if (distance > 2.0f) {
partner->yaw = yaw;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].run;
if (!(partner->flags & NPC_FLAG_COLLDING_FORWARD_WITH_WORLD)) {
D_800F803A = 0;
} else {
D_800F803A++;
if (D_800F803A > 10) {
yaw = playerStatus->targetYaw;
partner->moveSpeed = 0.0f;
partner->jumpScale = 0.0f;
partner->renderYaw = yaw;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
if (D_8010CFCA == 2 || playerStatus->actionState == ACTION_STATE_TALK) {
D_8010CFCA = 0;
}
}
}
} else {
yaw = atan2(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
partner->yaw = yaw;
partner->moveSpeed = 0.0f;
partner->jumpScale = 0.0f;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
if (D_8010CFCA == 2 || playerStatus->actionState == ACTION_STATE_TALK) {
D_8010CFCA = 0;
}
}
partner->yaw = yaw;
npc_move_heading(partner, partner->moveSpeed, yaw);
spawn_surface_effects(partner, (partner->moveSpeed < 4.0) ? SURFACE_INTERACT_WALK : SURFACE_INTERACT_RUN);
distance = 1000.0f;
x = partner->pos.x;
z = partner->pos.z;
y = partner->pos.y + partner->collisionHeight;
if (npc_raycast_down_around(partner->collisionChannel, &x, &y, &z, &distance, partner->yaw, partner->collisionDiameter) != 0) {
s32 surfaceType = get_collider_flags(NpcHitQueryColliderID);
if (surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA) {
partner->yaw = clamp_angle(yaw + 180.0f);
npc_move_heading(partner, partner->moveSpeed, partner->yaw);
partner->moveSpeed = 0.0f;
partner->jumpScale = 0.0f;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
if (D_8010CFCA == 2) {
D_8010CFCA = 0;
} else if (playerStatus->actionState == ACTION_STATE_TALK) {
D_8010CFCA = 0;
}
} else if (!func_800EA4B0(NpcHitQueryColliderID)) {
D_8010CFCA = 2;
}
}
break;
}
}
distance = dist2D(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
if (distance <= wPartnerTetherDistance) {
if (!func_800EA4B0(NpcHitQueryColliderID)) {
D_8010CFCA = 2;
}
} else {
while (TRUE) {
if (currentSnapshot->isJumping) {
break;
}
yaw = atan2(partner->pos.x, partner->pos.z, moveHistoryX, moveHistoryZ);
if (fabsf(get_clamped_angle_diff(yaw, atan2(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z))) < 90.0f) {
break;
}
if (D_8010CFBC == gPlayerMoveHistoryIndex) {
break;
}
D_8010CFBC++;
if (D_8010CFBC >= 40) {
D_8010CFBC = 0;
}
currentSnapshot = &gPlayerMoveHistory[D_8010CFBC];
moveHistoryX = currentSnapshot->pos.x;
moveHistoryZ = currentSnapshot->pos.z;
}
if (!currentSnapshot->isJumping) {
wPartnerFollowState = 0;
return;
}
while (TRUE) {
if (!currentSnapshot->isJumping) {
break;
}
yaw = atan2(partner->pos.x, partner->pos.z, moveHistoryX, moveHistoryZ);
if (fabsf(get_clamped_angle_diff(yaw, atan2(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z))) < 90.0f) {
break;
}
if (D_8010CFBC == gPlayerMoveHistoryIndex) {
break;
}
D_8010CFBC++;
if (D_8010CFBC >= 40) {
D_8010CFBC = 0;
}
currentSnapshot = &gPlayerMoveHistory[D_8010CFBC];
moveHistoryX = currentSnapshot->pos.x;
moveHistoryZ = currentSnapshot->pos.z;
}
wPartnerFollowState = 1;
return;
}
break;
case 15:
switch (D_8010CFCE) {
case 0:
angle = clamp_angle(func_800E5348() + 180.0f);
partner->moveToPos.x = playerStatus->position.x;
partner->moveToPos.y = playerStatus->position.y;
partner->moveToPos.z = playerStatus->position.z;
add_vec2D_polar(&partner->moveToPos.x, &partner->moveToPos.z, playerStatus->colliderDiameter, angle);
distance = dist2D(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
wPartnerMoveSpeed = distance / wPartnerMoveTime;
partner->moveSpeed = wPartnerMoveSpeed;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].anims[wPartnerMoveSpeed >= 4.0 ? PARTNER_ANIM_INDEX_RUN : PARTNER_ANIM_INDEX_WALK];
yaw = atan2(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
partner->yaw = D_800F8034 = yaw;
D_8010CFCE++;
// fallthrough
case 1:
if (wPartnerMoveTime != 0) {
wPartnerMoveTime--;
if (partner->jumpScale != 0.0f) {
partner->jumpVelocity -= partner->jumpScale;
partner->pos.y += partner->jumpVelocity;
if (partner->jumpVelocity <= 0.0f) {
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].fall;
}
if (partner->jumpVelocity <= 0.0f) {
distance = fabsf(partner->jumpVelocity) + 11.0f;
x = partner->pos.x;
y = partner->pos.y + distance;
z = partner->pos.z;
if ((npc_raycast_down_around(partner->collisionChannel, &x, &y, &z, &distance, partner->yaw, partner->collisionDiameter) != 0) && (distance <= (fabsf(partner->jumpVelocity) + 22.0f))) {
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].anims[partner->moveSpeed >= 4.0 ? PARTNER_ANIM_INDEX_RUN : PARTNER_ANIM_INDEX_WALK];
partner->jumpScale = 0.0f;
partner->jumpVelocity = 0.0f;
partner->pos.y = y;
partner->flags &= ~NPC_FLAG_JUMPING;
}
}
}
partner->moveSpeed = wPartnerMoveSpeed;
partner->yaw = D_800F8034;
npc_move_heading(partner, partner->moveSpeed, partner->yaw);
spawn_surface_effects(partner, (partner->moveSpeed < 4.0) ? SURFACE_INTERACT_WALK : SURFACE_INTERACT_RUN);
} else {
partner_clear_player_tracking(partner);
partner->moveSpeed = 0.0f;
partner->jumpScale = 0.0f;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
partner->yaw = clamp_angle((cameras[CAM_DEFAULT].currentYaw + 270.0f) - playerStatus->spriteFacingAngle);
wPartnerMoveTime = 30;
D_8010CFCE++;
}
return;
case 2:
if (wPartnerMoveTime != 0) {
wPartnerMoveTime--;
return;
}
wPartnerFollowState = 0;
D_8010CFCA = 0;
D_8010CFCE = 0;
}
break;
case 20:
partner_move_to_goal(partner, FALSE);
break;
case 40:
if (partner->flags & NPC_FLAG_GROUNDED) {
if (func_800EA4B0(partner->currentFloor)) {
wPartnerFollowState = 50;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
} else {
wPartnerFollowState = 1;
}
break;
}
partner->jumpScale = 3.0f;
partner->jumpVelocity -= partner->jumpScale;
partner->pos.y += partner->jumpVelocity;
if (partner->jumpVelocity <= 0.0f) {
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].fall;
}
if (partner->pos.y < -2000.0f) {
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
partner->flags &= ~NPC_FLAG_JUMPING;
partner->jumpVelocity = 0.0f;
partner->yaw = atan2(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
partner->pos.x = playerStatus->position.x;
partner->pos.y = playerStatus->position.y;
partner->pos.z = playerStatus->position.z;
wPartnerFollowState = 50;
return;
}
distance = fabsf(partner->jumpVelocity) + 11.0f;
x = partner->pos.x;
y = partner->pos.y + distance;
z = partner->pos.z;
if (npc_raycast_down_around(partner->collisionChannel, &x, &y, &z, &distance, partner->yaw, partner->collisionDiameter) != 0) {
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
partner->flags &= ~NPC_FLAG_JUMPING;
partner->jumpVelocity = 0.0f;
partner->pos.y = y;
partner->yaw = atan2(x, z, playerStatus->position.x, playerStatus->position.z);
spawn_surface_effects(partner, SURFACE_INTERACT_LAND);
wPartnerFollowState = 50;
}
break;
case 50:
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_8024CF34
/* 17B814 8024CF34 3C028028 */ lui $v0, %hi(BattleCam_IsFrozen)
/* 17B818 8024CF38 80420CE0 */ lb $v0, %lo(BattleCam_IsFrozen)($v0)
/* 17B81C 8024CF3C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 17B820 8024CF40 AFB10014 */ sw $s1, 0x14($sp)
/* 17B824 8024CF44 0080882D */ daddu $s1, $a0, $zero
/* 17B828 8024CF48 AFB00010 */ sw $s0, 0x10($sp)
/* 17B82C 8024CF4C 0000802D */ daddu $s0, $zero, $zero
/* 17B830 8024CF50 AFB20018 */ sw $s2, 0x18($sp)
/* 17B834 8024CF54 3C12800E */ lui $s2, %hi(gBattleStatus)
/* 17B838 8024CF58 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus)
/* 17B83C 8024CF5C 14400518 */ bnez $v0, .L8024E3C0
/* 17B840 8024CF60 AFBF001C */ sw $ra, 0x1C($sp)
/* 17B844 8024CF64 24020001 */ addiu $v0, $zero, 0x1
/* 17B848 8024CF68 3C01802A */ lui $at, %hi(D_8029F2A6)
/* 17B84C 8024CF6C A022F2A6 */ sb $v0, %lo(D_8029F2A6)($at)
/* 17B850 8024CF70 2E22004A */ sltiu $v0, $s1, 0x4A
/* 17B854 8024CF74 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17B858 8024CF78 A020F2A2 */ sb $zero, %lo(BattleCam_ModeY)($at)
D_8024CF7C:
/* 17B85C 8024CF7C 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17B860 8024CF80 A020F2A3 */ sb $zero, %lo(BattleCam_ModeX)($at)
/* 17B864 8024CF84 3C01802A */ lui $at, %hi(BattleCam_UseLinearInterp)
/* 17B868 8024CF88 A020F2A5 */ sb $zero, %lo(BattleCam_UseLinearInterp)($at)
/* 17B86C 8024CF8C 3C01802A */ lui $at, %hi(D_8029F2A7)
/* 17B870 8024CF90 A020F2A7 */ sb $zero, %lo(D_8029F2A7)($at)
/* 17B874 8024CF94 104004F7 */ beqz $v0, .L8024E374
/* 17B878 8024CF98 00111080 */ sll $v0, $s1, 2
/* 17B87C 8024CF9C 3C01802A */ lui $at, %hi(jtbl_8029CC48)
/* 17B880 8024CFA0 00220821 */ addu $at, $at, $v0
/* 17B884 8024CFA4 8C22CC48 */ lw $v0, %lo(jtbl_8029CC48)($at)
/* 17B888 8024CFA8 00400008 */ jr $v0
/* 17B88C 8024CFAC 00000000 */ nop
glabel .L8024CFB0
/* 17B890 8024CFB0 3C108028 */ lui $s0, %hi(CamPreset_A)
/* 17B894 8024CFB4 080938DD */ j .L8024E374
D_8024CFB8:
/* 17B898 8024CFB8 26100E54 */ addiu $s0, $s0, %lo(CamPreset_A)
glabel .L8024CFBC
/* 17B89C 8024CFBC 3C108028 */ lui $s0, %hi(CamPreset_B)
/* 17B8A0 8024CFC0 080938DD */ j .L8024E374
/* 17B8A4 8024CFC4 26100CE8 */ addiu $s0, $s0, %lo(CamPreset_B)
glabel .L8024CFC8
/* 17B8A8 8024CFC8 3C028028 */ lui $v0, %hi(BattleCam_CurrentPresetID)
/* 17B8AC 8024CFCC 8C420CE4 */ lw $v0, %lo(BattleCam_CurrentPresetID)($v0)
/* 17B8B0 8024CFD0 105104FB */ beq $v0, $s1, .L8024E3C0
.L8024CFD4:
/* 17B8B4 8024CFD4 240201F4 */ addiu $v0, $zero, 0x1F4
/* 17B8B8 8024CFD8 3C108028 */ lui $s0, %hi(EVS_BattleCam_Default)
/* 17B8BC 8024CFDC 26100DAC */ addiu $s0, $s0, %lo(EVS_BattleCam_Default)
/* 17B8C0 8024CFE0 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17B8C4 8024CFE4 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17B8C8 8024CFE8 2402001E */ addiu $v0, $zero, 0x1E
/* 17B8CC 8024CFEC 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17B8D0 8024CFF0 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17B8D4 8024CFF4 080938DD */ j .L8024E374
D_8024CFF8_C0A878:
/* 17B8D8 8024CFF8 00000000 */ nop
glabel .L8024CFFC
/* 17B8DC 8024CFFC 3C028028 */ lui $v0, %hi(BattleCam_CurrentPresetID)
/* 17B8E0 8024D000 8C420CE4 */ lw $v0, %lo(BattleCam_CurrentPresetID)($v0)
/* 17B8E4 8024D004 105104EE */ beq $v0, $s1, .L8024E3C0
/* 17B8E8 8024D008 240201E0 */ addiu $v0, $zero, 0x1E0
/* 17B8EC 8024D00C 3C108028 */ lui $s0, %hi(D_80280DC8)
/* 17B8F0 8024D010 26100DC8 */ addiu $s0, $s0, %lo(D_80280DC8)
/* 17B8F4 8024D014 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17B8F8 8024D018 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17B8FC 8024D01C 080934CC */ j .L8024D330
/* 17B900 8024D020 24020014 */ addiu $v0, $zero, 0x14
glabel .L8024D024
/* 17B904 8024D024 3C028028 */ lui $v0, %hi(BattleCam_CurrentPresetID)
/* 17B908 8024D028 8C420CE4 */ lw $v0, %lo(BattleCam_CurrentPresetID)($v0)
/* 17B90C 8024D02C 105104E4 */ beq $v0, $s1, .L8024E3C0
/* 17B910 8024D030 240201F4 */ addiu $v0, $zero, 0x1F4
/* 17B914 8024D034 3C108028 */ lui $s0, %hi(CamPreset_E)
.L8024D038:
/* 17B918 8024D038 26100DE4 */ addiu $s0, $s0, %lo(CamPreset_E)
/* 17B91C 8024D03C 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17B920 8024D040 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17B924 8024D044 080934CC */ j .L8024D330
/* 17B928 8024D048 2402000A */ addiu $v0, $zero, 0xA
D_8024D04C:
/* 17B92C 8024D04C 3C108028 */ lui $s0, %hi(D_80280D04)
/* 17B930 8024D050 26100D04 */ addiu $s0, $s0, %lo(D_80280D04)
/* 17B934 8024D054 2402012C */ addiu $v0, $zero, 0x12C
/* 17B938 8024D058 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17B93C 8024D05C A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
D_8024D060_C0A8E0:
/* 17B940 8024D060 24020014 */ addiu $v0, $zero, 0x14
/* 17B944 8024D064 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17B948 8024D068 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17B94C 8024D06C 080938D9 */ j .L8024E364
/* 17B950 8024D070 24020001 */ addiu $v0, $zero, 0x1
glabel .L8024D074
/* 17B954 8024D074 3C108028 */ lui $s0, %hi(CamPreset_G)
/* 17B958 8024D078 26100D3C */ addiu $s0, $s0, %lo(CamPreset_G)
/* 17B95C 8024D07C 2402012C */ addiu $v0, $zero, 0x12C
/* 17B960 8024D080 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17B964 8024D084 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17B968 8024D088 24020014 */ addiu $v0, $zero, 0x14
.L8024D08C:
/* 17B96C 8024D08C 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17B970 8024D090 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
.L8024D094:
/* 17B974 8024D094 080938D9 */ j .L8024E364
/* 17B978 8024D098 24020001 */ addiu $v0, $zero, 0x1
glabel .L8024D09C
/* 17B97C 8024D09C 3C108028 */ lui $s0, %hi(CamPreset_H)
/* 17B980 8024D0A0 26100D74 */ addiu $s0, $s0, %lo(CamPreset_H)
/* 17B984 8024D0A4 2402012C */ addiu $v0, $zero, 0x12C
/* 17B988 8024D0A8 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17B98C 8024D0AC A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17B990 8024D0B0 24020014 */ addiu $v0, $zero, 0x14
/* 17B994 8024D0B4 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17B998 8024D0B8 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
.L8024D0BC:
/* 17B99C 8024D0BC 080938DD */ j .L8024E374
/* 17B9A0 8024D0C0 00000000 */ nop
glabel .L8024D0C4
/* 17B9A4 8024D0C4 3C108028 */ lui $s0, %hi(CamPreset_I)
.L8024D0C8:
/* 17B9A8 8024D0C8 26100D58 */ addiu $s0, $s0, %lo(CamPreset_I)
/* 17B9AC 8024D0CC 2402012C */ addiu $v0, $zero, 0x12C
/* 17B9B0 8024D0D0 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17B9B4 8024D0D4 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17B9B8 8024D0D8 24020014 */ addiu $v0, $zero, 0x14
/* 17B9BC 8024D0DC 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17B9C0 8024D0E0 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17B9C4 8024D0E4 080938D9 */ j .L8024E364
/* 17B9C8 8024D0E8 24020001 */ addiu $v0, $zero, 0x1
glabel .L8024D0EC
/* 17B9CC 8024D0EC 3C02802A */ lui $v0, %hi(BattleCam_ControlScript)
/* 17B9D0 8024D0F0 8C42F2B4 */ lw $v0, %lo(BattleCam_ControlScript)($v0)
/* 17B9D4 8024D0F4 3C048028 */ lui $a0, %hi(EVS_BattleCam_Default)
/* 17B9D8 8024D0F8 24840DAC */ addiu $a0, $a0, %lo(EVS_BattleCam_Default)
/* 17B9DC 8024D0FC 104404B0 */ beq $v0, $a0, .L8024E3C0
/* 17B9E0 8024D100 240201F4 */ addiu $v0, $zero, 0x1F4
/* 17B9E4 8024D104 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17B9E8 8024D108 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17B9EC 8024D10C 24020078 */ addiu $v0, $zero, 0x78
/* 17B9F0 8024D110 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17B9F4 8024D114 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17B9F8 8024D118 080938DD */ j .L8024E374
/* 17B9FC 8024D11C 0080802D */ daddu $s0, $a0, $zero
glabel .L8024D120
/* 17BA00 8024D120 3C108028 */ lui $s0, %hi(D_80280D04)
/* 17BA04 8024D124 26100D04 */ addiu $s0, $s0, %lo(D_80280D04)
/* 17BA08 8024D128 240200C8 */ addiu $v0, $zero, 0xC8
/* 17BA0C 8024D12C 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
D_8024D130:
/* 17BA10 8024D130 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
D_8024D134:
/* 17BA14 8024D134 24020008 */ addiu $v0, $zero, 0x8
/* 17BA18 8024D138 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BA1C 8024D13C A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BA20 8024D140 24020014 */ addiu $v0, $zero, 0x14
/* 17BA24 8024D144 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BA28 8024D148 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BA2C 8024D14C 080938D4 */ j .L8024E350
/* 17BA30 8024D150 2402000F */ addiu $v0, $zero, 0xF
D_8024D154:
/* 17BA34 8024D154 3C108028 */ lui $s0, %hi(D_80280D04)
/* 17BA38 8024D158 26100D04 */ addiu $s0, $s0, %lo(D_80280D04)
/* 17BA3C 8024D15C 2402012C */ addiu $v0, $zero, 0x12C
/* 17BA40 8024D160 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BA44 8024D164 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BA48 8024D168 24020008 */ addiu $v0, $zero, 0x8
D_8024D16C:
/* 17BA4C 8024D16C 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BA50 8024D170 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BA54 8024D174 080938D1 */ j .L8024E344
/* 17BA58 8024D178 24020014 */ addiu $v0, $zero, 0x14
glabel .L8024D17C
/* 17BA5C 8024D17C 3C108028 */ lui $s0, %hi(D_80280D04)
/* 17BA60 8024D180 26100D04 */ addiu $s0, $s0, %lo(D_80280D04)
/* 17BA64 8024D184 24020190 */ addiu $v0, $zero, 0x190
/* 17BA68 8024D188 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BA6C 8024D18C A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BA70 8024D190 24020008 */ addiu $v0, $zero, 0x8
/* 17BA74 8024D194 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BA78 8024D198 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BA7C 8024D19C 24020014 */ addiu $v0, $zero, 0x14
/* 17BA80 8024D1A0 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BA84 8024D1A4 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BA88 8024D1A8 080938D4 */ j .L8024E350
/* 17BA8C 8024D1AC 2402001E */ addiu $v0, $zero, 0x1E
glabel .L8024D1B0
/* 17BA90 8024D1B0 3C108028 */ lui $s0, %hi(CamPreset_I)
/* 17BA94 8024D1B4 26100D58 */ addiu $s0, $s0, %lo(CamPreset_I)
/* 17BA98 8024D1B8 240200C8 */ addiu $v0, $zero, 0xC8
/* 17BA9C 8024D1BC 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BAA0 8024D1C0 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BAA4 8024D1C4 24020008 */ addiu $v0, $zero, 0x8
/* 17BAA8 8024D1C8 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BAAC 8024D1CC A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BAB0 8024D1D0 24020014 */ addiu $v0, $zero, 0x14
/* 17BAB4 8024D1D4 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BAB8 8024D1D8 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BABC 8024D1DC 080938D4 */ j .L8024E350
/* 17BAC0 8024D1E0 2402000F */ addiu $v0, $zero, 0xF
glabel .L8024D1E4
/* 17BAC4 8024D1E4 3C108028 */ lui $s0, %hi(CamPreset_I)
/* 17BAC8 8024D1E8 26100D58 */ addiu $s0, $s0, %lo(CamPreset_I)
/* 17BACC 8024D1EC 2402012C */ addiu $v0, $zero, 0x12C
/* 17BAD0 8024D1F0 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BAD4 8024D1F4 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BAD8 8024D1F8 24020008 */ addiu $v0, $zero, 0x8
/* 17BADC 8024D1FC 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BAE0 8024D200 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BAE4 8024D204 080938D1 */ j .L8024E344
/* 17BAE8 8024D208 24020014 */ addiu $v0, $zero, 0x14
glabel .L8024D20C
/* 17BAEC 8024D20C 3C108028 */ lui $s0, %hi(CamPreset_I)
/* 17BAF0 8024D210 26100D58 */ addiu $s0, $s0, %lo(CamPreset_I)
/* 17BAF4 8024D214 24020190 */ addiu $v0, $zero, 0x190
/* 17BAF8 8024D218 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BAFC 8024D21C A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BB00 8024D220 24020008 */ addiu $v0, $zero, 0x8
/* 17BB04 8024D224 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BB08 8024D228 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BB0C 8024D22C 24020014 */ addiu $v0, $zero, 0x14
/* 17BB10 8024D230 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BB14 8024D234 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BB18 8024D238 080938D4 */ j .L8024E350
/* 17BB1C 8024D23C 2402001E */ addiu $v0, $zero, 0x1E
glabel .L8024D240
/* 17BB20 8024D240 3C108028 */ lui $s0, %hi(CamPreset_H)
/* 17BB24 8024D244 26100D74 */ addiu $s0, $s0, %lo(CamPreset_H)
/* 17BB28 8024D248 2402010B */ addiu $v0, $zero, 0x10B
.L8024D24C:
/* 17BB2C 8024D24C 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BB30 8024D250 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BB34 8024D254 24020008 */ addiu $v0, $zero, 0x8
/* 17BB38 8024D258 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BB3C 8024D25C A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BB40 8024D260 24020014 */ addiu $v0, $zero, 0x14
/* 17BB44 8024D264 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BB48 8024D268 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BB4C 8024D26C 24020017 */ addiu $v0, $zero, 0x17
/* 17BB50 8024D270 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17BB54 8024D274 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17BB58 8024D278 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17BB5C 8024D27C A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
D_8024D280_C0AB00:
/* 17BB60 8024D280 080938DD */ j .L8024E374
/* 17BB64 8024D284 00000000 */ nop
glabel .L8024D288
/* 17BB68 8024D288 3C108028 */ lui $s0, %hi(CamPreset_H)
/* 17BB6C 8024D28C 26100D74 */ addiu $s0, $s0, %lo(CamPreset_H)
/* 17BB70 8024D290 2402012C */ addiu $v0, $zero, 0x12C
glabel func_8024D294
/* 17BB74 8024D294 24030008 */ addiu $v1, $zero, 0x8
/* 17BB78 8024D298 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BB7C 8024D29C A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BB80 8024D2A0 24020014 */ addiu $v0, $zero, 0x14
/* 17BB84 8024D2A4 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17BB88 8024D2A8 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17BB8C 8024D2AC 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
D_8024D2B0:
/* 17BB90 8024D2B0 A423F284 */ sh $v1, %lo(BattleCam_BoomPitch)($at)
/* 17BB94 8024D2B4 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
D_8024D2B8_C0AB38:
/* 17BB98 8024D2B8 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BB9C 8024D2BC 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17BBA0 8024D2C0 A423F286 */ sh $v1, %lo(BattleCam_BoomZOffset)($at)
/* 17BBA4 8024D2C4 080938DD */ j .L8024E374
/* 17BBA8 8024D2C8 00000000 */ nop
glabel .L8024D2CC
/* 17BBAC 8024D2CC 3C108028 */ lui $s0, %hi(CamPreset_H)
/* 17BBB0 8024D2D0 26100D74 */ addiu $s0, $s0, %lo(CamPreset_H)
D_8024D2D4:
/* 17BBB4 8024D2D4 24020190 */ addiu $v0, $zero, 0x190
/* 17BBB8 8024D2D8 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BBBC 8024D2DC A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BBC0 8024D2E0 24020008 */ addiu $v0, $zero, 0x8
/* 17BBC4 8024D2E4 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
D_8024D2E8:
/* 17BBC8 8024D2E8 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BBCC 8024D2EC 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
D_8024D2F0:
/* 17BBD0 8024D2F0 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17BBD4 8024D2F4 080934CC */ j .L8024D330
/* 17BBD8 8024D2F8 24020014 */ addiu $v0, $zero, 0x14
glabel .L8024D2FC
/* 17BBDC 8024D2FC 24020014 */ addiu $v0, $zero, 0x14
/* 17BBE0 8024D300 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BBE4 8024D304 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
.L8024D308:
/* 17BBE8 8024D308 3C108028 */ lui $s0, %hi(CamPreset_J)
/* 17BBEC 8024D30C 080938DD */ j .L8024E374
D_8024D310:
/* 17BBF0 8024D310 26100E00 */ addiu $s0, $s0, %lo(CamPreset_J)
glabel .L8024D314
/* 17BBF4 8024D314 3C108028 */ lui $s0, %hi(CamPreset_K)
/* 17BBF8 8024D318 26100E1C */ addiu $s0, $s0, %lo(CamPreset_K)
/* 17BBFC 8024D31C 080934CC */ j .L8024D330
/* 17BC00 8024D320 24020014 */ addiu $v0, $zero, 0x14
glabel .L8024D324
/* 17BC04 8024D324 3C108028 */ lui $s0, %hi(CamPreset_L)
/* 17BC08 8024D328 26100E38 */ addiu $s0, $s0, %lo(CamPreset_L)
/* 17BC0C 8024D32C 24020014 */ addiu $v0, $zero, 0x14
.L8024D330:
/* 17BC10 8024D330 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BC14 8024D334 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BC18 8024D338 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17BC1C 8024D33C A420F286 */ sh $zero, %lo(BattleCam_BoomZOffset)($at)
/* 17BC20 8024D340 080938DD */ j .L8024E374
.L8024D344:
/* 17BC24 8024D344 00000000 */ nop
glabel .L8024D348
/* 17BC28 8024D348 3C108028 */ lui $s0, %hi(CamPreset_J)
/* 17BC2C 8024D34C 26100E00 */ addiu $s0, $s0, %lo(CamPreset_J)
/* 17BC30 8024D350 3C01C2A0 */ lui $at, (0xC2A00000 >> 16)
/* 17BC34 8024D354 44816000 */ mtc1 $at, $f12
/* 17BC38 8024D358 44800000 */ mtc1 $zero, $f0
/* 17BC3C 8024D35C 2402010A */ addiu $v0, $zero, 0x10A
glabel func_8024D360
/* 17BC40 8024D360 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BC44 8024D364 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BC48 8024D368 44060000 */ mfc1 $a2, $f0
/* 17BC4C 8024D36C 24020008 */ addiu $v0, $zero, 0x8
/* 17BC50 8024D370 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BC54 8024D374 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BC58 8024D378 44867000 */ mtc1 $a2, $f14
/* 17BC5C 8024D37C 24020028 */ addiu $v0, $zero, 0x28
/* 17BC60 8024D380 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17BC64 8024D384 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17BC68 8024D388 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17BC6C 8024D38C A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
D_8024D390_C0AC10:
/* 17BC70 8024D390 0C093948 */ jal func_8024E520
/* 17BC74 8024D394 00000000 */ nop
/* 17BC78 8024D398 24020014 */ addiu $v0, $zero, 0x14
.L8024D39C:
/* 17BC7C 8024D39C 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BC80 8024D3A0 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BC84 8024D3A4 3C01802A */ lui $at, %hi(BattleCam_TargetActor)
/* 17BC88 8024D3A8 A420F27C */ sh $zero, %lo(BattleCam_TargetActor)($at)
/* 17BC8C 8024D3AC 080938DD */ j .L8024E374
/* 17BC90 8024D3B0 00000000 */ nop
glabel .L8024D3B4
/* 17BC94 8024D3B4 3C108028 */ lui $s0, %hi(CamPreset_I)
D_8024D3B8:
/* 17BC98 8024D3B8 26100D58 */ addiu $s0, $s0, %lo(CamPreset_I)
D_8024D3BC:
/* 17BC9C 8024D3BC 240200FA */ addiu $v0, $zero, 0xFA
D_8024D3C0:
/* 17BCA0 8024D3C0 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BCA4 8024D3C4 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
D_8024D3C8_C0AC48:
/* 17BCA8 8024D3C8 24020008 */ addiu $v0, $zero, 0x8
D_8024D3CC:
/* 17BCAC 8024D3CC 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BCB0 8024D3D0 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BCB4 8024D3D4 24020014 */ addiu $v0, $zero, 0x14
.L8024D3D8:
/* 17BCB8 8024D3D8 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BCBC 8024D3DC A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BCC0 8024D3E0 2402000E */ addiu $v0, $zero, 0xE
/* 17BCC4 8024D3E4 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
D_8024D3E8:
/* 17BCC8 8024D3E8 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17BCCC 8024D3EC 24020001 */ addiu $v0, $zero, 0x1
D_8024D3F0:
/* 17BCD0 8024D3F0 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17BCD4 8024D3F4 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17BCD8 8024D3F8 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17BCDC 8024D3FC A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
/* 17BCE0 8024D400 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17BCE4 8024D404 A022F2A3 */ sb $v0, %lo(BattleCam_ModeX)($at)
.L8024D408:
/* 17BCE8 8024D408 3C01802A */ lui $at, %hi(D_8029F2A6)
/* 17BCEC 8024D40C A020F2A6 */ sb $zero, %lo(D_8029F2A6)($at)
/* 17BCF0 8024D410 3C01802A */ lui $at, %hi(BattleCam_TargetActor)
/* 17BCF4 8024D414 A420F27C */ sh $zero, %lo(BattleCam_TargetActor)($at)
/* 17BCF8 8024D418 3C018028 */ lui $at, %hi(BattleCam_IsFrozen)
/* 17BCFC 8024D41C 080938DD */ j .L8024E374
D_8024D420:
/* 17BD00 8024D420 A0220CE0 */ sb $v0, %lo(BattleCam_IsFrozen)($at)
glabel .L8024D424
/* 17BD04 8024D424 3C108028 */ lui $s0, %hi(CamPreset_J)
/* 17BD08 8024D428 26100E00 */ addiu $s0, $s0, %lo(CamPreset_J)
/* 17BD0C 8024D42C 3C01C2BE */ lui $at, (0xC2BE0000 >> 16)
/* 17BD10 8024D430 44816000 */ mtc1 $at, $f12
D_8024D434:
/* 17BD14 8024D434 3C014190 */ lui $at, (0x41900000 >> 16)
/* 17BD18 8024D438 44817000 */ mtc1 $at, $f14
/* 17BD1C 8024D43C 3C064120 */ lui $a2, (0x41200000 >> 16)
/* 17BD20 8024D440 240200FF */ addiu $v0, $zero, 0xFF
D_8024D444:
/* 17BD24 8024D444 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
D_8024D448_C0ACC8:
/* 17BD28 8024D448 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
glabel func_8024D44C
/* 17BD2C 8024D44C 24020008 */ addiu $v0, $zero, 0x8
/* 17BD30 8024D450 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BD34 8024D454 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BD38 8024D458 24020014 */ addiu $v0, $zero, 0x14
/* 17BD3C 8024D45C 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BD40 8024D460 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BD44 8024D464 2402001D */ addiu $v0, $zero, 0x1D
/* 17BD48 8024D468 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17BD4C 8024D46C A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17BD50 8024D470 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17BD54 8024D474 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
.L8024D478:
/* 17BD58 8024D478 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17BD5C 8024D47C A020F2A2 */ sb $zero, %lo(BattleCam_ModeY)($at)
/* 17BD60 8024D480 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17BD64 8024D484 A020F2A3 */ sb $zero, %lo(BattleCam_ModeX)($at)
/* 17BD68 8024D488 0C093948 */ jal func_8024E520
/* 17BD6C 8024D48C 00000000 */ nop
/* 17BD70 8024D490 3C01802A */ lui $at, %hi(BattleCam_TargetActor)
D_8024D494:
/* 17BD74 8024D494 A420F27C */ sh $zero, %lo(BattleCam_TargetActor)($at)
/* 17BD78 8024D498 080938DD */ j .L8024E374
/* 17BD7C 8024D49C 00000000 */ nop
glabel .L8024D4A0
/* 17BD80 8024D4A0 3C108028 */ lui $s0, %hi(CamPreset_J)
/* 17BD84 8024D4A4 26100E00 */ addiu $s0, $s0, %lo(CamPreset_J)
/* 17BD88 8024D4A8 240200E6 */ addiu $v0, $zero, 0xE6
/* 17BD8C 8024D4AC 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BD90 8024D4B0 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BD94 8024D4B4 24020008 */ addiu $v0, $zero, 0x8
/* 17BD98 8024D4B8 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BD9C 8024D4BC A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BDA0 8024D4C0 24020014 */ addiu $v0, $zero, 0x14
D_8024D4C4:
/* 17BDA4 8024D4C4 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17BDA8 8024D4C8 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17BDAC 8024D4CC 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BDB0 8024D4D0 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BDB4 8024D4D4 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17BDB8 8024D4D8 A420F286 */ sh $zero, %lo(BattleCam_BoomZOffset)($at)
/* 17BDBC 8024D4DC 3C01802A */ lui $at, %hi(BattleCam_TargetActor)
/* 17BDC0 8024D4E0 A420F27C */ sh $zero, %lo(BattleCam_TargetActor)($at)
.L8024D4E4:
/* 17BDC4 8024D4E4 080938DD */ j .L8024E374
/* 17BDC8 8024D4E8 00000000 */ nop
glabel .L8024D4EC
/* 17BDCC 8024D4EC 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17BDD0 8024D4F0 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17BDD4 8024D4F4 24020136 */ addiu $v0, $zero, 0x136
/* 17BDD8 8024D4F8 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BDDC 8024D4FC A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BDE0 8024D500 24020008 */ addiu $v0, $zero, 0x8
.L8024D504:
/* 17BDE4 8024D504 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BDE8 8024D508 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BDEC 8024D50C 2402001E */ addiu $v0, $zero, 0x1E
/* 17BDF0 8024D510 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BDF4 8024D514 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BDF8 8024D518 24020010 */ addiu $v0, $zero, 0x10
/* 17BDFC 8024D51C 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17BE00 8024D520 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17BE04 8024D524 24020001 */ addiu $v0, $zero, 0x1
/* 17BE08 8024D528 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17BE0C 8024D52C A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17BE10 8024D530 3C01802A */ lui $at, %hi(BattleCam_TargetActor)
/* 17BE14 8024D534 A420F27C */ sh $zero, %lo(BattleCam_TargetActor)($at)
D_8024D538_C0ADB8:
/* 17BE18 8024D538 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17BE1C 8024D53C A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
/* 17BE20 8024D540 0809369A */ j .L8024DA68
/* 17BE24 8024D544 00000000 */ nop
glabel .L8024D548
/* 17BE28 8024D548 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17BE2C 8024D54C 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17BE30 8024D550 24020140 */ addiu $v0, $zero, 0x140
/* 17BE34 8024D554 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BE38 8024D558 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BE3C 8024D55C 24020008 */ addiu $v0, $zero, 0x8
/* 17BE40 8024D560 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BE44 8024D564 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BE48 8024D568 24020005 */ addiu $v0, $zero, 0x5
/* 17BE4C 8024D56C 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
.L8024D570:
/* 17BE50 8024D570 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BE54 8024D574 24020001 */ addiu $v0, $zero, 0x1
/* 17BE58 8024D578 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17BE5C 8024D57C A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
D_8024D580_C0AE00:
/* 17BE60 8024D580 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17BE64 8024D584 A420F286 */ sh $zero, %lo(BattleCam_BoomZOffset)($at)
/* 17BE68 8024D588 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17BE6C 8024D58C A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
/* 17BE70 8024D590 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17BE74 8024D594 A020F2A3 */ sb $zero, %lo(BattleCam_ModeX)($at)
/* 17BE78 8024D598 08093659 */ j .L8024D964
.L8024D59C:
/* 17BE7C 8024D59C 00000000 */ nop
glabel .L8024D5A0
/* 17BE80 8024D5A0 3C108028 */ lui $s0, %hi(D_80280D20)
.L8024D5A4:
/* 17BE84 8024D5A4 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17BE88 8024D5A8 24020154 */ addiu $v0, $zero, 0x154
.L8024D5AC:
/* 17BE8C 8024D5AC 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BE90 8024D5B0 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BE94 8024D5B4 24020008 */ addiu $v0, $zero, 0x8
.L8024D5B8:
/* 17BE98 8024D5B8 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BE9C 8024D5BC A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BEA0 8024D5C0 24020005 */ addiu $v0, $zero, 0x5
/* 17BEA4 8024D5C4 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BEA8 8024D5C8 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BEAC 8024D5CC 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17BEB0 8024D5D0 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17BEB4 8024D5D4 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17BEB8 8024D5D8 A420F286 */ sh $zero, %lo(BattleCam_BoomZOffset)($at)
/* 17BEBC 8024D5DC 080935C6 */ j .L8024D718
/* 17BEC0 8024D5E0 24020001 */ addiu $v0, $zero, 0x1
glabel .L8024D5E4
/* 17BEC4 8024D5E4 3C108028 */ lui $s0, %hi(CamPreset_I)
/* 17BEC8 8024D5E8 26100D58 */ addiu $s0, $s0, %lo(CamPreset_I)
/* 17BECC 8024D5EC 2402012C */ addiu $v0, $zero, 0x12C
/* 17BED0 8024D5F0 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BED4 8024D5F4 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BED8 8024D5F8 24020008 */ addiu $v0, $zero, 0x8
/* 17BEDC 8024D5FC 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BEE0 8024D600 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BEE4 8024D604 2402000F */ addiu $v0, $zero, 0xF
D_8024D608_C0AE88:
/* 17BEE8 8024D608 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BEEC 8024D60C A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BEF0 8024D610 2402FFE0 */ addiu $v0, $zero, -0x20
/* 17BEF4 8024D614 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17BEF8 8024D618 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17BEFC 8024D61C 24020014 */ addiu $v0, $zero, 0x14
/* 17BF00 8024D620 3C01802A */ lui $at, %hi(D_8029F2A7)
/* 17BF04 8024D624 A022F2A7 */ sb $v0, %lo(D_8029F2A7)($at)
.L8024D628:
/* 17BF08 8024D628 24020001 */ addiu $v0, $zero, 0x1
/* 17BF0C 8024D62C 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17BF10 8024D630 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17BF14 8024D634 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17BF18 8024D638 A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
/* 17BF1C 8024D63C 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17BF20 8024D640 A022F2A3 */ sb $v0, %lo(BattleCam_ModeX)($at)
/* 17BF24 8024D644 3C01802A */ lui $at, %hi(BattleCam_TargetActor)
/* 17BF28 8024D648 A420F27C */ sh $zero, %lo(BattleCam_TargetActor)($at)
/* 17BF2C 8024D64C 080938DD */ j .L8024E374
/* 17BF30 8024D650 00000000 */ nop
glabel .L8024D654
/* 17BF34 8024D654 3C108028 */ lui $s0, %hi(CamPreset_N)
/* 17BF38 8024D658 26100D90 */ addiu $s0, $s0, %lo(CamPreset_N)
/* 17BF3C 8024D65C 3C01C282 */ lui $at, (0xC2820000 >> 16)
.L8024D660:
/* 17BF40 8024D660 44810000 */ mtc1 $at, $f0
/* 17BF44 8024D664 3C0141F0 */ lui $at, (0x41F00000 >> 16)
/* 17BF48 8024D668 44811000 */ mtc1 $at, $f2
/* 17BF4C 8024D66C 2402012C */ addiu $v0, $zero, 0x12C
/* 17BF50 8024D670 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
.L8024D674:
/* 17BF54 8024D674 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BF58 8024D678 24020008 */ addiu $v0, $zero, 0x8
.L8024D67C:
/* 17BF5C 8024D67C 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
D_8024D680_C0AF00:
/* 17BF60 8024D680 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
.L8024D684:
/* 17BF64 8024D684 2402000A */ addiu $v0, $zero, 0xA
/* 17BF68 8024D688 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17BF6C 8024D68C A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17BF70 8024D690 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BF74 8024D694 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BF78 8024D698 08093825 */ j .L8024E094
/* 17BF7C 8024D69C 00000000 */ nop
glabel .L8024D6A0
/* 17BF80 8024D6A0 3C108028 */ lui $s0, %hi(CamPreset_I)
/* 17BF84 8024D6A4 26100D58 */ addiu $s0, $s0, %lo(CamPreset_I)
/* 17BF88 8024D6A8 240200DC */ addiu $v0, $zero, 0xDC
/* 17BF8C 8024D6AC 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BF90 8024D6B0 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
D_8024D6B4:
/* 17BF94 8024D6B4 24020008 */ addiu $v0, $zero, 0x8
/* 17BF98 8024D6B8 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BF9C 8024D6BC A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BFA0 8024D6C0 2402001E */ addiu $v0, $zero, 0x1E
/* 17BFA4 8024D6C4 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BFA8 8024D6C8 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17BFAC 8024D6CC 08093650 */ j .L8024D940
/* 17BFB0 8024D6D0 24020018 */ addiu $v0, $zero, 0x18
glabel .L8024D6D4
/* 17BFB4 8024D6D4 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17BFB8 8024D6D8 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17BFBC 8024D6DC 24020118 */ addiu $v0, $zero, 0x118
/* 17BFC0 8024D6E0 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17BFC4 8024D6E4 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17BFC8 8024D6E8 24020008 */ addiu $v0, $zero, 0x8
/* 17BFCC 8024D6EC 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17BFD0 8024D6F0 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17BFD4 8024D6F4 2402001E */ addiu $v0, $zero, 0x1E
.L8024D6F8:
/* 17BFD8 8024D6F8 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17BFDC 8024D6FC A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
D_8024D700_C0AF80:
/* 17BFE0 8024D700 2402FFFC */ addiu $v0, $zero, -0x4
/* 17BFE4 8024D704 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17BFE8 8024D708 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17BFEC 8024D70C 24020001 */ addiu $v0, $zero, 0x1
/* 17BFF0 8024D710 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17BFF4 8024D714 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
.L8024D718:
/* 17BFF8 8024D718 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17BFFC 8024D71C A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
D_8024D720:
/* 17C000 8024D720 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17C004 8024D724 A020F2A3 */ sb $zero, %lo(BattleCam_ModeX)($at)
/* 17C008 8024D728 3C01802A */ lui $at, %hi(BattleCam_TargetActor)
/* 17C00C 8024D72C A420F27C */ sh $zero, %lo(BattleCam_TargetActor)($at)
/* 17C010 8024D730 3C01802A */ lui $at, %hi(D_8029F2A6)
/* 17C014 8024D734 A020F2A6 */ sb $zero, %lo(D_8029F2A6)($at)
/* 17C018 8024D738 080938DD */ j .L8024E374
/* 17C01C 8024D73C 00000000 */ nop
glabel .L8024D740
/* 17C020 8024D740 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17C024 8024D744 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17C028 8024D748 2402017C */ addiu $v0, $zero, 0x17C
/* 17C02C 8024D74C 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C030 8024D750 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C034 8024D754 24020008 */ addiu $v0, $zero, 0x8
/* 17C038 8024D758 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
.L8024D75C:
/* 17C03C 8024D75C A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C040 8024D760 2402003C */ addiu $v0, $zero, 0x3C
/* 17C044 8024D764 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C048 8024D768 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C04C 8024D76C 24020001 */ addiu $v0, $zero, 0x1
.L8024D770:
/* 17C050 8024D770 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C054 8024D774 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C058 8024D778 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C05C 8024D77C A420F286 */ sh $zero, %lo(BattleCam_BoomZOffset)($at)
/* 17C060 8024D780 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17C064 8024D784 A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
D_8024D788_C0B008:
/* 17C068 8024D788 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17C06C 8024D78C A020F2A3 */ sb $zero, %lo(BattleCam_ModeX)($at)
D_8024D790:
/* 17C070 8024D790 3C01802A */ lui $at, %hi(BattleCam_UseLinearInterp)
/* 17C074 8024D794 A022F2A5 */ sb $v0, %lo(BattleCam_UseLinearInterp)($at)
/* 17C078 8024D798 08093659 */ j .L8024D964
.L8024D79C:
/* 17C07C 8024D79C 00000000 */ nop
glabel .L8024D7A0
/* 17C080 8024D7A0 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17C084 8024D7A4 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17C088 8024D7A8 24020140 */ addiu $v0, $zero, 0x140
/* 17C08C 8024D7AC 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C090 8024D7B0 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
D_8024D7B4:
/* 17C094 8024D7B4 24020008 */ addiu $v0, $zero, 0x8
/* 17C098 8024D7B8 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C09C 8024D7BC A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C0A0 8024D7C0 2402001E */ addiu $v0, $zero, 0x1E
/* 17C0A4 8024D7C4 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C0A8 8024D7C8 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C0AC 8024D7CC 2402FFFC */ addiu $v0, $zero, -0x4
/* 17C0B0 8024D7D0 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C0B4 8024D7D4 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17C0B8 8024D7D8 24020001 */ addiu $v0, $zero, 0x1
/* 17C0BC 8024D7DC 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
.L8024D7E0:
/* 17C0C0 8024D7E0 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C0C4 8024D7E4 3C01802A */ lui $at, %hi(BattleCam_ModeY)
.L8024D7E8:
/* 17C0C8 8024D7E8 A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
.L8024D7EC:
/* 17C0CC 8024D7EC 3C01802A */ lui $at, %hi(BattleCam_ModeX)
.L8024D7F0:
/* 17C0D0 8024D7F0 A020F2A3 */ sb $zero, %lo(BattleCam_ModeX)($at)
/* 17C0D4 8024D7F4 08093659 */ j .L8024D964
/* 17C0D8 8024D7F8 00000000 */ nop
glabel .L8024D7FC
/* 17C0DC 8024D7FC 3C108028 */ lui $s0, %hi(D_80280D20)
glabel func_8024D800
/* 17C0E0 8024D800 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17C0E4 8024D804 2402012C */ addiu $v0, $zero, 0x12C
/* 17C0E8 8024D808 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C0EC 8024D80C A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C0F0 8024D810 24020008 */ addiu $v0, $zero, 0x8
/* 17C0F4 8024D814 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C0F8 8024D818 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C0FC 8024D81C 2402003C */ addiu $v0, $zero, 0x3C
/* 17C100 8024D820 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C104 8024D824 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
D_8024D828_C0B0A8:
/* 17C108 8024D828 24020001 */ addiu $v0, $zero, 0x1
/* 17C10C 8024D82C 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C110 8024D830 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C114 8024D834 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C118 8024D838 A420F286 */ sh $zero, %lo(BattleCam_BoomZOffset)($at)
/* 17C11C 8024D83C 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17C120 8024D840 A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
/* 17C124 8024D844 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17C128 8024D848 A020F2A3 */ sb $zero, %lo(BattleCam_ModeX)($at)
/* 17C12C 8024D84C 3C01802A */ lui $at, %hi(BattleCam_UseLinearInterp)
.L8024D850:
/* 17C130 8024D850 A022F2A5 */ sb $v0, %lo(BattleCam_UseLinearInterp)($at)
/* 17C134 8024D854 08093659 */ j .L8024D964
/* 17C138 8024D858 00000000 */ nop
glabel .L8024D85C
/* 17C13C 8024D85C 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17C140 8024D860 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17C144 8024D864 24020140 */ addiu $v0, $zero, 0x140
/* 17C148 8024D868 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C14C 8024D86C A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C150 8024D870 24020008 */ addiu $v0, $zero, 0x8
/* 17C154 8024D874 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C158 8024D878 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C15C 8024D87C 2402001E */ addiu $v0, $zero, 0x1E
/* 17C160 8024D880 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C164 8024D884 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
.L8024D888:
/* 17C168 8024D888 2402FFFC */ addiu $v0, $zero, -0x4
/* 17C16C 8024D88C 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
.L8024D890:
/* 17C170 8024D890 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17C174 8024D894 24020001 */ addiu $v0, $zero, 0x1
/* 17C178 8024D898 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C17C 8024D89C A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C180 8024D8A0 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17C184 8024D8A4 A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
/* 17C188 8024D8A8 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17C18C 8024D8AC A020F2A3 */ sb $zero, %lo(BattleCam_ModeX)($at)
/* 17C190 8024D8B0 08093659 */ j .L8024D964
.L8024D8B4:
/* 17C194 8024D8B4 00000000 */ nop
glabel .L8024D8B8
/* 17C198 8024D8B8 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17C19C 8024D8BC 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17C1A0 8024D8C0 24020140 */ addiu $v0, $zero, 0x140
/* 17C1A4 8024D8C4 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C1A8 8024D8C8 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C1AC 8024D8CC 24020008 */ addiu $v0, $zero, 0x8
D_8024D8D0_C0B150:
/* 17C1B0 8024D8D0 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C1B4 8024D8D4 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
glabel func_8024D8D8
/* 17C1B8 8024D8D8 2402001E */ addiu $v0, $zero, 0x1E
/* 17C1BC 8024D8DC 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C1C0 8024D8E0 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C1C4 8024D8E4 24020001 */ addiu $v0, $zero, 0x1
/* 17C1C8 8024D8E8 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C1CC 8024D8EC A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
D_8024D8F0_D05460:
/* 17C1D0 8024D8F0 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
.L8024D8F4:
/* 17C1D4 8024D8F4 A420F286 */ sh $zero, %lo(BattleCam_BoomZOffset)($at)
/* 17C1D8 8024D8F8 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17C1DC 8024D8FC A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
/* 17C1E0 8024D900 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17C1E4 8024D904 A020F2A3 */ sb $zero, %lo(BattleCam_ModeX)($at)
/* 17C1E8 8024D908 08093659 */ j .L8024D964
/* 17C1EC 8024D90C 00000000 */ nop
glabel .L8024D910
/* 17C1F0 8024D910 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17C1F4 8024D914 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17C1F8 8024D918 24020168 */ addiu $v0, $zero, 0x168
/* 17C1FC 8024D91C 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C200 8024D920 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C204 8024D924 24020008 */ addiu $v0, $zero, 0x8
/* 17C208 8024D928 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C20C 8024D92C A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
glabel func_8024D930
/* 17C210 8024D930 24020014 */ addiu $v0, $zero, 0x14
/* 17C214 8024D934 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C218 8024D938 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C21C 8024D93C 2402FFFC */ addiu $v0, $zero, -0x4
.L8024D940:
/* 17C220 8024D940 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
D_8024D944:
/* 17C224 8024D944 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
D_8024D948:
/* 17C228 8024D948 24020001 */ addiu $v0, $zero, 0x1
D_8024D94C:
/* 17C22C 8024D94C 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C230 8024D950 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C234 8024D954 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17C238 8024D958 A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
/* 17C23C 8024D95C 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17C240 8024D960 A022F2A3 */ sb $v0, %lo(BattleCam_ModeX)($at)
.L8024D964:
/* 17C244 8024D964 3C01802A */ lui $at, %hi(D_8029F2A6)
/* 17C248 8024D968 A020F2A6 */ sb $zero, %lo(D_8029F2A6)($at)
/* 17C24C 8024D96C 3C01802A */ lui $at, %hi(BattleCam_TargetActor)
/* 17C250 8024D970 A420F27C */ sh $zero, %lo(BattleCam_TargetActor)($at)
/* 17C254 8024D974 080938DD */ j .L8024E374
/* 17C258 8024D978 00000000 */ nop
glabel .L8024D97C
/* 17C25C 8024D97C 3C10802A */ lui $s0, %hi(BattleCam_ControlScript)
.L8024D980:
/* 17C260 8024D980 8E10F2B4 */ lw $s0, %lo(BattleCam_ControlScript)($s0)
D_8024D984:
/* 17C264 8024D984 240200C8 */ addiu $v0, $zero, 0xC8
/* 17C268 8024D988 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C26C 8024D98C A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C270 8024D990 24020007 */ addiu $v0, $zero, 0x7
/* 17C274 8024D994 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C278 8024D998 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
.L8024D99C:
/* 17C27C 8024D99C 3C01802A */ lui $at, %hi(BattleCam_MoveTimeTotal)
/* 17C280 8024D9A0 A422F2A0 */ sh $v0, %lo(BattleCam_MoveTimeTotal)($at)
/* 17C284 8024D9A4 3C01802A */ lui $at, %hi(BattleCam_DoneMoving)
/* 17C288 8024D9A8 A020F29C */ sb $zero, %lo(BattleCam_DoneMoving)($at)
/* 17C28C 8024D9AC 3C01802A */ lui $at, %hi(D_8029F2A6)
/* 17C290 8024D9B0 A020F2A6 */ sb $zero, %lo(D_8029F2A6)($at)
.L8024D9B4:
/* 17C294 8024D9B4 080938DD */ j .L8024E374
/* 17C298 8024D9B8 00000000 */ nop
glabel .L8024D9BC
/* 17C29C 8024D9BC 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17C2A0 8024D9C0 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17C2A4 8024D9C4 240200D6 */ addiu $v0, $zero, 0xD6
/* 17C2A8 8024D9C8 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C2AC 8024D9CC A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C2B0 8024D9D0 24020008 */ addiu $v0, $zero, 0x8
/* 17C2B4 8024D9D4 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
.L8024D9D8:
/* 17C2B8 8024D9D8 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C2BC 8024D9DC 24020014 */ addiu $v0, $zero, 0x14
/* 17C2C0 8024D9E0 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C2C4 8024D9E4 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C2C8 8024D9E8 24020010 */ addiu $v0, $zero, 0x10
/* 17C2CC 8024D9EC 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
.L8024D9F0:
/* 17C2D0 8024D9F0 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17C2D4 8024D9F4 2402FFFE */ addiu $v0, $zero, -0x2
/* 17C2D8 8024D9F8 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17C2DC 8024D9FC A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
/* 17C2E0 8024DA00 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C2E4 8024DA04 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C2E8 8024DA08 3C01802A */ lui $at, %hi(BattleCam_TargetActor)
/* 17C2EC 8024DA0C A420F27C */ sh $zero, %lo(BattleCam_TargetActor)($at)
/* 17C2F0 8024DA10 0809369A */ j .L8024DA68
/* 17C2F4 8024DA14 24020001 */ addiu $v0, $zero, 0x1
glabel .L8024DA18
/* 17C2F8 8024DA18 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17C2FC 8024DA1C 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
.L8024DA20:
/* 17C300 8024DA20 2402012C */ addiu $v0, $zero, 0x12C
/* 17C304 8024DA24 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
glabel func_8024DA28
/* 17C308 8024DA28 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C30C 8024DA2C 24020008 */ addiu $v0, $zero, 0x8
/* 17C310 8024DA30 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C314 8024DA34 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C318 8024DA38 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C31C 8024DA3C A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C320 8024DA40 24020010 */ addiu $v0, $zero, 0x10
/* 17C324 8024DA44 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C328 8024DA48 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17C32C 8024DA4C 24020001 */ addiu $v0, $zero, 0x1
/* 17C330 8024DA50 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C334 8024DA54 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C338 8024DA58 3C01802A */ lui $at, %hi(BattleCam_TargetActor)
/* 17C33C 8024DA5C A420F27C */ sh $zero, %lo(BattleCam_TargetActor)($at)
.L8024DA60:
/* 17C340 8024DA60 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17C344 8024DA64 A020F2A2 */ sb $zero, %lo(BattleCam_ModeY)($at)
.L8024DA68:
/* 17C348 8024DA68 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17C34C 8024DA6C A022F2A3 */ sb $v0, %lo(BattleCam_ModeX)($at)
.L8024DA70:
/* 17C350 8024DA70 3C01802A */ lui $at, %hi(D_8029F2A6)
/* 17C354 8024DA74 A020F2A6 */ sb $zero, %lo(D_8029F2A6)($at)
/* 17C358 8024DA78 080938DD */ j .L8024E374
/* 17C35C 8024DA7C 00000000 */ nop
glabel .L8024DA80
/* 17C360 8024DA80 3C108028 */ lui $s0, %hi(CamPreset_N)
/* 17C364 8024DA84 26100D90 */ addiu $s0, $s0, %lo(CamPreset_N)
/* 17C368 8024DA88 3C014270 */ lui $at, (0x42700000 >> 16)
/* 17C36C 8024DA8C 44810000 */ mtc1 $at, $f0
D_8024DA90:
/* 17C370 8024DA90 3C014220 */ lui $at, (0x42200000 >> 16)
D_8024DA94:
/* 17C374 8024DA94 44811000 */ mtc1 $at, $f2
D_8024DA98:
/* 17C378 8024DA98 240201AE */ addiu $v0, $zero, 0x1AE
/* 17C37C 8024DA9C 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C380 8024DAA0 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C384 8024DAA4 24020008 */ addiu $v0, $zero, 0x8
/* 17C388 8024DAA8 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C38C 8024DAAC A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C390 8024DAB0 2402000A */ addiu $v0, $zero, 0xA
/* 17C394 8024DAB4 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
.L8024DAB8:
/* 17C398 8024DAB8 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C39C 8024DABC 24020010 */ addiu $v0, $zero, 0x10
/* 17C3A0 8024DAC0 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C3A4 8024DAC4 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C3A8 8024DAC8 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C3AC 8024DACC A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17C3B0 8024DAD0 3C01802A */ lui $at, %hi(BattleCam_TargetActor)
/* 17C3B4 8024DAD4 A420F27C */ sh $zero, %lo(BattleCam_TargetActor)($at)
/* 17C3B8 8024DAD8 08093827 */ j .L8024E09C
/* 17C3BC 8024DADC 00000000 */ nop
glabel .L8024DAE0
/* 17C3C0 8024DAE0 3C108028 */ lui $s0, %hi(CamPreset_N)
/* 17C3C4 8024DAE4 26100D90 */ addiu $s0, $s0, %lo(CamPreset_N)
/* 17C3C8 8024DAE8 3C014270 */ lui $at, (0x42700000 >> 16)
/* 17C3CC 8024DAEC 44810000 */ mtc1 $at, $f0
/* 17C3D0 8024DAF0 3C014220 */ lui $at, (0x42200000 >> 16)
.L8024DAF4:
/* 17C3D4 8024DAF4 44811000 */ mtc1 $at, $f2
/* 17C3D8 8024DAF8 240201CC */ addiu $v0, $zero, 0x1CC
/* 17C3DC 8024DAFC 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C3E0 8024DB00 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
.L8024DB04:
/* 17C3E4 8024DB04 24020008 */ addiu $v0, $zero, 0x8
/* 17C3E8 8024DB08 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C3EC 8024DB0C A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C3F0 8024DB10 2402000A */ addiu $v0, $zero, 0xA
/* 17C3F4 8024DB14 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C3F8 8024DB18 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
glabel func_8024DB1C
/* 17C3FC 8024DB1C 2402001B */ addiu $v0, $zero, 0x1B
/* 17C400 8024DB20 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C404 8024DB24 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C408 8024DB28 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C40C 8024DB2C A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17C410 8024DB30 3C01802A */ lui $at, %hi(BattleCam_TargetActor)
/* 17C414 8024DB34 A420F27C */ sh $zero, %lo(BattleCam_TargetActor)($at)
/* 17C418 8024DB38 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17C41C 8024DB3C A020F2A2 */ sb $zero, %lo(BattleCam_ModeY)($at)
/* 17C420 8024DB40 0809382B */ j .L8024E0AC
/* 17C424 8024DB44 00000000 */ nop
/* 17C428 8024DB48 3C108028 */ lui $s0, %hi(CamPreset_J)
/* 17C42C 8024DB4C 26100E00 */ addiu $s0, $s0, %lo(CamPreset_J)
/* 17C430 8024DB50 3C01C28C */ lui $at, (0xC28C0000 >> 16)
/* 17C434 8024DB54 44816000 */ mtc1 $at, $f12
/* 17C438 8024DB58 44800000 */ mtc1 $zero, $f0
/* 17C43C 8024DB5C 24020186 */ addiu $v0, $zero, 0x186
/* 17C440 8024DB60 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C444 8024DB64 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C448 8024DB68 44060000 */ mfc1 $a2, $f0
/* 17C44C 8024DB6C 24020008 */ addiu $v0, $zero, 0x8
/* 17C450 8024DB70 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C454 8024DB74 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C458 8024DB78 44867000 */ mtc1 $a2, $f14
/* 17C45C 8024DB7C 2402002D */ addiu $v0, $zero, 0x2D
/* 17C460 8024DB80 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C464 8024DB84 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C468 8024DB88 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C46C 8024DB8C A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17C470 8024DB90 0C093948 */ jal func_8024E520
/* 17C474 8024DB94 00000000 */ nop
/* 17C478 8024DB98 08093710 */ j .L8024DC40
/* 17C47C 8024DB9C 2402000A */ addiu $v0, $zero, 0xA
/* 17C480 8024DBA0 3C108028 */ lui $s0, %hi(CamPreset_J)
/* 17C484 8024DBA4 26100E00 */ addiu $s0, $s0, %lo(CamPreset_J)
/* 17C488 8024DBA8 44806000 */ mtc1 $zero, $f12
/* 17C48C 8024DBAC 240201F4 */ addiu $v0, $zero, 0x1F4
D_8024DBB0_C0B430:
/* 17C490 8024DBB0 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C494 8024DBB4 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C498 8024DBB8 24020008 */ addiu $v0, $zero, 0x8
/* 17C49C 8024DBBC 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
D_8024DBC0:
/* 17C4A0 8024DBC0 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C4A4 8024DBC4 2402002D */ addiu $v0, $zero, 0x2D
/* 17C4A8 8024DBC8 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
D_8024DBCC:
/* 17C4AC 8024DBCC A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C4B0 8024DBD0 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C4B4 8024DBD4 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17C4B8 8024DBD8 44066000 */ mfc1 $a2, $f12
.L8024DBDC:
/* 17C4BC 8024DBDC 0C093948 */ jal func_8024E520
/* 17C4C0 8024DBE0 46006386 */ mov.s $f14, $f12
/* 17C4C4 8024DBE4 08093710 */ j .L8024DC40
/* 17C4C8 8024DBE8 24020028 */ addiu $v0, $zero, 0x28
/* 17C4CC 8024DBEC 3C108028 */ lui $s0, %hi(CamPreset_J)
.L8024DBF0:
/* 17C4D0 8024DBF0 26100E00 */ addiu $s0, $s0, %lo(CamPreset_J)
/* 17C4D4 8024DBF4 3C01C248 */ lui $at, (0xC2480000 >> 16)
/* 17C4D8 8024DBF8 44816000 */ mtc1 $at, $f12
/* 17C4DC 8024DBFC 44800000 */ mtc1 $zero, $f0
D_8024DC00:
/* 17C4E0 8024DC00 2402012C */ addiu $v0, $zero, 0x12C
/* 17C4E4 8024DC04 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C4E8 8024DC08 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C4EC 8024DC0C 44060000 */ mfc1 $a2, $f0
/* 17C4F0 8024DC10 24020008 */ addiu $v0, $zero, 0x8
/* 17C4F4 8024DC14 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
D_8024DC18_C0B498:
/* 17C4F8 8024DC18 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C4FC 8024DC1C 44867000 */ mtc1 $a2, $f14
/* 17C500 8024DC20 2402002D */ addiu $v0, $zero, 0x2D
/* 17C504 8024DC24 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C508 8024DC28 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C50C 8024DC2C 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C510 8024DC30 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17C514 8024DC34 0C093948 */ jal func_8024E520
/* 17C518 8024DC38 00000000 */ nop
/* 17C51C 8024DC3C 24020014 */ addiu $v0, $zero, 0x14
.L8024DC40:
/* 17C520 8024DC40 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C524 8024DC44 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C528 8024DC48 3C01802A */ lui $at, %hi(D_8029F2A6)
/* 17C52C 8024DC4C A020F2A6 */ sb $zero, %lo(D_8029F2A6)($at)
D_8024DC50_C0B4D0:
/* 17C530 8024DC50 080938DD */ j .L8024E374
/* 17C534 8024DC54 00000000 */ nop
/* 17C538 8024DC58 3C108028 */ lui $s0, %hi(CamPreset_N)
/* 17C53C 8024DC5C 26100D90 */ addiu $s0, $s0, %lo(CamPreset_N)
/* 17C540 8024DC60 3C01C296 */ lui $at, (0xC2960000 >> 16)
/* 17C544 8024DC64 44810000 */ mtc1 $at, $f0
/* 17C548 8024DC68 3C014316 */ lui $at, (0x43160000 >> 16)
/* 17C54C 8024DC6C 44811000 */ mtc1 $at, $f2
/* 17C550 8024DC70 240200A6 */ addiu $v0, $zero, 0xA6
/* 17C554 8024DC74 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C558 8024DC78 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C55C 8024DC7C 24020008 */ addiu $v0, $zero, 0x8
/* 17C560 8024DC80 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C564 8024DC84 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C568 8024DC88 24020001 */ addiu $v0, $zero, 0x1
/* 17C56C 8024DC8C 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C570 8024DC90 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C574 8024DC94 08093823 */ j .L8024E08C
/* 17C578 8024DC98 24020011 */ addiu $v0, $zero, 0x11
glabel .L8024DC9C
/* 17C57C 8024DC9C 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17C580 8024DCA0 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17C584 8024DCA4 24020136 */ addiu $v0, $zero, 0x136
/* 17C588 8024DCA8 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C58C 8024DCAC A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C590 8024DCB0 24020008 */ addiu $v0, $zero, 0x8
/* 17C594 8024DCB4 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C598 8024DCB8 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C59C 8024DCBC 2402001E */ addiu $v0, $zero, 0x1E
/* 17C5A0 8024DCC0 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C5A4 8024DCC4 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C5A8 8024DCC8 24020010 */ addiu $v0, $zero, 0x10
D_8024DCCC:
/* 17C5AC 8024DCCC 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
D_8024DCD0:
/* 17C5B0 8024DCD0 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17C5B4 8024DCD4 24020001 */ addiu $v0, $zero, 0x1
/* 17C5B8 8024DCD8 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17C5BC 8024DCDC A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
/* 17C5C0 8024DCE0 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17C5C4 8024DCE4 A022F2A3 */ sb $v0, %lo(BattleCam_ModeX)($at)
/* 17C5C8 8024DCE8 08093849 */ j .L8024E124
D_8024DCEC:
/* 17C5CC 8024DCEC 24020100 */ addiu $v0, $zero, 0x100
glabel .L8024DCF0
/* 17C5D0 8024DCF0 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17C5D4 8024DCF4 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17C5D8 8024DCF8 240200FA */ addiu $v0, $zero, 0xFA
/* 17C5DC 8024DCFC 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C5E0 8024DD00 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C5E4 8024DD04 24020008 */ addiu $v0, $zero, 0x8
/* 17C5E8 8024DD08 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C5EC 8024DD0C A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C5F0 8024DD10 24020078 */ addiu $v0, $zero, 0x78
/* 17C5F4 8024DD14 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C5F8 8024DD18 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C5FC 8024DD1C 24020010 */ addiu $v0, $zero, 0x10
/* 17C600 8024DD20 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
D_8024DD24:
/* 17C604 8024DD24 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
D_8024DD28_C0B5A8:
/* 17C608 8024DD28 24020001 */ addiu $v0, $zero, 0x1
D_8024DD2C:
/* 17C60C 8024DD2C 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17C610 8024DD30 A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
D_8024DD34:
/* 17C614 8024DD34 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17C618 8024DD38 A022F2A3 */ sb $v0, %lo(BattleCam_ModeX)($at)
/* 17C61C 8024DD3C 3C01802A */ lui $at, %hi(BattleCam_UseLinearInterp)
/* 17C620 8024DD40 A022F2A5 */ sb $v0, %lo(BattleCam_UseLinearInterp)($at)
/* 17C624 8024DD44 080937CF */ j .L8024DF3C
/* 17C628 8024DD48 24020100 */ addiu $v0, $zero, 0x100
glabel .L8024DD4C
/* 17C62C 8024DD4C 3C108028 */ lui $s0, %hi(CamPreset_I)
/* 17C630 8024DD50 26100D58 */ addiu $s0, $s0, %lo(CamPreset_I)
D_8024DD54:
/* 17C634 8024DD54 2402012C */ addiu $v0, $zero, 0x12C
/* 17C638 8024DD58 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
.L8024DD5C:
/* 17C63C 8024DD5C A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
D_8024DD60_C0B5E0:
/* 17C640 8024DD60 24020008 */ addiu $v0, $zero, 0x8
/* 17C644 8024DD64 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
D_8024DD68:
/* 17C648 8024DD68 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C64C 8024DD6C 24020078 */ addiu $v0, $zero, 0x78
/* 17C650 8024DD70 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C654 8024DD74 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
D_8024DD78:
/* 17C658 8024DD78 24020010 */ addiu $v0, $zero, 0x10
/* 17C65C 8024DD7C 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C660 8024DD80 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17C664 8024DD84 24020001 */ addiu $v0, $zero, 0x1
D_8024DD88:
/* 17C668 8024DD88 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17C66C 8024DD8C A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
.L8024DD90:
/* 17C670 8024DD90 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17C674 8024DD94 A022F2A3 */ sb $v0, %lo(BattleCam_ModeX)($at)
.L8024DD98:
/* 17C678 8024DD98 3C01802A */ lui $at, %hi(BattleCam_UseLinearInterp)
/* 17C67C 8024DD9C A022F2A5 */ sb $v0, %lo(BattleCam_UseLinearInterp)($at)
/* 17C680 8024DDA0 080937CF */ j .L8024DF3C
/* 17C684 8024DDA4 24020100 */ addiu $v0, $zero, 0x100
glabel .L8024DDA8
/* 17C688 8024DDA8 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17C68C 8024DDAC 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17C690 8024DDB0 24020140 */ addiu $v0, $zero, 0x140
/* 17C694 8024DDB4 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C698 8024DDB8 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C69C 8024DDBC 24020008 */ addiu $v0, $zero, 0x8
.L8024DDC0:
/* 17C6A0 8024DDC0 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C6A4 8024DDC4 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C6A8 8024DDC8 24020005 */ addiu $v0, $zero, 0x5
.L8024DDCC:
/* 17C6AC 8024DDCC 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C6B0 8024DDD0 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C6B4 8024DDD4 24020001 */ addiu $v0, $zero, 0x1
/* 17C6B8 8024DDD8 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17C6BC 8024DDDC A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
D_8024DDE0:
/* 17C6C0 8024DDE0 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C6C4 8024DDE4 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
D_8024DDE8:
/* 17C6C8 8024DDE8 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C6CC 8024DDEC A420F286 */ sh $zero, %lo(BattleCam_BoomZOffset)($at)
jtbl_8024DDF0:
/* 17C6D0 8024DDF0 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17C6D4 8024DDF4 A020F2A3 */ sb $zero, %lo(BattleCam_ModeX)($at)
/* 17C6D8 8024DDF8 0809384B */ j .L8024E12C
/* 17C6DC 8024DDFC 24020100 */ addiu $v0, $zero, 0x100
glabel .L8024DE00
/* 17C6E0 8024DE00 3C108028 */ lui $s0, %hi(D_80280DC8)
/* 17C6E4 8024DE04 26100DC8 */ addiu $s0, $s0, %lo(D_80280DC8)
/* 17C6E8 8024DE08 24020032 */ addiu $v0, $zero, 0x32
/* 17C6EC 8024DE0C 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C6F0 8024DE10 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C6F4 8024DE14 240201F4 */ addiu $v0, $zero, 0x1F4
/* 17C6F8 8024DE18 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C6FC 8024DE1C A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C700 8024DE20 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C704 8024DE24 A420F286 */ sh $zero, %lo(BattleCam_BoomZOffset)($at)
/* 17C708 8024DE28 080938DD */ j .L8024E374
/* 17C70C 8024DE2C 00000000 */ nop
glabel .L8024DE30
/* 17C710 8024DE30 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17C714 8024DE34 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17C718 8024DE38 24020118 */ addiu $v0, $zero, 0x118
/* 17C71C 8024DE3C 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C720 8024DE40 A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C724 8024DE44 24020008 */ addiu $v0, $zero, 0x8
/* 17C728 8024DE48 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C72C 8024DE4C A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C730 8024DE50 2402001E */ addiu $v0, $zero, 0x1E
/* 17C734 8024DE54 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C738 8024DE58 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C73C 8024DE5C 2402FFFC */ addiu $v0, $zero, -0x4
/* 17C740 8024DE60 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C744 8024DE64 A422F286 */ sh $v0, %lo(BattleCam_BoomZOffset)($at)
/* 17C748 8024DE68 24020001 */ addiu $v0, $zero, 0x1
/* 17C74C 8024DE6C 3C01802A */ lui $at, %hi(BattleCam_ModeY)
/* 17C750 8024DE70 A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
/* 17C754 8024DE74 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C758 8024DE78 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C75C 8024DE7C 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17C760 8024DE80 A020F2A3 */ sb $zero, %lo(BattleCam_ModeX)($at)
D_8024DE84:
/* 17C764 8024DE84 080937D1 */ j .L8024DF44
/* 17C768 8024DE88 24020100 */ addiu $v0, $zero, 0x100
glabel .L8024DE8C
/* 17C76C 8024DE8C 3C108028 */ lui $s0, %hi(D_80280D20)
/* 17C770 8024DE90 26100D20 */ addiu $s0, $s0, %lo(D_80280D20)
/* 17C774 8024DE94 2402017C */ addiu $v0, $zero, 0x17C
/* 17C778 8024DE98 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C77C 8024DE9C A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C780 8024DEA0 24020008 */ addiu $v0, $zero, 0x8
/* 17C784 8024DEA4 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C788 8024DEA8 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C78C 8024DEAC 2402003C */ addiu $v0, $zero, 0x3C
/* 17C790 8024DEB0 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C794 8024DEB4 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
/* 17C798 8024DEB8 24020001 */ addiu $v0, $zero, 0x1
/* 17C79C 8024DEBC 3C01802A */ lui $at, %hi(BattleCam_ModeY)
D_8024DEC0_C0B740:
/* 17C7A0 8024DEC0 A022F2A2 */ sb $v0, %lo(BattleCam_ModeY)($at)
/* 17C7A4 8024DEC4 3C01802A */ lui $at, %hi(BattleCam_UseLinearInterp)
.L8024DEC8:
/* 17C7A8 8024DEC8 A022F2A5 */ sb $v0, %lo(BattleCam_UseLinearInterp)($at)
/* 17C7AC 8024DECC 3C01802A */ lui $at, %hi(BattleCam_BoomYaw)
/* 17C7B0 8024DED0 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at)
/* 17C7B4 8024DED4 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset)
/* 17C7B8 8024DED8 A420F286 */ sh $zero, %lo(BattleCam_BoomZOffset)($at)
D_8024DEDC:
/* 17C7BC 8024DEDC 3C01802A */ lui $at, %hi(BattleCam_ModeX)
/* 17C7C0 8024DEE0 A020F2A3 */ sb $zero, %lo(BattleCam_ModeX)($at)
/* 17C7C4 8024DEE4 080937D1 */ j .L8024DF44
/* 17C7C8 8024DEE8 24020100 */ addiu $v0, $zero, 0x100
glabel .L8024DEEC
/* 17C7CC 8024DEEC 3C108028 */ lui $s0, %hi(CamPreset_I)
/* 17C7D0 8024DEF0 26100D58 */ addiu $s0, $s0, %lo(CamPreset_I)
D_8024DEF4:
/* 17C7D4 8024DEF4 240200DC */ addiu $v0, $zero, 0xDC
dgb_01_D_8024DEF8:
/* 17C7D8 8024DEF8 3C01802A */ lui $at, %hi(BattleCam_BoomLength)
/* 17C7DC 8024DEFC A422F280 */ sh $v0, %lo(BattleCam_BoomLength)($at)
/* 17C7E0 8024DF00 24020008 */ addiu $v0, $zero, 0x8
/* 17C7E4 8024DF04 3C01802A */ lui $at, %hi(BattleCam_BoomPitch)
/* 17C7E8 8024DF08 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at)
/* 17C7EC 8024DF0C 2402001E */ addiu $v0, $zero, 0x1E
sam_01_Quizmo_AnswerResult:
/* 17C7F0 8024DF10 3C01802A */ lui $at, %hi(BattleCam_MoveTimeLeft)
/* 17C7F4 8024DF14 A422F29E */ sh $v0, %lo(BattleCam_MoveTimeLeft)($at)
sam_01_Quizmo_StageEffect:
/* 17C7F8 8024DF18 24020018 */ addiu $v0, $zero, 0x18
### DECOMPILED C INSTRUCTIONS:
void btl_cam_use_preset_impl(s32 id) {
BattleStatus* battleStatus = &gBattleStatus;
EvtScript* preset = NULL;
Evt* newScript;
if (!BattleCam_IsFrozen) {
D_8029F2A6 = TRUE;
BattleCam_ModeY = BTL_CAM_MODEY_0;
BattleCam_ModeX = BTL_CAM_MODEX_0;
BattleCam_UseLinearInterp = FALSE;
D_8029F2A7 = 0;
switch (id) {
case BTL_CAM_PRESET_00:
preset = &CamPreset_A;
break;
case BTL_CAM_PRESET_01:
preset = &CamPreset_B;
break;
case BTL_CAM_DEFAULT:
if (BattleCam_CurrentPresetID == id) {
return;
}
BattleCam_BoomLength = 500;
BattleCam_MoveTimeLeft = 30;
preset = &EVS_BattleCam_Default;
break;
case BTL_CAM_PRESET_03:
if (BattleCam_CurrentPresetID == id) {
return;
}
BattleCam_BoomLength = 480;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 0;
preset = &CamPreset_D;
break;
case BTL_CAM_PRESET_04:
if (BattleCam_CurrentPresetID == id) {
return;
}
BattleCam_BoomLength = 500;
BattleCam_MoveTimeLeft = 10;
BattleCam_BoomZOffset = 0;
preset = &CamPreset_E;
break;
case BTL_CAM_PRESET_05:
BattleCam_BoomLength = 300;
BattleCam_MoveTimeLeft = 20;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
preset = &CamPreset_F;
break;
case BTL_CAM_PRESET_06:
BattleCam_BoomLength = 300;
BattleCam_MoveTimeLeft = 20;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
preset = &CamPreset_G;
break;
case BTL_CAM_PRESET_07:
BattleCam_BoomLength = 300;
BattleCam_MoveTimeLeft = 20;
preset = &CamPreset_H;
break;
case BTL_CAM_PRESET_08:
BattleCam_BoomLength = 300;
BattleCam_MoveTimeLeft = 20;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
preset = &CamPreset_I;
break;
case BTL_CAM_PRESET_09:
if (BattleCam_ControlScript != &EVS_BattleCam_Default) {
BattleCam_BoomLength = 500;
BattleCam_MoveTimeLeft = 120;
preset = &EVS_BattleCam_Default;
break;
}
return;
case BTL_CAM_PRESET_10:
BattleCam_BoomLength = 200;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 15;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
preset = &CamPreset_F;
break;
case BTL_CAM_PRESET_11:
BattleCam_BoomLength = 300;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 16;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
preset = &CamPreset_F;
break;
case BTL_CAM_PRESET_12:
BattleCam_BoomLength = 400;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 30;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
preset = &CamPreset_F;
break;
case BTL_CAM_PRESET_13:
BattleCam_BoomLength = 200;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 15;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
preset = &CamPreset_I;
break;
case BTL_CAM_PRESET_14:
BattleCam_BoomLength = 300;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 16;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
preset = &CamPreset_I;
break;
case BTL_CAM_PRESET_15:
BattleCam_BoomLength = 400;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 30;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
preset = &CamPreset_I;
break;
case BTL_CAM_PRESET_16:
BattleCam_BoomLength = 267;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 23;
preset = &CamPreset_H;
break;
case BTL_CAM_PRESET_17:
BattleCam_BoomLength = 300;
BattleCam_BoomYaw = 0;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 8;
preset = &CamPreset_H;
break;
case BTL_CAM_PRESET_18:
BattleCam_BoomLength = 400;
BattleCam_BoomPitch = 8;
BattleCam_BoomYaw = 0;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 0;
preset = &CamPreset_H;
break;
case BTL_CAM_PRESET_19:
BattleCam_MoveTimeLeft = 20;
preset = &CamPreset_J;
break;
case BTL_CAM_PRESET_20:
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 0;
preset = &CamPreset_K;
break;
case BTL_CAM_PRESET_21:
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 0;
preset = &CamPreset_L;
break;
case BTL_CAM_PRESET_25:
BattleCam_BoomLength = 266;
BattleCam_BoomPitch = 8;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 40;
btl_cam_set_target_pos(-80.0f, 0.0f, 0.0f);
BattleCam_MoveTimeLeft = 20;
BattleCam_TargetActor = ACTOR_PLAYER;
preset = &CamPreset_J;
break;
case BTL_CAM_PRESET_24:
BattleCam_BoomLength = 250;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 14;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PLAYER;
BattleCam_IsFrozen = TRUE;
preset = &CamPreset_I;
break;
case BTL_CAM_VICTORY:
BattleCam_BoomLength = 255;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 29;
BattleCam_ModeY = BTL_CAM_MODEY_0;
BattleCam_ModeX = BTL_CAM_MODEX_0;
btl_cam_set_target_pos(-95.0f, 18.0f, 10.0f);
BattleCam_TargetActor = ACTOR_PLAYER;
preset = &CamPreset_J;
break;
case BTL_CAM_PLAYER_ENTRY:
BattleCam_BoomLength = 230;
BattleCam_BoomPitch = 8;
BattleCam_BoomYaw = 0;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 0;
BattleCam_TargetActor = ACTOR_PLAYER;
preset = &CamPreset_J;
break;
case BTL_CAM_PLAYER_ATTACK_APPROACH:
BattleCam_BoomLength = 310;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 30;
BattleCam_BoomZOffset = 16;
BattleCam_BoomYaw = 0;
BattleCam_TargetActor = ACTOR_PLAYER;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
D_8029F2A6 = FALSE;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_27:
BattleCam_BoomLength = 320;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 5;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_0;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PLAYER;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_28:
BattleCam_BoomLength = 340;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 5;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_0;
BattleCam_TargetActor = ACTOR_PLAYER;
D_8029F2A6 = FALSE;
preset = &CamPreset_M;
break;
case BTL_CAM_PLAYER_HIT_SPIKE:
case BTL_CAM_PLAYER_HIT_HAZARD:
BattleCam_BoomLength = 300;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 15;
BattleCam_BoomZOffset = -32;
D_8029F2A7 = 20;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
BattleCam_TargetActor = ACTOR_PLAYER;
preset = &CamPreset_I;
break;
case BTL_CAM_PLAYER_CHARGE_UP:
BattleCam_BoomLength = 300;
BattleCam_BoomPitch = 8;
BattleCam_BoomYaw = 0;
BattleCam_MoveTimeLeft = 10;
BattleCam_BoomZOffset = 10;
BattleCam_ModeY = BTL_CAM_MODEY_0;
BattleCam_ModeX = BTL_CAM_MODEX_0;
BattleCam_PosZ = 0.0f;
BattleCam_PosX = -65.0f;
BattleCam_PosY = 30.0f;
preset = &CamPreset_N;
break;
case BTL_CAM_PLAYER_STATUS_AFFLICTED:
BattleCam_BoomLength = 220;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 30;
BattleCam_BoomZOffset = 24;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PLAYER;
preset = &CamPreset_I;
break;
case BTL_CAM_PRESET_34:
BattleCam_BoomLength = 280;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 30;
BattleCam_BoomZOffset = -4;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_0;
BattleCam_TargetActor = ACTOR_PLAYER;
D_8029F2A6 = FALSE;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_35:
BattleCam_BoomLength = 380;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 60;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_0;
BattleCam_UseLinearInterp = TRUE;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PLAYER;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_37:
BattleCam_BoomLength = 320;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 30;
BattleCam_BoomZOffset = -4;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_0;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PLAYER;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_36:
BattleCam_BoomLength = 300;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 60;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_0;
BattleCam_UseLinearInterp = TRUE;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PLAYER;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_38:
BattleCam_BoomLength = 320;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 30;
BattleCam_BoomZOffset = -4;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_0;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PLAYER;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_39:
BattleCam_BoomLength = 320;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 30;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_0;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PLAYER;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_40:
BattleCam_BoomLength = 360;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = -4;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PLAYER;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_41:
case BTL_CAM_PRESET_42:
BattleCam_BoomLength = 200;
BattleCam_MoveTimeLeft = 7;
BattleCam_MoveTimeTotal = 7;
BattleCam_DoneMoving = FALSE;
D_8029F2A6 = FALSE;
preset = BattleCam_ControlScript;
break;
case BTL_CAM_PLAYER_AIM_HAMMER:
BattleCam_BoomLength = 214;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 16;
BattleCam_ModeY = BTL_CAM_MODEY_MINUS_2;
BattleCam_BoomYaw = 0;
BattleCam_TargetActor = ACTOR_PLAYER;
BattleCam_ModeX = BTL_CAM_MODEX_1;
D_8029F2A6 = FALSE;
preset = &CamPreset_M;
break;
case BTL_CAM_PLAYER_HAMMER_STRIKE:
BattleCam_BoomLength = 300;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 8;
BattleCam_BoomZOffset = 16;
BattleCam_BoomYaw = 0;
BattleCam_TargetActor = ACTOR_PLAYER;
BattleCam_ModeY = BTL_CAM_MODEY_0;
BattleCam_ModeX = BTL_CAM_MODEX_1;
D_8029F2A6 = FALSE;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_45:
BattleCam_BoomLength = 430;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 10;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 16;
BattleCam_TargetActor = ACTOR_PLAYER;
BattleCam_ModeY = BTL_CAM_MODEY_0;
BattleCam_ModeX = BTL_CAM_MODEX_0;
BattleCam_PosZ = 0.0f;
BattleCam_PosX = 60.0f;
BattleCam_PosY = 40.0f;
preset = &CamPreset_N;
break;
case BTL_CAM_PRESET_46:
BattleCam_BoomLength = 460;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 10;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 27;
BattleCam_TargetActor = ACTOR_PLAYER;
BattleCam_ModeY = BTL_CAM_MODEY_0;
BattleCam_PosZ = 0.0f;
BattleCam_PosX = 60.0f;
BattleCam_PosY = 40.0f;
preset = &CamPreset_N;
break;
case BTL_CAM_PRESET_70:
BattleCam_BoomLength = 390;
BattleCam_BoomPitch = 8;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 45;
btl_cam_set_target_pos(-70.0f, 0.0f, 0.0f);
BattleCam_MoveTimeLeft = 10;
D_8029F2A6 = FALSE;
preset = &CamPreset_J;
break;
case BTL_CAM_PRESET_71:
BattleCam_BoomLength = 500;
BattleCam_BoomPitch = 8;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 45;
btl_cam_set_target_pos(0.0f, 0.0f, 0.0f);
BattleCam_MoveTimeLeft = 40;
D_8029F2A6 = FALSE;
preset = &CamPreset_J;
break;
case BTL_CAM_PRESET_69:
case BTL_CAM_PRESET_72:
BattleCam_BoomLength = 300;
BattleCam_BoomPitch = 8;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 45;
btl_cam_set_target_pos(-50.0f, 0.0f, 0.0f);
BattleCam_MoveTimeLeft = 20;
D_8029F2A6 = FALSE;
preset = &CamPreset_J;
break;
case BTL_CAM_PRESET_73:
BattleCam_BoomLength = 166;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 1;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 17;
BattleCam_ModeY = BTL_CAM_MODEY_0;
BattleCam_ModeX = BTL_CAM_MODEX_0;
BattleCam_PosX = -75.0f;
BattleCam_PosY = 150.0f;
BattleCam_PosZ = 0.0f;
preset = &CamPreset_N;
break;
case BTL_CAM_PARTNER_APPROACH:
BattleCam_BoomLength = 310;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 30;
BattleCam_BoomZOffset = 16;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
BattleCam_TargetActor = ACTOR_PARTNER;
D_8029F2A6 = FALSE;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_48:
BattleCam_BoomLength = 250;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 120;
BattleCam_BoomZOffset = 16;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
BattleCam_UseLinearInterp = TRUE;
BattleCam_BoomYaw = 0;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PARTNER;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_49:
BattleCam_BoomLength = 300;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 120;
BattleCam_BoomZOffset = 16;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
BattleCam_UseLinearInterp = TRUE;
BattleCam_BoomYaw = 0;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PARTNER;
preset = &CamPreset_I;
break;
case BTL_CAM_PRESET_50:
BattleCam_BoomLength = 320;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 5;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 0;
BattleCam_ModeX = BTL_CAM_MODEX_0;
BattleCam_TargetActor = ACTOR_PARTNER;
D_8029F2A6 = FALSE;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_29:
case BTL_CAM_PRESET_51:
BattleCam_MoveTimeLeft = 50;
BattleCam_BoomLength = 500;
BattleCam_BoomZOffset = 0;
preset = &CamPreset_D;
break;
case BTL_CAM_PRESET_52:
BattleCam_BoomLength = 280;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 30;
BattleCam_BoomZOffset = -4;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_BoomYaw = 0;
BattleCam_ModeX = BTL_CAM_MODEX_0;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PARTNER;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_53:
BattleCam_BoomLength = 380;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 60;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_UseLinearInterp = TRUE;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 0;
BattleCam_ModeX = BTL_CAM_MODEX_0;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PARTNER;
preset = &CamPreset_M;
break;
case BTL_CAM_PARTNER_INJURED:
BattleCam_BoomLength = 220;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 30;
BattleCam_BoomZOffset = 24;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
BattleCam_BoomYaw = 0;
D_8029F2A6 = FALSE;
BattleCam_TargetActor = ACTOR_PARTNER;
preset = &CamPreset_I;
break;
case BTL_CAM_PRESET_55:
BattleCam_BoomLength = 210;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 10;
BattleCam_ModeY = BTL_CAM_MODEY_0;
BattleCam_ModeX = BTL_CAM_MODEX_0;
BattleCam_PosZ = 0.0f;
BattleCam_PosX = -95.0f;
BattleCam_PosY = 22.0f;
preset = &CamPreset_N;
break;
case BTL_CAM_PRESET_56:
BattleCam_BoomLength = 320;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 30;
BattleCam_BoomZOffset = -4;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_BoomYaw = 0;
BattleCam_ModeX = BTL_CAM_MODEX_0;
BattleCam_TargetActor = ACTOR_PARTNER;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_57:
BattleCam_BoomLength = 320;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 30;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 0;
BattleCam_ModeX = BTL_CAM_MODEX_0;
BattleCam_TargetActor = ACTOR_PARTNER;
preset = &CamPreset_M;
break;
case BTL_CAM_PRESET_58:
BattleCam_BoomLength = 400;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 30;
BattleCam_BoomYaw = 0;
BattleCam_BoomZOffset = 10;
BattleCam_ModeY = BTL_CAM_MODEY_0;
BattleCam_ModeX = BTL_CAM_MODEX_0;
BattleCam_PosZ = 0.0f;
BattleCam_PosX = 25.0f;
BattleCam_PosY = 60.0f;
preset = &CamPreset_N;
break;
case BTL_CAM_PRESET_59:
BattleCam_BoomLength = 200;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 60;
BattleCam_BoomZOffset = 11;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
BattleCam_UseLinearInterp = TRUE;
BattleCam_BoomYaw = 0;
BattleCam_TargetActor = ACTOR_PARTNER;
D_8029F2A6 = FALSE;
preset = &CamPreset_I;
break;
case BTL_CAM_PRESET_60:
BattleCam_BoomLength = 300;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 8;
BattleCam_BoomZOffset = 16;
BattleCam_BoomYaw = 0;
BattleCam_TargetActor = ACTOR_PARTNER;
BattleCam_ModeY = BTL_CAM_MODEY_0;
BattleCam_ModeX = BTL_CAM_MODEX_0;
preset = &CamPreset_I;
break;
case BTL_CAM_PRESET_61:
case BTL_CAM_PRESET_62:
BattleCam_BoomLength = 300;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 15;
BattleCam_BoomZOffset = -32;
D_8029F2A7 = 20;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
BattleCam_BoomYaw = 0;
BattleCam_TargetActor = ACTOR_PARTNER;
preset = &CamPreset_I;
break;
case BTL_CAM_ENEMY_APPROACH:
BattleCam_BoomLength = 400;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 27;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
preset = &CamPreset_F;
break;
case BTL_CAM_PRESET_64:
BattleCam_BoomLength = 358;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 10;
BattleCam_BoomZOffset = 16;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_0;
preset = &CamPreset_F;
break;
case BTL_CAM_PRESET_65:
BattleCam_MoveTimeLeft = 50;
BattleCam_BoomLength = 500;
preset = &EVS_BattleCam_Default;
break;
case BTL_CAM_PRESET_66:
BattleCam_BoomLength = 267;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 16;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_0;
preset = &CamPreset_F;
break;
case BTL_CAM_PRESET_67:
BattleCam_BoomLength = 214;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 16;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
preset = &CamPreset_F;
break;
case BTL_CAM_PRESET_68:
BattleCam_BoomLength = 300;
BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 4;
BattleCam_BoomZOffset = 16;
BattleCam_BoomYaw = 0;
BattleCam_ModeY = BTL_CAM_MODEY_1;
BattleCam_ModeX = BTL_CAM_MODEX_1;
preset = &CamPreset_F;
break;
}
BattleCam_CurrentPresetID = id;
if (battleStatus->camMovementScript != NULL) {
kill_script_by_ID(battleStatus->camMovementScriptID);
}
BattleCam_ControlScript = preset;
newScript = start_script(preset, EVT_PRIORITY_A, EVT_FLAG_RUN_IMMEDIATELY);
BattleCam_DoneMoving = FALSE;
battleStatus->camMovementScript = newScript;
battleStatus->camMovementScriptID = newScript->id;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel msg_copy_to_print_buffer
/* BAC70 80124570 27BDFFB8 */ addiu $sp, $sp, -0x48
/* BAC74 80124574 AFB40030 */ sw $s4, 0x30($sp)
/* BAC78 80124578 0080A02D */ daddu $s4, $a0, $zero
/* BAC7C 8012457C AFB50034 */ sw $s5, 0x34($sp)
/* BAC80 80124580 00A0A82D */ daddu $s5, $a1, $zero
/* BAC84 80124584 26880468 */ addiu $t0, $s4, 0x468
/* BAC88 80124588 AFB7003C */ sw $s7, 0x3C($sp)
/* BAC8C 8012458C 24170002 */ addiu $s7, $zero, 0x2
/* BAC90 80124590 AFBE0040 */ sw $fp, 0x40($sp)
/* BAC94 80124594 30DE0001 */ andi $fp, $a2, 0x1
/* BAC98 80124598 AFB60038 */ sw $s6, 0x38($sp)
/* BAC9C 8012459C 241600FF */ addiu $s6, $zero, 0xFF
/* BACA0 801245A0 AFBF0044 */ sw $ra, 0x44($sp)
/* BACA4 801245A4 AFB3002C */ sw $s3, 0x2C($sp)
/* BACA8 801245A8 AFB20028 */ sw $s2, 0x28($sp)
/* BACAC 801245AC AFB10024 */ sw $s1, 0x24($sp)
/* BACB0 801245B0 AFB00020 */ sw $s0, 0x20($sp)
/* BACB4 801245B4 AFA80018 */ sw $t0, 0x18($sp)
/* BACB8 801245B8 96820004 */ lhu $v0, 0x4($s4)
/* BACBC 801245BC 9684000C */ lhu $a0, 0xC($s4)
/* BACC0 801245C0 8E830000 */ lw $v1, 0x0($s4)
/* BACC4 801245C4 24420010 */ addiu $v0, $v0, 0x10
/* BACC8 801245C8 02829021 */ addu $s2, $s4, $v0
/* BACCC 801245CC 00649821 */ addu $s3, $v1, $a0
.L801245D0:
/* BACD0 801245D0 92650000 */ lbu $a1, 0x0($s3)
/* BACD4 801245D4 26730001 */ addiu $s3, $s3, 0x1
/* BACD8 801245D8 92660000 */ lbu $a2, 0x0($s3)
/* BACDC 801245DC 24A3FF10 */ addiu $v1, $a1, -0xF0
/* BACE0 801245E0 2C620010 */ sltiu $v0, $v1, 0x10
/* BACE4 801245E4 104003EF */ beqz $v0, .L801255A4
/* BACE8 801245E8 00031080 */ sll $v0, $v1, 2
/* BACEC 801245EC 3C018015 */ lui $at, %hi(jtbl_801503B8)
/* BACF0 801245F0 00220821 */ addu $at, $at, $v0
/* BACF4 801245F4 8C2203B8 */ lw $v0, %lo(jtbl_801503B8)($at)
/* BACF8 801245F8 00400008 */ jr $v0
/* BACFC 801245FC 00000000 */ nop
glabel .L80124600
/* BAD00 80124600 240200F0 */ addiu $v0, $zero, 0xF0
/* BAD04 80124604 A2420000 */ sb $v0, 0x0($s2)
/* BAD08 80124608 C6800540 */ lwc1 $f0, 0x540($s4)
/* BAD0C 8012460C 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* BAD10 80124610 44811000 */ mtc1 $at, $f2
/* BAD14 80124614 00000000 */ nop
/* BAD18 80124618 4600103E */ c.le.s $f2, $f0
/* BAD1C 8012461C 00000000 */ nop
/* BAD20 80124620 45010005 */ bc1t .L80124638
/* BAD24 80124624 26520001 */ addiu $s2, $s2, 0x1
/* BAD28 80124628 4600010D */ trunc.w.s $f4, $f0
/* BAD2C 8012462C 44032000 */ mfc1 $v1, $f4
/* BAD30 80124630 08049194 */ j .L80124650
/* BAD34 80124634 00000000 */ nop
.L80124638:
/* BAD38 80124638 46020001 */ sub.s $f0, $f0, $f2
/* BAD3C 8012463C 3C028000 */ lui $v0, (0x80000000 >> 16)
/* BAD40 80124640 4600010D */ trunc.w.s $f4, $f0
/* BAD44 80124644 44032000 */ mfc1 $v1, $f4
/* BAD48 80124648 00000000 */ nop
/* BAD4C 8012464C 00621825 */ or $v1, $v1, $v0
.L80124650:
/* BAD50 80124650 8FA80018 */ lw $t0, 0x18($sp)
/* BAD54 80124654 91020000 */ lbu $v0, 0x0($t0)
/* BAD58 80124658 00431021 */ addu $v0, $v0, $v1
/* BAD5C 8012465C 08049580 */ j .L80125600
/* BAD60 80124660 A1020000 */ sb $v0, 0x0($t0)
glabel .L80124664
/* BAD64 80124664 96830500 */ lhu $v1, 0x500($s4)
/* BAD68 80124668 24020005 */ addiu $v0, $zero, 0x5
/* BAD6C 8012466C A28204F8 */ sb $v0, 0x4F8($s4)
/* BAD70 80124670 34630001 */ ori $v1, $v1, 0x1
/* BAD74 80124674 3063FFFD */ andi $v1, $v1, 0xFFFD
/* BAD78 80124678 A6830500 */ sh $v1, 0x500($s4)
/* BAD7C 8012467C 8E8304FC */ lw $v1, 0x4FC($s4)
/* BAD80 80124680 2402FF7F */ addiu $v0, $zero, -0x81
/* BAD84 80124684 A280047C */ sb $zero, 0x47C($s4)
/* BAD88 80124688 A680047E */ sh $zero, 0x47E($s4)
/* BAD8C 8012468C 00621824 */ and $v1, $v1, $v0
/* BAD90 80124690 2402FEFF */ addiu $v0, $zero, -0x101
/* BAD94 80124694 00621824 */ and $v1, $v1, $v0
/* BAD98 80124698 AE8304FC */ sw $v1, 0x4FC($s4)
/* BAD9C 8012469C 92830508 */ lbu $v1, 0x508($s4)
/* BADA0 801246A0 2402000F */ addiu $v0, $zero, 0xF
/* BADA4 801246A4 106203D6 */ beq $v1, $v0, .L80125600
/* BADA8 801246A8 240400CB */ addiu $a0, $zero, 0xCB
/* BADAC 801246AC 0000282D */ daddu $a1, $zero, $zero
/* BADB0 801246B0 00A0302D */ daddu $a2, $a1, $zero
/* BADB4 801246B4 0C0526AE */ jal sfx_play_sound_with_params
/* BADB8 801246B8 00A0382D */ daddu $a3, $a1, $zero
/* BADBC 801246BC 08049580 */ j .L80125600
/* BADC0 801246C0 00000000 */ nop
glabel .L801246C4
/* BADC4 801246C4 96820500 */ lhu $v0, 0x500($s4)
/* BADC8 801246C8 92630000 */ lbu $v1, 0x0($s3)
/* BADCC 801246CC 34420001 */ ori $v0, $v0, 0x1
/* BADD0 801246D0 A6820500 */ sh $v0, 0x500($s4)
/* BADD4 801246D4 8E8204FC */ lw $v0, 0x4FC($s4)
/* BADD8 801246D8 26730001 */ addiu $s3, $s3, 0x1
/* BADDC 801246DC A683000E */ sh $v1, 0xE($s4)
/* BADE0 801246E0 2403FF7F */ addiu $v1, $zero, -0x81
/* BADE4 801246E4 0804957F */ j .L801255FC
/* BADE8 801246E8 00431024 */ and $v0, $v0, $v1
glabel .L801246EC
/* BADEC 801246EC 24A200FE */ addiu $v0, $a1, 0xFE
/* BADF0 801246F0 A2420000 */ sb $v0, 0x0($s2)
/* BADF4 801246F4 26520001 */ addiu $s2, $s2, 0x1
/* BADF8 801246F8 24A2000D */ addiu $v0, $a1, 0xD
/* BADFC 801246FC 08049580 */ j .L80125600
/* BAE00 80124700 A2820455 */ sb $v0, 0x455($s4)
glabel .L80124704
/* BAE04 80124704 08049556 */ j .L80125558
/* BAE08 80124708 240200F5 */ addiu $v0, $zero, 0xF5
glabel .L8012470C
/* BAE0C 8012470C 08049556 */ j .L80125558
/* BAE10 80124710 240200F6 */ addiu $v0, $zero, 0xF6
glabel .L80124714
/* BAE14 80124714 08049556 */ j .L80125558
/* BAE18 80124718 240200F7 */ addiu $v0, $zero, 0xF7
glabel .L8012471C
/* BAE1C 8012471C 240200F9 */ addiu $v0, $zero, 0xF9
/* BAE20 80124720 A2420000 */ sb $v0, 0x0($s2)
/* BAE24 80124724 26520001 */ addiu $s2, $s2, 0x1
/* BAE28 80124728 08049580 */ j .L80125600
/* BAE2C 8012472C 26B5FFFF */ addiu $s5, $s5, -0x1
glabel .L80124730
/* BAE30 80124730 92820468 */ lbu $v0, 0x468($s4)
/* BAE34 80124734 504003B2 */ beql $v0, $zero, .L80125600
/* BAE38 80124738 A2800468 */ sb $zero, 0x468($s4)
/* BAE3C 8012473C 92820486 */ lbu $v0, 0x486($s4)
/* BAE40 80124740 96830462 */ lhu $v1, 0x462($s4)
/* BAE44 80124744 00021040 */ sll $v0, $v0, 1
/* BAE48 80124748 02821021 */ addu $v0, $s4, $v0
/* BAE4C 8012474C A4430488 */ sh $v1, 0x488($v0)
/* BAE50 80124750 92820486 */ lbu $v0, 0x486($s4)
/* BAE54 80124754 24420001 */ addiu $v0, $v0, 0x1
/* BAE58 80124758 A2820486 */ sb $v0, 0x486($s4)
/* BAE5C 8012475C 240200FA */ addiu $v0, $zero, 0xFA
/* BAE60 80124760 A2420000 */ sb $v0, 0x0($s2)
/* BAE64 80124764 26520001 */ addiu $s2, $s2, 0x1
/* BAE68 80124768 92820454 */ lbu $v0, 0x454($s4)
/* BAE6C 8012476C 92830508 */ lbu $v1, 0x508($s4)
/* BAE70 80124770 00021080 */ sll $v0, $v0, 2
/* BAE74 80124774 00031840 */ sll $v1, $v1, 1
/* BAE78 80124778 3C01802F */ lui $at, %hi(gMsgCharsets)
/* BAE7C 8012477C 00220821 */ addu $at, $at, $v0
/* BAE80 80124780 8C22B5A8 */ lw $v0, %lo(gMsgCharsets)($at)
/* BAE84 80124784 3C01802F */ lui $at, %hi(D_802EB644)
/* BAE88 80124788 00230821 */ addu $at, $at, $v1
/* BAE8C 8012478C 8423B644 */ lh $v1, %lo(D_802EB644)($at)
/* BAE90 80124790 90440003 */ lbu $a0, 0x3($v0)
/* BAE94 80124794 24020006 */ addiu $v0, $zero, 0x6
/* BAE98 80124798 A28204F8 */ sb $v0, 0x4F8($s4)
/* BAE9C 8012479C 92820468 */ lbu $v0, 0x468($s4)
/* BAEA0 801247A0 00832021 */ addu $a0, $a0, $v1
/* BAEA4 801247A4 00820018 */ mult $a0, $v0
/* BAEA8 801247A8 96820500 */ lhu $v0, 0x500($s4)
/* BAEAC 801247AC 96830462 */ lhu $v1, 0x462($s4)
/* BAEB0 801247B0 34420001 */ ori $v0, $v0, 0x1
/* BAEB4 801247B4 A6820500 */ sh $v0, 0x500($s4)
/* BAEB8 801247B8 00004012 */ mflo $t0
/* BAEBC 801247BC 00681821 */ addu $v1, $v1, $t0
/* BAEC0 801247C0 A6830466 */ sh $v1, 0x466($s4)
/* BAEC4 801247C4 08049580 */ j .L80125600
/* BAEC8 801247C8 A2800468 */ sb $zero, 0x468($s4)
glabel .L801247CC
/* BAECC 801247CC 240200F8 */ addiu $v0, $zero, 0xF8
/* BAED0 801247D0 A2420000 */ sb $v0, 0x0($s2)
/* BAED4 801247D4 26520001 */ addiu $s2, $s2, 0x1
/* BAED8 801247D8 92700000 */ lbu $s0, 0x0($s3)
/* BAEDC 801247DC 26730001 */ addiu $s3, $s3, 0x1
/* BAEE0 801247E0 A2900508 */ sb $s0, 0x508($s4)
/* BAEE4 801247E4 A2500000 */ sb $s0, 0x0($s2)
/* BAEE8 801247E8 26520001 */ addiu $s2, $s2, 0x1
/* BAEEC 801247EC 320200FF */ andi $v0, $s0, 0xFF
/* BAEF0 801247F0 2443FFFF */ addiu $v1, $v0, -0x1
/* BAEF4 801247F4 2C62000F */ sltiu $v0, $v1, 0xF
/* BAEF8 801247F8 104000BD */ beqz $v0, .L80124AF0
/* BAEFC 801247FC A2800509 */ sb $zero, 0x509($s4)
/* BAF00 80124800 00031080 */ sll $v0, $v1, 2
/* BAF04 80124804 3C018015 */ lui $at, %hi(jtbl_801503F8)
/* BAF08 80124808 00220821 */ addu $at, $at, $v0
/* BAF0C 8012480C 8C2203F8 */ lw $v0, %lo(jtbl_801503F8)($at)
/* BAF10 80124810 00400008 */ jr $v0
/* BAF14 80124814 00000000 */ nop
glabel .L80124818
/* BAF18 80124818 2602FFFF */ addiu $v0, $s0, -0x1
/* BAF1C 8012481C 2C420003 */ sltiu $v0, $v0, 0x3
/* BAF20 80124820 10400002 */ beqz $v0, .L8012482C
/* BAF24 80124824 24020003 */ addiu $v0, $zero, 0x3
/* BAF28 80124828 A282053C */ sb $v0, 0x53C($s4)
.L8012482C:
/* BAF2C 8012482C 3C040080 */ lui $a0, (0x800800 >> 16)
/* BAF30 80124830 34840800 */ ori $a0, $a0, (0x800800 & 0xFFFF)
/* BAF34 80124834 96820500 */ lhu $v0, 0x500($s4)
/* BAF38 80124838 8E8304FC */ lw $v1, 0x4FC($s4)
/* BAF3C 8012483C 34420001 */ ori $v0, $v0, 0x1
/* BAF40 80124840 00642025 */ or $a0, $v1, $a0
/* BAF44 80124844 30C300FF */ andi $v1, $a2, 0xFF
/* BAF48 80124848 A6820500 */ sh $v0, 0x500($s4)
/* BAF4C 8012484C 240200C3 */ addiu $v0, $zero, 0xC3
/* BAF50 80124850 10620003 */ beq $v1, $v0, .L80124860
/* BAF54 80124854 AE8404FC */ sw $a0, 0x4FC($s4)
/* BAF58 80124858 34820080 */ ori $v0, $a0, 0x80
/* BAF5C 8012485C AE8204FC */ sw $v0, 0x4FC($s4)
.L80124860:
/* BAF60 80124860 24020011 */ addiu $v0, $zero, 0x11
/* BAF64 80124864 AE820520 */ sw $v0, 0x520($s4)
/* BAF68 80124868 24020012 */ addiu $v0, $zero, 0x12
/* BAF6C 8012486C AE820524 */ sw $v0, 0x524($s4)
/* BAF70 80124870 080492BC */ j .L80124AF0
/* BAF74 80124874 A29704F8 */ sb $s7, 0x4F8($s4)
glabel .L80124878
/* BAF78 80124878 92620000 */ lbu $v0, 0x0($s3)
/* BAF7C 8012487C 26730001 */ addiu $s3, $s3, 0x1
/* BAF80 80124880 A682045A */ sh $v0, 0x45A($s4)
/* BAF84 80124884 92620000 */ lbu $v0, 0x0($s3)
/* BAF88 80124888 26730001 */ addiu $s3, $s3, 0x1
/* BAF8C 8012488C A682045C */ sh $v0, 0x45C($s4)
/* BAF90 80124890 92620000 */ lbu $v0, 0x0($s3)
/* BAF94 80124894 26730001 */ addiu $s3, $s3, 0x1
/* BAF98 80124898 A6820514 */ sh $v0, 0x514($s4)
/* BAF9C 8012489C 92630000 */ lbu $v1, 0x0($s3)
/* BAFA0 801248A0 8E8204FC */ lw $v0, 0x4FC($s4)
/* BAFA4 801248A4 26730001 */ addiu $s3, $s3, 0x1
/* BAFA8 801248A8 A29704F8 */ sb $s7, 0x4F8($s4)
/* BAFAC 801248AC 34420800 */ ori $v0, $v0, 0x800
/* BAFB0 801248B0 AE8204FC */ sw $v0, 0x4FC($s4)
/* BAFB4 801248B4 080492BC */ j .L80124AF0
/* BAFB8 801248B8 A6830516 */ sh $v1, 0x516($s4)
glabel .L801248BC
/* BAFBC 801248BC 17C0008C */ bnez $fp, .L80124AF0
/* BAFC0 801248C0 24020014 */ addiu $v0, $zero, 0x14
/* BAFC4 801248C4 A682045A */ sh $v0, 0x45A($s4)
/* BAFC8 801248C8 2402001C */ addiu $v0, $zero, 0x1C
/* BAFCC 801248CC A682045C */ sh $v0, 0x45C($s4)
/* BAFD0 801248D0 2402003A */ addiu $v0, $zero, 0x3A
/* BAFD4 801248D4 A6820516 */ sh $v0, 0x516($s4)
/* BAFD8 801248D8 24020118 */ addiu $v0, $zero, 0x118
/* BAFDC 801248DC A6820514 */ sh $v0, 0x514($s4)
/* BAFE0 801248E0 8E8204FC */ lw $v0, 0x4FC($s4)
/* BAFE4 801248E4 96830500 */ lhu $v1, 0x500($s4)
/* BAFE8 801248E8 A29704F8 */ sb $s7, 0x4F8($s4)
/* BAFEC 801248EC 34420800 */ ori $v0, $v0, 0x800
/* BAFF0 801248F0 34630001 */ ori $v1, $v1, 0x1
/* BAFF4 801248F4 AE8204FC */ sw $v0, 0x4FC($s4)
/* BAFF8 801248F8 24020006 */ addiu $v0, $zero, 0x6
/* BAFFC 801248FC 1602007C */ bne $s0, $v0, .L80124AF0
/* BB000 80124900 A6830500 */ sh $v1, 0x500($s4)
/* BB004 80124904 2404021C */ addiu $a0, $zero, 0x21C
/* BB008 80124908 0000282D */ daddu $a1, $zero, $zero
/* BB00C 8012490C 00A0302D */ daddu $a2, $a1, $zero
/* BB010 80124910 0C0526AE */ jal sfx_play_sound_with_params
/* BB014 80124914 00A0382D */ daddu $a3, $a1, $zero
/* BB018 80124918 080492BC */ j .L80124AF0
/* BB01C 8012491C 00000000 */ nop
glabel .L80124920
/* BB020 80124920 92620000 */ lbu $v0, 0x0($s3)
/* BB024 80124924 26730001 */ addiu $s3, $s3, 0x1
/* BB028 80124928 2404021C */ addiu $a0, $zero, 0x21C
/* BB02C 8012492C 0000282D */ daddu $a1, $zero, $zero
/* BB030 80124930 00A0302D */ daddu $a2, $a1, $zero
/* BB034 80124934 A682045A */ sh $v0, 0x45A($s4)
/* BB038 80124938 92620000 */ lbu $v0, 0x0($s3)
/* BB03C 8012493C 26730001 */ addiu $s3, $s3, 0x1
/* BB040 80124940 A682045C */ sh $v0, 0x45C($s4)
/* BB044 80124944 92620000 */ lbu $v0, 0x0($s3)
/* BB048 80124948 26730001 */ addiu $s3, $s3, 0x1
/* BB04C 8012494C A6820514 */ sh $v0, 0x514($s4)
/* BB050 80124950 92620000 */ lbu $v0, 0x0($s3)
/* BB054 80124954 00A0382D */ daddu $a3, $a1, $zero
/* BB058 80124958 0C0526AE */ jal sfx_play_sound_with_params
/* BB05C 8012495C A6820516 */ sh $v0, 0x516($s4)
/* BB060 80124960 96820500 */ lhu $v0, 0x500($s4)
/* BB064 80124964 8E8304FC */ lw $v1, 0x4FC($s4)
/* BB068 80124968 26730001 */ addiu $s3, $s3, 0x1
/* BB06C 8012496C A29704F8 */ sb $s7, 0x4F8($s4)
/* BB070 80124970 34420001 */ ori $v0, $v0, 0x1
/* BB074 80124974 34630800 */ ori $v1, $v1, 0x800
/* BB078 80124978 A6820500 */ sh $v0, 0x500($s4)
/* BB07C 8012497C 080492BC */ j .L80124AF0
/* BB080 80124980 AE8304FC */ sw $v1, 0x4FC($s4)
glabel .L80124984
/* BB084 80124984 92620000 */ lbu $v0, 0x0($s3)
/* BB088 80124988 26730001 */ addiu $s3, $s3, 0x1
/* BB08C 8012498C A6820516 */ sh $v0, 0x516($s4)
glabel .L80124990
/* BB090 80124990 17C00057 */ bnez $fp, .L80124AF0
/* BB094 80124994 00000000 */ nop
/* BB098 80124998 8E8204FC */ lw $v0, 0x4FC($s4)
/* BB09C 8012499C 96830500 */ lhu $v1, 0x500($s4)
/* BB0A0 801249A0 A29704F8 */ sb $s7, 0x4F8($s4)
/* BB0A4 801249A4 34420800 */ ori $v0, $v0, 0x800
/* BB0A8 801249A8 34630001 */ ori $v1, $v1, 0x1
/* BB0AC 801249AC AE8204FC */ sw $v0, 0x4FC($s4)
/* BB0B0 801249B0 080492BC */ j .L80124AF0
/* BB0B4 801249B4 A6830500 */ sh $v1, 0x500($s4)
glabel .L801249B8
/* BB0B8 801249B8 92700000 */ lbu $s0, 0x0($s3)
/* BB0BC 801249BC 26730001 */ addiu $s3, $s3, 0x1
/* BB0C0 801249C0 8E8204FC */ lw $v0, 0x4FC($s4)
/* BB0C4 801249C4 96830500 */ lhu $v1, 0x500($s4)
/* BB0C8 801249C8 24041EC3 */ addiu $a0, $zero, 0x1EC3
/* BB0CC 801249CC A29704F8 */ sb $s7, 0x4F8($s4)
/* BB0D0 801249D0 34420800 */ ori $v0, $v0, 0x800
/* BB0D4 801249D4 34630001 */ ori $v1, $v1, 0x1
/* BB0D8 801249D8 AE8204FC */ sw $v0, 0x4FC($s4)
/* BB0DC 801249DC 0C00AB39 */ jal heap_malloc
/* BB0E0 801249E0 A6830500 */ sh $v1, 0x500($s4)
/* BB0E4 801249E4 3C030001 */ lui $v1, %hi(D_B290)
/* BB0E8 801249E8 2463B290 */ addiu $v1, $v1, %lo(D_B290)
/* BB0EC 801249EC 3C080011 */ lui $t0, %hi(D_10F1B0)
/* BB0F0 801249F0 2508F1B0 */ addiu $t0, $t0, %lo(D_10F1B0)
/* BB0F4 801249F4 01032021 */ addu $a0, $t0, $v1
/* BB0F8 801249F8 24851EC3 */ addiu $a1, $a0, 0x1EC3
/* BB0FC 801249FC 0040302D */ daddu $a2, $v0, $zero
/* BB100 80124A00 0C00A5CF */ jal dma_copy
/* BB104 80124A04 AE860544 */ sw $a2, 0x544($s4)
/* BB108 80124A08 0C00AB39 */ jal heap_malloc
/* BB10C 80124A0C 24040020 */ addiu $a0, $zero, 0x20
/* BB110 80124A10 3C030001 */ lui $v1, %hi(D_D158)
/* BB114 80124A14 2463D158 */ addiu $v1, $v1, %lo(D_D158)
/* BB118 80124A18 3C080011 */ lui $t0, %hi(D_10F1B0)
/* BB11C 80124A1C 2508F1B0 */ addiu $t0, $t0, %lo(D_10F1B0)
/* BB120 80124A20 01032021 */ addu $a0, $t0, $v1
/* BB124 80124A24 24850020 */ addiu $a1, $a0, 0x20
/* BB128 80124A28 0040302D */ daddu $a2, $v0, $zero
/* BB12C 80124A2C 0C00A5CF */ jal dma_copy
/* BB130 80124A30 AE860548 */ sw $a2, 0x548($s4)
/* BB134 80124A34 0C00AB39 */ jal heap_malloc
/* BB138 80124A38 240419FA */ addiu $a0, $zero, 0x19FA
/* BB13C 80124A3C 321000FF */ andi $s0, $s0, 0xFF
/* BB140 80124A40 00108080 */ sll $s0, $s0, 2
/* BB144 80124A44 0040302D */ daddu $a2, $v0, $zero
/* BB148 80124A48 AE82054C */ sw $v0, 0x54C($s4)
/* BB14C 80124A4C 3C03802F */ lui $v1, %hi(D_802EB5C0)
/* BB150 80124A50 00701821 */ addu $v1, $v1, $s0
/* BB154 80124A54 8C63B5C0 */ lw $v1, %lo(D_802EB5C0)($v1)
/* BB158 80124A58 3C080011 */ lui $t0, %hi(D_10F1B0)
/* BB15C 80124A5C 2508F1B0 */ addiu $t0, $t0, %lo(D_10F1B0)
/* BB160 80124A60 00682021 */ addu $a0, $v1, $t0
/* BB164 80124A64 0C00A5CF */ jal dma_copy
/* BB168 80124A68 248519FA */ addiu $a1, $a0, 0x19FA
/* BB16C 80124A6C 0C00AB39 */ jal heap_malloc
/* BB170 80124A70 24040200 */ addiu $a0, $zero, 0x200
/* BB174 80124A74 0040302D */ daddu $a2, $v0, $zero
/* BB178 80124A78 AE820550 */ sw $v0, 0x550($s4)
/* BB17C 80124A7C 3C03802F */ lui $v1, %hi(D_802EB5F0)
/* BB180 80124A80 00701821 */ addu $v1, $v1, $s0
/* BB184 80124A84 8C63B5F0 */ lw $v1, %lo(D_802EB5F0)($v1)
/* BB188 80124A88 3C080011 */ lui $t0, %hi(D_10F1B0)
/* BB18C 80124A8C 2508F1B0 */ addiu $t0, $t0, %lo(D_10F1B0)
/* BB190 80124A90 00682021 */ addu $a0, $v1, $t0
/* BB194 80124A94 0C00A5CF */ jal dma_copy
/* BB198 80124A98 24850200 */ addiu $a1, $a0, 0x200
/* BB19C 80124A9C 080492BC */ j .L80124AF0
/* BB1A0 80124AA0 00000000 */ nop
glabel .L80124AA4
/* BB1A4 80124AA4 24020028 */ addiu $v0, $zero, 0x28
/* BB1A8 80124AA8 A6820516 */ sh $v0, 0x516($s4)
/* BB1AC 80124AAC 96820538 */ lhu $v0, 0x538($s4)
/* BB1B0 80124AB0 8E8304FC */ lw $v1, 0x4FC($s4)
/* BB1B4 80124AB4 24420020 */ addiu $v0, $v0, 0x20
/* BB1B8 80124AB8 A6820514 */ sh $v0, 0x514($s4)
/* BB1BC 80124ABC 34628000 */ ori $v0, $v1, 0x8000
/* BB1C0 80124AC0 17C0000B */ bnez $fp, .L80124AF0
/* BB1C4 80124AC4 AE8204FC */ sw $v0, 0x4FC($s4)
/* BB1C8 80124AC8 34628800 */ ori $v0, $v1, 0x8800
/* BB1CC 80124ACC 96830500 */ lhu $v1, 0x500($s4)
/* BB1D0 80124AD0 AE8204FC */ sw $v0, 0x4FC($s4)
/* BB1D4 80124AD4 2402000D */ addiu $v0, $zero, 0xD
/* BB1D8 80124AD8 A28204F8 */ sb $v0, 0x4F8($s4)
/* BB1DC 80124ADC 34630001 */ ori $v1, $v1, 0x1
/* BB1E0 80124AE0 080492BC */ j .L80124AF0
/* BB1E4 80124AE4 A6830500 */ sh $v1, 0x500($s4)
glabel .L80124AE8
/* BB1E8 80124AE8 24020004 */ addiu $v0, $zero, 0x4
/* BB1EC 80124AEC A28204F8 */ sb $v0, 0x4F8($s4)
.L80124AF0:
/* BB1F0 80124AF0 96830500 */ lhu $v1, 0x500($s4)
/* BB1F4 80124AF4 30620001 */ andi $v0, $v1, 0x1
/* BB1F8 80124AF8 104002C1 */ beqz $v0, .L80125600
/* BB1FC 80124AFC 30620006 */ andi $v0, $v1, 0x6
/* BB200 80124B00 080493E6 */ j .L80124F98
/* BB204 80124B04 00000000 */ nop
glabel .L80124B08
/* BB208 80124B08 240200FB */ addiu $v0, $zero, 0xFB
/* BB20C 80124B0C A2420000 */ sb $v0, 0x0($s2)
/* BB210 80124B10 8E8304FC */ lw $v1, 0x4FC($s4)
/* BB214 80124B14 30620800 */ andi $v0, $v1, 0x800
/* BB218 80124B18 10400011 */ beqz $v0, .L80124B60
/* BB21C 80124B1C 26520001 */ addiu $s2, $s2, 0x1
/* BB220 80124B20 30621000 */ andi $v0, $v1, 0x1000
/* BB224 80124B24 10400005 */ beqz $v0, .L80124B3C
/* BB228 80124B28 00000000 */ nop
/* BB22C 80124B2C 8E830504 */ lw $v1, 0x504($s4)
/* BB230 80124B30 10600002 */ beqz $v1, .L80124B3C
/* BB234 80124B34 24020001 */ addiu $v0, $zero, 0x1
/* BB238 80124B38 AC620000 */ sw $v0, 0x0($v1)
.L80124B3C:
/* BB23C 80124B3C 92820508 */ lbu $v0, 0x508($s4)
/* BB240 80124B40 2442FFF6 */ addiu $v0, $v0, -0xA
/* BB244 80124B44 2C420002 */ sltiu $v0, $v0, 0x2
/* BB248 80124B48 14400002 */ bnez $v0, .L80124B54
/* BB24C 80124B4C 2402000E */ addiu $v0, $zero, 0xE
/* BB250 80124B50 24020003 */ addiu $v0, $zero, 0x3
.L80124B54:
/* BB254 80124B54 A28204F8 */ sb $v0, 0x4F8($s4)
/* BB258 80124B58 080492DA */ j .L80124B68
/* BB25C 80124B5C A2800512 */ sb $zero, 0x512($s4)
.L80124B60:
/* BB260 80124B60 34620001 */ ori $v0, $v1, 0x1
/* BB264 80124B64 AE8204FC */ sw $v0, 0x4FC($s4)
.L80124B68:
/* BB268 80124B68 96820500 */ lhu $v0, 0x500($s4)
/* BB26C 80124B6C 34420001 */ ori $v0, $v0, 0x1
/* BB270 80124B70 3042FFFD */ andi $v0, $v0, 0xFFFD
/* BB274 80124B74 08049580 */ j .L80125600
/* BB278 80124B78 A6820500 */ sh $v0, 0x500($s4)
glabel .L80124B7C
/* BB27C 80124B7C 92630000 */ lbu $v1, 0x0($s3)
/* BB280 80124B80 2C620030 */ sltiu $v0, $v1, 0x30
/* BB284 80124B84 1040029E */ beqz $v0, .L80125600
/* BB288 80124B88 26730001 */ addiu $s3, $s3, 0x1
/* BB28C 80124B8C 00031080 */ sll $v0, $v1, 2
/* BB290 80124B90 3C018015 */ lui $at, %hi(jtbl_80150438)
/* BB294 80124B94 00220821 */ addu $at, $at, $v0
/* BB298 80124B98 8C220438 */ lw $v0, %lo(jtbl_80150438)($at)
/* BB29C 80124B9C 00400008 */ jr $v0
/* BB2A0 80124BA0 00000000 */ nop
glabel .L80124BA4
/* BB2A4 80124BA4 A2560000 */ sb $s6, 0x0($s2)
/* BB2A8 80124BA8 26520001 */ addiu $s2, $s2, 0x1
/* BB2AC 80124BAC A2400000 */ sb $zero, 0x0($s2)
/* BB2B0 80124BB0 26520001 */ addiu $s2, $s2, 0x1
/* BB2B4 80124BB4 92620000 */ lbu $v0, 0x0($s3)
/* BB2B8 80124BB8 26730001 */ addiu $s3, $s3, 0x1
/* BB2BC 80124BBC 08049556 */ j .L80125558
/* BB2C0 80124BC0 A2820454 */ sb $v0, 0x454($s4)
glabel .L80124BC4
/* BB2C4 80124BC4 A2560000 */ sb $s6, 0x0($s2)
/* BB2C8 80124BC8 26520001 */ addiu $s2, $s2, 0x1
/* BB2CC 80124BCC 24020001 */ addiu $v0, $zero, 0x1
/* BB2D0 80124BD0 A2420000 */ sb $v0, 0x0($s2)
/* BB2D4 80124BD4 26520001 */ addiu $s2, $s2, 0x1
/* BB2D8 80124BD8 92620000 */ lbu $v0, 0x0($s3)
/* BB2DC 80124BDC 26730001 */ addiu $s3, $s3, 0x1
/* BB2E0 80124BE0 08049556 */ j .L80125558
/* BB2E4 80124BE4 A2820455 */ sb $v0, 0x455($s4)
glabel .L80124BE8
/* BB2E8 80124BE8 A2560000 */ sb $s6, 0x0($s2)
/* BB2EC 80124BEC 26520001 */ addiu $s2, $s2, 0x1
/* BB2F0 80124BF0 08049552 */ j .L80125548
/* BB2F4 80124BF4 24020004 */ addiu $v0, $zero, 0x4
glabel .L80124BF8
/* BB2F8 80124BF8 8E8204FC */ lw $v0, 0x4FC($s4)
/* BB2FC 80124BFC 0804957F */ j .L801255FC
/* BB300 80124C00 34420010 */ ori $v0, $v0, 0x10
glabel .L80124C04
/* BB304 80124C04 8E8204FC */ lw $v0, 0x4FC($s4)
/* BB308 80124C08 2403FEFF */ addiu $v1, $zero, -0x101
/* BB30C 80124C0C 34420020 */ ori $v0, $v0, 0x20
/* BB310 80124C10 0804957F */ j .L801255FC
/* BB314 80124C14 00431024 */ and $v0, $v0, $v1
glabel .L80124C18
/* BB318 80124C18 8E8204FC */ lw $v0, 0x4FC($s4)
/* BB31C 80124C1C 2403FFDF */ addiu $v1, $zero, -0x21
/* BB320 80124C20 0804957F */ j .L801255FC
/* BB324 80124C24 00431024 */ and $v0, $v0, $v1
glabel .L80124C28
/* BB328 80124C28 A2560000 */ sb $s6, 0x0($s2)
/* BB32C 80124C2C 26520001 */ addiu $s2, $s2, 0x1
/* BB330 80124C30 08049552 */ j .L80125548
/* BB334 80124C34 24020005 */ addiu $v0, $zero, 0x5
glabel .L80124C38
/* BB338 80124C38 96820500 */ lhu $v0, 0x500($s4)
/* BB33C 80124C3C 34420002 */ ori $v0, $v0, 0x2
/* BB340 80124C40 08049580 */ j .L80125600
/* BB344 80124C44 A6820500 */ sh $v0, 0x500($s4)
glabel .L80124C48
/* BB348 80124C48 96820500 */ lhu $v0, 0x500($s4)
/* BB34C 80124C4C 0804941E */ j .L80125078
/* BB350 80124C50 3042FFFD */ andi $v0, $v0, 0xFFFD
glabel .L80124C54
/* BB354 80124C54 92820486 */ lbu $v0, 0x486($s4)
/* BB358 80124C58 96830462 */ lhu $v1, 0x462($s4)
/* BB35C 80124C5C 00021040 */ sll $v0, $v0, 1
/* BB360 80124C60 02821021 */ addu $v0, $s4, $v0
/* BB364 80124C64 A4430488 */ sh $v1, 0x488($v0)
/* BB368 80124C68 92820486 */ lbu $v0, 0x486($s4)
/* BB36C 80124C6C 24420001 */ addiu $v0, $v0, 0x1
/* BB370 80124C70 A2820486 */ sb $v0, 0x486($s4)
/* BB374 80124C74 240200FA */ addiu $v0, $zero, 0xFA
/* BB378 80124C78 A2420000 */ sb $v0, 0x0($s2)
/* BB37C 80124C7C 26520001 */ addiu $s2, $s2, 0x1
/* BB380 80124C80 92700000 */ lbu $s0, 0x0($s3)
/* BB384 80124C84 26730001 */ addiu $s3, $s3, 0x1
/* BB388 80124C88 92820454 */ lbu $v0, 0x454($s4)
/* BB38C 80124C8C 92830508 */ lbu $v1, 0x508($s4)
/* BB390 80124C90 00021080 */ sll $v0, $v0, 2
/* BB394 80124C94 00031840 */ sll $v1, $v1, 1
/* BB398 80124C98 3C01802F */ lui $at, %hi(gMsgCharsets)
/* BB39C 80124C9C 00220821 */ addu $at, $at, $v0
/* BB3A0 80124CA0 8C22B5A8 */ lw $v0, %lo(gMsgCharsets)($at)
/* BB3A4 80124CA4 3C01802F */ lui $at, %hi(D_802EB644)
/* BB3A8 80124CA8 00230821 */ addu $at, $at, $v1
/* BB3AC 80124CAC 8423B644 */ lh $v1, %lo(D_802EB644)($at)
/* BB3B0 80124CB0 90440003 */ lbu $a0, 0x3($v0)
/* BB3B4 80124CB4 24020006 */ addiu $v0, $zero, 0x6
/* BB3B8 80124CB8 A28204F8 */ sb $v0, 0x4F8($s4)
/* BB3BC 80124CBC 96820500 */ lhu $v0, 0x500($s4)
/* BB3C0 80124CC0 00832021 */ addu $a0, $a0, $v1
/* BB3C4 80124CC4 02040018 */ mult $s0, $a0
/* BB3C8 80124CC8 A2800468 */ sb $zero, 0x468($s4)
/* BB3CC 80124CCC 96830462 */ lhu $v1, 0x462($s4)
/* BB3D0 80124CD0 34420001 */ ori $v0, $v0, 0x1
/* BB3D4 80124CD4 A6820500 */ sh $v0, 0x500($s4)
/* BB3D8 80124CD8 00004012 */ mflo $t0
/* BB3DC 80124CDC 00681821 */ addu $v1, $v1, $t0
/* BB3E0 80124CE0 08049580 */ j .L80125600
/* BB3E4 80124CE4 A6830466 */ sh $v1, 0x466($s4)
glabel .L80124CE8
/* BB3E8 80124CE8 A2560000 */ sb $s6, 0x0($s2)
/* BB3EC 80124CEC 26520001 */ addiu $s2, $s2, 0x1
/* BB3F0 80124CF0 24020006 */ addiu $v0, $zero, 0x6
/* BB3F4 80124CF4 A2420000 */ sb $v0, 0x0($s2)
/* BB3F8 80124CF8 26520001 */ addiu $s2, $s2, 0x1
/* BB3FC 80124CFC 92620000 */ lbu $v0, 0x0($s3)
/* BB400 80124D00 3C013D80 */ lui $at, (0x3D800000 >> 16)
/* BB404 80124D04 44810000 */ mtc1 $at, $f0
/* BB408 80124D08 26730001 */ addiu $s3, $s3, 0x1
/* BB40C 80124D0C A2420000 */ sb $v0, 0x0($s2)
/* BB410 80124D10 92700000 */ lbu $s0, 0x0($s3)
/* BB414 80124D14 26520001 */ addiu $s2, $s2, 0x1
/* BB418 80124D18 3202000F */ andi $v0, $s0, 0xF
/* BB41C 80124D1C 44821000 */ mtc1 $v0, $f2
/* BB420 80124D20 00000000 */ nop
/* BB424 80124D24 468010A0 */ cvt.s.w $f2, $f2
/* BB428 80124D28 46001082 */ mul.s $f2, $f2, $f0
/* BB42C 80124D2C 00000000 */ nop
/* BB430 80124D30 26730001 */ addiu $s3, $s3, 0x1
/* BB434 80124D34 320200FF */ andi $v0, $s0, 0xFF
/* BB438 80124D38 00021102 */ srl $v0, $v0, 4
/* BB43C 80124D3C 44820000 */ mtc1 $v0, $f0
/* BB440 80124D40 00000000 */ nop
/* BB444 80124D44 46800020 */ cvt.s.w $f0, $f0
/* BB448 80124D48 46020000 */ add.s $f0, $f0, $f2
/* BB44C 80124D4C 0804935B */ j .L80124D6C
/* BB450 80124D50 A2500000 */ sb $s0, 0x0($s2)
glabel .L80124D54
/* BB454 80124D54 A2560000 */ sb $s6, 0x0($s2)
/* BB458 80124D58 26520001 */ addiu $s2, $s2, 0x1
/* BB45C 80124D5C 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* BB460 80124D60 44810000 */ mtc1 $at, $f0
/* BB464 80124D64 24020007 */ addiu $v0, $zero, 0x7
/* BB468 80124D68 A2420000 */ sb $v0, 0x0($s2)
.L80124D6C:
/* BB46C 80124D6C 26520001 */ addiu $s2, $s2, 0x1
/* BB470 80124D70 08049580 */ j .L80125600
/* BB474 80124D74 E6800540 */ swc1 $f0, 0x540($s4)
glabel .L80124D78
/* BB478 80124D78 92620000 */ lbu $v0, 0x0($s3)
/* BB47C 80124D7C 26730001 */ addiu $s3, $s3, 0x1
/* BB480 80124D80 A282045E */ sb $v0, 0x45E($s4)
/* BB484 80124D84 92620000 */ lbu $v0, 0x0($s3)
/* BB488 80124D88 26730001 */ addiu $s3, $s3, 0x1
/* BB48C 80124D8C 08049580 */ j .L80125600
/* BB490 80124D90 A282045F */ sb $v0, 0x45F($s4)
glabel .L80124D94
/* BB494 80124D94 A2560000 */ sb $s6, 0x0($s2)
/* BB498 80124D98 26520001 */ addiu $s2, $s2, 0x1
/* BB49C 80124D9C 24020008 */ addiu $v0, $zero, 0x8
/* BB4A0 80124DA0 A2420000 */ sb $v0, 0x0($s2)
/* BB4A4 80124DA4 26520001 */ addiu $s2, $s2, 0x1
/* BB4A8 80124DA8 92620000 */ lbu $v0, 0x0($s3)
/* BB4AC 80124DAC 08049552 */ j .L80125548
/* BB4B0 80124DB0 26730001 */ addiu $s3, $s3, 0x1
glabel .L80124DB4
/* BB4B4 80124DB4 A2560000 */ sb $s6, 0x0($s2)
/* BB4B8 80124DB8 26520001 */ addiu $s2, $s2, 0x1
/* BB4BC 80124DBC 08049552 */ j .L80125548
/* BB4C0 80124DC0 24020009 */ addiu $v0, $zero, 0x9
glabel .L80124DC4
/* BB4C4 80124DC4 A2560000 */ sb $s6, 0x0($s2)
/* BB4C8 80124DC8 26520001 */ addiu $s2, $s2, 0x1
/* BB4CC 80124DCC 08049552 */ j .L80125548
/* BB4D0 80124DD0 2402000A */ addiu $v0, $zero, 0xA
glabel .L80124DD4
/* BB4D4 80124DD4 A2560000 */ sb $s6, 0x0($s2)
/* BB4D8 80124DD8 26520001 */ addiu $s2, $s2, 0x1
/* BB4DC 80124DDC 08049552 */ j .L80125548
/* BB4E0 80124DE0 2402000B */ addiu $v0, $zero, 0xB
glabel .L80124DE4
/* BB4E4 80124DE4 A2560000 */ sb $s6, 0x0($s2)
/* BB4E8 80124DE8 26520001 */ addiu $s2, $s2, 0x1
/* BB4EC 80124DEC 08049552 */ j .L80125548
/* BB4F0 80124DF0 2402000C */ addiu $v0, $zero, 0xC
glabel .L80124DF4
/* BB4F4 80124DF4 A2560000 */ sb $s6, 0x0($s2)
/* BB4F8 80124DF8 26520001 */ addiu $s2, $s2, 0x1
/* BB4FC 80124DFC 2402000E */ addiu $v0, $zero, 0xE
/* BB500 80124E00 A2420000 */ sb $v0, 0x0($s2)
/* BB504 80124E04 26520001 */ addiu $s2, $s2, 0x1
/* BB508 80124E08 92620000 */ lbu $v0, 0x0($s3)
/* BB50C 80124E0C 26730001 */ addiu $s3, $s3, 0x1
/* BB510 80124E10 26B5FFFF */ addiu $s5, $s5, -0x1
/* BB514 80124E14 A2420000 */ sb $v0, 0x0($s2)
/* BB518 80124E18 9282045E */ lbu $v0, 0x45E($s4)
/* BB51C 80124E1C 26520001 */ addiu $s2, $s2, 0x1
/* BB520 80124E20 080493DF */ j .L80124F7C
/* BB524 80124E24 A682000E */ sh $v0, 0xE($s4)
glabel .L80124E28
/* BB528 80124E28 A2560000 */ sb $s6, 0x0($s2)
/* BB52C 80124E2C 26520001 */ addiu $s2, $s2, 0x1
/* BB530 80124E30 2402000F */ addiu $v0, $zero, 0xF
/* BB534 80124E34 A2420000 */ sb $v0, 0x0($s2)
/* BB538 80124E38 26520001 */ addiu $s2, $s2, 0x1
/* BB53C 80124E3C 92620000 */ lbu $v0, 0x0($s3)
/* BB540 80124E40 26730001 */ addiu $s3, $s3, 0x1
/* BB544 80124E44 26B5FFFF */ addiu $s5, $s5, -0x1
/* BB548 80124E48 A2420000 */ sb $v0, 0x0($s2)
/* BB54C 80124E4C 26520001 */ addiu $s2, $s2, 0x1
/* BB550 80124E50 92620000 */ lbu $v0, 0x0($s3)
/* BB554 80124E54 26730001 */ addiu $s3, $s3, 0x1
/* BB558 80124E58 A2420000 */ sb $v0, 0x0($s2)
/* BB55C 80124E5C 26520001 */ addiu $s2, $s2, 0x1
/* BB560 80124E60 92620000 */ lbu $v0, 0x0($s3)
/* BB564 80124E64 26730001 */ addiu $s3, $s3, 0x1
/* BB568 80124E68 A2420000 */ sb $v0, 0x0($s2)
/* BB56C 80124E6C 9282045E */ lbu $v0, 0x45E($s4)
/* BB570 80124E70 26520001 */ addiu $s2, $s2, 0x1
/* BB574 80124E74 080493DF */ j .L80124F7C
/* BB578 80124E78 A682000E */ sh $v0, 0xE($s4)
glabel .L80124E7C
/* BB57C 80124E7C A2560000 */ sb $s6, 0x0($s2)
/* BB580 80124E80 26520001 */ addiu $s2, $s2, 0x1
/* BB584 80124E84 24020010 */ addiu $v0, $zero, 0x10
/* BB588 80124E88 A2420000 */ sb $v0, 0x0($s2)
/* BB58C 80124E8C 26520001 */ addiu $s2, $s2, 0x1
/* BB590 80124E90 92700000 */ lbu $s0, 0x0($s3)
/* BB594 80124E94 26730001 */ addiu $s3, $s3, 0x1
/* BB598 80124E98 92650000 */ lbu $a1, 0x0($s3)
/* BB59C 80124E9C 26730001 */ addiu $s3, $s3, 0x1
/* BB5A0 80124EA0 3C068016 */ lui $a2, %hi(D_80159B50)
/* BB5A4 80124EA4 24C69B50 */ addiu $a2, $a2, %lo(D_80159B50)
/* BB5A8 80124EA8 3C11001D */ lui $s1, %hi(D_1CC310)
/* BB5AC 80124EAC 2631C310 */ addiu $s1, $s1, %lo(D_1CC310)
/* BB5B0 80124EB0 3C018015 */ lui $at, %hi(D_8015131C)
/* BB5B4 80124EB4 AC26131C */ sw $a2, %lo(D_8015131C)($at)
/* BB5B8 80124EB8 00108200 */ sll $s0, $s0, 8
/* BB5BC 80124EBC 00B08025 */ or $s0, $a1, $s0
/* BB5C0 80124EC0 00108400 */ sll $s0, $s0, 16
/* BB5C4 80124EC4 00108383 */ sra $s0, $s0, 14
/* BB5C8 80124EC8 3C028009 */ lui $v0, %hi(gItemIconRasterOffsets)
/* BB5CC 80124ECC 00501021 */ addu $v0, $v0, $s0
/* BB5D0 80124ED0 8C42E3D8 */ lw $v0, %lo(gItemIconRasterOffsets)($v0)
/* BB5D4 80124ED4 26250200 */ addiu $a1, $s1, 0x200
/* BB5D8 80124ED8 00512021 */ addu $a0, $v0, $s1
/* BB5DC 80124EDC 0C00A5CF */ jal dma_copy
/* BB5E0 80124EE0 00452821 */ addu $a1, $v0, $a1
/* BB5E4 80124EE4 3C058009 */ lui $a1, %hi(gItemIconPaletteOffsets)
/* BB5E8 80124EE8 00B02821 */ addu $a1, $a1, $s0
/* BB5EC 80124EEC 8CA5E94C */ lw $a1, %lo(gItemIconPaletteOffsets)($a1)
/* BB5F0 80124EF0 3C068016 */ lui $a2, %hi(D_8015C7E0)
/* BB5F4 80124EF4 24C6C7E0 */ addiu $a2, $a2, %lo(D_8015C7E0)
/* BB5F8 80124EF8 00B12021 */ addu $a0, $a1, $s1
/* BB5FC 80124EFC 26310020 */ addiu $s1, $s1, 0x20
/* BB600 80124F00 0C00A5CF */ jal dma_copy
/* BB604 80124F04 00B12821 */ addu $a1, $a1, $s1
/* BB608 80124F08 9282045E */ lbu $v0, 0x45E($s4)
/* BB60C 80124F0C 26B5FFFF */ addiu $s5, $s5, -0x1
/* BB610 80124F10 080493DF */ j .L80124F7C
/* BB614 80124F14 A682000E */ sh $v0, 0xE($s4)
glabel .L80124F18
/* BB618 80124F18 92620000 */ lbu $v0, 0x0($s3)
/* BB61C 80124F1C 26730001 */ addiu $s3, $s3, 0x1
/* BB620 80124F20 26B5FFFF */ addiu $s5, $s5, -0x1
/* BB624 80124F24 A282052B */ sb $v0, 0x52B($s4)
/* BB628 80124F28 92700000 */ lbu $s0, 0x0($s3)
/* BB62C 80124F2C 26730001 */ addiu $s3, $s3, 0x1
/* BB630 80124F30 92650000 */ lbu $a1, 0x0($s3)
/* BB634 80124F34 26730001 */ addiu $s3, $s3, 0x1
/* BB638 80124F38 00101200 */ sll $v0, $s0, 8
/* BB63C 80124F3C 00A21025 */ or $v0, $a1, $v0
/* BB640 80124F40 A682052C */ sh $v0, 0x52C($s4)
glabel func_80124F44
/* BB644 80124F44 92620000 */ lbu $v0, 0x0($s3)
/* BB648 80124F48 26730001 */ addiu $s3, $s3, 0x1
/* BB64C 80124F4C A682052E */ sh $v0, 0x52E($s4)
/* BB650 80124F50 92620000 */ lbu $v0, 0x0($s3)
/* BB654 80124F54 26730001 */ addiu $s3, $s3, 0x1
/* BB658 80124F58 A2820530 */ sb $v0, 0x530($s4)
/* BB65C 80124F5C 92620000 */ lbu $v0, 0x0($s3)
/* BB660 80124F60 26730001 */ addiu $s3, $s3, 0x1
/* BB664 80124F64 A2820531 */ sb $v0, 0x531($s4)
/* BB668 80124F68 92620000 */ lbu $v0, 0x0($s3)
/* BB66C 80124F6C 26730001 */ addiu $s3, $s3, 0x1
/* BB670 80124F70 A2800533 */ sb $zero, 0x533($s4)
/* BB674 80124F74 A6800534 */ sh $zero, 0x534($s4)
/* BB678 80124F78 A2820532 */ sb $v0, 0x532($s4)
.L80124F7C:
/* BB67C 80124F7C 1EA00004 */ bgtz $s5, .L80124F90
/* BB680 80124F80 00000000 */ nop
/* BB684 80124F84 96820500 */ lhu $v0, 0x500($s4)
/* BB688 80124F88 34420001 */ ori $v0, $v0, 0x1
/* BB68C 80124F8C A6820500 */ sh $v0, 0x500($s4)
.L80124F90:
/* BB690 80124F90 96830500 */ lhu $v1, 0x500($s4)
/* BB694 80124F94 30620006 */ andi $v0, $v1, 0x6
.L80124F98:
/* BB698 80124F98 1040019D */ beqz $v0, .L80125610
/* BB69C 80124F9C 3062FFFE */ andi $v0, $v1, 0xFFFE
/* BB6A0 80124FA0 08049580 */ j .L80125600
/* BB6A4 80124FA4 A6820500 */ sh $v0, 0x500($s4)
glabel .L80124FA8
/* BB6A8 80124FA8 92700000 */ lbu $s0, 0x0($s3)
/* BB6AC 80124FAC 12000005 */ beqz $s0, .L80124FC4
/* BB6B0 80124FB0 26730001 */ addiu $s3, $s3, 0x1
/* BB6B4 80124FB4 A2970533 */ sb $s7, 0x533($s4)
/* BB6B8 80124FB8 A2900532 */ sb $s0, 0x532($s4)
/* BB6BC 80124FBC 08049580 */ j .L80125600
/* BB6C0 80124FC0 A6800534 */ sh $zero, 0x534($s4)
.L80124FC4:
/* BB6C4 80124FC4 08049580 */ j .L80125600
/* BB6C8 80124FC8 A680052C */ sh $zero, 0x52C($s4)
glabel .L80124FCC
/* BB6CC 80124FCC A2560000 */ sb $s6, 0x0($s2)
/* BB6D0 80124FD0 26520001 */ addiu $s2, $s2, 0x1
/* BB6D4 80124FD4 24020011 */ addiu $v0, $zero, 0x11
/* BB6D8 80124FD8 A2420000 */ sb $v0, 0x0($s2)
/* BB6DC 80124FDC 26520001 */ addiu $s2, $s2, 0x1
/* BB6E0 80124FE0 92620000 */ lbu $v0, 0x0($s3)
/* BB6E4 80124FE4 26730001 */ addiu $s3, $s3, 0x1
/* BB6E8 80124FE8 A2420000 */ sb $v0, 0x0($s2)
/* BB6EC 80124FEC 26520001 */ addiu $s2, $s2, 0x1
/* BB6F0 80124FF0 92620000 */ lbu $v0, 0x0($s3)
/* BB6F4 80124FF4 26730001 */ addiu $s3, $s3, 0x1
/* BB6F8 80124FF8 A2420000 */ sb $v0, 0x0($s2)
/* BB6FC 80124FFC 26520001 */ addiu $s2, $s2, 0x1
/* BB700 80125000 92620000 */ lbu $v0, 0x0($s3)
/* BB704 80125004 26730001 */ addiu $s3, $s3, 0x1
/* BB708 80125008 A2420000 */ sb $v0, 0x0($s2)
/* BB70C 8012500C 96820500 */ lhu $v0, 0x500($s4)
/* BB710 80125010 26520001 */ addiu $s2, $s2, 0x1
/* BB714 80125014 34420004 */ ori $v0, $v0, 0x4
/* BB718 80125018 08049580 */ j .L80125600
/* BB71C 8012501C A6820500 */ sh $v0, 0x500($s4)
glabel .L80125020
/* BB720 80125020 A2560000 */ sb $s6, 0x0($s2)
/* BB724 80125024 26520001 */ addiu $s2, $s2, 0x1
/* BB728 80125028 24020012 */ addiu $v0, $zero, 0x12
/* BB72C 8012502C A2420000 */ sb $v0, 0x0($s2)
/* BB730 80125030 26520001 */ addiu $s2, $s2, 0x1
/* BB734 80125034 92620000 */ lbu $v0, 0x0($s3)
/* BB738 80125038 08049552 */ j .L80125548
/* BB73C 8012503C 26730001 */ addiu $s3, $s3, 0x1
glabel .L80125040
/* BB740 80125040 A2560000 */ sb $s6, 0x0($s2)
/* BB744 80125044 26520001 */ addiu $s2, $s2, 0x1
/* BB748 80125048 24020013 */ addiu $v0, $zero, 0x13
/* BB74C 8012504C A2420000 */ sb $v0, 0x0($s2)
/* BB750 80125050 26520001 */ addiu $s2, $s2, 0x1
/* BB754 80125054 92620000 */ lbu $v0, 0x0($s3)
/* BB758 80125058 26730001 */ addiu $s3, $s3, 0x1
/* BB75C 8012505C 26B5FFFF */ addiu $s5, $s5, -0x1
/* BB760 80125060 A2420000 */ sb $v0, 0x0($s2)
/* BB764 80125064 96820500 */ lhu $v0, 0x500($s4)
/* BB768 80125068 26520001 */ addiu $s2, $s2, 0x1
/* BB76C 8012506C 3042FFFB */ andi $v0, $v0, 0xFFFB
/* BB770 80125070 1EA00163 */ bgtz $s5, .L80125600
/* BB774 80125074 A6820500 */ sh $v0, 0x500($s4)
.L80125078:
/* BB778 80125078 34420001 */ ori $v0, $v0, 0x1
/* BB77C 8012507C 08049580 */ j .L80125600
/* BB780 80125080 A6820500 */ sh $v0, 0x500($s4)
glabel .L80125084
/* BB784 80125084 92700000 */ lbu $s0, 0x0($s3)
/* BB788 80125088 26730001 */ addiu $s3, $s3, 0x1
/* BB78C 8012508C 92650000 */ lbu $a1, 0x0($s3)
/* BB790 80125090 26730001 */ addiu $s3, $s3, 0x1
/* BB794 80125094 92640000 */ lbu $a0, 0x0($s3)
/* BB798 80125098 26730001 */ addiu $s3, $s3, 0x1
/* BB79C 8012509C 92660000 */ lbu $a2, 0x0($s3)
/* BB7A0 801250A0 26730001 */ addiu $s3, $s3, 0x1
/* BB7A4 801250A4 00101040 */ sll $v0, $s0, 1
/* BB7A8 801250A8 02821021 */ addu $v0, $s4, $v0
/* BB7AC 801250AC 00051A00 */ sll $v1, $a1, 8
/* BB7B0 801250B0 00831825 */ or $v1, $a0, $v1
/* BB7B4 801250B4 A44304D0 */ sh $v1, 0x4D0($v0)
/* BB7B8 801250B8 30C300FF */ andi $v1, $a2, 0xFF
/* BB7BC 801250BC 08049580 */ j .L80125600
/* BB7C0 801250C0 A44304DC */ sh $v1, 0x4DC($v0)
glabel .L801250C4
/* BB7C4 801250C4 A2560000 */ sb $s6, 0x0($s2)
/* BB7C8 801250C8 26520001 */ addiu $s2, $s2, 0x1
/* BB7CC 801250CC 08049552 */ j .L80125548
/* BB7D0 801250D0 24020014 */ addiu $v0, $zero, 0x14
glabel .L801250D4
/* BB7D4 801250D4 24040009 */ addiu $a0, $zero, 0x9
/* BB7D8 801250D8 0000282D */ daddu $a1, $zero, $zero
/* BB7DC 801250DC 00A0302D */ daddu $a2, $a1, $zero
/* BB7E0 801250E0 0C0526AE */ jal sfx_play_sound_with_params
/* BB7E4 801250E4 00A0382D */ daddu $a3, $a1, $zero
/* BB7E8 801250E8 92640000 */ lbu $a0, 0x0($s3)
/* BB7EC 801250EC 26730001 */ addiu $s3, $s3, 0x1
/* BB7F0 801250F0 96830500 */ lhu $v1, 0x500($s4)
/* BB7F4 801250F4 24020007 */ addiu $v0, $zero, 0x7
/* BB7F8 801250F8 A28004E9 */ sb $zero, 0x4E9($s4)
/* BB7FC 801250FC A28004E8 */ sb $zero, 0x4E8($s4)
/* BB800 80125100 A28004EE */ sb $zero, 0x4EE($s4)
/* BB804 80125104 A28204F8 */ sb $v0, 0x4F8($s4)
/* BB808 80125108 34630001 */ ori $v1, $v1, 0x1
/* BB80C 8012510C A28404CE */ sb $a0, 0x4CE($s4)
/* BB810 80125110 08049580 */ j .L80125600
/* BB814 80125114 A6830500 */ sh $v1, 0x500($s4)
glabel .L80125118
/* BB818 80125118 92620000 */ lbu $v0, 0x0($s3)
/* BB81C 8012511C 26730001 */ addiu $s3, $s3, 0x1
/* BB820 80125120 08049580 */ j .L80125600
/* BB824 80125124 A28204EA */ sb $v0, 0x4EA($s4)
glabel .L80125128
/* BB828 80125128 A2560000 */ sb $s6, 0x0($s2)
/* BB82C 8012512C 26520001 */ addiu $s2, $s2, 0x1
/* BB830 80125130 08049552 */ j .L80125548
/* BB834 80125134 24020015 */ addiu $v0, $zero, 0x15
glabel .L80125138
/* BB838 80125138 A2560000 */ sb $s6, 0x0($s2)
/* BB83C 8012513C 26520001 */ addiu $s2, $s2, 0x1
/* BB840 80125140 08049556 */ j .L80125558
/* BB844 80125144 24020017 */ addiu $v0, $zero, 0x17
glabel .L80125148
/* BB848 80125148 3C040010 */ lui $a0, (0x100040 >> 16)
/* BB84C 8012514C 34840040 */ ori $a0, $a0, (0x100040 & 0xFFFF)
/* BB850 80125150 8E8204FC */ lw $v0, 0x4FC($s4)
/* BB854 80125154 96830500 */ lhu $v1, 0x500($s4)
/* BB858 80125158 00441025 */ or $v0, $v0, $a0
/* BB85C 8012515C 34630001 */ ori $v1, $v1, 0x1
/* BB860 80125160 AE8204FC */ sw $v0, 0x4FC($s4)
/* BB864 80125164 A6830500 */ sh $v1, 0x500($s4)
/* BB868 80125168 0040182D */ daddu $v1, $v0, $zero
/* BB86C 8012516C 2402FF7F */ addiu $v0, $zero, -0x81
/* BB870 80125170 00621824 */ and $v1, $v1, $v0
/* BB874 80125174 2402FEFF */ addiu $v0, $zero, -0x101
/* BB878 80125178 00621824 */ and $v1, $v1, $v0
/* BB87C 8012517C 08049580 */ j .L80125600
/* BB880 80125180 AE8304FC */ sw $v1, 0x4FC($s4)
glabel .L80125184
/* BB884 80125184 A2560000 */ sb $s6, 0x0($s2)
/* BB888 80125188 26520001 */ addiu $s2, $s2, 0x1
/* BB88C 8012518C 08049556 */ j .L80125558
/* BB890 80125190 24020018 */ addiu $v0, $zero, 0x18
glabel .L80125194
/* BB894 80125194 A2560000 */ sb $s6, 0x0($s2)
/* BB898 80125198 26520001 */ addiu $s2, $s2, 0x1
/* BB89C 8012519C 08049556 */ j .L80125558
/* BB8A0 801251A0 24020019 */ addiu $v0, $zero, 0x19
glabel .L801251A4
/* BB8A4 801251A4 A2560000 */ sb $s6, 0x0($s2)
/* BB8A8 801251A8 26520001 */ addiu $s2, $s2, 0x1
/* BB8AC 801251AC 08049556 */ j .L80125558
/* BB8B0 801251B0 2402001A */ addiu $v0, $zero, 0x1A
glabel .L801251B4
/* BB8B4 801251B4 A2560000 */ sb $s6, 0x0($s2)
/* BB8B8 801251B8 26520001 */ addiu $s2, $s2, 0x1
/* BB8BC 801251BC 08049556 */ j .L80125558
/* BB8C0 801251C0 2402001B */ addiu $v0, $zero, 0x1B
glabel .L801251C4
/* BB8C4 801251C4 A2560000 */ sb $s6, 0x0($s2)
/* BB8C8 801251C8 26520001 */ addiu $s2, $s2, 0x1
/* BB8CC 801251CC 2402001C */ addiu $v0, $zero, 0x1C
/* BB8D0 801251D0 A2420000 */ sb $v0, 0x0($s2)
/* BB8D4 801251D4 26520001 */ addiu $s2, $s2, 0x1
/* BB8D8 801251D8 92700000 */ lbu $s0, 0x0($s3)
/* BB8DC 801251DC 320300FF */ andi $v1, $s0, 0xFF
/* BB8E0 801251E0 2C62000F */ sltiu $v0, $v1, 0xF
/* BB8E4 801251E4 10400106 */ beqz $v0, .L80125600
/* BB8E8 801251E8 26730001 */ addiu $s3, $s3, 0x1
/* BB8EC 801251EC 00031080 */ sll $v0, $v1, 2
/* BB8F0 801251F0 3C018015 */ lui $at, %hi(jtbl_801504F8)
/* BB8F4 801251F4 00220821 */ addu $at, $at, $v0
/* BB8F8 801251F8 8C2204F8 */ lw $v0, %lo(jtbl_801504F8)($at)
/* BB8FC 801251FC 00400008 */ jr $v0
/* BB900 80125200 00000000 */ nop
glabel .L80125204
/* BB904 80125204 A2500000 */ sb $s0, 0x0($s2)
/* BB908 80125208 08049580 */ j .L80125600
/* BB90C 8012520C 26520001 */ addiu $s2, $s2, 0x1
glabel .L80125210
/* BB910 80125210 08049553 */ j .L8012554C
/* BB914 80125214 A2500000 */ sb $s0, 0x0($s2)
glabel .L80125218
/* BB918 80125218 A2560000 */ sb $s6, 0x0($s2)
/* BB91C 8012521C 26520001 */ addiu $s2, $s2, 0x1
/* BB920 80125220 08049552 */ j .L80125548
/* BB924 80125224 2402001D */ addiu $v0, $zero, 0x1D
.L80125228:
/* BB928 80125228 9282052A */ lbu $v0, 0x52A($s4)
/* BB92C 8012522C A6800528 */ sh $zero, 0x528($s4)
/* BB930 80125230 A2820455 */ sb $v0, 0x455($s4)
/* BB934 80125234 244200F1 */ addiu $v0, $v0, 0xF1
/* BB938 80125238 A2420000 */ sb $v0, 0x0($s2)
/* BB93C 8012523C 0804950F */ j .L8012543C
/* BB940 80125240 26520001 */ addiu $s2, $s2, 0x1
glabel .L80125244
/* BB944 80125244 92700000 */ lbu $s0, 0x0($s3)
/* BB948 80125248 96820528 */ lhu $v0, 0x528($s4)
/* BB94C 8012524C 14400006 */ bnez $v0, .L80125268
/* BB950 80125250 2673FFFE */ addiu $s3, $s3, -0x2
/* BB954 80125254 92820455 */ lbu $v0, 0x455($s4)
/* BB958 80125258 A282052A */ sb $v0, 0x52A($s4)
/* BB95C 8012525C 240200F1 */ addiu $v0, $zero, 0xF1
/* BB960 80125260 A2420000 */ sb $v0, 0x0($s2)
/* BB964 80125264 26520001 */ addiu $s2, $s2, 0x1
.L80125268:
/* BB968 80125268 00108140 */ sll $s0, $s0, 5
/* BB96C 8012526C 27A60010 */ addiu $a2, $sp, 0x10
glabel .L80125270
/* BB970 80125270 96820528 */ lhu $v0, 0x528($s4)
/* BB974 80125274 3C088015 */ lui $t0, %hi(gMessageMsgVars)
/* BB978 80125278 25085C38 */ addiu $t0, $t0, %lo(gMessageMsgVars)
/* BB97C 8012527C 24430001 */ addiu $v1, $v0, 0x1
/* BB980 80125280 3042FFFF */ andi $v0, $v0, 0xFFFF
/* BB984 80125284 00501021 */ addu $v0, $v0, $s0
/* BB988 80125288 00481021 */ addu $v0, $v0, $t0
/* BB98C 8012528C A6830528 */ sh $v1, 0x528($s4)
/* BB990 80125290 90450000 */ lbu $a1, 0x0($v0)
/* BB994 80125294 30A300FF */ andi $v1, $a1, 0xFF
/* BB998 80125298 2C6200F0 */ sltiu $v0, $v1, 0xF0
/* BB99C 8012529C 1440004C */ bnez $v0, .L801253D0
/* BB9A0 801252A0 24040001 */ addiu $a0, $zero, 0x1
/* BB9A4 801252A4 2463FF10 */ addiu $v1, $v1, -0xF0
/* BB9A8 801252A8 2C620010 */ sltiu $v0, $v1, 0x10
/* BB9AC 801252AC 10400049 */ beqz $v0, .L801253D4
/* BB9B0 801252B0 00031080 */ sll $v0, $v1, 2
/* BB9B4 801252B4 3C088015 */ lui $t0, %hi(jtbl_80150538)
/* BB9B8 801252B8 25080538 */ addiu $t0, $t0, %lo(jtbl_80150538)
/* BB9BC 801252BC 00481021 */ addu $v0, $v0, $t0
/* BB9C0 801252C0 8C420000 */ lw $v0, 0x0($v0)
/* BB9C4 801252C4 00400008 */ jr $v0
/* BB9C8 801252C8 00000000 */ nop
/* BB9CC 801252CC 96820528 */ lhu $v0, 0x528($s4)
/* BB9D0 801252D0 3C088015 */ lui $t0, %hi(gMessageMsgVars)
/* BB9D4 801252D4 25085C38 */ addiu $t0, $t0, %lo(gMessageMsgVars)
/* BB9D8 801252D8 00501021 */ addu $v0, $v0, $s0
/* BB9DC 801252DC 00481021 */ addu $v0, $v0, $t0
/* BB9E0 801252E0 90420000 */ lbu $v0, 0x0($v0)
/* BB9E4 801252E4 240800FD */ addiu $t0, $zero, 0xFD
/* BB9E8 801252E8 10480003 */ beq $v0, $t0, .L801252F8
/* BB9EC 801252EC 240200F0 */ addiu $v0, $zero, 0xF0
/* BB9F0 801252F0 080494F5 */ j .L801253D4
/* BB9F4 801252F4 A3A20010 */ sb $v0, 0x10($sp)
.L801252F8:
/* BB9F8 801252F8 080494F5 */ j .L801253D4
/* BB9FC 801252FC 0000202D */ daddu $a0, $zero, $zero
/* BBA00 80125300 24A200FE */ addiu $v0, $a1, 0xFE
/* BBA04 80125304 A3A20010 */ sb $v0, 0x10($sp)
/* BBA08 80125308 24A2010D */ addiu $v0, $a1, 0x10D
/* BBA0C 8012530C 080494F5 */ j .L801253D4
/* BBA10 80125310 A2820455 */ sb $v0, 0x455($s4)
/* BBA14 80125314 240200F5 */ addiu $v0, $zero, 0xF5
/* BBA18 80125318 080494F5 */ j .L801253D4
/* BBA1C 8012531C A3A20010 */ sb $v0, 0x10($sp)
/* BBA20 80125320 A3B60010 */ sb $s6, 0x10($sp)
/* BBA24 80125324 96820528 */ lhu $v0, 0x528($s4)
/* BBA28 80125328 3C088015 */ lui $t0, %hi(gMessageMsgVars)
/* BBA2C 8012532C 25085C38 */ addiu $t0, $t0, %lo(gMessageMsgVars)
/* BBA30 80125330 24430001 */ addiu $v1, $v0, 0x1
/* BBA34 80125334 3042FFFF */ andi $v0, $v0, 0xFFFF
/* BBA38 80125338 00501021 */ addu $v0, $v0, $s0
/* BBA3C 8012533C 00481021 */ addu $v0, $v0, $t0
/* BBA40 80125340 A6830528 */ sh $v1, 0x528($s4)
/* BBA44 80125344 90430000 */ lbu $v1, 0x0($v0)
/* BBA48 80125348 24020024 */ addiu $v0, $zero, 0x24
/* BBA4C 8012534C 1062001A */ beq $v1, $v0, .L801253B8
/* BBA50 80125350 28620025 */ slti $v0, $v1, 0x25
/* BBA54 80125354 10400005 */ beqz $v0, .L8012536C
/* BBA58 80125358 24020005 */ addiu $v0, $zero, 0x5
/* BBA5C 8012535C 10620008 */ beq $v1, $v0, .L80125380
/* BBA60 80125360 0000182D */ daddu $v1, $zero, $zero
/* BBA64 80125364 080494F6 */ j .L801253D8
/* BBA68 80125368 00000000 */ nop
.L8012536C:
/* BBA6C 8012536C 24020025 */ addiu $v0, $zero, 0x25
/* BBA70 80125370 10620013 */ beq $v1, $v0, .L801253C0
/* BBA74 80125374 0000182D */ daddu $v1, $zero, $zero
/* BBA78 80125378 080494F6 */ j .L801253D8
/* BBA7C 8012537C 00000000 */ nop
.L80125380:
/* BBA80 80125380 24020004 */ addiu $v0, $zero, 0x4
/* BBA84 80125384 A3A20011 */ sb $v0, 0x11($sp)
/* BBA88 80125388 96820528 */ lhu $v0, 0x528($s4)
/* BBA8C 8012538C 3C088015 */ lui $t0, %hi(gMessageMsgVars)
/* BBA90 80125390 25085C38 */ addiu $t0, $t0, %lo(gMessageMsgVars)
/* BBA94 80125394 24430001 */ addiu $v1, $v0, 0x1
/* BBA98 80125398 3042FFFF */ andi $v0, $v0, 0xFFFF
/* BBA9C 8012539C 00501021 */ addu $v0, $v0, $s0
/* BBAA0 801253A0 00481021 */ addu $v0, $v0, $t0
/* BBAA4 801253A4 A6830528 */ sh $v1, 0x528($s4)
/* BBAA8 801253A8 90420000 */ lbu $v0, 0x0($v0)
/* BBAAC 801253AC 24040003 */ addiu $a0, $zero, 0x3
/* BBAB0 801253B0 080494F5 */ j .L801253D4
/* BBAB4 801253B4 A3A20012 */ sb $v0, 0x12($sp)
.L801253B8:
/* BBAB8 801253B8 080494F1 */ j .L801253C4
/* BBABC 801253BC 2402001A */ addiu $v0, $zero, 0x1A
.L801253C0:
/* BBAC0 801253C0 2402001B */ addiu $v0, $zero, 0x1B
.L801253C4:
/* BBAC4 801253C4 A3A20011 */ sb $v0, 0x11($sp)
/* BBAC8 801253C8 080494F5 */ j .L801253D4
/* BBACC 801253CC 24040002 */ addiu $a0, $zero, 0x2
.L801253D0:
/* BBAD0 801253D0 A3A50010 */ sb $a1, 0x10($sp)
.L801253D4:
/* BBAD4 801253D4 0000182D */ daddu $v1, $zero, $zero
.L801253D8:
/* BBAD8 801253D8 10800009 */ beqz $a0, .L80125400
/* BBADC 801253DC 00000000 */ nop
.L801253E0:
/* BBAE0 801253E0 26B5FFFF */ addiu $s5, $s5, -0x1
/* BBAE4 801253E4 00C31021 */ addu $v0, $a2, $v1
/* BBAE8 801253E8 90420000 */ lbu $v0, 0x0($v0)
/* BBAEC 801253EC 24630001 */ addiu $v1, $v1, 0x1
/* BBAF0 801253F0 A2420000 */ sb $v0, 0x0($s2)
/* BBAF4 801253F4 0064102A */ slt $v0, $v1, $a0
/* BBAF8 801253F8 1440FFF9 */ bnez $v0, .L801253E0
/* BBAFC 801253FC 26520001 */ addiu $s2, $s2, 0x1
.L80125400:
/* BBB00 80125400 96820528 */ lhu $v0, 0x528($s4)
/* BBB04 80125404 3C088015 */ lui $t0, %hi(gMessageMsgVars)
/* BBB08 80125408 25085C38 */ addiu $t0, $t0, %lo(gMessageMsgVars)
/* BBB0C 8012540C 00501021 */ addu $v0, $v0, $s0
/* BBB10 80125410 00481021 */ addu $v0, $v0, $t0
/* BBB14 80125414 90420000 */ lbu $v0, 0x0($v0)
/* BBB18 80125418 240800FD */ addiu $t0, $zero, 0xFD
/* BBB1C 8012541C 5048FF82 */ beql $v0, $t0, .L80125228
/* BBB20 80125420 26730003 */ addiu $s3, $s3, 0x3
/* BBB24 80125424 96820500 */ lhu $v0, 0x500($s4)
/* BBB28 80125428 30420006 */ andi $v0, $v0, 0x6
/* BBB2C 8012542C 1440FF90 */ bnez $v0, .L80125270
/* BBB30 80125430 00000000 */ nop
/* BBB34 80125434 1EA0FF8E */ bgtz $s5, .L80125270
/* BBB38 80125438 00000000 */ nop
.L8012543C:
/* BBB3C 8012543C 96840500 */ lhu $a0, 0x500($s4)
/* BBB40 80125440 30820006 */ andi $v0, $a0, 0x6
/* BBB44 80125444 54400066 */ bnel $v0, $zero, .L801255E0
/* BBB48 80125448 0280202D */ daddu $a0, $s4, $zero
/* BBB4C 8012544C 5EA00064 */ bgtzl $s5, .L801255E0
/* BBB50 80125450 0280202D */ daddu $a0, $s4, $zero
/* BBB54 80125454 9283045E */ lbu $v1, 0x45E($s4)
/* BBB58 80125458 34820001 */ ori $v0, $a0, 0x1
/* BBB5C 8012545C A6820500 */ sh $v0, 0x500($s4)
/* BBB60 80125460 A683000E */ sh $v1, 0xE($s4)
/* BBB64 80125464 08049578 */ j .L801255E0
/* BBB68 80125468 0280202D */ daddu $a0, $s4, $zero
glabel .L8012546C
/* BBB6C 8012546C 92700000 */ lbu $s0, 0x0($s3)
/* BBB70 80125470 3C04802F */ lui $a0, %hi(D_802EB620)
/* BBB74 80125474 2484B620 */ addiu $a0, $a0, %lo(D_802EB620)
/* BBB78 80125478 320300FF */ andi $v1, $s0, 0xFF
/* BBB7C 8012547C 00031040 */ sll $v0, $v1, 1
/* BBB80 80125480 00431021 */ addu $v0, $v0, $v1
/* BBB84 80125484 00021080 */ sll $v0, $v0, 2
/* BBB88 80125488 00441021 */ addu $v0, $v0, $a0
/* BBB8C 8012548C A2900518 */ sb $s0, 0x518($s4)
/* BBB90 80125490 8C430000 */ lw $v1, 0x0($v0)
/* BBB94 80125494 AE830520 */ sw $v1, 0x520($s4)
/* BBB98 80125498 8C430004 */ lw $v1, 0x4($v0)
/* BBB9C 8012549C AE830524 */ sw $v1, 0x524($s4)
/* BBBA0 801254A0 9442000A */ lhu $v0, 0xA($v0)
/* BBBA4 801254A4 26730001 */ addiu $s3, $s3, 0x1
/* BBBA8 801254A8 08049580 */ j .L80125600
/* BBBAC 801254AC A682051C */ sh $v0, 0x51C($s4)
glabel .L801254B0
/* BBBB0 801254B0 92620000 */ lbu $v0, 0x0($s3)
/* BBBB4 801254B4 26730001 */ addiu $s3, $s3, 0x1
/* BBBB8 801254B8 08049580 */ j .L80125600
/* BBBBC 801254BC A2820519 */ sb $v0, 0x519($s4)
glabel .L801254C0
/* BBBC0 801254C0 92700000 */ lbu $s0, 0x0($s3)
/* BBBC4 801254C4 26730001 */ addiu $s3, $s3, 0x1
/* BBBC8 801254C8 92650000 */ lbu $a1, 0x0($s3)
/* BBBCC 801254CC 26730001 */ addiu $s3, $s3, 0x1
/* BBBD0 801254D0 92640000 */ lbu $a0, 0x0($s3)
/* BBBD4 801254D4 26730001 */ addiu $s3, $s3, 0x1
/* BBBD8 801254D8 92660000 */ lbu $a2, 0x0($s3)
/* BBBDC 801254DC 26730001 */ addiu $s3, $s3, 0x1
/* BBBE0 801254E0 00101600 */ sll $v0, $s0, 24
/* BBBE4 801254E4 00051C00 */ sll $v1, $a1, 16
/* BBBE8 801254E8 00431021 */ addu $v0, $v0, $v1
/* BBBEC 801254EC 00041A00 */ sll $v1, $a0, 8
/* BBBF0 801254F0 00431021 */ addu $v0, $v0, $v1
/* BBBF4 801254F4 00C21025 */ or $v0, $a2, $v0
/* BBBF8 801254F8 AE820520 */ sw $v0, 0x520($s4)
/* BBBFC 801254FC 92700000 */ lbu $s0, 0x0($s3)
/* BBC00 80125500 26730001 */ addiu $s3, $s3, 0x1
/* BBC04 80125504 92650000 */ lbu $a1, 0x0($s3)
/* BBC08 80125508 26730001 */ addiu $s3, $s3, 0x1
/* BBC0C 8012550C 92640000 */ lbu $a0, 0x0($s3)
/* BBC10 80125510 26730001 */ addiu $s3, $s3, 0x1
/* BBC14 80125514 92660000 */ lbu $a2, 0x0($s3)
/* BBC18 80125518 26730001 */ addiu $s3, $s3, 0x1
/* BBC1C 8012551C 00101600 */ sll $v0, $s0, 24
/* BBC20 80125520 00051C00 */ sll $v1, $a1, 16
/* BBC24 80125524 00431021 */ addu $v0, $v0, $v1
/* BBC28 80125528 00041A00 */ sll $v1, $a0, 8
/* BBC2C 8012552C 00431021 */ addu $v0, $v0, $v1
/* BBC30 80125530 00C21025 */ or $v0, $a2, $v0
/* BBC34 80125534 08049580 */ j .L80125600
/* BBC38 80125538 AE820524 */ sw $v0, 0x524($s4)
glabel .L8012553C
/* BBC3C 8012553C A2560000 */ sb $s6, 0x0($s2)
/* BBC40 80125540 26520001 */ addiu $s2, $s2, 0x1
/* BBC44 80125544 2402001E */ addiu $v0, $zero, 0x1E
.L80125548:
/* BBC48 80125548 A2420000 */ sb $v0, 0x0($s2)
.L8012554C:
/* BBC4C 8012554C 26520001 */ addiu $s2, $s2, 0x1
/* BBC50 80125550 92620000 */ lbu $v0, 0x0($s3)
/* BBC54 80125554 26730001 */ addiu $s3, $s3, 0x1
.L80125558:
/* BBC58 80125558 A2420000 */ sb $v0, 0x0($s2)
/* BBC5C 8012555C 08049580 */ j .L80125600
/* BBC60 80125560 26520001 */ addiu $s2, $s2, 0x1
glabel .L80125564
/* BBC64 80125564 92620000 */ lbu $v0, 0x0($s3)
/* BBC68 80125568 10400005 */ beqz $v0, .L80125580
/* BBC6C 8012556C 26730001 */ addiu $s3, $s3, 0x1
/* BBC70 80125570 8E8204FC */ lw $v0, 0x4FC($s4)
/* BBC74 80125574 3C030004 */ lui $v1, (0x40000 >> 16)
/* BBC78 80125578 0804957F */ j .L801255FC
/* BBC7C 8012557C 00431025 */ or $v0, $v0, $v1
.L80125580:
/* BBC80 80125580 3C03FFFB */ lui $v1, (0xFFFBFFFF >> 16)
/* BBC84 80125584 8E8204FC */ lw $v0, 0x4FC($s4)
/* BBC88 80125588 3463FFFF */ ori $v1, $v1, (0xFFFBFFFF & 0xFFFF)
/* BBC8C 8012558C 0804957F */ j .L801255FC
/* BBC90 80125590 00431024 */ and $v0, $v0, $v1
glabel .L80125594
/* BBC94 80125594 8E8204FC */ lw $v0, 0x4FC($s4)
/* BBC98 80125598 3C030008 */ lui $v1, (0x80000 >> 16)
/* BBC9C 8012559C 0804957F */ j .L801255FC
/* BBCA0 801255A0 00431025 */ or $v0, $v0, $v1
glabel .L801255A4
/* BBCA4 801255A4 A2450000 */ sb $a1, 0x0($s2)
/* BBCA8 801255A8 26520001 */ addiu $s2, $s2, 0x1
/* BBCAC 801255AC 92820455 */ lbu $v0, 0x455($s4)
/* BBCB0 801255B0 14400009 */ bnez $v0, .L801255D8
/* BBCB4 801255B4 26B5FFFF */ addiu $s5, $s5, -0x1
/* BBCB8 801255B8 30A300FF */ andi $v1, $a1, 0xFF
/* BBCBC 801255BC 240200C3 */ addiu $v0, $zero, 0xC3
/* BBCC0 801255C0 14620006 */ bne $v1, $v0, .L801255DC
/* BBCC4 801255C4 0280202D */ daddu $a0, $s4, $zero
/* BBCC8 801255C8 8E8204FC */ lw $v0, 0x4FC($s4)
/* BBCCC 801255CC 2403FF7F */ addiu $v1, $zero, -0x81
/* BBCD0 801255D0 0804957F */ j .L801255FC
/* BBCD4 801255D4 00431024 */ and $v0, $v0, $v1
.L801255D8:
/* BBCD8 801255D8 0280202D */ daddu $a0, $s4, $zero
.L801255DC:
/* BBCDC 801255DC 30A500FF */ andi $a1, $a1, 0xFF
.L801255E0:
/* BBCE0 801255E0 0C04910D */ jal msg_play_speech_sound
/* BBCE4 801255E4 00000000 */ nop
/* BBCE8 801255E8 8E8304FC */ lw $v1, 0x4FC($s4)
/* BBCEC 801255EC 3C020080 */ lui $v0, (0x800000 >> 16)
/* BBCF0 801255F0 00621024 */ and $v0, $v1, $v0
/* BBCF4 801255F4 10400002 */ beqz $v0, .L80125600
/* BBCF8 801255F8 34620080 */ ori $v0, $v1, 0x80
.L801255FC:
/* BBCFC 801255FC AE8204FC */ sw $v0, 0x4FC($s4)
glabel .L80125600
/* BBD00 80125600 96820500 */ lhu $v0, 0x500($s4)
/* BBD04 80125604 30420006 */ andi $v0, $v0, 0x6
/* BBD08 80125608 14400008 */ bnez $v0, .L8012562C
/* BBD0C 8012560C 00000000 */ nop
.L80125610:
/* BBD10 80125610 1EA00006 */ bgtz $s5, .L8012562C
/* BBD14 80125614 00000000 */ nop
/* BBD18 80125618 96820500 */ lhu $v0, 0x500($s4)
/* BBD1C 8012561C 9283045E */ lbu $v1, 0x45E($s4)
/* BBD20 80125620 34420001 */ ori $v0, $v0, 0x1
/* BBD24 80125624 A6820500 */ sh $v0, 0x500($s4)
/* BBD28 80125628 A683000E */ sh $v1, 0xE($s4)
.L8012562C:
/* BBD2C 8012562C 96820500 */ lhu $v0, 0x500($s4)
/* BBD30 80125630 30420001 */ andi $v0, $v0, 0x1
/* BBD34 80125634 1040FBE6 */ beqz $v0, .L801245D0
/* BBD38 80125638 00000000 */ nop
/* BBD3C 8012563C 13C00004 */ beqz $fp, .L80125650
/* BBD40 80125640 240800FD */ addiu $t0, $zero, 0xFD
/* BBD44 80125644 9262FFFF */ lbu $v0, -0x1($s3)
/* BBD48 80125648 1448FBE1 */ bne $v0, $t0, .L801245D0
/* BBD4C 8012564C 24152710 */ addiu $s5, $zero, 0x2710
.L80125650:
/* BBD50 80125650 2642FFF0 */ addiu $v0, $s2, -0x10
/* BBD54 80125654 8E830000 */ lw $v1, 0x0($s4)
/* BBD58 80125658 00541023 */ subu $v0, $v0, $s4
/* BBD5C 8012565C A6820004 */ sh $v0, 0x4($s4)
/* BBD60 80125660 240200FB */ addiu $v0, $zero, 0xFB
/* BBD64 80125664 A6800500 */ sh $zero, 0x500($s4)
/* BBD68 80125668 02631823 */ subu $v1, $s3, $v1
/* BBD6C 8012566C A683000C */ sh $v1, 0xC($s4)
/* BBD70 80125670 A2420000 */ sb $v0, 0x0($s2)
/* BBD74 80125674 8FBF0044 */ lw $ra, 0x44($sp)
/* BBD78 80125678 8FBE0040 */ lw $fp, 0x40($sp)
/* BBD7C 8012567C 8FB7003C */ lw $s7, 0x3C($sp)
/* BBD80 80125680 8FB60038 */ lw $s6, 0x38($sp)
/* BBD84 80125684 8FB50034 */ lw $s5, 0x34($sp)
/* BBD88 80125688 8FB40030 */ lw $s4, 0x30($sp)
/* BBD8C 8012568C 8FB3002C */ lw $s3, 0x2C($sp)
/* BBD90 80125690 8FB20028 */ lw $s2, 0x28($sp)
/* BBD94 80125694 8FB10024 */ lw $s1, 0x24($sp)
/* BBD98 80125698 8FB00020 */ lw $s0, 0x20($sp)
/* BBD9C 8012569C 03E00008 */ jr $ra
/* BBDA0 801256A0 27BD0048 */ addiu $sp, $sp, 0x48
### DECOMPILED C INSTRUCTIONS:
void msg_copy_to_print_buffer(MessagePrintState* printer, s32 arg1, s32 arg2) {
u8 arg;
u8 argQ;
u8 argW;
u8 argE;
u8 sp10[4];
s32 addr;
s16 offset;
s32 i;
u8* romAddr;
u8* romEnd;
s32 temp;
void* a2;
s8 s8 = arg2 & 1;
u8* printBuf = &printer->printBuffer[printer->printBufferPos];
u8* srcBuf = &printer->srcBuffer[printer->srcBufferPos];
do {
u8 c = *srcBuf++; // a1
u8 nextArg = *srcBuf; // a2
switch (c) {
case MSG_CHAR_READ_ENDL:
*printBuf++ = MSG_CHAR_PRINT_ENDL;
printer->lineCount += (u8)printer->sizeScale;
break;
case MSG_CHAR_READ_WAIT:
printer->windowState = MSG_WINDOW_STATE_WAITING;
printer->delayFlags |= MSG_DELAY_FLAG_1;
printer->delayFlags &= ~2;
printer->rewindArrowAnimState = REWIND_ARROW_STATE_INIT;
printer->rewindArrowCounter = 0;
printer->stateFlags &= ~MSG_STATE_FLAG_80;
printer->stateFlags &= ~MSG_STATE_FLAG_PRINT_QUICKLY;
if (printer->style != MSG_STYLE_F) {
sfx_play_sound_with_params(SOUND_CB, 0, 0, 0);
}
break;
case MSG_CHAR_READ_PAUSE:
printer->currentPrintDelay = *srcBuf++;
printer->delayFlags |= MSG_DELAY_FLAG_1;
printer->stateFlags &= ~MSG_STATE_FLAG_80;
break;
case MSG_CHAR_READ_VARIANT0:
case MSG_CHAR_READ_VARIANT1:
case MSG_CHAR_READ_VARIANT2:
case MSG_CHAR_READ_VARIANT3:
*printBuf++ = MSG_CHAR_PRINT_VARIANT0 + (c - MSG_CHAR_READ_VARIANT0);
printer->fontVariant = c + 13;
break;
case MSG_CHAR_READ_SPACE:
*printBuf++ = MSG_CHAR_PRINT_SPACE;
break;
case MSG_CHAR_READ_FULL_SPACE:
*printBuf++ = MSG_CHAR_PRINT_FULL_SPACE;
break;
case MSG_CHAR_READ_HALF_SPACE:
*printBuf++ = MSG_CHAR_PRINT_HALF_SPACE;
break;
case MSG_CHAR_READ_UNK_CHAR_FA:
*printBuf++ = MSG_CHAR_PRINT_UNK_CHAR_FA;
arg1--;
break;
case MSG_CHAR_READ_NEXT:
if (printer->lineCount != 0) {
printer->lineEndPos[printer->currentLine] = printer->curLinePos;
printer->currentLine++;
*printBuf++ = MSG_CHAR_PRINT_NEXT;
printer->nextLinePos = printer->curLinePos + (gMsgCharsets[printer->font]->newLineY + D_802EB644[printer->style]) * printer->lineCount;
printer->windowState = MSG_WINDOW_STATE_SCROLLING;
printer->delayFlags |= MSG_DELAY_FLAG_1;
}
printer->lineCount = 0;
break;
case MSG_CHAR_READ_STYLE:
*printBuf++ = MSG_CHAR_PRINT_STYLE;
arg = *srcBuf++;
printer->style = arg;
*printBuf++ = arg;
printer->fadeInCounter = 0;
switch (arg) {
case MSG_STYLE_RIGHT:
case MSG_STYLE_LEFT:
case MSG_STYLE_CENTER:
case MSG_STYLE_TATTLE:
if (arg == MSG_STYLE_RIGHT || arg == MSG_STYLE_LEFT || arg == MSG_STYLE_CENTER) {
printer->maxLinesPerPage = 3;
}
printer->delayFlags |= MSG_DELAY_FLAG_1;
printer->stateFlags |= MSG_STATE_FLAG_800000 | MSG_STATE_FLAG_800;
if (nextArg != MSG_CHAR_UNK_C3) {
printer->stateFlags |= MSG_STATE_FLAG_80;
}
printer->speedSoundIDA = SOUND_11;
printer->speedSoundIDB = SOUND_12;
printer->windowState = MSG_WINDOW_STATE_OPENING;
break;
case MSG_STYLE_CHOICE:
do {
printer->windowBasePos.x = *srcBuf++;
printer->windowBasePos.y = *srcBuf++;
printer->windowSize.x = *srcBuf++;
printer->windowSize.y = *srcBuf++;
printer->windowState = MSG_WINDOW_STATE_OPENING;
printer->stateFlags |= MSG_STATE_FLAG_800;
} while (0);
break;
case MSG_STYLE_INSPECT:
case MSG_STYLE_NARRATE:
case MSG_STYLE_F:
if (!s8) {
printer->windowBasePos.x = 20;
printer->windowBasePos.y = 28;
printer->windowSize.y = 58;
printer->windowSize.x = 280;
printer->windowState = MSG_WINDOW_STATE_OPENING;
printer->stateFlags |= MSG_STATE_FLAG_800;
printer->delayFlags |= MSG_DELAY_FLAG_1;
if (arg == MSG_STYLE_INSPECT) {
sfx_play_sound_with_params(SOUND_21C, 0, 0, 0);
}
}
break;
case MSG_STYLE_UPGRADE:
printer->windowBasePos.x = *srcBuf++;
printer->windowBasePos.y = *srcBuf++;
printer->windowSize.x = *srcBuf++;
printer->windowSize.y = *srcBuf++;
sfx_play_sound_with_params(SOUND_21C, 0, 0, 0);
printer->windowState = MSG_WINDOW_STATE_OPENING;
printer->delayFlags |= MSG_DELAY_FLAG_1;
printer->stateFlags |= MSG_STATE_FLAG_800;
break;
case MSG_STYLE_LAMPPOST:
printer->windowSize.y = *srcBuf++;
// fallthrough
case MSG_STYLE_SIGN:
do {
if (!s8) {
printer->windowState = MSG_WINDOW_STATE_OPENING;
printer->stateFlags |= MSG_STATE_FLAG_800;
printer->delayFlags |= MSG_DELAY_FLAG_1;
}
} while (0);
break;
case MSG_STYLE_POSTCARD:
arg = *srcBuf++;
printer->windowState = MSG_WINDOW_STATE_OPENING;
printer->stateFlags |= MSG_STATE_FLAG_800;
printer->delayFlags |= MSG_DELAY_FLAG_1;
printer->letterBackgroundImg = heap_malloc(((charset_postcard_png_width * charset_postcard_png_height) / 2));
romAddr = charset_ROM_START + (s32)charset_postcard_OFFSET;
dma_copy(romAddr, romAddr + ((charset_postcard_png_width * charset_postcard_png_height) / 2), printer->letterBackgroundImg);
printer->letterBackgroundPal = heap_malloc(0x20);
romAddr = charset_ROM_START + ((s32)charset_postcard_pal_OFFSET + 5);
dma_copy(romAddr, romAddr + 0x20, printer->letterBackgroundPal);
printer->letterContentImg = heap_malloc(charset_letter_content_1_png_width * charset_letter_content_1_png_height);
romAddr = charset_ROM_START + D_802EB5C0[arg];
dma_copy(romAddr, romAddr + (charset_letter_content_1_png_width * charset_letter_content_1_png_height), printer->letterContentImg);
printer->letterContentPal = heap_malloc(0x200);
romAddr = charset_ROM_START + D_802EB5F0[arg];
dma_copy(romAddr, romAddr + 0x200, printer->letterContentPal);
break;
case MSG_STYLE_POPUP:
case MSG_STYLE_B:
printer->windowSize.x = printer->msgWidth + 32;
printer->windowSize.y = 40;
printer->stateFlags |= MSG_STATE_FLAG_8000;
do {
if (!s8) {
printer->stateFlags |= MSG_STATE_FLAG_8000 | MSG_STATE_FLAG_800;
printer->windowState = MSG_WINDOW_STATE_D;
printer->delayFlags |= MSG_DELAY_FLAG_1;
}
} while (0);
break;
case MSG_STYLE_EPILOGUE:
printer->windowState = MSG_WINDOW_STATE_PRINTING;
break;
}
if ((printer->delayFlags & MSG_DELAY_FLAG_1) && (printer->delayFlags & (MSG_DELAY_FLAG_4 | MSG_DELAY_FLAG_2))) {
printer->delayFlags &= ~MSG_DELAY_FLAG_1;
}
break;
case MSG_CHAR_READ_END:
*printBuf++ = MSG_CHAR_PRINT_END;
if (printer->stateFlags & MSG_STATE_FLAG_800) {
if (printer->stateFlags & MSG_STATE_FLAG_1000) {
if (printer->closedWritebackBool != NULL) {
*printer->closedWritebackBool = TRUE;
}
}
if (printer->style != MSG_STYLE_POPUP && printer->style != MSG_STYLE_B) {
printer->windowState = MSG_WINDOW_STATE_CLOSING;
} else {
printer->windowState = MSG_WINDOW_STATE_E;
}
printer->fadeOutCounter = 0;
} else {
printer->stateFlags |= MSG_STATE_FLAG_1;
}
printer->delayFlags |= MSG_DELAY_FLAG_1;
printer->delayFlags &= ~MSG_DELAY_FLAG_2;
break;
case MSG_CHAR_READ_FUNCTION:
switch (*srcBuf++) {
case MSG_READ_FUNC_FONT:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_FONT;
*printBuf++ = printer->font = *srcBuf++;
break;
case MSG_READ_FUNC_VARIANT:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_VARIANT;
*printBuf++ = printer->fontVariant = *srcBuf++;
break;
case MSG_READ_FUNC_COLOR:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_COLOR;
*printBuf++ = *srcBuf++;
break;
case MSG_READ_FUNC_NO_SKIP:
printer->stateFlags |= MSG_STATE_FLAG_10;
break;
case MSG_READ_FUNC_INPUT_OFF:
printer->stateFlags |= MSG_STATE_FLAG_20;
printer->stateFlags &= ~MSG_STATE_FLAG_PRINT_QUICKLY;
break;
case MSG_READ_FUNC_INPUT_ON:
printer->stateFlags &= ~MSG_STATE_FLAG_20;
break;
case MSG_READ_FUNC_SPACING:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_SPACING;
*printBuf++ = *srcBuf++;
break;
case MSG_READ_FUNC_DELAY_OFF:
printer->delayFlags |= MSG_DELAY_FLAG_2;
break;
case MSG_READ_FUNC_DELAY_ON:
printer->delayFlags &= ~MSG_DELAY_FLAG_2;
printer->delayFlags |= MSG_DELAY_FLAG_1;
break;
case MSG_READ_FUNC_SCROLL:
printer->lineEndPos[printer->currentLine] = printer->curLinePos;
printer->currentLine++;
*printBuf++ = MSG_CHAR_PRINT_NEXT;
arg = *srcBuf++;
printer->nextLinePos = printer->curLinePos + (gMsgCharsets[printer->font]->newLineY + D_802EB644[printer->style]) * arg;
printer->windowState = MSG_WINDOW_STATE_SCROLLING;
printer->delayFlags |= MSG_DELAY_FLAG_1;
printer->lineCount = 0;
break;
case MSG_READ_FUNC_SIZE:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_SIZE;
*printBuf++ = *srcBuf++;
*printBuf++ = arg = *srcBuf++;
printer->sizeScale = (arg >> 4) + (arg & 0xF) * 0.0625f;
break;
case MSG_READ_FUNC_SIZE_RESET:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_SIZE_RESET;
printer->sizeScale = 1.0f;
break;
case MSG_READ_FUNC_SPEED:
printer->printDelayTime = *srcBuf++;
printer->charsPerChunk = *srcBuf++;
break;
case MSG_READ_FUNC_SET_X:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_SET_X;
*printBuf++ = *srcBuf++;
*printBuf++ = *srcBuf++;
break;
case MSG_READ_FUNC_SET_Y:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_SET_Y;
*printBuf++ = *srcBuf++;
break;
case MSG_READ_FUNC_RIGHT:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_RIGHT;
*printBuf++ = *srcBuf++;
break;
case MSG_READ_FUNC_DOWN:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_DOWN;
*printBuf++ = *srcBuf++;
break;
case MSG_READ_FUNC_UP:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_UP;
*printBuf++ = *srcBuf++;
break;
case MSG_READ_FUNC_INLINE_IMAGE:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_INLINE_IMAGE;
*printBuf++ = *srcBuf++;
arg1--;
printer->currentPrintDelay = printer->printDelayTime;
if (arg1 <= 0) {
printer->delayFlags |= MSG_DELAY_FLAG_1;
}
if (printer->delayFlags & (MSG_DELAY_FLAG_4 | MSG_DELAY_FLAG_2)) {
printer->delayFlags &= ~MSG_DELAY_FLAG_1;
}
break;
case MSG_READ_FUNC_ANIM_SPRITE:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_ANIM_SPRITE;
*printBuf++ = *srcBuf++;
*printBuf++ = *srcBuf++;
*printBuf++ = *srcBuf++;
printer->currentPrintDelay = printer->printDelayTime;
if (--arg1 <= 0) {
printer->delayFlags |= MSG_DELAY_FLAG_1;
}
if (printer->delayFlags & (MSG_DELAY_FLAG_4 | MSG_DELAY_FLAG_2)) {
printer->delayFlags &= ~MSG_DELAY_FLAG_1;
}
break;
case MSG_READ_FUNC_ITEM_ICON:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_ITEM_ICON;
arg = *srcBuf++;
argQ = *srcBuf++;
a2 = D_80159B50;
offset = arg << 8 | argQ;
D_8015131C = D_80159B50;
dma_copy(icon_present_ROM_START + gItemIconRasterOffsets[offset], icon_present_ROM_START + gItemIconRasterOffsets[offset] + 0x200, a2);
romEnd = icon_present_ROM_START + gItemIconPaletteOffsets[offset] + 0x20;
dma_copy(icon_present_ROM_START + gItemIconPaletteOffsets[offset],
romEnd, D_8015C7E0);
printer->currentPrintDelay = printer->printDelayTime;
if (--arg1 <= 0) {
printer->delayFlags |= MSG_DELAY_FLAG_1;
}
if (printer->delayFlags & (MSG_DELAY_FLAG_4 | MSG_DELAY_FLAG_2)) {
printer->delayFlags &= ~MSG_DELAY_FLAG_1;
}
break;
case MSG_READ_FUNC_IMAGE:
printer->currentImageIndex = *srcBuf++;
arg = *srcBuf++;
argQ = *srcBuf++;
printer->varImageScreenPos.x = arg << 8 | argQ;
printer->varImageScreenPos.y = *srcBuf++;
printer->varImgHasBorder = *srcBuf++;
printer->varImgFinalAlpha = *srcBuf++;
printer->varImgAlphaFadeStep = *srcBuf++;
printer->varImageDisplayState = 0;
printer->varImageFadeTimer = 0;
if (--arg1 <= 0) {
printer->delayFlags |= MSG_DELAY_FLAG_1;
}
if (printer->delayFlags & (MSG_DELAY_FLAG_4 | MSG_DELAY_FLAG_2)) {
printer->delayFlags &= ~MSG_DELAY_FLAG_1;
}
break;
case MSG_READ_FUNC_HIDE_IMAGE:
arg = *srcBuf++;
if (arg != 0) {
printer->varImageDisplayState = 2;
printer->varImgAlphaFadeStep = arg;
printer->varImageFadeTimer = 0;
} else {
printer->varImageScreenPos.x = 0;
}
break;
case MSG_READ_FUNC_ANIM_DELAY:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_ANIM_DELAY;
*printBuf++ = *srcBuf++;
*printBuf++ = *srcBuf++;
*printBuf++ = *srcBuf++;
printer->delayFlags |= MSG_DELAY_FLAG_4;
break;
case MSG_READ_FUNC_ANIM_LOOP:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_ANIM_LOOP;
*printBuf++ = *srcBuf++;
*printBuf++ = *srcBuf++;
break;
case MSG_READ_FUNC_ANIM_DONE:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_ANIM_DONE;
*printBuf++ = *srcBuf++;
printer->delayFlags &= ~MSG_DELAY_FLAG_4;
if (--arg1 <= 0) {
printer->delayFlags |= MSG_DELAY_FLAG_1;
}
break;
case MSG_READ_FUNC_SET_CURSOR:
arg = *srcBuf++;
argQ = *srcBuf++;
argW = *srcBuf++;
argE = *srcBuf++;
printer->cursorPosX[arg] = argQ << 8 | argW;
printer->cursorPosY[arg] = argE;
break;
case MSG_READ_FUNC_CURSOR:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_CURSOR;
*printBuf++ = *srcBuf++;
break;
case MSG_READ_FUNC_END_CHOICE:
sfx_play_sound_with_params(SOUND_MENU_START_TUTORIAL, 0, 0, 0);
printer->maxOption = *srcBuf++;
printer->madeChoice = 0;
printer->currentOption = 0;
printer->selectedOption = 0;
printer->windowState = MSG_WINDOW_STATE_WAITING_FOR_CHOICE;
printer->delayFlags |= MSG_DELAY_FLAG_1;
break;
case MSG_READ_FUNC_SET_CANCEL:
printer->cancelOption = *srcBuf++;
break;
case MSG_READ_FUNC_OPTION:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_OPTION;
*printBuf++ = *srcBuf++;
break;
case MSG_READ_FUNC_RESET_GFX:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_RESET_GFX;
break;
case MSG_READ_FUNC_YIELD:
printer->stateFlags |= MSG_STATE_FLAG_100000 | MSG_STATE_FLAG_40;
printer->delayFlags |= MSG_DELAY_FLAG_1;
printer->stateFlags &= ~MSG_STATE_FLAG_80;
printer->stateFlags &= ~MSG_STATE_FLAG_PRINT_QUICKLY;
break;
case MSG_READ_FUNC_SAVE_POS:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_SAVE_POS;
break;
case MSG_READ_FUNC_RESTORE_POS:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_RESTORE_POS;
break;
case MSG_READ_FUNC_SAVE_COLOR:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_SAVE_COLOR;
break;
case MSG_READ_FUNC_RESTORE_COLOR:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_RESTORE_COLOR;
break;
case MSG_READ_FUNC_START_FX:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_START_FX;
arg = *srcBuf++;
switch (arg) {
case MSG_FX_SHAKE:
case MSG_FX_WAVE:
case MSG_FX_NOISE_OUTLINE:
case MSG_FX_RAINBOW:
case MSG_FX_GLOBAL_WAVE:
case MSG_FX_GLOBAL_RAINBOW:
case MSG_FX_RISE_PRINT:
case MSG_FX_GROW_PRINT:
case MSG_FX_SIZE_JITTER:
case MSG_FX_SIZE_WAVE:
case MSG_FX_DROP_SHADOW:
*printBuf++ = arg;
break;
case MSG_FX_STATIC:
case MSG_FX_BLUR:
case MSG_FX_DITHER_FADE:
*printBuf++ = arg;
*printBuf++ = *srcBuf++;
break;
}
break;
case MSG_READ_FUNC_END_FX:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_END_FX;
*printBuf++ = *srcBuf++;
break;
case MSG_READ_FUNC_VAR:
arg = *srcBuf++;
srcBuf -= 3;
if (printer->varBufferReadPos == 0) {
printer->unk_52A = printer->fontVariant;
*printBuf++ = MSG_CHAR_PRINT_VARIANT0;
}
do {
s32 a0 = 1;
argQ = gMessageMsgVars[arg][printer->varBufferReadPos++];
if (argQ >= MSG_CONTROL_CHAR) {
s32 tmp;
switch (argQ) {
case MSG_CHAR_READ_ENDL:
if (gMessageMsgVars[arg][printer->varBufferReadPos] != MSG_CHAR_READ_END) {
sp10[0] = MSG_CHAR_PRINT_ENDL;
} else {
a0 = 0;
}
break;
case MSG_CHAR_READ_VARIANT0:
case MSG_CHAR_READ_VARIANT1:
case MSG_CHAR_READ_VARIANT2:
case MSG_CHAR_READ_VARIANT3:
sp10[0] = (argQ - MSG_CHAR_READ_VARIANT0) + MSG_CHAR_PRINT_VARIANT0;
temp = argQ - MSG_CHAR_READ_VARIANT0 + 0x200;
printer->fontVariant = temp;
break;
case MSG_CHAR_READ_SPACE:
sp10[0] = MSG_CHAR_PRINT_SPACE;
break;
case MSG_CHAR_READ_FUNCTION:
sp10[0] = MSG_CHAR_PRINT_FUNCTION;
switch (gMessageMsgVars[arg][printer->varBufferReadPos++]) {
case MSG_READ_FUNC_COLOR:
sp10[1] = MSG_PRINT_FUNC_COLOR;
sp10[2] = gMessageMsgVars[arg][printer->varBufferReadPos++];
a0 = 3;
break;
case MSG_READ_FUNC_SAVE_COLOR:
sp10[1] = MSG_PRINT_FUNC_SAVE_COLOR;
a0 = 2;
break;
case MSG_READ_FUNC_RESTORE_COLOR:
sp10[1] = MSG_PRINT_FUNC_RESTORE_COLOR;
a0 = 2;
break;
}
break;
}
} else {
sp10[0] = argQ;
}
for (i = 0; i < a0; i++) {
arg1--;
*printBuf++ = sp10[i];
}
if (gMessageMsgVars[arg][printer->varBufferReadPos] == MSG_CHAR_READ_END) {
srcBuf += 3;
printer->varBufferReadPos = 0;
printer->fontVariant = printer->unk_52A;
*printBuf++ = MSG_CHAR_PRINT_VARIANT0 + printer->fontVariant;
break;
}
} while ((printer->delayFlags & (MSG_DELAY_FLAG_4 | MSG_DELAY_FLAG_2)) || arg1 > 0);
if (!(printer->delayFlags & (MSG_DELAY_FLAG_4 | MSG_DELAY_FLAG_2)) && arg1 <= 0) {
printer->delayFlags |= MSG_DELAY_FLAG_1;
printer->currentPrintDelay = printer->printDelayTime;
}
msg_play_speech_sound(printer, argQ);
if (printer->stateFlags & MSG_STATE_FLAG_800000) {
printer->stateFlags |= MSG_STATE_FLAG_80;
}
break;
case MSG_READ_FUNC_VOICE:
arg = *srcBuf++;
printer->speechSoundType = arg;
printer->speedSoundIDA = D_802EB620[arg].unk_00;
printer->speedSoundIDB = D_802EB620[arg].unk_04;
printer->speechVolumePitch = D_802EB620[arg].unk_08;
break;
case MSG_READ_FUNC_VOLUME:
printer->volume = *srcBuf++;
break;
case MSG_READ_FUNC_CUSTOM_VOICE:
arg = *srcBuf++;
argQ = *srcBuf++;
argW = *srcBuf++;
argE = *srcBuf++;
printer->speedSoundIDA = (arg << 0x18) + (argQ << 0x10) + (argW << 0x8) + (argE);
arg = *srcBuf++;
argQ = *srcBuf++;
argW = *srcBuf++;
argE = *srcBuf++;
printer->speedSoundIDB = (arg << 0x18) + (argQ << 0x10) + (argW << 0x8) + (argE);
break;
case MSG_READ_FUNC_CENTER_X:
*printBuf++ = MSG_CHAR_PRINT_FUNCTION;
*printBuf++ = MSG_PRINT_FUNC_CENTER_X;
*printBuf++ = *srcBuf++;
break;
case MSG_READ_FUNC_SET_REWIND:
if (*srcBuf++) {
printer->stateFlags |= MSG_STATE_FLAG_40000;
} else {
printer->stateFlags &= ~MSG_STATE_FLAG_40000;
}
break;
case MSG_READ_FUNC_ENABLE_CDOWN_NEXT:
printer->stateFlags |= MSG_STATE_FLAG_80000;
break;
}
break;
default:
*printBuf++ = c;
arg1--;
if (printer->fontVariant == 0 && c == MSG_CHAR_UNK_C3) {
printer->stateFlags &= ~MSG_STATE_FLAG_80;
} else {
msg_play_speech_sound(printer, c);
if (printer->stateFlags & MSG_STATE_FLAG_800000) {
printer->stateFlags |= MSG_STATE_FLAG_80;
}
}
break;
}
if (!(printer->delayFlags & (MSG_DELAY_FLAG_4 | MSG_DELAY_FLAG_2)) && arg1 <= 0) {
printer->delayFlags |= MSG_DELAY_FLAG_1;
printer->currentPrintDelay = printer->printDelayTime;
}
if (!(printer->delayFlags & MSG_DELAY_FLAG_1)) {
continue;
}
if (!s8) {
break;
}
if (srcBuf[-1] == MSG_CHAR_READ_END) {
break;
}
arg1 = 10000;
} while (TRUE);
printer->printBufferPos = printBuf - printer->printBuffer;
printer->delayFlags = 0;
printer->srcBufferPos = (u16)(s32)(srcBuf - (s32)printer->srcBuffer);
*printBuf = MSG_CHAR_PRINT_END;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel calc_enemy_damage_target
/* 1A5D0C 8027742C 27BDFFA8 */ addiu $sp, $sp, -0x58
/* 1A5D10 80277430 AFB50044 */ sw $s5, 0x44($sp)
/* 1A5D14 80277434 0000A82D */ daddu $s5, $zero, $zero
/* 1A5D18 80277438 AFB40040 */ sw $s4, 0x40($sp)
/* 1A5D1C 8027743C 3C14800E */ lui $s4, %hi(gBattleStatus)
/* 1A5D20 80277440 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
/* 1A5D24 80277444 AFBF0054 */ sw $ra, 0x54($sp)
/* 1A5D28 80277448 AFBE0050 */ sw $fp, 0x50($sp)
/* 1A5D2C 8027744C AFB7004C */ sw $s7, 0x4C($sp)
/* 1A5D30 80277450 AFB60048 */ sw $s6, 0x48($sp)
/* 1A5D34 80277454 AFB3003C */ sw $s3, 0x3C($sp)
/* 1A5D38 80277458 AFB20038 */ sw $s2, 0x38($sp)
/* 1A5D3C 8027745C AFB10034 */ sw $s1, 0x34($sp)
/* 1A5D40 80277460 AFB00030 */ sw $s0, 0x30($sp)
/* 1A5D44 80277464 AFA40058 */ sw $a0, 0x58($sp)
/* 1A5D48 80277468 AFA00020 */ sw $zero, 0x20($sp)
/* 1A5D4C 8027746C AFA00024 */ sw $zero, 0x24($sp)
/* 1A5D50 80277470 AFA00028 */ sw $zero, 0x28($sp)
/* 1A5D54 80277474 869001A0 */ lh $s0, 0x1A0($s4)
/* 1A5D58 80277478 829201A2 */ lb $s2, 0x1A2($s4)
/* 1A5D5C 8027747C 02A0B82D */ daddu $s7, $s5, $zero
/* 1A5D60 80277480 A2800199 */ sb $zero, 0x199($s4)
/* 1A5D64 80277484 A6800180 */ sh $zero, 0x180($s4)
/* 1A5D68 80277488 8FA80058 */ lw $t0, 0x58($sp)
/* 1A5D6C 8027748C 0200202D */ daddu $a0, $s0, $zero
/* 1A5D70 80277490 95020192 */ lhu $v0, 0x192($t0)
/* 1A5D74 80277494 2511000C */ addiu $s1, $t0, 0xC
/* 1A5D78 80277498 A69001A4 */ sh $s0, 0x1A4($s4)
/* 1A5D7C 8027749C A29201A6 */ sb $s2, 0x1A6($s4)
/* 1A5D80 802774A0 0C09A75B */ jal get_actor
/* 1A5D84 802774A4 A68201A8 */ sh $v0, 0x1A8($s4)
/* 1A5D88 802774A8 0040982D */ daddu $s3, $v0, $zero
/* 1A5D8C 802774AC 16600003 */ bnez $s3, .L802774BC
/* 1A5D90 802774B0 0260202D */ daddu $a0, $s3, $zero
/* 1A5D94 802774B4 0809E1A9 */ j .L802786A4
/* 1A5D98 802774B8 0000102D */ daddu $v0, $zero, $zero
.L802774BC:
/* 1A5D9C 802774BC 0C099117 */ jal get_actor_part
/* 1A5DA0 802774C0 0240282D */ daddu $a1, $s2, $zero
/* 1A5DA4 802774C4 14400003 */ bnez $v0, .L802774D4
/* 1A5DA8 802774C8 AFA20018 */ sw $v0, 0x18($sp)
.L802774CC:
/* 1A5DAC 802774CC 0809DD33 */ j .L802774CC
/* 1A5DB0 802774D0 00000000 */ nop
.L802774D4:
/* 1A5DB4 802774D4 32160700 */ andi $s6, $s0, 0x700
/* 1A5DB8 802774D8 24020100 */ addiu $v0, $zero, 0x100
/* 1A5DBC 802774DC 12C2000A */ beq $s6, $v0, .L80277508
/* 1A5DC0 802774E0 A66001F8 */ sh $zero, 0x1F8($s3)
/* 1A5DC4 802774E4 2AC20101 */ slti $v0, $s6, 0x101
/* 1A5DC8 802774E8 10400009 */ beqz $v0, .L80277510
/* 1A5DCC 802774EC 00000000 */ nop
/* 1A5DD0 802774F0 16C00007 */ bnez $s6, .L80277510
/* 1A5DD4 802774F4 00000000 */ nop
/* 1A5DD8 802774F8 3C028011 */ lui $v0, %hi(gPlayerData + 0x2)
/* 1A5DDC 802774FC 9042F292 */ lbu $v0, %lo(gPlayerData + 0x2)($v0)
/* 1A5DE0 80277500 0809DD44 */ j .L80277510
/* 1A5DE4 80277504 A26201B8 */ sb $v0, 0x1B8($s3)
.L80277508:
/* 1A5DE8 80277508 2402007F */ addiu $v0, $zero, 0x7F
/* 1A5DEC 8027750C A26201B8 */ sb $v0, 0x1B8($s3)
.L80277510:
/* 1A5DF0 80277510 8FA80018 */ lw $t0, 0x18($sp)
/* 1A5DF4 80277514 8D04007C */ lw $a0, 0x7C($t0)
/* 1A5DF8 80277518 30820020 */ andi $v0, $a0, 0x20
/* 1A5DFC 8027751C 14400461 */ bnez $v0, .L802786A4
/* 1A5E00 80277520 24020006 */ addiu $v0, $zero, 0x6
/* 1A5E04 80277524 82630218 */ lb $v1, 0x218($s3)
/* 1A5E08 80277528 2402000E */ addiu $v0, $zero, 0xE
/* 1A5E0C 8027752C 10620007 */ beq $v1, $v0, .L8027754C
/* 1A5E10 80277530 30820800 */ andi $v0, $a0, 0x800
/* 1A5E14 80277534 10400007 */ beqz $v0, .L80277554
/* 1A5E18 80277538 00000000 */ nop
/* 1A5E1C 8027753C 8E820188 */ lw $v0, 0x188($s4)
/* 1A5E20 80277540 30420800 */ andi $v0, $v0, 0x800
/* 1A5E24 80277544 14400003 */ bnez $v0, .L80277554
/* 1A5E28 80277548 00000000 */ nop
.L8027754C:
/* 1A5E2C 8027754C 0809E1A9 */ j .L802786A4
/* 1A5E30 80277550 24020006 */ addiu $v0, $zero, 0x6
.L80277554:
/* 1A5E34 80277554 82630214 */ lb $v1, 0x214($s3)
/* 1A5E38 80277558 2402000C */ addiu $v0, $zero, 0xC
/* 1A5E3C 8027755C 1462001A */ bne $v1, $v0, .L802775C8
/* 1A5E40 80277560 24020001 */ addiu $v0, $zero, 0x1
/* 1A5E44 80277564 AFA20010 */ sw $v0, 0x10($sp)
/* 1A5E48 80277568 2402FFFF */ addiu $v0, $zero, -0x1
/* 1A5E4C 8027756C AFA20014 */ sw $v0, 0x14($sp)
/* 1A5E50 80277570 C62C000C */ lwc1 $f12, 0xC($s1)
/* 1A5E54 80277574 C62E0010 */ lwc1 $f14, 0x10($s1)
/* 1A5E58 80277578 8E260014 */ lw $a2, 0x14($s1)
/* 1A5E5C 8027757C 0C093BF8 */ jal func_8024EFE0
/* 1A5E60 80277580 0000382D */ daddu $a3, $zero, $zero
/* 1A5E64 80277584 AFA00010 */ sw $zero, 0x10($sp)
/* 1A5E68 80277588 C62C000C */ lwc1 $f12, 0xC($s1)
/* 1A5E6C 8027758C C62E0010 */ lwc1 $f14, 0x10($s1)
/* 1A5E70 80277590 8E260014 */ lw $a2, 0x14($s1)
/* 1A5E74 80277594 0C09996B */ jal show_next_damage_popup
/* 1A5E78 80277598 0000382D */ daddu $a3, $zero, $zero
/* 1A5E7C 8027759C AFA00010 */ sw $zero, 0x10($sp)
/* 1A5E80 802775A0 8E25000C */ lw $a1, 0xC($s1)
/* 1A5E84 802775A4 8E260010 */ lw $a2, 0x10($s1)
/* 1A5E88 802775A8 8E270014 */ lw $a3, 0x14($s1)
/* 1A5E8C 802775AC 0C09DC01 */ jal play_hit_sound
/* 1A5E90 802775B0 8FA40058 */ lw $a0, 0x58($sp)
/* 1A5E94 802775B4 0260202D */ daddu $a0, $s3, $zero
/* 1A5E98 802775B8 0C09DBE3 */ jal dispatch_event_general
/* 1A5E9C 802775BC 24050019 */ addiu $a1, $zero, 0x19
/* 1A5EA0 802775C0 0809E1A9 */ j .L802786A4
/* 1A5EA4 802775C4 0000102D */ daddu $v0, $zero, $zero
.L802775C8:
/* 1A5EA8 802775C8 8E830188 */ lw $v1, 0x188($s4)
/* 1A5EAC 802775CC 30620200 */ andi $v0, $v1, 0x200
/* 1A5EB0 802775D0 10400014 */ beqz $v0, .L80277624
/* 1A5EB4 802775D4 3C021000 */ lui $v0, (0x10000000 >> 16)
/* 1A5EB8 802775D8 00621024 */ and $v0, $v1, $v0
/* 1A5EBC 802775DC 14400011 */ bnez $v0, .L80277624
/* 1A5EC0 802775E0 00000000 */ nop
/* 1A5EC4 802775E4 8FA80018 */ lw $t0, 0x18($sp)
/* 1A5EC8 802775E8 8D02007C */ lw $v0, 0x7C($t0)
/* 1A5ECC 802775EC 30420200 */ andi $v0, $v0, 0x200
/* 1A5ED0 802775F0 1040000C */ beqz $v0, .L80277624
/* 1A5ED4 802775F4 24020003 */ addiu $v0, $zero, 0x3
/* 1A5ED8 802775F8 AFA20010 */ sw $v0, 0x10($sp)
/* 1A5EDC 802775FC 8E25000C */ lw $a1, 0xC($s1)
/* 1A5EE0 80277600 8E260010 */ lw $a2, 0x10($s1)
/* 1A5EE4 80277604 8E270014 */ lw $a3, 0x14($s1)
/* 1A5EE8 80277608 0C09DC01 */ jal play_hit_sound
/* 1A5EEC 8027760C 8FA40058 */ lw $a0, 0x58($sp)
/* 1A5EF0 80277610 0260202D */ daddu $a0, $s3, $zero
/* 1A5EF4 80277614 0C09DBE3 */ jal dispatch_event_general
/* 1A5EF8 80277618 24050022 */ addiu $a1, $zero, 0x22
/* 1A5EFC 8027761C 0809E1A9 */ j .L802786A4
/* 1A5F00 80277620 2402FFFF */ addiu $v0, $zero, -0x1
.L80277624:
/* 1A5F04 80277624 8E820188 */ lw $v0, 0x188($s4)
/* 1A5F08 80277628 30420800 */ andi $v0, $v0, 0x800
/* 1A5F0C 8027762C 1040000D */ beqz $v0, .L80277664
/* 1A5F10 80277630 00000000 */ nop
/* 1A5F14 80277634 8E620000 */ lw $v0, 0x0($s3)
/* 1A5F18 80277638 30420200 */ andi $v0, $v0, 0x200
/* 1A5F1C 8027763C 10400009 */ beqz $v0, .L80277664
/* 1A5F20 80277640 24020001 */ addiu $v0, $zero, 0x1
/* 1A5F24 80277644 AFA20010 */ sw $v0, 0x10($sp)
/* 1A5F28 80277648 8E25000C */ lw $a1, 0xC($s1)
/* 1A5F2C 8027764C 8E260010 */ lw $a2, 0x10($s1)
/* 1A5F30 80277650 8E270014 */ lw $a3, 0x14($s1)
/* 1A5F34 80277654 0C09DC01 */ jal play_hit_sound
/* 1A5F38 80277658 8FA40058 */ lw $a0, 0x58($sp)
/* 1A5F3C 8027765C 0809E1A9 */ j .L802786A4
/* 1A5F40 80277660 24020002 */ addiu $v0, $zero, 0x2
.L80277664:
/* 1A5F44 80277664 8E820188 */ lw $v0, 0x188($s4)
/* 1A5F48 80277668 30420002 */ andi $v0, $v0, 0x2
/* 1A5F4C 8027766C 10400010 */ beqz $v0, .L802776B0
/* 1A5F50 80277670 0000202D */ daddu $a0, $zero, $zero
/* 1A5F54 80277674 C6240014 */ lwc1 $f4, 0x14($s1)
/* 1A5F58 80277678 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 1A5F5C 8027767C 44810000 */ mtc1 $at, $f0
/* 1A5F60 80277680 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1A5F64 80277684 44811000 */ mtc1 $at, $f2
/* 1A5F68 80277688 24020018 */ addiu $v0, $zero, 0x18
/* 1A5F6C 8027768C AFA20014 */ sw $v0, 0x14($sp)
/* 1A5F70 80277690 46002100 */ add.s $f4, $f4, $f0
/* 1A5F74 80277694 E7A20010 */ swc1 $f2, 0x10($sp)
/* 1A5F78 80277698 8E25000C */ lw $a1, 0xC($s1)
/* 1A5F7C 8027769C 8E260010 */ lw $a2, 0x10($s1)
/* 1A5F80 802776A0 44072000 */ mfc1 $a3, $f4
/* 1A5F84 802776A4 24080001 */ addiu $t0, $zero, 0x1
/* 1A5F88 802776A8 0C01C184 */ jal fx_ring_blast
/* 1A5F8C 802776AC AFA80020 */ sw $t0, 0x20($sp)
.L802776B0:
/* 1A5F90 802776B0 8E820188 */ lw $v0, 0x188($s4)
/* 1A5F94 802776B4 30420020 */ andi $v0, $v0, 0x20
/* 1A5F98 802776B8 10400005 */ beqz $v0, .L802776D0
/* 1A5F9C 802776BC 00000000 */ nop
/* 1A5FA0 802776C0 0C09451D */ jal apply_shock_effect
/* 1A5FA4 802776C4 0260202D */ daddu $a0, $s3, $zero
/* 1A5FA8 802776C8 24080001 */ addiu $t0, $zero, 0x1
/* 1A5FAC 802776CC AFA80024 */ sw $t0, 0x24($sp)
.L802776D0:
/* 1A5FB0 802776D0 8E820188 */ lw $v0, 0x188($s4)
/* 1A5FB4 802776D4 30420004 */ andi $v0, $v0, 0x4
/* 1A5FB8 802776D8 1040000E */ beqz $v0, .L80277714
/* 1A5FBC 802776DC 24020018 */ addiu $v0, $zero, 0x18
/* 1A5FC0 802776E0 C6240014 */ lwc1 $f4, 0x14($s1)
/* 1A5FC4 802776E4 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 1A5FC8 802776E8 44810000 */ mtc1 $at, $f0
/* 1A5FCC 802776EC 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1A5FD0 802776F0 44811000 */ mtc1 $at, $f2
/* 1A5FD4 802776F4 AFA20014 */ sw $v0, 0x14($sp)
/* 1A5FD8 802776F8 46002100 */ add.s $f4, $f4, $f0
/* 1A5FDC 802776FC E7A20010 */ swc1 $f2, 0x10($sp)
/* 1A5FE0 80277700 8E25000C */ lw $a1, 0xC($s1)
/* 1A5FE4 80277704 8E260010 */ lw $a2, 0x10($s1)
/* 1A5FE8 80277708 44072000 */ mfc1 $a3, $f4
/* 1A5FEC 8027770C 0C01C70C */ jal fx_water_splash
/* 1A5FF0 80277710 0000202D */ daddu $a0, $zero, $zero
.L80277714:
/* 1A5FF4 80277714 8E820188 */ lw $v0, 0x188($s4)
/* 1A5FF8 80277718 30420008 */ andi $v0, $v0, 0x8
/* 1A5FFC 8027771C 1040000B */ beqz $v0, .L8027774C
/* 1A6000 80277720 00000000 */ nop
/* 1A6004 80277724 C6220014 */ lwc1 $f2, 0x14($s1)
/* 1A6008 80277728 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 1A600C 8027772C 44810000 */ mtc1 $at, $f0
/* 1A6010 80277730 00000000 */ nop
/* 1A6014 80277734 46001080 */ add.s $f2, $f2, $f0
/* 1A6018 80277738 8E25000C */ lw $a1, 0xC($s1)
/* 1A601C 8027773C 8E260010 */ lw $a2, 0x10($s1)
/* 1A6020 80277740 44071000 */ mfc1 $a3, $f2
/* 1A6024 80277744 0C01C2A4 */ jal fx_big_snowflakes
/* 1A6028 80277748 0000202D */ daddu $a0, $zero, $zero
.L8027774C:
/* 1A602C 8027774C 8FA80058 */ lw $t0, 0x58($sp)
/* 1A6030 80277750 81020212 */ lb $v0, 0x212($t0)
/* 1A6034 80277754 2403000B */ addiu $v1, $zero, 0xB
/* 1A6038 80277758 5043001E */ beql $v0, $v1, .L802777D4
/* 1A603C 8027775C 3C047FFF */ lui $a0, (0x7FFFFFFF >> 16)
/* 1A6040 80277760 82620212 */ lb $v0, 0x212($s3)
/* 1A6044 80277764 10430006 */ beq $v0, $v1, .L80277780
/* 1A6048 80277768 3C031000 */ lui $v1, (0x10000020 >> 16)
/* 1A604C 8027776C 8FA80018 */ lw $t0, 0x18($sp)
/* 1A6050 80277770 8D02007C */ lw $v0, 0x7C($t0)
/* 1A6054 80277774 30420080 */ andi $v0, $v0, 0x80
/* 1A6058 80277778 50400016 */ beql $v0, $zero, .L802777D4
/* 1A605C 8027777C 3C047FFF */ lui $a0, (0x7FFFFFFF >> 16)
.L80277780:
/* 1A6060 80277780 8E820188 */ lw $v0, 0x188($s4)
/* 1A6064 80277784 34630020 */ ori $v1, $v1, (0x10000020 & 0xFFFF)
/* 1A6068 80277788 00431024 */ and $v0, $v0, $v1
/* 1A606C 8027778C 14400011 */ bnez $v0, .L802777D4
/* 1A6070 80277790 3C047FFF */ lui $a0, (0x7FFFFFFF >> 16)
/* 1A6074 80277794 8E82018C */ lw $v0, 0x18C($s4)
/* 1A6078 80277798 30420008 */ andi $v0, $v0, 0x8
/* 1A607C 8027779C 1440000E */ bnez $v0, .L802777D8
/* 1A6080 802777A0 3484FFFF */ ori $a0, $a0, (0x7FFFFFFF & 0xFFFF)
/* 1A6084 802777A4 8FA40058 */ lw $a0, 0x58($sp)
/* 1A6088 802777A8 0C09DBD4 */ jal has_enchanted_part
/* 1A608C 802777AC 00000000 */ nop
/* 1A6090 802777B0 14400008 */ bnez $v0, .L802777D4
/* 1A6094 802777B4 3C047FFF */ lui $a0, (0x7FFFFFFF >> 16)
/* 1A6098 802777B8 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1A609C 802777BC 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 1A60A0 802777C0 8C620000 */ lw $v0, 0x0($v1)
/* 1A60A4 802777C4 24080001 */ addiu $t0, $zero, 0x1
/* 1A60A8 802777C8 AFA80028 */ sw $t0, 0x28($sp)
/* 1A60AC 802777CC 34420020 */ ori $v0, $v0, 0x20
/* 1A60B0 802777D0 AC620000 */ sw $v0, 0x0($v1)
.L802777D4:
/* 1A60B4 802777D4 3484FFFF */ ori $a0, $a0, (0x7FFFFFFF & 0xFFFF)
.L802777D8:
/* 1A60B8 802777D8 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1A60BC 802777DC 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 1A60C0 802777E0 8C620000 */ lw $v0, 0x0($v1)
/* 1A60C4 802777E4 8E860188 */ lw $a2, 0x188($s4)
/* 1A60C8 802777E8 00441024 */ and $v0, $v0, $a0
/* 1A60CC 802777EC AC620000 */ sw $v0, 0x0($v1)
/* 1A60D0 802777F0 8FA80018 */ lw $t0, 0x18($sp)
/* 1A60D4 802777F4 8D050078 */ lw $a1, 0x78($t0)
/* 1A60D8 802777F8 0C0998AF */ jal get_defense
/* 1A60DC 802777FC 0260202D */ daddu $a0, $s3, $zero
/* 1A60E0 80277800 0040202D */ daddu $a0, $v0, $zero
/* 1A60E4 80277804 8E830188 */ lw $v1, 0x188($s4)
/* 1A60E8 80277808 3C020800 */ lui $v0, (0x8000000 >> 16)
/* 1A60EC 8027780C 00621024 */ and $v0, $v1, $v0
/* 1A60F0 80277810 14400010 */ bnez $v0, .L80277854
/* 1A60F4 80277814 00000000 */ nop
/* 1A60F8 80277818 82620222 */ lb $v0, 0x222($s3)
/* 1A60FC 8027781C 16C0000D */ bnez $s6, .L80277854
/* 1A6100 80277820 00822021 */ addu $a0, $a0, $v0
/* 1A6104 80277824 8282009D */ lb $v0, 0x9D($s4)
/* 1A6108 80277828 18400004 */ blez $v0, .L8027783C
/* 1A610C 8027782C 30620202 */ andi $v0, $v1, 0x202
/* 1A6110 80277830 50400002 */ beql $v0, $zero, .L8027783C
/* 1A6114 80277834 24840001 */ addiu $a0, $a0, 0x1
/* 1A6118 80277838 24840002 */ addiu $a0, $a0, 0x2
.L8027783C:
/* 1A611C 8027783C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A6120 80277840 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A6124 80277844 3C030040 */ lui $v1, (0x400000 >> 16)
/* 1A6128 80277848 00431024 */ and $v0, $v0, $v1
/* 1A612C 8027784C 54400001 */ bnel $v0, $zero, .L80277854
/* 1A6130 80277850 24840001 */ addiu $a0, $a0, 0x1
.L80277854:
/* 1A6134 80277854 8690017E */ lh $s0, 0x17E($s4)
/* 1A6138 80277858 24020100 */ addiu $v0, $zero, 0x100
/* 1A613C 8027785C 12C20007 */ beq $s6, $v0, .L8027787C
/* 1A6140 80277860 2AC20101 */ slti $v0, $s6, 0x101
/* 1A6144 80277864 10400005 */ beqz $v0, .L8027787C
/* 1A6148 80277868 00000000 */ nop
/* 1A614C 8027786C 16C00003 */ bnez $s6, .L8027787C
/* 1A6150 80277870 00000000 */ nop
/* 1A6154 80277874 828200AD */ lb $v0, 0xAD($s4)
/* 1A6158 80277878 02028023 */ subu $s0, $s0, $v0
.L8027787C:
/* 1A615C 8027787C 8FA80058 */ lw $t0, 0x58($sp)
/* 1A6160 80277880 81020221 */ lb $v0, 0x221($t0)
/* 1A6164 80277884 81030224 */ lb $v1, 0x224($t0)
/* 1A6168 80277888 10600004 */ beqz $v1, .L8027789C
/* 1A616C 8027788C 02028021 */ addu $s0, $s0, $v0
/* 1A6170 80277890 81020223 */ lb $v0, 0x223($t0)
/* 1A6174 80277894 02028023 */ subu $s0, $s0, $v0
/* 1A6178 80277898 8FA80058 */ lw $t0, 0x58($sp)
.L8027789C:
/* 1A617C 8027789C 81030210 */ lb $v1, 0x210($t0)
/* 1A6180 802778A0 2402000A */ addiu $v0, $zero, 0xA
/* 1A6184 802778A4 14620006 */ bne $v1, $v0, .L802778C0
/* 1A6188 802778A8 2A020064 */ slti $v0, $s0, 0x64
/* 1A618C 802778AC 1A000003 */ blez $s0, .L802778BC
/* 1A6190 802778B0 001017C2 */ srl $v0, $s0, 31
/* 1A6194 802778B4 02021021 */ addu $v0, $s0, $v0
/* 1A6198 802778B8 00028043 */ sra $s0, $v0, 1
.L802778BC:
/* 1A619C 802778BC 2A020064 */ slti $v0, $s0, 0x64
.L802778C0:
/* 1A61A0 802778C0 50400001 */ beql $v0, $zero, .L802778C8
/* 1A61A4 802778C4 24100063 */ addiu $s0, $zero, 0x63
.L802778C8:
/* 1A61A8 802778C8 5A000001 */ blezl $s0, .L802778D0
/* 1A61AC 802778CC 0000202D */ daddu $a0, $zero, $zero
.L802778D0:
/* 1A61B0 802778D0 A66001FA */ sh $zero, 0x1FA($s3)
/* 1A61B4 802778D4 16C00020 */ bnez $s6, .L80277958
/* 1A61B8 802778D8 02048023 */ subu $s0, $s0, $a0
/* 1A61BC 802778DC 0260202D */ daddu $a0, $s3, $zero
/* 1A61C0 802778E0 0C099CAB */ jal player_team_is_ability_active
/* 1A61C4 802778E4 24050007 */ addiu $a1, $zero, 0x7
/* 1A61C8 802778E8 10400006 */ beqz $v0, .L80277904
/* 1A61CC 802778EC 0260202D */ daddu $a0, $s3, $zero
/* 1A61D0 802778F0 8E820188 */ lw $v0, 0x188($s4)
/* 1A61D4 802778F4 30420002 */ andi $v0, $v0, 0x2
/* 1A61D8 802778F8 54400002 */ bnel $v0, $zero, .L80277904
/* 1A61DC 802778FC 2610FFFF */ addiu $s0, $s0, -0x1
/* 1A61E0 80277900 0260202D */ daddu $a0, $s3, $zero
.L80277904:
/* 1A61E4 80277904 0C099CAB */ jal player_team_is_ability_active
/* 1A61E8 80277908 2405001B */ addiu $a1, $zero, 0x1B
/* 1A61EC 8027790C 02028023 */ subu $s0, $s0, $v0
/* 1A61F0 80277910 0260202D */ daddu $a0, $s3, $zero
/* 1A61F4 80277914 0C099CAB */ jal player_team_is_ability_active
/* 1A61F8 80277918 24050025 */ addiu $a1, $zero, 0x25
/* 1A61FC 8027791C 02028023 */ subu $s0, $s0, $v0
/* 1A6200 80277920 0260202D */ daddu $a0, $s3, $zero
/* 1A6204 80277924 0C099CAB */ jal player_team_is_ability_active
/* 1A6208 80277928 24050022 */ addiu $a1, $zero, 0x22
/* 1A620C 8027792C 826301B8 */ lb $v1, 0x1B8($s3)
/* 1A6210 80277930 28630006 */ slti $v1, $v1, 0x6
/* 1A6214 80277934 10600008 */ beqz $v1, .L80277958
/* 1A6218 80277938 02028021 */ addu $s0, $s0, $v0
/* 1A621C 8027793C 0260202D */ daddu $a0, $s3, $zero
/* 1A6220 80277940 0C099CAB */ jal player_team_is_ability_active
/* 1A6224 80277944 24050020 */ addiu $a1, $zero, 0x20
/* 1A6228 80277948 10400003 */ beqz $v0, .L80277958
/* 1A622C 8027794C 001017C2 */ srl $v0, $s0, 31
/* 1A6230 80277950 02021021 */ addu $v0, $s0, $v0
/* 1A6234 80277954 00028043 */ sra $s0, $v0, 1
.L80277958:
/* 1A6238 80277958 12C00005 */ beqz $s6, .L80277970
/* 1A623C 8027795C 24020100 */ addiu $v0, $zero, 0x100
/* 1A6240 80277960 12C20021 */ beq $s6, $v0, .L802779E8
/* 1A6244 80277964 00000000 */ nop
/* 1A6248 80277968 0809DEA0 */ j .L80277A80
/* 1A624C 8027796C 00000000 */ nop
.L80277970:
/* 1A6250 80277970 82620210 */ lb $v0, 0x210($s3)
/* 1A6254 80277974 10400003 */ beqz $v0, .L80277984
/* 1A6258 80277978 28420009 */ slti $v0, $v0, 0x9
/* 1A625C 8027797C 14400040 */ bnez $v0, .L80277A80
/* 1A6260 80277980 00000000 */ nop
.L80277984:
/* 1A6264 80277984 82620214 */ lb $v0, 0x214($s3)
/* 1A6268 80277988 1440003D */ bnez $v0, .L80277A80
/* 1A626C 8027798C 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 1A6270 80277990 8E820188 */ lw $v0, 0x188($s4)
/* 1A6274 80277994 00431024 */ and $v0, $v0, $v1
/* 1A6278 80277998 14400039 */ bnez $v0, .L80277A80
/* 1A627C 8027799C 00000000 */ nop
/* 1A6280 802779A0 0260202D */ daddu $a0, $s3, $zero
/* 1A6284 802779A4 0C099CAB */ jal player_team_is_ability_active
/* 1A6288 802779A8 24050015 */ addiu $a1, $zero, 0x15
/* 1A628C 802779AC 10400005 */ beqz $v0, .L802779C4
/* 1A6290 802779B0 00000000 */ nop
/* 1A6294 802779B4 0C00A67F */ jal rand_int
/* 1A6298 802779B8 24040001 */ addiu $a0, $zero, 0x1
/* 1A629C 802779BC 0809DE73 */ j .L802779CC
/* 1A62A0 802779C0 00000000 */ nop
.L802779C4:
/* 1A62A4 802779C4 0C09A3B3 */ jal check_block_input
/* 1A62A8 802779C8 34048000 */ ori $a0, $zero, 0x8000
.L802779CC:
/* 1A62AC 802779CC 1040002A */ beqz $v0, .L80277A78
/* 1A62B0 802779D0 0260202D */ daddu $a0, $s3, $zero
/* 1A62B4 802779D4 2610FFFF */ addiu $s0, $s0, -0x1
/* 1A62B8 802779D8 0C099CAB */ jal player_team_is_ability_active
/* 1A62BC 802779DC 24050033 */ addiu $a1, $zero, 0x33
/* 1A62C0 802779E0 0809DE89 */ j .L80277A24
/* 1A62C4 802779E4 02028023 */ subu $s0, $s0, $v0
.L802779E8:
/* 1A62C8 802779E8 82620214 */ lb $v0, 0x214($s3)
/* 1A62CC 802779EC 14400024 */ bnez $v0, .L80277A80
/* 1A62D0 802779F0 00000000 */ nop
/* 1A62D4 802779F4 82620216 */ lb $v0, 0x216($s3)
/* 1A62D8 802779F8 14400021 */ bnez $v0, .L80277A80
/* 1A62DC 802779FC 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 1A62E0 80277A00 8E820188 */ lw $v0, 0x188($s4)
/* 1A62E4 80277A04 00431024 */ and $v0, $v0, $v1
/* 1A62E8 80277A08 1440001D */ bnez $v0, .L80277A80
/* 1A62EC 80277A0C 00000000 */ nop
/* 1A62F0 80277A10 0C09A3B3 */ jal check_block_input
/* 1A62F4 80277A14 34048000 */ ori $a0, $zero, 0x8000
/* 1A62F8 80277A18 10400017 */ beqz $v0, .L80277A78
/* 1A62FC 80277A1C 00000000 */ nop
/* 1A6300 80277A20 0000802D */ daddu $s0, $zero, $zero
.L80277A24:
/* 1A6304 80277A24 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6308 80277A28 24040231 */ addiu $a0, $zero, 0x231
/* 1A630C 80277A2C E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A6310 80277A30 8E26000C */ lw $a2, 0xC($s1)
/* 1A6314 80277A34 8E270010 */ lw $a3, 0x10($s1)
/* 1A6318 80277A38 0C052757 */ jal sfx_play_sound_at_position
/* 1A631C 80277A3C 0000282D */ daddu $a1, $zero, $zero
/* 1A6320 80277A40 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6324 80277A44 0000202D */ daddu $a0, $zero, $zero
/* 1A6328 80277A48 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A632C 80277A4C 8E26000C */ lw $a2, 0xC($s1)
/* 1A6330 80277A50 8E270010 */ lw $a3, 0x10($s1)
/* 1A6334 80277A54 0C0999FC */ jal show_action_rating
/* 1A6338 80277A58 0260282D */ daddu $a1, $s3, $zero
/* 1A633C 80277A5C 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 1A6340 80277A60 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 1A6344 80277A64 8C820000 */ lw $v0, 0x0($a0)
/* 1A6348 80277A68 3C038000 */ lui $v1, (0x80000000 >> 16)
/* 1A634C 80277A6C 00431025 */ or $v0, $v0, $v1
/* 1A6350 80277A70 0809DEA0 */ j .L80277A80
/* 1A6354 80277A74 AC820000 */ sw $v0, 0x0($a0)
.L80277A78:
/* 1A6358 80277A78 0C099A5C */ jal func_80266970
/* 1A635C 80277A7C 0260202D */ daddu $a0, $s3, $zero
.L80277A80:
/* 1A6360 80277A80 3C1E800E */ lui $fp, %hi(gBattleStatus)
/* 1A6364 80277A84 27DEC070 */ addiu $fp, $fp, %lo(gBattleStatus)
/* 1A6368 80277A88 8FC20000 */ lw $v0, 0x0($fp)
/* 1A636C 80277A8C 30420020 */ andi $v0, $v0, 0x20
/* 1A6370 80277A90 10400003 */ beqz $v0, .L80277AA0
/* 1A6374 80277A94 00000000 */ nop
/* 1A6378 80277A98 0C099A5C */ jal func_80266970
/* 1A637C 80277A9C 0260202D */ daddu $a0, $s3, $zero
.L80277AA0:
/* 1A6380 80277AA0 1E000011 */ bgtz $s0, .L80277AE8
/* 1A6384 80277AA4 24120009 */ addiu $s2, $zero, 0x9
/* 1A6388 80277AA8 A66001FA */ sh $zero, 0x1FA($s3)
/* 1A638C 80277AAC 8E820188 */ lw $v0, 0x188($s4)
/* 1A6390 80277AB0 3C034000 */ lui $v1, (0x40000000 >> 16)
/* 1A6394 80277AB4 00431024 */ and $v0, $v0, $v1
/* 1A6398 80277AB8 14400004 */ bnez $v0, .L80277ACC
/* 1A639C 80277ABC 24080002 */ addiu $t0, $zero, 0x2
/* 1A63A0 80277AC0 AFA8001C */ sw $t0, 0x1C($sp)
/* 1A63A4 80277AC4 0809DEB8 */ j .L80277AE0
/* 1A63A8 80277AC8 24120017 */ addiu $s2, $zero, 0x17
.L80277ACC:
/* 1A63AC 80277ACC AFA8001C */ sw $t0, 0x1C($sp)
/* 1A63B0 80277AD0 826201B8 */ lb $v0, 0x1B8($s3)
/* 1A63B4 80277AD4 1C400002 */ bgtz $v0, .L80277AE0
/* 1A63B8 80277AD8 24120017 */ addiu $s2, $zero, 0x17
/* 1A63BC 80277ADC 24120020 */ addiu $s2, $zero, 0x20
.L80277AE0:
/* 1A63C0 80277AE0 0809DEE3 */ j .L80277B8C
/* 1A63C4 80277AE4 A6800180 */ sh $zero, 0x180($s4)
.L80277AE8:
/* 1A63C8 80277AE8 966201FC */ lhu $v0, 0x1FC($s3)
/* 1A63CC 80277AEC 966301FA */ lhu $v1, 0x1FA($s3)
/* 1A63D0 80277AF0 00501021 */ addu $v0, $v0, $s0
/* 1A63D4 80277AF4 00701823 */ subu $v1, $v1, $s0
/* 1A63D8 80277AF8 A66201FC */ sh $v0, 0x1FC($s3)
/* 1A63DC 80277AFC A66301FA */ sh $v1, 0x1FA($s3)
/* 1A63E0 80277B00 A6800180 */ sh $zero, 0x180($s4)
/* 1A63E4 80277B04 8FA80018 */ lw $t0, 0x18($sp)
/* 1A63E8 80277B08 8D020000 */ lw $v0, 0x0($t0)
/* 1A63EC 80277B0C 30422000 */ andi $v0, $v0, 0x2000
/* 1A63F0 80277B10 14400012 */ bnez $v0, .L80277B5C
/* 1A63F4 80277B14 AFA0001C */ sw $zero, 0x1C($sp)
/* 1A63F8 80277B18 8FC20000 */ lw $v0, 0x0($fp)
/* 1A63FC 80277B1C 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 1A6400 80277B20 00431024 */ and $v0, $v0, $v1
/* 1A6404 80277B24 1440000D */ bnez $v0, .L80277B5C
/* 1A6408 80277B28 3C030040 */ lui $v1, (0x400000 >> 16)
/* 1A640C 80277B2C 8E620000 */ lw $v0, 0x0($s3)
/* 1A6410 80277B30 00431024 */ and $v0, $v0, $v1
/* 1A6414 80277B34 14400004 */ bnez $v0, .L80277B48
/* 1A6418 80277B38 00000000 */ nop
/* 1A641C 80277B3C 926201B8 */ lbu $v0, 0x1B8($s3)
/* 1A6420 80277B40 00501023 */ subu $v0, $v0, $s0
/* 1A6424 80277B44 A26201B8 */ sb $v0, 0x1B8($s3)
.L80277B48:
/* 1A6428 80277B48 826201B8 */ lb $v0, 0x1B8($s3)
/* 1A642C 80277B4C 1C400003 */ bgtz $v0, .L80277B5C
/* 1A6430 80277B50 00000000 */ nop
/* 1A6434 80277B54 A26001B8 */ sb $zero, 0x1B8($s3)
/* 1A6438 80277B58 24120020 */ addiu $s2, $zero, 0x20
.L80277B5C:
/* 1A643C 80277B5C 96820180 */ lhu $v0, 0x180($s4)
/* 1A6440 80277B60 00501021 */ addu $v0, $v0, $s0
/* 1A6444 80277B64 A6820180 */ sh $v0, 0x180($s4)
/* 1A6448 80277B68 A66201F8 */ sh $v0, 0x1F8($s3)
/* 1A644C 80277B6C 16C00007 */ bnez $s6, .L80277B8C
/* 1A6450 80277B70 A66001FA */ sh $zero, 0x1FA($s3)
/* 1A6454 80277B74 9282007B */ lbu $v0, 0x7B($s4)
/* 1A6458 80277B78 00501021 */ addu $v0, $v0, $s0
/* 1A645C 80277B7C A282007B */ sb $v0, 0x7B($s4)
/* 1A6460 80277B80 926201B8 */ lbu $v0, 0x1B8($s3)
/* 1A6464 80277B84 3C018011 */ lui $at, %hi(gPlayerData + 0x2)
/* 1A6468 80277B88 A022F292 */ sb $v0, %lo(gPlayerData + 0x2)($at)
.L80277B8C:
/* 1A646C 80277B8C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A6470 80277B90 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A6474 80277B94 30420020 */ andi $v0, $v0, 0x20
/* 1A6478 80277B98 1040000D */ beqz $v0, .L80277BD0
/* 1A647C 80277B9C 24020009 */ addiu $v0, $zero, 0x9
/* 1A6480 80277BA0 52420001 */ beql $s2, $v0, .L80277BA8
/* 1A6484 80277BA4 2412000A */ addiu $s2, $zero, 0xA
.L80277BA8:
/* 1A6488 80277BA8 24020017 */ addiu $v0, $zero, 0x17
/* 1A648C 80277BAC 52420001 */ beql $s2, $v0, .L80277BB4
/* 1A6490 80277BB0 24120019 */ addiu $s2, $zero, 0x19
.L80277BB4:
/* 1A6494 80277BB4 826201B8 */ lb $v0, 0x1B8($s3)
/* 1A6498 80277BB8 1C400008 */ bgtz $v0, .L80277BDC
/* 1A649C 80277BBC 24020019 */ addiu $v0, $zero, 0x19
/* 1A64A0 80277BC0 52420006 */ beql $s2, $v0, .L80277BDC
/* 1A64A4 80277BC4 24120020 */ addiu $s2, $zero, 0x20
/* 1A64A8 80277BC8 0809DEF7 */ j .L80277BDC
/* 1A64AC 80277BCC 00000000 */ nop
.L80277BD0:
/* 1A64B0 80277BD0 24020020 */ addiu $v0, $zero, 0x20
/* 1A64B4 80277BD4 52420001 */ beql $s2, $v0, .L80277BDC
/* 1A64B8 80277BD8 24120009 */ addiu $s2, $zero, 0x9
.L80277BDC:
/* 1A64BC 80277BDC 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 1A64C0 80277BE0 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 1A64C4 80277BE4 8E020000 */ lw $v0, 0x0($s0)
/* 1A64C8 80277BE8 30420020 */ andi $v0, $v0, 0x20
/* 1A64CC 80277BEC 14400007 */ bnez $v0, .L80277C0C
/* 1A64D0 80277BF0 00000000 */ nop
/* 1A64D4 80277BF4 0C099B85 */ jal clear_part_pal_adjustment
/* 1A64D8 80277BF8 8FA40018 */ lw $a0, 0x18($sp)
/* 1A64DC 80277BFC 8E020000 */ lw $v0, 0x0($s0)
/* 1A64E0 80277C00 30420020 */ andi $v0, $v0, 0x20
/* 1A64E4 80277C04 10400014 */ beqz $v0, .L80277C58
/* 1A64E8 80277C08 00000000 */ nop
.L80277C0C:
/* 1A64EC 80277C0C 8E820188 */ lw $v0, 0x188($s4)
/* 1A64F0 80277C10 30420C80 */ andi $v0, $v0, 0xC80
/* 1A64F4 80277C14 1040000B */ beqz $v0, .L80277C44
/* 1A64F8 80277C18 00000000 */ nop
/* 1A64FC 80277C1C 8FA80018 */ lw $t0, 0x18($sp)
/* 1A6500 80277C20 8D02007C */ lw $v0, 0x7C($t0)
/* 1A6504 80277C24 30421000 */ andi $v0, $v0, 0x1000
/* 1A6508 80277C28 10400006 */ beqz $v0, .L80277C44
/* 1A650C 80277C2C 2402000A */ addiu $v0, $zero, 0xA
/* 1A6510 80277C30 52420001 */ beql $s2, $v0, .L80277C38
/* 1A6514 80277C34 2412000D */ addiu $s2, $zero, 0xD
.L80277C38:
/* 1A6518 80277C38 24020019 */ addiu $v0, $zero, 0x19
/* 1A651C 80277C3C 52420001 */ beql $s2, $v0, .L80277C44
/* 1A6520 80277C40 2412000D */ addiu $s2, $zero, 0xD
.L80277C44:
/* 1A6524 80277C44 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A6528 80277C48 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A652C 80277C4C 30420020 */ andi $v0, $v0, 0x20
/* 1A6530 80277C50 14400014 */ bnez $v0, .L80277CA4
/* 1A6534 80277C54 00000000 */ nop
.L80277C58:
/* 1A6538 80277C58 8E820188 */ lw $v0, 0x188($s4)
/* 1A653C 80277C5C 30420C80 */ andi $v0, $v0, 0xC80
/* 1A6540 80277C60 1040000B */ beqz $v0, .L80277C90
/* 1A6544 80277C64 00000000 */ nop
/* 1A6548 80277C68 8FA80018 */ lw $t0, 0x18($sp)
/* 1A654C 80277C6C 8D02007C */ lw $v0, 0x7C($t0)
/* 1A6550 80277C70 30421000 */ andi $v0, $v0, 0x1000
/* 1A6554 80277C74 10400006 */ beqz $v0, .L80277C90
/* 1A6558 80277C78 24020009 */ addiu $v0, $zero, 0x9
/* 1A655C 80277C7C 52420001 */ beql $s2, $v0, .L80277C84
/* 1A6560 80277C80 2412000D */ addiu $s2, $zero, 0xD
.L80277C84:
/* 1A6564 80277C84 24020017 */ addiu $v0, $zero, 0x17
/* 1A6568 80277C88 52420001 */ beql $s2, $v0, .L80277C90
/* 1A656C 80277C8C 2412000D */ addiu $s2, $zero, 0xD
.L80277C90:
/* 1A6570 80277C90 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A6574 80277C94 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A6578 80277C98 30420020 */ andi $v0, $v0, 0x20
/* 1A657C 80277C9C 1040000C */ beqz $v0, .L80277CD0
/* 1A6580 80277CA0 00000000 */ nop
.L80277CA4:
/* 1A6584 80277CA4 8E820188 */ lw $v0, 0x188($s4)
/* 1A6588 80277CA8 30424202 */ andi $v0, $v0, 0x4202
/* 1A658C 80277CAC 10400008 */ beqz $v0, .L80277CD0
/* 1A6590 80277CB0 2402000A */ addiu $v0, $zero, 0xA
/* 1A6594 80277CB4 52420001 */ beql $s2, $v0, .L80277CBC
/* 1A6598 80277CB8 2412000E */ addiu $s2, $zero, 0xE
.L80277CBC:
/* 1A659C 80277CBC 24020020 */ addiu $v0, $zero, 0x20
/* 1A65A0 80277CC0 52420001 */ beql $s2, $v0, .L80277CC8
/* 1A65A4 80277CC4 24120029 */ addiu $s2, $zero, 0x29
.L80277CC8:
/* 1A65A8 80277CC8 24080001 */ addiu $t0, $zero, 0x1
/* 1A65AC 80277CCC AFA80020 */ sw $t0, 0x20($sp)
.L80277CD0:
/* 1A65B0 80277CD0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A65B4 80277CD4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A65B8 80277CD8 0441000F */ bgez $v0, .L80277D18
/* 1A65BC 80277CDC 24020009 */ addiu $v0, $zero, 0x9
/* 1A65C0 80277CE0 52420001 */ beql $s2, $v0, .L80277CE8
/* 1A65C4 80277CE4 24120018 */ addiu $s2, $zero, 0x18
.L80277CE8:
/* 1A65C8 80277CE8 2402000A */ addiu $v0, $zero, 0xA
/* 1A65CC 80277CEC 52420001 */ beql $s2, $v0, .L80277CF4
/* 1A65D0 80277CF0 2412001A */ addiu $s2, $zero, 0x1A
.L80277CF4:
/* 1A65D4 80277CF4 24020017 */ addiu $v0, $zero, 0x17
/* 1A65D8 80277CF8 52420001 */ beql $s2, $v0, .L80277D00
/* 1A65DC 80277CFC 24120018 */ addiu $s2, $zero, 0x18
.L80277D00:
/* 1A65E0 80277D00 24020019 */ addiu $v0, $zero, 0x19
/* 1A65E4 80277D04 52420001 */ beql $s2, $v0, .L80277D0C
/* 1A65E8 80277D08 2412001A */ addiu $s2, $zero, 0x1A
.L80277D0C:
/* 1A65EC 80277D0C 2402000E */ addiu $v0, $zero, 0xE
/* 1A65F0 80277D10 52420001 */ beql $s2, $v0, .L80277D18
/* 1A65F4 80277D14 2412001A */ addiu $s2, $zero, 0x1A
.L80277D18:
/* 1A65F8 80277D18 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 1A65FC 80277D1C 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 1A6600 80277D20 8C830000 */ lw $v1, 0x0($a0)
/* 1A6604 80277D24 30620020 */ andi $v0, $v1, 0x20
/* 1A6608 80277D28 104000B2 */ beqz $v0, .L80277FF4
/* 1A660C 80277D2C 24020100 */ addiu $v0, $zero, 0x100
/* 1A6610 80277D30 86820180 */ lh $v0, 0x180($s4)
/* 1A6614 80277D34 044000AE */ bltz $v0, .L80277FF0
/* 1A6618 80277D38 24020020 */ addiu $v0, $zero, 0x20
/* 1A661C 80277D3C 124200AC */ beq $s2, $v0, .L80277FF0
/* 1A6620 80277D40 24020021 */ addiu $v0, $zero, 0x21
/* 1A6624 80277D44 124200AA */ beq $s2, $v0, .L80277FF0
/* 1A6628 80277D48 24020022 */ addiu $v0, $zero, 0x22
/* 1A662C 80277D4C 124200A9 */ beq $s2, $v0, .L80277FF4
/* 1A6630 80277D50 24020100 */ addiu $v0, $zero, 0x100
/* 1A6634 80277D54 046000A7 */ bltz $v1, .L80277FF4
/* 1A6638 80277D58 3C030100 */ lui $v1, (0x1000000 >> 16)
/* 1A663C 80277D5C 8C820004 */ lw $v0, 0x4($a0)
/* 1A6640 80277D60 00431024 */ and $v0, $v0, $v1
/* 1A6644 80277D64 144000A3 */ bnez $v0, .L80277FF4
/* 1A6648 80277D68 24020100 */ addiu $v0, $zero, 0x100
/* 1A664C 80277D6C 16C0000A */ bnez $s6, .L80277D98
/* 1A6650 80277D70 00000000 */ nop
/* 1A6654 80277D74 0C03A752 */ jal is_ability_active
/* 1A6658 80277D78 24040037 */ addiu $a0, $zero, 0x37
/* 1A665C 80277D7C 10400006 */ beqz $v0, .L80277D98
/* 1A6660 80277D80 00000000 */ nop
/* 1A6664 80277D84 0C00A67F */ jal rand_int
/* 1A6668 80277D88 24040064 */ addiu $a0, $zero, 0x64
/* 1A666C 80277D8C 28420032 */ slti $v0, $v0, 0x32
/* 1A6670 80277D90 14400098 */ bnez $v0, .L80277FF4
/* 1A6674 80277D94 24020100 */ addiu $v0, $zero, 0x100
.L80277D98:
/* 1A6678 80277D98 8E820190 */ lw $v0, 0x190($s4)
/* 1A667C 80277D9C 3C030008 */ lui $v1, (0x80000 >> 16)
/* 1A6680 80277DA0 00431024 */ and $v0, $v0, $v1
/* 1A6684 80277DA4 10400008 */ beqz $v0, .L80277DC8
/* 1A6688 80277DA8 0260202D */ daddu $a0, $s3, $zero
/* 1A668C 80277DAC 2405000A */ addiu $a1, $zero, 0xA
/* 1A6690 80277DB0 0C099ADE */ jal try_inflict_status
/* 1A6694 80277DB4 24060027 */ addiu $a2, $zero, 0x27
/* 1A6698 80277DB8 10400003 */ beqz $v0, .L80277DC8
/* 1A669C 80277DBC 00000000 */ nop
/* 1A66A0 80277DC0 24150001 */ addiu $s5, $zero, 0x1
/* 1A66A4 80277DC4 02A0B82D */ daddu $s7, $s5, $zero
.L80277DC8:
/* 1A66A8 80277DC8 8E820190 */ lw $v0, 0x190($s4)
/* 1A66AC 80277DCC 3C030002 */ lui $v1, (0x20000 >> 16)
/* 1A66B0 80277DD0 00431024 */ and $v0, $v0, $v1
/* 1A66B4 80277DD4 10400008 */ beqz $v0, .L80277DF8
/* 1A66B8 80277DD8 0260202D */ daddu $a0, $s3, $zero
/* 1A66BC 80277DDC 24050009 */ addiu $a1, $zero, 0x9
/* 1A66C0 80277DE0 0C099ADE */ jal try_inflict_status
/* 1A66C4 80277DE4 24060025 */ addiu $a2, $zero, 0x25
/* 1A66C8 80277DE8 10400003 */ beqz $v0, .L80277DF8
/* 1A66CC 80277DEC 00000000 */ nop
/* 1A66D0 80277DF0 24150001 */ addiu $s5, $zero, 0x1
/* 1A66D4 80277DF4 02A0B82D */ daddu $s7, $s5, $zero
.L80277DF8:
/* 1A66D8 80277DF8 8E820190 */ lw $v0, 0x190($s4)
/* 1A66DC 80277DFC 3C030010 */ lui $v1, (0x100000 >> 16)
/* 1A66E0 80277E00 00431024 */ and $v0, $v0, $v1
/* 1A66E4 80277E04 10400008 */ beqz $v0, .L80277E28
/* 1A66E8 80277E08 0260202D */ daddu $a0, $s3, $zero
/* 1A66EC 80277E0C 2405000C */ addiu $a1, $zero, 0xC
/* 1A66F0 80277E10 0C099ADE */ jal try_inflict_status
/* 1A66F4 80277E14 24060028 */ addiu $a2, $zero, 0x28
/* 1A66F8 80277E18 10400003 */ beqz $v0, .L80277E28
/* 1A66FC 80277E1C 00000000 */ nop
/* 1A6700 80277E20 24150001 */ addiu $s5, $zero, 0x1
/* 1A6704 80277E24 02A0B82D */ daddu $s7, $s5, $zero
.L80277E28:
/* 1A6708 80277E28 8E820190 */ lw $v0, 0x190($s4)
/* 1A670C 80277E2C 30421000 */ andi $v0, $v0, 0x1000
/* 1A6710 80277E30 10400008 */ beqz $v0, .L80277E54
/* 1A6714 80277E34 0260202D */ daddu $a0, $s3, $zero
/* 1A6718 80277E38 24050006 */ addiu $a1, $zero, 0x6
/* 1A671C 80277E3C 0C099ADE */ jal try_inflict_status
/* 1A6720 80277E40 24060020 */ addiu $a2, $zero, 0x20
/* 1A6724 80277E44 10400003 */ beqz $v0, .L80277E54
/* 1A6728 80277E48 00000000 */ nop
/* 1A672C 80277E4C 24150001 */ addiu $s5, $zero, 0x1
/* 1A6730 80277E50 02A0B82D */ daddu $s7, $s5, $zero
.L80277E54:
/* 1A6734 80277E54 8E820190 */ lw $v0, 0x190($s4)
/* 1A6738 80277E58 3C030004 */ lui $v1, (0x40000 >> 16)
/* 1A673C 80277E5C 00431024 */ and $v0, $v0, $v1
/* 1A6740 80277E60 10400008 */ beqz $v0, .L80277E84
/* 1A6744 80277E64 0260202D */ daddu $a0, $s3, $zero
/* 1A6748 80277E68 24050004 */ addiu $a1, $zero, 0x4
/* 1A674C 80277E6C 0C099ADE */ jal try_inflict_status
/* 1A6750 80277E70 24060024 */ addiu $a2, $zero, 0x24
/* 1A6754 80277E74 10400003 */ beqz $v0, .L80277E84
/* 1A6758 80277E78 00000000 */ nop
/* 1A675C 80277E7C 24150001 */ addiu $s5, $zero, 0x1
/* 1A6760 80277E80 02A0B82D */ daddu $s7, $s5, $zero
.L80277E84:
/* 1A6764 80277E84 8E820190 */ lw $v0, 0x190($s4)
/* 1A6768 80277E88 3C030020 */ lui $v1, (0x200000 >> 16)
/* 1A676C 80277E8C 00431024 */ and $v0, $v0, $v1
/* 1A6770 80277E90 10400008 */ beqz $v0, .L80277EB4
/* 1A6774 80277E94 0260202D */ daddu $a0, $s3, $zero
/* 1A6778 80277E98 24050008 */ addiu $a1, $zero, 0x8
/* 1A677C 80277E9C 0C099ADE */ jal try_inflict_status
/* 1A6780 80277EA0 24060029 */ addiu $a2, $zero, 0x29
/* 1A6784 80277EA4 10400003 */ beqz $v0, .L80277EB4
/* 1A6788 80277EA8 00000000 */ nop
/* 1A678C 80277EAC 24150001 */ addiu $s5, $zero, 0x1
/* 1A6790 80277EB0 02A0B82D */ daddu $s7, $s5, $zero
.L80277EB4:
/* 1A6794 80277EB4 8E820190 */ lw $v0, 0x190($s4)
/* 1A6798 80277EB8 30422000 */ andi $v0, $v0, 0x2000
/* 1A679C 80277EBC 10400008 */ beqz $v0, .L80277EE0
/* 1A67A0 80277EC0 0260202D */ daddu $a0, $s3, $zero
/* 1A67A4 80277EC4 2405000B */ addiu $a1, $zero, 0xB
/* 1A67A8 80277EC8 0C099ADE */ jal try_inflict_status
/* 1A67AC 80277ECC 24060021 */ addiu $a2, $zero, 0x21
/* 1A67B0 80277ED0 10400003 */ beqz $v0, .L80277EE0
/* 1A67B4 80277ED4 00000000 */ nop
/* 1A67B8 80277ED8 24150001 */ addiu $s5, $zero, 0x1
/* 1A67BC 80277EDC 02A0B82D */ daddu $s7, $s5, $zero
.L80277EE0:
/* 1A67C0 80277EE0 8E820190 */ lw $v0, 0x190($s4)
/* 1A67C4 80277EE4 3C030001 */ lui $v1, (0x10000 >> 16)
/* 1A67C8 80277EE8 00431024 */ and $v0, $v0, $v1
/* 1A67CC 80277EEC 10400008 */ beqz $v0, .L80277F10
/* 1A67D0 80277EF0 0260202D */ daddu $a0, $s3, $zero
/* 1A67D4 80277EF4 24050005 */ addiu $a1, $zero, 0x5
/* 1A67D8 80277EF8 0C099ADE */ jal try_inflict_status
/* 1A67DC 80277EFC 24060026 */ addiu $a2, $zero, 0x26
/* 1A67E0 80277F00 10400003 */ beqz $v0, .L80277F10
/* 1A67E4 80277F04 00000000 */ nop
/* 1A67E8 80277F08 24150001 */ addiu $s5, $zero, 0x1
/* 1A67EC 80277F0C 02A0B82D */ daddu $s7, $s5, $zero
.L80277F10:
/* 1A67F0 80277F10 8E820190 */ lw $v0, 0x190($s4)
/* 1A67F4 80277F14 30428000 */ andi $v0, $v0, 0x8000
/* 1A67F8 80277F18 10400008 */ beqz $v0, .L80277F3C
/* 1A67FC 80277F1C 0260202D */ daddu $a0, $s3, $zero
/* 1A6800 80277F20 24050003 */ addiu $a1, $zero, 0x3
/* 1A6804 80277F24 0C099ADE */ jal try_inflict_status
/* 1A6808 80277F28 24060023 */ addiu $a2, $zero, 0x23
/* 1A680C 80277F2C 10400003 */ beqz $v0, .L80277F3C
/* 1A6810 80277F30 00000000 */ nop
/* 1A6814 80277F34 24150001 */ addiu $s5, $zero, 0x1
/* 1A6818 80277F38 02A0B82D */ daddu $s7, $s5, $zero
.L80277F3C:
/* 1A681C 80277F3C 8E820190 */ lw $v0, 0x190($s4)
/* 1A6820 80277F40 3C030001 */ lui $v1, (0x10000 >> 16)
/* 1A6824 80277F44 00431024 */ and $v0, $v0, $v1
/* 1A6828 80277F48 10400008 */ beqz $v0, .L80277F6C
/* 1A682C 80277F4C 0260202D */ daddu $a0, $s3, $zero
/* 1A6830 80277F50 24050005 */ addiu $a1, $zero, 0x5
/* 1A6834 80277F54 0C099ADE */ jal try_inflict_status
/* 1A6838 80277F58 24060026 */ addiu $a2, $zero, 0x26
/* 1A683C 80277F5C 10400003 */ beqz $v0, .L80277F6C
/* 1A6840 80277F60 00000000 */ nop
/* 1A6844 80277F64 24150001 */ addiu $s5, $zero, 0x1
/* 1A6848 80277F68 02A0B82D */ daddu $s7, $s5, $zero
.L80277F6C:
/* 1A684C 80277F6C 8E820190 */ lw $v0, 0x190($s4)
/* 1A6850 80277F70 3C030004 */ lui $v1, (0x40000 >> 16)
/* 1A6854 80277F74 00431024 */ and $v0, $v0, $v1
/* 1A6858 80277F78 10400008 */ beqz $v0, .L80277F9C
/* 1A685C 80277F7C 0260202D */ daddu $a0, $s3, $zero
/* 1A6860 80277F80 24050004 */ addiu $a1, $zero, 0x4
/* 1A6864 80277F84 0C099ADE */ jal try_inflict_status
/* 1A6868 80277F88 24060024 */ addiu $a2, $zero, 0x24
/* 1A686C 80277F8C 10400003 */ beqz $v0, .L80277F9C
/* 1A6870 80277F90 00000000 */ nop
/* 1A6874 80277F94 24150001 */ addiu $s5, $zero, 0x1
/* 1A6878 80277F98 02A0B82D */ daddu $s7, $s5, $zero
.L80277F9C:
/* 1A687C 80277F9C 8E820190 */ lw $v0, 0x190($s4)
/* 1A6880 80277FA0 30424000 */ andi $v0, $v0, 0x4000
/* 1A6884 80277FA4 1040000B */ beqz $v0, .L80277FD4
/* 1A6888 80277FA8 24020007 */ addiu $v0, $zero, 0x7
/* 1A688C 80277FAC 82630210 */ lb $v1, 0x210($s3)
/* 1A6890 80277FB0 10620008 */ beq $v1, $v0, .L80277FD4
/* 1A6894 80277FB4 0260202D */ daddu $a0, $s3, $zero
/* 1A6898 80277FB8 0040282D */ daddu $a1, $v0, $zero
/* 1A689C 80277FBC 0C099ADE */ jal try_inflict_status
/* 1A68A0 80277FC0 24060022 */ addiu $a2, $zero, 0x22
/* 1A68A4 80277FC4 10400003 */ beqz $v0, .L80277FD4
/* 1A68A8 80277FC8 00000000 */ nop
/* 1A68AC 80277FCC 24150001 */ addiu $s5, $zero, 0x1
/* 1A68B0 80277FD0 02A0B82D */ daddu $s7, $s5, $zero
.L80277FD4:
/* 1A68B4 80277FD4 12A00006 */ beqz $s5, .L80277FF0
/* 1A68B8 80277FD8 24020017 */ addiu $v0, $zero, 0x17
/* 1A68BC 80277FDC 52420001 */ beql $s2, $v0, .L80277FE4
/* 1A68C0 80277FE0 24120009 */ addiu $s2, $zero, 0x9
.L80277FE4:
/* 1A68C4 80277FE4 24020019 */ addiu $v0, $zero, 0x19
/* 1A68C8 80277FE8 52420001 */ beql $s2, $v0, .L80277FF0
/* 1A68CC 80277FEC 2412000A */ addiu $s2, $zero, 0xA
.L80277FF0:
/* 1A68D0 80277FF0 24020100 */ addiu $v0, $zero, 0x100
.L80277FF4:
/* 1A68D4 80277FF4 12C20010 */ beq $s6, $v0, .L80278038
/* 1A68D8 80277FF8 A2950199 */ sb $s5, 0x199($s4)
/* 1A68DC 80277FFC 2AC20101 */ slti $v0, $s6, 0x101
/* 1A68E0 80278000 10400005 */ beqz $v0, .L80278018
/* 1A68E4 80278004 24020200 */ addiu $v0, $zero, 0x200
/* 1A68E8 80278008 12C00007 */ beqz $s6, .L80278028
/* 1A68EC 8027800C 24020100 */ addiu $v0, $zero, 0x100
/* 1A68F0 80278010 0809E016 */ j .L80278058
/* 1A68F4 80278014 00000000 */ nop
.L80278018:
/* 1A68F8 80278018 12C2000B */ beq $s6, $v0, .L80278048
/* 1A68FC 8027801C 24020100 */ addiu $v0, $zero, 0x100
/* 1A6900 80278020 0809E016 */ j .L80278058
/* 1A6904 80278024 00000000 */ nop
.L80278028:
/* 1A6908 80278028 0C09C596 */ jal dispatch_event_player
/* 1A690C 8027802C 0240202D */ daddu $a0, $s2, $zero
/* 1A6910 80278030 0809E016 */ j .L80278058
/* 1A6914 80278034 24020100 */ addiu $v0, $zero, 0x100
.L80278038:
/* 1A6918 80278038 0C09F7A0 */ jal dispatch_event_partner
/* 1A691C 8027803C 0240202D */ daddu $a0, $s2, $zero
/* 1A6920 80278040 0809E016 */ j .L80278058
/* 1A6924 80278044 24020100 */ addiu $v0, $zero, 0x100
.L80278048:
/* 1A6928 80278048 0260202D */ daddu $a0, $s3, $zero
/* 1A692C 8027804C 0C09DC58 */ jal dispatch_event_actor
/* 1A6930 80278050 0240282D */ daddu $a1, $s2, $zero
/* 1A6934 80278054 24020100 */ addiu $v0, $zero, 0x100
.L80278058:
/* 1A6938 80278058 16C2000F */ bne $s6, $v0, .L80278098
/* 1A693C 8027805C 00000000 */ nop
/* 1A6940 80278060 86860180 */ lh $a2, 0x180($s4)
/* 1A6944 80278064 18C0000C */ blez $a2, .L80278098
/* 1A6948 80278068 00000000 */ nop
/* 1A694C 8027806C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A6950 80278070 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A6954 80278074 30420020 */ andi $v0, $v0, 0x20
/* 1A6958 80278078 10400007 */ beqz $v0, .L80278098
/* 1A695C 8027807C 3C030040 */ lui $v1, (0x400000 >> 16)
/* 1A6960 80278080 8E620000 */ lw $v0, 0x0($s3)
/* 1A6964 80278084 00431024 */ and $v0, $v0, $v1
/* 1A6968 80278088 14400003 */ bnez $v0, .L80278098
/* 1A696C 8027808C 0260202D */ daddu $a0, $s3, $zero
/* 1A6970 80278090 0C099895 */ jal inflict_partner_ko
/* 1A6974 80278094 2405000D */ addiu $a1, $zero, 0xD
.L80278098:
/* 1A6978 80278098 8E620000 */ lw $v0, 0x0($s3)
/* 1A697C 8027809C 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 1A6980 802780A0 00431024 */ and $v0, $v0, $v1
/* 1A6984 802780A4 1440004C */ bnez $v0, .L802781D8
/* 1A6988 802780A8 24020100 */ addiu $v0, $zero, 0x100
/* 1A698C 802780AC 12C2000B */ beq $s6, $v0, .L802780DC
/* 1A6990 802780B0 2AC20101 */ slti $v0, $s6, 0x101
/* 1A6994 802780B4 10400005 */ beqz $v0, .L802780CC
/* 1A6998 802780B8 24020200 */ addiu $v0, $zero, 0x200
/* 1A699C 802780BC 12C00007 */ beqz $s6, .L802780DC
/* 1A69A0 802780C0 00000000 */ nop
/* 1A69A4 802780C4 0809E076 */ j .L802781D8
/* 1A69A8 802780C8 00000000 */ nop
.L802780CC:
/* 1A69AC 802780CC 12C2001B */ beq $s6, $v0, .L8027813C
/* 1A69B0 802780D0 00000000 */ nop
/* 1A69B4 802780D4 0809E076 */ j .L802781D8
/* 1A69B8 802780D8 00000000 */ nop
.L802780DC:
/* 1A69BC 802780DC 86870180 */ lh $a3, 0x180($s4)
/* 1A69C0 802780E0 14E00008 */ bnez $a3, .L80278104
/* 1A69C4 802780E4 3C032000 */ lui $v1, (0x20000040 >> 16)
/* 1A69C8 802780E8 16E0003B */ bnez $s7, .L802781D8
/* 1A69CC 802780EC 00000000 */ nop
/* 1A69D0 802780F0 16A00039 */ bnez $s5, .L802781D8
/* 1A69D4 802780F4 24020001 */ addiu $v0, $zero, 0x1
/* 1A69D8 802780F8 AFA20010 */ sw $v0, 0x10($sp)
/* 1A69DC 802780FC 0809E058 */ j .L80278160
/* 1A69E0 80278100 2402FFFD */ addiu $v0, $zero, -0x3
.L80278104:
/* 1A69E4 80278104 8E820188 */ lw $v0, 0x188($s4)
/* 1A69E8 80278108 34630040 */ ori $v1, $v1, (0x20000040 & 0xFFFF)
/* 1A69EC 8027810C 00431024 */ and $v0, $v0, $v1
/* 1A69F0 80278110 10400008 */ beqz $v0, .L80278134
/* 1A69F4 80278114 24020001 */ addiu $v0, $zero, 0x1
/* 1A69F8 80278118 AFA20010 */ sw $v0, 0x10($sp)
/* 1A69FC 8027811C C62C000C */ lwc1 $f12, 0xC($s1)
/* 1A6A00 80278120 C62E0010 */ lwc1 $f14, 0x10($s1)
/* 1A6A04 80278124 0C09996B */ jal show_next_damage_popup
/* 1A6A08 80278128 8E260014 */ lw $a2, 0x14($s1)
/* 1A6A0C 8027812C 0809E06F */ j .L802781BC
/* 1A6A10 80278130 00000000 */ nop
.L80278134:
/* 1A6A14 80278134 0809E06B */ j .L802781AC
/* 1A6A18 80278138 AFA20010 */ sw $v0, 0x10($sp)
.L8027813C:
/* 1A6A1C 8027813C 86870180 */ lh $a3, 0x180($s4)
/* 1A6A20 80278140 14E0000F */ bnez $a3, .L80278180
/* 1A6A24 80278144 3C032000 */ lui $v1, (0x20000040 >> 16)
/* 1A6A28 80278148 16E00023 */ bnez $s7, .L802781D8
/* 1A6A2C 8027814C 00000000 */ nop
/* 1A6A30 80278150 16A00021 */ bnez $s5, .L802781D8
/* 1A6A34 80278154 24020001 */ addiu $v0, $zero, 0x1
/* 1A6A38 80278158 AFA20010 */ sw $v0, 0x10($sp)
/* 1A6A3C 8027815C 24020003 */ addiu $v0, $zero, 0x3
.L80278160:
/* 1A6A40 80278160 AFA20014 */ sw $v0, 0x14($sp)
/* 1A6A44 80278164 C62C000C */ lwc1 $f12, 0xC($s1)
/* 1A6A48 80278168 C62E0010 */ lwc1 $f14, 0x10($s1)
/* 1A6A4C 8027816C 8E260014 */ lw $a2, 0x14($s1)
/* 1A6A50 80278170 0C093BF8 */ jal func_8024EFE0
/* 1A6A54 80278174 0000382D */ daddu $a3, $zero, $zero
/* 1A6A58 80278178 0809E076 */ j .L802781D8
/* 1A6A5C 8027817C 00000000 */ nop
.L80278180:
/* 1A6A60 80278180 8E820188 */ lw $v0, 0x188($s4)
/* 1A6A64 80278184 34630040 */ ori $v1, $v1, (0x20000040 & 0xFFFF)
/* 1A6A68 80278188 00431024 */ and $v0, $v0, $v1
/* 1A6A6C 8027818C 10400007 */ beqz $v0, .L802781AC
/* 1A6A70 80278190 AFA00010 */ sw $zero, 0x10($sp)
/* 1A6A74 80278194 C62C000C */ lwc1 $f12, 0xC($s1)
/* 1A6A78 80278198 C62E0010 */ lwc1 $f14, 0x10($s1)
/* 1A6A7C 8027819C 0C09996B */ jal show_next_damage_popup
/* 1A6A80 802781A0 8E260014 */ lw $a2, 0x14($s1)
/* 1A6A84 802781A4 0809E06F */ j .L802781BC
/* 1A6A88 802781A8 00000000 */ nop
.L802781AC:
/* 1A6A8C 802781AC C62C000C */ lwc1 $f12, 0xC($s1)
/* 1A6A90 802781B0 C62E0010 */ lwc1 $f14, 0x10($s1)
/* 1A6A94 802781B4 0C099937 */ jal show_primary_damage_popup
/* 1A6A98 802781B8 8E260014 */ lw $a2, 0x14($s1)
.L802781BC:
/* 1A6A9C 802781BC 86820180 */ lh $v0, 0x180($s4)
/* 1A6AA0 802781C0 AFA20010 */ sw $v0, 0x10($sp)
/* 1A6AA4 802781C4 8E25000C */ lw $a1, 0xC($s1)
/* 1A6AA8 802781C8 8E260010 */ lw $a2, 0x10($s1)
/* 1A6AAC 802781CC 8E270014 */ lw $a3, 0x14($s1)
/* 1A6AB0 802781D0 0C0999B9 */ jal show_damage_fx
/* 1A6AB4 802781D4 0260202D */ daddu $a0, $s3, $zero
.L802781D8:
/* 1A6AB8 802781D8 86820180 */ lh $v0, 0x180($s4)
/* 1A6ABC 802781DC 1840001F */ blez $v0, .L8027825C
/* 1A6AC0 802781E0 00000000 */ nop
/* 1A6AC4 802781E4 0260202D */ daddu $a0, $s3, $zero
/* 1A6AC8 802781E8 0C099C06 */ jal func_80267018
/* 1A6ACC 802781EC 24050001 */ addiu $a1, $zero, 0x1
/* 1A6AD0 802781F0 8FA80058 */ lw $t0, 0x58($sp)
/* 1A6AD4 802781F4 8D0201B0 */ lw $v0, 0x1B0($t0)
/* 1A6AD8 802781F8 10400008 */ beqz $v0, .L8027821C
/* 1A6ADC 802781FC 00000000 */ nop
/* 1A6AE0 80278200 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6AE4 80278204 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A6AE8 80278208 8D0401B0 */ lw $a0, 0x1B0($t0)
/* 1A6AEC 8027820C 8E26000C */ lw $a2, 0xC($s1)
/* 1A6AF0 80278210 8E270010 */ lw $a3, 0x10($s1)
/* 1A6AF4 80278214 0C052757 */ jal sfx_play_sound_at_position
/* 1A6AF8 80278218 0000282D */ daddu $a1, $zero, $zero
.L8027821C:
/* 1A6AFC 8027821C 8FA80020 */ lw $t0, 0x20($sp)
/* 1A6B00 80278220 15000005 */ bnez $t0, .L80278238
/* 1A6B04 80278224 24020003 */ addiu $v0, $zero, 0x3
/* 1A6B08 80278228 8FA80024 */ lw $t0, 0x24($sp)
/* 1A6B0C 8027822C 15000002 */ bnez $t0, .L80278238
/* 1A6B10 80278230 24020005 */ addiu $v0, $zero, 0x5
/* 1A6B14 80278234 24020002 */ addiu $v0, $zero, 0x2
.L80278238:
/* 1A6B18 80278238 AFA20010 */ sw $v0, 0x10($sp)
/* 1A6B1C 8027823C 8E25000C */ lw $a1, 0xC($s1)
/* 1A6B20 80278240 8E260010 */ lw $a2, 0x10($s1)
/* 1A6B24 80278244 8E270014 */ lw $a3, 0x14($s1)
/* 1A6B28 80278248 0C09DC01 */ jal play_hit_sound
/* 1A6B2C 8027824C 0260202D */ daddu $a0, $s3, $zero
/* 1A6B30 80278250 86820180 */ lh $v0, 0x180($s4)
/* 1A6B34 80278254 1C400006 */ bgtz $v0, .L80278270
/* 1A6B38 80278258 00000000 */ nop
.L8027825C:
/* 1A6B3C 8027825C 16E00004 */ bnez $s7, .L80278270
/* 1A6B40 80278260 00000000 */ nop
/* 1A6B44 80278264 8FA80028 */ lw $t0, 0x28($sp)
/* 1A6B48 80278268 11000006 */ beqz $t0, .L80278284
/* 1A6B4C 8027826C 00000000 */ nop
.L80278270:
/* 1A6B50 80278270 8FA80018 */ lw $t0, 0x18($sp)
/* 1A6B54 80278274 8D020000 */ lw $v0, 0x0($t0)
/* 1A6B58 80278278 30422000 */ andi $v0, $v0, 0x2000
/* 1A6B5C 8027827C 10400008 */ beqz $v0, .L802782A0
/* 1A6B60 80278280 00000000 */ nop
.L80278284:
/* 1A6B64 80278284 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6B68 80278288 2404010C */ addiu $a0, $zero, 0x10C
/* 1A6B6C 8027828C E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A6B70 80278290 8E26000C */ lw $a2, 0xC($s1)
/* 1A6B74 80278294 8E270010 */ lw $a3, 0x10($s1)
/* 1A6B78 80278298 0C052757 */ jal sfx_play_sound_at_position
/* 1A6B7C 8027829C 0000282D */ daddu $a1, $zero, $zero
.L802782A0:
/* 1A6B80 802782A0 8E820190 */ lw $v0, 0x190($s4)
/* 1A6B84 802782A4 30421000 */ andi $v0, $v0, 0x1000
/* 1A6B88 802782A8 10400018 */ beqz $v0, .L8027830C
/* 1A6B8C 802782AC 00000000 */ nop
/* 1A6B90 802782B0 12A00016 */ beqz $s5, .L8027830C
/* 1A6B94 802782B4 00000000 */ nop
/* 1A6B98 802782B8 3C048029 */ lui $a0, %hi(EVS_PlaySleepHitFX)
/* 1A6B9C 802782BC 248445E0 */ addiu $a0, $a0, %lo(EVS_PlaySleepHitFX)
/* 1A6BA0 802782C0 2405000A */ addiu $a1, $zero, 0xA
/* 1A6BA4 802782C4 0C0B0CF8 */ jal start_script
/* 1A6BA8 802782C8 0000302D */ daddu $a2, $zero, $zero
/* 1A6BAC 802782CC C620000C */ lwc1 $f0, 0xC($s1)
/* 1A6BB0 802782D0 4600018D */ trunc.w.s $f6, $f0
/* 1A6BB4 802782D4 E4460084 */ swc1 $f6, 0x84($v0)
/* 1A6BB8 802782D8 C6200010 */ lwc1 $f0, 0x10($s1)
/* 1A6BBC 802782DC 4600018D */ trunc.w.s $f6, $f0
/* 1A6BC0 802782E0 E4460088 */ swc1 $f6, 0x88($v0)
/* 1A6BC4 802782E4 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6BC8 802782E8 4600018D */ trunc.w.s $f6, $f0
/* 1A6BCC 802782EC E446008C */ swc1 $f6, 0x8C($v0)
/* 1A6BD0 802782F0 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6BD4 802782F4 24042031 */ addiu $a0, $zero, 0x2031
/* 1A6BD8 802782F8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A6BDC 802782FC 8E26000C */ lw $a2, 0xC($s1)
/* 1A6BE0 80278300 8E270010 */ lw $a3, 0x10($s1)
/* 1A6BE4 80278304 0C052757 */ jal sfx_play_sound_at_position
/* 1A6BE8 80278308 0000282D */ daddu $a1, $zero, $zero
.L8027830C:
/* 1A6BEC 8027830C 8E820190 */ lw $v0, 0x190($s4)
/* 1A6BF0 80278310 3C030004 */ lui $v1, (0x40000 >> 16)
/* 1A6BF4 80278314 00431024 */ and $v0, $v0, $v1
/* 1A6BF8 80278318 10400018 */ beqz $v0, .L8027837C
/* 1A6BFC 8027831C 00000000 */ nop
/* 1A6C00 80278320 12A00016 */ beqz $s5, .L8027837C
/* 1A6C04 80278324 00000000 */ nop
/* 1A6C08 80278328 3C048029 */ lui $a0, %hi(EVS_PlayDizzyHitFX)
/* 1A6C0C 8027832C 248445FC */ addiu $a0, $a0, %lo(EVS_PlayDizzyHitFX)
/* 1A6C10 80278330 2405000A */ addiu $a1, $zero, 0xA
/* 1A6C14 80278334 0C0B0CF8 */ jal start_script
/* 1A6C18 80278338 0000302D */ daddu $a2, $zero, $zero
/* 1A6C1C 8027833C C620000C */ lwc1 $f0, 0xC($s1)
/* 1A6C20 80278340 4600018D */ trunc.w.s $f6, $f0
/* 1A6C24 80278344 E4460084 */ swc1 $f6, 0x84($v0)
/* 1A6C28 80278348 C6200010 */ lwc1 $f0, 0x10($s1)
/* 1A6C2C 8027834C 4600018D */ trunc.w.s $f6, $f0
/* 1A6C30 80278350 E4460088 */ swc1 $f6, 0x88($v0)
/* 1A6C34 80278354 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6C38 80278358 4600018D */ trunc.w.s $f6, $f0
/* 1A6C3C 8027835C E446008C */ swc1 $f6, 0x8C($v0)
/* 1A6C40 80278360 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6C44 80278364 24042032 */ addiu $a0, $zero, 0x2032
/* 1A6C48 80278368 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A6C4C 8027836C 8E26000C */ lw $a2, 0xC($s1)
/* 1A6C50 80278370 8E270010 */ lw $a3, 0x10($s1)
/* 1A6C54 80278374 0C052757 */ jal sfx_play_sound_at_position
/* 1A6C58 80278378 0000282D */ daddu $a1, $zero, $zero
.L8027837C:
/* 1A6C5C 8027837C 8E820190 */ lw $v0, 0x190($s4)
/* 1A6C60 80278380 3C030001 */ lui $v1, (0x10000 >> 16)
/* 1A6C64 80278384 00431024 */ and $v0, $v0, $v1
/* 1A6C68 80278388 10400018 */ beqz $v0, .L802783EC
/* 1A6C6C 8027838C 00000000 */ nop
/* 1A6C70 80278390 12A00016 */ beqz $s5, .L802783EC
/* 1A6C74 80278394 00000000 */ nop
/* 1A6C78 80278398 3C048029 */ lui $a0, %hi(EVS_PlayParalyzeHitFX)
/* 1A6C7C 8027839C 24844618 */ addiu $a0, $a0, %lo(EVS_PlayParalyzeHitFX)
/* 1A6C80 802783A0 2405000A */ addiu $a1, $zero, 0xA
/* 1A6C84 802783A4 0C0B0CF8 */ jal start_script
/* 1A6C88 802783A8 0000302D */ daddu $a2, $zero, $zero
/* 1A6C8C 802783AC C620000C */ lwc1 $f0, 0xC($s1)
/* 1A6C90 802783B0 4600018D */ trunc.w.s $f6, $f0
/* 1A6C94 802783B4 E4460084 */ swc1 $f6, 0x84($v0)
/* 1A6C98 802783B8 C6200010 */ lwc1 $f0, 0x10($s1)
/* 1A6C9C 802783BC 4600018D */ trunc.w.s $f6, $f0
/* 1A6CA0 802783C0 E4460088 */ swc1 $f6, 0x88($v0)
/* 1A6CA4 802783C4 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6CA8 802783C8 4600018D */ trunc.w.s $f6, $f0
/* 1A6CAC 802783CC E446008C */ swc1 $f6, 0x8C($v0)
/* 1A6CB0 802783D0 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6CB4 802783D4 24042032 */ addiu $a0, $zero, 0x2032
/* 1A6CB8 802783D8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A6CBC 802783DC 8E26000C */ lw $a2, 0xC($s1)
/* 1A6CC0 802783E0 8E270010 */ lw $a3, 0x10($s1)
/* 1A6CC4 802783E4 0C052757 */ jal sfx_play_sound_at_position
/* 1A6CC8 802783E8 0000282D */ daddu $a1, $zero, $zero
.L802783EC:
/* 1A6CCC 802783EC 8E820190 */ lw $v0, 0x190($s4)
/* 1A6CD0 802783F0 3C030002 */ lui $v1, (0x20000 >> 16)
/* 1A6CD4 802783F4 00431024 */ and $v0, $v0, $v1
/* 1A6CD8 802783F8 10400018 */ beqz $v0, .L8027845C
/* 1A6CDC 802783FC 00000000 */ nop
/* 1A6CE0 80278400 12A00016 */ beqz $s5, .L8027845C
/* 1A6CE4 80278404 00000000 */ nop
/* 1A6CE8 80278408 3C048029 */ lui $a0, %hi(EVS_PlayPoisonHitFX)
/* 1A6CEC 8027840C 24844634 */ addiu $a0, $a0, %lo(EVS_PlayPoisonHitFX)
/* 1A6CF0 80278410 2405000A */ addiu $a1, $zero, 0xA
/* 1A6CF4 80278414 0C0B0CF8 */ jal start_script
/* 1A6CF8 80278418 0000302D */ daddu $a2, $zero, $zero
/* 1A6CFC 8027841C C620000C */ lwc1 $f0, 0xC($s1)
/* 1A6D00 80278420 4600018D */ trunc.w.s $f6, $f0
/* 1A6D04 80278424 E4460084 */ swc1 $f6, 0x84($v0)
/* 1A6D08 80278428 C6200010 */ lwc1 $f0, 0x10($s1)
/* 1A6D0C 8027842C 4600018D */ trunc.w.s $f6, $f0
/* 1A6D10 80278430 E4460088 */ swc1 $f6, 0x88($v0)
/* 1A6D14 80278434 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6D18 80278438 4600018D */ trunc.w.s $f6, $f0
/* 1A6D1C 8027843C E446008C */ swc1 $f6, 0x8C($v0)
/* 1A6D20 80278440 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6D24 80278444 24042032 */ addiu $a0, $zero, 0x2032
/* 1A6D28 80278448 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A6D2C 8027844C 8E26000C */ lw $a2, 0xC($s1)
/* 1A6D30 80278450 8E270010 */ lw $a3, 0x10($s1)
/* 1A6D34 80278454 0C052757 */ jal sfx_play_sound_at_position
/* 1A6D38 80278458 0000282D */ daddu $a1, $zero, $zero
.L8027845C:
/* 1A6D3C 8027845C 8E820190 */ lw $v0, 0x190($s4)
/* 1A6D40 80278460 3C030020 */ lui $v1, (0x200000 >> 16)
/* 1A6D44 80278464 00431024 */ and $v0, $v0, $v1
/* 1A6D48 80278468 10400018 */ beqz $v0, .L802784CC
/* 1A6D4C 8027846C 00000000 */ nop
/* 1A6D50 80278470 12A00016 */ beqz $s5, .L802784CC
/* 1A6D54 80278474 00000000 */ nop
/* 1A6D58 80278478 3C048029 */ lui $a0, %hi(EVS_PlayStopHitFX)
/* 1A6D5C 8027847C 24844650 */ addiu $a0, $a0, %lo(EVS_PlayStopHitFX)
/* 1A6D60 80278480 2405000A */ addiu $a1, $zero, 0xA
/* 1A6D64 80278484 0C0B0CF8 */ jal start_script
/* 1A6D68 80278488 0000302D */ daddu $a2, $zero, $zero
/* 1A6D6C 8027848C C620000C */ lwc1 $f0, 0xC($s1)
/* 1A6D70 80278490 4600018D */ trunc.w.s $f6, $f0
/* 1A6D74 80278494 E4460084 */ swc1 $f6, 0x84($v0)
/* 1A6D78 80278498 C6200010 */ lwc1 $f0, 0x10($s1)
/* 1A6D7C 8027849C 4600018D */ trunc.w.s $f6, $f0
/* 1A6D80 802784A0 E4460088 */ swc1 $f6, 0x88($v0)
/* 1A6D84 802784A4 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6D88 802784A8 4600018D */ trunc.w.s $f6, $f0
/* 1A6D8C 802784AC E446008C */ swc1 $f6, 0x8C($v0)
/* 1A6D90 802784B0 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6D94 802784B4 24042032 */ addiu $a0, $zero, 0x2032
/* 1A6D98 802784B8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A6D9C 802784BC 8E26000C */ lw $a2, 0xC($s1)
/* 1A6DA0 802784C0 8E270010 */ lw $a3, 0x10($s1)
/* 1A6DA4 802784C4 0C052757 */ jal sfx_play_sound_at_position
/* 1A6DA8 802784C8 0000282D */ daddu $a1, $zero, $zero
.L802784CC:
/* 1A6DAC 802784CC 8E820190 */ lw $v0, 0x190($s4)
/* 1A6DB0 802784D0 30424000 */ andi $v0, $v0, 0x4000
/* 1A6DB4 802784D4 10400019 */ beqz $v0, .L8027853C
/* 1A6DB8 802784D8 00000000 */ nop
/* 1A6DBC 802784DC 12A00017 */ beqz $s5, .L8027853C
/* 1A6DC0 802784E0 00000000 */ nop
/* 1A6DC4 802784E4 3C048029 */ lui $a0, %hi(EVS_PlayFreezeHitFX)
/* 1A6DC8 802784E8 2484466C */ addiu $a0, $a0, %lo(EVS_PlayFreezeHitFX)
/* 1A6DCC 802784EC 2405000A */ addiu $a1, $zero, 0xA
/* 1A6DD0 802784F0 0C0B0CF8 */ jal start_script
/* 1A6DD4 802784F4 0000302D */ daddu $a2, $zero, $zero
/* 1A6DD8 802784F8 C620000C */ lwc1 $f0, 0xC($s1)
/* 1A6DDC 802784FC 4600018D */ trunc.w.s $f6, $f0
/* 1A6DE0 80278500 E4460084 */ swc1 $f6, 0x84($v0)
/* 1A6DE4 80278504 C6200010 */ lwc1 $f0, 0x10($s1)
/* 1A6DE8 80278508 4600018D */ trunc.w.s $f6, $f0
/* 1A6DEC 8027850C E4460088 */ swc1 $f6, 0x88($v0)
/* 1A6DF0 80278510 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6DF4 80278514 AC530090 */ sw $s3, 0x90($v0)
/* 1A6DF8 80278518 4600018D */ trunc.w.s $f6, $f0
/* 1A6DFC 8027851C E446008C */ swc1 $f6, 0x8C($v0)
/* 1A6E00 80278520 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6E04 80278524 240400EB */ addiu $a0, $zero, 0xEB
/* 1A6E08 80278528 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A6E0C 8027852C 8E26000C */ lw $a2, 0xC($s1)
/* 1A6E10 80278530 8E270010 */ lw $a3, 0x10($s1)
/* 1A6E14 80278534 0C052757 */ jal sfx_play_sound_at_position
/* 1A6E18 80278538 0000282D */ daddu $a1, $zero, $zero
.L8027853C:
/* 1A6E1C 8027853C 8E820190 */ lw $v0, 0x190($s4)
/* 1A6E20 80278540 3C030008 */ lui $v1, (0x80000 >> 16)
/* 1A6E24 80278544 00431024 */ and $v0, $v0, $v1
/* 1A6E28 80278548 10400019 */ beqz $v0, .L802785B0
/* 1A6E2C 8027854C 00000000 */ nop
/* 1A6E30 80278550 12A00017 */ beqz $s5, .L802785B0
/* 1A6E34 80278554 00000000 */ nop
/* 1A6E38 80278558 3C048029 */ lui $a0, %hi(EVS_PlayShrinkHitFX)
/* 1A6E3C 8027855C 248446B8 */ addiu $a0, $a0, %lo(EVS_PlayShrinkHitFX)
/* 1A6E40 80278560 2405000A */ addiu $a1, $zero, 0xA
/* 1A6E44 80278564 0C0B0CF8 */ jal start_script
/* 1A6E48 80278568 0000302D */ daddu $a2, $zero, $zero
/* 1A6E4C 8027856C C620000C */ lwc1 $f0, 0xC($s1)
/* 1A6E50 80278570 4600018D */ trunc.w.s $f6, $f0
/* 1A6E54 80278574 E4460084 */ swc1 $f6, 0x84($v0)
/* 1A6E58 80278578 C6200010 */ lwc1 $f0, 0x10($s1)
/* 1A6E5C 8027857C 4600018D */ trunc.w.s $f6, $f0
/* 1A6E60 80278580 E4460088 */ swc1 $f6, 0x88($v0)
/* 1A6E64 80278584 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6E68 80278588 AC530090 */ sw $s3, 0x90($v0)
/* 1A6E6C 8027858C 4600018D */ trunc.w.s $f6, $f0
/* 1A6E70 80278590 E446008C */ swc1 $f6, 0x8C($v0)
/* 1A6E74 80278594 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6E78 80278598 24042032 */ addiu $a0, $zero, 0x2032
/* 1A6E7C 8027859C E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A6E80 802785A0 8E26000C */ lw $a2, 0xC($s1)
/* 1A6E84 802785A4 8E270010 */ lw $a3, 0x10($s1)
/* 1A6E88 802785A8 0C052757 */ jal sfx_play_sound_at_position
/* 1A6E8C 802785AC 0000282D */ daddu $a1, $zero, $zero
.L802785B0:
/* 1A6E90 802785B0 8E820188 */ lw $v0, 0x188($s4)
/* 1A6E94 802785B4 30420040 */ andi $v0, $v0, 0x40
/* 1A6E98 802785B8 1040000A */ beqz $v0, .L802785E4
/* 1A6E9C 802785BC 24020093 */ addiu $v0, $zero, 0x93
/* 1A6EA0 802785C0 92630136 */ lbu $v1, 0x136($s3)
/* 1A6EA4 802785C4 14620007 */ bne $v1, $v0, .L802785E4
/* 1A6EA8 802785C8 24040165 */ addiu $a0, $zero, 0x165
/* 1A6EAC 802785CC C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6EB0 802785D0 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A6EB4 802785D4 8E26000C */ lw $a2, 0xC($s1)
/* 1A6EB8 802785D8 8E270010 */ lw $a3, 0x10($s1)
/* 1A6EBC 802785DC 0C052757 */ jal sfx_play_sound_at_position
/* 1A6EC0 802785E0 0000282D */ daddu $a1, $zero, $zero
.L802785E4:
/* 1A6EC4 802785E4 0C099AB7 */ jal show_actor_health_bar
/* 1A6EC8 802785E8 0260202D */ daddu $a0, $s3, $zero
/* 1A6ECC 802785EC 8FA80058 */ lw $t0, 0x58($sp)
/* 1A6ED0 802785F0 81020212 */ lb $v0, 0x212($t0)
/* 1A6ED4 802785F4 2403000B */ addiu $v1, $zero, 0xB
/* 1A6ED8 802785F8 10430029 */ beq $v0, $v1, .L802786A0
/* 1A6EDC 802785FC 00000000 */ nop
/* 1A6EE0 80278600 82620212 */ lb $v0, 0x212($s3)
/* 1A6EE4 80278604 10430006 */ beq $v0, $v1, .L80278620
/* 1A6EE8 80278608 00000000 */ nop
/* 1A6EEC 8027860C 8FA80018 */ lw $t0, 0x18($sp)
/* 1A6EF0 80278610 8D02007C */ lw $v0, 0x7C($t0)
/* 1A6EF4 80278614 30420080 */ andi $v0, $v0, 0x80
/* 1A6EF8 80278618 10400021 */ beqz $v0, .L802786A0
/* 1A6EFC 8027861C 00000000 */ nop
.L80278620:
/* 1A6F00 80278620 8E820188 */ lw $v0, 0x188($s4)
/* 1A6F04 80278624 3C031000 */ lui $v1, (0x10000000 >> 16)
/* 1A6F08 80278628 00431024 */ and $v0, $v0, $v1
/* 1A6F0C 8027862C 1440001C */ bnez $v0, .L802786A0
/* 1A6F10 80278630 00000000 */ nop
/* 1A6F14 80278634 8E82018C */ lw $v0, 0x18C($s4)
/* 1A6F18 80278638 30420008 */ andi $v0, $v0, 0x8
/* 1A6F1C 8027863C 14400018 */ bnez $v0, .L802786A0
/* 1A6F20 80278640 2402000E */ addiu $v0, $zero, 0xE
/* 1A6F24 80278644 8FA80058 */ lw $t0, 0x58($sp)
/* 1A6F28 80278648 81030218 */ lb $v1, 0x218($t0)
/* 1A6F2C 8027864C 10620014 */ beq $v1, $v0, .L802786A0
/* 1A6F30 80278650 00000000 */ nop
/* 1A6F34 80278654 0C09DBD4 */ jal has_enchanted_part
/* 1A6F38 80278658 0100202D */ daddu $a0, $t0, $zero
/* 1A6F3C 8027865C 14400010 */ bnez $v0, .L802786A0
/* 1A6F40 80278660 2404037B */ addiu $a0, $zero, 0x37B
/* 1A6F44 80278664 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A6F48 80278668 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A6F4C 8027866C 8E26000C */ lw $a2, 0xC($s1)
/* 1A6F50 80278670 8E270010 */ lw $a3, 0x10($s1)
/* 1A6F54 80278674 0C052757 */ jal sfx_play_sound_at_position
/* 1A6F58 80278678 0000282D */ daddu $a1, $zero, $zero
/* 1A6F5C 8027867C 8FA40058 */ lw $a0, 0x58($sp)
/* 1A6F60 80278680 0C09451D */ jal apply_shock_effect
/* 1A6F64 80278684 00000000 */ nop
/* 1A6F68 80278688 24050001 */ addiu $a1, $zero, 0x1
/* 1A6F6C 8027868C 8FA40058 */ lw $a0, 0x58($sp)
/* 1A6F70 80278690 0C09E245 */ jal dispatch_damage_event_actor_1
/* 1A6F74 80278694 2406002F */ addiu $a2, $zero, 0x2F
/* 1A6F78 80278698 0809E1A9 */ j .L802786A4
/* 1A6F7C 8027869C 2402FFFF */ addiu $v0, $zero, -0x1
.L802786A0:
/* 1A6F80 802786A0 8FA2001C */ lw $v0, 0x1C($sp)
.L802786A4:
/* 1A6F84 802786A4 8FBF0054 */ lw $ra, 0x54($sp)
/* 1A6F88 802786A8 8FBE0050 */ lw $fp, 0x50($sp)
/* 1A6F8C 802786AC 8FB7004C */ lw $s7, 0x4C($sp)
/* 1A6F90 802786B0 8FB60048 */ lw $s6, 0x48($sp)
/* 1A6F94 802786B4 8FB50044 */ lw $s5, 0x44($sp)
/* 1A6F98 802786B8 8FB40040 */ lw $s4, 0x40($sp)
/* 1A6F9C 802786BC 8FB3003C */ lw $s3, 0x3C($sp)
/* 1A6FA0 802786C0 8FB20038 */ lw $s2, 0x38($sp)
/* 1A6FA4 802786C4 8FB10034 */ lw $s1, 0x34($sp)
/* 1A6FA8 802786C8 8FB00030 */ lw $s0, 0x30($sp)
/* 1A6FAC 802786CC 03E00008 */ jr $ra
/* 1A6FB0 802786D0 27BD0058 */ addiu $sp, $sp, 0x58
### DECOMPILED C INSTRUCTIONS:
HitResult calc_enemy_damage_target(Actor* attacker) {
BattleStatus* battleStatus = &gBattleStatus;
ActorState* state = &attacker->state;
s32 targetID = battleStatus->currentTargetID;
s32 targetPartIdx = battleStatus->currentTargetPart;
s32 actorClass;
Actor* target;
ActorPart* targetPart;
s32 hitResult;
s32 one = TRUE;
s32 statusInflicted = FALSE;
s32 statusInflicted2 = FALSE;
s32 isFire = FALSE;
s32 isWater = FALSE;
s32 isIce = FALSE;
s32 isElectric = FALSE;
s32 madeElectricContact = FALSE;
s32 isPlayer;
s32 defense;
s32 event;
s32 damage;
Evt* script;
battleStatus->wasStatusInflicted = FALSE;
battleStatus->lastAttackDamage = 0;
battleStatus->attackerActorID = attacker->actorID;
battleStatus->currentTargetID2 = targetID;
battleStatus->currentTargetPart2 = targetPartIdx;
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;
target->lastDamageTaken = 0;
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
target->currentHP = gPlayerData.curHP;
break;
case ACTOR_CLASS_PARTNER:
target->currentHP = 127;
break;
case ACTOR_CLASS_ENEMY:
break;
}
// handle defender status
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) {
return HIT_RESULT_MISS;
}
if (target->transparentStatus == STATUS_KEY_TRANSPARENT
|| targetPart->eventFlags & ACTOR_EVENT_FLAG_800
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)
) {
return HIT_RESULT_MISS;
}
if (target->stoneStatus == STATUS_KEY_STONE) {
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, -1);
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0);
play_hit_sound(attacker, state->goalPos.x, state->goalPos.y, state->goalPos.z, 0);
dispatch_event_general(target, EVENT_IMMUNE);
return HIT_RESULT_HIT;
}
// handle attack element
if (battleStatus->currentAttackElement & DAMAGE_TYPE_BLAST) {
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
) {
do {
play_hit_sound(attacker, state->goalPos.x, state->goalPos.y, state->goalPos.z, 3);
} while (0); // TODO required to match
dispatch_event_general(target, EVENT_EXPLODE_TRIGGER);
return HIT_RESULT_BACKFIRE;
}
}
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE) && (target->flags & ACTOR_FLAG_FLYING)) {
play_hit_sound(attacker, state->goalPos.x, state->goalPos.y, state->goalPos.z, 1);
return HIT_RESULT_NO_DAMAGE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
fx_ring_blast(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
isFire = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SHOCK) {
apply_shock_effect(target);
isElectric = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_WATER) {
fx_water_splash(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
isWater = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_ICE) {
fx_big_snowflakes(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f);
isIce = TRUE;
}
if (!(attacker->staticStatus == STATUS_KEY_STATIC)
&& ((target->staticStatus == STATUS_KEY_STATIC) || (targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED))
&& !(battleStatus->currentAttackElement & (DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT))
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
&& !has_enchanted_part(attacker)) // enchanted attacks ignore electrified defenders
{
madeElectricContact = TRUE;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
}
// begin calulating damage
gBattleStatus.flags1 &= ~BS_FLAGS1_ATK_BLOCKED;
defense = get_defense(target, targetPart->defenseTable, battleStatus->currentAttackElement);
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_IGNORE_DEFENSE)) {
defense += target->defenseBoost;
if (actorClass == ACTOR_CLASS_PLAYER) {
if (battleStatus->waterBlockTurnsLeft > 0) {
if ((battleStatus->currentAttackElement & (DAMAGE_TYPE_BLAST | DAMAGE_TYPE_FIRE))) {
defense += 2;
} else {
defense += 1;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_PLAYER_DEFENDING) {
defense += 1;
}
}
}
damage = battleStatus->currentAttackDamage;
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
damage -= battleStatus->merleeDefenseBoost;
break;
case ACTOR_CLASS_PARTNER:
case ACTOR_CLASS_ENEMY:
break;
}
damage += attacker->attackBoost;
if (attacker->chillOutTurns != 0) {
damage -= attacker->chillOutAmount;
}
if (attacker->debuff == STATUS_KEY_SHRINK) {
if (damage > 0) {
damage /= 2;
}
}
if (damage > 99) {
damage = 99;
}
if (damage < 1) {
defense = 0;
}
target->hpChangeCounter = 0;
damage -= defense;
isPlayer = actorClass == ACTOR_CLASS_PLAYER;
if (isPlayer) {
if (player_team_is_ability_active(target, ABILITY_FIRE_SHIELD)) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
damage--;
}
}
damage -= player_team_is_ability_active(target, ABILITY_DEFEND_PLUS);
damage -= player_team_is_ability_active(target, ABILITY_P_DOWN_D_UP);
damage += player_team_is_ability_active(target, ABILITY_P_UP_D_DOWN);
if (target->currentHP <= 5) {
if (player_team_is_ability_active(target, ABILITY_LAST_STAND)) {
damage /= 2;
}
}
}
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
// TODO figure out how to better write target->debuff >= STATUS_KEY_POISON
if ((target->debuff == 0 || target->debuff >= STATUS_KEY_POISON) && (target->stoneStatus == 0) && !(battleStatus->currentAttackElement & DAMAGE_TYPE_UNBLOCKABLE)) {
s32 blocked;
if (player_team_is_ability_active(target, ABILITY_BERSERKER)) {
blocked = rand_int(1);
} else {
blocked = check_block_input(BUTTON_A);
}
if (blocked) {
damage--;
damage -= player_team_is_ability_active(target, ABILITY_DAMAGE_DODGE);
sfx_play_sound_at_position(SOUND_231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
gBattleStatus.flags1 |= BS_FLAGS1_ATK_BLOCKED;
break;
}
func_80266970(target);
}
break;
case ACTOR_CLASS_PARTNER:
if (target->stoneStatus == 0) {
if (target->koStatus == 0 && !(battleStatus->currentAttackElement & DAMAGE_TYPE_UNBLOCKABLE)) {
if (check_block_input(BUTTON_A)) {
damage = 0;
sfx_play_sound_at_position(SOUND_231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
gBattleStatus.flags1 |= BS_FLAGS1_ATK_BLOCKED;
break;
}
func_80266970(target);
}
}
break;
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
func_80266970(target);
}
// deal damage and determine resulting battle event
event = EVENT_HIT_COMBO;
if (damage < 1) {
target->hpChangeCounter = 0;
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
hitResult = HIT_RESULT_NO_DAMAGE;
event = EVENT_ZERO_DAMAGE;
} else {
hitResult = HIT_RESULT_NO_DAMAGE;
event = EVENT_ZERO_DAMAGE;
if (target->currentHP < 1) {
event = EVENT_DEATH;
}
}
battleStatus->lastAttackDamage = 0;
} else {
target->damageCounter += damage;
target->hpChangeCounter -= damage;
battleStatus->lastAttackDamage = 0;
hitResult = HIT_RESULT_HIT;
if (!(targetPart->flags & ACTOR_PART_FLAG_2000)
&& !(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE)
) {
if (!(target->flags & ACTOR_FLAG_NO_DMG_APPLY)) {
target->currentHP -= damage;
}
if (target->currentHP < 1) {
target->currentHP = 0;
event = EVENT_DEATH;
}
}
battleStatus->lastAttackDamage += damage;
target->lastDamageTaken = battleStatus->lastAttackDamage;
target->hpChangeCounter = 0;
if (actorClass == ACTOR_CLASS_PLAYER) {
battleStatus->damageTaken += damage;
gPlayerData.curHP = target->currentHP;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (event == EVENT_HIT_COMBO) {
event = EVENT_HIT;
}
if (event == EVENT_ZERO_DAMAGE) {
event = EVENT_IMMUNE;
}
if (target->currentHP < 1 && event == EVENT_IMMUNE) {
event = EVENT_DEATH;
}
} else if (event == EVENT_DEATH) {
event = EVENT_HIT_COMBO;
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) {
clear_part_pal_adjustment(targetPart);
}
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& (battleStatus->currentAttackElement & (DAMAGE_TYPE_POW | DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_JUMP))
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE)
) {
if (event == EVENT_HIT) {
event = EVENT_FLIP_TRIGGER;
}
if (event == EVENT_IMMUNE) {
event = EVENT_FLIP_TRIGGER;
}
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& (battleStatus->currentAttackElement & (DAMAGE_TYPE_POW | DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_JUMP))
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE)
) {
if (event == EVENT_HIT_COMBO) {
event = EVENT_FLIP_TRIGGER;
}
if (event == EVENT_ZERO_DAMAGE) {
event = EVENT_FLIP_TRIGGER;
}
}
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& (battleStatus->currentAttackElement & (DAMAGE_TYPE_FIRE | DAMAGE_TYPE_BLAST | DAMAGE_TYPE_4000))
) {
if (event == EVENT_HIT) {
event = EVENT_BURN_HIT;
}
if (event == EVENT_DEATH) {
event = EVENT_FIRE_DEATH;
}
isFire = TRUE;
}
if (gBattleStatus.flags1 & BS_FLAGS1_ATK_BLOCKED) {
if (event == EVENT_HIT_COMBO) {
event = EVENT_18;
}
if (event == EVENT_HIT) {
event = EVENT_BLOCK;
}
if (event == EVENT_ZERO_DAMAGE) {
event = EVENT_18;
}
if (event == EVENT_IMMUNE) {
event = EVENT_BLOCK;
}
if (event == EVENT_BURN_HIT) {
event = EVENT_BLOCK;
}
}
// try inflicting status effect
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->lastAttackDamage >= 0
&& event != EVENT_DEATH
&& event != EVENT_SPIN_SMASH_DEATH
&& event != EVENT_EXPLODE_TRIGGER
&& !(gBattleStatus.flags1 & BS_FLAGS1_ATK_BLOCKED)
&& !(gBattleStatus.flags2 & BS_FLAGS2_1000000)
&& !(actorClass == ACTOR_PLAYER && is_ability_active(ABILITY_HEALTHY_HEALTHY) && (rand_int(100) < 50)))
{
if (battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK && try_inflict_status(target, STATUS_KEY_SHRINK, STATUS_TURN_MOD_SHRINK)) {
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_POISON && try_inflict_status(target, STATUS_KEY_POISON, STATUS_TURN_MOD_POISON)) {
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_STONE && try_inflict_status(target, STATUS_KEY_STONE, STATUS_TURN_MOD_STONE)) {
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP && try_inflict_status(target, STATUS_KEY_SLEEP, STATUS_TURN_MOD_SLEEP)) {
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY && try_inflict_status(target, STATUS_KEY_DIZZY, STATUS_TURN_MOD_DIZZY)) {
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_STOP && try_inflict_status(target, STATUS_KEY_STOP, STATUS_TURN_MOD_STOP)) {
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_STATIC && try_inflict_status(target, STATUS_KEY_STATIC, STATUS_TURN_MOD_STATIC)) {
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE && try_inflict_status(target, STATUS_KEY_PARALYZE, STATUS_TURN_MOD_PARALYZE)) {
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_FEAR && try_inflict_status(target, STATUS_KEY_FEAR, STATUS_TURN_MOD_FEAR)) {
statusInflicted = one;
statusInflicted2 = one;
}
// @bug? repeated paralyze and dizzy infliction
if (battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE && try_inflict_status(target, STATUS_KEY_PARALYZE, STATUS_TURN_MOD_PARALYZE)) {
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY && try_inflict_status(target, STATUS_KEY_DIZZY, STATUS_TURN_MOD_DIZZY)) {
statusInflicted = one;
statusInflicted2 = one;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_FROZEN && target->debuff != STATUS_KEY_FROZEN && try_inflict_status(target, STATUS_KEY_FROZEN, STATUS_TURN_MOD_FROZEN)) {
statusInflicted = one;
statusInflicted2 = one;
}
if (statusInflicted) {
if (event == EVENT_ZERO_DAMAGE) {
event = EVENT_HIT_COMBO;
}
if (event == EVENT_IMMUNE) {
event = EVENT_HIT;
}
}
}
// dispatch events and play damage effects
battleStatus->wasStatusInflicted = statusInflicted;
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
dispatch_event_player(event);
break;
case ACTOR_CLASS_PARTNER:
dispatch_event_partner(event);
break;
case ACTOR_CLASS_ENEMY:
dispatch_event_actor(target, event);
break;
}
if (actorClass == ACTOR_CLASS_PARTNER
&& battleStatus->lastAttackDamage > 0
&& gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& !(target->flags & ACTOR_FLAG_NO_DMG_APPLY))
{
inflict_partner_ko(target, STATUS_KEY_DAZE, battleStatus->lastAttackDamage);
}
if (!(target->flags & ACTOR_FLAG_NO_DMG_POPUP)) {
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
case ACTOR_CLASS_PARTNER:
if (battleStatus->lastAttackDamage == 0) {
if (!statusInflicted2 && !statusInflicted) {
// immune star fx?
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, -3);
}
} else if (battleStatus->currentAttackElement & (DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_SMASH)) {
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 1);
show_damage_fx(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
} else {
show_primary_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 1);
show_damage_fx(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
break;
}
break;
case ACTOR_CLASS_ENEMY:
if (battleStatus->lastAttackDamage == 0) {
if (!statusInflicted2 && !statusInflicted) {
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
}
} else if (battleStatus->currentAttackElement & (DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_SMASH)) {
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
show_damage_fx(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
} else {
show_primary_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
show_damage_fx(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
}
break;
}
}
if (battleStatus->lastAttackDamage > 0) {
u32 hitSound;
func_80267018(target, 1);
if (attacker->actorTypeData1[5] != SOUND_0) {
sfx_play_sound_at_position(attacker->actorTypeData1[5], SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (isFire) {
hitSound = HIT_SOUND_FIRE;
} else if (!isElectric) {
hitSound = HIT_SOUND_NORMAL;
} else {
hitSound = HIT_SOUND_SHOCK;
}
play_hit_sound(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, hitSound);
}
if ((battleStatus->lastAttackDamage < 1 && !statusInflicted2 && !madeElectricContact) || targetPart->flags & ACTOR_PART_FLAG_2000) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP) && statusInflicted) {
script = start_script(&EVS_PlaySleepHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY) && statusInflicted) {
script = start_script(&EVS_PlayDizzyHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE) && statusInflicted) {
script = start_script(&EVS_PlayParalyzeHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_POISON) && statusInflicted) {
script = start_script(&EVS_PlayPoisonHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_STOP) && statusInflicted) {
script = start_script(&EVS_PlayStopHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_FROZEN) && statusInflicted) {
script = start_script(&EVS_PlayFreezeHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
script->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK) && statusInflicted) {
script = start_script(&EVS_PlayShrinkHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
script->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_SMASH) && target->actorType == ACTOR_TYPE_GOOMNUT_TREE) {
sfx_play_sound_at_position(SOUND_SMASH_GOOMNUT_TREE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
show_actor_health_bar(target);
if (attacker->staticStatus != STATUS_KEY_STATIC
&& (target->staticStatus == STATUS_KEY_STATIC || targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
&& (attacker->transparentStatus != STATUS_KEY_TRANSPARENT)
&& !has_enchanted_part(attacker))
{
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(attacker);
dispatch_damage_event_actor_1(attacker, 1, EVENT_SHOCK_HIT);
return HIT_RESULT_BACKFIRE;
}
return hitResult;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel PlayEffect
/* FCC4C 802D829C 27BDFF38 */ addiu $sp, $sp, -0xC8
/* FCC50 802D82A0 AFBF0094 */ sw $ra, 0x94($sp)
/* FCC54 802D82A4 AFBE0090 */ sw $fp, 0x90($sp)
/* FCC58 802D82A8 AFB7008C */ sw $s7, 0x8C($sp)
/* FCC5C 802D82AC AFB60088 */ sw $s6, 0x88($sp)
/* FCC60 802D82B0 AFB50084 */ sw $s5, 0x84($sp)
/* FCC64 802D82B4 AFB40080 */ sw $s4, 0x80($sp)
/* FCC68 802D82B8 AFB3007C */ sw $s3, 0x7C($sp)
/* FCC6C 802D82BC AFB20078 */ sw $s2, 0x78($sp)
/* FCC70 802D82C0 AFB10074 */ sw $s1, 0x74($sp)
/* FCC74 802D82C4 AFB00070 */ sw $s0, 0x70($sp)
/* FCC78 802D82C8 F7BE00C0 */ sdc1 $f30, 0xC0($sp)
/* FCC7C 802D82CC F7BC00B8 */ sdc1 $f28, 0xB8($sp)
/* FCC80 802D82D0 F7BA00B0 */ sdc1 $f26, 0xB0($sp)
/* FCC84 802D82D4 F7B800A8 */ sdc1 $f24, 0xA8($sp)
/* FCC88 802D82D8 F7B600A0 */ sdc1 $f22, 0xA0($sp)
/* FCC8C 802D82DC F7B40098 */ sdc1 $f20, 0x98($sp)
/* FCC90 802D82E0 AFA400C8 */ sw $a0, 0xC8($sp)
/* FCC94 802D82E4 8C90000C */ lw $s0, 0xC($a0)
/* FCC98 802D82E8 0000A82D */ daddu $s5, $zero, $zero
/* FCC9C 802D82EC 0200882D */ daddu $s1, $s0, $zero
/* FCCA0 802D82F0 8E050000 */ lw $a1, 0x0($s0)
/* FCCA4 802D82F4 0C0B1EAF */ jal evt_get_variable
/* FCCA8 802D82F8 0200902D */ daddu $s2, $s0, $zero
/* FCCAC 802D82FC 8E250000 */ lw $a1, 0x0($s1)
/* FCCB0 802D8300 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCCB4 802D8304 26100004 */ addiu $s0, $s0, 0x4
/* FCCB8 802D8308 0C0B1EAF */ jal evt_get_variable
/* FCCBC 802D830C AFA20040 */ sw $v0, 0x40($sp)
/* FCCC0 802D8310 8E450000 */ lw $a1, 0x0($s2)
/* FCCC4 802D8314 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCCC8 802D8318 0C0B1EAF */ jal evt_get_variable
/* FCCCC 802D831C 26310004 */ addiu $s1, $s1, 0x4
/* FCCD0 802D8320 8E050000 */ lw $a1, 0x0($s0)
/* FCCD4 802D8324 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCCD8 802D8328 0C0B1EAF */ jal evt_get_variable
/* FCCDC 802D832C 26100004 */ addiu $s0, $s0, 0x4
/* FCCE0 802D8330 8E050000 */ lw $a1, 0x0($s0)
/* FCCE4 802D8334 26100004 */ addiu $s0, $s0, 0x4
/* FCCE8 802D8338 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCCEC 802D833C 0C0B1EAF */ jal evt_get_variable
/* FCCF0 802D8340 0040982D */ daddu $s3, $v0, $zero
/* FCCF4 802D8344 8E050000 */ lw $a1, 0x0($s0)
/* FCCF8 802D8348 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCCFC 802D834C 26100004 */ addiu $s0, $s0, 0x4
/* FCD00 802D8350 0C0B1EAF */ jal evt_get_variable
/* FCD04 802D8354 AFA20044 */ sw $v0, 0x44($sp)
/* FCD08 802D8358 8E050000 */ lw $a1, 0x0($s0)
/* FCD0C 802D835C 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCD10 802D8360 26100004 */ addiu $s0, $s0, 0x4
/* FCD14 802D8364 0C0B1EAF */ jal evt_get_variable
/* FCD18 802D8368 AFA20048 */ sw $v0, 0x48($sp)
/* FCD1C 802D836C 8E050000 */ lw $a1, 0x0($s0)
/* FCD20 802D8370 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCD24 802D8374 26100004 */ addiu $s0, $s0, 0x4
/* FCD28 802D8378 0C0B1EAF */ jal evt_get_variable
/* FCD2C 802D837C AFA2004C */ sw $v0, 0x4C($sp)
/* FCD30 802D8380 8E050000 */ lw $a1, 0x0($s0)
/* FCD34 802D8384 26100004 */ addiu $s0, $s0, 0x4
/* FCD38 802D8388 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCD3C 802D838C 0C0B1EAF */ jal evt_get_variable
/* FCD40 802D8390 0040B02D */ daddu $s6, $v0, $zero
/* FCD44 802D8394 8E050000 */ lw $a1, 0x0($s0)
/* FCD48 802D8398 26100004 */ addiu $s0, $s0, 0x4
/* FCD4C 802D839C 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCD50 802D83A0 0C0B1EAF */ jal evt_get_variable
/* FCD54 802D83A4 0040A02D */ daddu $s4, $v0, $zero
/* FCD58 802D83A8 8E050000 */ lw $a1, 0x0($s0)
/* FCD5C 802D83AC 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCD60 802D83B0 26100004 */ addiu $s0, $s0, 0x4
/* FCD64 802D83B4 0C0B1EAF */ jal evt_get_variable
/* FCD68 802D83B8 AFA20050 */ sw $v0, 0x50($sp)
/* FCD6C 802D83BC 8E050000 */ lw $a1, 0x0($s0)
/* FCD70 802D83C0 26100004 */ addiu $s0, $s0, 0x4
/* FCD74 802D83C4 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCD78 802D83C8 0C0B1EAF */ jal evt_get_variable
/* FCD7C 802D83CC 0040B82D */ daddu $s7, $v0, $zero
/* FCD80 802D83D0 8E050000 */ lw $a1, 0x0($s0)
/* FCD84 802D83D4 26100004 */ addiu $s0, $s0, 0x4
/* FCD88 802D83D8 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCD8C 802D83DC 0C0B1EAF */ jal evt_get_variable
/* FCD90 802D83E0 0040F02D */ daddu $fp, $v0, $zero
/* FCD94 802D83E4 8E050000 */ lw $a1, 0x0($s0)
/* FCD98 802D83E8 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCD9C 802D83EC 26100004 */ addiu $s0, $s0, 0x4
/* FCDA0 802D83F0 0C0B1EAF */ jal evt_get_variable
/* FCDA4 802D83F4 AFA20054 */ sw $v0, 0x54($sp)
/* FCDA8 802D83F8 8E050000 */ lw $a1, 0x0($s0)
/* FCDAC 802D83FC 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCDB0 802D8400 0C0B1EAF */ jal evt_get_variable
/* FCDB4 802D8404 26100004 */ addiu $s0, $s0, 0x4
/* FCDB8 802D8408 8E050000 */ lw $a1, 0x0($s0)
/* FCDBC 802D840C 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCDC0 802D8410 0C0B1EAF */ jal evt_get_variable
/* FCDC4 802D8414 26520004 */ addiu $s2, $s2, 0x4
/* FCDC8 802D8418 8E250000 */ lw $a1, 0x0($s1)
/* FCDCC 802D841C 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCDD0 802D8420 0C0B210B */ jal evt_get_float_variable
/* FCDD4 802D8424 26310004 */ addiu $s1, $s1, 0x4
/* FCDD8 802D8428 8E250000 */ lw $a1, 0x0($s1)
/* FCDDC 802D842C 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCDE0 802D8430 26310004 */ addiu $s1, $s1, 0x4
/* FCDE4 802D8434 0C0B210B */ jal evt_get_float_variable
/* FCDE8 802D8438 E7A00058 */ swc1 $f0, 0x58($sp)
/* FCDEC 802D843C 8E250000 */ lw $a1, 0x0($s1)
/* FCDF0 802D8440 26310004 */ addiu $s1, $s1, 0x4
/* FCDF4 802D8444 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCDF8 802D8448 0C0B210B */ jal evt_get_float_variable
/* FCDFC 802D844C 46000506 */ mov.s $f20, $f0
/* FCE00 802D8450 8E250000 */ lw $a1, 0x0($s1)
/* FCE04 802D8454 26310004 */ addiu $s1, $s1, 0x4
/* FCE08 802D8458 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCE0C 802D845C 0C0B210B */ jal evt_get_float_variable
/* FCE10 802D8460 46000586 */ mov.s $f22, $f0
/* FCE14 802D8464 8E250000 */ lw $a1, 0x0($s1)
/* FCE18 802D8468 26310004 */ addiu $s1, $s1, 0x4
/* FCE1C 802D846C 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCE20 802D8470 0C0B210B */ jal evt_get_float_variable
/* FCE24 802D8474 46000606 */ mov.s $f24, $f0
/* FCE28 802D8478 8E250000 */ lw $a1, 0x0($s1)
/* FCE2C 802D847C 26310004 */ addiu $s1, $s1, 0x4
/* FCE30 802D8480 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCE34 802D8484 0C0B210B */ jal evt_get_float_variable
/* FCE38 802D8488 46000686 */ mov.s $f26, $f0
/* FCE3C 802D848C 8E250000 */ lw $a1, 0x0($s1)
/* FCE40 802D8490 26310004 */ addiu $s1, $s1, 0x4
/* FCE44 802D8494 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCE48 802D8498 0C0B210B */ jal evt_get_float_variable
/* FCE4C 802D849C 46000706 */ mov.s $f28, $f0
/* FCE50 802D84A0 8E250000 */ lw $a1, 0x0($s1)
/* FCE54 802D84A4 26310004 */ addiu $s1, $s1, 0x4
/* FCE58 802D84A8 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCE5C 802D84AC 0C0B210B */ jal evt_get_float_variable
/* FCE60 802D84B0 46000786 */ mov.s $f30, $f0
/* FCE64 802D84B4 8E250000 */ lw $a1, 0x0($s1)
/* FCE68 802D84B8 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCE6C 802D84BC 26310004 */ addiu $s1, $s1, 0x4
/* FCE70 802D84C0 0C0B210B */ jal evt_get_float_variable
/* FCE74 802D84C4 E7A0005C */ swc1 $f0, 0x5C($sp)
/* FCE78 802D84C8 8E250000 */ lw $a1, 0x0($s1)
/* FCE7C 802D84CC 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCE80 802D84D0 26310004 */ addiu $s1, $s1, 0x4
/* FCE84 802D84D4 0C0B210B */ jal evt_get_float_variable
/* FCE88 802D84D8 E7A00060 */ swc1 $f0, 0x60($sp)
/* FCE8C 802D84DC 8E250000 */ lw $a1, 0x0($s1)
/* FCE90 802D84E0 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCE94 802D84E4 26310004 */ addiu $s1, $s1, 0x4
/* FCE98 802D84E8 0C0B210B */ jal evt_get_float_variable
/* FCE9C 802D84EC E7A00064 */ swc1 $f0, 0x64($sp)
/* FCEA0 802D84F0 8E250000 */ lw $a1, 0x0($s1)
/* FCEA4 802D84F4 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCEA8 802D84F8 26310004 */ addiu $s1, $s1, 0x4
/* FCEAC 802D84FC 0C0B210B */ jal evt_get_float_variable
/* FCEB0 802D8500 E7A00068 */ swc1 $f0, 0x68($sp)
/* FCEB4 802D8504 8E250000 */ lw $a1, 0x0($s1)
/* FCEB8 802D8508 8FA400C8 */ lw $a0, 0xC8($sp)
/* FCEBC 802D850C 0C0B210B */ jal evt_get_float_variable
/* FCEC0 802D8510 26520004 */ addiu $s2, $s2, 0x4
/* FCEC4 802D8514 8E450000 */ lw $a1, 0x0($s2)
/* FCEC8 802D8518 26520010 */ addiu $s2, $s2, 0x10
/* FCECC 802D851C 8E500000 */ lw $s0, 0x0($s2)
/* FCED0 802D8520 26520004 */ addiu $s2, $s2, 0x4
/* FCED4 802D8524 8E430000 */ lw $v1, 0x0($s2)
/* FCED8 802D8528 26520004 */ addiu $s2, $s2, 0x4
/* FCEDC 802D852C 0260202D */ daddu $a0, $s3, $zero
/* FCEE0 802D8530 AFA3006C */ sw $v1, 0x6C($sp)
/* FCEE4 802D8534 8FA30040 */ lw $v1, 0x40($sp)
/* FCEE8 802D8538 8E530000 */ lw $s3, 0x0($s2)
/* FCEEC 802D853C 8E510004 */ lw $s1, 0x4($s2)
/* FCEF0 802D8540 2C620087 */ sltiu $v0, $v1, 0x87
/* FCEF4 802D8544 10400450 */ beqz $v0, .L802D9688
/* FCEF8 802D8548 00031080 */ sll $v0, $v1, 2
/* FCEFC 802D854C 3C01802E */ lui $at, %hi(jtbl_802DA258)
/* FCF00 802D8550 00220821 */ addu $at, $at, $v0
/* FCF04 802D8554 8C22A258 */ lw $v0, %lo(jtbl_802DA258)($at)
/* FCF08 802D8558 00400008 */ jr $v0
/* FCF0C 802D855C 00000000 */ nop
glabel .L802D8560
/* FCF10 802D8560 8FA50058 */ lw $a1, 0x58($sp)
/* FCF14 802D8564 4406A000 */ mfc1 $a2, $f20
/* FCF18 802D8568 4407B000 */ mfc1 $a3, $f22
/* FCF1C 802D856C 3C014040 */ lui $at, (0x40400000 >> 16)
/* FCF20 802D8570 44810000 */ mtc1 $at, $f0
/* FCF24 802D8574 0000202D */ daddu $a0, $zero, $zero
/* FCF28 802D8578 AFB60014 */ sw $s6, 0x14($sp)
/* FCF2C 802D857C 0C01C3F4 */ jal fx_blast
/* FCF30 802D8580 E7A00010 */ swc1 $f0, 0x10($sp)
/* FCF34 802D8584 080B65A4 */ j .L802D9690
/* FCF38 802D8588 00000000 */ nop
glabel .L802D858C
/* FCF3C 802D858C C7AC0058 */ lwc1 $f12, 0x58($sp)
/* FCF40 802D8590 4406B000 */ mfc1 $a2, $f22
/* FCF44 802D8594 0C01BE3C */ jal fx_big_smoke_puff
/* FCF48 802D8598 4600A386 */ mov.s $f14, $f20
/* FCF4C 802D859C 080B65A4 */ j .L802D9690
/* FCF50 802D85A0 00000000 */ nop
glabel .L802D85A4
/* FCF54 802D85A4 4405A000 */ mfc1 $a1, $f20
/* FCF58 802D85A8 4406B000 */ mfc1 $a2, $f22
/* FCF5C 802D85AC 4407C000 */ mfc1 $a3, $f24
/* FCF60 802D85B0 0C01BEB4 */ jal fx_landing_dust
/* FCF64 802D85B4 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FCF68 802D85B8 080B65A4 */ j .L802D9690
/* FCF6C 802D85BC 00000000 */ nop
glabel .L802D85C0
/* FCF70 802D85C0 4405A000 */ mfc1 $a1, $f20
/* FCF74 802D85C4 4406B000 */ mfc1 $a2, $f22
/* FCF78 802D85C8 4407C000 */ mfc1 $a3, $f24
/* FCF7C 802D85CC E7BA0010 */ swc1 $f26, 0x10($sp)
/* FCF80 802D85D0 0C01BECC */ jal fx_walking_dust
/* FCF84 802D85D4 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FCF88 802D85D8 080B65A4 */ j .L802D9690
/* FCF8C 802D85DC 00000000 */ nop
glabel .L802D85E0
/* FCF90 802D85E0 C7AC0058 */ lwc1 $f12, 0x58($sp)
/* FCF94 802D85E4 4406B000 */ mfc1 $a2, $f22
/* FCF98 802D85E8 4407C000 */ mfc1 $a3, $f24
/* FCF9C 802D85EC 0C01BEE4 */ jal fx_flower_splash
/* FCFA0 802D85F0 4600A386 */ mov.s $f14, $f20
/* FCFA4 802D85F4 080B65A4 */ j .L802D9690
/* FCFA8 802D85F8 00000000 */ nop
glabel .L802D85FC
/* FCFAC 802D85FC 4405A000 */ mfc1 $a1, $f20
/* FCFB0 802D8600 4406B000 */ mfc1 $a2, $f22
/* FCFB4 802D8604 4407C000 */ mfc1 $a3, $f24
/* FCFB8 802D8608 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FCFBC 802D860C 0C01BEFC */ jal fx_flower_trail
/* FCFC0 802D8610 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FCFC4 802D8614 080B65A4 */ j .L802D9690
/* FCFC8 802D8618 00000000 */ nop
glabel .L802D861C
/* FCFCC 802D861C C7AC0058 */ lwc1 $f12, 0x58($sp)
/* FCFD0 802D8620 4406B000 */ mfc1 $a2, $f22
/* FCFD4 802D8624 4407C000 */ mfc1 $a3, $f24
/* FCFD8 802D8628 0C01BF14 */ jal fx_cloud_puff
/* FCFDC 802D862C 4600A386 */ mov.s $f14, $f20
/* FCFE0 802D8630 080B65A4 */ j .L802D9690
/* FCFE4 802D8634 00000000 */ nop
glabel .L802D8638
/* FCFE8 802D8638 4405A000 */ mfc1 $a1, $f20
/* FCFEC 802D863C 4406B000 */ mfc1 $a2, $f22
/* FCFF0 802D8640 4407C000 */ mfc1 $a3, $f24
/* FCFF4 802D8644 0C01BF2C */ jal fx_cloud_trail
/* FCFF8 802D8648 00000000 */ nop
/* FCFFC 802D864C 080B65A4 */ j .L802D9690
/* FD000 802D8650 00000000 */ nop
glabel .L802D8654
/* FD004 802D8654 C7AC0058 */ lwc1 $f12, 0x58($sp)
/* FD008 802D8658 4406B000 */ mfc1 $a2, $f22
/* FD00C 802D865C 4407C000 */ mfc1 $a3, $f24
/* FD010 802D8660 4600A386 */ mov.s $f14, $f20
/* FD014 802D8664 0C01BF44 */ jal fx_footprint
/* FD018 802D8668 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD01C 802D866C 080B65A4 */ j .L802D9690
/* FD020 802D8670 00000000 */ nop
glabel .L802D8674
/* FD024 802D8674 8FA50058 */ lw $a1, 0x58($sp)
/* FD028 802D8678 4406A000 */ mfc1 $a2, $f20
/* FD02C 802D867C 4407B000 */ mfc1 $a3, $f22
/* FD030 802D8680 8FA3004C */ lw $v1, 0x4C($sp)
/* FD034 802D8684 0000202D */ daddu $a0, $zero, $zero
/* FD038 802D8688 0C01BF5C */ jal fx_floating_flower
/* FD03C 802D868C AFA30010 */ sw $v1, 0x10($sp)
/* FD040 802D8690 080B65A4 */ j .L802D9690
/* FD044 802D8694 00000000 */ nop
glabel .L802D8698
/* FD048 802D8698 C7AC0058 */ lwc1 $f12, 0x58($sp)
/* FD04C 802D869C 4406B000 */ mfc1 $a2, $f22
/* FD050 802D86A0 8FA7004C */ lw $a3, 0x4C($sp)
/* FD054 802D86A4 0C01BF74 */ jal fx_snowflake
/* FD058 802D86A8 4600A386 */ mov.s $f14, $f20
/* FD05C 802D86AC 080B65A4 */ j .L802D9690
/* FD060 802D86B0 00000000 */ nop
glabel .L802D86B4
/* FD064 802D86B4 4405A000 */ mfc1 $a1, $f20
/* FD068 802D86B8 4406B000 */ mfc1 $a2, $f22
/* FD06C 802D86BC 4407C000 */ mfc1 $a3, $f24
/* FD070 802D86C0 C7A2005C */ lwc1 $f2, 0x5C($sp)
/* FD074 802D86C4 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD078 802D86C8 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD07C 802D86CC E7BE0018 */ swc1 $f30, 0x18($sp)
/* FD080 802D86D0 0C01BF8C */ jal fx_star
/* FD084 802D86D4 E7A2001C */ swc1 $f2, 0x1C($sp)
/* FD088 802D86D8 080B65A4 */ j .L802D9690
/* FD08C 802D86DC 00000000 */ nop
glabel .L802D86E0
/* FD090 802D86E0 4406B000 */ mfc1 $a2, $f22
/* FD094 802D86E4 4407C000 */ mfc1 $a3, $f24
/* FD098 802D86E8 27A20030 */ addiu $v0, $sp, 0x30
/* FD09C 802D86EC E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD0A0 802D86F0 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD0A4 802D86F4 E7BE0018 */ swc1 $f30, 0x18($sp)
/* FD0A8 802D86F8 AFB7001C */ sw $s7, 0x1C($sp)
/* FD0AC 802D86FC 0C01BFA4 */ jal fx_emote
/* FD0B0 802D8700 AFA20020 */ sw $v0, 0x20($sp)
/* FD0B4 802D8704 080B6234 */ j .L802D88D0
/* FD0B8 802D8708 00000000 */ nop
glabel .L802D870C
/* FD0BC 802D870C 4405A000 */ mfc1 $a1, $f20
/* FD0C0 802D8710 4406B000 */ mfc1 $a2, $f22
/* FD0C4 802D8714 4407C000 */ mfc1 $a3, $f24
/* FD0C8 802D8718 0C01BFBC */ jal fx_sparkles
/* FD0CC 802D871C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD0D0 802D8720 080B65A4 */ j .L802D9690
/* FD0D4 802D8724 00000000 */ nop
glabel .L802D8728
/* FD0D8 802D8728 4405A000 */ mfc1 $a1, $f20
/* FD0DC 802D872C 4406B000 */ mfc1 $a2, $f22
/* FD0E0 802D8730 4407C000 */ mfc1 $a3, $f24
/* FD0E4 802D8734 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD0E8 802D8738 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD0EC 802D873C E7BE0018 */ swc1 $f30, 0x18($sp)
/* FD0F0 802D8740 0C01BFD4 */ jal fx_shape_spell
/* FD0F4 802D8744 AFB7001C */ sw $s7, 0x1C($sp)
/* FD0F8 802D8748 080B65A4 */ j .L802D9690
/* FD0FC 802D874C 00000000 */ nop
glabel .L802D8750
/* FD100 802D8750 4405A000 */ mfc1 $a1, $f20
/* FD104 802D8754 4406B000 */ mfc1 $a2, $f22
/* FD108 802D8758 4407C000 */ mfc1 $a3, $f24
/* FD10C 802D875C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD110 802D8760 0C01BFEC */ jal fx_gather_energy_pink
/* FD114 802D8764 AFB40014 */ sw $s4, 0x14($sp)
/* FD118 802D8768 080B65A4 */ j .L802D9690
/* FD11C 802D876C 00000000 */ nop
glabel .L802D8770
/* FD120 802D8770 4405A000 */ mfc1 $a1, $f20
/* FD124 802D8774 4406B000 */ mfc1 $a2, $f22
/* FD128 802D8778 4407C000 */ mfc1 $a3, $f24
/* FD12C 802D877C 0C01C004 */ jal fx_drop_leaves
/* FD130 802D8780 AFB60010 */ sw $s6, 0x10($sp)
/* FD134 802D8784 080B65A4 */ j .L802D9690
/* FD138 802D8788 00000000 */ nop
glabel .L802D878C
/* FD13C 802D878C 4405A000 */ mfc1 $a1, $f20
/* FD140 802D8790 4406B000 */ mfc1 $a2, $f22
/* FD144 802D8794 4407C000 */ mfc1 $a3, $f24
/* FD148 802D8798 0C01C01C */ jal fx_dust
/* FD14C 802D879C AFB60010 */ sw $s6, 0x10($sp)
/* FD150 802D87A0 080B65A4 */ j .L802D9690
/* FD154 802D87A4 00000000 */ nop
glabel .L802D87A8
/* FD158 802D87A8 4405A000 */ mfc1 $a1, $f20
/* FD15C 802D87AC 4406B000 */ mfc1 $a2, $f22
/* FD160 802D87B0 4407C000 */ mfc1 $a3, $f24
/* FD164 802D87B4 0C01C034 */ jal fx_shattering_stones
/* FD168 802D87B8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD16C 802D87BC 080B65A4 */ j .L802D9690
/* FD170 802D87C0 00000000 */ nop
glabel .L802D87C4
/* FD174 802D87C4 4405A000 */ mfc1 $a1, $f20
/* FD178 802D87C8 4406B000 */ mfc1 $a2, $f22
/* FD17C 802D87CC 4407C000 */ mfc1 $a3, $f24
/* FD180 802D87D0 0C01C04C */ jal fx_smoke_ring
/* FD184 802D87D4 00000000 */ nop
/* FD188 802D87D8 080B65A4 */ j .L802D9690
/* FD18C 802D87DC 00000000 */ nop
glabel .L802D87E0
/* FD190 802D87E0 4405A000 */ mfc1 $a1, $f20
/* FD194 802D87E4 4406B000 */ mfc1 $a2, $f22
/* FD198 802D87E8 4407C000 */ mfc1 $a3, $f24
/* FD19C 802D87EC E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD1A0 802D87F0 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD1A4 802D87F4 E7BE0018 */ swc1 $f30, 0x18($sp)
/* FD1A8 802D87F8 0C01C064 */ jal fx_damage_stars
/* FD1AC 802D87FC AFB7001C */ sw $s7, 0x1C($sp)
/* FD1B0 802D8800 080B65A4 */ j .L802D9690
/* FD1B4 802D8804 00000000 */ nop
glabel .L802D8808
/* FD1B8 802D8808 4405A000 */ mfc1 $a1, $f20
/* FD1BC 802D880C 4406B000 */ mfc1 $a2, $f22
/* FD1C0 802D8810 4407C000 */ mfc1 $a3, $f24
/* FD1C4 802D8814 0C01C07C */ jal fx_explosion
/* FD1C8 802D8818 00000000 */ nop
/* FD1CC 802D881C 080B65A4 */ j .L802D9690
/* FD1D0 802D8820 00000000 */ nop
glabel .L802D8824
/* FD1D4 802D8824 4405A000 */ mfc1 $a1, $f20
/* FD1D8 802D8828 4406B000 */ mfc1 $a2, $f22
/* FD1DC 802D882C 4407C000 */ mfc1 $a3, $f24
/* FD1E0 802D8830 0C01C094 */ jal fx_lens_flare
/* FD1E4 802D8834 AFB60010 */ sw $s6, 0x10($sp)
/* FD1E8 802D8838 080B65A4 */ j .L802D9690
/* FD1EC 802D883C 00000000 */ nop
glabel .L802D8840
/* FD1F0 802D8840 4405A000 */ mfc1 $a1, $f20
/* FD1F4 802D8844 4406B000 */ mfc1 $a2, $f22
/* FD1F8 802D8848 4407C000 */ mfc1 $a3, $f24
/* FD1FC 802D884C 27A20034 */ addiu $v0, $sp, 0x34
/* FD200 802D8850 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD204 802D8854 0C01C0AC */ jal fx_got_item_outline
/* FD208 802D8858 AFA20014 */ sw $v0, 0x14($sp)
/* FD20C 802D885C 080B6337 */ j .L802D8CDC
/* FD210 802D8860 00000000 */ nop
glabel .L802D8864
/* FD214 802D8864 4405A000 */ mfc1 $a1, $f20
/* FD218 802D8868 4406B000 */ mfc1 $a2, $f22
/* FD21C 802D886C 4407C000 */ mfc1 $a3, $f24
/* FD220 802D8870 0C01C0C4 */ jal fx_spiky_white_aura
/* FD224 802D8874 AFB60010 */ sw $s6, 0x10($sp)
/* FD228 802D8878 080B65A4 */ j .L802D9690
/* FD22C 802D887C 00000000 */ nop
glabel .L802D8880
/* FD230 802D8880 4405A000 */ mfc1 $a1, $f20
/* FD234 802D8884 4406B000 */ mfc1 $a2, $f22
/* FD238 802D8888 4407C000 */ mfc1 $a3, $f24
/* FD23C 802D888C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD240 802D8890 AFB40014 */ sw $s4, 0x14($sp)
/* FD244 802D8894 E7BE0018 */ swc1 $f30, 0x18($sp)
/* FD248 802D8898 0C01C0DC */ jal fx_smoke_impact
/* FD24C 802D889C AFB7001C */ sw $s7, 0x1C($sp)
/* FD250 802D88A0 080B65A4 */ j .L802D9690
/* FD254 802D88A4 00000000 */ nop
glabel .L802D88A8
/* FD258 802D88A8 4405A000 */ mfc1 $a1, $f20
/* FD25C 802D88AC 4406B000 */ mfc1 $a2, $f22
/* FD260 802D88B0 4407C000 */ mfc1 $a3, $f24
/* FD264 802D88B4 8FA30050 */ lw $v1, 0x50($sp)
/* FD268 802D88B8 27A20030 */ addiu $v0, $sp, 0x30
/* FD26C 802D88BC E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD270 802D88C0 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD274 802D88C4 AFA2001C */ sw $v0, 0x1C($sp)
/* FD278 802D88C8 0C01C0F4 */ jal fx_damage_indicator
/* FD27C 802D88CC AFA30018 */ sw $v1, 0x18($sp)
.L802D88D0:
/* FD280 802D88D0 8FA400C8 */ lw $a0, 0xC8($sp)
/* FD284 802D88D4 8FA60030 */ lw $a2, 0x30($sp)
/* FD288 802D88D8 0C0B2026 */ jal evt_set_variable
/* FD28C 802D88DC 0260282D */ daddu $a1, $s3, $zero
/* FD290 802D88E0 080B65A4 */ j .L802D9690
/* FD294 802D88E4 00000000 */ nop
glabel .L802D88E8
/* FD298 802D88E8 4405A000 */ mfc1 $a1, $f20
/* FD29C 802D88EC 4406B000 */ mfc1 $a2, $f22
/* FD2A0 802D88F0 4407C000 */ mfc1 $a3, $f24
/* FD2A4 802D88F4 C7A2005C */ lwc1 $f2, 0x5C($sp)
/* FD2A8 802D88F8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD2AC 802D88FC E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD2B0 802D8900 E7BE0018 */ swc1 $f30, 0x18($sp)
/* FD2B4 802D8904 0C01C10C */ jal fx_purple_ring
/* FD2B8 802D8908 E7A2001C */ swc1 $f2, 0x1C($sp)
/* FD2BC 802D890C 080B65A4 */ j .L802D9690
/* FD2C0 802D8910 00000000 */ nop
glabel .L802D8914
/* FD2C4 802D8914 4405A000 */ mfc1 $a1, $f20
/* FD2C8 802D8918 4406B000 */ mfc1 $a2, $f22
/* FD2CC 802D891C 4407C000 */ mfc1 $a3, $f24
/* FD2D0 802D8920 8FA30050 */ lw $v1, 0x50($sp)
/* FD2D4 802D8924 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD2D8 802D8928 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD2DC 802D892C 0C01C13C */ jal fx_stars_burst
/* FD2E0 802D8930 AFA30018 */ sw $v1, 0x18($sp)
/* FD2E4 802D8934 080B65A4 */ j .L802D9690
/* FD2E8 802D8938 00000000 */ nop
glabel .L802D893C
/* FD2EC 802D893C 4405A000 */ mfc1 $a1, $f20
/* FD2F0 802D8940 4406B000 */ mfc1 $a2, $f22
/* FD2F4 802D8944 4407C000 */ mfc1 $a3, $f24
/* FD2F8 802D8948 8FA30050 */ lw $v1, 0x50($sp)
/* FD2FC 802D894C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD300 802D8950 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD304 802D8954 AFB7001C */ sw $s7, 0x1C($sp)
/* FD308 802D8958 0C01C154 */ jal fx_stars_shimmer
/* FD30C 802D895C AFA30018 */ sw $v1, 0x18($sp)
/* FD310 802D8960 080B65A4 */ j .L802D9690
/* FD314 802D8964 00000000 */ nop
glabel .L802D8968
/* FD318 802D8968 4405A000 */ mfc1 $a1, $f20
/* FD31C 802D896C 4406B000 */ mfc1 $a2, $f22
/* FD320 802D8970 4407C000 */ mfc1 $a3, $f24
/* FD324 802D8974 0C01C16C */ jal fx_rising_bubble
/* FD328 802D8978 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD32C 802D897C 080B65A4 */ j .L802D9690
/* FD330 802D8980 00000000 */ nop
glabel .L802D8984
/* FD334 802D8984 4405A000 */ mfc1 $a1, $f20
/* FD338 802D8988 4406B000 */ mfc1 $a2, $f22
/* FD33C 802D898C 4407C000 */ mfc1 $a3, $f24
/* FD340 802D8990 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD344 802D8994 0C01C184 */ jal fx_ring_blast
/* FD348 802D8998 AFB40014 */ sw $s4, 0x14($sp)
/* FD34C 802D899C 080B65A4 */ j .L802D9690
/* FD350 802D89A0 00000000 */ nop
glabel .L802D89A4
/* FD354 802D89A4 4405A000 */ mfc1 $a1, $f20
/* FD358 802D89A8 4406B000 */ mfc1 $a2, $f22
/* FD35C 802D89AC 4407C000 */ mfc1 $a3, $f24
/* FD360 802D89B0 0C01C19C */ jal fx_shockwave
/* FD364 802D89B4 00000000 */ nop
/* FD368 802D89B8 080B65A4 */ j .L802D9690
/* FD36C 802D89BC 00000000 */ nop
glabel .L802D89C0
/* FD370 802D89C0 4405A000 */ mfc1 $a1, $f20
/* FD374 802D89C4 4406B000 */ mfc1 $a2, $f22
/* FD378 802D89C8 4407C000 */ mfc1 $a3, $f24
/* FD37C 802D89CC 0C01C1B4 */ jal fx_music_note
/* FD380 802D89D0 00000000 */ nop
/* FD384 802D89D4 080B65A4 */ j .L802D9690
/* FD388 802D89D8 00000000 */ nop
glabel .L802D89DC
/* FD38C 802D89DC 4405A000 */ mfc1 $a1, $f20
/* FD390 802D89E0 4406B000 */ mfc1 $a2, $f22
/* FD394 802D89E4 4407C000 */ mfc1 $a3, $f24
/* FD398 802D89E8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD39C 802D89EC 0C01C1CC */ jal fx_smoke_burst
/* FD3A0 802D89F0 AFB40014 */ sw $s4, 0x14($sp)
/* FD3A4 802D89F4 080B65A4 */ j .L802D9690
/* FD3A8 802D89F8 00000000 */ nop
glabel .L802D89FC
/* FD3AC 802D89FC 4405A000 */ mfc1 $a1, $f20
/* FD3B0 802D8A00 4406B000 */ mfc1 $a2, $f22
/* FD3B4 802D8A04 4407C000 */ mfc1 $a3, $f24
/* FD3B8 802D8A08 8FA30050 */ lw $v1, 0x50($sp)
/* FD3BC 802D8A0C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD3C0 802D8A10 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD3C4 802D8A14 0C01C1E4 */ jal fx_sweat
/* FD3C8 802D8A18 AFA30018 */ sw $v1, 0x18($sp)
/* FD3CC 802D8A1C 080B65A4 */ j .L802D9690
/* FD3D0 802D8A20 00000000 */ nop
glabel .L802D8A24
/* FD3D4 802D8A24 4405A000 */ mfc1 $a1, $f20
/* FD3D8 802D8A28 4406B000 */ mfc1 $a2, $f22
/* FD3DC 802D8A2C 4407C000 */ mfc1 $a3, $f24
/* FD3E0 802D8A30 27A20038 */ addiu $v0, $sp, 0x38
/* FD3E4 802D8A34 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD3E8 802D8A38 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD3EC 802D8A3C 0C01C1FC */ jal fx_sleep_bubble
/* FD3F0 802D8A40 AFA20018 */ sw $v0, 0x18($sp)
/* FD3F4 802D8A44 080B62C2 */ j .L802D8B08
/* FD3F8 802D8A48 00000000 */ nop
glabel .L802D8A4C
/* FD3FC 802D8A4C 4405A000 */ mfc1 $a1, $f20
/* FD400 802D8A50 4406B000 */ mfc1 $a2, $f22
/* FD404 802D8A54 4407C000 */ mfc1 $a3, $f24
/* FD408 802D8A58 0C01C22C */ jal fx_windy_leaves
/* FD40C 802D8A5C 00000000 */ nop
/* FD410 802D8A60 080B65A4 */ j .L802D9690
/* FD414 802D8A64 00000000 */ nop
glabel .L802D8A68
/* FD418 802D8A68 4405A000 */ mfc1 $a1, $f20
/* FD41C 802D8A6C 4406B000 */ mfc1 $a2, $f22
/* FD420 802D8A70 4407C000 */ mfc1 $a3, $f24
/* FD424 802D8A74 27A20034 */ addiu $v0, $sp, 0x34
/* FD428 802D8A78 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD42C 802D8A7C 0C01C124 */ jal fx_flame
/* FD430 802D8A80 AFA20014 */ sw $v0, 0x14($sp)
/* FD434 802D8A84 080B6337 */ j .L802D8CDC
/* FD438 802D8A88 00000000 */ nop
glabel .L802D8A8C
/* FD43C 802D8A8C 4405A000 */ mfc1 $a1, $f20
/* FD440 802D8A90 4406B000 */ mfc1 $a2, $f22
/* FD444 802D8A94 4407C000 */ mfc1 $a3, $f24
/* FD448 802D8A98 0C01C244 */ jal fx_falling_leaves
/* FD44C 802D8A9C 00000000 */ nop
/* FD450 802D8AA0 080B65A4 */ j .L802D9690
/* FD454 802D8AA4 00000000 */ nop
glabel .L802D8AA8
/* FD458 802D8AA8 4405A000 */ mfc1 $a1, $f20
/* FD45C 802D8AAC 4406B000 */ mfc1 $a2, $f22
/* FD460 802D8AB0 4407C000 */ mfc1 $a3, $f24
/* FD464 802D8AB4 AFB60010 */ sw $s6, 0x10($sp)
/* FD468 802D8AB8 0C01C25C */ jal fx_stars_spread
/* FD46C 802D8ABC AFB40014 */ sw $s4, 0x14($sp)
/* FD470 802D8AC0 080B65A4 */ j .L802D9690
/* FD474 802D8AC4 00000000 */ nop
glabel .L802D8AC8
/* FD478 802D8AC8 4405A000 */ mfc1 $a1, $f20
/* FD47C 802D8ACC 4406B000 */ mfc1 $a2, $f22
/* FD480 802D8AD0 4407C000 */ mfc1 $a3, $f24
/* FD484 802D8AD4 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD488 802D8AD8 0C01C274 */ jal fx_steam_burst
/* FD48C 802D8ADC AFB40014 */ sw $s4, 0x14($sp)
/* FD490 802D8AE0 080B65A4 */ j .L802D9690
/* FD494 802D8AE4 00000000 */ nop
glabel .L802D8AE8
/* FD498 802D8AE8 4405A000 */ mfc1 $a1, $f20
/* FD49C 802D8AEC 4406B000 */ mfc1 $a2, $f22
/* FD4A0 802D8AF0 4407C000 */ mfc1 $a3, $f24
/* FD4A4 802D8AF4 27A20038 */ addiu $v0, $sp, 0x38
/* FD4A8 802D8AF8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD4AC 802D8AFC AFB40014 */ sw $s4, 0x14($sp)
/* FD4B0 802D8B00 0C01C28C */ jal fx_stars_orbiting
/* FD4B4 802D8B04 AFA20018 */ sw $v0, 0x18($sp)
.L802D8B08:
/* FD4B8 802D8B08 8FA400C8 */ lw $a0, 0xC8($sp)
/* FD4BC 802D8B0C 8FA60038 */ lw $a2, 0x38($sp)
/* FD4C0 802D8B10 0C0B2026 */ jal evt_set_variable
/* FD4C4 802D8B14 8FA5006C */ lw $a1, 0x6C($sp)
/* FD4C8 802D8B18 080B65A4 */ j .L802D9690
/* FD4CC 802D8B1C 00000000 */ nop
glabel .L802D8B20
/* FD4D0 802D8B20 4405A000 */ mfc1 $a1, $f20
/* FD4D4 802D8B24 4406B000 */ mfc1 $a2, $f22
/* FD4D8 802D8B28 4407C000 */ mfc1 $a3, $f24
/* FD4DC 802D8B2C 0C01C2A4 */ jal fx_big_snowflakes
/* FD4E0 802D8B30 00000000 */ nop
/* FD4E4 802D8B34 080B65A4 */ j .L802D9690
/* FD4E8 802D8B38 00000000 */ nop
glabel .L802D8B3C
/* FD4EC 802D8B3C 4405A000 */ mfc1 $a1, $f20
/* FD4F0 802D8B40 4406B000 */ mfc1 $a2, $f22
/* FD4F4 802D8B44 4407C000 */ mfc1 $a3, $f24
/* FD4F8 802D8B48 0C01C2BC */ jal fx_debuff
/* FD4FC 802D8B4C 00000000 */ nop
/* FD500 802D8B50 080B65A4 */ j .L802D9690
/* FD504 802D8B54 00000000 */ nop
glabel .L802D8B58
/* FD508 802D8B58 4405A000 */ mfc1 $a1, $f20
/* FD50C 802D8B5C 4406B000 */ mfc1 $a2, $f22
/* FD510 802D8B60 4407C000 */ mfc1 $a3, $f24
/* FD514 802D8B64 0C01C2D4 */ jal fx_green_impact
/* FD518 802D8B68 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD51C 802D8B6C 080B65A4 */ j .L802D9690
/* FD520 802D8B70 00000000 */ nop
glabel .L802D8B74
/* FD524 802D8B74 4405A000 */ mfc1 $a1, $f20
/* FD528 802D8B78 4406B000 */ mfc1 $a2, $f22
/* FD52C 802D8B7C 4407C000 */ mfc1 $a3, $f24
/* FD530 802D8B80 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD534 802D8B84 0C01C2EC */ jal fx_radial_shimmer
/* FD538 802D8B88 AFB40014 */ sw $s4, 0x14($sp)
/* FD53C 802D8B8C 080B65A4 */ j .L802D9690
/* FD540 802D8B90 00000000 */ nop
glabel .L802D8B94
/* FD544 802D8B94 4405A000 */ mfc1 $a1, $f20
/* FD548 802D8B98 4406B000 */ mfc1 $a2, $f22
/* FD54C 802D8B9C 4407C000 */ mfc1 $a3, $f24
/* FD550 802D8BA0 27A20034 */ addiu $v0, $sp, 0x34
/* FD554 802D8BA4 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD558 802D8BA8 0C01C304 */ jal fx_ending_decals
/* FD55C 802D8BAC AFA20014 */ sw $v0, 0x14($sp)
/* FD560 802D8BB0 080B6337 */ j .L802D8CDC
/* FD564 802D8BB4 00000000 */ nop
glabel .L802D8BB8
/* FD568 802D8BB8 4405A000 */ mfc1 $a1, $f20
/* FD56C 802D8BBC 4406B000 */ mfc1 $a2, $f22
/* FD570 802D8BC0 4407C000 */ mfc1 $a3, $f24
/* FD574 802D8BC4 27A20034 */ addiu $v0, $sp, 0x34
/* FD578 802D8BC8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD57C 802D8BCC 0C01C31C */ jal fx_light_rays
/* FD580 802D8BD0 AFA20014 */ sw $v0, 0x14($sp)
/* FD584 802D8BD4 080B6337 */ j .L802D8CDC
/* FD588 802D8BD8 00000000 */ nop
glabel .L802D8BDC
/* FD58C 802D8BDC 4405A000 */ mfc1 $a1, $f20
/* FD590 802D8BE0 4406B000 */ mfc1 $a2, $f22
/* FD594 802D8BE4 4407C000 */ mfc1 $a3, $f24
/* FD598 802D8BE8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD59C 802D8BEC 0C01C334 */ jal fx_lightning
/* FD5A0 802D8BF0 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD5A4 802D8BF4 080B65A4 */ j .L802D9690
/* FD5A8 802D8BF8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8BFC
/* FD5AC 802D8BFC 4405A000 */ mfc1 $a1, $f20
/* FD5B0 802D8C00 4406B000 */ mfc1 $a2, $f22
/* FD5B4 802D8C04 4407C000 */ mfc1 $a3, $f24
/* FD5B8 802D8C08 8FA30054 */ lw $v1, 0x54($sp)
/* FD5BC 802D8C0C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD5C0 802D8C10 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD5C4 802D8C14 E7BE0018 */ swc1 $f30, 0x18($sp)
/* FD5C8 802D8C18 AFB7001C */ sw $s7, 0x1C($sp)
/* FD5CC 802D8C1C AFBE0020 */ sw $fp, 0x20($sp)
/* FD5D0 802D8C20 0C01C34C */ jal fx_fire_breath
/* FD5D4 802D8C24 AFA30024 */ sw $v1, 0x24($sp)
/* FD5D8 802D8C28 080B65A4 */ j .L802D9690
/* FD5DC 802D8C2C 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8C30
/* FD5E0 802D8C30 4405A000 */ mfc1 $a1, $f20
/* FD5E4 802D8C34 4406B000 */ mfc1 $a2, $f22
/* FD5E8 802D8C38 4407C000 */ mfc1 $a3, $f24
/* FD5EC 802D8C3C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD5F0 802D8C40 0C01C364 */ jal fx_shimmer_burst
/* FD5F4 802D8C44 AFB40014 */ sw $s4, 0x14($sp)
/* FD5F8 802D8C48 080B65A4 */ j .L802D9690
/* FD5FC 802D8C4C 00000000 */ nop
glabel .L802D8C50
/* FD600 802D8C50 4405A000 */ mfc1 $a1, $f20
/* FD604 802D8C54 4406B000 */ mfc1 $a2, $f22
/* FD608 802D8C58 4407C000 */ mfc1 $a3, $f24
/* FD60C 802D8C5C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD610 802D8C60 0C01C37C */ jal fx_energy_shockwave
/* FD614 802D8C64 AFB40014 */ sw $s4, 0x14($sp)
/* FD618 802D8C68 080B65A4 */ j .L802D9690
/* FD61C 802D8C6C 00000000 */ nop
glabel .L802D8C70
/* FD620 802D8C70 4405A000 */ mfc1 $a1, $f20
/* FD624 802D8C74 4406B000 */ mfc1 $a2, $f22
/* FD628 802D8C78 4407C000 */ mfc1 $a3, $f24
/* FD62C 802D8C7C 8FA30050 */ lw $v1, 0x50($sp)
/* FD630 802D8C80 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD634 802D8C84 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD638 802D8C88 AFB7001C */ sw $s7, 0x1C($sp)
/* FD63C 802D8C8C 0C01C394 */ jal fx_shimmer_wave
/* FD640 802D8C90 AFA30018 */ sw $v1, 0x18($sp)
/* FD644 802D8C94 080B65A4 */ j .L802D9690
/* FD648 802D8C98 00000000 */ nop
glabel .L802D8C9C
/* FD64C 802D8C9C 4405A000 */ mfc1 $a1, $f20
/* FD650 802D8CA0 4406B000 */ mfc1 $a2, $f22
/* FD654 802D8CA4 4407C000 */ mfc1 $a3, $f24
/* FD658 802D8CA8 27A20034 */ addiu $v0, $sp, 0x34
/* FD65C 802D8CAC E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD660 802D8CB0 0C01C3AC */ jal fx_aura
/* FD664 802D8CB4 AFA20014 */ sw $v0, 0x14($sp)
/* FD668 802D8CB8 080B6337 */ j .L802D8CDC
/* FD66C 802D8CBC 00000000 */ nop
glabel .L802D8CC0
/* FD670 802D8CC0 4405A000 */ mfc1 $a1, $f20
/* FD674 802D8CC4 4406B000 */ mfc1 $a2, $f22
/* FD678 802D8CC8 4407C000 */ mfc1 $a3, $f24
/* FD67C 802D8CCC 27A20034 */ addiu $v0, $sp, 0x34
/* FD680 802D8CD0 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD684 802D8CD4 0C01C3C4 */ jal fx_bulb_glow
/* FD688 802D8CD8 AFA20014 */ sw $v0, 0x14($sp)
.L802D8CDC:
/* FD68C 802D8CDC 8FA400C8 */ lw $a0, 0xC8($sp)
/* FD690 802D8CE0 8FA60034 */ lw $a2, 0x34($sp)
/* FD694 802D8CE4 0C0B2026 */ jal evt_set_variable
/* FD698 802D8CE8 0200282D */ daddu $a1, $s0, $zero
/* FD69C 802D8CEC 080B65A4 */ j .L802D9690
/* FD6A0 802D8CF0 00000000 */ nop
glabel .L802D8CF4
/* FD6A4 802D8CF4 4405A000 */ mfc1 $a1, $f20
/* FD6A8 802D8CF8 4406B000 */ mfc1 $a2, $f22
/* FD6AC 802D8CFC 4407C000 */ mfc1 $a3, $f24
/* FD6B0 802D8D00 27A2003C */ addiu $v0, $sp, 0x3C
/* FD6B4 802D8D04 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD6B8 802D8D08 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD6BC 802D8D0C E7BE0018 */ swc1 $f30, 0x18($sp)
/* FD6C0 802D8D10 AFB7001C */ sw $s7, 0x1C($sp)
/* FD6C4 802D8D14 0C01C3DC */ jal fx_3D
/* FD6C8 802D8D18 AFA20020 */ sw $v0, 0x20($sp)
/* FD6CC 802D8D1C 8FA400C8 */ lw $a0, 0xC8($sp)
/* FD6D0 802D8D20 8FA6003C */ lw $a2, 0x3C($sp)
/* FD6D4 802D8D24 0C0B2026 */ jal evt_set_variable
/* FD6D8 802D8D28 0220282D */ daddu $a1, $s1, $zero
/* FD6DC 802D8D2C 080B65A4 */ j .L802D9690
/* FD6E0 802D8D30 00000000 */ nop
glabel .L802D8D34
/* FD6E4 802D8D34 4405A000 */ mfc1 $a1, $f20
/* FD6E8 802D8D38 4406B000 */ mfc1 $a2, $f22
/* FD6EC 802D8D3C 4407C000 */ mfc1 $a3, $f24
/* FD6F0 802D8D40 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD6F4 802D8D44 0C01C3F4 */ jal fx_blast
/* FD6F8 802D8D48 AFB40014 */ sw $s4, 0x14($sp)
/* FD6FC 802D8D4C 080B65A4 */ j .L802D9690
/* FD700 802D8D50 00000000 */ nop
glabel .L802D8D54
/* FD704 802D8D54 4405A000 */ mfc1 $a1, $f20
/* FD708 802D8D58 4406B000 */ mfc1 $a2, $f22
/* FD70C 802D8D5C 4407C000 */ mfc1 $a3, $f24
/* FD710 802D8D60 0C01C40C */ jal fx_fire_flower
/* FD714 802D8D64 AFB60010 */ sw $s6, 0x10($sp)
/* FD718 802D8D68 080B65A4 */ j .L802D9690
/* FD71C 802D8D6C 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8D70
/* FD720 802D8D70 4405A000 */ mfc1 $a1, $f20
/* FD724 802D8D74 4406B000 */ mfc1 $a2, $f22
/* FD728 802D8D78 4407C000 */ mfc1 $a3, $f24
/* FD72C 802D8D7C 0C01C424 */ jal fx_recover
/* FD730 802D8D80 AFB60010 */ sw $s6, 0x10($sp)
/* FD734 802D8D84 080B65A4 */ j .L802D9690
/* FD738 802D8D88 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8D8C
/* FD73C 802D8D8C 4405A000 */ mfc1 $a1, $f20
/* FD740 802D8D90 4406B000 */ mfc1 $a2, $f22
/* FD744 802D8D94 4407C000 */ mfc1 $a3, $f24
/* FD748 802D8D98 0C01C43C */ jal fx_disable_x
/* FD74C 802D8D9C AFB60010 */ sw $s6, 0x10($sp)
/* FD750 802D8DA0 080B65A4 */ j .L802D9690
/* FD754 802D8DA4 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8DA8
/* FD758 802D8DA8 8FA50044 */ lw $a1, 0x44($sp)
/* FD75C 802D8DAC 4407C000 */ mfc1 $a3, $f24
/* FD760 802D8DB0 8FA60048 */ lw $a2, 0x48($sp)
/* FD764 802D8DB4 AFB60010 */ sw $s6, 0x10($sp)
/* FD768 802D8DB8 0C01C454 */ jal fx_bombette_breaking
/* FD76C 802D8DBC AFB40014 */ sw $s4, 0x14($sp)
/* FD770 802D8DC0 080B65A4 */ j .L802D9690
/* FD774 802D8DC4 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8DC8
/* FD778 802D8DC8 4405A000 */ mfc1 $a1, $f20
/* FD77C 802D8DCC 4406B000 */ mfc1 $a2, $f22
/* FD780 802D8DD0 4407C000 */ mfc1 $a3, $f24
/* FD784 802D8DD4 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD788 802D8DD8 0C01C46C */ jal fx_firework
/* FD78C 802D8DDC AFB40014 */ sw $s4, 0x14($sp)
/* FD790 802D8DE0 080B65A4 */ j .L802D9690
/* FD794 802D8DE4 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8DE8
/* FD798 802D8DE8 4405A000 */ mfc1 $a1, $f20
/* FD79C 802D8DEC 4406B000 */ mfc1 $a2, $f22
/* FD7A0 802D8DF0 4407C000 */ mfc1 $a3, $f24
/* FD7A4 802D8DF4 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD7A8 802D8DF8 0C01C484 */ jal fx_confetti
/* FD7AC 802D8DFC AFB40014 */ sw $s4, 0x14($sp)
/* FD7B0 802D8E00 080B65A4 */ j .L802D9690
/* FD7B4 802D8E04 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8E08
/* FD7B8 802D8E08 8FA50044 */ lw $a1, 0x44($sp)
/* FD7BC 802D8E0C 0C01C49C */ jal fx_snowfall
/* FD7C0 802D8E10 00000000 */ nop
/* FD7C4 802D8E14 080B65A4 */ j .L802D9690
/* FD7C8 802D8E18 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8E1C
/* FD7CC 802D8E1C 4406B000 */ mfc1 $a2, $f22
/* FD7D0 802D8E20 0C01C4B4 */ jal fx_46
/* FD7D4 802D8E24 8FA7004C */ lw $a3, 0x4C($sp)
/* FD7D8 802D8E28 080B65A4 */ j .L802D9690
/* FD7DC 802D8E2C 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8E30
/* FD7E0 802D8E30 4405A000 */ mfc1 $a1, $f20
/* FD7E4 802D8E34 4406B000 */ mfc1 $a2, $f22
/* FD7E8 802D8E38 4407C000 */ mfc1 $a3, $f24
/* FD7EC 802D8E3C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD7F0 802D8E40 0C01C4CC */ jal fx_gather_magic
/* FD7F4 802D8E44 AFB40014 */ sw $s4, 0x14($sp)
/* FD7F8 802D8E48 080B65A4 */ j .L802D9690
/* FD7FC 802D8E4C 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8E50
/* FD800 802D8E50 4405A000 */ mfc1 $a1, $f20
/* FD804 802D8E54 4406B000 */ mfc1 $a2, $f22
/* FD808 802D8E58 4407C000 */ mfc1 $a3, $f24
/* FD80C 802D8E5C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD810 802D8E60 0C01C4E4 */ jal fx_attack_result_text
/* FD814 802D8E64 AFB40014 */ sw $s4, 0x14($sp)
/* FD818 802D8E68 080B65A4 */ j .L802D9690
/* FD81C 802D8E6C 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8E70
/* FD820 802D8E70 4405A000 */ mfc1 $a1, $f20
/* FD824 802D8E74 4406B000 */ mfc1 $a2, $f22
/* FD828 802D8E78 4407C000 */ mfc1 $a3, $f24
/* FD82C 802D8E7C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD830 802D8E80 0C01C4FC */ jal fx_small_gold_sparkle
/* FD834 802D8E84 AFB40014 */ sw $s4, 0x14($sp)
/* FD838 802D8E88 080B65A4 */ j .L802D9690
/* FD83C 802D8E8C 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8E90
/* FD840 802D8E90 4405A000 */ mfc1 $a1, $f20
/* FD844 802D8E94 4406B000 */ mfc1 $a2, $f22
/* FD848 802D8E98 4407C000 */ mfc1 $a3, $f24
/* FD84C 802D8E9C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD850 802D8EA0 0C01C514 */ jal fx_flashing_box_shockwave
/* FD854 802D8EA4 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD858 802D8EA8 080B65A4 */ j .L802D9690
/* FD85C 802D8EAC 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8EB0
/* FD860 802D8EB0 4405A000 */ mfc1 $a1, $f20
/* FD864 802D8EB4 4406B000 */ mfc1 $a2, $f22
/* FD868 802D8EB8 4407C000 */ mfc1 $a3, $f24
/* FD86C 802D8EBC E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD870 802D8EC0 0C01C52C */ jal fx_balloon
/* FD874 802D8EC4 AFB40014 */ sw $s4, 0x14($sp)
/* FD878 802D8EC8 080B65A4 */ j .L802D9690
/* FD87C 802D8ECC 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8ED0
/* FD880 802D8ED0 4405A000 */ mfc1 $a1, $f20
/* FD884 802D8ED4 4406B000 */ mfc1 $a2, $f22
/* FD888 802D8ED8 4407C000 */ mfc1 $a3, $f24
/* FD88C 802D8EDC C7A2005C */ lwc1 $f2, 0x5C($sp)
/* FD890 802D8EE0 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD894 802D8EE4 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FD898 802D8EE8 E7BE0018 */ swc1 $f30, 0x18($sp)
/* FD89C 802D8EEC AFBE0020 */ sw $fp, 0x20($sp)
/* FD8A0 802D8EF0 0C01C544 */ jal fx_floating_rock
/* FD8A4 802D8EF4 E7A2001C */ swc1 $f2, 0x1C($sp)
/* FD8A8 802D8EF8 080B65A4 */ j .L802D9690
/* FD8AC 802D8EFC 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8F00
/* FD8B0 802D8F00 4600E08D */ trunc.w.s $f2, $f28
/* FD8B4 802D8F04 E7A20014 */ swc1 $f2, 0x14($sp)
/* FD8B8 802D8F08 C7A2005C */ lwc1 $f2, 0x5C($sp)
/* FD8BC 802D8F0C 4405A000 */ mfc1 $a1, $f20
/* FD8C0 802D8F10 4406B000 */ mfc1 $a2, $f22
/* FD8C4 802D8F14 4407C000 */ mfc1 $a3, $f24
/* FD8C8 802D8F18 4600108D */ trunc.w.s $f2, $f2
/* FD8CC 802D8F1C E7A2001C */ swc1 $f2, 0x1C($sp)
/* FD8D0 802D8F20 C7A20060 */ lwc1 $f2, 0x60($sp)
/* FD8D4 802D8F24 8FA30054 */ lw $v1, 0x54($sp)
/* FD8D8 802D8F28 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD8DC 802D8F2C E7BE0018 */ swc1 $f30, 0x18($sp)
/* FD8E0 802D8F30 E7A20020 */ swc1 $f2, 0x20($sp)
/* FD8E4 802D8F34 0C01C55C */ jal fx_chomp_drop
/* FD8E8 802D8F38 AFA30024 */ sw $v1, 0x24($sp)
/* FD8EC 802D8F3C 080B65A4 */ j .L802D9690
/* FD8F0 802D8F40 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8F44
/* FD8F4 802D8F44 4405A000 */ mfc1 $a1, $f20
/* FD8F8 802D8F48 4406B000 */ mfc1 $a2, $f22
/* FD8FC 802D8F4C 4407C000 */ mfc1 $a3, $f24
/* FD900 802D8F50 0C01C574 */ jal fx_quizmo_stage
/* FD904 802D8F54 00000000 */ nop
/* FD908 802D8F58 080B65A4 */ j .L802D9690
/* FD90C 802D8F5C 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8F60
/* FD910 802D8F60 4405A000 */ mfc1 $a1, $f20
/* FD914 802D8F64 4406B000 */ mfc1 $a2, $f22
/* FD918 802D8F68 4407C000 */ mfc1 $a3, $f24
/* FD91C 802D8F6C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD920 802D8F70 0C01C58C */ jal fx_radiating_energy_orb
/* FD924 802D8F74 AFB40014 */ sw $s4, 0x14($sp)
/* FD928 802D8F78 080B65A4 */ j .L802D9690
/* FD92C 802D8F7C 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8F80
/* FD930 802D8F80 4405A000 */ mfc1 $a1, $f20
/* FD934 802D8F84 4406B000 */ mfc1 $a2, $f22
/* FD938 802D8F88 4407C000 */ mfc1 $a3, $f24
/* FD93C 802D8F8C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD940 802D8F90 0C01C5D4 */ jal fx_energy_orb_wave
/* FD944 802D8F94 AFB40014 */ sw $s4, 0x14($sp)
/* FD948 802D8F98 080B65A4 */ j .L802D9690
/* FD94C 802D8F9C 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8FA0
/* FD950 802D8FA0 4405A000 */ mfc1 $a1, $f20
/* FD954 802D8FA4 4406B000 */ mfc1 $a2, $f22
/* FD958 802D8FA8 4407C000 */ mfc1 $a3, $f24
/* FD95C 802D8FAC 0C01C5EC */ jal fx_merlin_house_stars
/* FD960 802D8FB0 00000000 */ nop
/* FD964 802D8FB4 080B65A4 */ j .L802D9690
/* FD968 802D8FB8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8FBC
/* FD96C 802D8FBC 4405A000 */ mfc1 $a1, $f20
/* FD970 802D8FC0 4406B000 */ mfc1 $a2, $f22
/* FD974 802D8FC4 4407C000 */ mfc1 $a3, $f24
/* FD978 802D8FC8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD97C 802D8FCC 0C01C5BC */ jal fx_motion_blur_flame
/* FD980 802D8FD0 AFB40014 */ sw $s4, 0x14($sp)
/* FD984 802D8FD4 080B65A4 */ j .L802D9690
/* FD988 802D8FD8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8FDC
/* FD98C 802D8FDC 4405A000 */ mfc1 $a1, $f20
/* FD990 802D8FE0 4406B000 */ mfc1 $a2, $f22
/* FD994 802D8FE4 4407C000 */ mfc1 $a3, $f24
/* FD998 802D8FE8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD99C 802D8FEC 0C01C634 */ jal fx_stat_change
/* FD9A0 802D8FF0 AFB40014 */ sw $s4, 0x14($sp)
/* FD9A4 802D8FF4 080B65A4 */ j .L802D9690
/* FD9A8 802D8FF8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D8FFC
/* FD9AC 802D8FFC 4405A000 */ mfc1 $a1, $f20
/* FD9B0 802D9000 4406B000 */ mfc1 $a2, $f22
/* FD9B4 802D9004 4407C000 */ mfc1 $a3, $f24
/* FD9B8 802D9008 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD9BC 802D900C 0C01C64C */ jal fx_snaking_static
/* FD9C0 802D9010 AFB40014 */ sw $s4, 0x14($sp)
/* FD9C4 802D9014 080B65A4 */ j .L802D9690
/* FD9C8 802D9018 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D901C
/* FD9CC 802D901C 4405A000 */ mfc1 $a1, $f20
/* FD9D0 802D9020 4406B000 */ mfc1 $a2, $f22
/* FD9D4 802D9024 4407C000 */ mfc1 $a3, $f24
/* FD9D8 802D9028 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FD9DC 802D902C 0C01C664 */ jal fx_thunderbolt_ring
/* FD9E0 802D9030 AFB40014 */ sw $s4, 0x14($sp)
/* FD9E4 802D9034 080B65A4 */ j .L802D9690
/* FD9E8 802D9038 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D903C
/* FD9EC 802D903C 4405A000 */ mfc1 $a1, $f20
/* FD9F0 802D9040 4406B000 */ mfc1 $a2, $f22
/* FD9F4 802D9044 4407C000 */ mfc1 $a3, $f24
/* FD9F8 802D9048 C7A2005C */ lwc1 $f2, 0x5C($sp)
/* FD9FC 802D904C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDA00 802D9050 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FDA04 802D9054 E7BE0018 */ swc1 $f30, 0x18($sp)
/* FDA08 802D9058 AFBE0020 */ sw $fp, 0x20($sp)
/* FDA0C 802D905C 0C01C67C */ jal fx_squirt
/* FDA10 802D9060 E7A2001C */ swc1 $f2, 0x1C($sp)
/* FDA14 802D9064 080B65A4 */ j .L802D9690
/* FDA18 802D9068 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D906C
/* FDA1C 802D906C 4405A000 */ mfc1 $a1, $f20
/* FDA20 802D9070 4406B000 */ mfc1 $a2, $f22
/* FDA24 802D9074 4407C000 */ mfc1 $a3, $f24
/* FDA28 802D9078 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDA2C 802D907C 0C01C694 */ jal fx_water_block
/* FDA30 802D9080 AFB40014 */ sw $s4, 0x14($sp)
/* FDA34 802D9084 080B65A4 */ j .L802D9690
/* FDA38 802D9088 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D908C
/* FDA3C 802D908C 4405A000 */ mfc1 $a1, $f20
/* FDA40 802D9090 4406B000 */ mfc1 $a2, $f22
/* FDA44 802D9094 4407C000 */ mfc1 $a3, $f24
/* FDA48 802D9098 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDA4C 802D909C 0C01C6AC */ jal fx_waterfall
/* FDA50 802D90A0 AFB40014 */ sw $s4, 0x14($sp)
/* FDA54 802D90A4 080B65A4 */ j .L802D9690
/* FDA58 802D90A8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D90AC
/* FDA5C 802D90AC 4405A000 */ mfc1 $a1, $f20
/* FDA60 802D90B0 4406B000 */ mfc1 $a2, $f22
/* FDA64 802D90B4 4407C000 */ mfc1 $a3, $f24
/* FDA68 802D90B8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDA6C 802D90BC 0C01C6C4 */ jal fx_water_fountain
/* FDA70 802D90C0 AFB40014 */ sw $s4, 0x14($sp)
/* FDA74 802D90C4 080B65A4 */ j .L802D9690
/* FDA78 802D90C8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D90CC
/* FDA7C 802D90CC 4405A000 */ mfc1 $a1, $f20
/* FDA80 802D90D0 4406B000 */ mfc1 $a2, $f22
/* FDA84 802D90D4 4407C000 */ mfc1 $a3, $f24
/* FDA88 802D90D8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDA8C 802D90DC 0C01C6DC */ jal fx_underwater
/* FDA90 802D90E0 AFB40014 */ sw $s4, 0x14($sp)
/* FDA94 802D90E4 080B65A4 */ j .L802D9690
/* FDA98 802D90E8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D90EC
/* FDA9C 802D90EC 4405A000 */ mfc1 $a1, $f20
/* FDAA0 802D90F0 4406B000 */ mfc1 $a2, $f22
/* FDAA4 802D90F4 4407C000 */ mfc1 $a3, $f24
/* FDAA8 802D90F8 C7A2005C */ lwc1 $f2, 0x5C($sp)
/* FDAAC 802D90FC E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDAB0 802D9100 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FDAB4 802D9104 E7BE0018 */ swc1 $f30, 0x18($sp)
/* FDAB8 802D9108 AFBE0020 */ sw $fp, 0x20($sp)
/* FDABC 802D910C 0C01C6F4 */ jal fx_lightning_bolt
/* FDAC0 802D9110 E7A2001C */ swc1 $f2, 0x1C($sp)
/* FDAC4 802D9114 080B65A4 */ j .L802D9690
/* FDAC8 802D9118 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D911C
/* FDACC 802D911C 4405A000 */ mfc1 $a1, $f20
/* FDAD0 802D9120 4406B000 */ mfc1 $a2, $f22
/* FDAD4 802D9124 4407C000 */ mfc1 $a3, $f24
/* FDAD8 802D9128 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDADC 802D912C 0C01C70C */ jal fx_water_splash
/* FDAE0 802D9130 AFB40014 */ sw $s4, 0x14($sp)
/* FDAE4 802D9134 080B65A4 */ j .L802D9690
/* FDAE8 802D9138 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D913C
/* FDAEC 802D913C 4405A000 */ mfc1 $a1, $f20
/* FDAF0 802D9140 4406B000 */ mfc1 $a2, $f22
/* FDAF4 802D9144 4407C000 */ mfc1 $a3, $f24
/* FDAF8 802D9148 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDAFC 802D914C 0C01C724 */ jal fx_snowman_doll
/* FDB00 802D9150 AFB40014 */ sw $s4, 0x14($sp)
/* FDB04 802D9154 080B65A4 */ j .L802D9690
/* FDB08 802D9158 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D915C
/* FDB0C 802D915C 4405A000 */ mfc1 $a1, $f20
/* FDB10 802D9160 4406B000 */ mfc1 $a2, $f22
/* FDB14 802D9164 4407C000 */ mfc1 $a3, $f24
/* FDB18 802D9168 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDB1C 802D916C 0C01C73C */ jal fx_fright_jar
/* FDB20 802D9170 AFB40014 */ sw $s4, 0x14($sp)
/* FDB24 802D9174 080B65A4 */ j .L802D9690
/* FDB28 802D9178 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D917C
/* FDB2C 802D917C 4405A000 */ mfc1 $a1, $f20
/* FDB30 802D9180 4406B000 */ mfc1 $a2, $f22
/* FDB34 802D9184 4407C000 */ mfc1 $a3, $f24
/* FDB38 802D9188 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDB3C 802D918C 0C01C754 */ jal fx_stop_watch
/* FDB40 802D9190 AFB40014 */ sw $s4, 0x14($sp)
/* FDB44 802D9194 080B65A4 */ j .L802D9690
/* FDB48 802D9198 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D919C
/* FDB4C 802D919C 4405A000 */ mfc1 $a1, $f20
/* FDB50 802D91A0 4406B000 */ mfc1 $a2, $f22
/* FDB54 802D91A4 4407C000 */ mfc1 $a3, $f24
/* FDB58 802D91A8 C7A2005C */ lwc1 $f2, 0x5C($sp)
/* FDB5C 802D91AC 8FA30054 */ lw $v1, 0x54($sp)
/* FDB60 802D91B0 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDB64 802D91B4 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FDB68 802D91B8 E7BE0018 */ swc1 $f30, 0x18($sp)
/* FDB6C 802D91BC AFBE0020 */ sw $fp, 0x20($sp)
/* FDB70 802D91C0 E7A2001C */ swc1 $f2, 0x1C($sp)
/* FDB74 802D91C4 0C01C76C */ jal fx_63
/* FDB78 802D91C8 AFA30024 */ sw $v1, 0x24($sp)
/* FDB7C 802D91CC 080B65A4 */ j .L802D9690
/* FDB80 802D91D0 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D91D4
/* FDB84 802D91D4 4405A000 */ mfc1 $a1, $f20
/* FDB88 802D91D8 4406B000 */ mfc1 $a2, $f22
/* FDB8C 802D91DC 4407C000 */ mfc1 $a3, $f24
/* FDB90 802D91E0 C7A2005C */ lwc1 $f2, 0x5C($sp)
/* FDB94 802D91E4 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDB98 802D91E8 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FDB9C 802D91EC E7BE0018 */ swc1 $f30, 0x18($sp)
/* FDBA0 802D91F0 AFBE0020 */ sw $fp, 0x20($sp)
/* FDBA4 802D91F4 0C01C784 */ jal fx_throw_spiny
/* FDBA8 802D91F8 E7A2001C */ swc1 $f2, 0x1C($sp)
/* FDBAC 802D91FC 080B65A4 */ j .L802D9690
/* FDBB0 802D9200 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D9204
/* FDBB4 802D9204 4405A000 */ mfc1 $a1, $f20
/* FDBB8 802D9208 4406B000 */ mfc1 $a2, $f22
/* FDBBC 802D920C 4407C000 */ mfc1 $a3, $f24
/* FDBC0 802D9210 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDBC4 802D9214 0C01C79C */ jal fx_65
/* FDBC8 802D9218 AFB40014 */ sw $s4, 0x14($sp)
/* FDBCC 802D921C 080B65A4 */ j .L802D9690
/* FDBD0 802D9220 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D9224
/* FDBD4 802D9224 4405A000 */ mfc1 $a1, $f20
/* FDBD8 802D9228 4406B000 */ mfc1 $a2, $f22
/* FDBDC 802D922C 4407C000 */ mfc1 $a3, $f24
/* FDBE0 802D9230 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDBE4 802D9234 0C01C7B4 */ jal fx_tubba_heart_attack
/* FDBE8 802D9238 AFB40014 */ sw $s4, 0x14($sp)
/* FDBEC 802D923C 080B65A4 */ j .L802D9690
/* FDBF0 802D9240 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D9244
/* FDBF4 802D9244 4405A000 */ mfc1 $a1, $f20
/* FDBF8 802D9248 4406B000 */ mfc1 $a2, $f22
/* FDBFC 802D924C 4407C000 */ mfc1 $a3, $f24
/* FDC00 802D9250 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDC04 802D9254 0C01C7CC */ jal fx_whirlwind
/* FDC08 802D9258 AFB40014 */ sw $s4, 0x14($sp)
/* FDC0C 802D925C 080B65A4 */ j .L802D9690
/* FDC10 802D9260 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D9264
/* FDC14 802D9264 4405A000 */ mfc1 $a1, $f20
/* FDC18 802D9268 4406B000 */ mfc1 $a2, $f22
/* FDC1C 802D926C 4407C000 */ mfc1 $a3, $f24
/* FDC20 802D9270 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDC24 802D9274 0C01C7E4 */ jal fx_red_impact
/* FDC28 802D9278 AFB40014 */ sw $s4, 0x14($sp)
/* FDC2C 802D927C 080B65A4 */ j .L802D9690
/* FDC30 802D9280 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D9284
/* FDC34 802D9284 4405A000 */ mfc1 $a1, $f20
/* FDC38 802D9288 4406B000 */ mfc1 $a2, $f22
/* FDC3C 802D928C 4407C000 */ mfc1 $a3, $f24
/* FDC40 802D9290 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDC44 802D9294 0C01C7FC */ jal fx_floating_cloud_puff
/* FDC48 802D9298 AFB40014 */ sw $s4, 0x14($sp)
/* FDC4C 802D929C 080B65A4 */ j .L802D9690
/* FDC50 802D92A0 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D92A4
/* FDC54 802D92A4 4405A000 */ mfc1 $a1, $f20
/* FDC58 802D92A8 4406B000 */ mfc1 $a2, $f22
/* FDC5C 802D92AC 4407C000 */ mfc1 $a3, $f24
/* FDC60 802D92B0 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDC64 802D92B4 0C01C82C */ jal fx_energy_in_out
/* FDC68 802D92B8 AFB40014 */ sw $s4, 0x14($sp)
/* FDC6C 802D92BC 080B65A4 */ j .L802D9690
/* FDC70 802D92C0 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D92C4
/* FDC74 802D92C4 4405A000 */ mfc1 $a1, $f20
/* FDC78 802D92C8 4406B000 */ mfc1 $a2, $f22
/* FDC7C 802D92CC 4407C000 */ mfc1 $a3, $f24
/* FDC80 802D92D0 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDC84 802D92D4 0C01C844 */ jal fx_tattle_window
/* FDC88 802D92D8 AFB40014 */ sw $s4, 0x14($sp)
/* FDC8C 802D92DC 080B65A4 */ j .L802D9690
/* FDC90 802D92E0 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D92E4
/* FDC94 802D92E4 4405A000 */ mfc1 $a1, $f20
/* FDC98 802D92E8 4406B000 */ mfc1 $a2, $f22
/* FDC9C 802D92EC 4407C000 */ mfc1 $a3, $f24
/* FDCA0 802D92F0 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDCA4 802D92F4 0C01C85C */ jal fx_shiny_flare
/* FDCA8 802D92F8 AFB40014 */ sw $s4, 0x14($sp)
/* FDCAC 802D92FC 080B65A4 */ j .L802D9690
/* FDCB0 802D9300 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D9304
/* FDCB4 802D9304 4405A000 */ mfc1 $a1, $f20
/* FDCB8 802D9308 4406B000 */ mfc1 $a2, $f22
/* FDCBC 802D930C 4407C000 */ mfc1 $a3, $f24
/* FDCC0 802D9310 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDCC4 802D9314 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FDCC8 802D9318 E7BE0018 */ swc1 $f30, 0x18($sp)
/* FDCCC 802D931C 0C01C874 */ jal fx_huff_puff_breath
/* FDCD0 802D9320 AFB7001C */ sw $s7, 0x1C($sp)
/* FDCD4 802D9324 080B65A4 */ j .L802D9690
/* FDCD8 802D9328 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D932C
/* FDCDC 802D932C 4405A000 */ mfc1 $a1, $f20
/* FDCE0 802D9330 4406B000 */ mfc1 $a2, $f22
/* FDCE4 802D9334 4407C000 */ mfc1 $a3, $f24
/* FDCE8 802D9338 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDCEC 802D933C 0C01C88C */ jal fx_cold_breath
/* FDCF0 802D9340 AFB40014 */ sw $s4, 0x14($sp)
/* FDCF4 802D9344 080B65A4 */ j .L802D9690
/* FDCF8 802D9348 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D934C
/* FDCFC 802D934C C7A20064 */ lwc1 $f2, 0x64($sp)
/* FDD00 802D9350 4405A000 */ mfc1 $a1, $f20
/* FDD04 802D9354 4406B000 */ mfc1 $a2, $f22
/* FDD08 802D9358 4407C000 */ mfc1 $a3, $f24
/* FDD0C 802D935C E7A20024 */ swc1 $f2, 0x24($sp)
/* FDD10 802D9360 C7A20068 */ lwc1 $f2, 0x68($sp)
/* FDD14 802D9364 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDD18 802D9368 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FDD1C 802D936C E7BE0018 */ swc1 $f30, 0x18($sp)
/* FDD20 802D9370 AFB7001C */ sw $s7, 0x1C($sp)
/* FDD24 802D9374 AFBE0020 */ sw $fp, 0x20($sp)
/* FDD28 802D9378 0C01C8A4 */ jal fx_embers
/* FDD2C 802D937C E7A20028 */ swc1 $f2, 0x28($sp)
/* FDD30 802D9380 080B65A4 */ j .L802D9690
/* FDD34 802D9384 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D9388
/* FDD38 802D9388 4405A000 */ mfc1 $a1, $f20
/* FDD3C 802D938C 4406B000 */ mfc1 $a2, $f22
/* FDD40 802D9390 4407C000 */ mfc1 $a3, $f24
/* FDD44 802D9394 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDD48 802D9398 0C01C8BC */ jal fx_hieroglyphs
/* FDD4C 802D939C AFB40014 */ sw $s4, 0x14($sp)
/* FDD50 802D93A0 080B65A4 */ j .L802D9690
/* FDD54 802D93A4 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D93A8
/* FDD58 802D93A8 4405A000 */ mfc1 $a1, $f20
/* FDD5C 802D93AC 4406B000 */ mfc1 $a2, $f22
/* FDD60 802D93B0 4407C000 */ mfc1 $a3, $f24
/* FDD64 802D93B4 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDD68 802D93B8 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FDD6C 802D93BC E7BE0018 */ swc1 $f30, 0x18($sp)
/* FDD70 802D93C0 AFB7001C */ sw $s7, 0x1C($sp)
/* FDD74 802D93C4 0C01C8D4 */ jal fx_misc_particles
/* FDD78 802D93C8 AFBE0020 */ sw $fp, 0x20($sp)
/* FDD7C 802D93CC 080B65A4 */ j .L802D9690
/* FDD80 802D93D0 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D93D4
/* FDD84 802D93D4 4405A000 */ mfc1 $a1, $f20
/* FDD88 802D93D8 4406B000 */ mfc1 $a2, $f22
/* FDD8C 802D93DC 4407C000 */ mfc1 $a3, $f24
/* FDD90 802D93E0 8FA30050 */ lw $v1, 0x50($sp)
/* FDD94 802D93E4 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDD98 802D93E8 AFB40014 */ sw $s4, 0x14($sp)
/* FDD9C 802D93EC 0C01C8EC */ jal fx_static_status
/* FDDA0 802D93F0 AFA30018 */ sw $v1, 0x18($sp)
/* FDDA4 802D93F4 080B65A4 */ j .L802D9690
/* FDDA8 802D93F8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D93FC
/* FDDAC 802D93FC C7A2005C */ lwc1 $f2, 0x5C($sp)
/* FDDB0 802D9400 4405A000 */ mfc1 $a1, $f20
/* FDDB4 802D9404 4406B000 */ mfc1 $a2, $f22
/* FDDB8 802D9408 4407C000 */ mfc1 $a3, $f24
/* FDDBC 802D940C E7A2001C */ swc1 $f2, 0x1C($sp)
/* FDDC0 802D9410 C7A20060 */ lwc1 $f2, 0x60($sp)
/* FDDC4 802D9414 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDDC8 802D9418 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FDDCC 802D941C E7BE0018 */ swc1 $f30, 0x18($sp)
/* FDDD0 802D9420 0C01C904 */ jal fx_moving_cloud
/* FDDD4 802D9424 E7A20020 */ swc1 $f2, 0x20($sp)
/* FDDD8 802D9428 080B65A4 */ j .L802D9690
/* FDDDC 802D942C 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D9430
/* FDDE0 802D9430 4405A000 */ mfc1 $a1, $f20
/* FDDE4 802D9434 4406B000 */ mfc1 $a2, $f22
/* FDDE8 802D9438 4407C000 */ mfc1 $a3, $f24
/* FDDEC 802D943C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDDF0 802D9440 0C01C91C */ jal fx_75
/* FDDF4 802D9444 AFB40014 */ sw $s4, 0x14($sp)
/* FDDF8 802D9448 080B65A4 */ j .L802D9690
/* FDDFC 802D944C 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D9450
/* FDE00 802D9450 4405A000 */ mfc1 $a1, $f20
/* FDE04 802D9454 4406B000 */ mfc1 $a2, $f22
/* FDE08 802D9458 4407C000 */ mfc1 $a3, $f24
/* FDE0C 802D945C C7A2005C */ lwc1 $f2, 0x5C($sp)
/* FDE10 802D9460 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDE14 802D9464 E7BC0014 */ swc1 $f28, 0x14($sp)
/* FDE18 802D9468 E7BE0018 */ swc1 $f30, 0x18($sp)
/* FDE1C 802D946C AFBE0020 */ sw $fp, 0x20($sp)
/* FDE20 802D9470 0C01C94C */ jal fx_firework_rocket
/* FDE24 802D9474 E7A2001C */ swc1 $f2, 0x1C($sp)
/* FDE28 802D9478 080B65A4 */ j .L802D9690
/* FDE2C 802D947C 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D9480
/* FDE30 802D9480 4405A000 */ mfc1 $a1, $f20
/* FDE34 802D9484 4406B000 */ mfc1 $a2, $f22
/* FDE38 802D9488 4407C000 */ mfc1 $a3, $f24
/* FDE3C 802D948C E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDE40 802D9490 0C01C964 */ jal fx_peach_star_beam
/* FDE44 802D9494 AFB40014 */ sw $s4, 0x14($sp)
/* FDE48 802D9498 080B65A4 */ j .L802D9690
/* FDE4C 802D949C 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D94A0
/* FDE50 802D94A0 4405A000 */ mfc1 $a1, $f20
/* FDE54 802D94A4 4406B000 */ mfc1 $a2, $f22
/* FDE58 802D94A8 4407C000 */ mfc1 $a3, $f24
/* FDE5C 802D94AC 0C01C61C */ jal fx_butterflies
/* FDE60 802D94B0 00000000 */ nop
/* FDE64 802D94B4 080B65A4 */ j .L802D9690
/* FDE68 802D94B8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D94BC
/* FDE6C 802D94BC 4405A000 */ mfc1 $a1, $f20
/* FDE70 802D94C0 4406B000 */ mfc1 $a2, $f22
/* FDE74 802D94C4 4407C000 */ mfc1 $a3, $f24
/* FDE78 802D94C8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDE7C 802D94CC 0C01C97C */ jal fx_chapter_change
/* FDE80 802D94D0 AFB40014 */ sw $s4, 0x14($sp)
/* FDE84 802D94D4 080B65A4 */ j .L802D9690
/* FDE88 802D94D8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D94DC
/* FDE8C 802D94DC 4405A000 */ mfc1 $a1, $f20
/* FDE90 802D94E0 4406B000 */ mfc1 $a2, $f22
/* FDE94 802D94E4 4407C000 */ mfc1 $a3, $f24
/* FDE98 802D94E8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDE9C 802D94EC 0C01C994 */ jal fx_ice_shard
/* FDEA0 802D94F0 AFB40014 */ sw $s4, 0x14($sp)
/* FDEA4 802D94F4 080B65A4 */ j .L802D9690
/* FDEA8 802D94F8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D94FC
/* FDEAC 802D94FC 4405A000 */ mfc1 $a1, $f20
/* FDEB0 802D9500 4406B000 */ mfc1 $a2, $f22
/* FDEB4 802D9504 4407C000 */ mfc1 $a3, $f24
/* FDEB8 802D9508 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDEBC 802D950C 0C01C9AC */ jal fx_spirit_card
/* FDEC0 802D9510 AFB40014 */ sw $s4, 0x14($sp)
/* FDEC4 802D9514 080B65A4 */ j .L802D9690
/* FDEC8 802D9518 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D951C
/* FDECC 802D951C 4405A000 */ mfc1 $a1, $f20
/* FDED0 802D9520 4406B000 */ mfc1 $a2, $f22
/* FDED4 802D9524 4407C000 */ mfc1 $a3, $f24
/* FDED8 802D9528 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDEDC 802D952C 0C01C9C4 */ jal fx_lil_oink
/* FDEE0 802D9530 AFB40014 */ sw $s4, 0x14($sp)
/* FDEE4 802D9534 080B65A4 */ j .L802D9690
/* FDEE8 802D9538 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D953C
/* FDEEC 802D953C 4405A000 */ mfc1 $a1, $f20
/* FDEF0 802D9540 4406B000 */ mfc1 $a2, $f22
/* FDEF4 802D9544 4407C000 */ mfc1 $a3, $f24
/* FDEF8 802D9548 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDEFC 802D954C 0C01C9DC */ jal fx_something_rotating
/* FDF00 802D9550 AFB40014 */ sw $s4, 0x14($sp)
/* FDF04 802D9554 080B65A4 */ j .L802D9690
/* FDF08 802D9558 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D955C
/* FDF0C 802D955C 4405A000 */ mfc1 $a1, $f20
/* FDF10 802D9560 4406B000 */ mfc1 $a2, $f22
/* FDF14 802D9564 4407C000 */ mfc1 $a3, $f24
/* FDF18 802D9568 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDF1C 802D956C 0C01C9F4 */ jal fx_breaking_junk
/* FDF20 802D9570 AFB40014 */ sw $s4, 0x14($sp)
/* FDF24 802D9574 080B65A4 */ j .L802D9690
/* FDF28 802D9578 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D957C
/* FDF2C 802D957C 4405A000 */ mfc1 $a1, $f20
/* FDF30 802D9580 4406B000 */ mfc1 $a2, $f22
/* FDF34 802D9584 4407C000 */ mfc1 $a3, $f24
/* FDF38 802D9588 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDF3C 802D958C 0C01CA0C */ jal fx_partner_buff
/* FDF40 802D9590 AFB40014 */ sw $s4, 0x14($sp)
/* FDF44 802D9594 080B65A4 */ j .L802D9690
/* FDF48 802D9598 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D959C
/* FDF4C 802D959C 4405A000 */ mfc1 $a1, $f20
/* FDF50 802D95A0 4406B000 */ mfc1 $a2, $f22
/* FDF54 802D95A4 4407C000 */ mfc1 $a3, $f24
/* FDF58 802D95A8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDF5C 802D95AC 0C01CA24 */ jal fx_quizmo_assistant
/* FDF60 802D95B0 AFB40014 */ sw $s4, 0x14($sp)
/* FDF64 802D95B4 080B65A4 */ j .L802D9690
/* FDF68 802D95B8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D95BC
/* FDF6C 802D95BC 4405A000 */ mfc1 $a1, $f20
/* FDF70 802D95C0 4406B000 */ mfc1 $a2, $f22
/* FDF74 802D95C4 4407C000 */ mfc1 $a3, $f24
/* FDF78 802D95C8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDF7C 802D95CC 0C01CA3C */ jal fx_ice_pillar
/* FDF80 802D95D0 AFB40014 */ sw $s4, 0x14($sp)
/* FDF84 802D95D4 080B65A4 */ j .L802D9690
/* FDF88 802D95D8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D95DC
/* FDF8C 802D95DC 4405A000 */ mfc1 $a1, $f20
/* FDF90 802D95E0 4406B000 */ mfc1 $a2, $f22
/* FDF94 802D95E4 4407C000 */ mfc1 $a3, $f24
/* FDF98 802D95E8 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDF9C 802D95EC 0C01CA54 */ jal fx_sun
/* FDFA0 802D95F0 AFB40014 */ sw $s4, 0x14($sp)
/* FDFA4 802D95F4 080B65A4 */ j .L802D9690
/* FDFA8 802D95F8 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D95FC
/* FDFAC 802D95FC 4405A000 */ mfc1 $a1, $f20
/* FDFB0 802D9600 4406B000 */ mfc1 $a2, $f22
/* FDFB4 802D9604 4407C000 */ mfc1 $a3, $f24
/* FDFB8 802D9608 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDFBC 802D960C 0C01CA6C */ jal fx_star_spirits_energy
/* FDFC0 802D9610 AFB40014 */ sw $s4, 0x14($sp)
/* FDFC4 802D9614 080B65A4 */ j .L802D9690
/* FDFC8 802D9618 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D961C
/* FDFCC 802D961C 4405A000 */ mfc1 $a1, $f20
/* FDFD0 802D9620 4406B000 */ mfc1 $a2, $f22
/* FDFD4 802D9624 4407C000 */ mfc1 $a3, $f24
/* FDFD8 802D9628 44940000 */ mtc1 $s4, $f0
/* FDFDC 802D962C 00000000 */ nop
/* FDFE0 802D9630 46800020 */ cvt.s.w $f0, $f0
/* FDFE4 802D9634 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FDFE8 802D9638 0C01CA84 */ jal fx_pink_sparkles
/* FDFEC 802D963C E7A00014 */ swc1 $f0, 0x14($sp)
/* FDFF0 802D9640 080B65A4 */ j .L802D9690
/* FDFF4 802D9644 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D9648
/* FDFF8 802D9648 4405A000 */ mfc1 $a1, $f20
/* FDFFC 802D964C 4406B000 */ mfc1 $a2, $f22
/* FE000 802D9650 4407C000 */ mfc1 $a3, $f24
/* FE004 802D9654 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FE008 802D9658 0C01CA9C */ jal fx_star_outline
/* FE00C 802D965C AFB40014 */ sw $s4, 0x14($sp)
/* FE010 802D9660 080B65A4 */ j .L802D9690
/* FE014 802D9664 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D9668
/* FE018 802D9668 4405A000 */ mfc1 $a1, $f20
/* FE01C 802D966C 4406B000 */ mfc1 $a2, $f22
/* FE020 802D9670 4407C000 */ mfc1 $a3, $f24
/* FE024 802D9674 E7BA0010 */ swc1 $f26, 0x10($sp)
/* FE028 802D9678 0C01CAB4 */ jal fx_86
/* FE02C 802D967C AFB40014 */ sw $s4, 0x14($sp)
/* FE030 802D9680 080B65A4 */ j .L802D9690
/* FE034 802D9684 0040A82D */ daddu $s5, $v0, $zero
glabel .L802D9688
/* FE038 802D9688 080B65A2 */ j .L802D9688
/* FE03C 802D968C 00000000 */ nop
.L802D9690:
/* FE040 802D9690 12A00005 */ beqz $s5, .L802D96A8
/* FE044 802D9694 3C05FE36 */ lui $a1, (0xFE363C8F >> 16)
/* FE048 802D9698 8FA400C8 */ lw $a0, 0xC8($sp)
/* FE04C 802D969C 34A53C8F */ ori $a1, $a1, (0xFE363C8F & 0xFFFF)
/* FE050 802D96A0 0C0B2026 */ jal evt_set_variable
/* FE054 802D96A4 02A0302D */ daddu $a2, $s5, $zero
.L802D96A8:
/* FE058 802D96A8 8FBF0094 */ lw $ra, 0x94($sp)
/* FE05C 802D96AC 8FBE0090 */ lw $fp, 0x90($sp)
/* FE060 802D96B0 8FB7008C */ lw $s7, 0x8C($sp)
/* FE064 802D96B4 8FB60088 */ lw $s6, 0x88($sp)
/* FE068 802D96B8 8FB50084 */ lw $s5, 0x84($sp)
/* FE06C 802D96BC 8FB40080 */ lw $s4, 0x80($sp)
/* FE070 802D96C0 8FB3007C */ lw $s3, 0x7C($sp)
/* FE074 802D96C4 8FB20078 */ lw $s2, 0x78($sp)
/* FE078 802D96C8 8FB10074 */ lw $s1, 0x74($sp)
/* FE07C 802D96CC 8FB00070 */ lw $s0, 0x70($sp)
/* FE080 802D96D0 D7BE00C0 */ ldc1 $f30, 0xC0($sp)
/* FE084 802D96D4 D7BC00B8 */ ldc1 $f28, 0xB8($sp)
/* FE088 802D96D8 D7BA00B0 */ ldc1 $f26, 0xB0($sp)
/* FE08C 802D96DC D7B800A8 */ ldc1 $f24, 0xA8($sp)
/* FE090 802D96E0 D7B600A0 */ ldc1 $f22, 0xA0($sp)
/* FE094 802D96E4 D7B40098 */ ldc1 $f20, 0x98($sp)
/* FE098 802D96E8 24020002 */ addiu $v0, $zero, 0x2
/* FE09C 802D96EC 03E00008 */ jr $ra
/* FE0A0 802D96F0 27BD00C8 */ addiu $sp, $sp, 0xC8
/* FE0A4 802D96F4 00000000 */ nop
/* FE0A8 802D96F8 00000000 */ nop
/* FE0AC 802D96FC 00000000 */ nop
### DECOMPILED C INSTRUCTIONS:
ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
Bytecode* intArgs = script->ptrReadPos;
Bytecode* floatArgs = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
s32 effectID = evt_get_variable(script, *intArgs++);
EffectInstance* effectRet = NULL;
s32 new_var;
s32 iVar1, iVar2, iVar3, iVar4, iVar5;
s32 iVar6, iVar7, iVar8, iVar9, iVar10;
f32 fVar1, fVar2, fVar3, fVar4, fVar5, fVar6;
f32 fVar7, fVar8, fVar9, fVar10, fVar11;
s32 sp30, sp34, sp38, sp3C;
s32 a2, a6, a7, a8, a9;
evt_get_variable(script, *floatArgs++);
evt_get_variable(script, *args++);
new_var = evt_get_variable(script, *intArgs++);
iVar2 = evt_get_variable(script, *intArgs++);
iVar3 = evt_get_variable(script, *intArgs++);
iVar4 = evt_get_variable(script, *intArgs++);
iVar5 = evt_get_variable(script, *intArgs++);
iVar6 = evt_get_variable(script, *intArgs++);
iVar7 = evt_get_variable(script, *intArgs++);
iVar8 = evt_get_variable(script, *intArgs++);
iVar9 = evt_get_variable(script, *intArgs++);
iVar10 = evt_get_variable(script, *intArgs++);
evt_get_variable(script, *intArgs++);
evt_get_variable(script, *intArgs++);
evt_get_variable(script, *intArgs++);
fVar1 = evt_get_float_variable(script, *floatArgs++);
fVar2 = evt_get_float_variable(script, *floatArgs++);
fVar3 = evt_get_float_variable(script, *floatArgs++);
fVar4 = evt_get_float_variable(script, *floatArgs++);
fVar5 = evt_get_float_variable(script, *floatArgs++);
fVar6 = evt_get_float_variable(script, *floatArgs++);
fVar7 = evt_get_float_variable(script, *floatArgs++);
fVar8 = evt_get_float_variable(script, *floatArgs++);
fVar9 = evt_get_float_variable(script, *floatArgs++);
fVar10 = evt_get_float_variable(script, *floatArgs++);
fVar11 = evt_get_float_variable(script, *floatArgs++);
evt_get_float_variable(script, *floatArgs++);
evt_get_float_variable(script, *floatArgs++);
args++;
a2 = *args++;
args++;
args++;
args++;
a6 = *args++;
a7 = *args++;
a8 = *args++;
a9 = *args++;
iVar1 = new_var;
switch (effectID) {
case EFFECT_00:
fx_blast(0, fVar1, fVar2, fVar3, 3.0f, iVar5);
break;
case EFFECT_BIG_SMOKE_PUFF:
fx_big_smoke_puff(fVar1, fVar2, fVar3);
break;
case EFFECT_LANDING_DUST:
fx_landing_dust(iVar1, fVar2, fVar3, fVar4, fVar5);
break;
case EFFECT_WALKING_DUST:
fx_walking_dust(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6);
break;
case EFFECT_FLOWER_SPLASH:
fx_flower_splash(fVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_FLOWER_TRAIL:
fx_flower_trail(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6);
break;
case EFFECT_CLOUD_PUFF:
fx_cloud_puff(fVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_CLOUD_TRAIL:
fx_cloud_trail(iVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_FOOTPRINT:
fx_footprint(fVar1, fVar2, fVar3, fVar4, fVar5);
break;
case EFFECT_FLOATING_FLOWER:
fx_floating_flower(0, fVar1, fVar2, fVar3, iVar4);
break;
case EFFECT_SNOWFLAKE:
fx_snowflake(fVar1, fVar2, fVar3, iVar4);
break;
case EFFECT_STAR:
fx_star(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8);
break;
case EFFECT_EMOTE:
fx_emote(iVar1, (Npc*)a2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, &sp30);
evt_set_variable(script, a8, sp30);
break;
case EFFECT_SPARKLES:
fx_sparkles(iVar1, fVar2, fVar3, fVar4, fVar5);
break;
case EFFECT_SHAPE_SPELL:
fx_shape_spell(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8);
break;
case EFFECT_GATHER_ENERGY_PINK:
fx_gather_energy_pink(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_DROP_LEAVES:
fx_drop_leaves(iVar1, fVar2, fVar3, fVar4, iVar5);
break;
case EFFECT_DUST:
fx_dust(iVar1, fVar2, fVar3, fVar4, iVar5);
break;
case EFFECT_SHATTERING_STONES:
fx_shattering_stones(iVar1, fVar2, fVar3, fVar4, fVar5);
break;
case EFFECT_SMOKE_RING:
fx_smoke_ring(iVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_DAMAGE_STARS:
fx_damage_stars(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8);
break;
case EFFECT_EXPLOSION:
fx_explosion(iVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_LENS_FLARE:
fx_lens_flare(iVar1, fVar2, fVar3, fVar4, iVar5);
break;
case EFFECT_GOT_ITEM_OUTLINE:
fx_got_item_outline(iVar1, fVar2, fVar3, fVar4, fVar5, (EffectInstance**) &sp34);
evt_set_variable(script, a6, sp34);
break;
case EFFECT_SPIKY_WHITE_AURA:
fx_spiky_white_aura(iVar1, fVar2, fVar3, fVar4, iVar5);
break;
case EFFECT_SMOKE_IMPACT:
fx_smoke_impact(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6, fVar7, iVar8);
break;
case EFFECT_DAMAGE_INDICATOR:
fx_damage_indicator(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, (EffectInstance**) &sp30);
evt_set_variable(script, a8, sp30);
break;
case EFFECT_PURPLE_RING:
fx_purple_ring(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8);
break;
case EFFECT_STARS_BURST:
fx_stars_burst(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7);
break;
case EFFECT_STARS_SHIMMER:
fx_stars_shimmer(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, iVar8);
break;
case EFFECT_RISING_BUBBLE:
fx_rising_bubble(iVar1, fVar2, fVar3, fVar4, fVar5);
break;
case EFFECT_RING_BLAST:
fx_ring_blast(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_SHOCKWAVE:
fx_shockwave(iVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_MUSIC_NOTE:
fx_music_note(iVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_SMOKE_BURST:
fx_smoke_burst(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_SWEAT:
fx_sweat(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7);
break;
case EFFECT_SLEEP_BUBBLE:
fx_sleep_bubble(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, (EffectInstance**)&sp38);
evt_set_variable(script, a7, sp38);
break;
case EFFECT_WINDY_LEAVES:
fx_windy_leaves(iVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_FLAME:
fx_flame(iVar1, fVar2, fVar3, fVar4, fVar5, (EffectInstance**)&sp34);
evt_set_variable(script, a6, sp34);
break;
case EFFECT_FALLING_LEAVES:
fx_falling_leaves(iVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_STARS_SPREAD:
fx_stars_spread(iVar1, fVar2, fVar3, fVar4, iVar5, iVar6);
break;
case EFFECT_STEAM_BURST:
fx_steam_burst(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_STARS_ORBITING:
fx_stars_orbiting(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6, (EffectInstance**)&sp38);
evt_set_variable(script, a7, sp38);
break;
case EFFECT_BIG_SNOWFLAKES:
fx_big_snowflakes(iVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_DEBUFF:
fx_debuff(iVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_GREEN_IMPACT:
fx_green_impact(iVar1, fVar2, fVar3, fVar4, fVar5);
break;
case EFFECT_RADIAL_SHIMMER:
fx_radial_shimmer(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_ENDING_DECALS:
fx_ending_decals(iVar1, fVar2, fVar3, fVar4, fVar5, (EffectInstance**)&sp34);
evt_set_variable(script, a6, sp34);
break;
case EFFECT_LIGHT_RAYS:
fx_light_rays(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
evt_set_variable(script, a6, sp34);
break;
case EFFECT_LIGHTNING:
effectRet = fx_lightning(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6);
break;
case EFFECT_FIRE_BREATH:
effectRet = fx_fire_breath(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, iVar9, iVar10);
break;
case EFFECT_SHIMMER_BURST:
fx_shimmer_burst(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_ENERGY_SHOCKWAVE:
fx_energy_shockwave(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_SHIMMER_WAVE:
fx_shimmer_wave(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, iVar8);
break;
case EFFECT_AURA:
fx_aura(iVar1, fVar2, fVar3, fVar4, fVar5, (EffectInstance**)&sp34);
evt_set_variable(script, a6, sp34);
break;
case EFFECT_BULB_GLOW:
fx_bulb_glow(iVar1, fVar2, fVar3, fVar4, fVar5, (EffectInstance**)&sp34);
evt_set_variable(script, a6, sp34);
break;
case EFFECT_3D:
fx_3D(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, &sp3C);
evt_set_variable(script, a9, sp3C);
break;
case EFFECT_BLAST:
fx_blast(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_FIRE_FLOWER:
effectRet = fx_fire_flower(iVar1, fVar2, fVar3, fVar4, iVar5);
break;
case EFFECT_RECOVER:
effectRet = fx_recover(iVar1, fVar2, fVar3, fVar4, iVar5);
break;
case EFFECT_DISABLE_X:
effectRet = (EffectInstance*)fx_disable_x(iVar1, fVar2, fVar3, fVar4, iVar5);
break;
case EFFECT_BOMBETTE_BREAKING:
effectRet = fx_bombette_breaking(iVar1, iVar2, iVar3, fVar4, iVar5, iVar6);
break;
case EFFECT_FIREWORK:
effectRet = fx_firework(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_CONFETTI:
effectRet = fx_confetti(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_SNOWFALL:
effectRet = fx_snowfall(iVar1, iVar2);
break;
case EFFECT_46:
effectRet = fx_46(iVar1, (PlayerStatus*)a2, fVar3, iVar4);
break;
case EFFECT_GATHER_MAGIC:
effectRet = fx_gather_magic(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_ATTACK_RESULT_TEXT:
effectRet = fx_attack_result_text(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_SMALL_GOLD_SPARKLE:
effectRet = fx_small_gold_sparkle(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_FLASHING_BOX_SHOCKWAVE:
effectRet = fx_flashing_box_shockwave(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6);
break;
case EFFECT_BALLOON:
effectRet = fx_balloon(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_FLOATING_ROCK:
effectRet = fx_floating_rock(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9);
break;
case EFFECT_CHOMP_DROP:
effectRet = fx_chomp_drop(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, fVar9, iVar10);
break;
case EFFECT_QUIZMO_STAGE:
effectRet = fx_quizmo_stage(iVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_RADIATING_ENERGY_ORB:
effectRet = fx_radiating_energy_orb(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_ENERGY_ORB_WAVE:
effectRet = fx_energy_orb_wave(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_MERLIN_HOUSE_STARS:
effectRet = fx_merlin_house_stars(iVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_MOTION_BLUR_FLAME:
effectRet = fx_motion_blur_flame(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_STAT_CHANGE:
effectRet = fx_stat_change(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_SNAKING_STATIC:
effectRet = fx_snaking_static(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_THUNDERBOLT_RING:
effectRet = fx_thunderbolt_ring(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_SQUIRT:
effectRet = fx_squirt(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9);
break;
case EFFECT_WATER_BLOCK:
effectRet = fx_water_block(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_WATERFALL:
effectRet = fx_waterfall(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_WATER_FOUNTAIN:
effectRet = fx_water_fountain(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_UNDERWATER:
effectRet = fx_underwater(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_LIGHTNING_BOLT:
effectRet = fx_lightning_bolt(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9);
break;
case EFFECT_WATER_SPLASH:
effectRet = fx_water_splash(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_SNOWMAN_DOLL:
effectRet = fx_snowman_doll(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_FRIGHT_JAR:
effectRet = fx_fright_jar(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_STOP_WATCH:
effectRet = fx_stop_watch(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_63:
effectRet = fx_63(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9, iVar10);
break;
case EFFECT_THROW_SPINY:
effectRet = fx_throw_spiny(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9);
break;
case EFFECT_65:
effectRet = fx_65(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_TUBBA_HEART_ATTACK:
effectRet = fx_tubba_heart_attack(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_WHIRLWIND:
effectRet = fx_whirlwind(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_RED_IMPACT:
effectRet = fx_red_impact(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_FLOATING_CLOUD_PUFF:
effectRet = fx_floating_cloud_puff(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_ENERGY_IN_OUT:
effectRet = fx_energy_in_out(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_TATTLE_WINDOW:
effectRet = fx_tattle_window(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_SHINY_FLARE:
effectRet = fx_shiny_flare(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_HUFF_PUFF_BREATH:
effectRet = fx_huff_puff_breath(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8);
break;
case EFFECT_COLD_BREATH:
effectRet = fx_cold_breath(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_EMBERS:
effectRet = fx_embers(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, iVar9, fVar10, fVar11);
break;
case EFFECT_HIEROGLYPHS:
effectRet = fx_hieroglyphs(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_MISC_PARTICLES:
effectRet = fx_misc_particles(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, iVar9);
break;
case EFFECT_STATIC_STATUS:
effectRet = fx_static_status(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6, iVar7);
break;
case EFFECT_MOVING_CLOUD:
effectRet = fx_moving_cloud(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, fVar9);
break;
case EFFECT_75:
effectRet = fx_75(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_FIREWORK_ROCKET:
effectRet = fx_firework_rocket(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9);
break;
case EFFECT_PEACH_STAR_BEAM:
effectRet = fx_peach_star_beam(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_BUTTERFLIES:
effectRet = fx_butterflies(iVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_CHAPTER_CHANGE:
effectRet = fx_chapter_change(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_ICE_SHARD:
effectRet = fx_ice_shard(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_SPIRIT_CARD:
effectRet = fx_spirit_card(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_LIL_OINK:
effectRet = fx_lil_oink(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_SOMETHING_ROTATING:
effectRet = fx_something_rotating(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_BREAKING_JUNK:
effectRet = fx_breaking_junk(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_PARTNER_BUFF:
effectRet = fx_partner_buff(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_QUIZMO_ASSISTANT:
effectRet = fx_quizmo_assistant(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_ICE_PILLAR:
effectRet = fx_ice_pillar(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_SUN:
effectRet = fx_sun(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_STAR_SPIRITS_ENERGY:
effectRet = fx_star_spirits_energy(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_PINK_SPARKLES:
effectRet = fx_pink_sparkles(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_STAR_OUTLINE:
effectRet = fx_star_outline(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_86:
effectRet = fx_86(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
default:
PANIC();
}
if (effectRet != NULL) {
evt_set_variable(script, LVarF, (s32)effectRet);
}
return ApiStatus_DONE2;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel update_item_entity_collectable
/* CA950 80134250 3C028015 */ lui $v0, %hi(isPickingUpItem)
/* CA954 80134254 844265A4 */ lh $v0, %lo(isPickingUpItem)($v0)
/* CA958 80134258 27BDFFA0 */ addiu $sp, $sp, -0x60
/* CA95C 8013425C AFB20038 */ sw $s2, 0x38($sp)
/* CA960 80134260 AFB40040 */ sw $s4, 0x40($sp)
/* CA964 80134264 3C148011 */ lui $s4, %hi(gPlayerStatus)
/* CA968 80134268 2694EFC8 */ addiu $s4, $s4, %lo(gPlayerStatus)
/* CA96C 8013426C AFB3003C */ sw $s3, 0x3C($sp)
/* CA970 80134270 3C138011 */ lui $s3, %hi(gPlayerData)
/* CA974 80134274 2673F290 */ addiu $s3, $s3, %lo(gPlayerData)
/* CA978 80134278 AFBF0044 */ sw $ra, 0x44($sp)
/* CA97C 8013427C AFB10034 */ sw $s1, 0x34($sp)
/* CA980 80134280 AFB00030 */ sw $s0, 0x30($sp)
/* CA984 80134284 F7B80058 */ sdc1 $f24, 0x58($sp)
/* CA988 80134288 F7B60050 */ sdc1 $f22, 0x50($sp)
/* CA98C 8013428C F7B40048 */ sdc1 $f20, 0x48($sp)
/* CA990 80134290 144004B7 */ bnez $v0, .L80135570
/* CA994 80134294 0080902D */ daddu $s2, $a0, $zero
/* CA998 80134298 9242001C */ lbu $v0, 0x1C($s2)
/* CA99C 8013429C 10400003 */ beqz $v0, .L801342AC
/* CA9A0 801342A0 2442FFFF */ addiu $v0, $v0, -0x1
/* CA9A4 801342A4 0804D55C */ j .L80135570
/* CA9A8 801342A8 A242001C */ sb $v0, 0x1C($s2)
.L801342AC:
/* CA9AC 801342AC 24050017 */ addiu $a1, $zero, 0x17
/* CA9B0 801342B0 8243001B */ lb $v1, 0x1B($s2)
/* CA9B4 801342B4 8244001A */ lb $a0, 0x1A($s2)
/* CA9B8 801342B8 00651026 */ xor $v0, $v1, $a1
/* CA9BC 801342BC 10800006 */ beqz $a0, .L801342D8
/* CA9C0 801342C0 2C500001 */ sltiu $s0, $v0, 0x1
/* CA9C4 801342C4 24020001 */ addiu $v0, $zero, 0x1
/* CA9C8 801342C8 10820203 */ beq $a0, $v0, .L80134AD8
/* CA9CC 801342CC 24020014 */ addiu $v0, $zero, 0x14
/* CA9D0 801342D0 0804D44D */ j .L80135134
/* CA9D4 801342D4 00000000 */ nop
.L801342D8:
/* CA9D8 801342D8 0C04C3EB */ jal reveal_item_entity
/* CA9DC 801342DC 0240202D */ daddu $a0, $s2, $zero
/* CA9E0 801342E0 0C00AB39 */ jal heap_malloc
/* CA9E4 801342E4 24040024 */ addiu $a0, $zero, 0x24
/* CA9E8 801342E8 0040882D */ daddu $s1, $v0, $zero
/* CA9EC 801342EC 16200003 */ bnez $s1, .L801342FC
/* CA9F0 801342F0 AE510014 */ sw $s1, 0x14($s2)
.L801342F4:
/* CA9F4 801342F4 0804D0BD */ j .L801342F4
/* CA9F8 801342F8 00000000 */ nop
.L801342FC:
/* CA9FC 801342FC 8E430000 */ lw $v1, 0x0($s2)
/* CAA00 80134300 3C020100 */ lui $v0, (0x1000000 >> 16)
/* CAA04 80134304 00621024 */ and $v0, $v1, $v0
/* CAA08 80134308 10400005 */ beqz $v0, .L80134320
/* CAA0C 8013430C 3C020001 */ lui $v0, (0x10000 >> 16)
/* CAA10 80134310 3C014180 */ lui $at, (0x41800000 >> 16)
/* CAA14 80134314 44810000 */ mtc1 $at, $f0
/* CAA18 80134318 0804D0D1 */ j .L80134344
/* CAA1C 8013431C 00000000 */ nop
.L80134320:
/* CAA20 80134320 00621024 */ and $v0, $v1, $v0
/* CAA24 80134324 14400005 */ bnez $v0, .L8013433C
/* CAA28 80134328 00000000 */ nop
/* CAA2C 8013432C 3C014140 */ lui $at, (0x41400000 >> 16)
/* CAA30 80134330 44810000 */ mtc1 $at, $f0
/* CAA34 80134334 0804D0D1 */ j .L80134344
/* CAA38 80134338 00000000 */ nop
.L8013433C:
/* CAA3C 8013433C 3C014160 */ lui $at, (0x41600000 >> 16)
/* CAA40 80134340 44810000 */ mtc1 $at, $f0
.L80134344:
/* CAA44 80134344 3C014000 */ lui $at, (0x40000000 >> 16)
/* CAA48 80134348 44811000 */ mtc1 $at, $f2
/* CAA4C 8013434C E6200000 */ swc1 $f0, 0x0($s1)
/* CAA50 80134350 E6220004 */ swc1 $f2, 0x4($s1)
/* CAA54 80134354 3C0141C0 */ lui $at, (0x41C00000 >> 16)
/* CAA58 80134358 44810000 */ mtc1 $at, $f0
/* CAA5C 8013435C 00000000 */ nop
/* CAA60 80134360 E6200008 */ swc1 $f0, 0x8($s1)
/* CAA64 80134364 E620000C */ swc1 $f0, 0xC($s1)
/* CAA68 80134368 8642001E */ lh $v0, 0x1E($s2)
/* CAA6C 8013436C 04410164 */ bgez $v0, .L80134900
/* CAA70 80134370 00000000 */ nop
/* CAA74 80134374 96430018 */ lhu $v1, 0x18($s2)
/* CAA78 80134378 2462FFF0 */ addiu $v0, $v1, -0x10
/* CAA7C 8013437C 2C4200CB */ sltiu $v0, $v0, 0xCB
/* CAA80 80134380 10400036 */ beqz $v0, .L8013445C
/* CAA84 80134384 00031400 */ sll $v0, $v1, 16
/* CAA88 80134388 0C00A67F */ jal rand_int
/* CAA8C 8013438C 24042710 */ addiu $a0, $zero, 0x2710
/* CAA90 80134390 28421388 */ slti $v0, $v0, 0x1388
/* CAA94 80134394 10400011 */ beqz $v0, .L801343DC
/* CAA98 80134398 00000000 */ nop
/* CAA9C 8013439C 0C00A67F */ jal rand_int
/* CAAA0 801343A0 2404001E */ addiu $a0, $zero, 0x1E
/* CAAA4 801343A4 00101880 */ sll $v1, $s0, 2
/* CAAA8 801343A8 00701821 */ addu $v1, $v1, $s0
/* CAAAC 801343AC 00031880 */ sll $v1, $v1, 2
/* CAAB0 801343B0 00701823 */ subu $v1, $v1, $s0
/* CAAB4 801343B4 000320C0 */ sll $a0, $v1, 3
/* CAAB8 801343B8 00641821 */ addu $v1, $v1, $a0
/* CAABC 801343BC 000318C0 */ sll $v1, $v1, 3
/* CAAC0 801343C0 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* CAAC4 801343C4 00230821 */ addu $at, $at, $v1
/* CAAC8 801343C8 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
/* CAACC 801343CC 3C0142D2 */ lui $at, (0x42D20000 >> 16)
/* CAAD0 801343D0 44810000 */ mtc1 $at, $f0
/* CAAD4 801343D4 0804D107 */ j .L8013441C
/* CAAD8 801343D8 46006300 */ add.s $f12, $f12, $f0
.L801343DC:
/* CAADC 801343DC 0C00A67F */ jal rand_int
/* CAAE0 801343E0 2404001E */ addiu $a0, $zero, 0x1E
/* CAAE4 801343E4 00101880 */ sll $v1, $s0, 2
/* CAAE8 801343E8 00701821 */ addu $v1, $v1, $s0
/* CAAEC 801343EC 00031880 */ sll $v1, $v1, 2
/* CAAF0 801343F0 00701823 */ subu $v1, $v1, $s0
/* CAAF4 801343F4 000320C0 */ sll $a0, $v1, 3
/* CAAF8 801343F8 00641821 */ addu $v1, $v1, $a0
/* CAAFC 801343FC 000318C0 */ sll $v1, $v1, 3
/* CAB00 80134400 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* CAB04 80134404 00230821 */ addu $at, $at, $v1
/* CAB08 80134408 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
/* CAB0C 8013440C 3C0142D2 */ lui $at, (0x42D20000 >> 16)
/* CAB10 80134410 44810000 */ mtc1 $at, $f0
/* CAB14 80134414 00000000 */ nop
/* CAB18 80134418 46006301 */ sub.s $f12, $f12, $f0
.L8013441C:
/* CAB1C 8013441C 44820000 */ mtc1 $v0, $f0
/* CAB20 80134420 00000000 */ nop
/* CAB24 80134424 46800020 */ cvt.s.w $f0, $f0
/* CAB28 80134428 46006300 */ add.s $f12, $f12, $f0
/* CAB2C 8013442C 3C014170 */ lui $at, (0x41700000 >> 16)
/* CAB30 80134430 44810000 */ mtc1 $at, $f0
/* CAB34 80134434 0C00A6C9 */ jal clamp_angle
/* CAB38 80134438 46006301 */ sub.s $f12, $f12, $f0
/* CAB3C 8013443C E6200018 */ swc1 $f0, 0x18($s1)
/* CAB40 80134440 C6200000 */ lwc1 $f0, 0x0($s1)
/* CAB44 80134444 3C014080 */ lui $at, (0x40800000 >> 16)
/* CAB48 80134448 44811000 */ mtc1 $at, $f2
/* CAB4C 8013444C 00000000 */ nop
/* CAB50 80134450 46020000 */ add.s $f0, $f0, $f2
/* CAB54 80134454 0804D20B */ j .L8013482C
/* CAB58 80134458 E6200000 */ swc1 $f0, 0x0($s1)
.L8013445C:
/* CAB5C 8013445C 00021C03 */ sra $v1, $v0, 16
/* CAB60 80134460 24020158 */ addiu $v0, $zero, 0x158
/* CAB64 80134464 106200D6 */ beq $v1, $v0, .L801347C0
/* CAB68 80134468 28620159 */ slti $v0, $v1, 0x159
/* CAB6C 8013446C 10400009 */ beqz $v0, .L80134494
/* CAB70 80134470 24020156 */ addiu $v0, $zero, 0x156
/* CAB74 80134474 106200D2 */ beq $v1, $v0, .L801347C0
/* CAB78 80134478 28620157 */ slti $v0, $v1, 0x157
/* CAB7C 8013447C 10400029 */ beqz $v0, .L80134524
/* CAB80 80134480 24020010 */ addiu $v0, $zero, 0x10
/* CAB84 80134484 1062003C */ beq $v1, $v0, .L80134578
/* CAB88 80134488 00000000 */ nop
/* CAB8C 8013448C 0804D20B */ j .L8013482C
/* CAB90 80134490 AE200018 */ sw $zero, 0x18($s1)
.L80134494:
/* CAB94 80134494 2402015A */ addiu $v0, $zero, 0x15A
/* CAB98 80134498 106200C9 */ beq $v1, $v0, .L801347C0
/* CAB9C 8013449C 0062102A */ slt $v0, $v1, $v0
/* CABA0 801344A0 1440004A */ bnez $v0, .L801345CC
/* CABA4 801344A4 24020017 */ addiu $v0, $zero, 0x17
/* CABA8 801344A8 2402015B */ addiu $v0, $zero, 0x15B
/* CABAC 801344AC 10620005 */ beq $v1, $v0, .L801344C4
/* CABB0 801344B0 2402015C */ addiu $v0, $zero, 0x15C
/* CABB4 801344B4 1062008D */ beq $v1, $v0, .L801346EC
/* CABB8 801344B8 00000000 */ nop
/* CABBC 801344BC 0804D20B */ j .L8013482C
/* CABC0 801344C0 AE200018 */ sw $zero, 0x18($s1)
.L801344C4:
/* CABC4 801344C4 0C00A67F */ jal rand_int
/* CABC8 801344C8 24040078 */ addiu $a0, $zero, 0x78
/* CABCC 801344CC 00101880 */ sll $v1, $s0, 2
/* CABD0 801344D0 00701821 */ addu $v1, $v1, $s0
/* CABD4 801344D4 00031880 */ sll $v1, $v1, 2
/* CABD8 801344D8 00701823 */ subu $v1, $v1, $s0
/* CABDC 801344DC 000320C0 */ sll $a0, $v1, 3
/* CABE0 801344E0 00641821 */ addu $v1, $v1, $a0
/* CABE4 801344E4 000318C0 */ sll $v1, $v1, 3
/* CABE8 801344E8 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* CABEC 801344EC 00230821 */ addu $at, $at, $v1
/* CABF0 801344F0 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
/* CABF4 801344F4 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* CABF8 801344F8 44810000 */ mtc1 $at, $f0
/* CABFC 801344FC 00000000 */ nop
/* CAC00 80134500 46006301 */ sub.s $f12, $f12, $f0
/* CAC04 80134504 44820000 */ mtc1 $v0, $f0
/* CAC08 80134508 00000000 */ nop
/* CAC0C 8013450C 46800020 */ cvt.s.w $f0, $f0
/* CAC10 80134510 46006300 */ add.s $f12, $f12, $f0
/* CAC14 80134514 3C014270 */ lui $at, (0x42700000 >> 16)
/* CAC18 80134518 44810000 */ mtc1 $at, $f0
/* CAC1C 8013451C 0804D208 */ j .L80134820
/* CAC20 80134520 46006300 */ add.s $f12, $f12, $f0
.L80134524:
/* CAC24 80134524 0C00A67F */ jal rand_int
/* CAC28 80134528 24042710 */ addiu $a0, $zero, 0x2710
/* CAC2C 8013452C 28421388 */ slti $v0, $v0, 0x1388
/* CAC30 80134530 144000A3 */ bnez $v0, .L801347C0
/* CAC34 80134534 00000000 */ nop
/* CAC38 80134538 0C00A67F */ jal rand_int
/* CAC3C 8013453C 24040078 */ addiu $a0, $zero, 0x78
/* CAC40 80134540 00101880 */ sll $v1, $s0, 2
/* CAC44 80134544 00701821 */ addu $v1, $v1, $s0
/* CAC48 80134548 00031880 */ sll $v1, $v1, 2
/* CAC4C 8013454C 00701823 */ subu $v1, $v1, $s0
/* CAC50 80134550 000320C0 */ sll $a0, $v1, 3
/* CAC54 80134554 00641821 */ addu $v1, $v1, $a0
/* CAC58 80134558 000318C0 */ sll $v1, $v1, 3
/* CAC5C 8013455C 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* CAC60 80134560 00230821 */ addu $at, $at, $v1
/* CAC64 80134564 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
/* CAC68 80134568 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* CAC6C 8013456C 44810000 */ mtc1 $at, $f0
/* CAC70 80134570 0804D200 */ j .L80134800
/* CAC74 80134574 46006301 */ sub.s $f12, $f12, $f0
.L80134578:
/* CAC78 80134578 0C00A67F */ jal rand_int
/* CAC7C 8013457C 24042710 */ addiu $a0, $zero, 0x2710
/* CAC80 80134580 28421388 */ slti $v0, $v0, 0x1388
/* CAC84 80134584 1440008E */ bnez $v0, .L801347C0
/* CAC88 80134588 00000000 */ nop
/* CAC8C 8013458C 0C00A67F */ jal rand_int
/* CAC90 80134590 24040078 */ addiu $a0, $zero, 0x78
/* CAC94 80134594 00101880 */ sll $v1, $s0, 2
/* CAC98 80134598 00701821 */ addu $v1, $v1, $s0
/* CAC9C 8013459C 00031880 */ sll $v1, $v1, 2
/* CACA0 801345A0 00701823 */ subu $v1, $v1, $s0
/* CACA4 801345A4 000320C0 */ sll $a0, $v1, 3
/* CACA8 801345A8 00641821 */ addu $v1, $v1, $a0
/* CACAC 801345AC 000318C0 */ sll $v1, $v1, 3
/* CACB0 801345B0 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* CACB4 801345B4 00230821 */ addu $at, $at, $v1
/* CACB8 801345B8 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
/* CACBC 801345BC 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* CACC0 801345C0 44810000 */ mtc1 $at, $f0
/* CACC4 801345C4 0804D200 */ j .L80134800
/* CACC8 801345C8 46006301 */ sub.s $f12, $f12, $f0
.L801345CC:
/* CACCC 801345CC 8243001B */ lb $v1, 0x1B($s2)
/* CACD0 801345D0 10620011 */ beq $v1, $v0, .L80134618
/* CACD4 801345D4 00000000 */ nop
/* CACD8 801345D8 0C00A67F */ jal rand_int
/* CACDC 801345DC 24040078 */ addiu $a0, $zero, 0x78
/* CACE0 801345E0 00101880 */ sll $v1, $s0, 2
/* CACE4 801345E4 00701821 */ addu $v1, $v1, $s0
/* CACE8 801345E8 00031880 */ sll $v1, $v1, 2
/* CACEC 801345EC 00701823 */ subu $v1, $v1, $s0
/* CACF0 801345F0 000320C0 */ sll $a0, $v1, 3
/* CACF4 801345F4 00641821 */ addu $v1, $v1, $a0
/* CACF8 801345F8 000318C0 */ sll $v1, $v1, 3
/* CACFC 801345FC 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* CAD00 80134600 00230821 */ addu $at, $at, $v1
/* CAD04 80134604 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
/* CAD08 80134608 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* CAD0C 8013460C 44810000 */ mtc1 $at, $f0
/* CAD10 80134610 0804D200 */ j .L80134800
/* CAD14 80134614 46006301 */ sub.s $f12, $f12, $f0
.L80134618:
/* CAD18 80134618 0C00A67F */ jal rand_int
/* CAD1C 8013461C 24042710 */ addiu $a0, $zero, 0x2710
/* CAD20 80134620 28421388 */ slti $v0, $v0, 0x1388
/* CAD24 80134624 10400019 */ beqz $v0, .L8013468C
/* CAD28 80134628 00000000 */ nop
/* CAD2C 8013462C 0C00A67F */ jal rand_int
/* CAD30 80134630 2404003C */ addiu $a0, $zero, 0x3C
/* CAD34 80134634 00101880 */ sll $v1, $s0, 2
/* CAD38 80134638 00701821 */ addu $v1, $v1, $s0
/* CAD3C 8013463C 00031880 */ sll $v1, $v1, 2
/* CAD40 80134640 00701823 */ subu $v1, $v1, $s0
/* CAD44 80134644 000320C0 */ sll $a0, $v1, 3
/* CAD48 80134648 00641821 */ addu $v1, $v1, $a0
/* CAD4C 8013464C 000318C0 */ sll $v1, $v1, 3
/* CAD50 80134650 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* CAD54 80134654 00230821 */ addu $at, $at, $v1
/* CAD58 80134658 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
/* CAD5C 8013465C 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* CAD60 80134660 44810000 */ mtc1 $at, $f0
/* CAD64 80134664 00000000 */ nop
/* CAD68 80134668 46006300 */ add.s $f12, $f12, $f0
/* CAD6C 8013466C 44820000 */ mtc1 $v0, $f0
/* CAD70 80134670 00000000 */ nop
/* CAD74 80134674 46800020 */ cvt.s.w $f0, $f0
/* CAD78 80134678 46006300 */ add.s $f12, $f12, $f0
/* CAD7C 8013467C 3C0141F0 */ lui $at, (0x41F00000 >> 16)
/* CAD80 80134680 44810000 */ mtc1 $at, $f0
/* CAD84 80134684 0804D208 */ j .L80134820
/* CAD88 80134688 46006301 */ sub.s $f12, $f12, $f0
.L8013468C:
/* CAD8C 8013468C 0C00A67F */ jal rand_int
/* CAD90 80134690 2404003C */ addiu $a0, $zero, 0x3C
/* CAD94 80134694 00101880 */ sll $v1, $s0, 2
/* CAD98 80134698 00701821 */ addu $v1, $v1, $s0
/* CAD9C 8013469C 00031880 */ sll $v1, $v1, 2
/* CADA0 801346A0 00701823 */ subu $v1, $v1, $s0
/* CADA4 801346A4 000320C0 */ sll $a0, $v1, 3
/* CADA8 801346A8 00641821 */ addu $v1, $v1, $a0
/* CADAC 801346AC 000318C0 */ sll $v1, $v1, 3
/* CADB0 801346B0 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* CADB4 801346B4 00230821 */ addu $at, $at, $v1
/* CADB8 801346B8 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
/* CADBC 801346BC 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* CADC0 801346C0 44810000 */ mtc1 $at, $f0
/* CADC4 801346C4 00000000 */ nop
/* CADC8 801346C8 46006301 */ sub.s $f12, $f12, $f0
/* CADCC 801346CC 44820000 */ mtc1 $v0, $f0
/* CADD0 801346D0 00000000 */ nop
/* CADD4 801346D4 46800020 */ cvt.s.w $f0, $f0
/* CADD8 801346D8 46006300 */ add.s $f12, $f12, $f0
/* CADDC 801346DC 3C0141F0 */ lui $at, (0x41F00000 >> 16)
/* CADE0 801346E0 44810000 */ mtc1 $at, $f0
/* CADE4 801346E4 0804D208 */ j .L80134820
/* CADE8 801346E8 46006301 */ sub.s $f12, $f12, $f0
.L801346EC:
/* CADEC 801346EC 0C00A67F */ jal rand_int
/* CADF0 801346F0 24042710 */ addiu $a0, $zero, 0x2710
/* CADF4 801346F4 28421388 */ slti $v0, $v0, 0x1388
/* CADF8 801346F8 10400019 */ beqz $v0, .L80134760
/* CADFC 801346FC 00000000 */ nop
/* CAE00 80134700 0C00A67F */ jal rand_int
/* CAE04 80134704 2404003C */ addiu $a0, $zero, 0x3C
/* CAE08 80134708 00101880 */ sll $v1, $s0, 2
/* CAE0C 8013470C 00701821 */ addu $v1, $v1, $s0
/* CAE10 80134710 00031880 */ sll $v1, $v1, 2
/* CAE14 80134714 00701823 */ subu $v1, $v1, $s0
/* CAE18 80134718 000320C0 */ sll $a0, $v1, 3
/* CAE1C 8013471C 00641821 */ addu $v1, $v1, $a0
/* CAE20 80134720 000318C0 */ sll $v1, $v1, 3
/* CAE24 80134724 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* CAE28 80134728 00230821 */ addu $at, $at, $v1
/* CAE2C 8013472C C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
/* CAE30 80134730 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* CAE34 80134734 44810000 */ mtc1 $at, $f0
/* CAE38 80134738 00000000 */ nop
/* CAE3C 8013473C 46006300 */ add.s $f12, $f12, $f0
/* CAE40 80134740 44820000 */ mtc1 $v0, $f0
/* CAE44 80134744 00000000 */ nop
/* CAE48 80134748 46800020 */ cvt.s.w $f0, $f0
/* CAE4C 8013474C 46006300 */ add.s $f12, $f12, $f0
/* CAE50 80134750 3C0141F0 */ lui $at, (0x41F00000 >> 16)
/* CAE54 80134754 44810000 */ mtc1 $at, $f0
/* CAE58 80134758 0804D208 */ j .L80134820
/* CAE5C 8013475C 46006301 */ sub.s $f12, $f12, $f0
.L80134760:
/* CAE60 80134760 0C00A67F */ jal rand_int
/* CAE64 80134764 2404003C */ addiu $a0, $zero, 0x3C
/* CAE68 80134768 00101880 */ sll $v1, $s0, 2
/* CAE6C 8013476C 00701821 */ addu $v1, $v1, $s0
/* CAE70 80134770 00031880 */ sll $v1, $v1, 2
/* CAE74 80134774 00701823 */ subu $v1, $v1, $s0
/* CAE78 80134778 000320C0 */ sll $a0, $v1, 3
/* CAE7C 8013477C 00641821 */ addu $v1, $v1, $a0
/* CAE80 80134780 000318C0 */ sll $v1, $v1, 3
/* CAE84 80134784 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* CAE88 80134788 00230821 */ addu $at, $at, $v1
/* CAE8C 8013478C C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
/* CAE90 80134790 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* CAE94 80134794 44810000 */ mtc1 $at, $f0
/* CAE98 80134798 00000000 */ nop
/* CAE9C 8013479C 46006301 */ sub.s $f12, $f12, $f0
/* CAEA0 801347A0 44820000 */ mtc1 $v0, $f0
/* CAEA4 801347A4 00000000 */ nop
/* CAEA8 801347A8 46800020 */ cvt.s.w $f0, $f0
/* CAEAC 801347AC 46006300 */ add.s $f12, $f12, $f0
/* CAEB0 801347B0 3C0141F0 */ lui $at, (0x41F00000 >> 16)
/* CAEB4 801347B4 44810000 */ mtc1 $at, $f0
/* CAEB8 801347B8 0804D208 */ j .L80134820
/* CAEBC 801347BC 46006301 */ sub.s $f12, $f12, $f0
.L801347C0:
/* CAEC0 801347C0 0C00A67F */ jal rand_int
/* CAEC4 801347C4 24040078 */ addiu $a0, $zero, 0x78
/* CAEC8 801347C8 00101880 */ sll $v1, $s0, 2
/* CAECC 801347CC 00701821 */ addu $v1, $v1, $s0
/* CAED0 801347D0 00031880 */ sll $v1, $v1, 2
/* CAED4 801347D4 00701823 */ subu $v1, $v1, $s0
/* CAED8 801347D8 000320C0 */ sll $a0, $v1, 3
/* CAEDC 801347DC 00641821 */ addu $v1, $v1, $a0
/* CAEE0 801347E0 000318C0 */ sll $v1, $v1, 3
/* CAEE4 801347E4 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* CAEE8 801347E8 00230821 */ addu $at, $at, $v1
/* CAEEC 801347EC C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
/* CAEF0 801347F0 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* CAEF4 801347F4 44810000 */ mtc1 $at, $f0
/* CAEF8 801347F8 00000000 */ nop
/* CAEFC 801347FC 46006300 */ add.s $f12, $f12, $f0
.L80134800:
/* CAF00 80134800 44820000 */ mtc1 $v0, $f0
/* CAF04 80134804 00000000 */ nop
/* CAF08 80134808 46800020 */ cvt.s.w $f0, $f0
/* CAF0C 8013480C 46006300 */ add.s $f12, $f12, $f0
/* CAF10 80134810 3C014270 */ lui $at, (0x42700000 >> 16)
/* CAF14 80134814 44810000 */ mtc1 $at, $f0
/* CAF18 80134818 00000000 */ nop
/* CAF1C 8013481C 46006301 */ sub.s $f12, $f12, $f0
.L80134820:
/* CAF20 80134820 0C00A6C9 */ jal clamp_angle
/* CAF24 80134824 00000000 */ nop
/* CAF28 80134828 E6200018 */ swc1 $f0, 0x18($s1)
.L8013482C:
/* CAF2C 8013482C 8E420000 */ lw $v0, 0x0($s2)
/* CAF30 80134830 3C030100 */ lui $v1, (0x1000000 >> 16)
/* CAF34 80134834 00431024 */ and $v0, $v0, $v1
/* CAF38 80134838 14400019 */ bnez $v0, .L801348A0
/* CAF3C 8013483C 00000000 */ nop
/* CAF40 80134840 0C00A67F */ jal rand_int
/* CAF44 80134844 240407D0 */ addiu $a0, $zero, 0x7D0
/* CAF48 80134848 C6240018 */ lwc1 $f4, 0x18($s1)
/* CAF4C 8013484C 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* CAF50 80134850 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* CAF54 80134854 44811000 */ mtc1 $at, $f2
/* CAF58 80134858 3C01447A */ lui $at, (0x447A0000 >> 16)
/* CAF5C 8013485C 44810000 */ mtc1 $at, $f0
/* CAF60 80134860 46022102 */ mul.s $f4, $f4, $f2
/* CAF64 80134864 00000000 */ nop
/* CAF68 80134868 4482C000 */ mtc1 $v0, $f24
/* CAF6C 8013486C 00000000 */ nop
/* CAF70 80134870 4680C620 */ cvt.s.w $f24, $f24
/* CAF74 80134874 4600C003 */ div.s $f0, $f24, $f0
/* CAF78 80134878 3C013FF8 */ lui $at, (0x3FF80000 >> 16)
/* CAF7C 8013487C 44811800 */ mtc1 $at, $f3
/* CAF80 80134880 44801000 */ mtc1 $zero, $f2
/* CAF84 80134884 46000021 */ cvt.d.s $f0, $f0
/* CAF88 80134888 46220000 */ add.d $f0, $f0, $f2
/* CAF8C 8013488C 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* CAF90 80134890 44811000 */ mtc1 $at, $f2
/* CAF94 80134894 46200620 */ cvt.s.d $f24, $f0
/* CAF98 80134898 0804D272 */ j .L801349C8
/* CAF9C 8013489C 46022503 */ div.s $f20, $f4, $f2
.L801348A0:
/* CAFA0 801348A0 0C00A67F */ jal rand_int
/* CAFA4 801348A4 240407D0 */ addiu $a0, $zero, 0x7D0
/* CAFA8 801348A8 C6240018 */ lwc1 $f4, 0x18($s1)
/* CAFAC 801348AC 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* CAFB0 801348B0 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* CAFB4 801348B4 44811000 */ mtc1 $at, $f2
/* CAFB8 801348B8 3C01447A */ lui $at, (0x447A0000 >> 16)
/* CAFBC 801348BC 44810000 */ mtc1 $at, $f0
/* CAFC0 801348C0 46022102 */ mul.s $f4, $f4, $f2
/* CAFC4 801348C4 00000000 */ nop
/* CAFC8 801348C8 4482C000 */ mtc1 $v0, $f24
/* CAFCC 801348CC 00000000 */ nop
/* CAFD0 801348D0 4680C620 */ cvt.s.w $f24, $f24
/* CAFD4 801348D4 4600C003 */ div.s $f0, $f24, $f0
/* CAFD8 801348D8 3C014000 */ lui $at, (0x40000000 >> 16)
/* CAFDC 801348DC 44811800 */ mtc1 $at, $f3
/* CAFE0 801348E0 44801000 */ mtc1 $zero, $f2
/* CAFE4 801348E4 46000021 */ cvt.d.s $f0, $f0
/* CAFE8 801348E8 46220000 */ add.d $f0, $f0, $f2
/* CAFEC 801348EC 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* CAFF0 801348F0 44811000 */ mtc1 $at, $f2
/* CAFF4 801348F4 46200620 */ cvt.s.d $f24, $f0
/* CAFF8 801348F8 0804D272 */ j .L801349C8
/* CAFFC 801348FC 46022503 */ div.s $f20, $f4, $f2
.L80134900:
/* CB000 80134900 44826000 */ mtc1 $v0, $f12
/* CB004 80134904 00000000 */ nop
/* CB008 80134908 0C00A6C9 */ jal clamp_angle
/* CB00C 8013490C 46806320 */ cvt.s.w $f12, $f12
/* CB010 80134910 E6200018 */ swc1 $f0, 0x18($s1)
/* CB014 80134914 8E420000 */ lw $v0, 0x0($s2)
/* CB018 80134918 3C034000 */ lui $v1, (0x40000000 >> 16)
/* CB01C 8013491C 00431024 */ and $v0, $v0, $v1
/* CB020 80134920 1440001B */ bnez $v0, .L80134990
/* CB024 80134924 3C04B60B */ lui $a0, (0xB60B60B7 >> 16)
/* CB028 80134928 9643001E */ lhu $v1, 0x1E($s2)
/* CB02C 8013492C 348460B7 */ ori $a0, $a0, (0xB60B60B7 & 0xFFFF)
/* CB030 80134930 00031C00 */ sll $v1, $v1, 16
/* CB034 80134934 00031403 */ sra $v0, $v1, 16
/* CB038 80134938 00440018 */ mult $v0, $a0
/* CB03C 8013493C 3C018015 */ lui $at, %hi(D_80150E18)
/* CB040 80134940 D4220E18 */ ldc1 $f2, %lo(D_80150E18)($at)
/* CB044 80134944 00031FC3 */ sra $v1, $v1, 31
/* CB048 80134948 00004010 */ mfhi $t0
/* CB04C 8013494C 01021021 */ addu $v0, $t0, $v0
/* CB050 80134950 00021203 */ sra $v0, $v0, 8
/* CB054 80134954 00431023 */ subu $v0, $v0, $v1
/* CB058 80134958 00021400 */ sll $v0, $v0, 16
/* CB05C 8013495C 00021403 */ sra $v0, $v0, 16
/* CB060 80134960 44820000 */ mtc1 $v0, $f0
/* CB064 80134964 00000000 */ nop
/* CB068 80134968 46800021 */ cvt.d.w $f0, $f0
/* CB06C 8013496C 46220002 */ mul.d $f0, $f0, $f2
/* CB070 80134970 00000000 */ nop
/* CB074 80134974 3C013FF8 */ lui $at, (0x3FF80000 >> 16)
/* CB078 80134978 44811800 */ mtc1 $at, $f3
/* CB07C 8013497C 44801000 */ mtc1 $zero, $f2
/* CB080 80134980 00000000 */ nop
/* CB084 80134984 46220000 */ add.d $f0, $f0, $f2
/* CB088 80134988 0804D267 */ j .L8013499C
/* CB08C 8013498C 46200620 */ cvt.s.d $f24, $f0
.L80134990:
/* CB090 80134990 3C014006 */ lui $at, (0x40066666 >> 16)
/* CB094 80134994 34216666 */ ori $at, $at, (0x40066666 & 0xFFFF)
/* CB098 80134998 4481C000 */ mtc1 $at, $f24
.L8013499C:
/* CB09C 8013499C C6200018 */ lwc1 $f0, 0x18($s1)
/* CB0A0 801349A0 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* CB0A4 801349A4 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* CB0A8 801349A8 44811000 */ mtc1 $at, $f2
/* CB0AC 801349AC 00000000 */ nop
/* CB0B0 801349B0 46020002 */ mul.s $f0, $f0, $f2
/* CB0B4 801349B4 00000000 */ nop
/* CB0B8 801349B8 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* CB0BC 801349BC 44811000 */ mtc1 $at, $f2
/* CB0C0 801349C0 00000000 */ nop
/* CB0C4 801349C4 46020503 */ div.s $f20, $f0, $f2
.L801349C8:
/* CB0C8 801349C8 0C00A85B */ jal sin_rad
/* CB0CC 801349CC 4600A306 */ mov.s $f12, $f20
/* CB0D0 801349D0 46000586 */ mov.s $f22, $f0
/* CB0D4 801349D4 0C00A874 */ jal cos_rad
/* CB0D8 801349D8 4600A306 */ mov.s $f12, $f20
/* CB0DC 801349DC 4616C102 */ mul.s $f4, $f24, $f22
/* CB0E0 801349E0 00000000 */ nop
/* CB0E4 801349E4 4600C087 */ neg.s $f2, $f24
/* CB0E8 801349E8 46001082 */ mul.s $f2, $f2, $f0
/* CB0EC 801349EC 00000000 */ nop
/* CB0F0 801349F0 E6240010 */ swc1 $f4, 0x10($s1)
/* CB0F4 801349F4 E6220014 */ swc1 $f2, 0x14($s1)
/* CB0F8 801349F8 8243001B */ lb $v1, 0x1B($s2)
/* CB0FC 801349FC 24020017 */ addiu $v0, $zero, 0x17
/* CB100 80134A00 10620004 */ beq $v1, $v0, .L80134A14
/* CB104 80134A04 240200B4 */ addiu $v0, $zero, 0xB4
/* CB108 80134A08 AE22001C */ sw $v0, 0x1C($s1)
/* CB10C 80134A0C 0804D294 */ j .L80134A50
/* CB110 80134A10 AE200020 */ sw $zero, 0x20($s1)
.L80134A14:
/* CB114 80134A14 8E420000 */ lw $v0, 0x0($s2)
/* CB118 80134A18 3C030040 */ lui $v1, (0x400000 >> 16)
/* CB11C 80134A1C 00431024 */ and $v0, $v0, $v1
/* CB120 80134A20 14400002 */ bnez $v0, .L80134A2C
/* CB124 80134A24 24020014 */ addiu $v0, $zero, 0x14
/* CB128 80134A28 24020011 */ addiu $v0, $zero, 0x11
.L80134A2C:
/* CB12C 80134A2C AE22001C */ sw $v0, 0x1C($s1)
/* CB130 80134A30 3C014170 */ lui $at, (0x41700000 >> 16)
/* CB134 80134A34 44810000 */ mtc1 $at, $f0
/* CB138 80134A38 3C013FCC */ lui $at, (0x3FCCCCCD >> 16)
/* CB13C 80134A3C 3421CCCD */ ori $at, $at, (0x3FCCCCCD & 0xFFFF)
/* CB140 80134A40 44811000 */ mtc1 $at, $f2
/* CB144 80134A44 AE200020 */ sw $zero, 0x20($s1)
/* CB148 80134A48 E6200000 */ swc1 $f0, 0x0($s1)
/* CB14C 80134A4C E6220004 */ swc1 $f2, 0x4($s1)
.L80134A50:
/* CB150 80134A50 8243001B */ lb $v1, 0x1B($s2)
/* CB154 80134A54 24020014 */ addiu $v0, $zero, 0x14
/* CB158 80134A58 14620008 */ bne $v1, $v0, .L80134A7C
/* CB15C 80134A5C 2402000C */ addiu $v0, $zero, 0xC
/* CB160 80134A60 2402003C */ addiu $v0, $zero, 0x3C
/* CB164 80134A64 AE22001C */ sw $v0, 0x1C($s1)
/* CB168 80134A68 AE200020 */ sw $zero, 0x20($s1)
/* CB16C 80134A6C AE200010 */ sw $zero, 0x10($s1)
/* CB170 80134A70 AE200014 */ sw $zero, 0x14($s1)
/* CB174 80134A74 8243001B */ lb $v1, 0x1B($s2)
/* CB178 80134A78 2402000C */ addiu $v0, $zero, 0xC
.L80134A7C:
/* CB17C 80134A7C 14620005 */ bne $v1, $v0, .L80134A94
/* CB180 80134A80 24020001 */ addiu $v0, $zero, 0x1
/* CB184 80134A84 AE200000 */ sw $zero, 0x0($s1)
/* CB188 80134A88 AE200010 */ sw $zero, 0x10($s1)
/* CB18C 80134A8C AE200014 */ sw $zero, 0x14($s1)
/* CB190 80134A90 AE220020 */ sw $v0, 0x20($s1)
.L80134A94:
/* CB194 80134A94 8243001B */ lb $v1, 0x1B($s2)
/* CB198 80134A98 24020010 */ addiu $v0, $zero, 0x10
/* CB19C 80134A9C 14620005 */ bne $v1, $v0, .L80134AB4
/* CB1A0 80134AA0 24020001 */ addiu $v0, $zero, 0x1
/* CB1A4 80134AA4 AE200000 */ sw $zero, 0x0($s1)
/* CB1A8 80134AA8 AE200010 */ sw $zero, 0x10($s1)
/* CB1AC 80134AAC AE200014 */ sw $zero, 0x14($s1)
/* CB1B0 80134AB0 AE220020 */ sw $v0, 0x20($s1)
.L80134AB4:
/* CB1B4 80134AB4 8E420000 */ lw $v0, 0x0($s2)
/* CB1B8 80134AB8 30420800 */ andi $v0, $v0, 0x800
/* CB1BC 80134ABC 1040019C */ beqz $v0, .L80135130
/* CB1C0 80134AC0 24020001 */ addiu $v0, $zero, 0x1
/* CB1C4 80134AC4 86440004 */ lh $a0, 0x4($s2)
/* CB1C8 80134AC8 0C051514 */ jal set_global_flag
/* CB1CC 80134ACC 00000000 */ nop
/* CB1D0 80134AD0 0804D44C */ j .L80135130
/* CB1D4 80134AD4 24020001 */ addiu $v0, $zero, 0x1
.L80134AD8:
/* CB1D8 80134AD8 8E510014 */ lw $s1, 0x14($s2)
/* CB1DC 80134ADC 1062000A */ beq $v1, $v0, .L80134B08
/* CB1E0 80134AE0 00000000 */ nop
/* CB1E4 80134AE4 10650008 */ beq $v1, $a1, .L80134B08
/* CB1E8 80134AE8 00000000 */ nop
/* CB1EC 80134AEC 8E220020 */ lw $v0, 0x20($s1)
/* CB1F0 80134AF0 10400005 */ beqz $v0, .L80134B08
/* CB1F4 80134AF4 00000000 */ nop
/* CB1F8 80134AF8 0C04CEC3 */ jal test_item_player_collision
/* CB1FC 80134AFC 0240202D */ daddu $a0, $s2, $zero
/* CB200 80134B00 1440018B */ bnez $v0, .L80135130
/* CB204 80134B04 24020003 */ addiu $v0, $zero, 0x3
.L80134B08:
/* CB208 80134B08 8E430000 */ lw $v1, 0x0($s2)
/* CB20C 80134B0C 30620200 */ andi $v0, $v1, 0x200
/* CB210 80134B10 14400010 */ bnez $v0, .L80134B54
/* CB214 80134B14 30622000 */ andi $v0, $v1, 0x2000
/* CB218 80134B18 3C02800A */ lui $v0, %hi(gOverrideFlags)
/* CB21C 80134B1C 8C42A650 */ lw $v0, %lo(gOverrideFlags)($v0)
/* CB220 80134B20 30420300 */ andi $v0, $v0, 0x300
/* CB224 80134B24 1440000B */ bnez $v0, .L80134B54
/* CB228 80134B28 30622000 */ andi $v0, $v1, 0x2000
/* CB22C 80134B2C 3C020020 */ lui $v0, (0x200000 >> 16)
/* CB230 80134B30 00621024 */ and $v0, $v1, $v0
/* CB234 80134B34 14400007 */ bnez $v0, .L80134B54
/* CB238 80134B38 30622000 */ andi $v0, $v1, 0x2000
/* CB23C 80134B3C 8E22001C */ lw $v0, 0x1C($s1)
/* CB240 80134B40 2442FFFF */ addiu $v0, $v0, -0x1
/* CB244 80134B44 04400179 */ bltz $v0, .L8013512C
/* CB248 80134B48 AE22001C */ sw $v0, 0x1C($s1)
/* CB24C 80134B4C 8E430000 */ lw $v1, 0x0($s2)
/* CB250 80134B50 30622000 */ andi $v0, $v1, 0x2000
.L80134B54:
/* CB254 80134B54 1440001F */ bnez $v0, .L80134BD4
/* CB258 80134B58 3C020020 */ lui $v0, (0x200000 >> 16)
/* CB25C 80134B5C 00621024 */ and $v0, $v1, $v0
/* CB260 80134B60 1440001C */ bnez $v0, .L80134BD4
/* CB264 80134B64 00000000 */ nop
/* CB268 80134B68 C6240000 */ lwc1 $f4, 0x0($s1)
/* CB26C 80134B6C C6200004 */ lwc1 $f0, 0x4($s1)
/* CB270 80134B70 46002101 */ sub.s $f4, $f4, $f0
/* CB274 80134B74 3C01C030 */ lui $at, (0xC0300000 >> 16)
/* CB278 80134B78 44811800 */ mtc1 $at, $f3
/* CB27C 80134B7C 44801000 */ mtc1 $zero, $f2
/* CB280 80134B80 46002021 */ cvt.d.s $f0, $f4
/* CB284 80134B84 4622003C */ c.lt.d $f0, $f2
/* CB288 80134B88 00000000 */ nop
/* CB28C 80134B8C 45000005 */ bc1f .L80134BA4
/* CB290 80134B90 E6240000 */ swc1 $f4, 0x0($s1)
/* CB294 80134B94 3C01C180 */ lui $at, (0xC1800000 >> 16)
/* CB298 80134B98 44810000 */ mtc1 $at, $f0
/* CB29C 80134B9C 00000000 */ nop
/* CB2A0 80134BA0 E6200000 */ swc1 $f0, 0x0($s1)
.L80134BA4:
/* CB2A4 80134BA4 C640000C */ lwc1 $f0, 0xC($s2)
/* CB2A8 80134BA8 C6220000 */ lwc1 $f2, 0x0($s1)
/* CB2AC 80134BAC 46020000 */ add.s $f0, $f0, $f2
/* CB2B0 80134BB0 E640000C */ swc1 $f0, 0xC($s2)
/* CB2B4 80134BB4 C6400008 */ lwc1 $f0, 0x8($s2)
/* CB2B8 80134BB8 C6220010 */ lwc1 $f2, 0x10($s1)
/* CB2BC 80134BBC 46020000 */ add.s $f0, $f0, $f2
/* CB2C0 80134BC0 E6400008 */ swc1 $f0, 0x8($s2)
/* CB2C4 80134BC4 C6400010 */ lwc1 $f0, 0x10($s2)
/* CB2C8 80134BC8 C6220014 */ lwc1 $f2, 0x14($s1)
/* CB2CC 80134BCC 46020000 */ add.s $f0, $f0, $f2
/* CB2D0 80134BD0 E6400010 */ swc1 $f0, 0x10($s2)
.L80134BD4:
/* CB2D4 80134BD4 8243001B */ lb $v1, 0x1B($s2)
/* CB2D8 80134BD8 24020014 */ addiu $v0, $zero, 0x14
/* CB2DC 80134BDC 14620008 */ bne $v1, $v0, .L80134C00
/* CB2E0 80134BE0 00000000 */ nop
/* CB2E4 80134BE4 C6220000 */ lwc1 $f2, 0x0($s1)
/* CB2E8 80134BE8 44800000 */ mtc1 $zero, $f0
/* CB2EC 80134BEC 00000000 */ nop
/* CB2F0 80134BF0 4600103E */ c.le.s $f2, $f0
/* CB2F4 80134BF4 00000000 */ nop
/* CB2F8 80134BF8 4501014D */ bc1t .L80135130
/* CB2FC 80134BFC 24020003 */ addiu $v0, $zero, 0x3
.L80134C00:
/* CB300 80134C00 8E420000 */ lw $v0, 0x0($s2)
/* CB304 80134C04 3C033000 */ lui $v1, (0x30000000 >> 16)
/* CB308 80134C08 00431024 */ and $v0, $v0, $v1
/* CB30C 80134C0C 14400088 */ bnez $v0, .L80134E30
/* CB310 80134C10 24020014 */ addiu $v0, $zero, 0x14
/* CB314 80134C14 8243001B */ lb $v1, 0x1B($s2)
/* CB318 80134C18 10620025 */ beq $v1, $v0, .L80134CB0
/* CB31C 80134C1C 24020017 */ addiu $v0, $zero, 0x17
/* CB320 80134C20 10620023 */ beq $v1, $v0, .L80134CB0
/* CB324 80134C24 00000000 */ nop
/* CB328 80134C28 C6220000 */ lwc1 $f2, 0x0($s1)
/* CB32C 80134C2C 44800000 */ mtc1 $zero, $f0
/* CB330 80134C30 00000000 */ nop
/* CB334 80134C34 4602003C */ c.lt.s $f0, $f2
/* CB338 80134C38 00000000 */ nop
/* CB33C 80134C3C 4500001C */ bc1f .L80134CB0
/* CB340 80134C40 27A2002C */ addiu $v0, $sp, 0x2C
/* CB344 80134C44 C6400008 */ lwc1 $f0, 0x8($s2)
/* CB348 80134C48 C638000C */ lwc1 $f24, 0xC($s1)
/* CB34C 80134C4C E7A00020 */ swc1 $f0, 0x20($sp)
/* CB350 80134C50 C642000C */ lwc1 $f2, 0xC($s2)
/* CB354 80134C54 C6440010 */ lwc1 $f4, 0x10($s2)
/* CB358 80134C58 C6200000 */ lwc1 $f0, 0x0($s1)
/* CB35C 80134C5C 4600C000 */ add.s $f0, $f24, $f0
/* CB360 80134C60 E7A20024 */ swc1 $f2, 0x24($sp)
/* CB364 80134C64 E7A40028 */ swc1 $f4, 0x28($sp)
/* CB368 80134C68 E7A0002C */ swc1 $f0, 0x2C($sp)
/* CB36C 80134C6C AFA20010 */ sw $v0, 0x10($sp)
/* CB370 80134C70 3C040002 */ lui $a0, (0x20000 >> 16)
/* CB374 80134C74 27A50020 */ addiu $a1, $sp, 0x20
/* CB378 80134C78 27A60024 */ addiu $a2, $sp, 0x24
/* CB37C 80134C7C 0C03739C */ jal npc_raycast_up
/* CB380 80134C80 27A70028 */ addiu $a3, $sp, 0x28
/* CB384 80134C84 1040000A */ beqz $v0, .L80134CB0
/* CB388 80134C88 00000000 */ nop
/* CB38C 80134C8C C7A0002C */ lwc1 $f0, 0x2C($sp)
/* CB390 80134C90 4618003C */ c.lt.s $f0, $f24
/* CB394 80134C94 00000000 */ nop
/* CB398 80134C98 45000005 */ bc1f .L80134CB0
/* CB39C 80134C9C 00000000 */ nop
/* CB3A0 80134CA0 C7A00024 */ lwc1 $f0, 0x24($sp)
/* CB3A4 80134CA4 46180001 */ sub.s $f0, $f0, $f24
/* CB3A8 80134CA8 E640000C */ swc1 $f0, 0xC($s2)
/* CB3AC 80134CAC AE200000 */ sw $zero, 0x0($s1)
.L80134CB0:
/* CB3B0 80134CB0 8E420000 */ lw $v0, 0x0($s2)
/* CB3B4 80134CB4 3C033000 */ lui $v1, (0x30000000 >> 16)
/* CB3B8 80134CB8 00431024 */ and $v0, $v0, $v1
/* CB3BC 80134CBC 1440005C */ bnez $v0, .L80134E30
/* CB3C0 80134CC0 24020014 */ addiu $v0, $zero, 0x14
/* CB3C4 80134CC4 8243001B */ lb $v1, 0x1B($s2)
/* CB3C8 80134CC8 10620059 */ beq $v1, $v0, .L80134E30
/* CB3CC 80134CCC 24020017 */ addiu $v0, $zero, 0x17
/* CB3D0 80134CD0 10620057 */ beq $v1, $v0, .L80134E30
/* CB3D4 80134CD4 00000000 */ nop
/* CB3D8 80134CD8 C6200010 */ lwc1 $f0, 0x10($s1)
/* CB3DC 80134CDC 44803000 */ mtc1 $zero, $f6
/* CB3E0 80134CE0 00000000 */ nop
/* CB3E4 80134CE4 46060032 */ c.eq.s $f0, $f6
/* CB3E8 80134CE8 00000000 */ nop
/* CB3EC 80134CEC 45000006 */ bc1f .L80134D08
/* CB3F0 80134CF0 00000000 */ nop
/* CB3F4 80134CF4 C6200014 */ lwc1 $f0, 0x14($s1)
/* CB3F8 80134CF8 46060032 */ c.eq.s $f0, $f6
/* CB3FC 80134CFC 00000000 */ nop
/* CB400 80134D00 4501004B */ bc1t .L80134E30
/* CB404 80134D04 00000000 */ nop
.L80134D08:
/* CB408 80134D08 C6400008 */ lwc1 $f0, 0x8($s2)
/* CB40C 80134D0C C642000C */ lwc1 $f2, 0xC($s2)
/* CB410 80134D10 C6440010 */ lwc1 $f4, 0x10($s2)
/* CB414 80134D14 8E220020 */ lw $v0, 0x20($s1)
/* CB418 80134D18 E7A00020 */ swc1 $f0, 0x20($sp)
/* CB41C 80134D1C E7A20024 */ swc1 $f2, 0x24($sp)
/* CB420 80134D20 1440000F */ bnez $v0, .L80134D60
/* CB424 80134D24 E7A40028 */ swc1 $f4, 0x28($sp)
/* CB428 80134D28 3C040002 */ lui $a0, (0x20000 >> 16)
/* CB42C 80134D2C E7A60010 */ swc1 $f6, 0x10($sp)
/* CB430 80134D30 C6200018 */ lwc1 $f0, 0x18($s1)
/* CB434 80134D34 27A50020 */ addiu $a1, $sp, 0x20
/* CB438 80134D38 E7A00014 */ swc1 $f0, 0x14($sp)
/* CB43C 80134D3C C620000C */ lwc1 $f0, 0xC($s1)
/* CB440 80134D40 27A60024 */ addiu $a2, $sp, 0x24
/* CB444 80134D44 E7A00018 */ swc1 $f0, 0x18($sp)
/* CB448 80134D48 C6200008 */ lwc1 $f0, 0x8($s1)
/* CB44C 80134D4C 27A70028 */ addiu $a3, $sp, 0x28
/* CB450 80134D50 0C037765 */ jal npc_test_move_complex_with_slipping
/* CB454 80134D54 E7A0001C */ swc1 $f0, 0x1C($sp)
/* CB458 80134D58 0804D364 */ j .L80134D90
/* CB45C 80134D5C 00000000 */ nop
.L80134D60:
/* CB460 80134D60 3C040002 */ lui $a0, (0x20000 >> 16)
/* CB464 80134D64 E7A60010 */ swc1 $f6, 0x10($sp)
/* CB468 80134D68 C6200018 */ lwc1 $f0, 0x18($s1)
/* CB46C 80134D6C 27A50020 */ addiu $a1, $sp, 0x20
/* CB470 80134D70 E7A00014 */ swc1 $f0, 0x14($sp)
/* CB474 80134D74 C620000C */ lwc1 $f0, 0xC($s1)
/* CB478 80134D78 27A60024 */ addiu $a2, $sp, 0x24
/* CB47C 80134D7C E7A00018 */ swc1 $f0, 0x18($sp)
/* CB480 80134D80 C6200008 */ lwc1 $f0, 0x8($s1)
/* CB484 80134D84 27A70028 */ addiu $a3, $sp, 0x28
/* CB488 80134D88 0C037711 */ jal npc_test_move_simple_with_slipping
/* CB48C 80134D8C E7A0001C */ swc1 $f0, 0x1C($sp)
.L80134D90:
/* CB490 80134D90 10400027 */ beqz $v0, .L80134E30
/* CB494 80134D94 00000000 */ nop
/* CB498 80134D98 C7A00020 */ lwc1 $f0, 0x20($sp)
/* CB49C 80134D9C C7A20024 */ lwc1 $f2, 0x24($sp)
/* CB4A0 80134DA0 C7A40028 */ lwc1 $f4, 0x28($sp)
/* CB4A4 80134DA4 3C014334 */ lui $at, (0x43340000 >> 16)
/* CB4A8 80134DA8 44816000 */ mtc1 $at, $f12
/* CB4AC 80134DAC E6400008 */ swc1 $f0, 0x8($s2)
/* CB4B0 80134DB0 E642000C */ swc1 $f2, 0xC($s2)
/* CB4B4 80134DB4 E6440010 */ swc1 $f4, 0x10($s2)
/* CB4B8 80134DB8 C6200018 */ lwc1 $f0, 0x18($s1)
/* CB4BC 80134DBC 0C00A6C9 */ jal clamp_angle
/* CB4C0 80134DC0 460C0300 */ add.s $f12, $f0, $f12
/* CB4C4 80134DC4 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* CB4C8 80134DC8 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* CB4CC 80134DCC 44811000 */ mtc1 $at, $f2
/* CB4D0 80134DD0 00000000 */ nop
/* CB4D4 80134DD4 46020082 */ mul.s $f2, $f0, $f2
/* CB4D8 80134DD8 00000000 */ nop
/* CB4DC 80134DDC 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* CB4E0 80134DE0 44812000 */ mtc1 $at, $f4
/* CB4E4 80134DE4 E6200018 */ swc1 $f0, 0x18($s1)
/* CB4E8 80134DE8 46041503 */ div.s $f20, $f2, $f4
/* CB4EC 80134DEC 0C00A85B */ jal sin_rad
/* CB4F0 80134DF0 4600A306 */ mov.s $f12, $f20
/* CB4F4 80134DF4 46000586 */ mov.s $f22, $f0
/* CB4F8 80134DF8 0C00A874 */ jal cos_rad
/* CB4FC 80134DFC 4600A306 */ mov.s $f12, $f20
/* CB500 80134E00 3C01C000 */ lui $at, (0xC0000000 >> 16)
/* CB504 80134E04 44811800 */ mtc1 $at, $f3
/* CB508 80134E08 44801000 */ mtc1 $zero, $f2
/* CB50C 80134E0C 46000021 */ cvt.d.s $f0, $f0
/* CB510 80134E10 46220002 */ mul.d $f0, $f0, $f2
/* CB514 80134E14 00000000 */ nop
/* CB518 80134E18 4600B0A1 */ cvt.d.s $f2, $f22
/* CB51C 80134E1C 46221080 */ add.d $f2, $f2, $f2
/* CB520 80134E20 462010A0 */ cvt.s.d $f2, $f2
/* CB524 80134E24 E6220010 */ swc1 $f2, 0x10($s1)
/* CB528 80134E28 46200020 */ cvt.s.d $f0, $f0
/* CB52C 80134E2C E6200014 */ swc1 $f0, 0x14($s1)
.L80134E30:
/* CB530 80134E30 8E420000 */ lw $v0, 0x0($s2)
/* CB534 80134E34 3C031000 */ lui $v1, (0x10000000 >> 16)
/* CB538 80134E38 00431024 */ and $v0, $v0, $v1
/* CB53C 80134E3C 144000B3 */ bnez $v0, .L8013510C
/* CB540 80134E40 24020014 */ addiu $v0, $zero, 0x14
/* CB544 80134E44 8243001B */ lb $v1, 0x1B($s2)
/* CB548 80134E48 106200B0 */ beq $v1, $v0, .L8013510C
/* CB54C 80134E4C 00000000 */ nop
/* CB550 80134E50 C6200000 */ lwc1 $f0, 0x0($s1)
/* CB554 80134E54 44801000 */ mtc1 $zero, $f2
/* CB558 80134E58 44801800 */ mtc1 $zero, $f3
/* CB55C 80134E5C 46000021 */ cvt.d.s $f0, $f0
/* CB560 80134E60 4622003E */ c.le.d $f0, $f2
/* CB564 80134E64 00000000 */ nop
/* CB568 80134E68 450000A8 */ bc1f .L8013510C
/* CB56C 80134E6C 24020001 */ addiu $v0, $zero, 0x1
/* CB570 80134E70 AE220020 */ sw $v0, 0x20($s1)
/* CB574 80134E74 8243001B */ lb $v1, 0x1B($s2)
/* CB578 80134E78 24020017 */ addiu $v0, $zero, 0x17
/* CB57C 80134E7C 1062002A */ beq $v1, $v0, .L80134F28
/* CB580 80134E80 00000000 */ nop
/* CB584 80134E84 C642000C */ lwc1 $f2, 0xC($s2)
/* CB588 80134E88 C6200000 */ lwc1 $f0, 0x0($s1)
/* CB58C 80134E8C C6440008 */ lwc1 $f4, 0x8($s2)
/* CB590 80134E90 46001081 */ sub.s $f2, $f2, $f0
/* CB594 80134E94 E7A40020 */ swc1 $f4, 0x20($sp)
/* CB598 80134E98 C6200000 */ lwc1 $f0, 0x0($s1)
/* CB59C 80134E9C 3C014140 */ lui $at, (0x41400000 >> 16)
/* CB5A0 80134EA0 44813000 */ mtc1 $at, $f6
/* CB5A4 80134EA4 46000007 */ neg.s $f0, $f0
/* CB5A8 80134EA8 46060000 */ add.s $f0, $f0, $f6
/* CB5AC 80134EAC C6440010 */ lwc1 $f4, 0x10($s2)
/* CB5B0 80134EB0 8E220020 */ lw $v0, 0x20($s1)
/* CB5B4 80134EB4 46061080 */ add.s $f2, $f2, $f6
/* CB5B8 80134EB8 E7A40028 */ swc1 $f4, 0x28($sp)
/* CB5BC 80134EBC E7A0002C */ swc1 $f0, 0x2C($sp)
/* CB5C0 80134EC0 1440000A */ bnez $v0, .L80134EEC
/* CB5C4 80134EC4 E7A20024 */ swc1 $f2, 0x24($sp)
/* CB5C8 80134EC8 27A2002C */ addiu $v0, $sp, 0x2C
/* CB5CC 80134ECC AFA20010 */ sw $v0, 0x10($sp)
/* CB5D0 80134ED0 3C040002 */ lui $a0, (0x20000 >> 16)
/* CB5D4 80134ED4 27A50020 */ addiu $a1, $sp, 0x20
/* CB5D8 80134ED8 27A60024 */ addiu $a2, $sp, 0x24
/* CB5DC 80134EDC 0C0372DF */ jal npc_raycast_down_sides
/* CB5E0 80134EE0 27A70028 */ addiu $a3, $sp, 0x28
/* CB5E4 80134EE4 0804D3E1 */ j .L80134F84
/* CB5E8 80134EE8 00000000 */ nop
.L80134EEC:
/* CB5EC 80134EEC 3C040002 */ lui $a0, (0x20000 >> 16)
/* CB5F0 80134EF0 27A50020 */ addiu $a1, $sp, 0x20
/* CB5F4 80134EF4 27A60024 */ addiu $a2, $sp, 0x24
/* CB5F8 80134EF8 27A70028 */ addiu $a3, $sp, 0x28
/* CB5FC 80134EFC 3C014334 */ lui $at, (0x43340000 >> 16)
/* CB600 80134F00 44810000 */ mtc1 $at, $f0
/* CB604 80134F04 3C0141A0 */ lui $at, (0x41A00000 >> 16)
/* CB608 80134F08 44811000 */ mtc1 $at, $f2
/* CB60C 80134F0C 27A2002C */ addiu $v0, $sp, 0x2C
/* CB610 80134F10 AFA20010 */ sw $v0, 0x10($sp)
/* CB614 80134F14 E7A00014 */ swc1 $f0, 0x14($sp)
/* CB618 80134F18 0C0371DE */ jal npc_raycast_down_around
/* CB61C 80134F1C E7A20018 */ swc1 $f2, 0x18($sp)
/* CB620 80134F20 0804D3E1 */ j .L80134F84
/* CB624 80134F24 00000000 */ nop
.L80134F28:
/* CB628 80134F28 C644000C */ lwc1 $f4, 0xC($s2)
/* CB62C 80134F2C C6200000 */ lwc1 $f0, 0x0($s1)
/* CB630 80134F30 C6460008 */ lwc1 $f6, 0x8($s2)
/* CB634 80134F34 46002101 */ sub.s $f4, $f4, $f0
/* CB638 80134F38 3C014140 */ lui $at, (0x41400000 >> 16)
/* CB63C 80134F3C 44811000 */ mtc1 $at, $f2
/* CB640 80134F40 44804000 */ mtc1 $zero, $f8
/* CB644 80134F44 46000007 */ neg.s $f0, $f0
/* CB648 80134F48 46020000 */ add.s $f0, $f0, $f2
/* CB64C 80134F4C E7A60020 */ swc1 $f6, 0x20($sp)
/* CB650 80134F50 46022100 */ add.s $f4, $f4, $f2
/* CB654 80134F54 C6420010 */ lwc1 $f2, 0x10($s2)
/* CB658 80134F58 E7A0002C */ swc1 $f0, 0x2C($sp)
/* CB65C 80134F5C 46080180 */ add.s $f6, $f0, $f8
/* CB660 80134F60 E7A20028 */ swc1 $f2, 0x28($sp)
/* CB664 80134F64 4606203C */ c.lt.s $f4, $f6
/* CB668 80134F68 00000000 */ nop
/* CB66C 80134F6C 45000004 */ bc1f .L80134F80
/* CB670 80134F70 E7A40024 */ swc1 $f4, 0x24($sp)
/* CB674 80134F74 E7A80024 */ swc1 $f8, 0x24($sp)
/* CB678 80134F78 0804D3E1 */ j .L80134F84
/* CB67C 80134F7C 24020001 */ addiu $v0, $zero, 0x1
.L80134F80:
/* CB680 80134F80 0000102D */ daddu $v0, $zero, $zero
.L80134F84:
/* CB684 80134F84 10400061 */ beqz $v0, .L8013510C
/* CB688 80134F88 00000000 */ nop
/* CB68C 80134F8C C7A00024 */ lwc1 $f0, 0x24($sp)
/* CB690 80134F90 3C013FF4 */ lui $at, (0x3FF40000 >> 16)
/* CB694 80134F94 44811800 */ mtc1 $at, $f3
/* CB698 80134F98 44801000 */ mtc1 $zero, $f2
/* CB69C 80134F9C E640000C */ swc1 $f0, 0xC($s2)
/* CB6A0 80134FA0 C6200000 */ lwc1 $f0, 0x0($s1)
/* CB6A4 80134FA4 3C014008 */ lui $at, (0x40080000 >> 16)
/* CB6A8 80134FA8 44812800 */ mtc1 $at, $f5
/* CB6AC 80134FAC 44802000 */ mtc1 $zero, $f4
/* CB6B0 80134FB0 46000007 */ neg.s $f0, $f0
/* CB6B4 80134FB4 46000021 */ cvt.d.s $f0, $f0
/* CB6B8 80134FB8 46220003 */ div.d $f0, $f0, $f2
/* CB6BC 80134FBC 46200020 */ cvt.s.d $f0, $f0
/* CB6C0 80134FC0 460000A1 */ cvt.d.s $f2, $f0
/* CB6C4 80134FC4 4624103C */ c.lt.d $f2, $f4
/* CB6C8 80134FC8 00000000 */ nop
/* CB6CC 80134FCC 45000009 */ bc1f .L80134FF4
/* CB6D0 80134FD0 E6200000 */ swc1 $f0, 0x0($s1)
/* CB6D4 80134FD4 AE200000 */ sw $zero, 0x0($s1)
/* CB6D8 80134FD8 AE200010 */ sw $zero, 0x10($s1)
/* CB6DC 80134FDC AE200014 */ sw $zero, 0x14($s1)
/* CB6E0 80134FE0 8E420000 */ lw $v0, 0x0($s2)
/* CB6E4 80134FE4 3C032000 */ lui $v1, (0x20000000 >> 16)
/* CB6E8 80134FE8 00431025 */ or $v0, $v0, $v1
/* CB6EC 80134FEC 0804D443 */ j .L8013510C
/* CB6F0 80134FF0 AE420000 */ sw $v0, 0x0($s2)
.L80134FF4:
/* CB6F4 80134FF4 96430018 */ lhu $v1, 0x18($s2)
/* CB6F8 80134FF8 2462FF20 */ addiu $v0, $v1, -0xE0
/* CB6FC 80134FFC 2C420075 */ sltiu $v0, $v0, 0x75
/* CB700 80135000 10400004 */ beqz $v0, .L80135014
/* CB704 80135004 2404021B */ addiu $a0, $zero, 0x21B
/* CB708 80135008 C6400010 */ lwc1 $f0, 0x10($s2)
/* CB70C 8013500C 0804D43F */ j .L801350FC
/* CB710 80135010 E7A00010 */ swc1 $f0, 0x10($sp)
.L80135014:
/* CB714 80135014 2462FFF0 */ addiu $v0, $v1, -0x10
/* CB718 80135018 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CB71C 8013501C 2C4200CB */ sltiu $v0, $v0, 0xCB
/* CB720 80135020 10400004 */ beqz $v0, .L80135034
/* CB724 80135024 2404021A */ addiu $a0, $zero, 0x21A
/* CB728 80135028 C6400010 */ lwc1 $f0, 0x10($s2)
/* CB72C 8013502C 0804D43F */ j .L801350FC
/* CB730 80135030 E7A00010 */ swc1 $f0, 0x10($sp)
.L80135034:
/* CB734 80135034 00031400 */ sll $v0, $v1, 16
/* CB738 80135038 00021C03 */ sra $v1, $v0, 16
/* CB73C 8013503C 24020158 */ addiu $v0, $zero, 0x158
/* CB740 80135040 1062001F */ beq $v1, $v0, .L801350C0
/* CB744 80135044 28620159 */ slti $v0, $v1, 0x159
/* CB748 80135048 10400009 */ beqz $v0, .L80135070
/* CB74C 8013504C 24020156 */ addiu $v0, $zero, 0x156
/* CB750 80135050 10620012 */ beq $v1, $v0, .L8013509C
/* CB754 80135054 28620157 */ slti $v0, $v1, 0x157
/* CB758 80135058 10400013 */ beqz $v0, .L801350A8
/* CB75C 8013505C 24020010 */ addiu $v0, $zero, 0x10
/* CB760 80135060 10620014 */ beq $v1, $v0, .L801350B4
/* CB764 80135064 00000000 */ nop
/* CB768 80135068 0804D443 */ j .L8013510C
/* CB76C 8013506C 00000000 */ nop
.L80135070:
/* CB770 80135070 2402015A */ addiu $v0, $zero, 0x15A
/* CB774 80135074 10620018 */ beq $v1, $v0, .L801350D8
/* CB778 80135078 0062102A */ slt $v0, $v1, $v0
/* CB77C 8013507C 14400013 */ bnez $v0, .L801350CC
/* CB780 80135080 2402015B */ addiu $v0, $zero, 0x15B
/* CB784 80135084 1062001A */ beq $v1, $v0, .L801350F0
/* CB788 80135088 2402015C */ addiu $v0, $zero, 0x15C
/* CB78C 8013508C 10620015 */ beq $v1, $v0, .L801350E4
/* CB790 80135090 00000000 */ nop
/* CB794 80135094 0804D443 */ j .L8013510C
/* CB798 80135098 00000000 */ nop
.L8013509C:
/* CB79C 8013509C C6400010 */ lwc1 $f0, 0x10($s2)
/* CB7A0 801350A0 0804D43E */ j .L801350F8
/* CB7A4 801350A4 24040214 */ addiu $a0, $zero, 0x214
.L801350A8:
/* CB7A8 801350A8 C6400010 */ lwc1 $f0, 0x10($s2)
/* CB7AC 801350AC 0804D43E */ j .L801350F8
/* CB7B0 801350B0 24040212 */ addiu $a0, $zero, 0x212
.L801350B4:
/* CB7B4 801350B4 C6400010 */ lwc1 $f0, 0x10($s2)
/* CB7B8 801350B8 0804D43E */ j .L801350F8
/* CB7BC 801350BC 24040212 */ addiu $a0, $zero, 0x212
.L801350C0:
/* CB7C0 801350C0 C6400010 */ lwc1 $f0, 0x10($s2)
/* CB7C4 801350C4 0804D43E */ j .L801350F8
/* CB7C8 801350C8 24040214 */ addiu $a0, $zero, 0x214
.L801350CC:
/* CB7CC 801350CC C6400010 */ lwc1 $f0, 0x10($s2)
/* CB7D0 801350D0 0804D43E */ j .L801350F8
/* CB7D4 801350D4 24040212 */ addiu $a0, $zero, 0x212
.L801350D8:
/* CB7D8 801350D8 C6400010 */ lwc1 $f0, 0x10($s2)
/* CB7DC 801350DC 0804D43E */ j .L801350F8
/* CB7E0 801350E0 24040214 */ addiu $a0, $zero, 0x214
.L801350E4:
/* CB7E4 801350E4 C6400010 */ lwc1 $f0, 0x10($s2)
/* CB7E8 801350E8 0804D43E */ j .L801350F8
/* CB7EC 801350EC 24040219 */ addiu $a0, $zero, 0x219
.L801350F0:
/* CB7F0 801350F0 C6400010 */ lwc1 $f0, 0x10($s2)
/* CB7F4 801350F4 24040218 */ addiu $a0, $zero, 0x218
.L801350F8:
/* CB7F8 801350F8 E7A00010 */ swc1 $f0, 0x10($sp)
.L801350FC:
/* CB7FC 801350FC 8E460008 */ lw $a2, 0x8($s2)
/* CB800 80135100 8E47000C */ lw $a3, 0xC($s2)
/* CB804 80135104 0C052757 */ jal sfx_play_sound_at_position
/* CB808 80135108 0000282D */ daddu $a1, $zero, $zero
.L8013510C:
/* CB80C 8013510C C642000C */ lwc1 $f2, 0xC($s2)
/* CB810 80135110 3C01C4FA */ lui $at, (0xC4FA0000 >> 16)
/* CB814 80135114 44810000 */ mtc1 $at, $f0
/* CB818 80135118 00000000 */ nop
/* CB81C 8013511C 4600103C */ c.lt.s $f2, $f0
/* CB820 80135120 00000000 */ nop
/* CB824 80135124 45000003 */ bc1f .L80135134
/* CB828 80135128 00000000 */ nop
.L8013512C:
/* CB82C 8013512C 24020002 */ addiu $v0, $zero, 0x2
.L80135130:
/* CB830 80135130 A242001A */ sb $v0, 0x1A($s2)
.L80135134:
/* CB834 80135134 8243001A */ lb $v1, 0x1A($s2)
/* CB838 80135138 24020002 */ addiu $v0, $zero, 0x2
/* CB83C 8013513C 14620005 */ bne $v1, $v0, .L80135154
/* CB840 80135140 24020003 */ addiu $v0, $zero, 0x3
/* CB844 80135144 0C04CE4C */ jal remove_item_entity_by_reference
/* CB848 80135148 0240202D */ daddu $a0, $s2, $zero
/* CB84C 8013514C 8243001A */ lb $v1, 0x1A($s2)
/* CB850 80135150 24020003 */ addiu $v0, $zero, 0x3
.L80135154:
/* CB854 80135154 146200E6 */ bne $v1, $v0, .L801354F0
/* CB858 80135158 00000000 */ nop
/* CB85C 8013515C 8E420000 */ lw $v0, 0x0($s2)
/* CB860 80135160 30420400 */ andi $v0, $v0, 0x400
/* CB864 80135164 10400003 */ beqz $v0, .L80135174
/* CB868 80135168 00000000 */ nop
/* CB86C 8013516C 0C051514 */ jal set_global_flag
/* CB870 80135170 86440004 */ lh $a0, 0x4($s2)
.L80135174:
/* CB874 80135174 C644000C */ lwc1 $f4, 0xC($s2)
/* CB878 80135178 3C014180 */ lui $at, (0x41800000 >> 16)
/* CB87C 8013517C 44810000 */ mtc1 $at, $f0
/* CB880 80135180 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* CB884 80135184 44811000 */ mtc1 $at, $f2
/* CB888 80135188 AFA00014 */ sw $zero, 0x14($sp)
/* CB88C 8013518C 46002100 */ add.s $f4, $f4, $f0
/* CB890 80135190 E7A20010 */ swc1 $f2, 0x10($sp)
/* CB894 80135194 8E450008 */ lw $a1, 0x8($s2)
/* CB898 80135198 8E470010 */ lw $a3, 0x10($s2)
/* CB89C 8013519C 44062000 */ mfc1 $a2, $f4
/* CB8A0 801351A0 0C01C4FC */ jal fx_small_gold_sparkle
/* CB8A4 801351A4 0000202D */ daddu $a0, $zero, $zero
/* CB8A8 801351A8 96430018 */ lhu $v1, 0x18($s2)
/* CB8AC 801351AC 2462FFF0 */ addiu $v0, $v1, -0x10
/* CB8B0 801351B0 2C4200CB */ sltiu $v0, $v0, 0xCB
/* CB8B4 801351B4 1440000F */ bnez $v0, .L801351F4
/* CB8B8 801351B8 2402000A */ addiu $v0, $zero, 0xA
/* CB8BC 801351BC 2462FF20 */ addiu $v0, $v1, -0xE0
/* CB8C0 801351C0 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CB8C4 801351C4 2C420075 */ sltiu $v0, $v0, 0x75
/* CB8C8 801351C8 1440000A */ bnez $v0, .L801351F4
/* CB8CC 801351CC 2402000A */ addiu $v0, $zero, 0xA
/* CB8D0 801351D0 00031400 */ sll $v0, $v1, 16
/* CB8D4 801351D4 00021403 */ sra $v0, $v0, 16
/* CB8D8 801351D8 2403015C */ addiu $v1, $zero, 0x15C
/* CB8DC 801351DC 14430007 */ bne $v0, $v1, .L801351FC
/* CB8E0 801351E0 24020017 */ addiu $v0, $zero, 0x17
/* CB8E4 801351E4 9662032C */ lhu $v0, 0x32C($s3)
/* CB8E8 801351E8 24420001 */ addiu $v0, $v0, 0x1
/* CB8EC 801351EC A662032C */ sh $v0, 0x32C($s3)
/* CB8F0 801351F0 2402000A */ addiu $v0, $zero, 0xA
.L801351F4:
/* CB8F4 801351F4 0804D53C */ j .L801354F0
/* CB8F8 801351F8 A242001A */ sb $v0, 0x1A($s2)
.L801351FC:
/* CB8FC 801351FC 8243001B */ lb $v1, 0x1B($s2)
/* CB900 80135200 14620002 */ bne $v1, $v0, .L8013520C
/* CB904 80135204 2402FFFF */ addiu $v0, $zero, -0x1
/* CB908 80135208 A6420018 */ sh $v0, 0x18($s2)
.L8013520C:
/* CB90C 8013520C 86430018 */ lh $v1, 0x18($s2)
/* CB910 80135210 24020157 */ addiu $v0, $zero, 0x157
/* CB914 80135214 10620075 */ beq $v1, $v0, .L801353EC
/* CB918 80135218 28620158 */ slti $v0, $v1, 0x158
/* CB91C 8013521C 10400007 */ beqz $v0, .L8013523C
/* CB920 80135220 24020010 */ addiu $v0, $zero, 0x10
/* CB924 80135224 1062008B */ beq $v1, $v0, .L80135454
/* CB928 80135228 24020156 */ addiu $v0, $zero, 0x156
/* CB92C 8013522C 10620011 */ beq $v1, $v0, .L80135274
/* CB930 80135230 0240202D */ daddu $a0, $s2, $zero
/* CB934 80135234 0804D533 */ j .L801354CC
/* CB938 80135238 00000000 */ nop
.L8013523C:
/* CB93C 8013523C 2402015A */ addiu $v0, $zero, 0x15A
/* CB940 80135240 10620096 */ beq $v1, $v0, .L8013549C
/* CB944 80135244 2862015B */ slti $v0, $v1, 0x15B
/* CB948 80135248 10400005 */ beqz $v0, .L80135260
/* CB94C 8013524C 24020159 */ addiu $v0, $zero, 0x159
/* CB950 80135250 10620086 */ beq $v1, $v0, .L8013546C
/* CB954 80135254 0240202D */ daddu $a0, $s2, $zero
/* CB958 80135258 0804D533 */ j .L801354CC
/* CB95C 8013525C 00000000 */ nop
.L80135260:
/* CB960 80135260 2402015B */ addiu $v0, $zero, 0x15B
/* CB964 80135264 10620028 */ beq $v1, $v0, .L80135308
/* CB968 80135268 0240202D */ daddu $a0, $s2, $zero
/* CB96C 8013526C 0804D533 */ j .L801354CC
/* CB970 80135270 00000000 */ nop
.L80135274:
/* CB974 80135274 82620002 */ lb $v0, 0x2($s3)
/* CB978 80135278 82630003 */ lb $v1, 0x3($s3)
/* CB97C 8013527C 0043102A */ slt $v0, $v0, $v1
/* CB980 80135280 10400014 */ beqz $v0, .L801352D4
/* CB984 80135284 0000202D */ daddu $a0, $zero, $zero
/* CB988 80135288 868200B0 */ lh $v0, 0xB0($s4)
/* CB98C 8013528C C682002C */ lwc1 $f2, 0x2C($s4)
/* CB990 80135290 44820000 */ mtc1 $v0, $f0
/* CB994 80135294 00000000 */ nop
/* CB998 80135298 46800020 */ cvt.s.w $f0, $f0
/* CB99C 8013529C 46001080 */ add.s $f2, $f2, $f0
/* CB9A0 801352A0 8E850028 */ lw $a1, 0x28($s4)
/* CB9A4 801352A4 8E870030 */ lw $a3, 0x30($s4)
/* CB9A8 801352A8 44061000 */ mfc1 $a2, $f2
/* CB9AC 801352AC 24020001 */ addiu $v0, $zero, 0x1
/* CB9B0 801352B0 0C01C424 */ jal fx_recover
/* CB9B4 801352B4 AFA20010 */ sw $v0, 0x10($sp)
/* CB9B8 801352B8 C6400010 */ lwc1 $f0, 0x10($s2)
/* CB9BC 801352BC 24042056 */ addiu $a0, $zero, 0x2056
/* CB9C0 801352C0 E7A00010 */ swc1 $f0, 0x10($sp)
/* CB9C4 801352C4 8E460008 */ lw $a2, 0x8($s2)
/* CB9C8 801352C8 8E47000C */ lw $a3, 0xC($s2)
/* CB9CC 801352CC 0C052757 */ jal sfx_play_sound_at_position
/* CB9D0 801352D0 0000282D */ daddu $a1, $zero, $zero
.L801352D4:
/* CB9D4 801352D4 92620002 */ lbu $v0, 0x2($s3)
/* CB9D8 801352D8 82630003 */ lb $v1, 0x3($s3)
/* CB9DC 801352DC 24420001 */ addiu $v0, $v0, 0x1
/* CB9E0 801352E0 A2620002 */ sb $v0, 0x2($s3)
/* CB9E4 801352E4 00021600 */ sll $v0, $v0, 24
/* CB9E8 801352E8 00021603 */ sra $v0, $v0, 24
/* CB9EC 801352EC 0062182A */ slt $v1, $v1, $v0
/* CB9F0 801352F0 92620003 */ lbu $v0, 0x3($s3)
/* CB9F4 801352F4 54600001 */ bnel $v1, $zero, .L801352FC
/* CB9F8 801352F8 A2620002 */ sb $v0, 0x2($s3)
.L801352FC:
/* CB9FC 801352FC C6400010 */ lwc1 $f0, 0x10($s2)
/* CBA00 80135300 0804D4E6 */ j .L80135398
/* CBA04 80135304 24040213 */ addiu $a0, $zero, 0x213
.L80135308:
/* CBA08 80135308 82620005 */ lb $v0, 0x5($s3)
/* CBA0C 8013530C 82630006 */ lb $v1, 0x6($s3)
/* CBA10 80135310 0043102A */ slt $v0, $v0, $v1
/* CBA14 80135314 10400014 */ beqz $v0, .L80135368
/* CBA18 80135318 24040001 */ addiu $a0, $zero, 0x1
/* CBA1C 8013531C 868200B0 */ lh $v0, 0xB0($s4)
/* CBA20 80135320 C682002C */ lwc1 $f2, 0x2C($s4)
/* CBA24 80135324 44820000 */ mtc1 $v0, $f0
/* CBA28 80135328 00000000 */ nop
/* CBA2C 8013532C 46800020 */ cvt.s.w $f0, $f0
/* CBA30 80135330 46001080 */ add.s $f2, $f2, $f0
/* CBA34 80135334 8E850028 */ lw $a1, 0x28($s4)
/* CBA38 80135338 8E870030 */ lw $a3, 0x30($s4)
/* CBA3C 8013533C 44061000 */ mfc1 $a2, $f2
/* CBA40 80135340 0080102D */ daddu $v0, $a0, $zero
/* CBA44 80135344 0C01C424 */ jal fx_recover
/* CBA48 80135348 AFA20010 */ sw $v0, 0x10($sp)
/* CBA4C 8013534C C6400010 */ lwc1 $f0, 0x10($s2)
/* CBA50 80135350 24042056 */ addiu $a0, $zero, 0x2056
/* CBA54 80135354 E7A00010 */ swc1 $f0, 0x10($sp)
/* CBA58 80135358 8E460008 */ lw $a2, 0x8($s2)
/* CBA5C 8013535C 8E47000C */ lw $a3, 0xC($s2)
/* CBA60 80135360 0C052757 */ jal sfx_play_sound_at_position
/* CBA64 80135364 0000282D */ daddu $a1, $zero, $zero
.L80135368:
/* CBA68 80135368 92620005 */ lbu $v0, 0x5($s3)
/* CBA6C 8013536C 82630006 */ lb $v1, 0x6($s3)
/* CBA70 80135370 24420001 */ addiu $v0, $v0, 0x1
/* CBA74 80135374 A2620005 */ sb $v0, 0x5($s3)
/* CBA78 80135378 00021600 */ sll $v0, $v0, 24
/* CBA7C 8013537C 00021603 */ sra $v0, $v0, 24
/* CBA80 80135380 0062182A */ slt $v1, $v1, $v0
/* CBA84 80135384 92620006 */ lbu $v0, 0x6($s3)
/* CBA88 80135388 54600001 */ bnel $v1, $zero, .L80135390
/* CBA8C 8013538C A2620005 */ sb $v0, 0x5($s3)
.L80135390:
/* CBA90 80135390 C6400010 */ lwc1 $f0, 0x10($s2)
/* CBA94 80135394 24040217 */ addiu $a0, $zero, 0x217
.L80135398:
/* CBA98 80135398 E7A00010 */ swc1 $f0, 0x10($sp)
/* CBA9C 8013539C 8E460008 */ lw $a2, 0x8($s2)
/* CBAA0 801353A0 8E47000C */ lw $a3, 0xC($s2)
/* CBAA4 801353A4 0C052757 */ jal sfx_play_sound_at_position
/* CBAA8 801353A8 0000282D */ daddu $a1, $zero, $zero
/* CBAAC 801353AC 8E850028 */ lw $a1, 0x28($s4)
/* CBAB0 801353B0 868200B0 */ lh $v0, 0xB0($s4)
/* CBAB4 801353B4 C682002C */ lwc1 $f2, 0x2C($s4)
/* CBAB8 801353B8 44820000 */ mtc1 $v0, $f0
/* CBABC 801353BC 00000000 */ nop
/* CBAC0 801353C0 46800020 */ cvt.s.w $f0, $f0
/* CBAC4 801353C4 46001080 */ add.s $f2, $f2, $f0
/* CBAC8 801353C8 8E870030 */ lw $a3, 0x30($s4)
/* CBACC 801353CC 3C0141F0 */ lui $at, (0x41F00000 >> 16)
/* CBAD0 801353D0 44810000 */ mtc1 $at, $f0
/* CBAD4 801353D4 44061000 */ mfc1 $a2, $f2
/* CBAD8 801353D8 24040004 */ addiu $a0, $zero, 0x4
/* CBADC 801353DC 0C01BFBC */ jal fx_sparkles
/* CBAE0 801353E0 E7A00010 */ swc1 $f0, 0x10($sp)
/* CBAE4 801353E4 0804D533 */ j .L801354CC
/* CBAE8 801353E8 0240202D */ daddu $a0, $s2, $zero
.L801353EC:
/* CBAEC 801353EC 9662000C */ lhu $v0, 0xC($s3)
/* CBAF0 801353F0 24420001 */ addiu $v0, $v0, 0x1
/* CBAF4 801353F4 A662000C */ sh $v0, 0xC($s3)
/* CBAF8 801353F8 00021400 */ sll $v0, $v0, 16
/* CBAFC 801353FC 00021403 */ sra $v0, $v0, 16
/* CBB00 80135400 284203E8 */ slti $v0, $v0, 0x3E8
/* CBB04 80135404 14400002 */ bnez $v0, .L80135410
/* CBB08 80135408 240203E7 */ addiu $v0, $zero, 0x3E7
/* CBB0C 8013540C A662000C */ sh $v0, 0xC($s3)
.L80135410:
/* CBB10 80135410 C6400010 */ lwc1 $f0, 0x10($s2)
/* CBB14 80135414 24040211 */ addiu $a0, $zero, 0x211
/* CBB18 80135418 E7A00010 */ swc1 $f0, 0x10($sp)
/* CBB1C 8013541C 8E460008 */ lw $a2, 0x8($s2)
/* CBB20 80135420 8E47000C */ lw $a3, 0xC($s2)
/* CBB24 80135424 0C052757 */ jal sfx_play_sound_at_position
/* CBB28 80135428 0000282D */ daddu $a1, $zero, $zero
/* CBB2C 8013542C 3C030001 */ lui $v1, (0x1869F >> 16)
/* CBB30 80135430 8E6202B4 */ lw $v0, 0x2B4($s3)
/* CBB34 80135434 3463869F */ ori $v1, $v1, (0x1869F & 0xFFFF)
/* CBB38 80135438 24420001 */ addiu $v0, $v0, 0x1
/* CBB3C 8013543C AE6202B4 */ sw $v0, 0x2B4($s3)
/* CBB40 80135440 0062102B */ sltu $v0, $v1, $v0
/* CBB44 80135444 54400020 */ bnel $v0, $zero, .L801354C8
/* CBB48 80135448 AE6302B4 */ sw $v1, 0x2B4($s3)
/* CBB4C 8013544C 0804D533 */ j .L801354CC
/* CBB50 80135450 0240202D */ daddu $a0, $s2, $zero
.L80135454:
/* CBB54 80135454 9262000E */ lbu $v0, 0xE($s3)
/* CBB58 80135458 24420001 */ addiu $v0, $v0, 0x1
/* CBB5C 8013545C A262000E */ sb $v0, 0xE($s3)
/* CBB60 80135460 C6400010 */ lwc1 $f0, 0x10($s2)
/* CBB64 80135464 0804D52D */ j .L801354B4
/* CBB68 80135468 24040211 */ addiu $a0, $zero, 0x211
.L8013546C:
/* CBB6C 8013546C 92620010 */ lbu $v0, 0x10($s3)
/* CBB70 80135470 24420001 */ addiu $v0, $v0, 0x1
/* CBB74 80135474 A2620010 */ sb $v0, 0x10($s3)
/* CBB78 80135478 00021600 */ sll $v0, $v0, 24
/* CBB7C 8013547C 00021603 */ sra $v0, $v0, 24
/* CBB80 80135480 28420065 */ slti $v0, $v0, 0x65
/* CBB84 80135484 14400002 */ bnez $v0, .L80135490
/* CBB88 80135488 24020064 */ addiu $v0, $zero, 0x64
/* CBB8C 8013548C A2620010 */ sb $v0, 0x10($s3)
.L80135490:
/* CBB90 80135490 C6400010 */ lwc1 $f0, 0x10($s2)
/* CBB94 80135494 0804D52D */ j .L801354B4
/* CBB98 80135498 24040211 */ addiu $a0, $zero, 0x211
.L8013549C:
/* CBB9C 8013549C 92620003 */ lbu $v0, 0x3($s3)
/* CBBA0 801354A0 92630006 */ lbu $v1, 0x6($s3)
/* CBBA4 801354A4 A2620002 */ sb $v0, 0x2($s3)
/* CBBA8 801354A8 A2630005 */ sb $v1, 0x5($s3)
/* CBBAC 801354AC C6400010 */ lwc1 $f0, 0x10($s2)
/* CBBB0 801354B0 24040213 */ addiu $a0, $zero, 0x213
.L801354B4:
/* CBBB4 801354B4 E7A00010 */ swc1 $f0, 0x10($sp)
/* CBBB8 801354B8 8E460008 */ lw $a2, 0x8($s2)
/* CBBBC 801354BC 8E47000C */ lw $a3, 0xC($s2)
/* CBBC0 801354C0 0C052757 */ jal sfx_play_sound_at_position
/* CBBC4 801354C4 0000282D */ daddu $a1, $zero, $zero
.L801354C8:
/* CBBC8 801354C8 0240202D */ daddu $a0, $s2, $zero
.L801354CC:
/* CBBCC 801354CC 3C02800A */ lui $v0, %hi(gOverrideFlags)
/* CBBD0 801354D0 2442A650 */ addiu $v0, $v0, %lo(gOverrideFlags)
/* CBBD4 801354D4 3C018015 */ lui $at, %hi(D_801565A8)
/* CBBD8 801354D8 A42065A8 */ sh $zero, %lo(D_801565A8)($at)
/* CBBDC 801354DC 8C430000 */ lw $v1, 0x0($v0)
/* CBBE0 801354E0 2405FFBF */ addiu $a1, $zero, -0x41
/* CBBE4 801354E4 00651824 */ and $v1, $v1, $a1
/* CBBE8 801354E8 0C04CE4C */ jal remove_item_entity_by_reference
/* CBBEC 801354EC AC430000 */ sw $v1, 0x0($v0)
.L801354F0:
/* CBBF0 801354F0 8243001A */ lb $v1, 0x1A($s2)
/* CBBF4 801354F4 24020004 */ addiu $v0, $zero, 0x4
/* CBBF8 801354F8 1462000F */ bne $v1, $v0, .L80135538
/* CBBFC 801354FC 2402000A */ addiu $v0, $zero, 0xA
/* CBC00 80135500 3C048015 */ lui $a0, %hi(D_80155D80)
/* CBC04 80135504 8C845D80 */ lw $a0, %lo(D_80155D80)($a0)
/* CBC08 80135508 0C0B1059 */ jal does_script_exist
/* CBC0C 8013550C 00000000 */ nop
/* CBC10 80135510 14400007 */ bnez $v0, .L80135530
/* CBC14 80135514 00000000 */ nop
/* CBC18 80135518 3C018015 */ lui $at, %hi(D_801565A8)
/* CBC1C 8013551C A42065A8 */ sh $zero, %lo(D_801565A8)($at)
/* CBC20 80135520 0C04CE4C */ jal remove_item_entity_by_reference
/* CBC24 80135524 0240202D */ daddu $a0, $s2, $zero
/* CBC28 80135528 0C0B1192 */ jal resume_all_group
/* CBC2C 8013552C 24040002 */ addiu $a0, $zero, 0x2
.L80135530:
/* CBC30 80135530 8243001A */ lb $v1, 0x1A($s2)
/* CBC34 80135534 2402000A */ addiu $v0, $zero, 0xA
.L80135538:
/* CBC38 80135538 1462000D */ bne $v1, $v0, .L80135570
/* CBC3C 8013553C 24020001 */ addiu $v0, $zero, 0x1
/* CBC40 80135540 3C018015 */ lui $at, %hi(isPickingUpItem)
/* CBC44 80135544 A42265A4 */ sh $v0, %lo(isPickingUpItem)($at)
/* CBC48 80135548 2402001C */ addiu $v0, $zero, 0x1C
/* CBC4C 8013554C 3C03800A */ lui $v1, %hi(gOverrideFlags)
/* CBC50 80135550 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags)
/* CBC54 80135554 A242001B */ sb $v0, 0x1B($s2)
/* CBC58 80135558 A240001A */ sb $zero, 0x1A($s2)
/* CBC5C 8013555C 8C620000 */ lw $v0, 0x0($v1)
/* CBC60 80135560 3C018015 */ lui $at, %hi(D_801565A8)
/* CBC64 80135564 A42065A8 */ sh $zero, %lo(D_801565A8)($at)
/* CBC68 80135568 34420040 */ ori $v0, $v0, 0x40
/* CBC6C 8013556C AC620000 */ sw $v0, 0x0($v1)
.L80135570:
/* CBC70 80135570 8FBF0044 */ lw $ra, 0x44($sp)
/* CBC74 80135574 8FB40040 */ lw $s4, 0x40($sp)
/* CBC78 80135578 8FB3003C */ lw $s3, 0x3C($sp)
/* CBC7C 8013557C 8FB20038 */ lw $s2, 0x38($sp)
/* CBC80 80135580 8FB10034 */ lw $s1, 0x34($sp)
/* CBC84 80135584 8FB00030 */ lw $s0, 0x30($sp)
/* CBC88 80135588 D7B80058 */ ldc1 $f24, 0x58($sp)
/* CBC8C 8013558C D7B60050 */ ldc1 $f22, 0x50($sp)
/* CBC90 80135590 D7B40048 */ ldc1 $f20, 0x48($sp)
/* CBC94 80135594 03E00008 */ jr $ra
/* CBC98 80135598 27BD0060 */ addiu $sp, $sp, 0x60
### DECOMPILED C INSTRUCTIONS:
void update_item_entity_collectable(ItemEntity* item) {
PlayerStatus* playerStatus = &gPlayerStatus;
PlayerData* playerData = &gPlayerData;
ItemEntityPhysicsData* physData;
s32 camID;
s32 hit;
f32 outX, outY, outZ, outDepth;
f32 theta, sinAngle, cosAngle;
f32 temp;
if (isPickingUpItem) {
return;
}
if (item->pickupDelay != 0) {
item->pickupDelay--;
return;
}
if (item->spawnType == ITEM_SPAWN_MODE_TOSS_FADE1) {
camID = CAM_BATTLE;
} else {
camID = CAM_DEFAULT;
}
switch (item->state) {
case ITEM_PHYSICS_STATE_INIT:
reveal_item_entity(item);
physData = heap_malloc(sizeof(*physData));
item->physicsData = physData;
ASSERT(physData != NULL);
if (item->flags & ITEM_ENTITY_FLAG_TOSS_HIGHER) {
physData->verticalVelocity = 16.0f;
physData->gravity = 2.0f;
} else if (!(item->flags & ITEM_ENTITY_FLAG_TOSS_LOWER)) {
physData->verticalVelocity = 12.0f;
physData->gravity = 2.0f;
} else {
physData->verticalVelocity = 14.0f;
physData->gravity = 2.0f;
}
physData->collisionRadius = 24.0f;
physData->constVelocity = 24.0f;
if (item->spawnAngle < 0) {
if (IS_ITEM(item->itemID)) {
if (rand_int(10000) < 5000) {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 105.0f + rand_int(30) - 15.0f);
} else {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 105.0f + rand_int(30) - 15.0f);
}
physData->verticalVelocity += 4.0f;
} else {
switch (item->itemID) {
case ITEM_HEART:
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(120) - 60.0f);
break;
case ITEM_FLOWER_POINT:
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 90.0f + rand_int(120) + 60.0f);
break;
case ITEM_COIN:
if (rand_int(10000) < 5000) {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(120) - 60.0f);
} else {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 90.0f + rand_int(120) - 60.0f);
}
break;
case ITEM_KOOPA_FORTRESS_KEY:
if (rand_int(10000) >= 5000) {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 90.0f + rand_int(120) - 60.0f);
} else {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(120) - 60.0f);
}
break;
case ITEM_STAR_POINT:
if (item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1) {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 90.0f + rand_int(120) - 60.0f);
break;
}
if (rand_int(10000) < 5000) {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(60) - 30.0f);
} else {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 90.0f + rand_int(60) - 30.0f);
}
break;
case ITEM_HEART_POINT:
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(120) - 60.0f);
break;
case ITEM_STAR_PIECE:
if (rand_int(10000) < 5000) {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(60) - 30.0f);
} else {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 90.0f + rand_int(60) - 30.0f);
}
break;
case ITEM_HEART_PIECE:
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(120) - 60.0f);
break;
default:
physData->moveAngle = 0.0f;
break;
}
}
if (!(item->flags & ITEM_ENTITY_FLAG_TOSS_HIGHER)) {
temp = rand_int(2000);
temp = (temp / 1000.0f) + 1.5;
theta = DEG_TO_RAD(physData->moveAngle);
sinAngle = sin_rad(theta);
cosAngle = cos_rad(theta);
physData->velx = temp * sinAngle;
physData->velz = -temp * cosAngle;
} else {
temp = rand_int(2000);
temp = (temp / 1000.0f) + 2.0;
theta = DEG_TO_RAD(physData->moveAngle);
sinAngle = sin_rad(theta);
cosAngle = cos_rad(theta);
physData->velx = temp * sinAngle;
physData->velz = -temp * cosAngle;
}
} else {
physData->moveAngle = clamp_angle(item->spawnAngle);
if (!(item->flags & ITEM_ENTITY_FLAG_ANGLE_RELATIVE_VELOCITY)) {
temp = 1.5f + (0.6 * (item->spawnAngle / 360));
} else {
temp = 2.1f;
}
theta = DEG_TO_RAD(physData->moveAngle);
sinAngle = sin_rad(theta);
cosAngle = cos_rad(theta);
physData->velx = temp * sinAngle;
physData->velz = -temp * cosAngle;
}
if (item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1) {
physData->timeLeft = 180;
physData->useSimplePhysics = FALSE;
} else {
if (!(item->flags & ITEM_ENTITY_FLAG_400000)) {
physData->timeLeft = 17;
} else {
physData->timeLeft = 20;
}
physData->useSimplePhysics = FALSE;
physData->verticalVelocity = 15.0f;
physData->gravity = 1.6f;
}
if (item->spawnType == ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS) {
physData->timeLeft = 60;
physData->useSimplePhysics = FALSE;
physData->velx = 0.0f;
physData->velz = 0.0f;
}
if (item->spawnType == ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS) {
physData->verticalVelocity = 0.0f;
physData->velx = 0.0f;
physData->velz = 0.0f;
physData->useSimplePhysics = TRUE;
}
if (item->spawnType == ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS) {
physData->verticalVelocity = 0.0f;
physData->velx = 0.0f;
physData->velz = 0.0f;
physData->useSimplePhysics = TRUE;
}
if (item->flags & ITEM_ENTITY_FLAG_800) {
set_global_flag(item->boundVar);
}
item->state = ITEM_PHYSICS_STATE_ALIVE;
break;
case ITEM_PHYSICS_STATE_ALIVE:
physData = item->physicsData;
// test for pickup
if (item->spawnType != ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS
&& item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1
&& physData->useSimplePhysics
&& test_item_player_collision(item)
) {
item->state = ITEM_PHYSICS_STATE_TOUCH;
break;
}
// check for expiration
if (!(item->flags & ITEM_ENTITY_FLAG_NEVER_VANISH)
&& !(gOverrideFlags & (GLOBAL_OVERRIDES_200 | GLOBAL_OVERRIDES_DISABLE_BATTLES))
&& !(item->flags & ITEM_ENTITY_FLAG_CANT_COLLECT)
) {
physData->timeLeft--;
if (physData->timeLeft < 0) {
item->state = ITEM_PHYSICS_STATE_DEAD;
break;
}
}
// apply gravity
if (!(item->flags & ITEM_ENTITY_FLAG_NO_GRAVITY)) {
if (!(item->flags & ITEM_ENTITY_FLAG_CANT_COLLECT)) {
physData->verticalVelocity -= physData->gravity;
if (physData->verticalVelocity < -16.0) {
physData->verticalVelocity = -16.0f;
}
item->position.y += physData->verticalVelocity;
item->position.x += physData->velx;
item->position.z += physData->velz;
}
}
// handle auto-collection from multi-coin bricks
if (item->spawnType == ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS
&& physData->verticalVelocity <= 0.0f
) {
item->state = ITEM_PHYSICS_STATE_TOUCH;
break;
}
// if the item has upward velocity, try moving it up
if (!(item->flags & (ITEM_ENTITY_FLAG_DONE_FALLING | ITEM_ENTITY_FLAG_NO_MOTION))
&& item->spawnType != ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS
&& item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1
&& physData->verticalVelocity > 0.0f
) {
temp = physData->constVelocity;
outX = item->position.x;
outY = item->position.y;
outZ = item->position.z;
outDepth = temp + physData->verticalVelocity;
if (!physData->useSimplePhysics) {
hit = npc_raycast_up(COLLISION_CHANNEL_20000, &outX, &outY, &outZ, &outDepth);
} else {
hit = npc_raycast_up(COLLISION_CHANNEL_20000, &outX, &outY, &outZ, &outDepth);
}
if (hit && outDepth < temp) {
item->position.y = outY - temp;
physData->verticalVelocity = 0.0f;
}
}
// if the item has non-zero lateral velocity, try moving it laterally
if (!(item->flags & (ITEM_ENTITY_FLAG_DONE_FALLING | ITEM_ENTITY_FLAG_NO_MOTION))
&& item->spawnType != ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS
&& item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1
&& (physData->velx != 0.0f || physData->velz != 0.0f)
) {
outX = item->position.x;
outY = item->position.y;
outZ = item->position.z;
if (!physData->useSimplePhysics) {
hit = npc_test_move_complex_with_slipping(COLLISION_CHANNEL_20000, &outX, &outY, &outZ, 0.0f, physData->moveAngle, physData->constVelocity, physData->collisionRadius);
} else {
hit = npc_test_move_simple_with_slipping(COLLISION_CHANNEL_20000, &outX, &outY, &outZ, 0.0f, physData->moveAngle, physData->constVelocity, physData->collisionRadius);
}
if (hit) {
// if a wall is hit, bounce back
item->position.x = outX;
item->position.y = outY;
item->position.z = outZ;
physData->moveAngle = clamp_angle(physData->moveAngle + 180.0f);
theta = DEG_TO_RAD(physData->moveAngle);
sinAngle = sin_rad(theta);
cosAngle = cos_rad(theta);
physData->velx = sinAngle * 2.0;
physData->velz = cosAngle * -2.0;
}
}
// if the item has downward velocity, try moving it down
if (!(item->flags & ITEM_ENTITY_FLAG_NO_MOTION)
&& item->spawnType != ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS
&& physData->verticalVelocity <= 0.0
) {
physData->useSimplePhysics = TRUE;
if (item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1) {
outX = item->position.x;
outY = (item->position.y - physData->verticalVelocity) + 12.0f;
outZ = item->position.z;
outDepth = -physData->verticalVelocity + 12.0f;
if (!physData->useSimplePhysics) {
hit = npc_raycast_down_sides(COLLISION_CHANNEL_20000, &outX, &outY, &outZ, &outDepth);
} else {
hit = npc_raycast_down_around(COLLISION_CHANNEL_20000, &outX, &outY, &outZ, &outDepth, 180.0f, 20.0f);
}
} else {
outX = item->position.x;
outY = (item->position.y - physData->verticalVelocity) + 12.0f;
outZ = item->position.z;
outDepth = -physData->verticalVelocity + 12.0f;
if (outY < outDepth + 0.0f) {
outY = 0.0f;
hit = TRUE;
} else {
hit = FALSE;
}
}
// handle bounce
if (hit) {
item->position.y = outY;
physData->verticalVelocity = -physData->verticalVelocity / 1.25;
if (physData->verticalVelocity < 3.0) {
physData->verticalVelocity = 0.0f;
physData->velx = 0.0f;
physData->velz = 0.0f;
item->flags |= ITEM_ENTITY_FLAG_DONE_FALLING;
} else {
if (IS_BADGE(item->itemID)) {
sfx_play_sound_at_position(SOUND_21B, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
} else if (IS_ITEM(item->itemID)) {
sfx_play_sound_at_position(SOUND_21A, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
} else {
switch (item->itemID) {
case ITEM_HEART:
sfx_play_sound_at_position(SOUND_214, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_COIN:
sfx_play_sound_at_position(SOUND_212, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_KOOPA_FORTRESS_KEY:
sfx_play_sound_at_position(SOUND_212, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_HEART_PIECE:
sfx_play_sound_at_position(SOUND_214, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_STAR_POINT:
sfx_play_sound_at_position(SOUND_212, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_HEART_POINT:
sfx_play_sound_at_position(SOUND_214, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_STAR_PIECE:
sfx_play_sound_at_position(SOUND_219, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_FLOWER_POINT:
sfx_play_sound_at_position(SOUND_218, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
break;
}
}
}
}
}
if (item->position.y < -2000.0f) {
item->state = ITEM_PHYSICS_STATE_DEAD;
}
break;
}
if (item->state == ITEM_PHYSICS_STATE_DEAD) {
remove_item_entity_by_reference(item);
}
if (item->state == ITEM_PHYSICS_STATE_TOUCH) {
if (item->flags & ITEM_ENTITY_FLAG_SAVE_ON_TOUCH) {
set_global_flag(item->boundVar);
}
fx_small_gold_sparkle(0, item->position.x, item->position.y + 16.0f, item->position.z, 1.0f, 0);
if (IS_ITEM(item->itemID)) {
item->state = ITEM_PHYSICS_STATE_PICKUP;
} else if (IS_BADGE(item->itemID)) {
item->state = ITEM_PHYSICS_STATE_PICKUP;
} else if (item->itemID == ITEM_STAR_PIECE) {
playerData->starPiecesCollected++;
item->state = ITEM_PHYSICS_STATE_PICKUP;
} else {
if (item->spawnType == ITEM_SPAWN_MODE_TOSS_FADE1) {
item->itemID = -1;
}
switch (item->itemID) {
case ITEM_HEART:
if (playerData->curHP < playerData->curMaxHP) {
fx_recover(0, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, playerStatus->position.z, 1);
sfx_play_sound_at_position(SOUND_2056, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
}
playerData->curHP++;
if (playerData->curHP > playerData->curMaxHP) {
playerData->curHP = playerData->curMaxHP;
}
sfx_play_sound_at_position(SOUND_213, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
fx_sparkles(4, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, playerStatus->position.z, 30.0f);
break;
case ITEM_FLOWER_POINT:
if (playerData->curFP < playerData->curMaxFP) {
fx_recover(1, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, playerStatus->position.z, 1);
sfx_play_sound_at_position(SOUND_2056, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
}
playerData->curFP++;
if (playerData->curFP > playerData->curMaxFP) {
playerData->curFP = playerData->curMaxFP;
}
sfx_play_sound_at_position(SOUND_217, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
fx_sparkles(4, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, playerStatus->position.z, 30.0f);
break;
case ITEM_COIN:
playerData->coins++;
if (playerData->coins > 999) {
playerData->coins = 999;
}
sfx_play_sound_at_position(SOUND_211, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
playerData->totalCoinsEarned++;
if (playerData->totalCoinsEarned > 99999) {
playerData->totalCoinsEarned = 99999;
}
break;
case ITEM_KOOPA_FORTRESS_KEY:
playerData->fortressKeyCount = playerData->fortressKeyCount + 1;
sfx_play_sound_at_position(SOUND_211, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_STAR_POINT:
playerData->starPoints++;
if (playerData->starPoints > 100) {
playerData->starPoints = 100;
}
sfx_play_sound_at_position(SOUND_211, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_HEART_POINT:
playerData->curHP = playerData->curMaxHP;
playerData->curFP = playerData->curMaxFP;
sfx_play_sound_at_position(SOUND_213, SOUND_SPACE_MODE_0, item->position.x, item->position.y, item->position.z);
break;
}
D_801565A8 = FALSE;
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
remove_item_entity_by_reference(item);
}
}
// items in this unused state are managed by a script
// when the script is done executing, destroy these items
if (item->state == ITEM_PHYSICS_STATE_04) {
if (!does_script_exist(D_80155D80)) {
D_801565A8 = FALSE;
remove_item_entity_by_reference(item);
resume_all_group(EVT_GROUP_02);
}
}
if (item->state == ITEM_PHYSICS_STATE_PICKUP) {
isPickingUpItem = TRUE;
item->spawnType = ITEM_SPAWN_AT_PLAYER;
item->state = ITEM_PICKUP_STATE_INIT;
D_801565A8 = FALSE;
gOverrideFlags |= GLOBAL_OVERRIDES_40;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel update_encounters_post_battle
/* 1D310 80041F10 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 1D314 80041F14 AFB60028 */ sw $s6, 0x28($sp)
/* 1D318 80041F18 3C16800B */ lui $s6, %hi(gCurrentEncounter)
/* 1D31C 80041F1C 26D60F10 */ addiu $s6, $s6, %lo(gCurrentEncounter)
/* 1D320 80041F20 AFB7002C */ sw $s7, 0x2C($sp)
/* 1D324 80041F24 3C178011 */ lui $s7, %hi(gPlayerStatus)
/* 1D328 80041F28 26F7EFC8 */ addiu $s7, $s7, %lo(gPlayerStatus)
/* 1D32C 80041F2C AFB00010 */ sw $s0, 0x10($sp)
/* 1D330 80041F30 3C108011 */ lui $s0, %hi(gPlayerData)
/* 1D334 80041F34 2610F290 */ addiu $s0, $s0, %lo(gPlayerData)
/* 1D338 80041F38 3C04800A */ lui $a0, %hi(gEncounterSubState)
/* 1D33C 80041F3C 2484A5D0 */ addiu $a0, $a0, %lo(gEncounterSubState)
/* 1D340 80041F40 AFBF0034 */ sw $ra, 0x34($sp)
/* 1D344 80041F44 AFBE0030 */ sw $fp, 0x30($sp)
/* 1D348 80041F48 AFB50024 */ sw $s5, 0x24($sp)
/* 1D34C 80041F4C AFB40020 */ sw $s4, 0x20($sp)
/* 1D350 80041F50 AFB3001C */ sw $s3, 0x1C($sp)
/* 1D354 80041F54 AFB20018 */ sw $s2, 0x18($sp)
/* 1D358 80041F58 AFB10014 */ sw $s1, 0x14($sp)
/* 1D35C 80041F5C 8C830000 */ lw $v1, 0x0($a0)
/* 1D360 80041F60 24050066 */ addiu $a1, $zero, 0x66
/* 1D364 80041F64 106501FC */ beq $v1, $a1, .L80042758
/* 1D368 80041F68 28620067 */ slti $v0, $v1, 0x67
/* 1D36C 80041F6C 1040001D */ beqz $v0, .L80041FE4
/* 1D370 80041F70 24020004 */ addiu $v0, $zero, 0x4
/* 1D374 80041F74 10620183 */ beq $v1, $v0, .L80042584
/* 1D378 80041F78 28620005 */ slti $v0, $v1, 0x5
/* 1D37C 80041F7C 10400009 */ beqz $v0, .L80041FA4
/* 1D380 80041F80 24020002 */ addiu $v0, $zero, 0x2
/* 1D384 80041F84 1062011C */ beq $v1, $v0, .L800423F8
/* 1D388 80041F88 28620003 */ slti $v0, $v1, 0x3
/* 1D38C 80041F8C 1040011F */ beqz $v0, .L8004240C
/* 1D390 80041F90 0000902D */ daddu $s2, $zero, $zero
/* 1D394 80041F94 10600037 */ beqz $v1, .L80042074
/* 1D398 80041F98 00000000 */ nop
/* 1D39C 80041F9C 08010BD3 */ j .L80042F4C
/* 1D3A0 80041FA0 00000000 */ nop
.L80041FA4:
/* 1D3A4 80041FA4 2402000B */ addiu $v0, $zero, 0xB
/* 1D3A8 80041FA8 106200B3 */ beq $v1, $v0, .L80042278
/* 1D3AC 80041FAC 2862000C */ slti $v0, $v1, 0xC
/* 1D3B0 80041FB0 10400005 */ beqz $v0, .L80041FC8
/* 1D3B4 80041FB4 2402000A */ addiu $v0, $zero, 0xA
/* 1D3B8 80041FB8 10620090 */ beq $v1, $v0, .L800421FC
/* 1D3BC 80041FBC 00000000 */ nop
/* 1D3C0 80041FC0 08010BD3 */ j .L80042F4C
/* 1D3C4 80041FC4 00000000 */ nop
.L80041FC8:
/* 1D3C8 80041FC8 24020064 */ addiu $v0, $zero, 0x64
/* 1D3CC 80041FCC 106201B1 */ beq $v1, $v0, .L80042694
/* 1D3D0 80041FD0 24020065 */ addiu $v0, $zero, 0x65
/* 1D3D4 80041FD4 106201DB */ beq $v1, $v0, .L80042744
/* 1D3D8 80041FD8 00000000 */ nop
/* 1D3DC 80041FDC 08010BD3 */ j .L80042F4C
/* 1D3E0 80041FE0 00000000 */ nop
.L80041FE4:
/* 1D3E4 80041FE4 240200CB */ addiu $v0, $zero, 0xCB
/* 1D3E8 80041FE8 106202F9 */ beq $v1, $v0, .L80042BD0
/* 1D3EC 80041FEC 286200CC */ slti $v0, $v1, 0xCC
/* 1D3F0 80041FF0 10400010 */ beqz $v0, .L80042034
/* 1D3F4 80041FF4 240200C8 */ addiu $v0, $zero, 0xC8
/* 1D3F8 80041FF8 10620278 */ beq $v1, $v0, .L800429DC
/* 1D3FC 80041FFC 286200C9 */ slti $v0, $v1, 0xC9
/* 1D400 80042000 10400005 */ beqz $v0, .L80042018
/* 1D404 80042004 24020067 */ addiu $v0, $zero, 0x67
/* 1D408 80042008 1062025A */ beq $v1, $v0, .L80042974
/* 1D40C 8004200C 00000000 */ nop
/* 1D410 80042010 08010BD3 */ j .L80042F4C
/* 1D414 80042014 00000000 */ nop
.L80042018:
/* 1D418 80042018 240200C9 */ addiu $v0, $zero, 0xC9
/* 1D41C 8004201C 1062029B */ beq $v1, $v0, .L80042A8C
/* 1D420 80042020 240200CA */ addiu $v0, $zero, 0xCA
/* 1D424 80042024 1062029E */ beq $v1, $v0, .L80042AA0
/* 1D428 80042028 0000902D */ daddu $s2, $zero, $zero
/* 1D42C 8004202C 08010BD3 */ j .L80042F4C
/* 1D430 80042030 00000000 */ nop
.L80042034:
/* 1D434 80042034 24020190 */ addiu $v0, $zero, 0x190
/* 1D438 80042038 1062031E */ beq $v1, $v0, .L80042CB4
/* 1D43C 8004203C 28620191 */ slti $v0, $v1, 0x191
/* 1D440 80042040 10400005 */ beqz $v0, .L80042058
/* 1D444 80042044 2402012C */ addiu $v0, $zero, 0x12C
/* 1D448 80042048 106202F2 */ beq $v1, $v0, .L80042C14
/* 1D44C 8004204C 00000000 */ nop
/* 1D450 80042050 08010BD3 */ j .L80042F4C
/* 1D454 80042054 00000000 */ nop
.L80042058:
/* 1D458 80042058 24020191 */ addiu $v0, $zero, 0x191
/* 1D45C 8004205C 1062033E */ beq $v1, $v0, .L80042D58
/* 1D460 80042060 24020192 */ addiu $v0, $zero, 0x192
/* 1D464 80042064 10620349 */ beq $v1, $v0, .L80042D8C
/* 1D468 80042068 0000902D */ daddu $s2, $zero, $zero
/* 1D46C 8004206C 08010BD3 */ j .L80042F4C
/* 1D470 80042070 00000000 */ nop
.L80042074:
/* 1D474 80042074 82C20008 */ lb $v0, 0x8($s6)
/* 1D478 80042078 104003E8 */ beqz $v0, .L8004301C
/* 1D47C 8004207C 00000000 */ nop
/* 1D480 80042080 A2C00008 */ sb $zero, 0x8($s6)
/* 1D484 80042084 A6E00010 */ sh $zero, 0x10($s7)
/* 1D488 80042088 0C03A5F9 */ jal func_800E97E4
/* 1D48C 8004208C A2C00012 */ sb $zero, 0x12($s6)
/* 1D490 80042090 A2C000A0 */ sb $zero, 0xA0($s6)
/* 1D494 80042094 A2C000A4 */ sb $zero, 0xA4($s6)
/* 1D498 80042098 A2C000A8 */ sb $zero, 0xA8($s6)
/* 1D49C 8004209C A2C000AC */ sb $zero, 0xAC($s6)
/* 1D4A0 800420A0 3C02800A */ lui $v0, %hi(D_8009A654)
/* 1D4A4 800420A4 8042A654 */ lb $v0, %lo(D_8009A654)($v0)
/* 1D4A8 800420A8 24110001 */ addiu $s1, $zero, 0x1
/* 1D4AC 800420AC A6C000A2 */ sh $zero, 0xA2($s6)
/* 1D4B0 800420B0 A6C000A6 */ sh $zero, 0xA6($s6)
/* 1D4B4 800420B4 A6C000AA */ sh $zero, 0xAA($s6)
/* 1D4B8 800420B8 14510003 */ bne $v0, $s1, .L800420C8
/* 1D4BC 800420BC A6C000AE */ sh $zero, 0xAE($s6)
/* 1D4C0 800420C0 0C052B9B */ jal bgm_pop_battle_song
/* 1D4C4 800420C4 00000000 */ nop
.L800420C8:
/* 1D4C8 800420C8 3C03FFFB */ lui $v1, (0xFFFBFFFF >> 16)
/* 1D4CC 800420CC 3463FFFF */ ori $v1, $v1, (0xFFFBFFFF & 0xFFFF)
/* 1D4D0 800420D0 AED10098 */ sw $s1, 0x98($s6)
/* 1D4D4 800420D4 AEC0009C */ sw $zero, 0x9C($s6)
/* 1D4D8 800420D8 8EE20000 */ lw $v0, 0x0($s7)
/* 1D4DC 800420DC 3C10800A */ lui $s0, %hi(D_8009A670)
/* 1D4E0 800420E0 2610A670 */ addiu $s0, $s0, %lo(D_8009A670)
/* 1D4E4 800420E4 A2000000 */ sb $zero, 0x0($s0)
/* 1D4E8 800420E8 00431024 */ and $v0, $v0, $v1
/* 1D4EC 800420EC AEE20000 */ sw $v0, 0x0($s7)
/* 1D4F0 800420F0 82C30005 */ lb $v1, 0x5($s6)
/* 1D4F4 800420F4 24020003 */ addiu $v0, $zero, 0x3
/* 1D4F8 800420F8 50620001 */ beql $v1, $v0, .L80042100
/* 1D4FC 800420FC A2110000 */ sb $s1, 0x0($s0)
.L80042100:
/* 1D500 80042100 3C028007 */ lui $v0, %hi(D_80077C40)
/* 1D504 80042104 8C427C40 */ lw $v0, %lo(D_80077C40)($v0)
/* 1D508 80042108 14400003 */ bnez $v0, .L80042118
/* 1D50C 8004210C A2C00005 */ sb $zero, 0x5($s6)
/* 1D510 80042110 0C03ADB1 */ jal partner_handle_after_battle
/* 1D514 80042114 00000000 */ nop
.L80042118:
/* 1D518 80042118 3C028011 */ lui $v0, %hi(gPartnerStatus)
/* 1D51C 8004211C 2442EBB0 */ addiu $v0, $v0, %lo(gPartnerStatus)
/* 1D520 80042120 80420001 */ lb $v0, 0x1($v0)
/* 1D524 80042124 3C03800A */ lui $v1, %hi(D_8009A63C)
/* 1D528 80042128 2463A63C */ addiu $v1, $v1, %lo(D_8009A63C)
/* 1D52C 8004212C 10400003 */ beqz $v0, .L8004213C
/* 1D530 80042130 A0600000 */ sb $zero, 0x0($v1)
/* 1D534 80042134 0801085D */ j .L80042174
/* 1D538 80042138 A0710000 */ sb $s1, 0x0($v1)
.L8004213C:
/* 1D53C 8004213C 82020000 */ lb $v0, 0x0($s0)
/* 1D540 80042140 1440000C */ bnez $v0, .L80042174
/* 1D544 80042144 00000000 */ nop
/* 1D548 80042148 8EE20000 */ lw $v0, 0x0($s7)
/* 1D54C 8004214C 30420006 */ andi $v0, $v0, 0x6
/* 1D550 80042150 14400008 */ bnez $v0, .L80042174
/* 1D554 80042154 24020021 */ addiu $v0, $zero, 0x21
/* 1D558 80042158 82E300B4 */ lb $v1, 0xB4($s7)
/* 1D55C 8004215C 10620005 */ beq $v1, $v0, .L80042174
/* 1D560 80042160 2402001D */ addiu $v0, $zero, 0x1D
/* 1D564 80042164 10620003 */ beq $v1, $v0, .L80042174
/* 1D568 80042168 00000000 */ nop
/* 1D56C 8004216C 0C039769 */ jal set_action_state
/* 1D570 80042170 0000202D */ daddu $a0, $zero, $zero
.L80042174:
/* 1D574 80042174 82C30009 */ lb $v1, 0x9($s6)
/* 1D578 80042178 2C620005 */ sltiu $v0, $v1, 0x5
/* 1D57C 8004217C 10400373 */ beqz $v0, .L80042F4C
/* 1D580 80042180 00031080 */ sll $v0, $v1, 2
/* 1D584 80042184 3C01800A */ lui $at, %hi(jtbl_80098698)
/* 1D588 80042188 00220821 */ addu $at, $at, $v0
/* 1D58C 8004218C 8C228698 */ lw $v0, %lo(jtbl_80098698)($at)
/* 1D590 80042190 00400008 */ jr $v0
/* 1D594 80042194 00000000 */ nop
glabel .L80042198
/* 1D598 80042198 2402000A */ addiu $v0, $zero, 0xA
/* 1D59C 8004219C 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1D5A0 800421A0 AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1D5A4 800421A4 08010BD3 */ j .L80042F4C
/* 1D5A8 800421A8 00000000 */ nop
glabel .L800421AC
/* 1D5AC 800421AC 240200C8 */ addiu $v0, $zero, 0xC8
/* 1D5B0 800421B0 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1D5B4 800421B4 AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1D5B8 800421B8 08010BD3 */ j .L80042F4C
/* 1D5BC 800421BC 00000000 */ nop
glabel .L800421C0
/* 1D5C0 800421C0 24020064 */ addiu $v0, $zero, 0x64
/* 1D5C4 800421C4 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1D5C8 800421C8 AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1D5CC 800421CC 08010BD3 */ j .L80042F4C
/* 1D5D0 800421D0 00000000 */ nop
glabel .L800421D4
/* 1D5D4 800421D4 2402012C */ addiu $v0, $zero, 0x12C
/* 1D5D8 800421D8 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1D5DC 800421DC AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1D5E0 800421E0 08010BD3 */ j .L80042F4C
/* 1D5E4 800421E4 00000000 */ nop
glabel .L800421E8
/* 1D5E8 800421E8 24020190 */ addiu $v0, $zero, 0x190
/* 1D5EC 800421EC 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1D5F0 800421F0 AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1D5F4 800421F4 08010BD3 */ j .L80042F4C
/* 1D5F8 800421F8 00000000 */ nop
.L800421FC:
/* 1D5FC 800421FC 82C2000B */ lb $v0, 0xB($s6)
/* 1D600 80042200 10400019 */ beqz $v0, .L80042268
/* 1D604 80042204 2402000B */ addiu $v0, $zero, 0xB
/* 1D608 80042208 8EC4008C */ lw $a0, 0x8C($s6)
/* 1D60C 8004220C 0C012354 */ jal get_coin_drop_amount
/* 1D610 80042210 00000000 */ nop
/* 1D614 80042214 1040000F */ beqz $v0, .L80042254
/* 1D618 80042218 2405000A */ addiu $a1, $zero, 0xA
/* 1D61C 8004221C 3C048007 */ lui $a0, %hi(D_80077C44)
/* 1D620 80042220 24847C44 */ addiu $a0, $a0, %lo(D_80077C44)
/* 1D624 80042224 0C0B0CF8 */ jal start_script
/* 1D628 80042228 0000302D */ daddu $a2, $zero, $zero
/* 1D62C 8004222C 3C03800A */ lui $v1, %hi(D_800A0BB0)
/* 1D630 80042230 24630BB0 */ addiu $v1, $v1, %lo(D_800A0BB0)
/* 1D634 80042234 AC620000 */ sw $v0, 0x0($v1)
/* 1D638 80042238 A0400004 */ sb $zero, 0x4($v0)
/* 1D63C 8004223C 8C620000 */ lw $v0, 0x0($v1)
/* 1D640 80042240 8C420144 */ lw $v0, 0x144($v0)
/* 1D644 80042244 3C01800A */ lui $at, %hi(D_800A0BB4)
/* 1D648 80042248 AC220BB4 */ sw $v0, %lo(D_800A0BB4)($at)
/* 1D64C 8004224C 0801089A */ j .L80042268
/* 1D650 80042250 2402000B */ addiu $v0, $zero, 0xB
.L80042254:
/* 1D654 80042254 9202028A */ lbu $v0, 0x28A($s0)
/* 1D658 80042258 A600028C */ sh $zero, 0x28C($s0)
/* 1D65C 8004225C 24420001 */ addiu $v0, $v0, 0x1
/* 1D660 80042260 A202028A */ sb $v0, 0x28A($s0)
/* 1D664 80042264 2402000B */ addiu $v0, $zero, 0xB
.L80042268:
/* 1D668 80042268 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1D66C 8004226C AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1D670 80042270 08010BD3 */ j .L80042F4C
/* 1D674 80042274 00000000 */ nop
.L80042278:
/* 1D678 80042278 82C2000B */ lb $v0, 0xB($s6)
/* 1D67C 8004227C 10400013 */ beqz $v0, .L800422CC
/* 1D680 80042280 00000000 */ nop
/* 1D684 80042284 0C012354 */ jal get_coin_drop_amount
/* 1D688 80042288 8EC4008C */ lw $a0, 0x8C($s6)
/* 1D68C 8004228C 1040000F */ beqz $v0, .L800422CC
/* 1D690 80042290 00000000 */ nop
/* 1D694 80042294 8EC20098 */ lw $v0, 0x98($s6)
/* 1D698 80042298 8EC30090 */ lw $v1, 0x90($s6)
/* 1D69C 8004229C 24420004 */ addiu $v0, $v0, 0x4
/* 1D6A0 800422A0 00621823 */ subu $v1, $v1, $v0
/* 1D6A4 800422A4 AEC20098 */ sw $v0, 0x98($s6)
/* 1D6A8 800422A8 04610002 */ bgez $v1, .L800422B4
/* 1D6AC 800422AC AEC30090 */ sw $v1, 0x90($s6)
/* 1D6B0 800422B0 AEC00090 */ sw $zero, 0x90($s6)
.L800422B4:
/* 1D6B4 800422B4 3C04800A */ lui $a0, %hi(D_800A0BB4)
/* 1D6B8 800422B8 8C840BB4 */ lw $a0, %lo(D_800A0BB4)($a0)
/* 1D6BC 800422BC 0C0B1059 */ jal does_script_exist
/* 1D6C0 800422C0 00000000 */ nop
/* 1D6C4 800422C4 14400321 */ bnez $v0, .L80042F4C
/* 1D6C8 800422C8 00000000 */ nop
.L800422CC:
/* 1D6CC 800422CC 8ED40088 */ lw $s4, 0x88($s6)
/* 1D6D0 800422D0 8E820000 */ lw $v0, 0x0($s4)
/* 1D6D4 800422D4 18400031 */ blez $v0, .L8004239C
/* 1D6D8 800422D8 0000982D */ daddu $s3, $zero, $zero
/* 1D6DC 800422DC 24120001 */ addiu $s2, $zero, 0x1
/* 1D6E0 800422E0 0280882D */ daddu $s1, $s4, $zero
.L800422E4:
/* 1D6E4 800422E4 8E300004 */ lw $s0, 0x4($s1)
/* 1D6E8 800422E8 12000027 */ beqz $s0, .L80042388
/* 1D6EC 800422EC 00000000 */ nop
/* 1D6F0 800422F0 8E030000 */ lw $v1, 0x0($s0)
/* 1D6F4 800422F4 30620008 */ andi $v0, $v1, 0x8
/* 1D6F8 800422F8 10400004 */ beqz $v0, .L8004230C
/* 1D6FC 800422FC 30620020 */ andi $v0, $v1, 0x20
/* 1D700 80042300 8EC2008C */ lw $v0, 0x8C($s6)
/* 1D704 80042304 16020020 */ bne $s0, $v0, .L80042388
/* 1D708 80042308 30620020 */ andi $v0, $v1, 0x20
.L8004230C:
/* 1D70C 8004230C 1440001E */ bnez $v0, .L80042388
/* 1D710 80042310 00000000 */ nop
/* 1D714 80042314 8E040030 */ lw $a0, 0x30($s0)
/* 1D718 80042318 1080000E */ beqz $a0, .L80042354
/* 1D71C 8004231C 2405000A */ addiu $a1, $zero, 0xA
/* 1D720 80042320 0000302D */ daddu $a2, $zero, $zero
/* 1D724 80042324 0C0B0D74 */ jal start_script_in_group
/* 1D728 80042328 00C0382D */ daddu $a3, $a2, $zero
/* 1D72C 8004232C 0040202D */ daddu $a0, $v0, $zero
/* 1D730 80042330 AE040048 */ sw $a0, 0x48($s0)
/* 1D734 80042334 8C820144 */ lw $v0, 0x144($a0)
/* 1D738 80042338 AE020060 */ sw $v0, 0x60($s0)
/* 1D73C 8004233C AC900148 */ sw $s0, 0x148($a0)
/* 1D740 80042340 86020008 */ lh $v0, 0x8($s0)
/* 1D744 80042344 A0800004 */ sb $zero, 0x4($a0)
/* 1D748 80042348 AC82014C */ sw $v0, 0x14C($a0)
/* 1D74C 8004234C 080108E2 */ j .L80042388
/* 1D750 80042350 AED2009C */ sw $s2, 0x9C($s6)
.L80042354:
/* 1D754 80042354 3C048007 */ lui $a0, %hi(EVS_NpcDefeat)
/* 1D758 80042358 24847E38 */ addiu $a0, $a0, %lo(EVS_NpcDefeat)
/* 1D75C 8004235C 0000302D */ daddu $a2, $zero, $zero
/* 1D760 80042360 0C0B0D74 */ jal start_script_in_group
/* 1D764 80042364 00C0382D */ daddu $a3, $a2, $zero
/* 1D768 80042368 0040202D */ daddu $a0, $v0, $zero
/* 1D76C 8004236C AE040048 */ sw $a0, 0x48($s0)
/* 1D770 80042370 8C820144 */ lw $v0, 0x144($a0)
/* 1D774 80042374 AE020060 */ sw $v0, 0x60($s0)
/* 1D778 80042378 AC900148 */ sw $s0, 0x148($a0)
/* 1D77C 8004237C 86020008 */ lh $v0, 0x8($s0)
/* 1D780 80042380 A0800004 */ sb $zero, 0x4($a0)
/* 1D784 80042384 AC82014C */ sw $v0, 0x14C($a0)
.L80042388:
/* 1D788 80042388 8E820000 */ lw $v0, 0x0($s4)
/* 1D78C 8004238C 26730001 */ addiu $s3, $s3, 0x1
/* 1D790 80042390 0262102A */ slt $v0, $s3, $v0
/* 1D794 80042394 1440FFD3 */ bnez $v0, .L800422E4
/* 1D798 80042398 26310004 */ addiu $s1, $s1, 0x4
.L8004239C:
/* 1D79C 8004239C 8EC20000 */ lw $v0, 0x0($s6)
/* 1D7A0 800423A0 30420001 */ andi $v0, $v0, 0x1
/* 1D7A4 800423A4 14400010 */ bnez $v0, .L800423E8
/* 1D7A8 800423A8 24020002 */ addiu $v0, $zero, 0x2
/* 1D7AC 800423AC 3C02800A */ lui $v0, %hi(D_8009A63C)
/* 1D7B0 800423B0 8042A63C */ lb $v0, %lo(D_8009A63C)($v0)
/* 1D7B4 800423B4 1440000C */ bnez $v0, .L800423E8
/* 1D7B8 800423B8 24020002 */ addiu $v0, $zero, 0x2
/* 1D7BC 800423BC 8EC2009C */ lw $v0, 0x9C($s6)
/* 1D7C0 800423C0 14400009 */ bnez $v0, .L800423E8
/* 1D7C4 800423C4 24020002 */ addiu $v0, $zero, 0x2
/* 1D7C8 800423C8 3C02800A */ lui $v0, %hi(D_8009A670)
/* 1D7CC 800423CC 8042A670 */ lb $v0, %lo(D_8009A670)($v0)
/* 1D7D0 800423D0 14400005 */ bnez $v0, .L800423E8
/* 1D7D4 800423D4 24020002 */ addiu $v0, $zero, 0x2
/* 1D7D8 800423D8 3C040001 */ lui $a0, (0x10032 >> 16)
/* 1D7DC 800423DC 0C037FBF */ jal suggest_player_anim_allow_backward
/* 1D7E0 800423E0 34840032 */ ori $a0, $a0, (0x10032 & 0xFFFF)
/* 1D7E4 800423E4 24020002 */ addiu $v0, $zero, 0x2
.L800423E8:
/* 1D7E8 800423E8 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1D7EC 800423EC AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1D7F0 800423F0 08010BD3 */ j .L80042F4C
/* 1D7F4 800423F4 00000000 */ nop
.L800423F8:
/* 1D7F8 800423F8 8EC30090 */ lw $v1, 0x90($s6)
/* 1D7FC 800423FC 1460025B */ bnez $v1, .L80042D6C
/* 1D800 80042400 24020003 */ addiu $v0, $zero, 0x3
/* 1D804 80042404 08010BD3 */ j .L80042F4C
/* 1D808 80042408 AC820000 */ sw $v0, 0x0($a0)
.L8004240C:
/* 1D80C 8004240C 8ED40088 */ lw $s4, 0x88($s6)
/* 1D810 80042410 8E820000 */ lw $v0, 0x0($s4)
/* 1D814 80042414 18400018 */ blez $v0, .L80042478
/* 1D818 80042418 0240982D */ daddu $s3, $s2, $zero
/* 1D81C 8004241C 0280882D */ daddu $s1, $s4, $zero
.L80042420:
/* 1D820 80042420 8E300004 */ lw $s0, 0x4($s1)
/* 1D824 80042424 1200000F */ beqz $s0, .L80042464
/* 1D828 80042428 00000000 */ nop
/* 1D82C 8004242C 8E030000 */ lw $v1, 0x0($s0)
/* 1D830 80042430 30620008 */ andi $v0, $v1, 0x8
/* 1D834 80042434 10400004 */ beqz $v0, .L80042448
/* 1D838 80042438 30620020 */ andi $v0, $v1, 0x20
/* 1D83C 8004243C 8EC2008C */ lw $v0, 0x8C($s6)
/* 1D840 80042440 16020008 */ bne $s0, $v0, .L80042464
/* 1D844 80042444 30620020 */ andi $v0, $v1, 0x20
.L80042448:
/* 1D848 80042448 14400006 */ bnez $v0, .L80042464
/* 1D84C 8004244C 00000000 */ nop
/* 1D850 80042450 0C0B1059 */ jal does_script_exist
/* 1D854 80042454 8E040060 */ lw $a0, 0x60($s0)
/* 1D858 80042458 50400002 */ beql $v0, $zero, .L80042464
/* 1D85C 8004245C AE000048 */ sw $zero, 0x48($s0)
/* 1D860 80042460 24120001 */ addiu $s2, $zero, 0x1
.L80042464:
/* 1D864 80042464 8E820000 */ lw $v0, 0x0($s4)
/* 1D868 80042468 26730001 */ addiu $s3, $s3, 0x1
/* 1D86C 8004246C 0262102A */ slt $v0, $s3, $v0
/* 1D870 80042470 1440FFEB */ bnez $v0, .L80042420
/* 1D874 80042474 26310004 */ addiu $s1, $s1, 0x4
.L80042478:
/* 1D878 80042478 164002B4 */ bnez $s2, .L80042F4C
/* 1D87C 8004247C 00000000 */ nop
/* 1D880 80042480 8EC20000 */ lw $v0, 0x0($s6)
/* 1D884 80042484 30420001 */ andi $v0, $v0, 0x1
/* 1D888 80042488 1440000B */ bnez $v0, .L800424B8
/* 1D88C 8004248C 00000000 */ nop
/* 1D890 80042490 3C02800A */ lui $v0, %hi(D_8009A63C)
/* 1D894 80042494 8042A63C */ lb $v0, %lo(D_8009A63C)($v0)
/* 1D898 80042498 14400007 */ bnez $v0, .L800424B8
/* 1D89C 8004249C 24020001 */ addiu $v0, $zero, 0x1
/* 1D8A0 800424A0 8EC3009C */ lw $v1, 0x9C($s6)
/* 1D8A4 800424A4 14620004 */ bne $v1, $v0, .L800424B8
/* 1D8A8 800424A8 00000000 */ nop
/* 1D8AC 800424AC 3C040001 */ lui $a0, (0x10032 >> 16)
/* 1D8B0 800424B0 0C037FBF */ jal suggest_player_anim_allow_backward
/* 1D8B4 800424B4 34840032 */ ori $a0, $a0, (0x10032 & 0xFFFF)
.L800424B8:
/* 1D8B8 800424B8 8ED40088 */ lw $s4, 0x88($s6)
/* 1D8BC 800424BC 8E820000 */ lw $v0, 0x0($s4)
/* 1D8C0 800424C0 1840001D */ blez $v0, .L80042538
/* 1D8C4 800424C4 0000982D */ daddu $s3, $zero, $zero
/* 1D8C8 800424C8 0280882D */ daddu $s1, $s4, $zero
.L800424CC:
/* 1D8CC 800424CC 8E300004 */ lw $s0, 0x4($s1)
/* 1D8D0 800424D0 12000014 */ beqz $s0, .L80042524
/* 1D8D4 800424D4 00000000 */ nop
/* 1D8D8 800424D8 8E030000 */ lw $v1, 0x0($s0)
/* 1D8DC 800424DC 30620004 */ andi $v0, $v1, 0x4
/* 1D8E0 800424E0 14400010 */ bnez $v0, .L80042524
/* 1D8E4 800424E4 30620008 */ andi $v0, $v1, 0x8
/* 1D8E8 800424E8 10400004 */ beqz $v0, .L800424FC
/* 1D8EC 800424EC 30620001 */ andi $v0, $v1, 0x1
/* 1D8F0 800424F0 8EC2008C */ lw $v0, 0x8C($s6)
/* 1D8F4 800424F4 1602000B */ bne $s0, $v0, .L80042524
/* 1D8F8 800424F8 30620001 */ andi $v0, $v1, 0x1
.L800424FC:
/* 1D8FC 800424FC 14400007 */ bnez $v0, .L8004251C
/* 1D900 80042500 30620010 */ andi $v0, $v1, 0x10
/* 1D904 80042504 14400005 */ bnez $v0, .L8004251C
/* 1D908 80042508 00000000 */ nop
/* 1D90C 8004250C 86850048 */ lh $a1, 0x48($s4)
/* 1D910 80042510 82C40020 */ lb $a0, 0x20($s6)
/* 1D914 80042514 0C00FB90 */ jal set_defeated
/* 1D918 80042518 00B32821 */ addu $a1, $a1, $s3
.L8004251C:
/* 1D91C 8004251C 0C00F9EB */ jal kill_enemy
/* 1D920 80042520 0200202D */ daddu $a0, $s0, $zero
.L80042524:
/* 1D924 80042524 8E820000 */ lw $v0, 0x0($s4)
/* 1D928 80042528 26730001 */ addiu $s3, $s3, 0x1
/* 1D92C 8004252C 0262102A */ slt $v0, $s3, $v0
/* 1D930 80042530 1440FFE6 */ bnez $v0, .L800424CC
/* 1D934 80042534 26310004 */ addiu $s1, $s1, 0x4
.L80042538:
/* 1D938 80042538 8EC20000 */ lw $v0, 0x0($s6)
/* 1D93C 8004253C 30420001 */ andi $v0, $v0, 0x1
/* 1D940 80042540 1440000B */ bnez $v0, .L80042570
/* 1D944 80042544 AEC00094 */ sw $zero, 0x94($s6)
/* 1D948 80042548 3C02800A */ lui $v0, %hi(D_8009A63C)
/* 1D94C 8004254C 8042A63C */ lb $v0, %lo(D_8009A63C)($v0)
/* 1D950 80042550 14400008 */ bnez $v0, .L80042574
/* 1D954 80042554 24020004 */ addiu $v0, $zero, 0x4
/* 1D958 80042558 8EC3009C */ lw $v1, 0x9C($s6)
/* 1D95C 8004255C 24020001 */ addiu $v0, $zero, 0x1
/* 1D960 80042560 14620004 */ bne $v1, $v0, .L80042574
/* 1D964 80042564 24020004 */ addiu $v0, $zero, 0x4
/* 1D968 80042568 2402001E */ addiu $v0, $zero, 0x1E
/* 1D96C 8004256C AEC20094 */ sw $v0, 0x94($s6)
.L80042570:
/* 1D970 80042570 24020004 */ addiu $v0, $zero, 0x4
.L80042574:
/* 1D974 80042574 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1D978 80042578 AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1D97C 8004257C 08010BD3 */ j .L80042F4C
/* 1D980 80042580 00000000 */ nop
.L80042584:
/* 1D984 80042584 8EC20000 */ lw $v0, 0x0($s6)
/* 1D988 80042588 30420002 */ andi $v0, $v0, 0x2
/* 1D98C 8004258C 14400009 */ bnez $v0, .L800425B4
/* 1D990 80042590 00000000 */ nop
/* 1D994 80042594 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* 1D998 80042598 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* 1D99C 8004259C 80620040 */ lb $v0, 0x40($v1)
/* 1D9A0 800425A0 54400004 */ bnel $v0, $zero, .L800425B4
/* 1D9A4 800425A4 AEC00094 */ sw $zero, 0x94($s6)
/* 1D9A8 800425A8 80620044 */ lb $v0, 0x44($v1)
/* 1D9AC 800425AC 54400001 */ bnel $v0, $zero, .L800425B4
/* 1D9B0 800425B0 AEC00094 */ sw $zero, 0x94($s6)
.L800425B4:
/* 1D9B4 800425B4 8EC20094 */ lw $v0, 0x94($s6)
/* 1D9B8 800425B8 10400003 */ beqz $v0, .L800425C8
/* 1D9BC 800425BC 2442FFFF */ addiu $v0, $v0, -0x1
/* 1D9C0 800425C0 08010BD3 */ j .L80042F4C
/* 1D9C4 800425C4 AEC20094 */ sw $v0, 0x94($s6)
.L800425C8:
/* 1D9C8 800425C8 82C2001C */ lb $v0, 0x1C($s6)
/* 1D9CC 800425CC 18400024 */ blez $v0, .L80042660
/* 1D9D0 800425D0 0000982D */ daddu $s3, $zero, $zero
/* 1D9D4 800425D4 02C0A82D */ daddu $s5, $s6, $zero
.L800425D8:
/* 1D9D8 800425D8 8EB40028 */ lw $s4, 0x28($s5)
/* 1D9DC 800425DC 1280001B */ beqz $s4, .L8004264C
/* 1D9E0 800425E0 00000000 */ nop
/* 1D9E4 800425E4 8E820000 */ lw $v0, 0x0($s4)
/* 1D9E8 800425E8 18400018 */ blez $v0, .L8004264C
/* 1D9EC 800425EC 0000882D */ daddu $s1, $zero, $zero
/* 1D9F0 800425F0 0280902D */ daddu $s2, $s4, $zero
.L800425F4:
/* 1D9F4 800425F4 8E500004 */ lw $s0, 0x4($s2)
/* 1D9F8 800425F8 1200000F */ beqz $s0, .L80042638
/* 1D9FC 800425FC 00000000 */ nop
/* 1DA00 80042600 8E020000 */ lw $v0, 0x0($s0)
/* 1DA04 80042604 30420020 */ andi $v0, $v0, 0x20
/* 1DA08 80042608 1440000B */ bnez $v0, .L80042638
/* 1DA0C 8004260C 00000000 */ nop
/* 1DA10 80042610 8E02003C */ lw $v0, 0x3C($s0)
/* 1DA14 80042614 10400003 */ beqz $v0, .L80042624
/* 1DA18 80042618 00000000 */ nop
/* 1DA1C 8004261C 0C0B1123 */ jal resume_all_script
/* 1DA20 80042620 8E040054 */ lw $a0, 0x54($s0)
.L80042624:
/* 1DA24 80042624 8E020044 */ lw $v0, 0x44($s0)
/* 1DA28 80042628 10400003 */ beqz $v0, .L80042638
/* 1DA2C 8004262C 00000000 */ nop
/* 1DA30 80042630 0C0B1123 */ jal resume_all_script
/* 1DA34 80042634 8E04005C */ lw $a0, 0x5C($s0)
.L80042638:
/* 1DA38 80042638 8E820000 */ lw $v0, 0x0($s4)
/* 1DA3C 8004263C 26310001 */ addiu $s1, $s1, 0x1
/* 1DA40 80042640 0222102A */ slt $v0, $s1, $v0
/* 1DA44 80042644 1440FFEB */ bnez $v0, .L800425F4
/* 1DA48 80042648 26520004 */ addiu $s2, $s2, 0x4
.L8004264C:
/* 1DA4C 8004264C 82C2001C */ lb $v0, 0x1C($s6)
/* 1DA50 80042650 26730001 */ addiu $s3, $s3, 0x1
/* 1DA54 80042654 0262102A */ slt $v0, $s3, $v0
/* 1DA58 80042658 1440FFDF */ bnez $v0, .L800425D8
/* 1DA5C 8004265C 26B50004 */ addiu $s5, $s5, 0x4
.L80042660:
/* 1DA60 80042660 2402000F */ addiu $v0, $zero, 0xF
/* 1DA64 80042664 0C038069 */ jal enable_player_input
/* 1DA68 80042668 A2C2000A */ sb $v0, 0xA($s6)
/* 1DA6C 8004266C 0C03BD80 */ jal partner_enable_input
/* 1DA70 80042670 00000000 */ nop
/* 1DA74 80042674 3C02800A */ lui $v0, %hi(D_8009A63C)
/* 1DA78 80042678 8042A63C */ lb $v0, %lo(D_8009A63C)($v0)
/* 1DA7C 8004267C 14400226 */ bnez $v0, .L80042F18
/* 1DA80 80042680 3C040001 */ lui $a0, (0x10002 >> 16)
/* 1DA84 80042684 0C037FBF */ jal suggest_player_anim_allow_backward
/* 1DA88 80042688 34840002 */ ori $a0, $a0, (0x10002 & 0xFFFF)
/* 1DA8C 8004268C 08010BC6 */ j .L80042F18
/* 1DA90 80042690 00000000 */ nop
.L80042694:
/* 1DA94 80042694 8ED40088 */ lw $s4, 0x88($s6)
/* 1DA98 80042698 8E820000 */ lw $v0, 0x0($s4)
/* 1DA9C 8004269C 18400024 */ blez $v0, .L80042730
/* 1DAA0 800426A0 0000982D */ daddu $s3, $zero, $zero
/* 1DAA4 800426A4 0280882D */ daddu $s1, $s4, $zero
.L800426A8:
/* 1DAA8 800426A8 8E300004 */ lw $s0, 0x4($s1)
/* 1DAAC 800426AC 1200001B */ beqz $s0, .L8004271C
/* 1DAB0 800426B0 00000000 */ nop
/* 1DAB4 800426B4 8E030000 */ lw $v1, 0x0($s0)
/* 1DAB8 800426B8 30620008 */ andi $v0, $v1, 0x8
/* 1DABC 800426BC 10400004 */ beqz $v0, .L800426D0
/* 1DAC0 800426C0 30620020 */ andi $v0, $v1, 0x20
/* 1DAC4 800426C4 8EC2008C */ lw $v0, 0x8C($s6)
/* 1DAC8 800426C8 16020014 */ bne $s0, $v0, .L8004271C
/* 1DACC 800426CC 30620020 */ andi $v0, $v1, 0x20
.L800426D0:
/* 1DAD0 800426D0 14400012 */ bnez $v0, .L8004271C
/* 1DAD4 800426D4 00000000 */ nop
/* 1DAD8 800426D8 8E040030 */ lw $a0, 0x30($s0)
/* 1DADC 800426DC 1080000F */ beqz $a0, .L8004271C
/* 1DAE0 800426E0 2405000A */ addiu $a1, $zero, 0xA
/* 1DAE4 800426E4 0C0B0CF8 */ jal start_script
/* 1DAE8 800426E8 0000302D */ daddu $a2, $zero, $zero
/* 1DAEC 800426EC 0040202D */ daddu $a0, $v0, $zero
/* 1DAF0 800426F0 8E0200B0 */ lw $v0, 0xB0($s0)
/* 1DAF4 800426F4 AE040048 */ sw $a0, 0x48($s0)
/* 1DAF8 800426F8 8C830144 */ lw $v1, 0x144($a0)
/* 1DAFC 800426FC 34420001 */ ori $v0, $v0, 0x1
/* 1DB00 80042700 AE030060 */ sw $v1, 0x60($s0)
/* 1DB04 80042704 AE0200B0 */ sw $v0, 0xB0($s0)
/* 1DB08 80042708 AC900148 */ sw $s0, 0x148($a0)
/* 1DB0C 8004270C 86020008 */ lh $v0, 0x8($s0)
/* 1DB10 80042710 AC82014C */ sw $v0, 0x14C($a0)
/* 1DB14 80042714 92020006 */ lbu $v0, 0x6($s0)
/* 1DB18 80042718 A0820004 */ sb $v0, 0x4($a0)
.L8004271C:
/* 1DB1C 8004271C 8E820000 */ lw $v0, 0x0($s4)
/* 1DB20 80042720 26730001 */ addiu $s3, $s3, 0x1
/* 1DB24 80042724 0262102A */ slt $v0, $s3, $v0
/* 1DB28 80042728 1440FFDF */ bnez $v0, .L800426A8
/* 1DB2C 8004272C 26310004 */ addiu $s1, $s1, 0x4
.L80042730:
/* 1DB30 80042730 24020065 */ addiu $v0, $zero, 0x65
/* 1DB34 80042734 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1DB38 80042738 AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1DB3C 8004273C 08010BD3 */ j .L80042F4C
/* 1DB40 80042740 00000000 */ nop
.L80042744:
/* 1DB44 80042744 8EC30090 */ lw $v1, 0x90($s6)
/* 1DB48 80042748 14600188 */ bnez $v1, .L80042D6C
/* 1DB4C 8004274C 00000000 */ nop
/* 1DB50 80042750 08010BD3 */ j .L80042F4C
/* 1DB54 80042754 AC850000 */ sw $a1, 0x0($a0)
.L80042758:
/* 1DB58 80042758 8ED40088 */ lw $s4, 0x88($s6)
/* 1DB5C 8004275C 0000902D */ daddu $s2, $zero, $zero
/* 1DB60 80042760 8E820000 */ lw $v0, 0x0($s4)
/* 1DB64 80042764 18400013 */ blez $v0, .L800427B4
/* 1DB68 80042768 0240982D */ daddu $s3, $s2, $zero
/* 1DB6C 8004276C 0280882D */ daddu $s1, $s4, $zero
.L80042770:
/* 1DB70 80042770 8E300004 */ lw $s0, 0x4($s1)
/* 1DB74 80042774 1200000A */ beqz $s0, .L800427A0
/* 1DB78 80042778 00000000 */ nop
/* 1DB7C 8004277C 8E020000 */ lw $v0, 0x0($s0)
/* 1DB80 80042780 30420020 */ andi $v0, $v0, 0x20
/* 1DB84 80042784 14400006 */ bnez $v0, .L800427A0
/* 1DB88 80042788 00000000 */ nop
/* 1DB8C 8004278C 0C0B1059 */ jal does_script_exist
/* 1DB90 80042790 8E040060 */ lw $a0, 0x60($s0)
/* 1DB94 80042794 50400002 */ beql $v0, $zero, .L800427A0
/* 1DB98 80042798 AE000048 */ sw $zero, 0x48($s0)
/* 1DB9C 8004279C 24120001 */ addiu $s2, $zero, 0x1
.L800427A0:
/* 1DBA0 800427A0 8E820000 */ lw $v0, 0x0($s4)
/* 1DBA4 800427A4 26730001 */ addiu $s3, $s3, 0x1
/* 1DBA8 800427A8 0262102A */ slt $v0, $s3, $v0
/* 1DBAC 800427AC 1440FFF0 */ bnez $v0, .L80042770
/* 1DBB0 800427B0 26310004 */ addiu $s1, $s1, 0x4
.L800427B4:
/* 1DBB4 800427B4 164001E5 */ bnez $s2, .L80042F4C
/* 1DBB8 800427B8 00000000 */ nop
/* 1DBBC 800427BC 82C2001C */ lb $v0, 0x1C($s6)
/* 1DBC0 800427C0 18400024 */ blez $v0, .L80042854
/* 1DBC4 800427C4 0000982D */ daddu $s3, $zero, $zero
/* 1DBC8 800427C8 02C0A82D */ daddu $s5, $s6, $zero
.L800427CC:
/* 1DBCC 800427CC 8EB40028 */ lw $s4, 0x28($s5)
/* 1DBD0 800427D0 1280001B */ beqz $s4, .L80042840
/* 1DBD4 800427D4 00000000 */ nop
/* 1DBD8 800427D8 8E820000 */ lw $v0, 0x0($s4)
/* 1DBDC 800427DC 18400018 */ blez $v0, .L80042840
/* 1DBE0 800427E0 0000882D */ daddu $s1, $zero, $zero
/* 1DBE4 800427E4 0280902D */ daddu $s2, $s4, $zero
.L800427E8:
/* 1DBE8 800427E8 8E500004 */ lw $s0, 0x4($s2)
/* 1DBEC 800427EC 1200000F */ beqz $s0, .L8004282C
/* 1DBF0 800427F0 00000000 */ nop
/* 1DBF4 800427F4 8E020000 */ lw $v0, 0x0($s0)
/* 1DBF8 800427F8 30420020 */ andi $v0, $v0, 0x20
/* 1DBFC 800427FC 1440000B */ bnez $v0, .L8004282C
/* 1DC00 80042800 00000000 */ nop
/* 1DC04 80042804 8E02003C */ lw $v0, 0x3C($s0)
/* 1DC08 80042808 10400003 */ beqz $v0, .L80042818
/* 1DC0C 8004280C 00000000 */ nop
/* 1DC10 80042810 0C0B1123 */ jal resume_all_script
/* 1DC14 80042814 8E040054 */ lw $a0, 0x54($s0)
.L80042818:
/* 1DC18 80042818 8E020044 */ lw $v0, 0x44($s0)
/* 1DC1C 8004281C 10400003 */ beqz $v0, .L8004282C
/* 1DC20 80042820 00000000 */ nop
/* 1DC24 80042824 0C0B1123 */ jal resume_all_script
/* 1DC28 80042828 8E04005C */ lw $a0, 0x5C($s0)
.L8004282C:
/* 1DC2C 8004282C 8E820000 */ lw $v0, 0x0($s4)
/* 1DC30 80042830 26310001 */ addiu $s1, $s1, 0x1
/* 1DC34 80042834 0222102A */ slt $v0, $s1, $v0
/* 1DC38 80042838 1440FFEB */ bnez $v0, .L800427E8
/* 1DC3C 8004283C 26520004 */ addiu $s2, $s2, 0x4
.L80042840:
/* 1DC40 80042840 82C2001C */ lb $v0, 0x1C($s6)
/* 1DC44 80042844 26730001 */ addiu $s3, $s3, 0x1
/* 1DC48 80042848 0262102A */ slt $v0, $s3, $v0
/* 1DC4C 8004284C 1440FFDF */ bnez $v0, .L800427CC
/* 1DC50 80042850 26B50004 */ addiu $s5, $s5, 0x4
.L80042854:
/* 1DC54 80042854 8ED0008C */ lw $s0, 0x8C($s6)
/* 1DC58 80042858 3C030004 */ lui $v1, (0x40000 >> 16)
/* 1DC5C 8004285C 8E020000 */ lw $v0, 0x0($s0)
/* 1DC60 80042860 8ED40088 */ lw $s4, 0x88($s6)
/* 1DC64 80042864 00431024 */ and $v0, $v0, $v1
/* 1DC68 80042868 1440001A */ bnez $v0, .L800428D4
/* 1DC6C 8004286C 2402002D */ addiu $v0, $zero, 0x2D
/* 1DC70 80042870 A20200B4 */ sb $v0, 0xB4($s0)
/* 1DC74 80042874 2402002D */ addiu $v0, $zero, 0x2D
/* 1DC78 80042878 A6E20010 */ sh $v0, 0x10($s7)
/* 1DC7C 8004287C 8E820000 */ lw $v0, 0x0($s4)
/* 1DC80 80042880 18400014 */ blez $v0, .L800428D4
/* 1DC84 80042884 0000882D */ daddu $s1, $zero, $zero
/* 1DC88 80042888 2406002D */ addiu $a2, $zero, 0x2D
/* 1DC8C 8004288C 2405002D */ addiu $a1, $zero, 0x2D
/* 1DC90 80042890 0280202D */ daddu $a0, $s4, $zero
.L80042894:
/* 1DC94 80042894 8C900004 */ lw $s0, 0x4($a0)
/* 1DC98 80042898 12000009 */ beqz $s0, .L800428C0
/* 1DC9C 8004289C 00000000 */ nop
/* 1DCA0 800428A0 8E030000 */ lw $v1, 0x0($s0)
/* 1DCA4 800428A4 30620020 */ andi $v0, $v1, 0x20
/* 1DCA8 800428A8 14400005 */ bnez $v0, .L800428C0
/* 1DCAC 800428AC 30620008 */ andi $v0, $v1, 0x8
/* 1DCB0 800428B0 14400003 */ bnez $v0, .L800428C0
/* 1DCB4 800428B4 00000000 */ nop
/* 1DCB8 800428B8 A20600B4 */ sb $a2, 0xB4($s0)
/* 1DCBC 800428BC A6E50010 */ sh $a1, 0x10($s7)
.L800428C0:
/* 1DCC0 800428C0 8E820000 */ lw $v0, 0x0($s4)
/* 1DCC4 800428C4 26310001 */ addiu $s1, $s1, 0x1
/* 1DCC8 800428C8 0222102A */ slt $v0, $s1, $v0
/* 1DCCC 800428CC 1440FFF1 */ bnez $v0, .L80042894
/* 1DCD0 800428D0 24840004 */ addiu $a0, $a0, 0x4
.L800428D4:
/* 1DCD4 800428D4 8EC20000 */ lw $v0, 0x0($s6)
/* 1DCD8 800428D8 8ED0008C */ lw $s0, 0x8C($s6)
/* 1DCDC 800428DC 30420004 */ andi $v0, $v0, 0x4
/* 1DCE0 800428E0 14400010 */ bnez $v0, .L80042924
/* 1DCE4 800428E4 2402002D */ addiu $v0, $zero, 0x2D
/* 1DCE8 800428E8 3C048007 */ lui $a0, %hi(D_80077E9C)
/* 1DCEC 800428EC 24847E9C */ addiu $a0, $a0, %lo(D_80077E9C)
/* 1DCF0 800428F0 2405000A */ addiu $a1, $zero, 0xA
/* 1DCF4 800428F4 0C0B0CF8 */ jal start_script
/* 1DCF8 800428F8 0000302D */ daddu $a2, $zero, $zero
/* 1DCFC 800428FC 0040202D */ daddu $a0, $v0, $zero
/* 1DD00 80042900 AE040048 */ sw $a0, 0x48($s0)
/* 1DD04 80042904 8C820144 */ lw $v0, 0x144($a0)
/* 1DD08 80042908 AE020060 */ sw $v0, 0x60($s0)
/* 1DD0C 8004290C AC900148 */ sw $s0, 0x148($a0)
/* 1DD10 80042910 86020008 */ lh $v0, 0x8($s0)
/* 1DD14 80042914 AC82014C */ sw $v0, 0x14C($a0)
/* 1DD18 80042918 92020006 */ lbu $v0, 0x6($s0)
/* 1DD1C 8004291C A0820004 */ sb $v0, 0x4($a0)
/* 1DD20 80042920 2402002D */ addiu $v0, $zero, 0x2D
.L80042924:
/* 1DD24 80042924 A2C2000A */ sb $v0, 0xA($s6)
/* 1DD28 80042928 2402002D */ addiu $v0, $zero, 0x2D
/* 1DD2C 8004292C 0C038069 */ jal enable_player_input
/* 1DD30 80042930 A6E20010 */ sh $v0, 0x10($s7)
/* 1DD34 80042934 0C03BD80 */ jal partner_enable_input
/* 1DD38 80042938 00000000 */ nop
/* 1DD3C 8004293C 3C05BF80 */ lui $a1, (0xBF800000 >> 16)
/* 1DD40 80042940 0C04DF62 */ jal set_screen_overlay_params_front
/* 1DD44 80042944 240400FF */ addiu $a0, $zero, 0xFF
/* 1DD48 80042948 3C02800A */ lui $v0, %hi(D_8009A63C)
/* 1DD4C 8004294C 8042A63C */ lb $v0, %lo(D_8009A63C)($v0)
/* 1DD50 80042950 54400003 */ bnel $v0, $zero, .L80042960
/* 1DD54 80042954 AEC00094 */ sw $zero, 0x94($s6)
/* 1DD58 80042958 2402000F */ addiu $v0, $zero, 0xF
/* 1DD5C 8004295C AEC20094 */ sw $v0, 0x94($s6)
.L80042960:
/* 1DD60 80042960 24020067 */ addiu $v0, $zero, 0x67
/* 1DD64 80042964 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1DD68 80042968 AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1DD6C 8004296C 08010BD3 */ j .L80042F4C
/* 1DD70 80042970 00000000 */ nop
.L80042974:
/* 1DD74 80042974 8EC20094 */ lw $v0, 0x94($s6)
/* 1DD78 80042978 1040000D */ beqz $v0, .L800429B0
/* 1DD7C 8004297C 2442FFFF */ addiu $v0, $v0, -0x1
/* 1DD80 80042980 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* 1DD84 80042984 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* 1DD88 80042988 AEC20094 */ sw $v0, 0x94($s6)
/* 1DD8C 8004298C 8C620000 */ lw $v0, 0x0($v1)
/* 1DD90 80042990 14400007 */ bnez $v0, .L800429B0
/* 1DD94 80042994 00000000 */ nop
/* 1DD98 80042998 80620040 */ lb $v0, 0x40($v1)
/* 1DD9C 8004299C 14400004 */ bnez $v0, .L800429B0
/* 1DDA0 800429A0 00000000 */ nop
/* 1DDA4 800429A4 80620044 */ lb $v0, 0x44($v1)
/* 1DDA8 800429A8 10400168 */ beqz $v0, .L80042F4C
/* 1DDAC 800429AC 00000000 */ nop
.L800429B0:
/* 1DDB0 800429B0 3C02800A */ lui $v0, %hi(D_8009A63C)
/* 1DDB4 800429B4 8042A63C */ lb $v0, %lo(D_8009A63C)($v0)
/* 1DDB8 800429B8 1440015A */ bnez $v0, .L80042F24
/* 1DDBC 800429BC 3C020005 */ lui $v0, (0x50000 >> 16)
/* 1DDC0 800429C0 8EE300B8 */ lw $v1, 0xB8($s7)
/* 1DDC4 800429C4 14620157 */ bne $v1, $v0, .L80042F24
/* 1DDC8 800429C8 3C040001 */ lui $a0, (0x10002 >> 16)
/* 1DDCC 800429CC 0C037FBF */ jal suggest_player_anim_allow_backward
/* 1DDD0 800429D0 34840002 */ ori $a0, $a0, (0x10002 & 0xFFFF)
/* 1DDD4 800429D4 08010BC9 */ j .L80042F24
/* 1DDD8 800429D8 00000000 */ nop
.L800429DC:
/* 1DDDC 800429DC 3C040008 */ lui $a0, (0x80009 >> 16)
/* 1DDE0 800429E0 0C037FBF */ jal suggest_player_anim_allow_backward
/* 1DDE4 800429E4 34840009 */ ori $a0, $a0, (0x80009 & 0xFFFF)
/* 1DDE8 800429E8 8ED40088 */ lw $s4, 0x88($s6)
/* 1DDEC 800429EC 8E820000 */ lw $v0, 0x0($s4)
/* 1DDF0 800429F0 18400021 */ blez $v0, .L80042A78
/* 1DDF4 800429F4 0000982D */ daddu $s3, $zero, $zero
/* 1DDF8 800429F8 0280882D */ daddu $s1, $s4, $zero
.L800429FC:
/* 1DDFC 800429FC 8E300004 */ lw $s0, 0x4($s1)
/* 1DE00 80042A00 12000018 */ beqz $s0, .L80042A64
/* 1DE04 80042A04 00000000 */ nop
/* 1DE08 80042A08 8E030000 */ lw $v1, 0x0($s0)
/* 1DE0C 80042A0C 30620008 */ andi $v0, $v1, 0x8
/* 1DE10 80042A10 10400004 */ beqz $v0, .L80042A24
/* 1DE14 80042A14 30620020 */ andi $v0, $v1, 0x20
/* 1DE18 80042A18 8EC2008C */ lw $v0, 0x8C($s6)
/* 1DE1C 80042A1C 16020011 */ bne $s0, $v0, .L80042A64
/* 1DE20 80042A20 30620020 */ andi $v0, $v1, 0x20
.L80042A24:
/* 1DE24 80042A24 1440000F */ bnez $v0, .L80042A64
/* 1DE28 80042A28 00000000 */ nop
/* 1DE2C 80042A2C 8E040030 */ lw $a0, 0x30($s0)
/* 1DE30 80042A30 1080000C */ beqz $a0, .L80042A64
/* 1DE34 80042A34 2405000A */ addiu $a1, $zero, 0xA
/* 1DE38 80042A38 0C0B0CF8 */ jal start_script
/* 1DE3C 80042A3C 0000302D */ daddu $a2, $zero, $zero
/* 1DE40 80042A40 0040202D */ daddu $a0, $v0, $zero
/* 1DE44 80042A44 AE040048 */ sw $a0, 0x48($s0)
/* 1DE48 80042A48 8C820144 */ lw $v0, 0x144($a0)
/* 1DE4C 80042A4C AE020060 */ sw $v0, 0x60($s0)
/* 1DE50 80042A50 AC900148 */ sw $s0, 0x148($a0)
/* 1DE54 80042A54 86020008 */ lh $v0, 0x8($s0)
/* 1DE58 80042A58 AC82014C */ sw $v0, 0x14C($a0)
/* 1DE5C 80042A5C 92020006 */ lbu $v0, 0x6($s0)
/* 1DE60 80042A60 A0820004 */ sb $v0, 0x4($a0)
.L80042A64:
/* 1DE64 80042A64 8E820000 */ lw $v0, 0x0($s4)
/* 1DE68 80042A68 26730001 */ addiu $s3, $s3, 0x1
/* 1DE6C 80042A6C 0262102A */ slt $v0, $s3, $v0
/* 1DE70 80042A70 1440FFE2 */ bnez $v0, .L800429FC
/* 1DE74 80042A74 26310004 */ addiu $s1, $s1, 0x4
.L80042A78:
/* 1DE78 80042A78 240200C9 */ addiu $v0, $zero, 0xC9
/* 1DE7C 80042A7C 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1DE80 80042A80 AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1DE84 80042A84 08010BD3 */ j .L80042F4C
/* 1DE88 80042A88 00000000 */ nop
.L80042A8C:
/* 1DE8C 80042A8C 8EC30090 */ lw $v1, 0x90($s6)
/* 1DE90 80042A90 146000B6 */ bnez $v1, .L80042D6C
/* 1DE94 80042A94 00000000 */ nop
/* 1DE98 80042A98 08010BD3 */ j .L80042F4C
/* 1DE9C 80042A9C AC820000 */ sw $v0, 0x0($a0)
.L80042AA0:
/* 1DEA0 80042AA0 8ED40088 */ lw $s4, 0x88($s6)
/* 1DEA4 80042AA4 8E820000 */ lw $v0, 0x0($s4)
/* 1DEA8 80042AA8 18400013 */ blez $v0, .L80042AF8
/* 1DEAC 80042AAC 0240982D */ daddu $s3, $s2, $zero
/* 1DEB0 80042AB0 0280882D */ daddu $s1, $s4, $zero
.L80042AB4:
/* 1DEB4 80042AB4 8E300004 */ lw $s0, 0x4($s1)
/* 1DEB8 80042AB8 1200000A */ beqz $s0, .L80042AE4
/* 1DEBC 80042ABC 00000000 */ nop
/* 1DEC0 80042AC0 8E020000 */ lw $v0, 0x0($s0)
/* 1DEC4 80042AC4 30420020 */ andi $v0, $v0, 0x20
/* 1DEC8 80042AC8 14400006 */ bnez $v0, .L80042AE4
/* 1DECC 80042ACC 00000000 */ nop
/* 1DED0 80042AD0 0C0B1059 */ jal does_script_exist
/* 1DED4 80042AD4 8E040060 */ lw $a0, 0x60($s0)
/* 1DED8 80042AD8 50400002 */ beql $v0, $zero, .L80042AE4
/* 1DEDC 80042ADC AE000048 */ sw $zero, 0x48($s0)
/* 1DEE0 80042AE0 24120001 */ addiu $s2, $zero, 0x1
.L80042AE4:
/* 1DEE4 80042AE4 8E820000 */ lw $v0, 0x0($s4)
/* 1DEE8 80042AE8 26730001 */ addiu $s3, $s3, 0x1
/* 1DEEC 80042AEC 0262102A */ slt $v0, $s3, $v0
/* 1DEF0 80042AF0 1440FFF0 */ bnez $v0, .L80042AB4
glabel func_80042AF4
/* 1DEF4 80042AF4 26310004 */ addiu $s1, $s1, 0x4
.L80042AF8:
/* 1DEF8 80042AF8 16400114 */ bnez $s2, .L80042F4C
/* 1DEFC 80042AFC 00000000 */ nop
/* 1DF00 80042B00 82C2001C */ lb $v0, 0x1C($s6)
/* 1DF04 80042B04 18400024 */ blez $v0, .L80042B98
/* 1DF08 80042B08 0000982D */ daddu $s3, $zero, $zero
/* 1DF0C 80042B0C 02C0A82D */ daddu $s5, $s6, $zero
.L80042B10:
/* 1DF10 80042B10 8EB40028 */ lw $s4, 0x28($s5)
/* 1DF14 80042B14 1280001B */ beqz $s4, .L80042B84
/* 1DF18 80042B18 00000000 */ nop
/* 1DF1C 80042B1C 8E820000 */ lw $v0, 0x0($s4)
/* 1DF20 80042B20 18400018 */ blez $v0, .L80042B84
/* 1DF24 80042B24 0000882D */ daddu $s1, $zero, $zero
/* 1DF28 80042B28 0280902D */ daddu $s2, $s4, $zero
.L80042B2C:
/* 1DF2C 80042B2C 8E500004 */ lw $s0, 0x4($s2)
/* 1DF30 80042B30 1200000F */ beqz $s0, .L80042B70
/* 1DF34 80042B34 00000000 */ nop
/* 1DF38 80042B38 8E020000 */ lw $v0, 0x0($s0)
/* 1DF3C 80042B3C 30420020 */ andi $v0, $v0, 0x20
/* 1DF40 80042B40 1440000B */ bnez $v0, .L80042B70
/* 1DF44 80042B44 00000000 */ nop
/* 1DF48 80042B48 8E02003C */ lw $v0, 0x3C($s0)
/* 1DF4C 80042B4C 10400003 */ beqz $v0, .L80042B5C
/* 1DF50 80042B50 00000000 */ nop
/* 1DF54 80042B54 0C0B1123 */ jal resume_all_script
/* 1DF58 80042B58 8E040054 */ lw $a0, 0x54($s0)
.L80042B5C:
/* 1DF5C 80042B5C 8E020044 */ lw $v0, 0x44($s0)
/* 1DF60 80042B60 10400003 */ beqz $v0, .L80042B70
/* 1DF64 80042B64 00000000 */ nop
/* 1DF68 80042B68 0C0B1123 */ jal resume_all_script
/* 1DF6C 80042B6C 8E04005C */ lw $a0, 0x5C($s0)
.L80042B70:
/* 1DF70 80042B70 8E820000 */ lw $v0, 0x0($s4)
/* 1DF74 80042B74 26310001 */ addiu $s1, $s1, 0x1
/* 1DF78 80042B78 0222102A */ slt $v0, $s1, $v0
/* 1DF7C 80042B7C 1440FFEB */ bnez $v0, .L80042B2C
/* 1DF80 80042B80 26520004 */ addiu $s2, $s2, 0x4
.L80042B84:
/* 1DF84 80042B84 82C2001C */ lb $v0, 0x1C($s6)
/* 1DF88 80042B88 26730001 */ addiu $s3, $s3, 0x1
/* 1DF8C 80042B8C 0262102A */ slt $v0, $s3, $v0
/* 1DF90 80042B90 1440FFDF */ bnez $v0, .L80042B10
/* 1DF94 80042B94 26B50004 */ addiu $s5, $s5, 0x4
.L80042B98:
/* 1DF98 80042B98 0C038069 */ jal enable_player_input
/* 1DF9C 80042B9C 00000000 */ nop
/* 1DFA0 80042BA0 0C03BD80 */ jal partner_enable_input
/* 1DFA4 80042BA4 00000000 */ nop
/* 1DFA8 80042BA8 3C05BF80 */ lui $a1, (0xBF800000 >> 16)
/* 1DFAC 80042BAC 0C04DF62 */ jal set_screen_overlay_params_front
/* 1DFB0 80042BB0 240400FF */ addiu $a0, $zero, 0xFF
/* 1DFB4 80042BB4 2402000F */ addiu $v0, $zero, 0xF
/* 1DFB8 80042BB8 AEC20094 */ sw $v0, 0x94($s6)
/* 1DFBC 80042BBC 240200CB */ addiu $v0, $zero, 0xCB
/* 1DFC0 80042BC0 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1DFC4 80042BC4 AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1DFC8 80042BC8 08010BD3 */ j .L80042F4C
/* 1DFCC 80042BCC 00000000 */ nop
.L80042BD0:
/* 1DFD0 80042BD0 8EC20094 */ lw $v0, 0x94($s6)
/* 1DFD4 80042BD4 104000D3 */ beqz $v0, .L80042F24
/* 1DFD8 80042BD8 2442FFFF */ addiu $v0, $v0, -0x1
/* 1DFDC 80042BDC 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* 1DFE0 80042BE0 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* 1DFE4 80042BE4 AEC20094 */ sw $v0, 0x94($s6)
/* 1DFE8 80042BE8 8C620000 */ lw $v0, 0x0($v1)
/* 1DFEC 80042BEC 144000CD */ bnez $v0, .L80042F24
/* 1DFF0 80042BF0 00000000 */ nop
/* 1DFF4 80042BF4 80620040 */ lb $v0, 0x40($v1)
/* 1DFF8 80042BF8 144000CA */ bnez $v0, .L80042F24
/* 1DFFC 80042BFC 00000000 */ nop
/* 1E000 80042C00 80620044 */ lb $v0, 0x44($v1)
/* 1E004 80042C04 104000D1 */ beqz $v0, .L80042F4C
/* 1E008 80042C08 00000000 */ nop
/* 1E00C 80042C0C 08010BC9 */ j .L80042F24
/* 1E010 80042C10 00000000 */ nop
.L80042C14:
/* 1E014 80042C14 82C2001C */ lb $v0, 0x1C($s6)
/* 1E018 80042C18 184000BB */ blez $v0, .L80042F08
/* 1E01C 80042C1C 0000982D */ daddu $s3, $zero, $zero
/* 1E020 80042C20 02C0A82D */ daddu $s5, $s6, $zero
.L80042C24:
/* 1E024 80042C24 8EB40028 */ lw $s4, 0x28($s5)
/* 1E028 80042C28 1280001B */ beqz $s4, .L80042C98
/* 1E02C 80042C2C 00000000 */ nop
/* 1E030 80042C30 8E820000 */ lw $v0, 0x0($s4)
/* 1E034 80042C34 18400018 */ blez $v0, .L80042C98
/* 1E038 80042C38 0000882D */ daddu $s1, $zero, $zero
/* 1E03C 80042C3C 0280902D */ daddu $s2, $s4, $zero
.L80042C40:
/* 1E040 80042C40 8E500004 */ lw $s0, 0x4($s2)
/* 1E044 80042C44 1200000F */ beqz $s0, .L80042C84
/* 1E048 80042C48 00000000 */ nop
/* 1E04C 80042C4C 8E020000 */ lw $v0, 0x0($s0)
/* 1E050 80042C50 30420020 */ andi $v0, $v0, 0x20
/* 1E054 80042C54 1440000B */ bnez $v0, .L80042C84
/* 1E058 80042C58 00000000 */ nop
/* 1E05C 80042C5C 8E02003C */ lw $v0, 0x3C($s0)
/* 1E060 80042C60 10400003 */ beqz $v0, .L80042C70
/* 1E064 80042C64 00000000 */ nop
/* 1E068 80042C68 0C0B1123 */ jal resume_all_script
/* 1E06C 80042C6C 8E040054 */ lw $a0, 0x54($s0)
.L80042C70:
/* 1E070 80042C70 8E020044 */ lw $v0, 0x44($s0)
/* 1E074 80042C74 10400003 */ beqz $v0, .L80042C84
/* 1E078 80042C78 00000000 */ nop
/* 1E07C 80042C7C 0C0B1123 */ jal resume_all_script
/* 1E080 80042C80 8E04005C */ lw $a0, 0x5C($s0)
.L80042C84:
/* 1E084 80042C84 8E820000 */ lw $v0, 0x0($s4)
/* 1E088 80042C88 26310001 */ addiu $s1, $s1, 0x1
/* 1E08C 80042C8C 0222102A */ slt $v0, $s1, $v0
/* 1E090 80042C90 1440FFEB */ bnez $v0, .L80042C40
/* 1E094 80042C94 26520004 */ addiu $s2, $s2, 0x4
.L80042C98:
/* 1E098 80042C98 82C2001C */ lb $v0, 0x1C($s6)
/* 1E09C 80042C9C 26730001 */ addiu $s3, $s3, 0x1
/* 1E0A0 80042CA0 0262102A */ slt $v0, $s3, $v0
/* 1E0A4 80042CA4 1440FFDF */ bnez $v0, .L80042C24
/* 1E0A8 80042CA8 26B50004 */ addiu $s5, $s5, 0x4
/* 1E0AC 80042CAC 08010BC2 */ j .L80042F08
/* 1E0B0 80042CB0 00000000 */ nop
.L80042CB4:
/* 1E0B4 80042CB4 8ED40088 */ lw $s4, 0x88($s6)
/* 1E0B8 80042CB8 8E820000 */ lw $v0, 0x0($s4)
/* 1E0BC 80042CBC 18400021 */ blez $v0, .L80042D44
/* 1E0C0 80042CC0 0000982D */ daddu $s3, $zero, $zero
/* 1E0C4 80042CC4 0280882D */ daddu $s1, $s4, $zero
.L80042CC8:
/* 1E0C8 80042CC8 8E300004 */ lw $s0, 0x4($s1)
/* 1E0CC 80042CCC 12000018 */ beqz $s0, .L80042D30
/* 1E0D0 80042CD0 00000000 */ nop
/* 1E0D4 80042CD4 8E030000 */ lw $v1, 0x0($s0)
/* 1E0D8 80042CD8 30620008 */ andi $v0, $v1, 0x8
/* 1E0DC 80042CDC 10400004 */ beqz $v0, .L80042CF0
/* 1E0E0 80042CE0 30620020 */ andi $v0, $v1, 0x20
/* 1E0E4 80042CE4 8EC2008C */ lw $v0, 0x8C($s6)
/* 1E0E8 80042CE8 16020011 */ bne $s0, $v0, .L80042D30
/* 1E0EC 80042CEC 30620020 */ andi $v0, $v1, 0x20
.L80042CF0:
/* 1E0F0 80042CF0 1440000F */ bnez $v0, .L80042D30
/* 1E0F4 80042CF4 00000000 */ nop
/* 1E0F8 80042CF8 8E040030 */ lw $a0, 0x30($s0)
/* 1E0FC 80042CFC 1080000C */ beqz $a0, .L80042D30
/* 1E100 80042D00 2405000A */ addiu $a1, $zero, 0xA
/* 1E104 80042D04 0C0B0CF8 */ jal start_script
/* 1E108 80042D08 0000302D */ daddu $a2, $zero, $zero
/* 1E10C 80042D0C 0040202D */ daddu $a0, $v0, $zero
/* 1E110 80042D10 AE040048 */ sw $a0, 0x48($s0)
/* 1E114 80042D14 8C820144 */ lw $v0, 0x144($a0)
/* 1E118 80042D18 AE020060 */ sw $v0, 0x60($s0)
/* 1E11C 80042D1C AC900148 */ sw $s0, 0x148($a0)
/* 1E120 80042D20 86020008 */ lh $v0, 0x8($s0)
/* 1E124 80042D24 AC82014C */ sw $v0, 0x14C($a0)
/* 1E128 80042D28 92020006 */ lbu $v0, 0x6($s0)
/* 1E12C 80042D2C A0820004 */ sb $v0, 0x4($a0)
.L80042D30:
/* 1E130 80042D30 8E820000 */ lw $v0, 0x0($s4)
/* 1E134 80042D34 26730001 */ addiu $s3, $s3, 0x1
/* 1E138 80042D38 0262102A */ slt $v0, $s3, $v0
/* 1E13C 80042D3C 1440FFE2 */ bnez $v0, .L80042CC8
/* 1E140 80042D40 26310004 */ addiu $s1, $s1, 0x4
.L80042D44:
/* 1E144 80042D44 24020191 */ addiu $v0, $zero, 0x191
/* 1E148 80042D48 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1E14C 80042D4C AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1E150 80042D50 08010BD3 */ j .L80042F4C
/* 1E154 80042D54 00000000 */ nop
.L80042D58:
/* 1E158 80042D58 8EC30090 */ lw $v1, 0x90($s6)
/* 1E15C 80042D5C 14600003 */ bnez $v1, .L80042D6C
/* 1E160 80042D60 00000000 */ nop
/* 1E164 80042D64 08010BD3 */ j .L80042F4C
/* 1E168 80042D68 AC820000 */ sw $v0, 0x0($a0)
.L80042D6C:
/* 1E16C 80042D6C 8EC20098 */ lw $v0, 0x98($s6)
/* 1E170 80042D70 24420004 */ addiu $v0, $v0, 0x4
/* 1E174 80042D74 AEC20098 */ sw $v0, 0x98($s6)
/* 1E178 80042D78 00621023 */ subu $v0, $v1, $v0
/* 1E17C 80042D7C 04410073 */ bgez $v0, .L80042F4C
/* 1E180 80042D80 AEC20090 */ sw $v0, 0x90($s6)
/* 1E184 80042D84 08010BD3 */ j .L80042F4C
/* 1E188 80042D88 AEC00090 */ sw $zero, 0x90($s6)
.L80042D8C:
/* 1E18C 80042D8C 8ED40088 */ lw $s4, 0x88($s6)
/* 1E190 80042D90 8E820000 */ lw $v0, 0x0($s4)
/* 1E194 80042D94 18400013 */ blez $v0, .L80042DE4
/* 1E198 80042D98 0240982D */ daddu $s3, $s2, $zero
/* 1E19C 80042D9C 0280882D */ daddu $s1, $s4, $zero
.L80042DA0:
/* 1E1A0 80042DA0 8E300004 */ lw $s0, 0x4($s1)
/* 1E1A4 80042DA4 1200000A */ beqz $s0, .L80042DD0
/* 1E1A8 80042DA8 00000000 */ nop
/* 1E1AC 80042DAC 8E020000 */ lw $v0, 0x0($s0)
/* 1E1B0 80042DB0 30420020 */ andi $v0, $v0, 0x20
/* 1E1B4 80042DB4 14400006 */ bnez $v0, .L80042DD0
/* 1E1B8 80042DB8 00000000 */ nop
/* 1E1BC 80042DBC 0C0B1059 */ jal does_script_exist
/* 1E1C0 80042DC0 8E040060 */ lw $a0, 0x60($s0)
/* 1E1C4 80042DC4 50400002 */ beql $v0, $zero, .L80042DD0
/* 1E1C8 80042DC8 AE000048 */ sw $zero, 0x48($s0)
/* 1E1CC 80042DCC 24120001 */ addiu $s2, $zero, 0x1
.L80042DD0:
/* 1E1D0 80042DD0 8E820000 */ lw $v0, 0x0($s4)
/* 1E1D4 80042DD4 26730001 */ addiu $s3, $s3, 0x1
/* 1E1D8 80042DD8 0262102A */ slt $v0, $s3, $v0
/* 1E1DC 80042DDC 1440FFF0 */ bnez $v0, .L80042DA0
/* 1E1E0 80042DE0 26310004 */ addiu $s1, $s1, 0x4
.L80042DE4:
/* 1E1E4 80042DE4 16400059 */ bnez $s2, .L80042F4C
/* 1E1E8 80042DE8 00000000 */ nop
/* 1E1EC 80042DEC 82C2001C */ lb $v0, 0x1C($s6)
/* 1E1F0 80042DF0 18400024 */ blez $v0, .L80042E84
/* 1E1F4 80042DF4 0000982D */ daddu $s3, $zero, $zero
/* 1E1F8 80042DF8 02C0A82D */ daddu $s5, $s6, $zero
.L80042DFC:
/* 1E1FC 80042DFC 8EB40028 */ lw $s4, 0x28($s5)
/* 1E200 80042E00 1280001B */ beqz $s4, .L80042E70
/* 1E204 80042E04 00000000 */ nop
/* 1E208 80042E08 8E820000 */ lw $v0, 0x0($s4)
/* 1E20C 80042E0C 18400018 */ blez $v0, .L80042E70
/* 1E210 80042E10 0000882D */ daddu $s1, $zero, $zero
/* 1E214 80042E14 0280902D */ daddu $s2, $s4, $zero
.L80042E18:
/* 1E218 80042E18 8E500004 */ lw $s0, 0x4($s2)
/* 1E21C 80042E1C 1200000F */ beqz $s0, .L80042E5C
/* 1E220 80042E20 00000000 */ nop
/* 1E224 80042E24 8E020000 */ lw $v0, 0x0($s0)
/* 1E228 80042E28 30420020 */ andi $v0, $v0, 0x20
/* 1E22C 80042E2C 1440000B */ bnez $v0, .L80042E5C
/* 1E230 80042E30 00000000 */ nop
/* 1E234 80042E34 8E02003C */ lw $v0, 0x3C($s0)
/* 1E238 80042E38 10400003 */ beqz $v0, .L80042E48
/* 1E23C 80042E3C 00000000 */ nop
/* 1E240 80042E40 0C0B1123 */ jal resume_all_script
/* 1E244 80042E44 8E040054 */ lw $a0, 0x54($s0)
.L80042E48:
/* 1E248 80042E48 8E020044 */ lw $v0, 0x44($s0)
/* 1E24C 80042E4C 10400003 */ beqz $v0, .L80042E5C
/* 1E250 80042E50 00000000 */ nop
/* 1E254 80042E54 0C0B1123 */ jal resume_all_script
/* 1E258 80042E58 8E04005C */ lw $a0, 0x5C($s0)
.L80042E5C:
/* 1E25C 80042E5C 8E820000 */ lw $v0, 0x0($s4)
/* 1E260 80042E60 26310001 */ addiu $s1, $s1, 0x1
/* 1E264 80042E64 0222102A */ slt $v0, $s1, $v0
/* 1E268 80042E68 1440FFEB */ bnez $v0, .L80042E18
/* 1E26C 80042E6C 26520004 */ addiu $s2, $s2, 0x4
.L80042E70:
/* 1E270 80042E70 82C2001C */ lb $v0, 0x1C($s6)
/* 1E274 80042E74 26730001 */ addiu $s3, $s3, 0x1
/* 1E278 80042E78 0262102A */ slt $v0, $s3, $v0
/* 1E27C 80042E7C 1440FFDF */ bnez $v0, .L80042DFC
/* 1E280 80042E80 26B50004 */ addiu $s5, $s5, 0x4
.L80042E84:
/* 1E284 80042E84 8ED0008C */ lw $s0, 0x8C($s6)
/* 1E288 80042E88 8E020000 */ lw $v0, 0x0($s0)
/* 1E28C 80042E8C 30420004 */ andi $v0, $v0, 0x4
/* 1E290 80042E90 1440001C */ bnez $v0, .L80042F04
/* 1E294 80042E94 2402002D */ addiu $v0, $zero, 0x2D
/* 1E298 80042E98 8ED40088 */ lw $s4, 0x88($s6)
/* 1E29C 80042E9C A20200B4 */ sb $v0, 0xB4($s0)
/* 1E2A0 80042EA0 2402002D */ addiu $v0, $zero, 0x2D
/* 1E2A4 80042EA4 A6E20010 */ sh $v0, 0x10($s7)
/* 1E2A8 80042EA8 8E820000 */ lw $v0, 0x0($s4)
/* 1E2AC 80042EAC 18400014 */ blez $v0, .L80042F00
/* 1E2B0 80042EB0 0000882D */ daddu $s1, $zero, $zero
/* 1E2B4 80042EB4 2406002D */ addiu $a2, $zero, 0x2D
/* 1E2B8 80042EB8 2405002D */ addiu $a1, $zero, 0x2D
/* 1E2BC 80042EBC 0280202D */ daddu $a0, $s4, $zero
.L80042EC0:
/* 1E2C0 80042EC0 8C900004 */ lw $s0, 0x4($a0)
/* 1E2C4 80042EC4 12000009 */ beqz $s0, .L80042EEC
/* 1E2C8 80042EC8 00000000 */ nop
/* 1E2CC 80042ECC 8E030000 */ lw $v1, 0x0($s0)
/* 1E2D0 80042ED0 30620020 */ andi $v0, $v1, 0x20
/* 1E2D4 80042ED4 14400005 */ bnez $v0, .L80042EEC
/* 1E2D8 80042ED8 30620008 */ andi $v0, $v1, 0x8
/* 1E2DC 80042EDC 14400003 */ bnez $v0, .L80042EEC
/* 1E2E0 80042EE0 00000000 */ nop
/* 1E2E4 80042EE4 A20600B4 */ sb $a2, 0xB4($s0)
/* 1E2E8 80042EE8 A6E50010 */ sh $a1, 0x10($s7)
.L80042EEC:
/* 1E2EC 80042EEC 8E820000 */ lw $v0, 0x0($s4)
/* 1E2F0 80042EF0 26310001 */ addiu $s1, $s1, 0x1
/* 1E2F4 80042EF4 0222102A */ slt $v0, $s1, $v0
/* 1E2F8 80042EF8 1440FFF1 */ bnez $v0, .L80042EC0
/* 1E2FC 80042EFC 24840004 */ addiu $a0, $a0, 0x4
.L80042F00:
/* 1E300 80042F00 2402002D */ addiu $v0, $zero, 0x2D
.L80042F04:
/* 1E304 80042F04 A2C2000A */ sb $v0, 0xA($s6)
.L80042F08:
/* 1E308 80042F08 0C038069 */ jal enable_player_input
/* 1E30C 80042F0C 00000000 */ nop
/* 1E310 80042F10 0C03BD80 */ jal partner_enable_input
/* 1E314 80042F14 00000000 */ nop
.L80042F18:
/* 1E318 80042F18 3C05BF80 */ lui $a1, (0xBF800000 >> 16)
/* 1E31C 80042F1C 0C04DF62 */ jal set_screen_overlay_params_front
/* 1E320 80042F20 240400FF */ addiu $a0, $zero, 0xFF
.L80042F24:
/* 1E324 80042F24 0C0B1192 */ jal resume_all_group
/* 1E328 80042F28 24040010 */ addiu $a0, $zero, 0x10
/* 1E32C 80042F2C 24020002 */ addiu $v0, $zero, 0x2
/* 1E330 80042F30 3C01800A */ lui $at, %hi(gEncounterState)
/* 1E334 80042F34 AC22A600 */ sw $v0, %lo(gEncounterState)($at)
/* 1E338 80042F38 24020001 */ addiu $v0, $zero, 0x1
/* 1E33C 80042F3C 3C01800A */ lui $at, %hi(D_8009A678)
/* 1E340 80042F40 AC22A678 */ sw $v0, %lo(D_8009A678)($at)
/* 1E344 80042F44 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1E348 80042F48 AC20A5D0 */ sw $zero, %lo(gEncounterSubState)($at)
.L80042F4C:
/* 1E34C 80042F4C 82C2001C */ lb $v0, 0x1C($s6)
/* 1E350 80042F50 18400032 */ blez $v0, .L8004301C
/* 1E354 80042F54 0000982D */ daddu $s3, $zero, $zero
/* 1E358 80042F58 3C1E8000 */ lui $fp, (0x80000000 >> 16)
/* 1E35C 80042F5C 3C177FFF */ lui $s7, (0x7FFFFFFF >> 16)
/* 1E360 80042F60 36F7FFFF */ ori $s7, $s7, (0x7FFFFFFF & 0xFFFF)
/* 1E364 80042F64 02C0A82D */ daddu $s5, $s6, $zero
.L80042F68:
/* 1E368 80042F68 8EB40028 */ lw $s4, 0x28($s5)
/* 1E36C 80042F6C 12800026 */ beqz $s4, .L80043008
/* 1E370 80042F70 00000000 */ nop
/* 1E374 80042F74 8E820000 */ lw $v0, 0x0($s4)
/* 1E378 80042F78 18400023 */ blez $v0, .L80043008
/* 1E37C 80042F7C 0000882D */ daddu $s1, $zero, $zero
/* 1E380 80042F80 0280902D */ daddu $s2, $s4, $zero
.L80042F84:
/* 1E384 80042F84 8E500004 */ lw $s0, 0x4($s2)
/* 1E388 80042F88 1200001A */ beqz $s0, .L80042FF4
/* 1E38C 80042F8C 00000000 */ nop
/* 1E390 80042F90 8E020000 */ lw $v0, 0x0($s0)
/* 1E394 80042F94 30420020 */ andi $v0, $v0, 0x20
/* 1E398 80042F98 14400016 */ bnez $v0, .L80042FF4
/* 1E39C 80042F9C 00000000 */ nop
/* 1E3A0 80042FA0 0C00EABB */ jal get_npc_unsafe
/* 1E3A4 80042FA4 86040008 */ lh $a0, 0x8($s0)
/* 1E3A8 80042FA8 0040202D */ daddu $a0, $v0, $zero
/* 1E3AC 80042FAC 820200B4 */ lb $v0, 0xB4($s0)
/* 1E3B0 80042FB0 920300B4 */ lbu $v1, 0xB4($s0)
/* 1E3B4 80042FB4 1040000F */ beqz $v0, .L80042FF4
/* 1E3B8 80042FB8 30620001 */ andi $v0, $v1, 0x1
/* 1E3BC 80042FBC 10400007 */ beqz $v0, .L80042FDC
/* 1E3C0 80042FC0 00000000 */ nop
/* 1E3C4 80042FC4 8C820000 */ lw $v0, 0x0($a0)
/* 1E3C8 80042FC8 005E1025 */ or $v0, $v0, $fp
/* 1E3CC 80042FCC AC820000 */ sw $v0, 0x0($a0)
/* 1E3D0 80042FD0 8E020000 */ lw $v0, 0x0($s0)
/* 1E3D4 80042FD4 08010BFC */ j .L80042FF0
/* 1E3D8 80042FD8 005E1025 */ or $v0, $v0, $fp
.L80042FDC:
/* 1E3DC 80042FDC 8C820000 */ lw $v0, 0x0($a0)
/* 1E3E0 80042FE0 00571024 */ and $v0, $v0, $s7
/* 1E3E4 80042FE4 AC820000 */ sw $v0, 0x0($a0)
/* 1E3E8 80042FE8 8E020000 */ lw $v0, 0x0($s0)
/* 1E3EC 80042FEC 00571024 */ and $v0, $v0, $s7
.L80042FF0:
/* 1E3F0 80042FF0 AE020000 */ sw $v0, 0x0($s0)
.L80042FF4:
/* 1E3F4 80042FF4 8E820000 */ lw $v0, 0x0($s4)
/* 1E3F8 80042FF8 26310001 */ addiu $s1, $s1, 0x1
/* 1E3FC 80042FFC 0222102A */ slt $v0, $s1, $v0
/* 1E400 80043000 1440FFE0 */ bnez $v0, .L80042F84
/* 1E404 80043004 26520004 */ addiu $s2, $s2, 0x4
.L80043008:
/* 1E408 80043008 82C2001C */ lb $v0, 0x1C($s6)
/* 1E40C 8004300C 26730001 */ addiu $s3, $s3, 0x1
/* 1E410 80043010 0262102A */ slt $v0, $s3, $v0
/* 1E414 80043014 1440FFD4 */ bnez $v0, .L80042F68
/* 1E418 80043018 26B50004 */ addiu $s5, $s5, 0x4
.L8004301C:
/* 1E41C 8004301C 8FBF0034 */ lw $ra, 0x34($sp)
/* 1E420 80043020 8FBE0030 */ lw $fp, 0x30($sp)
/* 1E424 80043024 8FB7002C */ lw $s7, 0x2C($sp)
/* 1E428 80043028 8FB60028 */ lw $s6, 0x28($sp)
/* 1E42C 8004302C 8FB50024 */ lw $s5, 0x24($sp)
/* 1E430 80043030 8FB40020 */ lw $s4, 0x20($sp)
/* 1E434 80043034 8FB3001C */ lw $s3, 0x1C($sp)
/* 1E438 80043038 8FB20018 */ lw $s2, 0x18($sp)
/* 1E43C 8004303C 8FB10014 */ lw $s1, 0x14($sp)
/* 1E440 80043040 8FB00010 */ lw $s0, 0x10($sp)
/* 1E444 80043044 03E00008 */ jr $ra
/* 1E448 80043048 27BD0038 */ addiu $sp, $sp, 0x38
### DECOMPILED C INSTRUCTIONS:
void update_encounters_post_battle(void) {
EncounterStatus* currentEncounter = &gCurrentEncounter;
PlayerStatus* playerStatus = &gPlayerStatus;
PlayerData* playerData = &gPlayerData;
PartnerStatus* partnerStatus = &gPartnerStatus;
Encounter* encounter;
Evt* script;
Enemy* enemy;
s32 i, j;
s32 hasDefeatScript;
Npc* npc;
switch (gEncounterSubState) {
case ENCOUNTER_SUBSTATE_POST_BATTLE_INIT:
if (currentEncounter->unk_08 == 0) {
return;
}
currentEncounter->unk_08 = 0;
gPlayerStatus.blinkTimer = 0;
currentEncounter->scriptedBattle = FALSE;
func_800E97E4();
currentEncounter->dizzyAttackStatus = 0;
currentEncounter->unk_A4 = 0;
currentEncounter->unk_A8 = 0;
currentEncounter->unk_AC = 0;
currentEncounter->dizzyAttackDuration = 0;
currentEncounter->unk_A6 = 0;
currentEncounter->unk_AA = 0;
currentEncounter->unk_AE = 0;
if (D_8009A654 == TRUE) {
bgm_pop_battle_song();
}
currentEncounter->fadeOutAccel = 1;
currentEncounter->battleStartCountdown = 0;
D_8009A670 = FALSE;
gPlayerStatus.flags &= ~PS_FLAG_ENTERING_BATTLE;
if (currentEncounter->hitType == ENCOUNTER_TRIGGER_SPIN) {
D_8009A670 = TRUE;
}
currentEncounter->hitType = 0;
if (D_80077C40 == 0) {
partner_handle_after_battle();
}
D_8009A63C = FALSE;
if (partnerStatus->shouldResumeAbility) {
D_8009A63C = TRUE;
} else if (D_8009A670 == 0 &&
!(gPlayerStatus.flags & (PS_FLAG_JUMPING | PS_FLAG_FALLING)) &&
gPlayerStatus.actionState != ACTION_STATE_RIDE &&
gPlayerStatus.actionState != ACTION_STATE_USE_SPINNING_FLOWER) {
set_action_state(ACTION_STATE_IDLE);
}
switch (currentEncounter->battleOutcome) {
case OUTCOME_PLAYER_WON:
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_WON_CHECK_MERLEE_BONUS;
break;
case OUTCOME_PLAYER_LOST:
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_LOST_INIT;
break;
case OUTCOME_PLAYER_FLED:
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_FLED_INIT;
break;
case OUTCOME_4:
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_300;
break;
case OUTCOME_ENEMY_FLED:
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_ENEMY_FLED_INIT;
break;
}
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_WON_CHECK_MERLEE_BONUS:
if (currentEncounter->hasMerleeCoinBonus) {
if (get_coin_drop_amount(currentEncounter->currentEnemy) != 0) {
D_800A0BB0 = start_script(&EVS_MerleeDropCoins, EVT_PRIORITY_A, 0);
D_800A0BB0->groupFlags = 0;
D_800A0BB4 = D_800A0BB0->id;
} else {
playerData->merleeTurnCount = 0;
playerData->merleeCastsLeft++;
}
}
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_PLAY_NPC_DEFEAT;
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_PLAY_NPC_DEFEAT:
if (currentEncounter->hasMerleeCoinBonus && (get_coin_drop_amount(currentEncounter->currentEnemy) != 0)) {
currentEncounter->fadeOutAccel += 4;
currentEncounter->fadeOutAmount -= currentEncounter->fadeOutAccel;
if (currentEncounter->fadeOutAmount < 0) {
currentEncounter->fadeOutAmount = 0;
}
if (does_script_exist(D_800A0BB4)) {
break;
}
}
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if ((enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->flags & ENEMY_FLAG_DISABLE_AI) {
continue;
}
if (enemy->defeatBytecode != NULL) {
script = start_script_in_group(enemy->defeatBytecode, EVT_PRIORITY_A, 0, 0);
enemy->defeatScript = script;
enemy->defeatScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = 0;
currentEncounter->battleStartCountdown = 1;
} else {
script = start_script_in_group(&EVS_NpcDefeat, EVT_PRIORITY_A, 0, 0);
enemy->defeatScript = script;
enemy->defeatScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = 0;
}
}
if (!(currentEncounter->flags & ENCOUNTER_STATUS_FLAG_1) && !D_8009A63C && currentEncounter->battleStartCountdown == 0 && D_8009A670 == 0) {
suggest_player_anim_allow_backward(0x10032);
}
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_WON_WAIT;
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_WON_WAIT:
if (currentEncounter->fadeOutAmount == 0) {
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_WON_KILL;
} else {
currentEncounter->fadeOutAccel += 4;
currentEncounter->fadeOutAmount -= currentEncounter->fadeOutAccel;
if (currentEncounter->fadeOutAmount < 0) {
currentEncounter->fadeOutAmount = 0;
}
}
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_WON_KILL:
hasDefeatScript = FALSE;
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if ((enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->flags & ENEMY_FLAG_DISABLE_AI) {
continue;
}
if (does_script_exist(enemy->defeatScriptID)) {
hasDefeatScript = TRUE;
} else {
enemy->defeatScript = NULL;
}
}
if (!hasDefeatScript) {
if (!(currentEncounter->flags & ENCOUNTER_STATUS_FLAG_1) && !D_8009A63C && currentEncounter->battleStartCountdown == 1) {
suggest_player_anim_allow_backward(ANIM_Mario1_ThumbsUp);
}
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if (enemy->flags & ENEMY_FLAG_4) {
continue;
}
if ((enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (!(enemy->flags & ENEMY_FLAG_PASSIVE)) {
if (!(enemy->flags & ENEMY_FLAG_FLED)) {
set_defeated(currentEncounter->mapID, encounter->encounterID + i);
}
}
kill_enemy(enemy);
}
currentEncounter->unk_94 = 0;
if (!(currentEncounter->flags & ENCOUNTER_STATUS_FLAG_1) && !D_8009A63C && currentEncounter->battleStartCountdown == 1) {
currentEncounter->unk_94 = 30;
}
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_WON_TO_NEUTRAL;
}
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_WON_TO_NEUTRAL:
if (!(currentEncounter->flags & ENCOUNTER_STATUS_FLAG_2) && (gGameStatusPtr->stickX[0] != 0 || gGameStatusPtr->stickY[0] != 0)) {
currentEncounter->unk_94 = 0;
}
if (currentEncounter->unk_94 != 0) {
currentEncounter->unk_94--;
break;
}
for (i = 0; i < currentEncounter->numEncounters; i++) {
encounter = currentEncounter->encounterList[i];
if (encounter == NULL) {
continue;
}
for (j = 0; j < encounter->count; j++) {
enemy = encounter->enemy[j];
if (enemy == NULL || (enemy->flags & ENEMY_FLAG_DISABLE_AI)) {
continue;
}
if (enemy->aiScript != NULL) {
resume_all_script(enemy->aiScriptID);
}
if (enemy->auxScript != NULL) {
resume_all_script(enemy->auxScriptID);
}
}
}
currentEncounter->battleTriggerCooldown = 15;
enable_player_input();
partner_enable_input();
if (!D_8009A63C) {
suggest_player_anim_allow_backward(ANIM_Mario1_Idle);
}
set_screen_overlay_params_front(OVERLAY_NONE, -1.0f);
resume_all_group(EVT_GROUP_10);
gEncounterState = ENCOUNTER_STATE_NEUTRAL;
D_8009A678 = 1;
gEncounterSubState = ENCOUNTER_SUBSTATE_NEUTRAL;
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_FLED_INIT:
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if ((enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->flags & ENEMY_FLAG_DISABLE_AI) {
continue;
}
if (enemy->defeatBytecode != NULL) {
script = start_script(enemy->defeatBytecode, EVT_PRIORITY_A, 0);
enemy->defeatScript = script;
enemy->defeatScriptID = script->id;
enemy->aiFlags |= 1;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
}
}
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_FLED_WAIT;
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_FLED_WAIT:
if (currentEncounter->fadeOutAmount == 0) {
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_102;
} else {
currentEncounter->fadeOutAccel += 4;
currentEncounter->fadeOutAmount -= currentEncounter->fadeOutAccel;
if (currentEncounter->fadeOutAmount < 0) {
currentEncounter->fadeOutAmount = 0;
}
}
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_102:
encounter = currentEncounter->currentEncounter;
hasDefeatScript = FALSE;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if (!(enemy->flags & ENEMY_FLAG_DISABLE_AI)) {
if (does_script_exist(enemy->defeatScriptID)) {
hasDefeatScript = TRUE;
} else {
enemy->defeatScript = NULL;
}
}
}
if (!hasDefeatScript) {
for (i = 0; i < currentEncounter->numEncounters; i++) {
encounter = currentEncounter->encounterList[i];
if (encounter == NULL) {
continue;
}
for (j = 0; j < encounter->count; j++) {
enemy = encounter->enemy[j];
if (enemy == NULL || (enemy->flags & ENEMY_FLAG_DISABLE_AI)) {
continue;
}
if (enemy->aiScript != NULL) {
resume_all_script(enemy->aiScriptID);
}
if (enemy->auxScript != NULL) {
resume_all_script(enemy->auxScriptID);
}
}
}
enemy = currentEncounter->currentEnemy;
encounter = currentEncounter->currentEncounter;
if (!(enemy->flags & ENEMY_FLAG_40000)) {
enemy->aiSuspendTime = 45;
playerStatus->blinkTimer = 45;
for (j = 0; j < encounter->count; j++) {
enemy = encounter->enemy[j];
if (enemy == NULL) {
continue;
}
if (enemy->flags & ENEMY_FLAG_DISABLE_AI) {
continue;
}
if (enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) {
continue;
}
enemy->aiSuspendTime = 45;
playerStatus->blinkTimer = 45;
}
}
enemy = currentEncounter->currentEnemy;
if (!(currentEncounter->flags & ENCOUNTER_STATUS_FLAG_4)) {
script = start_script(&EVS_FleeBattleDrops, EVT_PRIORITY_A, 0);
enemy->defeatScript = script;
enemy->defeatScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
}
currentEncounter->battleTriggerCooldown = 45;
playerStatus->blinkTimer = 45;
enable_player_input();
partner_enable_input();
set_screen_overlay_params_front(OVERLAY_NONE, -1.0f);
if (!D_8009A63C) {
currentEncounter->unk_94 = 15;
} else {
currentEncounter->unk_94 = 0;
}
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_103;
}
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_103:
if (currentEncounter->unk_94 != 0) {
currentEncounter->unk_94--;
if (gGameStatusPtr->currentButtons[0] == 0 && gGameStatusPtr->stickX[0] == 0 && gGameStatusPtr->stickY[0] == 0) {
break;
}
}
if (!D_8009A63C && playerStatus->anim == ANIM_MarioB3_Hustled) {
suggest_player_anim_allow_backward(ANIM_Mario1_Idle);
}
resume_all_group(EVT_GROUP_10);
gEncounterState = ENCOUNTER_STATE_NEUTRAL;
D_8009A678 = 1;
gEncounterSubState = ENCOUNTER_SUBSTATE_NEUTRAL;
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_LOST_INIT:
suggest_player_anim_allow_backward(ANIM_MarioW2_LayingDown);
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if ((enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->flags & ENEMY_FLAG_DISABLE_AI) {
continue;
}
if (enemy->defeatBytecode != NULL) {
script = start_script(enemy->defeatBytecode, EVT_PRIORITY_A, 0);
enemy->defeatScript = script;
enemy->defeatScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
}
}
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_LOST_WAIT;
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_LOST_WAIT:
if (currentEncounter->fadeOutAmount == 0) {
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_202;
} else {
currentEncounter->fadeOutAccel += 4;
currentEncounter->fadeOutAmount -= currentEncounter->fadeOutAccel;
if (currentEncounter->fadeOutAmount < 0) {
currentEncounter->fadeOutAmount = 0;
}
}
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_202:
hasDefeatScript = FALSE;
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if (!(enemy->flags & ENEMY_FLAG_DISABLE_AI)) {
if (does_script_exist(enemy->defeatScriptID)) {
hasDefeatScript = TRUE;
} else {
enemy->defeatScript = NULL;
}
}
}
if (!hasDefeatScript) {
for (i = 0; i < currentEncounter->numEncounters; i++) {
encounter = currentEncounter->encounterList[i];
if (encounter == NULL) {
continue;
}
for (j = 0; j < encounter->count; j++) {
enemy = encounter->enemy[j];
if (enemy == NULL || (enemy->flags & ENEMY_FLAG_DISABLE_AI)) {
continue;
}
if (enemy->aiScript != NULL) {
resume_all_script(enemy->aiScriptID);
}
if (enemy->auxScript != NULL) {
resume_all_script(enemy->auxScriptID);
}
}
}
enable_player_input();
partner_enable_input();
set_screen_overlay_params_front(OVERLAY_NONE, -1.0f);
currentEncounter->unk_94 = 15;
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_LOST_TO_NEUTRAL;
}
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_LOST_TO_NEUTRAL:
if (currentEncounter->unk_94 != 0) {
currentEncounter->unk_94--;
if (gGameStatusPtr->currentButtons[0] == 0 && gGameStatusPtr->stickX[0] == 0 && gGameStatusPtr->stickY[0] == 0) {
break;
}
}
resume_all_group(EVT_GROUP_10);
gEncounterState = ENCOUNTER_STATE_NEUTRAL;
D_8009A678 = 1;
gEncounterSubState = ENCOUNTER_SUBSTATE_NEUTRAL;
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_300:
for (i = 0; i < currentEncounter->numEncounters; i++) {
encounter = currentEncounter->encounterList[i];
if (encounter == NULL) {
continue;
}
for (j = 0; j < encounter->count; j++) {
enemy = encounter->enemy[j];
if (enemy == NULL || (enemy->flags & ENEMY_FLAG_DISABLE_AI)) {
continue;
}
if (enemy->aiScript != NULL) {
resume_all_script(enemy->aiScriptID);
}
if (enemy->auxScript != NULL) {
resume_all_script(enemy->auxScriptID);
}
}
}
enable_player_input();
partner_enable_input();
set_screen_overlay_params_front(OVERLAY_NONE, -1.0f);
resume_all_group(EVT_GROUP_10);
gEncounterState = ENCOUNTER_STATE_NEUTRAL;
D_8009A678 = 1;
gEncounterSubState = ENCOUNTER_SUBSTATE_NEUTRAL;
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_ENEMY_FLED_INIT:
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if ((enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) && enemy != currentEncounter->currentEnemy) {
continue;
}
if (enemy->flags & ENEMY_FLAG_DISABLE_AI) {
continue;
}
if (enemy->defeatBytecode != NULL) {
script = start_script(enemy->defeatBytecode, EVT_PRIORITY_A, 0);
enemy->defeatScript = script;
enemy->defeatScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
}
}
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_ENEMY_FLED_WAIT;
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_ENEMY_FLED_WAIT:
if (currentEncounter->fadeOutAmount == 0) {
gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_ENEMY_FLED_TO_NEUTRAL;
} else {
currentEncounter->fadeOutAccel += 4;
currentEncounter->fadeOutAmount -= currentEncounter->fadeOutAccel;
if (currentEncounter->fadeOutAmount < 0) {
currentEncounter->fadeOutAmount = 0;
}
}
break;
case ENCOUNTER_SUBSTATE_POST_BATTLE_ENEMY_FLED_TO_NEUTRAL:
hasDefeatScript = FALSE;
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if (!(enemy->flags & ENEMY_FLAG_DISABLE_AI)) {
if (does_script_exist(enemy->defeatScriptID)) {
hasDefeatScript = TRUE;
} else {
enemy->defeatScript = NULL;
}
}
}
if (!hasDefeatScript) {
for (i = 0; i < currentEncounter->numEncounters; i++) {
encounter = currentEncounter->encounterList[i];
if (encounter == NULL) {
continue;
}
for (j = 0; j < encounter->count; j++) {
enemy = encounter->enemy[j];
if (enemy == NULL || (enemy->flags & ENEMY_FLAG_DISABLE_AI)) {
continue;
}
if (enemy->aiScript != NULL) {
resume_all_script(enemy->aiScriptID);
}
if (enemy->auxScript != NULL) {
resume_all_script(enemy->auxScriptID);
}
}
}
enemy = currentEncounter->currentEnemy;
if (!(enemy->flags & ENEMY_FLAG_4)) {
encounter = currentEncounter->currentEncounter;
enemy->aiSuspendTime = 45;
playerStatus->blinkTimer = 45;
for (j = 0; j < encounter->count; j++) {
enemy = encounter->enemy[j];
if (enemy == NULL) {
continue;
}
if (enemy->flags & ENEMY_FLAG_DISABLE_AI) {
continue;
}
if (enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) {
continue;
}
enemy->aiSuspendTime = 45;
playerStatus->blinkTimer = 45;
}
}
currentEncounter->battleTriggerCooldown = 45;
enable_player_input();
partner_enable_input();
set_screen_overlay_params_front(OVERLAY_NONE, -1.0f);
resume_all_group(EVT_GROUP_10);
gEncounterState = ENCOUNTER_STATE_NEUTRAL;
D_8009A678 = 1;
gEncounterSubState = ENCOUNTER_SUBSTATE_NEUTRAL;
}
break;
}
for (i = 0; i < currentEncounter->numEncounters; i++) {
encounter = currentEncounter->encounterList[i];
if (encounter == NULL) {
continue;
}
for (j = 0; j < encounter->count; j++) {
enemy = encounter->enemy[j];
if (enemy == NULL || (enemy->flags & ENEMY_FLAG_DISABLE_AI)) {
continue;
}
npc = get_npc_unsafe(enemy->npcID);
if (enemy->aiSuspendTime != 0) {
if (enemy->aiSuspendTime & 1) {
npc->flags |= NPC_FLAG_SUSPENDED;
enemy->flags |= ENEMY_FLAG_SUSPENDED;
} else {
npc->flags &= ~NPC_FLAG_SUSPENDED;
enemy->flags &= ~ENEMY_FLAG_SUSPENDED;
}
}
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_802A2C84_7AA624
/* 417A14 802A2C84 3C02802B */ lui $v0, %hi(battle_menu_moveState)
/* 417A18 802A2C88 9042D108 */ lbu $v0, %lo(battle_menu_moveState)($v0)
/* 417A1C 802A2C8C 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 417A20 802A2C90 AFB1002C */ sw $s1, 0x2C($sp)
/* 417A24 802A2C94 3C11800E */ lui $s1, %hi(gBattleStatus)
/* 417A28 802A2C98 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus)
/* 417A2C 802A2C9C AFBF0044 */ sw $ra, 0x44($sp)
/* 417A30 802A2CA0 AFB60040 */ sw $s6, 0x40($sp)
/* 417A34 802A2CA4 AFB5003C */ sw $s5, 0x3C($sp)
/* 417A38 802A2CA8 AFB40038 */ sw $s4, 0x38($sp)
/* 417A3C 802A2CAC AFB30034 */ sw $s3, 0x34($sp)
/* 417A40 802A2CB0 AFB20030 */ sw $s2, 0x30($sp)
/* 417A44 802A2CB4 24420002 */ addiu $v0, $v0, 0x2
/* 417A48 802A2CB8 00021600 */ sll $v0, $v0, 24
/* 417A4C 802A2CBC 00021E03 */ sra $v1, $v0, 24
/* 417A50 802A2CC0 2C62002D */ sltiu $v0, $v1, 0x2D
/* 417A54 802A2CC4 104003E9 */ beqz $v0, .L802A3C6C_7AB60C
/* 417A58 802A2CC8 AFB00028 */ sw $s0, 0x28($sp)
/* 417A5C 802A2CCC 00031080 */ sll $v0, $v1, 2
/* 417A60 802A2CD0 3C01802B */ lui $at, %hi(jtbl_802AB808_7B31A8)
/* 417A64 802A2CD4 00220821 */ addu $at, $at, $v0
/* 417A68 802A2CD8 8C22B808 */ lw $v0, %lo(jtbl_802AB808_7B31A8)($at)
/* 417A6C 802A2CDC 00400008 */ jr $v0
/* 417A70 802A2CE0 00000000 */ nop
glabel .L802A2CE4_7AA684
/* 417A74 802A2CE4 3C05802B */ lui $a1, %hi(battle_menu_moveScrollLine)
/* 417A78 802A2CE8 80A5D10C */ lb $a1, %lo(battle_menu_moveScrollLine)($a1)
/* 417A7C 802A2CEC 3C04802B */ lui $a0, %hi(battle_menu_moveCursorPos)
/* 417A80 802A2CF0 8084D109 */ lb $a0, %lo(battle_menu_moveCursorPos)($a0)
/* 417A84 802A2CF4 24020014 */ addiu $v0, $zero, 0x14
/* 417A88 802A2CF8 3C01802B */ lui $at, %hi(BattleMenu_Moves_PosX)
/* 417A8C 802A2CFC A422D1F0 */ sh $v0, %lo(BattleMenu_Moves_PosX)($at)
/* 417A90 802A2D00 24020044 */ addiu $v0, $zero, 0x44
/* 417A94 802A2D04 3C01802B */ lui $at, %hi(BattleMenu_Moves_PosY)
/* 417A98 802A2D08 A422D1F2 */ sh $v0, %lo(BattleMenu_Moves_PosY)($at)
/* 417A9C 802A2D0C 00051823 */ negu $v1, $a1
D_802A2D10_7AA6B0:
/* 417AA0 802A2D10 00031040 */ sll $v0, $v1, 1
/* 417AA4 802A2D14 00431021 */ addu $v0, $v0, $v1
/* 417AA8 802A2D18 00021080 */ sll $v0, $v0, 2
/* 417AAC 802A2D1C 00431021 */ addu $v0, $v0, $v1
/* 417AB0 802A2D20 00852023 */ subu $a0, $a0, $a1
/* 417AB4 802A2D24 3C01802B */ lui $at, %hi(battle_menu_moveScrollOffset)
/* 417AB8 802A2D28 A422D110 */ sh $v0, %lo(battle_menu_moveScrollOffset)($at)
/* 417ABC 802A2D2C 00041040 */ sll $v0, $a0, 1
/* 417AC0 802A2D30 00441021 */ addu $v0, $v0, $a0
/* 417AC4 802A2D34 00021080 */ sll $v0, $v0, 2
/* 417AC8 802A2D38 3C05802B */ lui $a1, %hi(BattleMenu_Moves_OptionCount)
/* 417ACC 802A2D3C 24A5D4A4 */ addiu $a1, $a1, %lo(BattleMenu_Moves_OptionCount)
/* 417AD0 802A2D40 8CA30000 */ lw $v1, 0x0($a1)
/* 417AD4 802A2D44 00441021 */ addu $v0, $v0, $a0
/* 417AD8 802A2D48 3C01802B */ lui $at, %hi(D_802AD112)
/* 417ADC 802A2D4C A422D112 */ sh $v0, %lo(D_802AD112)($at)
/* 417AE0 802A2D50 18600009 */ blez $v1, .L802A2D78_7AA718
/* 417AE4 802A2D54 0000802D */ daddu $s0, $zero, $zero
/* 417AE8 802A2D58 3C03802B */ lui $v1, %hi(BattleMenu_Moves_OptionIndexMap)
D_802A2D5C_7AA6FC:
/* 417AEC 802A2D5C 2463D1F8 */ addiu $v1, $v1, %lo(BattleMenu_Moves_OptionIndexMap)
.L802A2D60_7AA700:
/* 417AF0 802A2D60 AC700000 */ sw $s0, 0x0($v1)
/* 417AF4 802A2D64 8CA20000 */ lw $v0, 0x0($a1)
/* 417AF8 802A2D68 26100001 */ addiu $s0, $s0, 0x1
/* 417AFC 802A2D6C 0202102A */ slt $v0, $s0, $v0
/* 417B00 802A2D70 1440FFFB */ bnez $v0, .L802A2D60_7AA700
/* 417B04 802A2D74 24630004 */ addiu $v1, $v1, 0x4
.L802A2D78_7AA718:
/* 417B08 802A2D78 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 417B0C 802A2D7C 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 417B10 802A2D80 14400042 */ bnez $v0, .L802A2E8C_7AA82C
/* 417B14 802A2D84 00000000 */ nop
/* 417B18 802A2D88 3C03802B */ lui $v1, %hi(BattleMenu_Moves_OptionCount)
/* 417B1C 802A2D8C 8C63D4A4 */ lw $v1, %lo(BattleMenu_Moves_OptionCount)($v1)
/* 417B20 802A2D90 2462FFFF */ addiu $v0, $v1, -0x1
/* 417B24 802A2D94 1840003D */ blez $v0, .L802A2E8C_7AA82C
/* 417B28 802A2D98 0000802D */ daddu $s0, $zero, $zero
/* 417B2C 802A2D9C 0060882D */ daddu $s1, $v1, $zero
D_802A2DA0_7AA740:
/* 417B30 802A2DA0 3C0E802B */ lui $t6, %hi(BattleMenu_Moves_OptionSortPriority)
/* 417B34 802A2DA4 25CED5D0 */ addiu $t6, $t6, %lo(BattleMenu_Moves_OptionSortPriority)
/* 417B38 802A2DA8 3C0D802B */ lui $t5, %hi(battle_menu_moveOptionDisplayCosts)
/* 417B3C 802A2DAC 25ADD320 */ addiu $t5, $t5, %lo(battle_menu_moveOptionDisplayCosts)
jtbl_802A2DB0_7AA750:
/* 417B40 802A2DB0 3C0C802B */ lui $t4, %hi(battle_menu_moveOptionBPCosts)
/* 417B44 802A2DB4 258CD440 */ addiu $t4, $t4, %lo(battle_menu_moveOptionBPCosts)
/* 417B48 802A2DB8 3C0F802B */ lui $t7, %hi(BattleMenu_Moves_OptionIndexMap)
/* 417B4C 802A2DBC 25EFD1F8 */ addiu $t7, $t7, %lo(BattleMenu_Moves_OptionIndexMap)
/* 417B50 802A2DC0 01E0502D */ daddu $t2, $t7, $zero
.L802A2DC4_7AA764:
/* 417B54 802A2DC4 26090001 */ addiu $t1, $s0, 0x1
D_802A2DC8_7AA768:
/* 417B58 802A2DC8 0131102A */ slt $v0, $t1, $s1
/* 417B5C 802A2DCC 10400028 */ beqz $v0, .L802A2E70_7AA810
D_802A2DD0_7AA770:
/* 417B60 802A2DD0 00091080 */ sll $v0, $t1, 2
/* 417B64 802A2DD4 0140402D */ daddu $t0, $t2, $zero
D_802A2DD8_7AA778:
/* 417B68 802A2DD8 3C0B802B */ lui $t3, %hi(BattleMenu_Moves_OptionCount)
/* 417B6C 802A2DDC 8D6BD4A4 */ lw $t3, %lo(BattleMenu_Moves_OptionCount)($t3)
/* 417B70 802A2DE0 004F3821 */ addu $a3, $v0, $t7
.L802A2DE4_7AA784:
/* 417B74 802A2DE4 8D060000 */ lw $a2, 0x0($t0)
D_802A2DE8_7AA788:
/* 417B78 802A2DE8 8CE40000 */ lw $a0, 0x0($a3)
D_802A2DEC_7AA78C:
/* 417B7C 802A2DEC 00CE1021 */ addu $v0, $a2, $t6
D_802A2DF0_7AA790:
/* 417B80 802A2DF0 008E1821 */ addu $v1, $a0, $t6
D_802A2DF4_7AA794:
/* 417B84 802A2DF4 80450000 */ lb $a1, 0x0($v0)
D_802A2DF8_7AA798:
/* 417B88 802A2DF8 80630000 */ lb $v1, 0x0($v1)
D_802A2DFC_7AA79C:
/* 417B8C 802A2DFC 00A3102A */ slt $v0, $a1, $v1
D_802A2E00_7AA7A0:
/* 417B90 802A2E00 54400018 */ bnel $v0, $zero, .L802A2E64_7AA804
/* 417B94 802A2E04 25290001 */ addiu $t1, $t1, 0x1
/* 417B98 802A2E08 14A30011 */ bne $a1, $v1, .L802A2E50_7AA7F0
/* 417B9C 802A2E0C 00063080 */ sll $a2, $a2, 2
/* 417BA0 802A2E10 00CD1821 */ addu $v1, $a2, $t5
/* 417BA4 802A2E14 00042080 */ sll $a0, $a0, 2
/* 417BA8 802A2E18 008D1021 */ addu $v0, $a0, $t5
/* 417BAC 802A2E1C 8C630000 */ lw $v1, 0x0($v1)
/* 417BB0 802A2E20 8C450000 */ lw $a1, 0x0($v0)
/* 417BB4 802A2E24 0065102A */ slt $v0, $v1, $a1
/* 417BB8 802A2E28 5440000E */ bnel $v0, $zero, .L802A2E64_7AA804
D_802A2E2C_7AA7CC:
/* 417BBC 802A2E2C 25290001 */ addiu $t1, $t1, 0x1
/* 417BC0 802A2E30 14650007 */ bne $v1, $a1, .L802A2E50_7AA7F0
/* 417BC4 802A2E34 00CC1021 */ addu $v0, $a2, $t4
/* 417BC8 802A2E38 008C2021 */ addu $a0, $a0, $t4
/* 417BCC 802A2E3C 8C430000 */ lw $v1, 0x0($v0)
/* 417BD0 802A2E40 8C820000 */ lw $v0, 0x0($a0)
/* 417BD4 802A2E44 0062182A */ slt $v1, $v1, $v0
/* 417BD8 802A2E48 54600006 */ bnel $v1, $zero, .L802A2E64_7AA804
/* 417BDC 802A2E4C 25290001 */ addiu $t1, $t1, 0x1
.L802A2E50_7AA7F0:
/* 417BE0 802A2E50 8CE20000 */ lw $v0, 0x0($a3)
/* 417BE4 802A2E54 8D030000 */ lw $v1, 0x0($t0)
/* 417BE8 802A2E58 AD020000 */ sw $v0, 0x0($t0)
/* 417BEC 802A2E5C ACE30000 */ sw $v1, 0x0($a3)
/* 417BF0 802A2E60 25290001 */ addiu $t1, $t1, 0x1
.L802A2E64_7AA804:
/* 417BF4 802A2E64 012B102A */ slt $v0, $t1, $t3
/* 417BF8 802A2E68 1440FFDE */ bnez $v0, .L802A2DE4_7AA784
/* 417BFC 802A2E6C 24E70004 */ addiu $a3, $a3, 0x4
.L802A2E70_7AA810:
/* 417C00 802A2E70 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount)
/* 417C04 802A2E74 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0)
/* 417C08 802A2E78 26100001 */ addiu $s0, $s0, 0x1
/* 417C0C 802A2E7C 2442FFFF */ addiu $v0, $v0, -0x1
/* 417C10 802A2E80 0202102A */ slt $v0, $s0, $v0
/* 417C14 802A2E84 1440FFCF */ bnez $v0, .L802A2DC4_7AA764
/* 417C18 802A2E88 254A0004 */ addiu $t2, $t2, 0x4
.L802A2E8C_7AA82C:
/* 417C1C 802A2E8C 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount)
/* 417C20 802A2E90 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0)
/* 417C24 802A2E94 1840001C */ blez $v0, .L802A2F08_7AA8A8
/* 417C28 802A2E98 0000802D */ daddu $s0, $zero, $zero
/* 417C2C 802A2E9C 3C14802B */ lui $s4, %hi(battle_menu_moveOptionIconScripts)
/* 417C30 802A2EA0 2694D260 */ addiu $s4, $s4, %lo(battle_menu_moveOptionIconScripts)
/* 417C34 802A2EA4 3C13802B */ lui $s3, %hi(BattleMenu_Moves_OptionIDs)
/* 417C38 802A2EA8 2673D128 */ addiu $s3, $s3, %lo(BattleMenu_Moves_OptionIDs)
/* 417C3C 802A2EAC 3C11802B */ lui $s1, %hi(BattleMenu_Moves_OptionIndexMap)
D_802A2EB0_7AA850:
/* 417C40 802A2EB0 2631D1F8 */ addiu $s1, $s1, %lo(BattleMenu_Moves_OptionIndexMap)
.L802A2EB4_7AA854:
/* 417C44 802A2EB4 8E220000 */ lw $v0, 0x0($s1)
/* 417C48 802A2EB8 26310004 */ addiu $s1, $s1, 0x4
/* 417C4C 802A2EBC 00021080 */ sll $v0, $v0, 2
D_802A2EC0_7AA860:
/* 417C50 802A2EC0 00541021 */ addu $v0, $v0, $s4
/* 417C54 802A2EC4 8C440000 */ lw $a0, 0x0($v0)
/* 417C58 802A2EC8 0C050529 */ jal hud_element_create
/* 417C5C 802A2ECC 26100001 */ addiu $s0, $s0, 0x1
/* 417C60 802A2ED0 0040902D */ daddu $s2, $v0, $zero
/* 417C64 802A2ED4 3C053EE6 */ lui $a1, (0x3EE66666 >> 16)
/* 417C68 802A2ED8 34A56666 */ ori $a1, $a1, (0x3EE66666 & 0xFFFF)
/* 417C6C 802A2EDC 0240202D */ daddu $a0, $s2, $zero
/* 417C70 802A2EE0 0C051308 */ jal hud_element_set_scale
/* 417C74 802A2EE4 AE720000 */ sw $s2, 0x0($s3)
/* 417C78 802A2EE8 0240202D */ daddu $a0, $s2, $zero
/* 417C7C 802A2EEC 0C051280 */ jal hud_element_set_flags
/* 417C80 802A2EF0 34058080 */ ori $a1, $zero, 0x8080
/* 417C84 802A2EF4 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount)
/* 417C88 802A2EF8 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0)
/* 417C8C 802A2EFC 0202102A */ slt $v0, $s0, $v0
/* 417C90 802A2F00 1440FFEC */ bnez $v0, .L802A2EB4_7AA854
/* 417C94 802A2F04 26730004 */ addiu $s3, $s3, 0x4
.L802A2F08_7AA8A8:
/* 417C98 802A2F08 3C048010 */ lui $a0, %hi(HES_AnimatedHandPointer)
/* 417C9C 802A2F0C 24844A28 */ addiu $a0, $a0, %lo(HES_AnimatedHandPointer)
/* 417CA0 802A2F10 0C050529 */ jal hud_element_create
/* 417CA4 802A2F14 00000000 */ nop
/* 417CA8 802A2F18 0040902D */ daddu $s2, $v0, $zero
/* 417CAC 802A2F1C 0240202D */ daddu $a0, $s2, $zero
/* 417CB0 802A2F20 3C052000 */ lui $a1, (0x20000080 >> 16)
/* 417CB4 802A2F24 3C01802B */ lui $at, %hi(BattleMenu_Moves_CursorID)
/* 417CB8 802A2F28 AC32D118 */ sw $s2, %lo(BattleMenu_Moves_CursorID)($at)
/* 417CBC 802A2F2C 0C051280 */ jal hud_element_set_flags
D_802A2F30_7AA8D0:
/* 417CC0 802A2F30 34A50080 */ ori $a1, $a1, (0x20000080 & 0xFFFF)
/* 417CC4 802A2F34 3C11802B */ lui $s1, %hi(BattleMenu_Moves_PosX)
/* 417CC8 802A2F38 2631D1F0 */ addiu $s1, $s1, %lo(BattleMenu_Moves_PosX)
/* 417CCC 802A2F3C 3C10802B */ lui $s0, %hi(BattleMenu_Moves_PosY)
/* 417CD0 802A2F40 2610D1F2 */ addiu $s0, $s0, %lo(BattleMenu_Moves_PosY)
/* 417CD4 802A2F44 86250000 */ lh $a1, 0x0($s1)
/* 417CD8 802A2F48 86060000 */ lh $a2, 0x0($s0)
/* 417CDC 802A2F4C 0C051261 */ jal hud_element_set_render_pos
D_802A2F50_7AA8F0:
/* 417CE0 802A2F50 0240202D */ daddu $a0, $s2, $zero
/* 417CE4 802A2F54 3C048010 */ lui $a0, %hi(HES_GreenArrowUp)
/* 417CE8 802A2F58 248477E4 */ addiu $a0, $a0, %lo(HES_GreenArrowUp)
/* 417CEC 802A2F5C 0C050529 */ jal hud_element_create
/* 417CF0 802A2F60 00000000 */ nop
/* 417CF4 802A2F64 0040902D */ daddu $s2, $v0, $zero
D_802A2F68_7AA908:
/* 417CF8 802A2F68 0240202D */ daddu $a0, $s2, $zero
/* 417CFC 802A2F6C 3C052000 */ lui $a1, (0x20000080 >> 16)
/* 417D00 802A2F70 3C01802B */ lui $at, %hi(BattleMenu_Moves_UpArrowID)
/* 417D04 802A2F74 AC32D11C */ sw $s2, %lo(BattleMenu_Moves_UpArrowID)($at)
/* 417D08 802A2F78 0C051280 */ jal hud_element_set_flags
/* 417D0C 802A2F7C 34A50080 */ ori $a1, $a1, (0x20000080 & 0xFFFF)
/* 417D10 802A2F80 0240202D */ daddu $a0, $s2, $zero
/* 417D14 802A2F84 86250000 */ lh $a1, 0x0($s1)
/* 417D18 802A2F88 86060000 */ lh $a2, 0x0($s0)
/* 417D1C 802A2F8C 24A50027 */ addiu $a1, $a1, 0x27
D_802A2F90_7AA930:
/* 417D20 802A2F90 0C051261 */ jal hud_element_set_render_pos
/* 417D24 802A2F94 24C6FFF9 */ addiu $a2, $a2, -0x7
/* 417D28 802A2F98 3C048010 */ lui $a0, %hi(HES_GreenArrowDown)
/* 417D2C 802A2F9C 24847798 */ addiu $a0, $a0, %lo(HES_GreenArrowDown)
/* 417D30 802A2FA0 0C050529 */ jal hud_element_create
/* 417D34 802A2FA4 00000000 */ nop
/* 417D38 802A2FA8 0040902D */ daddu $s2, $v0, $zero
/* 417D3C 802A2FAC 0240202D */ daddu $a0, $s2, $zero
/* 417D40 802A2FB0 3C052000 */ lui $a1, (0x20000080 >> 16)
/* 417D44 802A2FB4 3C01802B */ lui $at, %hi(BattleMenu_Moves_DownArrowID)
/* 417D48 802A2FB8 AC32D120 */ sw $s2, %lo(BattleMenu_Moves_DownArrowID)($at)
/* 417D4C 802A2FBC 0C051280 */ jal hud_element_set_flags
/* 417D50 802A2FC0 34A50080 */ ori $a1, $a1, (0x20000080 & 0xFFFF)
/* 417D54 802A2FC4 0240202D */ daddu $a0, $s2, $zero
/* 417D58 802A2FC8 86250000 */ lh $a1, 0x0($s1)
/* 417D5C 802A2FCC 86060000 */ lh $a2, 0x0($s0)
/* 417D60 802A2FD0 24A50027 */ addiu $a1, $a1, 0x27
/* 417D64 802A2FD4 0C051261 */ jal hud_element_set_render_pos
/* 417D68 802A2FD8 24C6004E */ addiu $a2, $a2, 0x4E
/* 417D6C 802A2FDC 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 417D70 802A2FE0 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 417D74 802A2FE4 1440000A */ bnez $v0, .L802A3010_7AA9B0
/* 417D78 802A2FE8 00000000 */ nop
/* 417D7C 802A2FEC 3C048011 */ lui $a0, %hi(HES_StatusFlower)
/* 417D80 802A2FF0 24848538 */ addiu $a0, $a0, %lo(HES_StatusFlower)
/* 417D84 802A2FF4 0C050529 */ jal hud_element_create
/* 417D88 802A2FF8 00000000 */ nop
/* 417D8C 802A2FFC 0040902D */ daddu $s2, $v0, $zero
/* 417D90 802A3000 3C01802B */ lui $at, %hi(BattleMenu_Moves_TitleID)
/* 417D94 802A3004 AC22D188 */ sw $v0, %lo(BattleMenu_Moves_TitleID)($at)
/* 417D98 802A3008 080A8C0F */ j .L802A303C_7AA9DC
/* 417D9C 802A300C 0240202D */ daddu $a0, $s2, $zero
.L802A3010_7AA9B0:
/* 417DA0 802A3010 3C048011 */ lui $a0, %hi(HES_MenuStarPower)
/* 417DA4 802A3014 24848974 */ addiu $a0, $a0, %lo(HES_MenuStarPower)
/* 417DA8 802A3018 0C050529 */ jal hud_element_create
/* 417DAC 802A301C 00000000 */ nop
/* 417DB0 802A3020 0040902D */ daddu $s2, $v0, $zero
/* 417DB4 802A3024 3C053F40 */ lui $a1, (0x3F400000 >> 16)
/* 417DB8 802A3028 3C01802B */ lui $at, %hi(BattleMenu_Moves_TitleID)
/* 417DBC 802A302C AC32D188 */ sw $s2, %lo(BattleMenu_Moves_TitleID)($at)
/* 417DC0 802A3030 0C051308 */ jal hud_element_set_scale
/* 417DC4 802A3034 0240202D */ daddu $a0, $s2, $zero
/* 417DC8 802A3038 0240202D */ daddu $a0, $s2, $zero
.L802A303C_7AA9DC:
/* 417DCC 802A303C 0C051280 */ jal hud_element_set_flags
/* 417DD0 802A3040 24050080 */ addiu $a1, $zero, 0x80
D_802A3044_7AA9E4:
/* 417DD4 802A3044 0240202D */ daddu $a0, $s2, $zero
D_802A3048_7AA9E8:
/* 417DD8 802A3048 3C05802B */ lui $a1, %hi(BattleMenu_Moves_PosX)
/* 417DDC 802A304C 84A5D1F0 */ lh $a1, %lo(BattleMenu_Moves_PosX)($a1)
/* 417DE0 802A3050 3C06802B */ lui $a2, %hi(BattleMenu_Moves_PosY)
/* 417DE4 802A3054 84C6D1F2 */ lh $a2, %lo(BattleMenu_Moves_PosY)($a2)
/* 417DE8 802A3058 0C051261 */ jal hud_element_set_render_pos
/* 417DEC 802A305C 24A50038 */ addiu $a1, $a1, 0x38
/* 417DF0 802A3060 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount)
/* 417DF4 802A3064 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0)
/* 417DF8 802A3068 1840004B */ blez $v0, .L802A3198_7AAB38
/* 417DFC 802A306C 0000802D */ daddu $s0, $zero, $zero
/* 417E00 802A3070 24160001 */ addiu $s6, $zero, 0x1
/* 417E04 802A3074 3C13802B */ lui $s3, %hi(BattleMenu_Moves_OptionCostUnitIDs)
/* 417E08 802A3078 2673D190 */ addiu $s3, $s3, %lo(BattleMenu_Moves_OptionCostUnitIDs)
/* 417E0C 802A307C 0260A82D */ daddu $s5, $s3, $zero
D_802A3080_7AAA20:
/* 417E10 802A3080 0200882D */ daddu $s1, $s0, $zero
/* 417E14 802A3084 3C14802B */ lui $s4, %hi(battle_menu_moveOptionDisplayCostReductionColors)
/* 417E18 802A3088 2694D3E0 */ addiu $s4, $s4, %lo(battle_menu_moveOptionDisplayCostReductionColors)
.L802A308C_7AAA2C:
/* 417E1C 802A308C 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 417E20 802A3090 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 417E24 802A3094 14400014 */ bnez $v0, .L802A30E8_7AAA88
/* 417E28 802A3098 00000000 */ nop
/* 417E2C 802A309C 8E820000 */ lw $v0, 0x0($s4)
/* 417E30 802A30A0 10400005 */ beqz $v0, .L802A30B8_7AAA58
/* 417E34 802A30A4 00000000 */ nop
/* 417E38 802A30A8 10560007 */ beq $v0, $s6, .L802A30C8_7AAA68
/* 417E3C 802A30AC 00000000 */ nop
/* 417E40 802A30B0 080A8C36 */ j .L802A30D8_7AAA78
/* 417E44 802A30B4 00000000 */ nop
.L802A30B8_7AAA58:
/* 417E48 802A30B8 3C048010 */ lui $a0, %hi(HES_FPCost)
/* 417E4C 802A30BC 24847638 */ addiu $a0, $a0, %lo(HES_FPCost)
/* 417E50 802A30C0 080A8C47 */ j .L802A311C_7AAABC
/* 417E54 802A30C4 00000000 */ nop
.L802A30C8_7AAA68:
/* 417E58 802A30C8 3C048010 */ lui $a0, %hi(HES_FPCostReduced)
/* 417E5C 802A30CC 24847664 */ addiu $a0, $a0, %lo(HES_FPCostReduced)
/* 417E60 802A30D0 080A8C47 */ j .L802A311C_7AAABC
/* 417E64 802A30D4 00000000 */ nop
.L802A30D8_7AAA78:
/* 417E68 802A30D8 3C048010 */ lui $a0, %hi(HES_FPCostReducedTwice)
/* 417E6C 802A30DC 24847690 */ addiu $a0, $a0, %lo(HES_FPCostReducedTwice)
/* 417E70 802A30E0 080A8C4F */ j .L802A313C_7AAADC
/* 417E74 802A30E4 00000000 */ nop
.L802A30E8_7AAA88:
/* 417E78 802A30E8 8E820000 */ lw $v0, 0x0($s4)
/* 417E7C 802A30EC 10400005 */ beqz $v0, .L802A3104_7AAAA4
/* 417E80 802A30F0 00000000 */ nop
D_802A30F4_7AAA94:
/* 417E84 802A30F4 10560007 */ beq $v0, $s6, .L802A3114_7AAAB4
/* 417E88 802A30F8 00000000 */ nop
/* 417E8C 802A30FC 080A8C4D */ j .L802A3134_7AAAD4
/* 417E90 802A3100 00000000 */ nop
.L802A3104_7AAAA4:
/* 417E94 802A3104 3C048010 */ lui $a0, %hi(HES_POWCost)
/* 417E98 802A3108 248476E8 */ addiu $a0, $a0, %lo(HES_POWCost)
/* 417E9C 802A310C 080A8C47 */ j .L802A311C_7AAABC
/* 417EA0 802A3110 00000000 */ nop
.L802A3114_7AAAB4:
/* 417EA4 802A3114 3C048010 */ lui $a0, %hi(HES_POWCostReduced)
/* 417EA8 802A3118 24847714 */ addiu $a0, $a0, %lo(HES_POWCostReduced)
.L802A311C_7AAABC:
/* 417EAC 802A311C 0C050529 */ jal hud_element_create
/* 417EB0 802A3120 00000000 */ nop
D_802A3124_7AAAC4:
/* 417EB4 802A3124 0040902D */ daddu $s2, $v0, $zero
/* 417EB8 802A3128 02351021 */ addu $v0, $s1, $s5
/* 417EBC 802A312C 080A8C53 */ j .L802A314C_7AAAEC
/* 417EC0 802A3130 AC520000 */ sw $s2, 0x0($v0)
.L802A3134_7AAAD4:
/* 417EC4 802A3134 3C048010 */ lui $a0, %hi(HES_POWCostReducedTwice)
/* 417EC8 802A3138 24847740 */ addiu $a0, $a0, %lo(HES_POWCostReducedTwice)
.L802A313C_7AAADC:
/* 417ECC 802A313C 0C050529 */ jal hud_element_create
/* 417ED0 802A3140 00000000 */ nop
D_802A3144_7AAAE4:
/* 417ED4 802A3144 0040902D */ daddu $s2, $v0, $zero
/* 417ED8 802A3148 AE720000 */ sw $s2, 0x0($s3)
.L802A314C_7AAAEC:
/* 417EDC 802A314C 0240202D */ daddu $a0, $s2, $zero
/* 417EE0 802A3150 0C051280 */ jal hud_element_set_flags
D_802A3154_7AAAF4:
/* 417EE4 802A3154 24050080 */ addiu $a1, $zero, 0x80
/* 417EE8 802A3158 0240202D */ daddu $a0, $s2, $zero
/* 417EEC 802A315C 26730004 */ addiu $s3, $s3, 0x4
/* 417EF0 802A3160 26310004 */ addiu $s1, $s1, 0x4
/* 417EF4 802A3164 26940004 */ addiu $s4, $s4, 0x4
D_802A3168_7AAB08:
/* 417EF8 802A3168 3C05802B */ lui $a1, %hi(BattleMenu_Moves_PosX)
/* 417EFC 802A316C 84A5D1F0 */ lh $a1, %lo(BattleMenu_Moves_PosX)($a1)
D_802A3170_7AAB10:
/* 417F00 802A3170 3C06802B */ lui $a2, %hi(BattleMenu_Moves_PosY)
/* 417F04 802A3174 84C6D1F2 */ lh $a2, %lo(BattleMenu_Moves_PosY)($a2)
/* 417F08 802A3178 0C051261 */ jal hud_element_set_render_pos
/* 417F0C 802A317C 24A50038 */ addiu $a1, $a1, 0x38
/* 417F10 802A3180 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount)
/* 417F14 802A3184 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0)
D_802A3188_7AAB28:
/* 417F18 802A3188 26100001 */ addiu $s0, $s0, 0x1
/* 417F1C 802A318C 0202102A */ slt $v0, $s0, $v0
/* 417F20 802A3190 1440FFBE */ bnez $v0, .L802A308C_7AAA2C
/* 417F24 802A3194 00000000 */ nop
.L802A3198_7AAB38:
/* 417F28 802A3198 3C13802B */ lui $s3, %hi(BattleMenu_Moves_PosX)
/* 417F2C 802A319C 8673D1F0 */ lh $s3, %lo(BattleMenu_Moves_PosX)($s3)
/* 417F30 802A31A0 2402000A */ addiu $v0, $zero, 0xA
/* 417F34 802A31A4 3C01802B */ lui $at, %hi(BattleMenu_Moves_TextColor)
/* 417F38 802A31A8 A422D114 */ sh $v0, %lo(BattleMenu_Moves_TextColor)($at)
/* 417F3C 802A31AC 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 417F40 802A31B0 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 417F44 802A31B4 3C12802B */ lui $s2, %hi(BattleMenu_Moves_PosY)
/* 417F48 802A31B8 8652D1F2 */ lh $s2, %lo(BattleMenu_Moves_PosY)($s2)
/* 417F4C 802A31BC 14400028 */ bnez $v0, D_802A3260_7AAC00
/* 417F50 802A31C0 24040001 */ addiu $a0, $zero, 0x1
/* 417F54 802A31C4 0260282D */ daddu $a1, $s3, $zero
/* 417F58 802A31C8 0240302D */ daddu $a2, $s2, $zero
/* 417F5C 802A31CC 24070096 */ addiu $a3, $zero, 0x96
/* 417F60 802A31D0 3C02802A */ lui $v0, %hi(func_802A3C98_7AB638)
/* 417F64 802A31D4 24423C98 */ addiu $v0, $v0, %lo(func_802A3C98_7AB638)
D_802A31D8_7AAB78:
/* 417F68 802A31D8 3C03802B */ lui $v1, %hi(D_802AD10E)
/* 417F6C 802A31DC 8063D10E */ lb $v1, %lo(D_802AD10E)($v1)
/* 417F70 802A31E0 2410FFFF */ addiu $s0, $zero, -0x1
/* 417F74 802A31E4 AFA00014 */ sw $zero, 0x14($sp)
/* 417F78 802A31E8 AFA20018 */ sw $v0, 0x18($sp)
/* 417F7C 802A31EC AFA0001C */ sw $zero, 0x1C($sp)
/* 417F80 802A31F0 AFB00020 */ sw $s0, 0x20($sp)
/* 417F84 802A31F4 00831004 */ sllv $v0, $v1, $a0
/* 417F88 802A31F8 00431021 */ addu $v0, $v0, $v1
/* 417F8C 802A31FC 00021080 */ sll $v0, $v0, 2
/* 417F90 802A3200 00431021 */ addu $v0, $v0, $v1
/* 417F94 802A3204 2442001C */ addiu $v0, $v0, 0x1C
/* 417F98 802A3208 0C051F32 */ jal set_window_properties
/* 417F9C 802A320C AFA20010 */ sw $v0, 0x10($sp)
/* 417FA0 802A3210 24040002 */ addiu $a0, $zero, 0x2
/* 417FA4 802A3214 26650010 */ addiu $a1, $s3, 0x10
/* 417FA8 802A3218 2646FFFA */ addiu $a2, $s2, -0x6
/* 417FAC 802A321C 2407005A */ addiu $a3, $zero, 0x5A
/* 417FB0 802A3220 24020010 */ addiu $v0, $zero, 0x10
/* 417FB4 802A3224 24110001 */ addiu $s1, $zero, 0x1
/* 417FB8 802A3228 AFA20010 */ sw $v0, 0x10($sp)
/* 417FBC 802A322C 3C02802A */ lui $v0, %hi(func_802A43DC_7ABD7C)
/* 417FC0 802A3230 244243DC */ addiu $v0, $v0, %lo(func_802A43DC_7ABD7C)
D_802A3234_7AABD4:
/* 417FC4 802A3234 AFB10014 */ sw $s1, 0x14($sp)
/* 417FC8 802A3238 AFA20018 */ sw $v0, 0x18($sp)
/* 417FCC 802A323C AFA0001C */ sw $zero, 0x1C($sp)
/* 417FD0 802A3240 0C051F32 */ jal set_window_properties
/* 417FD4 802A3244 AFB00020 */ sw $s0, 0x20($sp)
D_802A3248_7AABE8:
/* 417FD8 802A3248 24040003 */ addiu $a0, $zero, 0x3
/* 417FDC 802A324C 26650072 */ addiu $a1, $s3, 0x72
D_802A3250_7AABF0:
/* 417FE0 802A3250 2646FFF4 */ addiu $a2, $s2, -0xC
/* 417FE4 802A3254 24070020 */ addiu $a3, $zero, 0x20
/* 417FE8 802A3258 080A8CBE */ j .L802A32F8_7AAC98
/* 417FEC 802A325C 00E0102D */ daddu $v0, $a3, $zero
D_802A3260_7AAC00:
/* 417FF0 802A3260 0260282D */ daddu $a1, $s3, $zero
/* 417FF4 802A3264 0240302D */ daddu $a2, $s2, $zero
D_802A3268_7AAC08:
/* 417FF8 802A3268 24070090 */ addiu $a3, $zero, 0x90
/* 417FFC 802A326C 3C02802A */ lui $v0, %hi(func_802A3C98_7AB638)
/* 418000 802A3270 24423C98 */ addiu $v0, $v0, %lo(func_802A3C98_7AB638)
/* 418004 802A3274 3C03802B */ lui $v1, %hi(D_802AD10E)
/* 418008 802A3278 8063D10E */ lb $v1, %lo(D_802AD10E)($v1)
D_802A327C_7AAC1C:
/* 41800C 802A327C 2410FFFF */ addiu $s0, $zero, -0x1
/* 418010 802A3280 AFA00014 */ sw $zero, 0x14($sp)
/* 418014 802A3284 AFA20018 */ sw $v0, 0x18($sp)
D_802A3288_7AAC28:
/* 418018 802A3288 AFA0001C */ sw $zero, 0x1C($sp)
/* 41801C 802A328C AFB00020 */ sw $s0, 0x20($sp)
/* 418020 802A3290 00831004 */ sllv $v0, $v1, $a0
/* 418024 802A3294 00431021 */ addu $v0, $v0, $v1
/* 418028 802A3298 00021080 */ sll $v0, $v0, 2
/* 41802C 802A329C 00431021 */ addu $v0, $v0, $v1
D_802A32A0_7AAC40:
/* 418030 802A32A0 2442001C */ addiu $v0, $v0, 0x1C
/* 418034 802A32A4 0C051F32 */ jal set_window_properties
/* 418038 802A32A8 AFA20010 */ sw $v0, 0x10($sp)
/* 41803C 802A32AC 24040004 */ addiu $a0, $zero, 0x4
D_802A32B0_7AAC50:
/* 418040 802A32B0 2665000A */ addiu $a1, $s3, 0xA
D_802A32B4_7AAC54:
/* 418044 802A32B4 2646FFFA */ addiu $a2, $s2, -0x6
/* 418048 802A32B8 24070064 */ addiu $a3, $zero, 0x64
/* 41804C 802A32BC 24020010 */ addiu $v0, $zero, 0x10
/* 418050 802A32C0 24110001 */ addiu $s1, $zero, 0x1
/* 418054 802A32C4 AFA20010 */ sw $v0, 0x10($sp)
/* 418058 802A32C8 3C02802A */ lui $v0, %hi(func_802A43DC_7ABD7C)
/* 41805C 802A32CC 244243DC */ addiu $v0, $v0, %lo(func_802A43DC_7ABD7C)
/* 418060 802A32D0 AFB10014 */ sw $s1, 0x14($sp)
/* 418064 802A32D4 AFA20018 */ sw $v0, 0x18($sp)
D_802A32D8_7AAC78:
/* 418068 802A32D8 AFA0001C */ sw $zero, 0x1C($sp)
/* 41806C 802A32DC 0C051F32 */ jal set_window_properties
D_802A32E0_7AAC80:
/* 418070 802A32E0 AFB00020 */ sw $s0, 0x20($sp)
/* 418074 802A32E4 24040005 */ addiu $a0, $zero, 0x5
/* 418078 802A32E8 2665006E */ addiu $a1, $s3, 0x6E
/* 41807C 802A32EC 2646FFF4 */ addiu $a2, $s2, -0xC
/* 418080 802A32F0 24070020 */ addiu $a3, $zero, 0x20
/* 418084 802A32F4 24020023 */ addiu $v0, $zero, 0x23
.L802A32F8_7AAC98:
/* 418088 802A32F8 AFA20010 */ sw $v0, 0x10($sp)
/* 41808C 802A32FC 3C02802A */ lui $v0, %hi(func_802A4448_7ABDE8)
D_802A3300_7AACA0:
/* 418090 802A3300 24424448 */ addiu $v0, $v0, %lo(func_802A4448_7ABDE8)
/* 418094 802A3304 AFB10014 */ sw $s1, 0x14($sp)
/* 418098 802A3308 AFA20018 */ sw $v0, 0x18($sp)
/* 41809C 802A330C AFA0001C */ sw $zero, 0x1C($sp)
/* 4180A0 802A3310 0C051F32 */ jal set_window_properties
/* 4180A4 802A3314 AFB00020 */ sw $s0, 0x20($sp)
/* 4180A8 802A3318 24130014 */ addiu $s3, $zero, 0x14
/* 4180AC 802A331C 24040008 */ addiu $a0, $zero, 0x8
D_802A3320_7AACC0:
/* 4180B0 802A3320 0260282D */ daddu $a1, $s3, $zero
/* 4180B4 802A3324 240600BA */ addiu $a2, $zero, 0xBA
/* 4180B8 802A3328 24070118 */ addiu $a3, $zero, 0x118
/* 4180BC 802A332C 24020020 */ addiu $v0, $zero, 0x20
/* 4180C0 802A3330 AFA20010 */ sw $v0, 0x10($sp)
/* 4180C4 802A3334 3C02802A */ lui $v0, %hi(func_802A4494_7ABE34)
/* 4180C8 802A3338 24424494 */ addiu $v0, $v0, %lo(func_802A4494_7ABE34)
/* 4180CC 802A333C AFA20018 */ sw $v0, 0x18($sp)
D_802A3340_7AACE0:
/* 4180D0 802A3340 2402FFFF */ addiu $v0, $zero, -0x1
/* 4180D4 802A3344 AFB30014 */ sw $s3, 0x14($sp)
/* 4180D8 802A3348 AFA0001C */ sw $zero, 0x1C($sp)
/* 4180DC 802A334C 0C051F32 */ jal set_window_properties
/* 4180E0 802A3350 AFA20020 */ sw $v0, 0x20($sp)
/* 4180E4 802A3354 24040001 */ addiu $a0, $zero, 0x1
/* 4180E8 802A3358 0C051F9F */ jal set_window_update
/* 4180EC 802A335C 0080282D */ daddu $a1, $a0, $zero
/* 4180F0 802A3360 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 4180F4 802A3364 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 4180F8 802A3368 54400006 */ bnel $v0, $zero, .L802A3384_7AAD24
/* 4180FC 802A336C 24040004 */ addiu $a0, $zero, 0x4
/* 418100 802A3370 24040002 */ addiu $a0, $zero, 0x2
/* 418104 802A3374 0C051F9F */ jal set_window_update
D_802A3378_7AAD18:
/* 418108 802A3378 24050001 */ addiu $a1, $zero, 0x1
/* 41810C 802A337C 080A8CE4 */ j .L802A3390_7AAD30
/* 418110 802A3380 24040003 */ addiu $a0, $zero, 0x3
.L802A3384_7AAD24:
/* 418114 802A3384 0C051F9F */ jal set_window_update
/* 418118 802A3388 24050001 */ addiu $a1, $zero, 0x1
/* 41811C 802A338C 24040005 */ addiu $a0, $zero, 0x5
.L802A3390_7AAD30:
/* 418120 802A3390 0C051F9F */ jal set_window_update
/* 418124 802A3394 24050001 */ addiu $a1, $zero, 0x1
/* 418128 802A3398 24040008 */ addiu $a0, $zero, 0x8
/* 41812C 802A339C 0C051F9F */ jal set_window_update
/* 418130 802A33A0 24050001 */ addiu $a1, $zero, 0x1
/* 418134 802A33A4 3C05802B */ lui $a1, %hi(battle_menu_moveScrollLine)
D_802A33A8_7AAD48:
/* 418138 802A33A8 24A5D10C */ addiu $a1, $a1, %lo(battle_menu_moveScrollLine)
/* 41813C 802A33AC 3C06802B */ lui $a2, %hi(BattleMenu_Moves_OptionCount)
/* 418140 802A33B0 24C6D4A4 */ addiu $a2, $a2, %lo(BattleMenu_Moves_OptionCount)
/* 418144 802A33B4 3C08802B */ lui $t0, %hi(battle_menu_moveCursorPos)
/* 418148 802A33B8 8108D109 */ lb $t0, %lo(battle_menu_moveCursorPos)($t0)
/* 41814C 802A33BC 3C07802B */ lui $a3, %hi(D_802AD10D)
/* 418150 802A33C0 80E7D10D */ lb $a3, %lo(D_802AD10D)($a3)
.L802A33C4_7AAD64:
/* 418154 802A33C4 80A20000 */ lb $v0, 0x0($a1)
/* 418158 802A33C8 90A30000 */ lbu $v1, 0x0($a1)
/* 41815C 802A33CC 00471021 */ addu $v0, $v0, $a3
/* 418160 802A33D0 2442FFFF */ addiu $v0, $v0, -0x1
/* 418164 802A33D4 0102102A */ slt $v0, $t0, $v0
/* 418168 802A33D8 14400010 */ bnez $v0, .L802A341C_7AADBC
/* 41816C 802A33DC 0000202D */ daddu $a0, $zero, $zero
/* 418170 802A33E0 24630001 */ addiu $v1, $v1, 0x1
/* 418174 802A33E4 A0A30000 */ sb $v1, 0x0($a1)
/* 418178 802A33E8 00031E00 */ sll $v1, $v1, 24
/* 41817C 802A33EC 8CC20000 */ lw $v0, 0x0($a2)
/* 418180 802A33F0 00031E03 */ sra $v1, $v1, 24
/* 418184 802A33F4 2442FFFA */ addiu $v0, $v0, -0x6
/* 418188 802A33F8 0043102A */ slt $v0, $v0, $v1
/* 41818C 802A33FC 50400007 */ beql $v0, $zero, .L802A341C_7AADBC
/* 418190 802A3400 24040001 */ addiu $a0, $zero, 0x1
/* 418194 802A3404 90C20003 */ lbu $v0, 0x3($a2)
/* 418198 802A3408 2442FFFA */ addiu $v0, $v0, -0x6
/* 41819C 802A340C A0A20000 */ sb $v0, 0x0($a1)
/* 4181A0 802A3410 00021600 */ sll $v0, $v0, 24
/* 4181A4 802A3414 04420001 */ bltzl $v0, .L802A341C_7AADBC
/* 4181A8 802A3418 A0A00000 */ sb $zero, 0x0($a1)
.L802A341C_7AADBC:
/* 4181AC 802A341C 1480FFE9 */ bnez $a0, .L802A33C4_7AAD64
/* 4181B0 802A3420 24020001 */ addiu $v0, $zero, 0x1
/* 4181B4 802A3424 3C03802B */ lui $v1, %hi(battle_menu_moveScrollLine)
/* 4181B8 802A3428 9063D10C */ lbu $v1, %lo(battle_menu_moveScrollLine)($v1)
/* 4181BC 802A342C 3C04802B */ lui $a0, %hi(battle_menu_moveCursorPos)
/* 4181C0 802A3430 8084D109 */ lb $a0, %lo(battle_menu_moveCursorPos)($a0)
/* 4181C4 802A3434 3C01802B */ lui $at, %hi(battle_menu_moveState)
/* 4181C8 802A3438 A022D108 */ sb $v0, %lo(battle_menu_moveState)($at)
/* 4181CC 802A343C 24620006 */ addiu $v0, $v1, 0x6
/* 4181D0 802A3440 00031E00 */ sll $v1, $v1, 24
/* 4181D4 802A3444 00031E03 */ sra $v1, $v1, 24
/* 4181D8 802A3448 00032823 */ negu $a1, $v1
/* 4181DC 802A344C 3C01802B */ lui $at, %hi(D_802AD10D)
/* 4181E0 802A3450 A022D10D */ sb $v0, %lo(D_802AD10D)($at)
/* 4181E4 802A3454 00051040 */ sll $v0, $a1, 1
/* 4181E8 802A3458 00451021 */ addu $v0, $v0, $a1
/* 4181EC 802A345C 00021080 */ sll $v0, $v0, 2
/* 4181F0 802A3460 00451021 */ addu $v0, $v0, $a1
/* 4181F4 802A3464 00832023 */ subu $a0, $a0, $v1
D_802A3468_7AAE08:
/* 4181F8 802A3468 3C01802B */ lui $at, %hi(battle_menu_moveScrollOffset)
/* 4181FC 802A346C A422D110 */ sh $v0, %lo(battle_menu_moveScrollOffset)($at)
/* 418200 802A3470 00041040 */ sll $v0, $a0, 1
/* 418204 802A3474 00441021 */ addu $v0, $v0, $a0
/* 418208 802A3478 00021080 */ sll $v0, $v0, 2
/* 41820C 802A347C 00441021 */ addu $v0, $v0, $a0
/* 418210 802A3480 3C01802B */ lui $at, %hi(D_802AD112)
/* 418214 802A3484 A422D112 */ sh $v0, %lo(D_802AD112)($at)
D_802A3488_7AAE28:
/* 418218 802A3488 080A8F1C */ j .L802A3C70_7AB610
/* 41821C 802A348C 0000102D */ daddu $v0, $zero, $zero
glabel .L802A3490_7AAE30
/* 418220 802A3490 3C050001 */ lui $a1, (0x12000 >> 16)
/* 418224 802A3494 3C04802B */ lui $a0, %hi(battle_menu_moveCursorPos)
/* 418228 802A3498 2484D109 */ addiu $a0, $a0, %lo(battle_menu_moveCursorPos)
/* 41822C 802A349C 34A52000 */ ori $a1, $a1, (0x12000 & 0xFFFF)
/* 418230 802A34A0 8E220218 */ lw $v0, 0x218($s1)
/* 418234 802A34A4 90830000 */ lbu $v1, 0x0($a0)
/* 418238 802A34A8 00451024 */ and $v0, $v0, $a1
/* 41823C 802A34AC 3C01802B */ lui $at, %hi(D_802AD10A)
/* 418240 802A34B0 A023D10A */ sb $v1, %lo(D_802AD10A)($at)
/* 418244 802A34B4 10400008 */ beqz $v0, .L802A34D8_7AAE78
/* 418248 802A34B8 00031600 */ sll $v0, $v1, 24
/* 41824C 802A34BC 1C400005 */ bgtz $v0, .L802A34D4_7AAE74
/* 418250 802A34C0 2462FFFF */ addiu $v0, $v1, -0x1
/* 418254 802A34C4 8E220214 */ lw $v0, 0x214($s1)
/* 418258 802A34C8 00451024 */ and $v0, $v0, $a1
/* 41825C 802A34CC 10400002 */ beqz $v0, .L802A34D8_7AAE78
/* 418260 802A34D0 2462FFFF */ addiu $v0, $v1, -0x1
.L802A34D4_7AAE74:
/* 418264 802A34D4 A0820000 */ sb $v0, 0x0($a0)
.L802A34D8_7AAE78:
/* 418268 802A34D8 3C060002 */ lui $a2, (0x20010 >> 16)
/* 41826C 802A34DC 8E220218 */ lw $v0, 0x218($s1)
/* 418270 802A34E0 34C60010 */ ori $a2, $a2, (0x20010 & 0xFFFF)
/* 418274 802A34E4 00461024 */ and $v0, $v0, $a2
/* 418278 802A34E8 10400010 */ beqz $v0, .L802A352C_7AAECC
D_802A34EC_7AAE8C:
/* 41827C 802A34EC 00000000 */ nop
/* 418280 802A34F0 3C05802B */ lui $a1, %hi(battle_menu_moveCursorPos)
/* 418284 802A34F4 24A5D109 */ addiu $a1, $a1, %lo(battle_menu_moveCursorPos)
/* 418288 802A34F8 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount)
/* 41828C 802A34FC 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0)
/* 418290 802A3500 80A30000 */ lb $v1, 0x0($a1)
/* 418294 802A3504 90A40000 */ lbu $a0, 0x0($a1)
D_802A3508_7AAEA8:
/* 418298 802A3508 2442FFFF */ addiu $v0, $v0, -0x1
/* 41829C 802A350C 0062182A */ slt $v1, $v1, $v0
/* 4182A0 802A3510 14600005 */ bnez $v1, .L802A3528_7AAEC8
D_802A3514_7AAEB4:
/* 4182A4 802A3514 24820001 */ addiu $v0, $a0, 0x1
/* 4182A8 802A3518 8E220214 */ lw $v0, 0x214($s1)
/* 4182AC 802A351C 00461024 */ and $v0, $v0, $a2
/* 4182B0 802A3520 10400002 */ beqz $v0, .L802A352C_7AAECC
/* 4182B4 802A3524 24820001 */ addiu $v0, $a0, 0x1
.L802A3528_7AAEC8:
/* 4182B8 802A3528 A0A20000 */ sb $v0, 0x0($a1)
.L802A352C_7AAECC:
/* 4182BC 802A352C 3C10802B */ lui $s0, %hi(battle_menu_moveCursorPos)
/* 4182C0 802A3530 2610D109 */ addiu $s0, $s0, %lo(battle_menu_moveCursorPos)
D_802A3534_7AAED4:
/* 4182C4 802A3534 82020000 */ lb $v0, 0x0($s0)
/* 4182C8 802A3538 04410005 */ bgez $v0, .L802A3550_7AAEF0
/* 4182CC 802A353C 00000000 */ nop
/* 4182D0 802A3540 3C02802B */ lui $v0, %hi(D_802AD4A7)
/* 4182D4 802A3544 9042D4A7 */ lbu $v0, %lo(D_802AD4A7)($v0)
/* 4182D8 802A3548 2442FFFF */ addiu $v0, $v0, -0x1
/* 4182DC 802A354C A2020000 */ sb $v0, 0x0($s0)
.L802A3550_7AAEF0:
/* 4182E0 802A3550 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount)
D_802A3554_7AAEF4:
/* 4182E4 802A3554 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0)
/* 4182E8 802A3558 82030000 */ lb $v1, 0x0($s0)
/* 4182EC 802A355C 2442FFFF */ addiu $v0, $v0, -0x1
/* 4182F0 802A3560 0043102A */ slt $v0, $v0, $v1
/* 4182F4 802A3564 54400001 */ bnel $v0, $zero, .L802A356C_7AAF0C
/* 4182F8 802A3568 A2000000 */ sb $zero, 0x0($s0)
.L802A356C_7AAF0C:
/* 4182FC 802A356C 3C03802B */ lui $v1, %hi(D_802AD10A)
/* 418300 802A3570 8063D10A */ lb $v1, %lo(D_802AD10A)($v1)
/* 418304 802A3574 82020000 */ lb $v0, 0x0($s0)
/* 418308 802A3578 10620009 */ beq $v1, $v0, .L802A35A0_7AAF40
/* 41830C 802A357C 00031080 */ sll $v0, $v1, 2
/* 418310 802A3580 3C04802B */ lui $a0, %hi(BattleMenu_Moves_OptionIDs)
/* 418314 802A3584 00822021 */ addu $a0, $a0, $v0
/* 418318 802A3588 8C84D128 */ lw $a0, %lo(BattleMenu_Moves_OptionIDs)($a0)
/* 41831C 802A358C 3C053EE6 */ lui $a1, (0x3EE66666 >> 16)
/* 418320 802A3590 0C051308 */ jal hud_element_set_scale
/* 418324 802A3594 34A56666 */ ori $a1, $a1, (0x3EE66666 & 0xFFFF)
/* 418328 802A3598 0C05272D */ jal sfx_play_sound
/* 41832C 802A359C 240400C7 */ addiu $a0, $zero, 0xC7
.L802A35A0_7AAF40:
/* 418330 802A35A0 3C04802B */ lui $a0, %hi(battle_menu_moveScrollLine)
/* 418334 802A35A4 2484D10C */ addiu $a0, $a0, %lo(battle_menu_moveScrollLine)
/* 418338 802A35A8 80820000 */ lb $v0, 0x0($a0)
/* 41833C 802A35AC 82030000 */ lb $v1, 0x0($s0)
/* 418340 802A35B0 24420001 */ addiu $v0, $v0, 0x1
D_802A35B4_7AAF54:
/* 418344 802A35B4 0062182A */ slt $v1, $v1, $v0
/* 418348 802A35B8 90820000 */ lbu $v0, 0x0($a0)
/* 41834C 802A35BC 10600005 */ beqz $v1, .L802A35D4_7AAF74
/* 418350 802A35C0 2442FFFF */ addiu $v0, $v0, -0x1
/* 418354 802A35C4 A0820000 */ sb $v0, 0x0($a0)
/* 418358 802A35C8 00021600 */ sll $v0, $v0, 24
/* 41835C 802A35CC 04420001 */ bltzl $v0, .L802A35D4_7AAF74
/* 418360 802A35D0 A0800000 */ sb $zero, 0x0($a0)
.L802A35D4_7AAF74:
/* 418364 802A35D4 3C02802B */ lui $v0, %hi(D_802AD10D)
/* 418368 802A35D8 8042D10D */ lb $v0, %lo(D_802AD10D)($v0)
/* 41836C 802A35DC 3C03802B */ lui $v1, %hi(battle_menu_moveCursorPos)
/* 418370 802A35E0 8063D109 */ lb $v1, %lo(battle_menu_moveCursorPos)($v1)
/* 418374 802A35E4 2442FFFF */ addiu $v0, $v0, -0x1
/* 418378 802A35E8 0062182A */ slt $v1, $v1, $v0
/* 41837C 802A35EC 14600015 */ bnez $v1, D_802A3644_7AAFE4
/* 418380 802A35F0 00000000 */ nop
/* 418384 802A35F4 3C04802B */ lui $a0, %hi(battle_menu_moveScrollLine)
/* 418388 802A35F8 2484D10C */ addiu $a0, $a0, %lo(battle_menu_moveScrollLine)
/* 41838C 802A35FC 90820000 */ lbu $v0, 0x0($a0)
/* 418390 802A3600 3C05802B */ lui $a1, %hi(BattleMenu_Moves_OptionCount)
/* 418394 802A3604 24A5D4A4 */ addiu $a1, $a1, %lo(BattleMenu_Moves_OptionCount)
/* 418398 802A3608 24420001 */ addiu $v0, $v0, 0x1
/* 41839C 802A360C A0820000 */ sb $v0, 0x0($a0)
/* 4183A0 802A3610 00021600 */ sll $v0, $v0, 24
/* 4183A4 802A3614 8CA30000 */ lw $v1, 0x0($a1)
/* 4183A8 802A3618 00021603 */ sra $v0, $v0, 24
/* 4183AC 802A361C 2463FFFA */ addiu $v1, $v1, -0x6
/* 4183B0 802A3620 0062182A */ slt $v1, $v1, $v0
/* 4183B4 802A3624 10600007 */ beqz $v1, D_802A3644_7AAFE4
/* 4183B8 802A3628 00000000 */ nop
/* 4183BC 802A362C 90A20003 */ lbu $v0, 0x3($a1)
/* 4183C0 802A3630 2442FFFA */ addiu $v0, $v0, -0x6
/* 4183C4 802A3634 A0820000 */ sb $v0, 0x0($a0)
/* 4183C8 802A3638 00021600 */ sll $v0, $v0, 24
/* 4183CC 802A363C 04420001 */ bltzl $v0, D_802A3644_7AAFE4
/* 4183D0 802A3640 A0800000 */ sb $zero, 0x0($a0)
D_802A3644_7AAFE4:
/* 4183D4 802A3644 3C02802B */ lui $v0, %hi(battle_menu_moveScrollLine)
/* 4183D8 802A3648 9042D10C */ lbu $v0, %lo(battle_menu_moveScrollLine)($v0)
/* 4183DC 802A364C 8E230214 */ lw $v1, 0x214($s1)
/* 4183E0 802A3650 24420006 */ addiu $v0, $v0, 0x6
/* 4183E4 802A3654 3C01802B */ lui $at, %hi(D_802AD10D)
/* 4183E8 802A3658 A022D10D */ sb $v0, %lo(D_802AD10D)($at)
/* 4183EC 802A365C 30628000 */ andi $v0, $v1, 0x8000
/* 4183F0 802A3660 10400025 */ beqz $v0, .L802A36F8_7AB098
/* 4183F4 802A3664 30624000 */ andi $v0, $v1, 0x4000
/* 4183F8 802A3668 3C11802B */ lui $s1, %hi(battle_menu_moveCursorPos)
/* 4183FC 802A366C 2631D109 */ addiu $s1, $s1, %lo(battle_menu_moveCursorPos)
/* 418400 802A3670 82220000 */ lb $v0, 0x0($s1)
/* 418404 802A3674 00021080 */ sll $v0, $v0, 2
/* 418408 802A3678 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionIndexMap)
/* 41840C 802A367C 00220821 */ addu $at, $at, $v0
/* 418410 802A3680 8C22D1F8 */ lw $v0, %lo(BattleMenu_Moves_OptionIndexMap)($at)
/* 418414 802A3684 3C10802B */ lui $s0, %hi(BattleMenu_Moves_OptionIndexMap)
D_802A3688_7AB028:
/* 418418 802A3688 2610D1F8 */ addiu $s0, $s0, %lo(BattleMenu_Moves_OptionIndexMap)
/* 41841C 802A368C 00021080 */ sll $v0, $v0, 2
/* 418420 802A3690 3C03802B */ lui $v1, %hi(BattleMenu_Moves_OptionEnabled)
/* 418424 802A3694 00621821 */ addu $v1, $v1, $v0
/* 418428 802A3698 8C63D510 */ lw $v1, %lo(BattleMenu_Moves_OptionEnabled)($v1)
D_802A369C_7AB03C:
/* 41842C 802A369C 24020001 */ addiu $v0, $zero, 0x1
/* 418430 802A36A0 14620005 */ bne $v1, $v0, .L802A36B8_7AB058
/* 418434 802A36A4 00000000 */ nop
D_802A36A8_7AB048:
/* 418438 802A36A8 0C05272D */ jal sfx_play_sound
/* 41843C 802A36AC 240400C9 */ addiu $a0, $zero, 0xC9
/* 418440 802A36B0 080A8F19 */ j .L802A3C64_7AB604
/* 418444 802A36B4 2402FFFF */ addiu $v0, $zero, -0x1
.L802A36B8_7AB058:
/* 418448 802A36B8 0C05272D */ jal sfx_play_sound
/* 41844C 802A36BC 2404021D */ addiu $a0, $zero, 0x21D
/* 418450 802A36C0 82220000 */ lb $v0, 0x0($s1)
/* 418454 802A36C4 00021080 */ sll $v0, $v0, 2
/* 418458 802A36C8 00501021 */ addu $v0, $v0, $s0
/* 41845C 802A36CC 8C420000 */ lw $v0, 0x0($v0)
/* 418460 802A36D0 3C03802B */ lui $v1, %hi(D_802AD258)
/* 418464 802A36D4 2463D258 */ addiu $v1, $v1, %lo(D_802AD258)
D_802A36D8_7AB078:
/* 418468 802A36D8 AC600000 */ sw $zero, 0x0($v1)
/* 41846C 802A36DC 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionCantUseMessages)
/* 418470 802A36E0 00220821 */ addu $at, $at, $v0
/* 418474 802A36E4 8022D5E8 */ lb $v0, %lo(BattleMenu_Moves_OptionCantUseMessages)($at)
/* 418478 802A36E8 54400001 */ bnel $v0, $zero, .L802A36F0_7AB090
/* 41847C 802A36EC AC620000 */ sw $v0, 0x0($v1)
.L802A36F0_7AB090:
/* 418480 802A36F0 080A8F19 */ j .L802A3C64_7AB604
/* 418484 802A36F4 24020028 */ addiu $v0, $zero, 0x28
.L802A36F8_7AB098:
/* 418488 802A36F8 1040015D */ beqz $v0, .L802A3C70_7AB610
/* 41848C 802A36FC 0000102D */ daddu $v0, $zero, $zero
/* 418490 802A3700 0C05272D */ jal sfx_play_sound
/* 418494 802A3704 240400CA */ addiu $a0, $zero, 0xCA
/* 418498 802A3708 0C0A89F9 */ jal func_802A27E4_7AA184
/* 41849C 802A370C 00000000 */ nop
/* 4184A0 802A3710 080A8F19 */ j .L802A3C64_7AB604
/* 4184A4 802A3714 2402FFFE */ addiu $v0, $zero, -0x2
glabel .L802A3718_7AB0B8
/* 4184A8 802A3718 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount)
/* 4184AC 802A371C 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0)
/* 4184B0 802A3720 1840000F */ blez $v0, .L802A3760_7AB100
/* 4184B4 802A3724 0000802D */ daddu $s0, $zero, $zero
/* 4184B8 802A3728 3C11802B */ lui $s1, %hi(BattleMenu_Moves_OptionIDs)
D_802A372C_7AB0CC:
/* 4184BC 802A372C 2631D128 */ addiu $s1, $s1, %lo(BattleMenu_Moves_OptionIDs)
/* 4184C0 802A3730 240500A0 */ addiu $a1, $zero, 0xA0
.L802A3734_7AB0D4:
/* 4184C4 802A3734 00A0302D */ daddu $a2, $a1, $zero
/* 4184C8 802A3738 00A0382D */ daddu $a3, $a1, $zero
/* 4184CC 802A373C 8E240000 */ lw $a0, 0x0($s1)
/* 4184D0 802A3740 0C0513BF */ jal hud_element_set_tint
/* 4184D4 802A3744 26310004 */ addiu $s1, $s1, 0x4
/* 4184D8 802A3748 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount)
/* 4184DC 802A374C 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0)
/* 4184E0 802A3750 26100001 */ addiu $s0, $s0, 0x1
/* 4184E4 802A3754 0202102A */ slt $v0, $s0, $v0
/* 4184E8 802A3758 1440FFF6 */ bnez $v0, .L802A3734_7AB0D4
/* 4184EC 802A375C 240500A0 */ addiu $a1, $zero, 0xA0
.L802A3760_7AB100:
/* 4184F0 802A3760 240500A0 */ addiu $a1, $zero, 0xA0
/* 4184F4 802A3764 00A0302D */ daddu $a2, $a1, $zero
/* 4184F8 802A3768 3C04802B */ lui $a0, %hi(BattleMenu_Moves_CursorID)
/* 4184FC 802A376C 8C84D118 */ lw $a0, %lo(BattleMenu_Moves_CursorID)($a0)
/* 418500 802A3770 0C0513BF */ jal hud_element_set_tint
/* 418504 802A3774 00A0382D */ daddu $a3, $a1, $zero
/* 418508 802A3778 240500A0 */ addiu $a1, $zero, 0xA0
/* 41850C 802A377C 00A0302D */ daddu $a2, $a1, $zero
/* 418510 802A3780 3C04802B */ lui $a0, %hi(BattleMenu_Moves_UpArrowID)
/* 418514 802A3784 8C84D11C */ lw $a0, %lo(BattleMenu_Moves_UpArrowID)($a0)
/* 418518 802A3788 0C0513BF */ jal hud_element_set_tint
/* 41851C 802A378C 00A0382D */ daddu $a3, $a1, $zero
jtbl_802A3790_7AB130:
/* 418520 802A3790 240500A0 */ addiu $a1, $zero, 0xA0
/* 418524 802A3794 00A0302D */ daddu $a2, $a1, $zero
/* 418528 802A3798 3C04802B */ lui $a0, %hi(BattleMenu_Moves_DownArrowID)
/* 41852C 802A379C 8C84D120 */ lw $a0, %lo(BattleMenu_Moves_DownArrowID)($a0)
/* 418530 802A37A0 0C0513BF */ jal hud_element_set_tint
/* 418534 802A37A4 00A0382D */ daddu $a3, $a1, $zero
/* 418538 802A37A8 240500A0 */ addiu $a1, $zero, 0xA0
/* 41853C 802A37AC 00A0302D */ daddu $a2, $a1, $zero
/* 418540 802A37B0 3C04802B */ lui $a0, %hi(BattleMenu_Moves_TitleID)
/* 418544 802A37B4 8C84D188 */ lw $a0, %lo(BattleMenu_Moves_TitleID)($a0)
/* 418548 802A37B8 0C0513BF */ jal hud_element_set_tint
/* 41854C 802A37BC 00A0382D */ daddu $a3, $a1, $zero
/* 418550 802A37C0 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount)
/* 418554 802A37C4 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0)
/* 418558 802A37C8 1840000F */ blez $v0, .L802A3808_7AB1A8
/* 41855C 802A37CC 0000802D */ daddu $s0, $zero, $zero
/* 418560 802A37D0 3C11802B */ lui $s1, %hi(BattleMenu_Moves_OptionCostUnitIDs)
/* 418564 802A37D4 2631D190 */ addiu $s1, $s1, %lo(BattleMenu_Moves_OptionCostUnitIDs)
/* 418568 802A37D8 240500A0 */ addiu $a1, $zero, 0xA0
.L802A37DC_7AB17C:
/* 41856C 802A37DC 00A0302D */ daddu $a2, $a1, $zero
/* 418570 802A37E0 00A0382D */ daddu $a3, $a1, $zero
/* 418574 802A37E4 8E240000 */ lw $a0, 0x0($s1)
/* 418578 802A37E8 0C0513BF */ jal hud_element_set_tint
/* 41857C 802A37EC 26310004 */ addiu $s1, $s1, 0x4
D_802A37F0_7AB190:
/* 418580 802A37F0 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount)
/* 418584 802A37F4 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0)
D_802A37F8_7AB198:
/* 418588 802A37F8 26100001 */ addiu $s0, $s0, 0x1
/* 41858C 802A37FC 0202102A */ slt $v0, $s0, $v0
/* 418590 802A3800 5440FFF6 */ bnel $v0, $zero, .L802A37DC_7AB17C
/* 418594 802A3804 240500A0 */ addiu $a1, $zero, 0xA0
.L802A3808_7AB1A8:
/* 418598 802A3808 3C04802B */ lui $a0, %hi(BattleMenu_Moves_CursorID)
/* 41859C 802A380C 8C84D118 */ lw $a0, %lo(BattleMenu_Moves_CursorID)($a0)
/* 4185A0 802A3810 3C058010 */ lui $a1, %hi(HES_HandPointer)
/* 4185A4 802A3814 24A54A00 */ addiu $a1, $a1, %lo(HES_HandPointer)
D_802A3818_7AB1B8:
/* 4185A8 802A3818 0C0511FF */ jal hud_element_set_script
/* 4185AC 802A381C 00000000 */ nop
/* 4185B0 802A3820 24040001 */ addiu $a0, $zero, 0x1
/* 4185B4 802A3824 2402000D */ addiu $v0, $zero, 0xD
/* 4185B8 802A3828 3C01802B */ lui $at, %hi(BattleMenu_Moves_TextColor)
/* 4185BC 802A382C A422D114 */ sh $v0, %lo(BattleMenu_Moves_TextColor)($at)
/* 4185C0 802A3830 0C051F9F */ jal set_window_update
D_802A3834_7AB1D4:
/* 4185C4 802A3834 24050004 */ addiu $a1, $zero, 0x4
D_802A3838_7AB1D8:
/* 4185C8 802A3838 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 4185CC 802A383C 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 4185D0 802A3840 54400006 */ bnel $v0, $zero, .L802A385C_7AB1FC
/* 4185D4 802A3844 24040004 */ addiu $a0, $zero, 0x4
/* 4185D8 802A3848 24040002 */ addiu $a0, $zero, 0x2
/* 4185DC 802A384C 0C051F9F */ jal set_window_update
/* 4185E0 802A3850 24050004 */ addiu $a1, $zero, 0x4
/* 4185E4 802A3854 080A8E1A */ j .L802A3868_7AB208
/* 4185E8 802A3858 24040003 */ addiu $a0, $zero, 0x3
.L802A385C_7AB1FC:
/* 4185EC 802A385C 0C051F9F */ jal set_window_update
/* 4185F0 802A3860 0080282D */ daddu $a1, $a0, $zero
/* 4185F4 802A3864 24040005 */ addiu $a0, $zero, 0x5
.L802A3868_7AB208:
/* 4185F8 802A3868 0C051F9F */ jal set_window_update
/* 4185FC 802A386C 24050004 */ addiu $a1, $zero, 0x4
/* 418600 802A3870 24040008 */ addiu $a0, $zero, 0x8
D_802A3874_7AB214:
/* 418604 802A3874 0C051F9F */ jal set_window_update
/* 418608 802A3878 24050002 */ addiu $a1, $zero, 0x2
/* 41860C 802A387C 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 418610 802A3880 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 418614 802A3884 14400005 */ bnez $v0, .L802A389C_7AB23C
/* 418618 802A3888 00000000 */ nop
/* 41861C 802A388C 0C03A674 */ jal status_bar_stop_blinking_fp
/* 418620 802A3890 00000000 */ nop
/* 418624 802A3894 080A8E5D */ j .L802A3974_7AB314
/* 418628 802A3898 00000000 */ nop
.L802A389C_7AB23C:
/* 41862C 802A389C 0C03A6A5 */ jal status_bar_stop_blinking_sp
/* 418630 802A38A0 00000000 */ nop
/* 418634 802A38A4 080A8E5D */ j .L802A3974_7AB314
D_802A38A8_7AB248:
/* 418638 802A38A8 00000000 */ nop
glabel .L802A38AC_7AB24C
/* 41863C 802A38AC 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 418640 802A38B0 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 418644 802A38B4 14400005 */ bnez $v0, .L802A38CC_7AB26C
/* 418648 802A38B8 00000000 */ nop
/* 41864C 802A38BC 0C03A674 */ jal status_bar_stop_blinking_fp
/* 418650 802A38C0 00000000 */ nop
D_802A38C4_7AB264:
/* 418654 802A38C4 080A8F1C */ j .L802A3C70_7AB610
D_802A38C8_7AB268:
/* 418658 802A38C8 240200FF */ addiu $v0, $zero, 0xFF
.L802A38CC_7AB26C:
/* 41865C 802A38CC 0C03A6A5 */ jal status_bar_stop_blinking_sp
/* 418660 802A38D0 00000000 */ nop
/* 418664 802A38D4 080A8F1C */ j .L802A3C70_7AB610
/* 418668 802A38D8 240200FF */ addiu $v0, $zero, 0xFF
glabel .L802A38DC_7AB27C
/* 41866C 802A38DC 24040001 */ addiu $a0, $zero, 0x1
/* 418670 802A38E0 0C051F9F */ jal set_window_update
/* 418674 802A38E4 24050002 */ addiu $a1, $zero, 0x2
/* 418678 802A38E8 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 41867C 802A38EC 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 418680 802A38F0 54400006 */ bnel $v0, $zero, .L802A390C_7AB2AC
/* 418684 802A38F4 24040004 */ addiu $a0, $zero, 0x4
/* 418688 802A38F8 24040002 */ addiu $a0, $zero, 0x2
/* 41868C 802A38FC 0C051F9F */ jal set_window_update
/* 418690 802A3900 0080282D */ daddu $a1, $a0, $zero
/* 418694 802A3904 080A8E46 */ j .L802A3918_7AB2B8
D_802A3908_7AB2A8:
/* 418698 802A3908 24040003 */ addiu $a0, $zero, 0x3
.L802A390C_7AB2AC:
/* 41869C 802A390C 0C051F9F */ jal set_window_update
/* 4186A0 802A3910 24050002 */ addiu $a1, $zero, 0x2
/* 4186A4 802A3914 24040005 */ addiu $a0, $zero, 0x5
.L802A3918_7AB2B8:
/* 4186A8 802A3918 0C051F9F */ jal set_window_update
/* 4186AC 802A391C 24050002 */ addiu $a1, $zero, 0x2
/* 4186B0 802A3920 24040008 */ addiu $a0, $zero, 0x8
/* 4186B4 802A3924 0C051F9F */ jal set_window_update
/* 4186B8 802A3928 24050002 */ addiu $a1, $zero, 0x2
/* 4186BC 802A392C 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 4186C0 802A3930 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 4186C4 802A3934 14400005 */ bnez $v0, .L802A394C_7AB2EC
/* 4186C8 802A3938 00000000 */ nop
/* 4186CC 802A393C 0C03A674 */ jal status_bar_stop_blinking_fp
/* 4186D0 802A3940 00000000 */ nop
D_802A3944_7AB2E4:
/* 4186D4 802A3944 080A8E55 */ j .L802A3954_7AB2F4
/* 4186D8 802A3948 00000000 */ nop
.L802A394C_7AB2EC:
/* 4186DC 802A394C 0C03A6A5 */ jal status_bar_stop_blinking_sp
D_802A3950_7AB2F0:
/* 4186E0 802A3950 00000000 */ nop
.L802A3954_7AB2F4:
/* 4186E4 802A3954 3C04802B */ lui $a0, %hi(battle_menu_moveCursorPos)
/* 4186E8 802A3958 8084D109 */ lb $a0, %lo(battle_menu_moveCursorPos)($a0)
/* 4186EC 802A395C 00041080 */ sll $v0, $a0, 2
/* 4186F0 802A3960 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionIndexMap)
/* 4186F4 802A3964 00220821 */ addu $at, $at, $v0
/* 4186F8 802A3968 8C22D1F8 */ lw $v0, %lo(BattleMenu_Moves_OptionIndexMap)($at)
/* 4186FC 802A396C 080A8E82 */ j .L802A3A08_7AB3A8
/* 418700 802A3970 2403000B */ addiu $v1, $zero, 0xB
glabel .L802A3974_7AB314
/* 418704 802A3974 3C03802B */ lui $v1, %hi(battle_menu_moveCursorPos)
/* 418708 802A3978 8063D109 */ lb $v1, %lo(battle_menu_moveCursorPos)($v1)
/* 41870C 802A397C 00031080 */ sll $v0, $v1, 2
/* 418710 802A3980 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionIndexMap)
/* 418714 802A3984 00220821 */ addu $at, $at, $v0
/* 418718 802A3988 8C22D1F8 */ lw $v0, %lo(BattleMenu_Moves_OptionIndexMap)($at)
/* 41871C 802A398C 3C01802B */ lui $at, %hi(battle_menu_moveOptionActive)
/* 418720 802A3990 AC23D600 */ sw $v1, %lo(battle_menu_moveOptionActive)($at)
/* 418724 802A3994 080A8F1C */ j .L802A3C70_7AB610
/* 418728 802A3998 24420001 */ addiu $v0, $v0, 0x1
glabel .L802A399C_7AB33C
/* 41872C 802A399C 24040001 */ addiu $a0, $zero, 0x1
/* 418730 802A39A0 0C051F9F */ jal set_window_update
/* 418734 802A39A4 0080282D */ daddu $a1, $a0, $zero
/* 418738 802A39A8 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 41873C 802A39AC 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 418740 802A39B0 54400006 */ bnel $v0, $zero, .L802A39CC_7AB36C
/* 418744 802A39B4 24040004 */ addiu $a0, $zero, 0x4
/* 418748 802A39B8 24040002 */ addiu $a0, $zero, 0x2
/* 41874C 802A39BC 0C051F9F */ jal set_window_update
/* 418750 802A39C0 24050001 */ addiu $a1, $zero, 0x1
D_802A39C4_7AB364:
/* 418754 802A39C4 080A8E76 */ j .L802A39D8_7AB378
/* 418758 802A39C8 24040003 */ addiu $a0, $zero, 0x3
.L802A39CC_7AB36C:
/* 41875C 802A39CC 0C051F9F */ jal set_window_update
/* 418760 802A39D0 24050001 */ addiu $a1, $zero, 0x1
/* 418764 802A39D4 24040005 */ addiu $a0, $zero, 0x5
.L802A39D8_7AB378:
/* 418768 802A39D8 0C051F9F */ jal set_window_update
/* 41876C 802A39DC 24050001 */ addiu $a1, $zero, 0x1
/* 418770 802A39E0 24040008 */ addiu $a0, $zero, 0x8
/* 418774 802A39E4 0C051F9F */ jal set_window_update
/* 418778 802A39E8 24050001 */ addiu $a1, $zero, 0x1
/* 41877C 802A39EC 3C04802B */ lui $a0, %hi(battle_menu_moveCursorPos)
/* 418780 802A39F0 8084D109 */ lb $a0, %lo(battle_menu_moveCursorPos)($a0)
/* 418784 802A39F4 00041080 */ sll $v0, $a0, 2
D_802A39F8_7AB398:
/* 418788 802A39F8 3C01802B */ lui $at, %hi(BattleMenu_Moves_OptionIndexMap)
/* 41878C 802A39FC 00220821 */ addu $at, $at, $v0
/* 418790 802A3A00 8C22D1F8 */ lw $v0, %lo(BattleMenu_Moves_OptionIndexMap)($at)
/* 418794 802A3A04 24030001 */ addiu $v1, $zero, 0x1
.L802A3A08_7AB3A8:
/* 418798 802A3A08 3C01802B */ lui $at, %hi(battle_menu_moveState)
/* 41879C 802A3A0C A023D108 */ sb $v1, %lo(battle_menu_moveState)($at)
/* 4187A0 802A3A10 3C01802B */ lui $at, %hi(battle_menu_moveOptionActive)
/* 4187A4 802A3A14 AC24D600 */ sw $a0, %lo(battle_menu_moveOptionActive)($at)
/* 4187A8 802A3A18 080A8F1C */ j .L802A3C70_7AB610
/* 4187AC 802A3A1C 24420001 */ addiu $v0, $v0, 0x1
glabel .L802A3A20_7AB3C0
/* 4187B0 802A3A20 24040001 */ addiu $a0, $zero, 0x1
/* 4187B4 802A3A24 0C051F9F */ jal set_window_update
/* 4187B8 802A3A28 24050009 */ addiu $a1, $zero, 0x9
/* 4187BC 802A3A2C 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 4187C0 802A3A30 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 4187C4 802A3A34 54400006 */ bnel $v0, $zero, .L802A3A50_7AB3F0
/* 4187C8 802A3A38 24040004 */ addiu $a0, $zero, 0x4
/* 4187CC 802A3A3C 24040002 */ addiu $a0, $zero, 0x2
/* 4187D0 802A3A40 0C051F9F */ jal set_window_update
/* 4187D4 802A3A44 24050009 */ addiu $a1, $zero, 0x9
/* 4187D8 802A3A48 080A8E97 */ j .L802A3A5C_7AB3FC
/* 4187DC 802A3A4C 24040003 */ addiu $a0, $zero, 0x3
.L802A3A50_7AB3F0:
/* 4187E0 802A3A50 0C051F9F */ jal set_window_update
/* 4187E4 802A3A54 24050009 */ addiu $a1, $zero, 0x9
/* 4187E8 802A3A58 24040005 */ addiu $a0, $zero, 0x5
.L802A3A5C_7AB3FC:
/* 4187EC 802A3A5C 0C051F9F */ jal set_window_update
/* 4187F0 802A3A60 24050009 */ addiu $a1, $zero, 0x9
/* 4187F4 802A3A64 24040008 */ addiu $a0, $zero, 0x8
/* 4187F8 802A3A68 0C051F9F */ jal set_window_update
/* 4187FC 802A3A6C 24050002 */ addiu $a1, $zero, 0x2
/* 418800 802A3A70 080A8F19 */ j .L802A3C64_7AB604
/* 418804 802A3A74 2402FFFF */ addiu $v0, $zero, -0x1
glabel .L802A3A78_7AB418
/* 418808 802A3A78 2402FFFF */ addiu $v0, $zero, -0x1
/* 41880C 802A3A7C 0040182D */ daddu $v1, $v0, $zero
/* 418810 802A3A80 3C01802B */ lui $at, %hi(battle_menu_moveOptionActive)
/* 418814 802A3A84 AC23D600 */ sw $v1, %lo(battle_menu_moveOptionActive)($at)
/* 418818 802A3A88 24030029 */ addiu $v1, $zero, 0x29
/* 41881C 802A3A8C 3C01802B */ lui $at, %hi(battle_menu_moveState)
/* 418820 802A3A90 A023D108 */ sb $v1, %lo(battle_menu_moveState)($at)
/* 418824 802A3A94 080A8F1C */ j .L802A3C70_7AB610
/* 418828 802A3A98 00000000 */ nop
glabel .L802A3A9C_7AB43C
/* 41882C 802A3A9C 24040001 */ addiu $a0, $zero, 0x1
/* 418830 802A3AA0 0C051F9F */ jal set_window_update
/* 418834 802A3AA4 24050002 */ addiu $a1, $zero, 0x2
/* 418838 802A3AA8 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 41883C 802A3AAC 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 418840 802A3AB0 54400006 */ bnel $v0, $zero, .L802A3ACC_7AB46C
/* 418844 802A3AB4 24040004 */ addiu $a0, $zero, 0x4
/* 418848 802A3AB8 24040002 */ addiu $a0, $zero, 0x2
/* 41884C 802A3ABC 0C051F9F */ jal set_window_update
/* 418850 802A3AC0 0080282D */ daddu $a1, $a0, $zero
/* 418854 802A3AC4 080A8EB6 */ j .L802A3AD8_7AB478
/* 418858 802A3AC8 24040003 */ addiu $a0, $zero, 0x3
.L802A3ACC_7AB46C:
/* 41885C 802A3ACC 0C051F9F */ jal set_window_update
/* 418860 802A3AD0 24050002 */ addiu $a1, $zero, 0x2
/* 418864 802A3AD4 24040005 */ addiu $a0, $zero, 0x5
.L802A3AD8_7AB478:
/* 418868 802A3AD8 0C051F9F */ jal set_window_update
/* 41886C 802A3ADC 24050002 */ addiu $a1, $zero, 0x2
/* 418870 802A3AE0 24040008 */ addiu $a0, $zero, 0x8
/* 418874 802A3AE4 0C051F9F */ jal set_window_update
D_802A3AE8_7AB488:
/* 418878 802A3AE8 24050002 */ addiu $a1, $zero, 0x2
/* 41887C 802A3AEC 3C11001D */ lui $s1, (0x1D00C3 >> 16)
/* 418880 802A3AF0 3C02802B */ lui $v0, %hi(D_802AD258)
/* 418884 802A3AF4 8C42D258 */ lw $v0, %lo(D_802AD258)($v0)
/* 418888 802A3AF8 14400008 */ bnez $v0, .L802A3B1C_7AB4BC
/* 41888C 802A3AFC 363100C3 */ ori $s1, $s1, (0x1D00C3 & 0xFFFF)
/* 418890 802A3B00 3C11001D */ lui $s1, (0x1D00A0 >> 16)
/* 418894 802A3B04 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 418898 802A3B08 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 41889C 802A3B0C 14400003 */ bnez $v0, .L802A3B1C_7AB4BC
/* 4188A0 802A3B10 363100A0 */ ori $s1, $s1, (0x1D00A0 & 0xFFFF)
/* 4188A4 802A3B14 3C11001D */ lui $s1, (0x1D009F >> 16)
/* 4188A8 802A3B18 3631009F */ ori $s1, $s1, (0x1D009F & 0xFFFF)
.L802A3B1C_7AB4BC:
/* 4188AC 802A3B1C 0220202D */ daddu $a0, $s1, $zero
/* 4188B0 802A3B20 0C04991D */ jal get_msg_width
/* 4188B4 802A3B24 0000282D */ daddu $a1, $zero, $zero
D_802A3B28_7AB4C8:
/* 4188B8 802A3B28 24500017 */ addiu $s0, $v0, 0x17
/* 4188BC 802A3B2C 001017C2 */ srl $v0, $s0, 31
/* 4188C0 802A3B30 02021021 */ addu $v0, $s0, $v0
/* 4188C4 802A3B34 00021043 */ sra $v0, $v0, 1
/* 4188C8 802A3B38 240300A0 */ addiu $v1, $zero, 0xA0
/* 4188CC 802A3B3C 00629823 */ subu $s3, $v1, $v0
/* 4188D0 802A3B40 0C04992C */ jal get_msg_lines
/* 4188D4 802A3B44 0220202D */ daddu $a0, $s1, $zero
/* 4188D8 802A3B48 24040009 */ addiu $a0, $zero, 0x9
/* 4188DC 802A3B4C 0260282D */ daddu $a1, $s3, $zero
/* 4188E0 802A3B50 24060050 */ addiu $a2, $zero, 0x50
/* 4188E4 802A3B54 0200382D */ daddu $a3, $s0, $zero
/* 4188E8 802A3B58 2442FFFF */ addiu $v0, $v0, -0x1
/* 4188EC 802A3B5C 00021040 */ sll $v0, $v0, 1
/* 4188F0 802A3B60 3C03802B */ lui $v1, %hi(D_802AB340_7B2CE0)
/* 4188F4 802A3B64 00621821 */ addu $v1, $v1, $v0
/* 4188F8 802A3B68 8463B340 */ lh $v1, %lo(D_802AB340_7B2CE0)($v1)
/* 4188FC 802A3B6C 24020014 */ addiu $v0, $zero, 0x14
/* 418900 802A3B70 AFA20014 */ sw $v0, 0x14($sp)
/* 418904 802A3B74 3C02802A */ lui $v0, %hi(func_802A4534_7ABED4)
/* 418908 802A3B78 24424534 */ addiu $v0, $v0, %lo(func_802A4534_7ABED4)
/* 41890C 802A3B7C AFA20018 */ sw $v0, 0x18($sp)
/* 418910 802A3B80 2402FFFF */ addiu $v0, $zero, -0x1
/* 418914 802A3B84 AFA0001C */ sw $zero, 0x1C($sp)
/* 418918 802A3B88 AFA20020 */ sw $v0, 0x20($sp)
/* 41891C 802A3B8C 0C051F32 */ jal set_window_properties
/* 418920 802A3B90 AFA30010 */ sw $v1, 0x10($sp)
/* 418924 802A3B94 24040009 */ addiu $a0, $zero, 0x9
/* 418928 802A3B98 0C051F9F */ jal set_window_update
/* 41892C 802A3B9C 24050001 */ addiu $a1, $zero, 0x1
/* 418930 802A3BA0 2403003C */ addiu $v1, $zero, 0x3C
/* 418934 802A3BA4 3C01802B */ lui $at, %hi(D_802AD10B)
/* 418938 802A3BA8 A023D10B */ sb $v1, %lo(D_802AD10B)($at)
/* 41893C 802A3BAC 2403002A */ addiu $v1, $zero, 0x2A
/* 418940 802A3BB0 3C01802B */ lui $at, %hi(battle_menu_moveState)
/* 418944 802A3BB4 A023D108 */ sb $v1, %lo(battle_menu_moveState)($at)
/* 418948 802A3BB8 080A8F1C */ j .L802A3C70_7AB610
/* 41894C 802A3BBC 2402FFFF */ addiu $v0, $zero, -0x1
glabel .L802A3BC0_7AB560
/* 418950 802A3BC0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 418954 802A3BC4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 418958 802A3BC8 8C420010 */ lw $v0, 0x10($v0)
/* 41895C 802A3BCC 3042C000 */ andi $v0, $v0, 0xC000
/* 418960 802A3BD0 10400003 */ beqz $v0, .L802A3BE0_7AB580
/* 418964 802A3BD4 00000000 */ nop
D_802A3BD8_7AB578:
/* 418968 802A3BD8 3C01802B */ lui $at, %hi(D_802AD10B)
/* 41896C 802A3BDC A020D10B */ sb $zero, %lo(D_802AD10B)($at)
.L802A3BE0_7AB580:
/* 418970 802A3BE0 3C04802B */ lui $a0, %hi(D_802AD10B)
/* 418974 802A3BE4 2484D10B */ addiu $a0, $a0, %lo(D_802AD10B)
/* 418978 802A3BE8 80820000 */ lb $v0, 0x0($a0)
/* 41897C 802A3BEC 90830000 */ lbu $v1, 0x0($a0)
/* 418980 802A3BF0 10400004 */ beqz $v0, .L802A3C04_7AB5A4
/* 418984 802A3BF4 2462FFFF */ addiu $v0, $v1, -0x1
/* 418988 802A3BF8 A0820000 */ sb $v0, 0x0($a0)
/* 41898C 802A3BFC 080A8F1C */ j .L802A3C70_7AB610
/* 418990 802A3C00 2402FFFF */ addiu $v0, $zero, -0x1
.L802A3C04_7AB5A4:
/* 418994 802A3C04 24040009 */ addiu $a0, $zero, 0x9
/* 418998 802A3C08 0C051F9F */ jal set_window_update
/* 41899C 802A3C0C 24050002 */ addiu $a1, $zero, 0x2
/* 4189A0 802A3C10 24040001 */ addiu $a0, $zero, 0x1
/* 4189A4 802A3C14 0C051F9F */ jal set_window_update
/* 4189A8 802A3C18 0080282D */ daddu $a1, $a0, $zero
/* 4189AC 802A3C1C 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 4189B0 802A3C20 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 4189B4 802A3C24 54400006 */ bnel $v0, $zero, .L802A3C40_7AB5E0
/* 4189B8 802A3C28 24040004 */ addiu $a0, $zero, 0x4
/* 4189BC 802A3C2C 24040002 */ addiu $a0, $zero, 0x2
/* 4189C0 802A3C30 0C051F9F */ jal set_window_update
/* 4189C4 802A3C34 24050001 */ addiu $a1, $zero, 0x1
/* 4189C8 802A3C38 080A8F13 */ j D_802A3C4C_7AB5EC
/* 4189CC 802A3C3C 24040003 */ addiu $a0, $zero, 0x3
.L802A3C40_7AB5E0:
/* 4189D0 802A3C40 0C051F9F */ jal set_window_update
/* 4189D4 802A3C44 24050001 */ addiu $a1, $zero, 0x1
/* 4189D8 802A3C48 24040005 */ addiu $a0, $zero, 0x5
D_802A3C4C_7AB5EC:
/* 4189DC 802A3C4C 0C051F9F */ jal set_window_update
/* 4189E0 802A3C50 24050001 */ addiu $a1, $zero, 0x1
/* 4189E4 802A3C54 24040008 */ addiu $a0, $zero, 0x8
/* 4189E8 802A3C58 0C051F9F */ jal set_window_update
/* 4189EC 802A3C5C 24050001 */ addiu $a1, $zero, 0x1
/* 4189F0 802A3C60 24020001 */ addiu $v0, $zero, 0x1
.L802A3C64_7AB604:
/* 4189F4 802A3C64 3C01802B */ lui $at, %hi(battle_menu_moveState)
/* 4189F8 802A3C68 A022D108 */ sb $v0, %lo(battle_menu_moveState)($at)
glabel .L802A3C6C_7AB60C
/* 4189FC 802A3C6C 0000102D */ daddu $v0, $zero, $zero
.L802A3C70_7AB610:
/* 418A00 802A3C70 8FBF0044 */ lw $ra, 0x44($sp)
/* 418A04 802A3C74 8FB60040 */ lw $s6, 0x40($sp)
/* 418A08 802A3C78 8FB5003C */ lw $s5, 0x3C($sp)
/* 418A0C 802A3C7C 8FB40038 */ lw $s4, 0x38($sp)
/* 418A10 802A3C80 8FB30034 */ lw $s3, 0x34($sp)
/* 418A14 802A3C84 8FB20030 */ lw $s2, 0x30($sp)
/* 418A18 802A3C88 8FB1002C */ lw $s1, 0x2C($sp)
/* 418A1C 802A3C8C 8FB00028 */ lw $s0, 0x28($sp)
/* 418A20 802A3C90 03E00008 */ jr $ra
/* 418A24 802A3C94 27BD0048 */ addiu $sp, $sp, 0x48
### DECOMPILED C INSTRUCTIONS:
s32 btl_submenu_moves_update(void) {
BattleStatus* battleStatus = &gBattleStatus;
s8 temp_v0_14;
s32 moveX;
s32 moveY;
s32 msgWidth;
s32 msgX;
s32 msgID;
s32 cond;
s32 id;
s32 i;
s32 j;
switch (battle_menu_moveState) {
case BTL_SUBMENU_MOVES_STATE_UNK_0:
battle_menu_moveScrollOffset = -battle_menu_moveScrollLine * 13;
D_802AD112 = (battle_menu_moveCursorPos - battle_menu_moveScrollLine) * 13;
BattleMenu_Moves_PosX = 20;
BattleMenu_Moves_PosY = 68;
for (i = 0; i < BattleMenu_Moves_OptionCount; i++) {
BattleMenu_Moves_OptionIndexMap[i] = i;
}
if (!BattleMenu_UsingSpiritsSubmenu) {
for (i = 0; i < (BattleMenu_Moves_OptionCount - 1); i++) {
for (j = i + 1; j < BattleMenu_Moves_OptionCount; j++) {
do {
s32 temp1 = BattleMenu_Moves_OptionIndexMap[i];
s32 temp2 = BattleMenu_Moves_OptionIndexMap[j];
if (BattleMenu_Moves_OptionSortPriority[temp1] < BattleMenu_Moves_OptionSortPriority[temp2]) {
continue;
}
if (
BattleMenu_Moves_OptionSortPriority[temp1] != BattleMenu_Moves_OptionSortPriority[temp2] ||
(battle_menu_moveOptionDisplayCosts[temp1] >= battle_menu_moveOptionDisplayCosts[temp2]) &&
(battle_menu_moveOptionDisplayCosts[temp1] != battle_menu_moveOptionDisplayCosts[temp2] ||
battle_menu_moveOptionBPCosts[temp1] >= battle_menu_moveOptionBPCosts[temp2])
)
{
s32 swapTmp = BattleMenu_Moves_OptionIndexMap[i];
BattleMenu_Moves_OptionIndexMap[i] = BattleMenu_Moves_OptionIndexMap[j];
BattleMenu_Moves_OptionIndexMap[j] = swapTmp;
}
} while (0);
}
}
}
for (i = 0; i < BattleMenu_Moves_OptionCount; i++) {
id = hud_element_create(battle_menu_moveOptionIconScripts[BattleMenu_Moves_OptionIndexMap[i]]);
BattleMenu_Moves_OptionIDs[i] = id;
hud_element_set_scale(id, 0.45f);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
}
id = hud_element_create(&HES_AnimatedHandPointer);
BattleMenu_Moves_CursorID = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, BattleMenu_Moves_PosX, BattleMenu_Moves_PosY);
id = hud_element_create(&HES_GreenArrowUp);
BattleMenu_Moves_UpArrowID = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, BattleMenu_Moves_PosX + 39, BattleMenu_Moves_PosY - 7);
id = hud_element_create(&HES_GreenArrowDown);
BattleMenu_Moves_DownArrowID = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, BattleMenu_Moves_PosX + 39, BattleMenu_Moves_PosY + 78);
if (!BattleMenu_UsingSpiritsSubmenu) {
id = hud_element_create(&HES_StatusFlower);
BattleMenu_Moves_TitleID = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
} else {
id = hud_element_create(&HES_MenuStarPower);
BattleMenu_Moves_TitleID = id;
hud_element_set_scale(id, 0.75f);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
}
hud_element_set_render_pos(id, BattleMenu_Moves_PosX + 56, BattleMenu_Moves_PosY);
for (i = 0; i < BattleMenu_Moves_OptionCount; i++) {
if (!BattleMenu_UsingSpiritsSubmenu) {
switch (battle_menu_moveOptionDisplayCostReductionColors[i]) {
case 0:
id = hud_element_create(&HES_FPCost);
BattleMenu_Moves_OptionCostUnitIDs[i] = id;
break;
case 1:
id = hud_element_create(&HES_FPCostReduced);
BattleMenu_Moves_OptionCostUnitIDs[i] = id;
break;
default:
id = hud_element_create(&HES_FPCostReducedTwice);
BattleMenu_Moves_OptionCostUnitIDs[i] = id;
break;
}
} else {
switch (battle_menu_moveOptionDisplayCostReductionColors[i]) {
case 0:
id = hud_element_create(&HES_POWCost);
BattleMenu_Moves_OptionCostUnitIDs[i] = id;
break;
case 1:
id = hud_element_create(&HES_POWCostReduced);
BattleMenu_Moves_OptionCostUnitIDs[i] = id;
break;
default:
id = hud_element_create(&HES_POWCostReducedTwice);
BattleMenu_Moves_OptionCostUnitIDs[i] = id;
break;
}
}
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, BattleMenu_Moves_PosX + 56, BattleMenu_Moves_PosY);
}
BattleMenu_Moves_TextColor = MSG_PAL_STANDARD;
moveX = BattleMenu_Moves_PosX;
moveY = BattleMenu_Moves_PosY;
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_properties(1, moveX, moveY, 150, (D_802AD10E * 13) + 28, 0, func_802A3C98, NULL, -1);
set_window_properties(2, moveX + 16, moveY - 6, 90, 16, 1, func_802A43DC, NULL, -1);
set_window_properties(3, moveX + 114, moveY - 12, 32, 32, 1, func_802A4448, NULL, -1);
} else {
s16 new_var;
set_window_properties(1, moveX, moveY, 144, (D_802AD10E * 13) + 28, 0, func_802A3C98, NULL, -1);
new_var = moveY; // todo required to match
set_window_properties(4, moveX + 10, new_var - 6, 100, 16, 1, func_802A43DC, 0, -1);
set_window_properties(5, moveX + 110, new_var - 12, 32, 35, 1, func_802A4448, 0, -1);
}
moveX = 20;
moveY = BattleMenu_Moves_PosY;
set_window_properties(8, moveX, 186, 280, 32, WINDOW_PRIORITY_20, func_802A4494, NULL, -1);
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_SHOW);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_SHOW);
} else {
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_SHOW);
}
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
do {
cond = FALSE;
if (battle_menu_moveCursorPos >= (battle_menu_moveScrollLine + D_802AD10D) - 1) {
battle_menu_moveScrollLine++;
if (battle_menu_moveScrollLine > BattleMenu_Moves_OptionCount - 6) {
battle_menu_moveScrollLine = BattleMenu_Moves_OptionCount - 6;
if (battle_menu_moveScrollLine < 0) {
battle_menu_moveScrollLine = 0;
}
} else {
cond = TRUE;
}
}
} while (cond);
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_1;
D_802AD10D = battle_menu_moveScrollLine + 6;
battle_menu_moveScrollOffset = -battle_menu_moveScrollLine * 13;
D_802AD112 = (battle_menu_moveCursorPos - battle_menu_moveScrollLine) * 13;
break;
case BTL_SUBMENU_MOVES_STATE_UNK_1:
D_802AD10A = battle_menu_moveCursorPos;
if (battleStatus->currentButtonsHeld & (BUTTON_STICK_UP | BUTTON_Z)) {
if (battle_menu_moveCursorPos > 0) {
battle_menu_moveCursorPos--;
} else if (battleStatus->currentButtonsPressed & (BUTTON_STICK_UP | BUTTON_Z)) {
battle_menu_moveCursorPos--;
}
}
if (battleStatus->currentButtonsHeld & (BUTTON_STICK_DOWN | BUTTON_R)) {
if (battle_menu_moveCursorPos < BattleMenu_Moves_OptionCount - 1) {
battle_menu_moveCursorPos++;
} else if (battleStatus->currentButtonsPressed & (BUTTON_STICK_DOWN | BUTTON_R)) {
battle_menu_moveCursorPos++;
}
}
if (battle_menu_moveCursorPos < 0) {
battle_menu_moveCursorPos = BattleMenu_Moves_OptionCount - 1;
}
if (BattleMenu_Moves_OptionCount - 1 < battle_menu_moveCursorPos) {
battle_menu_moveCursorPos = 0;
}
if (D_802AD10A != battle_menu_moveCursorPos) {
hud_element_set_scale(BattleMenu_Moves_OptionIDs[D_802AD10A], 0.45f);
sfx_play_sound(SOUND_MENU_CHANGE_SELECTION);
}
if (battle_menu_moveCursorPos < battle_menu_moveScrollLine + 1) {
battle_menu_moveScrollLine--;
if (battle_menu_moveScrollLine < 0) {
battle_menu_moveScrollLine = 0;
}
}
if (battle_menu_moveCursorPos >= (D_802AD10D - 1)) {
battle_menu_moveScrollLine++;
if (battle_menu_moveScrollLine > BattleMenu_Moves_OptionCount - 6) {
battle_menu_moveScrollLine = BattleMenu_Moves_OptionCount - 6;
if (battle_menu_moveScrollLine < 0) {
battle_menu_moveScrollLine = 0;
}
}
}
D_802AD10D = battle_menu_moveScrollLine + 6;
if (battleStatus->currentButtonsPressed & BUTTON_A) {
if (BattleMenu_Moves_OptionEnabled[BattleMenu_Moves_OptionIndexMap[battle_menu_moveCursorPos]] == 1) {
sfx_play_sound(SOUND_MENU_NEXT);
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_NEGATIVE_ONE;
} else {
sfx_play_sound(SOUND_MENU_ERROR);
D_802AD258 = 0;
temp_v0_14 = BattleMenu_Moves_OptionCantUseMessages[BattleMenu_Moves_OptionIndexMap[battle_menu_moveCursorPos]];
if (temp_v0_14 != 0) {
D_802AD258 = temp_v0_14;
}
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_28;
}
break;
}
if (battleStatus->currentButtonsPressed & BUTTON_B) {
sfx_play_sound(SOUND_MENU_BACK);
func_802A27E4();
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_NEGATIVE_TWO;
}
break;
case BTL_SUBMENU_MOVES_STATE_UNK_NEGATIVE_ONE:
for (i = 0; i < BattleMenu_Moves_OptionCount; i++) {
id = BattleMenu_Moves_OptionIDs[i];
hud_element_set_tint(id, 160, 160, 160);
}
hud_element_set_tint(BattleMenu_Moves_CursorID, 160, 160, 160);
hud_element_set_tint(BattleMenu_Moves_UpArrowID, 160, 160, 160);
hud_element_set_tint(BattleMenu_Moves_DownArrowID, 160, 160, 160);
hud_element_set_tint(BattleMenu_Moves_TitleID, 160, 160, 160);
for (i = 0; i < BattleMenu_Moves_OptionCount; i++) {
id = BattleMenu_Moves_OptionCostUnitIDs[i];
hud_element_set_tint(id, 160, 160, 160);
}
hud_element_set_script(BattleMenu_Moves_CursorID, &HES_HandPointer);
BattleMenu_Moves_TextColor = MSG_PAL_0D;
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_DARKENED);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_DARKENED);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_DARKENED);
} else {
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_DARKENED);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_DARKENED);
}
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
if (!BattleMenu_UsingSpiritsSubmenu) {
status_bar_stop_blinking_fp();
} else {
status_bar_stop_blinking_sp();
}
battle_menu_moveOptionActive = battle_menu_moveCursorPos;
return BattleMenu_Moves_OptionIndexMap[battle_menu_moveCursorPos] + 1;
case BTL_SUBMENU_MOVES_STATE_UNK_NEGATIVE_TWO:
if (!BattleMenu_UsingSpiritsSubmenu) {
status_bar_stop_blinking_fp();
} else {
status_bar_stop_blinking_sp();
}
return 255;
case BTL_SUBMENU_MOVES_STATE_UNK_A:
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_HIDE);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_HIDE);
} else {
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_HIDE);
}
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
if (!BattleMenu_UsingSpiritsSubmenu) {
status_bar_stop_blinking_fp();
} else {
status_bar_stop_blinking_sp();
}
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_B;
battle_menu_moveOptionActive = battle_menu_moveCursorPos;
return BattleMenu_Moves_OptionIndexMap[battle_menu_moveCursorPos] + 1;
case BTL_SUBMENU_MOVES_STATE_UNK_B:
battle_menu_moveOptionActive = battle_menu_moveCursorPos;
return BattleMenu_Moves_OptionIndexMap[battle_menu_moveCursorPos] + 1;
case BTL_SUBMENU_MOVES_STATE_UNK_14:
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_SHOW);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_SHOW);
} else {
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_SHOW);
}
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_1;
battle_menu_moveOptionActive = battle_menu_moveCursorPos;
return BattleMenu_Moves_OptionIndexMap[battle_menu_moveCursorPos] + 1;
case BTL_SUBMENU_MOVES_STATE_UNK_1E:
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_9);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_9);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_9);
} else {
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_9);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_9);
}
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_NEGATIVE_ONE;
break;
case BTL_SUBMENU_MOVES_STATE_UNK_28:
battle_menu_moveOptionActive = -1;
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_29;
return -1;
case BTL_SUBMENU_MOVES_STATE_UNK_29:
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_HIDE);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_HIDE);
} else {
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_HIDE);
}
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
msgID = MSG_Menus_Battle_CantSelectNow;
if (D_802AD258 == 0) {
if (!BattleMenu_UsingSpiritsSubmenu) {
msgID = MSG_Menus_NotEnoughFP;
} else {
msgID = MSG_Menus_NotEnoughStarPower;
}
}
msgWidth = get_msg_width(msgID, 0) + 23;
moveX = (SCREEN_WIDTH / 2) - (msgWidth / 2);
set_window_properties(9, moveX, 80, msgWidth, D_802AB340[get_msg_lines(msgID) - 1], 20, func_802A4534, NULL, -1);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
D_802AD10B = 60;
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_2A;
return -1;
case BTL_SUBMENU_MOVES_STATE_UNK_2A:
if (gGameStatusPtr->pressedButtons[0] & (BUTTON_A | BUTTON_B)) {
D_802AD10B = 0;
}
if (D_802AD10B != 0) {
D_802AD10B--;
return -1;
}
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_SHOW);
if (!BattleMenu_UsingSpiritsSubmenu) {
set_window_update(WINDOW_ID_2, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_3, WINDOW_UPDATE_SHOW);
} else {
set_window_update(WINDOW_ID_4, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_5, WINDOW_UPDATE_SHOW);
}
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_1;
break;
}
return 0;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel update_status_bar
/* 81564 800E80B4 27BDFF70 */ addiu $sp, $sp, -0x90
/* 81568 800E80B8 AFB00068 */ sw $s0, 0x68($sp)
/* 8156C 800E80BC 3C108007 */ lui $s0, %hi(gGameStatusPtr)
/* 81570 800E80C0 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr)
/* 81574 800E80C4 AFBF008C */ sw $ra, 0x8C($sp)
/* 81578 800E80C8 AFBE0088 */ sw $fp, 0x88($sp)
/* 8157C 800E80CC AFB70084 */ sw $s7, 0x84($sp)
/* 81580 800E80D0 AFB60080 */ sw $s6, 0x80($sp)
/* 81584 800E80D4 AFB5007C */ sw $s5, 0x7C($sp)
/* 81588 800E80D8 AFB40078 */ sw $s4, 0x78($sp)
/* 8158C 800E80DC AFB30074 */ sw $s3, 0x74($sp)
/* 81590 800E80E0 AFB20070 */ sw $s2, 0x70($sp)
/* 81594 800E80E4 AFB1006C */ sw $s1, 0x6C($sp)
/* 81598 800E80E8 8E030000 */ lw $v1, 0x0($s0)
/* 8159C 800E80EC 3C138011 */ lui $s3, %hi(gUIStatus)
/* 815A0 800E80F0 2673EF58 */ addiu $s3, $s3, %lo(gUIStatus)
/* 815A4 800E80F4 806200A8 */ lb $v0, 0xA8($v1)
/* 815A8 800E80F8 3C118011 */ lui $s1, %hi(gPlayerStatus)
/* 815AC 800E80FC 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus)
/* 815B0 800E8100 04410469 */ bgez $v0, .L800E92A8
/* 815B4 800E8104 00000000 */ nop
/* 815B8 800E8108 80620071 */ lb $v0, 0x71($v1)
/* 815BC 800E810C 14400466 */ bnez $v0, .L800E92A8
/* 815C0 800E8110 00000000 */ nop
/* 815C4 800E8114 9062007E */ lbu $v0, 0x7E($v1)
/* 815C8 800E8118 30420001 */ andi $v0, $v0, 0x1
/* 815CC 800E811C 14400462 */ bnez $v0, .L800E92A8
/* 815D0 800E8120 0000202D */ daddu $a0, $zero, $zero
/* 815D4 800E8124 3C05F5DE */ lui $a1, (0xF5DE0180 >> 16)
/* 815D8 800E8128 0C0B1EAF */ jal evt_get_variable
/* 815DC 800E812C 34A50180 */ ori $a1, $a1, (0xF5DE0180 & 0xFFFF)
/* 815E0 800E8130 28420060 */ slti $v0, $v0, 0x60
/* 815E4 800E8134 1040045C */ beqz $v0, .L800E92A8
/* 815E8 800E8138 00000000 */ nop
/* 815EC 800E813C 8E020000 */ lw $v0, 0x0($s0)
/* 815F0 800E8140 80420070 */ lb $v0, 0x70($v0)
/* 815F4 800E8144 14400008 */ bnez $v0, .L800E8168
/* 815F8 800E8148 00000000 */ nop
/* 815FC 800E814C 3C038011 */ lui $v1, %hi(gPlayerData + 0xC)
/* 81600 800E8150 8463F29C */ lh $v1, %lo(gPlayerData + 0xC)($v1)
/* 81604 800E8154 86620040 */ lh $v0, 0x40($s3)
/* 81608 800E8158 10620007 */ beq $v1, $v0, .L800E8178
/* 8160C 800E815C 00628023 */ subu $s0, $v1, $v0
/* 81610 800E8160 0C03A67D */ jal status_bar_start_blinking_coins
/* 81614 800E8164 00000000 */ nop
.L800E8168:
/* 81618 800E8168 3C038011 */ lui $v1, %hi(gPlayerData + 0xC)
/* 8161C 800E816C 8463F29C */ lh $v1, %lo(gPlayerData + 0xC)($v1)
/* 81620 800E8170 86620040 */ lh $v0, 0x40($s3)
/* 81624 800E8174 00628023 */ subu $s0, $v1, $v0
.L800E8178:
/* 81628 800E8178 06010004 */ bgez $s0, .L800E818C
/* 8162C 800E817C 3C036666 */ lui $v1, (0x66666667 >> 16)
/* 81630 800E8180 34636667 */ ori $v1, $v1, (0x66666667 & 0xFFFF)
/* 81634 800E8184 0803A065 */ j .L800E8194
/* 81638 800E8188 2602FFFC */ addiu $v0, $s0, -0x4
.L800E818C:
/* 8163C 800E818C 34636667 */ ori $v1, $v1, (0x66666667 & 0xFFFF)
/* 81640 800E8190 26020004 */ addiu $v0, $s0, 0x4
.L800E8194:
/* 81644 800E8194 00430018 */ mult $v0, $v1
/* 81648 800E8198 000217C3 */ sra $v0, $v0, 31
/* 8164C 800E819C 00004810 */ mfhi $t1
/* 81650 800E81A0 00091843 */ sra $v1, $t1, 1
/* 81654 800E81A4 00628023 */ subu $s0, $v1, $v0
/* 81658 800E81A8 96620040 */ lhu $v0, 0x40($s3)
/* 8165C 800E81AC 8264003D */ lb $a0, 0x3D($s3)
/* 81660 800E81B0 3C038011 */ lui $v1, %hi(gPlayerData + 0x2)
/* 81664 800E81B4 8063F292 */ lb $v1, %lo(gPlayerData + 0x2)($v1)
/* 81668 800E81B8 00501021 */ addu $v0, $v0, $s0
/* 8166C 800E81BC 1083000C */ beq $a0, $v1, .L800E81F0
/* 81670 800E81C0 A6620040 */ sh $v0, 0x40($s3)
/* 81674 800E81C4 82620044 */ lb $v0, 0x44($s3)
/* 81678 800E81C8 14400009 */ bnez $v0, .L800E81F0
/* 8167C 800E81CC 00000000 */ nop
/* 81680 800E81D0 8262003A */ lb $v0, 0x3A($s3)
/* 81684 800E81D4 10400005 */ beqz $v0, .L800E81EC
/* 81688 800E81D8 24020046 */ addiu $v0, $zero, 0x46
/* 8168C 800E81DC A6620038 */ sh $v0, 0x38($s3)
/* 81690 800E81E0 A260003A */ sb $zero, 0x3A($s3)
/* 81694 800E81E4 0803A07C */ j .L800E81F0
/* 81698 800E81E8 A260003B */ sb $zero, 0x3B($s3)
.L800E81EC:
/* 8169C 800E81EC A6620038 */ sh $v0, 0x38($s3)
.L800E81F0:
/* 816A0 800E81F0 8263003E */ lb $v1, 0x3E($s3)
/* 816A4 800E81F4 3C028011 */ lui $v0, %hi(gPlayerData + 0x5)
/* 816A8 800E81F8 8042F295 */ lb $v0, %lo(gPlayerData + 0x5)($v0)
/* 816AC 800E81FC 1062000C */ beq $v1, $v0, .L800E8230
/* 816B0 800E8200 00000000 */ nop
/* 816B4 800E8204 82620044 */ lb $v0, 0x44($s3)
/* 816B8 800E8208 14400009 */ bnez $v0, .L800E8230
/* 816BC 800E820C 00000000 */ nop
/* 816C0 800E8210 8262003A */ lb $v0, 0x3A($s3)
/* 816C4 800E8214 10400005 */ beqz $v0, .L800E822C
/* 816C8 800E8218 24020046 */ addiu $v0, $zero, 0x46
/* 816CC 800E821C A6620038 */ sh $v0, 0x38($s3)
/* 816D0 800E8220 A260003A */ sb $zero, 0x3A($s3)
/* 816D4 800E8224 0803A08C */ j .L800E8230
/* 816D8 800E8228 A260003B */ sb $zero, 0x3B($s3)
.L800E822C:
/* 816DC 800E822C A6620038 */ sh $v0, 0x38($s3)
.L800E8230:
/* 816E0 800E8230 86630048 */ lh $v1, 0x48($s3)
/* 816E4 800E8234 3C028011 */ lui $v0, %hi(gPlayerData + 0x290)
/* 816E8 800E8238 8442F520 */ lh $v0, %lo(gPlayerData + 0x290)($v0)
/* 816EC 800E823C 1062000C */ beq $v1, $v0, .L800E8270
/* 816F0 800E8240 00000000 */ nop
/* 816F4 800E8244 82620044 */ lb $v0, 0x44($s3)
/* 816F8 800E8248 14400009 */ bnez $v0, .L800E8270
/* 816FC 800E824C 00000000 */ nop
/* 81700 800E8250 8262003A */ lb $v0, 0x3A($s3)
/* 81704 800E8254 10400005 */ beqz $v0, .L800E826C
/* 81708 800E8258 24020046 */ addiu $v0, $zero, 0x46
/* 8170C 800E825C A6620038 */ sh $v0, 0x38($s3)
/* 81710 800E8260 A260003A */ sb $zero, 0x3A($s3)
/* 81714 800E8264 0803A09C */ j .L800E8270
/* 81718 800E8268 A260003B */ sb $zero, 0x3B($s3)
.L800E826C:
/* 8171C 800E826C A6620038 */ sh $v0, 0x38($s3)
.L800E8270:
/* 81720 800E8270 8264003D */ lb $a0, 0x3D($s3)
/* 81724 800E8274 3C038011 */ lui $v1, %hi(gPlayerData + 0x2)
/* 81728 800E8278 8063F292 */ lb $v1, %lo(gPlayerData + 0x2)($v1)
/* 8172C 800E827C 1083002E */ beq $a0, $v1, .L800E8338
/* 81730 800E8280 00000000 */ nop
/* 81734 800E8284 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 81738 800E8288 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 8173C 800E828C 80420070 */ lb $v0, 0x70($v0)
/* 81740 800E8290 14400005 */ bnez $v0, .L800E82A8
/* 81744 800E8294 0064102A */ slt $v0, $v1, $a0
/* 81748 800E8298 10400003 */ beqz $v0, .L800E82A8
/* 8174C 800E829C 00000000 */ nop
/* 81750 800E82A0 0C03A648 */ jal status_bar_start_blinking_hp
/* 81754 800E82A4 00000000 */ nop
.L800E82A8:
/* 81758 800E82A8 8262003D */ lb $v0, 0x3D($s3)
/* 8175C 800E82AC 3C038011 */ lui $v1, %hi(gPlayerData + 0x2)
/* 81760 800E82B0 8063F292 */ lb $v1, %lo(gPlayerData + 0x2)($v1)
/* 81764 800E82B4 0043102A */ slt $v0, $v0, $v1
/* 81768 800E82B8 10400018 */ beqz $v0, .L800E831C
/* 8176C 800E82BC 9263003D */ lbu $v1, 0x3D($s3)
/* 81770 800E82C0 86620036 */ lh $v0, 0x36($s3)
/* 81774 800E82C4 28420012 */ slti $v0, $v0, 0x12
/* 81778 800E82C8 1440000C */ bnez $v0, .L800E82FC
/* 8177C 800E82CC 00000000 */ nop
/* 81780 800E82D0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 81784 800E82D4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 81788 800E82D8 94420134 */ lhu $v0, 0x134($v0)
/* 8178C 800E82DC 30420003 */ andi $v0, $v0, 0x3
/* 81790 800E82E0 14400015 */ bnez $v0, .L800E8338
/* 81794 800E82E4 24620001 */ addiu $v0, $v1, 0x1
/* 81798 800E82E8 A262003D */ sb $v0, 0x3D($s3)
/* 8179C 800E82EC 0C05272D */ jal sfx_play_sound
/* 817A0 800E82F0 24040213 */ addiu $a0, $zero, 0x213
/* 817A4 800E82F4 0803A0CE */ j .L800E8338
/* 817A8 800E82F8 00000000 */ nop
.L800E82FC:
/* 817AC 800E82FC 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 817B0 800E8300 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 817B4 800E8304 94420134 */ lhu $v0, 0x134($v0)
/* 817B8 800E8308 30420003 */ andi $v0, $v0, 0x3
/* 817BC 800E830C 1440000A */ bnez $v0, .L800E8338
/* 817C0 800E8310 24620001 */ addiu $v0, $v1, 0x1
/* 817C4 800E8314 0803A0CE */ j .L800E8338
/* 817C8 800E8318 A262003D */ sb $v0, 0x3D($s3)
.L800E831C:
/* 817CC 800E831C 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 817D0 800E8320 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 817D4 800E8324 94420134 */ lhu $v0, 0x134($v0)
/* 817D8 800E8328 30420003 */ andi $v0, $v0, 0x3
/* 817DC 800E832C 14400002 */ bnez $v0, .L800E8338
/* 817E0 800E8330 2462FFFF */ addiu $v0, $v1, -0x1
/* 817E4 800E8334 A262003D */ sb $v0, 0x3D($s3)
.L800E8338:
/* 817E8 800E8338 8264003E */ lb $a0, 0x3E($s3)
/* 817EC 800E833C 3C038011 */ lui $v1, %hi(gPlayerData + 0x5)
/* 817F0 800E8340 8063F295 */ lb $v1, %lo(gPlayerData + 0x5)($v1)
/* 817F4 800E8344 1083002E */ beq $a0, $v1, .L800E8400
/* 817F8 800E8348 00000000 */ nop
/* 817FC 800E834C 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 81800 800E8350 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 81804 800E8354 80420070 */ lb $v0, 0x70($v0)
/* 81808 800E8358 14400005 */ bnez $v0, .L800E8370
/* 8180C 800E835C 0064102A */ slt $v0, $v1, $a0
/* 81810 800E8360 10400003 */ beqz $v0, .L800E8370
/* 81814 800E8364 00000000 */ nop
/* 81818 800E8368 0C03A663 */ jal status_bar_start_blinking_fp
/* 8181C 800E836C 00000000 */ nop
.L800E8370:
/* 81820 800E8370 8262003E */ lb $v0, 0x3E($s3)
/* 81824 800E8374 3C038011 */ lui $v1, %hi(gPlayerData + 0x5)
/* 81828 800E8378 8063F295 */ lb $v1, %lo(gPlayerData + 0x5)($v1)
/* 8182C 800E837C 0043102A */ slt $v0, $v0, $v1
/* 81830 800E8380 10400018 */ beqz $v0, .L800E83E4
/* 81834 800E8384 9263003E */ lbu $v1, 0x3E($s3)
/* 81838 800E8388 86620036 */ lh $v0, 0x36($s3)
/* 8183C 800E838C 28420012 */ slti $v0, $v0, 0x12
/* 81840 800E8390 1440000C */ bnez $v0, .L800E83C4
/* 81844 800E8394 00000000 */ nop
/* 81848 800E8398 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 8184C 800E839C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 81850 800E83A0 94420134 */ lhu $v0, 0x134($v0)
/* 81854 800E83A4 30420003 */ andi $v0, $v0, 0x3
/* 81858 800E83A8 14400015 */ bnez $v0, .L800E8400
/* 8185C 800E83AC 24620001 */ addiu $v0, $v1, 0x1
/* 81860 800E83B0 A262003E */ sb $v0, 0x3E($s3)
/* 81864 800E83B4 0C05272D */ jal sfx_play_sound
/* 81868 800E83B8 24040217 */ addiu $a0, $zero, 0x217
/* 8186C 800E83BC 0803A100 */ j .L800E8400
/* 81870 800E83C0 00000000 */ nop
.L800E83C4:
/* 81874 800E83C4 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 81878 800E83C8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 8187C 800E83CC 94420134 */ lhu $v0, 0x134($v0)
/* 81880 800E83D0 30420003 */ andi $v0, $v0, 0x3
/* 81884 800E83D4 1440000A */ bnez $v0, .L800E8400
/* 81888 800E83D8 24620001 */ addiu $v0, $v1, 0x1
/* 8188C 800E83DC 0803A100 */ j .L800E8400
/* 81890 800E83E0 A262003E */ sb $v0, 0x3E($s3)
.L800E83E4:
/* 81894 800E83E4 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 81898 800E83E8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 8189C 800E83EC 94420134 */ lhu $v0, 0x134($v0)
/* 818A0 800E83F0 30420003 */ andi $v0, $v0, 0x3
/* 818A4 800E83F4 14400002 */ bnez $v0, .L800E8400
/* 818A8 800E83F8 2462FFFF */ addiu $v0, $v1, -0x1
/* 818AC 800E83FC A262003E */ sb $v0, 0x3E($s3)
.L800E8400:
/* 818B0 800E8400 86620048 */ lh $v0, 0x48($s3)
/* 818B4 800E8404 3C048011 */ lui $a0, %hi(gPlayerData + 0x290)
/* 818B8 800E8408 8484F520 */ lh $a0, %lo(gPlayerData + 0x290)($a0)
/* 818BC 800E840C 96630048 */ lhu $v1, 0x48($s3)
/* 818C0 800E8410 1044001A */ beq $v0, $a0, .L800E847C
/* 818C4 800E8414 0044102A */ slt $v0, $v0, $a0
/* 818C8 800E8418 1040000D */ beqz $v0, .L800E8450
/* 818CC 800E841C 2462000A */ addiu $v0, $v1, 0xA
/* 818D0 800E8420 A6620048 */ sh $v0, 0x48($s3)
/* 818D4 800E8424 00021400 */ sll $v0, $v0, 16
/* 818D8 800E8428 3C038011 */ lui $v1, %hi(gPlayerData + 0x290)
/* 818DC 800E842C 8463F520 */ lh $v1, %lo(gPlayerData + 0x290)($v1)
/* 818E0 800E8430 00021403 */ sra $v0, $v0, 16
/* 818E4 800E8434 0062182A */ slt $v1, $v1, $v0
/* 818E8 800E8438 3C028011 */ lui $v0, %hi(gPlayerData + 0x290)
/* 818EC 800E843C 9442F520 */ lhu $v0, %lo(gPlayerData + 0x290)($v0)
/* 818F0 800E8440 5460000E */ bnel $v1, $zero, .L800E847C
/* 818F4 800E8444 A6620048 */ sh $v0, 0x48($s3)
/* 818F8 800E8448 0803A11F */ j .L800E847C
/* 818FC 800E844C 00000000 */ nop
.L800E8450:
/* 81900 800E8450 2462FFF6 */ addiu $v0, $v1, -0xA
/* 81904 800E8454 A6620048 */ sh $v0, 0x48($s3)
/* 81908 800E8458 00021400 */ sll $v0, $v0, 16
/* 8190C 800E845C 3C038011 */ lui $v1, %hi(gPlayerData + 0x290)
/* 81910 800E8460 8463F520 */ lh $v1, %lo(gPlayerData + 0x290)($v1)
/* 81914 800E8464 00021403 */ sra $v0, $v0, 16
/* 81918 800E8468 0043102A */ slt $v0, $v0, $v1
/* 8191C 800E846C 3C038011 */ lui $v1, %hi(gPlayerData + 0x290)
/* 81920 800E8470 9463F520 */ lhu $v1, %lo(gPlayerData + 0x290)($v1)
/* 81924 800E8474 54400001 */ bnel $v0, $zero, .L800E847C
/* 81928 800E8478 A6630048 */ sh $v1, 0x48($s3)
.L800E847C:
/* 8192C 800E847C 82620047 */ lb $v0, 0x47($s3)
/* 81930 800E8480 14400389 */ bnez $v0, .L800E92A8
/* 81934 800E8484 00000000 */ nop
/* 81938 800E8488 82620046 */ lb $v0, 0x46($s3)
/* 8193C 800E848C 1040000A */ beqz $v0, .L800E84B8
/* 81940 800E8490 00000000 */ nop
/* 81944 800E8494 8262003A */ lb $v0, 0x3A($s3)
/* 81948 800E8498 10400007 */ beqz $v0, .L800E84B8
/* 8194C 800E849C 00000000 */ nop
/* 81950 800E84A0 82220015 */ lb $v0, 0x15($s1)
/* 81954 800E84A4 14400004 */ bnez $v0, .L800E84B8
/* 81958 800E84A8 2402002A */ addiu $v0, $zero, 0x2A
/* 8195C 800E84AC A6620038 */ sh $v0, 0x38($s3)
/* 81960 800E84B0 A260003A */ sb $zero, 0x3A($s3)
/* 81964 800E84B4 A260003B */ sb $zero, 0x3B($s3)
.L800E84B8:
/* 81968 800E84B8 8263003A */ lb $v1, 0x3A($s3)
/* 8196C 800E84BC 10600005 */ beqz $v1, .L800E84D4
/* 81970 800E84C0 24020001 */ addiu $v0, $zero, 0x1
/* 81974 800E84C4 1062002E */ beq $v1, $v0, .L800E8580
/* 81978 800E84C8 3C08ED03 */ lui $t0, (0xED030050 >> 16)
/* 8197C 800E84CC 0803A188 */ j .L800E8620
/* 81980 800E84D0 35080050 */ ori $t0, $t0, (0xED030050 & 0xFFFF)
.L800E84D4:
/* 81984 800E84D4 96620036 */ lhu $v0, 0x36($s3)
/* 81988 800E84D8 2442000A */ addiu $v0, $v0, 0xA
/* 8198C 800E84DC A6620036 */ sh $v0, 0x36($s3)
/* 81990 800E84E0 00021400 */ sll $v0, $v0, 16
/* 81994 800E84E4 00021403 */ sra $v0, $v0, 16
/* 81998 800E84E8 28420012 */ slti $v0, $v0, 0x12
/* 8199C 800E84EC 1440004B */ bnez $v0, .L800E861C
/* 819A0 800E84F0 3C08ED03 */ lui $t0, (0xED030050 >> 16)
/* 819A4 800E84F4 8263003C */ lb $v1, 0x3C($s3)
/* 819A8 800E84F8 24020012 */ addiu $v0, $zero, 0x12
/* 819AC 800E84FC 10600007 */ beqz $v1, .L800E851C
/* 819B0 800E8500 A6620036 */ sh $v0, 0x36($s3)
/* 819B4 800E8504 8262003B */ lb $v0, 0x3B($s3)
/* 819B8 800E8508 10400004 */ beqz $v0, .L800E851C
/* 819BC 800E850C 00000000 */ nop
/* 819C0 800E8510 822200B4 */ lb $v0, 0xB4($s1)
/* 819C4 800E8514 54400001 */ bnel $v0, $zero, .L800E851C
/* 819C8 800E8518 A6600038 */ sh $zero, 0x38($s3)
.L800E851C:
/* 819CC 800E851C 86620038 */ lh $v0, 0x38($s3)
/* 819D0 800E8520 96630038 */ lhu $v1, 0x38($s3)
/* 819D4 800E8524 10400003 */ beqz $v0, .L800E8534
/* 819D8 800E8528 2462FFFF */ addiu $v0, $v1, -0x1
/* 819DC 800E852C 0803A186 */ j .L800E8618
/* 819E0 800E8530 A6620038 */ sh $v0, 0x38($s3)
.L800E8534:
/* 819E4 800E8534 82620044 */ lb $v0, 0x44($s3)
/* 819E8 800E8538 14400038 */ bnez $v0, .L800E861C
/* 819EC 800E853C 3C08ED03 */ lui $t0, (0xED030050 >> 16)
/* 819F0 800E8540 8262003B */ lb $v0, 0x3B($s3)
/* 819F4 800E8544 10400004 */ beqz $v0, .L800E8558
/* 819F8 800E8548 00000000 */ nop
/* 819FC 800E854C 822200B4 */ lb $v0, 0xB4($s1)
/* 81A00 800E8550 10400033 */ beqz $v0, .L800E8620
/* 81A04 800E8554 35080050 */ ori $t0, $t0, (0xED030050 & 0xFFFF)
.L800E8558:
/* 81A08 800E8558 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 81A0C 800E855C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 81A10 800E8560 80420070 */ lb $v0, 0x70($v0)
/* 81A14 800E8564 1440002D */ bnez $v0, .L800E861C
/* 81A18 800E8568 3C08ED03 */ lui $t0, (0xED030050 >> 16)
/* 81A1C 800E856C 24020001 */ addiu $v0, $zero, 0x1
/* 81A20 800E8570 A262003A */ sb $v0, 0x3A($s3)
/* 81A24 800E8574 A6600038 */ sh $zero, 0x38($s3)
/* 81A28 800E8578 0803A187 */ j .L800E861C
/* 81A2C 800E857C A260003C */ sb $zero, 0x3C($s3)
.L800E8580:
/* 81A30 800E8580 96620036 */ lhu $v0, 0x36($s3)
/* 81A34 800E8584 2442FFFB */ addiu $v0, $v0, -0x5
/* 81A38 800E8588 A6620036 */ sh $v0, 0x36($s3)
/* 81A3C 800E858C 00021400 */ sll $v0, $v0, 16
/* 81A40 800E8590 00021403 */ sra $v0, $v0, 16
/* 81A44 800E8594 2842FF9C */ slti $v0, $v0, -0x64
/* 81A48 800E8598 1040001F */ beqz $v0, .L800E8618
/* 81A4C 800E859C 2402FF9C */ addiu $v0, $zero, -0x64
/* 81A50 800E85A0 82630044 */ lb $v1, 0x44($s3)
/* 81A54 800E85A4 1460001C */ bnez $v1, .L800E8618
/* 81A58 800E85A8 A6620036 */ sh $v0, 0x36($s3)
/* 81A5C 800E85AC 822200B4 */ lb $v0, 0xB4($s1)
/* 81A60 800E85B0 5440000A */ bnel $v0, $zero, .L800E85DC
/* 81A64 800E85B4 A6600038 */ sh $zero, 0x38($s3)
/* 81A68 800E85B8 8E220000 */ lw $v0, 0x0($s1)
/* 81A6C 800E85BC 30423000 */ andi $v0, $v0, 0x3000
/* 81A70 800E85C0 10400003 */ beqz $v0, .L800E85D0
/* 81A74 800E85C4 00000000 */ nop
/* 81A78 800E85C8 0803A177 */ j .L800E85DC
/* 81A7C 800E85CC A6600038 */ sh $zero, 0x38($s3)
.L800E85D0:
/* 81A80 800E85D0 96620038 */ lhu $v0, 0x38($s3)
/* 81A84 800E85D4 24420001 */ addiu $v0, $v0, 0x1
/* 81A88 800E85D8 A6620038 */ sh $v0, 0x38($s3)
.L800E85DC:
/* 81A8C 800E85DC 86620038 */ lh $v0, 0x38($s3)
/* 81A90 800E85E0 284200F0 */ slti $v0, $v0, 0xF0
/* 81A94 800E85E4 1440000D */ bnez $v0, .L800E861C
/* 81A98 800E85E8 3C08ED03 */ lui $t0, (0xED030050 >> 16)
/* 81A9C 800E85EC 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 81AA0 800E85F0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 81AA4 800E85F4 80420070 */ lb $v0, 0x70($v0)
/* 81AA8 800E85F8 14400009 */ bnez $v0, .L800E8620
/* 81AAC 800E85FC 35080050 */ ori $t0, $t0, (0xED030050 & 0xFFFF)
/* 81AB0 800E8600 240200D2 */ addiu $v0, $zero, 0xD2
/* 81AB4 800E8604 A6620038 */ sh $v0, 0x38($s3)
/* 81AB8 800E8608 24020001 */ addiu $v0, $zero, 0x1
/* 81ABC 800E860C A260003A */ sb $zero, 0x3A($s3)
/* 81AC0 800E8610 A262003B */ sb $v0, 0x3B($s3)
/* 81AC4 800E8614 A262003C */ sb $v0, 0x3C($s3)
.L800E8618:
/* 81AC8 800E8618 3C08ED03 */ lui $t0, (0xED030050 >> 16)
.L800E861C:
/* 81ACC 800E861C 35080050 */ ori $t0, $t0, (0xED030050 & 0xFFFF)
.L800E8620:
/* 81AD0 800E8620 3C07004D */ lui $a3, (0x4D0370 >> 16)
/* 81AD4 800E8624 34E70370 */ ori $a3, $a3, (0x4D0370 & 0xFFFF)
/* 81AD8 800E8628 0000202D */ daddu $a0, $zero, $zero
/* 81ADC 800E862C 3C06800A */ lui $a2, %hi(gMainGfxPos)
/* 81AE0 800E8630 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos)
/* 81AE4 800E8634 24050005 */ addiu $a1, $zero, 0x5
/* 81AE8 800E8638 241200FF */ addiu $s2, $zero, 0xFF
/* 81AEC 800E863C 24110140 */ addiu $s1, $zero, 0x140
/* 81AF0 800E8640 8CC30000 */ lw $v1, 0x0($a2)
/* 81AF4 800E8644 241000F0 */ addiu $s0, $zero, 0xF0
/* 81AF8 800E8648 0060102D */ daddu $v0, $v1, $zero
/* 81AFC 800E864C 24630008 */ addiu $v1, $v1, 0x8
/* 81B00 800E8650 AC480000 */ sw $t0, 0x0($v0)
/* 81B04 800E8654 AC470004 */ sw $a3, 0x4($v0)
/* 81B08 800E8658 867E0034 */ lh $fp, 0x34($s3)
/* 81B0C 800E865C 86750036 */ lh $s5, 0x36($s3)
/* 81B10 800E8660 240200AE */ addiu $v0, $zero, 0xAE
/* 81B14 800E8664 ACC30000 */ sw $v1, 0x0($a2)
/* 81B18 800E8668 AFA20014 */ sw $v0, 0x14($sp)
/* 81B1C 800E866C 24020023 */ addiu $v0, $zero, 0x23
/* 81B20 800E8670 AFA00010 */ sw $zero, 0x10($sp)
/* 81B24 800E8674 AFA20018 */ sw $v0, 0x18($sp)
/* 81B28 800E8678 AFB2001C */ sw $s2, 0x1C($sp)
/* 81B2C 800E867C AFA00020 */ sw $zero, 0x20($sp)
/* 81B30 800E8680 AFA00024 */ sw $zero, 0x24($sp)
/* 81B34 800E8684 AFA00028 */ sw $zero, 0x28($sp)
/* 81B38 800E8688 AFA0002C */ sw $zero, 0x2C($sp)
/* 81B3C 800E868C AFA00030 */ sw $zero, 0x30($sp)
/* 81B40 800E8690 AFA00034 */ sw $zero, 0x34($sp)
/* 81B44 800E8694 AFA00038 */ sw $zero, 0x38($sp)
/* 81B48 800E8698 AFA0003C */ sw $zero, 0x3C($sp)
/* 81B4C 800E869C AFA00040 */ sw $zero, 0x40($sp)
/* 81B50 800E86A0 AFB10044 */ sw $s1, 0x44($sp)
/* 81B54 800E86A4 AFB00048 */ sw $s0, 0x48($sp)
/* 81B58 800E86A8 AFA0004C */ sw $zero, 0x4C($sp)
/* 81B5C 800E86AC 03C0302D */ daddu $a2, $fp, $zero
/* 81B60 800E86B0 0C03D4B8 */ jal draw_box
/* 81B64 800E86B4 02A0382D */ daddu $a3, $s5, $zero
/* 81B68 800E86B8 0000202D */ daddu $a0, $zero, $zero
/* 81B6C 800E86BC 24050006 */ addiu $a1, $zero, 0x6
/* 81B70 800E86C0 27C600AE */ addiu $a2, $fp, 0xAE
/* 81B74 800E86C4 02A0382D */ daddu $a3, $s5, $zero
/* 81B78 800E86C8 2402007A */ addiu $v0, $zero, 0x7A
/* 81B7C 800E86CC AFA20014 */ sw $v0, 0x14($sp)
/* 81B80 800E86D0 24020019 */ addiu $v0, $zero, 0x19
/* 81B84 800E86D4 AFA00010 */ sw $zero, 0x10($sp)
/* 81B88 800E86D8 AFA20018 */ sw $v0, 0x18($sp)
/* 81B8C 800E86DC AFB2001C */ sw $s2, 0x1C($sp)
/* 81B90 800E86E0 AFA00020 */ sw $zero, 0x20($sp)
/* 81B94 800E86E4 AFA00024 */ sw $zero, 0x24($sp)
/* 81B98 800E86E8 AFA00028 */ sw $zero, 0x28($sp)
/* 81B9C 800E86EC AFA0002C */ sw $zero, 0x2C($sp)
/* 81BA0 800E86F0 AFA00030 */ sw $zero, 0x30($sp)
/* 81BA4 800E86F4 AFA00034 */ sw $zero, 0x34($sp)
/* 81BA8 800E86F8 AFA00038 */ sw $zero, 0x38($sp)
/* 81BAC 800E86FC AFA0003C */ sw $zero, 0x3C($sp)
/* 81BB0 800E8700 AFA00040 */ sw $zero, 0x40($sp)
/* 81BB4 800E8704 AFB10044 */ sw $s1, 0x44($sp)
/* 81BB8 800E8708 AFB00048 */ sw $s0, 0x48($sp)
/* 81BBC 800E870C 0C03D4B8 */ jal draw_box
/* 81BC0 800E8710 AFA0004C */ sw $zero, 0x4C($sp)
/* 81BC4 800E8714 8262004C */ lb $v0, 0x4C($s3)
/* 81BC8 800E8718 9263004C */ lbu $v1, 0x4C($s3)
/* 81BCC 800E871C 18400007 */ blez $v0, .L800E873C
/* 81BD0 800E8720 2462FFFF */ addiu $v0, $v1, -0x1
/* 81BD4 800E8724 A262004C */ sb $v0, 0x4C($s3)
/* 81BD8 800E8728 00021600 */ sll $v0, $v0, 24
/* 81BDC 800E872C 14400003 */ bnez $v0, .L800E873C
/* 81BE0 800E8730 00000000 */ nop
/* 81BE4 800E8734 0C03A659 */ jal status_bar_stop_blinking_hp
/* 81BE8 800E8738 00000000 */ nop
.L800E873C:
/* 81BEC 800E873C 8262004A */ lb $v0, 0x4A($s3)
/* 81BF0 800E8740 1040000C */ beqz $v0, .L800E8774
/* 81BF4 800E8744 24160001 */ addiu $s6, $zero, 0x1
/* 81BF8 800E8748 8263004B */ lb $v1, 0x4B($s3)
/* 81BFC 800E874C 28620009 */ slti $v0, $v1, 0x9
/* 81C00 800E8750 14400005 */ bnez $v0, .L800E8768
/* 81C04 800E8754 2862000D */ slti $v0, $v1, 0xD
/* 81C08 800E8758 14400003 */ bnez $v0, .L800E8768
/* 81C0C 800E875C 0000B02D */ daddu $s6, $zero, $zero
/* 81C10 800E8760 A260004B */ sb $zero, 0x4B($s3)
/* 81C14 800E8764 24160001 */ addiu $s6, $zero, 0x1
.L800E8768:
/* 81C18 800E8768 9262004B */ lbu $v0, 0x4B($s3)
/* 81C1C 800E876C 24420001 */ addiu $v0, $v0, 0x1
/* 81C20 800E8770 A262004B */ sb $v0, 0x4B($s3)
.L800E8774:
/* 81C24 800E8774 12C0001D */ beqz $s6, .L800E87EC
/* 81C28 800E8778 00000000 */ nop
/* 81C2C 800E877C 8E720000 */ lw $s2, 0x0($s3)
/* 81C30 800E8780 86650034 */ lh $a1, 0x34($s3)
/* 81C34 800E8784 86660036 */ lh $a2, 0x36($s3)
/* 81C38 800E8788 0240202D */ daddu $a0, $s2, $zero
/* 81C3C 800E878C 24A50016 */ addiu $a1, $a1, 0x16
/* 81C40 800E8790 0C051261 */ jal hud_element_set_render_pos
/* 81C44 800E8794 24C6000D */ addiu $a2, $a2, 0xD
/* 81C48 800E8798 0C0511F1 */ jal hud_element_draw_next
/* 81C4C 800E879C 0240202D */ daddu $a0, $s2, $zero
/* 81C50 800E87A0 8E720004 */ lw $s2, 0x4($s3)
/* 81C54 800E87A4 86650034 */ lh $a1, 0x34($s3)
/* 81C58 800E87A8 86660036 */ lh $a2, 0x36($s3)
/* 81C5C 800E87AC 0240202D */ daddu $a0, $s2, $zero
/* 81C60 800E87B0 24A50025 */ addiu $a1, $a1, 0x25
/* 81C64 800E87B4 0C051261 */ jal hud_element_set_render_pos
/* 81C68 800E87B8 24C6000D */ addiu $a2, $a2, 0xD
/* 81C6C 800E87BC 0C0511F1 */ jal hud_element_draw_next
/* 81C70 800E87C0 0240202D */ daddu $a0, $s2, $zero
/* 81C74 800E87C4 8E640020 */ lw $a0, 0x20($s3)
/* 81C78 800E87C8 86650034 */ lh $a1, 0x34($s3)
/* 81C7C 800E87CC 86660036 */ lh $a2, 0x36($s3)
/* 81C80 800E87D0 8267003D */ lb $a3, 0x3D($s3)
/* 81C84 800E87D4 3C028011 */ lui $v0, %hi(gPlayerData + 0x3)
/* 81C88 800E87D8 8042F293 */ lb $v0, %lo(gPlayerData + 0x3)($v0)
/* 81C8C 800E87DC 24A50030 */ addiu $a1, $a1, 0x30
/* 81C90 800E87E0 24C60008 */ addiu $a2, $a2, 0x8
/* 81C94 800E87E4 0C039F8D */ jal status_bar_draw_stat
/* 81C98 800E87E8 AFA20010 */ sw $v0, 0x10($sp)
.L800E87EC:
/* 81C9C 800E87EC 8262004F */ lb $v0, 0x4F($s3)
/* 81CA0 800E87F0 9263004F */ lbu $v1, 0x4F($s3)
/* 81CA4 800E87F4 18400007 */ blez $v0, .L800E8814
/* 81CA8 800E87F8 2462FFFF */ addiu $v0, $v1, -0x1
/* 81CAC 800E87FC A262004F */ sb $v0, 0x4F($s3)
/* 81CB0 800E8800 00021600 */ sll $v0, $v0, 24
/* 81CB4 800E8804 14400003 */ bnez $v0, .L800E8814
/* 81CB8 800E8808 00000000 */ nop
/* 81CBC 800E880C 0C03A674 */ jal status_bar_stop_blinking_fp
/* 81CC0 800E8810 00000000 */ nop
.L800E8814:
/* 81CC4 800E8814 8262004D */ lb $v0, 0x4D($s3)
/* 81CC8 800E8818 1040000C */ beqz $v0, .L800E884C
/* 81CCC 800E881C 24160001 */ addiu $s6, $zero, 0x1
/* 81CD0 800E8820 8263004E */ lb $v1, 0x4E($s3)
/* 81CD4 800E8824 28620009 */ slti $v0, $v1, 0x9
/* 81CD8 800E8828 14400005 */ bnez $v0, .L800E8840
/* 81CDC 800E882C 2862000D */ slti $v0, $v1, 0xD
/* 81CE0 800E8830 14400003 */ bnez $v0, .L800E8840
/* 81CE4 800E8834 0000B02D */ daddu $s6, $zero, $zero
/* 81CE8 800E8838 A260004E */ sb $zero, 0x4E($s3)
/* 81CEC 800E883C 24160001 */ addiu $s6, $zero, 0x1
.L800E8840:
/* 81CF0 800E8840 9262004E */ lbu $v0, 0x4E($s3)
/* 81CF4 800E8844 24420001 */ addiu $v0, $v0, 0x1
/* 81CF8 800E8848 A262004E */ sb $v0, 0x4E($s3)
.L800E884C:
/* 81CFC 800E884C 12C0001D */ beqz $s6, .L800E88C4
/* 81D00 800E8850 00000000 */ nop
/* 81D04 800E8854 8E720008 */ lw $s2, 0x8($s3)
/* 81D08 800E8858 86650034 */ lh $a1, 0x34($s3)
/* 81D0C 800E885C 86660036 */ lh $a2, 0x36($s3)
/* 81D10 800E8860 0240202D */ daddu $a0, $s2, $zero
/* 81D14 800E8864 24A5006E */ addiu $a1, $a1, 0x6E
/* 81D18 800E8868 0C051261 */ jal hud_element_set_render_pos
/* 81D1C 800E886C 24C6000D */ addiu $a2, $a2, 0xD
/* 81D20 800E8870 0C0511F1 */ jal hud_element_draw_next
/* 81D24 800E8874 0240202D */ daddu $a0, $s2, $zero
/* 81D28 800E8878 8E72000C */ lw $s2, 0xC($s3)
/* 81D2C 800E887C 86650034 */ lh $a1, 0x34($s3)
/* 81D30 800E8880 86660036 */ lh $a2, 0x36($s3)
/* 81D34 800E8884 0240202D */ daddu $a0, $s2, $zero
/* 81D38 800E8888 24A5007D */ addiu $a1, $a1, 0x7D
/* 81D3C 800E888C 0C051261 */ jal hud_element_set_render_pos
/* 81D40 800E8890 24C6000D */ addiu $a2, $a2, 0xD
/* 81D44 800E8894 0C0511F1 */ jal hud_element_draw_next
/* 81D48 800E8898 0240202D */ daddu $a0, $s2, $zero
/* 81D4C 800E889C 8E640024 */ lw $a0, 0x24($s3)
/* 81D50 800E88A0 86650034 */ lh $a1, 0x34($s3)
/* 81D54 800E88A4 86660036 */ lh $a2, 0x36($s3)
/* 81D58 800E88A8 8267003E */ lb $a3, 0x3E($s3)
/* 81D5C 800E88AC 3C028011 */ lui $v0, %hi(gPlayerData + 0x6)
/* 81D60 800E88B0 8042F296 */ lb $v0, %lo(gPlayerData + 0x6)($v0)
/* 81D64 800E88B4 24A50088 */ addiu $a1, $a1, 0x88
/* 81D68 800E88B8 24C60008 */ addiu $a2, $a2, 0x8
/* 81D6C 800E88BC 0C039F8D */ jal status_bar_draw_stat
/* 81D70 800E88C0 AFA20010 */ sw $v0, 0x10($sp)
.L800E88C4:
/* 81D74 800E88C4 3C028011 */ lui $v0, %hi(gPlayerData + 0x9)
/* 81D78 800E88C8 8042F299 */ lb $v0, %lo(gPlayerData + 0x9)($v0)
/* 81D7C 800E88CC 2842001B */ slti $v0, $v0, 0x1B
/* 81D80 800E88D0 14400003 */ bnez $v0, .L800E88E0
/* 81D84 800E88D4 00000000 */ nop
/* 81D88 800E88D8 3C018011 */ lui $at, %hi(gPlayerData + 0x10)
/* 81D8C 800E88DC A020F2A0 */ sb $zero, %lo(gPlayerData + 0x10)($at)
.L800E88E0:
/* 81D90 800E88E0 82620052 */ lb $v0, 0x52($s3)
/* 81D94 800E88E4 1040000B */ beqz $v0, .L800E8914
/* 81D98 800E88E8 24160001 */ addiu $s6, $zero, 0x1
/* 81D9C 800E88EC 82630053 */ lb $v1, 0x53($s3)
/* 81DA0 800E88F0 28620009 */ slti $v0, $v1, 0x9
/* 81DA4 800E88F4 14400004 */ bnez $v0, .L800E8908
/* 81DA8 800E88F8 2862000D */ slti $v0, $v1, 0xD
/* 81DAC 800E88FC 50400002 */ beql $v0, $zero, .L800E8908
/* 81DB0 800E8900 A2600053 */ sb $zero, 0x53($s3)
/* 81DB4 800E8904 0000B02D */ daddu $s6, $zero, $zero
.L800E8908:
/* 81DB8 800E8908 92620053 */ lbu $v0, 0x53($s3)
/* 81DBC 800E890C 24420001 */ addiu $v0, $v0, 0x1
/* 81DC0 800E8910 A2620053 */ sb $v0, 0x53($s3)
.L800E8914:
/* 81DC4 800E8914 12C0001D */ beqz $s6, .L800E898C
/* 81DC8 800E8918 00000000 */ nop
/* 81DCC 800E891C 8E720018 */ lw $s2, 0x18($s3)
/* 81DD0 800E8920 86650034 */ lh $a1, 0x34($s3)
/* 81DD4 800E8924 86660036 */ lh $a2, 0x36($s3)
/* 81DD8 800E8928 0240202D */ daddu $a0, $s2, $zero
/* 81DDC 800E892C 24A500C3 */ addiu $a1, $a1, 0xC3
/* 81DE0 800E8930 0C051261 */ jal hud_element_set_render_pos
/* 81DE4 800E8934 24C6000E */ addiu $a2, $a2, 0xE
/* 81DE8 800E8938 0C0511F1 */ jal hud_element_draw_next
/* 81DEC 800E893C 0240202D */ daddu $a0, $s2, $zero
/* 81DF0 800E8940 8E72001C */ lw $s2, 0x1C($s3)
/* 81DF4 800E8944 86650034 */ lh $a1, 0x34($s3)
/* 81DF8 800E8948 86660036 */ lh $a2, 0x36($s3)
/* 81DFC 800E894C 0240202D */ daddu $a0, $s2, $zero
/* 81E00 800E8950 24A500C3 */ addiu $a1, $a1, 0xC3
/* 81E04 800E8954 0C051261 */ jal hud_element_set_render_pos
/* 81E08 800E8958 24C60009 */ addiu $a2, $a2, 0x9
/* 81E0C 800E895C 0C0511F1 */ jal hud_element_draw_next
/* 81E10 800E8960 0240202D */ daddu $a0, $s2, $zero
/* 81E14 800E8964 8E640028 */ lw $a0, 0x28($s3)
/* 81E18 800E8968 86650034 */ lh $a1, 0x34($s3)
/* 81E1C 800E896C 24020002 */ addiu $v0, $zero, 0x2
/* 81E20 800E8970 AFA20010 */ sw $v0, 0x10($sp)
/* 81E24 800E8974 86660036 */ lh $a2, 0x36($s3)
/* 81E28 800E8978 3C078011 */ lui $a3, %hi(gPlayerData + 0x10)
/* 81E2C 800E897C 80E7F2A0 */ lb $a3, %lo(gPlayerData + 0x10)($a3)
/* 81E30 800E8980 24A500C8 */ addiu $a1, $a1, 0xC8
/* 81E34 800E8984 0C039F29 */ jal status_bar_draw_number
/* 81E38 800E8988 24C60008 */ addiu $a2, $a2, 0x8
.L800E898C:
/* 81E3C 800E898C 82620056 */ lb $v0, 0x56($s3)
/* 81E40 800E8990 92630056 */ lbu $v1, 0x56($s3)
/* 81E44 800E8994 18400007 */ blez $v0, .L800E89B4
/* 81E48 800E8998 2462FFFF */ addiu $v0, $v1, -0x1
/* 81E4C 800E899C A2620056 */ sb $v0, 0x56($s3)
/* 81E50 800E89A0 00021600 */ sll $v0, $v0, 24
/* 81E54 800E89A4 14400003 */ bnez $v0, .L800E89B4
/* 81E58 800E89A8 00000000 */ nop
/* 81E5C 800E89AC 0C03A68E */ jal status_bar_stop_blinking_coins
/* 81E60 800E89B0 00000000 */ nop
.L800E89B4:
/* 81E64 800E89B4 82620054 */ lb $v0, 0x54($s3)
/* 81E68 800E89B8 1040000C */ beqz $v0, .L800E89EC
/* 81E6C 800E89BC 24160001 */ addiu $s6, $zero, 0x1
/* 81E70 800E89C0 82630055 */ lb $v1, 0x55($s3)
/* 81E74 800E89C4 28620009 */ slti $v0, $v1, 0x9
/* 81E78 800E89C8 14400005 */ bnez $v0, .L800E89E0
/* 81E7C 800E89CC 2862000D */ slti $v0, $v1, 0xD
/* 81E80 800E89D0 14400003 */ bnez $v0, .L800E89E0
/* 81E84 800E89D4 0000B02D */ daddu $s6, $zero, $zero
/* 81E88 800E89D8 A2600055 */ sb $zero, 0x55($s3)
/* 81E8C 800E89DC 24160001 */ addiu $s6, $zero, 0x1
.L800E89E0:
/* 81E90 800E89E0 92620055 */ lbu $v0, 0x55($s3)
/* 81E94 800E89E4 24420001 */ addiu $v0, $v0, 0x1
/* 81E98 800E89E8 A2620055 */ sb $v0, 0x55($s3)
.L800E89EC:
/* 81E9C 800E89EC 12C0001C */ beqz $s6, .L800E8A60
/* 81EA0 800E89F0 00000000 */ nop
/* 81EA4 800E89F4 8E720010 */ lw $s2, 0x10($s3)
/* 81EA8 800E89F8 86650034 */ lh $a1, 0x34($s3)
/* 81EAC 800E89FC 86660036 */ lh $a2, 0x36($s3)
/* 81EB0 800E8A00 0240202D */ daddu $a0, $s2, $zero
/* 81EB4 800E8A04 24A500F4 */ addiu $a1, $a1, 0xF4
/* 81EB8 800E8A08 0C051261 */ jal hud_element_set_render_pos
/* 81EBC 800E8A0C 24C6000E */ addiu $a2, $a2, 0xE
/* 81EC0 800E8A10 0C0511F1 */ jal hud_element_draw_next
/* 81EC4 800E8A14 0240202D */ daddu $a0, $s2, $zero
/* 81EC8 800E8A18 8E720014 */ lw $s2, 0x14($s3)
/* 81ECC 800E8A1C 86650034 */ lh $a1, 0x34($s3)
/* 81ED0 800E8A20 86660036 */ lh $a2, 0x36($s3)
/* 81ED4 800E8A24 0240202D */ daddu $a0, $s2, $zero
/* 81ED8 800E8A28 24A500F4 */ addiu $a1, $a1, 0xF4
/* 81EDC 800E8A2C 0C051261 */ jal hud_element_set_render_pos
/* 81EE0 800E8A30 24C6000E */ addiu $a2, $a2, 0xE
/* 81EE4 800E8A34 0C0511F1 */ jal hud_element_draw_next
/* 81EE8 800E8A38 0240202D */ daddu $a0, $s2, $zero
/* 81EEC 800E8A3C 8E64002C */ lw $a0, 0x2C($s3)
/* 81EF0 800E8A40 86650034 */ lh $a1, 0x34($s3)
/* 81EF4 800E8A44 24020003 */ addiu $v0, $zero, 0x3
/* 81EF8 800E8A48 AFA20010 */ sw $v0, 0x10($sp)
/* 81EFC 800E8A4C 86660036 */ lh $a2, 0x36($s3)
/* 81F00 800E8A50 86670040 */ lh $a3, 0x40($s3)
/* 81F04 800E8A54 24A500F7 */ addiu $a1, $a1, 0xF7
/* 81F08 800E8A58 0C039F29 */ jal status_bar_draw_number
/* 81F0C 800E8A5C 24C60008 */ addiu $a2, $a2, 0x8
.L800E8A60:
/* 81F10 800E8A60 82620050 */ lb $v0, 0x50($s3)
/* 81F14 800E8A64 8E720030 */ lw $s2, 0x30($s3)
/* 81F18 800E8A68 1040000C */ beqz $v0, .L800E8A9C
/* 81F1C 800E8A6C 24160001 */ addiu $s6, $zero, 0x1
/* 81F20 800E8A70 82630051 */ lb $v1, 0x51($s3)
/* 81F24 800E8A74 28620006 */ slti $v0, $v1, 0x6
/* 81F28 800E8A78 14400005 */ bnez $v0, .L800E8A90
/* 81F2C 800E8A7C 00000000 */ nop
/* 81F30 800E8A80 28620009 */ slti $v0, $v1, 0x9
/* 81F34 800E8A84 50400002 */ beql $v0, $zero, .L800E8A90
/* 81F38 800E8A88 A2600051 */ sb $zero, 0x51($s3)
/* 81F3C 800E8A8C 0000B02D */ daddu $s6, $zero, $zero
.L800E8A90:
/* 81F40 800E8A90 92620051 */ lbu $v0, 0x51($s3)
/* 81F44 800E8A94 24420001 */ addiu $v0, $v0, 0x1
/* 81F48 800E8A98 A2620051 */ sb $v0, 0x51($s3)
.L800E8A9C:
/* 81F4C 800E8A9C 86620034 */ lh $v0, 0x34($s3)
/* 81F50 800E8AA0 245E0014 */ addiu $fp, $v0, 0x14
/* 81F54 800E8AA4 86620036 */ lh $v0, 0x36($s3)
/* 81F58 800E8AA8 86630048 */ lh $v1, 0x48($s3)
/* 81F5C 800E8AAC 2455001C */ addiu $s5, $v0, 0x1C
/* 81F60 800E8AB0 04610002 */ bgez $v1, .L800E8ABC
/* 81F64 800E8AB4 0060102D */ daddu $v0, $v1, $zero
/* 81F68 800E8AB8 246200FF */ addiu $v0, $v1, 0xFF
.L800E8ABC:
/* 81F6C 800E8ABC 00021203 */ sra $v0, $v0, 8
/* 81F70 800E8AC0 0040202D */ daddu $a0, $v0, $zero
/* 81F74 800E8AC4 00041200 */ sll $v0, $a0, 8
/* 81F78 800E8AC8 00621023 */ subu $v0, $v1, $v0
/* 81F7C 800E8ACC 00021400 */ sll $v0, $v0, 16
/* 81F80 800E8AD0 0002A403 */ sra $s4, $v0, 16
/* 81F84 800E8AD4 06810002 */ bgez $s4, .L800E8AE0
/* 81F88 800E8AD8 0280102D */ daddu $v0, $s4, $zero
/* 81F8C 800E8ADC 2682001F */ addiu $v0, $s4, 0x1F
.L800E8AE0:
/* 81F90 800E8AE0 0002A143 */ sra $s4, $v0, 5
/* 81F94 800E8AE4 000410C0 */ sll $v0, $a0, 3
/* 81F98 800E8AE8 0282A021 */ addu $s4, $s4, $v0
/* 81F9C 800E8AEC 82630057 */ lb $v1, 0x57($s3)
/* 81FA0 800E8AF0 24020001 */ addiu $v0, $zero, 0x1
/* 81FA4 800E8AF4 1462002B */ bne $v1, $v0, .L800E8BA4
/* 81FA8 800E8AF8 00000000 */ nop
/* 81FAC 800E8AFC 3C038011 */ lui $v1, %hi(gPlayerData + 0x290)
/* 81FB0 800E8B00 8463F520 */ lh $v1, %lo(gPlayerData + 0x290)($v1)
/* 81FB4 800E8B04 04610002 */ bgez $v1, .L800E8B10
/* 81FB8 800E8B08 0060102D */ daddu $v0, $v1, $zero
/* 81FBC 800E8B0C 246200FF */ addiu $v0, $v1, 0xFF
.L800E8B10:
/* 81FC0 800E8B10 00021203 */ sra $v0, $v0, 8
/* 81FC4 800E8B14 0040202D */ daddu $a0, $v0, $zero
/* 81FC8 800E8B18 00041200 */ sll $v0, $a0, 8
/* 81FCC 800E8B1C 00621023 */ subu $v0, $v1, $v0
/* 81FD0 800E8B20 00021400 */ sll $v0, $v0, 16
/* 81FD4 800E8B24 0002A403 */ sra $s4, $v0, 16
/* 81FD8 800E8B28 06810002 */ bgez $s4, .L800E8B34
/* 81FDC 800E8B2C 0280102D */ daddu $v0, $s4, $zero
/* 81FE0 800E8B30 2682001F */ addiu $v0, $s4, 0x1F
.L800E8B34:
/* 81FE4 800E8B34 0002A143 */ sra $s4, $v0, 5
/* 81FE8 800E8B38 000410C0 */ sll $v0, $a0, 3
/* 81FEC 800E8B3C 0282A021 */ addu $s4, $s4, $v0
/* 81FF0 800E8B40 3C036666 */ lui $v1, (0x66666667 >> 16)
/* 81FF4 800E8B44 34636667 */ ori $v1, $v1, (0x66666667 & 0xFFFF)
/* 81FF8 800E8B48 00141040 */ sll $v0, $s4, 1
/* 81FFC 800E8B4C 00541021 */ addu $v0, $v0, $s4
/* 82000 800E8B50 000210C0 */ sll $v0, $v0, 3
/* 82004 800E8B54 00541021 */ addu $v0, $v0, $s4
/* 82008 800E8B58 00430018 */ mult $v0, $v1
/* 8200C 800E8B5C 44950000 */ mtc1 $s5, $f0
/* 82010 800E8B60 00000000 */ nop
/* 82014 800E8B64 46800020 */ cvt.s.w $f0, $f0
/* 82018 800E8B68 000217C3 */ sra $v0, $v0, 31
/* 8201C 800E8B6C 44060000 */ mfc1 $a2, $f0
/* 82020 800E8B70 3C073F80 */ lui $a3, (0x3F800000 >> 16)
/* 82024 800E8B74 00004810 */ mfhi $t1
/* 82028 800E8B78 00091883 */ sra $v1, $t1, 2
/* 8202C 800E8B7C 00621823 */ subu $v1, $v1, $v0
/* 82030 800E8B80 03C31821 */ addu $v1, $fp, $v1
/* 82034 800E8B84 44830000 */ mtc1 $v1, $f0
/* 82038 800E8B88 00000000 */ nop
/* 8203C 800E8B8C 46800020 */ cvt.s.w $f0, $f0
/* 82040 800E8B90 44050000 */ mfc1 $a1, $f0
/* 82044 800E8B94 0C03C32C */ jal func_800F0CB0
/* 82048 800E8B98 0000202D */ daddu $a0, $zero, $zero
/* 8204C 800E8B9C 24020002 */ addiu $v0, $zero, 0x2
/* 82050 800E8BA0 A2620057 */ sb $v0, 0x57($s3)
.L800E8BA4:
/* 82054 800E8BA4 82620057 */ lb $v0, 0x57($s3)
/* 82058 800E8BA8 10400022 */ beqz $v0, .L800E8C34
/* 8205C 800E8BAC AFA00054 */ sw $zero, 0x54($sp)
/* 82060 800E8BB0 82620058 */ lb $v0, 0x58($s3)
/* 82064 800E8BB4 92630058 */ lbu $v1, 0x58($s3)
/* 82068 800E8BB8 10400003 */ beqz $v0, .L800E8BC8
/* 8206C 800E8BBC 2462FFFF */ addiu $v0, $v1, -0x1
/* 82070 800E8BC0 0803A2F3 */ j .L800E8BCC
/* 82074 800E8BC4 A2620058 */ sb $v0, 0x58($s3)
.L800E8BC8:
/* 82078 800E8BC8 A2600057 */ sb $zero, 0x57($s3)
.L800E8BCC:
/* 8207C 800E8BCC 3C046666 */ lui $a0, (0x66666667 >> 16)
/* 82080 800E8BD0 92630058 */ lbu $v1, 0x58($s3)
/* 82084 800E8BD4 34846667 */ ori $a0, $a0, (0x66666667 & 0xFFFF)
/* 82088 800E8BD8 00031E00 */ sll $v1, $v1, 24
/* 8208C 800E8BDC 00031603 */ sra $v0, $v1, 24
/* 82090 800E8BE0 00440018 */ mult $v0, $a0
/* 82094 800E8BE4 00031FC3 */ sra $v1, $v1, 31
/* 82098 800E8BE8 00004810 */ mfhi $t1
/* 8209C 800E8BEC 00091043 */ sra $v0, $t1, 1
/* 820A0 800E8BF0 00431023 */ subu $v0, $v0, $v1
/* 820A4 800E8BF4 30420001 */ andi $v0, $v0, 0x1
/* 820A8 800E8BF8 10400002 */ beqz $v0, .L800E8C04
/* 820AC 800E8BFC 24090001 */ addiu $t1, $zero, 0x1
/* 820B0 800E8C00 AFA90054 */ sw $t1, 0x54($sp)
.L800E8C04:
/* 820B4 800E8C04 82640059 */ lb $a0, 0x59($s3)
/* 820B8 800E8C08 04810002 */ bgez $a0, .L800E8C14
/* 820BC 800E8C0C 0080182D */ daddu $v1, $a0, $zero
/* 820C0 800E8C10 24830007 */ addiu $v1, $a0, 0x7
.L800E8C14:
/* 820C4 800E8C14 000318C3 */ sra $v1, $v1, 3
/* 820C8 800E8C18 000310C0 */ sll $v0, $v1, 3
/* 820CC 800E8C1C 00821023 */ subu $v0, $a0, $v0
/* 820D0 800E8C20 00021600 */ sll $v0, $v0, 24
/* 820D4 800E8C24 0002BE03 */ sra $s7, $v0, 24
/* 820D8 800E8C28 000318C0 */ sll $v1, $v1, 3
/* 820DC 800E8C2C 0803A30E */ j .L800E8C38
/* 820E0 800E8C30 02E3B821 */ addu $s7, $s7, $v1
.L800E8C34:
/* 820E4 800E8C34 0280B82D */ daddu $s7, $s4, $zero
.L800E8C38:
/* 820E8 800E8C38 0000802D */ daddu $s0, $zero, $zero
/* 820EC 800E8C3C AFA00050 */ sw $zero, 0x50($sp)
/* 820F0 800E8C40 82620050 */ lb $v0, 0x50($s3)
/* 820F4 800E8C44 1040002C */ beqz $v0, .L800E8CF8
/* 820F8 800E8C48 0200882D */ daddu $s1, $s0, $zero
/* 820FC 800E8C4C 16C0002B */ bnez $s6, .L800E8CFC
/* 82100 800E8C50 26A9FFFE */ addiu $t1, $s5, -0x2
/* 82104 800E8C54 8262005A */ lb $v0, 0x5A($s3)
/* 82108 800E8C58 000218C0 */ sll $v1, $v0, 3
/* 8210C 800E8C5C 8FA90050 */ lw $t1, 0x50($sp)
/* 82110 800E8C60 0123102A */ slt $v0, $t1, $v1
/* 82114 800E8C64 50400025 */ beql $v0, $zero, .L800E8CFC
/* 82118 800E8C68 26A9FFFE */ addiu $t1, $s5, -0x2
.L800E8C6C:
/* 8211C 800E8C6C 26100001 */ addiu $s0, $s0, 0x1
/* 82120 800E8C70 0203102A */ slt $v0, $s0, $v1
/* 82124 800E8C74 10400020 */ beqz $v0, .L800E8CF8
/* 82128 800E8C78 26310001 */ addiu $s1, $s1, 0x1
/* 8212C 800E8C7C 26100001 */ addiu $s0, $s0, 0x1
/* 82130 800E8C80 0203102A */ slt $v0, $s0, $v1
/* 82134 800E8C84 1040001C */ beqz $v0, .L800E8CF8
/* 82138 800E8C88 26310001 */ addiu $s1, $s1, 0x1
/* 8213C 800E8C8C 26100001 */ addiu $s0, $s0, 0x1
/* 82140 800E8C90 0203102A */ slt $v0, $s0, $v1
/* 82144 800E8C94 10400018 */ beqz $v0, .L800E8CF8
/* 82148 800E8C98 26310001 */ addiu $s1, $s1, 0x1
/* 8214C 800E8C9C 26100001 */ addiu $s0, $s0, 0x1
/* 82150 800E8CA0 0203102A */ slt $v0, $s0, $v1
/* 82154 800E8CA4 10400014 */ beqz $v0, .L800E8CF8
/* 82158 800E8CA8 26310001 */ addiu $s1, $s1, 0x1
/* 8215C 800E8CAC 26100001 */ addiu $s0, $s0, 0x1
/* 82160 800E8CB0 0203102A */ slt $v0, $s0, $v1
/* 82164 800E8CB4 10400010 */ beqz $v0, .L800E8CF8
/* 82168 800E8CB8 26310001 */ addiu $s1, $s1, 0x1
/* 8216C 800E8CBC 26100001 */ addiu $s0, $s0, 0x1
/* 82170 800E8CC0 0203102A */ slt $v0, $s0, $v1
/* 82174 800E8CC4 1040000C */ beqz $v0, .L800E8CF8
/* 82178 800E8CC8 26310001 */ addiu $s1, $s1, 0x1
/* 8217C 800E8CCC 26100001 */ addiu $s0, $s0, 0x1
/* 82180 800E8CD0 0203102A */ slt $v0, $s0, $v1
/* 82184 800E8CD4 10400008 */ beqz $v0, .L800E8CF8
/* 82188 800E8CD8 26310001 */ addiu $s1, $s1, 0x1
/* 8218C 800E8CDC 26100001 */ addiu $s0, $s0, 0x1
/* 82190 800E8CE0 0000882D */ daddu $s1, $zero, $zero
/* 82194 800E8CE4 8FA90050 */ lw $t1, 0x50($sp)
/* 82198 800E8CE8 0203102A */ slt $v0, $s0, $v1
/* 8219C 800E8CEC 25290001 */ addiu $t1, $t1, 0x1
/* 821A0 800E8CF0 1440FFDE */ bnez $v0, .L800E8C6C
/* 821A4 800E8CF4 AFA90050 */ sw $t1, 0x50($sp)
.L800E8CF8:
/* 821A8 800E8CF8 26A9FFFE */ addiu $t1, $s5, -0x2
.L800E8CFC:
/* 821AC 800E8CFC AFA9005C */ sw $t1, 0x5C($sp)
/* 821B0 800E8D00 8FA90050 */ lw $t1, 0x50($sp)
/* 821B4 800E8D04 00091080 */ sll $v0, $t1, 2
/* 821B8 800E8D08 00491021 */ addu $v0, $v0, $t1
/* 821BC 800E8D0C 00021080 */ sll $v0, $v0, 2
/* 821C0 800E8D10 005EB021 */ addu $s6, $v0, $fp
/* 821C4 800E8D14 AFA20060 */ sw $v0, 0x60($sp)
.L800E8D18:
/* 821C8 800E8D18 0214102A */ slt $v0, $s0, $s4
.L800E8D1C:
/* 821CC 800E8D1C 104000BE */ beqz $v0, .L800E9018
/* 821D0 800E8D20 0217102A */ slt $v0, $s0, $s7
/* 821D4 800E8D24 54400005 */ bnel $v0, $zero, .L800E8D3C
/* 821D8 800E8D28 26100001 */ addiu $s0, $s0, 0x1
/* 821DC 800E8D2C 8FA90054 */ lw $t1, 0x54($sp)
/* 821E0 800E8D30 112000B9 */ beqz $t1, .L800E9018
/* 821E4 800E8D34 00000000 */ nop
/* 821E8 800E8D38 26100001 */ addiu $s0, $s0, 0x1
.L800E8D3C:
/* 821EC 800E8D3C 0240202D */ daddu $a0, $s2, $zero
/* 821F0 800E8D40 8FA90050 */ lw $t1, 0x50($sp)
/* 821F4 800E8D44 3C02800F */ lui $v0, %hi(SPIncrementHudScripts)
/* 821F8 800E8D48 24427FB0 */ addiu $v0, $v0, %lo(SPIncrementHudScripts)
/* 821FC 800E8D4C 00094880 */ sll $t1, $t1, 2
/* 82200 800E8D50 01229821 */ addu $s3, $t1, $v0
/* 82204 800E8D54 AFA90058 */ sw $t1, 0x58($sp)
/* 82208 800E8D58 8E650000 */ lw $a1, 0x0($s3)
/* 8220C 800E8D5C 0C0511FF */ jal hud_element_set_script
/* 82210 800E8D60 26310001 */ addiu $s1, $s1, 0x1
/* 82214 800E8D64 0240202D */ daddu $a0, $s2, $zero
/* 82218 800E8D68 3C05800F */ lui $a1, %hi(StatusBarSPIncrementOffsets)
/* 8221C 800E8D6C 8CA57FE8 */ lw $a1, %lo(StatusBarSPIncrementOffsets)($a1)
/* 82220 800E8D70 8FA6005C */ lw $a2, 0x5C($sp)
/* 82224 800E8D74 0C051261 */ jal hud_element_set_render_pos
/* 82228 800E8D78 02C52821 */ addu $a1, $s6, $a1
/* 8222C 800E8D7C 0C0511F1 */ jal hud_element_draw_next
/* 82230 800E8D80 0240202D */ daddu $a0, $s2, $zero
/* 82234 800E8D84 0214102A */ slt $v0, $s0, $s4
/* 82238 800E8D88 104000A3 */ beqz $v0, .L800E9018
/* 8223C 800E8D8C 0217102A */ slt $v0, $s0, $s7
/* 82240 800E8D90 54400005 */ bnel $v0, $zero, .L800E8DA8
/* 82244 800E8D94 26100001 */ addiu $s0, $s0, 0x1
/* 82248 800E8D98 8FA90054 */ lw $t1, 0x54($sp)
/* 8224C 800E8D9C 1120009E */ beqz $t1, .L800E9018
/* 82250 800E8DA0 00000000 */ nop
/* 82254 800E8DA4 26100001 */ addiu $s0, $s0, 0x1
.L800E8DA8:
/* 82258 800E8DA8 0240202D */ daddu $a0, $s2, $zero
/* 8225C 800E8DAC 8E650000 */ lw $a1, 0x0($s3)
/* 82260 800E8DB0 0C0511FF */ jal hud_element_set_script
/* 82264 800E8DB4 26310001 */ addiu $s1, $s1, 0x1
/* 82268 800E8DB8 0240202D */ daddu $a0, $s2, $zero
/* 8226C 800E8DBC 3C05800F */ lui $a1, %hi(D_800F7FEC)
/* 82270 800E8DC0 8CA57FEC */ lw $a1, %lo(D_800F7FEC)($a1)
/* 82274 800E8DC4 8FA6005C */ lw $a2, 0x5C($sp)
/* 82278 800E8DC8 0C051261 */ jal hud_element_set_render_pos
/* 8227C 800E8DCC 02C52821 */ addu $a1, $s6, $a1
/* 82280 800E8DD0 0C0511F1 */ jal hud_element_draw_next
/* 82284 800E8DD4 0240202D */ daddu $a0, $s2, $zero
/* 82288 800E8DD8 0214102A */ slt $v0, $s0, $s4
/* 8228C 800E8DDC 1040008E */ beqz $v0, .L800E9018
/* 82290 800E8DE0 0217102A */ slt $v0, $s0, $s7
/* 82294 800E8DE4 54400005 */ bnel $v0, $zero, .L800E8DFC
/* 82298 800E8DE8 26100001 */ addiu $s0, $s0, 0x1
/* 8229C 800E8DEC 8FA90054 */ lw $t1, 0x54($sp)
/* 822A0 800E8DF0 11200089 */ beqz $t1, .L800E9018
/* 822A4 800E8DF4 00000000 */ nop
/* 822A8 800E8DF8 26100001 */ addiu $s0, $s0, 0x1
.L800E8DFC:
/* 822AC 800E8DFC 0240202D */ daddu $a0, $s2, $zero
/* 822B0 800E8E00 8E650000 */ lw $a1, 0x0($s3)
/* 822B4 800E8E04 0C0511FF */ jal hud_element_set_script
/* 822B8 800E8E08 26310001 */ addiu $s1, $s1, 0x1
/* 822BC 800E8E0C 0240202D */ daddu $a0, $s2, $zero
/* 822C0 800E8E10 3C05800F */ lui $a1, %hi(D_800F7FF0)
/* 822C4 800E8E14 8CA57FF0 */ lw $a1, %lo(D_800F7FF0)($a1)
/* 822C8 800E8E18 8FA6005C */ lw $a2, 0x5C($sp)
/* 822CC 800E8E1C 0C051261 */ jal hud_element_set_render_pos
/* 822D0 800E8E20 02C52821 */ addu $a1, $s6, $a1
/* 822D4 800E8E24 0C0511F1 */ jal hud_element_draw_next
/* 822D8 800E8E28 0240202D */ daddu $a0, $s2, $zero
/* 822DC 800E8E2C 0214102A */ slt $v0, $s0, $s4
/* 822E0 800E8E30 10400079 */ beqz $v0, .L800E9018
/* 822E4 800E8E34 0217102A */ slt $v0, $s0, $s7
/* 822E8 800E8E38 54400005 */ bnel $v0, $zero, .L800E8E50
/* 822EC 800E8E3C 26100001 */ addiu $s0, $s0, 0x1
/* 822F0 800E8E40 8FA90054 */ lw $t1, 0x54($sp)
/* 822F4 800E8E44 11200074 */ beqz $t1, .L800E9018
/* 822F8 800E8E48 00000000 */ nop
/* 822FC 800E8E4C 26100001 */ addiu $s0, $s0, 0x1
.L800E8E50:
/* 82300 800E8E50 0240202D */ daddu $a0, $s2, $zero
/* 82304 800E8E54 8E650000 */ lw $a1, 0x0($s3)
/* 82308 800E8E58 0C0511FF */ jal hud_element_set_script
/* 8230C 800E8E5C 26310001 */ addiu $s1, $s1, 0x1
/* 82310 800E8E60 0240202D */ daddu $a0, $s2, $zero
/* 82314 800E8E64 3C05800F */ lui $a1, %hi(D_800F7FF4)
/* 82318 800E8E68 8CA57FF4 */ lw $a1, %lo(D_800F7FF4)($a1)
/* 8231C 800E8E6C 8FA6005C */ lw $a2, 0x5C($sp)
/* 82320 800E8E70 0C051261 */ jal hud_element_set_render_pos
/* 82324 800E8E74 02C52821 */ addu $a1, $s6, $a1
/* 82328 800E8E78 0C0511F1 */ jal hud_element_draw_next
/* 8232C 800E8E7C 0240202D */ daddu $a0, $s2, $zero
/* 82330 800E8E80 0214102A */ slt $v0, $s0, $s4
/* 82334 800E8E84 10400064 */ beqz $v0, .L800E9018
/* 82338 800E8E88 0217102A */ slt $v0, $s0, $s7
/* 8233C 800E8E8C 54400005 */ bnel $v0, $zero, .L800E8EA4
/* 82340 800E8E90 26100001 */ addiu $s0, $s0, 0x1
/* 82344 800E8E94 8FA90054 */ lw $t1, 0x54($sp)
/* 82348 800E8E98 1120005F */ beqz $t1, .L800E9018
/* 8234C 800E8E9C 00000000 */ nop
/* 82350 800E8EA0 26100001 */ addiu $s0, $s0, 0x1
.L800E8EA4:
/* 82354 800E8EA4 0240202D */ daddu $a0, $s2, $zero
/* 82358 800E8EA8 8E650000 */ lw $a1, 0x0($s3)
/* 8235C 800E8EAC 0C0511FF */ jal hud_element_set_script
/* 82360 800E8EB0 26310001 */ addiu $s1, $s1, 0x1
/* 82364 800E8EB4 0240202D */ daddu $a0, $s2, $zero
/* 82368 800E8EB8 3C05800F */ lui $a1, %hi(D_800F7FF8)
/* 8236C 800E8EBC 8CA57FF8 */ lw $a1, %lo(D_800F7FF8)($a1)
/* 82370 800E8EC0 8FA6005C */ lw $a2, 0x5C($sp)
/* 82374 800E8EC4 0C051261 */ jal hud_element_set_render_pos
/* 82378 800E8EC8 02C52821 */ addu $a1, $s6, $a1
/* 8237C 800E8ECC 0C0511F1 */ jal hud_element_draw_next
/* 82380 800E8ED0 0240202D */ daddu $a0, $s2, $zero
/* 82384 800E8ED4 0214102A */ slt $v0, $s0, $s4
/* 82388 800E8ED8 1040004F */ beqz $v0, .L800E9018
/* 8238C 800E8EDC 0217102A */ slt $v0, $s0, $s7
/* 82390 800E8EE0 54400005 */ bnel $v0, $zero, .L800E8EF8
/* 82394 800E8EE4 26100001 */ addiu $s0, $s0, 0x1
/* 82398 800E8EE8 8FA90054 */ lw $t1, 0x54($sp)
/* 8239C 800E8EEC 1120004A */ beqz $t1, .L800E9018
/* 823A0 800E8EF0 00000000 */ nop
/* 823A4 800E8EF4 26100001 */ addiu $s0, $s0, 0x1
.L800E8EF8:
/* 823A8 800E8EF8 0240202D */ daddu $a0, $s2, $zero
/* 823AC 800E8EFC 8E650000 */ lw $a1, 0x0($s3)
/* 823B0 800E8F00 0C0511FF */ jal hud_element_set_script
/* 823B4 800E8F04 26310001 */ addiu $s1, $s1, 0x1
/* 823B8 800E8F08 0240202D */ daddu $a0, $s2, $zero
/* 823BC 800E8F0C 3C05800F */ lui $a1, %hi(D_800F7FFC)
/* 823C0 800E8F10 8CA57FFC */ lw $a1, %lo(D_800F7FFC)($a1)
/* 823C4 800E8F14 8FA6005C */ lw $a2, 0x5C($sp)
/* 823C8 800E8F18 0C051261 */ jal hud_element_set_render_pos
/* 823CC 800E8F1C 02C52821 */ addu $a1, $s6, $a1
/* 823D0 800E8F20 0C0511F1 */ jal hud_element_draw_next
/* 823D4 800E8F24 0240202D */ daddu $a0, $s2, $zero
/* 823D8 800E8F28 0214102A */ slt $v0, $s0, $s4
/* 823DC 800E8F2C 1040003A */ beqz $v0, .L800E9018
/* 823E0 800E8F30 0217102A */ slt $v0, $s0, $s7
/* 823E4 800E8F34 54400005 */ bnel $v0, $zero, .L800E8F4C
/* 823E8 800E8F38 26100001 */ addiu $s0, $s0, 0x1
/* 823EC 800E8F3C 8FA90054 */ lw $t1, 0x54($sp)
/* 823F0 800E8F40 11200035 */ beqz $t1, .L800E9018
/* 823F4 800E8F44 00000000 */ nop
/* 823F8 800E8F48 26100001 */ addiu $s0, $s0, 0x1
.L800E8F4C:
/* 823FC 800E8F4C 0240202D */ daddu $a0, $s2, $zero
/* 82400 800E8F50 8E650000 */ lw $a1, 0x0($s3)
/* 82404 800E8F54 0C0511FF */ jal hud_element_set_script
/* 82408 800E8F58 26310001 */ addiu $s1, $s1, 0x1
/* 8240C 800E8F5C 0240202D */ daddu $a0, $s2, $zero
/* 82410 800E8F60 3C058010 */ lui $a1, %hi(D_800F8000)
/* 82414 800E8F64 8CA58000 */ lw $a1, %lo(D_800F8000)($a1)
/* 82418 800E8F68 8FA6005C */ lw $a2, 0x5C($sp)
/* 8241C 800E8F6C 0C051261 */ jal hud_element_set_render_pos
/* 82420 800E8F70 02C52821 */ addu $a1, $s6, $a1
/* 82424 800E8F74 0C0511F1 */ jal hud_element_draw_next
/* 82428 800E8F78 0240202D */ daddu $a0, $s2, $zero
/* 8242C 800E8F7C 0214102A */ slt $v0, $s0, $s4
/* 82430 800E8F80 10400025 */ beqz $v0, .L800E9018
/* 82434 800E8F84 0217102A */ slt $v0, $s0, $s7
/* 82438 800E8F88 54400005 */ bnel $v0, $zero, .L800E8FA0
/* 8243C 800E8F8C 26100001 */ addiu $s0, $s0, 0x1
/* 82440 800E8F90 8FA90054 */ lw $t1, 0x54($sp)
/* 82444 800E8F94 11200020 */ beqz $t1, .L800E9018
/* 82448 800E8F98 00000000 */ nop
/* 8244C 800E8F9C 26100001 */ addiu $s0, $s0, 0x1
.L800E8FA0:
/* 82450 800E8FA0 0240202D */ daddu $a0, $s2, $zero
/* 82454 800E8FA4 8FA90058 */ lw $t1, 0x58($sp)
/* 82458 800E8FA8 0000882D */ daddu $s1, $zero, $zero
/* 8245C 800E8FAC 3C05800F */ lui $a1, %hi(SPStarHudScripts)
/* 82460 800E8FB0 00A92821 */ addu $a1, $a1, $t1
/* 82464 800E8FB4 8CA57FCC */ lw $a1, %lo(SPStarHudScripts)($a1)
/* 82468 800E8FB8 8FA90050 */ lw $t1, 0x50($sp)
/* 8246C 800E8FBC 26D60014 */ addiu $s6, $s6, 0x14
/* 82470 800E8FC0 25290001 */ addiu $t1, $t1, 0x1
/* 82474 800E8FC4 0C0511FF */ jal hud_element_set_script
/* 82478 800E8FC8 AFA90050 */ sw $t1, 0x50($sp)
/* 8247C 800E8FCC 0240202D */ daddu $a0, $s2, $zero
/* 82480 800E8FD0 8FA90060 */ lw $t1, 0x60($sp)
/* 82484 800E8FD4 02A0302D */ daddu $a2, $s5, $zero
/* 82488 800E8FD8 2525000C */ addiu $a1, $t1, 0xC
/* 8248C 800E8FDC 0C051261 */ jal hud_element_set_render_pos
/* 82490 800E8FE0 03C52821 */ addu $a1, $fp, $a1
/* 82494 800E8FE4 0C0511F1 */ jal hud_element_draw_next
/* 82498 800E8FE8 0240202D */ daddu $a0, $s2, $zero
/* 8249C 800E8FEC 8FA90060 */ lw $t1, 0x60($sp)
/* 824A0 800E8FF0 0214102A */ slt $v0, $s0, $s4
/* 824A4 800E8FF4 25290014 */ addiu $t1, $t1, 0x14
/* 824A8 800E8FF8 10400007 */ beqz $v0, .L800E9018
/* 824AC 800E8FFC AFA90060 */ sw $t1, 0x60($sp)
/* 824B0 800E9000 0217102A */ slt $v0, $s0, $s7
/* 824B4 800E9004 1440FF45 */ bnez $v0, .L800E8D1C
/* 824B8 800E9008 0214102A */ slt $v0, $s0, $s4
/* 824BC 800E900C 8FA90054 */ lw $t1, 0x54($sp)
/* 824C0 800E9010 1520FF41 */ bnez $t1, .L800E8D18
/* 824C4 800E9014 00000000 */ nop
.L800E9018:
/* 824C8 800E9018 3C16800F */ lui $s6, %hi(StatusBarSPIncrementOffsets)
/* 824CC 800E901C 26D67FE8 */ addiu $s6, $s6, %lo(StatusBarSPIncrementOffsets)
/* 824D0 800E9020 8FA90050 */ lw $t1, 0x50($sp)
/* 824D4 800E9024 3C048011 */ lui $a0, %hi(gPlayerData + 0x28E)
/* 824D8 800E9028 8084F51E */ lb $a0, %lo(gPlayerData + 0x28E)($a0)
/* 824DC 800E902C 00091080 */ sll $v0, $t1, 2
/* 824E0 800E9030 00491021 */ addu $v0, $v0, $t1
/* 824E4 800E9034 00021080 */ sll $v0, $v0, 2
/* 824E8 800E9038 2457000C */ addiu $s7, $v0, 0xC
/* 824EC 800E903C 005E9821 */ addu $s3, $v0, $fp
/* 824F0 800E9040 0004A0C0 */ sll $s4, $a0, 3
.L800E9044:
/* 824F4 800E9044 0214102A */ slt $v0, $s0, $s4
/* 824F8 800E9048 10400093 */ beqz $v0, .L800E9298
/* 824FC 800E904C 00000000 */ nop
/* 82500 800E9050 16200012 */ bnez $s1, .L800E909C
/* 82504 800E9054 24020001 */ addiu $v0, $zero, 0x1
/* 82508 800E9058 26100001 */ addiu $s0, $s0, 0x1
/* 8250C 800E905C 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement)
/* 82510 800E9060 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement)
/* 82514 800E9064 0C0511FF */ jal hud_element_set_script
/* 82518 800E9068 0240202D */ daddu $a0, $s2, $zero
/* 8251C 800E906C 0240202D */ daddu $a0, $s2, $zero
/* 82520 800E9070 3C05800F */ lui $a1, %hi(StatusBarSPIncrementOffsets)
/* 82524 800E9074 8CA57FE8 */ lw $a1, %lo(StatusBarSPIncrementOffsets)($a1)
/* 82528 800E9078 26A6FFFE */ addiu $a2, $s5, -0x2
/* 8252C 800E907C 0C051261 */ jal hud_element_set_render_pos
/* 82530 800E9080 02652821 */ addu $a1, $s3, $a1
/* 82534 800E9084 0C0511F1 */ jal hud_element_draw_next
/* 82538 800E9088 0240202D */ daddu $a0, $s2, $zero
/* 8253C 800E908C 0214102A */ slt $v0, $s0, $s4
/* 82540 800E9090 10400081 */ beqz $v0, .L800E9298
/* 82544 800E9094 24110001 */ addiu $s1, $zero, 0x1
/* 82548 800E9098 24020001 */ addiu $v0, $zero, 0x1
.L800E909C:
/* 8254C 800E909C 56220011 */ bnel $s1, $v0, .L800E90E4
/* 82550 800E90A0 24020002 */ addiu $v0, $zero, 0x2
/* 82554 800E90A4 02028021 */ addu $s0, $s0, $v0
/* 82558 800E90A8 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement)
/* 8255C 800E90AC 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement)
/* 82560 800E90B0 0C0511FF */ jal hud_element_set_script
/* 82564 800E90B4 0240202D */ daddu $a0, $s2, $zero
/* 82568 800E90B8 0240202D */ daddu $a0, $s2, $zero
/* 8256C 800E90BC 8EC50004 */ lw $a1, 0x4($s6)
/* 82570 800E90C0 26A6FFFE */ addiu $a2, $s5, -0x2
/* 82574 800E90C4 0C051261 */ jal hud_element_set_render_pos
/* 82578 800E90C8 02652821 */ addu $a1, $s3, $a1
/* 8257C 800E90CC 0C0511F1 */ jal hud_element_draw_next
/* 82580 800E90D0 0240202D */ daddu $a0, $s2, $zero
/* 82584 800E90D4 0214102A */ slt $v0, $s0, $s4
/* 82588 800E90D8 1040006F */ beqz $v0, .L800E9298
/* 8258C 800E90DC 24110002 */ addiu $s1, $zero, 0x2
/* 82590 800E90E0 24020002 */ addiu $v0, $zero, 0x2
.L800E90E4:
/* 82594 800E90E4 16220011 */ bne $s1, $v0, .L800E912C
/* 82598 800E90E8 24020003 */ addiu $v0, $zero, 0x3
/* 8259C 800E90EC 26100001 */ addiu $s0, $s0, 0x1
/* 825A0 800E90F0 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement)
/* 825A4 800E90F4 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement)
/* 825A8 800E90F8 0C0511FF */ jal hud_element_set_script
/* 825AC 800E90FC 0240202D */ daddu $a0, $s2, $zero
/* 825B0 800E9100 0240202D */ daddu $a0, $s2, $zero
/* 825B4 800E9104 8EC50008 */ lw $a1, 0x8($s6)
/* 825B8 800E9108 26A6FFFE */ addiu $a2, $s5, -0x2
/* 825BC 800E910C 0C051261 */ jal hud_element_set_render_pos
/* 825C0 800E9110 02652821 */ addu $a1, $s3, $a1
/* 825C4 800E9114 0C0511F1 */ jal hud_element_draw_next
/* 825C8 800E9118 0240202D */ daddu $a0, $s2, $zero
/* 825CC 800E911C 0214102A */ slt $v0, $s0, $s4
/* 825D0 800E9120 1040005D */ beqz $v0, .L800E9298
/* 825D4 800E9124 24110003 */ addiu $s1, $zero, 0x3
/* 825D8 800E9128 24020003 */ addiu $v0, $zero, 0x3
.L800E912C:
/* 825DC 800E912C 16220011 */ bne $s1, $v0, .L800E9174
/* 825E0 800E9130 24020004 */ addiu $v0, $zero, 0x4
/* 825E4 800E9134 26100001 */ addiu $s0, $s0, 0x1
/* 825E8 800E9138 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement)
/* 825EC 800E913C 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement)
/* 825F0 800E9140 0C0511FF */ jal hud_element_set_script
/* 825F4 800E9144 0240202D */ daddu $a0, $s2, $zero
/* 825F8 800E9148 0240202D */ daddu $a0, $s2, $zero
/* 825FC 800E914C 8EC5000C */ lw $a1, 0xC($s6)
/* 82600 800E9150 26A6FFFE */ addiu $a2, $s5, -0x2
/* 82604 800E9154 0C051261 */ jal hud_element_set_render_pos
/* 82608 800E9158 02652821 */ addu $a1, $s3, $a1
/* 8260C 800E915C 0C0511F1 */ jal hud_element_draw_next
/* 82610 800E9160 0240202D */ daddu $a0, $s2, $zero
/* 82614 800E9164 0214102A */ slt $v0, $s0, $s4
/* 82618 800E9168 1040004B */ beqz $v0, .L800E9298
/* 8261C 800E916C 24110004 */ addiu $s1, $zero, 0x4
/* 82620 800E9170 24020004 */ addiu $v0, $zero, 0x4
.L800E9174:
/* 82624 800E9174 16220011 */ bne $s1, $v0, .L800E91BC
/* 82628 800E9178 24020005 */ addiu $v0, $zero, 0x5
/* 8262C 800E917C 26100001 */ addiu $s0, $s0, 0x1
/* 82630 800E9180 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement)
/* 82634 800E9184 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement)
/* 82638 800E9188 0C0511FF */ jal hud_element_set_script
/* 8263C 800E918C 0240202D */ daddu $a0, $s2, $zero
/* 82640 800E9190 0240202D */ daddu $a0, $s2, $zero
/* 82644 800E9194 8EC50010 */ lw $a1, 0x10($s6)
/* 82648 800E9198 26A6FFFE */ addiu $a2, $s5, -0x2
/* 8264C 800E919C 0C051261 */ jal hud_element_set_render_pos
/* 82650 800E91A0 02652821 */ addu $a1, $s3, $a1
/* 82654 800E91A4 0C0511F1 */ jal hud_element_draw_next
/* 82658 800E91A8 0240202D */ daddu $a0, $s2, $zero
/* 8265C 800E91AC 0214102A */ slt $v0, $s0, $s4
/* 82660 800E91B0 10400039 */ beqz $v0, .L800E9298
/* 82664 800E91B4 24110005 */ addiu $s1, $zero, 0x5
/* 82668 800E91B8 24020005 */ addiu $v0, $zero, 0x5
.L800E91BC:
/* 8266C 800E91BC 16220011 */ bne $s1, $v0, .L800E9204
/* 82670 800E91C0 24020006 */ addiu $v0, $zero, 0x6
/* 82674 800E91C4 26100001 */ addiu $s0, $s0, 0x1
/* 82678 800E91C8 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement)
/* 8267C 800E91CC 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement)
/* 82680 800E91D0 0C0511FF */ jal hud_element_set_script
/* 82684 800E91D4 0240202D */ daddu $a0, $s2, $zero
/* 82688 800E91D8 0240202D */ daddu $a0, $s2, $zero
/* 8268C 800E91DC 8EC50014 */ lw $a1, 0x14($s6)
/* 82690 800E91E0 26A6FFFE */ addiu $a2, $s5, -0x2
/* 82694 800E91E4 0C051261 */ jal hud_element_set_render_pos
/* 82698 800E91E8 02652821 */ addu $a1, $s3, $a1
/* 8269C 800E91EC 0C0511F1 */ jal hud_element_draw_next
/* 826A0 800E91F0 0240202D */ daddu $a0, $s2, $zero
/* 826A4 800E91F4 0214102A */ slt $v0, $s0, $s4
/* 826A8 800E91F8 10400027 */ beqz $v0, .L800E9298
/* 826AC 800E91FC 24110006 */ addiu $s1, $zero, 0x6
/* 826B0 800E9200 24020006 */ addiu $v0, $zero, 0x6
.L800E9204:
/* 826B4 800E9204 16220011 */ bne $s1, $v0, .L800E924C
/* 826B8 800E9208 24020007 */ addiu $v0, $zero, 0x7
/* 826BC 800E920C 26100001 */ addiu $s0, $s0, 0x1
/* 826C0 800E9210 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement)
/* 826C4 800E9214 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement)
/* 826C8 800E9218 0C0511FF */ jal hud_element_set_script
/* 826CC 800E921C 0240202D */ daddu $a0, $s2, $zero
/* 826D0 800E9220 0240202D */ daddu $a0, $s2, $zero
/* 826D4 800E9224 8EC50018 */ lw $a1, 0x18($s6)
/* 826D8 800E9228 26A6FFFE */ addiu $a2, $s5, -0x2
/* 826DC 800E922C 0C051261 */ jal hud_element_set_render_pos
/* 826E0 800E9230 02652821 */ addu $a1, $s3, $a1
/* 826E4 800E9234 0C0511F1 */ jal hud_element_draw_next
/* 826E8 800E9238 0240202D */ daddu $a0, $s2, $zero
/* 826EC 800E923C 0214102A */ slt $v0, $s0, $s4
/* 826F0 800E9240 10400015 */ beqz $v0, .L800E9298
/* 826F4 800E9244 24110007 */ addiu $s1, $zero, 0x7
/* 826F8 800E9248 24020007 */ addiu $v0, $zero, 0x7
.L800E924C:
/* 826FC 800E924C 1622000F */ bne $s1, $v0, .L800E928C
/* 82700 800E9250 0000882D */ daddu $s1, $zero, $zero
/* 82704 800E9254 26100001 */ addiu $s0, $s0, 0x1
/* 82708 800E9258 3C058011 */ lui $a1, %hi(HES_StatusStarEmpty)
/* 8270C 800E925C 24A584F0 */ addiu $a1, $a1, %lo(HES_StatusStarEmpty)
/* 82710 800E9260 0C0511FF */ jal hud_element_set_script
/* 82714 800E9264 0240202D */ daddu $a0, $s2, $zero
/* 82718 800E9268 0240202D */ daddu $a0, $s2, $zero
/* 8271C 800E926C 03D72821 */ addu $a1, $fp, $s7
/* 82720 800E9270 0C051261 */ jal hud_element_set_render_pos
/* 82724 800E9274 02A0302D */ daddu $a2, $s5, $zero
/* 82728 800E9278 0C0511F1 */ jal hud_element_draw_next
/* 8272C 800E927C 0240202D */ daddu $a0, $s2, $zero
/* 82730 800E9280 0214102A */ slt $v0, $s0, $s4
/* 82734 800E9284 10400004 */ beqz $v0, .L800E9298
/* 82738 800E9288 0000882D */ daddu $s1, $zero, $zero
.L800E928C:
/* 8273C 800E928C 26F70014 */ addiu $s7, $s7, 0x14
/* 82740 800E9290 0803A411 */ j .L800E9044
/* 82744 800E9294 26730014 */ addiu $s3, $s3, 0x14
.L800E9298:
/* 82748 800E9298 0C03C360 */ jal func_800F0D80
/* 8274C 800E929C 00000000 */ nop
/* 82750 800E92A0 0C03C40B */ jal func_800F102C
/* 82754 800E92A4 00000000 */ nop
.L800E92A8:
/* 82758 800E92A8 8FBF008C */ lw $ra, 0x8C($sp)
/* 8275C 800E92AC 8FBE0088 */ lw $fp, 0x88($sp)
/* 82760 800E92B0 8FB70084 */ lw $s7, 0x84($sp)
/* 82764 800E92B4 8FB60080 */ lw $s6, 0x80($sp)
/* 82768 800E92B8 8FB5007C */ lw $s5, 0x7C($sp)
/* 8276C 800E92BC 8FB40078 */ lw $s4, 0x78($sp)
/* 82770 800E92C0 8FB30074 */ lw $s3, 0x74($sp)
/* 82774 800E92C4 8FB20070 */ lw $s2, 0x70($sp)
/* 82778 800E92C8 8FB1006C */ lw $s1, 0x6C($sp)
/* 8277C 800E92CC 8FB00068 */ lw $s0, 0x68($sp)
/* 82780 800E92D0 03E00008 */ jr $ra
/* 82784 800E92D4 27BD0090 */ addiu $sp, $sp, 0x90
### DECOMPILED C INSTRUCTIONS:
void update_status_bar(void) {
UiStatus* uiStatus = &gUIStatus;
PlayerData* playerData = &gPlayerData;
PlayerStatus* playerStatus = &gPlayerStatus;
s32 sp50;
s32 sp54;
s32 i;
s32 x;
s32 y;
s32 showStat;
s32 id;
s32 limit;
s32 s7;
s32 s1;
s32 spBars;
s32 maxStarPower;
if (gGameStatusPtr->creditsViewportMode >= 0
|| gGameStatusPtr->demoState != DEMO_STATE_NONE
|| (gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_IS_PEACH)
|| evt_get_variable(NULL, GB_StoryProgress) >= STORY_EPILOGUE
) {
return;
}
if (gGameStatusPtr->isBattle == 0 && playerData->coins != uiStatus->displayCoins) {
status_bar_start_blinking_coins();
}
i = playerData->coins - uiStatus->displayCoins;
if (i < 0) {
i = (i - 4) / 5;
} else {
i = (i + 4) / 5;
}
uiStatus->displayCoins += i;
if (uiStatus->displayHP != playerData->curHP && !uiStatus->ignoreChanges) {
if (uiStatus->hidden) {
uiStatus->showTimer = 70;
uiStatus->hidden = FALSE;
uiStatus->unk_3B[0] = 0;
} else {
uiStatus->showTimer = 70;
}
}
if (uiStatus->displayFP != playerData->curFP && !uiStatus->ignoreChanges) {
if (uiStatus->hidden) {
uiStatus->showTimer = 70;
uiStatus->hidden = FALSE;
uiStatus->unk_3B[0] = 0;
} else {
uiStatus->showTimer = 70;
}
}
if (uiStatus->displaySP != playerData->specialBarsFilled && !uiStatus->ignoreChanges) {
if (uiStatus->hidden) {
uiStatus->showTimer = 70;
uiStatus->hidden = FALSE;
uiStatus->unk_3B[0] = 0;
} else {
uiStatus->showTimer = 70;
}
}
if (uiStatus->displayHP != playerData->curHP) {
if (gGameStatusPtr->isBattle == 0 && playerData->curHP < uiStatus->displayHP) {
status_bar_start_blinking_hp();
}
if (uiStatus->displayHP < playerData->curHP) {
if (uiStatus->drawPosY >= 18) {
if (gGameStatusPtr->frameCounter % 4 == 0) {
uiStatus->displayHP++;
sfx_play_sound(SOUND_213);
}
} else if (gGameStatusPtr->frameCounter % 4 == 0) {
uiStatus->displayHP++;
}
} else if (gGameStatusPtr->frameCounter % 4 == 0) {
uiStatus->displayHP--;
}
}
if (uiStatus->displayFP != playerData->curFP) {
if (gGameStatusPtr->isBattle == 0 && playerData->curFP < uiStatus->displayFP) {
status_bar_start_blinking_fp();
}
if (uiStatus->displayFP < playerData->curFP) {
if (uiStatus->drawPosY >= 18) {
if (gGameStatusPtr->frameCounter % 4 == 0) {
uiStatus->displayFP++;
sfx_play_sound(SOUND_217);
}
} else if (gGameStatusPtr->frameCounter % 4 == 0) {
uiStatus->displayFP++;
}
} else if (gGameStatusPtr->frameCounter % 4 == 0) {
uiStatus->displayFP--;
}
}
if (uiStatus->displaySP != playerData->specialBarsFilled) {
if (uiStatus->displaySP < playerData->specialBarsFilled) {
uiStatus->displaySP += 10;
if (uiStatus->displaySP > playerData->specialBarsFilled) {
uiStatus->displaySP = playerData->specialBarsFilled;
}
} else {
uiStatus->displaySP -= 10;
if (uiStatus->displaySP < playerData->specialBarsFilled) {
uiStatus->displaySP = playerData->specialBarsFilled;
}
}
}
if (uiStatus->disabled) {
return;
}
if (uiStatus->unk_45[1] && uiStatus->hidden && playerStatus->inputDisabledCount == 0) {
uiStatus->showTimer = 42;
uiStatus->hidden = FALSE;
uiStatus->unk_3B[0] = 0;
}
switch (uiStatus->hidden) {
case 0:
uiStatus->drawPosY += 10;
if (uiStatus->drawPosY >= 18) {
uiStatus->drawPosY = 18;
if (uiStatus->unk_3B[1] && uiStatus->unk_3B[0] && playerStatus->actionState != ACTION_STATE_IDLE) {
uiStatus->showTimer = 0;
}
if (uiStatus->showTimer != 0) {
uiStatus->showTimer--;
} else {
if (!uiStatus->ignoreChanges) {
if (!uiStatus->unk_3B[0] || playerStatus->actionState != ACTION_STATE_IDLE) {
if (gGameStatusPtr->isBattle == 0) {
uiStatus->hidden = 1;
uiStatus->showTimer = 0;
uiStatus->unk_3B[1] = 0;
}
}
}
}
}
break;
case 1:
uiStatus->drawPosY -= 5;
if (uiStatus->drawPosY < -100) {
uiStatus->drawPosY = -100;
if (!uiStatus->ignoreChanges) {
if (playerStatus->actionState != ACTION_STATE_IDLE) {
uiStatus->showTimer = 0;
} else if (playerStatus->flags & (PS_FLAG_NO_STATIC_COLLISION | PS_FLAG_INPUT_DISABLED)) {
uiStatus->showTimer = 0;
} else {
uiStatus->showTimer++;
}
if (uiStatus->showTimer >= 240 && gGameStatusPtr->isBattle == 0) {
uiStatus->showTimer = 210;
uiStatus->hidden = 0;
uiStatus->unk_3B[0] = 1;
uiStatus->unk_3B[1] = 1;
}
}
}
break;
}
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 12, 20, SCREEN_WIDTH - 12, SCREEN_HEIGHT - 20);
x = uiStatus->drawPosX;
y = uiStatus->drawPosY;
draw_box(0, WINDOW_STYLE_5, x, y, 0, 174, 35, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
draw_box(0, WINDOW_STYLE_6, x + 174, y, 0, 122, 25, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
if (uiStatus->hpBlinkTimer > 0) {
uiStatus->hpBlinkTimer--;
if (uiStatus->hpBlinkTimer == 0) {
status_bar_stop_blinking_hp();
}
}
showStat = TRUE;
if (uiStatus->hpBlinking) {
if (uiStatus->hpBlinkCounter > 8) {
showStat = FALSE;
if (uiStatus->hpBlinkCounter > 12) {
uiStatus->hpBlinkCounter = 0;
showStat = TRUE;
}
}
uiStatus->hpBlinkCounter++;
}
if (showStat) {
id = uiStatus->hpIconIndices[0];
x = uiStatus->drawPosX + 22;
y = uiStatus->drawPosY + 13;
hud_element_set_render_pos(id, x, y);
hud_element_draw_next(id);
id = uiStatus->hpIconIndices[1];
x = uiStatus->drawPosX + 37;
y = uiStatus->drawPosY + 13;
hud_element_set_render_pos(id, x, y);
hud_element_draw_next(id);
x = uiStatus->drawPosX + 48;
y = uiStatus->drawPosY + 8;
status_bar_draw_stat(uiStatus->iconIndex8, x, y, uiStatus->displayHP, playerData->curMaxHP);
}
if (uiStatus->fpBlinkTimer > 0) {
uiStatus->fpBlinkTimer--;
if (uiStatus->fpBlinkTimer == 0) {
status_bar_stop_blinking_fp();
}
}
showStat = TRUE;
if (uiStatus->fpBlinking) {
if (uiStatus->fpBlinkCounter > 8) {
showStat = FALSE;
if (uiStatus->fpBlinkCounter > 12) {
uiStatus->fpBlinkCounter = 0;
showStat = TRUE;
}
}
uiStatus->fpBlinkCounter++;
}
if (showStat) {
id = uiStatus->fpIconIndices[0];
x = uiStatus->drawPosX + 110;
y = uiStatus->drawPosY + 13;
hud_element_set_render_pos(id, x, y);
hud_element_draw_next(id);
id = uiStatus->fpIconIndices[1];
x = uiStatus->drawPosX + 125;
y = uiStatus->drawPosY + 13;
hud_element_set_render_pos(id, x, y);
hud_element_draw_next(id);
x = uiStatus->drawPosX + 136;
y = uiStatus->drawPosY + 8;
status_bar_draw_stat(uiStatus->iconIndex9, x, y, uiStatus->displayFP, playerData->curMaxFP);
}
if (playerData->level >= 27) {
playerData->starPoints = 0;
}
showStat = TRUE;
if (uiStatus->starpointsBlinking) {
if (uiStatus->starpointsBlinkCounter > 8) {
if (uiStatus->starpointsBlinkCounter <= 12) {
showStat = FALSE;
} else {
uiStatus->starpointsBlinkCounter = 0;
}
}
uiStatus->starpointsBlinkCounter++;
}
if (showStat) {
id = uiStatus->starpointsIconIndex;
x = uiStatus->drawPosX + 195;
y = uiStatus->drawPosY + 14;
hud_element_set_render_pos(id, x, y);
hud_element_draw_next(id);
id = uiStatus->starpointsShineIconIndex;
x = uiStatus->drawPosX + 195;
y = uiStatus->drawPosY + 9;
hud_element_set_render_pos(id, x, y);
hud_element_draw_next(id);
x = uiStatus->drawPosX + 200;
y = uiStatus->drawPosY + 8;
status_bar_draw_number(uiStatus->iconIndexA, x, y, playerData->starPoints, 2);
}
if (uiStatus->coinsBlinkTimer > 0) {
uiStatus->coinsBlinkTimer--;
if (uiStatus->coinsBlinkTimer == 0) {
status_bar_stop_blinking_coins();
}
}
showStat = TRUE;
if (uiStatus->coinsBlinking) {
if (uiStatus->coinsBlinkCounter > 8) {
showStat = FALSE;
if (uiStatus->coinsBlinkCounter > 12) {
uiStatus->coinsBlinkCounter = 0;
showStat = TRUE;
}
}
uiStatus->coinsBlinkCounter++;
}
if (showStat) {
id = uiStatus->coinIconIndex;
x = uiStatus->drawPosX + 244;
y = uiStatus->drawPosY + 14;
hud_element_set_render_pos(id, x, y);
hud_element_draw_next(id);
id = uiStatus->coinSparkleIconIndex;
x = uiStatus->drawPosX + 244;
y = uiStatus->drawPosY + 14;
hud_element_set_render_pos(id, x, y);
hud_element_draw_next(id);
x = uiStatus->drawPosX + 247;
y = uiStatus->drawPosY + 8;
status_bar_draw_number(uiStatus->iconIndexB, x, y, uiStatus->displayCoins, 3);
}
id = uiStatus->starIconIndex;
showStat = TRUE;
if (uiStatus->spBlinking) {
if (uiStatus->spBlinkCounter > 5) {
if (uiStatus->spBlinkCounter <= 8) {
showStat = FALSE;
} else {
uiStatus->spBlinkCounter = 0;
showStat = TRUE;
}
}
uiStatus->spBlinkCounter++;
}
x = uiStatus->drawPosX + 20;
y = uiStatus->drawPosY + 28;
spBars = uiStatus->displaySP / 256;
limit = uiStatus->displaySP % 256;
limit /= 32;
limit += spBars * 8;
if (uiStatus->unk_57 == 1) {
spBars = playerData->specialBarsFilled / 256;
limit = playerData->specialBarsFilled % 256;
limit = limit / 32;
limit += spBars * 8;
func_800F0CB0(0, x + limit * 25 / 10, y, 1.0f);
uiStatus->unk_57 = 2;
}
sp54 = FALSE;
if (uiStatus->unk_57 != 0) {
if (uiStatus->unk_58 != 0) {
uiStatus->unk_58--;
} else {
uiStatus->unk_57 = 0;
}
if ((uiStatus->unk_58 / 5) & 1) {
sp54 = TRUE;
}
maxStarPower = uiStatus->unk_59; // required to match
s7 = uiStatus->unk_59 % 8;
s7 += uiStatus->unk_59 / 8 * 8;
} else {
s7 = limit;
}
i = 0;
sp50 = 0;
s1 = 0;
if (uiStatus->spBlinking) {
if (!showStat) {
s32 limit = uiStatus->spBarsToBlink * 8;
do {} while (0);
if (sp50 < limit) {
while (TRUE) {
i++; s1++; if (i >= limit) { break; }
i++; s1++; if (i >= limit) { break; }
i++; s1++; if (i >= limit) { break; }
i++; s1++; if (i >= limit) { break; }
i++; s1++; if (i >= limit) { break; }
i++; s1++; if (i >= limit) { break; }
i++; s1++; if (i >= limit) { break; }
i++;
s1 = 0;
sp50++;
if (i >= limit) {
break;
}
}
}
}
}
while (TRUE) {
if (i >= limit || i >= s7 && !sp54) {
break;
}
i++;
hud_element_set_script(id, SPIncrementHudScripts[sp50]);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[0], y - 2);
hud_element_draw_next(id);
s1++;
if (i >= limit || i >= s7 && !sp54) {
break;
}
i++;
hud_element_set_script(id, SPIncrementHudScripts[sp50]);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[1], y - 2);
hud_element_draw_next(id);
s1++;
if (i >= limit || i >= s7 && !sp54) {
break;
}
i++;
hud_element_set_script(id, SPIncrementHudScripts[sp50]);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[2], y - 2);
hud_element_draw_next(id);
s1++;
if (i >= limit || i >= s7 && !sp54) {
break;
}
i++;
hud_element_set_script(id, SPIncrementHudScripts[sp50]);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[3], y - 2);
hud_element_draw_next(id);
s1++;
if (i >= limit || i >= s7 && !sp54) {
break;
}
i++;
hud_element_set_script(id, SPIncrementHudScripts[sp50]);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[4], y - 2);
hud_element_draw_next(id);
s1++;
if (i >= limit || i >= s7 && !sp54) {
break;
}
i++;
hud_element_set_script(id, SPIncrementHudScripts[sp50]);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[5], y - 2);
hud_element_draw_next(id);
s1++;
if (i >= limit || i >= s7 && !sp54) {
break;
}
i++;
hud_element_set_script(id, SPIncrementHudScripts[sp50]);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[6], y - 2);
hud_element_draw_next(id);
s1++;
if (i >= limit || i >= s7 && !sp54) {
break;
}
i++;
hud_element_set_script(id, SPStarHudScripts[sp50]);
hud_element_set_render_pos(id, x + 12 + sp50 * 20, y);
hud_element_draw_next(id);
s1 = 0;
sp50++;
if (i >= limit || i >= s7 && !sp54) {
break;
}
}
maxStarPower = playerData->maxStarPower;
limit = maxStarPower * 8;
while (TRUE) {
if (i >= limit) {
break;
}
if (s1 == 0) {
i++;
hud_element_set_script(id, &HES_StatusSPEmptyIncrement);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[s1], y - 2);
hud_element_draw_next(id);
if (i >= limit) {
break;
}
s1 = 1;
}
if (s1 == 1) {
i++;
hud_element_set_script(id, &HES_StatusSPEmptyIncrement);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[s1], y - 2);
hud_element_draw_next(id);
if (i >= limit) {
break;
}
s1 = 2;
}
if (s1 == 2) {
i++;
hud_element_set_script(id, &HES_StatusSPEmptyIncrement);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[s1], y - 2);
hud_element_draw_next(id);
if (i >= limit) {
break;
}
s1 = 3;
}
if (s1 == 3) {
i++;
hud_element_set_script(id, &HES_StatusSPEmptyIncrement);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[s1], y - 2);
hud_element_draw_next(id);
if (i >= limit) {
break;
}
s1 = 4;
}
if (s1 == 4) {
i++;
hud_element_set_script(id, &HES_StatusSPEmptyIncrement);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[s1], y - 2);
hud_element_draw_next(id);
if (i >= limit) {
break;
}
s1 = 5;
}
if (s1 == 5) {
i++;
hud_element_set_script(id, &HES_StatusSPEmptyIncrement);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[s1], y - 2);
hud_element_draw_next(id);
if (i >= limit) {
break;
}
s1 = 6;
}
if (s1 == 6) {
i++;
hud_element_set_script(id, &HES_StatusSPEmptyIncrement);
hud_element_set_render_pos(id, x + sp50 * 20 + StatusBarSPIncrementOffsets[s1], y - 2);
hud_element_draw_next(id);
if (i >= limit) {
break;
}
s1 = 7;
}
if (s1 == 7) {
i++;
hud_element_set_script(id, &HES_StatusStarEmpty);
hud_element_set_render_pos(id, x + 12 + sp50 * 20, y);
hud_element_draw_next(id);
if (i >= limit) {
break;
}
}
s1 = 0;
sp50++;
}
func_800F0D80();
func_800F102C();
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_802516E8
/* 17FFC8 802516E8 27BDFFA8 */ addiu $sp, $sp, -0x58
/* 17FFCC 802516EC AFB40040 */ sw $s4, 0x40($sp)
/* 17FFD0 802516F0 3C14800E */ lui $s4, %hi(gBattleStatus)
/* 17FFD4 802516F4 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
/* 17FFD8 802516F8 AFBF0054 */ sw $ra, 0x54($sp)
/* 17FFDC 802516FC AFBE0050 */ sw $fp, 0x50($sp)
/* 17FFE0 80251700 AFB7004C */ sw $s7, 0x4C($sp)
/* 17FFE4 80251704 AFB60048 */ sw $s6, 0x48($sp)
/* 17FFE8 80251708 AFB50044 */ sw $s5, 0x44($sp)
/* 17FFEC 8025170C AFB3003C */ sw $s3, 0x3C($sp)
D_80251710_C0EF90:
/* 17FFF0 80251710 AFB20038 */ sw $s2, 0x38($sp)
/* 17FFF4 80251714 AFB10034 */ sw $s1, 0x34($sp)
/* 17FFF8 80251718 AFB00030 */ sw $s0, 0x30($sp)
/* 17FFFC 8025171C AFA0001C */ sw $zero, 0x1C($sp)
/* 180000 80251720 AFA00024 */ sw $zero, 0x24($sp)
/* 180004 80251724 AFA00028 */ sw $zero, 0x28($sp)
/* 180008 80251728 AFA0002C */ sw $zero, 0x2C($sp)
/* 18000C 8025172C 8E9600D8 */ lw $s6, 0xD8($s4)
/* 180010 80251730 968201A0 */ lhu $v0, 0x1A0($s4)
/* 180014 80251734 869101A0 */ lh $s1, 0x1A0($s4)
/* 180018 80251738 928301A2 */ lbu $v1, 0x1A2($s4)
/* 18001C 8025173C 8E9200DC */ lw $s2, 0xDC($s4)
/* 180020 80251740 829001A2 */ lb $s0, 0x1A2($s4)
/* 180024 80251744 0000A82D */ daddu $s5, $zero, $zero
/* 180028 80251748 A2800199 */ sb $zero, 0x199($s4)
/* 18002C 8025174C A6800180 */ sh $zero, 0x180($s4)
/* 180030 80251750 96C50192 */ lhu $a1, 0x192($s6)
/* 180034 80251754 0220202D */ daddu $a0, $s1, $zero
/* 180038 80251758 A68201A4 */ sh $v0, 0x1A4($s4)
/* 18003C 8025175C A28301A6 */ sb $v1, 0x1A6($s4)
/* 180040 80251760 0C09A75B */ jal get_actor
/* 180044 80251764 A68501A8 */ sh $a1, 0x1A8($s4)
/* 180048 80251768 0040982D */ daddu $s3, $v0, $zero
/* 18004C 8025176C 16600003 */ bnez $s3, .L8025177C
/* 180050 80251770 0260202D */ daddu $a0, $s3, $zero
/* 180054 80251774 080949BE */ j .L802526F8
/* 180058 80251778 02A0102D */ daddu $v0, $s5, $zero
.L8025177C:
/* 18005C 8025177C 0C099117 */ jal get_actor_part
/* 180060 80251780 0200282D */ daddu $a1, $s0, $zero
/* 180064 80251784 0040B82D */ daddu $s7, $v0, $zero
/* 180068 80251788 56E00003 */ bnel $s7, $zero, D_80251798_C0F018
/* 18006C 8025178C 32310700 */ andi $s1, $s1, 0x700
.L80251790:
/* 180070 80251790 080945E4 */ j .L80251790
/* 180074 80251794 00000000 */ nop
D_80251798_C0F018:
/* 180078 80251798 A66001F8 */ sh $zero, 0x1F8($s3)
/* 18007C 8025179C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 180080 802517A0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 180084 802517A4 3C030008 */ lui $v1, (0x80000 >> 16)
/* 180088 802517A8 00431024 */ and $v0, $v0, $v1
/* 18008C 802517AC 14400003 */ bnez $v0, .L802517BC
/* 180090 802517B0 AFB10020 */ sw $s1, 0x20($sp)
/* 180094 802517B4 080945F0 */ j .L802517C0
/* 180098 802517B8 26D1000C */ addiu $s1, $s6, 0xC
.L802517BC:
/* 18009C 802517BC 2651000C */ addiu $s1, $s2, 0xC
.L802517C0:
/* 1800A0 802517C0 8E820188 */ lw $v0, 0x188($s4)
/* 1800A4 802517C4 30420002 */ andi $v0, $v0, 0x2
/* 1800A8 802517C8 10400010 */ beqz $v0, .L8025180C
/* 1800AC 802517CC 0000202D */ daddu $a0, $zero, $zero
/* 1800B0 802517D0 C6240014 */ lwc1 $f4, 0x14($s1)
/* 1800B4 802517D4 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 1800B8 802517D8 44810000 */ mtc1 $at, $f0
/* 1800BC 802517DC 3C013F80 */ lui $at, (0x3F800000 >> 16)
D_802517E0:
/* 1800C0 802517E0 44811000 */ mtc1 $at, $f2
/* 1800C4 802517E4 24020018 */ addiu $v0, $zero, 0x18
/* 1800C8 802517E8 AFA20014 */ sw $v0, 0x14($sp)
/* 1800CC 802517EC 46002100 */ add.s $f4, $f4, $f0
/* 1800D0 802517F0 E7A20010 */ swc1 $f2, 0x10($sp)
/* 1800D4 802517F4 8E25000C */ lw $a1, 0xC($s1)
/* 1800D8 802517F8 8E260010 */ lw $a2, 0x10($s1)
/* 1800DC 802517FC 44072000 */ mfc1 $a3, $f4
/* 1800E0 80251800 24080001 */ addiu $t0, $zero, 0x1
/* 1800E4 80251804 0C01C184 */ jal fx_ring_blast
/* 1800E8 80251808 AFA80024 */ sw $t0, 0x24($sp)
.L8025180C:
/* 1800EC 8025180C 8E820188 */ lw $v0, 0x188($s4)
/* 1800F0 80251810 30420020 */ andi $v0, $v0, 0x20
/* 1800F4 80251814 10400005 */ beqz $v0, .L8025182C
/* 1800F8 80251818 00000000 */ nop
/* 1800FC 8025181C 0C09451D */ jal apply_shock_effect
/* 180100 80251820 0260202D */ daddu $a0, $s3, $zero
/* 180104 80251824 24080001 */ addiu $t0, $zero, 0x1
/* 180108 80251828 AFA80028 */ sw $t0, 0x28($sp)
.L8025182C:
/* 18010C 8025182C 8E820188 */ lw $v0, 0x188($s4)
/* 180110 80251830 30420004 */ andi $v0, $v0, 0x4
/* 180114 80251834 1040000E */ beqz $v0, .L80251870
/* 180118 80251838 24020018 */ addiu $v0, $zero, 0x18
/* 18011C 8025183C C6240014 */ lwc1 $f4, 0x14($s1)
/* 180120 80251840 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 180124 80251844 44810000 */ mtc1 $at, $f0
/* 180128 80251848 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 18012C 8025184C 44811000 */ mtc1 $at, $f2
/* 180130 80251850 AFA20014 */ sw $v0, 0x14($sp)
/* 180134 80251854 46002100 */ add.s $f4, $f4, $f0
/* 180138 80251858 E7A20010 */ swc1 $f2, 0x10($sp)
/* 18013C 8025185C 8E25000C */ lw $a1, 0xC($s1)
/* 180140 80251860 8E260010 */ lw $a2, 0x10($s1)
/* 180144 80251864 44072000 */ mfc1 $a3, $f4
/* 180148 80251868 0C01C70C */ jal fx_water_splash
/* 18014C 8025186C 0000202D */ daddu $a0, $zero, $zero
.L80251870:
/* 180150 80251870 8E820188 */ lw $v0, 0x188($s4)
/* 180154 80251874 30420008 */ andi $v0, $v0, 0x8
/* 180158 80251878 1040000C */ beqz $v0, .L802518AC
/* 18015C 8025187C 0000202D */ daddu $a0, $zero, $zero
D_80251880:
/* 180160 80251880 C6220014 */ lwc1 $f2, 0x14($s1)
/* 180164 80251884 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 180168 80251888 44810000 */ mtc1 $at, $f0
/* 18016C 8025188C 00000000 */ nop
/* 180170 80251890 46001080 */ add.s $f2, $f2, $f0
/* 180174 80251894 8E25000C */ lw $a1, 0xC($s1)
/* 180178 80251898 8E260010 */ lw $a2, 0x10($s1)
/* 18017C 8025189C 44071000 */ mfc1 $a3, $f2
/* 180180 802518A0 24080001 */ addiu $t0, $zero, 0x1
/* 180184 802518A4 0C01C2A4 */ jal fx_big_snowflakes
/* 180188 802518A8 AFA8002C */ sw $t0, 0x2C($sp)
.L802518AC:
/* 18018C 802518AC 8E850188 */ lw $a1, 0x188($s4)
D_802518B0:
/* 180190 802518B0 3C020040 */ lui $v0, (0x400000 >> 16)
/* 180194 802518B4 00A21024 */ and $v0, $a1, $v0
/* 180198 802518B8 1440000F */ bnez $v0, .L802518F8
/* 18019C 802518BC 00000000 */ nop
D_802518C0:
/* 1801A0 802518C0 8EE4007C */ lw $a0, 0x7C($s7)
/* 1801A4 802518C4 30820020 */ andi $v0, $a0, 0x20
/* 1801A8 802518C8 1440038B */ bnez $v0, .L802526F8
/* 1801AC 802518CC 24020006 */ addiu $v0, $zero, 0x6
/* 1801B0 802518D0 82630218 */ lb $v1, 0x218($s3)
/* 1801B4 802518D4 2402000E */ addiu $v0, $zero, 0xE
/* 1801B8 802518D8 10620005 */ beq $v1, $v0, .L802518F0
/* 1801BC 802518DC 30820800 */ andi $v0, $a0, 0x800
/* 1801C0 802518E0 10400005 */ beqz $v0, .L802518F8
/* 1801C4 802518E4 30A20800 */ andi $v0, $a1, 0x800
/* 1801C8 802518E8 14400003 */ bnez $v0, .L802518F8
/* 1801CC 802518EC 00000000 */ nop
.L802518F0:
/* 1801D0 802518F0 080949BE */ j .L802526F8
/* 1801D4 802518F4 24020006 */ addiu $v0, $zero, 0x6
.L802518F8:
/* 1801D8 802518F8 82630214 */ lb $v1, 0x214($s3)
/* 1801DC 802518FC 2402000C */ addiu $v0, $zero, 0xC
/* 1801E0 80251900 1462001B */ bne $v1, $v0, .L80251970
/* 1801E4 80251904 3C03000C */ lui $v1, (0xC0000 >> 16)
/* 1801E8 80251908 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1801EC 8025190C 2404010C */ addiu $a0, $zero, 0x10C
/* 1801F0 80251910 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1801F4 80251914 8E26000C */ lw $a2, 0xC($s1)
/* 1801F8 80251918 8E270010 */ lw $a3, 0x10($s1)
/* 1801FC 8025191C 0C052757 */ jal sfx_play_sound_at_position
/* 180200 80251920 0000282D */ daddu $a1, $zero, $zero
/* 180204 80251924 24020001 */ addiu $v0, $zero, 0x1
/* 180208 80251928 AFA20010 */ sw $v0, 0x10($sp)
/* 18020C 8025192C AFA20014 */ sw $v0, 0x14($sp)
/* 180210 80251930 C62C000C */ lwc1 $f12, 0xC($s1)
/* 180214 80251934 C62E0010 */ lwc1 $f14, 0x10($s1)
/* 180218 80251938 8E260014 */ lw $a2, 0x14($s1)
/* 18021C 8025193C 0C093BF8 */ jal func_8024EFE0
/* 180220 80251940 0000382D */ daddu $a3, $zero, $zero
/* 180224 80251944 AFA00010 */ sw $zero, 0x10($sp)
/* 180228 80251948 C62C000C */ lwc1 $f12, 0xC($s1)
/* 18022C 8025194C C62E0010 */ lwc1 $f14, 0x10($s1)
/* 180230 80251950 8E260014 */ lw $a2, 0x14($s1)
/* 180234 80251954 0C09996B */ jal show_next_damage_popup
D_80251958_C0F1D8:
/* 180238 80251958 0000382D */ daddu $a3, $zero, $zero
/* 18023C 8025195C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 180240 80251960 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 180244 80251964 30420240 */ andi $v0, $v0, 0x240
/* 180248 80251968 080949BE */ j .L802526F8
/* 18024C 8025196C 0002102B */ sltu $v0, $zero, $v0
.L80251970:
/* 180250 80251970 8EE20080 */ lw $v0, 0x80($s7)
/* 180254 80251974 8E840188 */ lw $a0, 0x188($s4)
/* 180258 80251978 00441024 */ and $v0, $v0, $a0
/* 18025C 8025197C 0002102B */ sltu $v0, $zero, $v0
/* 180260 80251980 AFA20018 */ sw $v0, 0x18($sp)
/* 180264 80251984 8EE2007C */ lw $v0, 0x7C($s7)
/* 180268 80251988 00431024 */ and $v0, $v0, $v1
/* 18026C 8025198C 10400004 */ beqz $v0, D_802519A0_C0F220
/* 180270 80251990 3C02F7FF */ lui $v0, (0xF7FFFFFF >> 16)
/* 180274 80251994 3442FFFF */ ori $v0, $v0, (0xF7FFFFFF & 0xFFFF)
/* 180278 80251998 00821024 */ and $v0, $a0, $v0
/* 18027C 8025199C AE820188 */ sw $v0, 0x188($s4)
D_802519A0_C0F220:
/* 180280 802519A0 8EE50078 */ lw $a1, 0x78($s7)
/* 180284 802519A4 8E860188 */ lw $a2, 0x188($s4)
/* 180288 802519A8 0C0998AF */ jal get_defense
/* 18028C 802519AC 0260202D */ daddu $a0, $s3, $zero
/* 180290 802519B0 0040802D */ daddu $s0, $v0, $zero
/* 180294 802519B4 8E820188 */ lw $v0, 0x188($s4)
/* 180298 802519B8 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 18029C 802519BC 00431024 */ and $v0, $v0, $v1
/* 1802A0 802519C0 14400003 */ bnez $v0, .L802519D0
/* 1802A4 802519C4 00000000 */ nop
/* 1802A8 802519C8 82620222 */ lb $v0, 0x222($s3)
/* 1802AC 802519CC 02028021 */ addu $s0, $s0, $v0
.L802519D0:
/* 1802B0 802519D0 8684017E */ lh $a0, 0x17E($s4)
/* 1802B4 802519D4 28820064 */ slti $v0, $a0, 0x64
/* 1802B8 802519D8 50400001 */ beql $v0, $zero, .L802519E0
/* 1802BC 802519DC 24040063 */ addiu $a0, $zero, 0x63
.L802519E0:
/* 1802C0 802519E0 58800001 */ blezl $a0, .L802519E8
/* 1802C4 802519E4 0000802D */ daddu $s0, $zero, $zero
.L802519E8:
/* 1802C8 802519E8 00902023 */ subu $a0, $a0, $s0
/* 1802CC 802519EC 1C800014 */ bgtz $a0, .L80251A40
D_802519F0_C0F270:
/* 1802D0 802519F0 A66001FA */ sh $zero, 0x1FA($s3)
/* 1802D4 802519F4 A66001FA */ sh $zero, 0x1FA($s3)
/* 1802D8 802519F8 8E820188 */ lw $v0, 0x188($s4)
/* 1802DC 802519FC 3C034000 */ lui $v1, (0x40000000 >> 16)
/* 1802E0 80251A00 00431024 */ and $v0, $v0, $v1
/* 1802E4 80251A04 1440000B */ bnez $v0, .L80251A34
/* 1802E8 80251A08 241E0002 */ addiu $fp, $zero, 0x2
/* 1802EC 80251A0C 24120017 */ addiu $s2, $zero, 0x17
/* 1802F0 80251A10 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1802F4 80251A14 2404010C */ addiu $a0, $zero, 0x10C
/* 1802F8 80251A18 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1802FC 80251A1C 8E26000C */ lw $a2, 0xC($s1)
/* 180300 80251A20 8E270010 */ lw $a3, 0x10($s1)
/* 180304 80251A24 0C052757 */ jal sfx_play_sound_at_position
D_80251A28_C0F2A8:
/* 180308 80251A28 0000282D */ daddu $a1, $zero, $zero
/* 18030C 80251A2C 080946B0 */ j .L80251AC0
/* 180310 80251A30 A6800180 */ sh $zero, 0x180($s4)
.L80251A34:
/* 180314 80251A34 24120017 */ addiu $s2, $zero, 0x17
/* 180318 80251A38 080946B0 */ j .L80251AC0
/* 18031C 80251A3C A6800180 */ sh $zero, 0x180($s4)
.L80251A40:
/* 180320 80251A40 24120009 */ addiu $s2, $zero, 0x9
/* 180324 80251A44 966201FC */ lhu $v0, 0x1FC($s3)
/* 180328 80251A48 966301FA */ lhu $v1, 0x1FA($s3)
/* 18032C 80251A4C 00441021 */ addu $v0, $v0, $a0
D_80251A50_C0F2D0:
/* 180330 80251A50 00641823 */ subu $v1, $v1, $a0
/* 180334 80251A54 A66201FC */ sh $v0, 0x1FC($s3)
/* 180338 80251A58 A66301FA */ sh $v1, 0x1FA($s3)
/* 18033C 80251A5C A6800180 */ sh $zero, 0x180($s4)
/* 180340 80251A60 8EE20000 */ lw $v0, 0x0($s7)
/* 180344 80251A64 30422000 */ andi $v0, $v0, 0x2000
/* 180348 80251A68 14400010 */ bnez $v0, dgb_01_D_80251AAC_C0F32C
/* 18034C 80251A6C 0000F02D */ daddu $fp, $zero, $zero
/* 180350 80251A70 8FA80018 */ lw $t0, 0x18($sp)
/* 180354 80251A74 1500000D */ bnez $t0, dgb_01_D_80251AAC_C0F32C
dgb_01_pad_1:
/* 180358 80251A78 00000000 */ nop
/* 18035C 80251A7C 8EE20004 */ lw $v0, 0x4($s7)
dgb_01_D_80251A80_C0F300:
/* 180360 80251A80 30420004 */ andi $v0, $v0, 0x4
/* 180364 80251A84 14400009 */ bnez $v0, dgb_01_D_80251AAC_C0F32C
/* 180368 80251A88 00000000 */ nop
/* 18036C 80251A8C 926201B8 */ lbu $v0, 0x1B8($s3)
D_80251A90:
/* 180370 80251A90 00441023 */ subu $v0, $v0, $a0
/* 180374 80251A94 A26201B8 */ sb $v0, 0x1B8($s3)
D_80251A98:
/* 180378 80251A98 00021600 */ sll $v0, $v0, 24
/* 18037C 80251A9C 1C400003 */ bgtz $v0, dgb_01_D_80251AAC_C0F32C
D_80251AA0:
/* 180380 80251AA0 00000000 */ nop
/* 180384 80251AA4 A26001B8 */ sb $zero, 0x1B8($s3)
jtbl_80251AA8:
/* 180388 80251AA8 24120020 */ addiu $s2, $zero, 0x20
dgb_01_D_80251AAC_C0F32C:
/* 18038C 80251AAC 96820180 */ lhu $v0, 0x180($s4)
/* 180390 80251AB0 00441021 */ addu $v0, $v0, $a0
/* 180394 80251AB4 A6820180 */ sh $v0, 0x180($s4)
/* 180398 80251AB8 A66201F8 */ sh $v0, 0x1F8($s3)
/* 18039C 80251ABC A66001FA */ sh $zero, 0x1FA($s3)
.L80251AC0:
/* 1803A0 80251AC0 8EE20000 */ lw $v0, 0x0($s7)
/* 1803A4 80251AC4 30422000 */ andi $v0, $v0, 0x2000
/* 1803A8 80251AC8 10400015 */ beqz $v0, .L80251B20
/* 1803AC 80251ACC 0260202D */ daddu $a0, $s3, $zero
/* 1803B0 80251AD0 0C09DC58 */ jal dispatch_event_actor
/* 1803B4 80251AD4 0240282D */ daddu $a1, $s2, $zero
dgb_01_D_80251AD8_C0F358:
/* 1803B8 80251AD8 24020001 */ addiu $v0, $zero, 0x1
/* 1803BC 80251ADC AFA20010 */ sw $v0, 0x10($sp)
/* 1803C0 80251AE0 24020003 */ addiu $v0, $zero, 0x3
/* 1803C4 80251AE4 AFA20014 */ sw $v0, 0x14($sp)
/* 1803C8 80251AE8 C62C000C */ lwc1 $f12, 0xC($s1)
/* 1803CC 80251AEC C62E0010 */ lwc1 $f14, 0x10($s1)
/* 1803D0 80251AF0 8E260014 */ lw $a2, 0x14($s1)
/* 1803D4 80251AF4 0C093BF8 */ jal func_8024EFE0
/* 1803D8 80251AF8 0000382D */ daddu $a3, $zero, $zero
/* 1803DC 80251AFC C6200014 */ lwc1 $f0, 0x14($s1)
/* 1803E0 80251B00 2404010C */ addiu $a0, $zero, 0x10C
dgb_01_D_80251B04_C0F384:
/* 1803E4 80251B04 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1803E8 80251B08 8E26000C */ lw $a2, 0xC($s1)
/* 1803EC 80251B0C 8E270010 */ lw $a3, 0x10($s1)
/* 1803F0 80251B10 0C052757 */ jal sfx_play_sound_at_position
/* 1803F4 80251B14 0000282D */ daddu $a1, $zero, $zero
/* 1803F8 80251B18 080949BE */ j .L802526F8
/* 1803FC 80251B1C 24020002 */ addiu $v0, $zero, 0x2
.L80251B20:
/* 180400 80251B20 8E820188 */ lw $v0, 0x188($s4)
/* 180404 80251B24 30422000 */ andi $v0, $v0, 0x2000
/* 180408 80251B28 10400004 */ beqz $v0, .L80251B3C
/* 18040C 80251B2C 00000000 */ nop
dgb_01_D_80251B30_C0F3B0:
/* 180410 80251B30 A6800180 */ sh $zero, 0x180($s4)
/* 180414 80251B34 24120020 */ addiu $s2, $zero, 0x20
/* 180418 80251B38 0000F02D */ daddu $fp, $zero, $zero
.L80251B3C:
/* 18041C 80251B3C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 180420 80251B40 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 180424 80251B44 30420020 */ andi $v0, $v0, 0x20
/* 180428 80251B48 1040000D */ beqz $v0, .L80251B80
/* 18042C 80251B4C 24020009 */ addiu $v0, $zero, 0x9
/* 180430 80251B50 52420001 */ beql $s2, $v0, .L80251B58
/* 180434 80251B54 2412000A */ addiu $s2, $zero, 0xA
.L80251B58:
/* 180438 80251B58 24020017 */ addiu $v0, $zero, 0x17
dgb_01_D_80251B5C_C0F3DC:
/* 18043C 80251B5C 52420001 */ beql $s2, $v0, .L80251B64
/* 180440 80251B60 24120019 */ addiu $s2, $zero, 0x19
.L80251B64:
/* 180444 80251B64 826201B8 */ lb $v0, 0x1B8($s3)
/* 180448 80251B68 1C400008 */ bgtz $v0, .L80251B8C
/* 18044C 80251B6C 24020019 */ addiu $v0, $zero, 0x19
/* 180450 80251B70 52420006 */ beql $s2, $v0, .L80251B8C
/* 180454 80251B74 24120020 */ addiu $s2, $zero, 0x20
/* 180458 80251B78 080946E3 */ j .L80251B8C
/* 18045C 80251B7C 00000000 */ nop
.L80251B80:
/* 180460 80251B80 24020020 */ addiu $v0, $zero, 0x20
/* 180464 80251B84 52420001 */ beql $s2, $v0, .L80251B8C
dgb_01_D_80251B88_C0F408:
/* 180468 80251B88 24120009 */ addiu $s2, $zero, 0x9
.L80251B8C:
/* 18046C 80251B8C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 180470 80251B90 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 180474 80251B94 30420020 */ andi $v0, $v0, 0x20
/* 180478 80251B98 10400014 */ beqz $v0, .L80251BEC
/* 18047C 80251B9C 3C040040 */ lui $a0, (0x400000 >> 16)
/* 180480 80251BA0 8E820188 */ lw $v0, 0x188($s4)
/* 180484 80251BA4 00441024 */ and $v0, $v0, $a0
/* 180488 80251BA8 10400039 */ beqz $v0, dgb_01_D_80251C90_C0F510
/* 18048C 80251BAC 3C020004 */ lui $v0, (0x40000 >> 16)
/* 180490 80251BB0 8EE3007C */ lw $v1, 0x7C($s7)
dgb_01_D_80251BB4_C0F434:
/* 180494 80251BB4 00621024 */ and $v0, $v1, $v0
/* 180498 80251BB8 10400003 */ beqz $v0, .L80251BC8
/* 18049C 80251BBC 24120019 */ addiu $s2, $zero, 0x19
/* 1804A0 80251BC0 24120013 */ addiu $s2, $zero, 0x13
/* 1804A4 80251BC4 24150001 */ addiu $s5, $zero, 0x1
.L80251BC8:
/* 1804A8 80251BC8 00641024 */ and $v0, $v1, $a0
/* 1804AC 80251BCC 10400003 */ beqz $v0, .L80251BDC
/* 1804B0 80251BD0 3C020008 */ lui $v0, (0x80000 >> 16)
/* 1804B4 80251BD4 24120013 */ addiu $s2, $zero, 0x13
/* 1804B8 80251BD8 24150001 */ addiu $s5, $zero, 0x1
.L80251BDC:
/* 1804BC 80251BDC 00621024 */ and $v0, $v1, $v0
dgb_01_D_80251BE0_C0F460:
/* 1804C0 80251BE0 54400001 */ bnel $v0, $zero, .L80251BE8
/* 1804C4 80251BE4 2412001D */ addiu $s2, $zero, 0x1D
.L80251BE8:
/* 1804C8 80251BE8 0000F02D */ daddu $fp, $zero, $zero
.L80251BEC:
/* 1804CC 80251BEC 8E820188 */ lw $v0, 0x188($s4)
/* 1804D0 80251BF0 3C030040 */ lui $v1, (0x400000 >> 16)
/* 1804D4 80251BF4 00431024 */ and $v0, $v0, $v1
/* 1804D8 80251BF8 10400025 */ beqz $v0, dgb_01_D_80251C90_C0F510
/* 1804DC 80251BFC 00000000 */ nop
/* 1804E0 80251C00 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1804E4 80251C04 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1804E8 80251C08 30420020 */ andi $v0, $v0, 0x20
dgb_01_D_80251C0C_C0F48C:
/* 1804EC 80251C0C 104000F4 */ beqz $v0, .L80251FE0
/* 1804F0 80251C10 00000000 */ nop
/* 1804F4 80251C14 82620221 */ lb $v0, 0x221($s3)
/* 1804F8 80251C18 1C40000A */ bgtz $v0, .L80251C44
/* 1804FC 80251C1C 00000000 */ nop
/* 180500 80251C20 82620222 */ lb $v0, 0x222($s3)
/* 180504 80251C24 1C400007 */ bgtz $v0, .L80251C44
/* 180508 80251C28 00000000 */ nop
/* 18050C 80251C2C 82620212 */ lb $v0, 0x212($s3)
/* 180510 80251C30 54400006 */ bnel $v0, $zero, .L80251C4C
/* 180514 80251C34 2412000A */ addiu $s2, $zero, 0xA
dgb_01_D_80251C38_C0F4B8:
/* 180518 80251C38 82620218 */ lb $v0, 0x218($s3)
/* 18051C 80251C3C 10400014 */ beqz $v0, dgb_01_D_80251C90_C0F510
nok_01_Quizmo_Worker:
/* 180520 80251C40 00000000 */ nop
.L80251C44:
/* 180524 80251C44 82620212 */ lb $v0, 0x212($s3)
/* 180528 80251C48 2412000A */ addiu $s2, $zero, 0xA
.L80251C4C:
/* 18052C 80251C4C A2600221 */ sb $zero, 0x221($s3)
/* 180530 80251C50 A2600222 */ sb $zero, 0x222($s3)
/* 180534 80251C54 10400005 */ beqz $v0, .L80251C6C
nok_01_Quizmo_AnswerResult:
/* 180538 80251C58 A2600220 */ sb $zero, 0x220($s3)
/* 18053C 80251C5C 86640436 */ lh $a0, 0x436($s3)
nok_01_Quizmo_StageEffect:
/* 180540 80251C60 A2600212 */ sb $zero, 0x212($s3)
dgb_01_D_80251C64_C0F4E4:
/* 180544 80251C64 0C011E68 */ jal remove_status_static
nok_01_Quizmo_VannaTEffect:
/* 180548 80251C68 A2600213 */ sb $zero, 0x213($s3)
.L80251C6C:
/* 18054C 80251C6C 82620218 */ lb $v0, 0x218($s3)
nok_01_D_80251C70:
/* 180550 80251C70 10400006 */ beqz $v0, .L80251C8C
/* 180554 80251C74 24150001 */ addiu $s5, $zero, 0x1
/* 180558 80251C78 86640436 */ lh $a0, 0x436($s3)
/* 18055C 80251C7C A2600218 */ sb $zero, 0x218($s3)
/* 180560 80251C80 0C011EAA */ jal remove_status_transparent
/* 180564 80251C84 A2600219 */ sb $zero, 0x219($s3)
/* 180568 80251C88 24150001 */ addiu $s5, $zero, 0x1
.L80251C8C:
/* 18056C 80251C8C 0000F02D */ daddu $fp, $zero, $zero
dgb_01_D_80251C90_C0F510:
/* 180570 80251C90 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 180574 80251C94 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 180578 80251C98 30420020 */ andi $v0, $v0, 0x20
/* 18057C 80251C9C 104000D0 */ beqz $v0, .L80251FE0
/* 180580 80251CA0 3C030080 */ lui $v1, (0x800000 >> 16)
/* 180584 80251CA4 8E820188 */ lw $v0, 0x188($s4)
/* 180588 80251CA8 00431024 */ and $v0, $v0, $v1
/* 18058C 80251CAC 1040000D */ beqz $v0, .L80251CE4
/* 180590 80251CB0 3C020004 */ lui $v0, (0x40000 >> 16)
/* 180594 80251CB4 8EE3007C */ lw $v1, 0x7C($s7)
/* 180598 80251CB8 00621024 */ and $v0, $v1, $v0
dgb_01_D_80251CBC_C0F53C:
/* 18059C 80251CBC 10400003 */ beqz $v0, .L80251CCC
/* 1805A0 80251CC0 24120019 */ addiu $s2, $zero, 0x19
/* 1805A4 80251CC4 24120014 */ addiu $s2, $zero, 0x14
/* 1805A8 80251CC8 24150001 */ addiu $s5, $zero, 0x1
.L80251CCC:
/* 1805AC 80251CCC 3C020008 */ lui $v0, (0x80000 >> 16)
/* 1805B0 80251CD0 00621024 */ and $v0, $v1, $v0
/* 1805B4 80251CD4 10400003 */ beqz $v0, .L80251CE4
/* 1805B8 80251CD8 00000000 */ nop
/* 1805BC 80251CDC 24120014 */ addiu $s2, $zero, 0x14
/* 1805C0 80251CE0 24150001 */ addiu $s5, $zero, 0x1
.L80251CE4:
/* 1805C4 80251CE4 3C02800E */ lui $v0, %hi(gBattleStatus)
dgb_01_D_80251CE8_C0F568:
/* 1805C8 80251CE8 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1805CC 80251CEC 30420020 */ andi $v0, $v0, 0x20
D_80251CF0:
/* 1805D0 80251CF0 104000BB */ beqz $v0, .L80251FE0
/* 1805D4 80251CF4 3C030400 */ lui $v1, (0x4000000 >> 16)
/* 1805D8 80251CF8 8E820188 */ lw $v0, 0x188($s4)
/* 1805DC 80251CFC 00431024 */ and $v0, $v0, $v1
/* 1805E0 80251D00 10400006 */ beqz $v0, .L80251D1C
/* 1805E4 80251D04 2402000A */ addiu $v0, $zero, 0xA
/* 1805E8 80251D08 52420001 */ beql $s2, $v0, .L80251D10
/* 1805EC 80251D0C 2412000B */ addiu $s2, $zero, 0xB
.L80251D10:
/* 1805F0 80251D10 24020020 */ addiu $v0, $zero, 0x20
dgb_01_D_80251D14_C0F594:
/* 1805F4 80251D14 52420001 */ beql $s2, $v0, .L80251D1C
/* 1805F8 80251D18 24120021 */ addiu $s2, $zero, 0x21
.L80251D1C:
/* 1805FC 80251D1C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 180600 80251D20 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 180604 80251D24 30420020 */ andi $v0, $v0, 0x20
/* 180608 80251D28 104000AD */ beqz $v0, .L80251FE0
/* 18060C 80251D2C 00000000 */ nop
/* 180610 80251D30 8E820188 */ lw $v0, 0x188($s4)
/* 180614 80251D34 30420480 */ andi $v0, $v0, 0x480
/* 180618 80251D38 1040000A */ beqz $v0, .L80251D64
/* 18061C 80251D3C 00000000 */ nop
dgb_01_D_80251D40_C0F5C0:
/* 180620 80251D40 8EE2007C */ lw $v0, 0x7C($s7)
/* 180624 80251D44 30424000 */ andi $v0, $v0, 0x4000
/* 180628 80251D48 10400006 */ beqz $v0, .L80251D64
/* 18062C 80251D4C 2402000A */ addiu $v0, $zero, 0xA
/* 180630 80251D50 52420001 */ beql $s2, $v0, .L80251D58
/* 180634 80251D54 2412000C */ addiu $s2, $zero, 0xC
.L80251D58:
/* 180638 80251D58 24020019 */ addiu $v0, $zero, 0x19
/* 18063C 80251D5C 52420001 */ beql $s2, $v0, .L80251D64
/* 180640 80251D60 2412000C */ addiu $s2, $zero, 0xC
.L80251D64:
/* 180644 80251D64 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 180648 80251D68 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
dgb_01_D_80251D6C_C0F5EC:
/* 18064C 80251D6C 30420020 */ andi $v0, $v0, 0x20
/* 180650 80251D70 1040009B */ beqz $v0, .L80251FE0
/* 180654 80251D74 00000000 */ nop
/* 180658 80251D78 8E820188 */ lw $v0, 0x188($s4)
/* 18065C 80251D7C 30420400 */ andi $v0, $v0, 0x400
/* 180660 80251D80 1040000A */ beqz $v0, .L80251DAC
/* 180664 80251D84 3C030080 */ lui $v1, (0x800000 >> 16)
/* 180668 80251D88 8EE2007C */ lw $v0, 0x7C($s7)
/* 18066C 80251D8C 00431024 */ and $v0, $v0, $v1
/* 180670 80251D90 10400006 */ beqz $v0, .L80251DAC
/* 180674 80251D94 2402000A */ addiu $v0, $zero, 0xA
dgb_01_D_80251D98_C0F618:
/* 180678 80251D98 52420001 */ beql $s2, $v0, .L80251DA0
/* 18067C 80251D9C 2412000C */ addiu $s2, $zero, 0xC
.L80251DA0:
/* 180680 80251DA0 24020019 */ addiu $v0, $zero, 0x19
/* 180684 80251DA4 52420001 */ beql $s2, $v0, .L80251DAC
/* 180688 80251DA8 2412000C */ addiu $s2, $zero, 0xC
.L80251DAC:
/* 18068C 80251DAC 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 180690 80251DB0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 180694 80251DB4 30420020 */ andi $v0, $v0, 0x20
/* 180698 80251DB8 10400089 */ beqz $v0, .L80251FE0
/* 18069C 80251DBC 00000000 */ nop
/* 1806A0 80251DC0 8E820188 */ lw $v0, 0x188($s4)
dgb_01_D_80251DC4_C0F644:
/* 1806A4 80251DC4 30420C80 */ andi $v0, $v0, 0xC80
/* 1806A8 80251DC8 1040000A */ beqz $v0, .L80251DF4
/* 1806AC 80251DCC 00000000 */ nop
/* 1806B0 80251DD0 8EE2007C */ lw $v0, 0x7C($s7)
/* 1806B4 80251DD4 30421000 */ andi $v0, $v0, 0x1000
/* 1806B8 80251DD8 10400006 */ beqz $v0, .L80251DF4
/* 1806BC 80251DDC 2402000A */ addiu $v0, $zero, 0xA
/* 1806C0 80251DE0 52420001 */ beql $s2, $v0, .L80251DE8
/* 1806C4 80251DE4 2412000D */ addiu $s2, $zero, 0xD
.L80251DE8:
/* 1806C8 80251DE8 24020019 */ addiu $v0, $zero, 0x19
/* 1806CC 80251DEC 52420001 */ beql $s2, $v0, .L80251DF4
dgb_01_D_80251DF0_C0F670:
/* 1806D0 80251DF0 2412000D */ addiu $s2, $zero, 0xD
.L80251DF4:
/* 1806D4 80251DF4 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1806D8 80251DF8 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1806DC 80251DFC 30420020 */ andi $v0, $v0, 0x20
/* 1806E0 80251E00 10400077 */ beqz $v0, .L80251FE0
/* 1806E4 80251E04 00000000 */ nop
D_80251E08:
/* 1806E8 80251E08 8E820188 */ lw $v0, 0x188($s4)
/* 1806EC 80251E0C 30420002 */ andi $v0, $v0, 0x2
/* 1806F0 80251E10 10400008 */ beqz $v0, D_80251E34
/* 1806F4 80251E14 2402000A */ addiu $v0, $zero, 0xA
/* 1806F8 80251E18 52420001 */ beql $s2, $v0, .L80251E20
dgb_01_D_80251E1C_C0F69C:
/* 1806FC 80251E1C 2412000E */ addiu $s2, $zero, 0xE
.L80251E20:
/* 180700 80251E20 24020020 */ addiu $v0, $zero, 0x20
/* 180704 80251E24 52420001 */ beql $s2, $v0, .L80251E2C
/* 180708 80251E28 24120024 */ addiu $s2, $zero, 0x24
.L80251E2C:
/* 18070C 80251E2C 24080001 */ addiu $t0, $zero, 0x1
/* 180710 80251E30 AFA80024 */ sw $t0, 0x24($sp)
D_80251E34:
/* 180714 80251E34 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 180718 80251E38 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 18071C 80251E3C 30420020 */ andi $v0, $v0, 0x20
/* 180720 80251E40 10400067 */ beqz $v0, .L80251FE0
/* 180724 80251E44 00000000 */ nop
dgb_01_D_80251E48_C0F6C8:
/* 180728 80251E48 86820180 */ lh $v0, 0x180($s4)
/* 18072C 80251E4C 04400064 */ bltz $v0, .L80251FE0
/* 180730 80251E50 24020020 */ addiu $v0, $zero, 0x20
/* 180734 80251E54 12420062 */ beq $s2, $v0, .L80251FE0
/* 180738 80251E58 24020021 */ addiu $v0, $zero, 0x21
/* 18073C 80251E5C 12420060 */ beq $s2, $v0, .L80251FE0
/* 180740 80251E60 24020022 */ addiu $v0, $zero, 0x22
/* 180744 80251E64 1242005E */ beq $s2, $v0, .L80251FE0
/* 180748 80251E68 3C030008 */ lui $v1, (0x80000 >> 16)
/* 18074C 80251E6C 8E820190 */ lw $v0, 0x190($s4)
/* 180750 80251E70 00431024 */ and $v0, $v0, $v1
dgb_01_D_80251E74_C0F6F4:
/* 180754 80251E74 10400006 */ beqz $v0, .L80251E90
D_80251E78:
/* 180758 80251E78 0260202D */ daddu $a0, $s3, $zero
/* 18075C 80251E7C 2405000A */ addiu $a1, $zero, 0xA
/* 180760 80251E80 0C099ADE */ jal try_inflict_status
D_80251E84:
/* 180764 80251E84 24060027 */ addiu $a2, $zero, 0x27
/* 180768 80251E88 54400001 */ bnel $v0, $zero, .L80251E90
/* 18076C 80251E8C 24150001 */ addiu $s5, $zero, 0x1
.L80251E90:
/* 180770 80251E90 8E820190 */ lw $v0, 0x190($s4)
/* 180774 80251E94 3C030002 */ lui $v1, (0x20000 >> 16)
/* 180778 80251E98 00431024 */ and $v0, $v0, $v1
/* 18077C 80251E9C 10400006 */ beqz $v0, .L80251EB8
dgb_01_D_80251EA0_C0F720:
/* 180780 80251EA0 0260202D */ daddu $a0, $s3, $zero
/* 180784 80251EA4 24050009 */ addiu $a1, $zero, 0x9
/* 180788 80251EA8 0C099ADE */ jal try_inflict_status
/* 18078C 80251EAC 24060025 */ addiu $a2, $zero, 0x25
/* 180790 80251EB0 54400001 */ bnel $v0, $zero, .L80251EB8
/* 180794 80251EB4 24150001 */ addiu $s5, $zero, 0x1
.L80251EB8:
/* 180798 80251EB8 8E820190 */ lw $v0, 0x190($s4)
/* 18079C 80251EBC 3C030010 */ lui $v1, (0x100000 >> 16)
/* 1807A0 80251EC0 00431024 */ and $v0, $v0, $v1
/* 1807A4 80251EC4 10400006 */ beqz $v0, .L80251EE0
/* 1807A8 80251EC8 0260202D */ daddu $a0, $s3, $zero
dgb_01_D_80251ECC_C0F74C:
/* 1807AC 80251ECC 2405000C */ addiu $a1, $zero, 0xC
/* 1807B0 80251ED0 0C099ADE */ jal try_inflict_status
/* 1807B4 80251ED4 24060028 */ addiu $a2, $zero, 0x28
/* 1807B8 80251ED8 54400001 */ bnel $v0, $zero, .L80251EE0
/* 1807BC 80251EDC 24150001 */ addiu $s5, $zero, 0x1
.L80251EE0:
/* 1807C0 80251EE0 8E820190 */ lw $v0, 0x190($s4)
/* 1807C4 80251EE4 30421000 */ andi $v0, $v0, 0x1000
/* 1807C8 80251EE8 10400006 */ beqz $v0, .L80251F04
/* 1807CC 80251EEC 0260202D */ daddu $a0, $s3, $zero
/* 1807D0 80251EF0 24050006 */ addiu $a1, $zero, 0x6
/* 1807D4 80251EF4 0C099ADE */ jal try_inflict_status
dgb_01_D_80251EF8_C0F778:
/* 1807D8 80251EF8 24060020 */ addiu $a2, $zero, 0x20
/* 1807DC 80251EFC 54400001 */ bnel $v0, $zero, .L80251F04
/* 1807E0 80251F00 24150001 */ addiu $s5, $zero, 0x1
.L80251F04:
/* 1807E4 80251F04 8E820190 */ lw $v0, 0x190($s4)
/* 1807E8 80251F08 3C030020 */ lui $v1, (0x200000 >> 16)
/* 1807EC 80251F0C 00431024 */ and $v0, $v0, $v1
/* 1807F0 80251F10 10400006 */ beqz $v0, .L80251F2C
/* 1807F4 80251F14 0260202D */ daddu $a0, $s3, $zero
/* 1807F8 80251F18 24050008 */ addiu $a1, $zero, 0x8
/* 1807FC 80251F1C 0C099ADE */ jal try_inflict_status
/* 180800 80251F20 24060029 */ addiu $a2, $zero, 0x29
dgb_01_D_80251F24_C0F7A4:
/* 180804 80251F24 54400001 */ bnel $v0, $zero, .L80251F2C
/* 180808 80251F28 24150001 */ addiu $s5, $zero, 0x1
.L80251F2C:
/* 18080C 80251F2C 8E820190 */ lw $v0, 0x190($s4)
/* 180810 80251F30 30422000 */ andi $v0, $v0, 0x2000
/* 180814 80251F34 10400006 */ beqz $v0, dgb_01_D_80251F50_C0F7D0
/* 180818 80251F38 0260202D */ daddu $a0, $s3, $zero
/* 18081C 80251F3C 2405000B */ addiu $a1, $zero, 0xB
/* 180820 80251F40 0C099ADE */ jal try_inflict_status
/* 180824 80251F44 24060021 */ addiu $a2, $zero, 0x21
/* 180828 80251F48 54400001 */ bnel $v0, $zero, dgb_01_D_80251F50_C0F7D0
/* 18082C 80251F4C 24150001 */ addiu $s5, $zero, 0x1
dgb_01_D_80251F50_C0F7D0:
/* 180830 80251F50 8E820190 */ lw $v0, 0x190($s4)
/* 180834 80251F54 30428000 */ andi $v0, $v0, 0x8000
/* 180838 80251F58 10400006 */ beqz $v0, .L80251F74
/* 18083C 80251F5C 0260202D */ daddu $a0, $s3, $zero
/* 180840 80251F60 24050003 */ addiu $a1, $zero, 0x3
/* 180844 80251F64 0C099ADE */ jal try_inflict_status
D_80251F68:
/* 180848 80251F68 24060023 */ addiu $a2, $zero, 0x23
/* 18084C 80251F6C 54400001 */ bnel $v0, $zero, .L80251F74
/* 180850 80251F70 24150001 */ addiu $s5, $zero, 0x1
.L80251F74:
/* 180854 80251F74 8E820190 */ lw $v0, 0x190($s4)
/* 180858 80251F78 3C030001 */ lui $v1, (0x10000 >> 16)
dgb_01_D_80251F7C_C0F7FC:
/* 18085C 80251F7C 00431024 */ and $v0, $v0, $v1
/* 180860 80251F80 10400006 */ beqz $v0, .L80251F9C
/* 180864 80251F84 0260202D */ daddu $a0, $s3, $zero
/* 180868 80251F88 24050005 */ addiu $a1, $zero, 0x5
/* 18086C 80251F8C 0C099ADE */ jal try_inflict_status
/* 180870 80251F90 24060026 */ addiu $a2, $zero, 0x26
/* 180874 80251F94 54400001 */ bnel $v0, $zero, .L80251F9C
/* 180878 80251F98 24150001 */ addiu $s5, $zero, 0x1
.L80251F9C:
/* 18087C 80251F9C 8E820190 */ lw $v0, 0x190($s4)
/* 180880 80251FA0 3C030004 */ lui $v1, (0x40000 >> 16)
/* 180884 80251FA4 00431024 */ and $v0, $v0, $v1
dgb_01_D_80251FA8_C0F828:
/* 180888 80251FA8 10400006 */ beqz $v0, .L80251FC4
/* 18088C 80251FAC 0260202D */ daddu $a0, $s3, $zero
/* 180890 80251FB0 24050004 */ addiu $a1, $zero, 0x4
/* 180894 80251FB4 0C099ADE */ jal try_inflict_status
/* 180898 80251FB8 24060024 */ addiu $a2, $zero, 0x24
/* 18089C 80251FBC 54400001 */ bnel $v0, $zero, .L80251FC4
/* 1808A0 80251FC0 24150001 */ addiu $s5, $zero, 0x1
.L80251FC4:
/* 1808A4 80251FC4 12A00006 */ beqz $s5, .L80251FE0
/* 1808A8 80251FC8 24020017 */ addiu $v0, $zero, 0x17
/* 1808AC 80251FCC 52420001 */ beql $s2, $v0, dgb_01_D_80251FD4_C0F854
/* 1808B0 80251FD0 24120009 */ addiu $s2, $zero, 0x9
dgb_01_D_80251FD4_C0F854:
/* 1808B4 80251FD4 24020019 */ addiu $v0, $zero, 0x19
/* 1808B8 80251FD8 52420001 */ beql $s2, $v0, .L80251FE0
/* 1808BC 80251FDC 2412000A */ addiu $s2, $zero, 0xA
.L80251FE0:
/* 1808C0 80251FE0 8E620008 */ lw $v0, 0x8($s3)
/* 1808C4 80251FE4 92830194 */ lbu $v1, 0x194($s4)
/* 1808C8 80251FE8 9050001B */ lbu $s0, 0x1B($v0)
/* 1808CC 80251FEC 00700018 */ mult $v1, $s0
/* 1808D0 80251FF0 00001812 */ mflo $v1
/* 1808D4 80251FF4 3C0251EB */ lui $v0, (0x51EB851F >> 16)
/* 1808D8 80251FF8 3442851F */ ori $v0, $v0, (0x51EB851F & 0xFFFF)
/* 1808DC 80251FFC 00620018 */ mult $v1, $v0
dgb_01_D_80252000_C0F880:
/* 1808E0 80252000 3C16800E */ lui $s6, %hi(gBattleStatus)
/* 1808E4 80252004 26D6C070 */ addiu $s6, $s6, %lo(gBattleStatus)
/* 1808E8 80252008 8EC20000 */ lw $v0, 0x0($s6)
/* 1808EC 8025200C 00031FC3 */ sra $v1, $v1, 31
/* 1808F0 80252010 30420020 */ andi $v0, $v0, 0x20
/* 1808F4 80252014 00004810 */ mfhi $t1
/* 1808F8 80252018 00092143 */ sra $a0, $t1, 5
/* 1808FC 8025201C 10400027 */ beqz $v0, .L802520BC
/* 180900 80252020 00838023 */ subu $s0, $a0, $v1
/* 180904 80252024 8E820188 */ lw $v0, 0x188($s4)
/* 180908 80252028 30421000 */ andi $v0, $v0, 0x1000
dgb_01_D_8025202C_C0F8AC:
/* 18090C 8025202C 50400024 */ beql $v0, $zero, .L802520C0
/* 180910 80252030 A2950199 */ sb $s5, 0x199($s4)
/* 180914 80252034 0C00A67F */ jal rand_int
/* 180918 80252038 24040063 */ addiu $a0, $zero, 0x63
/* 18091C 8025203C 0050102A */ slt $v0, $v0, $s0
/* 180920 80252040 1040001D */ beqz $v0, .L802520B8
/* 180924 80252044 24120019 */ addiu $s2, $zero, 0x19
/* 180928 80252048 92620210 */ lbu $v0, 0x210($s3)
/* 18092C 8025204C 2442FFFD */ addiu $v0, $v0, -0x3
/* 180930 80252050 2C420006 */ sltiu $v0, $v0, 0x6
/* 180934 80252054 14400019 */ bnez $v0, .L802520BC
dgb_01_D_80252058_C0F8D8:
/* 180938 80252058 241E0002 */ addiu $fp, $zero, 0x2
/* 18093C 8025205C 8E620000 */ lw $v0, 0x0($s3)
/* 180940 80252060 30420400 */ andi $v0, $v0, 0x400
/* 180944 80252064 14400015 */ bnez $v0, .L802520BC
/* 180948 80252068 00000000 */ nop
/* 18094C 8025206C 24120039 */ addiu $s2, $zero, 0x39
/* 180950 80252070 0000F02D */ daddu $fp, $zero, $zero
/* 180954 80252074 8EC20000 */ lw $v0, 0x0($s6)
/* 180958 80252078 24080001 */ addiu $t0, $zero, 0x1
/* 18095C 8025207C AFA8001C */ sw $t0, 0x1C($sp)
/* 180960 80252080 00521025 */ or $v0, $v0, $s2
dgb_01_D_80252084_C0F904:
/* 180964 80252084 AEC20000 */ sw $v0, 0x0($s6)
/* 180968 80252088 C6200014 */ lwc1 $f0, 0x14($s1)
/* 18096C 8025208C 24040231 */ addiu $a0, $zero, 0x231
/* 180970 80252090 E7A00010 */ swc1 $f0, 0x10($sp)
/* 180974 80252094 8E26000C */ lw $a2, 0xC($s1)
/* 180978 80252098 8E270010 */ lw $a3, 0x10($s1)
/* 18097C 8025209C 0C052757 */ jal sfx_play_sound_at_position
/* 180980 802520A0 03C0282D */ daddu $a1, $fp, $zero
/* 180984 802520A4 8EC20000 */ lw $v0, 0x0($s6)
/* 180988 802520A8 24150001 */ addiu $s5, $zero, 0x1
/* 18098C 802520AC 34420040 */ ori $v0, $v0, 0x40
dgb_01_D_802520B0_C0F930:
/* 180990 802520B0 0809482F */ j .L802520BC
/* 180994 802520B4 AEC20000 */ sw $v0, 0x0($s6)
.L802520B8:
/* 180998 802520B8 241E0002 */ addiu $fp, $zero, 0x2
.L802520BC:
/* 18099C 802520BC A2950199 */ sb $s5, 0x199($s4)
.L802520C0:
/* 1809A0 802520C0 8FA8001C */ lw $t0, 0x1C($sp)
/* 1809A4 802520C4 11000006 */ beqz $t0, .L802520E0
/* 1809A8 802520C8 00000000 */ nop
/* 1809AC 802520CC 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1809B0 802520D0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1809B4 802520D4 30420240 */ andi $v0, $v0, 0x240
D_802520D8:
/* 1809B8 802520D8 14400008 */ bnez $v0, .L802520FC
dgb_01_D_802520DC_C0F95C:
/* 1809BC 802520DC 00000000 */ nop
.L802520E0:
/* 1809C0 802520E0 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1809C4 802520E4 8C63C070 */ lw $v1, %lo(gBattleStatus)($v1)
/* 1809C8 802520E8 30620240 */ andi $v0, $v1, 0x240
/* 1809CC 802520EC 10400027 */ beqz $v0, dgb_01_D_8025218C_C0FA0C
/* 1809D0 802520F0 30620080 */ andi $v0, $v1, 0x80
/* 1809D4 802520F4 14400025 */ bnez $v0, dgb_01_D_8025218C_C0FA0C
/* 1809D8 802520F8 00000000 */ nop
.L802520FC:
/* 1809DC 802520FC 86820180 */ lh $v0, 0x180($s4)
/* 1809E0 80252100 1840000B */ blez $v0, .L80252130
/* 1809E4 80252104 00000000 */ nop
dgb_01_D_80252108_C0F988:
/* 1809E8 80252108 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1809EC 8025210C 24040231 */ addiu $a0, $zero, 0x231
/* 1809F0 80252110 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1809F4 80252114 8E26000C */ lw $a2, 0xC($s1)
/* 1809F8 80252118 8E270010 */ lw $a3, 0x10($s1)
/* 1809FC 8025211C 0C052757 */ jal sfx_play_sound_at_position
/* 180A00 80252120 0000282D */ daddu $a1, $zero, $zero
/* 180A04 80252124 86820180 */ lh $v0, 0x180($s4)
/* 180A08 80252128 1C400009 */ bgtz $v0, .L80252150
/* 180A0C 8025212C 00000000 */ nop
.L80252130:
/* 180A10 80252130 8E820188 */ lw $v0, 0x188($s4)
dgb_01_D_80252134_C0F9B4:
/* 180A14 80252134 3C034000 */ lui $v1, (0x40000000 >> 16)
/* 180A18 80252138 00431024 */ and $v0, $v0, $v1
/* 180A1C 8025213C 10400013 */ beqz $v0, dgb_01_D_8025218C_C0FA0C
/* 180A20 80252140 00000000 */ nop
/* 180A24 80252144 8FA8001C */ lw $t0, 0x1C($sp)
D_80252148:
/* 180A28 80252148 11000010 */ beqz $t0, dgb_01_D_8025218C_C0FA0C
/* 180A2C 8025214C 00000000 */ nop
.L80252150:
/* 180A30 80252150 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 180A34 80252154 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 180A38 80252158 30420040 */ andi $v0, $v0, 0x40
/* 180A3C 8025215C 10400004 */ beqz $v0, .L80252170
dgb_01_D_80252160_C0F9E0:
/* 180A40 80252160 0000202D */ daddu $a0, $zero, $zero
/* 180A44 80252164 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180A48 80252168 0809485F */ j .L8025217C
/* 180A4C 8025216C E7A00010 */ swc1 $f0, 0x10($sp)
.L80252170:
/* 180A50 80252170 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180A54 80252174 24040003 */ addiu $a0, $zero, 0x3
/* 180A58 80252178 E7A00010 */ swc1 $f0, 0x10($sp)
.L8025217C:
/* 180A5C 8025217C 8E26000C */ lw $a2, 0xC($s1)
/* 180A60 80252180 8E270010 */ lw $a3, 0x10($s1)
/* 180A64 80252184 0C0999FC */ jal show_action_rating
/* 180A68 80252188 0260282D */ daddu $a1, $s3, $zero
dgb_01_D_8025218C_C0FA0C:
/* 180A6C 8025218C 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 180A70 80252190 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 180A74 80252194 8E020000 */ lw $v0, 0x0($s0)
/* 180A78 80252198 30420020 */ andi $v0, $v0, 0x20
/* 180A7C 8025219C 10400004 */ beqz $v0, .L802521B0
/* 180A80 802521A0 0260202D */ daddu $a0, $s3, $zero
/* 180A84 802521A4 0C099A5C */ jal func_80266970
/* 180A88 802521A8 0260202D */ daddu $a0, $s3, $zero
/* 180A8C 802521AC 0260202D */ daddu $a0, $s3, $zero
.L802521B0:
/* 180A90 802521B0 0C09DC58 */ jal dispatch_event_actor
/* 180A94 802521B4 0240282D */ daddu $a1, $s2, $zero
dgb_01_D_802521B8_C0FA38:
/* 180A98 802521B8 8FA80020 */ lw $t0, 0x20($sp)
/* 180A9C 802521BC 24020100 */ addiu $v0, $zero, 0x100
/* 180AA0 802521C0 1502000A */ bne $t0, $v0, .L802521EC
/* 180AA4 802521C4 00000000 */ nop
/* 180AA8 802521C8 86860180 */ lh $a2, 0x180($s4)
/* 180AAC 802521CC 18C00007 */ blez $a2, .L802521EC
/* 180AB0 802521D0 00000000 */ nop
/* 180AB4 802521D4 8E020000 */ lw $v0, 0x0($s0)
/* 180AB8 802521D8 30420020 */ andi $v0, $v0, 0x20
/* 180ABC 802521DC 10400003 */ beqz $v0, .L802521EC
/* 180AC0 802521E0 0260202D */ daddu $a0, $s3, $zero
dgb_01_D_802521E4_C0FA64:
/* 180AC4 802521E4 0C0997D0 */ jal inflict_status
/* 180AC8 802521E8 2405000D */ addiu $a1, $zero, 0xD
.L802521EC:
/* 180ACC 802521EC 8E620000 */ lw $v0, 0x0($s3)
/* 180AD0 802521F0 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 180AD4 802521F4 00431024 */ and $v0, $v0, $v1
/* 180AD8 802521F8 14400030 */ bnez $v0, .L802522BC
/* 180ADC 802521FC 00000000 */ nop
/* 180AE0 80252200 86870180 */ lh $a3, 0x180($s4)
/* 180AE4 80252204 14E00010 */ bnez $a3, .L80252248
/* 180AE8 80252208 00000000 */ nop
/* 180AEC 8025220C 8FA8001C */ lw $t0, 0x1C($sp)
dgb_01_D_80252210_C0FA90:
/* 180AF0 80252210 1500002A */ bnez $t0, .L802522BC
/* 180AF4 80252214 00000000 */ nop
/* 180AF8 80252218 16A00028 */ bnez $s5, .L802522BC
/* 180AFC 8025221C 24020001 */ addiu $v0, $zero, 0x1
/* 180B00 80252220 AFA20010 */ sw $v0, 0x10($sp)
/* 180B04 80252224 24020003 */ addiu $v0, $zero, 0x3
/* 180B08 80252228 AFA20014 */ sw $v0, 0x14($sp)
/* 180B0C 8025222C C62C000C */ lwc1 $f12, 0xC($s1)
/* 180B10 80252230 C62E0010 */ lwc1 $f14, 0x10($s1)
/* 180B14 80252234 8E260014 */ lw $a2, 0x14($s1)
/* 180B18 80252238 0C093BF8 */ jal func_8024EFE0
dgb_01_D_8025223C_C0FABC:
/* 180B1C 8025223C 0000382D */ daddu $a3, $zero, $zero
/* 180B20 80252240 080948AF */ j .L802522BC
/* 180B24 80252244 00000000 */ nop
.L80252248:
/* 180B28 80252248 8FA80018 */ lw $t0, 0x18($sp)
/* 180B2C 8025224C 1500001B */ bnez $t0, .L802522BC
/* 180B30 80252250 3C032000 */ lui $v1, (0x20000040 >> 16)
/* 180B34 80252254 8E820188 */ lw $v0, 0x188($s4)
D_80252258:
/* 180B38 80252258 34630040 */ ori $v1, $v1, (0x20000040 & 0xFFFF)
/* 180B3C 8025225C 00431024 */ and $v0, $v0, $v1
/* 180B40 80252260 10400007 */ beqz $v0, .L80252280
/* 180B44 80252264 AFA00010 */ sw $zero, 0x10($sp)
dgb_01_D_80252268_C0FAE8:
/* 180B48 80252268 C62C000C */ lwc1 $f12, 0xC($s1)
/* 180B4C 8025226C C62E0010 */ lwc1 $f14, 0x10($s1)
/* 180B50 80252270 0C09996B */ jal show_next_damage_popup
/* 180B54 80252274 8E260014 */ lw $a2, 0x14($s1)
/* 180B58 80252278 080948A4 */ j .L80252290
/* 180B5C 8025227C 00000000 */ nop
.L80252280:
/* 180B60 80252280 C62C000C */ lwc1 $f12, 0xC($s1)
/* 180B64 80252284 C62E0010 */ lwc1 $f14, 0x10($s1)
/* 180B68 80252288 0C099937 */ jal show_primary_damage_popup
/* 180B6C 8025228C 8E260014 */ lw $a2, 0x14($s1)
.L80252290:
/* 180B70 80252290 8EE20004 */ lw $v0, 0x4($s7)
dgb_01_D_80252294_C0FB14:
/* 180B74 80252294 30420004 */ andi $v0, $v0, 0x4
/* 180B78 80252298 14400008 */ bnez $v0, .L802522BC
/* 180B7C 8025229C 00000000 */ nop
/* 180B80 802522A0 86820180 */ lh $v0, 0x180($s4)
/* 180B84 802522A4 AFA20010 */ sw $v0, 0x10($sp)
/* 180B88 802522A8 8E25000C */ lw $a1, 0xC($s1)
/* 180B8C 802522AC 8E260010 */ lw $a2, 0x10($s1)
/* 180B90 802522B0 8E270014 */ lw $a3, 0x14($s1)
/* 180B94 802522B4 0C0999B9 */ jal show_damage_fx
/* 180B98 802522B8 0260202D */ daddu $a0, $s3, $zero
.L802522BC:
/* 180B9C 802522BC 86820180 */ lh $v0, 0x180($s4)
dgb_01_D_802522C0_C0FB40:
/* 180BA0 802522C0 18400022 */ blez $v0, .L8025234C
/* 180BA4 802522C4 00000000 */ nop
/* 180BA8 802522C8 8FA80018 */ lw $t0, 0x18($sp)
/* 180BAC 802522CC 1500001D */ bnez $t0, dgb_01_D_80252344_C0FBC4
/* 180BB0 802522D0 0260202D */ daddu $a0, $s3, $zero
/* 180BB4 802522D4 0C099C06 */ jal func_80267018
/* 180BB8 802522D8 24050001 */ addiu $a1, $zero, 0x1
/* 180BBC 802522DC 8FA80024 */ lw $t0, 0x24($sp)
/* 180BC0 802522E0 11000004 */ beqz $t0, .L802522F4
/* 180BC4 802522E4 240400EA */ addiu $a0, $zero, 0xEA
/* 180BC8 802522E8 C6200014 */ lwc1 $f0, 0x14($s1)
dgb_01_D_802522EC_C0FB6C:
/* 180BCC 802522EC 080948CC */ j .L80252330
/* 180BD0 802522F0 E7A00010 */ swc1 $f0, 0x10($sp)
.L802522F4:
/* 180BD4 802522F4 8FA80028 */ lw $t0, 0x28($sp)
/* 180BD8 802522F8 11000004 */ beqz $t0, .L8025230C
/* 180BDC 802522FC 2404037B */ addiu $a0, $zero, 0x37B
/* 180BE0 80252300 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180BE4 80252304 080948CC */ j .L80252330
/* 180BE8 80252308 E7A00010 */ swc1 $f0, 0x10($sp)
.L8025230C:
/* 180BEC 8025230C 8FA8002C */ lw $t0, 0x2C($sp)
/* 180BF0 80252310 11000004 */ beqz $t0, .L80252324
/* 180BF4 80252314 240400EB */ addiu $a0, $zero, 0xEB
dgb_01_D_80252318_C0FB98:
/* 180BF8 80252318 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180BFC 8025231C 080948CC */ j .L80252330
/* 180C00 80252320 E7A00010 */ swc1 $f0, 0x10($sp)
.L80252324:
/* 180C04 80252324 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180C08 80252328 240400E9 */ addiu $a0, $zero, 0xE9
D_8025232C:
/* 180C0C 8025232C E7A00010 */ swc1 $f0, 0x10($sp)
.L80252330:
/* 180C10 80252330 8E26000C */ lw $a2, 0xC($s1)
/* 180C14 80252334 8E270010 */ lw $a3, 0x10($s1)
/* 180C18 80252338 0C052757 */ jal sfx_play_sound_at_position
/* 180C1C 8025233C 0000282D */ daddu $a1, $zero, $zero
/* 180C20 80252340 86820180 */ lh $v0, 0x180($s4)
dgb_01_D_80252344_C0FBC4:
/* 180C24 80252344 1C400003 */ bgtz $v0, .L80252354
/* 180C28 80252348 00000000 */ nop
.L8025234C:
/* 180C2C 8025234C 12A00005 */ beqz $s5, .L80252364
/* 180C30 80252350 00000000 */ nop
.L80252354:
/* 180C34 80252354 8EE20000 */ lw $v0, 0x0($s7)
/* 180C38 80252358 30422000 */ andi $v0, $v0, 0x2000
/* 180C3C 8025235C 10400008 */ beqz $v0, .L80252380
/* 180C40 80252360 00000000 */ nop
.L80252364:
/* 180C44 80252364 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180C48 80252368 2404010C */ addiu $a0, $zero, 0x10C
/* 180C4C 8025236C E7A00010 */ swc1 $f0, 0x10($sp)
dgb_01_D_80252370_C0FBF0:
/* 180C50 80252370 8E26000C */ lw $a2, 0xC($s1)
/* 180C54 80252374 8E270010 */ lw $a3, 0x10($s1)
/* 180C58 80252378 0C052757 */ jal sfx_play_sound_at_position
/* 180C5C 8025237C 0000282D */ daddu $a1, $zero, $zero
.L80252380:
/* 180C60 80252380 8E820190 */ lw $v0, 0x190($s4)
/* 180C64 80252384 30421000 */ andi $v0, $v0, 0x1000
/* 180C68 80252388 10400018 */ beqz $v0, .L802523EC
/* 180C6C 8025238C 00000000 */ nop
/* 180C70 80252390 12A00016 */ beqz $s5, .L802523EC
/* 180C74 80252394 00000000 */ nop
/* 180C78 80252398 3C048029 */ lui $a0, %hi(EVS_PlaySleepHitFX)
dgb_01_D_8025239C_C0FC1C:
/* 180C7C 8025239C 248445E0 */ addiu $a0, $a0, %lo(EVS_PlaySleepHitFX)
/* 180C80 802523A0 2405000A */ addiu $a1, $zero, 0xA
/* 180C84 802523A4 0C0B0CF8 */ jal start_script
/* 180C88 802523A8 0000302D */ daddu $a2, $zero, $zero
/* 180C8C 802523AC C620000C */ lwc1 $f0, 0xC($s1)
/* 180C90 802523B0 4600018D */ trunc.w.s $f6, $f0
D_802523B4:
/* 180C94 802523B4 E4460084 */ swc1 $f6, 0x84($v0)
/* 180C98 802523B8 C6200010 */ lwc1 $f0, 0x10($s1)
/* 180C9C 802523BC 4600018D */ trunc.w.s $f6, $f0
/* 180CA0 802523C0 E4460088 */ swc1 $f6, 0x88($v0)
/* 180CA4 802523C4 C6200014 */ lwc1 $f0, 0x14($s1)
dgb_01_D_802523C8_C0FC48:
/* 180CA8 802523C8 4600018D */ trunc.w.s $f6, $f0
/* 180CAC 802523CC E446008C */ swc1 $f6, 0x8C($v0)
/* 180CB0 802523D0 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180CB4 802523D4 24042031 */ addiu $a0, $zero, 0x2031
/* 180CB8 802523D8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 180CBC 802523DC 8E26000C */ lw $a2, 0xC($s1)
/* 180CC0 802523E0 8E270010 */ lw $a3, 0x10($s1)
/* 180CC4 802523E4 0C052757 */ jal sfx_play_sound_at_position
/* 180CC8 802523E8 0000282D */ daddu $a1, $zero, $zero
.L802523EC:
/* 180CCC 802523EC 8E820190 */ lw $v0, 0x190($s4)
/* 180CD0 802523F0 3C030004 */ lui $v1, (0x40000 >> 16)
dgb_01_D_802523F4_C0FC74:
/* 180CD4 802523F4 00431024 */ and $v0, $v0, $v1
/* 180CD8 802523F8 10400018 */ beqz $v0, .L8025245C
/* 180CDC 802523FC 00000000 */ nop
D_80252400:
/* 180CE0 80252400 12A00016 */ beqz $s5, .L8025245C
D_80252404:
/* 180CE4 80252404 00000000 */ nop
/* 180CE8 80252408 3C048029 */ lui $a0, %hi(EVS_PlayDizzyHitFX)
/* 180CEC 8025240C 248445FC */ addiu $a0, $a0, %lo(EVS_PlayDizzyHitFX)
/* 180CF0 80252410 2405000A */ addiu $a1, $zero, 0xA
/* 180CF4 80252414 0C0B0CF8 */ jal start_script
/* 180CF8 80252418 0000302D */ daddu $a2, $zero, $zero
/* 180CFC 8025241C C620000C */ lwc1 $f0, 0xC($s1)
dgb_01_D_80252420_C0FCA0:
/* 180D00 80252420 4600018D */ trunc.w.s $f6, $f0
/* 180D04 80252424 E4460084 */ swc1 $f6, 0x84($v0)
/* 180D08 80252428 C6200010 */ lwc1 $f0, 0x10($s1)
/* 180D0C 8025242C 4600018D */ trunc.w.s $f6, $f0
/* 180D10 80252430 E4460088 */ swc1 $f6, 0x88($v0)
/* 180D14 80252434 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180D18 80252438 4600018D */ trunc.w.s $f6, $f0
/* 180D1C 8025243C E446008C */ swc1 $f6, 0x8C($v0)
/* 180D20 80252440 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180D24 80252444 24042032 */ addiu $a0, $zero, 0x2032
/* 180D28 80252448 E7A00010 */ swc1 $f0, 0x10($sp)
dgb_01_D_8025244C_C0FCCC:
/* 180D2C 8025244C 8E26000C */ lw $a2, 0xC($s1)
/* 180D30 80252450 8E270010 */ lw $a3, 0x10($s1)
/* 180D34 80252454 0C052757 */ jal sfx_play_sound_at_position
/* 180D38 80252458 0000282D */ daddu $a1, $zero, $zero
.L8025245C:
/* 180D3C 8025245C 8E820190 */ lw $v0, 0x190($s4)
/* 180D40 80252460 3C030001 */ lui $v1, (0x10000 >> 16)
/* 180D44 80252464 00431024 */ and $v0, $v0, $v1
/* 180D48 80252468 10400018 */ beqz $v0, .L802524CC
/* 180D4C 8025246C 00000000 */ nop
/* 180D50 80252470 12A00016 */ beqz $s5, .L802524CC
/* 180D54 80252474 00000000 */ nop
dgb_01_D_80252478_C0FCF8:
/* 180D58 80252478 3C048029 */ lui $a0, %hi(EVS_PlayParalyzeHitFX)
/* 180D5C 8025247C 24844618 */ addiu $a0, $a0, %lo(EVS_PlayParalyzeHitFX)
/* 180D60 80252480 2405000A */ addiu $a1, $zero, 0xA
/* 180D64 80252484 0C0B0CF8 */ jal start_script
/* 180D68 80252488 0000302D */ daddu $a2, $zero, $zero
/* 180D6C 8025248C C620000C */ lwc1 $f0, 0xC($s1)
D_80252490:
/* 180D70 80252490 4600018D */ trunc.w.s $f6, $f0
/* 180D74 80252494 E4460084 */ swc1 $f6, 0x84($v0)
/* 180D78 80252498 C6200010 */ lwc1 $f0, 0x10($s1)
/* 180D7C 8025249C 4600018D */ trunc.w.s $f6, $f0
/* 180D80 802524A0 E4460088 */ swc1 $f6, 0x88($v0)
dgb_01_D_802524A4_C0FD24:
/* 180D84 802524A4 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180D88 802524A8 4600018D */ trunc.w.s $f6, $f0
/* 180D8C 802524AC E446008C */ swc1 $f6, 0x8C($v0)
/* 180D90 802524B0 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180D94 802524B4 24042032 */ addiu $a0, $zero, 0x2032
/* 180D98 802524B8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 180D9C 802524BC 8E26000C */ lw $a2, 0xC($s1)
/* 180DA0 802524C0 8E270010 */ lw $a3, 0x10($s1)
/* 180DA4 802524C4 0C052757 */ jal sfx_play_sound_at_position
/* 180DA8 802524C8 0000282D */ daddu $a1, $zero, $zero
.L802524CC:
/* 180DAC 802524CC 8E820190 */ lw $v0, 0x190($s4)
dgb_01_D_802524D0_C0FD50:
/* 180DB0 802524D0 3C030002 */ lui $v1, (0x20000 >> 16)
/* 180DB4 802524D4 00431024 */ and $v0, $v0, $v1
/* 180DB8 802524D8 10400018 */ beqz $v0, .L8025253C
/* 180DBC 802524DC 00000000 */ nop
/* 180DC0 802524E0 12A00016 */ beqz $s5, .L8025253C
/* 180DC4 802524E4 00000000 */ nop
/* 180DC8 802524E8 3C048029 */ lui $a0, %hi(EVS_PlayPoisonHitFX)
/* 180DCC 802524EC 24844634 */ addiu $a0, $a0, %lo(EVS_PlayPoisonHitFX)
/* 180DD0 802524F0 2405000A */ addiu $a1, $zero, 0xA
/* 180DD4 802524F4 0C0B0CF8 */ jal start_script
/* 180DD8 802524F8 0000302D */ daddu $a2, $zero, $zero
dgb_01_D_802524FC_C0FD7C:
/* 180DDC 802524FC C620000C */ lwc1 $f0, 0xC($s1)
/* 180DE0 80252500 4600018D */ trunc.w.s $f6, $f0
/* 180DE4 80252504 E4460084 */ swc1 $f6, 0x84($v0)
/* 180DE8 80252508 C6200010 */ lwc1 $f0, 0x10($s1)
/* 180DEC 8025250C 4600018D */ trunc.w.s $f6, $f0
/* 180DF0 80252510 E4460088 */ swc1 $f6, 0x88($v0)
/* 180DF4 80252514 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180DF8 80252518 4600018D */ trunc.w.s $f6, $f0
/* 180DFC 8025251C E446008C */ swc1 $f6, 0x8C($v0)
/* 180E00 80252520 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180E04 80252524 24042032 */ addiu $a0, $zero, 0x2032
dgb_01_D_80252528_C0FDA8:
/* 180E08 80252528 E7A00010 */ swc1 $f0, 0x10($sp)
/* 180E0C 8025252C 8E26000C */ lw $a2, 0xC($s1)
/* 180E10 80252530 8E270010 */ lw $a3, 0x10($s1)
/* 180E14 80252534 0C052757 */ jal sfx_play_sound_at_position
/* 180E18 80252538 0000282D */ daddu $a1, $zero, $zero
.L8025253C:
/* 180E1C 8025253C 8E820190 */ lw $v0, 0x190($s4)
/* 180E20 80252540 3C030020 */ lui $v1, (0x200000 >> 16)
/* 180E24 80252544 00431024 */ and $v0, $v0, $v1
/* 180E28 80252548 10400018 */ beqz $v0, dgb_01_D_802525AC_C0FE2C
/* 180E2C 8025254C 00000000 */ nop
/* 180E30 80252550 12A00016 */ beqz $s5, dgb_01_D_802525AC_C0FE2C
dgb_01_D_80252554_C0FDD4:
/* 180E34 80252554 00000000 */ nop
/* 180E38 80252558 3C048029 */ lui $a0, %hi(EVS_PlayStopHitFX)
/* 180E3C 8025255C 24844650 */ addiu $a0, $a0, %lo(EVS_PlayStopHitFX)
/* 180E40 80252560 2405000A */ addiu $a1, $zero, 0xA
/* 180E44 80252564 0C0B0CF8 */ jal start_script
/* 180E48 80252568 0000302D */ daddu $a2, $zero, $zero
/* 180E4C 8025256C C620000C */ lwc1 $f0, 0xC($s1)
/* 180E50 80252570 4600018D */ trunc.w.s $f6, $f0
/* 180E54 80252574 E4460084 */ swc1 $f6, 0x84($v0)
D_80252578:
/* 180E58 80252578 C6200010 */ lwc1 $f0, 0x10($s1)
/* 180E5C 8025257C 4600018D */ trunc.w.s $f6, $f0
dgb_01_D_80252580_C0FE00:
/* 180E60 80252580 E4460088 */ swc1 $f6, 0x88($v0)
/* 180E64 80252584 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180E68 80252588 4600018D */ trunc.w.s $f6, $f0
/* 180E6C 8025258C E446008C */ swc1 $f6, 0x8C($v0)
/* 180E70 80252590 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180E74 80252594 24042032 */ addiu $a0, $zero, 0x2032
/* 180E78 80252598 E7A00010 */ swc1 $f0, 0x10($sp)
/* 180E7C 8025259C 8E26000C */ lw $a2, 0xC($s1)
/* 180E80 802525A0 8E270010 */ lw $a3, 0x10($s1)
/* 180E84 802525A4 0C052757 */ jal sfx_play_sound_at_position
/* 180E88 802525A8 0000282D */ daddu $a1, $zero, $zero
dgb_01_D_802525AC_C0FE2C:
/* 180E8C 802525AC 8E820190 */ lw $v0, 0x190($s4)
/* 180E90 802525B0 30424000 */ andi $v0, $v0, 0x4000
/* 180E94 802525B4 10400019 */ beqz $v0, .L8025261C
/* 180E98 802525B8 00000000 */ nop
/* 180E9C 802525BC 12A00017 */ beqz $s5, .L8025261C
/* 180EA0 802525C0 00000000 */ nop
/* 180EA4 802525C4 3C048029 */ lui $a0, %hi(EVS_PlayFreezeHitFX)
/* 180EA8 802525C8 2484466C */ addiu $a0, $a0, %lo(EVS_PlayFreezeHitFX)
/* 180EAC 802525CC 2405000A */ addiu $a1, $zero, 0xA
/* 180EB0 802525D0 0C0B0CF8 */ jal start_script
/* 180EB4 802525D4 0000302D */ daddu $a2, $zero, $zero
dgb_01_D_802525D8_C0FE58:
/* 180EB8 802525D8 C620000C */ lwc1 $f0, 0xC($s1)
/* 180EBC 802525DC 4600018D */ trunc.w.s $f6, $f0
/* 180EC0 802525E0 E4460084 */ swc1 $f6, 0x84($v0)
/* 180EC4 802525E4 C6200010 */ lwc1 $f0, 0x10($s1)
/* 180EC8 802525E8 4600018D */ trunc.w.s $f6, $f0
/* 180ECC 802525EC E4460088 */ swc1 $f6, 0x88($v0)
/* 180ED0 802525F0 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180ED4 802525F4 AC530090 */ sw $s3, 0x90($v0)
/* 180ED8 802525F8 4600018D */ trunc.w.s $f6, $f0
/* 180EDC 802525FC E446008C */ swc1 $f6, 0x8C($v0)
/* 180EE0 80252600 C6200014 */ lwc1 $f0, 0x14($s1)
dgb_01_D_80252604_C0FE84:
/* 180EE4 80252604 24042032 */ addiu $a0, $zero, 0x2032
/* 180EE8 80252608 E7A00010 */ swc1 $f0, 0x10($sp)
/* 180EEC 8025260C 8E26000C */ lw $a2, 0xC($s1)
/* 180EF0 80252610 8E270010 */ lw $a3, 0x10($s1)
/* 180EF4 80252614 0C052757 */ jal sfx_play_sound_at_position
/* 180EF8 80252618 0000282D */ daddu $a1, $zero, $zero
.L8025261C:
/* 180EFC 8025261C 8E820190 */ lw $v0, 0x190($s4)
/* 180F00 80252620 3C030008 */ lui $v1, (0x80000 >> 16)
/* 180F04 80252624 00431024 */ and $v0, $v0, $v1
/* 180F08 80252628 10400019 */ beqz $v0, .L80252690
/* 180F0C 8025262C 00000000 */ nop
dgb_01_D_80252630_C0FEB0:
/* 180F10 80252630 12A00017 */ beqz $s5, .L80252690
/* 180F14 80252634 00000000 */ nop
/* 180F18 80252638 3C048029 */ lui $a0, %hi(EVS_PlayShrinkHitFX)
/* 180F1C 8025263C 248446B8 */ addiu $a0, $a0, %lo(EVS_PlayShrinkHitFX)
/* 180F20 80252640 2405000A */ addiu $a1, $zero, 0xA
/* 180F24 80252644 0C0B0CF8 */ jal start_script
/* 180F28 80252648 0000302D */ daddu $a2, $zero, $zero
/* 180F2C 8025264C C620000C */ lwc1 $f0, 0xC($s1)
/* 180F30 80252650 4600018D */ trunc.w.s $f6, $f0
/* 180F34 80252654 E4460084 */ swc1 $f6, 0x84($v0)
/* 180F38 80252658 C6200010 */ lwc1 $f0, 0x10($s1)
dgb_01_D_8025265C_C0FEDC:
/* 180F3C 8025265C 4600018D */ trunc.w.s $f6, $f0
/* 180F40 80252660 E4460088 */ swc1 $f6, 0x88($v0)
/* 180F44 80252664 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180F48 80252668 AC530090 */ sw $s3, 0x90($v0)
/* 180F4C 8025266C 4600018D */ trunc.w.s $f6, $f0
/* 180F50 80252670 E446008C */ swc1 $f6, 0x8C($v0)
/* 180F54 80252674 C6200014 */ lwc1 $f0, 0x14($s1)
/* 180F58 80252678 24042032 */ addiu $a0, $zero, 0x2032
/* 180F5C 8025267C E7A00010 */ swc1 $f0, 0x10($sp)
/* 180F60 80252680 8E26000C */ lw $a2, 0xC($s1)
/* 180F64 80252684 8E270010 */ lw $a3, 0x10($s1)
dgb_01_D_80252688_C0FF08:
/* 180F68 80252688 0C052757 */ jal sfx_play_sound_at_position
/* 180F6C 8025268C 0000282D */ daddu $a1, $zero, $zero
.L80252690:
/* 180F70 80252690 8E820188 */ lw $v0, 0x188($s4)
/* 180F74 80252694 30420040 */ andi $v0, $v0, 0x40
/* 180F78 80252698 1040000A */ beqz $v0, .L802526C4
/* 180F7C 8025269C 24020093 */ addiu $v0, $zero, 0x93
/* 180F80 802526A0 92630136 */ lbu $v1, 0x136($s3)
/* 180F84 802526A4 14620007 */ bne $v1, $v0, .L802526C4
/* 180F88 802526A8 24040165 */ addiu $a0, $zero, 0x165
/* 180F8C 802526AC C6200014 */ lwc1 $f0, 0x14($s1)
/* 180F90 802526B0 E7A00010 */ swc1 $f0, 0x10($sp)
dgb_01_D_802526B4_C0FF34:
/* 180F94 802526B4 8E26000C */ lw $a2, 0xC($s1)
/* 180F98 802526B8 8E270010 */ lw $a3, 0x10($s1)
/* 180F9C 802526BC 0C052757 */ jal sfx_play_sound_at_position
/* 180FA0 802526C0 0000282D */ daddu $a1, $zero, $zero
.L802526C4:
/* 180FA4 802526C4 0C099AB7 */ jal show_actor_health_bar
/* 180FA8 802526C8 0260202D */ daddu $a0, $s3, $zero
/* 180FAC 802526CC 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 180FB0 802526D0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 180FB4 802526D4 30420240 */ andi $v0, $v0, 0x240
/* 180FB8 802526D8 10400007 */ beqz $v0, .L802526F8
/* 180FBC 802526DC 03C0102D */ daddu $v0, $fp, $zero
dgb_01_D_802526E0_C0FF60:
/* 180FC0 802526E0 53C00001 */ beql $fp, $zero, .L802526E8
/* 180FC4 802526E4 241E0001 */ addiu $fp, $zero, 0x1
.L802526E8:
/* 180FC8 802526E8 24020002 */ addiu $v0, $zero, 0x2
/* 180FCC 802526EC 53C20001 */ beql $fp, $v0, .L802526F4
/* 180FD0 802526F0 241E0003 */ addiu $fp, $zero, 0x3
.L802526F4:
/* 180FD4 802526F4 03C0102D */ daddu $v0, $fp, $zero
.L802526F8:
/* 180FD8 802526F8 8FBF0054 */ lw $ra, 0x54($sp)
/* 180FDC 802526FC 8FBE0050 */ lw $fp, 0x50($sp)
/* 180FE0 80252700 8FB7004C */ lw $s7, 0x4C($sp)
/* 180FE4 80252704 8FB60048 */ lw $s6, 0x48($sp)
/* 180FE8 80252708 8FB50044 */ lw $s5, 0x44($sp)
dgb_01_D_8025270C_C0FF8C:
/* 180FEC 8025270C 8FB40040 */ lw $s4, 0x40($sp)
/* 180FF0 80252710 8FB3003C */ lw $s3, 0x3C($sp)
/* 180FF4 80252714 8FB20038 */ lw $s2, 0x38($sp)
/* 180FF8 80252718 8FB10034 */ lw $s1, 0x34($sp)
/* 180FFC 8025271C 8FB00030 */ lw $s0, 0x30($sp)
D_80252720:
/* 181000 80252720 03E00008 */ jr $ra
/* 181004 80252724 27BD0058 */ addiu $sp, $sp, 0x58
### DECOMPILED C INSTRUCTIONS:
HitResult calc_item_damage_enemy(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor;
s32 currentTargetID = battleStatus->currentTargetID;
Actor* partner = battleStatus->partnerActor;
s32 currentTargetPartID = battleStatus->currentTargetPart;
s32 partImmuneToElement;
s32 sp1C = FALSE;
s32 actorClass;
s32 isFireDamage = FALSE;
s32 isWaterDamage = FALSE;
s32 isShockDamage = FALSE;
s32 isIceDamage = FALSE;
Actor* target;
ActorPart* targetPart;
Evt* script;
s32 attackDamage;
s32 temp;
s32 targetDefense;
ActorState* state;
s32 dispatchEvent;
s32 wasStatusInflicted;
s32 hitResult;
battleStatus->wasStatusInflicted = FALSE;
battleStatus->lastAttackDamage = 0;
battleStatus->attackerActorID = player->actorID;
battleStatus->currentTargetID2 = battleStatus->currentTargetID;
battleStatus->currentTargetPart2 = battleStatus->currentTargetPart;
target = get_actor(currentTargetID);
wasStatusInflicted = FALSE;
if (target == NULL) {
return HIT_RESULT_HIT;
}
targetPart = get_actor_part(target, currentTargetPartID);
if (targetPart == NULL) {
PANIC();
}
target->lastDamageTaken = 0;
actorClass = currentTargetID & ACTOR_CLASS_MASK;
if (!(gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING)) {
state = &player->state;
} else {
state = &partner->state;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
fx_ring_blast(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
isFireDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SHOCK) {
apply_shock_effect(target);
isShockDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_WATER) {
fx_water_splash(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
isWaterDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_ICE) {
fx_big_snowflakes(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f);
isIceDamage = TRUE;
}
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS)) {
if ((targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)
|| (target->transparentStatus == STATUS_KEY_TRANSPARENT)
|| (targetPart->eventFlags & ACTOR_EVENT_FLAG_800)
&& !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)
) {
return HIT_RESULT_MISS;
}
}
if (target->stoneStatus == STATUS_KEY_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 1);
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
return HIT_RESULT_HIT;
}
if (targetPart->elementalImmunities & battleStatus->currentAttackElement) {
partImmuneToElement = TRUE;
} else {
partImmuneToElement = FALSE;
}
if (targetPart->eventFlags & (ACTOR_EVENT_FLAG_ENCHANTED | ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED)) {
battleStatus->currentAttackElement &= ~DAMAGE_TYPE_IGNORE_DEFENSE;
}
temp = get_defense(target, targetPart->defenseTable, battleStatus->currentAttackElement);
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_IGNORE_DEFENSE)) {
temp += target->defenseBoost;
}
attackDamage = battleStatus->currentAttackDamage;
if (attackDamage > 99) {
attackDamage = 99;
}
if (attackDamage <= 0) {
temp = 0;
}
attackDamage -= temp;
target->hpChangeCounter = 0;
if (attackDamage <= 0) {
target->hpChangeCounter = 0;
hitResult = HIT_RESULT_NO_DAMAGE;
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
dispatchEvent = EVENT_ZERO_DAMAGE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
battleStatus->lastAttackDamage = 0;
} else {
dispatchEvent = EVENT_ZERO_DAMAGE;
battleStatus->lastAttackDamage = 0;
}
} else {
target->damageCounter += attackDamage;
target->hpChangeCounter -= attackDamage;
battleStatus->lastAttackDamage = 0;
dispatchEvent = EVENT_HIT_COMBO;
hitResult = HIT_RESULT_HIT;
if (!(targetPart->flags & ACTOR_PART_FLAG_2000)
&& !partImmuneToElement
&& !(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)
) {
target->currentHP -= attackDamage;
if (target->currentHP <= 0) {
target->currentHP = 0;
dispatchEvent = EVENT_DEATH;
}
}
battleStatus->lastAttackDamage += attackDamage;
target->lastDamageTaken = battleStatus->lastAttackDamage;
target->hpChangeCounter = 0;
}
if (targetPart->flags & ACTOR_PART_FLAG_2000) {
dispatch_event_actor(target, dispatchEvent);
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return HIT_RESULT_NO_DAMAGE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_DEATH) {
battleStatus->lastAttackDamage = 0;
dispatchEvent = EVENT_DEATH;
hitResult = HIT_RESULT_HIT;
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_IMMUNE;
}
if (target->currentHP <= 0 && dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_DEATH;
}
} else if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_HIT_COMBO;
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS) {
dispatchEvent = EVENT_IMMUNE;
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ENCHANTED) {
dispatchEvent = EVENT_STAR_BEAM;
wasStatusInflicted = TRUE;
}
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ATTACK_CHARGED) {
dispatchEvent = EVENT_STAR_BEAM;
wasStatusInflicted = TRUE;
}
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) {
dispatchEvent = EVENT_INVUNERABLE_TAUNT;
}
hitResult = HIT_RESULT_HIT;
}
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS) {
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if ((target->attackBoost > 0 || target->defenseBoost > 0) ||
((target->staticStatus == 0 && target->transparentStatus != 0) || target->staticStatus != 0))
{
target->attackBoost = 0;
target->defenseBoost = 0;
target->isGlowing = FALSE;
dispatchEvent = EVENT_HIT;
if (target->staticStatus != 0) {
target->staticStatus = 0;
target->staticDuration = 0;
remove_status_static(target->hudElementDataIndex);
}
if (target->transparentStatus != 0) {
target->transparentStatus = 0;
target->transparentDuration = 0;
remove_status_transparent(target->hudElementDataIndex);
}
wasStatusInflicted = TRUE;
hitResult = HIT_RESULT_HIT;
}
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_PEACH_BEAM) {
dispatchEvent = EVENT_IMMUNE;
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ENCHANTED) {
dispatchEvent = EVENT_PEACH_BEAM;
wasStatusInflicted = TRUE;
}
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) {
dispatchEvent = EVENT_PEACH_BEAM;
wasStatusInflicted = TRUE;
}
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SPIN_SMASH) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_SPIN_SMASH_HIT;
}
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_SPIN_SMASH_DEATH;
}
}
}
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& (battleStatus->currentAttackElement & (DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POW))
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_GROUNDABLE)
) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
}
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& (battleStatus->currentAttackElement & DAMAGE_TYPE_POW)
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_RIDING_BROOMSTICK)
) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
}
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& (battleStatus->currentAttackElement & (DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POW | DAMAGE_TYPE_QUAKE))
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE)
) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_BURN_HIT;
}
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_BURN_DEATH;
}
isFireDamage = TRUE;
}
}
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
&& battleStatus->lastAttackDamage >= 0
&& dispatchEvent != EVENT_DEATH
&& dispatchEvent != EVENT_SPIN_SMASH_DEATH
&& dispatchEvent != EVENT_EXPLODE_TRIGGER
) {
// Using this macro because it's nicer to look at, and it also is necessary to wrap the first 5 of these in a
// do-while-0 OR to wrap each one individually. It's more likely that it's a macro instead, and much cleaner
#define INFLICT_STATUS(STATUS_TYPE) \
do { \
if ((battleStatus->currentAttackStatus & STATUS_FLAG_##STATUS_TYPE) && \
try_inflict_status(target, STATUS_KEY_##STATUS_TYPE, STATUS_TURN_MOD_##STATUS_TYPE)) { \
wasStatusInflicted = TRUE; \
} \
} while (0);
INFLICT_STATUS(SHRINK);
INFLICT_STATUS(POISON);
INFLICT_STATUS(STONE);
INFLICT_STATUS(SLEEP);
INFLICT_STATUS(STOP);
INFLICT_STATUS(STATIC);
INFLICT_STATUS(FEAR);
INFLICT_STATUS(PARALYZE);
INFLICT_STATUS(DIZZY);
#undef INFLICT_STATUS
if (wasStatusInflicted) {
if (dispatchEvent == EVENT_ZERO_DAMAGE) {
dispatchEvent = EVENT_HIT_COMBO;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_HIT;
}
}
}
temp = target->actorBlueprint->spookChance;
temp = (battleStatus->statusChance * temp) / 100;
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) && (battleStatus->currentAttackElement & DAMAGE_TYPE_FEAR)) {
if (rand_int(99) < temp
&& (target->debuff != STATUS_KEY_FEAR
&& target->debuff != STATUS_KEY_DIZZY
&& target->debuff != STATUS_KEY_PARALYZE
&& target->debuff != STATUS_KEY_SLEEP
&& target->debuff != STATUS_KEY_FROZEN
&& target->debuff != STATUS_KEY_STOP)
&& !(target->flags & ACTOR_FLAG_FLIPPED))
{
dispatchEvent = EVENT_SCARE_AWAY;
hitResult = HIT_RESULT_HIT;
sp1C = TRUE;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_SHOW_PLAYER_DECORATIONS | BS_FLAGS1_ACTORS_VISIBLE;
sfx_play_sound_at_position(SOUND_231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
wasStatusInflicted = TRUE;
gBattleStatus.flags1 |= BS_FLAGS1_40;
} else {
dispatchEvent = EVENT_IMMUNE;
hitResult = HIT_RESULT_NO_DAMAGE;
}
}
battleStatus->wasStatusInflicted = wasStatusInflicted;
if ((sp1C
&& (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)))
|| ((gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) && !(gBattleStatus.flags1 & BS_FLAGS1_80))
) {
if (battleStatus->lastAttackDamage > 0) {
sfx_play_sound_at_position(SOUND_231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->lastAttackDamage > 0 || (battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS) && sp1C) {
if (gBattleStatus.flags1 & BS_FLAGS1_40) {
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
show_action_rating(ACTION_RATING_SUPER, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
func_80266970(target);
}
dispatch_event_actor(target, dispatchEvent);
if (actorClass == ACTOR_PARTNER) {
if ((battleStatus->lastAttackDamage > 0) && (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) {
inflict_status(target, STATUS_KEY_DAZE, battleStatus->lastAttackDamage);
}
}
if (!(target->flags & ACTOR_FLAG_NO_DMG_POPUP)) {
if (battleStatus->lastAttackDamage == 0) {
if (!sp1C && !wasStatusInflicted) {
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
}
} else if (!partImmuneToElement) {
if (battleStatus->currentAttackElement & (DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_SMASH)) {
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
} else {
show_primary_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
}
if (!(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)) {
show_damage_fx(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
}
}
}
if (battleStatus->lastAttackDamage > 0 && !partImmuneToElement) {
func_80267018(target, 1);
if (isFireDamage) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isShockDamage) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isIceDamage) {
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
if ((battleStatus->lastAttackDamage <= 0 && !wasStatusInflicted) || (targetPart->flags & ACTOR_FLAG_2000)) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP) && wasStatusInflicted) {
script = start_script(&EVS_PlaySleepHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY) && wasStatusInflicted) {
script = start_script(&EVS_PlayDizzyHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE) && wasStatusInflicted) {
script = start_script(&EVS_PlayParalyzeHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_POISON) && wasStatusInflicted) {
script = start_script(&EVS_PlayPoisonHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_STOP) && wasStatusInflicted) {
script = start_script(&EVS_PlayStopHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_FROZEN) && wasStatusInflicted) {
script = start_script(&EVS_PlayFreezeHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
script->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK) && wasStatusInflicted) {
script = start_script(&EVS_PlayShrinkHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
script->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_SMASH) && (target->actorType == ACTOR_TYPE_GOOMNUT_TREE)) {
sfx_play_sound_at_position(SOUND_SMASH_GOOMNUT_TREE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
show_actor_health_bar(target);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
if (hitResult == HIT_RESULT_HIT) {
hitResult = HIT_RESULT_1;
}
if (hitResult == HIT_RESULT_NO_DAMAGE) {
hitResult = HIT_RESULT_3;
}
}
return hitResult;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_80255FE0
/* 1848C0 80255FE0 27BDFC30 */ addiu $sp, $sp, -0x3D0
/* 1848C4 80255FE4 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1848C8 80255FE8 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 1848CC 80255FEC 0060102D */ daddu $v0, $v1, $zero
/* 1848D0 80255FF0 AFBF039C */ sw $ra, 0x39C($sp)
/* 1848D4 80255FF4 AFBE0398 */ sw $fp, 0x398($sp)
/* 1848D8 80255FF8 AFB70394 */ sw $s7, 0x394($sp)
/* 1848DC 80255FFC AFB60390 */ sw $s6, 0x390($sp)
/* 1848E0 80256000 AFB5038C */ sw $s5, 0x38C($sp)
/* 1848E4 80256004 AFB40388 */ sw $s4, 0x388($sp)
/* 1848E8 80256008 AFB30384 */ sw $s3, 0x384($sp)
/* 1848EC 8025600C AFB20380 */ sw $s2, 0x380($sp)
/* 1848F0 80256010 AFB1037C */ sw $s1, 0x37C($sp)
/* 1848F4 80256014 AFB00378 */ sw $s0, 0x378($sp)
/* 1848F8 80256018 F7BE03C8 */ sdc1 $f30, 0x3C8($sp)
/* 1848FC 8025601C F7BC03C0 */ sdc1 $f28, 0x3C0($sp)
/* 184900 80256020 F7BA03B8 */ sdc1 $f26, 0x3B8($sp)
/* 184904 80256024 F7B803B0 */ sdc1 $f24, 0x3B0($sp)
/* 184908 80256028 F7B603A8 */ sdc1 $f22, 0x3A8($sp)
/* 18490C 8025602C F7B403A0 */ sdc1 $f20, 0x3A0($sp)
/* 184910 80256030 14800005 */ bnez $a0, .L80256048
/* 184914 80256034 AFA403D0 */ sw $a0, 0x3D0($sp)
/* 184918 80256038 00051080 */ sll $v0, $a1, 2
/* 18491C 8025603C 00431021 */ addu $v0, $v0, $v1
/* 184920 80256040 08095813 */ j .L8025604C
/* 184924 80256044 8C5200E0 */ lw $s2, 0xE0($v0)
.L80256048:
/* 184928 80256048 8C5200DC */ lw $s2, 0xDC($v0)
.L8025604C:
/* 18492C 8025604C 86420150 */ lh $v0, 0x150($s2)
/* 184930 80256050 C6400144 */ lwc1 $f0, 0x144($s2)
/* 184934 80256054 44821000 */ mtc1 $v0, $f2
/* 184938 80256058 00000000 */ nop
/* 18493C 8025605C 468010A0 */ cvt.s.w $f2, $f2
/* 184940 80256060 46020000 */ add.s $f0, $f0, $f2
/* 184944 80256064 8E420000 */ lw $v0, 0x0($s2)
/* 184948 80256068 30420800 */ andi $v0, $v0, 0x800
/* 18494C 8025606C 14400009 */ bnez $v0, .L80256094
/* 184950 80256070 E7A00364 */ swc1 $f0, 0x364($sp)
/* 184954 80256074 86420152 */ lh $v0, 0x152($s2)
/* 184958 80256078 C6400148 */ lwc1 $f0, 0x148($s2)
/* 18495C 8025607C 44821000 */ mtc1 $v0, $f2
/* 184960 80256080 00000000 */ nop
/* 184964 80256084 468010A0 */ cvt.s.w $f2, $f2
/* 184968 80256088 8242019A */ lb $v0, 0x19A($s2)
/* 18496C 8025608C 0809582C */ j .L802560B0
/* 184970 80256090 46020000 */ add.s $f0, $f0, $f2
.L80256094:
/* 184974 80256094 86420152 */ lh $v0, 0x152($s2)
/* 184978 80256098 C6400148 */ lwc1 $f0, 0x148($s2)
/* 18497C 8025609C 44821000 */ mtc1 $v0, $f2
/* 184980 802560A0 00000000 */ nop
dup_mac_00_LetterDelivery_SavedNpcAnim:
/* 184984 802560A4 468010A0 */ cvt.s.w $f2, $f2
/* 184988 802560A8 8242019A */ lb $v0, 0x19A($s2)
/* 18498C 802560AC 46020001 */ sub.s $f0, $f0, $f2
.L802560B0:
/* 184990 802560B0 44821000 */ mtc1 $v0, $f2
D_802560B4:
/* 184994 802560B4 00000000 */ nop
/* 184998 802560B8 468010A0 */ cvt.s.w $f2, $f2
/* 18499C 802560BC 46020780 */ add.s $f30, $f0, $f2
/* 1849A0 802560C0 8E420008 */ lw $v0, 0x8($s2)
/* 1849A4 802560C4 82430194 */ lb $v1, 0x194($s2)
/* 1849A8 802560C8 80420024 */ lb $v0, 0x24($v0)
/* 1849AC 802560CC C6420188 */ lwc1 $f2, 0x188($s2)
/* 1849B0 802560D0 00431021 */ addu $v0, $v0, $v1
/* 1849B4 802560D4 44820000 */ mtc1 $v0, $f0
/* 1849B8 802560D8 00000000 */ nop
/* 1849BC 802560DC 46800020 */ cvt.s.w $f0, $f0
/* 1849C0 802560E0 46020002 */ mul.s $f0, $f0, $f2
/* 1849C4 802560E4 00000000 */ nop
/* 1849C8 802560E8 C7AA0364 */ lwc1 $f10, 0x364($sp)
/* 1849CC 802560EC 86440154 */ lh $a0, 0x154($s2)
/* 1849D0 802560F0 C644014C */ lwc1 $f4, 0x14C($s2)
/* 1849D4 802560F4 8E420440 */ lw $v0, 0x440($s2)
/* 1849D8 802560F8 46005000 */ add.s $f0, $f10, $f0
/* 1849DC 802560FC 8C42000C */ lw $v0, 0xC($v0)
/* 1849E0 80256100 E4400008 */ swc1 $f0, 0x8($v0)
/* 1849E4 80256104 8E420008 */ lw $v0, 0x8($s2)
/* 1849E8 80256108 82430195 */ lb $v1, 0x195($s2)
/* 1849EC 8025610C 80420025 */ lb $v0, 0x25($v0)
/* 1849F0 80256110 C6420188 */ lwc1 $f2, 0x188($s2)
/* 1849F4 80256114 00431021 */ addu $v0, $v0, $v1
/* 1849F8 80256118 44820000 */ mtc1 $v0, $f0
/* 1849FC 8025611C 00000000 */ nop
/* 184A00 80256120 46800020 */ cvt.s.w $f0, $f0
/* 184A04 80256124 46020002 */ mul.s $f0, $f0, $f2
/* 184A08 80256128 00000000 */ nop
/* 184A0C 8025612C 8E420440 */ lw $v0, 0x440($s2)
/* 184A10 80256130 4600F000 */ add.s $f0, $f30, $f0
/* 184A14 80256134 8C42000C */ lw $v0, 0xC($v0)
/* 184A18 80256138 E440000C */ swc1 $f0, 0xC($v0)
/* 184A1C 8025613C 44840000 */ mtc1 $a0, $f0
/* 184A20 80256140 00000000 */ nop
/* 184A24 80256144 46800020 */ cvt.s.w $f0, $f0
/* 184A28 80256148 46002100 */ add.s $f4, $f4, $f0
/* 184A2C 8025614C 8E420440 */ lw $v0, 0x440($s2)
/* 184A30 80256150 E7A40368 */ swc1 $f4, 0x368($sp)
/* 184A34 80256154 8C42000C */ lw $v0, 0xC($v0)
/* 184A38 80256158 E4440010 */ swc1 $f4, 0x10($v0)
/* 184A3C 8025615C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 184A40 80256160 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 184A44 80256164 30420004 */ andi $v0, $v0, 0x4
/* 184A48 80256168 1440001C */ bnez $v0, .L802561DC
/* 184A4C 8025616C 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 184A50 80256170 8E420000 */ lw $v0, 0x0($s2)
/* 184A54 80256174 00431024 */ and $v0, $v0, $v1
/* 184A58 80256178 10400018 */ beqz $v0, .L802561DC
/* 184A5C 8025617C 00000000 */ nop
/* 184A60 80256180 8242021D */ lb $v0, 0x21D($s2)
/* 184A64 80256184 9244021D */ lbu $a0, 0x21D($s2)
/* 184A68 80256188 10400008 */ beqz $v0, .L802561AC
/* 184A6C 8025618C 2482FFFF */ addiu $v0, $a0, -0x1
/* 184A70 80256190 8E430440 */ lw $v1, 0x440($s2)
/* 184A74 80256194 3C01C47A */ lui $at, (0xC47A0000 >> 16)
/* 184A78 80256198 44810000 */ mtc1 $at, $f0
/* 184A7C 8025619C A242021D */ sb $v0, 0x21D($s2)
/* 184A80 802561A0 8C62000C */ lw $v0, 0xC($v1)
/* 184A84 802561A4 0809587E */ j .L802561F8
/* 184A88 802561A8 E440000C */ swc1 $f0, 0xC($v0)
.L802561AC:
/* 184A8C 802561AC C6400188 */ lwc1 $f0, 0x188($s2)
/* 184A90 802561B0 3C013FE8 */ lui $at, (0x3FE80000 >> 16)
/* 184A94 802561B4 44811800 */ mtc1 $at, $f3
/* 184A98 802561B8 44801000 */ mtc1 $zero, $f2
/* 184A9C 802561BC 46000021 */ cvt.d.s $f0, $f0
/* 184AA0 802561C0 46220002 */ mul.d $f0, $f0, $f2
/* 184AA4 802561C4 00000000 */ nop
/* 184AA8 802561C8 8E420440 */ lw $v0, 0x440($s2)
/* 184AAC 802561CC 8C42000C */ lw $v0, 0xC($v0)
/* 184AB0 802561D0 46200020 */ cvt.s.d $f0, $f0
/* 184AB4 802561D4 0809587E */ j .L802561F8
/* 184AB8 802561D8 E4400034 */ swc1 $f0, 0x34($v0)
.L802561DC:
/* 184ABC 802561DC 8E420440 */ lw $v0, 0x440($s2)
/* 184AC0 802561E0 3C01C47A */ lui $at, (0xC47A0000 >> 16)
/* 184AC4 802561E4 44810000 */ mtc1 $at, $f0
/* 184AC8 802561E8 8C42000C */ lw $v0, 0xC($v0)
/* 184ACC 802561EC E440000C */ swc1 $f0, 0xC($v0)
/* 184AD0 802561F0 2402000A */ addiu $v0, $zero, 0xA
/* 184AD4 802561F4 A242021D */ sb $v0, 0x21D($s2)
.L802561F8:
/* 184AD8 802561F8 82430210 */ lb $v1, 0x210($s2)
/* 184ADC 802561FC 24020007 */ addiu $v0, $zero, 0x7
/* 184AE0 80256200 1462002C */ bne $v1, $v0, .L802562B4
/* 184AE4 80256204 00000000 */ nop
/* 184AE8 80256208 8E440228 */ lw $a0, 0x228($s2)
/* 184AEC 8025620C 10800030 */ beqz $a0, .L802562D0
/* 184AF0 80256210 00000000 */ nop
/* 184AF4 80256214 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 184AF8 80256218 8C63C070 */ lw $v1, %lo(gBattleStatus)($v1)
/* 184AFC 8025621C 30620008 */ andi $v0, $v1, 0x8
/* 184B00 80256220 14400007 */ bnez $v0, .L80256240
/* 184B04 80256224 30620004 */ andi $v0, $v1, 0x4
/* 184B08 80256228 14400019 */ bnez $v0, .L80256290
/* 184B0C 8025622C 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 184B10 80256230 8E420000 */ lw $v0, 0x0($s2)
/* 184B14 80256234 00431024 */ and $v0, $v0, $v1
/* 184B18 80256238 10400015 */ beqz $v0, .L80256290
/* 184B1C 8025623C 00000000 */ nop
.L80256240:
/* 184B20 80256240 8C82000C */ lw $v0, 0xC($a0)
/* 184B24 80256244 C7AA0364 */ lwc1 $f10, 0x364($sp)
/* 184B28 80256248 E44A0004 */ swc1 $f10, 0x4($v0)
/* 184B2C 8025624C 8C82000C */ lw $v0, 0xC($a0)
/* 184B30 80256250 E45E0008 */ swc1 $f30, 0x8($v0)
/* 184B34 80256254 8C82000C */ lw $v0, 0xC($a0)
/* 184B38 80256258 C7AA0368 */ lwc1 $f10, 0x368($sp)
/* 184B3C 8025625C E44A000C */ swc1 $f10, 0xC($v0)
/* 184B40 80256260 92420191 */ lbu $v0, 0x191($s2)
/* 184B44 80256264 3C014038 */ lui $at, (0x40380000 >> 16)
/* 184B48 80256268 44811800 */ mtc1 $at, $f3
/* 184B4C 8025626C 44801000 */ mtc1 $zero, $f2
/* 184B50 80256270 44820000 */ mtc1 $v0, $f0
/* 184B54 80256274 00000000 */ nop
/* 184B58 80256278 46800021 */ cvt.d.w $f0, $f0
/* 184B5C 8025627C 46220003 */ div.d $f0, $f0, $f2
/* 184B60 80256280 8C82000C */ lw $v0, 0xC($a0)
/* 184B64 80256284 46200020 */ cvt.s.d $f0, $f0
/* 184B68 80256288 080958B4 */ j .L802562D0
/* 184B6C 8025628C E4400020 */ swc1 $f0, 0x20($v0)
.L80256290:
/* 184B70 80256290 8C82000C */ lw $v0, 0xC($a0)
/* 184B74 80256294 3C01C47A */ lui $at, (0xC47A0000 >> 16)
/* 184B78 80256298 44810000 */ mtc1 $at, $f0
/* 184B7C 8025629C AC400004 */ sw $zero, 0x4($v0)
/* 184B80 802562A0 8C82000C */ lw $v0, 0xC($a0)
/* 184B84 802562A4 E4400008 */ swc1 $f0, 0x8($v0)
/* 184B88 802562A8 8C82000C */ lw $v0, 0xC($a0)
/* 184B8C 802562AC 080958B4 */ j .L802562D0
/* 184B90 802562B0 AC40000C */ sw $zero, 0xC($v0)
.L802562B4:
/* 184B94 802562B4 8E440228 */ lw $a0, 0x228($s2)
/* 184B98 802562B8 10800005 */ beqz $a0, .L802562D0
/* 184B9C 802562BC 00000000 */ nop
/* 184BA0 802562C0 8C820000 */ lw $v0, 0x0($a0)
/* 184BA4 802562C4 34420010 */ ori $v0, $v0, 0x10
/* 184BA8 802562C8 AC820000 */ sw $v0, 0x0($a0)
/* 184BAC 802562CC AE400228 */ sw $zero, 0x228($s2)
.L802562D0:
/* 184BB0 802562D0 8E420008 */ lw $v0, 0x8($s2)
/* 184BB4 802562D4 82430194 */ lb $v1, 0x194($s2)
/* 184BB8 802562D8 80420024 */ lb $v0, 0x24($v0)
/* 184BBC 802562DC C6420188 */ lwc1 $f2, 0x188($s2)
/* 184BC0 802562E0 00431021 */ addu $v0, $v0, $v1
/* 184BC4 802562E4 44820000 */ mtc1 $v0, $f0
/* 184BC8 802562E8 00000000 */ nop
/* 184BCC 802562EC 46800020 */ cvt.s.w $f0, $f0
/* 184BD0 802562F0 46020002 */ mul.s $f0, $f0, $f2
/* 184BD4 802562F4 00000000 */ nop
/* 184BD8 802562F8 86440436 */ lh $a0, 0x436($s2)
/* 184BDC 802562FC 4600028D */ trunc.w.s $f10, $f0
/* 184BE0 80256300 E7AA0010 */ swc1 $f10, 0x10($sp)
/* 184BE4 80256304 8E420008 */ lw $v0, 0x8($s2)
/* 184BE8 80256308 82430195 */ lb $v1, 0x195($s2)
/* 184BEC 8025630C 80420025 */ lb $v0, 0x25($v0)
/* 184BF0 80256310 C6420188 */ lwc1 $f2, 0x188($s2)
/* 184BF4 80256314 00431021 */ addu $v0, $v0, $v1
/* 184BF8 80256318 44820000 */ mtc1 $v0, $f0
/* 184BFC 8025631C 00000000 */ nop
/* 184C00 80256320 46800020 */ cvt.s.w $f0, $f0
/* 184C04 80256324 46020002 */ mul.s $f0, $f0, $f2
/* 184C08 80256328 00000000 */ nop
/* 184C0C 8025632C 4600028D */ trunc.w.s $f10, $f0
/* 184C10 80256330 E7AA0014 */ swc1 $f10, 0x14($sp)
/* 184C14 80256334 8E420008 */ lw $v0, 0x8($s2)
/* 184C18 80256338 82430196 */ lb $v1, 0x196($s2)
/* 184C1C 8025633C 80420026 */ lb $v0, 0x26($v0)
/* 184C20 80256340 C6420188 */ lwc1 $f2, 0x188($s2)
/* 184C24 80256344 00431021 */ addu $v0, $v0, $v1
/* 184C28 80256348 44820000 */ mtc1 $v0, $f0
/* 184C2C 8025634C 00000000 */ nop
/* 184C30 80256350 46800020 */ cvt.s.w $f0, $f0
/* 184C34 80256354 46020002 */ mul.s $f0, $f0, $f2
/* 184C38 80256358 00000000 */ nop
/* 184C3C 8025635C 4600028D */ trunc.w.s $f10, $f0
/* 184C40 80256360 E7AA0018 */ swc1 $f10, 0x18($sp)
/* 184C44 80256364 8E420008 */ lw $v0, 0x8($s2)
/* 184C48 80256368 82430197 */ lb $v1, 0x197($s2)
/* 184C4C 8025636C 80420027 */ lb $v0, 0x27($v0)
/* 184C50 80256370 C6420188 */ lwc1 $f2, 0x188($s2)
/* 184C54 80256374 00431021 */ addu $v0, $v0, $v1
/* 184C58 80256378 44820000 */ mtc1 $v0, $f0
/* 184C5C 8025637C 00000000 */ nop
/* 184C60 80256380 46800020 */ cvt.s.w $f0, $f0
/* 184C64 80256384 46020002 */ mul.s $f0, $f0, $f2
/* 184C68 80256388 00000000 */ nop
/* 184C6C 8025638C 8FA50364 */ lw $a1, 0x364($sp)
/* 184C70 80256390 4406F000 */ mfc1 $a2, $f30
/* 184C74 80256394 8FA70368 */ lw $a3, 0x368($sp)
/* 184C78 80256398 4600028D */ trunc.w.s $f10, $f0
/* 184C7C 8025639C 0C011DE3 */ jal set_status_icons_properties
/* 184C80 802563A0 E7AA001C */ swc1 $f10, 0x1C($sp)
/* 184C84 802563A4 8E420000 */ lw $v0, 0x0($s2)
/* 184C88 802563A8 30420800 */ andi $v0, $v0, 0x800
/* 184C8C 802563AC 14400010 */ bnez $v0, .L802563F0
/* 184C90 802563B0 00000000 */ nop
/* 184C94 802563B4 92420191 */ lbu $v0, 0x191($s2)
/* 184C98 802563B8 080958FF */ j .L802563FC
/* 184C9C 802563BC C6440188 */ lwc1 $f4, 0x188($s2)
.L802563C0:
/* 184CA0 802563C0 C6400188 */ lwc1 $f0, 0x188($s2)
/* 184CA4 802563C4 3C01802A */ lui $at, %hi(D_8029D368)
/* 184CA8 802563C8 D422D368 */ ldc1 $f2, %lo(D_8029D368)($at)
/* 184CAC 802563CC 46000021 */ cvt.d.s $f0, $f0
/* 184CB0 802563D0 46201081 */ sub.d $f2, $f2, $f0
/* 184CB4 802563D4 3C014018 */ lui $at, (0x40180000 >> 16)
/* 184CB8 802563D8 44812800 */ mtc1 $at, $f5
/* 184CBC 802563DC 44802000 */ mtc1 $zero, $f4
/* 184CC0 802563E0 00000000 */ nop
/* 184CC4 802563E4 46241083 */ div.d $f2, $f2, $f4
/* 184CC8 802563E8 08095921 */ j .L80256484
/* 184CCC 802563EC 46220000 */ add.d $f0, $f0, $f2
.L802563F0:
/* 184CD0 802563F0 92420191 */ lbu $v0, 0x191($s2)
/* 184CD4 802563F4 C6440188 */ lwc1 $f4, 0x188($s2)
/* 184CD8 802563F8 00021023 */ negu $v0, $v0
.L802563FC:
/* 184CDC 802563FC 44821000 */ mtc1 $v0, $f2
/* 184CE0 80256400 00000000 */ nop
/* 184CE4 80256404 468010A0 */ cvt.s.w $f2, $f2
/* 184CE8 80256408 46041082 */ mul.s $f2, $f2, $f4
/* 184CEC 8025640C 00000000 */ nop
/* 184CF0 80256410 92420190 */ lbu $v0, 0x190($s2)
/* 184CF4 80256414 44820000 */ mtc1 $v0, $f0
/* 184CF8 80256418 00000000 */ nop
/* 184CFC 8025641C 46800020 */ cvt.s.w $f0, $f0
/* 184D00 80256420 46040002 */ mul.s $f0, $f0, $f4
/* 184D04 80256424 00000000 */ nop
/* 184D08 80256428 86440436 */ lh $a0, 0x436($s2)
/* 184D0C 8025642C 4600128D */ trunc.w.s $f10, $f2
/* 184D10 80256430 44055000 */ mfc1 $a1, $f10
/* 184D14 80256434 4600028D */ trunc.w.s $f10, $f0
/* 184D18 80256438 44065000 */ mfc1 $a2, $f10
/* 184D1C 8025643C 0C011DFD */ jal set_status_icons_offset
/* 184D20 80256440 00000000 */ nop
/* 184D24 80256444 82430210 */ lb $v1, 0x210($s2)
/* 184D28 80256448 2402000A */ addiu $v0, $zero, 0xA
/* 184D2C 8025644C 1062FFDC */ beq $v1, $v0, .L802563C0
/* 184D30 80256450 00000000 */ nop
/* 184D34 80256454 C6400188 */ lwc1 $f0, 0x188($s2)
/* 184D38 80256458 3C013FF0 */ lui $at, (0x3FF00000 >> 16)
/* 184D3C 8025645C 44812800 */ mtc1 $at, $f5
/* 184D40 80256460 44802000 */ mtc1 $zero, $f4
/* 184D44 80256464 46000021 */ cvt.d.s $f0, $f0
/* 184D48 80256468 46202101 */ sub.d $f4, $f4, $f0
/* 184D4C 8025646C 3C014018 */ lui $at, (0x40180000 >> 16)
/* 184D50 80256470 44811800 */ mtc1 $at, $f3
/* 184D54 80256474 44801000 */ mtc1 $zero, $f2
/* 184D58 80256478 00000000 */ nop
/* 184D5C 8025647C 46222103 */ div.d $f4, $f4, $f2
/* 184D60 80256480 46240000 */ add.d $f0, $f0, $f4
.L80256484:
/* 184D64 80256484 46200020 */ cvt.s.d $f0, $f0
/* 184D68 80256488 E6400188 */ swc1 $f0, 0x188($s2)
/* 184D6C 8025648C 8E420000 */ lw $v0, 0x0($s2)
/* 184D70 80256490 30420800 */ andi $v0, $v0, 0x800
/* 184D74 80256494 14400025 */ bnez $v0, .L8025652C
/* 184D78 80256498 00000000 */ nop
/* 184D7C 8025649C 86420168 */ lh $v0, 0x168($s2)
/* 184D80 802564A0 C6420188 */ lwc1 $f2, 0x188($s2)
/* 184D84 802564A4 00021023 */ negu $v0, $v0
/* 184D88 802564A8 44820000 */ mtc1 $v0, $f0
/* 184D8C 802564AC 00000000 */ nop
/* 184D90 802564B0 46800020 */ cvt.s.w $f0, $f0
/* 184D94 802564B4 46020002 */ mul.s $f0, $f0, $f2
/* 184D98 802564B8 00000000 */ nop
/* 184D9C 802564BC 8642016A */ lh $v0, 0x16A($s2)
D_802564C0:
/* 184DA0 802564C0 00021023 */ negu $v0, $v0
/* 184DA4 802564C4 44050000 */ mfc1 $a1, $f0
/* 184DA8 802564C8 44820000 */ mtc1 $v0, $f0
/* 184DAC 802564CC 00000000 */ nop
/* 184DB0 802564D0 46800020 */ cvt.s.w $f0, $f0
/* 184DB4 802564D4 46020002 */ mul.s $f0, $f0, $f2
/* 184DB8 802564D8 00000000 */ nop
/* 184DBC 802564DC 8642016C */ lh $v0, 0x16C($s2)
/* 184DC0 802564E0 00021023 */ negu $v0, $v0
/* 184DC4 802564E4 44060000 */ mfc1 $a2, $f0
/* 184DC8 802564E8 44820000 */ mtc1 $v0, $f0
/* 184DCC 802564EC 00000000 */ nop
/* 184DD0 802564F0 46800020 */ cvt.s.w $f0, $f0
/* 184DD4 802564F4 46020002 */ mul.s $f0, $f0, $f2
/* 184DD8 802564F8 00000000 */ nop
/* 184DDC 802564FC 44070000 */ mfc1 $a3, $f0
/* 184DE0 80256500 0C019E40 */ jal guTranslateF
/* 184DE4 80256504 27A401A0 */ addiu $a0, $sp, 0x1A0
/* 184DE8 80256508 86420168 */ lh $v0, 0x168($s2)
/* 184DEC 8025650C C6420188 */ lwc1 $f2, 0x188($s2)
/* 184DF0 80256510 44820000 */ mtc1 $v0, $f0
/* 184DF4 80256514 00000000 */ nop
/* 184DF8 80256518 46800020 */ cvt.s.w $f0, $f0
/* 184DFC 8025651C 46020002 */ mul.s $f0, $f0, $f2
/* 184E00 80256520 00000000 */ nop
/* 184E04 80256524 0809596E */ j .L802565B8
/* 184E08 80256528 8642016A */ lh $v0, 0x16A($s2)
.L8025652C:
/* 184E0C 8025652C 86420168 */ lh $v0, 0x168($s2)
/* 184E10 80256530 C6420188 */ lwc1 $f2, 0x188($s2)
/* 184E14 80256534 00021023 */ negu $v0, $v0
/* 184E18 80256538 44820000 */ mtc1 $v0, $f0
/* 184E1C 8025653C 00000000 */ nop
/* 184E20 80256540 46800020 */ cvt.s.w $f0, $f0
/* 184E24 80256544 46020002 */ mul.s $f0, $f0, $f2
/* 184E28 80256548 00000000 */ nop
/* 184E2C 8025654C 8642016A */ lh $v0, 0x16A($s2)
/* 184E30 80256550 44050000 */ mfc1 $a1, $f0
/* 184E34 80256554 44820000 */ mtc1 $v0, $f0
/* 184E38 80256558 00000000 */ nop
/* 184E3C 8025655C 46800020 */ cvt.s.w $f0, $f0
/* 184E40 80256560 46020002 */ mul.s $f0, $f0, $f2
/* 184E44 80256564 00000000 */ nop
/* 184E48 80256568 8642016C */ lh $v0, 0x16C($s2)
/* 184E4C 8025656C 00021023 */ negu $v0, $v0
/* 184E50 80256570 44060000 */ mfc1 $a2, $f0
/* 184E54 80256574 44820000 */ mtc1 $v0, $f0
/* 184E58 80256578 00000000 */ nop
/* 184E5C 8025657C 46800020 */ cvt.s.w $f0, $f0
/* 184E60 80256580 46020002 */ mul.s $f0, $f0, $f2
/* 184E64 80256584 00000000 */ nop
/* 184E68 80256588 44070000 */ mfc1 $a3, $f0
/* 184E6C 8025658C 0C019E40 */ jal guTranslateF
/* 184E70 80256590 27A401A0 */ addiu $a0, $sp, 0x1A0
/* 184E74 80256594 86420168 */ lh $v0, 0x168($s2)
/* 184E78 80256598 C6420188 */ lwc1 $f2, 0x188($s2)
/* 184E7C 8025659C 44820000 */ mtc1 $v0, $f0
/* 184E80 802565A0 00000000 */ nop
/* 184E84 802565A4 46800020 */ cvt.s.w $f0, $f0
/* 184E88 802565A8 46020002 */ mul.s $f0, $f0, $f2
/* 184E8C 802565AC 00000000 */ nop
/* 184E90 802565B0 8642016A */ lh $v0, 0x16A($s2)
/* 184E94 802565B4 00021023 */ negu $v0, $v0
.L802565B8:
/* 184E98 802565B8 44050000 */ mfc1 $a1, $f0
/* 184E9C 802565BC 44820000 */ mtc1 $v0, $f0
/* 184EA0 802565C0 00000000 */ nop
/* 184EA4 802565C4 46800020 */ cvt.s.w $f0, $f0
/* 184EA8 802565C8 46020002 */ mul.s $f0, $f0, $f2
/* 184EAC 802565CC 00000000 */ nop
/* 184EB0 802565D0 8642016C */ lh $v0, 0x16C($s2)
/* 184EB4 802565D4 44060000 */ mfc1 $a2, $f0
/* 184EB8 802565D8 44820000 */ mtc1 $v0, $f0
/* 184EBC 802565DC 00000000 */ nop
/* 184EC0 802565E0 46800020 */ cvt.s.w $f0, $f0
/* 184EC4 802565E4 46020002 */ mul.s $f0, $f0, $f2
/* 184EC8 802565E8 00000000 */ nop
/* 184ECC 802565EC 44070000 */ mfc1 $a3, $f0
/* 184ED0 802565F0 0C019E40 */ jal guTranslateF
/* 184ED4 802565F4 27A401E0 */ addiu $a0, $sp, 0x1E0
/* 184ED8 802565F8 4480A000 */ mtc1 $zero, $f20
/* 184EDC 802565FC 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 184EE0 80256600 4481B000 */ mtc1 $at, $f22
/* 184EE4 80256604 E7B40010 */ swc1 $f20, 0x10($sp)
/* 184EE8 80256608 8E45015C */ lw $a1, 0x15C($s2)
/* 184EEC 8025660C 4406B000 */ mfc1 $a2, $f22
/* 184EF0 80256610 4407A000 */ mfc1 $a3, $f20
/* 184EF4 80256614 0C019EC8 */ jal guRotateF
/* 184EF8 80256618 27A40020 */ addiu $a0, $sp, 0x20
/* 184EFC 8025661C 27B50060 */ addiu $s5, $sp, 0x60
/* 184F00 80256620 E7B40010 */ swc1 $f20, 0x10($sp)
/* 184F04 80256624 8E450160 */ lw $a1, 0x160($s2)
/* 184F08 80256628 4406A000 */ mfc1 $a2, $f20
/* 184F0C 8025662C 4407B000 */ mfc1 $a3, $f22
/* 184F10 80256630 0C019EC8 */ jal guRotateF
/* 184F14 80256634 02A0202D */ daddu $a0, $s5, $zero
/* 184F18 80256638 27B000A0 */ addiu $s0, $sp, 0xA0
/* 184F1C 8025663C E7B60010 */ swc1 $f22, 0x10($sp)
/* 184F20 80256640 8E450164 */ lw $a1, 0x164($s2)
/* 184F24 80256644 4406A000 */ mfc1 $a2, $f20
/* 184F28 80256648 4407A000 */ mfc1 $a3, $f20
/* 184F2C 8025664C 0C019EC8 */ jal guRotateF
/* 184F30 80256650 0200202D */ daddu $a0, $s0, $zero
/* 184F34 80256654 02A0202D */ daddu $a0, $s5, $zero
/* 184F38 80256658 27A50020 */ addiu $a1, $sp, 0x20
/* 184F3C 8025665C 27B30260 */ addiu $s3, $sp, 0x260
/* 184F40 80256660 0C019D80 */ jal guMtxCatF
/* 184F44 80256664 0260302D */ daddu $a2, $s3, $zero
/* 184F48 80256668 0260202D */ daddu $a0, $s3, $zero
/* 184F4C 8025666C 0200282D */ daddu $a1, $s0, $zero
/* 184F50 80256670 27B400E0 */ addiu $s4, $sp, 0xE0
/* 184F54 80256674 0C019D80 */ jal guMtxCatF
/* 184F58 80256678 0280302D */ daddu $a2, $s4, $zero
/* 184F5C 8025667C C6440170 */ lwc1 $f4, 0x170($s2)
/* 184F60 80256680 3C01802A */ lui $at, %hi(D_8029D370)
D_80256684:
/* 184F64 80256684 D428D370 */ ldc1 $f8, %lo(D_8029D370)($at)
/* 184F68 80256688 46002121 */ cvt.d.s $f4, $f4
/* 184F6C 8025668C 46282102 */ mul.d $f4, $f4, $f8
/* 184F70 80256690 00000000 */ nop
/* 184F74 80256694 C6400174 */ lwc1 $f0, 0x174($s2)
/* 184F78 80256698 46000021 */ cvt.d.s $f0, $f0
/* 184F7C 8025669C 46280002 */ mul.d $f0, $f0, $f8
/* 184F80 802566A0 00000000 */ nop
D_802566A4:
/* 184F84 802566A4 C6420178 */ lwc1 $f2, 0x178($s2)
/* 184F88 802566A8 460010A1 */ cvt.d.s $f2, $f2
/* 184F8C 802566AC 46281082 */ mul.d $f2, $f2, $f8
/* 184F90 802566B0 00000000 */ nop
/* 184F94 802566B4 C6460188 */ lwc1 $f6, 0x188($s2)
/* 184F98 802566B8 460031A1 */ cvt.d.s $f6, $f6
/* 184F9C 802566BC 46262102 */ mul.d $f4, $f4, $f6
/* 184FA0 802566C0 00000000 */ nop
/* 184FA4 802566C4 46260002 */ mul.d $f0, $f0, $f6
/* 184FA8 802566C8 00000000 */ nop
/* 184FAC 802566CC 27B00120 */ addiu $s0, $sp, 0x120
D_802566D0:
/* 184FB0 802566D0 462010A0 */ cvt.s.d $f2, $f2
/* 184FB4 802566D4 44071000 */ mfc1 $a3, $f2
/* 184FB8 802566D8 46202120 */ cvt.s.d $f4, $f4
/* 184FBC 802566DC 46200020 */ cvt.s.d $f0, $f0
/* 184FC0 802566E0 44052000 */ mfc1 $a1, $f4
/* 184FC4 802566E4 44060000 */ mfc1 $a2, $f0
/* 184FC8 802566E8 0C019DF0 */ jal guScaleF
/* 184FCC 802566EC 0200202D */ daddu $a0, $s0, $zero
/* 184FD0 802566F0 27B10160 */ addiu $s1, $sp, 0x160
/* 184FD4 802566F4 8E45017C */ lw $a1, 0x17C($s2)
/* 184FD8 802566F8 8E460180 */ lw $a2, 0x180($s2)
D_802566FC:
/* 184FDC 802566FC 8E470184 */ lw $a3, 0x184($s2)
/* 184FE0 80256700 0C019DF0 */ jal guScaleF
/* 184FE4 80256704 0220202D */ daddu $a0, $s1, $zero
/* 184FE8 80256708 27A401A0 */ addiu $a0, $sp, 0x1A0
/* 184FEC 8025670C 0200282D */ daddu $a1, $s0, $zero
/* 184FF0 80256710 0C019D80 */ jal guMtxCatF
/* 184FF4 80256714 0260302D */ daddu $a2, $s3, $zero
/* 184FF8 80256718 0260202D */ daddu $a0, $s3, $zero
/* 184FFC 8025671C 0220282D */ daddu $a1, $s1, $zero
/* 185000 80256720 0C019D80 */ jal guMtxCatF
/* 185004 80256724 0200302D */ daddu $a2, $s0, $zero
/* 185008 80256728 0200202D */ daddu $a0, $s0, $zero
/* 18500C 8025672C 0280282D */ daddu $a1, $s4, $zero
/* 185010 80256730 27B002E0 */ addiu $s0, $sp, 0x2E0
/* 185014 80256734 0C019D80 */ jal guMtxCatF
/* 185018 80256738 0200302D */ daddu $a2, $s0, $zero
/* 18501C 8025673C 0200202D */ daddu $a0, $s0, $zero
/* 185020 80256740 27A501E0 */ addiu $a1, $sp, 0x1E0
/* 185024 80256744 0C019D80 */ jal guMtxCatF
/* 185028 80256748 27A602A0 */ addiu $a2, $sp, 0x2A0
/* 18502C 8025674C 824801F3 */ lb $t0, 0x1F3($s2)
/* 185030 80256750 AFA80360 */ sw $t0, 0x360($sp)
/* 185034 80256754 8E5101F4 */ lw $s1, 0x1F4($s2)
/* 185038 80256758 19000293 */ blez $t0, .L802571A8
/* 18503C 8025675C 0000B82D */ daddu $s7, $zero, $zero
/* 185040 80256760 4600A706 */ mov.s $f28, $f20
/* 185044 80256764 0260B02D */ daddu $s6, $s3, $zero
/* 185048 80256768 AFB5036C */ sw $s5, 0x36C($sp)
/* 18504C 8025676C 0200A82D */ daddu $s5, $s0, $zero
/* 185050 80256770 AFB40370 */ sw $s4, 0x370($sp)
.L80256774:
/* 185054 80256774 8E220000 */ lw $v0, 0x0($s1)
/* 185058 80256778 3C030010 */ lui $v1, (0x100000 >> 16)
/* 18505C 8025677C 00431024 */ and $v0, $v0, $v1
/* 185060 80256780 14400033 */ bnez $v0, .L80256850
/* 185064 80256784 27A40320 */ addiu $a0, $sp, 0x320
/* 185068 80256788 86220014 */ lh $v0, 0x14($s1)
/* 18506C 8025678C C7AA0364 */ lwc1 $f10, 0x364($sp)
/* 185070 80256790 44820000 */ mtc1 $v0, $f0
/* 185074 80256794 00000000 */ nop
/* 185078 80256798 46800020 */ cvt.s.w $f0, $f0
/* 18507C 8025679C 8622001A */ lh $v0, 0x1A($s1)
/* 185080 802567A0 46005000 */ add.s $f0, $f10, $f0
/* 185084 802567A4 44821000 */ mtc1 $v0, $f2
/* 185088 802567A8 00000000 */ nop
/* 18508C 802567AC 468010A0 */ cvt.s.w $f2, $f2
/* 185090 802567B0 8E420000 */ lw $v0, 0x0($s2)
/* 185094 802567B4 30420800 */ andi $v0, $v0, 0x800
/* 185098 802567B8 1440000C */ bnez $v0, .L802567EC
/* 18509C 802567BC 46020680 */ add.s $f26, $f0, $f2
/* 1850A0 802567C0 86220016 */ lh $v0, 0x16($s1)
/* 1850A4 802567C4 44821000 */ mtc1 $v0, $f2
/* 1850A8 802567C8 00000000 */ nop
/* 1850AC 802567CC 468010A0 */ cvt.s.w $f2, $f2
/* 1850B0 802567D0 8622001C */ lh $v0, 0x1C($s1)
/* 1850B4 802567D4 4602F080 */ add.s $f2, $f30, $f2
/* 1850B8 802567D8 44820000 */ mtc1 $v0, $f0
/* 1850BC 802567DC 00000000 */ nop
/* 1850C0 802567E0 46800020 */ cvt.s.w $f0, $f0
/* 1850C4 802567E4 08095A05 */ j .L80256814
/* 1850C8 802567E8 46001500 */ add.s $f20, $f2, $f0
.L802567EC:
/* 1850CC 802567EC 86220016 */ lh $v0, 0x16($s1)
/* 1850D0 802567F0 44821000 */ mtc1 $v0, $f2
/* 1850D4 802567F4 00000000 */ nop
/* 1850D8 802567F8 468010A0 */ cvt.s.w $f2, $f2
/* 1850DC 802567FC 8622001C */ lh $v0, 0x1C($s1)
/* 1850E0 80256800 4602F081 */ sub.s $f2, $f30, $f2
/* 1850E4 80256804 44820000 */ mtc1 $v0, $f0
/* 1850E8 80256808 00000000 */ nop
/* 1850EC 8025680C 46800020 */ cvt.s.w $f0, $f0
/* 1850F0 80256810 46001501 */ sub.s $f20, $f2, $f0
.L80256814:
/* 1850F4 80256814 C640018C */ lwc1 $f0, 0x18C($s2)
/* 1850F8 80256818 86220018 */ lh $v0, 0x18($s1)
/* 1850FC 8025681C C7AA0368 */ lwc1 $f10, 0x368($sp)
/* 185100 80256820 46000606 */ mov.s $f24, $f0
/* 185104 80256824 44821000 */ mtc1 $v0, $f2
/* 185108 80256828 00000000 */ nop
/* 18510C 8025682C 468010A0 */ cvt.s.w $f2, $f2
/* 185110 80256830 8622001E */ lh $v0, 0x1E($s1)
/* 185114 80256834 46025080 */ add.s $f2, $f10, $f2
/* 185118 80256838 E6380064 */ swc1 $f24, 0x64($s1)
/* 18511C 8025683C 44820000 */ mtc1 $v0, $f0
/* 185120 80256840 00000000 */ nop
/* 185124 80256844 46800020 */ cvt.s.w $f0, $f0
/* 185128 80256848 08095A3C */ j .L802568F0
/* 18512C 8025684C 46001580 */ add.s $f22, $f2, $f0
.L80256850:
/* 185130 80256850 C6480170 */ lwc1 $f8, 0x170($s2)
/* 185134 80256854 3C01802A */ lui $at, %hi(D_8029D378)
/* 185138 80256858 D420D378 */ ldc1 $f0, %lo(D_8029D378)($at)
/* 18513C 8025685C 46004221 */ cvt.d.s $f8, $f8
/* 185140 80256860 46204202 */ mul.d $f8, $f8, $f0
/* 185144 80256864 00000000 */ nop
/* 185148 80256868 C6460174 */ lwc1 $f6, 0x174($s2)
/* 18514C 8025686C 460031A1 */ cvt.d.s $f6, $f6
/* 185150 80256870 46203182 */ mul.d $f6, $f6, $f0
/* 185154 80256874 00000000 */ nop
/* 185158 80256878 C6420178 */ lwc1 $f2, 0x178($s2)
/* 18515C 8025687C 460010A1 */ cvt.d.s $f2, $f2
/* 185160 80256880 46201082 */ mul.d $f2, $f2, $f0
/* 185164 80256884 00000000 */ nop
/* 185168 80256888 8622001A */ lh $v0, 0x1A($s1)
/* 18516C 8025688C C624002C */ lwc1 $f4, 0x2C($s1)
/* 185170 80256890 44820000 */ mtc1 $v0, $f0
/* 185174 80256894 00000000 */ nop
/* 185178 80256898 46800020 */ cvt.s.w $f0, $f0
/* 18517C 8025689C 46002680 */ add.s $f26, $f4, $f0
/* 185180 802568A0 8622001C */ lh $v0, 0x1C($s1)
/* 185184 802568A4 C6240030 */ lwc1 $f4, 0x30($s1)
/* 185188 802568A8 44820000 */ mtc1 $v0, $f0
/* 18518C 802568AC 00000000 */ nop
/* 185190 802568B0 46800020 */ cvt.s.w $f0, $f0
/* 185194 802568B4 46002500 */ add.s $f20, $f4, $f0
/* 185198 802568B8 8622001E */ lh $v0, 0x1E($s1)
/* 18519C 802568BC C6240034 */ lwc1 $f4, 0x34($s1)
/* 1851A0 802568C0 44820000 */ mtc1 $v0, $f0
/* 1851A4 802568C4 00000000 */ nop
/* 1851A8 802568C8 46800020 */ cvt.s.w $f0, $f0
/* 1851AC 802568CC 46204220 */ cvt.s.d $f8, $f8
/* 1851B0 802568D0 462031A0 */ cvt.s.d $f6, $f6
/* 1851B4 802568D4 462010A0 */ cvt.s.d $f2, $f2
/* 1851B8 802568D8 44054000 */ mfc1 $a1, $f8
/* 1851BC 802568DC 44063000 */ mfc1 $a2, $f6
/* 1851C0 802568E0 44071000 */ mfc1 $a3, $f2
/* 1851C4 802568E4 0C019DF0 */ jal guScaleF
/* 1851C8 802568E8 46002580 */ add.s $f22, $f4, $f0
/* 1851CC 802568EC C6380064 */ lwc1 $f24, 0x64($s1)
.L802568F0:
/* 1851D0 802568F0 8E240000 */ lw $a0, 0x0($s1)
/* 1851D4 802568F4 E63A0058 */ swc1 $f26, 0x58($s1)
/* 1851D8 802568F8 E634005C */ swc1 $f20, 0x5C($s1)
/* 1851DC 802568FC 30820001 */ andi $v0, $a0, 0x1
/* 1851E0 80256900 14400223 */ bnez $v0, .L80257190
/* 1851E4 80256904 E6360060 */ swc1 $f22, 0x60($s1)
/* 1851E8 80256908 8E220094 */ lw $v0, 0x94($s1)
/* 1851EC 8025690C 10400220 */ beqz $v0, .L80257190
/* 1851F0 80256910 2402000E */ addiu $v0, $zero, 0xE
/* 1851F4 80256914 82430218 */ lb $v1, 0x218($s2)
/* 1851F8 80256918 14620003 */ bne $v1, $v0, .L80256928
/* 1851FC 8025691C 2402FEFF */ addiu $v0, $zero, -0x101
/* 185200 80256920 08095A4B */ j .L8025692C
/* 185204 80256924 34820100 */ ori $v0, $a0, 0x100
.L80256928:
/* 185208 80256928 00821024 */ and $v0, $a0, $v0
.L8025692C:
/* 18520C 8025692C AE220000 */ sw $v0, 0x0($s1)
/* 185210 80256930 0000982D */ daddu $s3, $zero, $zero
/* 185214 80256934 0260802D */ daddu $s0, $s3, $zero
/* 185218 80256938 8E3E0088 */ lw $fp, 0x88($s1)
/* 18521C 8025693C 8FA803D0 */ lw $t0, 0x3D0($sp)
/* 185220 80256940 11000027 */ beqz $t0, .L802569E0
/* 185224 80256944 0260A02D */ daddu $s4, $s3, $zero
/* 185228 80256948 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4)
/* 18522C 8025694C 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0)
/* 185230 80256950 24030004 */ addiu $v1, $zero, 0x4
/* 185234 80256954 30420014 */ andi $v0, $v0, 0x14
/* 185238 80256958 14430015 */ bne $v0, $v1, .L802569B0
/* 18523C 8025695C 00000000 */ nop
/* 185240 80256960 82420216 */ lb $v0, 0x216($s2)
/* 185244 80256964 14400009 */ bnez $v0, .L8025698C
/* 185248 80256968 24050012 */ addiu $a1, $zero, 0x12
/* 18524C 8025696C 8E240094 */ lw $a0, 0x94($s1)
/* 185250 80256970 0C09973A */ jal get_npc_anim_for_status
/* 185254 80256974 24130001 */ addiu $s3, $zero, 0x1
/* 185258 80256978 8E240084 */ lw $a0, 0x84($s1)
/* 18525C 8025697C 8E260090 */ lw $a2, 0x90($s1)
/* 185260 80256980 0040282D */ daddu $a1, $v0, $zero
/* 185264 80256984 0C0B78AB */ jal spr_update_sprite
/* 185268 80256988 AE250088 */ sw $a1, 0x88($s1)
.L8025698C:
/* 18526C 8025698C 0240202D */ daddu $a0, $s2, $zero
/* 185270 80256990 0C099B6B */ jal set_actor_pal_adjustment
/* 185274 80256994 2405000C */ addiu $a1, $zero, 0xC
/* 185278 80256998 24100001 */ addiu $s0, $zero, 0x1
/* 18527C 8025699C 0240202D */ daddu $a0, $s2, $zero
/* 185280 802569A0 0C099BBA */ jal func_80266EE8
/* 185284 802569A4 0000282D */ daddu $a1, $zero, $zero
/* 185288 802569A8 0200A02D */ daddu $s4, $s0, $zero
/* 18528C 802569AC 8FA803D0 */ lw $t0, 0x3D0($sp)
.L802569B0:
/* 185290 802569B0 1100000B */ beqz $t0, .L802569E0
/* 185294 802569B4 24020006 */ addiu $v0, $zero, 0x6
/* 185298 802569B8 3C038011 */ lui $v1, %hi(gPlayerData + 0x12)
/* 18529C 802569BC 8063F2A2 */ lb $v1, %lo(gPlayerData + 0x12)($v1)
/* 1852A0 802569C0 14620007 */ bne $v1, $v0, .L802569E0
/* 1852A4 802569C4 00000000 */ nop
/* 1852A8 802569C8 16000005 */ bnez $s0, .L802569E0
/* 1852AC 802569CC 24100001 */ addiu $s0, $zero, 0x1
/* 1852B0 802569D0 0240202D */ daddu $a0, $s2, $zero
/* 1852B4 802569D4 0C099B6B */ jal set_actor_pal_adjustment
/* 1852B8 802569D8 24050009 */ addiu $a1, $zero, 0x9
/* 1852BC 802569DC 24100001 */ addiu $s0, $zero, 0x1
.L802569E0:
/* 1852C0 802569E0 82420220 */ lb $v0, 0x220($s2)
/* 1852C4 802569E4 10400007 */ beqz $v0, .L80256A04
/* 1852C8 802569E8 00000000 */ nop
/* 1852CC 802569EC 16800005 */ bnez $s4, .L80256A04
/* 1852D0 802569F0 24140001 */ addiu $s4, $zero, 0x1
/* 1852D4 802569F4 0240202D */ daddu $a0, $s2, $zero
/* 1852D8 802569F8 0C099BBA */ jal func_80266EE8
/* 1852DC 802569FC 2405000B */ addiu $a1, $zero, 0xB
/* 1852E0 80256A00 24140001 */ addiu $s4, $zero, 0x1
.L80256A04:
/* 1852E4 80256A04 82430210 */ lb $v1, 0x210($s2)
/* 1852E8 80256A08 24020009 */ addiu $v0, $zero, 0x9
/* 1852EC 80256A0C 14620009 */ bne $v1, $v0, .L80256A34
/* 1852F0 80256A10 24020005 */ addiu $v0, $zero, 0x5
/* 1852F4 80256A14 16000007 */ bnez $s0, .L80256A34
/* 1852F8 80256A18 24100001 */ addiu $s0, $zero, 0x1
/* 1852FC 80256A1C 0240202D */ daddu $a0, $s2, $zero
/* 185300 80256A20 0C099B6B */ jal set_actor_pal_adjustment
/* 185304 80256A24 24050006 */ addiu $a1, $zero, 0x6
/* 185308 80256A28 24100001 */ addiu $s0, $zero, 0x1
/* 18530C 80256A2C 82430210 */ lb $v1, 0x210($s2)
/* 185310 80256A30 24020005 */ addiu $v0, $zero, 0x5
.L80256A34:
/* 185314 80256A34 14620007 */ bne $v1, $v0, .L80256A54
/* 185318 80256A38 00000000 */ nop
/* 18531C 80256A3C 16000005 */ bnez $s0, .L80256A54
/* 185320 80256A40 24100001 */ addiu $s0, $zero, 0x1
/* 185324 80256A44 0240202D */ daddu $a0, $s2, $zero
/* 185328 80256A48 0C099B6B */ jal set_actor_pal_adjustment
/* 18532C 80256A4C 24050007 */ addiu $a1, $zero, 0x7
/* 185330 80256A50 24100001 */ addiu $s0, $zero, 0x1
.L80256A54:
/* 185334 80256A54 82430210 */ lb $v1, 0x210($s2)
/* 185338 80256A58 24020003 */ addiu $v0, $zero, 0x3
/* 18533C 80256A5C 14620007 */ bne $v1, $v0, .L80256A7C
/* 185340 80256A60 00000000 */ nop
/* 185344 80256A64 16000005 */ bnez $s0, .L80256A7C
/* 185348 80256A68 24100001 */ addiu $s0, $zero, 0x1
/* 18534C 80256A6C 0240202D */ daddu $a0, $s2, $zero
/* 185350 80256A70 0C099B6B */ jal set_actor_pal_adjustment
/* 185354 80256A74 24050005 */ addiu $a1, $zero, 0x5
/* 185358 80256A78 24100001 */ addiu $s0, $zero, 0x1
.L80256A7C:
/* 18535C 80256A7C 82430212 */ lb $v1, 0x212($s2)
/* 185360 80256A80 2402000B */ addiu $v0, $zero, 0xB
/* 185364 80256A84 14620007 */ bne $v1, $v0, .L80256AA4
/* 185368 80256A88 00000000 */ nop
/* 18536C 80256A8C 16000005 */ bnez $s0, .L80256AA4
/* 185370 80256A90 24100001 */ addiu $s0, $zero, 0x1
/* 185374 80256A94 0240202D */ daddu $a0, $s2, $zero
/* 185378 80256A98 0C099B6B */ jal set_actor_pal_adjustment
/* 18537C 80256A9C 24050004 */ addiu $a1, $zero, 0x4
/* 185380 80256AA0 24100001 */ addiu $s0, $zero, 0x1
.L80256AA4:
/* 185384 80256AA4 16000007 */ bnez $s0, .L80256AC4
/* 185388 80256AA8 3C030100 */ lui $v1, (0x1000000 >> 16)
/* 18538C 80256AAC 8E220000 */ lw $v0, 0x0($s1)
/* 185390 80256AB0 00431024 */ and $v0, $v0, $v1
/* 185394 80256AB4 14400003 */ bnez $v0, .L80256AC4
/* 185398 80256AB8 0240202D */ daddu $a0, $s2, $zero
/* 18539C 80256ABC 0C099B6B */ jal set_actor_pal_adjustment
/* 1853A0 80256AC0 0000282D */ daddu $a1, $zero, $zero
.L80256AC4:
/* 1853A4 80256AC4 16800007 */ bnez $s4, .L80256AE4
/* 1853A8 80256AC8 3C030100 */ lui $v1, (0x1000000 >> 16)
/* 1853AC 80256ACC 8E220000 */ lw $v0, 0x0($s1)
/* 1853B0 80256AD0 00431024 */ and $v0, $v0, $v1
/* 1853B4 80256AD4 14400003 */ bnez $v0, .L80256AE4
/* 1853B8 80256AD8 0240202D */ daddu $a0, $s2, $zero
D_80256ADC:
/* 1853BC 80256ADC 0C099BBA */ jal func_80266EE8
/* 1853C0 80256AE0 0000282D */ daddu $a1, $zero, $zero
.L80256AE4:
/* 1853C4 80256AE4 8E420000 */ lw $v0, 0x0($s2)
/* 1853C8 80256AE8 3C030400 */ lui $v1, (0x4000000 >> 16)
D_80256AEC:
/* 1853CC 80256AEC 00431024 */ and $v0, $v0, $v1
/* 1853D0 80256AF0 10400070 */ beqz $v0, .L80256CB4
/* 1853D4 80256AF4 3C032000 */ lui $v1, (0x20000000 >> 16)
/* 1853D8 80256AF8 8E220000 */ lw $v0, 0x0($s1)
/* 1853DC 80256AFC 00431024 */ and $v0, $v0, $v1
/* 1853E0 80256B00 1440006C */ bnez $v0, .L80256CB4
/* 1853E4 80256B04 24020007 */ addiu $v0, $zero, 0x7
/* 1853E8 80256B08 82430210 */ lb $v1, 0x210($s2)
/* 1853EC 80256B0C 10620012 */ beq $v1, $v0, .L80256B58
/* 1853F0 80256B10 00000000 */ nop
/* 1853F4 80256B14 2402000A */ addiu $v0, $zero, 0xA
/* 1853F8 80256B18 10620015 */ beq $v1, $v0, .L80256B70
/* 1853FC 80256B1C 24020009 */ addiu $v0, $zero, 0x9
/* 185400 80256B20 1062000D */ beq $v1, $v0, .L80256B58
/* 185404 80256B24 00000000 */ nop
/* 185408 80256B28 24020004 */ addiu $v0, $zero, 0x4
/* 18540C 80256B2C 1062000A */ beq $v1, $v0, .L80256B58
/* 185410 80256B30 00000000 */ nop
/* 185414 80256B34 24020003 */ addiu $v0, $zero, 0x3
/* 185418 80256B38 10620007 */ beq $v1, $v0, .L80256B58
/* 18541C 80256B3C 00000000 */ nop
/* 185420 80256B40 24020006 */ addiu $v0, $zero, 0x6
/* 185424 80256B44 10620004 */ beq $v1, $v0, .L80256B58
/* 185428 80256B48 00000000 */ nop
/* 18542C 80256B4C 24020005 */ addiu $v0, $zero, 0x5
/* 185430 80256B50 14620007 */ bne $v1, $v0, .L80256B70
/* 185434 80256B54 00000000 */ nop
.L80256B58:
/* 185438 80256B58 16600005 */ bnez $s3, .L80256B70
/* 18543C 80256B5C 0040282D */ daddu $a1, $v0, $zero
/* 185440 80256B60 8E240094 */ lw $a0, 0x94($s1)
/* 185444 80256B64 0C09973A */ jal get_npc_anim_for_status
/* 185448 80256B68 24130001 */ addiu $s3, $zero, 0x1
/* 18544C 80256B6C AE220088 */ sw $v0, 0x88($s1)
.L80256B70:
/* 185450 80256B70 82430212 */ lb $v1, 0x212($s2)
/* 185454 80256B74 2402000B */ addiu $v0, $zero, 0xB
/* 185458 80256B78 14620007 */ bne $v1, $v0, .L80256B98
/* 18545C 80256B7C 00000000 */ nop
/* 185460 80256B80 16600005 */ bnez $s3, .L80256B98
/* 185464 80256B84 0040282D */ daddu $a1, $v0, $zero
/* 185468 80256B88 8E240094 */ lw $a0, 0x94($s1)
/* 18546C 80256B8C 0C09973A */ jal get_npc_anim_for_status
/* 185470 80256B90 24130001 */ addiu $s3, $zero, 0x1
/* 185474 80256B94 AE220088 */ sw $v0, 0x88($s1)
.L80256B98:
/* 185478 80256B98 16600005 */ bnez $s3, .L80256BB0
/* 18547C 80256B9C 00000000 */ nop
/* 185480 80256BA0 8E240094 */ lw $a0, 0x94($s1)
/* 185484 80256BA4 0C09973A */ jal get_npc_anim_for_status
/* 185488 80256BA8 24050001 */ addiu $a1, $zero, 0x1
/* 18548C 80256BAC AE220088 */ sw $v0, 0x88($s1)
.L80256BB0:
/* 185490 80256BB0 8FA803D0 */ lw $t0, 0x3D0($sp)
/* 185494 80256BB4 11000014 */ beqz $t0, .L80256C08
/* 185498 80256BB8 2402000D */ addiu $v0, $zero, 0xD
/* 18549C 80256BBC 82430216 */ lb $v1, 0x216($s2)
/* 1854A0 80256BC0 14620004 */ bne $v1, $v0, .L80256BD4
/* 1854A4 80256BC4 0040282D */ daddu $a1, $v0, $zero
/* 1854A8 80256BC8 8E240094 */ lw $a0, 0x94($s1)
/* 1854AC 80256BCC 08095AFF */ j .L80256BFC
/* 1854B0 80256BD0 24130001 */ addiu $s3, $zero, 0x1
.L80256BD4:
/* 1854B4 80256BD4 8E240094 */ lw $a0, 0x94($s1)
/* 1854B8 80256BD8 0C09973A */ jal get_npc_anim_for_status
/* 1854BC 80256BDC 24050001 */ addiu $a1, $zero, 0x1
/* 1854C0 80256BE0 0040802D */ daddu $s0, $v0, $zero
/* 1854C4 80256BE4 8E240094 */ lw $a0, 0x94($s1)
/* 1854C8 80256BE8 0C09973A */ jal get_npc_anim_for_status
/* 1854CC 80256BEC 2405000D */ addiu $a1, $zero, 0xD
/* 1854D0 80256BF0 16020005 */ bne $s0, $v0, .L80256C08
/* 1854D4 80256BF4 24050001 */ addiu $a1, $zero, 0x1
/* 1854D8 80256BF8 8E240094 */ lw $a0, 0x94($s1)
.L80256BFC:
/* 1854DC 80256BFC 0C09973A */ jal get_npc_anim_for_status
/* 1854E0 80256C00 00000000 */ nop
/* 1854E4 80256C04 AE220088 */ sw $v0, 0x88($s1)
.L80256C08:
/* 1854E8 80256C08 82430210 */ lb $v1, 0x210($s2)
/* 1854EC 80256C0C 24020008 */ addiu $v0, $zero, 0x8
/* 1854F0 80256C10 14620019 */ bne $v1, $v0, .L80256C78
/* 1854F4 80256C14 00000000 */ nop
/* 1854F8 80256C18 8E240094 */ lw $a0, 0x94($s1)
/* 1854FC 80256C1C 0C09973A */ jal get_npc_anim_for_status
/* 185500 80256C20 0040282D */ daddu $a1, $v0, $zero
/* 185504 80256C24 AE220088 */ sw $v0, 0x88($s1)
/* 185508 80256C28 86440436 */ lh $a0, 0x436($s2)
/* 18550C 80256C2C 0C011E08 */ jal create_status_debuff
/* 185510 80256C30 24050008 */ addiu $a1, $zero, 0x8
/* 185514 80256C34 08095B2D */ j .L80256CB4
/* 185518 80256C38 00000000 */ nop
.L80256C3C:
/* 18551C 80256C3C 86440436 */ lh $a0, 0x436($s2)
/* 185520 80256C40 08095B44 */ j .L80256D10
/* 185524 80256C44 24050009 */ addiu $a1, $zero, 0x9
.L80256C48:
/* 185528 80256C48 86440436 */ lh $a0, 0x436($s2)
/* 18552C 80256C4C 08095B44 */ j .L80256D10
/* 185530 80256C50 24050004 */ addiu $a1, $zero, 0x4
.L80256C54:
/* 185534 80256C54 86440436 */ lh $a0, 0x436($s2)
D_80256C58:
/* 185538 80256C58 08095B44 */ j .L80256D10
/* 18553C 80256C5C 24050006 */ addiu $a1, $zero, 0x6
.L80256C60:
/* 185540 80256C60 86440436 */ lh $a0, 0x436($s2)
/* 185544 80256C64 08095B44 */ j .L80256D10
/* 185548 80256C68 24050005 */ addiu $a1, $zero, 0x5
.L80256C6C:
/* 18554C 80256C6C 86440436 */ lh $a0, 0x436($s2)
/* 185550 80256C70 08095B44 */ j .L80256D10
/* 185554 80256C74 2405000A */ addiu $a1, $zero, 0xA
.L80256C78:
/* 185558 80256C78 1660000E */ bnez $s3, .L80256CB4
/* 18555C 80256C7C 00000000 */ nop
/* 185560 80256C80 8E240094 */ lw $a0, 0x94($s1)
/* 185564 80256C84 0C09973A */ jal get_npc_anim_for_status
/* 185568 80256C88 24050001 */ addiu $a1, $zero, 0x1
/* 18556C 80256C8C 0040802D */ daddu $s0, $v0, $zero
/* 185570 80256C90 8E240094 */ lw $a0, 0x94($s1)
/* 185574 80256C94 0C09973A */ jal get_npc_anim_for_status
/* 185578 80256C98 24050008 */ addiu $a1, $zero, 0x8
/* 18557C 80256C9C 16020005 */ bne $s0, $v0, .L80256CB4
/* 185580 80256CA0 00000000 */ nop
/* 185584 80256CA4 8E240094 */ lw $a0, 0x94($s1)
/* 185588 80256CA8 0C09973A */ jal get_npc_anim_for_status
/* 18558C 80256CAC 24050001 */ addiu $a1, $zero, 0x1
/* 185590 80256CB0 AE220088 */ sw $v0, 0x88($s1)
.L80256CB4:
/* 185594 80256CB4 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 185598 80256CB8 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 18559C 80256CBC 30420004 */ andi $v0, $v0, 0x4
/* 1855A0 80256CC0 1440002E */ bnez $v0, .L80256D7C
/* 1855A4 80256CC4 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 1855A8 80256CC8 8E420000 */ lw $v0, 0x0($s2)
/* 1855AC 80256CCC 00431024 */ and $v0, $v0, $v1
/* 1855B0 80256CD0 1040002A */ beqz $v0, .L80256D7C
/* 1855B4 80256CD4 24020009 */ addiu $v0, $zero, 0x9
/* 1855B8 80256CD8 82430210 */ lb $v1, 0x210($s2)
/* 1855BC 80256CDC 1062FFD7 */ beq $v1, $v0, .L80256C3C
/* 1855C0 80256CE0 24020004 */ addiu $v0, $zero, 0x4
/* 1855C4 80256CE4 1062FFD8 */ beq $v1, $v0, .L80256C48
/* 1855C8 80256CE8 24020006 */ addiu $v0, $zero, 0x6
/* 1855CC 80256CEC 1062FFD9 */ beq $v1, $v0, .L80256C54
/* 1855D0 80256CF0 24020005 */ addiu $v0, $zero, 0x5
/* 1855D4 80256CF4 1062FFDA */ beq $v1, $v0, .L80256C60
/* 1855D8 80256CF8 2402000A */ addiu $v0, $zero, 0xA
/* 1855DC 80256CFC 1062FFDB */ beq $v1, $v0, .L80256C6C
/* 1855E0 80256D00 24020007 */ addiu $v0, $zero, 0x7
/* 1855E4 80256D04 14620004 */ bne $v1, $v0, .L80256D18
/* 1855E8 80256D08 0040282D */ daddu $a1, $v0, $zero
/* 1855EC 80256D0C 86440436 */ lh $a0, 0x436($s2)
.L80256D10:
/* 1855F0 80256D10 0C011E08 */ jal create_status_debuff
/* 1855F4 80256D14 00000000 */ nop
.L80256D18:
/* 1855F8 80256D18 82430212 */ lb $v1, 0x212($s2)
/* 1855FC 80256D1C 2402000B */ addiu $v0, $zero, 0xB
/* 185600 80256D20 14620004 */ bne $v1, $v0, .L80256D34
/* 185604 80256D24 00000000 */ nop
/* 185608 80256D28 86440436 */ lh $a0, 0x436($s2)
/* 18560C 80256D2C 0C011E4A */ jal create_status_static
/* 185610 80256D30 0040282D */ daddu $a1, $v0, $zero
.L80256D34:
/* 185614 80256D34 82430218 */ lb $v1, 0x218($s2)
/* 185618 80256D38 2402000E */ addiu $v0, $zero, 0xE
/* 18561C 80256D3C 10620005 */ beq $v1, $v0, .L80256D54
/* 185620 80256D40 00000000 */ nop
/* 185624 80256D44 8E220000 */ lw $v0, 0x0($s1)
/* 185628 80256D48 30420100 */ andi $v0, $v0, 0x100
/* 18562C 80256D4C 10400004 */ beqz $v0, .L80256D60
/* 185630 80256D50 00000000 */ nop
.L80256D54:
/* 185634 80256D54 86440436 */ lh $a0, 0x436($s2)
/* 185638 80256D58 0C011E8C */ jal create_status_transparent
/* 18563C 80256D5C 2405000E */ addiu $a1, $zero, 0xE
.L80256D60:
/* 185640 80256D60 82420223 */ lb $v0, 0x223($s2)
/* 185644 80256D64 1040000D */ beqz $v0, .L80256D9C
/* 185648 80256D68 00000000 */ nop
/* 18564C 80256D6C 0C011ECE */ jal create_status_chill_out
/* 185650 80256D70 86440436 */ lh $a0, 0x436($s2)
/* 185654 80256D74 08095B67 */ j .L80256D9C
/* 185658 80256D78 00000000 */ nop
.L80256D7C:
/* 18565C 80256D7C 0C011E3E */ jal enable_status_debuff
/* 185660 80256D80 86440436 */ lh $a0, 0x436($s2)
/* 185664 80256D84 0C011E80 */ jal enable_status_2
/* 185668 80256D88 86440436 */ lh $a0, 0x436($s2)
/* 18566C 80256D8C 0C011EC2 */ jal enable_status_transparent
/* 185670 80256D90 86440436 */ lh $a0, 0x436($s2)
/* 185674 80256D94 0C011EF9 */ jal enable_status_chill_out
/* 185678 80256D98 86440436 */ lh $a0, 0x436($s2)
.L80256D9C:
/* 18567C 80256D9C 8E240084 */ lw $a0, 0x84($s1)
/* 185680 80256DA0 04800009 */ bltz $a0, .L80256DC8
/* 185684 80256DA4 00000000 */ nop
/* 185688 80256DA8 8E250088 */ lw $a1, 0x88($s1)
/* 18568C 80256DAC 13C50006 */ beq $fp, $a1, .L80256DC8
/* 185690 80256DB0 00000000 */ nop
/* 185694 80256DB4 0C0B78AB */ jal spr_update_sprite
/* 185698 80256DB8 8E260090 */ lw $a2, 0x90($s1)
/* 18569C 80256DBC 0C0B7972 */ jal spr_get_notify_value
/* 1856A0 80256DC0 8E240084 */ lw $a0, 0x84($s1)
/* 1856A4 80256DC4 AE22008C */ sw $v0, 0x8C($s1)
.L80256DC8:
/* 1856A8 80256DC8 8E420000 */ lw $v0, 0x0($s2)
/* 1856AC 80256DCC 30420800 */ andi $v0, $v0, 0x800
/* 1856B0 80256DD0 14400025 */ bnez $v0, .L80256E68
/* 1856B4 80256DD4 00000000 */ nop
/* 1856B8 80256DD8 86220044 */ lh $v0, 0x44($s1)
D_80256DDC:
/* 1856BC 80256DDC C6420188 */ lwc1 $f2, 0x188($s2)
/* 1856C0 80256DE0 00021023 */ negu $v0, $v0
/* 1856C4 80256DE4 44820000 */ mtc1 $v0, $f0
/* 1856C8 80256DE8 00000000 */ nop
/* 1856CC 80256DEC 46800020 */ cvt.s.w $f0, $f0
/* 1856D0 80256DF0 46020002 */ mul.s $f0, $f0, $f2
/* 1856D4 80256DF4 00000000 */ nop
/* 1856D8 80256DF8 86220046 */ lh $v0, 0x46($s1)
/* 1856DC 80256DFC 00021023 */ negu $v0, $v0
/* 1856E0 80256E00 44050000 */ mfc1 $a1, $f0
/* 1856E4 80256E04 44820000 */ mtc1 $v0, $f0
/* 1856E8 80256E08 00000000 */ nop
/* 1856EC 80256E0C 46800020 */ cvt.s.w $f0, $f0
/* 1856F0 80256E10 46020002 */ mul.s $f0, $f0, $f2
/* 1856F4 80256E14 00000000 */ nop
/* 1856F8 80256E18 86220048 */ lh $v0, 0x48($s1)
/* 1856FC 80256E1C 00021023 */ negu $v0, $v0
/* 185700 80256E20 44060000 */ mfc1 $a2, $f0
/* 185704 80256E24 44820000 */ mtc1 $v0, $f0
/* 185708 80256E28 00000000 */ nop
/* 18570C 80256E2C 46800020 */ cvt.s.w $f0, $f0
/* 185710 80256E30 46020002 */ mul.s $f0, $f0, $f2
/* 185714 80256E34 00000000 */ nop
/* 185718 80256E38 44070000 */ mfc1 $a3, $f0
/* 18571C 80256E3C 0C019E40 */ jal guTranslateF
/* 185720 80256E40 27A401A0 */ addiu $a0, $sp, 0x1A0
/* 185724 80256E44 86220044 */ lh $v0, 0x44($s1)
/* 185728 80256E48 C6420188 */ lwc1 $f2, 0x188($s2)
/* 18572C 80256E4C 44820000 */ mtc1 $v0, $f0
/* 185730 80256E50 00000000 */ nop
/* 185734 80256E54 46800020 */ cvt.s.w $f0, $f0
/* 185738 80256E58 46020002 */ mul.s $f0, $f0, $f2
/* 18573C 80256E5C 00000000 */ nop
/* 185740 80256E60 08095BBD */ j .L80256EF4
/* 185744 80256E64 86220046 */ lh $v0, 0x46($s1)
.L80256E68:
/* 185748 80256E68 86220044 */ lh $v0, 0x44($s1)
/* 18574C 80256E6C C6420188 */ lwc1 $f2, 0x188($s2)
/* 185750 80256E70 00021023 */ negu $v0, $v0
/* 185754 80256E74 44820000 */ mtc1 $v0, $f0
/* 185758 80256E78 00000000 */ nop
/* 18575C 80256E7C 46800020 */ cvt.s.w $f0, $f0
/* 185760 80256E80 46020002 */ mul.s $f0, $f0, $f2
/* 185764 80256E84 00000000 */ nop
/* 185768 80256E88 86220046 */ lh $v0, 0x46($s1)
/* 18576C 80256E8C 44050000 */ mfc1 $a1, $f0
/* 185770 80256E90 44820000 */ mtc1 $v0, $f0
/* 185774 80256E94 00000000 */ nop
/* 185778 80256E98 46800020 */ cvt.s.w $f0, $f0
/* 18577C 80256E9C 46020002 */ mul.s $f0, $f0, $f2
/* 185780 80256EA0 00000000 */ nop
/* 185784 80256EA4 86220048 */ lh $v0, 0x48($s1)
/* 185788 80256EA8 00021023 */ negu $v0, $v0
/* 18578C 80256EAC 44060000 */ mfc1 $a2, $f0
/* 185790 80256EB0 44820000 */ mtc1 $v0, $f0
/* 185794 80256EB4 00000000 */ nop
/* 185798 80256EB8 46800020 */ cvt.s.w $f0, $f0
/* 18579C 80256EBC 46020002 */ mul.s $f0, $f0, $f2
/* 1857A0 80256EC0 00000000 */ nop
/* 1857A4 80256EC4 44070000 */ mfc1 $a3, $f0
/* 1857A8 80256EC8 0C019E40 */ jal guTranslateF
/* 1857AC 80256ECC 27A401A0 */ addiu $a0, $sp, 0x1A0
/* 1857B0 80256ED0 86220044 */ lh $v0, 0x44($s1)
/* 1857B4 80256ED4 C6420188 */ lwc1 $f2, 0x188($s2)
/* 1857B8 80256ED8 44820000 */ mtc1 $v0, $f0
/* 1857BC 80256EDC 00000000 */ nop
/* 1857C0 80256EE0 46800020 */ cvt.s.w $f0, $f0
/* 1857C4 80256EE4 46020002 */ mul.s $f0, $f0, $f2
/* 1857C8 80256EE8 00000000 */ nop
/* 1857CC 80256EEC 86220046 */ lh $v0, 0x46($s1)
/* 1857D0 80256EF0 00021023 */ negu $v0, $v0
.L80256EF4:
/* 1857D4 80256EF4 44050000 */ mfc1 $a1, $f0
/* 1857D8 80256EF8 44820000 */ mtc1 $v0, $f0
/* 1857DC 80256EFC 00000000 */ nop
/* 1857E0 80256F00 46800020 */ cvt.s.w $f0, $f0
/* 1857E4 80256F04 46020002 */ mul.s $f0, $f0, $f2
/* 1857E8 80256F08 00000000 */ nop
/* 1857EC 80256F0C 86220048 */ lh $v0, 0x48($s1)
/* 1857F0 80256F10 44060000 */ mfc1 $a2, $f0
/* 1857F4 80256F14 44820000 */ mtc1 $v0, $f0
/* 1857F8 80256F18 00000000 */ nop
/* 1857FC 80256F1C 46800020 */ cvt.s.w $f0, $f0
/* 185800 80256F20 46020002 */ mul.s $f0, $f0, $f2
/* 185804 80256F24 00000000 */ nop
/* 185808 80256F28 44070000 */ mfc1 $a3, $f0
/* 18580C 80256F2C 0C019E40 */ jal guTranslateF
/* 185810 80256F30 27A401E0 */ addiu $a0, $sp, 0x1E0
/* 185814 80256F34 86220068 */ lh $v0, 0x68($s1)
/* 185818 80256F38 44820000 */ mtc1 $v0, $f0
/* 18581C 80256F3C 00000000 */ nop
/* 185820 80256F40 46800020 */ cvt.s.w $f0, $f0
/* 185824 80256F44 4600D000 */ add.s $f0, $f26, $f0
/* 185828 80256F48 8622006A */ lh $v0, 0x6A($s1)
/* 18582C 80256F4C 44050000 */ mfc1 $a1, $f0
/* 185830 80256F50 44820000 */ mtc1 $v0, $f0
/* 185834 80256F54 00000000 */ nop
/* 185838 80256F58 46800020 */ cvt.s.w $f0, $f0
/* 18583C 80256F5C 4600A000 */ add.s $f0, $f20, $f0
/* 185840 80256F60 4407B000 */ mfc1 $a3, $f22
/* 185844 80256F64 44060000 */ mfc1 $a2, $f0
/* 185848 80256F68 0C019E40 */ jal guTranslateF
/* 18584C 80256F6C 27A40220 */ addiu $a0, $sp, 0x220
/* 185850 80256F70 E7BC0010 */ swc1 $f28, 0x10($sp)
/* 185854 80256F74 8E250038 */ lw $a1, 0x38($s1)
/* 185858 80256F78 3C063F80 */ lui $a2, (0x3F800000 >> 16)
/* 18585C 80256F7C 4407E000 */ mfc1 $a3, $f28
/* 185860 80256F80 0C019EC8 */ jal guRotateF
/* 185864 80256F84 27A40020 */ addiu $a0, $sp, 0x20
/* 185868 80256F88 E7BC0010 */ swc1 $f28, 0x10($sp)
/* 18586C 80256F8C 8E25003C */ lw $a1, 0x3C($s1)
/* 185870 80256F90 4406E000 */ mfc1 $a2, $f28
/* 185874 80256F94 3C073F80 */ lui $a3, (0x3F800000 >> 16)
/* 185878 80256F98 0C019EC8 */ jal guRotateF
/* 18587C 80256F9C 8FA4036C */ lw $a0, 0x36C($sp)
D_80256FA0:
/* 185880 80256FA0 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 185884 80256FA4 44815000 */ mtc1 $at, $f10
/* 185888 80256FA8 4406E000 */ mfc1 $a2, $f28
/* 18588C 80256FAC 4407E000 */ mfc1 $a3, $f28
/* 185890 80256FB0 27B000A0 */ addiu $s0, $sp, 0xA0
/* 185894 80256FB4 E7AA0010 */ swc1 $f10, 0x10($sp)
/* 185898 80256FB8 8E250040 */ lw $a1, 0x40($s1)
/* 18589C 80256FBC 0C019EC8 */ jal guRotateF
/* 1858A0 80256FC0 0200202D */ daddu $a0, $s0, $zero
/* 1858A4 80256FC4 27A50020 */ addiu $a1, $sp, 0x20
/* 1858A8 80256FC8 8FA4036C */ lw $a0, 0x36C($sp)
/* 1858AC 80256FCC 0C019D80 */ jal guMtxCatF
/* 1858B0 80256FD0 02C0302D */ daddu $a2, $s6, $zero
/* 1858B4 80256FD4 02C0202D */ daddu $a0, $s6, $zero
/* 1858B8 80256FD8 8FA60370 */ lw $a2, 0x370($sp)
/* 1858BC 80256FDC 0C019D80 */ jal guMtxCatF
/* 1858C0 80256FE0 0200282D */ daddu $a1, $s0, $zero
/* 1858C4 80256FE4 82220074 */ lb $v0, 0x74($s1)
/* 1858C8 80256FE8 C6220050 */ lwc1 $f2, 0x50($s1)
/* 1858CC 80256FEC 44820000 */ mtc1 $v0, $f0
/* 1858D0 80256FF0 00000000 */ nop
/* 1858D4 80256FF4 46800020 */ cvt.s.w $f0, $f0
/* 1858D8 80256FF8 46001082 */ mul.s $f2, $f2, $f0
/* 1858DC 80256FFC 00000000 */ nop
/* 1858E0 80257000 27B00120 */ addiu $s0, $sp, 0x120
/* 1858E4 80257004 8E25004C */ lw $a1, 0x4C($s1)
/* 1858E8 80257008 8E270054 */ lw $a3, 0x54($s1)
/* 1858EC 8025700C 44061000 */ mfc1 $a2, $f2
/* 1858F0 80257010 0C019DF0 */ jal guScaleF
/* 1858F4 80257014 0200202D */ daddu $a0, $s0, $zero
/* 1858F8 80257018 0200202D */ daddu $a0, $s0, $zero
/* 1858FC 8025701C 27A501A0 */ addiu $a1, $sp, 0x1A0
/* 185900 80257020 0C019D80 */ jal guMtxCatF
/* 185904 80257024 02A0302D */ daddu $a2, $s5, $zero
/* 185908 80257028 02A0202D */ daddu $a0, $s5, $zero
/* 18590C 8025702C 8FA50370 */ lw $a1, 0x370($sp)
/* 185910 80257030 0C019D80 */ jal guMtxCatF
/* 185914 80257034 02C0302D */ daddu $a2, $s6, $zero
/* 185918 80257038 02C0202D */ daddu $a0, $s6, $zero
/* 18591C 8025703C 27A501E0 */ addiu $a1, $sp, 0x1E0
/* 185920 80257040 0C019D80 */ jal guMtxCatF
/* 185924 80257044 02A0302D */ daddu $a2, $s5, $zero
/* 185928 80257048 8E220000 */ lw $v0, 0x0($s1)
/* 18592C 8025704C 3C030010 */ lui $v1, (0x100000 >> 16)
/* 185930 80257050 00431024 */ and $v0, $v0, $v1
/* 185934 80257054 14400003 */ bnez $v0, .L80257064
/* 185938 80257058 02A0202D */ daddu $a0, $s5, $zero
/* 18593C 8025705C 08095C1A */ j .L80257068
/* 185940 80257060 27A502A0 */ addiu $a1, $sp, 0x2A0
.L80257064:
/* 185944 80257064 27A50320 */ addiu $a1, $sp, 0x320
.L80257068:
/* 185948 80257068 0C019D80 */ jal guMtxCatF
/* 18594C 8025706C 02C0302D */ daddu $a2, $s6, $zero
/* 185950 80257070 27A40260 */ addiu $a0, $sp, 0x260
/* 185954 80257074 27A50220 */ addiu $a1, $sp, 0x220
/* 185958 80257078 0C019D80 */ jal guMtxCatF
/* 18595C 8025707C 02A0302D */ daddu $a2, $s5, $zero
/* 185960 80257080 86220068 */ lh $v0, 0x68($s1)
/* 185964 80257084 44821000 */ mtc1 $v0, $f2
/* 185968 80257088 00000000 */ nop
/* 18596C 8025708C 468010A0 */ cvt.s.w $f2, $f2
/* 185970 80257090 8622006A */ lh $v0, 0x6A($s1)
/* 185974 80257094 4602D080 */ add.s $f2, $f26, $f2
/* 185978 80257098 44820000 */ mtc1 $v0, $f0
/* 18597C 8025709C 00000000 */ nop
/* 185980 802570A0 46800020 */ cvt.s.w $f0, $f0
/* 185984 802570A4 8E220084 */ lw $v0, 0x84($s1)
/* 185988 802570A8 4600A000 */ add.s $f0, $f20, $f0
/* 18598C 802570AC E6360060 */ swc1 $f22, 0x60($s1)
/* 185990 802570B0 E6220058 */ swc1 $f2, 0x58($s1)
/* 185994 802570B4 04400036 */ bltz $v0, .L80257190
/* 185998 802570B8 E620005C */ swc1 $f0, 0x5C($s1)
/* 18599C 802570BC 8FA803D0 */ lw $t0, 0x3D0($sp)
/* 1859A0 802570C0 15000013 */ bnez $t0, .L80257110
/* 1859A4 802570C4 0220282D */ daddu $a1, $s1, $zero
/* 1859A8 802570C8 24040001 */ addiu $a0, $zero, 0x1
/* 1859AC 802570CC 4600C28D */ trunc.w.s $f10, $f24
/* 1859B0 802570D0 44105000 */ mfc1 $s0, $f10
/* 1859B4 802570D4 00000000 */ nop
/* 1859B8 802570D8 0200302D */ daddu $a2, $s0, $zero
/* 1859BC 802570DC 0C097210 */ jal func_8025C840
/* 1859C0 802570E0 0000382D */ daddu $a3, $zero, $zero
/* 1859C4 802570E4 24040001 */ addiu $a0, $zero, 0x1
/* 1859C8 802570E8 0220282D */ daddu $a1, $s1, $zero
/* 1859CC 802570EC 0200302D */ daddu $a2, $s0, $zero
/* 1859D0 802570F0 0C097332 */ jal func_8025CCC8
/* 1859D4 802570F4 0000382D */ daddu $a3, $zero, $zero
/* 1859D8 802570F8 AFA00010 */ sw $zero, 0x10($sp)
/* 1859DC 802570FC 24040001 */ addiu $a0, $zero, 0x1
/* 1859E0 80257100 0220282D */ daddu $a1, $s1, $zero
/* 1859E4 80257104 0200302D */ daddu $a2, $s0, $zero
/* 1859E8 80257108 08095C60 */ j .L80257180
/* 1859EC 8025710C 02A0382D */ daddu $a3, $s5, $zero
.L80257110:
/* 1859F0 80257110 3C014334 */ lui $at, (0x43340000 >> 16)
/* 1859F4 80257114 4481A000 */ mtc1 $at, $f20
D_80257118:
/* 1859F8 80257118 00000000 */ nop
/* 1859FC 8025711C 4618A501 */ sub.s $f20, $f20, $f24
/* 185A00 80257120 0C00A6C9 */ jal clamp_angle
/* 185A04 80257124 4600A306 */ mov.s $f12, $f20
/* 185A08 80257128 24040001 */ addiu $a0, $zero, 0x1
/* 185A0C 8025712C 0220282D */ daddu $a1, $s1, $zero
/* 185A10 80257130 4600028D */ trunc.w.s $f10, $f0
/* 185A14 80257134 44065000 */ mfc1 $a2, $f10
/* 185A18 80257138 0C097210 */ jal func_8025C840
/* 185A1C 8025713C 0000382D */ daddu $a3, $zero, $zero
/* 185A20 80257140 0C00A6C9 */ jal clamp_angle
/* 185A24 80257144 4600A306 */ mov.s $f12, $f20
/* 185A28 80257148 24040001 */ addiu $a0, $zero, 0x1
/* 185A2C 8025714C 0220282D */ daddu $a1, $s1, $zero
/* 185A30 80257150 4600028D */ trunc.w.s $f10, $f0
/* 185A34 80257154 44065000 */ mfc1 $a2, $f10
/* 185A38 80257158 0C097332 */ jal func_8025CCC8
/* 185A3C 8025715C 0000382D */ daddu $a3, $zero, $zero
/* 185A40 80257160 0C00A6C9 */ jal clamp_angle
/* 185A44 80257164 4600A306 */ mov.s $f12, $f20
/* 185A48 80257168 24040001 */ addiu $a0, $zero, 0x1
/* 185A4C 8025716C 0220282D */ daddu $a1, $s1, $zero
/* 185A50 80257170 4600028D */ trunc.w.s $f10, $f0
/* 185A54 80257174 44065000 */ mfc1 $a2, $f10
/* 185A58 80257178 02A0382D */ daddu $a3, $s5, $zero
/* 185A5C 8025717C AFA00010 */ sw $zero, 0x10($sp)
.L80257180:
/* 185A60 80257180 0C09647B */ jal func_802591EC
/* 185A64 80257184 00000000 */ nop
/* 185A68 80257188 0C0973B2 */ jal func_8025CEC8
/* 185A6C 8025718C 0220202D */ daddu $a0, $s1, $zero
.L80257190:
/* 185A70 80257190 8E31000C */ lw $s1, 0xC($s1)
/* 185A74 80257194 8FA80360 */ lw $t0, 0x360($sp)
/* 185A78 80257198 26F70001 */ addiu $s7, $s7, 0x1
/* 185A7C 8025719C 02E8102A */ slt $v0, $s7, $t0
/* 185A80 802571A0 1440FD74 */ bnez $v0, .L80256774
/* 185A84 802571A4 00000000 */ nop
.L802571A8:
/* 185A88 802571A8 8FBF039C */ lw $ra, 0x39C($sp)
/* 185A8C 802571AC 8FBE0398 */ lw $fp, 0x398($sp)
/* 185A90 802571B0 8FB70394 */ lw $s7, 0x394($sp)
/* 185A94 802571B4 8FB60390 */ lw $s6, 0x390($sp)
/* 185A98 802571B8 8FB5038C */ lw $s5, 0x38C($sp)
/* 185A9C 802571BC 8FB40388 */ lw $s4, 0x388($sp)
/* 185AA0 802571C0 8FB30384 */ lw $s3, 0x384($sp)
/* 185AA4 802571C4 8FB20380 */ lw $s2, 0x380($sp)
/* 185AA8 802571C8 8FB1037C */ lw $s1, 0x37C($sp)
/* 185AAC 802571CC 8FB00378 */ lw $s0, 0x378($sp)
/* 185AB0 802571D0 D7BE03C8 */ ldc1 $f30, 0x3C8($sp)
/* 185AB4 802571D4 D7BC03C0 */ ldc1 $f28, 0x3C0($sp)
/* 185AB8 802571D8 D7BA03B8 */ ldc1 $f26, 0x3B8($sp)
/* 185ABC 802571DC D7B803B0 */ ldc1 $f24, 0x3B0($sp)
D_802571E0:
/* 185AC0 802571E0 D7B603A8 */ ldc1 $f22, 0x3A8($sp)
/* 185AC4 802571E4 D7B403A0 */ ldc1 $f20, 0x3A0($sp)
/* 185AC8 802571E8 03E00008 */ jr $ra
/* 185ACC 802571EC 27BD03D0 */ addiu $sp, $sp, 0x3D0
### DECOMPILED C INSTRUCTIONS:
void appendGfx_npc_actor(s32 isPartner, s32 actorIndex) {
BattleStatus* battleStatus = &gBattleStatus;
Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation;
Matrix4f mtxScale, mtxScaleMod;
Matrix4f mtxPivotOn, mtxPivotOff, mtxTranslate;
Matrix4f mtxTemp, mtxActor, mtxTransform, mtxPartScale;
Actor* actor;
ActorPart* part;
EffectInstance* effect;
s32 numParts;
f32 actorPosX, actorPosY, actorPosZ;
f32 partPosX, partPosY, partPosZ, partYaw;
u32 lastAnim;
s32 animChanged;
s32 palChanged;
s32 decorChanged;
s32 i;
if (!isPartner) {
actor = battleStatus->enemyActors[actorIndex];
} else {
actor = battleStatus->partnerActor;
}
actorPosX = actor->currentPos.x + actor->headOffset.x;
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
actorPosY = actor->currentPos.y + actor->headOffset.y + actor->verticalRenderOffset;
} else {
actorPosY = actor->currentPos.y - actor->headOffset.y + actor->verticalRenderOffset;
}
actorPosZ = actor->currentPos.z + actor->headOffset.z;
actor->disableEffect->data.disableX->pos.x = actorPosX +
(actor->actorBlueprint->statusIconOffset.x + actor->statusIconOffset.x) * actor->scalingFactor;
actor->disableEffect->data.disableX->pos.y = actorPosY +
(actor->actorBlueprint->statusIconOffset.y + actor->statusIconOffset.y) * actor->scalingFactor;
actor->disableEffect->data.disableX->pos.z = actorPosZ;
if (!(gBattleStatus.flags1 & ACTOR_PART_FLAG_4) && (actor->flags & ACTOR_FLAG_8000000)) {
if (actor->disableDismissTimer != 0) {
actor->disableDismissTimer--;
actor->disableEffect->data.disableX->pos.y = NPC_DISPOSE_POS_Y;
} else {
actor->disableEffect->data.disableX->scale = (actor->scalingFactor * 0.75);
}
} else {
actor->disableEffect->data.disableX->pos.y = NPC_DISPOSE_POS_Y;
actor->disableDismissTimer = 10;
}
if (actor->debuff == STATUS_KEY_FROZEN) {
effect = actor->icePillarEffect;
if (actor->icePillarEffect != NULL) {
if ((gBattleStatus.flags1 & BS_FLAGS1_SHOW_PLAYER_DECORATIONS) ||
(!(gBattleStatus.flags1 & BS_FLAGS1_TATTLE_OPEN) && (actor->flags & ACTOR_FLAG_8000000)))
{
effect->data.icePillar->pos.x = actorPosX;
effect->data.icePillar->pos.y = actorPosY;
effect->data.icePillar->pos.z = actorPosZ;
effect->data.icePillar->scale = actor->size.y / 24.0;
} else {
effect->data.icePillar->pos.x = NPC_DISPOSE_POS_X;
effect->data.icePillar->pos.y = NPC_DISPOSE_POS_Y;
effect->data.icePillar->pos.z = NPC_DISPOSE_POS_Z;
}
}
} else {
effect = actor->icePillarEffect;
if (effect != NULL) {
effect->flags |= FX_INSTANCE_FLAG_DISMISS;
actor->icePillarEffect = NULL;
}
}
set_status_icons_properties(actor->hudElementDataIndex, actorPosX, actorPosY, actorPosZ,
(actor->actorBlueprint->statusIconOffset.x + actor->statusIconOffset.x) * actor->scalingFactor,
(actor->actorBlueprint->statusIconOffset.y + actor->statusIconOffset.y) * actor->scalingFactor,
(actor->actorBlueprint->statusTextOffset.x + actor->statusTextOffset.x) * actor->scalingFactor,
(actor->actorBlueprint->statusTextOffset.y + actor->statusTextOffset.y) * actor->scalingFactor);
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
set_status_icons_offset(actor->hudElementDataIndex,
actor->size.y * actor->scalingFactor,
actor->size.x * actor->scalingFactor);
} else {
set_status_icons_offset(actor->hudElementDataIndex,
-actor->size.y * actor->scalingFactor,
actor->size.x * actor->scalingFactor);
}
do {
if (actor->debuff == STATUS_KEY_SHRINK) {
actor->scalingFactor += ((0.4 - actor->scalingFactor) / 6.0);
} else {
actor->scalingFactor += ((1.0 - actor->scalingFactor) / 6.0);
}
} while (0); // required to match
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
guTranslateF(mtxPivotOn,
-actor->rotationPivotOffset.x * actor->scalingFactor,
-actor->rotationPivotOffset.y * actor->scalingFactor,
-actor->rotationPivotOffset.z * actor->scalingFactor);
guTranslateF(mtxPivotOff,
actor->rotationPivotOffset.x * actor->scalingFactor,
actor->rotationPivotOffset.y * actor->scalingFactor,
actor->rotationPivotOffset.z * actor->scalingFactor);
} else {
guTranslateF(mtxPivotOn,
-actor->rotationPivotOffset.x * actor->scalingFactor,
actor->rotationPivotOffset.y * actor->scalingFactor,
-actor->rotationPivotOffset.z * actor->scalingFactor);
guTranslateF(mtxPivotOff,
actor->rotationPivotOffset.x * actor->scalingFactor,
-actor->rotationPivotOffset.y * actor->scalingFactor,
actor->rotationPivotOffset.z * actor->scalingFactor);
}
guRotateF(mtxRotX, actor->rotation.x, 1.0f, 0.0f, 0.0f);
guRotateF(mtxRotY, actor->rotation.y, 0.0f, 1.0f, 0.0f);
guRotateF(mtxRotZ, actor->rotation.z, 0.0f, 0.0f, 1.0f);
guMtxCatF(mtxRotY, mtxRotX, mtxTemp);
guMtxCatF(mtxTemp, mtxRotZ, mtxRotation);
guScaleF(mtxScale,
actor->scale.x * SPRITE_WORLD_SCALE_D * actor->scalingFactor,
actor->scale.y * SPRITE_WORLD_SCALE_D * actor->scalingFactor,
actor->scale.z * SPRITE_WORLD_SCALE_D);
guScaleF(mtxScaleMod, actor->scaleModifier.x, actor->scaleModifier.y, actor->scaleModifier.z);
guMtxCatF(mtxPivotOn, mtxScale, mtxTemp);
guMtxCatF(mtxTemp, mtxScaleMod, mtxScale);
guMtxCatF(mtxScale, mtxRotation, mtxTransform);
guMtxCatF(mtxTransform, mtxPivotOff, mtxActor);
part = actor->partsTable;
numParts = actor->numParts;
for (i = 0; i < numParts; i++) {
if (!(part->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
partPosX = actorPosX + part->partOffset.x + part->visualOffset.x;
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
partPosY = actorPosY + part->partOffset.y + part->visualOffset.y;
} else {
partPosY = (actorPosY - part->partOffset.y) - part->visualOffset.y;
}
partPosZ = actorPosZ + part->partOffset.z + part->visualOffset.z;
partYaw = part->yaw = actor->yaw;
} else {
partPosX = part->absolutePosition.x + part->visualOffset.x;
partPosY = part->absolutePosition.y + part->visualOffset.y;
partPosZ = part->absolutePosition.z + part->visualOffset.z;
guScaleF(mtxPartScale,
actor->scale.x * SPRITE_WORLD_SCALE_D,
actor->scale.y * SPRITE_WORLD_SCALE_D,
actor->scale.z * SPRITE_WORLD_SCALE_D);
partYaw = part->yaw;
}
part->currentPos.x = partPosX;
part->currentPos.y = partPosY;
part->currentPos.z = partPosZ;
if (part->flags & ACTOR_PART_FLAG_INVISIBLE) {
part = part->nextPart;
continue;
}
if (part->idleAnimations == NULL) {
part = part->nextPart;
continue;
}
if (actor->transparentStatus == STATUS_KEY_TRANSPARENT) {
part->flags |= ACTOR_PART_FLAG_100;
} else {
part->flags &= ~ACTOR_PART_FLAG_100;
}
do {
lastAnim = part->currentAnimation;
animChanged = FALSE;
palChanged = FALSE;
decorChanged = FALSE;
} while (0); // required to match
if (isPartner) {
if ((gBattleStatus.flags2 & (BS_FLAGS2_10 | BS_FLAGS2_4)) == BS_FLAGS2_4) {
do {
if (actor->koStatus == 0) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_INACTIVE);
spr_update_sprite(part->spriteInstanceID, part->currentAnimation, part->animationRate);
animChanged = TRUE;
}
} while (0); // required to match
set_actor_pal_adjustment(actor, PAL_ADJUST_PLAYER_DEBUFF);
palChanged = TRUE;
func_80266EE8(actor, UNK_PAL_EFFECT_0);
decorChanged = TRUE;
}
if (isPartner && (gPlayerData.currentPartner == PARTNER_WATT)) {
if (!palChanged) {
set_actor_pal_adjustment(actor, PAL_ADJUST_WATT_IDLE);
}
palChanged = TRUE;
}
}
if (actor->isGlowing) {
if (!decorChanged) {
func_80266EE8(actor, UNK_PAL_EFFECT_11);
}
decorChanged = TRUE;
}
if (actor->debuff == STATUS_KEY_POISON) {
if (!palChanged) {
set_actor_pal_adjustment(actor, PAL_ADJUST_POISON);
}
palChanged = TRUE;
}
if (actor->debuff == STATUS_KEY_PARALYZE) {
if (!palChanged) {
set_actor_pal_adjustment(actor, PAL_ADJUST_PARALYZE);
}
palChanged = TRUE;
}
if (actor->debuff == STATUS_KEY_FEAR) {
if (!palChanged) {
set_actor_pal_adjustment(actor, PAL_ADJUST_FEAR);
}
palChanged = TRUE;
}
if (actor->staticStatus == STATUS_KEY_STATIC) {
if (!palChanged) {
set_actor_pal_adjustment(actor, PAL_ADJUST_STATIC);
}
palChanged = TRUE;
}
if ((!palChanged) && !(part->flags & ACTOR_PART_FLAG_1000000)) {
set_actor_pal_adjustment(actor, PAL_ADJUST_NONE);
}
if ((!decorChanged) && !(part->flags & ACTOR_PART_FLAG_1000000)) {
func_80266EE8(actor, UNK_PAL_EFFECT_0);
}
if (actor->flags & ACTOR_FLAG_4000000) {
if (!(part->flags & ACTOR_PART_FLAG_20000000)) {
if (actor->debuff == STATUS_KEY_FROZEN) {
if (!animChanged) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_FROZEN);
animChanged = TRUE;
}
} else if (actor->debuff != STATUS_KEY_SHRINK) {
if (actor->debuff == STATUS_KEY_POISON) {
if (!animChanged) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_POISON);
animChanged = TRUE;
}
} else if (actor->debuff == STATUS_KEY_DIZZY) {
if (!animChanged) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_DIZZY);
animChanged = TRUE;
}
} else if (actor->debuff == STATUS_KEY_FEAR) {
if (!animChanged) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_FEAR);
animChanged = TRUE;
}
} else if (actor->debuff == STATUS_KEY_SLEEP) {
if (!animChanged) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_SLEEP);
animChanged = TRUE;
}
} else if (actor->debuff == STATUS_KEY_PARALYZE) {
if (!animChanged) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_PARALYZE);
animChanged = TRUE;
}
}
}
if (actor->staticStatus == STATUS_KEY_STATIC) {
if (!animChanged) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_STATIC);
animChanged = TRUE;
}
do {} while (0); // required to match
}
if (!animChanged) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, 1);
}
if (isPartner) {
if (actor->koStatus == STATUS_KEY_DAZE) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_DAZE);
animChanged = TRUE;
} else {
s32 temp = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_NORMAL);
do {
if (temp == get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_DAZE)) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_NORMAL);
}
} while (0); // required to match
}
}
if (actor->debuff == STATUS_KEY_STOP) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_STOP);
create_status_debuff(actor->hudElementDataIndex, STATUS_KEY_STOP);
} else if (!animChanged) {
s32 temp = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_NORMAL);
do {
if (temp == get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_STOP)) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, STATUS_KEY_NORMAL);
}
} while (0); // required to match
}
}
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_TATTLE_OPEN) && (actor->flags & ACTOR_FLAG_8000000)) {
do {
if (actor->debuff == STATUS_KEY_POISON) {
create_status_debuff(actor->hudElementDataIndex, STATUS_KEY_POISON);
} else if (actor->debuff == STATUS_KEY_DIZZY) {
create_status_debuff(actor->hudElementDataIndex, STATUS_KEY_DIZZY);
} else if (actor->debuff == STATUS_KEY_SLEEP) {
create_status_debuff(actor->hudElementDataIndex, STATUS_KEY_SLEEP);
} else if (actor->debuff == STATUS_KEY_PARALYZE) {
create_status_debuff(actor->hudElementDataIndex, STATUS_KEY_PARALYZE);
} else if (actor->debuff == STATUS_KEY_SHRINK) {
create_status_debuff(actor->hudElementDataIndex, STATUS_KEY_SHRINK);
} else if (actor->debuff == STATUS_KEY_FROZEN) {
create_status_debuff(actor->hudElementDataIndex, STATUS_KEY_FROZEN);
}
} while (0); // required to match
if (actor->staticStatus == STATUS_KEY_STATIC) {
create_status_static(actor->hudElementDataIndex, STATUS_KEY_STATIC);
}
if ((actor->transparentStatus == STATUS_KEY_TRANSPARENT) || (part->flags & ACTOR_PART_FLAG_100)) {
create_status_transparent(actor->hudElementDataIndex, STATUS_KEY_TRANSPARENT);
}
if (actor->chillOutAmount != 0) {
create_status_chill_out(actor->hudElementDataIndex);
}
} else {
enable_status_debuff(actor->hudElementDataIndex);
enable_status_2(actor->hudElementDataIndex);
enable_status_transparent(actor->hudElementDataIndex);
enable_status_chill_out(actor->hudElementDataIndex);
}
if (part->spriteInstanceID >= 0) {
if (lastAnim != part->currentAnimation) {
spr_update_sprite(part->spriteInstanceID, part->currentAnimation, part->animationRate);
part->animNotifyValue = spr_get_notify_value(part->spriteInstanceID);
}
}
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
guTranslateF(mtxPivotOn,
-part->rotationPivotOffset.x * actor->scalingFactor,
-part->rotationPivotOffset.y * actor->scalingFactor,
-part->rotationPivotOffset.z * actor->scalingFactor);
guTranslateF(mtxPivotOff,
part->rotationPivotOffset.x * actor->scalingFactor,
part->rotationPivotOffset.y * actor->scalingFactor,
part->rotationPivotOffset.z * actor->scalingFactor);
} else {
guTranslateF(mtxPivotOn,
-part->rotationPivotOffset.x * actor->scalingFactor,
part->rotationPivotOffset.y * actor->scalingFactor,
-part->rotationPivotOffset.z * actor->scalingFactor);
guTranslateF(mtxPivotOff,
part->rotationPivotOffset.x * actor->scalingFactor,
-part->rotationPivotOffset.y * actor->scalingFactor,
part->rotationPivotOffset.z * actor->scalingFactor);
}
guTranslateF(mtxTranslate,
partPosX + part->palAnimPosOffset[0],
partPosY + part->palAnimPosOffset[1],
partPosZ);
guRotateF(mtxRotX, part->rotation.x, 1.0f, 0.0f, 0.0f);
guRotateF(mtxRotY, part->rotation.y, 0.0f, 1.0f, 0.0f);
guRotateF(mtxRotZ, part->rotation.z, 0.0f, 0.0f, 1.0f);
guMtxCatF(mtxRotY, mtxRotX, mtxTemp);
guMtxCatF(mtxTemp, mtxRotZ, mtxRotation);
guScaleF(mtxScale, part->scale.x, part->scale.y * part->verticalStretch, part->scale.z);
guMtxCatF(mtxScale, mtxPivotOn, mtxTransform);
guMtxCatF(mtxTransform, mtxRotation, mtxTemp);
guMtxCatF(mtxTemp, mtxPivotOff, mtxTransform);
if (!(part->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
guMtxCatF(mtxTransform, mtxActor, mtxTemp);
} else {
guMtxCatF(mtxTransform, mtxPartScale, mtxTemp);
}
guMtxCatF(mtxTemp, mtxTranslate, mtxTransform);
part->currentPos.x = partPosX + part->palAnimPosOffset[0];
part->currentPos.y = partPosY + part->palAnimPosOffset[1];
part->currentPos.z = partPosZ;
if (part->spriteInstanceID >= 0) {
if (!isPartner) {
func_8025C840(1, part, partYaw, 0);
func_8025CCC8(1, part, partYaw, 0);
render_with_adjusted_palettes(SPRITE_MODE_NPC, part, partYaw, mtxTransform, 0);
} else {
func_8025C840(1, part, clamp_angle(180.0f - partYaw), 0);
func_8025CCC8(1, part, clamp_angle(180.0f - partYaw), 0);
render_with_adjusted_palettes(SPRITE_MODE_NPC, part, clamp_angle(180.0f - partYaw), mtxTransform, 0);
}
_add_part_decoration(part);
}
part = part->nextPart;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel appendGfx_background_texture
/* DC5C0 80145EC0 27BDFF48 */ addiu $sp, $sp, -0xB8
/* DC5C4 80145EC4 AFB00080 */ sw $s0, 0x80($sp)
/* DC5C8 80145EC8 0000802D */ daddu $s0, $zero, $zero
/* DC5CC 80145ECC 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* DC5D0 80145ED0 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* DC5D4 80145ED4 3C04800B */ lui $a0, %hi(gCameras)
/* DC5D8 80145ED8 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* DC5DC 80145EDC AFBF00A4 */ sw $ra, 0xA4($sp)
/* DC5E0 80145EE0 AFBE00A0 */ sw $fp, 0xA0($sp)
/* DC5E4 80145EE4 AFB7009C */ sw $s7, 0x9C($sp)
/* DC5E8 80145EE8 AFB60098 */ sw $s6, 0x98($sp)
/* DC5EC 80145EEC AFB50094 */ sw $s5, 0x94($sp)
/* DC5F0 80145EF0 AFB40090 */ sw $s4, 0x90($sp)
/* DC5F4 80145EF4 AFB3008C */ sw $s3, 0x8C($sp)
/* DC5F8 80145EF8 AFB20088 */ sw $s2, 0x88($sp)
/* DC5FC 80145EFC AFB10084 */ sw $s1, 0x84($sp)
/* DC600 80145F00 F7B600B0 */ sdc1 $f22, 0xB0($sp)
/* DC604 80145F04 F7B400A8 */ sdc1 $f20, 0xA8($sp)
/* DC608 80145F08 00031080 */ sll $v0, $v1, 2
/* DC60C 80145F0C 00431021 */ addu $v0, $v0, $v1
/* DC610 80145F10 00021080 */ sll $v0, $v0, 2
/* DC614 80145F14 00431023 */ subu $v0, $v0, $v1
/* DC618 80145F18 000218C0 */ sll $v1, $v0, 3
/* DC61C 80145F1C 00431021 */ addu $v0, $v0, $v1
/* DC620 80145F20 000210C0 */ sll $v0, $v0, 3
/* DC624 80145F24 0C046EE9 */ jal is_world_fog_enabled
/* DC628 80145F28 0044A821 */ addu $s5, $v0, $a0
/* DC62C 80145F2C 1040000A */ beqz $v0, .L80145F58
/* DC630 80145F30 27A40018 */ addiu $a0, $sp, 0x18
/* DC634 80145F34 27A5001C */ addiu $a1, $sp, 0x1C
/* DC638 80145F38 27A60020 */ addiu $a2, $sp, 0x20
/* DC63C 80145F3C 0C046EF6 */ jal get_world_fog_color
/* DC640 80145F40 27A70024 */ addiu $a3, $sp, 0x24
/* DC644 80145F44 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* DC648 80145F48 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* DC64C 80145F4C 9442015C */ lhu $v0, 0x15C($v0)
/* DC650 80145F50 24100001 */ addiu $s0, $zero, 0x1
/* DC654 80145F54 AFA20024 */ sw $v0, 0x24($sp)
.L80145F58:
/* DC658 80145F58 3C028015 */ lui $v0, %hi(gBackgroundFogModePtr)
/* DC65C 80145F5C 8C4212F0 */ lw $v0, %lo(gBackgroundFogModePtr)($v0)
/* DC660 80145F60 90420000 */ lbu $v0, 0x0($v0)
/* DC664 80145F64 0440000C */ bltz $v0, .L80145F98
/* DC668 80145F68 28420002 */ slti $v0, $v0, 0x2
/* DC66C 80145F6C 1040000A */ beqz $v0, .L80145F98
/* DC670 80145F70 27A40028 */ addiu $a0, $sp, 0x28
/* DC674 80145F74 27A50029 */ addiu $a1, $sp, 0x29
/* DC678 80145F78 27A6002A */ addiu $a2, $sp, 0x2A
/* DC67C 80145F7C 0C046FA0 */ jal get_background_color_blend
/* DC680 80145F80 27A7002B */ addiu $a3, $sp, 0x2B
/* DC684 80145F84 93A2002B */ lbu $v0, 0x2B($sp)
/* DC688 80145F88 54400020 */ bnel $v0, $zero, .L8014600C
/* DC68C 80145F8C 36100002 */ ori $s0, $s0, 0x2
/* DC690 80145F90 08051804 */ j .L80146010
/* DC694 80145F94 3203FFFF */ andi $v1, $s0, 0xFFFF
.L80145F98:
/* DC698 80145F98 27A40028 */ addiu $a0, $sp, 0x28
/* DC69C 80145F9C 27A50029 */ addiu $a1, $sp, 0x29
/* DC6A0 80145FA0 27A6002A */ addiu $a2, $sp, 0x2A
/* DC6A4 80145FA4 27A7002C */ addiu $a3, $sp, 0x2C
/* DC6A8 80145FA8 27A2002D */ addiu $v0, $sp, 0x2D
/* DC6AC 80145FAC AFA20010 */ sw $v0, 0x10($sp)
/* DC6B0 80145FB0 27A2002E */ addiu $v0, $sp, 0x2E
/* DC6B4 80145FB4 0C046FF5 */ jal get_model_env_color_parameters
/* DC6B8 80145FB8 AFA20014 */ sw $v0, 0x14($sp)
/* DC6BC 80145FBC 93A40028 */ lbu $a0, 0x28($sp)
/* DC6C0 80145FC0 240200FF */ addiu $v0, $zero, 0xFF
/* DC6C4 80145FC4 54820011 */ bnel $a0, $v0, .L8014600C
/* DC6C8 80145FC8 36100004 */ ori $s0, $s0, 0x4
/* DC6CC 80145FCC 93A30029 */ lbu $v1, 0x29($sp)
/* DC6D0 80145FD0 5464000E */ bnel $v1, $a0, .L8014600C
/* DC6D4 80145FD4 36100004 */ ori $s0, $s0, 0x4
/* DC6D8 80145FD8 93A2002A */ lbu $v0, 0x2A($sp)
/* DC6DC 80145FDC 5443000B */ bnel $v0, $v1, .L8014600C
/* DC6E0 80145FE0 36100004 */ ori $s0, $s0, 0x4
/* DC6E4 80145FE4 93A2002C */ lbu $v0, 0x2C($sp)
/* DC6E8 80145FE8 54400008 */ bnel $v0, $zero, .L8014600C
/* DC6EC 80145FEC 36100004 */ ori $s0, $s0, 0x4
/* DC6F0 80145FF0 93A2002D */ lbu $v0, 0x2D($sp)
/* DC6F4 80145FF4 54400005 */ bnel $v0, $zero, .L8014600C
/* DC6F8 80145FF8 36100004 */ ori $s0, $s0, 0x4
/* DC6FC 80145FFC 93A2002E */ lbu $v0, 0x2E($sp)
/* DC700 80146000 10400003 */ beqz $v0, .L80146010
/* DC704 80146004 3203FFFF */ andi $v1, $s0, 0xFFFF
/* DC708 80146008 36100004 */ ori $s0, $s0, 0x4
.L8014600C:
/* DC70C 8014600C 3203FFFF */ andi $v1, $s0, 0xFFFF
.L80146010:
/* DC710 80146010 2C620005 */ sltiu $v0, $v1, 0x5
/* DC714 80146014 10400067 */ beqz $v0, .L801461B4
/* DC718 80146018 00031080 */ sll $v0, $v1, 2
/* DC71C 8014601C 3C018015 */ lui $at, %hi(jtbl_80151220)
/* DC720 80146020 00220821 */ addu $at, $at, $v0
/* DC724 80146024 8C221220 */ lw $v0, %lo(jtbl_80151220)($at)
/* DC728 80146028 00400008 */ jr $v0
/* DC72C 8014602C 00000000 */ nop
glabel .L80146030
/* DC730 80146030 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* DC734 80146034 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* DC738 80146038 94620148 */ lhu $v0, 0x148($v1)
/* DC73C 8014603C 0805186C */ j .L801461B0
/* DC740 80146040 3042FFFD */ andi $v0, $v0, 0xFFFD
glabel .L80146044
/* DC744 80146044 3C078007 */ lui $a3, %hi(gGameStatusPtr)
/* DC748 80146048 8CE7419C */ lw $a3, %lo(gGameStatusPtr)($a3)
/* DC74C 8014604C 93A60028 */ lbu $a2, 0x28($sp)
/* DC750 80146050 93A30029 */ lbu $v1, 0x29($sp)
/* DC754 80146054 93A4002A */ lbu $a0, 0x2A($sp)
/* DC758 80146058 93A5002B */ lbu $a1, 0x2B($sp)
/* DC75C 8014605C 94E20148 */ lhu $v0, 0x148($a3)
/* DC760 80146060 AFA60018 */ sw $a2, 0x18($sp)
/* DC764 80146064 AFA3001C */ sw $v1, 0x1C($sp)
/* DC768 80146068 AFA40020 */ sw $a0, 0x20($sp)
/* DC76C 8014606C AFA50024 */ sw $a1, 0x24($sp)
/* DC770 80146070 34420002 */ ori $v0, $v0, 0x2
/* DC774 80146074 0805186D */ j .L801461B4
/* DC778 80146078 A4E20148 */ sh $v0, 0x148($a3)
glabel .L8014607C
/* DC77C 8014607C 240700FF */ addiu $a3, $zero, 0xFF
/* DC780 80146080 93A8002B */ lbu $t0, 0x2B($sp)
/* DC784 80146084 8FA20018 */ lw $v0, 0x18($sp)
/* DC788 80146088 00E83823 */ subu $a3, $a3, $t0
/* DC78C 8014608C 00470018 */ mult $v0, $a3
/* DC790 80146090 00001812 */ mflo $v1
/* DC794 80146094 93A20028 */ lbu $v0, 0x28($sp)
/* DC798 80146098 00000000 */ nop
/* DC79C 8014609C 00480018 */ mult $v0, $t0
/* DC7A0 801460A0 3C098080 */ lui $t1, (0x80808081 >> 16)
/* DC7A4 801460A4 00005012 */ mflo $t2
/* DC7A8 801460A8 35298081 */ ori $t1, $t1, (0x80808081 & 0xFFFF)
/* DC7AC 801460AC 006A3021 */ addu $a2, $v1, $t2
/* DC7B0 801460B0 00C90018 */ mult $a2, $t1
/* DC7B4 801460B4 00005810 */ mfhi $t3
/* DC7B8 801460B8 8FA2001C */ lw $v0, 0x1C($sp)
/* DC7BC 801460BC 00000000 */ nop
/* DC7C0 801460C0 00470018 */ mult $v0, $a3
/* DC7C4 801460C4 00002012 */ mflo $a0
/* DC7C8 801460C8 93A20029 */ lbu $v0, 0x29($sp)
/* DC7CC 801460CC 00000000 */ nop
/* DC7D0 801460D0 00480018 */ mult $v0, $t0
/* DC7D4 801460D4 00006012 */ mflo $t4
/* DC7D8 801460D8 8FA20020 */ lw $v0, 0x20($sp)
/* DC7DC 801460DC 00000000 */ nop
/* DC7E0 801460E0 00470018 */ mult $v0, $a3
/* DC7E4 801460E4 00005012 */ mflo $t2
/* DC7E8 801460E8 93A2002A */ lbu $v0, 0x2A($sp)
/* DC7EC 801460EC 00000000 */ nop
/* DC7F0 801460F0 00480018 */ mult $v0, $t0
/* DC7F4 801460F4 00002812 */ mflo $a1
/* DC7F8 801460F8 008C2021 */ addu $a0, $a0, $t4
/* DC7FC 801460FC 00000000 */ nop
/* DC800 80146100 00890018 */ mult $a0, $t1
/* DC804 80146104 00006010 */ mfhi $t4
/* DC808 80146108 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* DC80C 8014610C 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* DC810 80146110 01452821 */ addu $a1, $t2, $a1
/* DC814 80146114 00A90018 */ mult $a1, $t1
/* DC818 80146118 94620148 */ lhu $v0, 0x148($v1)
/* DC81C 8014611C 34420002 */ ori $v0, $v0, 0x2
/* DC820 80146120 A4620148 */ sh $v0, 0x148($v1)
/* DC824 80146124 00005010 */ mfhi $t2
/* DC828 80146128 8FA30024 */ lw $v1, 0x24($sp)
/* DC82C 8014612C 00000000 */ nop
/* DC830 80146130 00670018 */ mult $v1, $a3
/* DC834 80146134 01661021 */ addu $v0, $t3, $a2
/* DC838 80146138 000211C3 */ sra $v0, $v0, 7
/* DC83C 8014613C 000637C3 */ sra $a2, $a2, 31
/* DC840 80146140 00461023 */ subu $v0, $v0, $a2
/* DC844 80146144 00001812 */ mflo $v1
/* DC848 80146148 AFA20018 */ sw $v0, 0x18($sp)
/* DC84C 8014614C 01841021 */ addu $v0, $t4, $a0
/* DC850 80146150 01080018 */ mult $t0, $t0
/* DC854 80146154 000211C3 */ sra $v0, $v0, 7
/* DC858 80146158 000427C3 */ sra $a0, $a0, 31
/* DC85C 8014615C 00441023 */ subu $v0, $v0, $a0
/* DC860 80146160 AFA2001C */ sw $v0, 0x1C($sp)
/* DC864 80146164 00004012 */ mflo $t0
/* DC868 80146168 01451021 */ addu $v0, $t2, $a1
/* DC86C 8014616C 00681821 */ addu $v1, $v1, $t0
/* DC870 80146170 00690018 */ mult $v1, $t1
/* DC874 80146174 000211C3 */ sra $v0, $v0, 7
/* DC878 80146178 00052FC3 */ sra $a1, $a1, 31
/* DC87C 8014617C 00451023 */ subu $v0, $v0, $a1
/* DC880 80146180 AFA20020 */ sw $v0, 0x20($sp)
/* DC884 80146184 00004010 */ mfhi $t0
/* DC888 80146188 01031021 */ addu $v0, $t0, $v1
/* DC88C 8014618C 000211C3 */ sra $v0, $v0, 7
/* DC890 80146190 00031FC3 */ sra $v1, $v1, 31
/* DC894 80146194 00431023 */ subu $v0, $v0, $v1
/* DC898 80146198 0805186D */ j .L801461B4
/* DC89C 8014619C AFA20024 */ sw $v0, 0x24($sp)
glabel .L801461A0
/* DC8A0 801461A0 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* DC8A4 801461A4 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* DC8A8 801461A8 94620148 */ lhu $v0, 0x148($v1)
/* DC8AC 801461AC 34420002 */ ori $v0, $v0, 0x2
.L801461B0:
/* DC8B0 801461B0 A4620148 */ sh $v0, 0x148($v1)
.L801461B4:
/* DC8B4 801461B4 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* DC8B8 801461B8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* DC8BC 801461BC 94420148 */ lhu $v0, 0x148($v0)
/* DC8C0 801461C0 30420002 */ andi $v0, $v0, 0x2
/* DC8C4 801461C4 10400077 */ beqz $v0, .L801463A4
/* DC8C8 801461C8 00000000 */ nop
/* DC8CC 801461CC 3C028015 */ lui $v0, %hi(gBackgroundFogModePtr)
/* DC8D0 801461D0 8C4212F0 */ lw $v0, %lo(gBackgroundFogModePtr)($v0)
/* DC8D4 801461D4 90420000 */ lbu $v0, 0x0($v0)
/* DC8D8 801461D8 04400038 */ bltz $v0, .L801462BC
/* DC8DC 801461DC 28420002 */ slti $v0, $v0, 0x2
/* DC8E0 801461E0 10400036 */ beqz $v0, .L801462BC
/* DC8E4 801461E4 240200FF */ addiu $v0, $zero, 0xFF
/* DC8E8 801461E8 8FA30024 */ lw $v1, 0x24($sp)
/* DC8EC 801461EC 1462000B */ bne $v1, $v0, .L8014621C
/* DC8F0 801461F0 0000982D */ daddu $s3, $zero, $zero
/* DC8F4 801461F4 24030001 */ addiu $v1, $zero, 0x1
/* DC8F8 801461F8 0040982D */ daddu $s3, $v0, $zero
/* DC8FC 801461FC 3C028016 */ lui $v0, %hi(D_8015959E)
/* DC900 80146200 2442959E */ addiu $v0, $v0, %lo(D_8015959E)
.L80146204:
/* DC904 80146204 A4430000 */ sh $v1, 0x0($v0)
/* DC908 80146208 2673FFFF */ addiu $s3, $s3, -0x1
/* DC90C 8014620C 0661FFFD */ bgez $s3, .L80146204
/* DC910 80146210 2442FFFE */ addiu $v0, $v0, -0x2
/* DC914 80146214 080518E9 */ j .L801463A4
/* DC918 80146218 00000000 */ nop
.L8014621C:
/* DC91C 8014621C 3C148016 */ lui $s4, %hi(gBackgroundPalette)
/* DC920 80146220 269493A0 */ addiu $s4, $s4, %lo(gBackgroundPalette)
.L80146224:
/* DC924 80146224 00131840 */ sll $v1, $s3, 1
/* DC928 80146228 26730001 */ addiu $s3, $s3, 0x1
/* DC92C 8014622C 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* DC930 80146230 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* DC934 80146234 8FA60024 */ lw $a2, 0x24($sp)
/* DC938 80146238 8C420158 */ lw $v0, 0x158($v0)
/* DC93C 8014623C 8FA50020 */ lw $a1, 0x20($sp)
/* DC940 80146240 00621821 */ addu $v1, $v1, $v0
/* DC944 80146244 94700000 */ lhu $s0, 0x0($v1)
/* DC948 80146248 000528C3 */ sra $a1, $a1, 3
/* DC94C 8014624C 00102042 */ srl $a0, $s0, 1
/* DC950 80146250 0C0517A6 */ jal blend_background_channel
/* DC954 80146254 3084001F */ andi $a0, $a0, 0x1F
/* DC958 80146258 0040902D */ daddu $s2, $v0, $zero
/* DC95C 8014625C 00102182 */ srl $a0, $s0, 6
/* DC960 80146260 3084001F */ andi $a0, $a0, 0x1F
/* DC964 80146264 8FA5001C */ lw $a1, 0x1C($sp)
/* DC968 80146268 8FA60024 */ lw $a2, 0x24($sp)
/* DC96C 8014626C 0C0517A6 */ jal blend_background_channel
/* DC970 80146270 000528C3 */ sra $a1, $a1, 3
/* DC974 80146274 0040882D */ daddu $s1, $v0, $zero
/* DC978 80146278 001022C2 */ srl $a0, $s0, 11
/* DC97C 8014627C 8FA50018 */ lw $a1, 0x18($sp)
/* DC980 80146280 8FA60024 */ lw $a2, 0x24($sp)
/* DC984 80146284 0C0517A6 */ jal blend_background_channel
/* DC988 80146288 000528C3 */ sra $a1, $a1, 3
/* DC98C 8014628C 00121840 */ sll $v1, $s2, 1
/* DC990 80146290 00112180 */ sll $a0, $s1, 6
/* DC994 80146294 00641825 */ or $v1, $v1, $a0
/* DC998 80146298 000212C0 */ sll $v0, $v0, 11
/* DC99C 8014629C 00621825 */ or $v1, $v1, $v0
/* DC9A0 801462A0 34630001 */ ori $v1, $v1, 0x1
/* DC9A4 801462A4 A6830000 */ sh $v1, 0x0($s4)
/* DC9A8 801462A8 2A620100 */ slti $v0, $s3, 0x100
/* DC9AC 801462AC 1440FFDD */ bnez $v0, .L80146224
/* DC9B0 801462B0 26940002 */ addiu $s4, $s4, 0x2
/* DC9B4 801462B4 080518E9 */ j .L801463A4
/* DC9B8 801462B8 00000000 */ nop
.L801462BC:
/* DC9BC 801462BC 0000982D */ daddu $s3, $zero, $zero
/* DC9C0 801462C0 3C058016 */ lui $a1, %hi(gBackgroundPalette)
/* DC9C4 801462C4 24A593A0 */ addiu $a1, $a1, %lo(gBackgroundPalette)
/* DC9C8 801462C8 3C0C8007 */ lui $t4, %hi(gGameStatusPtr)
/* DC9CC 801462CC 8D8C419C */ lw $t4, %lo(gGameStatusPtr)($t4)
/* DC9D0 801462D0 93AB002A */ lbu $t3, 0x2A($sp)
/* DC9D4 801462D4 93AA0029 */ lbu $t2, 0x29($sp)
/* DC9D8 801462D8 93A2002E */ lbu $v0, 0x2E($sp)
/* DC9DC 801462DC 93A90028 */ lbu $t1, 0x28($sp)
/* DC9E0 801462E0 93A3002C */ lbu $v1, 0x2C($sp)
/* DC9E4 801462E4 000240C2 */ srl $t0, $v0, 3
/* DC9E8 801462E8 93A2002D */ lbu $v0, 0x2D($sp)
/* DC9EC 801462EC 000330C2 */ srl $a2, $v1, 3
/* DC9F0 801462F0 000238C2 */ srl $a3, $v0, 3
.L801462F4:
/* DC9F4 801462F4 8D830158 */ lw $v1, 0x158($t4)
/* DC9F8 801462F8 00131040 */ sll $v0, $s3, 1
/* DC9FC 801462FC 00431021 */ addu $v0, $v0, $v1
/* DCA00 80146300 94430000 */ lhu $v1, 0x0($v0)
/* DCA04 80146304 00031042 */ srl $v0, $v1, 1
/* DCA08 80146308 3042001F */ andi $v0, $v0, 0x1F
/* DCA0C 8014630C 004B0018 */ mult $v0, $t3
/* DCA10 80146310 00002012 */ mflo $a0
/* DCA14 80146314 00031182 */ srl $v0, $v1, 6
/* DCA18 80146318 3042001F */ andi $v0, $v0, 0x1F
/* DCA1C 8014631C 004A0018 */ mult $v0, $t2
/* DCA20 80146320 00006812 */ mflo $t5
/* DCA24 80146324 00031AC2 */ srl $v1, $v1, 11
/* DCA28 80146328 00000000 */ nop
/* DCA2C 8014632C 00690018 */ mult $v1, $t1
/* DCA30 80146330 00041203 */ sra $v0, $a0, 8
/* DCA34 80146334 01029021 */ addu $s2, $t0, $v0
/* DCA38 80146338 000D1203 */ sra $v0, $t5, 8
/* DCA3C 8014633C 00E28821 */ addu $s1, $a3, $v0
/* DCA40 80146340 00001812 */ mflo $v1
/* DCA44 80146344 00031203 */ sra $v0, $v1, 8
/* DCA48 80146348 00C22021 */ addu $a0, $a2, $v0
/* DCA4C 8014634C 2E420020 */ sltiu $v0, $s2, 0x20
/* DCA50 80146350 50400001 */ beql $v0, $zero, .L80146358
/* DCA54 80146354 2412001F */ addiu $s2, $zero, 0x1F
.L80146358:
/* DCA58 80146358 3222FFFF */ andi $v0, $s1, 0xFFFF
/* DCA5C 8014635C 2C420020 */ sltiu $v0, $v0, 0x20
/* DCA60 80146360 50400001 */ beql $v0, $zero, .L80146368
/* DCA64 80146364 2411001F */ addiu $s1, $zero, 0x1F
.L80146368:
/* DCA68 80146368 3082FFFF */ andi $v0, $a0, 0xFFFF
/* DCA6C 8014636C 2C420020 */ sltiu $v0, $v0, 0x20
/* DCA70 80146370 50400001 */ beql $v0, $zero, .L80146378
/* DCA74 80146374 2404001F */ addiu $a0, $zero, 0x1F
.L80146378:
/* DCA78 80146378 00121040 */ sll $v0, $s2, 1
/* DCA7C 8014637C 00111980 */ sll $v1, $s1, 6
/* DCA80 80146380 00431025 */ or $v0, $v0, $v1
/* DCA84 80146384 00041AC0 */ sll $v1, $a0, 11
/* DCA88 80146388 00431025 */ or $v0, $v0, $v1
/* DCA8C 8014638C 34420001 */ ori $v0, $v0, 0x1
/* DCA90 80146390 A4A20000 */ sh $v0, 0x0($a1)
/* DCA94 80146394 26730001 */ addiu $s3, $s3, 0x1
/* DCA98 80146398 2A620100 */ slti $v0, $s3, 0x100
/* DCA9C 8014639C 1440FFD5 */ bnez $v0, .L801462F4
/* DCAA0 801463A0 24A50002 */ addiu $a1, $a1, 0x2
.L801463A4:
/* DCAA4 801463A4 C6AC0084 */ lwc1 $f12, 0x84($s5)
/* DCAA8 801463A8 0C00A6C9 */ jal clamp_angle
/* DCAAC 801463AC 46006307 */ neg.s $f12, $f12
/* DCAB0 801463B0 46000586 */ mov.s $f22, $f0
/* DCAB4 801463B4 0C00A8BB */ jal sin_deg
/* DCAB8 801463B8 4600B306 */ mov.s $f12, $f22
/* DCABC 801463BC 4600B306 */ mov.s $f12, $f22
/* DCAC0 801463C0 0C00A8D4 */ jal cos_deg
/* DCAC4 801463C4 46000506 */ mov.s $f20, $f0
/* DCAC8 801463C8 C6A20048 */ lwc1 $f2, 0x48($s5)
/* DCACC 801463CC 46020002 */ mul.s $f0, $f0, $f2
/* DCAD0 801463D0 00000000 */ nop
/* DCAD4 801463D4 C6A20050 */ lwc1 $f2, 0x50($s5)
/* DCAD8 801463D8 4602A502 */ mul.s $f20, $f20, $f2
/* DCADC 801463DC 00000000 */ nop
/* DCAE0 801463E0 46140001 */ sub.s $f0, $f0, $f20
/* DCAE4 801463E4 C6A2050C */ lwc1 $f2, 0x50C($s5)
/* DCAE8 801463E8 46020000 */ add.s $f0, $f0, $f2
/* DCAEC 801463EC 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* DCAF0 801463F0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* DCAF4 801463F4 3C013E80 */ lui $at, (0x3E800000 >> 16)
/* DCAF8 801463F8 44811000 */ mtc1 $at, $f2
/* DCAFC 801463FC 46000007 */ neg.s $f0, $f0
/* DCB00 80146400 46020102 */ mul.s $f4, $f0, $f2
/* DCB04 80146404 00000000 */ nop
/* DCB08 80146408 8442014E */ lh $v0, 0x14E($v0)
/* DCB0C 8014640C 44820000 */ mtc1 $v0, $f0
/* DCB10 80146410 00000000 */ nop
/* DCB14 80146414 46800020 */ cvt.s.w $f0, $f0
/* DCB18 80146418 46160002 */ mul.s $f0, $f0, $f22
/* DCB1C 8014641C 00000000 */ nop
/* DCB20 80146420 3C013C36 */ lui $at, (0x3C360B61 >> 16)
/* DCB24 80146424 34210B61 */ ori $at, $at, (0x3C360B61 & 0xFFFF)
/* DCB28 80146428 44811000 */ mtc1 $at, $f2
/* DCB2C 8014642C 00000000 */ nop
/* DCB30 80146430 46020002 */ mul.s $f0, $f0, $f2
/* DCB34 80146434 00000000 */ nop
/* DCB38 80146438 3C028016 */ lui $v0, %hi(gBackroundLastScrollValue)
/* DCB3C 8014643C 244295A0 */ addiu $v0, $v0, %lo(gBackroundLastScrollValue)
/* DCB40 80146440 46002100 */ add.s $f4, $f4, $f0
/* DCB44 80146444 C4460000 */ lwc1 $f6, 0x0($v0)
/* DCB48 80146448 46062001 */ sub.s $f0, $f4, $f6
/* DCB4C 8014644C 3C013E99 */ lui $at, (0x3E99999A >> 16)
/* DCB50 80146450 3421999A */ ori $at, $at, (0x3E99999A & 0xFFFF)
/* DCB54 80146454 44811000 */ mtc1 $at, $f2
/* DCB58 80146458 46000005 */ abs.s $f0, $f0
/* DCB5C 8014645C 4602003C */ c.lt.s $f0, $f2
/* DCB60 80146460 00000000 */ nop
/* DCB64 80146464 45020002 */ bc1fl .L80146470
/* DCB68 80146468 E4440000 */ swc1 $f4, 0x0($v0)
/* DCB6C 8014646C 46003106 */ mov.s $f4, $f6
.L80146470:
/* DCB70 80146470 44801000 */ mtc1 $zero, $f2
/* DCB74 80146474 00000000 */ nop
/* DCB78 80146478 4602203C */ c.lt.s $f4, $f2
/* DCB7C 8014647C 00000000 */ nop
/* DCB80 80146480 4500000D */ bc1f .L801464B8
/* DCB84 80146484 00000000 */ nop
/* DCB88 80146488 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* DCB8C 8014648C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* DCB90 80146490 8442014E */ lh $v0, 0x14E($v0)
/* DCB94 80146494 00021140 */ sll $v0, $v0, 5
/* DCB98 80146498 44820000 */ mtc1 $v0, $f0
/* DCB9C 8014649C 00000000 */ nop
/* DCBA0 801464A0 46800020 */ cvt.s.w $f0, $f0
/* DCBA4 801464A4 46002100 */ add.s $f4, $f4, $f0
.L801464A8:
/* DCBA8 801464A8 4602203C */ c.lt.s $f4, $f2
/* DCBAC 801464AC 00000000 */ nop
/* DCBB0 801464B0 4503FFFD */ bc1tl .L801464A8
/* DCBB4 801464B4 46002100 */ add.s $f4, $f4, $f0
.L801464B8:
/* DCBB8 801464B8 3C0E8007 */ lui $t6, %hi(gGameStatusPtr)
/* DCBBC 801464BC 8DCE419C */ lw $t6, %lo(gGameStatusPtr)($t6)
/* DCBC0 801464C0 4600220D */ trunc.w.s $f8, $f4
/* DCBC4 801464C4 44024000 */ mfc1 $v0, $f8
/* DCBC8 801464C8 85C3014E */ lh $v1, 0x14E($t6)
/* DCBCC 801464CC 3C05E300 */ lui $a1, (0xE3000A01 >> 16)
/* DCBD0 801464D0 14600002 */ bnez $v1, .L801464DC
/* DCBD4 801464D4 0043001A */ div $zero, $v0, $v1
/* DCBD8 801464D8 0007000D */ break 7
.L801464DC:
/* DCBDC 801464DC 2401FFFF */ addiu $at, $zero, -0x1
/* DCBE0 801464E0 14610004 */ bne $v1, $at, .L801464F4
/* DCBE4 801464E4 3C018000 */ lui $at, (0x80000000 >> 16)
/* DCBE8 801464E8 14410002 */ bne $v0, $at, .L801464F4
/* DCBEC 801464EC 00000000 */ nop
/* DCBF0 801464F0 0006000D */ break 6
.L801464F4:
/* DCBF4 801464F4 00001810 */ mfhi $v1
/* DCBF8 801464F8 34A50A01 */ ori $a1, $a1, (0xE3000A01 & 0xFFFF)
/* DCBFC 801464FC 3C08E300 */ lui $t0, (0xE3000C00 >> 16)
/* DCC00 80146500 35080C00 */ ori $t0, $t0, (0xE3000C00 & 0xFFFF)
/* DCC04 80146504 3C09E300 */ lui $t1, (0xE3001001 >> 16)
/* DCC08 80146508 35291001 */ ori $t1, $t1, (0xE3001001 & 0xFFFF)
/* DCC0C 8014650C 3C0BFCFF */ lui $t3, (0xFCFFFFFF >> 16)
/* DCC10 80146510 356BFFFF */ ori $t3, $t3, (0xFCFFFFFF & 0xFFFF)
/* DCC14 80146514 3C0AFFFC */ lui $t2, (0xFFFCF87C >> 16)
/* DCC18 80146518 354AF87C */ ori $t2, $t2, (0xFFFCF87C & 0xFFFF)
/* DCC1C 8014651C 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* DCC20 80146520 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* DCC24 80146524 3C07E300 */ lui $a3, (0xE3001201 >> 16)
/* DCC28 80146528 3C0D800A */ lui $t5, %hi(gMainGfxPos)
/* DCC2C 8014652C 25ADA66C */ addiu $t5, $t5, %lo(gMainGfxPos)
/* DCC30 80146530 34E71201 */ ori $a3, $a3, (0xE3001201 & 0xFFFF)
/* DCC34 80146534 8DAC0000 */ lw $t4, 0x0($t5)
/* DCC38 80146538 3C10E700 */ lui $s0, (0xE7000000 >> 16)
/* DCC3C 8014653C 0180202D */ daddu $a0, $t4, $zero
/* DCC40 80146540 258C0008 */ addiu $t4, $t4, 0x8
/* DCC44 80146544 ADAC0000 */ sw $t4, 0x0($t5)
/* DCC48 80146548 25820008 */ addiu $v0, $t4, 0x8
/* DCC4C 8014654C ADA20000 */ sw $v0, 0x0($t5)
/* DCC50 80146550 25820010 */ addiu $v0, $t4, 0x10
/* DCC54 80146554 ADA20000 */ sw $v0, 0x0($t5)
/* DCC58 80146558 25820018 */ addiu $v0, $t4, 0x18
/* DCC5C 8014655C ADA20000 */ sw $v0, 0x0($t5)
/* DCC60 80146560 25820020 */ addiu $v0, $t4, 0x20
/* DCC64 80146564 ADA20000 */ sw $v0, 0x0($t5)
/* DCC68 80146568 25820028 */ addiu $v0, $t4, 0x28
/* DCC6C 8014656C ADA20000 */ sw $v0, 0x0($t5)
/* DCC70 80146570 25820030 */ addiu $v0, $t4, 0x30
/* DCC74 80146574 ADA20000 */ sw $v0, 0x0($t5)
/* DCC78 80146578 25820038 */ addiu $v0, $t4, 0x38
/* DCC7C 8014657C ADA20000 */ sw $v0, 0x0($t5)
/* DCC80 80146580 85D2014E */ lh $s2, 0x14E($t6)
/* DCC84 80146584 85CF0150 */ lh $t7, 0x150($t6)
/* DCC88 80146588 3C020020 */ lui $v0, (0x200000 >> 16)
/* DCC8C 8014658C A5C30152 */ sh $v1, 0x152($t6)
/* DCC90 80146590 AFAF0034 */ sw $t7, 0x34($sp)
/* DCC94 80146594 85D9014A */ lh $t9, 0x14A($t6)
/* DCC98 80146598 85D7014C */ lh $s7, 0x14C($t6)
/* DCC9C 8014659C 00031C00 */ sll $v1, $v1, 16
/* DCCA0 801465A0 AFB70030 */ sw $s7, 0x30($sp)
/* DCCA4 801465A4 AC900000 */ sw $s0, 0x0($a0)
/* DCCA8 801465A8 AC800004 */ sw $zero, 0x4($a0)
/* DCCAC 801465AC AD820004 */ sw $v0, 0x4($t4)
/* DCCB0 801465B0 34028000 */ ori $v0, $zero, 0x8000
/* DCCB4 801465B4 AD850000 */ sw $a1, 0x0($t4)
/* DCCB8 801465B8 AD880008 */ sw $t0, 0x8($t4)
/* DCCBC 801465BC AD80000C */ sw $zero, 0xC($t4)
/* DCCC0 801465C0 AD890010 */ sw $t1, 0x10($t4)
/* DCCC4 801465C4 AD820014 */ sw $v0, 0x14($t4)
/* DCCC8 801465C8 AD8B0018 */ sw $t3, 0x18($t4)
/* DCCCC 801465CC AD8A001C */ sw $t2, 0x1C($t4)
/* DCCD0 801465D0 AD860020 */ sw $a2, 0x20($t4)
/* DCCD4 801465D4 AD800024 */ sw $zero, 0x24($t4)
/* DCCD8 801465D8 AD870028 */ sw $a3, 0x28($t4)
/* DCCDC 801465DC AD80002C */ sw $zero, 0x2C($t4)
/* DCCE0 801465E0 AD900030 */ sw $s0, 0x30($t4)
/* DCCE4 801465E4 AD800034 */ sw $zero, 0x34($t4)
/* DCCE8 801465E8 95C20148 */ lhu $v0, 0x148($t6)
/* DCCEC 801465EC 30420002 */ andi $v0, $v0, 0x2
/* DCCF0 801465F0 14400024 */ bnez $v0, .L80146684
/* DCCF4 801465F4 0003C403 */ sra $t8, $v1, 16
/* DCCF8 801465F8 3C03F500 */ lui $v1, (0xF5000100 >> 16)
/* DCCFC 801465FC 34630100 */ ori $v1, $v1, (0xF5000100 & 0xFFFF)
/* DCD00 80146600 3C05073F */ lui $a1, (0x73FC000 >> 16)
/* DCD04 80146604 34A5C000 */ ori $a1, $a1, (0x73FC000 & 0xFFFF)
/* DCD08 80146608 25820040 */ addiu $v0, $t4, 0x40
/* DCD0C 8014660C ADA20000 */ sw $v0, 0x0($t5)
/* DCD10 80146610 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* DCD14 80146614 AD820038 */ sw $v0, 0x38($t4)
/* DCD18 80146618 25820048 */ addiu $v0, $t4, 0x48
/* DCD1C 8014661C ADA20000 */ sw $v0, 0x0($t5)
/* DCD20 80146620 8DC40158 */ lw $a0, 0x158($t6)
/* DCD24 80146624 3C02E800 */ lui $v0, (0xE8000000 >> 16)
/* DCD28 80146628 AD820040 */ sw $v0, 0x40($t4)
/* DCD2C 8014662C 25820050 */ addiu $v0, $t4, 0x50
/* DCD30 80146630 AD800044 */ sw $zero, 0x44($t4)
/* DCD34 80146634 ADA20000 */ sw $v0, 0x0($t5)
/* DCD38 80146638 3C020700 */ lui $v0, (0x7000000 >> 16)
/* DCD3C 8014663C AD82004C */ sw $v0, 0x4C($t4)
/* DCD40 80146640 25820058 */ addiu $v0, $t4, 0x58
/* DCD44 80146644 AD830048 */ sw $v1, 0x48($t4)
/* DCD48 80146648 ADA20000 */ sw $v0, 0x0($t5)
/* DCD4C 8014664C 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* DCD50 80146650 AD820050 */ sw $v0, 0x50($t4)
/* DCD54 80146654 25820060 */ addiu $v0, $t4, 0x60
/* DCD58 80146658 AD800054 */ sw $zero, 0x54($t4)
/* DCD5C 8014665C ADA20000 */ sw $v0, 0x0($t5)
/* DCD60 80146660 3C02F000 */ lui $v0, (0xF0000000 >> 16)
/* DCD64 80146664 AD820058 */ sw $v0, 0x58($t4)
/* DCD68 80146668 25820068 */ addiu $v0, $t4, 0x68
/* DCD6C 8014666C AD85005C */ sw $a1, 0x5C($t4)
/* DCD70 80146670 ADA20000 */ sw $v0, 0x0($t5)
/* DCD74 80146674 AD900060 */ sw $s0, 0x60($t4)
/* DCD78 80146678 AD800064 */ sw $zero, 0x64($t4)
/* DCD7C 8014667C 080519C4 */ j .L80146710
/* DCD80 80146680 AD84003C */ sw $a0, 0x3C($t4)
.L80146684:
/* DCD84 80146684 3C03F500 */ lui $v1, (0xF5000100 >> 16)
/* DCD88 80146688 34630100 */ ori $v1, $v1, (0xF5000100 & 0xFFFF)
/* DCD8C 8014668C 3C04073F */ lui $a0, (0x73FC000 >> 16)
/* DCD90 80146690 3484C000 */ ori $a0, $a0, (0x73FC000 & 0xFFFF)
/* DCD94 80146694 25820040 */ addiu $v0, $t4, 0x40
/* DCD98 80146698 ADA20000 */ sw $v0, 0x0($t5)
/* DCD9C 8014669C 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* DCDA0 801466A0 AD820038 */ sw $v0, 0x38($t4)
/* DCDA4 801466A4 3C028016 */ lui $v0, %hi(gBackgroundPalette)
/* DCDA8 801466A8 244293A0 */ addiu $v0, $v0, %lo(gBackgroundPalette)
/* DCDAC 801466AC AD82003C */ sw $v0, 0x3C($t4)
/* DCDB0 801466B0 25820048 */ addiu $v0, $t4, 0x48
/* DCDB4 801466B4 ADA20000 */ sw $v0, 0x0($t5)
/* DCDB8 801466B8 3C02E800 */ lui $v0, (0xE8000000 >> 16)
/* DCDBC 801466BC AD820040 */ sw $v0, 0x40($t4)
/* DCDC0 801466C0 25820050 */ addiu $v0, $t4, 0x50
/* DCDC4 801466C4 AD800044 */ sw $zero, 0x44($t4)
/* DCDC8 801466C8 ADA20000 */ sw $v0, 0x0($t5)
/* DCDCC 801466CC 3C020700 */ lui $v0, (0x7000000 >> 16)
/* DCDD0 801466D0 AD82004C */ sw $v0, 0x4C($t4)
/* DCDD4 801466D4 25820058 */ addiu $v0, $t4, 0x58
/* DCDD8 801466D8 AD830048 */ sw $v1, 0x48($t4)
/* DCDDC 801466DC ADA20000 */ sw $v0, 0x0($t5)
/* DCDE0 801466E0 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* DCDE4 801466E4 AD820050 */ sw $v0, 0x50($t4)
/* DCDE8 801466E8 25820060 */ addiu $v0, $t4, 0x60
/* DCDEC 801466EC AD800054 */ sw $zero, 0x54($t4)
/* DCDF0 801466F0 ADA20000 */ sw $v0, 0x0($t5)
/* DCDF4 801466F4 3C02F000 */ lui $v0, (0xF0000000 >> 16)
/* DCDF8 801466F8 AD820058 */ sw $v0, 0x58($t4)
/* DCDFC 801466FC 25820068 */ addiu $v0, $t4, 0x68
/* DCE00 80146700 AD84005C */ sw $a0, 0x5C($t4)
/* DCE04 80146704 ADA20000 */ sw $v0, 0x0($t5)
/* DCE08 80146708 AD900060 */ sw $s0, 0x60($t4)
/* DCE0C 8014670C AD800064 */ sw $zero, 0x64($t4)
.L80146710:
/* DCE10 80146710 3C028015 */ lui $v0, %hi(gBackroundWaveEnabled)
/* DCE14 80146714 8042F12F */ lb $v0, %lo(gBackroundWaveEnabled)($v0)
/* DCE18 80146718 1440013D */ bnez $v0, .L80146C10
/* DCE1C 8014671C 24110006 */ addiu $s1, $zero, 0x6
/* DCE20 80146720 3C048007 */ lui $a0, %hi(gGameStatusPtr)
/* DCE24 80146724 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0)
/* DCE28 80146728 8483014E */ lh $v1, 0x14E($a0)
/* DCE2C 8014672C 24020800 */ addiu $v0, $zero, 0x800
/* DCE30 80146730 14600002 */ bnez $v1, .L8014673C
/* DCE34 80146734 0043001A */ div $zero, $v0, $v1
/* DCE38 80146738 0007000D */ break 7
.L8014673C:
/* DCE3C 8014673C 2401FFFF */ addiu $at, $zero, -0x1
/* DCE40 80146740 14610004 */ bne $v1, $at, .L80146754
/* DCE44 80146744 3C018000 */ lui $at, (0x80000000 >> 16)
/* DCE48 80146748 14410002 */ bne $v0, $at, .L80146754
/* DCE4C 8014674C 00000000 */ nop
/* DCE50 80146750 0006000D */ break 6
.L80146754:
/* DCE54 80146754 00008812 */ mflo $s1
/* DCE58 80146758 84820150 */ lh $v0, 0x150($a0)
/* DCE5C 8014675C 16200002 */ bnez $s1, .L80146768
/* DCE60 80146760 0051001A */ div $zero, $v0, $s1
/* DCE64 80146764 0007000D */ break 7
.L80146768:
/* DCE68 80146768 2401FFFF */ addiu $at, $zero, -0x1
/* DCE6C 8014676C 16210004 */ bne $s1, $at, .L80146780
/* DCE70 80146770 3C018000 */ lui $at, (0x80000000 >> 16)
/* DCE74 80146774 14410002 */ bne $v0, $at, .L80146780
/* DCE78 80146778 00000000 */ nop
/* DCE7C 8014677C 0006000D */ break 6
.L80146780:
/* DCE80 80146780 00007812 */ mflo $t7
/* DCE84 80146784 0000B810 */ mfhi $s7
/* DCE88 80146788 0000982D */ daddu $s3, $zero, $zero
/* DCE8C 8014678C AFAF0070 */ sw $t7, 0x70($sp)
/* DCE90 80146790 19E00095 */ blez $t7, .L801469E8
/* DCE94 80146794 AFB70038 */ sw $s7, 0x38($sp)
/* DCE98 80146798 3C0A800A */ lui $t2, %hi(gMainGfxPos)
/* DCE9C 8014679C 254AA66C */ addiu $t2, $t2, %lo(gMainGfxPos)
/* DCEA0 801467A0 2642FFFF */ addiu $v0, $s2, -0x1
/* DCEA4 801467A4 30420FFF */ andi $v0, $v0, 0xFFF
/* DCEA8 801467A8 3C03FD48 */ lui $v1, (0xFD480000 >> 16)
/* DCEAC 801467AC 00431025 */ or $v0, $v0, $v1
/* DCEB0 801467B0 3C14F548 */ lui $s4, (0xF5484A00 >> 16)
/* DCEB4 801467B4 36944A00 */ ori $s4, $s4, (0xF5484A00 & 0xFFFF)
/* DCEB8 801467B8 03191821 */ addu $v1, $t8, $t9
/* DCEBC 801467BC AFA2003C */ sw $v0, 0x3C($sp)
/* DCEC0 801467C0 2462FFFF */ addiu $v0, $v1, -0x1
/* DCEC4 801467C4 00021080 */ sll $v0, $v0, 2
/* DCEC8 801467C8 30420FFF */ andi $v0, $v0, 0xFFF
/* DCECC 801467CC 00021300 */ sll $v0, $v0, 12
/* DCED0 801467D0 AFA20040 */ sw $v0, 0x40($sp)
/* DCED4 801467D4 00191080 */ sll $v0, $t9, 2
/* DCED8 801467D8 30420FFF */ andi $v0, $v0, 0xFFF
/* DCEDC 801467DC 00021300 */ sll $v0, $v0, 12
/* DCEE0 801467E0 3C16E100 */ lui $s6, (0xE1000000 >> 16)
/* DCEE4 801467E4 AFA20044 */ sw $v0, 0x44($sp)
/* DCEE8 801467E8 02581023 */ subu $v0, $s2, $t8
/* DCEEC 801467EC 00021540 */ sll $v0, $v0, 21
/* DCEF0 801467F0 3C15F100 */ lui $s5, (0xF1000000 >> 16)
/* DCEF4 801467F4 3C101000 */ lui $s0, (0x10000400 >> 16)
/* DCEF8 801467F8 36100400 */ ori $s0, $s0, (0x10000400 & 0xFFFF)
/* DCEFC 801467FC AFA20048 */ sw $v0, 0x48($sp)
/* DCF00 80146800 02591021 */ addu $v0, $s2, $t9
/* DCF04 80146804 2442FFFF */ addiu $v0, $v0, -0x1
/* DCF08 80146808 00021080 */ sll $v0, $v0, 2
/* DCF0C 8014680C 30420FFF */ andi $v0, $v0, 0xFFF
/* DCF10 80146810 00021300 */ sll $v0, $v0, 12
/* DCF14 80146814 00031880 */ sll $v1, $v1, 2
/* DCF18 80146818 30630FFF */ andi $v1, $v1, 0xFFF
/* DCF1C 8014681C 0003F300 */ sll $fp, $v1, 12
/* DCF20 80146820 0220702D */ daddu $t6, $s1, $zero
/* DCF24 80146824 8FAF0030 */ lw $t7, 0x30($sp)
/* DCF28 80146828 0260682D */ daddu $t5, $s3, $zero
/* DCF2C 8014682C AFA2004C */ sw $v0, 0x4C($sp)
/* DCF30 80146830 AFAF0078 */ sw $t7, 0x78($sp)
.L80146834:
/* DCF34 80146834 3C028015 */ lui $v0, %hi(gBackroundTextureYOffset)
/* DCF38 80146838 9442F130 */ lhu $v0, %lo(gBackroundTextureYOffset)($v0)
/* DCF3C 8014683C 3C0B8007 */ lui $t3, %hi(gGameStatusPtr)
/* DCF40 80146840 8D6B419C */ lw $t3, %lo(gGameStatusPtr)($t3)
/* DCF44 80146844 004D2021 */ addu $a0, $v0, $t5
/* DCF48 80146848 00041400 */ sll $v0, $a0, 16
/* DCF4C 8014684C 85630150 */ lh $v1, 0x150($t3)
/* DCF50 80146850 00021403 */ sra $v0, $v0, 16
/* DCF54 80146854 0062182A */ slt $v1, $v1, $v0
/* DCF58 80146858 95620150 */ lhu $v0, 0x150($t3)
/* DCF5C 8014685C 10600002 */ beqz $v1, .L80146868
/* DCF60 80146860 0080602D */ daddu $t4, $a0, $zero
/* DCF64 80146864 00826023 */ subu $t4, $a0, $v0
.L80146868:
/* DCF68 80146868 3C080749 */ lui $t0, (0x749C014 >> 16)
/* DCF6C 8014686C 3508C014 */ ori $t0, $t0, (0x749C014 & 0xFFFF)
/* DCF70 80146870 3C090049 */ lui $t1, (0x49C014 >> 16)
/* DCF74 80146874 3529C014 */ ori $t1, $t1, (0x49C014 & 0xFFFF)
/* DCF78 80146878 01B16821 */ addu $t5, $t5, $s1
/* DCF7C 8014687C 26730001 */ addiu $s3, $s3, 0x1
/* DCF80 80146880 8FB70078 */ lw $s7, 0x78($sp)
/* DCF84 80146884 8FAF0030 */ lw $t7, 0x30($sp)
/* DCF88 80146888 00173080 */ sll $a2, $s7, 2
/* DCF8C 8014688C 02F1B821 */ addu $s7, $s7, $s1
/* DCF90 80146890 25E5FFFF */ addiu $a1, $t7, -0x1
/* DCF94 80146894 01C52821 */ addu $a1, $t6, $a1
/* DCF98 80146898 00052880 */ sll $a1, $a1, 2
/* DCF9C 8014689C AFB70078 */ sw $s7, 0x78($sp)
/* DCFA0 801468A0 8D430000 */ lw $v1, 0x0($t2)
/* DCFA4 801468A4 30A50FFF */ andi $a1, $a1, 0xFFF
/* DCFA8 801468A8 0060382D */ daddu $a3, $v1, $zero
/* DCFAC 801468AC 24630008 */ addiu $v1, $v1, 0x8
/* DCFB0 801468B0 24620008 */ addiu $v0, $v1, 0x8
/* DCFB4 801468B4 AD430000 */ sw $v1, 0x0($t2)
/* DCFB8 801468B8 8FB7003C */ lw $s7, 0x3C($sp)
/* DCFBC 801468BC 24640048 */ addiu $a0, $v1, 0x48
/* DCFC0 801468C0 ACF70000 */ sw $s7, 0x0($a3)
/* DCFC4 801468C4 AD420000 */ sw $v0, 0x0($t2)
/* DCFC8 801468C8 24620010 */ addiu $v0, $v1, 0x10
/* DCFCC 801468CC AD420000 */ sw $v0, 0x0($t2)
/* DCFD0 801468D0 24620018 */ addiu $v0, $v1, 0x18
/* DCFD4 801468D4 AD420000 */ sw $v0, 0x0($t2)
/* DCFD8 801468D8 24620020 */ addiu $v0, $v1, 0x20
/* DCFDC 801468DC AD420000 */ sw $v0, 0x0($t2)
/* DCFE0 801468E0 24620028 */ addiu $v0, $v1, 0x28
/* DCFE4 801468E4 AD420000 */ sw $v0, 0x0($t2)
/* DCFE8 801468E8 24620030 */ addiu $v0, $v1, 0x30
/* DCFEC 801468EC AD420000 */ sw $v0, 0x0($t2)
/* DCFF0 801468F0 24620038 */ addiu $v0, $v1, 0x38
/* DCFF4 801468F4 AD420000 */ sw $v0, 0x0($t2)
/* DCFF8 801468F8 24620040 */ addiu $v0, $v1, 0x40
/* DCFFC 801468FC AD420000 */ sw $v0, 0x0($t2)
/* DD000 80146900 000C1400 */ sll $v0, $t4, 16
/* DD004 80146904 00021403 */ sra $v0, $v0, 16
/* DD008 80146908 02420018 */ mult $s2, $v0
/* DD00C 8014690C AD440000 */ sw $a0, 0x0($t2)
/* DD010 80146910 8D640154 */ lw $a0, 0x154($t3)
/* DD014 80146914 24620050 */ addiu $v0, $v1, 0x50
/* DD018 80146918 AD420000 */ sw $v0, 0x0($t2)
/* DD01C 8014691C 3C020700 */ lui $v0, (0x7000000 >> 16)
/* DD020 80146920 00007812 */ mflo $t7
/* DD024 80146924 008F2021 */ addu $a0, $a0, $t7
/* DD028 80146928 ACE40004 */ sw $a0, 0x4($a3)
/* DD02C 8014692C AC620004 */ sw $v0, 0x4($v1)
/* DD030 80146930 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* DD034 80146934 AC620008 */ sw $v0, 0x8($v1)
/* DD038 80146938 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* DD03C 8014693C AC620010 */ sw $v0, 0x10($v1)
/* DD040 80146940 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* DD044 80146944 AC620018 */ sw $v0, 0x18($v1)
/* DD048 80146948 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* DD04C 8014694C AC620028 */ sw $v0, 0x28($v1)
/* DD050 80146950 3C02E400 */ lui $v0, (0xE4000000 >> 16)
/* DD054 80146954 AC740000 */ sw $s4, 0x0($v1)
/* DD058 80146958 AC60000C */ sw $zero, 0xC($v1)
/* DD05C 8014695C AC680014 */ sw $t0, 0x14($v1)
/* DD060 80146960 AC60001C */ sw $zero, 0x1C($v1)
/* DD064 80146964 AC740020 */ sw $s4, 0x20($v1)
/* DD068 80146968 AC600024 */ sw $zero, 0x24($v1)
/* DD06C 8014696C AC69002C */ sw $t1, 0x2C($v1)
/* DD070 80146970 8FB70040 */ lw $s7, 0x40($sp)
/* DD074 80146974 00A22825 */ or $a1, $a1, $v0
/* DD078 80146978 02E51025 */ or $v0, $s7, $a1
/* DD07C 8014697C AC620030 */ sw $v0, 0x30($v1)
/* DD080 80146980 8FAF0044 */ lw $t7, 0x44($sp)
/* DD084 80146984 30C60FFF */ andi $a2, $a2, 0xFFF
/* DD088 80146988 01E61025 */ or $v0, $t7, $a2
/* DD08C 8014698C AC620034 */ sw $v0, 0x34($v1)
/* DD090 80146990 AC760038 */ sw $s6, 0x38($v1)
/* DD094 80146994 8FB70048 */ lw $s7, 0x48($sp)
/* DD098 80146998 03C63025 */ or $a2, $fp, $a2
/* DD09C 8014699C AC750040 */ sw $s5, 0x40($v1)
/* DD0A0 801469A0 AC700044 */ sw $s0, 0x44($v1)
/* DD0A4 801469A4 AC77003C */ sw $s7, 0x3C($v1)
/* DD0A8 801469A8 8FAF004C */ lw $t7, 0x4C($sp)
/* DD0AC 801469AC 24620058 */ addiu $v0, $v1, 0x58
/* DD0B0 801469B0 01E52825 */ or $a1, $t7, $a1
/* DD0B4 801469B4 AC650048 */ sw $a1, 0x48($v1)
/* DD0B8 801469B8 AC66004C */ sw $a2, 0x4C($v1)
/* DD0BC 801469BC AD420000 */ sw $v0, 0x0($t2)
/* DD0C0 801469C0 24620060 */ addiu $v0, $v1, 0x60
/* DD0C4 801469C4 AC760050 */ sw $s6, 0x50($v1)
/* DD0C8 801469C8 AC600054 */ sw $zero, 0x54($v1)
/* DD0CC 801469CC AD420000 */ sw $v0, 0x0($t2)
/* DD0D0 801469D0 AC750058 */ sw $s5, 0x58($v1)
/* DD0D4 801469D4 AC70005C */ sw $s0, 0x5C($v1)
/* DD0D8 801469D8 8FB70070 */ lw $s7, 0x70($sp)
/* DD0DC 801469DC 0277102A */ slt $v0, $s3, $s7
/* DD0E0 801469E0 1440FF94 */ bnez $v0, .L80146834
/* DD0E4 801469E4 01D17021 */ addu $t6, $t6, $s1
.L801469E8:
/* DD0E8 801469E8 8FAF0038 */ lw $t7, 0x38($sp)
/* DD0EC 801469EC 11E001F9 */ beqz $t7, .L801471D4
/* DD0F0 801469F0 02330018 */ mult $s1, $s3
/* DD0F4 801469F4 3C0B8007 */ lui $t3, %hi(gGameStatusPtr)
/* DD0F8 801469F8 8D6B419C */ lw $t3, %lo(gGameStatusPtr)($t3)
/* DD0FC 801469FC 3C028015 */ lui $v0, %hi(gBackroundTextureYOffset)
/* DD100 80146A00 9442F130 */ lhu $v0, %lo(gBackroundTextureYOffset)($v0)
/* DD104 80146A04 85630150 */ lh $v1, 0x150($t3)
/* DD108 80146A08 00006812 */ mflo $t5
/* DD10C 80146A0C 004D2021 */ addu $a0, $v0, $t5
/* DD110 80146A10 00041400 */ sll $v0, $a0, 16
/* DD114 80146A14 00021403 */ sra $v0, $v0, 16
/* DD118 80146A18 0062182A */ slt $v1, $v1, $v0
/* DD11C 80146A1C 95620150 */ lhu $v0, 0x150($t3)
/* DD120 80146A20 10600002 */ beqz $v1, .L80146A2C
/* DD124 80146A24 0080602D */ daddu $t4, $a0, $zero
/* DD128 80146A28 00826023 */ subu $t4, $a0, $v0
.L80146A2C:
/* DD12C 80146A2C 3C08F548 */ lui $t0, (0xF5484A00 >> 16)
/* DD130 80146A30 35084A00 */ ori $t0, $t0, (0xF5484A00 & 0xFFFF)
/* DD134 80146A34 3C050749 */ lui $a1, (0x749C000 >> 16)
/* DD138 80146A38 34A5C000 */ ori $a1, $a1, (0x749C000 & 0xFFFF)
/* DD13C 80146A3C 3C090049 */ lui $t1, (0x49C000 >> 16)
/* DD140 80146A40 3529C000 */ ori $t1, $t1, (0x49C000 & 0xFFFF)
/* DD144 80146A44 3C0A1000 */ lui $t2, (0x10000400 >> 16)
/* DD148 80146A48 3C07800A */ lui $a3, %hi(gMainGfxPos)
/* DD14C 80146A4C 24E7A66C */ addiu $a3, $a3, %lo(gMainGfxPos)
/* DD150 80146A50 354A0400 */ ori $t2, $t2, (0x10000400 & 0xFFFF)
/* DD154 80146A54 2642FFFF */ addiu $v0, $s2, -0x1
/* DD158 80146A58 30420FFF */ andi $v0, $v0, 0xFFF
/* DD15C 80146A5C 3C03FD48 */ lui $v1, (0xFD480000 >> 16)
/* DD160 80146A60 8CE40000 */ lw $a0, 0x0($a3)
/* DD164 80146A64 00431025 */ or $v0, $v0, $v1
/* DD168 80146A68 0080302D */ daddu $a2, $a0, $zero
/* DD16C 80146A6C 24840008 */ addiu $a0, $a0, 0x8
/* DD170 80146A70 ACE40000 */ sw $a0, 0x0($a3)
/* DD174 80146A74 ACC20000 */ sw $v0, 0x0($a2)
/* DD178 80146A78 24820008 */ addiu $v0, $a0, 0x8
/* DD17C 80146A7C ACE20000 */ sw $v0, 0x0($a3)
/* DD180 80146A80 24820010 */ addiu $v0, $a0, 0x10
/* DD184 80146A84 ACE20000 */ sw $v0, 0x0($a3)
/* DD188 80146A88 24820018 */ addiu $v0, $a0, 0x18
/* DD18C 80146A8C ACE20000 */ sw $v0, 0x0($a3)
/* DD190 80146A90 24820020 */ addiu $v0, $a0, 0x20
/* DD194 80146A94 ACE20000 */ sw $v0, 0x0($a3)
/* DD198 80146A98 24820028 */ addiu $v0, $a0, 0x28
/* DD19C 80146A9C ACE20000 */ sw $v0, 0x0($a3)
/* DD1A0 80146AA0 24820030 */ addiu $v0, $a0, 0x30
/* DD1A4 80146AA4 ACE20000 */ sw $v0, 0x0($a3)
/* DD1A8 80146AA8 24820038 */ addiu $v0, $a0, 0x38
/* DD1AC 80146AAC ACE20000 */ sw $v0, 0x0($a3)
/* DD1B0 80146AB0 24820040 */ addiu $v0, $a0, 0x40
/* DD1B4 80146AB4 ACE20000 */ sw $v0, 0x0($a3)
/* DD1B8 80146AB8 000C1400 */ sll $v0, $t4, 16
/* DD1BC 80146ABC 00021403 */ sra $v0, $v0, 16
/* DD1C0 80146AC0 24830048 */ addiu $v1, $a0, 0x48
/* DD1C4 80146AC4 02420018 */ mult $s2, $v0
/* DD1C8 80146AC8 ACE30000 */ sw $v1, 0x0($a3)
/* DD1CC 80146ACC 8D620154 */ lw $v0, 0x154($t3)
/* DD1D0 80146AD0 24830050 */ addiu $v1, $a0, 0x50
/* DD1D4 80146AD4 ACE30000 */ sw $v1, 0x0($a3)
/* DD1D8 80146AD8 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* DD1DC 80146ADC 00007812 */ mflo $t7
/* DD1E0 80146AE0 004F1021 */ addu $v0, $v0, $t7
/* DD1E4 80146AE4 ACC20004 */ sw $v0, 0x4($a2)
/* DD1E8 80146AE8 3C020700 */ lui $v0, (0x7000000 >> 16)
/* DD1EC 80146AEC AC820004 */ sw $v0, 0x4($a0)
/* DD1F0 80146AF0 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* DD1F4 80146AF4 AC820008 */ sw $v0, 0x8($a0)
/* DD1F8 80146AF8 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* DD1FC 80146AFC AC880000 */ sw $t0, 0x0($a0)
/* DD200 80146B00 AC80000C */ sw $zero, 0xC($a0)
/* DD204 80146B04 AC820010 */ sw $v0, 0x10($a0)
/* DD208 80146B08 8FB70038 */ lw $s7, 0x38($sp)
/* DD20C 80146B0C 03193021 */ addu $a2, $t8, $t9
/* DD210 80146B10 26E2FFFF */ addiu $v0, $s7, -0x1
/* DD214 80146B14 00021080 */ sll $v0, $v0, 2
/* DD218 80146B18 30420FFF */ andi $v0, $v0, 0xFFF
/* DD21C 80146B1C 00452825 */ or $a1, $v0, $a1
/* DD220 80146B20 AC830018 */ sw $v1, 0x18($a0)
/* DD224 80146B24 3C03F200 */ lui $v1, (0xF2000000 >> 16)
/* DD228 80146B28 00491025 */ or $v0, $v0, $t1
/* DD22C 80146B2C AC82002C */ sw $v0, 0x2C($a0)
/* DD230 80146B30 24C2FFFF */ addiu $v0, $a2, -0x1
/* DD234 80146B34 00021080 */ sll $v0, $v0, 2
/* DD238 80146B38 30420FFF */ andi $v0, $v0, 0xFFF
/* DD23C 80146B3C 00021300 */ sll $v0, $v0, 12
/* DD240 80146B40 AC830028 */ sw $v1, 0x28($a0)
/* DD244 80146B44 3C03E400 */ lui $v1, (0xE4000000 >> 16)
/* DD248 80146B48 3C09E100 */ lui $t1, (0xE1000000 >> 16)
/* DD24C 80146B4C AC880020 */ sw $t0, 0x20($a0)
/* DD250 80146B50 3C08F100 */ lui $t0, (0xF1000000 >> 16)
/* DD254 80146B54 00063080 */ sll $a2, $a2, 2
/* DD258 80146B58 30C60FFF */ andi $a2, $a2, 0xFFF
/* DD25C 80146B5C 00063300 */ sll $a2, $a2, 12
/* DD260 80146B60 AC850014 */ sw $a1, 0x14($a0)
/* DD264 80146B64 AC80001C */ sw $zero, 0x1C($a0)
/* DD268 80146B68 AC800024 */ sw $zero, 0x24($a0)
/* DD26C 80146B6C 8FAF0030 */ lw $t7, 0x30($sp)
/* DD270 80146B70 8FB70034 */ lw $s7, 0x34($sp)
/* DD274 80146B74 25E5FFFF */ addiu $a1, $t7, -0x1
/* DD278 80146B78 02E52821 */ addu $a1, $s7, $a1
/* DD27C 80146B7C 00052880 */ sll $a1, $a1, 2
/* DD280 80146B80 30A50FFF */ andi $a1, $a1, 0xFFF
/* DD284 80146B84 00A32825 */ or $a1, $a1, $v1
/* DD288 80146B88 00451025 */ or $v0, $v0, $a1
/* DD28C 80146B8C AC820030 */ sw $v0, 0x30($a0)
/* DD290 80146B90 00191080 */ sll $v0, $t9, 2
/* DD294 80146B94 30420FFF */ andi $v0, $v0, 0xFFF
/* DD298 80146B98 00021300 */ sll $v0, $v0, 12
/* DD29C 80146B9C 01AF1821 */ addu $v1, $t5, $t7
/* DD2A0 80146BA0 00031880 */ sll $v1, $v1, 2
/* DD2A4 80146BA4 30630FFF */ andi $v1, $v1, 0xFFF
/* DD2A8 80146BA8 00431025 */ or $v0, $v0, $v1
/* DD2AC 80146BAC AC820034 */ sw $v0, 0x34($a0)
/* DD2B0 80146BB0 02581023 */ subu $v0, $s2, $t8
/* DD2B4 80146BB4 00021540 */ sll $v0, $v0, 21
/* DD2B8 80146BB8 AC82003C */ sw $v0, 0x3C($a0)
/* DD2BC 80146BBC 02591021 */ addu $v0, $s2, $t9
/* DD2C0 80146BC0 2442FFFF */ addiu $v0, $v0, -0x1
/* DD2C4 80146BC4 00021080 */ sll $v0, $v0, 2
/* DD2C8 80146BC8 30420FFF */ andi $v0, $v0, 0xFFF
/* DD2CC 80146BCC 00021300 */ sll $v0, $v0, 12
/* DD2D0 80146BD0 00451025 */ or $v0, $v0, $a1
/* DD2D4 80146BD4 00C33025 */ or $a2, $a2, $v1
/* DD2D8 80146BD8 AC890038 */ sw $t1, 0x38($a0)
/* DD2DC 80146BDC AC880040 */ sw $t0, 0x40($a0)
/* DD2E0 80146BE0 AC8A0044 */ sw $t2, 0x44($a0)
/* DD2E4 80146BE4 AC820048 */ sw $v0, 0x48($a0)
/* DD2E8 80146BE8 24820058 */ addiu $v0, $a0, 0x58
/* DD2EC 80146BEC AC86004C */ sw $a2, 0x4C($a0)
/* DD2F0 80146BF0 ACE20000 */ sw $v0, 0x0($a3)
/* DD2F4 80146BF4 24820060 */ addiu $v0, $a0, 0x60
/* DD2F8 80146BF8 AC890050 */ sw $t1, 0x50($a0)
/* DD2FC 80146BFC AC800054 */ sw $zero, 0x54($a0)
/* DD300 80146C00 ACE20000 */ sw $v0, 0x0($a3)
/* DD304 80146C04 AC880058 */ sw $t0, 0x58($a0)
/* DD308 80146C08 08051C75 */ j .L801471D4
/* DD30C 80146C0C AC8A005C */ sw $t2, 0x5C($a0)
.L80146C10:
/* DD310 80146C10 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* DD314 80146C14 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* DD318 80146C18 84420150 */ lh $v0, 0x150($v0)
/* DD31C 80146C1C 16200002 */ bnez $s1, .L80146C28
/* DD320 80146C20 0051001A */ div $zero, $v0, $s1
/* DD324 80146C24 0007000D */ break 7
.L80146C28:
/* DD328 80146C28 2401FFFF */ addiu $at, $zero, -0x1
/* DD32C 80146C2C 16210004 */ bne $s1, $at, .L80146C40
/* DD330 80146C30 3C018000 */ lui $at, (0x80000000 >> 16)
/* DD334 80146C34 14410002 */ bne $v0, $at, .L80146C40
/* DD338 80146C38 00000000 */ nop
/* DD33C 80146C3C 0006000D */ break 6
.L80146C40:
/* DD340 80146C40 00007812 */ mflo $t7
/* DD344 80146C44 0000B810 */ mfhi $s7
/* DD348 80146C48 3C013DD6 */ lui $at, (0x3DD67744 >> 16)
/* DD34C 80146C4C 34217744 */ ori $at, $at, (0x3DD67744 & 0xFFFF)
/* DD350 80146C50 44810000 */ mtc1 $at, $f0
/* DD354 80146C54 3C028015 */ lui $v0, %hi(gBackroundWavePhase)
/* DD358 80146C58 2442F134 */ addiu $v0, $v0, %lo(gBackroundWavePhase)
/* DD35C 80146C5C AFAF0070 */ sw $t7, 0x70($sp)
/* DD360 80146C60 AFB70038 */ sw $s7, 0x38($sp)
/* DD364 80146C64 C4420000 */ lwc1 $f2, 0x0($v0)
/* DD368 80146C68 46001080 */ add.s $f2, $f2, $f0
/* DD36C 80146C6C 0000982D */ daddu $s3, $zero, $zero
/* DD370 80146C70 19E000B1 */ blez $t7, .L80146F38
/* DD374 80146C74 E4420000 */ swc1 $f2, 0x0($v0)
/* DD378 80146C78 3C10800A */ lui $s0, %hi(gMainGfxPos)
/* DD37C 80146C7C 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos)
/* DD380 80146C80 2642FFFF */ addiu $v0, $s2, -0x1
/* DD384 80146C84 30420FFF */ andi $v0, $v0, 0xFFF
/* DD388 80146C88 3C03FD48 */ lui $v1, (0xFD480000 >> 16)
/* DD38C 80146C8C 00431025 */ or $v0, $v0, $v1
/* DD390 80146C90 3C0BF548 */ lui $t3, (0xF5484A00 >> 16)
/* DD394 80146C94 356B4A00 */ ori $t3, $t3, (0xF5484A00 & 0xFFFF)
/* DD398 80146C98 00197880 */ sll $t7, $t9, 2
/* DD39C 80146C9C AFA20050 */ sw $v0, 0x50($sp)
/* DD3A0 80146CA0 31E20FFF */ andi $v0, $t7, 0xFFF
/* DD3A4 80146CA4 00021300 */ sll $v0, $v0, 12
/* DD3A8 80146CA8 3C0EE100 */ lui $t6, (0xE1000000 >> 16)
/* DD3AC 80146CAC 3C0DF100 */ lui $t5, (0xF1000000 >> 16)
/* DD3B0 80146CB0 3C1E1000 */ lui $fp, (0x10000400 >> 16)
/* DD3B4 80146CB4 37DE0400 */ ori $fp, $fp, (0x10000400 & 0xFFFF)
/* DD3B8 80146CB8 0220A82D */ daddu $s5, $s1, $zero
/* DD3BC 80146CBC 8FB60030 */ lw $s6, 0x30($sp)
/* DD3C0 80146CC0 0260A02D */ daddu $s4, $s3, $zero
/* DD3C4 80146CC4 AFAF0054 */ sw $t7, 0x54($sp)
/* DD3C8 80146CC8 AFA20058 */ sw $v0, 0x58($sp)
.L80146CCC:
/* DD3CC 80146CCC 3C013ED6 */ lui $at, (0x3ED67744 >> 16)
/* DD3D0 80146CD0 34217744 */ ori $at, $at, (0x3ED67744 & 0xFFFF)
/* DD3D4 80146CD4 44810000 */ mtc1 $at, $f0
/* DD3D8 80146CD8 44936000 */ mtc1 $s3, $f12
/* DD3DC 80146CDC 00000000 */ nop
/* DD3E0 80146CE0 46806320 */ cvt.s.w $f12, $f12
/* DD3E4 80146CE4 46006302 */ mul.s $f12, $f12, $f0
/* DD3E8 80146CE8 00000000 */ nop
/* DD3EC 80146CEC 3C018015 */ lui $at, %hi(gBackroundWavePhase)
/* DD3F0 80146CF0 C420F134 */ lwc1 $f0, %lo(gBackroundWavePhase)($at)
/* DD3F4 80146CF4 AFAB0060 */ sw $t3, 0x60($sp)
/* DD3F8 80146CF8 AFAD0064 */ sw $t5, 0x64($sp)
/* DD3FC 80146CFC 460C0300 */ add.s $f12, $f0, $f12
/* DD400 80146D00 AFAE0068 */ sw $t6, 0x68($sp)
/* DD404 80146D04 0C00A85B */ jal sin_rad
/* DD408 80146D08 AFB9006C */ sw $t9, 0x6C($sp)
/* DD40C 80146D0C 3C014040 */ lui $at, (0x40400000 >> 16)
/* DD410 80146D10 44811000 */ mtc1 $at, $f2
/* DD414 80146D14 3C0A8007 */ lui $t2, %hi(gGameStatusPtr)
/* DD418 80146D18 8D4A419C */ lw $t2, %lo(gGameStatusPtr)($t2)
/* DD41C 80146D1C 8FAB0060 */ lw $t3, 0x60($sp)
/* DD420 80146D20 8FAD0064 */ lw $t5, 0x64($sp)
/* DD424 80146D24 8FAE0068 */ lw $t6, 0x68($sp)
/* DD428 80146D28 8FB9006C */ lw $t9, 0x6C($sp)
/* DD42C 80146D2C 85420152 */ lh $v0, 0x152($t2)
/* DD430 80146D30 46020082 */ mul.s $f2, $f0, $f2
/* DD434 80146D34 00000000 */ nop
/* DD438 80146D38 44820000 */ mtc1 $v0, $f0
/* DD43C 80146D3C 00000000 */ nop
/* DD440 80146D40 46800020 */ cvt.s.w $f0, $f0
/* DD444 80146D44 3C028015 */ lui $v0, %hi(gBackroundTextureYOffset)
/* DD448 80146D48 9442F130 */ lhu $v0, %lo(gBackroundTextureYOffset)($v0)
/* DD44C 80146D4C 85430150 */ lh $v1, 0x150($t2)
/* DD450 80146D50 00542021 */ addu $a0, $v0, $s4
/* DD454 80146D54 46020000 */ add.s $f0, $f0, $f2
/* DD458 80146D58 00041400 */ sll $v0, $a0, 16
/* DD45C 80146D5C 00021403 */ sra $v0, $v0, 16
/* DD460 80146D60 46000000 */ add.s $f0, $f0, $f0
/* DD464 80146D64 0062182A */ slt $v1, $v1, $v0
/* DD468 80146D68 95420150 */ lhu $v0, 0x150($t2)
/* DD46C 80146D6C 4600020D */ trunc.w.s $f8, $f0
/* DD470 80146D70 44184000 */ mfc1 $t8, $f8
/* DD474 80146D74 10600002 */ beqz $v1, .L80146D80
/* DD478 80146D78 0080602D */ daddu $t4, $a0, $zero
/* DD47C 80146D7C 00826023 */ subu $t4, $a0, $v0
.L80146D80:
/* DD480 80146D80 3C080749 */ lui $t0, (0x749C014 >> 16)
/* DD484 80146D84 3508C014 */ ori $t0, $t0, (0x749C014 & 0xFFFF)
/* DD488 80146D88 3C090049 */ lui $t1, (0x49C014 >> 16)
/* DD48C 80146D8C 3529C014 */ ori $t1, $t1, (0x49C014 & 0xFFFF)
/* DD490 80146D90 00163880 */ sll $a3, $s6, 2
/* DD494 80146D94 02D1B021 */ addu $s6, $s6, $s1
/* DD498 80146D98 0291A021 */ addu $s4, $s4, $s1
/* DD49C 80146D9C 26730001 */ addiu $s3, $s3, 0x1
/* DD4A0 80146DA0 30E70FFF */ andi $a3, $a3, 0xFFF
/* DD4A4 80146DA4 8FB70030 */ lw $s7, 0x30($sp)
/* DD4A8 80146DA8 8E040000 */ lw $a0, 0x0($s0)
/* DD4AC 80146DAC 26E6FFFF */ addiu $a2, $s7, -0x1
/* DD4B0 80146DB0 02A63021 */ addu $a2, $s5, $a2
/* DD4B4 80146DB4 0080282D */ daddu $a1, $a0, $zero
/* DD4B8 80146DB8 24840008 */ addiu $a0, $a0, 0x8
/* DD4BC 80146DBC 24820008 */ addiu $v0, $a0, 0x8
/* DD4C0 80146DC0 24830048 */ addiu $v1, $a0, 0x48
/* DD4C4 80146DC4 00063080 */ sll $a2, $a2, 2
/* DD4C8 80146DC8 AE040000 */ sw $a0, 0x0($s0)
/* DD4CC 80146DCC 8FAF0050 */ lw $t7, 0x50($sp)
/* DD4D0 80146DD0 30C60FFF */ andi $a2, $a2, 0xFFF
/* DD4D4 80146DD4 ACAF0000 */ sw $t7, 0x0($a1)
/* DD4D8 80146DD8 AE020000 */ sw $v0, 0x0($s0)
/* DD4DC 80146DDC 24820010 */ addiu $v0, $a0, 0x10
/* DD4E0 80146DE0 AE020000 */ sw $v0, 0x0($s0)
/* DD4E4 80146DE4 24820018 */ addiu $v0, $a0, 0x18
/* DD4E8 80146DE8 AE020000 */ sw $v0, 0x0($s0)
/* DD4EC 80146DEC 24820020 */ addiu $v0, $a0, 0x20
/* DD4F0 80146DF0 AE020000 */ sw $v0, 0x0($s0)
/* DD4F4 80146DF4 24820028 */ addiu $v0, $a0, 0x28
/* DD4F8 80146DF8 AE020000 */ sw $v0, 0x0($s0)
/* DD4FC 80146DFC 24820030 */ addiu $v0, $a0, 0x30
/* DD500 80146E00 AE020000 */ sw $v0, 0x0($s0)
/* DD504 80146E04 24820038 */ addiu $v0, $a0, 0x38
/* DD508 80146E08 AE020000 */ sw $v0, 0x0($s0)
/* DD50C 80146E0C 24820040 */ addiu $v0, $a0, 0x40
/* DD510 80146E10 AE020000 */ sw $v0, 0x0($s0)
/* DD514 80146E14 000C1400 */ sll $v0, $t4, 16
/* DD518 80146E18 00021403 */ sra $v0, $v0, 16
/* DD51C 80146E1C 02420018 */ mult $s2, $v0
/* DD520 80146E20 AE030000 */ sw $v1, 0x0($s0)
/* DD524 80146E24 8D430154 */ lw $v1, 0x154($t2)
/* DD528 80146E28 24820050 */ addiu $v0, $a0, 0x50
/* DD52C 80146E2C AE020000 */ sw $v0, 0x0($s0)
/* DD530 80146E30 3C020700 */ lui $v0, (0x7000000 >> 16)
/* DD534 80146E34 00007812 */ mflo $t7
/* DD538 80146E38 006F1821 */ addu $v1, $v1, $t7
/* DD53C 80146E3C ACA30004 */ sw $v1, 0x4($a1)
/* DD540 80146E40 AC820004 */ sw $v0, 0x4($a0)
/* DD544 80146E44 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* DD548 80146E48 AC820008 */ sw $v0, 0x8($a0)
/* DD54C 80146E4C 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* DD550 80146E50 AC820010 */ sw $v0, 0x10($a0)
/* DD554 80146E54 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* DD558 80146E58 AC820018 */ sw $v0, 0x18($a0)
/* DD55C 80146E5C 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* DD560 80146E60 00182840 */ sll $a1, $t8, 1
/* DD564 80146E64 AC820028 */ sw $v0, 0x28($a0)
/* DD568 80146E68 24A2FFFF */ addiu $v0, $a1, -0x1
/* DD56C 80146E6C 00591021 */ addu $v0, $v0, $t9
/* DD570 80146E70 00021080 */ sll $v0, $v0, 2
/* DD574 80146E74 30420FFF */ andi $v0, $v0, 0xFFF
/* DD578 80146E78 00021300 */ sll $v0, $v0, 12
/* DD57C 80146E7C 3C03E400 */ lui $v1, (0xE4000000 >> 16)
/* DD580 80146E80 00C33025 */ or $a2, $a2, $v1
/* DD584 80146E84 00461025 */ or $v0, $v0, $a2
/* DD588 80146E88 AC8B0000 */ sw $t3, 0x0($a0)
/* DD58C 80146E8C AC80000C */ sw $zero, 0xC($a0)
/* DD590 80146E90 AC880014 */ sw $t0, 0x14($a0)
/* DD594 80146E94 AC80001C */ sw $zero, 0x1C($a0)
/* DD598 80146E98 AC8B0020 */ sw $t3, 0x20($a0)
/* DD59C 80146E9C AC800024 */ sw $zero, 0x24($a0)
/* DD5A0 80146EA0 AC89002C */ sw $t1, 0x2C($a0)
/* DD5A4 80146EA4 AC820030 */ sw $v0, 0x30($a0)
/* DD5A8 80146EA8 8FB70058 */ lw $s7, 0x58($sp)
/* DD5AC 80146EAC 00181900 */ sll $v1, $t8, 4
/* DD5B0 80146EB0 AC8E0038 */ sw $t6, 0x38($a0)
/* DD5B4 80146EB4 02E71025 */ or $v0, $s7, $a3
/* DD5B8 80146EB8 AC820034 */ sw $v0, 0x34($a0)
/* DD5BC 80146EBC 00121140 */ sll $v0, $s2, 5
/* DD5C0 80146EC0 00431023 */ subu $v0, $v0, $v1
/* DD5C4 80146EC4 00021400 */ sll $v0, $v0, 16
/* DD5C8 80146EC8 AC82003C */ sw $v0, 0x3C($a0)
/* DD5CC 80146ECC 02591021 */ addu $v0, $s2, $t9
/* DD5D0 80146ED0 2442FFFF */ addiu $v0, $v0, -0x1
/* DD5D4 80146ED4 00021080 */ sll $v0, $v0, 2
/* DD5D8 80146ED8 30420FFF */ andi $v0, $v0, 0xFFF
/* DD5DC 80146EDC 00021300 */ sll $v0, $v0, 12
/* DD5E0 80146EE0 00461025 */ or $v0, $v0, $a2
/* DD5E4 80146EE4 AC8D0040 */ sw $t5, 0x40($a0)
/* DD5E8 80146EE8 AC9E0044 */ sw $fp, 0x44($a0)
/* DD5EC 80146EEC AC820048 */ sw $v0, 0x48($a0)
/* DD5F0 80146EF0 8FAF0054 */ lw $t7, 0x54($sp)
/* DD5F4 80146EF4 24820058 */ addiu $v0, $a0, 0x58
/* DD5F8 80146EF8 00AF2821 */ addu $a1, $a1, $t7
/* DD5FC 80146EFC 30A50FFF */ andi $a1, $a1, 0xFFF
/* DD600 80146F00 00052B00 */ sll $a1, $a1, 12
/* DD604 80146F04 00A72825 */ or $a1, $a1, $a3
/* DD608 80146F08 AC85004C */ sw $a1, 0x4C($a0)
/* DD60C 80146F0C AE020000 */ sw $v0, 0x0($s0)
/* DD610 80146F10 24820060 */ addiu $v0, $a0, 0x60
/* DD614 80146F14 AC8E0050 */ sw $t6, 0x50($a0)
/* DD618 80146F18 AC800054 */ sw $zero, 0x54($a0)
/* DD61C 80146F1C AE020000 */ sw $v0, 0x0($s0)
/* DD620 80146F20 AC8D0058 */ sw $t5, 0x58($a0)
/* DD624 80146F24 AC9E005C */ sw $fp, 0x5C($a0)
/* DD628 80146F28 8FB70070 */ lw $s7, 0x70($sp)
/* DD62C 80146F2C 0277102A */ slt $v0, $s3, $s7
/* DD630 80146F30 1440FF66 */ bnez $v0, .L80146CCC
/* DD634 80146F34 02B1A821 */ addu $s5, $s5, $s1
.L80146F38:
/* DD638 80146F38 8FAF0038 */ lw $t7, 0x38($sp)
/* DD63C 80146F3C 11E000A5 */ beqz $t7, .L801471D4
/* DD640 80146F40 00000000 */ nop
/* DD644 80146F44 3C013ED6 */ lui $at, (0x3ED67744 >> 16)
/* DD648 80146F48 34217744 */ ori $at, $at, (0x3ED67744 & 0xFFFF)
/* DD64C 80146F4C 44810000 */ mtc1 $at, $f0
/* DD650 80146F50 44936000 */ mtc1 $s3, $f12
/* DD654 80146F54 00000000 */ nop
/* DD658 80146F58 46806320 */ cvt.s.w $f12, $f12
/* DD65C 80146F5C 46006302 */ mul.s $f12, $f12, $f0
/* DD660 80146F60 00000000 */ nop
/* DD664 80146F64 3C018015 */ lui $at, %hi(gBackroundWavePhase)
/* DD668 80146F68 C420F134 */ lwc1 $f0, %lo(gBackroundWavePhase)($at)
/* DD66C 80146F6C 460C0300 */ add.s $f12, $f0, $f12
/* DD670 80146F70 0C00A85B */ jal sin_rad
/* DD674 80146F74 AFB9006C */ sw $t9, 0x6C($sp)
/* DD678 80146F78 02330018 */ mult $s1, $s3
/* DD67C 80146F7C 3C014040 */ lui $at, (0x40400000 >> 16)
/* DD680 80146F80 44811000 */ mtc1 $at, $f2
/* DD684 80146F84 3C0A8007 */ lui $t2, %hi(gGameStatusPtr)
/* DD688 80146F88 8D4A419C */ lw $t2, %lo(gGameStatusPtr)($t2)
/* DD68C 80146F8C 8FB9006C */ lw $t9, 0x6C($sp)
/* DD690 80146F90 46020082 */ mul.s $f2, $f0, $f2
/* DD694 80146F94 00000000 */ nop
/* DD698 80146F98 85420152 */ lh $v0, 0x152($t2)
/* DD69C 80146F9C 85430150 */ lh $v1, 0x150($t2)
/* DD6A0 80146FA0 44820000 */ mtc1 $v0, $f0
/* DD6A4 80146FA4 00000000 */ nop
/* DD6A8 80146FA8 46800020 */ cvt.s.w $f0, $f0
/* DD6AC 80146FAC 3C028015 */ lui $v0, %hi(gBackroundTextureYOffset)
/* DD6B0 80146FB0 9442F130 */ lhu $v0, %lo(gBackroundTextureYOffset)($v0)
/* DD6B4 80146FB4 00006812 */ mflo $t5
/* DD6B8 80146FB8 004D2021 */ addu $a0, $v0, $t5
/* DD6BC 80146FBC 46020000 */ add.s $f0, $f0, $f2
/* DD6C0 80146FC0 00041400 */ sll $v0, $a0, 16
/* DD6C4 80146FC4 00021403 */ sra $v0, $v0, 16
/* DD6C8 80146FC8 46000000 */ add.s $f0, $f0, $f0
/* DD6CC 80146FCC 0062182A */ slt $v1, $v1, $v0
/* DD6D0 80146FD0 95420150 */ lhu $v0, 0x150($t2)
/* DD6D4 80146FD4 4600020D */ trunc.w.s $f8, $f0
/* DD6D8 80146FD8 44184000 */ mfc1 $t8, $f8
/* DD6DC 80146FDC 10600002 */ beqz $v1, .L80146FE8
/* DD6E0 80146FE0 0080602D */ daddu $t4, $a0, $zero
/* DD6E4 80146FE4 00826023 */ subu $t4, $a0, $v0
.L80146FE8:
/* DD6E8 80146FE8 3C07F548 */ lui $a3, (0xF5484A00 >> 16)
/* DD6EC 80146FEC 34E74A00 */ ori $a3, $a3, (0xF5484A00 & 0xFFFF)
/* DD6F0 80146FF0 3C050749 */ lui $a1, (0x749C000 >> 16)
/* DD6F4 80146FF4 34A5C000 */ ori $a1, $a1, (0x749C000 & 0xFFFF)
/* DD6F8 80146FF8 3C090049 */ lui $t1, (0x49C000 >> 16)
/* DD6FC 80146FFC 3529C000 */ ori $t1, $t1, (0x49C000 & 0xFFFF)
/* DD700 80147000 3C0B1000 */ lui $t3, (0x10000400 >> 16)
/* DD704 80147004 3C08800A */ lui $t0, %hi(gMainGfxPos)
/* DD708 80147008 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos)
/* DD70C 8014700C 356B0400 */ ori $t3, $t3, (0x10000400 & 0xFFFF)
/* DD710 80147010 2642FFFF */ addiu $v0, $s2, -0x1
/* DD714 80147014 30420FFF */ andi $v0, $v0, 0xFFF
/* DD718 80147018 3C03FD48 */ lui $v1, (0xFD480000 >> 16)
/* DD71C 8014701C 8D040000 */ lw $a0, 0x0($t0)
/* DD720 80147020 00431025 */ or $v0, $v0, $v1
/* DD724 80147024 0080302D */ daddu $a2, $a0, $zero
/* DD728 80147028 24840008 */ addiu $a0, $a0, 0x8
/* DD72C 8014702C AD040000 */ sw $a0, 0x0($t0)
/* DD730 80147030 ACC20000 */ sw $v0, 0x0($a2)
/* DD734 80147034 24820008 */ addiu $v0, $a0, 0x8
/* DD738 80147038 AD020000 */ sw $v0, 0x0($t0)
/* DD73C 8014703C 24820010 */ addiu $v0, $a0, 0x10
/* DD740 80147040 AD020000 */ sw $v0, 0x0($t0)
/* DD744 80147044 24820018 */ addiu $v0, $a0, 0x18
/* DD748 80147048 AD020000 */ sw $v0, 0x0($t0)
/* DD74C 8014704C 24820020 */ addiu $v0, $a0, 0x20
/* DD750 80147050 AD020000 */ sw $v0, 0x0($t0)
/* DD754 80147054 24820028 */ addiu $v0, $a0, 0x28
/* DD758 80147058 AD020000 */ sw $v0, 0x0($t0)
/* DD75C 8014705C 24820030 */ addiu $v0, $a0, 0x30
/* DD760 80147060 AD020000 */ sw $v0, 0x0($t0)
/* DD764 80147064 24820038 */ addiu $v0, $a0, 0x38
/* DD768 80147068 AD020000 */ sw $v0, 0x0($t0)
/* DD76C 8014706C 24820040 */ addiu $v0, $a0, 0x40
/* DD770 80147070 AD020000 */ sw $v0, 0x0($t0)
/* DD774 80147074 000C1400 */ sll $v0, $t4, 16
/* DD778 80147078 00021403 */ sra $v0, $v0, 16
/* DD77C 8014707C 24830048 */ addiu $v1, $a0, 0x48
/* DD780 80147080 02420018 */ mult $s2, $v0
/* DD784 80147084 AD030000 */ sw $v1, 0x0($t0)
/* DD788 80147088 8D420154 */ lw $v0, 0x154($t2)
/* DD78C 8014708C 24830050 */ addiu $v1, $a0, 0x50
/* DD790 80147090 AD030000 */ sw $v1, 0x0($t0)
/* DD794 80147094 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* DD798 80147098 00195080 */ sll $t2, $t9, 2
/* DD79C 8014709C 00007812 */ mflo $t7
/* DD7A0 801470A0 004F1021 */ addu $v0, $v0, $t7
/* DD7A4 801470A4 ACC20004 */ sw $v0, 0x4($a2)
/* DD7A8 801470A8 3C020700 */ lui $v0, (0x7000000 >> 16)
/* DD7AC 801470AC AC820004 */ sw $v0, 0x4($a0)
/* DD7B0 801470B0 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* DD7B4 801470B4 AC820008 */ sw $v0, 0x8($a0)
/* DD7B8 801470B8 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* DD7BC 801470BC AC870000 */ sw $a3, 0x0($a0)
/* DD7C0 801470C0 AC80000C */ sw $zero, 0xC($a0)
/* DD7C4 801470C4 AC820010 */ sw $v0, 0x10($a0)
/* DD7C8 801470C8 8FB70038 */ lw $s7, 0x38($sp)
/* DD7CC 801470CC 00183040 */ sll $a2, $t8, 1
/* DD7D0 801470D0 26E2FFFF */ addiu $v0, $s7, -0x1
/* DD7D4 801470D4 00021080 */ sll $v0, $v0, 2
/* DD7D8 801470D8 30420FFF */ andi $v0, $v0, 0xFFF
/* DD7DC 801470DC 00452825 */ or $a1, $v0, $a1
/* DD7E0 801470E0 AC830018 */ sw $v1, 0x18($a0)
/* DD7E4 801470E4 3C03F200 */ lui $v1, (0xF2000000 >> 16)
/* DD7E8 801470E8 00491025 */ or $v0, $v0, $t1
/* DD7EC 801470EC AC82002C */ sw $v0, 0x2C($a0)
/* DD7F0 801470F0 24C2FFFF */ addiu $v0, $a2, -0x1
/* DD7F4 801470F4 00591021 */ addu $v0, $v0, $t9
/* DD7F8 801470F8 00021080 */ sll $v0, $v0, 2
/* DD7FC 801470FC 30420FFF */ andi $v0, $v0, 0xFFF
/* DD800 80147100 00021300 */ sll $v0, $v0, 12
/* DD804 80147104 AC830028 */ sw $v1, 0x28($a0)
/* DD808 80147108 3C03E400 */ lui $v1, (0xE4000000 >> 16)
/* DD80C 8014710C 3C09E100 */ lui $t1, (0xE1000000 >> 16)
/* DD810 80147110 00CA3021 */ addu $a2, $a2, $t2
/* DD814 80147114 30C60FFF */ andi $a2, $a2, 0xFFF
/* DD818 80147118 00063300 */ sll $a2, $a2, 12
/* DD81C 8014711C AC850014 */ sw $a1, 0x14($a0)
/* DD820 80147120 AC80001C */ sw $zero, 0x1C($a0)
/* DD824 80147124 AC870020 */ sw $a3, 0x20($a0)
/* DD828 80147128 AC800024 */ sw $zero, 0x24($a0)
/* DD82C 8014712C 8FAF0030 */ lw $t7, 0x30($sp)
/* DD830 80147130 8FB70034 */ lw $s7, 0x34($sp)
/* DD834 80147134 25E5FFFF */ addiu $a1, $t7, -0x1
/* DD838 80147138 02E52821 */ addu $a1, $s7, $a1
/* DD83C 8014713C 00052880 */ sll $a1, $a1, 2
/* DD840 80147140 30A50FFF */ andi $a1, $a1, 0xFFF
/* DD844 80147144 00A32825 */ or $a1, $a1, $v1
/* DD848 80147148 00451025 */ or $v0, $v0, $a1
/* DD84C 8014714C AC820030 */ sw $v0, 0x30($a0)
/* DD850 80147150 31420FFF */ andi $v0, $t2, 0xFFF
/* DD854 80147154 00021300 */ sll $v0, $v0, 12
/* DD858 80147158 01AF3821 */ addu $a3, $t5, $t7
/* DD85C 8014715C 00073880 */ sll $a3, $a3, 2
/* DD860 80147160 30E70FFF */ andi $a3, $a3, 0xFFF
/* DD864 80147164 00471025 */ or $v0, $v0, $a3
/* DD868 80147168 AC820034 */ sw $v0, 0x34($a0)
/* DD86C 8014716C 00121140 */ sll $v0, $s2, 5
/* DD870 80147170 00181900 */ sll $v1, $t8, 4
/* DD874 80147174 00431023 */ subu $v0, $v0, $v1
/* DD878 80147178 00021400 */ sll $v0, $v0, 16
/* DD87C 8014717C 3C03F100 */ lui $v1, (0xF1000000 >> 16)
/* DD880 80147180 AC82003C */ sw $v0, 0x3C($a0)
/* DD884 80147184 02591021 */ addu $v0, $s2, $t9
/* DD888 80147188 2442FFFF */ addiu $v0, $v0, -0x1
/* DD88C 8014718C 00021080 */ sll $v0, $v0, 2
/* DD890 80147190 30420FFF */ andi $v0, $v0, 0xFFF
/* DD894 80147194 00021300 */ sll $v0, $v0, 12
/* DD898 80147198 00451025 */ or $v0, $v0, $a1
/* DD89C 8014719C 00C73025 */ or $a2, $a2, $a3
/* DD8A0 801471A0 AC890038 */ sw $t1, 0x38($a0)
/* DD8A4 801471A4 AC830040 */ sw $v1, 0x40($a0)
/* DD8A8 801471A8 AC8B0044 */ sw $t3, 0x44($a0)
/* DD8AC 801471AC AC820048 */ sw $v0, 0x48($a0)
/* DD8B0 801471B0 24820058 */ addiu $v0, $a0, 0x58
/* DD8B4 801471B4 AC86004C */ sw $a2, 0x4C($a0)
/* DD8B8 801471B8 AD020000 */ sw $v0, 0x0($t0)
/* DD8BC 801471BC 24820060 */ addiu $v0, $a0, 0x60
/* DD8C0 801471C0 AC890050 */ sw $t1, 0x50($a0)
/* DD8C4 801471C4 AC800054 */ sw $zero, 0x54($a0)
/* DD8C8 801471C8 AD020000 */ sw $v0, 0x0($t0)
/* DD8CC 801471CC AC830058 */ sw $v1, 0x58($a0)
/* DD8D0 801471D0 AC8B005C */ sw $t3, 0x5C($a0)
.L801471D4:
/* DD8D4 801471D4 8FBF00A4 */ lw $ra, 0xA4($sp)
/* DD8D8 801471D8 8FBE00A0 */ lw $fp, 0xA0($sp)
/* DD8DC 801471DC 8FB7009C */ lw $s7, 0x9C($sp)
/* DD8E0 801471E0 8FB60098 */ lw $s6, 0x98($sp)
/* DD8E4 801471E4 8FB50094 */ lw $s5, 0x94($sp)
/* DD8E8 801471E8 8FB40090 */ lw $s4, 0x90($sp)
/* DD8EC 801471EC 8FB3008C */ lw $s3, 0x8C($sp)
/* DD8F0 801471F0 8FB20088 */ lw $s2, 0x88($sp)
/* DD8F4 801471F4 8FB10084 */ lw $s1, 0x84($sp)
/* DD8F8 801471F8 8FB00080 */ lw $s0, 0x80($sp)
/* DD8FC 801471FC D7B600B0 */ ldc1 $f22, 0xB0($sp)
/* DD900 80147200 D7B400A8 */ ldc1 $f20, 0xA8($sp)
/* DD904 80147204 03E00008 */ jr $ra
/* DD908 80147208 27BD00B8 */ addiu $sp, $sp, 0xB8
### DECOMPILED C INSTRUCTIONS:
void appendGfx_background_texture(void) {
Camera* cam = &gCameras[gCurrentCameraID];
u16 flags = 0;
s32 fogR, fogG, fogB, fogA;
u8 r1, g1, b1, a1;
u8 r2, g2, b2;
u16 blendedR, blendedG, blendedB;
s32 i;
f32 theta, sinTheta, cosTheta, scrollValue, f5, waveOffset;
s32 bgMinX;
s32 bgMinY;
s32 bgMaxX;
s32 bgMaxY;
s32 lineHeight;
s32 numLines;
s32 extraHeight;
s32 bgXOffset;
s16 texOffsetY;
u8* newvar;
if (is_world_fog_enabled()) {
get_world_fog_color(&fogR, &fogG, &fogB, &fogA);
flags = 1;
fogA = gGameStatusPtr->backgroundDarkness;
}
switch (*gBackgroundFogModePtr) {
case FOG_MODE_0:
case FOG_MODE_1:
get_background_color_blend(&r1, &g1, &b1, &a1);
if (a1 != 0) {
flags |= 2;
}
break;
case FOG_MODE_2:
case FOG_MODE_3:
default:
get_model_env_color_parameters(&r1, &g1, &b1, &r2, &g2, &b2);
if (!(r1 == 255 && g1 == 255 && b1 == 255 && r2 == 0 && g2 == 0 && b2 == 0)) {
flags |= 4;
}
break;
}
switch (flags) {
case 0:
gGameStatusPtr->backgroundFlags &= ~BACKGROUND_FLAG_FOG;
break;
case 1:
gGameStatusPtr->backgroundFlags |= BACKGROUND_FLAG_FOG;
break;
case 2:
gGameStatusPtr->backgroundFlags |= BACKGROUND_FLAG_FOG;
fogR = r1;
fogG = g1;
fogB = b1;
fogA = a1;
break;
case 3:
gGameStatusPtr->backgroundFlags |= BACKGROUND_FLAG_FOG;
fogR = (fogR * (255 - a1) + r1 * a1) / 255;
fogG = (fogG * (255 - a1) + g1 * a1) / 255;
fogB = (fogB * (255 - a1) + b1 * a1) / 255;
fogA = (fogA * (255 - a1) + a1 * a1) / 255;
break;
case 4:
gGameStatusPtr->backgroundFlags |= BACKGROUND_FLAG_FOG;
break;
}
if (gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_FOG) {
switch (*gBackgroundFogModePtr) {
case FOG_MODE_0:
case FOG_MODE_1:
if (fogA == 255) {
for (i = 0; i < ARRAY_COUNT(gBackgroundPalette); i++) {
gBackgroundPalette[i] = 1;
}
} else {
for (i = 0; i < ARRAY_COUNT(gBackgroundPalette); i++) {
u16 palColor = gGameStatusPtr->backgroundPalette[i];
blendedB = blend_background_channel((palColor >> 1) & 0x1F, fogB >> 3, fogA);
blendedG = blend_background_channel((palColor >> 6) & 0x1F, fogG >> 3, fogA);
blendedR = blend_background_channel((palColor >> 11) & 0x1F, fogR >> 3, fogA);
gBackgroundPalette[i] = blendedB << 1 | blendedG << 6 | blendedR << 11 | 1;
}
}
break;
case FOG_MODE_2:
case FOG_MODE_3:
default:
for (i = 0; i < ARRAY_COUNT(gBackgroundPalette); i++) {
u16 palColor = gGameStatusPtr->backgroundPalette[i];
blendedB = (b2 >> 3) + ((((palColor >> 1) & 0x1F) * b1) >> 8);
blendedG = (g2 >> 3) + ((((palColor >> 6) & 0x1F) * g1) >> 8);
blendedR = (r2 >> 3) + ((((palColor >> 11) & 0x1F) * r1) >> 8);
if (blendedB > 0x1F) {
blendedB = 0x1F;
}
if (blendedG > 0x1F) {
blendedG = 0x1F;
}
if (blendedR > 0x1F) {
blendedR = 0x1F;
}
gBackgroundPalette[i] = blendedB << 1 | blendedG << 6 | blendedR << 11 | 1;
}
break;
}
}
theta = clamp_angle(-cam->trueRotation.x);
sinTheta = sin_deg(theta);
cosTheta = cos_deg(theta);
f5 = cosTheta * cam->lookAt_obj.x - sinTheta * cam->lookAt_obj.z + cam->leadAmount;
scrollValue = -f5 * 0.25f;
scrollValue += gGameStatusPtr->backgroundMaxX * theta * (1 / 90.0f);
if (fabsf(scrollValue - gBackroundLastScrollValue) < 0.3f) {
scrollValue = gBackroundLastScrollValue;
} else {
gBackroundLastScrollValue = scrollValue;
}
while (scrollValue < 0.0f) {
scrollValue += gGameStatusPtr->backgroundMaxX * 32;
}
bgXOffset =gGameStatusPtr->backgroundXOffset = ((s32)scrollValue) % gGameStatusPtr->backgroundMaxX;
bgMaxX = gGameStatusPtr->backgroundMaxX;
bgMaxY = gGameStatusPtr->backgroundMaxY;
bgMinX = gGameStatusPtr->backgroundMinX;
bgMinY = gGameStatusPtr->backgroundMinY;
gDPPipeSync(gMainGfxPos++);
gDPSetCycleType(gMainGfxPos++, G_CYC_COPY);
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGB, G_CC_DECALRGB);
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
gDPPipeSync(gMainGfxPos++);
if (!(gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_FOG)) {
gDPLoadTLUT_pal256(gMainGfxPos++, gGameStatusPtr->backgroundPalette);
} else {
gDPLoadTLUT_pal256(gMainGfxPos++, gBackgroundPalette);
}
if (!gBackroundWaveEnabled) {
lineHeight = 2048 / gGameStatusPtr->backgroundMaxX;
numLines = gGameStatusPtr->backgroundMaxY / lineHeight;
extraHeight = gGameStatusPtr->backgroundMaxY % lineHeight;
for (i = 0; i < numLines; i++) {
texOffsetY = gBackroundTextureYOffset + lineHeight * i;
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
texOffsetY -= gGameStatusPtr->backgroundMaxY;
}
gDPLoadTextureTile(gMainGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY,
G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, 6,
0, 0, 295, 5, 0,
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gMainGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4,
(bgXOffset + bgMinX - 1) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4,
G_TX_RENDERTILE, (bgMaxX - bgXOffset) * 32, 0, 4096, 1024);
gSPTextureRectangle(gMainGfxPos++, (bgXOffset + bgMinX) * 4, (lineHeight * i + bgMinY) * 4,
(bgMaxX + bgMinX - 1) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4,
G_TX_RENDERTILE, 0, 0, 4096, 1024);
}
if (extraHeight != 0) {
texOffsetY = gBackroundTextureYOffset + lineHeight * i;
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
texOffsetY -= gGameStatusPtr->backgroundMaxY;
}
gDPLoadTextureTile(gMainGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY,
G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, extraHeight,
0, 0, 295, extraHeight - 1, 0,
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gMainGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4,
(bgXOffset + bgMinX - 1) * 4, (bgMaxY - 1 + bgMinY) * 4,
G_TX_RENDERTILE, (bgMaxX - bgXOffset) * 32, 0, 4096, 1024);
gSPTextureRectangle(gMainGfxPos++, (bgXOffset + bgMinX) * 4, (lineHeight * i + bgMinY) * 4,
(bgMaxX + bgMinX - 1) * 4, (bgMaxY - 1 + bgMinY) * 4,
G_TX_RENDERTILE, 0, 0, 4096, 1024);
}
} else {
lineHeight = 6;
numLines = gGameStatusPtr->backgroundMaxY / lineHeight;
extraHeight = gGameStatusPtr->backgroundMaxY % lineHeight;
gBackroundWavePhase += TAU / 60; // 60 frames period
for (i = 0; i < numLines; i++) {
waveOffset = sin_rad(gBackroundWavePhase + i * (TAU / 15)) * 3.0f;
bgXOffset = 2.0f * (gGameStatusPtr->backgroundXOffset + waveOffset);
texOffsetY = gBackroundTextureYOffset + lineHeight * i;
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
texOffsetY -= gGameStatusPtr->backgroundMaxY;
}
gDPLoadTextureTile(gMainGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY,
G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, 6,
0, 0, 295, 5, 0,
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gMainGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4,
(2 * bgXOffset + (bgMinX - 1)) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4,
G_TX_RENDERTILE, bgMaxX * 32 - bgXOffset * 16, 0, 4096, 1024);
gSPTextureRectangle(gMainGfxPos++, bgXOffset * 2 + bgMinX * 4, (lineHeight * i + bgMinY) * 4,
(bgMaxX + bgMinX - 1) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4,
G_TX_RENDERTILE, 0, 0, 4096, 1024);
}
if (extraHeight != 0) {
waveOffset = sin_rad(gBackroundWavePhase + i * (TAU / 15)) * 3.0f;
bgXOffset = 2.0f * (gGameStatusPtr->backgroundXOffset + waveOffset);
texOffsetY = gBackroundTextureYOffset + lineHeight * i;
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
texOffsetY -= gGameStatusPtr->backgroundMaxY;
}
gDPLoadTextureTile(gMainGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY,
G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, extraHeight,
0, 0, 295, extraHeight - 1, 0,
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gMainGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4,
(2 * bgXOffset + (bgMinX - 1)) * 4, (bgMaxY - 1 + bgMinY) * 4, // @bug xh = 2 * bgXOffset + (bgMinX - 1) * 4
G_TX_RENDERTILE, bgMaxX * 32 - bgXOffset * 16, 0, 4096, 1024);
gSPTextureRectangle(gMainGfxPos++, bgXOffset * 2 + bgMinX * 4, (lineHeight * i + bgMinY) * 4,
(bgMaxX + bgMinX - 1) * 4, (bgMaxY - 1 + bgMinY) * 4, // @bug xh = 2 * bgXOffset + (bgMinX - 1) * 4
G_TX_RENDERTILE, 0, 0, 4096, 1024);
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel _render_transition_stencil
/* CD180 80136A80 27BDFF88 */ addiu $sp, $sp, -0x78
/* CD184 80136A84 F7B80060 */ sdc1 $f24, 0x60($sp)
/* CD188 80136A88 4485C000 */ mtc1 $a1, $f24
/* CD18C 80136A8C 3C050001 */ lui $a1, (0x11630 >> 16)
/* CD190 80136A90 44800000 */ mtc1 $zero, $f0
/* CD194 80136A94 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* CD198 80136A98 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* CD19C 80136A9C 34A51630 */ ori $a1, $a1, (0x11630 & 0xFFFF)
/* CD1A0 80136AA0 A3A40020 */ sb $a0, 0x20($sp)
/* CD1A4 80136AA4 3C04800B */ lui $a0, %hi(gCameras)
/* CD1A8 80136AA8 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* CD1AC 80136AAC AFBF004C */ sw $ra, 0x4C($sp)
/* CD1B0 80136AB0 AFBE0048 */ sw $fp, 0x48($sp)
/* CD1B4 80136AB4 AFB70044 */ sw $s7, 0x44($sp)
/* CD1B8 80136AB8 AFB60040 */ sw $s6, 0x40($sp)
/* CD1BC 80136ABC AFB5003C */ sw $s5, 0x3C($sp)
/* CD1C0 80136AC0 AFB40038 */ sw $s4, 0x38($sp)
/* CD1C4 80136AC4 AFB30034 */ sw $s3, 0x34($sp)
/* CD1C8 80136AC8 AFB20030 */ sw $s2, 0x30($sp)
/* CD1CC 80136ACC AFB1002C */ sw $s1, 0x2C($sp)
/* CD1D0 80136AD0 AFB00028 */ sw $s0, 0x28($sp)
/* CD1D4 80136AD4 F7BC0070 */ sdc1 $f28, 0x70($sp)
/* CD1D8 80136AD8 F7BA0068 */ sdc1 $f26, 0x68($sp)
/* CD1DC 80136ADC F7B60058 */ sdc1 $f22, 0x58($sp)
/* CD1E0 80136AE0 F7B40050 */ sdc1 $f20, 0x50($sp)
/* CD1E4 80136AE4 00031080 */ sll $v0, $v1, 2
/* CD1E8 80136AE8 00431021 */ addu $v0, $v0, $v1
/* CD1EC 80136AEC 00021080 */ sll $v0, $v0, 2
/* CD1F0 80136AF0 00431023 */ subu $v0, $v0, $v1
/* CD1F4 80136AF4 000218C0 */ sll $v1, $v0, 3
/* CD1F8 80136AF8 00431021 */ addu $v0, $v0, $v1
/* CD1FC 80136AFC 000210C0 */ sll $v0, $v0, 3
/* CD200 80136B00 00444821 */ addu $t1, $v0, $a0
/* CD204 80136B04 3C03800A */ lui $v1, %hi(gDisplayContext)
/* CD208 80136B08 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* CD20C 80136B0C 4600C032 */ c.eq.s $f24, $f0
/* CD210 80136B10 00000000 */ nop
/* CD214 80136B14 4501048B */ bc1t .L80137D44
/* CD218 80136B18 0065F021 */ addu $fp, $v1, $a1
/* CD21C 80136B1C 10C0000A */ beqz $a2, .L80136B48
/* CD220 80136B20 0000A82D */ daddu $s5, $zero, $zero
/* CD224 80136B24 90D30000 */ lbu $s3, 0x0($a2)
/* CD228 80136B28 90D40001 */ lbu $s4, 0x1($a2)
/* CD22C 80136B2C 90D50002 */ lbu $s5, 0x2($a2)
/* CD230 80136B30 8CD10004 */ lw $s1, 0x4($a2)
/* CD234 80136B34 8CD20008 */ lw $s2, 0x8($a2)
/* CD238 80136B38 8CD6000C */ lw $s6, 0xC($a2)
/* CD23C 80136B3C 8CD70010 */ lw $s7, 0x10($a2)
/* CD240 80136B40 0804DAD9 */ j .L80136B64
/* CD244 80136B44 C4DC0014 */ lwc1 $f28, 0x14($a2)
.L80136B48:
/* CD248 80136B48 02A0A02D */ daddu $s4, $s5, $zero
/* CD24C 80136B4C 02A0982D */ daddu $s3, $s5, $zero
/* CD250 80136B50 0000B82D */ daddu $s7, $zero, $zero
/* CD254 80136B54 02E0B02D */ daddu $s6, $s7, $zero
/* CD258 80136B58 02E0902D */ daddu $s2, $s7, $zero
/* CD25C 80136B5C 02E0882D */ daddu $s1, $s7, $zero
/* CD260 80136B60 46000706 */ mov.s $f28, $f0
.L80136B64:
/* CD264 80136B64 93A30020 */ lbu $v1, 0x20($sp)
/* CD268 80136B68 10600005 */ beqz $v1, .L80136B80
/* CD26C 80136B6C 24020001 */ addiu $v0, $zero, 0x1
/* CD270 80136B70 10620070 */ beq $v1, $v0, .L80136D34
/* CD274 80136B74 3C04E300 */ lui $a0, (0xE3001801 >> 16)
/* CD278 80136B78 0804DBCA */ j .L80136F28
/* CD27C 80136B7C 00000000 */ nop
.L80136B80:
/* CD280 80136B80 3C04E300 */ lui $a0, (0xE3001801 >> 16)
/* CD284 80136B84 34841801 */ ori $a0, $a0, (0xE3001801 & 0xFFFF)
/* CD288 80136B88 3C05E300 */ lui $a1, (0xE3001A01 >> 16)
/* CD28C 80136B8C 34A51A01 */ ori $a1, $a1, (0xE3001A01 & 0xFFFF)
/* CD290 80136B90 3C06E300 */ lui $a2, (0xE3000A01 >> 16)
/* CD294 80136B94 3C08800A */ lui $t0, %hi(gMainGfxPos)
/* CD298 80136B98 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos)
/* CD29C 80136B9C 34C60A01 */ ori $a2, $a2, (0xE3000A01 & 0xFFFF)
/* CD2A0 80136BA0 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* CD2A4 80136BA4 8D070000 */ lw $a3, 0x0($t0)
/* CD2A8 80136BA8 3C01437F */ lui $at, (0x437F0000 >> 16)
/* CD2AC 80136BAC 44810000 */ mtc1 $at, $f0
/* CD2B0 80136BB0 00E0182D */ daddu $v1, $a3, $zero
/* CD2B4 80136BB4 24E70008 */ addiu $a3, $a3, 0x8
/* CD2B8 80136BB8 AD070000 */ sw $a3, 0x0($t0)
/* CD2BC 80136BBC AC620000 */ sw $v0, 0x0($v1)
/* CD2C0 80136BC0 24E20008 */ addiu $v0, $a3, 0x8
/* CD2C4 80136BC4 AC600004 */ sw $zero, 0x4($v1)
/* CD2C8 80136BC8 AD020000 */ sw $v0, 0x0($t0)
/* CD2CC 80136BCC 24E20010 */ addiu $v0, $a3, 0x10
/* CD2D0 80136BD0 ACE40000 */ sw $a0, 0x0($a3)
/* CD2D4 80136BD4 ACE00004 */ sw $zero, 0x4($a3)
/* CD2D8 80136BD8 AD020000 */ sw $v0, 0x0($t0)
/* CD2DC 80136BDC 24E20018 */ addiu $v0, $a3, 0x18
/* CD2E0 80136BE0 4600C032 */ c.eq.s $f24, $f0
/* CD2E4 80136BE4 ACE50008 */ sw $a1, 0x8($a3)
/* CD2E8 80136BE8 ACE0000C */ sw $zero, 0xC($a3)
/* CD2EC 80136BEC AD020000 */ sw $v0, 0x0($t0)
/* CD2F0 80136BF0 ACE60010 */ sw $a2, 0x10($a3)
/* CD2F4 80136BF4 45000006 */ bc1f .L80136C10
/* CD2F8 80136BF8 ACE00014 */ sw $zero, 0x14($a3)
/* CD2FC 80136BFC 3C04E200 */ lui $a0, (0xE200001C >> 16)
/* CD300 80136C00 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF)
/* CD304 80136C04 3C030F0A */ lui $v1, (0xF0A4300 >> 16)
/* CD308 80136C08 0804DB08 */ j .L80136C20
/* CD30C 80136C0C 34634300 */ ori $v1, $v1, (0xF0A4300 & 0xFFFF)
.L80136C10:
/* CD310 80136C10 3C04E200 */ lui $a0, (0xE200001C >> 16)
/* CD314 80136C14 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF)
/* CD318 80136C18 3C030050 */ lui $v1, (0x504340 >> 16)
/* CD31C 80136C1C 34634340 */ ori $v1, $v1, (0x504340 & 0xFFFF)
.L80136C20:
/* CD320 80136C20 24E20020 */ addiu $v0, $a3, 0x20
/* CD324 80136C24 AD020000 */ sw $v0, 0x0($t0)
/* CD328 80136C28 ACE40018 */ sw $a0, 0x18($a3)
/* CD32C 80136C2C ACE3001C */ sw $v1, 0x1C($a3)
/* CD330 80136C30 3C06FCFF */ lui $a2, (0xFCFFFFFF >> 16)
/* CD334 80136C34 34C6FFFF */ ori $a2, $a2, (0xFCFFFFFF & 0xFFFF)
/* CD338 80136C38 3C05FFFD */ lui $a1, (0xFFFDF6FB >> 16)
/* CD33C 80136C3C 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* CD340 80136C40 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* CD344 80136C44 34A5F6FB */ ori $a1, $a1, (0xFFFDF6FB & 0xFFFF)
/* CD348 80136C48 8C830000 */ lw $v1, 0x0($a0)
/* CD34C 80136C4C 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* CD350 80136C50 44810000 */ mtc1 $at, $f0
/* CD354 80136C54 0060102D */ daddu $v0, $v1, $zero
/* CD358 80136C58 24630008 */ addiu $v1, $v1, 0x8
/* CD35C 80136C5C AC830000 */ sw $v1, 0x0($a0)
/* CD360 80136C60 AC460000 */ sw $a2, 0x0($v0)
/* CD364 80136C64 AC450004 */ sw $a1, 0x4($v0)
/* CD368 80136C68 24620008 */ addiu $v0, $v1, 0x8
/* CD36C 80136C6C AC820000 */ sw $v0, 0x0($a0)
/* CD370 80136C70 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* CD374 80136C74 246A0004 */ addiu $t2, $v1, 0x4
/* CD378 80136C78 AC620000 */ sw $v0, 0x0($v1)
/* CD37C 80136C7C 00131600 */ sll $v0, $s3, 24
/* CD380 80136C80 00141C00 */ sll $v1, $s4, 16
/* CD384 80136C84 00431025 */ or $v0, $v0, $v1
/* CD388 80136C88 00151A00 */ sll $v1, $s5, 8
/* CD38C 80136C8C 4618003E */ c.le.s $f0, $f24
/* CD390 80136C90 00000000 */ nop
/* CD394 80136C94 45010005 */ bc1t .L80136CAC
/* CD398 80136C98 00434825 */ or $t1, $v0, $v1
/* CD39C 80136C9C 4600C20D */ trunc.w.s $f8, $f24
/* CD3A0 80136CA0 44054000 */ mfc1 $a1, $f8
/* CD3A4 80136CA4 0804DB32 */ j .L80136CC8
/* CD3A8 80136CA8 3C060050 */ lui $a2, (0x5003C0 >> 16)
.L80136CAC:
/* CD3AC 80136CAC 4600C001 */ sub.s $f0, $f24, $f0
/* CD3B0 80136CB0 3C028000 */ lui $v0, (0x80000000 >> 16)
/* CD3B4 80136CB4 4600020D */ trunc.w.s $f8, $f0
/* CD3B8 80136CB8 44054000 */ mfc1 $a1, $f8
/* CD3BC 80136CBC 00000000 */ nop
/* CD3C0 80136CC0 00A22825 */ or $a1, $a1, $v0
/* CD3C4 80136CC4 3C060050 */ lui $a2, (0x5003C0 >> 16)
.L80136CC8:
/* CD3C8 80136CC8 34C603C0 */ ori $a2, $a2, (0x5003C0 & 0xFFFF)
/* CD3CC 80136CCC 3C07F64F */ lui $a3, (0xF64FC3BC >> 16)
/* CD3D0 80136CD0 34E7C3BC */ ori $a3, $a3, (0xF64FC3BC & 0xFFFF)
/* CD3D4 80136CD4 3C08E300 */ lui $t0, (0xE3001801 >> 16)
/* CD3D8 80136CD8 35081801 */ ori $t0, $t0, (0xE3001801 & 0xFFFF)
/* CD3DC 80136CDC 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* CD3E0 80136CE0 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* CD3E4 80136CE4 30A200FF */ andi $v0, $a1, 0xFF
/* CD3E8 80136CE8 8C830000 */ lw $v1, 0x0($a0)
/* CD3EC 80136CEC 01221025 */ or $v0, $t1, $v0
/* CD3F0 80136CF0 AD420000 */ sw $v0, 0x0($t2)
/* CD3F4 80136CF4 3C02ED00 */ lui $v0, (0xED000000 >> 16)
/* CD3F8 80136CF8 0060282D */ daddu $a1, $v1, $zero
/* CD3FC 80136CFC 24630008 */ addiu $v1, $v1, 0x8
/* CD400 80136D00 AC830000 */ sw $v1, 0x0($a0)
/* CD404 80136D04 ACA20000 */ sw $v0, 0x0($a1)
/* CD408 80136D08 24620008 */ addiu $v0, $v1, 0x8
/* CD40C 80136D0C ACA60004 */ sw $a2, 0x4($a1)
/* CD410 80136D10 AC820000 */ sw $v0, 0x0($a0)
/* CD414 80136D14 24620010 */ addiu $v0, $v1, 0x10
/* CD418 80136D18 AC670000 */ sw $a3, 0x0($v1)
/* CD41C 80136D1C AC600004 */ sw $zero, 0x4($v1)
/* CD420 80136D20 AC820000 */ sw $v0, 0x0($a0)
/* CD424 80136D24 240200C0 */ addiu $v0, $zero, 0xC0
/* CD428 80136D28 AC680008 */ sw $t0, 0x8($v1)
/* CD42C 80136D2C 0804DF51 */ j .L80137D44
/* CD430 80136D30 AC62000C */ sw $v0, 0xC($v1)
.L80136D34:
/* CD434 80136D34 34841801 */ ori $a0, $a0, (0xE3001801 & 0xFFFF)
/* CD438 80136D38 3C05E300 */ lui $a1, (0xE3001A01 >> 16)
/* CD43C 80136D3C 34A51A01 */ ori $a1, $a1, (0xE3001A01 & 0xFFFF)
/* CD440 80136D40 3C06E300 */ lui $a2, (0xE3000A01 >> 16)
/* CD444 80136D44 3C08800A */ lui $t0, %hi(gMainGfxPos)
/* CD448 80136D48 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos)
/* CD44C 80136D4C 34C60A01 */ ori $a2, $a2, (0xE3000A01 & 0xFFFF)
/* CD450 80136D50 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* CD454 80136D54 8D070000 */ lw $a3, 0x0($t0)
/* CD458 80136D58 3C01437F */ lui $at, (0x437F0000 >> 16)
/* CD45C 80136D5C 44810000 */ mtc1 $at, $f0
/* CD460 80136D60 00E0182D */ daddu $v1, $a3, $zero
/* CD464 80136D64 24E70008 */ addiu $a3, $a3, 0x8
/* CD468 80136D68 AD070000 */ sw $a3, 0x0($t0)
/* CD46C 80136D6C AC620000 */ sw $v0, 0x0($v1)
/* CD470 80136D70 24E20008 */ addiu $v0, $a3, 0x8
/* CD474 80136D74 AC600004 */ sw $zero, 0x4($v1)
/* CD478 80136D78 AD020000 */ sw $v0, 0x0($t0)
/* CD47C 80136D7C 24E20010 */ addiu $v0, $a3, 0x10
/* CD480 80136D80 ACE40000 */ sw $a0, 0x0($a3)
/* CD484 80136D84 ACE00004 */ sw $zero, 0x4($a3)
/* CD488 80136D88 AD020000 */ sw $v0, 0x0($t0)
/* CD48C 80136D8C 24E20018 */ addiu $v0, $a3, 0x18
/* CD490 80136D90 4600C032 */ c.eq.s $f24, $f0
/* CD494 80136D94 ACE50008 */ sw $a1, 0x8($a3)
/* CD498 80136D98 ACE0000C */ sw $zero, 0xC($a3)
/* CD49C 80136D9C AD020000 */ sw $v0, 0x0($t0)
/* CD4A0 80136DA0 ACE60010 */ sw $a2, 0x10($a3)
/* CD4A4 80136DA4 45000006 */ bc1f .L80136DC0
/* CD4A8 80136DA8 ACE00014 */ sw $zero, 0x14($a3)
/* CD4AC 80136DAC 3C04E200 */ lui $a0, (0xE200001C >> 16)
/* CD4B0 80136DB0 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF)
/* CD4B4 80136DB4 3C030F0A */ lui $v1, (0xF0A4300 >> 16)
/* CD4B8 80136DB8 0804DB74 */ j .L80136DD0
/* CD4BC 80136DBC 34634300 */ ori $v1, $v1, (0xF0A4300 & 0xFFFF)
.L80136DC0:
/* CD4C0 80136DC0 3C04E200 */ lui $a0, (0xE200001C >> 16)
/* CD4C4 80136DC4 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF)
/* CD4C8 80136DC8 3C030050 */ lui $v1, (0x504340 >> 16)
/* CD4CC 80136DCC 34634340 */ ori $v1, $v1, (0x504340 & 0xFFFF)
.L80136DD0:
/* CD4D0 80136DD0 24E20020 */ addiu $v0, $a3, 0x20
/* CD4D4 80136DD4 AD020000 */ sw $v0, 0x0($t0)
/* CD4D8 80136DD8 ACE40018 */ sw $a0, 0x18($a3)
/* CD4DC 80136DDC ACE3001C */ sw $v1, 0x1C($a3)
/* CD4E0 80136DE0 3C06FCFF */ lui $a2, (0xFCFFFFFF >> 16)
/* CD4E4 80136DE4 34C6FFFF */ ori $a2, $a2, (0xFCFFFFFF & 0xFFFF)
/* CD4E8 80136DE8 3C05FFFD */ lui $a1, (0xFFFDF6FB >> 16)
/* CD4EC 80136DEC 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* CD4F0 80136DF0 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* CD4F4 80136DF4 34A5F6FB */ ori $a1, $a1, (0xFFFDF6FB & 0xFFFF)
/* CD4F8 80136DF8 8C830000 */ lw $v1, 0x0($a0)
/* CD4FC 80136DFC 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* CD500 80136E00 44810000 */ mtc1 $at, $f0
/* CD504 80136E04 0060102D */ daddu $v0, $v1, $zero
/* CD508 80136E08 24630008 */ addiu $v1, $v1, 0x8
/* CD50C 80136E0C AC830000 */ sw $v1, 0x0($a0)
/* CD510 80136E10 AC460000 */ sw $a2, 0x0($v0)
/* CD514 80136E14 AC450004 */ sw $a1, 0x4($v0)
/* CD518 80136E18 24620008 */ addiu $v0, $v1, 0x8
/* CD51C 80136E1C AC820000 */ sw $v0, 0x0($a0)
/* CD520 80136E20 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* CD524 80136E24 24680004 */ addiu $t0, $v1, 0x4
/* CD528 80136E28 AC620000 */ sw $v0, 0x0($v1)
/* CD52C 80136E2C 00131600 */ sll $v0, $s3, 24
/* CD530 80136E30 00141C00 */ sll $v1, $s4, 16
/* CD534 80136E34 00431025 */ or $v0, $v0, $v1
/* CD538 80136E38 00151A00 */ sll $v1, $s5, 8
/* CD53C 80136E3C 4618003E */ c.le.s $f0, $f24
/* CD540 80136E40 00000000 */ nop
/* CD544 80136E44 45010005 */ bc1t .L80136E5C
/* CD548 80136E48 00431825 */ or $v1, $v0, $v1
/* CD54C 80136E4C 4600C20D */ trunc.w.s $f8, $f24
/* CD550 80136E50 44104000 */ mfc1 $s0, $f8
/* CD554 80136E54 0804DB9E */ j .L80136E78
/* CD558 80136E58 3C040050 */ lui $a0, (0x5003C0 >> 16)
.L80136E5C:
/* CD55C 80136E5C 4600C001 */ sub.s $f0, $f24, $f0
/* CD560 80136E60 3C028000 */ lui $v0, (0x80000000 >> 16)
/* CD564 80136E64 4600020D */ trunc.w.s $f8, $f0
/* CD568 80136E68 44104000 */ mfc1 $s0, $f8
/* CD56C 80136E6C 00000000 */ nop
/* CD570 80136E70 02028025 */ or $s0, $s0, $v0
/* CD574 80136E74 3C040050 */ lui $a0, (0x5003C0 >> 16)
.L80136E78:
/* CD578 80136E78 348403C0 */ ori $a0, $a0, (0x5003C0 & 0xFFFF)
/* CD57C 80136E7C 3C07E300 */ lui $a3, (0xE3001801 >> 16)
/* CD580 80136E80 34E71801 */ ori $a3, $a3, (0xE3001801 & 0xFFFF)
/* CD584 80136E84 3C06800A */ lui $a2, %hi(gMainGfxPos)
/* CD588 80136E88 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos)
/* CD58C 80136E8C 320200FF */ andi $v0, $s0, 0xFF
/* CD590 80136E90 8CC50000 */ lw $a1, 0x0($a2)
/* CD594 80136E94 00621025 */ or $v0, $v1, $v0
/* CD598 80136E98 AD020000 */ sw $v0, 0x0($t0)
/* CD59C 80136E9C 3C02ED00 */ lui $v0, (0xED000000 >> 16)
/* CD5A0 80136EA0 00A0182D */ daddu $v1, $a1, $zero
/* CD5A4 80136EA4 24A50008 */ addiu $a1, $a1, 0x8
/* CD5A8 80136EA8 ACC50000 */ sw $a1, 0x0($a2)
/* CD5AC 80136EAC AC620000 */ sw $v0, 0x0($v1)
/* CD5B0 80136EB0 AC640004 */ sw $a0, 0x4($v1)
/* CD5B4 80136EB4 8523000E */ lh $v1, 0xE($t1)
/* CD5B8 80136EB8 8524000A */ lh $a0, 0xA($t1)
/* CD5BC 80136EBC 24A20008 */ addiu $v0, $a1, 0x8
/* CD5C0 80136EC0 ACC20000 */ sw $v0, 0x0($a2)
/* CD5C4 80136EC4 85220010 */ lh $v0, 0x10($t1)
/* CD5C8 80136EC8 00641821 */ addu $v1, $v1, $a0
/* CD5CC 80136ECC 306303FF */ andi $v1, $v1, 0x3FF
/* CD5D0 80136ED0 8524000C */ lh $a0, 0xC($t1)
/* CD5D4 80136ED4 00031B80 */ sll $v1, $v1, 14
/* CD5D8 80136ED8 00441021 */ addu $v0, $v0, $a0
/* CD5DC 80136EDC 304203FF */ andi $v0, $v0, 0x3FF
/* CD5E0 80136EE0 00021080 */ sll $v0, $v0, 2
/* CD5E4 80136EE4 3C04F600 */ lui $a0, (0xF6000000 >> 16)
/* CD5E8 80136EE8 00441025 */ or $v0, $v0, $a0
/* CD5EC 80136EEC 00621825 */ or $v1, $v1, $v0
/* CD5F0 80136EF0 ACA30000 */ sw $v1, 0x0($a1)
/* CD5F4 80136EF4 9522000E */ lhu $v0, 0xE($t1)
/* CD5F8 80136EF8 95240010 */ lhu $a0, 0x10($t1)
/* CD5FC 80136EFC 24A30010 */ addiu $v1, $a1, 0x10
/* CD600 80136F00 ACC30000 */ sw $v1, 0x0($a2)
/* CD604 80136F04 240300C0 */ addiu $v1, $zero, 0xC0
/* CD608 80136F08 ACA70008 */ sw $a3, 0x8($a1)
/* CD60C 80136F0C ACA3000C */ sw $v1, 0xC($a1)
/* CD610 80136F10 304203FF */ andi $v0, $v0, 0x3FF
/* CD614 80136F14 00021380 */ sll $v0, $v0, 14
/* CD618 80136F18 308403FF */ andi $a0, $a0, 0x3FF
/* CD61C 80136F1C 00042080 */ sll $a0, $a0, 2
/* CD620 80136F20 0804DF50 */ j .L80137D40
/* CD624 80136F24 00441025 */ or $v0, $v0, $a0
.L80136F28:
/* CD628 80136F28 3C108007 */ lui $s0, %hi(gMatrixListPos)
/* CD62C 80136F2C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos)
/* CD630 80136F30 44800000 */ mtc1 $zero, $f0
/* CD634 80136F34 3C0643A0 */ lui $a2, (0x43A00000 >> 16)
/* CD638 80136F38 96040000 */ lhu $a0, 0x0($s0)
/* CD63C 80136F3C 3C01C47A */ lui $at, (0xC47A0000 >> 16)
/* CD640 80136F40 44811000 */ mtc1 $at, $f2
/* CD644 80136F44 3C01447A */ lui $at, (0x447A0000 >> 16)
/* CD648 80136F48 44812000 */ mtc1 $at, $f4
/* CD64C 80136F4C 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* CD650 80136F50 44813000 */ mtc1 $at, $f6
/* CD654 80136F54 00042180 */ sll $a0, $a0, 6
/* CD658 80136F58 44050000 */ mfc1 $a1, $f0
/* CD65C 80136F5C 3C014370 */ lui $at, (0x43700000 >> 16)
/* CD660 80136F60 44810000 */ mtc1 $at, $f0
/* CD664 80136F64 03C42021 */ addu $a0, $fp, $a0
/* CD668 80136F68 E7A20014 */ swc1 $f2, 0x14($sp)
/* CD66C 80136F6C E7A40018 */ swc1 $f4, 0x18($sp)
/* CD670 80136F70 E7A6001C */ swc1 $f6, 0x1C($sp)
/* CD674 80136F74 00A0382D */ daddu $a3, $a1, $zero
/* CD678 80136F78 0C018E90 */ jal guOrtho
/* CD67C 80136F7C E7A00010 */ swc1 $f0, 0x10($sp)
/* CD680 80136F80 3C06DA38 */ lui $a2, (0xDA380007 >> 16)
/* CD684 80136F84 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* CD688 80136F88 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* CD68C 80136F8C 34C60007 */ ori $a2, $a2, (0xDA380007 & 0xFFFF)
/* CD690 80136F90 8C830000 */ lw $v1, 0x0($a0)
/* CD694 80136F94 96020000 */ lhu $v0, 0x0($s0)
/* CD698 80136F98 0060282D */ daddu $a1, $v1, $zero
/* CD69C 80136F9C 24630008 */ addiu $v1, $v1, 0x8
/* CD6A0 80136FA0 AC830000 */ sw $v1, 0x0($a0)
/* CD6A4 80136FA4 24430001 */ addiu $v1, $v0, 0x1
/* CD6A8 80136FA8 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CD6AC 80136FAC 00021180 */ sll $v0, $v0, 6
/* CD6B0 80136FB0 03C21021 */ addu $v0, $fp, $v0
/* CD6B4 80136FB4 ACA60000 */ sw $a2, 0x0($a1)
/* CD6B8 80136FB8 A6030000 */ sh $v1, 0x0($s0)
/* CD6BC 80136FBC ACA20004 */ sw $v0, 0x4($a1)
/* CD6C0 80136FC0 93A20020 */ lbu $v0, 0x20($sp)
/* CD6C4 80136FC4 2443FFFE */ addiu $v1, $v0, -0x2
/* CD6C8 80136FC8 2C62000E */ sltiu $v0, $v1, 0xE
/* CD6CC 80136FCC 1040034C */ beqz $v0, .L80137D00
/* CD6D0 80136FD0 00031080 */ sll $v0, $v1, 2
/* CD6D4 80136FD4 3C018015 */ lui $at, %hi(jtbl_80150EA0)
/* CD6D8 80136FD8 00220821 */ addu $at, $at, $v0
/* CD6DC 80136FDC 8C220EA0 */ lw $v0, %lo(jtbl_80150EA0)($at)
/* CD6E0 80136FE0 00400008 */ jr $v0
/* CD6E4 80136FE4 00000000 */ nop
glabel .L80136FE8
/* CD6E8 80136FE8 240400A0 */ addiu $a0, $zero, 0xA0
/* CD6EC 80136FEC 24050078 */ addiu $a1, $zero, 0x78
/* CD6F0 80136FF0 0260382D */ daddu $a3, $s3, $zero
/* CD6F4 80136FF4 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* CD6F8 80136FF8 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* CD6FC 80136FFC 461CC002 */ mul.s $f0, $f24, $f28
/* CD700 80137000 00000000 */ nop
/* CD704 80137004 8C620000 */ lw $v0, 0x0($v1)
/* CD708 80137008 4406C000 */ mfc1 $a2, $f24
/* CD70C 8013700C 3C01437F */ lui $at, (0x437F0000 >> 16)
/* CD710 80137010 44811000 */ mtc1 $at, $f2
/* CD714 80137014 0040402D */ daddu $t0, $v0, $zero
/* CD718 80137018 24420008 */ addiu $v0, $v0, 0x8
/* CD71C 8013701C AC620000 */ sw $v0, 0x0($v1)
/* CD720 80137020 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* CD724 80137024 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* CD728 80137028 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* CD72C 8013702C AD020000 */ sw $v0, 0x0($t0)
/* CD730 80137030 3C028015 */ lui $v0, %hi(Gfx_LoadStencilTex_Mario)
/* CD734 80137034 2442E670 */ addiu $v0, $v0, %lo(Gfx_LoadStencilTex_Mario)
/* CD738 80137038 AD020004 */ sw $v0, 0x4($t0)
/* CD73C 8013703C AFB40010 */ sw $s4, 0x10($sp)
/* CD740 80137040 AFB50014 */ sw $s5, 0x14($sp)
/* CD744 80137044 0804DC56 */ j .L80137158
/* CD748 80137048 AFA3001C */ sw $v1, 0x1C($sp)
glabel .L8013704C
/* CD74C 8013704C 240400A0 */ addiu $a0, $zero, 0xA0
/* CD750 80137050 24050078 */ addiu $a1, $zero, 0x78
/* CD754 80137054 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* CD758 80137058 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* CD75C 8013705C 461CC002 */ mul.s $f0, $f24, $f28
/* CD760 80137060 00000000 */ nop
/* CD764 80137064 8C620000 */ lw $v0, 0x0($v1)
/* CD768 80137068 4406C000 */ mfc1 $a2, $f24
/* CD76C 8013706C 3C01437F */ lui $at, (0x437F0000 >> 16)
/* CD770 80137070 44811000 */ mtc1 $at, $f2
/* CD774 80137074 0040402D */ daddu $t0, $v0, $zero
/* CD778 80137078 24420008 */ addiu $v0, $v0, 0x8
/* CD77C 8013707C AC620000 */ sw $v0, 0x0($v1)
/* CD780 80137080 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* CD784 80137084 AD020000 */ sw $v0, 0x0($t0)
/* CD788 80137088 3C028015 */ lui $v0, %hi(Gfx_LoadStencilTex_Mario)
/* CD78C 8013708C 2442E670 */ addiu $v0, $v0, %lo(Gfx_LoadStencilTex_Mario)
/* CD790 80137090 0804DC51 */ j .L80137144
/* CD794 80137094 0260382D */ daddu $a3, $s3, $zero
glabel .L80137098
/* CD798 80137098 240400A0 */ addiu $a0, $zero, 0xA0
/* CD79C 8013709C 24050078 */ addiu $a1, $zero, 0x78
/* CD7A0 801370A0 0260382D */ daddu $a3, $s3, $zero
/* CD7A4 801370A4 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* CD7A8 801370A8 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* CD7AC 801370AC 461CC002 */ mul.s $f0, $f24, $f28
/* CD7B0 801370B0 00000000 */ nop
/* CD7B4 801370B4 8C620000 */ lw $v0, 0x0($v1)
/* CD7B8 801370B8 4406C000 */ mfc1 $a2, $f24
/* CD7BC 801370BC 3C01437F */ lui $at, (0x437F0000 >> 16)
/* CD7C0 801370C0 44811000 */ mtc1 $at, $f2
/* CD7C4 801370C4 0040402D */ daddu $t0, $v0, $zero
/* CD7C8 801370C8 24420008 */ addiu $v0, $v0, 0x8
/* CD7CC 801370CC AC620000 */ sw $v0, 0x0($v1)
/* CD7D0 801370D0 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* CD7D4 801370D4 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* CD7D8 801370D8 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* CD7DC 801370DC AD020000 */ sw $v0, 0x0($t0)
/* CD7E0 801370E0 3C028015 */ lui $v0, %hi(Gfx_LoadStencilTex_Star)
/* CD7E4 801370E4 2442E6C0 */ addiu $v0, $v0, %lo(Gfx_LoadStencilTex_Star)
/* CD7E8 801370E8 AD020004 */ sw $v0, 0x4($t0)
/* CD7EC 801370EC AFB40010 */ sw $s4, 0x10($sp)
/* CD7F0 801370F0 AFB50014 */ sw $s5, 0x14($sp)
/* CD7F4 801370F4 0804DC56 */ j .L80137158
/* CD7F8 801370F8 AFA3001C */ sw $v1, 0x1C($sp)
glabel .L801370FC
/* CD7FC 801370FC 240400A0 */ addiu $a0, $zero, 0xA0
/* CD800 80137100 24050078 */ addiu $a1, $zero, 0x78
/* CD804 80137104 0260382D */ daddu $a3, $s3, $zero
/* CD808 80137108 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* CD80C 8013710C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* CD810 80137110 461CC002 */ mul.s $f0, $f24, $f28
/* CD814 80137114 00000000 */ nop
/* CD818 80137118 8C620000 */ lw $v0, 0x0($v1)
/* CD81C 8013711C 4406C000 */ mfc1 $a2, $f24
/* CD820 80137120 3C01437F */ lui $at, (0x437F0000 >> 16)
/* CD824 80137124 44811000 */ mtc1 $at, $f2
/* CD828 80137128 0040402D */ daddu $t0, $v0, $zero
/* CD82C 8013712C 24420008 */ addiu $v0, $v0, 0x8
/* CD830 80137130 AC620000 */ sw $v0, 0x0($v1)
/* CD834 80137134 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* CD838 80137138 AD020000 */ sw $v0, 0x0($t0)
/* CD83C 8013713C 3C028015 */ lui $v0, %hi(Gfx_LoadStencilTex_Star)
/* CD840 80137140 2442E6C0 */ addiu $v0, $v0, %lo(Gfx_LoadStencilTex_Star)
.L80137144:
/* CD844 80137144 AD020004 */ sw $v0, 0x4($t0)
/* CD848 80137148 2402FFFF */ addiu $v0, $zero, -0x1
/* CD84C 8013714C AFB40010 */ sw $s4, 0x10($sp)
/* CD850 80137150 AFB50014 */ sw $s5, 0x14($sp)
/* CD854 80137154 AFA2001C */ sw $v0, 0x1C($sp)
.L80137158:
/* CD858 80137158 46020003 */ div.s $f0, $f0, $f2
/* CD85C 8013715C 4600020D */ trunc.w.s $f8, $f0
/* CD860 80137160 0C04E7C4 */ jal appendGfx_screen_transition_stencil
/* CD864 80137164 E7A80018 */ swc1 $f8, 0x18($sp)
/* CD868 80137168 0804DF41 */ j .L80137D04
/* CD86C 8013716C 3C06DA38 */ lui $a2, (0xDA380007 >> 16)
glabel .L80137170
/* CD870 80137170 0220202D */ daddu $a0, $s1, $zero
/* CD874 80137174 0240282D */ daddu $a1, $s2, $zero
/* CD878 80137178 0000382D */ daddu $a3, $zero, $zero
/* CD87C 8013717C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* CD880 80137180 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* CD884 80137184 8C620000 */ lw $v0, 0x0($v1)
/* CD888 80137188 4406C000 */ mfc1 $a2, $f24
/* CD88C 8013718C 0040402D */ daddu $t0, $v0, $zero
/* CD890 80137190 24420008 */ addiu $v0, $v0, 0x8
/* CD894 80137194 AC620000 */ sw $v0, 0x0($v1)
/* CD898 80137198 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* CD89C 8013719C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* CD8A0 801371A0 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* CD8A4 801371A4 AD020000 */ sw $v0, 0x0($t0)
/* CD8A8 801371A8 3C028015 */ lui $v0, %hi(Gfx_LoadStencilTex_SharpCircle)
/* CD8AC 801371AC 2442E618 */ addiu $v0, $v0, %lo(Gfx_LoadStencilTex_SharpCircle)
/* CD8B0 801371B0 AD020004 */ sw $v0, 0x4($t0)
/* CD8B4 801371B4 AFA00010 */ sw $zero, 0x10($sp)
/* CD8B8 801371B8 AFA00014 */ sw $zero, 0x14($sp)
/* CD8BC 801371BC AFA00018 */ sw $zero, 0x18($sp)
/* CD8C0 801371C0 0C04E7C4 */ jal appendGfx_screen_transition_stencil
/* CD8C4 801371C4 AFA3001C */ sw $v1, 0x1C($sp)
/* CD8C8 801371C8 0804DF41 */ j .L80137D04
/* CD8CC 801371CC 3C06DA38 */ lui $a2, (0xDA380007 >> 16)
glabel .L801371D0
/* CD8D0 801371D0 0220202D */ daddu $a0, $s1, $zero
/* CD8D4 801371D4 0240282D */ daddu $a1, $s2, $zero
/* CD8D8 801371D8 0000382D */ daddu $a3, $zero, $zero
/* CD8DC 801371DC 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* CD8E0 801371E0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* CD8E4 801371E4 8C620000 */ lw $v0, 0x0($v1)
/* CD8E8 801371E8 4406C000 */ mfc1 $a2, $f24
/* CD8EC 801371EC 0040402D */ daddu $t0, $v0, $zero
/* CD8F0 801371F0 24420008 */ addiu $v0, $v0, 0x8
/* CD8F4 801371F4 AC620000 */ sw $v0, 0x0($v1)
/* CD8F8 801371F8 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* CD8FC 801371FC AD020000 */ sw $v0, 0x0($t0)
/* CD900 80137200 3C028015 */ lui $v0, %hi(Gfx_LoadStencilTex_SharpCircle)
/* CD904 80137204 2442E618 */ addiu $v0, $v0, %lo(Gfx_LoadStencilTex_SharpCircle)
/* CD908 80137208 AD020004 */ sw $v0, 0x4($t0)
/* CD90C 8013720C 2402FFFF */ addiu $v0, $zero, -0x1
/* CD910 80137210 AFA00010 */ sw $zero, 0x10($sp)
/* CD914 80137214 AFA00014 */ sw $zero, 0x14($sp)
/* CD918 80137218 AFA00018 */ sw $zero, 0x18($sp)
/* CD91C 8013721C 0C04E7C4 */ jal appendGfx_screen_transition_stencil
/* CD920 80137220 AFA2001C */ sw $v0, 0x1C($sp)
/* CD924 80137224 0804DF41 */ j .L80137D04
/* CD928 80137228 3C06DA38 */ lui $a2, (0xDA380007 >> 16)
glabel .L8013722C
/* CD92C 8013722C 3C15DA38 */ lui $s5, (0xDA380002 >> 16)
/* CD930 80137230 36B50002 */ ori $s5, $s5, (0xDA380002 & 0xFFFF)
/* CD934 80137234 3C14DA38 */ lui $s4, (0xDA380001 >> 16)
/* CD938 80137238 36940001 */ ori $s4, $s4, (0xDA380001 & 0xFFFF)
/* CD93C 8013723C 3C16D838 */ lui $s6, (0xD8380002 >> 16)
/* CD940 80137240 36D60002 */ ori $s6, $s6, (0xD8380002 & 0xFFFF)
/* CD944 80137244 3C118007 */ lui $s1, %hi(gMatrixListPos)
/* CD948 80137248 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos)
/* CD94C 8013724C 4600C20D */ trunc.w.s $f8, $f24
/* CD950 80137250 44104000 */ mfc1 $s0, $f8
/* CD954 80137254 96240000 */ lhu $a0, 0x0($s1)
/* CD958 80137258 3C0542A0 */ lui $a1, (0x42A00000 >> 16)
/* CD95C 8013725C 3C0142F0 */ lui $at, (0x42F00000 >> 16)
/* CD960 80137260 4481E000 */ mtc1 $at, $f28
/* CD964 80137264 4480B000 */ mtc1 $zero, $f22
/* CD968 80137268 00042180 */ sll $a0, $a0, 6
/* CD96C 8013726C 4406E000 */ mfc1 $a2, $f28
/* CD970 80137270 4407B000 */ mfc1 $a3, $f22
/* CD974 80137274 0C019E08 */ jal guTranslate
/* CD978 80137278 03C42021 */ addu $a0, $fp, $a0
/* CD97C 8013727C 3C12800A */ lui $s2, %hi(gMainGfxPos)
/* CD980 80137280 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos)
/* CD984 80137284 00108400 */ sll $s0, $s0, 16
/* CD988 80137288 00108403 */ sra $s0, $s0, 16
/* CD98C 8013728C 4490C000 */ mtc1 $s0, $f24
/* CD990 80137290 00000000 */ nop
/* CD994 80137294 4680C620 */ cvt.s.w $f24, $f24
/* CD998 80137298 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* CD99C 8013729C 4481D000 */ mtc1 $at, $f26
/* CD9A0 801372A0 8E420000 */ lw $v0, 0x0($s2)
/* CD9A4 801372A4 3C01437F */ lui $at, (0x437F0000 >> 16)
/* CD9A8 801372A8 4481A000 */ mtc1 $at, $f20
/* CD9AC 801372AC 3C018015 */ lui $at, %hi(D_80150ED8)
/* CD9B0 801372B0 D4200ED8 */ ldc1 $f0, %lo(D_80150ED8)($at)
/* CD9B4 801372B4 0040202D */ daddu $a0, $v0, $zero
/* CD9B8 801372B8 4614C503 */ div.s $f20, $f24, $f20
/* CD9BC 801372BC 24420008 */ addiu $v0, $v0, 0x8
/* CD9C0 801372C0 AE420000 */ sw $v0, 0x0($s2)
/* CD9C4 801372C4 96220000 */ lhu $v0, 0x0($s1)
/* CD9C8 801372C8 4614D501 */ sub.s $f20, $f26, $f20
/* CD9CC 801372CC AC950000 */ sw $s5, 0x0($a0)
/* CD9D0 801372D0 24430001 */ addiu $v1, $v0, 0x1
/* CD9D4 801372D4 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CD9D8 801372D8 4600A521 */ cvt.d.s $f20, $f20
/* CD9DC 801372DC 4620A502 */ mul.d $f20, $f20, $f0
/* CD9E0 801372E0 00000000 */ nop
/* CD9E4 801372E4 00021180 */ sll $v0, $v0, 6
/* CD9E8 801372E8 03C21021 */ addu $v0, $fp, $v0
/* CD9EC 801372EC A6230000 */ sh $v1, 0x0($s1)
/* CD9F0 801372F0 AC820004 */ sw $v0, 0x4($a0)
/* CD9F4 801372F4 96240000 */ lhu $a0, 0x0($s1)
/* CD9F8 801372F8 4407D000 */ mfc1 $a3, $f26
/* CD9FC 801372FC 00042180 */ sll $a0, $a0, 6
/* CDA00 80137300 4620A520 */ cvt.s.d $f20, $f20
/* CDA04 80137304 4405A000 */ mfc1 $a1, $f20
/* CDA08 80137308 4406A000 */ mfc1 $a2, $f20
/* CDA0C 8013730C 0C019DC0 */ jal guScale
/* CDA10 80137310 03C42021 */ addu $a0, $fp, $a0
/* CDA14 80137314 8E430000 */ lw $v1, 0x0($s2)
/* CDA18 80137318 4406B000 */ mfc1 $a2, $f22
/* CDA1C 8013731C 96220000 */ lhu $v0, 0x0($s1)
/* CDA20 80137320 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* CDA24 80137324 44810000 */ mtc1 $at, $f0
/* CDA28 80137328 0060202D */ daddu $a0, $v1, $zero
/* CDA2C 8013732C 24630008 */ addiu $v1, $v1, 0x8
/* CDA30 80137330 AE430000 */ sw $v1, 0x0($s2)
/* CDA34 80137334 24430001 */ addiu $v1, $v0, 0x1
/* CDA38 80137338 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CDA3C 8013733C 00021180 */ sll $v0, $v0, 6
/* CDA40 80137340 03C21021 */ addu $v0, $fp, $v0
/* CDA44 80137344 4600C602 */ mul.s $f24, $f24, $f0
/* CDA48 80137348 00000000 */ nop
/* CDA4C 8013734C AC940000 */ sw $s4, 0x0($a0)
/* CDA50 80137350 A6230000 */ sh $v1, 0x0($s1)
/* CDA54 80137354 AC820004 */ sw $v0, 0x4($a0)
/* CDA58 80137358 E7BA0010 */ swc1 $f26, 0x10($sp)
/* CDA5C 8013735C 96240000 */ lhu $a0, 0x0($s1)
/* CDA60 80137360 4407B000 */ mfc1 $a3, $f22
/* CDA64 80137364 00042180 */ sll $a0, $a0, 6
/* CDA68 80137368 4405C000 */ mfc1 $a1, $f24
/* CDA6C 8013736C 0C019F20 */ jal guRotate
/* CDA70 80137370 03C42021 */ addu $a0, $fp, $a0
/* CDA74 80137374 3C13DE00 */ lui $s3, (0xDE000000 >> 16)
/* CDA78 80137378 8E480000 */ lw $t0, 0x0($s2)
/* CDA7C 8013737C 3C054370 */ lui $a1, (0x43700000 >> 16)
/* CDA80 80137380 4406E000 */ mfc1 $a2, $f28
/* CDA84 80137384 4407B000 */ mfc1 $a3, $f22
/* CDA88 80137388 96220000 */ lhu $v0, 0x0($s1)
/* CDA8C 8013738C 0100202D */ daddu $a0, $t0, $zero
/* CDA90 80137390 25080008 */ addiu $t0, $t0, 0x8
/* CDA94 80137394 24430001 */ addiu $v1, $v0, 0x1
/* CDA98 80137398 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CDA9C 8013739C 00021180 */ sll $v0, $v0, 6
/* CDAA0 801373A0 03C21021 */ addu $v0, $fp, $v0
/* CDAA4 801373A4 AE480000 */ sw $t0, 0x0($s2)
/* CDAA8 801373A8 AC940000 */ sw $s4, 0x0($a0)
/* CDAAC 801373AC A6230000 */ sh $v1, 0x0($s1)
/* CDAB0 801373B0 AC820004 */ sw $v0, 0x4($a0)
/* CDAB4 801373B4 25020008 */ addiu $v0, $t0, 0x8
/* CDAB8 801373B8 3C0B8015 */ lui $t3, %hi(D_8014E8F0)
/* CDABC 801373BC 256BE8F0 */ addiu $t3, $t3, %lo(D_8014E8F0)
/* CDAC0 801373C0 AE420000 */ sw $v0, 0x0($s2)
/* CDAC4 801373C4 25020010 */ addiu $v0, $t0, 0x10
/* CDAC8 801373C8 AD130000 */ sw $s3, 0x0($t0)
/* CDACC 801373CC AD0B0004 */ sw $t3, 0x4($t0)
/* CDAD0 801373D0 AE420000 */ sw $v0, 0x0($s2)
/* CDAD4 801373D4 AD160008 */ sw $s6, 0x8($t0)
/* CDAD8 801373D8 96240000 */ lhu $a0, 0x0($s1)
/* CDADC 801373DC 24100040 */ addiu $s0, $zero, 0x40
/* CDAE0 801373E0 AD10000C */ sw $s0, 0xC($t0)
/* CDAE4 801373E4 00042180 */ sll $a0, $a0, 6
/* CDAE8 801373E8 0C019E08 */ jal guTranslate
/* CDAEC 801373EC 03C42021 */ addu $a0, $fp, $a0
/* CDAF0 801373F0 8E430000 */ lw $v1, 0x0($s2)
/* CDAF4 801373F4 4405A000 */ mfc1 $a1, $f20
/* CDAF8 801373F8 4407D000 */ mfc1 $a3, $f26
/* CDAFC 801373FC 96220000 */ lhu $v0, 0x0($s1)
/* CDB00 80137400 00A0302D */ daddu $a2, $a1, $zero
/* CDB04 80137404 0060402D */ daddu $t0, $v1, $zero
/* CDB08 80137408 24630008 */ addiu $v1, $v1, 0x8
/* CDB0C 8013740C AE430000 */ sw $v1, 0x0($s2)
/* CDB10 80137410 24430001 */ addiu $v1, $v0, 0x1
/* CDB14 80137414 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CDB18 80137418 00021180 */ sll $v0, $v0, 6
/* CDB1C 8013741C AD150000 */ sw $s5, 0x0($t0)
/* CDB20 80137420 A6230000 */ sh $v1, 0x0($s1)
/* CDB24 80137424 3064FFFF */ andi $a0, $v1, 0xFFFF
/* CDB28 80137428 03C21021 */ addu $v0, $fp, $v0
/* CDB2C 8013742C 00042180 */ sll $a0, $a0, 6
/* CDB30 80137430 03C42021 */ addu $a0, $fp, $a0
/* CDB34 80137434 0C019DC0 */ jal guScale
/* CDB38 80137438 AD020004 */ sw $v0, 0x4($t0)
/* CDB3C 8013743C 8E430000 */ lw $v1, 0x0($s2)
/* CDB40 80137440 4405C000 */ mfc1 $a1, $f24
/* CDB44 80137444 4406B000 */ mfc1 $a2, $f22
/* CDB48 80137448 4407B000 */ mfc1 $a3, $f22
/* CDB4C 8013744C 96220000 */ lhu $v0, 0x0($s1)
/* CDB50 80137450 0060402D */ daddu $t0, $v1, $zero
/* CDB54 80137454 24630008 */ addiu $v1, $v1, 0x8
/* CDB58 80137458 AE430000 */ sw $v1, 0x0($s2)
/* CDB5C 8013745C 24430001 */ addiu $v1, $v0, 0x1
/* CDB60 80137460 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CDB64 80137464 00021180 */ sll $v0, $v0, 6
/* CDB68 80137468 AD140000 */ sw $s4, 0x0($t0)
/* CDB6C 8013746C A6230000 */ sh $v1, 0x0($s1)
/* CDB70 80137470 3064FFFF */ andi $a0, $v1, 0xFFFF
/* CDB74 80137474 03C21021 */ addu $v0, $fp, $v0
/* CDB78 80137478 00042180 */ sll $a0, $a0, 6
/* CDB7C 8013747C 03C42021 */ addu $a0, $fp, $a0
/* CDB80 80137480 AD020004 */ sw $v0, 0x4($t0)
/* CDB84 80137484 0C019F20 */ jal guRotate
/* CDB88 80137488 E7BA0010 */ swc1 $f26, 0x10($sp)
/* CDB8C 8013748C 8E480000 */ lw $t0, 0x0($s2)
/* CDB90 80137490 4405B000 */ mfc1 $a1, $f22
/* CDB94 80137494 96220000 */ lhu $v0, 0x0($s1)
/* CDB98 80137498 00A0302D */ daddu $a2, $a1, $zero
/* CDB9C 8013749C 00A0382D */ daddu $a3, $a1, $zero
/* CDBA0 801374A0 0100202D */ daddu $a0, $t0, $zero
/* CDBA4 801374A4 25080008 */ addiu $t0, $t0, 0x8
/* CDBA8 801374A8 24430001 */ addiu $v1, $v0, 0x1
/* CDBAC 801374AC 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CDBB0 801374B0 00021180 */ sll $v0, $v0, 6
/* CDBB4 801374B4 03C21021 */ addu $v0, $fp, $v0
/* CDBB8 801374B8 AE480000 */ sw $t0, 0x0($s2)
/* CDBBC 801374BC AC940000 */ sw $s4, 0x0($a0)
/* CDBC0 801374C0 A6230000 */ sh $v1, 0x0($s1)
/* CDBC4 801374C4 AC820004 */ sw $v0, 0x4($a0)
/* CDBC8 801374C8 25020008 */ addiu $v0, $t0, 0x8
/* CDBCC 801374CC 3C0B8015 */ lui $t3, %hi(D_8014E8F0)
/* CDBD0 801374D0 256BE8F0 */ addiu $t3, $t3, %lo(D_8014E8F0)
/* CDBD4 801374D4 AE420000 */ sw $v0, 0x0($s2)
/* CDBD8 801374D8 AD130000 */ sw $s3, 0x0($t0)
/* CDBDC 801374DC AD0B0004 */ sw $t3, 0x4($t0)
/* CDBE0 801374E0 96240000 */ lhu $a0, 0x0($s1)
/* CDBE4 801374E4 25020010 */ addiu $v0, $t0, 0x10
/* CDBE8 801374E8 AE420000 */ sw $v0, 0x0($s2)
/* CDBEC 801374EC AD160008 */ sw $s6, 0x8($t0)
/* CDBF0 801374F0 AD10000C */ sw $s0, 0xC($t0)
/* CDBF4 801374F4 00042180 */ sll $a0, $a0, 6
/* CDBF8 801374F8 0C019E08 */ jal guTranslate
/* CDBFC 801374FC 03C42021 */ addu $a0, $fp, $a0
/* CDC00 80137500 8E440000 */ lw $a0, 0x0($s2)
/* CDC04 80137504 96220000 */ lhu $v0, 0x0($s1)
/* CDC08 80137508 0080282D */ daddu $a1, $a0, $zero
/* CDC0C 8013750C 24840008 */ addiu $a0, $a0, 0x8
/* CDC10 80137510 24430001 */ addiu $v1, $v0, 0x1
/* CDC14 80137514 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CDC18 80137518 00021180 */ sll $v0, $v0, 6
/* CDC1C 8013751C 03C21021 */ addu $v0, $fp, $v0
/* CDC20 80137520 AE440000 */ sw $a0, 0x0($s2)
/* CDC24 80137524 ACB50000 */ sw $s5, 0x0($a1)
/* CDC28 80137528 A6230000 */ sh $v1, 0x0($s1)
/* CDC2C 8013752C ACA20004 */ sw $v0, 0x4($a1)
/* CDC30 80137530 24820008 */ addiu $v0, $a0, 0x8
/* CDC34 80137534 AE420000 */ sw $v0, 0x0($s2)
/* CDC38 80137538 3C028015 */ lui $v0, %hi(D_8014EA48)
/* CDC3C 8013753C 2442EA48 */ addiu $v0, $v0, %lo(D_8014EA48)
/* CDC40 80137540 AC820004 */ sw $v0, 0x4($a0)
/* CDC44 80137544 24820010 */ addiu $v0, $a0, 0x10
/* CDC48 80137548 AC930000 */ sw $s3, 0x0($a0)
/* CDC4C 8013754C AE420000 */ sw $v0, 0x0($s2)
/* CDC50 80137550 AC960008 */ sw $s6, 0x8($a0)
/* CDC54 80137554 0804DF40 */ j .L80137D00
/* CDC58 80137558 AC90000C */ sw $s0, 0xC($a0)
glabel .L8013755C
/* CDC5C 8013755C 44914000 */ mtc1 $s1, $f8
/* CDC60 80137560 00000000 */ nop
/* CDC64 80137564 46804220 */ cvt.s.w $f8, $f8
/* CDC68 80137568 241300F0 */ addiu $s3, $zero, 0xF0
/* CDC6C 8013756C 02721023 */ subu $v0, $s3, $s2
/* CDC70 80137570 44054000 */ mfc1 $a1, $f8
/* CDC74 80137574 44824000 */ mtc1 $v0, $f8
/* CDC78 80137578 00000000 */ nop
/* CDC7C 8013757C 46804220 */ cvt.s.w $f8, $f8
/* CDC80 80137580 3C15DA38 */ lui $s5, (0xDA380002 >> 16)
/* CDC84 80137584 36B50002 */ ori $s5, $s5, (0xDA380002 & 0xFFFF)
/* CDC88 80137588 3C14DA38 */ lui $s4, (0xDA380001 >> 16)
/* CDC8C 8013758C 36940001 */ ori $s4, $s4, (0xDA380001 & 0xFFFF)
/* CDC90 80137590 3C0BD838 */ lui $t3, (0xD8380002 >> 16)
/* CDC94 80137594 3C12800A */ lui $s2, %hi(gMainGfxPos)
/* CDC98 80137598 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos)
/* CDC9C 8013759C 356B0002 */ ori $t3, $t3, (0xD8380002 & 0xFFFF)
/* CDCA0 801375A0 44064000 */ mfc1 $a2, $f8
/* CDCA4 801375A4 8E420000 */ lw $v0, 0x0($s2)
/* CDCA8 801375A8 4480B000 */ mtc1 $zero, $f22
/* CDCAC 801375AC 3C118007 */ lui $s1, %hi(gMatrixListPos)
/* CDCB0 801375B0 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos)
/* CDCB4 801375B4 AFAB0024 */ sw $t3, 0x24($sp)
/* CDCB8 801375B8 96240000 */ lhu $a0, 0x0($s1)
/* CDCBC 801375BC 0040182D */ daddu $v1, $v0, $zero
/* CDCC0 801375C0 24420008 */ addiu $v0, $v0, 0x8
/* CDCC4 801375C4 00042180 */ sll $a0, $a0, 6
/* CDCC8 801375C8 03C42021 */ addu $a0, $fp, $a0
/* CDCCC 801375CC 4407B000 */ mfc1 $a3, $f22
/* CDCD0 801375D0 3C0BFA00 */ lui $t3, (0xFA000000 >> 16)
/* CDCD4 801375D4 AE420000 */ sw $v0, 0x0($s2)
/* CDCD8 801375D8 AC6B0000 */ sw $t3, 0x0($v1)
/* CDCDC 801375DC 4600C20D */ trunc.w.s $f8, $f24
/* CDCE0 801375E0 44104000 */ mfc1 $s0, $f8
/* CDCE4 801375E4 0C019E08 */ jal guTranslate
/* CDCE8 801375E8 AC600004 */ sw $zero, 0x4($v1)
/* CDCEC 801375EC 00108400 */ sll $s0, $s0, 16
/* CDCF0 801375F0 00108403 */ sra $s0, $s0, 16
/* CDCF4 801375F4 4490A000 */ mtc1 $s0, $f20
/* CDCF8 801375F8 00000000 */ nop
/* CDCFC 801375FC 4680A520 */ cvt.s.w $f20, $f20
/* CDD00 80137600 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* CDD04 80137604 4481C000 */ mtc1 $at, $f24
/* CDD08 80137608 8E420000 */ lw $v0, 0x0($s2)
/* CDD0C 8013760C 3C01437F */ lui $at, (0x437F0000 >> 16)
/* CDD10 80137610 44810000 */ mtc1 $at, $f0
/* CDD14 80137614 0040202D */ daddu $a0, $v0, $zero
/* CDD18 80137618 4600A503 */ div.s $f20, $f20, $f0
/* CDD1C 8013761C 3C018015 */ lui $at, %hi(D_80150EE0)
/* CDD20 80137620 D4200EE0 */ ldc1 $f0, %lo(D_80150EE0)($at)
/* CDD24 80137624 24420008 */ addiu $v0, $v0, 0x8
/* CDD28 80137628 AE420000 */ sw $v0, 0x0($s2)
/* CDD2C 8013762C 96220000 */ lhu $v0, 0x0($s1)
/* CDD30 80137630 4614C501 */ sub.s $f20, $f24, $f20
/* CDD34 80137634 AC950000 */ sw $s5, 0x0($a0)
/* CDD38 80137638 24430001 */ addiu $v1, $v0, 0x1
/* CDD3C 8013763C 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CDD40 80137640 4600A521 */ cvt.d.s $f20, $f20
/* CDD44 80137644 4620A502 */ mul.d $f20, $f20, $f0
/* CDD48 80137648 00000000 */ nop
/* CDD4C 8013764C 00021180 */ sll $v0, $v0, 6
/* CDD50 80137650 03C21021 */ addu $v0, $fp, $v0
/* CDD54 80137654 A6230000 */ sh $v1, 0x0($s1)
/* CDD58 80137658 AC820004 */ sw $v0, 0x4($a0)
/* CDD5C 8013765C 96240000 */ lhu $a0, 0x0($s1)
/* CDD60 80137660 4407C000 */ mfc1 $a3, $f24
/* CDD64 80137664 00042180 */ sll $a0, $a0, 6
/* CDD68 80137668 4620A520 */ cvt.s.d $f20, $f20
/* CDD6C 8013766C 4405A000 */ mfc1 $a1, $f20
/* CDD70 80137670 4406A000 */ mfc1 $a2, $f20
/* CDD74 80137674 0C019DC0 */ jal guScale
/* CDD78 80137678 03C42021 */ addu $a0, $fp, $a0
/* CDD7C 8013767C 00108023 */ negu $s0, $s0
/* CDD80 80137680 4490D000 */ mtc1 $s0, $f26
/* CDD84 80137684 00000000 */ nop
/* CDD88 80137688 4680D6A0 */ cvt.s.w $f26, $f26
/* CDD8C 8013768C 8E430000 */ lw $v1, 0x0($s2)
/* CDD90 80137690 4405D000 */ mfc1 $a1, $f26
/* CDD94 80137694 4406B000 */ mfc1 $a2, $f22
/* CDD98 80137698 4407B000 */ mfc1 $a3, $f22
/* CDD9C 8013769C 96220000 */ lhu $v0, 0x0($s1)
/* CDDA0 801376A0 0060402D */ daddu $t0, $v1, $zero
/* CDDA4 801376A4 24630008 */ addiu $v1, $v1, 0x8
/* CDDA8 801376A8 AE430000 */ sw $v1, 0x0($s2)
/* CDDAC 801376AC 24430001 */ addiu $v1, $v0, 0x1
/* CDDB0 801376B0 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CDDB4 801376B4 00021180 */ sll $v0, $v0, 6
/* CDDB8 801376B8 AD140000 */ sw $s4, 0x0($t0)
/* CDDBC 801376BC A6230000 */ sh $v1, 0x0($s1)
/* CDDC0 801376C0 3064FFFF */ andi $a0, $v1, 0xFFFF
/* CDDC4 801376C4 03C21021 */ addu $v0, $fp, $v0
/* CDDC8 801376C8 00042180 */ sll $a0, $a0, 6
/* CDDCC 801376CC 03C42021 */ addu $a0, $fp, $a0
/* CDDD0 801376D0 AD020004 */ sw $v0, 0x4($t0)
/* CDDD4 801376D4 0C019F20 */ jal guRotate
/* CDDD8 801376D8 E7B80010 */ swc1 $f24, 0x10($sp)
/* CDDDC 801376DC 44964000 */ mtc1 $s6, $f8
/* CDDE0 801376E0 00000000 */ nop
/* CDDE4 801376E4 46804220 */ cvt.s.w $f8, $f8
/* CDDE8 801376E8 02779823 */ subu $s3, $s3, $s7
/* CDDEC 801376EC 44054000 */ mfc1 $a1, $f8
/* CDDF0 801376F0 44934000 */ mtc1 $s3, $f8
/* CDDF4 801376F4 00000000 */ nop
/* CDDF8 801376F8 46804220 */ cvt.s.w $f8, $f8
/* CDDFC 801376FC 3C16DE00 */ lui $s6, (0xDE000000 >> 16)
/* CDE00 80137700 3C138015 */ lui $s3, %hi(D_8014E8F0)
/* CDE04 80137704 2673E8F0 */ addiu $s3, $s3, %lo(D_8014E8F0)
/* CDE08 80137708 44064000 */ mfc1 $a2, $f8
/* CDE0C 8013770C 8E480000 */ lw $t0, 0x0($s2)
/* CDE10 80137710 4407B000 */ mfc1 $a3, $f22
/* CDE14 80137714 96220000 */ lhu $v0, 0x0($s1)
/* CDE18 80137718 0100202D */ daddu $a0, $t0, $zero
/* CDE1C 8013771C 25080008 */ addiu $t0, $t0, 0x8
/* CDE20 80137720 24430001 */ addiu $v1, $v0, 0x1
/* CDE24 80137724 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CDE28 80137728 00021180 */ sll $v0, $v0, 6
/* CDE2C 8013772C 03C21021 */ addu $v0, $fp, $v0
/* CDE30 80137730 AE480000 */ sw $t0, 0x0($s2)
/* CDE34 80137734 AC940000 */ sw $s4, 0x0($a0)
/* CDE38 80137738 A6230000 */ sh $v1, 0x0($s1)
/* CDE3C 8013773C AC820004 */ sw $v0, 0x4($a0)
/* CDE40 80137740 25020008 */ addiu $v0, $t0, 0x8
/* CDE44 80137744 AE420000 */ sw $v0, 0x0($s2)
/* CDE48 80137748 25020010 */ addiu $v0, $t0, 0x10
/* CDE4C 8013774C AD160000 */ sw $s6, 0x0($t0)
/* CDE50 80137750 AD130004 */ sw $s3, 0x4($t0)
/* CDE54 80137754 AE420000 */ sw $v0, 0x0($s2)
/* CDE58 80137758 8FAB0024 */ lw $t3, 0x24($sp)
/* CDE5C 8013775C AD0B0008 */ sw $t3, 0x8($t0)
/* CDE60 80137760 96240000 */ lhu $a0, 0x0($s1)
/* CDE64 80137764 24100040 */ addiu $s0, $zero, 0x40
/* CDE68 80137768 AD10000C */ sw $s0, 0xC($t0)
/* CDE6C 8013776C 00042180 */ sll $a0, $a0, 6
/* CDE70 80137770 0C019E08 */ jal guTranslate
/* CDE74 80137774 03C42021 */ addu $a0, $fp, $a0
/* CDE78 80137778 8E430000 */ lw $v1, 0x0($s2)
/* CDE7C 8013777C 4405A000 */ mfc1 $a1, $f20
/* CDE80 80137780 4407C000 */ mfc1 $a3, $f24
/* CDE84 80137784 96220000 */ lhu $v0, 0x0($s1)
/* CDE88 80137788 00A0302D */ daddu $a2, $a1, $zero
/* CDE8C 8013778C 0060402D */ daddu $t0, $v1, $zero
/* CDE90 80137790 24630008 */ addiu $v1, $v1, 0x8
/* CDE94 80137794 AE430000 */ sw $v1, 0x0($s2)
/* CDE98 80137798 24430001 */ addiu $v1, $v0, 0x1
/* CDE9C 8013779C 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CDEA0 801377A0 00021180 */ sll $v0, $v0, 6
/* CDEA4 801377A4 AD150000 */ sw $s5, 0x0($t0)
/* CDEA8 801377A8 A6230000 */ sh $v1, 0x0($s1)
/* CDEAC 801377AC 3064FFFF */ andi $a0, $v1, 0xFFFF
/* CDEB0 801377B0 03C21021 */ addu $v0, $fp, $v0
/* CDEB4 801377B4 00042180 */ sll $a0, $a0, 6
/* CDEB8 801377B8 03C42021 */ addu $a0, $fp, $a0
/* CDEBC 801377BC 0C019DC0 */ jal guScale
/* CDEC0 801377C0 AD020004 */ sw $v0, 0x4($t0)
/* CDEC4 801377C4 8E430000 */ lw $v1, 0x0($s2)
/* CDEC8 801377C8 4405D000 */ mfc1 $a1, $f26
/* CDECC 801377CC 4406B000 */ mfc1 $a2, $f22
/* CDED0 801377D0 4407B000 */ mfc1 $a3, $f22
/* CDED4 801377D4 96220000 */ lhu $v0, 0x0($s1)
/* CDED8 801377D8 0060402D */ daddu $t0, $v1, $zero
/* CDEDC 801377DC 24630008 */ addiu $v1, $v1, 0x8
/* CDEE0 801377E0 AE430000 */ sw $v1, 0x0($s2)
/* CDEE4 801377E4 24430001 */ addiu $v1, $v0, 0x1
/* CDEE8 801377E8 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CDEEC 801377EC 00021180 */ sll $v0, $v0, 6
/* CDEF0 801377F0 AD140000 */ sw $s4, 0x0($t0)
/* CDEF4 801377F4 A6230000 */ sh $v1, 0x0($s1)
/* CDEF8 801377F8 3064FFFF */ andi $a0, $v1, 0xFFFF
/* CDEFC 801377FC 03C21021 */ addu $v0, $fp, $v0
/* CDF00 80137800 00042180 */ sll $a0, $a0, 6
/* CDF04 80137804 03C42021 */ addu $a0, $fp, $a0
/* CDF08 80137808 AD020004 */ sw $v0, 0x4($t0)
/* CDF0C 8013780C 0C019F20 */ jal guRotate
/* CDF10 80137810 E7B80010 */ swc1 $f24, 0x10($sp)
/* CDF14 80137814 8E480000 */ lw $t0, 0x0($s2)
/* CDF18 80137818 4405B000 */ mfc1 $a1, $f22
/* CDF1C 8013781C 96220000 */ lhu $v0, 0x0($s1)
/* CDF20 80137820 00A0302D */ daddu $a2, $a1, $zero
/* CDF24 80137824 00A0382D */ daddu $a3, $a1, $zero
/* CDF28 80137828 0100202D */ daddu $a0, $t0, $zero
/* CDF2C 8013782C 25080008 */ addiu $t0, $t0, 0x8
/* CDF30 80137830 24430001 */ addiu $v1, $v0, 0x1
/* CDF34 80137834 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CDF38 80137838 00021180 */ sll $v0, $v0, 6
/* CDF3C 8013783C 03C21021 */ addu $v0, $fp, $v0
/* CDF40 80137840 AE480000 */ sw $t0, 0x0($s2)
/* CDF44 80137844 AC940000 */ sw $s4, 0x0($a0)
/* CDF48 80137848 A6230000 */ sh $v1, 0x0($s1)
/* CDF4C 8013784C AC820004 */ sw $v0, 0x4($a0)
/* CDF50 80137850 25020008 */ addiu $v0, $t0, 0x8
/* CDF54 80137854 AE420000 */ sw $v0, 0x0($s2)
/* CDF58 80137858 AD160000 */ sw $s6, 0x0($t0)
/* CDF5C 8013785C AD130004 */ sw $s3, 0x4($t0)
/* CDF60 80137860 96240000 */ lhu $a0, 0x0($s1)
/* CDF64 80137864 25020010 */ addiu $v0, $t0, 0x10
/* CDF68 80137868 AE420000 */ sw $v0, 0x0($s2)
/* CDF6C 8013786C 8FAB0024 */ lw $t3, 0x24($sp)
/* CDF70 80137870 00042180 */ sll $a0, $a0, 6
/* CDF74 80137874 03C42021 */ addu $a0, $fp, $a0
/* CDF78 80137878 AD0B0008 */ sw $t3, 0x8($t0)
/* CDF7C 8013787C 0C019E08 */ jal guTranslate
/* CDF80 80137880 AD10000C */ sw $s0, 0xC($t0)
/* CDF84 80137884 8E440000 */ lw $a0, 0x0($s2)
/* CDF88 80137888 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* CDF8C 8013788C 44810000 */ mtc1 $at, $f0
/* CDF90 80137890 96220000 */ lhu $v0, 0x0($s1)
/* CDF94 80137894 0080282D */ daddu $a1, $a0, $zero
/* CDF98 80137898 24840008 */ addiu $a0, $a0, 0x8
/* CDF9C 8013789C 24430001 */ addiu $v1, $v0, 0x1
/* CDFA0 801378A0 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CDFA4 801378A4 00021180 */ sll $v0, $v0, 6
/* CDFA8 801378A8 03C21021 */ addu $v0, $fp, $v0
/* CDFAC 801378AC AE440000 */ sw $a0, 0x0($s2)
/* CDFB0 801378B0 ACB50000 */ sw $s5, 0x0($a1)
/* CDFB4 801378B4 A6230000 */ sh $v1, 0x0($s1)
/* CDFB8 801378B8 ACA20004 */ sw $v0, 0x4($a1)
/* CDFBC 801378BC 24820008 */ addiu $v0, $a0, 0x8
/* CDFC0 801378C0 3C0BFA00 */ lui $t3, (0xFA000000 >> 16)
/* CDFC4 801378C4 24850004 */ addiu $a1, $a0, 0x4
/* CDFC8 801378C8 461C003E */ c.le.s $f0, $f28
/* CDFCC 801378CC AE420000 */ sw $v0, 0x0($s2)
/* CDFD0 801378D0 45010005 */ bc1t .L801378E8
/* CDFD4 801378D4 AC8B0000 */ sw $t3, 0x0($a0)
/* CDFD8 801378D8 4600E20D */ trunc.w.s $f8, $f28
/* CDFDC 801378DC 44074000 */ mfc1 $a3, $f8
/* CDFE0 801378E0 0804DE41 */ j .L80137904
/* CDFE4 801378E4 3C06D838 */ lui $a2, (0xD8380002 >> 16)
.L801378E8:
/* CDFE8 801378E8 4600E001 */ sub.s $f0, $f28, $f0
/* CDFEC 801378EC 3C028000 */ lui $v0, (0x80000000 >> 16)
/* CDFF0 801378F0 4600020D */ trunc.w.s $f8, $f0
/* CDFF4 801378F4 44074000 */ mfc1 $a3, $f8
/* CDFF8 801378F8 00000000 */ nop
/* CDFFC 801378FC 00E23825 */ or $a3, $a3, $v0
/* CE000 80137900 3C06D838 */ lui $a2, (0xD8380002 >> 16)
.L80137904:
/* CE004 80137904 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF)
/* CE008 80137908 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* CE00C 8013790C 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* CE010 80137910 8C830000 */ lw $v1, 0x0($a0)
/* CE014 80137914 30E200FF */ andi $v0, $a3, 0xFF
/* CE018 80137918 ACA20000 */ sw $v0, 0x0($a1)
/* CE01C 8013791C 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* CE020 80137920 0060282D */ daddu $a1, $v1, $zero
/* CE024 80137924 24630008 */ addiu $v1, $v1, 0x8
/* CE028 80137928 AC830000 */ sw $v1, 0x0($a0)
/* CE02C 8013792C ACA20000 */ sw $v0, 0x0($a1)
/* CE030 80137930 3C028015 */ lui $v0, %hi(D_8014E9A8)
/* CE034 80137934 2442E9A8 */ addiu $v0, $v0, %lo(D_8014E9A8)
/* CE038 80137938 ACA20004 */ sw $v0, 0x4($a1)
/* CE03C 8013793C 24620008 */ addiu $v0, $v1, 0x8
/* CE040 80137940 AC820000 */ sw $v0, 0x0($a0)
/* CE044 80137944 24020040 */ addiu $v0, $zero, 0x40
/* CE048 80137948 AC660000 */ sw $a2, 0x0($v1)
/* CE04C 8013794C 0804DF40 */ j .L80137D00
/* CE050 80137950 AC620004 */ sw $v0, 0x4($v1)
glabel .L80137954
/* CE054 80137954 44914000 */ mtc1 $s1, $f8
/* CE058 80137958 00000000 */ nop
/* CE05C 8013795C 46804220 */ cvt.s.w $f8, $f8
/* CE060 80137960 240200F0 */ addiu $v0, $zero, 0xF0
/* CE064 80137964 00521023 */ subu $v0, $v0, $s2
/* CE068 80137968 44054000 */ mfc1 $a1, $f8
/* CE06C 8013796C 44824000 */ mtc1 $v0, $f8
/* CE070 80137970 00000000 */ nop
/* CE074 80137974 46804220 */ cvt.s.w $f8, $f8
/* CE078 80137978 3C15DA38 */ lui $s5, (0xDA380002 >> 16)
/* CE07C 8013797C 36B50002 */ ori $s5, $s5, (0xDA380002 & 0xFFFF)
/* CE080 80137980 3C13DA38 */ lui $s3, (0xDA380001 >> 16)
/* CE084 80137984 3C12800A */ lui $s2, %hi(gMainGfxPos)
/* CE088 80137988 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos)
/* CE08C 8013798C 36730001 */ ori $s3, $s3, (0xDA380001 & 0xFFFF)
/* CE090 80137990 3C118007 */ lui $s1, %hi(gMatrixListPos)
/* CE094 80137994 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos)
/* CE098 80137998 3C14FA00 */ lui $s4, (0xFA000000 >> 16)
/* CE09C 8013799C 44064000 */ mfc1 $a2, $f8
/* CE0A0 801379A0 4600C20D */ trunc.w.s $f8, $f24
/* CE0A4 801379A4 44104000 */ mfc1 $s0, $f8
/* CE0A8 801379A8 8E420000 */ lw $v0, 0x0($s2)
/* CE0AC 801379AC 4480B000 */ mtc1 $zero, $f22
/* CE0B0 801379B0 96240000 */ lhu $a0, 0x0($s1)
/* CE0B4 801379B4 0040182D */ daddu $v1, $v0, $zero
/* CE0B8 801379B8 24420008 */ addiu $v0, $v0, 0x8
/* CE0BC 801379BC 00042180 */ sll $a0, $a0, 6
/* CE0C0 801379C0 4407B000 */ mfc1 $a3, $f22
/* CE0C4 801379C4 03C42021 */ addu $a0, $fp, $a0
/* CE0C8 801379C8 AE420000 */ sw $v0, 0x0($s2)
/* CE0CC 801379CC AC740000 */ sw $s4, 0x0($v1)
/* CE0D0 801379D0 0C019E08 */ jal guTranslate
/* CE0D4 801379D4 AC600004 */ sw $zero, 0x4($v1)
/* CE0D8 801379D8 00108400 */ sll $s0, $s0, 16
/* CE0DC 801379DC 00108403 */ sra $s0, $s0, 16
/* CE0E0 801379E0 44900000 */ mtc1 $s0, $f0
/* CE0E4 801379E4 00000000 */ nop
/* CE0E8 801379E8 46800020 */ cvt.s.w $f0, $f0
/* CE0EC 801379EC 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* CE0F0 801379F0 4481A000 */ mtc1 $at, $f20
/* CE0F4 801379F4 8E420000 */ lw $v0, 0x0($s2)
/* CE0F8 801379F8 3C01437F */ lui $at, (0x437F0000 >> 16)
/* CE0FC 801379FC 44811000 */ mtc1 $at, $f2
/* CE100 80137A00 0040202D */ daddu $a0, $v0, $zero
/* CE104 80137A04 46020003 */ div.s $f0, $f0, $f2
/* CE108 80137A08 3C018015 */ lui $at, %hi(D_80150EE8)
/* CE10C 80137A0C D4220EE8 */ ldc1 $f2, %lo(D_80150EE8)($at)
/* CE110 80137A10 24420008 */ addiu $v0, $v0, 0x8
/* CE114 80137A14 AE420000 */ sw $v0, 0x0($s2)
/* CE118 80137A18 96220000 */ lhu $v0, 0x0($s1)
/* CE11C 80137A1C 4600A001 */ sub.s $f0, $f20, $f0
/* CE120 80137A20 AC950000 */ sw $s5, 0x0($a0)
/* CE124 80137A24 24430001 */ addiu $v1, $v0, 0x1
/* CE128 80137A28 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CE12C 80137A2C 46000021 */ cvt.d.s $f0, $f0
/* CE130 80137A30 46220002 */ mul.d $f0, $f0, $f2
/* CE134 80137A34 00000000 */ nop
/* CE138 80137A38 00021180 */ sll $v0, $v0, 6
/* CE13C 80137A3C 03C21021 */ addu $v0, $fp, $v0
/* CE140 80137A40 A6230000 */ sh $v1, 0x0($s1)
/* CE144 80137A44 AC820004 */ sw $v0, 0x4($a0)
/* CE148 80137A48 96240000 */ lhu $a0, 0x0($s1)
/* CE14C 80137A4C 4407A000 */ mfc1 $a3, $f20
/* CE150 80137A50 00042180 */ sll $a0, $a0, 6
/* CE154 80137A54 46200020 */ cvt.s.d $f0, $f0
/* CE158 80137A58 44050000 */ mfc1 $a1, $f0
/* CE15C 80137A5C 03C42021 */ addu $a0, $fp, $a0
/* CE160 80137A60 0C019DC0 */ jal guScale
/* CE164 80137A64 00A0302D */ daddu $a2, $a1, $zero
/* CE168 80137A68 00108023 */ negu $s0, $s0
/* CE16C 80137A6C 44900000 */ mtc1 $s0, $f0
/* CE170 80137A70 00000000 */ nop
/* CE174 80137A74 46800020 */ cvt.s.w $f0, $f0
/* CE178 80137A78 46000021 */ cvt.d.s $f0, $f0
/* CE17C 80137A7C 8E420000 */ lw $v0, 0x0($s2)
/* CE180 80137A80 4406B000 */ mfc1 $a2, $f22
/* CE184 80137A84 4407B000 */ mfc1 $a3, $f22
/* CE188 80137A88 96230000 */ lhu $v1, 0x0($s1)
/* CE18C 80137A8C 3C013FE0 */ lui $at, (0x3FE00000 >> 16)
/* CE190 80137A90 44811800 */ mtc1 $at, $f3
/* CE194 80137A94 44801000 */ mtc1 $zero, $f2
/* CE198 80137A98 0040282D */ daddu $a1, $v0, $zero
/* CE19C 80137A9C 24420008 */ addiu $v0, $v0, 0x8
/* CE1A0 80137AA0 AE420000 */ sw $v0, 0x0($s2)
/* CE1A4 80137AA4 24620001 */ addiu $v0, $v1, 0x1
/* CE1A8 80137AA8 3063FFFF */ andi $v1, $v1, 0xFFFF
/* CE1AC 80137AAC 46220002 */ mul.d $f0, $f0, $f2
/* CE1B0 80137AB0 00000000 */ nop
/* CE1B4 80137AB4 00031980 */ sll $v1, $v1, 6
/* CE1B8 80137AB8 ACB30000 */ sw $s3, 0x0($a1)
/* CE1BC 80137ABC A6220000 */ sh $v0, 0x0($s1)
/* CE1C0 80137AC0 3044FFFF */ andi $a0, $v0, 0xFFFF
/* CE1C4 80137AC4 03C31821 */ addu $v1, $fp, $v1
/* CE1C8 80137AC8 00042180 */ sll $a0, $a0, 6
/* CE1CC 80137ACC ACA30004 */ sw $v1, 0x4($a1)
/* CE1D0 80137AD0 46200020 */ cvt.s.d $f0, $f0
/* CE1D4 80137AD4 44050000 */ mfc1 $a1, $f0
/* CE1D8 80137AD8 03C42021 */ addu $a0, $fp, $a0
/* CE1DC 80137ADC 0C019F20 */ jal guRotate
/* CE1E0 80137AE0 E7B40010 */ swc1 $f20, 0x10($sp)
/* CE1E4 80137AE4 3C09D838 */ lui $t1, (0xD8380002 >> 16)
/* CE1E8 80137AE8 35290002 */ ori $t1, $t1, (0xD8380002 & 0xFFFF)
/* CE1EC 80137AEC 8E480000 */ lw $t0, 0x0($s2)
/* CE1F0 80137AF0 4405B000 */ mfc1 $a1, $f22
/* CE1F4 80137AF4 96220000 */ lhu $v0, 0x0($s1)
/* CE1F8 80137AF8 00A0302D */ daddu $a2, $a1, $zero
/* CE1FC 80137AFC 00A0382D */ daddu $a3, $a1, $zero
/* CE200 80137B00 0100202D */ daddu $a0, $t0, $zero
/* CE204 80137B04 25080008 */ addiu $t0, $t0, 0x8
/* CE208 80137B08 24430001 */ addiu $v1, $v0, 0x1
/* CE20C 80137B0C 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CE210 80137B10 00021180 */ sll $v0, $v0, 6
/* CE214 80137B14 03C21021 */ addu $v0, $fp, $v0
/* CE218 80137B18 AE480000 */ sw $t0, 0x0($s2)
/* CE21C 80137B1C AC930000 */ sw $s3, 0x0($a0)
/* CE220 80137B20 A6230000 */ sh $v1, 0x0($s1)
/* CE224 80137B24 AC820004 */ sw $v0, 0x4($a0)
/* CE228 80137B28 25020008 */ addiu $v0, $t0, 0x8
/* CE22C 80137B2C AE420000 */ sw $v0, 0x0($s2)
/* CE230 80137B30 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* CE234 80137B34 AD020000 */ sw $v0, 0x0($t0)
/* CE238 80137B38 3C028015 */ lui $v0, %hi(D_8014E8F0)
/* CE23C 80137B3C 2442E8F0 */ addiu $v0, $v0, %lo(D_8014E8F0)
/* CE240 80137B40 AD020004 */ sw $v0, 0x4($t0)
/* CE244 80137B44 25020010 */ addiu $v0, $t0, 0x10
/* CE248 80137B48 AE420000 */ sw $v0, 0x0($s2)
/* CE24C 80137B4C AD090008 */ sw $t1, 0x8($t0)
/* CE250 80137B50 96240000 */ lhu $a0, 0x0($s1)
/* CE254 80137B54 24020040 */ addiu $v0, $zero, 0x40
/* CE258 80137B58 AD02000C */ sw $v0, 0xC($t0)
/* CE25C 80137B5C 00042180 */ sll $a0, $a0, 6
/* CE260 80137B60 0C019E08 */ jal guTranslate
/* CE264 80137B64 03C42021 */ addu $a0, $fp, $a0
/* CE268 80137B68 8E440000 */ lw $a0, 0x0($s2)
/* CE26C 80137B6C 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* CE270 80137B70 44810000 */ mtc1 $at, $f0
/* CE274 80137B74 96220000 */ lhu $v0, 0x0($s1)
/* CE278 80137B78 0080282D */ daddu $a1, $a0, $zero
/* CE27C 80137B7C 24840008 */ addiu $a0, $a0, 0x8
/* CE280 80137B80 24430001 */ addiu $v1, $v0, 0x1
/* CE284 80137B84 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CE288 80137B88 00021180 */ sll $v0, $v0, 6
/* CE28C 80137B8C 03C21021 */ addu $v0, $fp, $v0
/* CE290 80137B90 AE440000 */ sw $a0, 0x0($s2)
/* CE294 80137B94 ACB50000 */ sw $s5, 0x0($a1)
/* CE298 80137B98 A6230000 */ sh $v1, 0x0($s1)
/* CE29C 80137B9C ACA20004 */ sw $v0, 0x4($a1)
/* CE2A0 80137BA0 24820008 */ addiu $v0, $a0, 0x8
/* CE2A4 80137BA4 24850004 */ addiu $a1, $a0, 0x4
/* CE2A8 80137BA8 461C003E */ c.le.s $f0, $f28
/* CE2AC 80137BAC AE420000 */ sw $v0, 0x0($s2)
/* CE2B0 80137BB0 45010005 */ bc1t .L80137BC8
/* CE2B4 80137BB4 AC940000 */ sw $s4, 0x0($a0)
/* CE2B8 80137BB8 4600E20D */ trunc.w.s $f8, $f28
/* CE2BC 80137BBC 44074000 */ mfc1 $a3, $f8
/* CE2C0 80137BC0 0804DEF9 */ j .L80137BE4
/* CE2C4 80137BC4 3C06D838 */ lui $a2, (0xD8380002 >> 16)
.L80137BC8:
/* CE2C8 80137BC8 4600E001 */ sub.s $f0, $f28, $f0
/* CE2CC 80137BCC 3C028000 */ lui $v0, (0x80000000 >> 16)
/* CE2D0 80137BD0 4600020D */ trunc.w.s $f8, $f0
/* CE2D4 80137BD4 44074000 */ mfc1 $a3, $f8
/* CE2D8 80137BD8 00000000 */ nop
/* CE2DC 80137BDC 00E23825 */ or $a3, $a3, $v0
/* CE2E0 80137BE0 3C06D838 */ lui $a2, (0xD8380002 >> 16)
.L80137BE4:
/* CE2E4 80137BE4 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF)
/* CE2E8 80137BE8 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* CE2EC 80137BEC 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* CE2F0 80137BF0 8C830000 */ lw $v1, 0x0($a0)
/* CE2F4 80137BF4 30E200FF */ andi $v0, $a3, 0xFF
/* CE2F8 80137BF8 ACA20000 */ sw $v0, 0x0($a1)
/* CE2FC 80137BFC 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* CE300 80137C00 3C01432A */ lui $at, (0x432A0000 >> 16)
/* CE304 80137C04 44810000 */ mtc1 $at, $f0
/* CE308 80137C08 0060282D */ daddu $a1, $v1, $zero
/* CE30C 80137C0C 4618003C */ c.lt.s $f0, $f24
/* CE310 80137C10 3C014220 */ lui $at, (0x42200000 >> 16)
/* CE314 80137C14 44810000 */ mtc1 $at, $f0
/* CE318 80137C18 24630008 */ addiu $v1, $v1, 0x8
/* CE31C 80137C1C AC830000 */ sw $v1, 0x0($a0)
/* CE320 80137C20 ACA20000 */ sw $v0, 0x0($a1)
/* CE324 80137C24 3C028015 */ lui $v0, %hi(D_8014E9A8)
/* CE328 80137C28 2442E9A8 */ addiu $v0, $v0, %lo(D_8014E9A8)
/* CE32C 80137C2C ACA20004 */ sw $v0, 0x4($a1)
/* CE330 80137C30 24620008 */ addiu $v0, $v1, 0x8
/* CE334 80137C34 AC820000 */ sw $v0, 0x0($a0)
/* CE338 80137C38 24020040 */ addiu $v0, $zero, 0x40
/* CE33C 80137C3C 4600C000 */ add.s $f0, $f24, $f0
/* CE340 80137C40 AC660000 */ sw $a2, 0x0($v1)
/* CE344 80137C44 AC620004 */ sw $v0, 0x4($v1)
/* CE348 80137C48 4600020D */ trunc.w.s $f8, $f0
/* CE34C 80137C4C 44024000 */ mfc1 $v0, $f8
/* CE350 80137C50 45030001 */ bc1tl .L80137C58
/* CE354 80137C54 240200AA */ addiu $v0, $zero, 0xAA
.L80137C58:
/* CE358 80137C58 00021400 */ sll $v0, $v0, 16
/* CE35C 80137C5C 00021403 */ sra $v0, $v0, 16
/* CE360 80137C60 44820000 */ mtc1 $v0, $f0
/* CE364 80137C64 00000000 */ nop
/* CE368 80137C68 46800020 */ cvt.s.w $f0, $f0
/* CE36C 80137C6C E7A00010 */ swc1 $f0, 0x10($sp)
/* CE370 80137C70 0000202D */ daddu $a0, $zero, $zero
/* CE374 80137C74 0080282D */ daddu $a1, $a0, $zero
/* CE378 80137C78 2406013F */ addiu $a2, $zero, 0x13F
/* CE37C 80137C7C 0C04E362 */ jal draw_prev_frame_buffer_at_screen_pos
/* CE380 80137C80 240700EF */ addiu $a3, $zero, 0xEF
/* CE384 80137C84 0804DF41 */ j .L80137D04
/* CE388 80137C88 3C06DA38 */ lui $a2, (0xDA380007 >> 16)
glabel .L80137C8C
/* CE38C 80137C8C 24040001 */ addiu $a0, $zero, 0x1
/* CE390 80137C90 02C0282D */ daddu $a1, $s6, $zero
/* CE394 80137C94 0804DF32 */ j .L80137CC8
/* CE398 80137C98 02E0302D */ daddu $a2, $s7, $zero
glabel .L80137C9C
/* CE39C 80137C9C E7B80010 */ swc1 $f24, 0x10($sp)
/* CE3A0 80137CA0 0220202D */ daddu $a0, $s1, $zero
/* CE3A4 80137CA4 0240282D */ daddu $a1, $s2, $zero
/* CE3A8 80137CA8 02C0302D */ daddu $a2, $s6, $zero
/* CE3AC 80137CAC 0C04E362 */ jal draw_prev_frame_buffer_at_screen_pos
/* CE3B0 80137CB0 02E0382D */ daddu $a3, $s7, $zero
/* CE3B4 80137CB4 0804DF41 */ j .L80137D04
/* CE3B8 80137CB8 3C06DA38 */ lui $a2, (0xDA380007 >> 16)
glabel .L80137CBC
/* CE3BC 80137CBC 0000202D */ daddu $a0, $zero, $zero
/* CE3C0 80137CC0 0220282D */ daddu $a1, $s1, $zero
/* CE3C4 80137CC4 0240302D */ daddu $a2, $s2, $zero
.L80137CC8:
/* CE3C8 80137CC8 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* CE3CC 80137CCC 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* CE3D0 80137CD0 8C620000 */ lw $v0, 0x0($v1)
/* CE3D4 80137CD4 4407E000 */ mfc1 $a3, $f28
/* CE3D8 80137CD8 0040402D */ daddu $t0, $v0, $zero
/* CE3DC 80137CDC 24420008 */ addiu $v0, $v0, 0x8
/* CE3E0 80137CE0 AC620000 */ sw $v0, 0x0($v1)
/* CE3E4 80137CE4 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* CE3E8 80137CE8 AD020000 */ sw $v0, 0x0($t0)
/* CE3EC 80137CEC 3C028015 */ lui $v0, %hi(Gfx_LoadStencilTex_BlurryCircle)
/* CE3F0 80137CF0 2442E718 */ addiu $v0, $v0, %lo(Gfx_LoadStencilTex_BlurryCircle)
/* CE3F4 80137CF4 AD020004 */ sw $v0, 0x4($t0)
/* CE3F8 80137CF8 0C04E395 */ jal appendGfx_darkness_stencil
/* CE3FC 80137CFC E7B80010 */ swc1 $f24, 0x10($sp)
glabel .L80137D00
/* CE400 80137D00 3C06DA38 */ lui $a2, (0xDA380007 >> 16)
.L80137D04:
/* CE404 80137D04 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* CE408 80137D08 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* CE40C 80137D0C 34C60007 */ ori $a2, $a2, (0xDA380007 & 0xFFFF)
/* CE410 80137D10 8C820000 */ lw $v0, 0x0($a0)
/* CE414 80137D14 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* CE418 80137D18 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* CE41C 80137D1C 0040282D */ daddu $a1, $v0, $zero
/* CE420 80137D20 24420008 */ addiu $v0, $v0, 0x8
/* CE424 80137D24 00031980 */ sll $v1, $v1, 6
/* CE428 80137D28 AC820000 */ sw $v0, 0x0($a0)
/* CE42C 80137D2C 3C02800A */ lui $v0, %hi(gDisplayContext)
/* CE430 80137D30 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0)
/* CE434 80137D34 24630030 */ addiu $v1, $v1, 0x30
/* CE438 80137D38 ACA60000 */ sw $a2, 0x0($a1)
/* CE43C 80137D3C 00431021 */ addu $v0, $v0, $v1
.L80137D40:
/* CE440 80137D40 ACA20004 */ sw $v0, 0x4($a1)
.L80137D44:
/* CE444 80137D44 8FBF004C */ lw $ra, 0x4C($sp)
/* CE448 80137D48 8FBE0048 */ lw $fp, 0x48($sp)
/* CE44C 80137D4C 8FB70044 */ lw $s7, 0x44($sp)
/* CE450 80137D50 8FB60040 */ lw $s6, 0x40($sp)
/* CE454 80137D54 8FB5003C */ lw $s5, 0x3C($sp)
/* CE458 80137D58 8FB40038 */ lw $s4, 0x38($sp)
/* CE45C 80137D5C 8FB30034 */ lw $s3, 0x34($sp)
/* CE460 80137D60 8FB20030 */ lw $s2, 0x30($sp)
/* CE464 80137D64 8FB1002C */ lw $s1, 0x2C($sp)
/* CE468 80137D68 8FB00028 */ lw $s0, 0x28($sp)
/* CE46C 80137D6C D7BC0070 */ ldc1 $f28, 0x70($sp)
/* CE470 80137D70 D7BA0068 */ ldc1 $f26, 0x68($sp)
/* CE474 80137D74 D7B80060 */ ldc1 $f24, 0x60($sp)
/* CE478 80137D78 D7B60058 */ ldc1 $f22, 0x58($sp)
/* CE47C 80137D7C D7B40050 */ ldc1 $f20, 0x50($sp)
/* CE480 80137D80 03E00008 */ jr $ra
/* CE484 80137D84 27BD0078 */ addiu $sp, $sp, 0x78
### DECOMPILED C INSTRUCTIONS:
void _render_transition_stencil(u8 stencilType, f32 progress, ScreenOverlay* overlay) {
Camera* camera = &gCameras[gCurrentCameraID];
u8 colR, colG, colB;
s32 x1, y1, x2, y2;
f32 alpha;
s16 v0;
s16 s0;
Mtx* matrixStack = gDisplayContext->matrixStack;
if (progress == 0.0f) {
return;
}
if (overlay != NULL) {
colR = overlay->color.r;
colG = overlay->color.g;
colB = overlay->color.b;
x1 = overlay->screenPos[0][0];
y1 = overlay->screenPos[0][1];
x2 = overlay->screenPos[1][0];
y2 = overlay->screenPos[1][1];
alpha = overlay->alpha;
} else {
colR = colG = colB = 0;
x1 = y1 = x2 = y2 = 0;
alpha = 0.0f;
}
switch (stencilType) {
case OVERLAY_SCREEN_COLOR:
gDPPipeSync(gMainGfxPos++);
gDPSetColorDither(gMainGfxPos++, G_CD_MAGICSQ);
gDPSetAlphaDither(gMainGfxPos++, G_AD_PATTERN);
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
if (progress == 255.0f) {
gDPSetRenderMode(gMainGfxPos++, CVG_DST_SAVE | G_RM_OPA_SURF, CVG_DST_SAVE | G_RM_OPA_SURF2);
} else {
gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
}
gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
gDPSetPrimColor(gMainGfxPos++, 0, 0, colR, colG, colB, progress);
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
gDPFillRectangle(gMainGfxPos++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
return;
case OVERLAY_VIEWPORT_COLOR:
gDPPipeSync(gMainGfxPos++);
gDPSetColorDither(gMainGfxPos++, G_CD_MAGICSQ);
gDPSetAlphaDither(gMainGfxPos++, G_AD_PATTERN);
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
if (progress == 255.0f) {
gDPSetRenderMode(gMainGfxPos++, CVG_DST_SAVE | G_RM_OPA_SURF, CVG_DST_SAVE | G_RM_OPA_SURF2);
} else {
gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
}
gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
gDPSetPrimColor(gMainGfxPos++, 0, 0, colR, colG, colB, progress);
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
gDPFillRectangle(gMainGfxPos++, camera->viewportStartX, camera->viewportStartY,
camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH);
gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
return;
}
guOrtho(&matrixStack[gMatrixListPos], 0.0f, 320.0f, 0.0f, 240.0f, -1000.0f, 1000.0f, 1.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
switch (stencilType) {
case OVERLAY_VIEWPORT_MARIO:
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_Mario);
appendGfx_screen_transition_stencil(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, progress, colR, colG, colB, progress * alpha / 255.0f, gCurrentCameraID);
break;
case OVERLAY_SCREEN_MARIO:
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_Mario);
appendGfx_screen_transition_stencil(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, progress, colR, colG, colB, progress * alpha / 255.0f, -1);
break;
case OVERLAY_VIEWPORT_STAR:
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_Star);
appendGfx_screen_transition_stencil(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, progress, colR, colG, colB, progress * alpha / 255.0f, gCurrentCameraID);
break;
case OVERLAY_SCREEN_STAR:
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_Star);
appendGfx_screen_transition_stencil(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, progress, colR, colG, colB, progress * alpha / 255.0f, -1);
break;
case OVERLAY_VIEWPORT_SPOTLIGHT:
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_SharpCircle);
appendGfx_screen_transition_stencil(x1, y1, progress, 0, 0, 0, 0, gCurrentCameraID);
break;
case OVERLAY_SCREEN_SPOTLIGHT:
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_SharpCircle);
appendGfx_screen_transition_stencil(x1, y1, progress, 0, 0, 0, 0, -1);
break;
case OVERLAY_TYPE_2:
s0 = progress;
guTranslate(&matrixStack[gMatrixListPos], 80.0f, 120.0f, 0.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
guRotate(&matrixStack[gMatrixListPos], s0 * 0.5f, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_8014E8F0);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
guTranslate(&matrixStack[gMatrixListPos], 240.0f, 120.0f, 0.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
guRotate(&matrixStack[gMatrixListPos], s0 * 0.5f, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_8014E8F0);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
guTranslate(&matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_8014EA48);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
break;
case OVERLAY_TYPE_9:
s0 = progress;
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 0);
guTranslate(&matrixStack[gMatrixListPos], x1, SCREEN_HEIGHT - y1, 0.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
guRotate(&matrixStack[gMatrixListPos], -s0, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_8014E8F0);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
guTranslate(&matrixStack[gMatrixListPos], x2, SCREEN_HEIGHT - y2, 0.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
guRotate(&matrixStack[gMatrixListPos], -s0, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_8014E8F0);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
guTranslate(&matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, alpha);
gSPDisplayList(gMainGfxPos++, D_8014E9A8);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
break;
case OVERLAY_START_BATTLE:
s0 = progress;
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 0);
guTranslate(&matrixStack[gMatrixListPos], x1, SCREEN_HEIGHT - y1, 0.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
guRotate(&matrixStack[gMatrixListPos], (f32)(-s0) * 0.5, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_8014E8F0);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
guTranslate(&matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f);
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, alpha);
gSPDisplayList(gMainGfxPos++, D_8014E9A8);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
v0 = progress + 40;
if (progress > 170) {
v0 = 170;
}
draw_prev_frame_buffer_at_screen_pos(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, v0);
break;
case OVERLAY_WORLD_DARKNESS:
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_BlurryCircle);
appendGfx_darkness_stencil(TRUE, x2, y2, alpha, progress);
break;
case OVERLAY_BLUR:
draw_prev_frame_buffer_at_screen_pos(x1, y1, x2, y2, progress);
break;
case OVERLAY_BATTLE_DARKNESS:
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_BlurryCircle);
appendGfx_darkness_stencil(FALSE, x1, y1, alpha, progress);
break;
case OVERLAY_UNUSED_1:
case OVERLAY_UNUSED_2:
break;
}
gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel au_bgm_player_update_playing
/* 2A068 8004EC68 27BDFFA8 */ addiu $sp, $sp, -0x58
/* 2A06C 8004EC6C AFB40040 */ sw $s4, 0x40($sp)
/* 2A070 8004EC70 0080A02D */ daddu $s4, $a0, $zero
/* 2A074 8004EC74 AFBF0054 */ sw $ra, 0x54($sp)
/* 2A078 8004EC78 AFBE0050 */ sw $fp, 0x50($sp)
/* 2A07C 8004EC7C AFB7004C */ sw $s7, 0x4C($sp)
/* 2A080 8004EC80 AFB60048 */ sw $s6, 0x48($sp)
/* 2A084 8004EC84 AFB50044 */ sw $s5, 0x44($sp)
/* 2A088 8004EC88 AFB3003C */ sw $s3, 0x3C($sp)
/* 2A08C 8004EC8C AFB20038 */ sw $s2, 0x38($sp)
/* 2A090 8004EC90 AFB10034 */ sw $s1, 0x34($sp)
/* 2A094 8004EC94 AFB00030 */ sw $s0, 0x30($sp)
/* 2A098 8004EC98 AFA00010 */ sw $zero, 0x10($sp)
/* 2A09C 8004EC9C 8E8200BC */ lw $v0, 0xBC($s4)
/* 2A0A0 8004ECA0 10400011 */ beqz $v0, .L8004ECE8
/* 2A0A4 8004ECA4 A3A00028 */ sb $zero, 0x28($sp)
/* 2A0A8 8004ECA8 2442FFFF */ addiu $v0, $v0, -0x1
/* 2A0AC 8004ECAC 14400005 */ bnez $v0, .L8004ECC4
/* 2A0B0 8004ECB0 AE8200BC */ sw $v0, 0xBC($s4)
/* 2A0B4 8004ECB4 8E8200B8 */ lw $v0, 0xB8($s4)
/* 2A0B8 8004ECB8 AE8000B8 */ sw $zero, 0xB8($s4)
/* 2A0BC 8004ECBC 08013B34 */ j .L8004ECD0
/* 2A0C0 8004ECC0 AE8000B4 */ sw $zero, 0xB4($s4)
.L8004ECC4:
/* 2A0C4 8004ECC4 8E8200B0 */ lw $v0, 0xB0($s4)
/* 2A0C8 8004ECC8 8E8300B4 */ lw $v1, 0xB4($s4)
/* 2A0CC 8004ECCC 00431021 */ addu $v0, $v0, $v1
.L8004ECD0:
/* 2A0D0 8004ECD0 AE8200B0 */ sw $v0, 0xB0($s4)
/* 2A0D4 8004ECD4 8E8300B0 */ lw $v1, 0xB0($s4)
/* 2A0D8 8004ECD8 00031080 */ sll $v0, $v1, 2
/* 2A0DC 8004ECDC 00431021 */ addu $v0, $v0, $v1
/* 2A0E0 8004ECE0 00021040 */ sll $v0, $v0, 1
/* 2A0E4 8004ECE4 AE820008 */ sw $v0, 0x8($s4)
.L8004ECE8:
/* 2A0E8 8004ECE8 8E8200CC */ lw $v0, 0xCC($s4)
/* 2A0EC 8004ECEC 1040000D */ beqz $v0, .L8004ED24
/* 2A0F0 8004ECF0 2442FFFF */ addiu $v0, $v0, -0x1
/* 2A0F4 8004ECF4 14400005 */ bnez $v0, .L8004ED0C
/* 2A0F8 8004ECF8 AE8200CC */ sw $v0, 0xCC($s4)
/* 2A0FC 8004ECFC 8E8200C8 */ lw $v0, 0xC8($s4)
/* 2A100 8004ED00 AE8000C8 */ sw $zero, 0xC8($s4)
/* 2A104 8004ED04 08013B46 */ j .L8004ED18
/* 2A108 8004ED08 AE8000C4 */ sw $zero, 0xC4($s4)
.L8004ED0C:
/* 2A10C 8004ED0C 8E8200C0 */ lw $v0, 0xC0($s4)
/* 2A110 8004ED10 8E8300C4 */ lw $v1, 0xC4($s4)
/* 2A114 8004ED14 00431021 */ addu $v0, $v0, $v1
.L8004ED18:
/* 2A118 8004ED18 AE8200C0 */ sw $v0, 0xC0($s4)
/* 2A11C 8004ED1C 240B0001 */ addiu $t3, $zero, 0x1
/* 2A120 8004ED20 AFAB0010 */ sw $t3, 0x10($sp)
.L8004ED24:
/* 2A124 8004ED24 8E820204 */ lw $v0, 0x204($s4)
/* 2A128 8004ED28 1040003B */ beqz $v0, .L8004EE18
/* 2A12C 8004ED2C A280021A */ sb $zero, 0x21A($s4)
/* 2A130 8004ED30 92820232 */ lbu $v0, 0x232($s4)
/* 2A134 8004ED34 1040001D */ beqz $v0, .L8004EDAC
/* 2A138 8004ED38 2411000F */ addiu $s1, $zero, 0xF
/* 2A13C 8004ED3C 24160030 */ addiu $s6, $zero, 0x30
.L8004ED40:
/* 2A140 8004ED40 8E820204 */ lw $v0, 0x204($s4)
/* 2A144 8004ED44 90570000 */ lbu $s7, 0x0($v0)
/* 2A148 8004ED48 24420001 */ addiu $v0, $v0, 0x1
/* 2A14C 8004ED4C 12E00030 */ beqz $s7, .L8004EE10
/* 2A150 8004ED50 AE820204 */ sw $v0, 0x204($s4)
/* 2A154 8004ED54 0040182D */ daddu $v1, $v0, $zero
/* 2A158 8004ED58 00171040 */ sll $v0, $s7, 1
/* 2A15C 8004ED5C 00571021 */ addu $v0, $v0, $s7
/* 2A160 8004ED60 00021140 */ sll $v0, $v0, 5
/* 2A164 8004ED64 244201FC */ addiu $v0, $v0, 0x1FC
/* 2A168 8004ED68 02828021 */ addu $s0, $s4, $v0
/* 2A16C 8004ED6C A69600D4 */ sh $s6, 0xD4($s4)
/* 2A170 8004ED70 90620000 */ lbu $v0, 0x0($v1)
/* 2A174 8004ED74 24630001 */ addiu $v1, $v1, 0x1
/* 2A178 8004ED78 AE830204 */ sw $v1, 0x204($s4)
/* 2A17C 8004ED7C A28200D6 */ sb $v0, 0xD6($s4)
/* 2A180 8004ED80 8E020000 */ lw $v0, 0x0($s0)
/* 2A184 8004ED84 10400005 */ beqz $v0, .L8004ED9C
/* 2A188 8004ED88 0220102D */ daddu $v0, $s1, $zero
/* 2A18C 8004ED8C 0280202D */ daddu $a0, $s4, $zero
/* 2A190 8004ED90 0C013FB4 */ jal au_BGMCmd_F6_TrackVolumeFade
/* 2A194 8004ED94 0200282D */ daddu $a1, $s0, $zero
/* 2A198 8004ED98 0220102D */ daddu $v0, $s1, $zero
.L8004ED9C:
/* 2A19C 8004ED9C 1440FFE8 */ bnez $v0, .L8004ED40
/* 2A1A0 8004EDA0 2631FFFF */ addiu $s1, $s1, -0x1
/* 2A1A4 8004EDA4 08013B85 */ j .L8004EE14
/* 2A1A8 8004EDA8 AE800204 */ sw $zero, 0x204($s4)
.L8004EDAC:
/* 2A1AC 8004EDAC 24160030 */ addiu $s6, $zero, 0x30
.L8004EDB0:
/* 2A1B0 8004EDB0 8E820204 */ lw $v0, 0x204($s4)
/* 2A1B4 8004EDB4 90570000 */ lbu $s7, 0x0($v0)
/* 2A1B8 8004EDB8 24420001 */ addiu $v0, $v0, 0x1
/* 2A1BC 8004EDBC 12E00014 */ beqz $s7, .L8004EE10
/* 2A1C0 8004EDC0 AE820204 */ sw $v0, 0x204($s4)
/* 2A1C4 8004EDC4 00171040 */ sll $v0, $s7, 1
/* 2A1C8 8004EDC8 00571021 */ addu $v0, $v0, $s7
/* 2A1CC 8004EDCC 00021140 */ sll $v0, $v0, 5
/* 2A1D0 8004EDD0 244201FC */ addiu $v0, $v0, 0x1FC
/* 2A1D4 8004EDD4 8E830204 */ lw $v1, 0x204($s4)
/* 2A1D8 8004EDD8 02828021 */ addu $s0, $s4, $v0
/* 2A1DC 8004EDDC A69600D4 */ sh $s6, 0xD4($s4)
/* 2A1E0 8004EDE0 A28000D6 */ sb $zero, 0xD6($s4)
/* 2A1E4 8004EDE4 24630001 */ addiu $v1, $v1, 0x1
/* 2A1E8 8004EDE8 AE830204 */ sw $v1, 0x204($s4)
/* 2A1EC 8004EDEC 8E020000 */ lw $v0, 0x0($s0)
/* 2A1F0 8004EDF0 10400005 */ beqz $v0, .L8004EE08
/* 2A1F4 8004EDF4 0220102D */ daddu $v0, $s1, $zero
/* 2A1F8 8004EDF8 0280202D */ daddu $a0, $s4, $zero
/* 2A1FC 8004EDFC 0C013FB4 */ jal au_BGMCmd_F6_TrackVolumeFade
/* 2A200 8004EE00 0200282D */ daddu $a1, $s0, $zero
/* 2A204 8004EE04 0220102D */ daddu $v0, $s1, $zero
.L8004EE08:
/* 2A208 8004EE08 1440FFE9 */ bnez $v0, .L8004EDB0
/* 2A20C 8004EE0C 2631FFFF */ addiu $s1, $s1, -0x1
.L8004EE10:
/* 2A210 8004EE10 AE800204 */ sw $zero, 0x204($s4)
.L8004EE14:
/* 2A214 8004EE14 A2800232 */ sb $zero, 0x232($s4)
.L8004EE18:
/* 2A218 8004EE18 0000B82D */ daddu $s7, $zero, $zero
/* 2A21C 8004EE1C 00171040 */ sll $v0, $s7, 1
.L8004EE20:
/* 2A220 8004EE20 00571021 */ addu $v0, $v0, $s7
/* 2A224 8004EE24 00021140 */ sll $v0, $v0, 5
/* 2A228 8004EE28 2442025C */ addiu $v0, $v0, 0x25C
/* 2A22C 8004EE2C 02828021 */ addu $s0, $s4, $v0
/* 2A230 8004EE30 8E020000 */ lw $v0, 0x0($s0)
/* 2A234 8004EE34 5040034E */ beql $v0, $zero, .L8004FB70
/* 2A238 8004EE38 26F70001 */ addiu $s7, $s7, 0x1
/* 2A23C 8004EE3C AE000040 */ sw $zero, 0x40($s0)
/* 2A240 8004EE40 8FAB0010 */ lw $t3, 0x10($sp)
/* 2A244 8004EE44 15600004 */ bnez $t3, .L8004EE58
/* 2A248 8004EE48 240B0001 */ addiu $t3, $zero, 0x1
/* 2A24C 8004EE4C 8282021A */ lb $v0, 0x21A($s4)
/* 2A250 8004EE50 50400002 */ beql $v0, $zero, .L8004EE5C
/* 2A254 8004EE54 A2000041 */ sb $zero, 0x41($s0)
.L8004EE58:
/* 2A258 8004EE58 A20B0041 */ sb $t3, 0x41($s0)
.L8004EE5C:
/* 2A25C 8004EE5C 8E020024 */ lw $v0, 0x24($s0)
/* 2A260 8004EE60 1040000C */ beqz $v0, .L8004EE94
/* 2A264 8004EE64 2442FFFF */ addiu $v0, $v0, -0x1
/* 2A268 8004EE68 14400004 */ bnez $v0, .L8004EE7C
/* 2A26C 8004EE6C AE020024 */ sw $v0, 0x24($s0)
/* 2A270 8004EE70 8E020020 */ lw $v0, 0x20($s0)
/* 2A274 8004EE74 08013BA3 */ j .L8004EE8C
/* 2A278 8004EE78 AE020018 */ sw $v0, 0x18($s0)
.L8004EE7C:
/* 2A27C 8004EE7C 8E020018 */ lw $v0, 0x18($s0)
/* 2A280 8004EE80 8E03001C */ lw $v1, 0x1C($s0)
/* 2A284 8004EE84 00431021 */ addu $v0, $v0, $v1
/* 2A288 8004EE88 AE020018 */ sw $v0, 0x18($s0)
.L8004EE8C:
/* 2A28C 8004EE8C 240B0001 */ addiu $t3, $zero, 0x1
/* 2A290 8004EE90 A20B0041 */ sb $t3, 0x41($s0)
.L8004EE94:
/* 2A294 8004EE94 86020036 */ lh $v0, 0x36($s0)
/* 2A298 8004EE98 96030036 */ lhu $v1, 0x36($s0)
/* 2A29C 8004EE9C 1040000E */ beqz $v0, .L8004EED8
/* 2A2A0 8004EEA0 2462FFFF */ addiu $v0, $v1, -0x1
/* 2A2A4 8004EEA4 A6020036 */ sh $v0, 0x36($s0)
/* 2A2A8 8004EEA8 00021400 */ sll $v0, $v0, 16
/* 2A2AC 8004EEAC 14400004 */ bnez $v0, .L8004EEC0
/* 2A2B0 8004EEB0 00000000 */ nop
/* 2A2B4 8004EEB4 86020034 */ lh $v0, 0x34($s0)
/* 2A2B8 8004EEB8 08013BB3 */ j .L8004EECC
/* 2A2BC 8004EEBC 00021400 */ sll $v0, $v0, 16
.L8004EEC0:
/* 2A2C0 8004EEC0 8E02002C */ lw $v0, 0x2C($s0)
/* 2A2C4 8004EEC4 8E030030 */ lw $v1, 0x30($s0)
/* 2A2C8 8004EEC8 00431021 */ addu $v0, $v0, $v1
.L8004EECC:
/* 2A2CC 8004EECC AE02002C */ sw $v0, 0x2C($s0)
/* 2A2D0 8004EED0 240B0001 */ addiu $t3, $zero, 0x1
/* 2A2D4 8004EED4 A20B0041 */ sb $t3, 0x41($s0)
.L8004EED8:
/* 2A2D8 8004EED8 8E020028 */ lw $v0, 0x28($s0)
/* 2A2DC 8004EEDC 2442FFFF */ addiu $v0, $v0, -0x1
/* 2A2E0 8004EEE0 1C400250 */ bgtz $v0, .L8004F824
/* 2A2E4 8004EEE4 AE020028 */ sw $v0, 0x28($s0)
/* 2A2E8 8004EEE8 920B0052 */ lbu $t3, 0x52($s0)
/* 2A2EC 8004EEEC 1440024D */ bnez $v0, .L8004F824
/* 2A2F0 8004EEF0 A3AB001F */ sb $t3, 0x1F($sp)
.L8004EEF4:
/* 2A2F4 8004EEF4 8E020000 */ lw $v0, 0x0($s0)
/* 2A2F8 8004EEF8 90470000 */ lbu $a3, 0x0($v0)
/* 2A2FC 8004EEFC 24420001 */ addiu $v0, $v0, 0x1
/* 2A300 8004EF00 AE020000 */ sw $v0, 0x0($s0)
/* 2A304 8004EF04 8602003E */ lh $v0, 0x3E($s0)
/* 2A308 8004EF08 9603003E */ lhu $v1, 0x3E($s0)
/* 2A30C 8004EF0C 10400007 */ beqz $v0, .L8004EF2C
/* 2A310 8004EF10 2462FFFF */ addiu $v0, $v1, -0x1
/* 2A314 8004EF14 A602003E */ sh $v0, 0x3E($s0)
/* 2A318 8004EF18 00021400 */ sll $v0, $v0, 16
/* 2A31C 8004EF1C 14400004 */ bnez $v0, .L8004EF30
/* 2A320 8004EF20 00071600 */ sll $v0, $a3, 24
/* 2A324 8004EF24 8E020004 */ lw $v0, 0x4($s0)
/* 2A328 8004EF28 AE020000 */ sw $v0, 0x0($s0)
.L8004EF2C:
/* 2A32C 8004EF2C 00071600 */ sll $v0, $a3, 24
.L8004EF30:
/* 2A330 8004EF30 0440002B */ bltz $v0, .L8004EFE0
/* 2A334 8004EF34 30E300FF */ andi $v1, $a3, 0xFF
/* 2A338 8004EF38 14600009 */ bnez $v1, .L8004EF60
/* 2A33C 8004EF3C 2C620078 */ sltiu $v0, $v1, 0x78
/* 2A340 8004EF40 8E020008 */ lw $v0, 0x8($s0)
/* 2A344 8004EF44 10400004 */ beqz $v0, .L8004EF58
/* 2A348 8004EF48 240B0001 */ addiu $t3, $zero, 0x1
/* 2A34C 8004EF4C AE020000 */ sw $v0, 0x0($s0)
/* 2A350 8004EF50 08013E06 */ j .L8004F818
/* 2A354 8004EF54 AE000008 */ sw $zero, 0x8($s0)
.L8004EF58:
/* 2A358 8004EF58 08013E09 */ j .L8004F824
/* 2A35C 8004EF5C A3AB0028 */ sb $t3, 0x28($sp)
.L8004EF60:
/* 2A360 8004EF60 5440022D */ bnel $v0, $zero, .L8004F818
/* 2A364 8004EF64 AE030028 */ sw $v1, 0x28($s0)
/* 2A368 8004EF68 8E020000 */ lw $v0, 0x0($s0)
/* 2A36C 8004EF6C 90430000 */ lbu $v1, 0x0($v0)
/* 2A370 8004EF70 24420001 */ addiu $v0, $v0, 0x1
/* 2A374 8004EF74 AE020000 */ sw $v0, 0x0($s0)
/* 2A378 8004EF78 30E20007 */ andi $v0, $a3, 0x7
/* 2A37C 8004EF7C 00021200 */ sll $v0, $v0, 8
/* 2A380 8004EF80 00431021 */ addu $v0, $v0, $v1
/* 2A384 8004EF84 24420078 */ addiu $v0, $v0, 0x78
/* 2A388 8004EF88 AE020028 */ sw $v0, 0x28($s0)
/* 2A38C 8004EF8C 8602003E */ lh $v0, 0x3E($s0)
/* 2A390 8004EF90 9603003E */ lhu $v1, 0x3E($s0)
/* 2A394 8004EF94 10400220 */ beqz $v0, .L8004F818
/* 2A398 8004EF98 2462FFFF */ addiu $v0, $v1, -0x1
/* 2A39C 8004EF9C A602003E */ sh $v0, 0x3E($s0)
/* 2A3A0 8004EFA0 00021400 */ sll $v0, $v0, 16
/* 2A3A4 8004EFA4 1440021C */ bnez $v0, .L8004F818
/* 2A3A8 8004EFA8 00000000 */ nop
/* 2A3AC 8004EFAC 8E020004 */ lw $v0, 0x4($s0)
/* 2A3B0 8004EFB0 08013E06 */ j .L8004F818
/* 2A3B4 8004EFB4 AE020000 */ sw $v0, 0x0($s0)
.L8004EFB8:
/* 2A3B8 8004EFB8 08013C47 */ j .L8004F11C
/* 2A3BC 8004EFBC 24110001 */ addiu $s1, $zero, 0x1
.L8004EFC0:
/* 2A3C0 8004EFC0 0C014E31 */ jal au_reset_voice
/* 2A3C4 8004EFC4 0240202D */ daddu $a0, $s2, $zero
/* 2A3C8 8004EFC8 08013C63 */ j .L8004F18C
/* 2A3CC 8004EFCC 24110001 */ addiu $s1, $zero, 0x1
.L8004EFD0:
/* 2A3D0 8004EFD0 0C014E31 */ jal au_reset_voice
/* 2A3D4 8004EFD4 0240202D */ daddu $a0, $s2, $zero
/* 2A3D8 8004EFD8 08013C82 */ j .L8004F208
/* 2A3DC 8004EFDC 24110001 */ addiu $s1, $zero, 0x1
.L8004EFE0:
/* 2A3E0 8004EFE0 2C6200D4 */ sltiu $v0, $v1, 0xD4
/* 2A3E4 8004EFE4 104001B7 */ beqz $v0, .L8004F6C4
/* 2A3E8 8004EFE8 00000000 */ nop
/* 2A3EC 8004EFEC 8E020000 */ lw $v0, 0x0($s0)
/* 2A3F0 8004EFF0 905E0000 */ lbu $fp, 0x0($v0)
/* 2A3F4 8004EFF4 24420001 */ addiu $v0, $v0, 0x1
/* 2A3F8 8004EFF8 AE020000 */ sw $v0, 0x0($s0)
/* 2A3FC 8004EFFC 30E2007F */ andi $v0, $a3, 0x7F
/* 2A400 8004F000 304200FF */ andi $v0, $v0, 0xFF
/* 2A404 8004F004 A7A20026 */ sh $v0, 0x26($sp)
/* 2A408 8004F008 8602003E */ lh $v0, 0x3E($s0)
/* 2A40C 8004F00C 9603003E */ lhu $v1, 0x3E($s0)
/* 2A410 8004F010 10400007 */ beqz $v0, .L8004F030
/* 2A414 8004F014 2462FFFF */ addiu $v0, $v1, -0x1
/* 2A418 8004F018 A602003E */ sh $v0, 0x3E($s0)
/* 2A41C 8004F01C 00021400 */ sll $v0, $v0, 16
/* 2A420 8004F020 14400003 */ bnez $v0, .L8004F030
/* 2A424 8004F024 00000000 */ nop
/* 2A428 8004F028 8E020004 */ lw $v0, 0x4($s0)
/* 2A42C 8004F02C AE020000 */ sw $v0, 0x0($s0)
.L8004F030:
/* 2A430 8004F030 8E020000 */ lw $v0, 0x0($s0)
/* 2A434 8004F034 90560000 */ lbu $s6, 0x0($v0)
/* 2A438 8004F038 24420001 */ addiu $v0, $v0, 0x1
/* 2A43C 8004F03C AE020000 */ sw $v0, 0x0($s0)
/* 2A440 8004F040 8602003E */ lh $v0, 0x3E($s0)
/* 2A444 8004F044 9603003E */ lhu $v1, 0x3E($s0)
/* 2A448 8004F048 10400007 */ beqz $v0, .L8004F068
/* 2A44C 8004F04C 2462FFFF */ addiu $v0, $v1, -0x1
/* 2A450 8004F050 A602003E */ sh $v0, 0x3E($s0)
/* 2A454 8004F054 00021400 */ sll $v0, $v0, 16
/* 2A458 8004F058 14400004 */ bnez $v0, .L8004F06C
/* 2A45C 8004F05C 2AC200C0 */ slti $v0, $s6, 0xC0
/* 2A460 8004F060 8E020004 */ lw $v0, 0x4($s0)
/* 2A464 8004F064 AE020000 */ sw $v0, 0x0($s0)
.L8004F068:
/* 2A468 8004F068 2AC200C0 */ slti $v0, $s6, 0xC0
.L8004F06C:
/* 2A46C 8004F06C 14400013 */ bnez $v0, .L8004F0BC
/* 2A470 8004F070 00000000 */ nop
/* 2A474 8004F074 8E020000 */ lw $v0, 0x0($s0)
/* 2A478 8004F078 90430000 */ lbu $v1, 0x0($v0)
/* 2A47C 8004F07C 24420001 */ addiu $v0, $v0, 0x1
/* 2A480 8004F080 AE020000 */ sw $v0, 0x0($s0)
/* 2A484 8004F084 32C2003F */ andi $v0, $s6, 0x3F
/* 2A488 8004F088 00021200 */ sll $v0, $v0, 8
/* 2A48C 8004F08C 00431021 */ addu $v0, $v0, $v1
/* 2A490 8004F090 245600C0 */ addiu $s6, $v0, 0xC0
/* 2A494 8004F094 8602003E */ lh $v0, 0x3E($s0)
/* 2A498 8004F098 9603003E */ lhu $v1, 0x3E($s0)
/* 2A49C 8004F09C 10400007 */ beqz $v0, .L8004F0BC
/* 2A4A0 8004F0A0 2462FFFF */ addiu $v0, $v1, -0x1
/* 2A4A4 8004F0A4 A602003E */ sh $v0, 0x3E($s0)
/* 2A4A8 8004F0A8 00021400 */ sll $v0, $v0, 16
/* 2A4AC 8004F0AC 14400003 */ bnez $v0, .L8004F0BC
/* 2A4B0 8004F0B0 00000000 */ nop
/* 2A4B4 8004F0B4 8E020004 */ lw $v0, 0x4($s0)
/* 2A4B8 8004F0B8 AE020000 */ sw $v0, 0x0($s0)
.L8004F0BC:
/* 2A4BC 8004F0BC 9202005A */ lbu $v0, 0x5A($s0)
/* 2A4C0 8004F0C0 14400097 */ bnez $v0, .L8004F320
/* 2A4C4 8004F0C4 0000882D */ daddu $s1, $zero, $zero
/* 2A4C8 8004F0C8 93B5001F */ lbu $s5, 0x1F($sp)
/* 2A4CC 8004F0CC 92040053 */ lbu $a0, 0x53($s0)
/* 2A4D0 8004F0D0 32A300FF */ andi $v1, $s5, 0xFF
/* 2A4D4 8004F0D4 0064102B */ sltu $v0, $v1, $a0
/* 2A4D8 8004F0D8 10400010 */ beqz $v0, .L8004F11C
/* 2A4DC 8004F0DC 000310C0 */ sll $v0, $v1, 3
/* 2A4E0 8004F0E0 8E850000 */ lw $a1, 0x0($s4)
.L8004F0E4:
/* 2A4E4 8004F0E4 00431021 */ addu $v0, $v0, $v1
/* 2A4E8 8004F0E8 000210C0 */ sll $v0, $v0, 3
/* 2A4EC 8004F0EC 24421320 */ addiu $v0, $v0, 0x1320
/* 2A4F0 8004F0F0 00A29021 */ addu $s2, $a1, $v0
/* 2A4F4 8004F0F4 93AB001F */ lbu $t3, 0x1F($sp)
/* 2A4F8 8004F0F8 92420045 */ lbu $v0, 0x45($s2)
/* 2A4FC 8004F0FC 256B0001 */ addiu $t3, $t3, 0x1
/* 2A500 8004F100 1040FFAD */ beqz $v0, .L8004EFB8
/* 2A504 8004F104 A3AB001F */ sb $t3, 0x1F($sp)
/* 2A508 8004F108 26B50001 */ addiu $s5, $s5, 0x1
/* 2A50C 8004F10C 32A300FF */ andi $v1, $s5, 0xFF
/* 2A510 8004F110 0064102B */ sltu $v0, $v1, $a0
/* 2A514 8004F114 1440FFF3 */ bnez $v0, .L8004F0E4
/* 2A518 8004F118 000310C0 */ sll $v0, $v1, 3
.L8004F11C:
/* 2A51C 8004F11C 16200082 */ bnez $s1, .L8004F328
/* 2A520 8004F120 32A200FF */ andi $v0, $s5, 0xFF
/* 2A524 8004F124 92020054 */ lbu $v0, 0x54($s0)
/* 2A528 8004F128 2C420005 */ sltiu $v0, $v0, 0x5
/* 2A52C 8004F12C 14400066 */ bnez $v0, .L8004F2C8
/* 2A530 8004F130 00000000 */ nop
/* 2A534 8004F134 92150052 */ lbu $s5, 0x52($s0)
/* 2A538 8004F138 92030053 */ lbu $v1, 0x53($s0)
/* 2A53C 8004F13C 32A500FF */ andi $a1, $s5, 0xFF
/* 2A540 8004F140 00A3102B */ sltu $v0, $a1, $v1
/* 2A544 8004F144 10400011 */ beqz $v0, .L8004F18C
/* 2A548 8004F148 000510C0 */ sll $v0, $a1, 3
/* 2A54C 8004F14C 0060302D */ daddu $a2, $v1, $zero
/* 2A550 8004F150 8E840000 */ lw $a0, 0x0($s4)
/* 2A554 8004F154 92830234 */ lbu $v1, 0x234($s4)
.L8004F158:
/* 2A558 8004F158 00451021 */ addu $v0, $v0, $a1
/* 2A55C 8004F15C 000210C0 */ sll $v0, $v0, 3
/* 2A560 8004F160 24421320 */ addiu $v0, $v0, 0x1320
/* 2A564 8004F164 00829021 */ addu $s2, $a0, $v0
/* 2A568 8004F168 92420045 */ lbu $v0, 0x45($s2)
/* 2A56C 8004F16C 0043102B */ sltu $v0, $v0, $v1
/* 2A570 8004F170 1440FF93 */ bnez $v0, .L8004EFC0
/* 2A574 8004F174 00000000 */ nop
/* 2A578 8004F178 26B50001 */ addiu $s5, $s5, 0x1
/* 2A57C 8004F17C 32A500FF */ andi $a1, $s5, 0xFF
/* 2A580 8004F180 00A6102B */ sltu $v0, $a1, $a2
/* 2A584 8004F184 1440FFF4 */ bnez $v0, .L8004F158
/* 2A588 8004F188 000510C0 */ sll $v0, $a1, 3
.L8004F18C:
/* 2A58C 8004F18C 16200066 */ bnez $s1, .L8004F328
/* 2A590 8004F190 32A200FF */ andi $v0, $s5, 0xFF
/* 2A594 8004F194 92150052 */ lbu $s5, 0x52($s0)
/* 2A598 8004F198 92030053 */ lbu $v1, 0x53($s0)
/* 2A59C 8004F19C 32A500FF */ andi $a1, $s5, 0xFF
/* 2A5A0 8004F1A0 00A3102B */ sltu $v0, $a1, $v1
/* 2A5A4 8004F1A4 10400018 */ beqz $v0, .L8004F208
/* 2A5A8 8004F1A8 000510C0 */ sll $v0, $a1, 3
/* 2A5AC 8004F1AC 0060302D */ daddu $a2, $v1, $zero
/* 2A5B0 8004F1B0 8E840000 */ lw $a0, 0x0($s4)
/* 2A5B4 8004F1B4 92830234 */ lbu $v1, 0x234($s4)
.L8004F1B8:
/* 2A5B8 8004F1B8 00451021 */ addu $v0, $v0, $a1
/* 2A5BC 8004F1BC 000210C0 */ sll $v0, $v0, 3
/* 2A5C0 8004F1C0 24421320 */ addiu $v0, $v0, 0x1320
/* 2A5C4 8004F1C4 00829021 */ addu $s2, $a0, $v0
/* 2A5C8 8004F1C8 92420045 */ lbu $v0, 0x45($s2)
/* 2A5CC 8004F1CC 5443000A */ bnel $v0, $v1, .L8004F1F8
/* 2A5D0 8004F1D0 26B50001 */ addiu $s5, $s5, 0x1
/* 2A5D4 8004F1D4 00051040 */ sll $v0, $a1, 1
/* 2A5D8 8004F1D8 00451021 */ addu $v0, $v0, $a1
/* 2A5DC 8004F1DC 000210C0 */ sll $v0, $v0, 3
/* 2A5E0 8004F1E0 2442085C */ addiu $v0, $v0, 0x85C
/* 2A5E4 8004F1E4 02829821 */ addu $s3, $s4, $v0
/* 2A5E8 8004F1E8 8E62000C */ lw $v0, 0xC($s3)
/* 2A5EC 8004F1EC 1040FF78 */ beqz $v0, .L8004EFD0
/* 2A5F0 8004F1F0 00000000 */ nop
/* 2A5F4 8004F1F4 26B50001 */ addiu $s5, $s5, 0x1
.L8004F1F8:
/* 2A5F8 8004F1F8 32A500FF */ andi $a1, $s5, 0xFF
/* 2A5FC 8004F1FC 00A6102B */ sltu $v0, $a1, $a2
/* 2A600 8004F200 1440FFED */ bnez $v0, .L8004F1B8
/* 2A604 8004F204 000510C0 */ sll $v0, $a1, 3
.L8004F208:
/* 2A608 8004F208 16200047 */ bnez $s1, .L8004F328
/* 2A60C 8004F20C 32A200FF */ andi $v0, $s5, 0xFF
/* 2A610 8004F210 92050052 */ lbu $a1, 0x52($s0)
/* 2A614 8004F214 92040053 */ lbu $a0, 0x53($s0)
/* 2A618 8004F218 30A300FF */ andi $v1, $a1, 0xFF
/* 2A61C 8004F21C 0064102B */ sltu $v0, $v1, $a0
/* 2A620 8004F220 10400022 */ beqz $v0, .L8004F2AC
/* 2A624 8004F224 3407FFFF */ ori $a3, $zero, 0xFFFF
/* 2A628 8004F228 0080502D */ daddu $t2, $a0, $zero
/* 2A62C 8004F22C 8E890000 */ lw $t1, 0x0($s4)
/* 2A630 8004F230 92880234 */ lbu $t0, 0x234($s4)
/* 2A634 8004F234 000310C0 */ sll $v0, $v1, 3
.L8004F238:
/* 2A638 8004F238 00431021 */ addu $v0, $v0, $v1
/* 2A63C 8004F23C 000210C0 */ sll $v0, $v0, 3
/* 2A640 8004F240 24421320 */ addiu $v0, $v0, 0x1320
/* 2A644 8004F244 01223021 */ addu $a2, $t1, $v0
/* 2A648 8004F248 90C20045 */ lbu $v0, 0x45($a2)
/* 2A64C 8004F24C 54480013 */ bnel $v0, $t0, .L8004F29C
/* 2A650 8004F250 24A50001 */ addiu $a1, $a1, 0x1
/* 2A654 8004F254 00031040 */ sll $v0, $v1, 1
/* 2A658 8004F258 00431021 */ addu $v0, $v0, $v1
/* 2A65C 8004F25C 000210C0 */ sll $v0, $v0, 3
/* 2A660 8004F260 2442085C */ addiu $v0, $v0, 0x85C
/* 2A664 8004F264 02822021 */ addu $a0, $s4, $v0
/* 2A668 8004F268 90820017 */ lbu $v0, 0x17($a0)
/* 2A66C 8004F26C 5440000B */ bnel $v0, $zero, .L8004F29C
/* 2A670 8004F270 24A50001 */ addiu $a1, $a1, 0x1
/* 2A674 8004F274 8C83000C */ lw $v1, 0xC($a0)
/* 2A678 8004F278 0067102A */ slt $v0, $v1, $a3
/* 2A67C 8004F27C 50400007 */ beql $v0, $zero, .L8004F29C
/* 2A680 8004F280 24A50001 */ addiu $a1, $a1, 0x1
/* 2A684 8004F284 0060382D */ daddu $a3, $v1, $zero
/* 2A688 8004F288 00C0902D */ daddu $s2, $a2, $zero
/* 2A68C 8004F28C 0080982D */ daddu $s3, $a0, $zero
/* 2A690 8004F290 00A0A82D */ daddu $s5, $a1, $zero
/* 2A694 8004F294 24110001 */ addiu $s1, $zero, 0x1
/* 2A698 8004F298 24A50001 */ addiu $a1, $a1, 0x1
.L8004F29C:
/* 2A69C 8004F29C 30A300FF */ andi $v1, $a1, 0xFF
/* 2A6A0 8004F2A0 006A102B */ sltu $v0, $v1, $t2
/* 2A6A4 8004F2A4 1440FFE4 */ bnez $v0, .L8004F238
/* 2A6A8 8004F2A8 000310C0 */ sll $v0, $v1, 3
.L8004F2AC:
/* 2A6AC 8004F2AC 1220015A */ beqz $s1, .L8004F818
/* 2A6B0 8004F2B0 0240202D */ daddu $a0, $s2, $zero
/* 2A6B4 8004F2B4 AE60000C */ sw $zero, 0xC($s3)
/* 2A6B8 8004F2B8 0C014E31 */ jal au_reset_voice
/* 2A6BC 8004F2BC 32A500FF */ andi $a1, $s5, 0xFF
/* 2A6C0 8004F2C0 08013CC8 */ j .L8004F320
/* 2A6C4 8004F2C4 00000000 */ nop
.L8004F2C8:
/* 2A6C8 8004F2C8 92150052 */ lbu $s5, 0x52($s0)
/* 2A6CC 8004F2CC 8E830000 */ lw $v1, 0x0($s4)
/* 2A6D0 8004F2D0 32A500FF */ andi $a1, $s5, 0xFF
/* 2A6D4 8004F2D4 000510C0 */ sll $v0, $a1, 3
/* 2A6D8 8004F2D8 00451021 */ addu $v0, $v0, $a1
/* 2A6DC 8004F2DC 000210C0 */ sll $v0, $v0, 3
/* 2A6E0 8004F2E0 24421320 */ addiu $v0, $v0, 0x1320
/* 2A6E4 8004F2E4 00629021 */ addu $s2, $v1, $v0
/* 2A6E8 8004F2E8 00051040 */ sll $v0, $a1, 1
/* 2A6EC 8004F2EC 00451021 */ addu $v0, $v0, $a1
/* 2A6F0 8004F2F0 000210C0 */ sll $v0, $v0, 3
/* 2A6F4 8004F2F4 2442085C */ addiu $v0, $v0, 0x85C
/* 2A6F8 8004F2F8 02829821 */ addu $s3, $s4, $v0
/* 2A6FC 8004F2FC AE60000C */ sw $zero, 0xC($s3)
/* 2A700 8004F300 92430045 */ lbu $v1, 0x45($s2)
/* 2A704 8004F304 92820234 */ lbu $v0, 0x234($s4)
/* 2A708 8004F308 0043102B */ sltu $v0, $v0, $v1
/* 2A70C 8004F30C 14400004 */ bnez $v0, .L8004F320
/* 2A710 8004F310 00000000 */ nop
/* 2A714 8004F314 0C014E31 */ jal au_reset_voice
/* 2A718 8004F318 0240202D */ daddu $a0, $s2, $zero
/* 2A71C 8004F31C 24110001 */ addiu $s1, $zero, 0x1
.L8004F320:
/* 2A720 8004F320 1220013D */ beqz $s1, .L8004F818
/* 2A724 8004F324 32A200FF */ andi $v0, $s5, 0xFF
.L8004F328:
/* 2A728 8004F328 00021840 */ sll $v1, $v0, 1
/* 2A72C 8004F32C 00621821 */ addu $v1, $v1, $v0
/* 2A730 8004F330 000318C0 */ sll $v1, $v1, 3
/* 2A734 8004F334 2463085C */ addiu $v1, $v1, 0x85C
/* 2A738 8004F338 02839821 */ addu $s3, $s4, $v1
/* 2A73C 8004F33C 33C200FF */ andi $v0, $fp, 0xFF
/* 2A740 8004F340 10400004 */ beqz $v0, .L8004F354
/* 2A744 8004F344 A2600012 */ sb $zero, 0x12($s3)
/* 2A748 8004F348 27C20001 */ addiu $v0, $fp, 0x1
/* 2A74C 8004F34C 08013CD6 */ j .L8004F358
/* 2A750 8004F350 A2620016 */ sb $v0, 0x16($s3)
.L8004F354:
/* 2A754 8004F354 A2600016 */ sb $zero, 0x16($s3)
.L8004F358:
/* 2A758 8004F358 AE76000C */ sw $s6, 0xC($s3)
/* 2A75C 8004F35C 92020058 */ lbu $v0, 0x58($s0)
/* 2A760 8004F360 10400072 */ beqz $v0, .L8004F52C
/* 2A764 8004F364 00000000 */ nop
/* 2A768 8004F368 97AB0026 */ lhu $t3, 0x26($sp)
/* 2A76C 8004F36C 0160202D */ daddu $a0, $t3, $zero
/* 2A770 8004F370 28820048 */ slti $v0, $a0, 0x48
/* 2A774 8004F374 10400007 */ beqz $v0, .L8004F394
/* 2A778 8004F378 00041040 */ sll $v0, $a0, 1
/* 2A77C 8004F37C 8E830000 */ lw $v1, 0x0($s4)
/* 2A780 8004F380 00441021 */ addu $v0, $v0, $a0
/* 2A784 8004F384 8C630054 */ lw $v1, 0x54($v1)
/* 2A788 8004F388 00021080 */ sll $v0, $v0, 2
/* 2A78C 8004F38C 08013CE9 */ j .L8004F3A4
/* 2A790 8004F390 00628821 */ addu $s1, $v1, $v0
.L8004F394:
/* 2A794 8004F394 2482FFB8 */ addiu $v0, $a0, -0x48
/* 2A798 8004F398 00021080 */ sll $v0, $v0, 2
/* 2A79C 8004F39C 02821021 */ addu $v0, $s4, $v0
/* 2A7A0 8004F3A0 8C510080 */ lw $s1, 0x80($v0)
.L8004F3A4:
/* 2A7A4 8004F3A4 26470014 */ addiu $a3, $s2, 0x14
/* 2A7A8 8004F3A8 96260000 */ lhu $a2, 0x0($s1)
/* 2A7AC 8004F3AC 8E840000 */ lw $a0, 0x0($s4)
/* 2A7B0 8004F3B0 00062A02 */ srl $a1, $a2, 8
/* 2A7B4 8004F3B4 0C014EFA */ jal au_get_instrument
/* 2A7B8 8004F3B8 30C600FF */ andi $a2, $a2, 0xFF
/* 2A7BC 8004F3BC AE620000 */ sw $v0, 0x0($s3)
/* 2A7C0 8004F3C0 92220008 */ lbu $v0, 0x8($s1)
/* 2A7C4 8004F3C4 10400008 */ beqz $v0, .L8004F3E8
/* 2A7C8 8004F3C8 00000000 */ nop
/* 2A7CC 8004F3CC 8E840050 */ lw $a0, 0x50($s4)
/* 2A7D0 8004F3D0 92250004 */ lbu $a1, 0x4($s1)
/* 2A7D4 8004F3D4 0C014195 */ jal func_80050654
/* 2A7D8 8004F3D8 0040302D */ daddu $a2, $v0, $zero
/* 2A7DC 8004F3DC 92630016 */ lbu $v1, 0x16($s3)
/* 2A7E0 8004F3E0 08013CFC */ j .L8004F3F0
/* 2A7E4 8004F3E4 304200FF */ andi $v0, $v0, 0xFF
.L8004F3E8:
/* 2A7E8 8004F3E8 92630016 */ lbu $v1, 0x16($s3)
/* 2A7EC 8004F3EC 92220004 */ lbu $v0, 0x4($s1)
.L8004F3F0:
/* 2A7F0 8004F3F0 00620018 */ mult $v1, $v0
/* 2A7F4 8004F3F4 00005812 */ mflo $t3
/* 2A7F8 8004F3F8 A66B0008 */ sh $t3, 0x8($s3)
/* 2A7FC 8004F3FC 8E8300C0 */ lw $v1, 0xC0($s4)
/* 2A800 8004F400 8E020018 */ lw $v0, 0x18($s0)
/* 2A804 8004F404 00031D43 */ sra $v1, $v1, 21
/* 2A808 8004F408 00021543 */ sra $v0, $v0, 21
/* 2A80C 8004F40C 00620018 */ mult $v1, $v0
/* 2A810 8004F410 8E02002C */ lw $v0, 0x2C($s0)
/* 2A814 8004F414 00001812 */ mflo $v1
/* 2A818 8004F418 00021543 */ sra $v0, $v0, 21
/* 2A81C 8004F41C 00000000 */ nop
/* 2A820 8004F420 00620018 */ mult $v1, $v0
/* 2A824 8004F424 82030049 */ lb $v1, 0x49($s0)
/* 2A828 8004F428 00002012 */ mflo $a0
/* 2A82C 8004F42C 86620008 */ lh $v0, 0x8($s3)
/* 2A830 8004F430 00000000 */ nop
/* 2A834 8004F434 00620018 */ mult $v1, $v0
/* 2A838 8004F438 00001812 */ mflo $v1
/* 2A83C 8004F43C 00041503 */ sra $v0, $a0, 20
/* 2A840 8004F440 00000000 */ nop
/* 2A844 8004F444 00430018 */ mult $v0, $v1
/* 2A848 8004F448 00001812 */ mflo $v1
/* 2A84C 8004F44C 00031403 */ sra $v0, $v1, 16
/* 2A850 8004F450 A6420040 */ sh $v0, 0x40($s2)
/* 2A854 8004F454 92020048 */ lbu $v0, 0x48($s0)
/* 2A858 8004F458 96230002 */ lhu $v1, 0x2($s1)
/* 2A85C 8004F45C 96040046 */ lhu $a0, 0x46($s0)
/* 2A860 8004F460 8E650000 */ lw $a1, 0x0($s3)
/* 2A864 8004F464 00021600 */ sll $v0, $v0, 24
/* 2A868 8004F468 00021603 */ sra $v0, $v0, 24
/* 2A86C 8004F46C 00641821 */ addu $v1, $v1, $a0
/* 2A870 8004F470 94A4001E */ lhu $a0, 0x1E($a1)
/* 2A874 8004F474 00431021 */ addu $v0, $v0, $v1
/* 2A878 8004F478 00441023 */ subu $v0, $v0, $a0
/* 2A87C 8004F47C A662000A */ sh $v0, 0xA($s3)
/* 2A880 8004F480 00021400 */ sll $v0, $v0, 16
/* 2A884 8004F484 86030038 */ lh $v1, 0x38($s0)
/* 2A888 8004F488 00021403 */ sra $v0, $v0, 16
/* 2A88C 8004F48C 00431021 */ addu $v0, $v0, $v1
/* 2A890 8004F490 8683020E */ lh $v1, 0x20E($s4)
/* 2A894 8004F494 92240007 */ lbu $a0, 0x7($s1)
/* 2A898 8004F498 10800007 */ beqz $a0, .L8004F4B8
/* 2A89C 8004F49C 00432821 */ addu $a1, $v0, $v1
/* 2A8A0 8004F4A0 8E840050 */ lw $a0, 0x50($s4)
/* 2A8A4 8004F4A4 0C014179 */ jal func_800505E4
/* 2A8A8 8004F4A8 92260007 */ lbu $a2, 0x7($s1)
/* 2A8AC 8004F4AC 00021C00 */ sll $v1, $v0, 16
/* 2A8B0 8004F4B0 00032C03 */ sra $a1, $v1, 16
/* 2A8B4 8004F4B4 A6620014 */ sh $v0, 0x14($s3)
.L8004F4B8:
/* 2A8B8 8004F4B8 0C014E3E */ jal au_compute_pitch_ratio
/* 2A8BC 8004F4BC 00A0202D */ daddu $a0, $a1, $zero
/* 2A8C0 8004F4C0 8E620000 */ lw $v0, 0x0($s3)
/* 2A8C4 8004F4C4 C4420020 */ lwc1 $f2, 0x20($v0)
/* 2A8C8 8004F4C8 46020002 */ mul.s $f0, $f0, $f2
/* 2A8CC 8004F4CC 00000000 */ nop
/* 2A8D0 8004F4D0 E6600004 */ swc1 $f0, 0x4($s3)
/* 2A8D4 8004F4D4 92220009 */ lbu $v0, 0x9($s1)
/* 2A8D8 8004F4D8 10400006 */ beqz $v0, .L8004F4F4
/* 2A8DC 8004F4DC 0040302D */ daddu $a2, $v0, $zero
/* 2A8E0 8004F4E0 92250005 */ lbu $a1, 0x5($s1)
/* 2A8E4 8004F4E4 0C01415A */ jal au_bgm_get_random_pan
/* 2A8E8 8004F4E8 0280202D */ daddu $a0, $s4, $zero
/* 2A8EC 8004F4EC 08013D3F */ j .L8004F4FC
/* 2A8F0 8004F4F0 A242000E */ sb $v0, 0xE($s2)
.L8004F4F4:
/* 2A8F4 8004F4F4 92220005 */ lbu $v0, 0x5($s1)
/* 2A8F8 8004F4F8 A242000E */ sb $v0, 0xE($s2)
.L8004F4FC:
/* 2A8FC 8004F4FC 9222000A */ lbu $v0, 0xA($s1)
/* 2A900 8004F500 10400007 */ beqz $v0, .L8004F520
/* 2A904 8004F504 00000000 */ nop
/* 2A908 8004F508 8E840050 */ lw $a0, 0x50($s4)
/* 2A90C 8004F50C 92250006 */ lbu $a1, 0x6($s1)
/* 2A910 8004F510 0C0141A3 */ jal au_bgm_get_random_reverb
/* 2A914 8004F514 0040302D */ daddu $a2, $v0, $zero
/* 2A918 8004F518 08013D9B */ j .L8004F66C
/* 2A91C 8004F51C A242000F */ sb $v0, 0xF($s2)
.L8004F520:
/* 2A920 8004F520 92220006 */ lbu $v0, 0x6($s1)
/* 2A924 8004F524 08013D9B */ j .L8004F66C
/* 2A928 8004F528 A242000F */ sb $v0, 0xF($s2)
.L8004F52C:
/* 2A92C 8004F52C 8E8300C0 */ lw $v1, 0xC0($s4)
/* 2A930 8004F530 8E020018 */ lw $v0, 0x18($s0)
/* 2A934 8004F534 00031D43 */ sra $v1, $v1, 21
/* 2A938 8004F538 00021543 */ sra $v0, $v0, 21
/* 2A93C 8004F53C 00620018 */ mult $v1, $v0
/* 2A940 8004F540 8E02002C */ lw $v0, 0x2C($s0)
/* 2A944 8004F544 00001812 */ mflo $v1
/* 2A948 8004F548 00021543 */ sra $v0, $v0, 21
/* 2A94C 8004F54C 00000000 */ nop
/* 2A950 8004F550 00620018 */ mult $v1, $v0
/* 2A954 8004F554 82030049 */ lb $v1, 0x49($s0)
/* 2A958 8004F558 00002012 */ mflo $a0
/* 2A95C 8004F55C 92620016 */ lbu $v0, 0x16($s3)
/* 2A960 8004F560 00000000 */ nop
/* 2A964 8004F564 00620018 */ mult $v1, $v0
/* 2A968 8004F568 00001812 */ mflo $v1
/* 2A96C 8004F56C 00041503 */ sra $v0, $a0, 20
/* 2A970 8004F570 00000000 */ nop
/* 2A974 8004F574 00430018 */ mult $v0, $v1
/* 2A978 8004F578 00001812 */ mflo $v1
/* 2A97C 8004F57C 00031243 */ sra $v0, $v1, 9
/* 2A980 8004F580 A6620008 */ sh $v0, 0x8($s3)
/* 2A984 8004F584 A6420040 */ sh $v0, 0x40($s2)
/* 2A988 8004F588 8E06000C */ lw $a2, 0xC($s0)
/* 2A98C 8004F58C AE660000 */ sw $a2, 0x0($s3)
/* 2A990 8004F590 92040048 */ lbu $a0, 0x48($s0)
/* 2A994 8004F594 97AB0026 */ lhu $t3, 0x26($sp)
/* 2A998 8004F598 9685020C */ lhu $a1, 0x20C($s4)
/* 2A99C 8004F59C 00042600 */ sll $a0, $a0, 24
/* 2A9A0 8004F5A0 00042603 */ sra $a0, $a0, 24
/* 2A9A4 8004F5A4 0160182D */ daddu $v1, $t3, $zero
/* 2A9A8 8004F5A8 00031040 */ sll $v0, $v1, 1
/* 2A9AC 8004F5AC 00431021 */ addu $v0, $v0, $v1
/* 2A9B0 8004F5B0 000210C0 */ sll $v0, $v0, 3
/* 2A9B4 8004F5B4 00431021 */ addu $v0, $v0, $v1
/* 2A9B8 8004F5B8 96030046 */ lhu $v1, 0x46($s0)
/* 2A9BC 8004F5BC 00021080 */ sll $v0, $v0, 2
/* 2A9C0 8004F5C0 00621821 */ addu $v1, $v1, $v0
/* 2A9C4 8004F5C4 00A32821 */ addu $a1, $a1, $v1
/* 2A9C8 8004F5C8 94C2001E */ lhu $v0, 0x1E($a2)
/* 2A9CC 8004F5CC 00852021 */ addu $a0, $a0, $a1
/* 2A9D0 8004F5D0 00822023 */ subu $a0, $a0, $v0
/* 2A9D4 8004F5D4 A664000A */ sh $a0, 0xA($s3)
/* 2A9D8 8004F5D8 00042400 */ sll $a0, $a0, 16
/* 2A9DC 8004F5DC 00042403 */ sra $a0, $a0, 16
/* 2A9E0 8004F5E0 86020038 */ lh $v0, 0x38($s0)
/* 2A9E4 8004F5E4 8683020E */ lh $v1, 0x20E($s4)
/* 2A9E8 8004F5E8 00822021 */ addu $a0, $a0, $v0
/* 2A9EC 8004F5EC 0C014E3E */ jal au_compute_pitch_ratio
/* 2A9F0 8004F5F0 00832021 */ addu $a0, $a0, $v1
/* 2A9F4 8004F5F4 8E02000C */ lw $v0, 0xC($s0)
/* 2A9F8 8004F5F8 C4420020 */ lwc1 $f2, 0x20($v0)
/* 2A9FC 8004F5FC 46020002 */ mul.s $f0, $f0, $f2
/* 2AA00 8004F600 00000000 */ nop
/* 2AA04 8004F604 E6600004 */ swc1 $f0, 0x4($s3)
/* 2AA08 8004F608 92020057 */ lbu $v0, 0x57($s0)
/* 2AA0C 8004F60C 10400006 */ beqz $v0, .L8004F628
/* 2AA10 8004F610 0040302D */ daddu $a2, $v0, $zero
/* 2AA14 8004F614 9205004A */ lbu $a1, 0x4A($s0)
/* 2AA18 8004F618 0C01415A */ jal au_bgm_get_random_pan
/* 2AA1C 8004F61C 0280202D */ daddu $a0, $s4, $zero
/* 2AA20 8004F620 08013D8C */ j .L8004F630
/* 2AA24 8004F624 A242000E */ sb $v0, 0xE($s2)
.L8004F628:
/* 2AA28 8004F628 9202004A */ lbu $v0, 0x4A($s0)
/* 2AA2C 8004F62C A242000E */ sb $v0, 0xE($s2)
.L8004F630:
/* 2AA30 8004F630 9202004B */ lbu $v0, 0x4B($s0)
/* 2AA34 8004F634 A242000F */ sb $v0, 0xF($s2)
/* 2AA38 8004F638 9202004C */ lbu $v0, 0x4C($s0)
/* 2AA3C 8004F63C 10400007 */ beqz $v0, .L8004F65C
/* 2AA40 8004F640 0040182D */ daddu $v1, $v0, $zero
/* 2AA44 8004F644 000310C0 */ sll $v0, $v1, 3
/* 2AA48 8004F648 00431021 */ addu $v0, $v0, $v1
/* 2AA4C 8004F64C 00021040 */ sll $v0, $v0, 1
/* 2AA50 8004F650 24420162 */ addiu $v0, $v0, 0x162
/* 2AA54 8004F654 08013D98 */ j .L8004F660
/* 2AA58 8004F658 02821021 */ addu $v0, $s4, $v0
.L8004F65C:
/* 2AA5C 8004F65C 8E020010 */ lw $v0, 0x10($s0)
.L8004F660:
/* 2AA60 8004F660 AE420014 */ sw $v0, 0x14($s2)
/* 2AA64 8004F664 8E020014 */ lw $v0, 0x14($s0)
/* 2AA68 8004F668 AE420018 */ sw $v0, 0x18($s2)
.L8004F66C:
/* 2AA6C 8004F66C 8E620000 */ lw $v0, 0x0($s3)
/* 2AA70 8004F670 AE420000 */ sw $v0, 0x0($s2)
/* 2AA74 8004F674 C6600004 */ lwc1 $f0, 0x4($s3)
/* 2AA78 8004F678 E6400004 */ swc1 $f0, 0x4($s2)
/* 2AA7C 8004F67C 9202005B */ lbu $v0, 0x5B($s0)
/* 2AA80 8004F680 A2420010 */ sb $v0, 0x10($s2)
/* 2AA84 8004F684 8E62000C */ lw $v0, 0xC($s3)
/* 2AA88 8004F688 28420002 */ slti $v0, $v0, 0x2
/* 2AA8C 8004F68C 14400062 */ bnez $v0, .L8004F818
/* 2AA90 8004F690 240B0001 */ addiu $t3, $zero, 0x1
/* 2AA94 8004F694 A26B0017 */ sb $t3, 0x17($s3)
/* 2AA98 8004F698 92020056 */ lbu $v0, 0x56($s0)
/* 2AA9C 8004F69C A2600013 */ sb $zero, 0x13($s3)
/* 2AAA0 8004F6A0 A2620012 */ sb $v0, 0x12($s3)
/* 2AAA4 8004F6A4 9602003A */ lhu $v0, 0x3A($s0)
/* 2AAA8 8004F6A8 A6620010 */ sh $v0, 0x10($s3)
/* 2AAAC 8004F6AC 24020002 */ addiu $v0, $zero, 0x2
/* 2AAB0 8004F6B0 A2420043 */ sb $v0, 0x43($s2)
/* 2AAB4 8004F6B4 92820234 */ lbu $v0, 0x234($s4)
/* 2AAB8 8004F6B8 A2420045 */ sb $v0, 0x45($s2)
/* 2AABC 8004F6BC 08013E06 */ j .L8004F818
/* 2AAC0 8004F6C0 A2420044 */ sb $v0, 0x44($s2)
.L8004F6C4:
/* 2AAC4 8004F6C4 3C058008 */ lui $a1, %hi(D_80078410)
/* 2AAC8 8004F6C8 00A32821 */ addu $a1, $a1, $v1
/* 2AACC 8004F6CC 90A58410 */ lbu $a1, %lo(D_80078410)($a1)
/* 2AAD0 8004F6D0 10A00047 */ beqz $a1, .L8004F7F0
/* 2AAD4 8004F6D4 0280202D */ daddu $a0, $s4, $zero
/* 2AAD8 8004F6D8 8E020000 */ lw $v0, 0x0($s0)
/* 2AADC 8004F6DC 90430000 */ lbu $v1, 0x0($v0)
/* 2AAE0 8004F6E0 24420001 */ addiu $v0, $v0, 0x1
/* 2AAE4 8004F6E4 A28300D4 */ sb $v1, 0xD4($s4)
/* 2AAE8 8004F6E8 AE020000 */ sw $v0, 0x0($s0)
/* 2AAEC 8004F6EC 8602003E */ lh $v0, 0x3E($s0)
/* 2AAF0 8004F6F0 9603003E */ lhu $v1, 0x3E($s0)
/* 2AAF4 8004F6F4 10400007 */ beqz $v0, .L8004F714
/* 2AAF8 8004F6F8 2462FFFF */ addiu $v0, $v1, -0x1
/* 2AAFC 8004F6FC A602003E */ sh $v0, 0x3E($s0)
/* 2AB00 8004F700 00021400 */ sll $v0, $v0, 16
/* 2AB04 8004F704 14400004 */ bnez $v0, .L8004F718
/* 2AB08 8004F708 28A20002 */ slti $v0, $a1, 0x2
/* 2AB0C 8004F70C 8E020004 */ lw $v0, 0x4($s0)
/* 2AB10 8004F710 AE020000 */ sw $v0, 0x0($s0)
.L8004F714:
/* 2AB14 8004F714 28A20002 */ slti $v0, $a1, 0x2
.L8004F718:
/* 2AB18 8004F718 14400035 */ bnez $v0, .L8004F7F0
/* 2AB1C 8004F71C 0280202D */ daddu $a0, $s4, $zero
/* 2AB20 8004F720 8E020000 */ lw $v0, 0x0($s0)
/* 2AB24 8004F724 90430000 */ lbu $v1, 0x0($v0)
/* 2AB28 8004F728 24420001 */ addiu $v0, $v0, 0x1
/* 2AB2C 8004F72C A28300D5 */ sb $v1, 0xD5($s4)
/* 2AB30 8004F730 AE020000 */ sw $v0, 0x0($s0)
/* 2AB34 8004F734 8602003E */ lh $v0, 0x3E($s0)
/* 2AB38 8004F738 9603003E */ lhu $v1, 0x3E($s0)
/* 2AB3C 8004F73C 10400007 */ beqz $v0, .L8004F75C
/* 2AB40 8004F740 2462FFFF */ addiu $v0, $v1, -0x1
/* 2AB44 8004F744 A602003E */ sh $v0, 0x3E($s0)
/* 2AB48 8004F748 00021400 */ sll $v0, $v0, 16
/* 2AB4C 8004F74C 14400004 */ bnez $v0, .L8004F760
/* 2AB50 8004F750 28A20003 */ slti $v0, $a1, 0x3
/* 2AB54 8004F754 8E020004 */ lw $v0, 0x4($s0)
/* 2AB58 8004F758 AE020000 */ sw $v0, 0x0($s0)
.L8004F75C:
/* 2AB5C 8004F75C 28A20003 */ slti $v0, $a1, 0x3
.L8004F760:
/* 2AB60 8004F760 14400023 */ bnez $v0, .L8004F7F0
/* 2AB64 8004F764 0280202D */ daddu $a0, $s4, $zero
/* 2AB68 8004F768 8E020000 */ lw $v0, 0x0($s0)
/* 2AB6C 8004F76C 90430000 */ lbu $v1, 0x0($v0)
/* 2AB70 8004F770 24420001 */ addiu $v0, $v0, 0x1
/* 2AB74 8004F774 A28300D6 */ sb $v1, 0xD6($s4)
/* 2AB78 8004F778 AE020000 */ sw $v0, 0x0($s0)
/* 2AB7C 8004F77C 8602003E */ lh $v0, 0x3E($s0)
/* 2AB80 8004F780 9603003E */ lhu $v1, 0x3E($s0)
/* 2AB84 8004F784 10400007 */ beqz $v0, .L8004F7A4
/* 2AB88 8004F788 2462FFFF */ addiu $v0, $v1, -0x1
/* 2AB8C 8004F78C A602003E */ sh $v0, 0x3E($s0)
/* 2AB90 8004F790 00021400 */ sll $v0, $v0, 16
/* 2AB94 8004F794 14400004 */ bnez $v0, .L8004F7A8
/* 2AB98 8004F798 28A20004 */ slti $v0, $a1, 0x4
/* 2AB9C 8004F79C 8E020004 */ lw $v0, 0x4($s0)
/* 2ABA0 8004F7A0 AE020000 */ sw $v0, 0x0($s0)
.L8004F7A4:
/* 2ABA4 8004F7A4 28A20004 */ slti $v0, $a1, 0x4
.L8004F7A8:
/* 2ABA8 8004F7A8 14400011 */ bnez $v0, .L8004F7F0
/* 2ABAC 8004F7AC 0280202D */ daddu $a0, $s4, $zero
/* 2ABB0 8004F7B0 8E020000 */ lw $v0, 0x0($s0)
/* 2ABB4 8004F7B4 90430000 */ lbu $v1, 0x0($v0)
/* 2ABB8 8004F7B8 24420001 */ addiu $v0, $v0, 0x1
/* 2ABBC 8004F7BC A28300D7 */ sb $v1, 0xD7($s4)
/* 2ABC0 8004F7C0 AE020000 */ sw $v0, 0x0($s0)
/* 2ABC4 8004F7C4 8602003E */ lh $v0, 0x3E($s0)
/* 2ABC8 8004F7C8 9603003E */ lhu $v1, 0x3E($s0)
/* 2ABCC 8004F7CC 10400008 */ beqz $v0, .L8004F7F0
/* 2ABD0 8004F7D0 2462FFFF */ addiu $v0, $v1, -0x1
/* 2ABD4 8004F7D4 A602003E */ sh $v0, 0x3E($s0)
/* 2ABD8 8004F7D8 00021400 */ sll $v0, $v0, 16
/* 2ABDC 8004F7DC 14400005 */ bnez $v0, .L8004F7F4
/* 2ABE0 8004F7E0 30E200FF */ andi $v0, $a3, 0xFF
/* 2ABE4 8004F7E4 8E020004 */ lw $v0, 0x4($s0)
/* 2ABE8 8004F7E8 AE020000 */ sw $v0, 0x0($s0)
/* 2ABEC 8004F7EC 0280202D */ daddu $a0, $s4, $zero
.L8004F7F0:
/* 2ABF0 8004F7F0 30E200FF */ andi $v0, $a3, 0xFF
.L8004F7F4:
/* 2ABF4 8004F7F4 2442FF20 */ addiu $v0, $v0, -0xE0
/* 2ABF8 8004F7F8 00021080 */ sll $v0, $v0, 2
/* 2ABFC 8004F7FC 3C018008 */ lui $at, %hi(D_80078470)
/* 2AC00 8004F800 00220821 */ addu $at, $at, $v0
/* 2AC04 8004F804 8C228470 */ lw $v0, %lo(D_80078470)($at)
/* 2AC08 8004F808 3C01800A */ lui $at, %hi(CurrentSeqCmdHandler)
/* 2AC0C 8004F80C AC223FD0 */ sw $v0, %lo(CurrentSeqCmdHandler)($at)
/* 2AC10 8004F810 0040F809 */ jalr $v0
/* 2AC14 8004F814 0200282D */ daddu $a1, $s0, $zero
.L8004F818:
/* 2AC18 8004F818 8E020028 */ lw $v0, 0x28($s0)
/* 2AC1C 8004F81C 1040FDB5 */ beqz $v0, .L8004EEF4
/* 2AC20 8004F820 00000000 */ nop
.L8004F824:
/* 2AC24 8004F824 08013ED6 */ j .L8004FB58
/* 2AC28 8004F828 92150052 */ lbu $s5, 0x52($s0)
.L8004F82C:
/* 2AC2C 8004F82C 9202005A */ lbu $v0, 0x5A($s0)
/* 2AC30 8004F830 544000C9 */ bnel $v0, $zero, .L8004FB58
/* 2AC34 8004F834 26B50001 */ addiu $s5, $s5, 0x1
/* 2AC38 8004F838 000410C0 */ sll $v0, $a0, 3
/* 2AC3C 8004F83C 00441021 */ addu $v0, $v0, $a0
/* 2AC40 8004F840 000210C0 */ sll $v0, $v0, 3
/* 2AC44 8004F844 8E830000 */ lw $v1, 0x0($s4)
/* 2AC48 8004F848 24421320 */ addiu $v0, $v0, 0x1320
/* 2AC4C 8004F84C 00629021 */ addu $s2, $v1, $v0
/* 2AC50 8004F850 92430045 */ lbu $v1, 0x45($s2)
/* 2AC54 8004F854 92820234 */ lbu $v0, 0x234($s4)
/* 2AC58 8004F858 546200BF */ bnel $v1, $v0, .L8004FB58
/* 2AC5C 8004F85C 26B50001 */ addiu $s5, $s5, 0x1
/* 2AC60 8004F860 00041040 */ sll $v0, $a0, 1
/* 2AC64 8004F864 00441021 */ addu $v0, $v0, $a0
/* 2AC68 8004F868 000210C0 */ sll $v0, $v0, 3
/* 2AC6C 8004F86C 2442085C */ addiu $v0, $v0, 0x85C
/* 2AC70 8004F870 02829821 */ addu $s3, $s4, $v0
/* 2AC74 8004F874 92620017 */ lbu $v0, 0x17($s3)
/* 2AC78 8004F878 544000B6 */ bnel $v0, $zero, .L8004FB54
/* 2AC7C 8004F87C A2600017 */ sb $zero, 0x17($s3)
/* 2AC80 8004F880 8E62000C */ lw $v0, 0xC($s3)
/* 2AC84 8004F884 18400006 */ blez $v0, .L8004F8A0
/* 2AC88 8004F888 2442FFFF */ addiu $v0, $v0, -0x1
/* 2AC8C 8004F88C 14400004 */ bnez $v0, .L8004F8A0
/* 2AC90 8004F890 AE62000C */ sw $v0, 0xC($s3)
/* 2AC94 8004F894 9242003D */ lbu $v0, 0x3D($s2)
/* 2AC98 8004F898 34420010 */ ori $v0, $v0, 0x10
/* 2AC9C 8004F89C A242003D */ sb $v0, 0x3D($s2)
.L8004F8A0:
/* 2ACA0 8004F8A0 92020058 */ lbu $v0, 0x58($s0)
/* 2ACA4 8004F8A4 1040003A */ beqz $v0, .L8004F990
/* 2ACA8 8004F8A8 00000000 */ nop
/* 2ACAC 8004F8AC 92020040 */ lbu $v0, 0x40($s0)
/* 2ACB0 8004F8B0 14400004 */ bnez $v0, .L8004F8C4
/* 2ACB4 8004F8B4 00000000 */ nop
/* 2ACB8 8004F8B8 8682020E */ lh $v0, 0x20E($s4)
/* 2ACBC 8004F8BC 10400017 */ beqz $v0, .L8004F91C
/* 2ACC0 8004F8C0 00000000 */ nop
.L8004F8C4:
/* 2ACC4 8004F8C4 8664000A */ lh $a0, 0xA($s3)
/* 2ACC8 8004F8C8 86620014 */ lh $v0, 0x14($s3)
/* 2ACCC 8004F8CC 00822021 */ addu $a0, $a0, $v0
/* 2ACD0 8004F8D0 86020038 */ lh $v0, 0x38($s0)
/* 2ACD4 8004F8D4 8683020E */ lh $v1, 0x20E($s4)
/* 2ACD8 8004F8D8 00822021 */ addu $a0, $a0, $v0
/* 2ACDC 8004F8DC 0C014E3E */ jal au_compute_pitch_ratio
/* 2ACE0 8004F8E0 00832021 */ addu $a0, $a0, $v1
/* 2ACE4 8004F8E4 8E620000 */ lw $v0, 0x0($s3)
/* 2ACE8 8004F8E8 C4420020 */ lwc1 $f2, 0x20($v0)
/* 2ACEC 8004F8EC 46020082 */ mul.s $f2, $f0, $f2
/* 2ACF0 8004F8F0 00000000 */ nop
/* 2ACF4 8004F8F4 E6620004 */ swc1 $f2, 0x4($s3)
/* 2ACF8 8004F8F8 C6400004 */ lwc1 $f0, 0x4($s2)
/* 2ACFC 8004F8FC 46020032 */ c.eq.s $f0, $f2
/* 2AD00 8004F900 00000000 */ nop
/* 2AD04 8004F904 45010005 */ bc1t .L8004F91C
/* 2AD08 8004F908 00000000 */ nop
/* 2AD0C 8004F90C 92420043 */ lbu $v0, 0x43($s2)
/* 2AD10 8004F910 E6420004 */ swc1 $f2, 0x4($s2)
/* 2AD14 8004F914 34420008 */ ori $v0, $v0, 0x8
/* 2AD18 8004F918 A2420043 */ sb $v0, 0x43($s2)
.L8004F91C:
/* 2AD1C 8004F91C 92020041 */ lbu $v0, 0x41($s0)
/* 2AD20 8004F920 5040008C */ beql $v0, $zero, .L8004FB54
/* 2AD24 8004F924 A2600017 */ sb $zero, 0x17($s3)
/* 2AD28 8004F928 8E8300C0 */ lw $v1, 0xC0($s4)
/* 2AD2C 8004F92C 8E020018 */ lw $v0, 0x18($s0)
/* 2AD30 8004F930 00031D43 */ sra $v1, $v1, 21
/* 2AD34 8004F934 00021543 */ sra $v0, $v0, 21
/* 2AD38 8004F938 00620018 */ mult $v1, $v0
/* 2AD3C 8004F93C 8E02002C */ lw $v0, 0x2C($s0)
/* 2AD40 8004F940 00001812 */ mflo $v1
/* 2AD44 8004F944 00021543 */ sra $v0, $v0, 21
/* 2AD48 8004F948 00000000 */ nop
/* 2AD4C 8004F94C 00620018 */ mult $v1, $v0
/* 2AD50 8004F950 82030049 */ lb $v1, 0x49($s0)
/* 2AD54 8004F954 00002012 */ mflo $a0
/* 2AD58 8004F958 86620008 */ lh $v0, 0x8($s3)
/* 2AD5C 8004F95C 00000000 */ nop
/* 2AD60 8004F960 00620018 */ mult $v1, $v0
/* 2AD64 8004F964 00001812 */ mflo $v1
/* 2AD68 8004F968 00041503 */ sra $v0, $a0, 20
/* 2AD6C 8004F96C 00000000 */ nop
/* 2AD70 8004F970 00430018 */ mult $v0, $v1
/* 2AD74 8004F974 9242003D */ lbu $v0, 0x3D($s2)
/* 2AD78 8004F978 34420020 */ ori $v0, $v0, 0x20
/* 2AD7C 8004F97C A242003D */ sb $v0, 0x3D($s2)
/* 2AD80 8004F980 00001812 */ mflo $v1
/* 2AD84 8004F984 00031403 */ sra $v0, $v1, 16
/* 2AD88 8004F988 08013ED4 */ j .L8004FB50
/* 2AD8C 8004F98C A6420040 */ sh $v0, 0x40($s2)
.L8004F990:
/* 2AD90 8004F990 92620012 */ lbu $v0, 0x12($s3)
/* 2AD94 8004F994 10400027 */ beqz $v0, .L8004FA34
/* 2AD98 8004F998 00000000 */ nop
/* 2AD9C 8004F99C 96620010 */ lhu $v0, 0x10($s3)
/* 2ADA0 8004F9A0 10400003 */ beqz $v0, .L8004F9B0
/* 2ADA4 8004F9A4 2442FFFF */ addiu $v0, $v0, -0x1
/* 2ADA8 8004F9A8 08013EA8 */ j .L8004FAA0
/* 2ADAC 8004F9AC A6620010 */ sh $v0, 0x10($s3)
.L8004F9B0:
/* 2ADB0 8004F9B0 92630013 */ lbu $v1, 0x13($s3)
/* 2ADB4 8004F9B4 92020055 */ lbu $v0, 0x55($s0)
/* 2ADB8 8004F9B8 00621821 */ addu $v1, $v1, $v0
/* 2ADBC 8004F9BC 00031080 */ sll $v0, $v1, 2
/* 2ADC0 8004F9C0 24440003 */ addiu $a0, $v0, 0x3
/* 2ADC4 8004F9C4 306200FF */ andi $v0, $v1, 0xFF
/* 2ADC8 8004F9C8 00023182 */ srl $a2, $v0, 6
/* 2ADCC 8004F9CC A2630013 */ sb $v1, 0x13($s3)
/* 2ADD0 8004F9D0 30C300FF */ andi $v1, $a2, 0xFF
/* 2ADD4 8004F9D4 24020001 */ addiu $v0, $zero, 0x1
/* 2ADD8 8004F9D8 10620004 */ beq $v1, $v0, .L8004F9EC
/* 2ADDC 8004F9DC 0080382D */ daddu $a3, $a0, $zero
/* 2ADE0 8004F9E0 24020003 */ addiu $v0, $zero, 0x3
/* 2ADE4 8004F9E4 54620004 */ bnel $v1, $v0, .L8004F9F8
/* 2ADE8 8004F9E8 30E500FF */ andi $a1, $a3, 0xFF
.L8004F9EC:
/* 2ADEC 8004F9EC 00041027 */ nor $v0, $zero, $a0
/* 2ADF0 8004F9F0 304200FF */ andi $v0, $v0, 0xFF
/* 2ADF4 8004F9F4 24450001 */ addiu $a1, $v0, 0x1
.L8004F9F8:
/* 2ADF8 8004F9F8 92020056 */ lbu $v0, 0x56($s0)
/* 2ADFC 8004F9FC 00A20018 */ mult $a1, $v0
/* 2AE00 8004FA00 24C2FFFE */ addiu $v0, $a2, -0x2
/* 2AE04 8004FA04 2C420002 */ sltiu $v0, $v0, 0x2
/* 2AE08 8004FA08 00005812 */ mflo $t3
/* 2AE0C 8004FA0C 10400002 */ beqz $v0, .L8004FA18
/* 2AE10 8004FA10 000B2A03 */ sra $a1, $t3, 8
/* 2AE14 8004FA14 00052823 */ negu $a1, $a1
.L8004FA18:
/* 2AE18 8004FA18 8664000A */ lh $a0, 0xA($s3)
/* 2AE1C 8004FA1C 86020038 */ lh $v0, 0x38($s0)
/* 2AE20 8004FA20 8683020E */ lh $v1, 0x20E($s4)
/* 2AE24 8004FA24 00822021 */ addu $a0, $a0, $v0
/* 2AE28 8004FA28 00832021 */ addu $a0, $a0, $v1
/* 2AE2C 8004FA2C 08013E98 */ j .L8004FA60
/* 2AE30 8004FA30 00A42021 */ addu $a0, $a1, $a0
.L8004FA34:
/* 2AE34 8004FA34 92020040 */ lbu $v0, 0x40($s0)
/* 2AE38 8004FA38 14400004 */ bnez $v0, .L8004FA4C
/* 2AE3C 8004FA3C 00000000 */ nop
/* 2AE40 8004FA40 8682020E */ lh $v0, 0x20E($s4)
/* 2AE44 8004FA44 10400016 */ beqz $v0, .L8004FAA0
/* 2AE48 8004FA48 00000000 */ nop
.L8004FA4C:
/* 2AE4C 8004FA4C 8664000A */ lh $a0, 0xA($s3)
/* 2AE50 8004FA50 86020038 */ lh $v0, 0x38($s0)
/* 2AE54 8004FA54 8683020E */ lh $v1, 0x20E($s4)
/* 2AE58 8004FA58 00822021 */ addu $a0, $a0, $v0
/* 2AE5C 8004FA5C 00832021 */ addu $a0, $a0, $v1
.L8004FA60:
/* 2AE60 8004FA60 0C014E3E */ jal au_compute_pitch_ratio
/* 2AE64 8004FA64 00000000 */ nop
/* 2AE68 8004FA68 8E620000 */ lw $v0, 0x0($s3)
/* 2AE6C 8004FA6C C4420020 */ lwc1 $f2, 0x20($v0)
/* 2AE70 8004FA70 46020082 */ mul.s $f2, $f0, $f2
/* 2AE74 8004FA74 00000000 */ nop
/* 2AE78 8004FA78 E6620004 */ swc1 $f2, 0x4($s3)
/* 2AE7C 8004FA7C C6400004 */ lwc1 $f0, 0x4($s2)
/* 2AE80 8004FA80 46020032 */ c.eq.s $f0, $f2
/* 2AE84 8004FA84 00000000 */ nop
/* 2AE88 8004FA88 45010005 */ bc1t .L8004FAA0
/* 2AE8C 8004FA8C 00000000 */ nop
/* 2AE90 8004FA90 92420043 */ lbu $v0, 0x43($s2)
/* 2AE94 8004FA94 E6420004 */ swc1 $f2, 0x4($s2)
/* 2AE98 8004FA98 34420008 */ ori $v0, $v0, 0x8
/* 2AE9C 8004FA9C A2420043 */ sb $v0, 0x43($s2)
.L8004FAA0:
/* 2AEA0 8004FAA0 92020041 */ lbu $v0, 0x41($s0)
/* 2AEA4 8004FAA4 10400020 */ beqz $v0, .L8004FB28
/* 2AEA8 8004FAA8 00000000 */ nop
/* 2AEAC 8004FAAC 8E8300C0 */ lw $v1, 0xC0($s4)
/* 2AEB0 8004FAB0 8E020018 */ lw $v0, 0x18($s0)
/* 2AEB4 8004FAB4 00031D43 */ sra $v1, $v1, 21
/* 2AEB8 8004FAB8 00021543 */ sra $v0, $v0, 21
/* 2AEBC 8004FABC 00620018 */ mult $v1, $v0
/* 2AEC0 8004FAC0 8E02002C */ lw $v0, 0x2C($s0)
/* 2AEC4 8004FAC4 00001812 */ mflo $v1
/* 2AEC8 8004FAC8 00021543 */ sra $v0, $v0, 21
/* 2AECC 8004FACC 00000000 */ nop
/* 2AED0 8004FAD0 00620018 */ mult $v1, $v0
/* 2AED4 8004FAD4 82030049 */ lb $v1, 0x49($s0)
/* 2AED8 8004FAD8 00002012 */ mflo $a0
/* 2AEDC 8004FADC 92620016 */ lbu $v0, 0x16($s3)
/* 2AEE0 8004FAE0 00000000 */ nop
/* 2AEE4 8004FAE4 00620018 */ mult $v1, $v0
/* 2AEE8 8004FAE8 00001812 */ mflo $v1
/* 2AEEC 8004FAEC 00041503 */ sra $v0, $a0, 20
/* 2AEF0 8004FAF0 00000000 */ nop
/* 2AEF4 8004FAF4 00430018 */ mult $v0, $v1
/* 2AEF8 8004FAF8 00001812 */ mflo $v1
/* 2AEFC 8004FAFC 00031A43 */ sra $v1, $v1, 9
/* 2AF00 8004FB00 A6630008 */ sh $v1, 0x8($s3)
/* 2AF04 8004FB04 9242003D */ lbu $v0, 0x3D($s2)
/* 2AF08 8004FB08 A6430040 */ sh $v1, 0x40($s2)
/* 2AF0C 8004FB0C 34420020 */ ori $v0, $v0, 0x20
/* 2AF10 8004FB10 A242003D */ sb $v0, 0x3D($s2)
/* 2AF14 8004FB14 9202004A */ lbu $v0, 0x4A($s0)
/* 2AF18 8004FB18 A242000E */ sb $v0, 0xE($s2)
/* 2AF1C 8004FB1C 9202004B */ lbu $v0, 0x4B($s0)
/* 2AF20 8004FB20 08013ED4 */ j .L8004FB50
/* 2AF24 8004FB24 A242000F */ sb $v0, 0xF($s2)
.L8004FB28:
/* 2AF28 8004FB28 96020042 */ lhu $v0, 0x42($s0)
/* 2AF2C 8004FB2C 50400009 */ beql $v0, $zero, .L8004FB54
/* 2AF30 8004FB30 A2600017 */ sb $zero, 0x17($s3)
/* 2AF34 8004FB34 9202004A */ lbu $v0, 0x4A($s0)
/* 2AF38 8004FB38 A242000E */ sb $v0, 0xE($s2)
/* 2AF3C 8004FB3C 92420043 */ lbu $v0, 0x43($s2)
/* 2AF40 8004FB40 9203004B */ lbu $v1, 0x4B($s0)
/* 2AF44 8004FB44 34420010 */ ori $v0, $v0, 0x10
/* 2AF48 8004FB48 A2420043 */ sb $v0, 0x43($s2)
/* 2AF4C 8004FB4C A243000F */ sb $v1, 0xF($s2)
.L8004FB50:
/* 2AF50 8004FB50 A2600017 */ sb $zero, 0x17($s3)
.L8004FB54:
/* 2AF54 8004FB54 26B50001 */ addiu $s5, $s5, 0x1
.L8004FB58:
/* 2AF58 8004FB58 92020053 */ lbu $v0, 0x53($s0)
/* 2AF5C 8004FB5C 32A400FF */ andi $a0, $s5, 0xFF
/* 2AF60 8004FB60 0082102B */ sltu $v0, $a0, $v0
/* 2AF64 8004FB64 1440FF31 */ bnez $v0, .L8004F82C
/* 2AF68 8004FB68 00000000 */ nop
/* 2AF6C 8004FB6C 26F70001 */ addiu $s7, $s7, 0x1
.L8004FB70:
/* 2AF70 8004FB70 2EE20010 */ sltiu $v0, $s7, 0x10
/* 2AF74 8004FB74 1440FCAA */ bnez $v0, .L8004EE20
/* 2AF78 8004FB78 00171040 */ sll $v0, $s7, 1
/* 2AF7C 8004FB7C 93A20028 */ lbu $v0, 0x28($sp)
/* 2AF80 8004FB80 10400002 */ beqz $v0, .L8004FB8C
/* 2AF84 8004FB84 24020002 */ addiu $v0, $zero, 0x2
/* 2AF88 8004FB88 A2820221 */ sb $v0, 0x221($s4)
.L8004FB8C:
/* 2AF8C 8004FB8C 8FBF0054 */ lw $ra, 0x54($sp)
/* 2AF90 8004FB90 8FBE0050 */ lw $fp, 0x50($sp)
/* 2AF94 8004FB94 8FB7004C */ lw $s7, 0x4C($sp)
/* 2AF98 8004FB98 8FB60048 */ lw $s6, 0x48($sp)
/* 2AF9C 8004FB9C 8FB50044 */ lw $s5, 0x44($sp)
/* 2AFA0 8004FBA0 8FB40040 */ lw $s4, 0x40($sp)
/* 2AFA4 8004FBA4 8FB3003C */ lw $s3, 0x3C($sp)
/* 2AFA8 8004FBA8 8FB20038 */ lw $s2, 0x38($sp)
/* 2AFAC 8004FBAC 8FB10034 */ lw $s1, 0x34($sp)
/* 2AFB0 8004FBB0 8FB00030 */ lw $s0, 0x30($sp)
/* 2AFB4 8004FBB4 03E00008 */ jr $ra
/* 2AFB8 8004FBB8 27BD0058 */ addiu $sp, $sp, 0x58
### DECOMPILED C INSTRUCTIONS:
void au_bgm_player_update_playing(BGMPlayer *player) {
s32 bVolumeFading;
u8 sp1F;
s16 notePitch;
u8 bFinished;
AuVoice* voice;
BGMDrumInfo* drumInfo;
BGMPlayerTrack* track;
SeqNote* note;
s32 var_a0;
s32 temp;
s32 var_a1_5;
s32 bAcquiredVoiceIdx;
u8 opcode;
u8 noteVelocity;
s32 noteLength;
u32 i;
u8 voiceIdx;
s32 temp2;
bVolumeFading = FALSE;
bFinished = FALSE;
if (player->masterTempoTime != 0) {
player->masterTempoTime--;
if (player->masterTempoTime == 0) {
player->masterTempo = player->masterTempoTarget;
player->masterTempoTarget = 0;
player->masterTempoStep = 0;
} else {
player->masterTempo += player->masterTempoStep;
}
player->nextUpdateStep = player->masterTempo * 10;
}
if (player->masterVolumeTime != 0) {
player->masterVolumeTime--;
if (player->masterVolumeTime == 0) {
player->masterVolume = player->masterVolumeTarget;
player->masterVolumeTarget = 0;
player->masterVolumeStep = 0;
} else {
player->masterVolume += player->masterVolumeStep;
}
bVolumeFading = TRUE;
}
player->volumeChanged = FALSE;
if (player->trackVolsConfig != NULL) {
if (player->bFadeConfigSetsVolume) {
// setting track volumes
s32 lenLimit = 16;
while (lenLimit-- != 0) {
i = *player->trackVolsConfig++;
if (i == 0) {
break;
}
track = &player->tracks[i - 1];
player->seqCmdArgs.TrackVolumeFade.time = 48;
player->seqCmdArgs.TrackVolumeFade.value = *(player->trackVolsConfig++);
if (track->bgmReadPos != 0) {
au_BGMCmd_F6_TrackVolumeFade(player, track);
}
}
}
else {
// clearing track volumes
s32 lenLimit = 16;
while (lenLimit-- != 0) {
i = *player->trackVolsConfig++;
if (i == 0) {
break;
}
track = &player->tracks[i - 1];
player->seqCmdArgs.TrackVolumeFade.time = 48;
player->trackVolsConfig++; // ignore arg
player->seqCmdArgs.TrackVolumeFade.value = 0;
if (track->bgmReadPos != 0) {
au_BGMCmd_F6_TrackVolumeFade(player, track);
}
}
}
player->trackVolsConfig = NULL;
player->bFadeConfigSetsVolume = FALSE;
}
for (i = 0; i < ARRAY_COUNT(player->tracks); i++) {
track = &player->tracks[i];
if (track->bgmReadPos != NULL) {
track->changed.all = 0;
if (bVolumeFading || player->volumeChanged) {
track->changed.volume = 1;
} else {
track->changed.volume = 0;
}
if (track->subTrackVolumeTime != 0) {
track->subTrackVolumeTime--;
if (track->subTrackVolumeTime == 0) {
track->subTrackVolume = track->subTrackVolumeTarget;
} else {
track->subTrackVolume += track->subTrackVolumeStep;
}
track->changed.volume = 1;
}
if (track->unkVolumeTime != 0) {
track->unkVolumeTime--;
if (track->unkVolumeTime == 0) {
track->unkVolume = track->unkVolumeTarget << 0x10;
} else {
track->unkVolume += track->unkVolumeStep;
}
track->changed.volume = 1;
}
track->delayTime--;
if (track->delayTime <= 0) {
sp1F = track->unk_52;
while (track->delayTime == 0) {
opcode = *(track->bgmReadPos++);
POST_BGM_READ();
if (opcode < 0x80) {
if (opcode == 0) {
if (track->prevReadPos != 0) {
track->bgmReadPos = track->prevReadPos;
track->prevReadPos = 0;
} else {
bFinished = TRUE;
break;
}
} else {
if (opcode >= 0x78) {
// long delay
track->delayTime = (((opcode & 7) << 8) + *(track->bgmReadPos++)) + 0x78;
POST_BGM_READ();
} else {
// delay
track->delayTime = opcode;
}
}
} else {
// note
if (opcode < 0xD4) {
notePitch = (opcode & 0x7F);
noteVelocity = *(track->bgmReadPos++);
POST_BGM_READ();
noteLength = *(track->bgmReadPos++);
POST_BGM_READ();
if (!(noteLength < 0xC0)) {
noteLength = (((u8)noteLength & ~0xC0) << 8) + *(track->bgmReadPos++) + 0xC0;
POST_BGM_READ();
}
bAcquiredVoiceIdx = FALSE;
if (track->unk_5A == 0) {
// find first free voice
for (voiceIdx = sp1F; voiceIdx < track->unk_53; voiceIdx++) {
voice = &player->globals->voices[voiceIdx];
sp1F++;
if (voice->priority == AU_PRIORITY_FREE) {
bAcquiredVoiceIdx = TRUE;
break;
}
}
if (!bAcquiredVoiceIdx) {
if (track->polyphonicIdx >= 5) { // 5 = AL_DEFAULT_PRIORITY?
// try stealing a voice with lower priority
for (voiceIdx = track->unk_52; voiceIdx < track->unk_53; voiceIdx++) {
voice = &player->globals->voices[voiceIdx];
if (voice->priority < player->priority) {
au_reset_voice(voice, voiceIdx);
bAcquiredVoiceIdx = TRUE;
break;
}
}
// try stealing a voice with equal priority and zero note length
if (!bAcquiredVoiceIdx) {
for (voiceIdx = track->unk_52; voiceIdx < track->unk_53; voiceIdx++) {
voice = &player->globals->voices[voiceIdx];
if (voice->priority == player->priority) {
note = &player->notes[voiceIdx];
if (note->noteLength == 0) {
au_reset_voice(voice, voiceIdx);
bAcquiredVoiceIdx = TRUE;
break;
}
}
}
}
// try stealing a voice with equal priority and lowest note length
if (!bAcquiredVoiceIdx) {
s32 shortestLength = 0xFFFF;
u8 voice_it;
AuVoice* curVoice;
SeqNote* curNote;
for (voice_it = track->unk_52; voice_it < track->unk_53; voice_it++) {
curVoice = &player->globals->voices[voice_it];
if (curVoice->priority == player->priority) {
curNote = &player->notes[voice_it];
if (curNote->unk_note_17 == 0 && curNote->noteLength < shortestLength) {
shortestLength = curNote->noteLength;
voice = curVoice;
note = curNote;
voiceIdx = voice_it;
bAcquiredVoiceIdx = TRUE;
}
}
}
if (bAcquiredVoiceIdx) {
note->noteLength = 0;
au_reset_voice(voice, voiceIdx);
}
}
} else {
voiceIdx = track->unk_52;
voice = &player->globals->voices[voiceIdx];
note = &player->notes[voiceIdx];
note->noteLength = 0;
if (voice->priority <= player->priority) {
au_reset_voice(voice, voiceIdx);
bAcquiredVoiceIdx = TRUE;
}
}
}
}
if (bAcquiredVoiceIdx) {
note = &player->notes[voiceIdx];
note->tremoloTime = 0;
if (noteVelocity > 0) {
note->noteVelocity = noteVelocity + 1;
} else {
note->noteVelocity = 0;
}
note->noteLength = noteLength;
if (track->isDrumTrack) {
if (notePitch < 72) { // = 6 * 12
drumInfo = &player->globals->dataPER->drums[notePitch];
} else {
drumInfo = player->drums[notePitch - 72]; // = 6 * 12
}
note->ins = au_get_instrument(player->globals, (u16)drumInfo->bankPatch >> 8, (u16)drumInfo->bankPatch & 0xFF, &voice->envelope);
if (drumInfo->randVolume != 0) {
note->volume = note->noteVelocity * au_bgm_get_random_vol(player->randomValue1, drumInfo->volume, drumInfo->randVolume);
} else {
note->volume = note->noteVelocity * drumInfo->volume;
}
voice->clientVolume = ((
((player->masterVolume >> 0x15) * (track->subTrackVolume >> 0x15) * (track->unkVolume >> 0x15)) >> 0x14)
* (track->segTrackVolume * note->volume)) >> 0x10;
note->adjustedPitch =
drumInfo->keyBase
+ track->subTrackCoarseTune
+ track->subTrackFineTune
- note->ins->keyBase;
temp = (note->adjustedPitch + track->segTrackTune) + player->detune;
if (drumInfo->randTune != 0) {
note->unk_14 = au_bgm_get_random_pitch(player->randomValue1, temp, drumInfo->randTune);
temp = note->unk_14;
}
note->pitchRatio = au_compute_pitch_ratio(temp) * note->ins->pitchRatio;
if (drumInfo->randPan != 0) {
voice->pan = au_bgm_get_random_pan(player, drumInfo->pan, drumInfo->randPan);
} else {
voice->pan = drumInfo->pan;
}
if (drumInfo->randReverb != 0) {
voice->reverb = au_bgm_get_random_reverb(player->randomValue1, drumInfo->reverb, drumInfo->randReverb);
} else {
voice->reverb = drumInfo->reverb;
}
} else {
note->volume = ((
((player->masterVolume >> 0x15) * (track->subTrackVolume >> 0x15) * (track->unkVolume >> 0x15)) >> 0x14)
* (track->segTrackVolume * note->noteVelocity)) >> 9;
voice->clientVolume = note->volume;
note->ins = track->instrument;
note->adjustedPitch =
(notePitch * 100)
+ track->subTrackCoarseTune
+ player->masterPitchShift
+ track->subTrackFineTune
- note->ins->keyBase;
note->pitchRatio = au_compute_pitch_ratio(
note->adjustedPitch
+ track->segTrackTune
+ player->detune)
* track->instrument->pitchRatio;
if (track->unk_57 != 0) {
voice->pan = au_bgm_get_random_pan(player, track->subTrackPan, track->unk_57);
} else {
voice->pan = track->subTrackPan;
}
voice->reverb = track->subTrackReverb;
if (track->unk_4C != 0) {
voice->envelope.cmdListPress = (u8*) player->unk_174[track->unk_4C - 1]; //TODO ???
} else {
voice->envelope.cmdListPress = track->envelope.cmdListPress;
}
voice->envelope.cmdListRelease = track->envelope.cmdListRelease;
}
voice->instrument = note->ins;
voice->pitchRatio = note->pitchRatio;
voice->busId = track->subtrackBusId;
if (note->noteLength >= 2) {
note->unk_note_17 = 1;
note->tremoloTime = track->trackTremoloTime;
note->unk_13 = 0;
note->tremoloAmount = track->trackTremoloAmount;
voice->syncFlags = AU_VOICE_SYNC_FLAG_ALL;
voice->priority = player->priority;
voice->clientPriority = voice->priority;
}
}
} else {
//TODO variable is nargs, but reusing temp is required to match
temp = SeqCmdArgCounts[opcode - 0xE0];
if (temp != 0) {
player->seqCmdArgs.raw[0] = *(track->bgmReadPos++);
POST_BGM_READ();
} else {
goto bgm_args_done;
}
if (temp > 1) {
player->seqCmdArgs.raw[1] = *(track->bgmReadPos++);
POST_BGM_READ();
} else {
goto bgm_args_done;
}
if (temp > 2) {
player->seqCmdArgs.raw[2] = *(track->bgmReadPos++);
POST_BGM_READ();
} else {
goto bgm_args_done;
}
if (temp > 3) {
player->seqCmdArgs.raw[3] = *(track->bgmReadPos++);
POST_BGM_READ();
}
bgm_args_done:
CurrentSeqCmdHandler = SeqCmdHandlers[opcode - 0xE0];
CurrentSeqCmdHandler(player, track);
}
}
} // end while
}
for (voiceIdx = track->unk_52; voiceIdx < track->unk_53; voiceIdx++) {
if (track->unk_5A == 0) {
voice = &player->globals->voices[voiceIdx];
if (voice->priority == player->priority) {
note = &player->notes[voiceIdx];
if (note->unk_note_17 == 0) {
if (note->noteLength > 0) {
note->noteLength--;
if (note->noteLength == 0) {
voice->envelopeFlags |= AU_VOICE_ENV_FLAG_KEY_RELEASED;
}
}
if (track->isDrumTrack) {
if (track->changed.tune || (player->detune != 0)) {
note->pitchRatio = au_compute_pitch_ratio(((note->adjustedPitch + note->unk_14) + track->segTrackTune) + player->detune) * note->ins->pitchRatio;
if (voice->pitchRatio != note->pitchRatio) {
voice->pitchRatio = note->pitchRatio;
voice->syncFlags |= AU_VOICE_SYNC_FLAG_PITCH;
}
}
if (track->changed.volume) {
voice->clientVolume = (
((((player->masterVolume >> 0x15)
* (track->subTrackVolume >> 0x15))
* (track->unkVolume >> 0x15)) >> 0x14)
* (track->segTrackVolume * note->volume)) >> 0x10;
voice->envelopeFlags |= AU_VOICE_ENV_FLAG_VOL_CHANGED;
}
} else {
if (note->tremoloTime != 0) {
if (note->tremoloAmount != 0) {
note->tremoloAmount--;
} else {
u8 temp_a0_6;
u8 temp_a2_4;
note->unk_13 += track->trackTremoloSpeed;
opcode = (note->unk_13 << 2) + 3;
temp_a2_4 = note->unk_13 >> 6;
if ((temp_a2_4 == 1) || (temp_a2_4 == 3)) {
u8 temp2 = ~opcode;
var_a1_5 = temp2 + 1;
} else {
var_a1_5 = opcode;
}
var_a1_5 = (var_a1_5 * track->trackTremoloTime) >> 8;
if ((temp_a2_4 == 2) || (temp_a2_4 == 3)) {
var_a1_5 = -var_a1_5;
}
note->pitchRatio = au_compute_pitch_ratio(var_a1_5 + ((note->adjustedPitch + track->segTrackTune) + player->detune)) * note->ins->pitchRatio;
if (voice->pitchRatio != note->pitchRatio) {
voice->pitchRatio = note->pitchRatio;
voice->syncFlags |= AU_VOICE_SYNC_FLAG_PITCH;
}
}
} else if (track->changed.tune || (player->detune != 0)) {
note->pitchRatio = au_compute_pitch_ratio((note->adjustedPitch + track->segTrackTune) + player->detune) * note->ins->pitchRatio;
if (voice->pitchRatio != note->pitchRatio) {
voice->pitchRatio = note->pitchRatio;
voice->syncFlags |= AU_VOICE_SYNC_FLAG_PITCH;
}
}
if (track->changed.volume) {
s32 tempVolume = ((player->masterVolume >> 0x15) * (track->subTrackVolume >> 0x15) * (track->unkVolume >> 0x15)) >> 0x14;
note->volume = (tempVolume * (track->segTrackVolume * note->noteVelocity)) >> 9;
voice->clientVolume = note->volume;
voice->envelopeFlags |= AU_VOICE_ENV_FLAG_VOL_CHANGED;
voice->pan = track->subTrackPan;
voice->reverb = track->subTrackReverb;
} else if (track->changed.pan || track->changed.reverb) {
voice->pan = track->subTrackPan;
voice->reverb = track->subTrackReverb;
voice->syncFlags |= AU_VOICE_SYNC_FLAG_PAN_FXMIX;
}
}
}
note->unk_note_17 = 0;
}
}
}
}
}
if (bFinished) {
player->masterState = BGM_PLAY_STATE_NEXT_SUBSEG;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_8024FB3C
/* 17E41C 8024FB3C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 17E420 8024FB40 AFB10014 */ sw $s1, 0x14($sp)
/* 17E424 8024FB44 0080882D */ daddu $s1, $a0, $zero
D_8024FB48_C0D3C8:
/* 17E428 8024FB48 AFB20018 */ sw $s2, 0x18($sp)
/* 17E42C 8024FB4C AFBF001C */ sw $ra, 0x1C($sp)
/* 17E430 8024FB50 AFB00010 */ sw $s0, 0x10($sp)
/* 17E434 8024FB54 86230012 */ lh $v1, 0x12($s1)
/* 17E438 8024FB58 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 17E43C 8024FB5C 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 17E440 8024FB60 2C620055 */ sltiu $v0, $v1, 0x55
/* 17E444 8024FB64 1040031D */ beqz $v0, .L802507DC
/* 17E448 8024FB68 0000902D */ daddu $s2, $zero, $zero
/* 17E44C 8024FB6C 00031080 */ sll $v0, $v1, 2
/* 17E450 8024FB70 3C01802A */ lui $at, %hi(jtbl_8029CD98)
/* 17E454 8024FB74 00220821 */ addu $at, $at, $v0
D_8024FB78:
/* 17E458 8024FB78 8C22CD98 */ lw $v0, %lo(jtbl_8029CD98)($at)
/* 17E45C 8024FB7C 00400008 */ jr $v0
/* 17E460 8024FB80 00000000 */ nop
glabel .L8024FB84
/* 17E464 8024FB84 82230016 */ lb $v1, 0x16($s1)
D_8024FB88:
/* 17E468 8024FB88 2C620005 */ sltiu $v0, $v1, 0x5
/* 17E46C 8024FB8C 10400313 */ beqz $v0, .L802507DC
/* 17E470 8024FB90 00031080 */ sll $v0, $v1, 2
/* 17E474 8024FB94 3C01802A */ lui $at, %hi(jtbl_8029CEF0)
/* 17E478 8024FB98 00220821 */ addu $at, $at, $v0
/* 17E47C 8024FB9C 8C22CEF0 */ lw $v0, %lo(jtbl_8029CEF0)($at)
D_8024FBA0:
/* 17E480 8024FBA0 00400008 */ jr $v0
/* 17E484 8024FBA4 00000000 */ nop
glabel .L8024FBA8
/* 17E488 8024FBA8 8C820214 */ lw $v0, 0x214($a0)
/* 17E48C 8024FBAC 3042C000 */ andi $v0, $v0, 0xC000
/* 17E490 8024FBB0 544002B8 */ bnel $v0, $zero, .L80250694
/* 17E494 8024FBB4 A6200014 */ sh $zero, 0x14($s1)
D_8024FBB8:
/* 17E498 8024FBB8 080941A5 */ j .L80250694
/* 17E49C 8024FBBC 00000000 */ nop
D_8024FBC0_C0D440:
/* 17E4A0 8024FBC0 3C03802A */ lui $v1, %hi(D_8029F64A)
/* 17E4A4 8024FBC4 2463F64A */ addiu $v1, $v1, %lo(D_8029F64A)
/* 17E4A8 8024FBC8 80840083 */ lb $a0, 0x83($a0)
/* 17E4AC 8024FBCC 24020001 */ addiu $v0, $zero, 0x1
/* 17E4B0 8024FBD0 14800004 */ bnez $a0, .L8024FBE4
/* 17E4B4 8024FBD4 A4620000 */ sh $v0, 0x0($v1)
/* 17E4B8 8024FBD8 A4600000 */ sh $zero, 0x0($v1)
glabel .L8024FBDC
/* 17E4BC 8024FBDC 080941F7 */ j .L802507DC
/* 17E4C0 8024FBE0 24120001 */ addiu $s2, $zero, 0x1
.L8024FBE4:
/* 17E4C4 8024FBE4 82230016 */ lb $v1, 0x16($s1)
/* 17E4C8 8024FBE8 24020001 */ addiu $v0, $zero, 0x1
/* 17E4CC 8024FBEC 1062016A */ beq $v1, $v0, .L80250198
/* 17E4D0 8024FBF0 28620002 */ slti $v0, $v1, 0x2
/* 17E4D4 8024FBF4 50400005 */ beql $v0, $zero, .L8024FC0C
D_8024FBF8:
/* 17E4D8 8024FBF8 24020002 */ addiu $v0, $zero, 0x2
/* 17E4DC 8024FBFC 10600007 */ beqz $v1, .L8024FC1C
/* 17E4E0 8024FC00 3C04FFFE */ lui $a0, (0xFFFEFFFF >> 16)
/* 17E4E4 8024FC04 080941F7 */ j .L802507DC
/* 17E4E8 8024FC08 00000000 */ nop
.L8024FC0C:
/* 17E4EC 8024FC0C 10620231 */ beq $v1, $v0, .L802504D4
/* 17E4F0 8024FC10 00000000 */ nop
/* 17E4F4 8024FC14 080941F7 */ j .L802507DC
/* 17E4F8 8024FC18 00000000 */ nop
.L8024FC1C:
/* 17E4FC 8024FC1C 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 17E500 8024FC20 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 17E504 8024FC24 8C620000 */ lw $v0, 0x0($v1)
/* 17E508 8024FC28 3484FFFF */ ori $a0, $a0, (0xFFFEFFFF & 0xFFFF)
/* 17E50C 8024FC2C 34424000 */ ori $v0, $v0, 0x4000
/* 17E510 8024FC30 00441024 */ and $v0, $v0, $a0
/* 17E514 8024FC34 AC620000 */ sw $v0, 0x0($v1)
D_8024FC38:
/* 17E518 8024FC38 96220012 */ lhu $v0, 0x12($s1)
/* 17E51C 8024FC3C 2442FFD2 */ addiu $v0, $v0, -0x2E
/* 17E520 8024FC40 00021400 */ sll $v0, $v0, 16
/* 17E524 8024FC44 00021C03 */ sra $v1, $v0, 16
D_8024FC48_C0D4C8:
/* 17E528 8024FC48 2C620015 */ sltiu $v0, $v1, 0x15
/* 17E52C 8024FC4C 104002D6 */ beqz $v0, .L802507A8
/* 17E530 8024FC50 00031080 */ sll $v0, $v1, 2
/* 17E534 8024FC54 3C01802A */ lui $at, %hi(jtbl_8029CF08)
/* 17E538 8024FC58 00220821 */ addu $at, $at, $v0
/* 17E53C 8024FC5C 8C22CF08 */ lw $v0, %lo(jtbl_8029CF08)($at)
/* 17E540 8024FC60 00400008 */ jr $v0
/* 17E544 8024FC64 00000000 */ nop
glabel .L8024FC68
/* 17E548 8024FC68 3C048011 */ lui $a0, %hi(HES_StickNeutral)
/* 17E54C 8024FC6C 24848E1C */ addiu $a0, $a0, %lo(HES_StickNeutral)
/* 17E550 8024FC70 08094060 */ j .L80250180
/* 17E554 8024FC74 00000000 */ nop
glabel .L8024FC78
/* 17E558 8024FC78 3C048011 */ lui $a0, %hi(HES_StickNeutral)
/* 17E55C 8024FC7C 24848E1C */ addiu $a0, $a0, %lo(HES_StickNeutral)
/* 17E560 8024FC80 0C050529 */ jal hud_element_create
/* 17E564 8024FC84 00000000 */ nop
/* 17E568 8024FC88 00022400 */ sll $a0, $v0, 16
/* 17E56C 8024FC8C 00042403 */ sra $a0, $a0, 16
/* 17E570 8024FC90 34058080 */ ori $a1, $zero, 0x8080
/* 17E574 8024FC94 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17E578 8024FC98 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17E57C 8024FC9C 0C051280 */ jal hud_element_set_flags
/* 17E580 8024FCA0 A6020000 */ sh $v0, 0x0($s0)
/* 17E584 8024FCA4 2405FF9C */ addiu $a1, $zero, -0x64
/* 17E588 8024FCA8 86040000 */ lh $a0, 0x0($s0)
/* 17E58C 8024FCAC 0C051261 */ jal hud_element_set_render_pos
/* 17E590 8024FCB0 00A0302D */ daddu $a2, $a1, $zero
/* 17E594 8024FCB4 3C048029 */ lui $a0, %hi(HES_TimingReady)
D_8024FCB8:
/* 17E598 8024FCB8 24842788 */ addiu $a0, $a0, %lo(HES_TimingReady)
/* 17E59C 8024FCBC 0C050529 */ jal hud_element_create
/* 17E5A0 8024FCC0 00000000 */ nop
/* 17E5A4 8024FCC4 00022400 */ sll $a0, $v0, 16
/* 17E5A8 8024FCC8 00042403 */ sra $a0, $a0, 16
/* 17E5AC 8024FCCC 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17E5B0 8024FCD0 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
/* 17E5B4 8024FCD4 080941E3 */ j .L8025078C
/* 17E5B8 8024FCD8 24050080 */ addiu $a1, $zero, 0x80
glabel .L8024FCDC
/* 17E5BC 8024FCDC 3C048011 */ lui $a0, %hi(HES_StickNeutral)
/* 17E5C0 8024FCE0 24848E1C */ addiu $a0, $a0, %lo(HES_StickNeutral)
D_8024FCE4:
/* 17E5C4 8024FCE4 0C050529 */ jal hud_element_create
/* 17E5C8 8024FCE8 00000000 */ nop
/* 17E5CC 8024FCEC 00022400 */ sll $a0, $v0, 16
/* 17E5D0 8024FCF0 00042403 */ sra $a0, $a0, 16
/* 17E5D4 8024FCF4 34058080 */ ori $a1, $zero, 0x8080
D_8024FCF8:
/* 17E5D8 8024FCF8 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17E5DC 8024FCFC 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17E5E0 8024FD00 0C051280 */ jal hud_element_set_flags
/* 17E5E4 8024FD04 A6020000 */ sh $v0, 0x0($s0)
/* 17E5E8 8024FD08 2405FF9C */ addiu $a1, $zero, -0x64
/* 17E5EC 8024FD0C 86040000 */ lh $a0, 0x0($s0)
/* 17E5F0 8024FD10 0C051261 */ jal hud_element_set_render_pos
/* 17E5F4 8024FD14 00A0302D */ daddu $a2, $a1, $zero
/* 17E5F8 8024FD18 3C048029 */ lui $a0, %hi(HES_AimTarget)
/* 17E5FC 8024FD1C 248436D4 */ addiu $a0, $a0, %lo(HES_AimTarget)
/* 17E600 8024FD20 0C050529 */ jal hud_element_create
/* 17E604 8024FD24 00000000 */ nop
D_8024FD28:
/* 17E608 8024FD28 00022400 */ sll $a0, $v0, 16
/* 17E60C 8024FD2C 00042403 */ sra $a0, $a0, 16
/* 17E610 8024FD30 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17E614 8024FD34 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
D_8024FD38:
/* 17E618 8024FD38 08094044 */ j .L80250110
/* 17E61C 8024FD3C 34058080 */ ori $a1, $zero, 0x8080
glabel .L8024FD40
/* 17E620 8024FD40 3C048029 */ lui $a0, %hi(HES_CUpButton)
/* 17E624 8024FD44 2484259C */ addiu $a0, $a0, %lo(HES_CUpButton)
/* 17E628 8024FD48 0C050529 */ jal hud_element_create
/* 17E62C 8024FD4C 00000000 */ nop
/* 17E630 8024FD50 00022400 */ sll $a0, $v0, 16
/* 17E634 8024FD54 00042403 */ sra $a0, $a0, 16
/* 17E638 8024FD58 34058080 */ ori $a1, $zero, 0x8080
/* 17E63C 8024FD5C 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17E640 8024FD60 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17E644 8024FD64 0C051280 */ jal hud_element_set_flags
D_8024FD68:
/* 17E648 8024FD68 A6020000 */ sh $v0, 0x0($s0)
/* 17E64C 8024FD6C 2405FF9C */ addiu $a1, $zero, -0x64
D_8024FD70:
/* 17E650 8024FD70 86040000 */ lh $a0, 0x0($s0)
/* 17E654 8024FD74 0C051261 */ jal hud_element_set_render_pos
D_8024FD78:
/* 17E658 8024FD78 00A0302D */ daddu $a2, $a1, $zero
/* 17E65C 8024FD7C 3C048029 */ lui $a0, %hi(HES_CDownButton)
/* 17E660 8024FD80 24842630 */ addiu $a0, $a0, %lo(HES_CDownButton)
/* 17E664 8024FD84 0C050529 */ jal hud_element_create
/* 17E668 8024FD88 00000000 */ nop
/* 17E66C 8024FD8C 00022400 */ sll $a0, $v0, 16
/* 17E670 8024FD90 00042403 */ sra $a0, $a0, 16
/* 17E674 8024FD94 24050080 */ addiu $a1, $zero, 0x80
/* 17E678 8024FD98 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17E67C 8024FD9C 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
/* 17E680 8024FDA0 0C051280 */ jal hud_element_set_flags
/* 17E684 8024FDA4 A6020000 */ sh $v0, 0x0($s0)
/* 17E688 8024FDA8 2405FF9C */ addiu $a1, $zero, -0x64
/* 17E68C 8024FDAC 86040000 */ lh $a0, 0x0($s0)
/* 17E690 8024FDB0 0C051261 */ jal hud_element_set_render_pos
/* 17E694 8024FDB4 00A0302D */ daddu $a2, $a1, $zero
D_8024FDB8:
/* 17E698 8024FDB8 3C048029 */ lui $a0, %hi(HES_CLeftButton)
/* 17E69C 8024FDBC 24842438 */ addiu $a0, $a0, %lo(HES_CLeftButton)
/* 17E6A0 8024FDC0 0C050529 */ jal hud_element_create
/* 17E6A4 8024FDC4 00000000 */ nop
/* 17E6A8 8024FDC8 00022400 */ sll $a0, $v0, 16
/* 17E6AC 8024FDCC 00042403 */ sra $a0, $a0, 16
/* 17E6B0 8024FDD0 24050080 */ addiu $a1, $zero, 0x80
/* 17E6B4 8024FDD4 3C10802A */ lui $s0, %hi(D_8029F646)
/* 17E6B8 8024FDD8 2610F646 */ addiu $s0, $s0, %lo(D_8029F646)
/* 17E6BC 8024FDDC 0C051280 */ jal hud_element_set_flags
/* 17E6C0 8024FDE0 A6020000 */ sh $v0, 0x0($s0)
/* 17E6C4 8024FDE4 2405FF9C */ addiu $a1, $zero, -0x64
/* 17E6C8 8024FDE8 86040000 */ lh $a0, 0x0($s0)
/* 17E6CC 8024FDEC 0C051261 */ jal hud_element_set_render_pos
/* 17E6D0 8024FDF0 00A0302D */ daddu $a2, $a1, $zero
/* 17E6D4 8024FDF4 3C048029 */ lui $a0, %hi(HES_CRightButton)
D_8024FDF8:
/* 17E6D8 8024FDF8 248424CC */ addiu $a0, $a0, %lo(HES_CRightButton)
/* 17E6DC 8024FDFC 0C050529 */ jal hud_element_create
/* 17E6E0 8024FE00 00000000 */ nop
/* 17E6E4 8024FE04 00022400 */ sll $a0, $v0, 16
/* 17E6E8 8024FE08 00042403 */ sra $a0, $a0, 16
/* 17E6EC 8024FE0C 3C10802A */ lui $s0, %hi(D_8029F648)
/* 17E6F0 8024FE10 2610F648 */ addiu $s0, $s0, %lo(D_8029F648)
/* 17E6F4 8024FE14 080941E3 */ j .L8025078C
/* 17E6F8 8024FE18 24050080 */ addiu $a1, $zero, 0x80
glabel .L8024FE1C
/* 17E6FC 8024FE1C 3C048011 */ lui $a0, %hi(HES_StickNeutral)
/* 17E700 8024FE20 24848E1C */ addiu $a0, $a0, %lo(HES_StickNeutral)
D_8024FE24:
/* 17E704 8024FE24 08094060 */ j .L80250180
/* 17E708 8024FE28 00000000 */ nop
glabel .L8024FE2C
/* 17E70C 8024FE2C 3C048011 */ lui $a0, %hi(HES_AButton)
/* 17E710 8024FE30 24848B28 */ addiu $a0, $a0, %lo(HES_AButton)
/* 17E714 8024FE34 0C050529 */ jal hud_element_create
D_8024FE38:
/* 17E718 8024FE38 00000000 */ nop
/* 17E71C 8024FE3C 00022400 */ sll $a0, $v0, 16
/* 17E720 8024FE40 00042403 */ sra $a0, $a0, 16
/* 17E724 8024FE44 34058080 */ ori $a1, $zero, 0x8080
/* 17E728 8024FE48 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17E72C 8024FE4C 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17E730 8024FE50 0C051280 */ jal hud_element_set_flags
/* 17E734 8024FE54 A6020000 */ sh $v0, 0x0($s0)
/* 17E738 8024FE58 2405FF9C */ addiu $a1, $zero, -0x64
/* 17E73C 8024FE5C 86040000 */ lh $a0, 0x0($s0)
/* 17E740 8024FE60 0C051261 */ jal hud_element_set_render_pos
/* 17E744 8024FE64 00A0302D */ daddu $a2, $a1, $zero
/* 17E748 8024FE68 3C048029 */ lui $a0, %hi(HES_BButton)
/* 17E74C 8024FE6C 2484231C */ addiu $a0, $a0, %lo(HES_BButton)
/* 17E750 8024FE70 0C050529 */ jal hud_element_create
/* 17E754 8024FE74 00000000 */ nop
D_8024FE78:
/* 17E758 8024FE78 00022400 */ sll $a0, $v0, 16
/* 17E75C 8024FE7C 00042403 */ sra $a0, $a0, 16
/* 17E760 8024FE80 34058080 */ ori $a1, $zero, 0x8080
/* 17E764 8024FE84 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17E768 8024FE88 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
/* 17E76C 8024FE8C 0C051280 */ jal hud_element_set_flags
/* 17E770 8024FE90 A6020000 */ sh $v0, 0x0($s0)
/* 17E774 8024FE94 2405FF9C */ addiu $a1, $zero, -0x64
/* 17E778 8024FE98 86040000 */ lh $a0, 0x0($s0)
/* 17E77C 8024FE9C 0C051261 */ jal hud_element_set_render_pos
/* 17E780 8024FEA0 00A0302D */ daddu $a2, $a1, $zero
/* 17E784 8024FEA4 3C048029 */ lui $a0, %hi(HES_CDownButton)
/* 17E788 8024FEA8 24842630 */ addiu $a0, $a0, %lo(HES_CDownButton)
/* 17E78C 8024FEAC 0C050529 */ jal hud_element_create
D_8024FEB0_C0D730:
/* 17E790 8024FEB0 00000000 */ nop
/* 17E794 8024FEB4 00022400 */ sll $a0, $v0, 16
D_8024FEB8:
/* 17E798 8024FEB8 00042403 */ sra $a0, $a0, 16
/* 17E79C 8024FEBC 3C10802A */ lui $s0, %hi(D_8029F646)
/* 17E7A0 8024FEC0 2610F646 */ addiu $s0, $s0, %lo(D_8029F646)
/* 17E7A4 8024FEC4 080941E3 */ j .L8025078C
/* 17E7A8 8024FEC8 34058080 */ ori $a1, $zero, 0x8080
glabel .L8024FECC
/* 17E7AC 8024FECC 3C048011 */ lui $a0, %hi(HES_StickNeutral)
/* 17E7B0 8024FED0 24848E1C */ addiu $a0, $a0, %lo(HES_StickNeutral)
/* 17E7B4 8024FED4 08094060 */ j .L80250180
jan_03_Quizmo_Worker:
/* 17E7B8 8024FED8 00000000 */ nop
glabel .L8024FEDC
/* 17E7BC 8024FEDC 3C048029 */ lui $a0, %hi(HES_TimingReady)
D_8024FEE0_C0D760:
/* 17E7C0 8024FEE0 24842788 */ addiu $a0, $a0, %lo(HES_TimingReady)
/* 17E7C4 8024FEE4 0C050529 */ jal hud_element_create
/* 17E7C8 8024FEE8 00000000 */ nop
/* 17E7CC 8024FEEC 00022400 */ sll $a0, $v0, 16
jan_03_Quizmo_AnswerResult:
/* 17E7D0 8024FEF0 00042403 */ sra $a0, $a0, 16
/* 17E7D4 8024FEF4 24050080 */ addiu $a1, $zero, 0x80
jan_03_Quizmo_StageEffect:
/* 17E7D8 8024FEF8 3C10802A */ lui $s0, %hi(D_8029F642)
jan_03_Quizmo_AudienceEffect:
/* 17E7DC 8024FEFC 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
jan_03_Quizmo_VannaTEffect:
/* 17E7E0 8024FF00 0C051280 */ jal hud_element_set_flags
D_8024FF04:
/* 17E7E4 8024FF04 A6020000 */ sh $v0, 0x0($s0)
/* 17E7E8 8024FF08 2405FF9C */ addiu $a1, $zero, -0x64
/* 17E7EC 8024FF0C 86040000 */ lh $a0, 0x0($s0)
D_8024FF10:
/* 17E7F0 8024FF10 0C051261 */ jal hud_element_set_render_pos
/* 17E7F4 8024FF14 00A0302D */ daddu $a2, $a1, $zero
/* 17E7F8 8024FF18 3C048011 */ lui $a0, %hi(HES_AButton)
/* 17E7FC 8024FF1C 24848B28 */ addiu $a0, $a0, %lo(HES_AButton)
/* 17E800 8024FF20 0C050529 */ jal hud_element_create
/* 17E804 8024FF24 00000000 */ nop
/* 17E808 8024FF28 00022400 */ sll $a0, $v0, 16
/* 17E80C 8024FF2C 00042403 */ sra $a0, $a0, 16
/* 17E810 8024FF30 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17E814 8024FF34 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
D_8024FF38:
/* 17E818 8024FF38 080941E3 */ j .L8025078C
/* 17E81C 8024FF3C 34058080 */ ori $a1, $zero, 0x8080
glabel .L8024FF40
/* 17E820 8024FF40 3C048011 */ lui $a0, %hi(HES_AButton)
/* 17E824 8024FF44 24848B28 */ addiu $a0, $a0, %lo(HES_AButton)
/* 17E828 8024FF48 0C050529 */ jal hud_element_create
/* 17E82C 8024FF4C 00000000 */ nop
/* 17E830 8024FF50 00022400 */ sll $a0, $v0, 16
/* 17E834 8024FF54 00042403 */ sra $a0, $a0, 16
/* 17E838 8024FF58 34058080 */ ori $a1, $zero, 0x8080
/* 17E83C 8024FF5C 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17E840 8024FF60 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17E844 8024FF64 0C051280 */ jal hud_element_set_flags
/* 17E848 8024FF68 A6020000 */ sh $v0, 0x0($s0)
/* 17E84C 8024FF6C 2405FF9C */ addiu $a1, $zero, -0x64
/* 17E850 8024FF70 86040000 */ lh $a0, 0x0($s0)
/* 17E854 8024FF74 0C051261 */ jal hud_element_set_render_pos
D_8024FF78:
/* 17E858 8024FF78 00A0302D */ daddu $a2, $a1, $zero
/* 17E85C 8024FF7C 3C048029 */ lui $a0, %hi(HES_BButton)
/* 17E860 8024FF80 2484231C */ addiu $a0, $a0, %lo(HES_BButton)
/* 17E864 8024FF84 0C050529 */ jal hud_element_create
/* 17E868 8024FF88 00000000 */ nop
/* 17E86C 8024FF8C 86040000 */ lh $a0, 0x0($s0)
/* 17E870 8024FF90 3C01802A */ lui $at, %hi(D_8029F644)
/* 17E874 8024FF94 A422F644 */ sh $v0, %lo(D_8029F644)($at)
/* 17E878 8024FF98 080941E4 */ j .L80250790
/* 17E87C 8024FF9C 34058080 */ ori $a1, $zero, 0x8080
glabel .L8024FFA0
/* 17E880 8024FFA0 3C048011 */ lui $a0, %hi(HES_AButton)
/* 17E884 8024FFA4 24848B28 */ addiu $a0, $a0, %lo(HES_AButton)
/* 17E888 8024FFA8 0C050529 */ jal hud_element_create
D_8024FFAC:
/* 17E88C 8024FFAC 00000000 */ nop
/* 17E890 8024FFB0 00022400 */ sll $a0, $v0, 16
/* 17E894 8024FFB4 00042403 */ sra $a0, $a0, 16
D_8024FFB8:
/* 17E898 8024FFB8 34058080 */ ori $a1, $zero, 0x8080
/* 17E89C 8024FFBC 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17E8A0 8024FFC0 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17E8A4 8024FFC4 0C051280 */ jal hud_element_set_flags
/* 17E8A8 8024FFC8 A6020000 */ sh $v0, 0x0($s0)
/* 17E8AC 8024FFCC 2405FF9C */ addiu $a1, $zero, -0x64
/* 17E8B0 8024FFD0 86040000 */ lh $a0, 0x0($s0)
/* 17E8B4 8024FFD4 0C051261 */ jal hud_element_set_render_pos
/* 17E8B8 8024FFD8 00A0302D */ daddu $a2, $a1, $zero
/* 17E8BC 8024FFDC 3C048029 */ lui $a0, %hi(HES_BButton)
/* 17E8C0 8024FFE0 2484231C */ addiu $a0, $a0, %lo(HES_BButton)
/* 17E8C4 8024FFE4 0C050529 */ jal hud_element_create
/* 17E8C8 8024FFE8 00000000 */ nop
/* 17E8CC 8024FFEC 00022400 */ sll $a0, $v0, 16
/* 17E8D0 8024FFF0 00042403 */ sra $a0, $a0, 16
/* 17E8D4 8024FFF4 3C10802A */ lui $s0, %hi(D_8029F644)
D_8024FFF8:
/* 17E8D8 8024FFF8 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
/* 17E8DC 8024FFFC 080941E3 */ j .L8025078C
/* 17E8E0 80250000 34058080 */ ori $a1, $zero, 0x8080
glabel .L80250004
/* 17E8E4 80250004 3C048029 */ lui $a0, %hi(HES_TimingReady)
/* 17E8E8 80250008 24842788 */ addiu $a0, $a0, %lo(HES_TimingReady)
/* 17E8EC 8025000C 0C050529 */ jal hud_element_create
/* 17E8F0 80250010 00000000 */ nop
/* 17E8F4 80250014 00022400 */ sll $a0, $v0, 16
/* 17E8F8 80250018 00042403 */ sra $a0, $a0, 16
/* 17E8FC 8025001C 24050080 */ addiu $a1, $zero, 0x80
/* 17E900 80250020 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17E904 80250024 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17E908 80250028 0C051280 */ jal hud_element_set_flags
/* 17E90C 8025002C A6020000 */ sh $v0, 0x0($s0)
/* 17E910 80250030 2405FF9C */ addiu $a1, $zero, -0x64
/* 17E914 80250034 86040000 */ lh $a0, 0x0($s0)
D_80250038:
/* 17E918 80250038 0C051261 */ jal hud_element_set_render_pos
/* 17E91C 8025003C 00A0302D */ daddu $a2, $a1, $zero
/* 17E920 80250040 3C048011 */ lui $a0, %hi(HES_AButtonDown)
/* 17E924 80250044 24848B54 */ addiu $a0, $a0, %lo(HES_AButtonDown)
D_80250048:
/* 17E928 80250048 0C050529 */ jal hud_element_create
/* 17E92C 8025004C 00000000 */ nop
/* 17E930 80250050 00022400 */ sll $a0, $v0, 16
/* 17E934 80250054 00042403 */ sra $a0, $a0, 16
/* 17E938 80250058 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17E93C 8025005C 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
/* 17E940 80250060 080941E3 */ j .L8025078C
/* 17E944 80250064 34058080 */ ori $a1, $zero, 0x8080
glabel .L80250068
/* 17E948 80250068 3C048011 */ lui $a0, %hi(HES_StickNeutral)
/* 17E94C 8025006C 24848E1C */ addiu $a0, $a0, %lo(HES_StickNeutral)
/* 17E950 80250070 0C050529 */ jal hud_element_create
/* 17E954 80250074 00000000 */ nop
D_80250078:
/* 17E958 80250078 00022400 */ sll $a0, $v0, 16
/* 17E95C 8025007C 00042403 */ sra $a0, $a0, 16
/* 17E960 80250080 34058080 */ ori $a1, $zero, 0x8080
/* 17E964 80250084 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17E968 80250088 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17E96C 8025008C 0C051280 */ jal hud_element_set_flags
/* 17E970 80250090 A6020000 */ sh $v0, 0x0($s0)
/* 17E974 80250094 2405FF9C */ addiu $a1, $zero, -0x64
/* 17E978 80250098 86040000 */ lh $a0, 0x0($s0)
/* 17E97C 8025009C 0C051261 */ jal hud_element_set_render_pos
D_802500A0_C0D920:
/* 17E980 802500A0 00A0302D */ daddu $a2, $a1, $zero
/* 17E984 802500A4 3C048029 */ lui $a0, %hi(HES_AimTarget)
/* 17E988 802500A8 248436D4 */ addiu $a0, $a0, %lo(HES_AimTarget)
/* 17E98C 802500AC 0C050529 */ jal hud_element_create
/* 17E990 802500B0 00000000 */ nop
/* 17E994 802500B4 00022400 */ sll $a0, $v0, 16
D_802500B8:
/* 17E998 802500B8 00042403 */ sra $a0, $a0, 16
/* 17E99C 802500BC 34058080 */ ori $a1, $zero, 0x8080
/* 17E9A0 802500C0 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17E9A4 802500C4 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
D_802500C8_C0D948:
/* 17E9A8 802500C8 0C051280 */ jal hud_element_set_flags
/* 17E9AC 802500CC A6020000 */ sh $v0, 0x0($s0)
/* 17E9B0 802500D0 2405FF9C */ addiu $a1, $zero, -0x64
/* 17E9B4 802500D4 86040000 */ lh $a0, 0x0($s0)
/* 17E9B8 802500D8 0C051261 */ jal hud_element_set_render_pos
/* 17E9BC 802500DC 00A0302D */ daddu $a2, $a1, $zero
/* 17E9C0 802500E0 86040000 */ lh $a0, 0x0($s0)
/* 17E9C4 802500E4 0C0513F6 */ jal hud_element_create_transform_B
/* 17E9C8 802500E8 00000000 */ nop
/* 17E9CC 802500EC 3C048029 */ lui $a0, %hi(HES_AimReticle)
/* 17E9D0 802500F0 2484369C */ addiu $a0, $a0, %lo(HES_AimReticle)
/* 17E9D4 802500F4 0C050529 */ jal hud_element_create
D_802500F8:
/* 17E9D8 802500F8 00000000 */ nop
/* 17E9DC 802500FC 00022400 */ sll $a0, $v0, 16
/* 17E9E0 80250100 00042403 */ sra $a0, $a0, 16
/* 17E9E4 80250104 34058080 */ ori $a1, $zero, 0x8080
D_80250108_C0D988:
/* 17E9E8 80250108 3C10802A */ lui $s0, %hi(D_8029F646)
/* 17E9EC 8025010C 2610F646 */ addiu $s0, $s0, %lo(D_8029F646)
.L80250110:
/* 17E9F0 80250110 0C051280 */ jal hud_element_set_flags
/* 17E9F4 80250114 A6020000 */ sh $v0, 0x0($s0)
/* 17E9F8 80250118 2405FF9C */ addiu $a1, $zero, -0x64
/* 17E9FC 8025011C 86040000 */ lh $a0, 0x0($s0)
/* 17EA00 80250120 0C051261 */ jal hud_element_set_render_pos
/* 17EA04 80250124 00A0302D */ daddu $a2, $a1, $zero
/* 17EA08 80250128 86040000 */ lh $a0, 0x0($s0)
/* 17EA0C 8025012C 0C0513F6 */ jal hud_element_create_transform_B
/* 17EA10 80250130 00000000 */ nop
/* 17EA14 80250134 080941EB */ j .L802507AC
D_80250138:
/* 17EA18 80250138 24020001 */ addiu $v0, $zero, 0x1
glabel .L8025013C
/* 17EA1C 8025013C 3C048011 */ lui $a0, %hi(HES_AButton)
/* 17EA20 80250140 24848B28 */ addiu $a0, $a0, %lo(HES_AButton)
/* 17EA24 80250144 0C050529 */ jal hud_element_create
/* 17EA28 80250148 00000000 */ nop
/* 17EA2C 8025014C 00022400 */ sll $a0, $v0, 16
/* 17EA30 80250150 00042403 */ sra $a0, $a0, 16
/* 17EA34 80250154 34058080 */ ori $a1, $zero, 0x8080
/* 17EA38 80250158 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17EA3C 8025015C 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17EA40 80250160 0C051280 */ jal hud_element_set_flags
/* 17EA44 80250164 A6020000 */ sh $v0, 0x0($s0)
D_80250168_C0D9E8:
/* 17EA48 80250168 2405FF9C */ addiu $a1, $zero, -0x64
/* 17EA4C 8025016C 86040000 */ lh $a0, 0x0($s0)
D_80250170:
/* 17EA50 80250170 0C051261 */ jal hud_element_set_render_pos
/* 17EA54 80250174 00A0302D */ daddu $a2, $a1, $zero
glabel .L80250178
/* 17EA58 80250178 3C048011 */ lui $a0, %hi(HES_AButton)
/* 17EA5C 8025017C 24848B28 */ addiu $a0, $a0, %lo(HES_AButton)
.L80250180:
/* 17EA60 80250180 0C050529 */ jal hud_element_create
/* 17EA64 80250184 00000000 */ nop
/* 17EA68 80250188 00022400 */ sll $a0, $v0, 16
/* 17EA6C 8025018C 00042403 */ sra $a0, $a0, 16
/* 17EA70 80250190 080941E1 */ j .L80250784
/* 17EA74 80250194 34058080 */ ori $a1, $zero, 0x8080
.L80250198:
/* 17EA78 80250198 3C06800E */ lui $a2, %hi(gBattleStatus)
/* 17EA7C 8025019C 24C6C070 */ addiu $a2, $a2, %lo(gBattleStatus)
/* 17EA80 802501A0 8CC30000 */ lw $v1, 0x0($a2)
/* 17EA84 802501A4 3C020001 */ lui $v0, (0x10000 >> 16)
/* 17EA88 802501A8 00621024 */ and $v0, $v1, $v0
/* 17EA8C 802501AC 1040000A */ beqz $v0, .L802501D8
/* 17EA90 802501B0 24050007 */ addiu $a1, $zero, 0x7
/* 17EA94 802501B4 24040009 */ addiu $a0, $zero, 0x9
D_802501B8:
/* 17EA98 802501B8 2402BFFF */ addiu $v0, $zero, -0x4001
/* 17EA9C 802501BC 00621024 */ and $v0, $v1, $v0
/* 17EAA0 802501C0 0C051F9F */ jal set_window_update
/* 17EAA4 802501C4 ACC20000 */ sw $v0, 0x0($a2)
/* 17EAA8 802501C8 24020002 */ addiu $v0, $zero, 0x2
/* 17EAAC 802501CC A6200014 */ sh $zero, 0x14($s1)
/* 17EAB0 802501D0 080941F7 */ j .L802507DC
/* 17EAB4 802501D4 A2220016 */ sb $v0, 0x16($s1)
.L802501D8:
/* 17EAB8 802501D8 30624000 */ andi $v0, $v1, 0x4000
/* 17EABC 802501DC 1440017F */ bnez $v0, .L802507DC
/* 17EAC0 802501E0 24020002 */ addiu $v0, $zero, 0x2
/* 17EAC4 802501E4 1082017D */ beq $a0, $v0, .L802507DC
/* 17EAC8 802501E8 24040009 */ addiu $a0, $zero, 0x9
/* 17EACC 802501EC 0C051F9F */ jal set_window_update
/* 17EAD0 802501F0 24050007 */ addiu $a1, $zero, 0x7
/* 17EAD4 802501F4 96220012 */ lhu $v0, 0x12($s1)
D_802501F8:
/* 17EAD8 802501F8 2442FFD2 */ addiu $v0, $v0, -0x2E
/* 17EADC 802501FC 00021400 */ sll $v0, $v0, 16
/* 17EAE0 80250200 00021C03 */ sra $v1, $v0, 16
/* 17EAE4 80250204 2C620015 */ sltiu $v0, $v1, 0x15
/* 17EAE8 80250208 104000AC */ beqz $v0, .L802504BC
/* 17EAEC 8025020C 00031080 */ sll $v0, $v1, 2
/* 17EAF0 80250210 3C01802A */ lui $at, %hi(jtbl_8029CF60)
/* 17EAF4 80250214 00220821 */ addu $at, $at, $v0
/* 17EAF8 80250218 8C22CF60 */ lw $v0, %lo(jtbl_8029CF60)($at)
/* 17EAFC 8025021C 00400008 */ jr $v0
D_80250220_C0DAA0:
/* 17EB00 80250220 00000000 */ nop
glabel .L80250224
/* 17EB04 80250224 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17EB08 80250228 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17EB0C 8025022C 3C058011 */ lui $a1, %hi(HES_MashAButton)
/* 17EB10 80250230 24A58B80 */ addiu $a1, $a1, %lo(HES_MashAButton)
/* 17EB14 80250234 0809412D */ j .L802504B4
D_80250238:
/* 17EB18 80250238 00000000 */ nop
glabel .L8025023C
/* 17EB1C 8025023C 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17EB20 80250240 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17EB24 80250244 3C058011 */ lui $a1, %hi(HES_StickMashLeft)
/* 17EB28 80250248 24A58F30 */ addiu $a1, $a1, %lo(HES_StickMashLeft)
/* 17EB2C 8025024C 0809412D */ j .L802504B4
/* 17EB30 80250250 00000000 */ nop
glabel .L80250254
/* 17EB34 80250254 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17EB38 80250258 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17EB3C 8025025C 3C058011 */ lui $a1, %hi(HES_StickTapLeft)
/* 17EB40 80250260 24A58F90 */ addiu $a1, $a1, %lo(HES_StickTapLeft)
/* 17EB44 80250264 0C0511FF */ jal hud_element_set_script
/* 17EB48 80250268 00000000 */ nop
/* 17EB4C 8025026C 3C04802A */ lui $a0, %hi(D_8029F644)
/* 17EB50 80250270 8484F644 */ lh $a0, %lo(D_8029F644)($a0)
/* 17EB54 80250274 3C058029 */ lui $a1, %hi(HES_TimingBlink)
D_80250278:
/* 17EB58 80250278 24A527B4 */ addiu $a1, $a1, %lo(HES_TimingBlink)
/* 17EB5C 8025027C 0809412D */ j .L802504B4
/* 17EB60 80250280 00000000 */ nop
glabel .L80250284
/* 17EB64 80250284 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17EB68 80250288 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17EB6C 8025028C 3C058011 */ lui $a1, %hi(HES_StickTapLeft)
D_80250290_C0DB10:
/* 17EB70 80250290 24A58F90 */ addiu $a1, $a1, %lo(HES_StickTapLeft)
/* 17EB74 80250294 0C0511FF */ jal hud_element_set_script
/* 17EB78 80250298 00000000 */ nop
/* 17EB7C 8025029C 3C04802A */ lui $a0, %hi(D_8029F644)
/* 17EB80 802502A0 8484F644 */ lh $a0, %lo(D_8029F644)($a0)
/* 17EB84 802502A4 3C058029 */ lui $a1, %hi(HES_AimTarget)
/* 17EB88 802502A8 24A536D4 */ addiu $a1, $a1, %lo(HES_AimTarget)
D_802502AC:
/* 17EB8C 802502AC 0809412D */ j .L802504B4
/* 17EB90 802502B0 00000000 */ nop
glabel .L802502B4
/* 17EB94 802502B4 3C04802A */ lui $a0, %hi(D_8029F642)
D_802502B8:
/* 17EB98 802502B8 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17EB9C 802502BC 3C058029 */ lui $a1, %hi(HES_MashCUpButton)
/* 17EBA0 802502C0 24A525F4 */ addiu $a1, $a1, %lo(HES_MashCUpButton)
D_802502C4:
/* 17EBA4 802502C4 0C0511FF */ jal hud_element_set_script
/* 17EBA8 802502C8 00000000 */ nop
/* 17EBAC 802502CC 3C04802A */ lui $a0, %hi(D_8029F644)
/* 17EBB0 802502D0 8484F644 */ lh $a0, %lo(D_8029F644)($a0)
/* 17EBB4 802502D4 3C058029 */ lui $a1, %hi(HES_MashCDownButton1)
/* 17EBB8 802502D8 24A52688 */ addiu $a1, $a1, %lo(HES_MashCDownButton1)
/* 17EBBC 802502DC 0C0511FF */ jal hud_element_set_script
/* 17EBC0 802502E0 00000000 */ nop
/* 17EBC4 802502E4 3C04802A */ lui $a0, %hi(D_8029F646)
/* 17EBC8 802502E8 8484F646 */ lh $a0, %lo(D_8029F646)($a0)
/* 17EBCC 802502EC 3C058029 */ lui $a1, %hi(HES_MashCLeftButton)
/* 17EBD0 802502F0 24A52490 */ addiu $a1, $a1, %lo(HES_MashCLeftButton)
/* 17EBD4 802502F4 0C0511FF */ jal hud_element_set_script
D_802502F8_C0DB78:
/* 17EBD8 802502F8 00000000 */ nop
/* 17EBDC 802502FC 3C04802A */ lui $a0, %hi(D_8029F648)
/* 17EBE0 80250300 8484F648 */ lh $a0, %lo(D_8029F648)($a0)
/* 17EBE4 80250304 3C058029 */ lui $a1, %hi(HES_MashCRightButton1)
/* 17EBE8 80250308 24A52524 */ addiu $a1, $a1, %lo(HES_MashCRightButton1)
/* 17EBEC 8025030C 0809412D */ j .L802504B4
/* 17EBF0 80250310 00000000 */ nop
glabel .L80250314
/* 17EBF4 80250314 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17EBF8 80250318 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17EBFC 8025031C 3C058011 */ lui $a1, %hi(HES_StickBackAndForth)
/* 17EC00 80250320 24A58E80 */ addiu $a1, $a1, %lo(HES_StickBackAndForth)
/* 17EC04 80250324 0809412D */ j .L802504B4
/* 17EC08 80250328 00000000 */ nop
glabel .L8025032C
/* 17EC0C 8025032C 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17EC10 80250330 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17EC14 80250334 3C058011 */ lui $a1, %hi(HES_PressAButton)
/* 17EC18 80250338 24A58BBC */ addiu $a1, $a1, %lo(HES_PressAButton)
/* 17EC1C 8025033C 0C0511FF */ jal hud_element_set_script
/* 17EC20 80250340 00000000 */ nop
/* 17EC24 80250344 3C04802A */ lui $a0, %hi(D_8029F644)
/* 17EC28 80250348 8484F644 */ lh $a0, %lo(D_8029F644)($a0)
/* 17EC2C 8025034C 3C058029 */ lui $a1, %hi(HES_PressBButton)
/* 17EC30 80250350 24A523B0 */ addiu $a1, $a1, %lo(HES_PressBButton)
/* 17EC34 80250354 0C0511FF */ jal hud_element_set_script
/* 17EC38 80250358 00000000 */ nop
/* 17EC3C 8025035C 3C04802A */ lui $a0, %hi(D_8029F646)
D_80250360_C0DBE0:
/* 17EC40 80250360 8484F646 */ lh $a0, %lo(D_8029F646)($a0)
/* 17EC44 80250364 3C058029 */ lui $a1, %hi(HES_PressCDownButton)
/* 17EC48 80250368 24A526C4 */ addiu $a1, $a1, %lo(HES_PressCDownButton)
/* 17EC4C 8025036C 0809412D */ j .L802504B4
/* 17EC50 80250370 00000000 */ nop
glabel .L80250374
/* 17EC54 80250374 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17EC58 80250378 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17EC5C 8025037C 3C058011 */ lui $a1, %hi(HES_RotateStickCW)
/* 17EC60 80250380 24A58D6C */ addiu $a1, $a1, %lo(HES_RotateStickCW)
/* 17EC64 80250384 0809412D */ j .L802504B4
/* 17EC68 80250388 00000000 */ nop
glabel .L8025038C
/* 17EC6C 8025038C 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17EC70 80250390 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17EC74 80250394 3C058029 */ lui $a1, %hi(HES_TimingBlink)
/* 17EC78 80250398 24A527B4 */ addiu $a1, $a1, %lo(HES_TimingBlink)
/* 17EC7C 8025039C 0C0511FF */ jal hud_element_set_script
/* 17EC80 802503A0 00000000 */ nop
/* 17EC84 802503A4 3C04802A */ lui $a0, %hi(D_8029F644)
/* 17EC88 802503A8 8484F644 */ lh $a0, %lo(D_8029F644)($a0)
/* 17EC8C 802503AC 3C058011 */ lui $a1, %hi(HES_MashAButton)
/* 17EC90 802503B0 24A58B80 */ addiu $a1, $a1, %lo(HES_MashAButton)
/* 17EC94 802503B4 0809412D */ j .L802504B4
/* 17EC98 802503B8 00000000 */ nop
glabel .L802503BC
/* 17EC9C 802503BC 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17ECA0 802503C0 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17ECA4 802503C4 3C058011 */ lui $a1, %hi(HES_MashAButton)
/* 17ECA8 802503C8 24A58B80 */ addiu $a1, $a1, %lo(HES_MashAButton)
/* 17ECAC 802503CC 0C0511FF */ jal hud_element_set_script
/* 17ECB0 802503D0 00000000 */ nop
/* 17ECB4 802503D4 3C04802A */ lui $a0, %hi(D_8029F644)
/* 17ECB8 802503D8 8484F644 */ lh $a0, %lo(D_8029F644)($a0)
/* 17ECBC 802503DC 3C058029 */ lui $a1, %hi(HES_MashBButton2)
/* 17ECC0 802503E0 24A523FC */ addiu $a1, $a1, %lo(HES_MashBButton2)
/* 17ECC4 802503E4 0809412D */ j .L802504B4
/* 17ECC8 802503E8 00000000 */ nop
glabel .L802503EC
/* 17ECCC 802503EC 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17ECD0 802503F0 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17ECD4 802503F4 3C058011 */ lui $a1, %hi(HES_MashAButton)
/* 17ECD8 802503F8 24A58B80 */ addiu $a1, $a1, %lo(HES_MashAButton)
/* 17ECDC 802503FC 0C0511FF */ jal hud_element_set_script
/* 17ECE0 80250400 00000000 */ nop
/* 17ECE4 80250404 3C04802A */ lui $a0, %hi(D_8029F644)
/* 17ECE8 80250408 8484F644 */ lh $a0, %lo(D_8029F644)($a0)
/* 17ECEC 8025040C 3C058029 */ lui $a1, %hi(HES_MashBButton1)
/* 17ECF0 80250410 24A52374 */ addiu $a1, $a1, %lo(HES_MashBButton1)
D_80250414:
/* 17ECF4 80250414 0809412D */ j .L802504B4
/* 17ECF8 80250418 00000000 */ nop
glabel .L8025041C
/* 17ECFC 8025041C 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17ED00 80250420 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17ED04 80250424 3C058011 */ lui $a1, %hi(HES_MashAButton)
/* 17ED08 80250428 24A58B80 */ addiu $a1, $a1, %lo(HES_MashAButton)
/* 17ED0C 8025042C 0809412D */ j .L802504B4
/* 17ED10 80250430 00000000 */ nop
glabel .L80250434
/* 17ED14 80250434 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17ED18 80250438 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17ED1C 8025043C 3C058029 */ lui $a1, %hi(HES_TimingBlink)
/* 17ED20 80250440 24A527B4 */ addiu $a1, $a1, %lo(HES_TimingBlink)
/* 17ED24 80250444 0C0511FF */ jal hud_element_set_script
/* 17ED28 80250448 00000000 */ nop
/* 17ED2C 8025044C 3C04802A */ lui $a0, %hi(D_8029F644)
/* 17ED30 80250450 8484F644 */ lh $a0, %lo(D_8029F644)($a0)
/* 17ED34 80250454 0809412B */ j .L802504AC
/* 17ED38 80250458 00000000 */ nop
glabel .L8025045C
/* 17ED3C 8025045C 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17ED40 80250460 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17ED44 80250464 3C058011 */ lui $a1, %hi(HES_StickTapRight)
/* 17ED48 80250468 24A591E4 */ addiu $a1, $a1, %lo(HES_StickTapRight)
/* 17ED4C 8025046C 0809412D */ j .L802504B4
/* 17ED50 80250470 00000000 */ nop
glabel .L80250474
/* 17ED54 80250474 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17ED58 80250478 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17ED5C 8025047C 3C058011 */ lui $a1, %hi(HES_MashAButton)
/* 17ED60 80250480 24A58B80 */ addiu $a1, $a1, %lo(HES_MashAButton)
/* 17ED64 80250484 0809412D */ j .L802504B4
/* 17ED68 80250488 00000000 */ nop
glabel .L8025048C
/* 17ED6C 8025048C 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17ED70 80250490 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17ED74 80250494 3C058011 */ lui $a1, %hi(HES_PressAButton)
/* 17ED78 80250498 24A58BBC */ addiu $a1, $a1, %lo(HES_PressAButton)
/* 17ED7C 8025049C 0C0511FF */ jal hud_element_set_script
/* 17ED80 802504A0 00000000 */ nop
glabel .L802504A4
/* 17ED84 802504A4 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17ED88 802504A8 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
.L802504AC:
/* 17ED8C 802504AC 3C058011 */ lui $a1, %hi(HES_PressAButton)
/* 17ED90 802504B0 24A58BBC */ addiu $a1, $a1, %lo(HES_PressAButton)
.L802504B4:
/* 17ED94 802504B4 0C0511FF */ jal hud_element_set_script
/* 17ED98 802504B8 00000000 */ nop
.L802504BC:
/* 17ED9C 802504BC 86230014 */ lh $v1, 0x14($s1)
/* 17EDA0 802504C0 2402FFFF */ addiu $v0, $zero, -0x1
/* 17EDA4 802504C4 1062006C */ beq $v1, $v0, .L80250678
/* 17EDA8 802504C8 2402001E */ addiu $v0, $zero, 0x1E
/* 17EDAC 802504CC 0809419E */ j .L80250678
/* 17EDB0 802504D0 A6220014 */ sh $v0, 0x14($s1)
.L802504D4:
/* 17EDB4 802504D4 14830006 */ bne $a0, $v1, .L802504F0
/* 17EDB8 802504D8 3C030001 */ lui $v1, (0x10000 >> 16)
/* 17EDBC 802504DC 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 17EDC0 802504E0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 17EDC4 802504E4 00431024 */ and $v0, $v0, $v1
/* 17EDC8 802504E8 104000BC */ beqz $v0, .L802507DC
/* 17EDCC 802504EC 00000000 */ nop
.L802504F0:
/* 17EDD0 802504F0 3C04802A */ lui $a0, %hi(D_8029F64E)
/* 17EDD4 802504F4 2484F64E */ addiu $a0, $a0, %lo(D_8029F64E)
/* 17EDD8 802504F8 84820000 */ lh $v0, 0x0($a0)
/* 17EDDC 802504FC 94830000 */ lhu $v1, 0x0($a0)
/* 17EDE0 80250500 284200C0 */ slti $v0, $v0, 0xC0
/* 17EDE4 80250504 1040000C */ beqz $v0, .L80250538
/* 17EDE8 80250508 00000000 */ nop
/* 17EDEC 8025050C 3C02802A */ lui $v0, %hi(D_8029F64C)
/* 17EDF0 80250510 8442F64C */ lh $v0, %lo(D_8029F64C)($v0)
/* 17EDF4 80250514 144000B1 */ bnez $v0, .L802507DC
/* 17EDF8 80250518 2462000A */ addiu $v0, $v1, 0xA
/* 17EDFC 8025051C A4820000 */ sh $v0, 0x0($a0)
/* 17EE00 80250520 00021400 */ sll $v0, $v0, 16
/* 17EE04 80250524 00021403 */ sra $v0, $v0, 16
/* 17EE08 80250528 284200C1 */ slti $v0, $v0, 0xC1
/* 17EE0C 8025052C 14400002 */ bnez $v0, .L80250538
/* 17EE10 80250530 240200C0 */ addiu $v0, $zero, 0xC0
/* 17EE14 80250534 A4820000 */ sh $v0, 0x0($a0)
.L80250538:
/* 17EE18 80250538 3C02802A */ lui $v0, %hi(D_8029F64E)
/* 17EE1C 8025053C 9442F64E */ lhu $v0, %lo(D_8029F64E)($v0)
/* 17EE20 80250540 3C03802A */ lui $v1, %hi(D_8029F650)
/* 17EE24 80250544 9463F650 */ lhu $v1, %lo(D_8029F650)($v1)
/* 17EE28 80250548 00431021 */ addu $v0, $v0, $v1
/* 17EE2C 8025054C 3C018016 */ lui $at, %hi(D_80159E7E)
/* 17EE30 80250550 A4229E7E */ sh $v0, %lo(D_80159E7E)($at)
/* 17EE34 80250554 2402FFFF */ addiu $v0, $zero, -0x1
/* 17EE38 80250558 86240014 */ lh $a0, 0x14($s1)
/* 17EE3C 8025055C 1082009F */ beq $a0, $v0, .L802507DC
D_80250560:
/* 17EE40 80250560 96230014 */ lhu $v1, 0x14($s1)
/* 17EE44 80250564 10800003 */ beqz $a0, .L80250574
/* 17EE48 80250568 00621021 */ addu $v0, $v1, $v0
/* 17EE4C 8025056C 080941F7 */ j .L802507DC
/* 17EE50 80250570 A6220014 */ sh $v0, 0x14($s1)
.L80250574:
/* 17EE54 80250574 96220012 */ lhu $v0, 0x12($s1)
/* 17EE58 80250578 2442FFD2 */ addiu $v0, $v0, -0x2E
/* 17EE5C 8025057C 00021400 */ sll $v0, $v0, 16
/* 17EE60 80250580 00021C03 */ sra $v1, $v0, 16
/* 17EE64 80250584 2C620015 */ sltiu $v0, $v1, 0x15
/* 17EE68 80250588 1040002E */ beqz $v0, .L80250644
/* 17EE6C 8025058C 00031080 */ sll $v0, $v1, 2
D_80250590:
/* 17EE70 80250590 3C01802A */ lui $at, %hi(jtbl_8029CFB8)
/* 17EE74 80250594 00220821 */ addu $at, $at, $v0
/* 17EE78 80250598 8C22CFB8 */ lw $v0, %lo(jtbl_8029CFB8)($at)
/* 17EE7C 8025059C 00400008 */ jr $v0
/* 17EE80 802505A0 00000000 */ nop
glabel .L802505A4
/* 17EE84 802505A4 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17EE88 802505A8 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17EE8C 802505AC 0809418F */ j .L8025063C
/* 17EE90 802505B0 00000000 */ nop
glabel .L802505B4
/* 17EE94 802505B4 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17EE98 802505B8 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17EE9C 802505BC 0C05123D */ jal hud_element_free
/* 17EEA0 802505C0 00000000 */ nop
/* 17EEA4 802505C4 3C04802A */ lui $a0, %hi(D_8029F644)
/* 17EEA8 802505C8 8484F644 */ lh $a0, %lo(D_8029F644)($a0)
/* 17EEAC 802505CC 0809418F */ j .L8025063C
/* 17EEB0 802505D0 00000000 */ nop
glabel .L802505D4
/* 17EEB4 802505D4 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17EEB8 802505D8 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17EEBC 802505DC 0C05123D */ jal hud_element_free
/* 17EEC0 802505E0 00000000 */ nop
/* 17EEC4 802505E4 3C04802A */ lui $a0, %hi(D_8029F644)
/* 17EEC8 802505E8 8484F644 */ lh $a0, %lo(D_8029F644)($a0)
/* 17EECC 802505EC 0C05123D */ jal hud_element_free
/* 17EED0 802505F0 00000000 */ nop
/* 17EED4 802505F4 3C04802A */ lui $a0, %hi(D_8029F646)
/* 17EED8 802505F8 8484F646 */ lh $a0, %lo(D_8029F646)($a0)
/* 17EEDC 802505FC 0809418F */ j .L8025063C
/* 17EEE0 80250600 00000000 */ nop
glabel .L80250604
/* 17EEE4 80250604 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17EEE8 80250608 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17EEEC 8025060C 0C05123D */ jal hud_element_free
/* 17EEF0 80250610 00000000 */ nop
/* 17EEF4 80250614 3C04802A */ lui $a0, %hi(D_8029F644)
/* 17EEF8 80250618 8484F644 */ lh $a0, %lo(D_8029F644)($a0)
/* 17EEFC 8025061C 0C05123D */ jal hud_element_free
/* 17EF00 80250620 00000000 */ nop
/* 17EF04 80250624 3C04802A */ lui $a0, %hi(D_8029F646)
/* 17EF08 80250628 8484F646 */ lh $a0, %lo(D_8029F646)($a0)
/* 17EF0C 8025062C 0C05123D */ jal hud_element_free
/* 17EF10 80250630 00000000 */ nop
/* 17EF14 80250634 3C04802A */ lui $a0, %hi(D_8029F648)
/* 17EF18 80250638 8484F648 */ lh $a0, %lo(D_8029F648)($a0)
.L8025063C:
/* 17EF1C 8025063C 0C05123D */ jal hud_element_free
/* 17EF20 80250640 00000000 */ nop
.L80250644:
/* 17EF24 80250644 3C01802A */ lui $at, %hi(D_8029F64A)
D_80250648_C0DEC8:
/* 17EF28 80250648 A420F64A */ sh $zero, %lo(D_8029F64A)($at)
/* 17EF2C 8025064C 080941F7 */ j .L802507DC
/* 17EF30 80250650 24120001 */ addiu $s2, $zero, 0x1
glabel .L80250654
/* 17EF34 80250654 82230016 */ lb $v1, 0x16($s1)
/* 17EF38 80250658 2C620005 */ sltiu $v0, $v1, 0x5
/* 17EF3C 8025065C 1040005F */ beqz $v0, .L802507DC
/* 17EF40 80250660 00031080 */ sll $v0, $v1, 2
/* 17EF44 80250664 3C01802A */ lui $at, %hi(jtbl_8029D010)
D_80250668:
/* 17EF48 80250668 00220821 */ addu $at, $at, $v0
/* 17EF4C 8025066C 8C22D010 */ lw $v0, %lo(jtbl_8029D010)($at)
/* 17EF50 80250670 00400008 */ jr $v0
/* 17EF54 80250674 00000000 */ nop
glabel .L80250678
/* 17EF58 80250678 24020002 */ addiu $v0, $zero, 0x2
/* 17EF5C 8025067C 080941F7 */ j .L802507DC
/* 17EF60 80250680 A2220016 */ sb $v0, 0x16($s1)
glabel .L80250684
/* 17EF64 80250684 8C820214 */ lw $v0, 0x214($a0)
/* 17EF68 80250688 3042C000 */ andi $v0, $v0, 0xC000
D_8025068C:
/* 17EF6C 8025068C 54400001 */ bnel $v0, $zero, .L80250694
/* 17EF70 80250690 A6200014 */ sh $zero, 0x14($s1)
.L80250694:
/* 17EF74 80250694 86220014 */ lh $v0, 0x14($s1)
D_80250698_C0DF18:
/* 17EF78 80250698 96230014 */ lhu $v1, 0x14($s1)
/* 17EF7C 8025069C 14400049 */ bnez $v0, .L802507C4
/* 17EF80 802506A0 2462FFFF */ addiu $v0, $v1, -0x1
/* 17EF84 802506A4 24020003 */ addiu $v0, $zero, 0x3
/* 17EF88 802506A8 080941F7 */ j .L802507DC
/* 17EF8C 802506AC A2220016 */ sb $v0, 0x16($s1)
D_802506B0:
/* 17EF90 802506B0 24020004 */ addiu $v0, $zero, 0x4
/* 17EF94 802506B4 080941F7 */ j .L802507DC
/* 17EF98 802506B8 A2220016 */ sb $v0, 0x16($s1)
glabel .L802506BC
/* 17EF9C 802506BC 82230016 */ lb $v1, 0x16($s1)
/* 17EFA0 802506C0 10600005 */ beqz $v1, .L802506D8
/* 17EFA4 802506C4 24020001 */ addiu $v0, $zero, 0x1
/* 17EFA8 802506C8 1062003A */ beq $v1, $v0, .L802507B4
/* 17EFAC 802506CC 00000000 */ nop
/* 17EFB0 802506D0 080941F7 */ j .L802507DC
/* 17EFB4 802506D4 00000000 */ nop
.L802506D8:
/* 17EFB8 802506D8 96220012 */ lhu $v0, 0x12($s1)
/* 17EFBC 802506DC 2442FFB7 */ addiu $v0, $v0, -0x49
/* 17EFC0 802506E0 00021400 */ sll $v0, $v0, 16
/* 17EFC4 802506E4 00021C03 */ sra $v1, $v0, 16
/* 17EFC8 802506E8 2C620007 */ sltiu $v0, $v1, 0x7
/* 17EFCC 802506EC 1040002E */ beqz $v0, .L802507A8
/* 17EFD0 802506F0 00031080 */ sll $v0, $v1, 2
/* 17EFD4 802506F4 3C01802A */ lui $at, %hi(jtbl_8029D028)
/* 17EFD8 802506F8 00220821 */ addu $at, $at, $v0
/* 17EFDC 802506FC 8C22D028 */ lw $v0, %lo(jtbl_8029D028)($at)
/* 17EFE0 80250700 00400008 */ jr $v0
/* 17EFE4 80250704 00000000 */ nop
glabel .L80250708
/* 17EFE8 80250708 3C048008 */ lui $a0, %hi(HES_Item_Hammer1)
/* 17EFEC 8025070C 248406A0 */ addiu $a0, $a0, %lo(HES_Item_Hammer1)
/* 17EFF0 80250710 080941DC */ j .L80250770
/* 17EFF4 80250714 00000000 */ nop
glabel .L80250718
/* 17EFF8 80250718 3C048008 */ lui $a0, %hi(HES_Item_Hammer2)
/* 17EFFC 8025071C 248406D0 */ addiu $a0, $a0, %lo(HES_Item_Hammer2)
D_80250720_C0DFA0:
/* 17F000 80250720 080941DC */ j .L80250770
/* 17F004 80250724 00000000 */ nop
glabel .L80250728
/* 17F008 80250728 3C048008 */ lui $a0, %hi(HES_Item_Hammer3)
/* 17F00C 8025072C 24840700 */ addiu $a0, $a0, %lo(HES_Item_Hammer3)
/* 17F010 80250730 080941DC */ j .L80250770
/* 17F014 80250734 00000000 */ nop
glabel .L80250738
/* 17F018 80250738 3C048008 */ lui $a0, %hi(HES_Item_Boots1)
/* 17F01C 8025073C 24840730 */ addiu $a0, $a0, %lo(HES_Item_Boots1)
/* 17F020 80250740 080941DC */ j .L80250770
/* 17F024 80250744 00000000 */ nop
glabel .L80250748
/* 17F028 80250748 3C048008 */ lui $a0, %hi(HES_Item_Boots2)
/* 17F02C 8025074C 24840760 */ addiu $a0, $a0, %lo(HES_Item_Boots2)
/* 17F030 80250750 080941DC */ j .L80250770
/* 17F034 80250754 00000000 */ nop
glabel .L80250758
/* 17F038 80250758 3C048008 */ lui $a0, %hi(HES_Item_Boots3)
/* 17F03C 8025075C 24840790 */ addiu $a0, $a0, %lo(HES_Item_Boots3)
/* 17F040 80250760 080941DC */ j .L80250770
/* 17F044 80250764 00000000 */ nop
glabel .L80250768
/* 17F048 80250768 3C048008 */ lui $a0, %hi(HES_Item_Items)
/* 17F04C 8025076C 248407C0 */ addiu $a0, $a0, %lo(HES_Item_Items)
.L80250770:
/* 17F050 80250770 0C050529 */ jal hud_element_create
/* 17F054 80250774 00000000 */ nop
/* 17F058 80250778 00022400 */ sll $a0, $v0, 16
/* 17F05C 8025077C 00042403 */ sra $a0, $a0, 16
/* 17F060 80250780 24050080 */ addiu $a1, $zero, 0x80
.L80250784:
/* 17F064 80250784 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F068 80250788 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
.L8025078C:
/* 17F06C 8025078C A6020000 */ sh $v0, 0x0($s0)
.L80250790:
/* 17F070 80250790 0C051280 */ jal hud_element_set_flags
/* 17F074 80250794 00000000 */ nop
D_80250798_C0E018:
/* 17F078 80250798 2405FF9C */ addiu $a1, $zero, -0x64
/* 17F07C 8025079C 86040000 */ lh $a0, 0x0($s0)
/* 17F080 802507A0 0C051261 */ jal hud_element_set_render_pos
/* 17F084 802507A4 00A0302D */ daddu $a2, $a1, $zero
glabel .L802507A8
/* 17F088 802507A8 24020001 */ addiu $v0, $zero, 0x1
.L802507AC:
/* 17F08C 802507AC 080941F7 */ j .L802507DC
/* 17F090 802507B0 A2220016 */ sb $v0, 0x16($s1)
.L802507B4:
/* 17F094 802507B4 86220014 */ lh $v0, 0x14($s1)
/* 17F098 802507B8 96230014 */ lhu $v1, 0x14($s1)
/* 17F09C 802507BC 10400003 */ beqz $v0, .L802507CC
/* 17F0A0 802507C0 2462FFFF */ addiu $v0, $v1, -0x1
.L802507C4:
/* 17F0A4 802507C4 080941F7 */ j .L802507DC
/* 17F0A8 802507C8 A6220014 */ sh $v0, 0x14($s1)
.L802507CC:
/* 17F0AC 802507CC 3C04802A */ lui $a0, %hi(D_8029F642)
/* 17F0B0 802507D0 8484F642 */ lh $a0, %lo(D_8029F642)($a0)
/* 17F0B4 802507D4 0C05123D */ jal hud_element_free
/* 17F0B8 802507D8 24120001 */ addiu $s2, $zero, 0x1
.L802507DC:
/* 17F0BC 802507DC 12400008 */ beqz $s2, .L80250800
/* 17F0C0 802507E0 00000000 */ nop
/* 17F0C4 802507E4 24040009 */ addiu $a0, $zero, 0x9
/* 17F0C8 802507E8 0C051F9F */ jal set_window_update
/* 17F0CC 802507EC 24050002 */ addiu $a1, $zero, 0x2
/* 17F0D0 802507F0 3C018028 */ lui $at, %hi(bPopupMessage)
/* 17F0D4 802507F4 AC2038F8 */ sw $zero, %lo(bPopupMessage)($at)
/* 17F0D8 802507F8 0C093BE9 */ jal dro_02_pad_D_8024EFA4
/* 17F0DC 802507FC 0220202D */ daddu $a0, $s1, $zero
.L80250800:
/* 17F0E0 80250800 8FBF001C */ lw $ra, 0x1C($sp)
/* 17F0E4 80250804 8FB20018 */ lw $s2, 0x18($sp)
/* 17F0E8 80250808 8FB10014 */ lw $s1, 0x14($sp)
/* 17F0EC 8025080C 8FB00010 */ lw $s0, 0x10($sp)
D_80250810:
/* 17F0F0 80250810 03E00008 */ jr $ra
/* 17F0F4 80250814 27BD0020 */ addiu $sp, $sp, 0x20
### DECOMPILED C INSTRUCTIONS:
void btl_update_message_popup(void* data) {
PopupMessage* popup = data;
BattleStatus* battleStatus = &gBattleStatus;
s32 shouldDisposeWindow = FALSE;
s32 actionCommandMode;
switch (popup->messageIndex) {
case BTL_MSG_MERLEE_ATK_UP:
case BTL_MSG_MERLEE_DEF_UP:
case BTL_MSG_MERLEE_EXP_UP:
case BTL_MSG_MERLEE_DONE:
case BTL_MSG_CHARGE_HAMMER:
case BTL_MSG_CHARGE_HAMMER_MORE:
case BTL_MSG_CHARGE_JUMP:
case BTL_MSG_CHARGE_JUMP_MORE:
case BTL_MSG_CANT_CHARGE:
case BTL_MSG_ENEMY_MISSED:
case BTL_MSG_PLAYER_DAZED:
case BTL_MSG_PLAYER_ASLEEP:
case BTL_MSG_PLAYER_FROZEN:
case BTL_MSG_PLAYER_POISONED:
case BTL_MSG_PLAYER_SHRUNK:
case BTL_MSG_PLAYER_PARALYZED:
case BTL_MSG_PLAYER_CHARGED:
case BTL_MSG_PLAYER_TRANSPARENT:
case BTL_MSG_ENEMY_DAZED:
case BTL_MSG_ENEMY_ASLEEP:
case BTL_MSG_ENEMY_FROZEN:
case BTL_MSG_ENEMY_POISONED:
case BTL_MSG_ENEMY_SHRUNK:
case BTL_MSG_ENEMY_PARALYZED:
case BTL_MSG_ENEMY_ELECTRIFIED:
case BTL_MSG_ENEMY_CANT_MOVE:
case BTL_MSG_STAR_POWER_RECHARGED:
case BTL_MSG_STAR_POWER_MAXED:
case BTL_MSG_STAR_POWER_FILLED:
case BTL_MSG_ATTACK_UP:
case BTL_MSG_DEFENCE_UP:
case BTL_MSG_1F:
case BTL_MSG_20:
case BTL_MSG_ENEMY_TRANSPARENT:
case BTL_MSG_ENEMY_CHARGED:
case BTL_MSG_PARTNER_INJURED:
case BTL_MSG_CHARGE_GOOMBARIO:
case BTL_MSG_CHARGE_GOOMBARIO_MORE:
case BTL_MSG_WATER_BLOCK_BEGIN:
case BTL_MSG_WATER_BLOCK_END:
case BTL_MSG_CLOUD_NINE_BEGIN:
case BTL_MSG_CLOUD_NINE_END:
case BTL_MSG_TURBO_CHARGE_BEGIN:
case BTL_MSG_TURBO_CHARGE_END:
case BTL_MSG_CHILL_OUT_BEGIN:
case BTL_MSG_UNUSED_CLOUD_NINE:
case BTL_MSG_CANT_SWITCH:
case BTL_MSG_CANT_MOVE:
case BTL_MSG_CANT_SWITCH_UNUSED:
case BTL_MSG_CANT_MOVE_UNUSED:
case BTL_MSG_CANT_SELECT_NOW_ALT:
switch (popup->showMsgState) {
default:
break;
case 0:
popup->showMsgState = 1;
break;
case 1:
popup->showMsgState = 2;
break;
case 2:
if (battleStatus->currentButtonsPressed & (BUTTON_A | BUTTON_B)) {
popup->duration = 0;
}
if (popup->duration != 0) {
popup->duration--;
} else {
popup->showMsgState = 3;
}
break;
case 4:
shouldDisposeWindow = TRUE;
break;
case 3:
popup->showMsgState = 4;
break;
}
break;
// move action command tips
case BTL_MSG_ACTION_TIP_00:
case BTL_MSG_ACTION_TIP_01:
case BTL_MSG_ACTION_TIP_02:
case BTL_MSG_ACTION_TIP_03:
case BTL_MSG_ACTION_TIP_04:
case BTL_MSG_ACTION_TIP_05:
case BTL_MSG_ACTION_TIP_06:
case BTL_MSG_ACTION_TIP_07:
case BTL_MSG_ACTION_TIP_08:
case BTL_MSG_ACTION_TIP_09:
case BTL_MSG_ACTION_TIP_0A:
case BTL_MSG_ACTION_TIP_0B:
case BTL_MSG_ACTION_TIP_0C:
case BTL_MSG_ACTION_TIP_0D:
case BTL_MSG_ACTION_TIP_0E:
case BTL_MSG_ACTION_TIP_0F:
case BTL_MSG_ACTION_TIP_10:
case BTL_MSG_ACTION_TIP_11:
case BTL_MSG_ACTION_TIP_12:
case BTL_MSG_ACTION_TIP_13:
case BTL_MSG_ACTION_TIP_14:
actionCommandMode = battleStatus->actionCommandMode;
D_8029F64A = TRUE;
if (actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
D_8029F64A = FALSE;
shouldDisposeWindow = TRUE;
break;
}
switch (popup->showMsgState) {
case 0:
gBattleStatus.flags1 |= BS_FLAGS1_4000;
gBattleStatus.flags1 &= ~BS_FLAGS1_10000;
switch (popup->messageIndex) {
case BTL_MSG_ACTION_TIP_04:
D_8029F642 = hud_element_create(&HES_StickNeutral);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_ACTION_TIP_01:
D_8029F642 = hud_element_create(&HES_StickNeutral);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_TimingReady);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
break;
case BTL_MSG_ACTION_TIP_05:
D_8029F642 = hud_element_create(&HES_StickNeutral);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_AimTarget);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
hud_element_create_transform_B(D_8029F644);
break;
case BTL_MSG_ACTION_TIP_06:
D_8029F642 = hud_element_create(&HES_CUpButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_CDownButton);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
D_8029F646 = hud_element_create(&HES_CLeftButton);
hud_element_set_flags(D_8029F646, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F646, -100, -100);
D_8029F648 = hud_element_create(&HES_CRightButton);
hud_element_set_flags(D_8029F648, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F648, -100, -100);
break;
case BTL_MSG_ACTION_TIP_07:
D_8029F642 = hud_element_create(&HES_StickNeutral);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_ACTION_TIP_08:
D_8029F642 = hud_element_create(&HES_AButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_BButton);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
D_8029F646 = hud_element_create(&HES_CDownButton);
hud_element_set_flags(D_8029F646, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F646, -100, -100);
break;
case BTL_MSG_ACTION_TIP_09:
D_8029F642 = hud_element_create(&HES_StickNeutral);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_ACTION_TIP_0A:
D_8029F642 = hud_element_create(&HES_TimingReady);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_AButton);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
break;
case BTL_MSG_ACTION_TIP_0B:
D_8029F642 = hud_element_create(&HES_AButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_BButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_ACTION_TIP_0C:
D_8029F642 = hud_element_create(&HES_AButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_BButton);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
break;
case BTL_MSG_ACTION_TIP_0F:
D_8029F642 = hud_element_create(&HES_TimingReady);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_AButtonDown);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
break;
case BTL_MSG_ACTION_TIP_10:
D_8029F642 = hud_element_create(&HES_StickNeutral);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
D_8029F644 = hud_element_create(&HES_AimTarget);
hud_element_set_flags(D_8029F644, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F644, -100, -100);
hud_element_create_transform_B(D_8029F644);
D_8029F646 = hud_element_create(&HES_AimReticle);
hud_element_set_flags(D_8029F646, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F646, -100, -100);
hud_element_create_transform_B(D_8029F646);
break;
case BTL_MSG_ACTION_TIP_12:
case BTL_MSG_ACTION_TIP_13:
D_8029F642 = hud_element_create(&HES_AButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
// fallthrough
case BTL_MSG_ACTION_TIP_00:
case BTL_MSG_ACTION_TIP_02:
case BTL_MSG_ACTION_TIP_03:
case BTL_MSG_ACTION_TIP_0D:
case BTL_MSG_ACTION_TIP_0E:
case BTL_MSG_ACTION_TIP_11:
case BTL_MSG_ACTION_TIP_14:
D_8029F642 = hud_element_create(&HES_AButton);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
}
popup->showMsgState = 1;
break;
case 1:
if (gBattleStatus.flags1 & BS_FLAGS1_10000) {
gBattleStatus.flags1 &= ~BS_FLAGS1_4000;
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW_TRANSPARENT);
popup->duration = 0;
popup->showMsgState = 2;
} else if (!(gBattleStatus.flags1 & BS_FLAGS1_4000) && (actionCommandMode != ACTION_COMMAND_MODE_TUTORIAL)) {
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW_TRANSPARENT);
switch (popup->messageIndex) {
case BTL_MSG_ACTION_TIP_03:
hud_element_set_script(D_8029F642, &HES_MashAButton);
break;
case BTL_MSG_ACTION_TIP_04:
hud_element_set_script(D_8029F642, &HES_StickMashLeft);
break;
case BTL_MSG_ACTION_TIP_01:
hud_element_set_script(D_8029F642, &HES_StickTapLeft);
hud_element_set_script(D_8029F644, &HES_TimingBlink);
break;
case BTL_MSG_ACTION_TIP_05:
hud_element_set_script(D_8029F642, &HES_StickTapLeft);
hud_element_set_script(D_8029F644, &HES_AimTarget);
break;
case BTL_MSG_ACTION_TIP_06:
hud_element_set_script(D_8029F642, &HES_MashCUpButton);
hud_element_set_script(D_8029F644, &HES_MashCDownButton1);
hud_element_set_script(D_8029F646, &HES_MashCLeftButton);
hud_element_set_script(D_8029F648, &HES_MashCRightButton1);
break;
case BTL_MSG_ACTION_TIP_07:
hud_element_set_script(D_8029F642, &HES_StickBackAndForth);
break;
case BTL_MSG_ACTION_TIP_08:
hud_element_set_script(D_8029F642, &HES_PressAButton);
hud_element_set_script(D_8029F644, &HES_PressBButton);
hud_element_set_script(D_8029F646, &HES_PressCDownButton);
break;
case BTL_MSG_ACTION_TIP_09:
hud_element_set_script(D_8029F642, &HES_RotateStickCW);
break;
case BTL_MSG_ACTION_TIP_0A:
hud_element_set_script(D_8029F642, &HES_TimingBlink);
hud_element_set_script(D_8029F644, &HES_MashAButton);
break;
case BTL_MSG_ACTION_TIP_0B:
hud_element_set_script(D_8029F642, &HES_MashAButton);
hud_element_set_script(D_8029F644, &HES_MashBButton2);
break;
case BTL_MSG_ACTION_TIP_0C:
hud_element_set_script(D_8029F642, &HES_MashAButton);
hud_element_set_script(D_8029F644, &HES_MashBButton1);
break;
case BTL_MSG_ACTION_TIP_0D:
hud_element_set_script(D_8029F642, &HES_MashAButton);
break;
case BTL_MSG_ACTION_TIP_0F:
hud_element_set_script(D_8029F642, &HES_TimingBlink);
hud_element_set_script(D_8029F644, &HES_PressAButton);
break;
case BTL_MSG_ACTION_TIP_10:
hud_element_set_script(D_8029F642, &HES_StickTapRight);
break;
case BTL_MSG_ACTION_TIP_11:
hud_element_set_script(D_8029F642, &HES_MashAButton);
break;
case BTL_MSG_ACTION_TIP_12:
case BTL_MSG_ACTION_TIP_13:
hud_element_set_script(D_8029F642, &HES_PressAButton);
// fallthrough
case BTL_MSG_ACTION_TIP_00:
case BTL_MSG_ACTION_TIP_02:
case BTL_MSG_ACTION_TIP_0E:
case BTL_MSG_ACTION_TIP_14:
hud_element_set_script(D_8029F642, &HES_PressAButton);
break;
}
if (popup->duration != -1) {
popup->duration = 30;
}
popup->showMsgState = 2;
break;
}
break;
case 2:
if ((actionCommandMode != popup->showMsgState) || (gBattleStatus.flags1 & BS_FLAGS1_10000)) {
s16* duration;
if (D_8029F64E < 192) {
if (D_8029F64C == 0) {
D_8029F64E += 10;
if (D_8029F64E > 192) {
D_8029F64E = 192;
}
} else {
break;
}
}
gWindows[WINDOW_ID_BATTLE_POPUP].pos.y = D_8029F64E + D_8029F650;
duration = &popup->duration; // TODO required to match
if (*duration != -1) {
if (popup->duration != 0) {
popup->duration--;
} else {
switch (popup->messageIndex) {
case BTL_MSG_ACTION_TIP_00:
case BTL_MSG_ACTION_TIP_02:
case BTL_MSG_ACTION_TIP_03:
case BTL_MSG_ACTION_TIP_04:
case BTL_MSG_ACTION_TIP_07:
case BTL_MSG_ACTION_TIP_09:
case BTL_MSG_ACTION_TIP_0D:
case BTL_MSG_ACTION_TIP_0E:
case BTL_MSG_ACTION_TIP_11:
case BTL_MSG_ACTION_TIP_12:
case BTL_MSG_ACTION_TIP_13:
case BTL_MSG_ACTION_TIP_14:
hud_element_free(D_8029F642);
break;
case BTL_MSG_ACTION_TIP_01:
case BTL_MSG_ACTION_TIP_05:
case BTL_MSG_ACTION_TIP_0A:
case BTL_MSG_ACTION_TIP_0B:
case BTL_MSG_ACTION_TIP_0C:
case BTL_MSG_ACTION_TIP_0F:
hud_element_free(D_8029F642);
hud_element_free(D_8029F644);
break;
case BTL_MSG_ACTION_TIP_08:
case BTL_MSG_ACTION_TIP_10:
hud_element_free(D_8029F642);
hud_element_free(D_8029F644);
hud_element_free(D_8029F646);
break;
case BTL_MSG_ACTION_TIP_06:
hud_element_free(D_8029F642);
hud_element_free(D_8029F644);
hud_element_free(D_8029F646);
hud_element_free(D_8029F648);
break;
}
D_8029F64A = FALSE;
shouldDisposeWindow = TRUE;
}
}
}
break;
}
break;
case BTL_MSG_NO_JUMP_TARGET:
case BTL_MSG_NO_HAMMER_TARGET:
case BTL_MSG_NO_ITEM_TARGET:
case BTL_MSG_46:
case BTL_MSG_47:
case BTL_MSG_CANT_SELECT_NOW:
switch (popup->showMsgState) {
default:
break;
case 0:
popup->showMsgState = 1;
break;
case 1:
popup->showMsgState = 2;
break;
case 2:
if (battleStatus->currentButtonsPressed & (BUTTON_A | BUTTON_B)) {
popup->duration = 0;
}
if (popup->duration != 0) {
popup->duration--;
} else {
popup->showMsgState = 3;
}
break;
case 3:
popup->showMsgState = 4;
break;
case 4:
shouldDisposeWindow = TRUE;
break;
}
break;
case BTL_MSG_HAMMER_DISABLED_1:
case BTL_MSG_HAMMER_DISABLED_2:
case BTL_MSG_HAMMER_DISABLED_3:
case BTL_MSG_JUMP_DISABLED_1:
case BTL_MSG_JUMP_DISABLED_2:
case BTL_MSG_JUMP_DISABLED_3:
case BTL_MSG_ITEMS_DISABLED:
switch (popup->showMsgState) {
case 0:
switch (popup->messageIndex) {
case BTL_MSG_HAMMER_DISABLED_1:
D_8029F642 = hud_element_create(&HES_Item_Hammer1);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_HAMMER_DISABLED_2:
D_8029F642 = hud_element_create(&HES_Item_Hammer2);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_HAMMER_DISABLED_3:
D_8029F642 = hud_element_create(&HES_Item_Hammer3);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_JUMP_DISABLED_1:
D_8029F642 = hud_element_create(&HES_Item_Boots1);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_JUMP_DISABLED_2:
D_8029F642 = hud_element_create(&HES_Item_Boots2);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_JUMP_DISABLED_3:
D_8029F642 = hud_element_create(&HES_Item_Boots3);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
case BTL_MSG_ITEMS_DISABLED:
D_8029F642 = hud_element_create(&HES_Item_Items);
hud_element_set_flags(D_8029F642, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(D_8029F642, -100, -100);
break;
}
popup->showMsgState = 1;
break;
case 1:
if (popup->duration != 0) {
popup->duration--;
break;
}
shouldDisposeWindow = TRUE;
hud_element_free(D_8029F642);
break;
}
break;
}
if (shouldDisposeWindow) {
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE);
bPopupMessage = NULL;
free_popup(popup);
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel draw_all_status_icons
/* 219E0 800465E0 27BDFF88 */ addiu $sp, $sp, -0x78
/* 219E4 800465E4 3C08ED03 */ lui $t0, (0xED030050 >> 16)
/* 219E8 800465E8 35080050 */ ori $t0, $t0, (0xED030050 & 0xFFFF)
/* 219EC 800465EC 3C07004D */ lui $a3, (0x4D0370 >> 16)
/* 219F0 800465F0 34E70370 */ ori $a3, $a3, (0x4D0370 & 0xFFFF)
/* 219F4 800465F4 3C09E300 */ lui $t1, (0xE3000A01 >> 16)
/* 219F8 800465F8 35290A01 */ ori $t1, $t1, (0xE3000A01 & 0xFFFF)
/* 219FC 800465FC 3C0AE300 */ lui $t2, (0xE3000C00 >> 16)
/* 21A00 80046600 354A0C00 */ ori $t2, $t2, (0xE3000C00 & 0xFFFF)
/* 21A04 80046604 3C0BE300 */ lui $t3, (0xE3000F00 >> 16)
/* 21A08 80046608 356B0F00 */ ori $t3, $t3, (0xE3000F00 & 0xFFFF)
/* 21A0C 8004660C 3C0CE300 */ lui $t4, (0xE3000D01 >> 16)
/* 21A10 80046610 358C0D01 */ ori $t4, $t4, (0xE3000D01 & 0xFFFF)
/* 21A14 80046614 3C0DE300 */ lui $t5, (0xE3001402 >> 16)
/* 21A18 80046618 35AD1402 */ ori $t5, $t5, (0xE3001402 & 0xFFFF)
/* 21A1C 8004661C 3C0EE300 */ lui $t6, (0xE3001700 >> 16)
/* 21A20 80046620 35CE1700 */ ori $t6, $t6, (0xE3001700 & 0xFFFF)
/* 21A24 80046624 3C0FE200 */ lui $t7, (0xE2001E01 >> 16)
/* 21A28 80046628 35EF1E01 */ ori $t7, $t7, (0xE2001E01 & 0xFFFF)
/* 21A2C 8004662C AFB00040 */ sw $s0, 0x40($sp)
/* 21A30 80046630 3C10E300 */ lui $s0, (0xE3001801 >> 16)
/* 21A34 80046634 36101801 */ ori $s0, $s0, (0xE3001801 & 0xFFFF)
/* 21A38 80046638 AFB10044 */ sw $s1, 0x44($sp)
/* 21A3C 8004663C 3C11E300 */ lui $s1, (0xE3001A01 >> 16)
/* 21A40 80046640 36311A01 */ ori $s1, $s1, (0xE3001A01 & 0xFFFF)
/* 21A44 80046644 AFB20048 */ sw $s2, 0x48($sp)
/* 21A48 80046648 3C12D700 */ lui $s2, (0xD7000002 >> 16)
/* 21A4C 8004664C 36520002 */ ori $s2, $s2, (0xD7000002 & 0xFFFF)
/* 21A50 80046650 AFBE0060 */ sw $fp, 0x60($sp)
/* 21A54 80046654 241E0001 */ addiu $fp, $zero, 0x1
/* 21A58 80046658 AFB7005C */ sw $s7, 0x5C($sp)
/* 21A5C 8004665C 27B70028 */ addiu $s7, $sp, 0x28
/* 21A60 80046660 AFB60058 */ sw $s6, 0x58($sp)
/* 21A64 80046664 27B6002C */ addiu $s6, $sp, 0x2C
/* 21A68 80046668 AFB50054 */ sw $s5, 0x54($sp)
/* 21A6C 8004666C 27B50030 */ addiu $s5, $sp, 0x30
/* 21A70 80046670 3C05800A */ lui $a1, %hi(gMainGfxPos)
/* 21A74 80046674 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos)
/* 21A78 80046678 3C06800B */ lui $a2, %hi(gCameras)
/* 21A7C 8004667C 24C61D80 */ addiu $a2, $a2, %lo(gCameras)
/* 21A80 80046680 AFBF0064 */ sw $ra, 0x64($sp)
/* 21A84 80046684 AFB40050 */ sw $s4, 0x50($sp)
/* 21A88 80046688 AFB3004C */ sw $s3, 0x4C($sp)
/* 21A8C 8004668C F7B60070 */ sdc1 $f22, 0x70($sp)
/* 21A90 80046690 F7B40068 */ sdc1 $f20, 0x68($sp)
/* 21A94 80046694 AFA00038 */ sw $zero, 0x38($sp)
/* 21A98 80046698 8CA30000 */ lw $v1, 0x0($a1)
/* 21A9C 8004669C 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 21AA0 800466A0 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 21AA4 800466A4 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 21AA8 800466A8 4481B000 */ mtc1 $at, $f22
/* 21AAC 800466AC 00041080 */ sll $v0, $a0, 2
/* 21AB0 800466B0 00441021 */ addu $v0, $v0, $a0
/* 21AB4 800466B4 00021080 */ sll $v0, $v0, 2
/* 21AB8 800466B8 00441023 */ subu $v0, $v0, $a0
/* 21ABC 800466BC 000220C0 */ sll $a0, $v0, 3
/* 21AC0 800466C0 00441021 */ addu $v0, $v0, $a0
/* 21AC4 800466C4 000210C0 */ sll $v0, $v0, 3
/* 21AC8 800466C8 00461021 */ addu $v0, $v0, $a2
/* 21ACC 800466CC AFA20034 */ sw $v0, 0x34($sp)
/* 21AD0 800466D0 0060102D */ daddu $v0, $v1, $zero
/* 21AD4 800466D4 24630008 */ addiu $v1, $v1, 0x8
/* 21AD8 800466D8 ACA30000 */ sw $v1, 0x0($a1)
/* 21ADC 800466DC AC480000 */ sw $t0, 0x0($v0)
/* 21AE0 800466E0 AC470004 */ sw $a3, 0x4($v0)
/* 21AE4 800466E4 24620008 */ addiu $v0, $v1, 0x8
/* 21AE8 800466E8 ACA20000 */ sw $v0, 0x0($a1)
/* 21AEC 800466EC 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* 21AF0 800466F0 AC620000 */ sw $v0, 0x0($v1)
/* 21AF4 800466F4 24620010 */ addiu $v0, $v1, 0x10
/* 21AF8 800466F8 AC600004 */ sw $zero, 0x4($v1)
/* 21AFC 800466FC ACA20000 */ sw $v0, 0x0($a1)
/* 21B00 80046700 24620018 */ addiu $v0, $v1, 0x18
/* 21B04 80046704 AC690008 */ sw $t1, 0x8($v1)
/* 21B08 80046708 AC60000C */ sw $zero, 0xC($v1)
/* 21B0C 8004670C ACA20000 */ sw $v0, 0x0($a1)
/* 21B10 80046710 24620020 */ addiu $v0, $v1, 0x20
/* 21B14 80046714 AC6A0010 */ sw $t2, 0x10($v1)
/* 21B18 80046718 AC600014 */ sw $zero, 0x14($v1)
/* 21B1C 8004671C ACA20000 */ sw $v0, 0x0($a1)
/* 21B20 80046720 24620028 */ addiu $v0, $v1, 0x28
/* 21B24 80046724 AC6B0018 */ sw $t3, 0x18($v1)
/* 21B28 80046728 AC60001C */ sw $zero, 0x1C($v1)
/* 21B2C 8004672C ACA20000 */ sw $v0, 0x0($a1)
/* 21B30 80046730 24620030 */ addiu $v0, $v1, 0x30
/* 21B34 80046734 AC6C0020 */ sw $t4, 0x20($v1)
/* 21B38 80046738 AC600024 */ sw $zero, 0x24($v1)
/* 21B3C 8004673C ACA20000 */ sw $v0, 0x0($a1)
/* 21B40 80046740 24020C00 */ addiu $v0, $zero, 0xC00
/* 21B44 80046744 AC62002C */ sw $v0, 0x2C($v1)
/* 21B48 80046748 24620038 */ addiu $v0, $v1, 0x38
/* 21B4C 8004674C AC6D0028 */ sw $t5, 0x28($v1)
/* 21B50 80046750 ACA20000 */ sw $v0, 0x0($a1)
/* 21B54 80046754 24620040 */ addiu $v0, $v1, 0x40
/* 21B58 80046758 AC6E0030 */ sw $t6, 0x30($v1)
/* 21B5C 8004675C AC600034 */ sw $zero, 0x34($v1)
/* 21B60 80046760 ACA20000 */ sw $v0, 0x0($a1)
/* 21B64 80046764 24620048 */ addiu $v0, $v1, 0x48
/* 21B68 80046768 AC6F0038 */ sw $t7, 0x38($v1)
/* 21B6C 8004676C AC60003C */ sw $zero, 0x3C($v1)
/* 21B70 80046770 ACA20000 */ sw $v0, 0x0($a1)
/* 21B74 80046774 24620050 */ addiu $v0, $v1, 0x50
/* 21B78 80046778 AC600040 */ sw $zero, 0x40($v1)
/* 21B7C 8004677C AC600044 */ sw $zero, 0x44($v1)
/* 21B80 80046780 ACA20000 */ sw $v0, 0x0($a1)
/* 21B84 80046784 AC700048 */ sw $s0, 0x48($v1)
/* 21B88 80046788 3C14800A */ lui $s4, %hi(D_800A0F44)
/* 21B8C 8004678C 8E940F44 */ lw $s4, %lo(D_800A0F44)($s4)
/* 21B90 80046790 240200C0 */ addiu $v0, $zero, 0xC0
/* 21B94 80046794 AC62004C */ sw $v0, 0x4C($v1)
/* 21B98 80046798 24620058 */ addiu $v0, $v1, 0x58
/* 21B9C 8004679C ACA20000 */ sw $v0, 0x0($a1)
/* 21BA0 800467A0 24020030 */ addiu $v0, $zero, 0x30
/* 21BA4 800467A4 AC620054 */ sw $v0, 0x54($v1)
/* 21BA8 800467A8 24620060 */ addiu $v0, $v1, 0x60
/* 21BAC 800467AC AC710050 */ sw $s1, 0x50($v1)
/* 21BB0 800467B0 ACA20000 */ sw $v0, 0x0($a1)
/* 21BB4 800467B4 2402FFFF */ addiu $v0, $zero, -0x1
/* 21BB8 800467B8 AC720058 */ sw $s2, 0x58($v1)
/* 21BBC 800467BC AC62005C */ sw $v0, 0x5C($v1)
/* 21BC0 800467C0 269100AC */ addiu $s1, $s4, 0xAC
.L800467C4:
/* 21BC4 800467C4 8E830000 */ lw $v1, 0x0($s4)
/* 21BC8 800467C8 5060037B */ beql $v1, $zero, .L800475B8
/* 21BCC 800467CC 263100B0 */ addiu $s1, $s1, 0xB0
/* 21BD0 800467D0 0000902D */ daddu $s2, $zero, $zero
/* 21BD4 800467D4 8222FF8E */ lb $v0, -0x72($s1)
/* 21BD8 800467D8 24180002 */ addiu $t8, $zero, 0x2
/* 21BDC 800467DC 1458003C */ bne $v0, $t8, .L800468D0
/* 21BE0 800467E0 0240982D */ daddu $s3, $s2, $zero
/* 21BE4 800467E4 30620004 */ andi $v0, $v1, 0x4
/* 21BE8 800467E8 10400006 */ beqz $v0, .L80046804
/* 21BEC 800467EC 30620002 */ andi $v0, $v1, 0x2
/* 21BF0 800467F0 8E24FF94 */ lw $a0, -0x6C($s1)
/* 21BF4 800467F4 0C051280 */ jal hud_element_set_flags
/* 21BF8 800467F8 0300282D */ daddu $a1, $t8, $zero
/* 21BFC 800467FC 08011A34 */ j .L800468D0
/* 21C00 80046800 00000000 */ nop
.L80046804:
/* 21C04 80046804 14400006 */ bnez $v0, .L80046820
/* 21C08 80046808 00000000 */ nop
/* 21C0C 8004680C 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 21C10 80046810 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 21C14 80046814 80420070 */ lb $v0, 0x70($v0)
/* 21C18 80046818 105E002D */ beq $v0, $fp, .L800468D0
/* 21C1C 8004681C 00000000 */ nop
.L80046820:
/* 21C20 80046820 8E24FF94 */ lw $a0, -0x6C($s1)
/* 21C24 80046824 0C05128B */ jal hud_element_clear_flags
/* 21C28 80046828 24050002 */ addiu $a1, $zero, 0x2
/* 21C2C 8004682C C620FF68 */ lwc1 $f0, -0x98($s1)
/* 21C30 80046830 46800020 */ cvt.s.w $f0, $f0
/* 21C34 80046834 C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 21C38 80046838 8FB80034 */ lw $t8, 0x34($sp)
/* 21C3C 8004683C 46001500 */ add.s $f20, $f2, $f0
/* 21C40 80046840 C622FF58 */ lwc1 $f2, -0xA8($s1)
/* 21C44 80046844 C70C006C */ lwc1 $f12, 0x6C($t8)
/* 21C48 80046848 C620FF60 */ lwc1 $f0, -0xA0($s1)
/* 21C4C 8004684C 46166300 */ add.s $f12, $f12, $f22
/* 21C50 80046850 E7A20020 */ swc1 $f2, 0x20($sp)
/* 21C54 80046854 0C00A6C9 */ jal clamp_angle
/* 21C58 80046858 E7A00024 */ swc1 $f0, 0x24($sp)
/* 21C5C 8004685C 27A40020 */ addiu $a0, $sp, 0x20
/* 21C60 80046860 C626FF64 */ lwc1 $f6, -0x9C($s1)
/* 21C64 80046864 468031A0 */ cvt.s.w $f6, $f6
/* 21C68 80046868 44070000 */ mfc1 $a3, $f0
/* 21C6C 8004686C 44063000 */ mfc1 $a2, $f6
/* 21C70 80046870 0C00A7E7 */ jal add_vec2D_polar
/* 21C74 80046874 27A50024 */ addiu $a1, $sp, 0x24
/* 21C78 80046878 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 21C7C 8004687C 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 21C80 80046880 4406A000 */ mfc1 $a2, $f20
/* 21C84 80046884 C7A00020 */ lwc1 $f0, 0x20($sp)
/* 21C88 80046888 C7A20024 */ lwc1 $f2, 0x24($sp)
/* 21C8C 8004688C 44050000 */ mfc1 $a1, $f0
/* 21C90 80046890 44071000 */ mfc1 $a3, $f2
/* 21C94 80046894 24120001 */ addiu $s2, $zero, 0x1
/* 21C98 80046898 AFB70010 */ sw $s7, 0x10($sp)
/* 21C9C 8004689C AFB60014 */ sw $s6, 0x14($sp)
/* 21CA0 800468A0 0C00B94E */ jal get_screen_coords
/* 21CA4 800468A4 AFB50018 */ sw $s5, 0x18($sp)
/* 21CA8 800468A8 0240982D */ daddu $s3, $s2, $zero
/* 21CAC 800468AC 8E30FF94 */ lw $s0, -0x6C($s1)
/* 21CB0 800468B0 8FA50028 */ lw $a1, 0x28($sp)
/* 21CB4 800468B4 8FA6002C */ lw $a2, 0x2C($sp)
/* 21CB8 800468B8 0200202D */ daddu $a0, $s0, $zero
/* 21CBC 800468BC 24A5FFF8 */ addiu $a1, $a1, -0x8
/* 21CC0 800468C0 0C051261 */ jal hud_element_set_render_pos
/* 21CC4 800468C4 24C6FFF8 */ addiu $a2, $a2, -0x8
/* 21CC8 800468C8 0C0511F1 */ jal hud_element_draw_next
/* 21CCC 800468CC 0200202D */ daddu $a0, $s0, $zero
.L800468D0:
/* 21CD0 800468D0 8222FF8F */ lb $v0, -0x71($s1)
/* 21CD4 800468D4 24180002 */ addiu $t8, $zero, 0x2
/* 21CD8 800468D8 14580036 */ bne $v0, $t8, .L800469B4
/* 21CDC 800468DC 00000000 */ nop
/* 21CE0 800468E0 8E820000 */ lw $v0, 0x0($s4)
/* 21CE4 800468E4 00581024 */ and $v0, $v0, $t8
/* 21CE8 800468E8 14400006 */ bnez $v0, .L80046904
/* 21CEC 800468EC 00000000 */ nop
/* 21CF0 800468F0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 21CF4 800468F4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 21CF8 800468F8 80420070 */ lb $v0, 0x70($v0)
/* 21CFC 800468FC 105E002D */ beq $v0, $fp, .L800469B4
/* 21D00 80046900 00000000 */ nop
.L80046904:
/* 21D04 80046904 8E24FF98 */ lw $a0, -0x68($s1)
/* 21D08 80046908 0C05128B */ jal hud_element_clear_flags
/* 21D0C 8004690C 24050002 */ addiu $a1, $zero, 0x2
/* 21D10 80046910 52600001 */ beql $s3, $zero, .L80046918
/* 21D14 80046914 26520001 */ addiu $s2, $s2, 0x1
.L80046918:
/* 21D18 80046918 C620FF68 */ lwc1 $f0, -0x98($s1)
/* 21D1C 8004691C 46800020 */ cvt.s.w $f0, $f0
/* 21D20 80046920 C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 21D24 80046924 8FB80034 */ lw $t8, 0x34($sp)
/* 21D28 80046928 46001500 */ add.s $f20, $f2, $f0
/* 21D2C 8004692C C622FF58 */ lwc1 $f2, -0xA8($s1)
/* 21D30 80046930 C70C006C */ lwc1 $f12, 0x6C($t8)
/* 21D34 80046934 C620FF60 */ lwc1 $f0, -0xA0($s1)
/* 21D38 80046938 46166300 */ add.s $f12, $f12, $f22
/* 21D3C 8004693C E7A20020 */ swc1 $f2, 0x20($sp)
/* 21D40 80046940 0C00A6C9 */ jal clamp_angle
/* 21D44 80046944 E7A00024 */ swc1 $f0, 0x24($sp)
/* 21D48 80046948 27A40020 */ addiu $a0, $sp, 0x20
/* 21D4C 8004694C C626FF64 */ lwc1 $f6, -0x9C($s1)
/* 21D50 80046950 468031A0 */ cvt.s.w $f6, $f6
/* 21D54 80046954 44070000 */ mfc1 $a3, $f0
/* 21D58 80046958 44063000 */ mfc1 $a2, $f6
/* 21D5C 8004695C 0C00A7E7 */ jal add_vec2D_polar
/* 21D60 80046960 27A50024 */ addiu $a1, $sp, 0x24
/* 21D64 80046964 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 21D68 80046968 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 21D6C 8004696C 4406A000 */ mfc1 $a2, $f20
/* 21D70 80046970 C7A00020 */ lwc1 $f0, 0x20($sp)
/* 21D74 80046974 C7A20024 */ lwc1 $f2, 0x24($sp)
/* 21D78 80046978 44050000 */ mfc1 $a1, $f0
/* 21D7C 8004697C 44071000 */ mfc1 $a3, $f2
/* 21D80 80046980 AFB70010 */ sw $s7, 0x10($sp)
/* 21D84 80046984 AFB60014 */ sw $s6, 0x14($sp)
/* 21D88 80046988 0C00B94E */ jal get_screen_coords
/* 21D8C 8004698C AFB50018 */ sw $s5, 0x18($sp)
/* 21D90 80046990 8E30FF98 */ lw $s0, -0x68($s1)
/* 21D94 80046994 8FA50028 */ lw $a1, 0x28($sp)
/* 21D98 80046998 8FA6002C */ lw $a2, 0x2C($sp)
/* 21D9C 8004699C 0200202D */ daddu $a0, $s0, $zero
/* 21DA0 800469A0 24A5FFF8 */ addiu $a1, $a1, -0x8
/* 21DA4 800469A4 0C051261 */ jal hud_element_set_render_pos
/* 21DA8 800469A8 24C6FFF8 */ addiu $a2, $a2, -0x8
/* 21DAC 800469AC 0C0511F1 */ jal hud_element_draw_next
/* 21DB0 800469B0 0200202D */ daddu $a0, $s0, $zero
.L800469B4:
/* 21DB4 800469B4 8222FF9E */ lb $v0, -0x62($s1)
/* 21DB8 800469B8 24180002 */ addiu $t8, $zero, 0x2
/* 21DBC 800469BC 14580044 */ bne $v0, $t8, .L80046AD0
/* 21DC0 800469C0 0000982D */ daddu $s3, $zero, $zero
/* 21DC4 800469C4 8E830000 */ lw $v1, 0x0($s4)
/* 21DC8 800469C8 30620008 */ andi $v0, $v1, 0x8
/* 21DCC 800469CC 10400006 */ beqz $v0, .L800469E8
/* 21DD0 800469D0 30620002 */ andi $v0, $v1, 0x2
/* 21DD4 800469D4 8E24FFA4 */ lw $a0, -0x5C($s1)
/* 21DD8 800469D8 0C051280 */ jal hud_element_set_flags
/* 21DDC 800469DC 0300282D */ daddu $a1, $t8, $zero
/* 21DE0 800469E0 08011AB4 */ j .L80046AD0
/* 21DE4 800469E4 00000000 */ nop
.L800469E8:
/* 21DE8 800469E8 14400006 */ bnez $v0, .L80046A04
/* 21DEC 800469EC 00000000 */ nop
/* 21DF0 800469F0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 21DF4 800469F4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 21DF8 800469F8 80420070 */ lb $v0, 0x70($v0)
/* 21DFC 800469FC 105E0034 */ beq $v0, $fp, .L80046AD0
/* 21E00 80046A00 00000000 */ nop
.L80046A04:
/* 21E04 80046A04 8E24FFA4 */ lw $a0, -0x5C($s1)
/* 21E08 80046A08 0C05128B */ jal hud_element_clear_flags
/* 21E0C 80046A0C 24050002 */ addiu $a1, $zero, 0x2
/* 21E10 80046A10 16400002 */ bnez $s2, .L80046A1C
/* 21E14 80046A14 0000102D */ daddu $v0, $zero, $zero
/* 21E18 80046A18 2402FFEF */ addiu $v0, $zero, -0x11
.L80046A1C:
/* 21E1C 80046A1C 8FB80034 */ lw $t8, 0x34($sp)
/* 21E20 80046A20 C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 21E24 80046A24 C70C006C */ lwc1 $f12, 0x6C($t8)
/* 21E28 80046A28 E7A00020 */ swc1 $f0, 0x20($sp)
/* 21E2C 80046A2C C624FF70 */ lwc1 $f4, -0x90($s1)
/* 21E30 80046A30 46802120 */ cvt.s.w $f4, $f4
/* 21E34 80046A34 46166300 */ add.s $f12, $f12, $f22
/* 21E38 80046A38 C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 21E3C 80046A3C C620FF60 */ lwc1 $f0, -0xA0($s1)
/* 21E40 80046A40 46041080 */ add.s $f2, $f2, $f4
/* 21E44 80046A44 E7A00024 */ swc1 $f0, 0x24($sp)
/* 21E48 80046A48 44820000 */ mtc1 $v0, $f0
/* 21E4C 80046A4C 00000000 */ nop
/* 21E50 80046A50 46800020 */ cvt.s.w $f0, $f0
/* 21E54 80046A54 0C00A6C9 */ jal clamp_angle
/* 21E58 80046A58 46001500 */ add.s $f20, $f2, $f0
/* 21E5C 80046A5C 27A40020 */ addiu $a0, $sp, 0x20
/* 21E60 80046A60 C626FF6C */ lwc1 $f6, -0x94($s1)
/* 21E64 80046A64 468031A0 */ cvt.s.w $f6, $f6
/* 21E68 80046A68 44070000 */ mfc1 $a3, $f0
/* 21E6C 80046A6C 44063000 */ mfc1 $a2, $f6
/* 21E70 80046A70 0C00A7E7 */ jal add_vec2D_polar
/* 21E74 80046A74 27A50024 */ addiu $a1, $sp, 0x24
/* 21E78 80046A78 C7A00020 */ lwc1 $f0, 0x20($sp)
/* 21E7C 80046A7C 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 21E80 80046A80 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 21E84 80046A84 44050000 */ mfc1 $a1, $f0
/* 21E88 80046A88 C7A00024 */ lwc1 $f0, 0x24($sp)
/* 21E8C 80046A8C 4406A000 */ mfc1 $a2, $f20
/* 21E90 80046A90 44070000 */ mfc1 $a3, $f0
/* 21E94 80046A94 26520001 */ addiu $s2, $s2, 0x1
/* 21E98 80046A98 AFB70010 */ sw $s7, 0x10($sp)
/* 21E9C 80046A9C AFB60014 */ sw $s6, 0x14($sp)
/* 21EA0 80046AA0 0C00B94E */ jal get_screen_coords
/* 21EA4 80046AA4 AFB50018 */ sw $s5, 0x18($sp)
/* 21EA8 80046AA8 24130001 */ addiu $s3, $zero, 0x1
/* 21EAC 80046AAC 8E30FFA4 */ lw $s0, -0x5C($s1)
/* 21EB0 80046AB0 8FA50028 */ lw $a1, 0x28($sp)
/* 21EB4 80046AB4 8FA6002C */ lw $a2, 0x2C($sp)
/* 21EB8 80046AB8 0200202D */ daddu $a0, $s0, $zero
/* 21EBC 80046ABC 24A5FFF8 */ addiu $a1, $a1, -0x8
/* 21EC0 80046AC0 0C051261 */ jal hud_element_set_render_pos
/* 21EC4 80046AC4 24C6FFF8 */ addiu $a2, $a2, -0x8
/* 21EC8 80046AC8 0C0511F1 */ jal hud_element_draw_next
/* 21ECC 80046ACC 0200202D */ daddu $a0, $s0, $zero
.L80046AD0:
/* 21ED0 80046AD0 8222FF9F */ lb $v0, -0x61($s1)
/* 21ED4 80046AD4 24180002 */ addiu $t8, $zero, 0x2
/* 21ED8 80046AD8 1458003D */ bne $v0, $t8, .L80046BD0
/* 21EDC 80046ADC 00000000 */ nop
/* 21EE0 80046AE0 8E820000 */ lw $v0, 0x0($s4)
/* 21EE4 80046AE4 00581024 */ and $v0, $v0, $t8
/* 21EE8 80046AE8 14400006 */ bnez $v0, .L80046B04
/* 21EEC 80046AEC 00000000 */ nop
/* 21EF0 80046AF0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 21EF4 80046AF4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 21EF8 80046AF8 80420070 */ lb $v0, 0x70($v0)
/* 21EFC 80046AFC 105E0034 */ beq $v0, $fp, .L80046BD0
/* 21F00 80046B00 00000000 */ nop
.L80046B04:
/* 21F04 80046B04 8E24FFA8 */ lw $a0, -0x58($s1)
/* 21F08 80046B08 0C05128B */ jal hud_element_clear_flags
/* 21F0C 80046B0C 24050002 */ addiu $a1, $zero, 0x2
/* 21F10 80046B10 16400002 */ bnez $s2, .L80046B1C
/* 21F14 80046B14 0000102D */ daddu $v0, $zero, $zero
/* 21F18 80046B18 2402FFEF */ addiu $v0, $zero, -0x11
.L80046B1C:
/* 21F1C 80046B1C 52600001 */ beql $s3, $zero, .L80046B24
/* 21F20 80046B20 26520001 */ addiu $s2, $s2, 0x1
.L80046B24:
/* 21F24 80046B24 8FB80034 */ lw $t8, 0x34($sp)
/* 21F28 80046B28 C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 21F2C 80046B2C C70C006C */ lwc1 $f12, 0x6C($t8)
/* 21F30 80046B30 E7A00020 */ swc1 $f0, 0x20($sp)
/* 21F34 80046B34 C624FF70 */ lwc1 $f4, -0x90($s1)
/* 21F38 80046B38 46802120 */ cvt.s.w $f4, $f4
/* 21F3C 80046B3C 46166300 */ add.s $f12, $f12, $f22
/* 21F40 80046B40 C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 21F44 80046B44 C620FF60 */ lwc1 $f0, -0xA0($s1)
/* 21F48 80046B48 46041080 */ add.s $f2, $f2, $f4
/* 21F4C 80046B4C E7A00024 */ swc1 $f0, 0x24($sp)
/* 21F50 80046B50 44820000 */ mtc1 $v0, $f0
/* 21F54 80046B54 00000000 */ nop
/* 21F58 80046B58 46800020 */ cvt.s.w $f0, $f0
/* 21F5C 80046B5C 0C00A6C9 */ jal clamp_angle
/* 21F60 80046B60 46001500 */ add.s $f20, $f2, $f0
/* 21F64 80046B64 27A40020 */ addiu $a0, $sp, 0x20
/* 21F68 80046B68 C626FF6C */ lwc1 $f6, -0x94($s1)
/* 21F6C 80046B6C 468031A0 */ cvt.s.w $f6, $f6
/* 21F70 80046B70 44070000 */ mfc1 $a3, $f0
/* 21F74 80046B74 44063000 */ mfc1 $a2, $f6
/* 21F78 80046B78 0C00A7E7 */ jal add_vec2D_polar
/* 21F7C 80046B7C 27A50024 */ addiu $a1, $sp, 0x24
/* 21F80 80046B80 C7A00020 */ lwc1 $f0, 0x20($sp)
/* 21F84 80046B84 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 21F88 80046B88 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 21F8C 80046B8C 44050000 */ mfc1 $a1, $f0
/* 21F90 80046B90 C7A00024 */ lwc1 $f0, 0x24($sp)
/* 21F94 80046B94 4406A000 */ mfc1 $a2, $f20
/* 21F98 80046B98 44070000 */ mfc1 $a3, $f0
/* 21F9C 80046B9C AFB70010 */ sw $s7, 0x10($sp)
/* 21FA0 80046BA0 AFB60014 */ sw $s6, 0x14($sp)
/* 21FA4 80046BA4 0C00B94E */ jal get_screen_coords
/* 21FA8 80046BA8 AFB50018 */ sw $s5, 0x18($sp)
/* 21FAC 80046BAC 8E30FFA8 */ lw $s0, -0x58($s1)
/* 21FB0 80046BB0 8FA50028 */ lw $a1, 0x28($sp)
/* 21FB4 80046BB4 8FA6002C */ lw $a2, 0x2C($sp)
/* 21FB8 80046BB8 0200202D */ daddu $a0, $s0, $zero
/* 21FBC 80046BBC 24A5FFF8 */ addiu $a1, $a1, -0x8
/* 21FC0 80046BC0 0C051261 */ jal hud_element_set_render_pos
/* 21FC4 80046BC4 24C6FFF8 */ addiu $a2, $a2, -0x8
/* 21FC8 80046BC8 0C0511F1 */ jal hud_element_draw_next
/* 21FCC 80046BCC 0200202D */ daddu $a0, $s0, $zero
.L80046BD0:
/* 21FD0 80046BD0 8222FFAE */ lb $v0, -0x52($s1)
/* 21FD4 80046BD4 24180002 */ addiu $t8, $zero, 0x2
/* 21FD8 80046BD8 14580046 */ bne $v0, $t8, .L80046CF4
/* 21FDC 80046BDC 0000982D */ daddu $s3, $zero, $zero
/* 21FE0 80046BE0 8E830000 */ lw $v1, 0x0($s4)
/* 21FE4 80046BE4 30620010 */ andi $v0, $v1, 0x10
/* 21FE8 80046BE8 10400006 */ beqz $v0, .L80046C04
/* 21FEC 80046BEC 30620002 */ andi $v0, $v1, 0x2
/* 21FF0 80046BF0 8E24FFB4 */ lw $a0, -0x4C($s1)
/* 21FF4 80046BF4 0C051280 */ jal hud_element_set_flags
/* 21FF8 80046BF8 0300282D */ daddu $a1, $t8, $zero
/* 21FFC 80046BFC 08011B3D */ j .L80046CF4
/* 22000 80046C00 00000000 */ nop
.L80046C04:
/* 22004 80046C04 14400006 */ bnez $v0, .L80046C20
/* 22008 80046C08 00000000 */ nop
/* 2200C 80046C0C 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 22010 80046C10 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 22014 80046C14 80420070 */ lb $v0, 0x70($v0)
/* 22018 80046C18 105E0036 */ beq $v0, $fp, .L80046CF4
/* 2201C 80046C1C 00000000 */ nop
.L80046C20:
/* 22020 80046C20 8E24FFB4 */ lw $a0, -0x4C($s1)
/* 22024 80046C24 0C05128B */ jal hud_element_clear_flags
/* 22028 80046C28 24050002 */ addiu $a1, $zero, 0x2
/* 2202C 80046C2C 165E0002 */ bne $s2, $fp, .L80046C38
/* 22030 80046C30 0000102D */ daddu $v0, $zero, $zero
/* 22034 80046C34 2402FFEF */ addiu $v0, $zero, -0x11
.L80046C38:
/* 22038 80046C38 52400001 */ beql $s2, $zero, .L80046C40
/* 2203C 80046C3C 2402FFDE */ addiu $v0, $zero, -0x22
.L80046C40:
/* 22040 80046C40 8FB80034 */ lw $t8, 0x34($sp)
/* 22044 80046C44 C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 22048 80046C48 C70C006C */ lwc1 $f12, 0x6C($t8)
/* 2204C 80046C4C E7A00020 */ swc1 $f0, 0x20($sp)
/* 22050 80046C50 C624FF78 */ lwc1 $f4, -0x88($s1)
/* 22054 80046C54 46802120 */ cvt.s.w $f4, $f4
/* 22058 80046C58 46166300 */ add.s $f12, $f12, $f22
/* 2205C 80046C5C C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 22060 80046C60 C620FF60 */ lwc1 $f0, -0xA0($s1)
/* 22064 80046C64 46041080 */ add.s $f2, $f2, $f4
/* 22068 80046C68 E7A00024 */ swc1 $f0, 0x24($sp)
/* 2206C 80046C6C 44820000 */ mtc1 $v0, $f0
/* 22070 80046C70 00000000 */ nop
/* 22074 80046C74 46800020 */ cvt.s.w $f0, $f0
/* 22078 80046C78 0C00A6C9 */ jal clamp_angle
/* 2207C 80046C7C 46001500 */ add.s $f20, $f2, $f0
/* 22080 80046C80 27A40020 */ addiu $a0, $sp, 0x20
/* 22084 80046C84 C626FF74 */ lwc1 $f6, -0x8C($s1)
/* 22088 80046C88 468031A0 */ cvt.s.w $f6, $f6
/* 2208C 80046C8C 44070000 */ mfc1 $a3, $f0
/* 22090 80046C90 44063000 */ mfc1 $a2, $f6
/* 22094 80046C94 0C00A7E7 */ jal add_vec2D_polar
/* 22098 80046C98 27A50024 */ addiu $a1, $sp, 0x24
/* 2209C 80046C9C C7A00020 */ lwc1 $f0, 0x20($sp)
/* 220A0 80046CA0 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 220A4 80046CA4 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 220A8 80046CA8 44050000 */ mfc1 $a1, $f0
/* 220AC 80046CAC C7A00024 */ lwc1 $f0, 0x24($sp)
/* 220B0 80046CB0 4406A000 */ mfc1 $a2, $f20
/* 220B4 80046CB4 44070000 */ mfc1 $a3, $f0
/* 220B8 80046CB8 26520001 */ addiu $s2, $s2, 0x1
/* 220BC 80046CBC AFB70010 */ sw $s7, 0x10($sp)
/* 220C0 80046CC0 AFB60014 */ sw $s6, 0x14($sp)
/* 220C4 80046CC4 0C00B94E */ jal get_screen_coords
/* 220C8 80046CC8 AFB50018 */ sw $s5, 0x18($sp)
/* 220CC 80046CCC 24130001 */ addiu $s3, $zero, 0x1
/* 220D0 80046CD0 8E30FFB4 */ lw $s0, -0x4C($s1)
/* 220D4 80046CD4 8FA50028 */ lw $a1, 0x28($sp)
/* 220D8 80046CD8 8FA6002C */ lw $a2, 0x2C($sp)
/* 220DC 80046CDC 0200202D */ daddu $a0, $s0, $zero
/* 220E0 80046CE0 24A5FFF8 */ addiu $a1, $a1, -0x8
/* 220E4 80046CE4 0C051261 */ jal hud_element_set_render_pos
/* 220E8 80046CE8 24C6FFF8 */ addiu $a2, $a2, -0x8
/* 220EC 80046CEC 0C0511F1 */ jal hud_element_draw_next
/* 220F0 80046CF0 0200202D */ daddu $a0, $s0, $zero
.L80046CF4:
/* 220F4 80046CF4 8222FFAF */ lb $v0, -0x51($s1)
/* 220F8 80046CF8 24180002 */ addiu $t8, $zero, 0x2
/* 220FC 80046CFC 1458003F */ bne $v0, $t8, .L80046DFC
/* 22100 80046D00 00000000 */ nop
/* 22104 80046D04 8E820000 */ lw $v0, 0x0($s4)
/* 22108 80046D08 00581024 */ and $v0, $v0, $t8
/* 2210C 80046D0C 14400006 */ bnez $v0, .L80046D28
/* 22110 80046D10 00000000 */ nop
/* 22114 80046D14 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 22118 80046D18 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 2211C 80046D1C 80420070 */ lb $v0, 0x70($v0)
/* 22120 80046D20 105E0036 */ beq $v0, $fp, .L80046DFC
/* 22124 80046D24 00000000 */ nop
.L80046D28:
/* 22128 80046D28 8E24FFB8 */ lw $a0, -0x48($s1)
/* 2212C 80046D2C 0C05128B */ jal hud_element_clear_flags
/* 22130 80046D30 24050002 */ addiu $a1, $zero, 0x2
/* 22134 80046D34 165E0002 */ bne $s2, $fp, .L80046D40
/* 22138 80046D38 0000102D */ daddu $v0, $zero, $zero
/* 2213C 80046D3C 2402FFEF */ addiu $v0, $zero, -0x11
.L80046D40:
/* 22140 80046D40 52400001 */ beql $s2, $zero, .L80046D48
/* 22144 80046D44 2402FFDE */ addiu $v0, $zero, -0x22
.L80046D48:
/* 22148 80046D48 52600001 */ beql $s3, $zero, .L80046D50
/* 2214C 80046D4C 26520001 */ addiu $s2, $s2, 0x1
.L80046D50:
/* 22150 80046D50 8FB80034 */ lw $t8, 0x34($sp)
/* 22154 80046D54 C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 22158 80046D58 C70C006C */ lwc1 $f12, 0x6C($t8)
/* 2215C 80046D5C E7A00020 */ swc1 $f0, 0x20($sp)
/* 22160 80046D60 C624FF78 */ lwc1 $f4, -0x88($s1)
/* 22164 80046D64 46802120 */ cvt.s.w $f4, $f4
/* 22168 80046D68 46166300 */ add.s $f12, $f12, $f22
/* 2216C 80046D6C C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 22170 80046D70 C620FF60 */ lwc1 $f0, -0xA0($s1)
/* 22174 80046D74 46041080 */ add.s $f2, $f2, $f4
/* 22178 80046D78 E7A00024 */ swc1 $f0, 0x24($sp)
/* 2217C 80046D7C 44820000 */ mtc1 $v0, $f0
/* 22180 80046D80 00000000 */ nop
/* 22184 80046D84 46800020 */ cvt.s.w $f0, $f0
/* 22188 80046D88 0C00A6C9 */ jal clamp_angle
/* 2218C 80046D8C 46001500 */ add.s $f20, $f2, $f0
/* 22190 80046D90 27A40020 */ addiu $a0, $sp, 0x20
/* 22194 80046D94 C626FF74 */ lwc1 $f6, -0x8C($s1)
/* 22198 80046D98 468031A0 */ cvt.s.w $f6, $f6
/* 2219C 80046D9C 44070000 */ mfc1 $a3, $f0
/* 221A0 80046DA0 44063000 */ mfc1 $a2, $f6
/* 221A4 80046DA4 0C00A7E7 */ jal add_vec2D_polar
/* 221A8 80046DA8 27A50024 */ addiu $a1, $sp, 0x24
/* 221AC 80046DAC C7A00020 */ lwc1 $f0, 0x20($sp)
/* 221B0 80046DB0 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 221B4 80046DB4 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 221B8 80046DB8 44050000 */ mfc1 $a1, $f0
/* 221BC 80046DBC C7A00024 */ lwc1 $f0, 0x24($sp)
/* 221C0 80046DC0 4406A000 */ mfc1 $a2, $f20
/* 221C4 80046DC4 44070000 */ mfc1 $a3, $f0
/* 221C8 80046DC8 AFB70010 */ sw $s7, 0x10($sp)
/* 221CC 80046DCC AFB60014 */ sw $s6, 0x14($sp)
/* 221D0 80046DD0 0C00B94E */ jal get_screen_coords
/* 221D4 80046DD4 AFB50018 */ sw $s5, 0x18($sp)
/* 221D8 80046DD8 8E30FFB8 */ lw $s0, -0x48($s1)
/* 221DC 80046DDC 8FA50028 */ lw $a1, 0x28($sp)
/* 221E0 80046DE0 8FA6002C */ lw $a2, 0x2C($sp)
/* 221E4 80046DE4 0200202D */ daddu $a0, $s0, $zero
/* 221E8 80046DE8 24A5FFF8 */ addiu $a1, $a1, -0x8
/* 221EC 80046DEC 0C051261 */ jal hud_element_set_render_pos
/* 221F0 80046DF0 24C6FFF8 */ addiu $a2, $a2, -0x8
/* 221F4 80046DF4 0C0511F1 */ jal hud_element_draw_next
/* 221F8 80046DF8 0200202D */ daddu $a0, $s0, $zero
.L80046DFC:
/* 221FC 80046DFC 8222FFBE */ lb $v0, -0x42($s1)
/* 22200 80046E00 24180002 */ addiu $t8, $zero, 0x2
/* 22204 80046E04 14580067 */ bne $v0, $t8, .L80046FA4
/* 22208 80046E08 0000982D */ daddu $s3, $zero, $zero
/* 2220C 80046E0C 8E830000 */ lw $v1, 0x0($s4)
/* 22210 80046E10 30620020 */ andi $v0, $v1, 0x20
/* 22214 80046E14 10400024 */ beqz $v0, .L80046EA8
/* 22218 80046E18 30620002 */ andi $v0, $v1, 0x2
/* 2221C 80046E1C 8E24FFC4 */ lw $a0, -0x3C($s1)
/* 22220 80046E20 0C051280 */ jal hud_element_set_flags
/* 22224 80046E24 0300282D */ daddu $a1, $t8, $zero
/* 22228 80046E28 08011BE9 */ j .L80046FA4
/* 2222C 80046E2C 00000000 */ nop
.L80046E30:
/* 22230 80046E30 8E24FFD0 */ lw $a0, -0x30($s1)
/* 22234 80046E34 0C051280 */ jal hud_element_set_flags
/* 22238 80046E38 24050002 */ addiu $a1, $zero, 0x2
/* 2223C 80046E3C 08011C56 */ j .L80047158
/* 22240 80046E40 00000000 */ nop
.L80046E44:
/* 22244 80046E44 8E24FFDC */ lw $a0, -0x24($s1)
/* 22248 80046E48 0C051280 */ jal hud_element_set_flags
/* 2224C 80046E4C 24050002 */ addiu $a1, $zero, 0x2
/* 22250 80046E50 08011CA1 */ j .L80047284
/* 22254 80046E54 00000000 */ nop
.L80046E58:
/* 22258 80046E58 8E24FFE8 */ lw $a0, -0x18($s1)
/* 2225C 80046E5C 0C051280 */ jal hud_element_set_flags
/* 22260 80046E60 24050002 */ addiu $a1, $zero, 0x2
/* 22264 80046E64 08011CEC */ j .L800473B0
/* 22268 80046E68 00000000 */ nop
.L80046E6C:
/* 2226C 80046E6C 8E24FFF0 */ lw $a0, -0x10($s1)
/* 22270 80046E70 0C051280 */ jal hud_element_set_flags
/* 22274 80046E74 24050002 */ addiu $a1, $zero, 0x2
/* 22278 80046E78 08011D17 */ j .L8004745C
/* 2227C 80046E7C 00000000 */ nop
.L80046E80:
/* 22280 80046E80 8E24FFF8 */ lw $a0, -0x8($s1)
/* 22284 80046E84 0C051280 */ jal hud_element_set_flags
/* 22288 80046E88 24050002 */ addiu $a1, $zero, 0x2
/* 2228C 80046E8C 08011D42 */ j .L80047508
/* 22290 80046E90 00000000 */ nop
.L80046E94:
/* 22294 80046E94 8E240000 */ lw $a0, 0x0($s1)
/* 22298 80046E98 0C051280 */ jal hud_element_set_flags
/* 2229C 80046E9C 24050002 */ addiu $a1, $zero, 0x2
/* 222A0 80046EA0 08011D6E */ j .L800475B8
/* 222A4 80046EA4 263100B0 */ addiu $s1, $s1, 0xB0
.L80046EA8:
/* 222A8 80046EA8 14400006 */ bnez $v0, .L80046EC4
/* 222AC 80046EAC 00000000 */ nop
/* 222B0 80046EB0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 222B4 80046EB4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 222B8 80046EB8 80420070 */ lb $v0, 0x70($v0)
/* 222BC 80046EBC 105E0039 */ beq $v0, $fp, .L80046FA4
/* 222C0 80046EC0 00000000 */ nop
.L80046EC4:
/* 222C4 80046EC4 8E24FFC4 */ lw $a0, -0x3C($s1)
/* 222C8 80046EC8 0C05128B */ jal hud_element_clear_flags
/* 222CC 80046ECC 24050002 */ addiu $a1, $zero, 0x2
/* 222D0 80046ED0 24180002 */ addiu $t8, $zero, 0x2
/* 222D4 80046ED4 16580002 */ bne $s2, $t8, .L80046EE0
/* 222D8 80046ED8 0000102D */ daddu $v0, $zero, $zero
/* 222DC 80046EDC 2402FFEF */ addiu $v0, $zero, -0x11
.L80046EE0:
/* 222E0 80046EE0 525E0001 */ beql $s2, $fp, .L80046EE8
/* 222E4 80046EE4 2402FFDE */ addiu $v0, $zero, -0x22
.L80046EE8:
/* 222E8 80046EE8 52400001 */ beql $s2, $zero, .L80046EF0
/* 222EC 80046EEC 2402FFCD */ addiu $v0, $zero, -0x33
.L80046EF0:
/* 222F0 80046EF0 8FB80034 */ lw $t8, 0x34($sp)
/* 222F4 80046EF4 C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 222F8 80046EF8 C70C006C */ lwc1 $f12, 0x6C($t8)
/* 222FC 80046EFC E7A00020 */ swc1 $f0, 0x20($sp)
/* 22300 80046F00 C624FF80 */ lwc1 $f4, -0x80($s1)
/* 22304 80046F04 46802120 */ cvt.s.w $f4, $f4
/* 22308 80046F08 46166300 */ add.s $f12, $f12, $f22
/* 2230C 80046F0C C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 22310 80046F10 C620FF60 */ lwc1 $f0, -0xA0($s1)
/* 22314 80046F14 46041080 */ add.s $f2, $f2, $f4
/* 22318 80046F18 E7A00024 */ swc1 $f0, 0x24($sp)
/* 2231C 80046F1C 44820000 */ mtc1 $v0, $f0
/* 22320 80046F20 00000000 */ nop
/* 22324 80046F24 46800020 */ cvt.s.w $f0, $f0
/* 22328 80046F28 0C00A6C9 */ jal clamp_angle
/* 2232C 80046F2C 46001500 */ add.s $f20, $f2, $f0
/* 22330 80046F30 27A40020 */ addiu $a0, $sp, 0x20
/* 22334 80046F34 C626FF7C */ lwc1 $f6, -0x84($s1)
/* 22338 80046F38 468031A0 */ cvt.s.w $f6, $f6
/* 2233C 80046F3C 44070000 */ mfc1 $a3, $f0
/* 22340 80046F40 44063000 */ mfc1 $a2, $f6
/* 22344 80046F44 0C00A7E7 */ jal add_vec2D_polar
/* 22348 80046F48 27A50024 */ addiu $a1, $sp, 0x24
/* 2234C 80046F4C C7A00020 */ lwc1 $f0, 0x20($sp)
/* 22350 80046F50 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 22354 80046F54 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 22358 80046F58 44050000 */ mfc1 $a1, $f0
/* 2235C 80046F5C C7A00024 */ lwc1 $f0, 0x24($sp)
/* 22360 80046F60 4406A000 */ mfc1 $a2, $f20
/* 22364 80046F64 44070000 */ mfc1 $a3, $f0
/* 22368 80046F68 26520001 */ addiu $s2, $s2, 0x1
/* 2236C 80046F6C AFB70010 */ sw $s7, 0x10($sp)
/* 22370 80046F70 AFB60014 */ sw $s6, 0x14($sp)
/* 22374 80046F74 0C00B94E */ jal get_screen_coords
/* 22378 80046F78 AFB50018 */ sw $s5, 0x18($sp)
/* 2237C 80046F7C 24130001 */ addiu $s3, $zero, 0x1
/* 22380 80046F80 8E30FFC4 */ lw $s0, -0x3C($s1)
/* 22384 80046F84 8FA50028 */ lw $a1, 0x28($sp)
/* 22388 80046F88 8FA6002C */ lw $a2, 0x2C($sp)
/* 2238C 80046F8C 0200202D */ daddu $a0, $s0, $zero
/* 22390 80046F90 24A5FFF8 */ addiu $a1, $a1, -0x8
/* 22394 80046F94 0C051261 */ jal hud_element_set_render_pos
/* 22398 80046F98 24C6FFF8 */ addiu $a2, $a2, -0x8
/* 2239C 80046F9C 0C0511F1 */ jal hud_element_draw_next
/* 223A0 80046FA0 0200202D */ daddu $a0, $s0, $zero
.L80046FA4:
/* 223A4 80046FA4 8230FFBF */ lb $s0, -0x41($s1)
/* 223A8 80046FA8 24180002 */ addiu $t8, $zero, 0x2
/* 223AC 80046FAC 1618003F */ bne $s0, $t8, .L800470AC
/* 223B0 80046FB0 00000000 */ nop
/* 223B4 80046FB4 8E820000 */ lw $v0, 0x0($s4)
/* 223B8 80046FB8 00581024 */ and $v0, $v0, $t8
/* 223BC 80046FBC 14400006 */ bnez $v0, .L80046FD8
/* 223C0 80046FC0 00000000 */ nop
/* 223C4 80046FC4 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 223C8 80046FC8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 223CC 80046FCC 80420070 */ lb $v0, 0x70($v0)
/* 223D0 80046FD0 105E0036 */ beq $v0, $fp, .L800470AC
/* 223D4 80046FD4 00000000 */ nop
.L80046FD8:
/* 223D8 80046FD8 8E24FFC8 */ lw $a0, -0x38($s1)
/* 223DC 80046FDC 0C05128B */ jal hud_element_clear_flags
/* 223E0 80046FE0 24050002 */ addiu $a1, $zero, 0x2
/* 223E4 80046FE4 16500002 */ bne $s2, $s0, .L80046FF0
/* 223E8 80046FE8 0000102D */ daddu $v0, $zero, $zero
/* 223EC 80046FEC 2402FFEF */ addiu $v0, $zero, -0x11
.L80046FF0:
/* 223F0 80046FF0 525E0001 */ beql $s2, $fp, .L80046FF8
/* 223F4 80046FF4 2402FFDE */ addiu $v0, $zero, -0x22
.L80046FF8:
/* 223F8 80046FF8 52400001 */ beql $s2, $zero, .L80047000
/* 223FC 80046FFC 2402FFCD */ addiu $v0, $zero, -0x33
.L80047000:
/* 22400 80047000 8FB80034 */ lw $t8, 0x34($sp)
/* 22404 80047004 C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 22408 80047008 C70C006C */ lwc1 $f12, 0x6C($t8)
/* 2240C 8004700C E7A00020 */ swc1 $f0, 0x20($sp)
/* 22410 80047010 C624FF80 */ lwc1 $f4, -0x80($s1)
/* 22414 80047014 46802120 */ cvt.s.w $f4, $f4
/* 22418 80047018 46166300 */ add.s $f12, $f12, $f22
/* 2241C 8004701C C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 22420 80047020 C620FF60 */ lwc1 $f0, -0xA0($s1)
/* 22424 80047024 46041080 */ add.s $f2, $f2, $f4
/* 22428 80047028 E7A00024 */ swc1 $f0, 0x24($sp)
/* 2242C 8004702C 44820000 */ mtc1 $v0, $f0
/* 22430 80047030 00000000 */ nop
/* 22434 80047034 46800020 */ cvt.s.w $f0, $f0
/* 22438 80047038 0C00A6C9 */ jal clamp_angle
/* 2243C 8004703C 46001500 */ add.s $f20, $f2, $f0
/* 22440 80047040 27A40020 */ addiu $a0, $sp, 0x20
/* 22444 80047044 C626FF7C */ lwc1 $f6, -0x84($s1)
/* 22448 80047048 468031A0 */ cvt.s.w $f6, $f6
/* 2244C 8004704C 44070000 */ mfc1 $a3, $f0
/* 22450 80047050 44063000 */ mfc1 $a2, $f6
/* 22454 80047054 0C00A7E7 */ jal add_vec2D_polar
/* 22458 80047058 27A50024 */ addiu $a1, $sp, 0x24
/* 2245C 8004705C C7A00020 */ lwc1 $f0, 0x20($sp)
/* 22460 80047060 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 22464 80047064 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 22468 80047068 44050000 */ mfc1 $a1, $f0
/* 2246C 8004706C C7A00024 */ lwc1 $f0, 0x24($sp)
/* 22470 80047070 4406A000 */ mfc1 $a2, $f20
/* 22474 80047074 44070000 */ mfc1 $a3, $f0
/* 22478 80047078 AFB70010 */ sw $s7, 0x10($sp)
/* 2247C 8004707C AFB60014 */ sw $s6, 0x14($sp)
/* 22480 80047080 0C00B94E */ jal get_screen_coords
/* 22484 80047084 AFB50018 */ sw $s5, 0x18($sp)
/* 22488 80047088 8E30FFC8 */ lw $s0, -0x38($s1)
/* 2248C 8004708C 8FA50028 */ lw $a1, 0x28($sp)
/* 22490 80047090 8FA6002C */ lw $a2, 0x2C($sp)
/* 22494 80047094 0200202D */ daddu $a0, $s0, $zero
/* 22498 80047098 24A5FFF8 */ addiu $a1, $a1, -0x8
/* 2249C 8004709C 0C051261 */ jal hud_element_set_render_pos
/* 224A0 800470A0 24C6FFF8 */ addiu $a2, $a2, -0x8
/* 224A4 800470A4 0C0511F1 */ jal hud_element_draw_next
/* 224A8 800470A8 0200202D */ daddu $a0, $s0, $zero
.L800470AC:
/* 224AC 800470AC 8222FFCC */ lb $v0, -0x34($s1)
/* 224B0 800470B0 10400029 */ beqz $v0, .L80047158
/* 224B4 800470B4 00000000 */ nop
/* 224B8 800470B8 8E830000 */ lw $v1, 0x0($s4)
/* 224BC 800470BC 30620040 */ andi $v0, $v1, 0x40
/* 224C0 800470C0 1440FF5B */ bnez $v0, .L80046E30
/* 224C4 800470C4 30620002 */ andi $v0, $v1, 0x2
/* 224C8 800470C8 14400006 */ bnez $v0, .L800470E4
/* 224CC 800470CC 00000000 */ nop
/* 224D0 800470D0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 224D4 800470D4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 224D8 800470D8 80420070 */ lb $v0, 0x70($v0)
/* 224DC 800470DC 105E001E */ beq $v0, $fp, .L80047158
/* 224E0 800470E0 00000000 */ nop
.L800470E4:
/* 224E4 800470E4 8E24FFD0 */ lw $a0, -0x30($s1)
/* 224E8 800470E8 0C05128B */ jal hud_element_clear_flags
/* 224EC 800470EC 24050002 */ addiu $a1, $zero, 0x2
/* 224F0 800470F0 C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 224F4 800470F4 C622FF60 */ lwc1 $f2, -0xA0($s1)
/* 224F8 800470F8 44050000 */ mfc1 $a1, $f0
/* 224FC 800470FC 44071000 */ mfc1 $a3, $f2
/* 22500 80047100 C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 22504 80047104 C620FF84 */ lwc1 $f0, -0x7C($s1)
/* 22508 80047108 46800020 */ cvt.s.w $f0, $f0
/* 2250C 8004710C 46001080 */ add.s $f2, $f2, $f0
/* 22510 80047110 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 22514 80047114 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 22518 80047118 44061000 */ mfc1 $a2, $f2
/* 2251C 8004711C AFA50020 */ sw $a1, 0x20($sp)
/* 22520 80047120 AFA70024 */ sw $a3, 0x24($sp)
/* 22524 80047124 AFB70010 */ sw $s7, 0x10($sp)
/* 22528 80047128 AFB60014 */ sw $s6, 0x14($sp)
/* 2252C 8004712C 0C00B94E */ jal get_screen_coords
/* 22530 80047130 AFB50018 */ sw $s5, 0x18($sp)
/* 22534 80047134 8E30FFD0 */ lw $s0, -0x30($s1)
/* 22538 80047138 8FA50028 */ lw $a1, 0x28($sp)
/* 2253C 8004713C 8FA6002C */ lw $a2, 0x2C($sp)
/* 22540 80047140 0200202D */ daddu $a0, $s0, $zero
/* 22544 80047144 24A50002 */ addiu $a1, $a1, 0x2
/* 22548 80047148 0C051261 */ jal hud_element_set_render_pos
/* 2254C 8004714C 24C6FFF4 */ addiu $a2, $a2, -0xC
/* 22550 80047150 0C0511F1 */ jal hud_element_draw_next
/* 22554 80047154 0200202D */ daddu $a0, $s0, $zero
.L80047158:
/* 22558 80047158 8222FFCD */ lb $v0, -0x33($s1)
/* 2255C 8004715C 1040001E */ beqz $v0, .L800471D8
/* 22560 80047160 00000000 */ nop
/* 22564 80047164 8E24FFD4 */ lw $a0, -0x2C($s1)
/* 22568 80047168 0C05128B */ jal hud_element_clear_flags
/* 2256C 8004716C 24050002 */ addiu $a1, $zero, 0x2
/* 22570 80047170 C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 22574 80047174 C622FF60 */ lwc1 $f2, -0xA0($s1)
/* 22578 80047178 44050000 */ mfc1 $a1, $f0
/* 2257C 8004717C 44071000 */ mfc1 $a3, $f2
/* 22580 80047180 C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 22584 80047184 C620FF84 */ lwc1 $f0, -0x7C($s1)
/* 22588 80047188 46800020 */ cvt.s.w $f0, $f0
/* 2258C 8004718C 46001080 */ add.s $f2, $f2, $f0
/* 22590 80047190 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 22594 80047194 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 22598 80047198 44061000 */ mfc1 $a2, $f2
/* 2259C 8004719C AFA50020 */ sw $a1, 0x20($sp)
/* 225A0 800471A0 AFA70024 */ sw $a3, 0x24($sp)
/* 225A4 800471A4 AFB70010 */ sw $s7, 0x10($sp)
/* 225A8 800471A8 AFB60014 */ sw $s6, 0x14($sp)
/* 225AC 800471AC 0C00B94E */ jal get_screen_coords
/* 225B0 800471B0 AFB50018 */ sw $s5, 0x18($sp)
/* 225B4 800471B4 8E30FFD4 */ lw $s0, -0x2C($s1)
/* 225B8 800471B8 8FA50028 */ lw $a1, 0x28($sp)
/* 225BC 800471BC 8FA6002C */ lw $a2, 0x2C($sp)
/* 225C0 800471C0 0200202D */ daddu $a0, $s0, $zero
/* 225C4 800471C4 24A50002 */ addiu $a1, $a1, 0x2
/* 225C8 800471C8 0C051261 */ jal hud_element_set_render_pos
/* 225CC 800471CC 24C6FFF4 */ addiu $a2, $a2, -0xC
/* 225D0 800471D0 0C0511F1 */ jal hud_element_draw_next
/* 225D4 800471D4 0200202D */ daddu $a0, $s0, $zero
.L800471D8:
/* 225D8 800471D8 8222FFD8 */ lb $v0, -0x28($s1)
/* 225DC 800471DC 10400029 */ beqz $v0, .L80047284
/* 225E0 800471E0 00000000 */ nop
/* 225E4 800471E4 8E830000 */ lw $v1, 0x0($s4)
/* 225E8 800471E8 30620080 */ andi $v0, $v1, 0x80
/* 225EC 800471EC 1440FF15 */ bnez $v0, .L80046E44
/* 225F0 800471F0 30620002 */ andi $v0, $v1, 0x2
/* 225F4 800471F4 14400006 */ bnez $v0, .L80047210
/* 225F8 800471F8 00000000 */ nop
/* 225FC 800471FC 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 22600 80047200 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 22604 80047204 80420070 */ lb $v0, 0x70($v0)
/* 22608 80047208 105E001E */ beq $v0, $fp, .L80047284
/* 2260C 8004720C 00000000 */ nop
.L80047210:
/* 22610 80047210 8E24FFDC */ lw $a0, -0x24($s1)
/* 22614 80047214 0C05128B */ jal hud_element_clear_flags
/* 22618 80047218 24050002 */ addiu $a1, $zero, 0x2
/* 2261C 8004721C C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 22620 80047220 C622FF60 */ lwc1 $f2, -0xA0($s1)
/* 22624 80047224 44050000 */ mfc1 $a1, $f0
/* 22628 80047228 44071000 */ mfc1 $a3, $f2
/* 2262C 8004722C C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 22630 80047230 C620FF84 */ lwc1 $f0, -0x7C($s1)
/* 22634 80047234 46800020 */ cvt.s.w $f0, $f0
/* 22638 80047238 46001080 */ add.s $f2, $f2, $f0
/* 2263C 8004723C 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 22640 80047240 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 22644 80047244 44061000 */ mfc1 $a2, $f2
/* 22648 80047248 AFA50020 */ sw $a1, 0x20($sp)
/* 2264C 8004724C AFA70024 */ sw $a3, 0x24($sp)
/* 22650 80047250 AFB70010 */ sw $s7, 0x10($sp)
/* 22654 80047254 AFB60014 */ sw $s6, 0x14($sp)
/* 22658 80047258 0C00B94E */ jal get_screen_coords
/* 2265C 8004725C AFB50018 */ sw $s5, 0x18($sp)
/* 22660 80047260 8E30FFDC */ lw $s0, -0x24($s1)
/* 22664 80047264 8FA50028 */ lw $a1, 0x28($sp)
/* 22668 80047268 8FA6002C */ lw $a2, 0x2C($sp)
/* 2266C 8004726C 0200202D */ daddu $a0, $s0, $zero
/* 22670 80047270 24A50002 */ addiu $a1, $a1, 0x2
/* 22674 80047274 0C051261 */ jal hud_element_set_render_pos
/* 22678 80047278 24C6FFF4 */ addiu $a2, $a2, -0xC
/* 2267C 8004727C 0C0511F1 */ jal hud_element_draw_next
/* 22680 80047280 0200202D */ daddu $a0, $s0, $zero
.L80047284:
/* 22684 80047284 8222FFD9 */ lb $v0, -0x27($s1)
/* 22688 80047288 1040001E */ beqz $v0, .L80047304
/* 2268C 8004728C 00000000 */ nop
/* 22690 80047290 8E24FFE0 */ lw $a0, -0x20($s1)
/* 22694 80047294 0C05128B */ jal hud_element_clear_flags
/* 22698 80047298 24050002 */ addiu $a1, $zero, 0x2
/* 2269C 8004729C C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 226A0 800472A0 C622FF60 */ lwc1 $f2, -0xA0($s1)
/* 226A4 800472A4 44050000 */ mfc1 $a1, $f0
/* 226A8 800472A8 44071000 */ mfc1 $a3, $f2
/* 226AC 800472AC C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 226B0 800472B0 C620FF84 */ lwc1 $f0, -0x7C($s1)
/* 226B4 800472B4 46800020 */ cvt.s.w $f0, $f0
/* 226B8 800472B8 46001080 */ add.s $f2, $f2, $f0
/* 226BC 800472BC 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 226C0 800472C0 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 226C4 800472C4 44061000 */ mfc1 $a2, $f2
/* 226C8 800472C8 AFA50020 */ sw $a1, 0x20($sp)
/* 226CC 800472CC AFA70024 */ sw $a3, 0x24($sp)
/* 226D0 800472D0 AFB70010 */ sw $s7, 0x10($sp)
/* 226D4 800472D4 AFB60014 */ sw $s6, 0x14($sp)
/* 226D8 800472D8 0C00B94E */ jal get_screen_coords
/* 226DC 800472DC AFB50018 */ sw $s5, 0x18($sp)
/* 226E0 800472E0 8E30FFE0 */ lw $s0, -0x20($s1)
/* 226E4 800472E4 8FA50028 */ lw $a1, 0x28($sp)
/* 226E8 800472E8 8FA6002C */ lw $a2, 0x2C($sp)
/* 226EC 800472EC 0200202D */ daddu $a0, $s0, $zero
/* 226F0 800472F0 24A50002 */ addiu $a1, $a1, 0x2
/* 226F4 800472F4 0C051261 */ jal hud_element_set_render_pos
/* 226F8 800472F8 24C6FFF4 */ addiu $a2, $a2, -0xC
/* 226FC 800472FC 0C0511F1 */ jal hud_element_draw_next
/* 22700 80047300 0200202D */ daddu $a0, $s0, $zero
.L80047304:
/* 22704 80047304 8222FFE4 */ lb $v0, -0x1C($s1)
/* 22708 80047308 10400029 */ beqz $v0, .L800473B0
/* 2270C 8004730C 00000000 */ nop
/* 22710 80047310 8E830000 */ lw $v1, 0x0($s4)
/* 22714 80047314 30620100 */ andi $v0, $v1, 0x100
/* 22718 80047318 1440FECF */ bnez $v0, .L80046E58
/* 2271C 8004731C 30620002 */ andi $v0, $v1, 0x2
/* 22720 80047320 14400006 */ bnez $v0, .L8004733C
/* 22724 80047324 00000000 */ nop
/* 22728 80047328 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 2272C 8004732C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 22730 80047330 80420070 */ lb $v0, 0x70($v0)
/* 22734 80047334 105E001E */ beq $v0, $fp, .L800473B0
/* 22738 80047338 00000000 */ nop
.L8004733C:
/* 2273C 8004733C 8E24FFE8 */ lw $a0, -0x18($s1)
/* 22740 80047340 0C05128B */ jal hud_element_clear_flags
/* 22744 80047344 24050002 */ addiu $a1, $zero, 0x2
/* 22748 80047348 C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 2274C 8004734C C622FF60 */ lwc1 $f2, -0xA0($s1)
/* 22750 80047350 44050000 */ mfc1 $a1, $f0
/* 22754 80047354 44071000 */ mfc1 $a3, $f2
/* 22758 80047358 C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 2275C 8004735C C620FF84 */ lwc1 $f0, -0x7C($s1)
/* 22760 80047360 46800020 */ cvt.s.w $f0, $f0
/* 22764 80047364 46001080 */ add.s $f2, $f2, $f0
/* 22768 80047368 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 2276C 8004736C 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 22770 80047370 44061000 */ mfc1 $a2, $f2
/* 22774 80047374 AFA50020 */ sw $a1, 0x20($sp)
/* 22778 80047378 AFA70024 */ sw $a3, 0x24($sp)
/* 2277C 8004737C AFB70010 */ sw $s7, 0x10($sp)
/* 22780 80047380 AFB60014 */ sw $s6, 0x14($sp)
/* 22784 80047384 0C00B94E */ jal get_screen_coords
/* 22788 80047388 AFB50018 */ sw $s5, 0x18($sp)
/* 2278C 8004738C 8E30FFE8 */ lw $s0, -0x18($s1)
/* 22790 80047390 8FA50028 */ lw $a1, 0x28($sp)
/* 22794 80047394 8FA6002C */ lw $a2, 0x2C($sp)
/* 22798 80047398 0200202D */ daddu $a0, $s0, $zero
/* 2279C 8004739C 24A50002 */ addiu $a1, $a1, 0x2
/* 227A0 800473A0 0C051261 */ jal hud_element_set_render_pos
/* 227A4 800473A4 24C6FFF4 */ addiu $a2, $a2, -0xC
/* 227A8 800473A8 0C0511F1 */ jal hud_element_draw_next
/* 227AC 800473AC 0200202D */ daddu $a0, $s0, $zero
.L800473B0:
/* 227B0 800473B0 8222FFEC */ lb $v0, -0x14($s1)
/* 227B4 800473B4 10400029 */ beqz $v0, .L8004745C
/* 227B8 800473B8 00000000 */ nop
/* 227BC 800473BC 8E830000 */ lw $v1, 0x0($s4)
/* 227C0 800473C0 30620200 */ andi $v0, $v1, 0x200
/* 227C4 800473C4 1440FEA9 */ bnez $v0, .L80046E6C
/* 227C8 800473C8 30620002 */ andi $v0, $v1, 0x2
/* 227CC 800473CC 14400006 */ bnez $v0, .L800473E8
/* 227D0 800473D0 00000000 */ nop
/* 227D4 800473D4 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 227D8 800473D8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 227DC 800473DC 80420070 */ lb $v0, 0x70($v0)
/* 227E0 800473E0 105E001E */ beq $v0, $fp, .L8004745C
/* 227E4 800473E4 00000000 */ nop
.L800473E8:
/* 227E8 800473E8 8E24FFF0 */ lw $a0, -0x10($s1)
/* 227EC 800473EC 0C05128B */ jal hud_element_clear_flags
/* 227F0 800473F0 24050002 */ addiu $a1, $zero, 0x2
/* 227F4 800473F4 C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 227F8 800473F8 C622FF60 */ lwc1 $f2, -0xA0($s1)
/* 227FC 800473FC 44050000 */ mfc1 $a1, $f0
/* 22800 80047400 44071000 */ mfc1 $a3, $f2
/* 22804 80047404 C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 22808 80047408 C620FF84 */ lwc1 $f0, -0x7C($s1)
/* 2280C 8004740C 46800020 */ cvt.s.w $f0, $f0
/* 22810 80047410 46001080 */ add.s $f2, $f2, $f0
/* 22814 80047414 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 22818 80047418 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 2281C 8004741C 44061000 */ mfc1 $a2, $f2
/* 22820 80047420 AFA50020 */ sw $a1, 0x20($sp)
/* 22824 80047424 AFA70024 */ sw $a3, 0x24($sp)
/* 22828 80047428 AFB70010 */ sw $s7, 0x10($sp)
/* 2282C 8004742C AFB60014 */ sw $s6, 0x14($sp)
/* 22830 80047430 0C00B94E */ jal get_screen_coords
/* 22834 80047434 AFB50018 */ sw $s5, 0x18($sp)
/* 22838 80047438 8E30FFF0 */ lw $s0, -0x10($s1)
/* 2283C 8004743C 8FA50028 */ lw $a1, 0x28($sp)
/* 22840 80047440 8FA6002C */ lw $a2, 0x2C($sp)
/* 22844 80047444 0200202D */ daddu $a0, $s0, $zero
/* 22848 80047448 24A50002 */ addiu $a1, $a1, 0x2
/* 2284C 8004744C 0C051261 */ jal hud_element_set_render_pos
/* 22850 80047450 24C6FFF1 */ addiu $a2, $a2, -0xF
/* 22854 80047454 0C0511F1 */ jal hud_element_draw_next
/* 22858 80047458 0200202D */ daddu $a0, $s0, $zero
.L8004745C:
/* 2285C 8004745C 8222FFF4 */ lb $v0, -0xC($s1)
/* 22860 80047460 10400029 */ beqz $v0, .L80047508
/* 22864 80047464 00000000 */ nop
/* 22868 80047468 8E830000 */ lw $v1, 0x0($s4)
/* 2286C 8004746C 30620400 */ andi $v0, $v1, 0x400
/* 22870 80047470 1440FE83 */ bnez $v0, .L80046E80
/* 22874 80047474 30620002 */ andi $v0, $v1, 0x2
/* 22878 80047478 14400006 */ bnez $v0, .L80047494
/* 2287C 8004747C 00000000 */ nop
/* 22880 80047480 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 22884 80047484 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 22888 80047488 80420070 */ lb $v0, 0x70($v0)
/* 2288C 8004748C 105E001E */ beq $v0, $fp, .L80047508
/* 22890 80047490 00000000 */ nop
.L80047494:
/* 22894 80047494 8E24FFF8 */ lw $a0, -0x8($s1)
/* 22898 80047498 0C05128B */ jal hud_element_clear_flags
/* 2289C 8004749C 24050002 */ addiu $a1, $zero, 0x2
/* 228A0 800474A0 C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 228A4 800474A4 C622FF60 */ lwc1 $f2, -0xA0($s1)
/* 228A8 800474A8 44050000 */ mfc1 $a1, $f0
/* 228AC 800474AC 44071000 */ mfc1 $a3, $f2
/* 228B0 800474B0 C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 228B4 800474B4 C620FF84 */ lwc1 $f0, -0x7C($s1)
/* 228B8 800474B8 46800020 */ cvt.s.w $f0, $f0
/* 228BC 800474BC 46001080 */ add.s $f2, $f2, $f0
/* 228C0 800474C0 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 228C4 800474C4 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 228C8 800474C8 44061000 */ mfc1 $a2, $f2
/* 228CC 800474CC AFA50020 */ sw $a1, 0x20($sp)
/* 228D0 800474D0 AFA70024 */ sw $a3, 0x24($sp)
/* 228D4 800474D4 AFB70010 */ sw $s7, 0x10($sp)
/* 228D8 800474D8 AFB60014 */ sw $s6, 0x14($sp)
/* 228DC 800474DC 0C00B94E */ jal get_screen_coords
/* 228E0 800474E0 AFB50018 */ sw $s5, 0x18($sp)
/* 228E4 800474E4 8E30FFF8 */ lw $s0, -0x8($s1)
/* 228E8 800474E8 8FA50028 */ lw $a1, 0x28($sp)
/* 228EC 800474EC 8FA6002C */ lw $a2, 0x2C($sp)
/* 228F0 800474F0 0200202D */ daddu $a0, $s0, $zero
/* 228F4 800474F4 24A50002 */ addiu $a1, $a1, 0x2
/* 228F8 800474F8 0C051261 */ jal hud_element_set_render_pos
/* 228FC 800474FC 24C6FFF0 */ addiu $a2, $a2, -0x10
/* 22900 80047500 0C0511F1 */ jal hud_element_draw_next
/* 22904 80047504 0200202D */ daddu $a0, $s0, $zero
.L80047508:
/* 22908 80047508 8222FFFC */ lb $v0, -0x4($s1)
/* 2290C 8004750C 5040002A */ beql $v0, $zero, .L800475B8
/* 22910 80047510 263100B0 */ addiu $s1, $s1, 0xB0
/* 22914 80047514 8E830000 */ lw $v1, 0x0($s4)
/* 22918 80047518 30620800 */ andi $v0, $v1, 0x800
/* 2291C 8004751C 1440FE5D */ bnez $v0, .L80046E94
/* 22920 80047520 30620002 */ andi $v0, $v1, 0x2
/* 22924 80047524 14400006 */ bnez $v0, .L80047540
/* 22928 80047528 00000000 */ nop
/* 2292C 8004752C 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 22930 80047530 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 22934 80047534 80420070 */ lb $v0, 0x70($v0)
/* 22938 80047538 505E001F */ beql $v0, $fp, .L800475B8
/* 2293C 8004753C 263100B0 */ addiu $s1, $s1, 0xB0
.L80047540:
/* 22940 80047540 8E240000 */ lw $a0, 0x0($s1)
/* 22944 80047544 0C05128B */ jal hud_element_clear_flags
/* 22948 80047548 24050002 */ addiu $a1, $zero, 0x2
/* 2294C 8004754C C620FF58 */ lwc1 $f0, -0xA8($s1)
/* 22950 80047550 C622FF60 */ lwc1 $f2, -0xA0($s1)
/* 22954 80047554 44050000 */ mfc1 $a1, $f0
/* 22958 80047558 44071000 */ mfc1 $a3, $f2
/* 2295C 8004755C C622FF5C */ lwc1 $f2, -0xA4($s1)
/* 22960 80047560 C620FF84 */ lwc1 $f0, -0x7C($s1)
/* 22964 80047564 46800020 */ cvt.s.w $f0, $f0
/* 22968 80047568 46001080 */ add.s $f2, $f2, $f0
/* 2296C 8004756C 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 22970 80047570 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 22974 80047574 44061000 */ mfc1 $a2, $f2
/* 22978 80047578 AFA50020 */ sw $a1, 0x20($sp)
/* 2297C 8004757C AFA70024 */ sw $a3, 0x24($sp)
/* 22980 80047580 AFB70010 */ sw $s7, 0x10($sp)
/* 22984 80047584 AFB60014 */ sw $s6, 0x14($sp)
/* 22988 80047588 0C00B94E */ jal get_screen_coords
/* 2298C 8004758C AFB50018 */ sw $s5, 0x18($sp)
/* 22990 80047590 8E300000 */ lw $s0, 0x0($s1)
/* 22994 80047594 8FA50028 */ lw $a1, 0x28($sp)
/* 22998 80047598 8FA6002C */ lw $a2, 0x2C($sp)
/* 2299C 8004759C 0200202D */ daddu $a0, $s0, $zero
/* 229A0 800475A0 24A50002 */ addiu $a1, $a1, 0x2
/* 229A4 800475A4 0C051261 */ jal hud_element_set_render_pos
/* 229A8 800475A8 24C6FFF0 */ addiu $a2, $a2, -0x10
/* 229AC 800475AC 0C0511F1 */ jal hud_element_draw_next
/* 229B0 800475B0 0200202D */ daddu $a0, $s0, $zero
/* 229B4 800475B4 263100B0 */ addiu $s1, $s1, 0xB0
.L800475B8:
/* 229B8 800475B8 8FB80038 */ lw $t8, 0x38($sp)
/* 229BC 800475BC 269400B0 */ addiu $s4, $s4, 0xB0
/* 229C0 800475C0 27180001 */ addiu $t8, $t8, 0x1
/* 229C4 800475C4 2B020040 */ slti $v0, $t8, 0x40
/* 229C8 800475C8 1440FC7E */ bnez $v0, .L800467C4
/* 229CC 800475CC AFB80038 */ sw $t8, 0x38($sp)
/* 229D0 800475D0 8FBF0064 */ lw $ra, 0x64($sp)
/* 229D4 800475D4 8FBE0060 */ lw $fp, 0x60($sp)
/* 229D8 800475D8 8FB7005C */ lw $s7, 0x5C($sp)
/* 229DC 800475DC 8FB60058 */ lw $s6, 0x58($sp)
/* 229E0 800475E0 8FB50054 */ lw $s5, 0x54($sp)
/* 229E4 800475E4 8FB40050 */ lw $s4, 0x50($sp)
/* 229E8 800475E8 8FB3004C */ lw $s3, 0x4C($sp)
/* 229EC 800475EC 8FB20048 */ lw $s2, 0x48($sp)
/* 229F0 800475F0 8FB10044 */ lw $s1, 0x44($sp)
/* 229F4 800475F4 8FB00040 */ lw $s0, 0x40($sp)
/* 229F8 800475F8 D7B60070 */ ldc1 $f22, 0x70($sp)
/* 229FC 800475FC D7B40068 */ ldc1 $f20, 0x68($sp)
/* 22A00 80047600 03E00008 */ jr $ra
/* 22A04 80047604 27BD0078 */ addiu $sp, $sp, 0x78
### DECOMPILED C INSTRUCTIONS:
void draw_all_status_icons(void* data) {
PopupMessage* popup = data;
HudStatusIcon* icon;
s32 elementId;
f32 x, y, z;
s32 screenX, screenY, screenZ;
s32 isActiveDrawn, iconCounter;
s32 offsetY;
Camera* camera = &gCameras[gCurrentCameraID];
int i;
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 12, 20, SCREEN_WIDTH - 12, SCREEN_HEIGHT - 20);
gDPPipeSync(gMainGfxPos++);
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP);
gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT);
gDPSetCombineKey(gMainGfxPos++, G_CK_NONE);
gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE);
gDPNoOp(gMainGfxPos++);
gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE);
gSPTexture(gMainGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
for (i = 0, icon = D_800A0F44; i < MAX_ICONS; i++, icon++) {
if (icon->flags == 0) {
continue;
}
iconCounter = 0;
isActiveDrawn = 0;
if (icon->status1.activeTask == STATUS_ICON_TASK_DRAW) {
if (icon->flags & STATUS_ICON_FLAG_DEBUFF) {
hud_element_set_flags(icon->status1.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
hud_element_clear_flags(icon->status1.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
x = icon->worldPos.x;
y = icon->worldPos.y + icon->status1OffsetY;
z = icon->worldPos.z;
add_vec2D_polar(&x, &z, icon->status1Radius, clamp_angle(camera->currentYaw + 90));
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
elementId = icon->status1.activeElementID;
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
hud_element_draw_next(elementId);
iconCounter = 1;
isActiveDrawn = 1;
}
}
if (icon->status1.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) {
hud_element_clear_flags(icon->status1.removingElementID, HUD_ELEMENT_FLAG_DISABLED);
if (isActiveDrawn == 0) {
iconCounter++;
}
x = icon->worldPos.x;
y = icon->worldPos.y + icon->status1OffsetY;
z = icon->worldPos.z;
add_vec2D_polar(&x, &z, icon->status1Radius, clamp_angle(camera->currentYaw + 90));
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
elementId = icon->status1.removingElementID;
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
hud_element_draw_next(elementId);
}
isActiveDrawn = 0;
if (icon->status2.activeTask == STATUS_ICON_TASK_DRAW) {
if (icon->flags & STATUS_ICON_FLAG_STATIC) {
hud_element_set_flags(icon->status2.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
hud_element_clear_flags(icon->status2.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
offsetY = 0;
if (iconCounter == 0) {
offsetY = -17;
}
x = icon->worldPos.x;
y = icon->worldPos.y + icon->status2OffsetY + offsetY;
z = icon->worldPos.z;
add_vec2D_polar(&x, &z, icon->status2Radius, clamp_angle(camera->currentYaw + 90));
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
elementId = icon->status2.activeElementID;
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
hud_element_draw_next(elementId);
iconCounter++;
isActiveDrawn = 1;
}
}
if (icon->status2.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) {
hud_element_clear_flags(icon->status2.removingElementID, HUD_ELEMENT_FLAG_DISABLED);
offsetY = 0;
if (iconCounter == 0) {
offsetY = -17;
}
if (isActiveDrawn == 0) {
iconCounter++;
}
x = icon->worldPos.x;
y = icon->worldPos.y + icon->status2OffsetY + offsetY;
z = icon->worldPos.z;
add_vec2D_polar(&x, &z, icon->status2Radius, clamp_angle(camera->currentYaw + 90));
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
elementId = icon->status2.removingElementID;
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
hud_element_draw_next(elementId);
}
isActiveDrawn = 0;
if (icon->status3.activeTask == STATUS_ICON_TASK_DRAW) {
if (icon->flags & STATUS_ICON_FLAG_TRANSPARENT) {
hud_element_set_flags(icon->status3.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
hud_element_clear_flags(icon->status3.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
offsetY = 0;
if (iconCounter == 1) {
offsetY = -17;
} if (iconCounter == 0) {
offsetY = -34;
}
x = icon->worldPos.x;
y = icon->worldPos.y + icon->status3OffsetY + offsetY;
z = icon->worldPos.z;
add_vec2D_polar(&x, &z, icon->status3Radius, clamp_angle(camera->currentYaw + 90));
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
elementId = icon->status3.activeElementID;
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
hud_element_draw_next(elementId);
iconCounter++;
isActiveDrawn = 1;
}
}
if (icon->status3.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) {
hud_element_clear_flags(icon->status3.removingElementID, HUD_ELEMENT_FLAG_DISABLED);
offsetY = 0;
if (iconCounter == 1) {
offsetY = -17;
}
if (iconCounter == 0) {
offsetY = -34;
}
if (isActiveDrawn == 0) {
iconCounter++;
}
x = icon->worldPos.x;
y = icon->worldPos.y + icon->status3OffsetY + offsetY;
z = icon->worldPos.z;
add_vec2D_polar(&x, &z, icon->status3Radius, clamp_angle(camera->currentYaw + 90));
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
elementId = icon->status3.removingElementID;
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
hud_element_draw_next(elementId);
}
isActiveDrawn = 0;
if (icon->status4.activeTask == STATUS_ICON_TASK_DRAW) {
if (icon->flags & STATUS_ICON_FLAG_STATUS_CHILL_OUT) {
hud_element_set_flags(icon->status4.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
hud_element_clear_flags(icon->status4.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
offsetY = 0;
if (iconCounter == 2) {
offsetY = -17;
}
if (iconCounter == 1) {
offsetY = -34;
}
if (iconCounter == 0) {
offsetY = -51;
}
x = icon->worldPos.x;
y = icon->worldPos.y + icon->status4OffsetY + offsetY;
z = icon->worldPos.z;
add_vec2D_polar(&x, &z, icon->status4Radius, clamp_angle(camera->currentYaw + 90));
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
elementId = icon->status4.activeElementID;
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
hud_element_draw_next(elementId);
iconCounter++;
isActiveDrawn = 1;
}
}
if (icon->status4.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) {
hud_element_clear_flags(icon->status4.removingElementID, HUD_ELEMENT_FLAG_DISABLED);
offsetY = 0;
if (iconCounter == 2) {
offsetY = -17;
}
if (iconCounter == 1) {
offsetY = -34;
}
if (iconCounter == 0) {
offsetY = -51;
}
if (isActiveDrawn == 0) {
iconCounter++;
}
x = icon->worldPos.x;
y = icon->worldPos.y + icon->status4OffsetY + offsetY;
z = icon->worldPos.z;
add_vec2D_polar(&x, &z, icon->status4Radius, clamp_angle(camera->currentYaw + 90));
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
elementId = icon->status4.removingElementID;
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
hud_element_draw_next(elementId);
}
do {
if (icon->boostJump.active) {
if (icon->flags & STATUS_ICON_FLAG_BOOST_JUMP) {
hud_element_set_flags(icon->boostJump.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
hud_element_clear_flags(icon->boostJump.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
x = icon->worldPos.x;
z = icon->worldPos.z;
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
elementId = icon->boostJump.activeElementID;
hud_element_set_render_pos(elementId, screenX + 2, screenY - 12);
hud_element_draw_next(elementId);
}
}
} while (0);
if (icon->boostJump.removing) {
hud_element_clear_flags(icon->prevIndexBoostJump, HUD_ELEMENT_FLAG_DISABLED);
x = icon->worldPos.x;
z = icon->worldPos.z;
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
elementId = icon->prevIndexBoostJump;
hud_element_set_render_pos(elementId, screenX + 2, screenY - 12);
hud_element_draw_next(elementId);
}
do {
if (icon->boostHammer.active) {
if (icon->flags & STATUS_ICON_FLAG_BOOST_HAMMER) {
hud_element_set_flags(icon->boostHammer.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
hud_element_clear_flags(icon->boostHammer.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
x = icon->worldPos.x;
z = icon->worldPos.z;
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
elementId = icon->boostHammer.activeElementID;
hud_element_set_render_pos(elementId, screenX + 2, screenY - 12);
hud_element_draw_next(elementId);
}
}
} while (0);
if (icon->boostHammer.removing) {
hud_element_clear_flags(icon->prevIndexBoostHammer, HUD_ELEMENT_FLAG_DISABLED);
x = icon->worldPos.x;
z = icon->worldPos.z;
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
elementId = icon->prevIndexBoostHammer;
hud_element_set_render_pos(elementId, screenX + 2, screenY - 12);
hud_element_draw_next(elementId);
}
do {
if (icon->boostPartner.active) {
if (icon->flags & STATUS_ICON_FLAG_BOOST_PARTNER) {
hud_element_set_flags(icon->boostPartner.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
hud_element_clear_flags(icon->boostPartner.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
x = icon->worldPos.x;
z = icon->worldPos.z;
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
elementId = icon->boostPartner.activeElementID;
hud_element_set_render_pos(elementId, screenX + 2, screenY - 12);
hud_element_draw_next(elementId);
}
}
} while (0);
do {
if (icon->surprise.active) {
if (icon->flags & STATUS_ICON_FLAG_SURPRISE) {
hud_element_set_flags(icon->surprise.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
hud_element_clear_flags(icon->surprise.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
x = icon->worldPos.x;
z = icon->worldPos.z;
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
elementId = icon->surprise.activeElementID;
hud_element_set_render_pos(elementId, screenX + 2, screenY - 15);
hud_element_draw_next(elementId);
}
}
} while (0);
do {
if (icon->peril.active) {
if (icon->flags & STATUS_ICON_FLAG_PERIL) {
hud_element_set_flags(icon->peril.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
hud_element_clear_flags(icon->peril.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
x = icon->worldPos.x;
z = icon->worldPos.z;
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
elementId = icon->peril.activeElementID;
hud_element_set_render_pos(elementId, screenX + 2, screenY - 16);
hud_element_draw_next(elementId);
}
}
} while (0);
do {
if (icon->danger.active) {
if (icon->flags & STATUS_ICON_FLAG_DANGER) {
hud_element_set_flags(icon->danger.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
hud_element_clear_flags(icon->danger.activeElementID, HUD_ELEMENT_FLAG_DISABLED);
x = icon->worldPos.x;
z = icon->worldPos.z;
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
elementId = icon->danger.activeElementID;
hud_element_set_render_pos(elementId, screenX + 2, screenY - 16);
hud_element_draw_next(elementId);
}
}
} while (0);
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel partner_flying_follow_player
/* 86EA8 800ED9F8 3C038011 */ lui $v1, %hi(wPartnerFollowState)
/* 86EAC 800ED9FC 8463CFC8 */ lh $v1, %lo(wPartnerFollowState)($v1)
/* 86EB0 800EDA00 27BDFFA0 */ addiu $sp, $sp, -0x60
/* 86EB4 800EDA04 AFB10034 */ sw $s1, 0x34($sp)
/* 86EB8 800EDA08 AFB3003C */ sw $s3, 0x3C($sp)
/* 86EBC 800EDA0C 3C138011 */ lui $s3, %hi(gPlayerStatus)
/* 86EC0 800EDA10 2673EFC8 */ addiu $s3, $s3, %lo(gPlayerStatus)
/* 86EC4 800EDA14 AFB20038 */ sw $s2, 0x38($sp)
/* 86EC8 800EDA18 3C12800B */ lui $s2, %hi(gCameras)
/* 86ECC 800EDA1C 26521D80 */ addiu $s2, $s2, %lo(gCameras)
/* 86ED0 800EDA20 AFBF0044 */ sw $ra, 0x44($sp)
/* 86ED4 800EDA24 AFB40040 */ sw $s4, 0x40($sp)
/* 86ED8 800EDA28 AFB00030 */ sw $s0, 0x30($sp)
/* 86EDC 800EDA2C F7B80058 */ sdc1 $f24, 0x58($sp)
/* 86EE0 800EDA30 F7B60050 */ sdc1 $f22, 0x50($sp)
/* 86EE4 800EDA34 F7B40048 */ sdc1 $f20, 0x48($sp)
/* 86EE8 800EDA38 2C620033 */ sltiu $v0, $v1, 0x33
/* 86EEC 800EDA3C 104003CA */ beqz $v0, .L800EE968
/* 86EF0 800EDA40 0080882D */ daddu $s1, $a0, $zero
/* 86EF4 800EDA44 00031080 */ sll $v0, $v1, 2
/* 86EF8 800EDA48 3C018011 */ lui $at, %hi(jtbl_8010C218)
/* 86EFC 800EDA4C 00220821 */ addu $at, $at, $v0
/* 86F00 800EDA50 8C22C218 */ lw $v0, %lo(jtbl_8010C218)($at)
/* 86F04 800EDA54 00400008 */ jr $v0
/* 86F08 800EDA58 00000000 */ nop
glabel .L800EDA5C
/* 86F0C 800EDA5C 3C038011 */ lui $v1, %hi(D_8010CD38)
/* 86F10 800EDA60 2463CD38 */ addiu $v1, $v1, %lo(D_8010CD38)
/* 86F14 800EDA64 44806000 */ mtc1 $zero, $f12
/* 86F18 800EDA68 3C028011 */ lui $v0, %hi(D_8010CFBC)
/* 86F1C 800EDA6C 8C42CFBC */ lw $v0, %lo(D_8010CFBC)($v0)
/* 86F20 800EDA70 C6220038 */ lwc1 $f2, 0x38($s1)
/* 86F24 800EDA74 C624003C */ lwc1 $f4, 0x3C($s1)
/* 86F28 800EDA78 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 86F2C 800EDA7C C42ACFC0 */ lwc1 $f10, %lo(wPartnerTetherDistance)($at)
/* 86F30 800EDA80 3C0141A0 */ lui $at, (0x41A00000 >> 16)
/* 86F34 800EDA84 44814000 */ mtc1 $at, $f8
/* 86F38 800EDA88 C6200040 */ lwc1 $f0, 0x40($s1)
/* 86F3C 800EDA8C 00021100 */ sll $v0, $v0, 4
/* 86F40 800EDA90 00438021 */ addu $s0, $v0, $v1
/* 86F44 800EDA94 C6160004 */ lwc1 $f22, 0x4($s0)
/* 86F48 800EDA98 C6060008 */ lwc1 $f6, 0x8($s0)
/* 86F4C 800EDA9C C614000C */ lwc1 $f20, 0xC($s0)
/* 86F50 800EDAA0 4608503C */ c.lt.s $f10, $f8
/* 86F54 800EDAA4 E7A20020 */ swc1 $f2, 0x20($sp)
/* 86F58 800EDAA8 E7A40024 */ swc1 $f4, 0x24($sp)
/* 86F5C 800EDAAC E7A00028 */ swc1 $f0, 0x28($sp)
/* 86F60 800EDAB0 3C018010 */ lui $at, %hi(wSavedPartnerPosX)
/* 86F64 800EDAB4 E422833C */ swc1 $f2, %lo(wSavedPartnerPosX)($at)
/* 86F68 800EDAB8 3C018010 */ lui $at, %hi(wSavedPartnerPosY)
/* 86F6C 800EDABC E4248340 */ swc1 $f4, %lo(wSavedPartnerPosY)($at)
/* 86F70 800EDAC0 3C018010 */ lui $at, %hi(wSavedPartnerPosZ)
/* 86F74 800EDAC4 E4208344 */ swc1 $f0, %lo(wSavedPartnerPosZ)($at)
/* 86F78 800EDAC8 45020008 */ bc1fl .L800EDAEC
/* 86F7C 800EDACC 46083000 */ add.s $f0, $f6, $f8
/* 86F80 800EDAD0 460A4081 */ sub.s $f2, $f8, $f10
/* 86F84 800EDAD4 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 86F88 800EDAD8 44810000 */ mtc1 $at, $f0
/* 86F8C 800EDADC 00000000 */ nop
/* 86F90 800EDAE0 46001302 */ mul.s $f12, $f2, $f0
/* 86F94 800EDAE4 00000000 */ nop
/* 86F98 800EDAE8 46083000 */ add.s $f0, $f6, $f8
.L800EDAEC:
/* 86F9C 800EDAEC 460C0000 */ add.s $f0, $f0, $f12
/* 86FA0 800EDAF0 46040001 */ sub.s $f0, $f0, $f4
/* 86FA4 800EDAF4 3C013E00 */ lui $at, (0x3E000000 >> 16)
/* 86FA8 800EDAF8 44811000 */ mtc1 $at, $f2
/* 86FAC 800EDAFC 00000000 */ nop
/* 86FB0 800EDB00 46020002 */ mul.s $f0, $f0, $f2
/* 86FB4 800EDB04 00000000 */ nop
/* 86FB8 800EDB08 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 86FBC 800EDB0C C62C0038 */ lwc1 $f12, 0x38($s1)
/* 86FC0 800EDB10 3C014040 */ lui $at, (0x40400000 >> 16)
/* 86FC4 800EDB14 44811000 */ mtc1 $at, $f2
/* 86FC8 800EDB18 46002000 */ add.s $f0, $f4, $f0
/* 86FCC 800EDB1C E6220018 */ swc1 $f2, 0x18($s1)
/* 86FD0 800EDB20 E620003C */ swc1 $f0, 0x3C($s1)
/* 86FD4 800EDB24 8E660028 */ lw $a2, 0x28($s3)
/* 86FD8 800EDB28 8E670030 */ lw $a3, 0x30($s3)
/* 86FDC 800EDB2C 0C00A7B5 */ jal dist2D
/* 86FE0 800EDB30 E7A00024 */ swc1 $f0, 0x24($sp)
/* 86FE4 800EDB34 3C014049 */ lui $at, (0x40490000 >> 16)
/* 86FE8 800EDB38 44811800 */ mtc1 $at, $f3
/* 86FEC 800EDB3C 44801000 */ mtc1 $zero, $f2
/* 86FF0 800EDB40 46000106 */ mov.s $f4, $f0
/* 86FF4 800EDB44 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 86FF8 800EDB48 46002021 */ cvt.d.s $f0, $f4
/* 86FFC 800EDB4C 4620103E */ c.le.d $f2, $f0
/* 87000 800EDB50 00000000 */ nop
/* 87004 800EDB54 45000033 */ bc1f .L800EDC24
/* 87008 800EDB58 00000000 */ nop
/* 8700C 800EDB5C C622003C */ lwc1 $f2, 0x3C($s1)
/* 87010 800EDB60 C660002C */ lwc1 $f0, 0x2C($s3)
/* 87014 800EDB64 4602003E */ c.le.s $f0, $f2
/* 87018 800EDB68 00000000 */ nop
/* 8701C 800EDB6C 45000029 */ bc1f .L800EDC14
/* 87020 800EDB70 00000000 */ nop
/* 87024 800EDB74 3C013E80 */ lui $at, (0x3E800000 >> 16)
/* 87028 800EDB78 44810000 */ mtc1 $at, $f0
/* 8702C 800EDB7C 00000000 */ nop
/* 87030 800EDB80 46002002 */ mul.s $f0, $f4, $f0
/* 87034 800EDB84 00000000 */ nop
/* 87038 800EDB88 0803B709 */ j .L800EDC24
/* 8703C 800EDB8C E6200018 */ swc1 $f0, 0x18($s1)
.L800EDB90:
/* 87040 800EDB90 3C0140C0 */ lui $at, (0x40C00000 >> 16)
/* 87044 800EDB94 44810000 */ mtc1 $at, $f0
.L800EDB98:
/* 87048 800EDB98 0803B76E */ j .L800EDDB8
/* 8704C 800EDB9C E6200018 */ swc1 $f0, 0x18($s1)
.L800EDBA0:
/* 87050 800EDBA0 C634000C */ lwc1 $f20, 0xC($s1)
/* 87054 800EDBA4 3C028011 */ lui $v0, %hi(wCurrentPartnerId)
/* 87058 800EDBA8 8C42CFD8 */ lw $v0, %lo(wCurrentPartnerId)($v0)
/* 8705C 800EDBAC AE200018 */ sw $zero, 0x18($s1)
/* 87060 800EDBB0 AE200014 */ sw $zero, 0x14($s1)
/* 87064 800EDBB4 000218C0 */ sll $v1, $v0, 3
/* 87068 800EDBB8 00621821 */ addu $v1, $v1, $v0
/* 8706C 800EDBBC 00031880 */ sll $v1, $v1, 2
/* 87070 800EDBC0 3C028010 */ lui $v0, %hi(gPartnerAnimations + 0x14)
/* 87074 800EDBC4 00431021 */ addu $v0, $v0, $v1
/* 87078 800EDBC8 8C42835C */ lw $v0, %lo(gPartnerAnimations + 0x14)($v0)
/* 8707C 800EDBCC 0803B76E */ j .L800EDDB8
/* 87080 800EDBD0 AE220028 */ sw $v0, 0x28($s1)
.L800EDBD4:
/* 87084 800EDBD4 C634000C */ lwc1 $f20, 0xC($s1)
/* 87088 800EDBD8 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 8708C 800EDBDC 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 87090 800EDBE0 AE200018 */ sw $zero, 0x18($s1)
/* 87094 800EDBE4 AE200014 */ sw $zero, 0x14($s1)
/* 87098 800EDBE8 000310C0 */ sll $v0, $v1, 3
/* 8709C 800EDBEC 00431021 */ addu $v0, $v0, $v1
/* 870A0 800EDBF0 00021080 */ sll $v0, $v0, 2
/* 870A4 800EDBF4 3C038010 */ lui $v1, %hi(gPartnerAnimations + 0x14)
/* 870A8 800EDBF8 00621821 */ addu $v1, $v1, $v0
/* 870AC 800EDBFC 8C63835C */ lw $v1, %lo(gPartnerAnimations + 0x14)($v1)
/* 870B0 800EDC00 24020005 */ addiu $v0, $zero, 0x5
/* 870B4 800EDC04 3C018011 */ lui $at, %hi(wPartnerFollowState)
/* 870B8 800EDC08 A422CFC8 */ sh $v0, %lo(wPartnerFollowState)($at)
/* 870BC 800EDC0C 0803B76E */ j .L800EDDB8
/* 870C0 800EDC10 AE230028 */ sw $v1, 0x28($s1)
.L800EDC14:
/* 870C4 800EDC14 3C014100 */ lui $at, (0x41000000 >> 16)
/* 870C8 800EDC18 44810000 */ mtc1 $at, $f0
/* 870CC 800EDC1C 00000000 */ nop
/* 870D0 800EDC20 E6200018 */ swc1 $f0, 0x18($s1)
.L800EDC24:
/* 870D4 800EDC24 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 870D8 800EDC28 C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
/* 870DC 800EDC2C 3C0141A0 */ lui $at, (0x41A00000 >> 16)
/* 870E0 800EDC30 44810000 */ mtc1 $at, $f0
/* 870E4 800EDC34 00000000 */ nop
/* 870E8 800EDC38 4600103C */ c.lt.s $f2, $f0
/* 870EC 800EDC3C 00000000 */ nop
/* 870F0 800EDC40 45000005 */ bc1f .L800EDC58
/* 870F4 800EDC44 00000000 */ nop
/* 870F8 800EDC48 3C014080 */ lui $at, (0x40800000 >> 16)
/* 870FC 800EDC4C 44810000 */ mtc1 $at, $f0
/* 87100 800EDC50 00000000 */ nop
/* 87104 800EDC54 E6200018 */ swc1 $f0, 0x18($s1)
.L800EDC58:
/* 87108 800EDC58 3C128011 */ lui $s2, %hi(D_8010CFBC)
/* 8710C 800EDC5C 2652CFBC */ addiu $s2, $s2, %lo(D_8010CFBC)
/* 87110 800EDC60 3C148011 */ lui $s4, %hi(D_8010CD38)
/* 87114 800EDC64 2694CD38 */ addiu $s4, $s4, %lo(D_8010CD38)
.L800EDC68:
/* 87118 800EDC68 C7AC0020 */ lwc1 $f12, 0x20($sp)
/* 8711C 800EDC6C C7AE0028 */ lwc1 $f14, 0x28($sp)
/* 87120 800EDC70 4406B000 */ mfc1 $a2, $f22
/* 87124 800EDC74 4407A000 */ mfc1 $a3, $f20
/* 87128 800EDC78 0C00A720 */ jal atan2
/* 8712C 800EDC7C 00000000 */ nop
/* 87130 800EDC80 C7AC0020 */ lwc1 $f12, 0x20($sp)
/* 87134 800EDC84 C7AE0028 */ lwc1 $f14, 0x28($sp)
/* 87138 800EDC88 4406B000 */ mfc1 $a2, $f22
/* 8713C 800EDC8C 4407A000 */ mfc1 $a3, $f20
/* 87140 800EDC90 0C00A7B5 */ jal dist2D
/* 87144 800EDC94 46000506 */ mov.s $f20, $f0
/* 87148 800EDC98 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 8714C 800EDC9C C6260018 */ lwc1 $f6, 0x18($s1)
/* 87150 800EDCA0 46000106 */ mov.s $f4, $f0
/* 87154 800EDCA4 4604303C */ c.lt.s $f6, $f4
/* 87158 800EDCA8 00000000 */ nop
/* 8715C 800EDCAC 45000026 */ bc1f .L800EDD48
/* 87160 800EDCB0 00000000 */ nop
/* 87164 800EDCB4 C622003C */ lwc1 $f2, 0x3C($s1)
/* 87168 800EDCB8 C660002C */ lwc1 $f0, 0x2C($s3)
/* 8716C 800EDCBC 4602003E */ c.le.s $f0, $f2
/* 87170 800EDCC0 00000000 */ nop
/* 87174 800EDCC4 45020011 */ bc1fl .L800EDD0C
/* 87178 800EDCC8 460030A1 */ cvt.d.s $f2, $f6
/* 8717C 800EDCCC 3C013E80 */ lui $at, (0x3E800000 >> 16)
/* 87180 800EDCD0 44810000 */ mtc1 $at, $f0
/* 87184 800EDCD4 00000000 */ nop
/* 87188 800EDCD8 46002002 */ mul.s $f0, $f4, $f0
/* 8718C 800EDCDC 00000000 */ nop
/* 87190 800EDCE0 4606003E */ c.le.s $f0, $f6
/* 87194 800EDCE4 00000000 */ nop
/* 87198 800EDCE8 45030033 */ bc1tl .L800EDDB8
/* 8719C 800EDCEC E6200018 */ swc1 $f0, 0x18($s1)
/* 871A0 800EDCF0 3C013D80 */ lui $at, (0x3D800000 >> 16)
/* 871A4 800EDCF4 44810000 */ mtc1 $at, $f0
/* 871A8 800EDCF8 00000000 */ nop
/* 871AC 800EDCFC 46002002 */ mul.s $f0, $f4, $f0
/* 871B0 800EDD00 00000000 */ nop
/* 871B4 800EDD04 0803B6E6 */ j .L800EDB98
/* 871B8 800EDD08 46003000 */ add.s $f0, $f6, $f0
.L800EDD0C:
/* 871BC 800EDD0C 3C014018 */ lui $at, (0x40180000 >> 16)
/* 871C0 800EDD10 44810800 */ mtc1 $at, $f1
/* 871C4 800EDD14 44800000 */ mtc1 $zero, $f0
/* 871C8 800EDD18 00000000 */ nop
/* 871CC 800EDD1C 4622003C */ c.lt.d $f0, $f2
/* 871D0 800EDD20 00000000 */ nop
/* 871D4 800EDD24 4501FF9A */ bc1t .L800EDB90
/* 871D8 800EDD28 00000000 */ nop
/* 871DC 800EDD2C 3C013FF0 */ lui $at, (0x3FF00000 >> 16)
/* 871E0 800EDD30 44810800 */ mtc1 $at, $f1
/* 871E4 800EDD34 44800000 */ mtc1 $zero, $f0
/* 871E8 800EDD38 00000000 */ nop
/* 871EC 800EDD3C 46201000 */ add.d $f0, $f2, $f0
/* 871F0 800EDD40 0803B6E6 */ j .L800EDB98
/* 871F4 800EDD44 46200020 */ cvt.s.d $f0, $f0
.L800EDD48:
/* 871F8 800EDD48 8E430000 */ lw $v1, 0x0($s2)
/* 871FC 800EDD4C 3C028011 */ lui $v0, %hi(gPlayerMoveHistoryIndex)
/* 87200 800EDD50 8C42CFB8 */ lw $v0, %lo(gPlayerMoveHistoryIndex)($v0)
/* 87204 800EDD54 1062FF92 */ beq $v1, $v0, .L800EDBA0
/* 87208 800EDD58 00000000 */ nop
/* 8720C 800EDD5C C62C0038 */ lwc1 $f12, 0x38($s1)
/* 87210 800EDD60 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 87214 800EDD64 8E660028 */ lw $a2, 0x28($s3)
/* 87218 800EDD68 0C00A7B5 */ jal dist2D
/* 8721C 800EDD6C 8E670030 */ lw $a3, 0x30($s3)
/* 87220 800EDD70 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 87224 800EDD74 C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
/* 87228 800EDD78 4602003E */ c.le.s $f0, $f2
/* 8722C 800EDD7C 00000000 */ nop
/* 87230 800EDD80 4501FF94 */ bc1t .L800EDBD4
/* 87234 800EDD84 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 87238 800EDD88 8E420000 */ lw $v0, 0x0($s2)
/* 8723C 800EDD8C 24420001 */ addiu $v0, $v0, 0x1
/* 87240 800EDD90 AE420000 */ sw $v0, 0x0($s2)
/* 87244 800EDD94 28420028 */ slti $v0, $v0, 0x28
/* 87248 800EDD98 50400001 */ beql $v0, $zero, .L800EDDA0
/* 8724C 800EDD9C AE400000 */ sw $zero, 0x0($s2)
.L800EDDA0:
/* 87250 800EDDA0 8E420000 */ lw $v0, 0x0($s2)
/* 87254 800EDDA4 00021100 */ sll $v0, $v0, 4
/* 87258 800EDDA8 00548021 */ addu $s0, $v0, $s4
/* 8725C 800EDDAC C6160004 */ lwc1 $f22, 0x4($s0)
/* 87260 800EDDB0 0803B71A */ j .L800EDC68
/* 87264 800EDDB4 C614000C */ lwc1 $f20, 0xC($s0)
.L800EDDB8:
/* 87268 800EDDB8 8E250018 */ lw $a1, 0x18($s1)
/* 8726C 800EDDBC 4406A000 */ mfc1 $a2, $f20
/* 87270 800EDDC0 0220202D */ daddu $a0, $s1, $zero
/* 87274 800EDDC4 0C00EA95 */ jal npc_move_heading
/* 87278 800EDDC8 AE26000C */ sw $a2, 0xC($s1)
/* 8727C 800EDDCC 8E220000 */ lw $v0, 0x0($s1)
/* 87280 800EDDD0 30424000 */ andi $v0, $v0, 0x4000
/* 87284 800EDDD4 104002E4 */ beqz $v0, .L800EE968
/* 87288 800EDDD8 24020001 */ addiu $v0, $zero, 0x1
/* 8728C 800EDDDC 3C018011 */ lui $at, %hi(wPartnerFollowState)
/* 87290 800EDDE0 A422CFC8 */ sh $v0, %lo(wPartnerFollowState)($at)
/* 87294 800EDDE4 0803BA5A */ j .L800EE968
/* 87298 800EDDE8 00000000 */ nop
glabel .L800EDDEC
/* 8729C 800EDDEC 3C048011 */ lui $a0, %hi(D_8010CFBC)
/* 872A0 800EDDF0 2484CFBC */ addiu $a0, $a0, %lo(D_8010CFBC)
/* 872A4 800EDDF4 8C830000 */ lw $v1, 0x0($a0)
/* 872A8 800EDDF8 3C028011 */ lui $v0, %hi(gPlayerMoveHistoryIndex)
/* 872AC 800EDDFC 8C42CFB8 */ lw $v0, %lo(gPlayerMoveHistoryIndex)($v0)
/* 872B0 800EDE00 106202D9 */ beq $v1, $v0, .L800EE968
/* 872B4 800EDE04 24620001 */ addiu $v0, $v1, 0x1
/* 872B8 800EDE08 AC820000 */ sw $v0, 0x0($a0)
/* 872BC 800EDE0C 28420028 */ slti $v0, $v0, 0x28
/* 872C0 800EDE10 50400001 */ beql $v0, $zero, .L800EDE18
/* 872C4 800EDE14 AC800000 */ sw $zero, 0x0($a0)
.L800EDE18:
/* 872C8 800EDE18 3C038011 */ lui $v1, %hi(D_8010CD38)
/* 872CC 800EDE1C 2463CD38 */ addiu $v1, $v1, %lo(D_8010CD38)
/* 872D0 800EDE20 8C820000 */ lw $v0, 0x0($a0)
/* 872D4 800EDE24 3C013FA6 */ lui $at, (0x3FA66666 >> 16)
/* 872D8 800EDE28 34216666 */ ori $at, $at, (0x3FA66666 & 0xFFFF)
/* 872DC 800EDE2C 44810000 */ mtc1 $at, $f0
/* 872E0 800EDE30 00021100 */ sll $v0, $v0, 4
/* 872E4 800EDE34 00438021 */ addu $s0, $v0, $v1
/* 872E8 800EDE38 C6160004 */ lwc1 $f22, 0x4($s0)
/* 872EC 800EDE3C C6060008 */ lwc1 $f6, 0x8($s0)
/* 872F0 800EDE40 C614000C */ lwc1 $f20, 0xC($s0)
/* 872F4 800EDE44 3C108011 */ lui $s0, %hi(wPartnerFollowState)
/* 872F8 800EDE48 2610CFC8 */ addiu $s0, $s0, %lo(wPartnerFollowState)
/* 872FC 800EDE4C A620008E */ sh $zero, 0x8E($s1)
/* 87300 800EDE50 E6200014 */ swc1 $f0, 0x14($s1)
/* 87304 800EDE54 E6360060 */ swc1 $f22, 0x60($s1)
/* 87308 800EDE58 E6260064 */ swc1 $f6, 0x64($s1)
/* 8730C 800EDE5C E6340068 */ swc1 $f20, 0x68($s1)
/* 87310 800EDE60 86020000 */ lh $v0, 0x0($s0)
/* 87314 800EDE64 24120001 */ addiu $s2, $zero, 0x1
/* 87318 800EDE68 14520005 */ bne $v0, $s2, .L800EDE80
/* 8731C 800EDE6C 00000000 */ nop
/* 87320 800EDE70 3C0140C0 */ lui $at, (0x40C00000 >> 16)
/* 87324 800EDE74 44810000 */ mtc1 $at, $f0
/* 87328 800EDE78 00000000 */ nop
/* 8732C 800EDE7C E6200018 */ swc1 $f0, 0x18($s1)
.L800EDE80:
/* 87330 800EDE80 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 87334 800EDE84 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 87338 800EDE88 8E260060 */ lw $a2, 0x60($s1)
/* 8733C 800EDE8C 0C00A7B5 */ jal dist2D
/* 87340 800EDE90 8E270068 */ lw $a3, 0x68($s1)
/* 87344 800EDE94 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 87348 800EDE98 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 8734C 800EDE9C 8E260060 */ lw $a2, 0x60($s1)
/* 87350 800EDEA0 8E270068 */ lw $a3, 0x68($s1)
/* 87354 800EDEA4 0C00A720 */ jal atan2
/* 87358 800EDEA8 E6200010 */ swc1 $f0, 0x10($s1)
/* 8735C 800EDEAC E620000C */ swc1 $f0, 0xC($s1)
/* 87360 800EDEB0 C6200010 */ lwc1 $f0, 0x10($s1)
/* 87364 800EDEB4 3C014049 */ lui $at, (0x40490000 >> 16)
/* 87368 800EDEB8 44811800 */ mtc1 $at, $f3
/* 8736C 800EDEBC 44801000 */ mtc1 $zero, $f2
/* 87370 800EDEC0 46000021 */ cvt.d.s $f0, $f0
/* 87374 800EDEC4 4620103C */ c.lt.d $f2, $f0
/* 87378 800EDEC8 00000000 */ nop
/* 8737C 800EDECC 45000005 */ bc1f .L800EDEE4
/* 87380 800EDED0 00000000 */ nop
/* 87384 800EDED4 3C014248 */ lui $at, (0x42480000 >> 16)
/* 87388 800EDED8 44810000 */ mtc1 $at, $f0
/* 8738C 800EDEDC 00000000 */ nop
/* 87390 800EDEE0 E6200010 */ swc1 $f0, 0x10($s1)
.L800EDEE4:
/* 87394 800EDEE4 C6220064 */ lwc1 $f2, 0x64($s1)
/* 87398 800EDEE8 C620003C */ lwc1 $f0, 0x3C($s1)
/* 8739C 800EDEEC 46001101 */ sub.s $f4, $f2, $f0
/* 873A0 800EDEF0 C6200010 */ lwc1 $f0, 0x10($s1)
/* 873A4 800EDEF4 46000086 */ mov.s $f2, $f0
/* 873A8 800EDEF8 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 873AC 800EDEFC 4604103C */ c.lt.s $f2, $f4
/* 873B0 800EDF00 00000000 */ nop
/* 873B4 800EDF04 45000002 */ bc1f .L800EDF10
/* 873B8 800EDF08 E7A40024 */ swc1 $f4, 0x24($sp)
/* 873BC 800EDF0C E7A4002C */ swc1 $f4, 0x2C($sp)
.L800EDF10:
/* 873C0 800EDF10 86020000 */ lh $v0, 0x0($s0)
/* 873C4 800EDF14 14520026 */ bne $v0, $s2, .L800EDFB0
/* 873C8 800EDF18 2402000A */ addiu $v0, $zero, 0xA
/* 873CC 800EDF1C 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 873D0 800EDF20 C420CFC0 */ lwc1 $f0, %lo(wPartnerTetherDistance)($at)
/* 873D4 800EDF24 C7A2002C */ lwc1 $f2, 0x2C($sp)
/* 873D8 800EDF28 4600103C */ c.lt.s $f2, $f0
/* 873DC 800EDF2C 00000000 */ nop
/* 873E0 800EDF30 4500000B */ bc1f .L800EDF60
/* 873E4 800EDF34 00000000 */ nop
/* 873E8 800EDF38 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 873EC 800EDF3C C62E0040 */ lwc1 $f14, 0x40($s1)
/* 873F0 800EDF40 AE20001C */ sw $zero, 0x1C($s1)
/* 873F4 800EDF44 8E660028 */ lw $a2, 0x28($s3)
/* 873F8 800EDF48 0C00A720 */ jal atan2
/* 873FC 800EDF4C 8E670030 */ lw $a3, 0x30($s3)
/* 87400 800EDF50 24020005 */ addiu $v0, $zero, 0x5
/* 87404 800EDF54 E620000C */ swc1 $f0, 0xC($s1)
/* 87408 800EDF58 0803BA5A */ j .L800EE968
/* 8740C 800EDF5C A6020000 */ sh $v0, 0x0($s0)
.L800EDF60:
/* 87410 800EDF60 C6200018 */ lwc1 $f0, 0x18($s1)
/* 87414 800EDF64 46001003 */ div.s $f0, $f2, $f0
/* 87418 800EDF68 4600040D */ trunc.w.s $f16, $f0
/* 8741C 800EDF6C 44028000 */ mfc1 $v0, $f16
/* 87420 800EDF70 00000000 */ nop
/* 87424 800EDF74 A622008E */ sh $v0, 0x8E($s1)
/* 87428 800EDF78 00021400 */ sll $v0, $v0, 16
/* 8742C 800EDF7C 00021403 */ sra $v0, $v0, 16
/* 87430 800EDF80 2842000A */ slti $v0, $v0, 0xA
/* 87434 800EDF84 10400002 */ beqz $v0, .L800EDF90
/* 87438 800EDF88 2402000A */ addiu $v0, $zero, 0xA
/* 8743C 800EDF8C A622008E */ sh $v0, 0x8E($s1)
.L800EDF90:
/* 87440 800EDF90 8622008E */ lh $v0, 0x8E($s1)
/* 87444 800EDF94 C6200010 */ lwc1 $f0, 0x10($s1)
/* 87448 800EDF98 44821000 */ mtc1 $v0, $f2
/* 8744C 800EDF9C 00000000 */ nop
/* 87450 800EDFA0 468010A0 */ cvt.s.w $f2, $f2
/* 87454 800EDFA4 46020003 */ div.s $f0, $f0, $f2
/* 87458 800EDFA8 0803B7ED */ j .L800EDFB4
/* 8745C 800EDFAC E6200018 */ swc1 $f0, 0x18($s1)
.L800EDFB0:
/* 87460 800EDFB0 A622008E */ sh $v0, 0x8E($s1)
.L800EDFB4:
/* 87464 800EDFB4 8622008E */ lh $v0, 0x8E($s1)
/* 87468 800EDFB8 C6220014 */ lwc1 $f2, 0x14($s1)
/* 8746C 800EDFBC 44822000 */ mtc1 $v0, $f4
/* 87470 800EDFC0 00000000 */ nop
/* 87474 800EDFC4 46802120 */ cvt.s.w $f4, $f4
/* 87478 800EDFC8 46041082 */ mul.s $f2, $f2, $f4
/* 8747C 800EDFCC 00000000 */ nop
/* 87480 800EDFD0 46041082 */ mul.s $f2, $f2, $f4
/* 87484 800EDFD4 00000000 */ nop
/* 87488 800EDFD8 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 8748C 800EDFDC 44810000 */ mtc1 $at, $f0
/* 87490 800EDFE0 00000000 */ nop
/* 87494 800EDFE4 46001082 */ mul.s $f2, $f2, $f0
/* 87498 800EDFE8 00000000 */ nop
/* 8749C 800EDFEC C7A00024 */ lwc1 $f0, 0x24($sp)
/* 874A0 800EDFF0 46020000 */ add.s $f0, $f0, $f2
/* 874A4 800EDFF4 3C014034 */ lui $at, (0x40340000 >> 16)
/* 874A8 800EDFF8 44811800 */ mtc1 $at, $f3
/* 874AC 800EDFFC 44801000 */ mtc1 $zero, $f2
/* 874B0 800EE000 46040003 */ div.s $f0, $f0, $f4
/* 874B4 800EE004 E620001C */ swc1 $f0, 0x1C($s1)
/* 874B8 800EE008 46000021 */ cvt.d.s $f0, $f0
/* 874BC 800EE00C 4620103C */ c.lt.d $f2, $f0
/* 874C0 800EE010 00000000 */ nop
/* 874C4 800EE014 45000005 */ bc1f .L800EE02C
/* 874C8 800EE018 00000000 */ nop
/* 874CC 800EE01C 3C0141A0 */ lui $at, (0x41A00000 >> 16)
/* 874D0 800EE020 44810000 */ mtc1 $at, $f0
/* 874D4 800EE024 00000000 */ nop
/* 874D8 800EE028 E620001C */ swc1 $f0, 0x1C($s1)
.L800EE02C:
/* 874DC 800EE02C 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 874E0 800EE030 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 874E4 800EE034 C6200038 */ lwc1 $f0, 0x38($s1)
/* 874E8 800EE038 C622003C */ lwc1 $f2, 0x3C($s1)
/* 874EC 800EE03C C6240040 */ lwc1 $f4, 0x40($s1)
/* 874F0 800EE040 000310C0 */ sll $v0, $v1, 3
/* 874F4 800EE044 00431021 */ addu $v0, $v0, $v1
/* 874F8 800EE048 00021080 */ sll $v0, $v0, 2
/* 874FC 800EE04C 3C038010 */ lui $v1, %hi(gPartnerAnimations + 0x8)
/* 87500 800EE050 00621821 */ addu $v1, $v1, $v0
/* 87504 800EE054 8C638350 */ lw $v1, %lo(gPartnerAnimations + 0x8)($v1)
/* 87508 800EE058 24020002 */ addiu $v0, $zero, 0x2
/* 8750C 800EE05C 3C018011 */ lui $at, %hi(wPartnerFollowState)
/* 87510 800EE060 A422CFC8 */ sh $v0, %lo(wPartnerFollowState)($at)
/* 87514 800EE064 E6200060 */ swc1 $f0, 0x60($s1)
/* 87518 800EE068 E6220064 */ swc1 $f2, 0x64($s1)
/* 8751C 800EE06C E6240068 */ swc1 $f4, 0x68($s1)
/* 87520 800EE070 0803BA5A */ j .L800EE968
/* 87524 800EE074 AE230028 */ sw $v1, 0x28($s1)
glabel .L800EE078
/* 87528 800EE078 C620001C */ lwc1 $f0, 0x1C($s1)
/* 8752C 800EE07C C6220014 */ lwc1 $f2, 0x14($s1)
/* 87530 800EE080 46020001 */ sub.s $f0, $f0, $f2
/* 87534 800EE084 C622003C */ lwc1 $f2, 0x3C($s1)
/* 87538 800EE088 46001080 */ add.s $f2, $f2, $f0
/* 8753C 800EE08C 4480A000 */ mtc1 $zero, $f20
/* 87540 800EE090 00000000 */ nop
/* 87544 800EE094 4614003E */ c.le.s $f0, $f20
/* 87548 800EE098 E620001C */ swc1 $f0, 0x1C($s1)
/* 8754C 800EE09C 4500000A */ bc1f .L800EE0C8
/* 87550 800EE0A0 E622003C */ swc1 $f2, 0x3C($s1)
/* 87554 800EE0A4 3C028011 */ lui $v0, %hi(wCurrentPartnerId)
/* 87558 800EE0A8 8C42CFD8 */ lw $v0, %lo(wCurrentPartnerId)($v0)
/* 8755C 800EE0AC 000218C0 */ sll $v1, $v0, 3
/* 87560 800EE0B0 00621821 */ addu $v1, $v1, $v0
/* 87564 800EE0B4 00031880 */ sll $v1, $v1, 2
/* 87568 800EE0B8 3C028010 */ lui $v0, %hi(gPartnerAnimations + 0xC)
/* 8756C 800EE0BC 00431021 */ addu $v0, $v0, $v1
/* 87570 800EE0C0 8C428354 */ lw $v0, %lo(gPartnerAnimations + 0xC)($v0)
/* 87574 800EE0C4 AE220028 */ sw $v0, 0x28($s1)
.L800EE0C8:
/* 87578 800EE0C8 8E250018 */ lw $a1, 0x18($s1)
/* 8757C 800EE0CC 8E26000C */ lw $a2, 0xC($s1)
/* 87580 800EE0D0 0C00EA95 */ jal npc_move_heading
/* 87584 800EE0D4 0220202D */ daddu $a0, $s1, $zero
/* 87588 800EE0D8 C620001C */ lwc1 $f0, 0x1C($s1)
/* 8758C 800EE0DC 4614003E */ c.le.s $f0, $f20
/* 87590 800EE0E0 00000000 */ nop
/* 87594 800EE0E4 45000220 */ bc1f .L800EE968
/* 87598 800EE0E8 00000000 */ nop
/* 8759C 800EE0EC C622003C */ lwc1 $f2, 0x3C($s1)
/* 875A0 800EE0F0 C6200064 */ lwc1 $f0, 0x64($s1)
/* 875A4 800EE0F4 4600103C */ c.lt.s $f2, $f0
/* 875A8 800EE0F8 00000000 */ nop
/* 875AC 800EE0FC 4500021A */ bc1f .L800EE968
/* 875B0 800EE100 00000000 */ nop
/* 875B4 800EE104 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 875B8 800EE108 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 875BC 800EE10C 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 875C0 800EE110 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 875C4 800EE114 000310C0 */ sll $v0, $v1, 3
/* 875C8 800EE118 00431021 */ addu $v0, $v0, $v1
/* 875CC 800EE11C 00021080 */ sll $v0, $v0, 2
/* 875D0 800EE120 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x10)
/* 875D4 800EE124 00220821 */ addu $at, $at, $v0
/* 875D8 800EE128 8C228358 */ lw $v0, %lo(gPartnerAnimations + 0x10)($at)
/* 875DC 800EE12C E634001C */ swc1 $f20, 0x1C($s1)
/* 875E0 800EE130 E620003C */ swc1 $f0, 0x3C($s1)
/* 875E4 800EE134 AE220028 */ sw $v0, 0x28($s1)
/* 875E8 800EE138 8E660028 */ lw $a2, 0x28($s3)
/* 875EC 800EE13C 0C00A720 */ jal atan2
/* 875F0 800EE140 8E670030 */ lw $a3, 0x30($s3)
/* 875F4 800EE144 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 875F8 800EE148 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 875FC 800EE14C 8E260060 */ lw $a2, 0x60($s1)
/* 87600 800EE150 8E270068 */ lw $a3, 0x68($s1)
/* 87604 800EE154 3C108011 */ lui $s0, %hi(wPartnerFollowState)
/* 87608 800EE158 2610CFC8 */ addiu $s0, $s0, %lo(wPartnerFollowState)
/* 8760C 800EE15C E620000C */ swc1 $f0, 0xC($s1)
/* 87610 800EE160 0C00A7B5 */ jal dist2D
/* 87614 800EE164 A6000000 */ sh $zero, 0x0($s0)
/* 87618 800EE168 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 8761C 800EE16C C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
/* 87620 800EE170 4602003C */ c.lt.s $f0, $f2
/* 87624 800EE174 00000000 */ nop
/* 87628 800EE178 450001FB */ bc1f .L800EE968
/* 8762C 800EE17C E7A0002C */ swc1 $f0, 0x2C($sp)
/* 87630 800EE180 2402000F */ addiu $v0, $zero, 0xF
/* 87634 800EE184 0803BA5A */ j .L800EE968
/* 87638 800EE188 A6020000 */ sh $v0, 0x0($s0)
glabel .L800EE18C
/* 8763C 800EE18C 3C038011 */ lui $v1, %hi(D_8010CD38)
/* 87640 800EE190 2463CD38 */ addiu $v1, $v1, %lo(D_8010CD38)
/* 87644 800EE194 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 87648 800EE198 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 8764C 800EE19C 8E660028 */ lw $a2, 0x28($s3)
/* 87650 800EE1A0 8E670030 */ lw $a3, 0x30($s3)
/* 87654 800EE1A4 3C028011 */ lui $v0, %hi(D_8010CFBC)
/* 87658 800EE1A8 8C42CFBC */ lw $v0, %lo(D_8010CFBC)($v0)
/* 8765C 800EE1AC C622003C */ lwc1 $f2, 0x3C($s1)
/* 87660 800EE1B0 00021100 */ sll $v0, $v0, 4
/* 87664 800EE1B4 00438021 */ addu $s0, $v0, $v1
/* 87668 800EE1B8 46006006 */ mov.s $f0, $f12
/* 8766C 800EE1BC C6160004 */ lwc1 $f22, 0x4($s0)
/* 87670 800EE1C0 C614000C */ lwc1 $f20, 0xC($s0)
/* 87674 800EE1C4 46007106 */ mov.s $f4, $f14
/* 87678 800EE1C8 E7A00020 */ swc1 $f0, 0x20($sp)
/* 8767C 800EE1CC E7A20024 */ swc1 $f2, 0x24($sp)
/* 87680 800EE1D0 0C00A7B5 */ jal dist2D
/* 87684 800EE1D4 E7A40028 */ swc1 $f4, 0x28($sp)
/* 87688 800EE1D8 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 8768C 800EE1DC C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
/* 87690 800EE1E0 4602003E */ c.le.s $f0, $f2
/* 87694 800EE1E4 00000000 */ nop
/* 87698 800EE1E8 450000A5 */ bc1f .L800EE480
/* 8769C 800EE1EC E7A0002C */ swc1 $f0, 0x2C($sp)
/* 876A0 800EE1F0 3C048011 */ lui $a0, %hi(D_8010CFCA)
/* 876A4 800EE1F4 2484CFCA */ addiu $a0, $a0, %lo(D_8010CFCA)
/* 876A8 800EE1F8 84820000 */ lh $v0, 0x0($a0)
/* 876AC 800EE1FC 1440002D */ bnez $v0, .L800EE2B4
/* 876B0 800EE200 00000000 */ nop
/* 876B4 800EE204 962200A8 */ lhu $v0, 0xA8($s1)
/* 876B8 800EE208 C660002C */ lwc1 $f0, 0x2C($s3)
/* 876BC 800EE20C 00021400 */ sll $v0, $v0, 16
/* 876C0 800EE210 00021C03 */ sra $v1, $v0, 16
/* 876C4 800EE214 000217C2 */ srl $v0, $v0, 31
/* 876C8 800EE218 00621821 */ addu $v1, $v1, $v0
/* 876CC 800EE21C 866200B0 */ lh $v0, 0xB0($s3)
/* 876D0 800EE220 00031843 */ sra $v1, $v1, 1
/* 876D4 800EE224 00431023 */ subu $v0, $v0, $v1
/* 876D8 800EE228 44821000 */ mtc1 $v0, $f2
/* 876DC 800EE22C 00000000 */ nop
/* 876E0 800EE230 468010A0 */ cvt.s.w $f2, $f2
/* 876E4 800EE234 46020000 */ add.s $f0, $f0, $f2
/* 876E8 800EE238 C622003C */ lwc1 $f2, 0x3C($s1)
/* 876EC 800EE23C 46020001 */ sub.s $f0, $f0, $f2
/* 876F0 800EE240 3C013FA0 */ lui $at, (0x3FA00000 >> 16)
/* 876F4 800EE244 44811800 */ mtc1 $at, $f3
/* 876F8 800EE248 44801000 */ mtc1 $zero, $f2
/* 876FC 800EE24C 46000021 */ cvt.d.s $f0, $f0
/* 87700 800EE250 46220002 */ mul.d $f0, $f0, $f2
/* 87704 800EE254 00000000 */ nop
/* 87708 800EE258 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 8770C 800EE25C 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 87710 800EE260 000310C0 */ sll $v0, $v1, 3
/* 87714 800EE264 00431021 */ addu $v0, $v0, $v1
/* 87718 800EE268 C7A20024 */ lwc1 $f2, 0x24($sp)
/* 8771C 800EE26C 00021080 */ sll $v0, $v0, 2
/* 87720 800EE270 460010A1 */ cvt.d.s $f2, $f2
/* 87724 800EE274 46201080 */ add.d $f2, $f2, $f0
/* 87728 800EE278 AE200018 */ sw $zero, 0x18($s1)
/* 8772C 800EE27C AE200014 */ sw $zero, 0x14($s1)
/* 87730 800EE280 462010A0 */ cvt.s.d $f2, $f2
/* 87734 800EE284 E622003C */ swc1 $f2, 0x3C($s1)
/* 87738 800EE288 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x14)
/* 8773C 800EE28C 00220821 */ addu $at, $at, $v0
/* 87740 800EE290 8C22835C */ lw $v0, %lo(gPartnerAnimations + 0x14)($at)
/* 87744 800EE294 E7A20024 */ swc1 $f2, 0x24($sp)
/* 87748 800EE298 AE220028 */ sw $v0, 0x28($s1)
/* 8774C 800EE29C 826300B4 */ lb $v1, 0xB4($s3)
/* 87750 800EE2A0 2402000C */ addiu $v0, $zero, 0xC
/* 87754 800EE2A4 50620076 */ beql $v1, $v0, .L800EE480
/* 87758 800EE2A8 A4800000 */ sh $zero, 0x0($a0)
/* 8775C 800EE2AC 0803B920 */ j .L800EE480
/* 87760 800EE2B0 00000000 */ nop
.L800EE2B4:
/* 87764 800EE2B4 C66200A8 */ lwc1 $f2, 0xA8($s3)
/* 87768 800EE2B8 3C014334 */ lui $at, (0x43340000 >> 16)
/* 8776C 800EE2BC 44810000 */ mtc1 $at, $f0
/* 87770 800EE2C0 C64C006C */ lwc1 $f12, 0x6C($s2)
/* 87774 800EE2C4 4600103C */ c.lt.s $f2, $f0
/* 87778 800EE2C8 3C01C2B4 */ lui $at, (0xC2B40000 >> 16)
/* 8777C 800EE2CC 44810000 */ mtc1 $at, $f0
/* 87780 800EE2D0 45000003 */ bc1f .L800EE2E0
/* 87784 800EE2D4 00000000 */ nop
/* 87788 800EE2D8 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 8778C 800EE2DC 44810000 */ mtc1 $at, $f0
.L800EE2E0:
/* 87790 800EE2E0 0C00A6C9 */ jal clamp_angle
/* 87794 800EE2E4 46006300 */ add.s $f12, $f12, $f0
/* 87798 800EE2E8 44070000 */ mfc1 $a3, $f0
/* 8779C 800EE2EC C6600028 */ lwc1 $f0, 0x28($s3)
/* 877A0 800EE2F0 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 877A4 800EE2F4 C424CFC0 */ lwc1 $f4, %lo(wPartnerTetherDistance)($at)
/* 877A8 800EE2F8 26240060 */ addiu $a0, $s1, 0x60
/* 877AC 800EE2FC E6200060 */ swc1 $f0, 0x60($s1)
/* 877B0 800EE300 3C014120 */ lui $at, (0x41200000 >> 16)
/* 877B4 800EE304 44810000 */ mtc1 $at, $f0
/* 877B8 800EE308 C662002C */ lwc1 $f2, 0x2C($s3)
/* 877BC 800EE30C 46002101 */ sub.s $f4, $f4, $f0
/* 877C0 800EE310 E6220064 */ swc1 $f2, 0x64($s1)
/* 877C4 800EE314 C6600030 */ lwc1 $f0, 0x30($s3)
/* 877C8 800EE318 44062000 */ mfc1 $a2, $f4
/* 877CC 800EE31C 26250068 */ addiu $a1, $s1, 0x68
/* 877D0 800EE320 0C00A7E7 */ jal add_vec2D_polar
/* 877D4 800EE324 E6200068 */ swc1 $f0, 0x68($s1)
/* 877D8 800EE328 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 877DC 800EE32C C62E0040 */ lwc1 $f14, 0x40($s1)
/* 877E0 800EE330 8E260060 */ lw $a2, 0x60($s1)
/* 877E4 800EE334 0C00A720 */ jal atan2
/* 877E8 800EE338 8E270068 */ lw $a3, 0x68($s1)
/* 877EC 800EE33C C62C0038 */ lwc1 $f12, 0x38($s1)
/* 877F0 800EE340 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 877F4 800EE344 8E260060 */ lw $a2, 0x60($s1)
/* 877F8 800EE348 8E270068 */ lw $a3, 0x68($s1)
/* 877FC 800EE34C 0C00A7B5 */ jal dist2D
/* 87800 800EE350 46000506 */ mov.s $f20, $f0
/* 87804 800EE354 3C014000 */ lui $at, (0x40000000 >> 16)
/* 87808 800EE358 44811000 */ mtc1 $at, $f2
/* 8780C 800EE35C E7A0002C */ swc1 $f0, 0x2C($sp)
/* 87810 800EE360 4600103C */ c.lt.s $f2, $f0
/* 87814 800EE364 00000000 */ nop
/* 87818 800EE368 45000022 */ bc1f .L800EE3F4
/* 8781C 800EE36C E6220018 */ swc1 $f2, 0x18($s1)
/* 87820 800EE370 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 87824 800EE374 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 87828 800EE378 3C048010 */ lui $a0, %hi(gPartnerAnimations)
/* 8782C 800EE37C 24848348 */ addiu $a0, $a0, %lo(gPartnerAnimations)
/* 87830 800EE380 E634000C */ swc1 $f20, 0xC($s1)
/* 87834 800EE384 000310C0 */ sll $v0, $v1, 3
/* 87838 800EE388 00431021 */ addu $v0, $v0, $v1
/* 8783C 800EE38C 00021080 */ sll $v0, $v0, 2
/* 87840 800EE390 00442021 */ addu $a0, $v0, $a0
/* 87844 800EE394 8E220000 */ lw $v0, 0x0($s1)
/* 87848 800EE398 8C830018 */ lw $v1, 0x18($a0)
/* 8784C 800EE39C 30424000 */ andi $v0, $v0, 0x4000
/* 87850 800EE3A0 14400004 */ bnez $v0, .L800EE3B4
/* 87854 800EE3A4 AE230028 */ sw $v1, 0x28($s1)
/* 87858 800EE3A8 3C018010 */ lui $at, %hi(D_800F803A)
/* 8785C 800EE3AC 0803B919 */ j .L800EE464
/* 87860 800EE3B0 A420803A */ sh $zero, %lo(D_800F803A)($at)
.L800EE3B4:
/* 87864 800EE3B4 3C038010 */ lui $v1, %hi(D_800F803A)
/* 87868 800EE3B8 2463803A */ addiu $v1, $v1, %lo(D_800F803A)
/* 8786C 800EE3BC 94620000 */ lhu $v0, 0x0($v1)
/* 87870 800EE3C0 24420001 */ addiu $v0, $v0, 0x1
/* 87874 800EE3C4 A4620000 */ sh $v0, 0x0($v1)
/* 87878 800EE3C8 00021400 */ sll $v0, $v0, 16
/* 8787C 800EE3CC 00021403 */ sra $v0, $v0, 16
/* 87880 800EE3D0 2842000B */ slti $v0, $v0, 0xB
/* 87884 800EE3D4 14400023 */ bnez $v0, .L800EE464
/* 87888 800EE3D8 00000000 */ nop
/* 8788C 800EE3DC C6740080 */ lwc1 $f20, 0x80($s3)
/* 87890 800EE3E0 AE200018 */ sw $zero, 0x18($s1)
/* 87894 800EE3E4 AE200014 */ sw $zero, 0x14($s1)
/* 87898 800EE3E8 E6340034 */ swc1 $f20, 0x34($s1)
/* 8789C 800EE3EC 0803B90E */ j .L800EE438
/* 878A0 800EE3F0 8C820014 */ lw $v0, 0x14($a0)
.L800EE3F4:
/* 878A4 800EE3F4 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 878A8 800EE3F8 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 878AC 800EE3FC 8E660028 */ lw $a2, 0x28($s3)
/* 878B0 800EE400 0C00A720 */ jal atan2
/* 878B4 800EE404 8E670030 */ lw $a3, 0x30($s3)
/* 878B8 800EE408 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 878BC 800EE40C 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 878C0 800EE410 46000506 */ mov.s $f20, $f0
/* 878C4 800EE414 E634000C */ swc1 $f20, 0xC($s1)
/* 878C8 800EE418 AE200018 */ sw $zero, 0x18($s1)
/* 878CC 800EE41C AE200014 */ sw $zero, 0x14($s1)
/* 878D0 800EE420 000310C0 */ sll $v0, $v1, 3
/* 878D4 800EE424 00431021 */ addu $v0, $v0, $v1
/* 878D8 800EE428 00021080 */ sll $v0, $v0, 2
/* 878DC 800EE42C 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x14)
/* 878E0 800EE430 00220821 */ addu $at, $at, $v0
/* 878E4 800EE434 8C22835C */ lw $v0, %lo(gPartnerAnimations + 0x14)($at)
.L800EE438:
/* 878E8 800EE438 3C048011 */ lui $a0, %hi(D_8010CFCA)
/* 878EC 800EE43C 2484CFCA */ addiu $a0, $a0, %lo(D_8010CFCA)
/* 878F0 800EE440 AE220028 */ sw $v0, 0x28($s1)
/* 878F4 800EE444 84830000 */ lh $v1, 0x0($a0)
/* 878F8 800EE448 24020002 */ addiu $v0, $zero, 0x2
/* 878FC 800EE44C 10620004 */ beq $v1, $v0, .L800EE460
/* 87900 800EE450 2402000C */ addiu $v0, $zero, 0xC
/* 87904 800EE454 826300B4 */ lb $v1, 0xB4($s3)
/* 87908 800EE458 14620002 */ bne $v1, $v0, .L800EE464
/* 8790C 800EE45C 00000000 */ nop
.L800EE460:
/* 87910 800EE460 A4800000 */ sh $zero, 0x0($a0)
.L800EE464:
/* 87914 800EE464 8E250018 */ lw $a1, 0x18($s1)
/* 87918 800EE468 4406A000 */ mfc1 $a2, $f20
/* 8791C 800EE46C 0220202D */ daddu $a0, $s1, $zero
/* 87920 800EE470 0C00EA95 */ jal npc_move_heading
/* 87924 800EE474 AC86000C */ sw $a2, 0xC($a0)
/* 87928 800EE478 0803BA5A */ j .L800EE968
/* 8792C 800EE47C 00000000 */ nop
.L800EE480:
/* 87930 800EE480 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 87934 800EE484 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 87938 800EE488 8E660028 */ lw $a2, 0x28($s3)
/* 8793C 800EE48C 0C00A7B5 */ jal dist2D
/* 87940 800EE490 8E670030 */ lw $a3, 0x30($s3)
/* 87944 800EE494 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
/* 87948 800EE498 C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
/* 8794C 800EE49C 4602003E */ c.le.s $f0, $f2
/* 87950 800EE4A0 00000000 */ nop
/* 87954 800EE4A4 45010130 */ bc1t .L800EE968
/* 87958 800EE4A8 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 8795C 800EE4AC 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 87960 800EE4B0 4481C000 */ mtc1 $at, $f24
/* 87964 800EE4B4 3C128011 */ lui $s2, %hi(D_8010CFBC)
/* 87968 800EE4B8 2652CFBC */ addiu $s2, $s2, %lo(D_8010CFBC)
/* 8796C 800EE4BC 3C148011 */ lui $s4, %hi(D_8010CD38)
/* 87970 800EE4C0 2694CD38 */ addiu $s4, $s4, %lo(D_8010CD38)
.L800EE4C4:
/* 87974 800EE4C4 82020000 */ lb $v0, 0x0($s0)
/* 87978 800EE4C8 14400024 */ bnez $v0, .L800EE55C
/* 8797C 800EE4CC 00000000 */ nop
/* 87980 800EE4D0 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 87984 800EE4D4 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 87988 800EE4D8 4406B000 */ mfc1 $a2, $f22
/* 8798C 800EE4DC 4407A000 */ mfc1 $a3, $f20
/* 87990 800EE4E0 0C00A720 */ jal atan2
/* 87994 800EE4E4 00000000 */ nop
/* 87998 800EE4E8 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 8799C 800EE4EC C62E0040 */ lwc1 $f14, 0x40($s1)
/* 879A0 800EE4F0 8E660028 */ lw $a2, 0x28($s3)
/* 879A4 800EE4F4 8E670030 */ lw $a3, 0x30($s3)
/* 879A8 800EE4F8 0C00A720 */ jal atan2
/* 879AC 800EE4FC 46000506 */ mov.s $f20, $f0
/* 879B0 800EE500 4600A306 */ mov.s $f12, $f20
/* 879B4 800EE504 0C00A70A */ jal get_clamped_angle_diff
/* 879B8 800EE508 46000386 */ mov.s $f14, $f0
/* 879BC 800EE50C 46000005 */ abs.s $f0, $f0
/* 879C0 800EE510 4618003C */ c.lt.s $f0, $f24
/* 879C4 800EE514 00000000 */ nop
/* 879C8 800EE518 45010010 */ bc1t .L800EE55C
/* 879CC 800EE51C 00000000 */ nop
/* 879D0 800EE520 8E430000 */ lw $v1, 0x0($s2)
/* 879D4 800EE524 3C028011 */ lui $v0, %hi(gPlayerMoveHistoryIndex)
/* 879D8 800EE528 8C42CFB8 */ lw $v0, %lo(gPlayerMoveHistoryIndex)($v0)
/* 879DC 800EE52C 1062000B */ beq $v1, $v0, .L800EE55C
/* 879E0 800EE530 24620001 */ addiu $v0, $v1, 0x1
/* 879E4 800EE534 AE420000 */ sw $v0, 0x0($s2)
/* 879E8 800EE538 28420028 */ slti $v0, $v0, 0x28
/* 879EC 800EE53C 50400001 */ beql $v0, $zero, .L800EE544
/* 879F0 800EE540 AE400000 */ sw $zero, 0x0($s2)
.L800EE544:
/* 879F4 800EE544 8E420000 */ lw $v0, 0x0($s2)
/* 879F8 800EE548 00021100 */ sll $v0, $v0, 4
/* 879FC 800EE54C 00548021 */ addu $s0, $v0, $s4
/* 87A00 800EE550 C6160004 */ lwc1 $f22, 0x4($s0)
/* 87A04 800EE554 0803B931 */ j .L800EE4C4
/* 87A08 800EE558 C614000C */ lwc1 $f20, 0xC($s0)
.L800EE55C:
/* 87A0C 800EE55C 3C018011 */ lui $at, %hi(wPartnerFollowState)
/* 87A10 800EE560 A420CFC8 */ sh $zero, %lo(wPartnerFollowState)($at)
/* 87A14 800EE564 0803BA5A */ j .L800EE968
/* 87A18 800EE568 00000000 */ nop
glabel .L800EE56C
/* 87A1C 800EE56C 8E620004 */ lw $v0, 0x4($s3)
/* 87A20 800EE570 3C030010 */ lui $v1, (0x100000 >> 16)
/* 87A24 800EE574 00431024 */ and $v0, $v0, $v1
/* 87A28 800EE578 144000FB */ bnez $v0, .L800EE968
/* 87A2C 800EE57C 00000000 */ nop
/* 87A30 800EE580 3C038011 */ lui $v1, %hi(D_8010CFCE)
/* 87A34 800EE584 8463CFCE */ lh $v1, %lo(D_8010CFCE)($v1)
/* 87A38 800EE588 10600006 */ beqz $v1, .L800EE5A4
/* 87A3C 800EE58C 00000000 */ nop
/* 87A40 800EE590 24020001 */ addiu $v0, $zero, 0x1
/* 87A44 800EE594 10620048 */ beq $v1, $v0, .L800EE6B8
/* 87A48 800EE598 00000000 */ nop
/* 87A4C 800EE59C 0803BA5A */ j .L800EE968
/* 87A50 800EE5A0 00000000 */ nop
.L800EE5A4:
/* 87A54 800EE5A4 0C0394D2 */ jal func_800E5348
/* 87A58 800EE5A8 00000000 */ nop
/* 87A5C 800EE5AC 3C014334 */ lui $at, (0x43340000 >> 16)
/* 87A60 800EE5B0 44816000 */ mtc1 $at, $f12
/* 87A64 800EE5B4 0C00A6C9 */ jal clamp_angle
/* 87A68 800EE5B8 460C0300 */ add.s $f12, $f0, $f12
/* 87A6C 800EE5BC C6620028 */ lwc1 $f2, 0x28($s3)
/* 87A70 800EE5C0 E6220060 */ swc1 $f2, 0x60($s1)
/* 87A74 800EE5C4 C662002C */ lwc1 $f2, 0x2C($s3)
/* 87A78 800EE5C8 E6220064 */ swc1 $f2, 0x64($s1)
/* 87A7C 800EE5CC C6620030 */ lwc1 $f2, 0x30($s3)
/* 87A80 800EE5D0 26240060 */ addiu $a0, $s1, 0x60
/* 87A84 800EE5D4 E6220068 */ swc1 $f2, 0x68($s1)
/* 87A88 800EE5D8 866200B2 */ lh $v0, 0xB2($s3)
/* 87A8C 800EE5DC 44070000 */ mfc1 $a3, $f0
/* 87A90 800EE5E0 44828000 */ mtc1 $v0, $f16
/* 87A94 800EE5E4 00000000 */ nop
/* 87A98 800EE5E8 46808420 */ cvt.s.w $f16, $f16
/* 87A9C 800EE5EC 44068000 */ mfc1 $a2, $f16
/* 87AA0 800EE5F0 0C00A7E7 */ jal add_vec2D_polar
/* 87AA4 800EE5F4 26250068 */ addiu $a1, $s1, 0x68
/* 87AA8 800EE5F8 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 87AAC 800EE5FC C62E0040 */ lwc1 $f14, 0x40($s1)
/* 87AB0 800EE600 8E260060 */ lw $a2, 0x60($s1)
/* 87AB4 800EE604 0C00A7B5 */ jal dist2D
/* 87AB8 800EE608 8E270068 */ lw $a3, 0x68($s1)
/* 87ABC 800EE60C 3C018010 */ lui $at, %hi(wPartnerMoveTime)
/* 87AC0 800EE610 C422802C */ lwc1 $f2, %lo(wPartnerMoveTime)($at)
/* 87AC4 800EE614 468010A0 */ cvt.s.w $f2, $f2
/* 87AC8 800EE618 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 87ACC 800EE61C 46020003 */ div.s $f0, $f0, $f2
/* 87AD0 800EE620 3C018010 */ lui $at, %hi(wPartnerMoveSpeed)
/* 87AD4 800EE624 E4208030 */ swc1 $f0, %lo(wPartnerMoveSpeed)($at)
/* 87AD8 800EE628 E6200018 */ swc1 $f0, 0x18($s1)
/* 87ADC 800EE62C 46000021 */ cvt.d.s $f0, $f0
/* 87AE0 800EE630 26240028 */ addiu $a0, $s1, 0x28
/* 87AE4 800EE634 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 87AE8 800EE638 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 87AEC 800EE63C 3C014010 */ lui $at, (0x40100000 >> 16)
/* 87AF0 800EE640 44811800 */ mtc1 $at, $f3
/* 87AF4 800EE644 44801000 */ mtc1 $zero, $f2
/* 87AF8 800EE648 000310C0 */ sll $v0, $v1, 3
/* 87AFC 800EE64C 00431021 */ addu $v0, $v0, $v1
/* 87B00 800EE650 4622003C */ c.lt.d $f0, $f2
/* 87B04 800EE654 00000000 */ nop
/* 87B08 800EE658 45000003 */ bc1f .L800EE668
/* 87B0C 800EE65C 00021080 */ sll $v0, $v0, 2
/* 87B10 800EE660 0803B99B */ j .L800EE66C
/* 87B14 800EE664 24430004 */ addiu $v1, $v0, 0x4
.L800EE668:
/* 87B18 800EE668 24430018 */ addiu $v1, $v0, 0x18
.L800EE66C:
/* 87B1C 800EE66C 3C028010 */ lui $v0, %hi(gPartnerAnimations)
/* 87B20 800EE670 24428348 */ addiu $v0, $v0, %lo(gPartnerAnimations)
/* 87B24 800EE674 00431021 */ addu $v0, $v0, $v1
/* 87B28 800EE678 8C420000 */ lw $v0, 0x0($v0)
/* 87B2C 800EE67C AC820000 */ sw $v0, 0x0($a0)
/* 87B30 800EE680 C62C0038 */ lwc1 $f12, 0x38($s1)
/* 87B34 800EE684 C62E0040 */ lwc1 $f14, 0x40($s1)
/* 87B38 800EE688 8E260060 */ lw $a2, 0x60($s1)
/* 87B3C 800EE68C 0C00A720 */ jal atan2
/* 87B40 800EE690 8E270068 */ lw $a3, 0x68($s1)
/* 87B44 800EE694 3C038011 */ lui $v1, %hi(D_8010CFCE)
/* 87B48 800EE698 2463CFCE */ addiu $v1, $v1, %lo(D_8010CFCE)
/* 87B4C 800EE69C 94620000 */ lhu $v0, 0x0($v1)
/* 87B50 800EE6A0 46000506 */ mov.s $f20, $f0
/* 87B54 800EE6A4 3C018010 */ lui $at, %hi(D_800F8034)
/* 87B58 800EE6A8 E4348034 */ swc1 $f20, %lo(D_800F8034)($at)
/* 87B5C 800EE6AC E634000C */ swc1 $f20, 0xC($s1)
/* 87B60 800EE6B0 24420001 */ addiu $v0, $v0, 0x1
/* 87B64 800EE6B4 A4620000 */ sh $v0, 0x0($v1)
.L800EE6B8:
/* 87B68 800EE6B8 3C098010 */ lui $t1, %hi(wPartnerMoveTime)
/* 87B6C 800EE6BC 2529802C */ addiu $t1, $t1, %lo(wPartnerMoveTime)
/* 87B70 800EE6C0 8D280000 */ lw $t0, 0x0($t1)
/* 87B74 800EE6C4 1100007E */ beqz $t0, .L800EE8C0
/* 87B78 800EE6C8 3C040001 */ lui $a0, (0x10000 >> 16)
/* 87B7C 800EE6CC 27A50020 */ addiu $a1, $sp, 0x20
/* 87B80 800EE6D0 C6220038 */ lwc1 $f2, 0x38($s1)
/* 87B84 800EE6D4 862200A8 */ lh $v0, 0xA8($s1)
/* 87B88 800EE6D8 C6200040 */ lwc1 $f0, 0x40($s1)
/* 87B8C 800EE6DC 27A60024 */ addiu $a2, $sp, 0x24
/* 87B90 800EE6E0 E7A00028 */ swc1 $f0, 0x28($sp)
/* 87B94 800EE6E4 44820000 */ mtc1 $v0, $f0
/* 87B98 800EE6E8 00000000 */ nop
/* 87B9C 800EE6EC 46800020 */ cvt.s.w $f0, $f0
/* 87BA0 800EE6F0 E7A20020 */ swc1 $f2, 0x20($sp)
/* 87BA4 800EE6F4 862200A8 */ lh $v0, 0xA8($s1)
/* 87BA8 800EE6F8 C622003C */ lwc1 $f2, 0x3C($s1)
/* 87BAC 800EE6FC 24420001 */ addiu $v0, $v0, 0x1
/* 87BB0 800EE700 46001080 */ add.s $f2, $f2, $f0
/* 87BB4 800EE704 44820000 */ mtc1 $v0, $f0
/* 87BB8 800EE708 00000000 */ nop
/* 87BBC 800EE70C 46800020 */ cvt.s.w $f0, $f0
/* 87BC0 800EE710 27A2002C */ addiu $v0, $sp, 0x2C
/* 87BC4 800EE714 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 87BC8 800EE718 E7A20024 */ swc1 $f2, 0x24($sp)
/* 87BCC 800EE71C AFA20010 */ sw $v0, 0x10($sp)
/* 87BD0 800EE720 C620000C */ lwc1 $f0, 0xC($s1)
/* 87BD4 800EE724 27A70028 */ addiu $a3, $sp, 0x28
/* 87BD8 800EE728 E7A00014 */ swc1 $f0, 0x14($sp)
/* 87BDC 800EE72C 862300A6 */ lh $v1, 0xA6($s1)
/* 87BE0 800EE730 2502FFFF */ addiu $v0, $t0, -0x1
/* 87BE4 800EE734 AD220000 */ sw $v0, 0x0($t1)
/* 87BE8 800EE738 44830000 */ mtc1 $v1, $f0
/* 87BEC 800EE73C 00000000 */ nop
/* 87BF0 800EE740 46800020 */ cvt.s.w $f0, $f0
/* 87BF4 800EE744 0C0371DE */ jal npc_raycast_down_around
/* 87BF8 800EE748 E7A00018 */ swc1 $f0, 0x18($sp)
/* 87BFC 800EE74C 14400017 */ bnez $v0, .L800EE7AC
/* 87C00 800EE750 00000000 */ nop
/* 87C04 800EE754 C624003C */ lwc1 $f4, 0x3C($s1)
/* 87C08 800EE758 C666002C */ lwc1 $f6, 0x2C($s3)
/* 87C0C 800EE75C 862200A8 */ lh $v0, 0xA8($s1)
/* 87C10 800EE760 46062001 */ sub.s $f0, $f4, $f6
/* 87C14 800EE764 24420005 */ addiu $v0, $v0, 0x5
/* 87C18 800EE768 44821000 */ mtc1 $v0, $f2
/* 87C1C 800EE76C 00000000 */ nop
/* 87C20 800EE770 468010A1 */ cvt.d.w $f2, $f2
/* 87C24 800EE774 46000021 */ cvt.d.s $f0, $f0
/* 87C28 800EE778 46200005 */ abs.d $f0, $f0
/* 87C2C 800EE77C 4620103C */ c.lt.d $f2, $f0
/* 87C30 800EE780 00000000 */ nop
/* 87C34 800EE784 45000018 */ bc1f .L800EE7E8
/* 87C38 800EE788 00000000 */ nop
/* 87C3C 800EE78C 46043001 */ sub.s $f0, $f6, $f4
/* 87C40 800EE790 3C014120 */ lui $at, (0x41200000 >> 16)
/* 87C44 800EE794 44811000 */ mtc1 $at, $f2
/* 87C48 800EE798 00000000 */ nop
/* 87C4C 800EE79C 46020003 */ div.s $f0, $f0, $f2
/* 87C50 800EE7A0 46002000 */ add.s $f0, $f4, $f0
/* 87C54 800EE7A4 0803B9FA */ j .L800EE7E8
/* 87C58 800EE7A8 E620003C */ swc1 $f0, 0x3C($s1)
.L800EE7AC:
/* 87C5C 800EE7AC 866200B0 */ lh $v0, 0xB0($s3)
/* 87C60 800EE7B0 C660002C */ lwc1 $f0, 0x2C($s3)
/* 87C64 800EE7B4 44821000 */ mtc1 $v0, $f2
/* 87C68 800EE7B8 00000000 */ nop
/* 87C6C 800EE7BC 468010A0 */ cvt.s.w $f2, $f2
/* 87C70 800EE7C0 46020000 */ add.s $f0, $f0, $f2
/* 87C74 800EE7C4 C622003C */ lwc1 $f2, 0x3C($s1)
/* 87C78 800EE7C8 46020001 */ sub.s $f0, $f0, $f2
/* 87C7C 800EE7CC 3C013E00 */ lui $at, (0x3E000000 >> 16)
/* 87C80 800EE7D0 44812000 */ mtc1 $at, $f4
/* 87C84 800EE7D4 00000000 */ nop
/* 87C88 800EE7D8 46040002 */ mul.s $f0, $f0, $f4
/* 87C8C 800EE7DC 00000000 */ nop
/* 87C90 800EE7E0 46001080 */ add.s $f2, $f2, $f0
/* 87C94 800EE7E4 E622003C */ swc1 $f2, 0x3C($s1)
.L800EE7E8:
/* 87C98 800EE7E8 3C018010 */ lui $at, %hi(wPartnerMoveSpeed)
/* 87C9C 800EE7EC C4208030 */ lwc1 $f0, %lo(wPartnerMoveSpeed)($at)
/* 87CA0 800EE7F0 C6220038 */ lwc1 $f2, 0x38($s1)
/* 87CA4 800EE7F4 C624003C */ lwc1 $f4, 0x3C($s1)
/* 87CA8 800EE7F8 C6260040 */ lwc1 $f6, 0x40($s1)
/* 87CAC 800EE7FC E6200018 */ swc1 $f0, 0x18($s1)
/* 87CB0 800EE800 3C018010 */ lui $at, %hi(D_800F8034)
/* 87CB4 800EE804 C4208034 */ lwc1 $f0, %lo(D_800F8034)($at)
/* 87CB8 800EE808 C6280018 */ lwc1 $f8, 0x18($s1)
/* 87CBC 800EE80C 0000202D */ daddu $a0, $zero, $zero
/* 87CC0 800EE810 E620000C */ swc1 $f0, 0xC($s1)
/* 87CC4 800EE814 E7A20020 */ swc1 $f2, 0x20($sp)
/* 87CC8 800EE818 E7A40024 */ swc1 $f4, 0x24($sp)
/* 87CCC 800EE81C E7A60028 */ swc1 $f6, 0x28($sp)
/* 87CD0 800EE820 E7A80010 */ swc1 $f8, 0x10($sp)
/* 87CD4 800EE824 C620000C */ lwc1 $f0, 0xC($s1)
/* 87CD8 800EE828 27A50020 */ addiu $a1, $sp, 0x20
/* 87CDC 800EE82C E7A00014 */ swc1 $f0, 0x14($sp)
/* 87CE0 800EE830 862200A8 */ lh $v0, 0xA8($s1)
/* 87CE4 800EE834 27A60024 */ addiu $a2, $sp, 0x24
/* 87CE8 800EE838 44820000 */ mtc1 $v0, $f0
/* 87CEC 800EE83C 00000000 */ nop
/* 87CF0 800EE840 46800020 */ cvt.s.w $f0, $f0
/* 87CF4 800EE844 E7A00018 */ swc1 $f0, 0x18($sp)
/* 87CF8 800EE848 862200A6 */ lh $v0, 0xA6($s1)
/* 87CFC 800EE84C 27A70028 */ addiu $a3, $sp, 0x28
/* 87D00 800EE850 44820000 */ mtc1 $v0, $f0
/* 87D04 800EE854 00000000 */ nop
/* 87D08 800EE858 46800020 */ cvt.s.w $f0, $f0
/* 87D0C 800EE85C 0C0376B9 */ jal npc_test_move_taller_with_slipping
/* 87D10 800EE860 E7A0001C */ swc1 $f0, 0x1C($sp)
/* 87D14 800EE864 10400010 */ beqz $v0, .L800EE8A8
/* 87D18 800EE868 00000000 */ nop
/* 87D1C 800EE86C C7A00020 */ lwc1 $f0, 0x20($sp)
/* 87D20 800EE870 C6260038 */ lwc1 $f6, 0x38($s1)
/* 87D24 800EE874 C7A20028 */ lwc1 $f2, 0x28($sp)
/* 87D28 800EE878 46060001 */ sub.s $f0, $f0, $f6
/* 87D2C 800EE87C C6240040 */ lwc1 $f4, 0x40($s1)
/* 87D30 800EE880 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 87D34 800EE884 44814000 */ mtc1 $at, $f8
/* 87D38 800EE888 46041081 */ sub.s $f2, $f2, $f4
/* 87D3C 800EE88C 46080003 */ div.s $f0, $f0, $f8
/* 87D40 800EE890 46003180 */ add.s $f6, $f6, $f0
/* 87D44 800EE894 46081083 */ div.s $f2, $f2, $f8
/* 87D48 800EE898 46022100 */ add.s $f4, $f4, $f2
/* 87D4C 800EE89C E6260038 */ swc1 $f6, 0x38($s1)
/* 87D50 800EE8A0 0803BA5A */ j .L800EE968
/* 87D54 800EE8A4 E6240040 */ swc1 $f4, 0x40($s1)
.L800EE8A8:
/* 87D58 800EE8A8 8E250018 */ lw $a1, 0x18($s1)
/* 87D5C 800EE8AC 8E26000C */ lw $a2, 0xC($s1)
/* 87D60 800EE8B0 0C00EA95 */ jal npc_move_heading
/* 87D64 800EE8B4 0220202D */ daddu $a0, $s1, $zero
/* 87D68 800EE8B8 0803BA5A */ j .L800EE968
/* 87D6C 800EE8BC 00000000 */ nop
.L800EE8C0:
/* 87D70 800EE8C0 0C03BD17 */ jal partner_clear_player_tracking
/* 87D74 800EE8C4 0220202D */ daddu $a0, $s1, $zero
/* 87D78 800EE8C8 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 87D7C 800EE8CC 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 87D80 800EE8D0 3C014387 */ lui $at, (0x43870000 >> 16)
/* 87D84 800EE8D4 44810000 */ mtc1 $at, $f0
/* 87D88 800EE8D8 AE200018 */ sw $zero, 0x18($s1)
/* 87D8C 800EE8DC AE200014 */ sw $zero, 0x14($s1)
/* 87D90 800EE8E0 000310C0 */ sll $v0, $v1, 3
/* 87D94 800EE8E4 00431021 */ addu $v0, $v0, $v1
/* 87D98 800EE8E8 00021080 */ sll $v0, $v0, 2
/* 87D9C 800EE8EC 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x14)
/* 87DA0 800EE8F0 00220821 */ addu $at, $at, $v0
/* 87DA4 800EE8F4 8C22835C */ lw $v0, %lo(gPartnerAnimations + 0x14)($at)
/* 87DA8 800EE8F8 AE220028 */ sw $v0, 0x28($s1)
/* 87DAC 800EE8FC C64C006C */ lwc1 $f12, 0x6C($s2)
/* 87DB0 800EE900 46006300 */ add.s $f12, $f12, $f0
/* 87DB4 800EE904 C66000A8 */ lwc1 $f0, 0xA8($s3)
/* 87DB8 800EE908 3C018011 */ lui $at, %hi(wPartnerFollowState)
/* 87DBC 800EE90C A420CFC8 */ sh $zero, %lo(wPartnerFollowState)($at)
/* 87DC0 800EE910 3C018011 */ lui $at, %hi(D_8010CFCA)
/* 87DC4 800EE914 A420CFCA */ sh $zero, %lo(D_8010CFCA)($at)
/* 87DC8 800EE918 3C018011 */ lui $at, %hi(D_8010CFCE)
/* 87DCC 800EE91C A420CFCE */ sh $zero, %lo(D_8010CFCE)($at)
/* 87DD0 800EE920 0C00A6C9 */ jal clamp_angle
/* 87DD4 800EE924 46006301 */ sub.s $f12, $f12, $f0
/* 87DD8 800EE928 0803BA5A */ j .L800EE968
/* 87DDC 800EE92C E620000C */ swc1 $f0, 0xC($s1)
glabel .L800EE930
/* 87DE0 800EE930 0220202D */ daddu $a0, $s1, $zero
/* 87DE4 800EE934 0C03BE0B */ jal partner_move_to_goal
/* 87DE8 800EE938 24050001 */ addiu $a1, $zero, 0x1
/* 87DEC 800EE93C 0803BA5A */ j .L800EE968
/* 87DF0 800EE940 00000000 */ nop
glabel .L800EE944
/* 87DF4 800EE944 3C028011 */ lui $v0, %hi(wCurrentPartnerId)
/* 87DF8 800EE948 8C42CFD8 */ lw $v0, %lo(wCurrentPartnerId)($v0)
/* 87DFC 800EE94C 000218C0 */ sll $v1, $v0, 3
/* 87E00 800EE950 00621821 */ addu $v1, $v1, $v0
/* 87E04 800EE954 00031880 */ sll $v1, $v1, 2
/* 87E08 800EE958 3C028010 */ lui $v0, %hi(gPartnerAnimations + 0x14)
/* 87E0C 800EE95C 00431021 */ addu $v0, $v0, $v1
/* 87E10 800EE960 8C42835C */ lw $v0, %lo(gPartnerAnimations + 0x14)($v0)
/* 87E14 800EE964 AE220028 */ sw $v0, 0x28($s1)
glabel .L800EE968
/* 87E18 800EE968 8FBF0044 */ lw $ra, 0x44($sp)
/* 87E1C 800EE96C 8FB40040 */ lw $s4, 0x40($sp)
/* 87E20 800EE970 8FB3003C */ lw $s3, 0x3C($sp)
/* 87E24 800EE974 8FB20038 */ lw $s2, 0x38($sp)
/* 87E28 800EE978 8FB10034 */ lw $s1, 0x34($sp)
/* 87E2C 800EE97C 8FB00030 */ lw $s0, 0x30($sp)
/* 87E30 800EE980 D7B80058 */ ldc1 $f24, 0x58($sp)
/* 87E34 800EE984 D7B60050 */ ldc1 $f22, 0x50($sp)
/* 87E38 800EE988 D7B40048 */ ldc1 $f20, 0x48($sp)
/* 87E3C 800EE98C 03E00008 */ jr $ra
/* 87E40 800EE990 27BD0060 */ addiu $sp, $sp, 0x60
### DECOMPILED C INSTRUCTIONS:
void partner_flying_follow_player(Npc* partner) {
PlayerStatus* playerStatus = &gPlayerStatus;
Camera* camera = &gCameras[CAM_DEFAULT];
f32 x, y, z;
f32 distance;
f32 yaw;
f32 temp_a3;
f32 temp_f0_15;
f32 var_f12;
f32 moveHistoryX, moveHistoryY, moveHistoryZ;
PlayerPathElement* currentSnapshot;
switch (wPartnerFollowState) {
case 0:
var_f12 = 0.0f;
x = partner->pos.x;
y = partner->pos.y;
z = partner->pos.z;
wSavedPartnerPosX = x;
wSavedPartnerPosY = y;
wSavedPartnerPosZ = z;
currentSnapshot = &gPlayerMoveHistory[D_8010CFBC];
moveHistoryX = currentSnapshot->pos.x;
moveHistoryY = currentSnapshot->pos.y;
moveHistoryZ = currentSnapshot->pos.z;
if (wPartnerTetherDistance < 20.0f) {
var_f12 = (20.0f - wPartnerTetherDistance) * 0.5f;
}
partner->pos.y = y + (moveHistoryY + 20.0f + var_f12 - y) * 0.125f;
partner->moveSpeed = 3.0f;
y = partner->pos.y;
distance = dist2D(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
if (distance >= 50.0) {
if (partner->pos.y >= playerStatus->position.y) {
partner->moveSpeed = distance * 0.25f;
} else {
partner->moveSpeed = 8.0f;
}
}
if (wPartnerTetherDistance < 20.0f) {
partner->moveSpeed = 4.0f;
}
while (TRUE) {
yaw = atan2(x, z, moveHistoryX, moveHistoryZ);
distance = dist2D(x, z, moveHistoryX, moveHistoryZ);
if (partner->moveSpeed < distance) {
if (partner->pos.y >= playerStatus->position.y) {
if (partner->moveSpeed >= distance * 0.25f) {
partner->moveSpeed = distance * 0.25f;
} else {
partner->moveSpeed += distance * 0.0625f;
}
} else {
if (partner->moveSpeed > 6.0) {
partner->moveSpeed = 6.0f;
} else {
partner->moveSpeed += 1.0;
}
}
break;
}
if (D_8010CFBC == gPlayerMoveHistoryIndex) {
yaw = partner->yaw;
partner->moveSpeed = 0.0f;
partner->jumpScale = 0.0f;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
break;
}
distance = dist2D(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
if (distance <= wPartnerTetherDistance) {
wPartnerFollowState = 5;
yaw = partner->yaw;
partner->moveSpeed = 0.0f;
partner->jumpScale = 0.0f;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
break;
}
D_8010CFBC++;
if (D_8010CFBC >= 40) {
D_8010CFBC = 0;
}
currentSnapshot = &gPlayerMoveHistory[D_8010CFBC];
moveHistoryX = currentSnapshot->pos.x;
moveHistoryZ = currentSnapshot->pos.z;
}
partner->yaw = yaw;
npc_move_heading(partner, partner->moveSpeed, yaw);
if (partner->flags & 0x4000) {
wPartnerFollowState = 1;
return;
}
break;
case 1:
case 3:
if (D_8010CFBC != gPlayerMoveHistoryIndex) {
D_8010CFBC++;
if (D_8010CFBC >= 40) {
D_8010CFBC = 0;
}
currentSnapshot = &gPlayerMoveHistory[D_8010CFBC];
moveHistoryX = currentSnapshot->pos.x;
moveHistoryY = currentSnapshot->pos.y;
moveHistoryZ = currentSnapshot->pos.z;
partner->moveToPos.x = moveHistoryX;
partner->moveToPos.y = moveHistoryY;
partner->moveToPos.z = moveHistoryZ;
partner->duration = 0;
partner->jumpScale = 1.3f;
if (wPartnerFollowState == 1) {
partner->moveSpeed = 6.0f;
}
partner->planarFlyDist = dist2D(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
partner->yaw = atan2(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
if (partner->planarFlyDist > 50.0) {
partner->planarFlyDist = 50.0f;
}
distance = partner->planarFlyDist;
y = partner->moveToPos.y - partner->pos.y;
if (partner->planarFlyDist < y) {
distance = y;
}
if (wPartnerFollowState == 1) {
if (distance < wPartnerTetherDistance) {
partner->jumpVelocity = 0.0f;
partner->yaw = atan2(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
wPartnerFollowState = 5;
return;
}
partner->duration = distance / partner->moveSpeed;
if (partner->duration < 10) {
partner->duration = 10;
}
partner->moveSpeed = partner->planarFlyDist / partner->duration;
} else {
partner->duration = 10;
}
partner->jumpVelocity = (y + (partner->jumpScale * partner->duration * partner->duration * 0.5f)) / partner->duration;
if (partner->jumpVelocity > 20.0) {
partner->jumpVelocity = 20.0f;
}
wPartnerFollowState = 2;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].jump;
partner->moveToPos.x = partner->pos.x;
partner->moveToPos.y = partner->pos.y;
partner->moveToPos.z = partner->pos.z;
}
break;
case 2:
partner->jumpVelocity -= partner->jumpScale;
partner->pos.y += partner->jumpVelocity;
if (partner->jumpVelocity <= 0.0f) {
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].fall;
}
npc_move_heading(partner, partner->moveSpeed, partner->yaw);
if (partner->jumpVelocity <= 0.0f) {
if (partner->pos.y < partner->moveToPos.y) {
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].fly;
partner->jumpVelocity = 0.0f;
partner->pos.y = partner->moveToPos.y;
partner->yaw = atan2(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
wPartnerFollowState = 0;
distance = dist2D(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
if (distance < wPartnerTetherDistance) {
wPartnerFollowState = 15;
}
}
}
break;
case 5:
x = partner->pos.x;
y = partner->pos.y;
z = partner->pos.z;
currentSnapshot = &gPlayerMoveHistory[D_8010CFBC];
moveHistoryX = currentSnapshot->pos.x;
moveHistoryZ = currentSnapshot->pos.z;
distance = dist2D(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
if (distance <= wPartnerTetherDistance) {
if (D_8010CFCA == 0) {
partner->pos.y = y + (((playerStatus->position.y + (playerStatus->colliderHeight - partner->collisionHeight / 2)) - partner->pos.y) * 0.03125);
y = partner->pos.y;
partner->moveSpeed = 0.0f;
partner->jumpScale = 0.0f;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
if (playerStatus->actionState == ACTION_STATE_TALK) {
D_8010CFCA = 0;
}
} else {
temp_a3 = clamp_angle(camera->currentYaw + (playerStatus->spriteFacingAngle < 180.0f ? 90.0f : -90.0f));
partner->moveToPos.x = playerStatus->position.x;
partner->moveToPos.y = playerStatus->position.y;
partner->moveToPos.z = playerStatus->position.z;
add_vec2D_polar(&partner->moveToPos.x, &partner->moveToPos.z, wPartnerTetherDistance - 10.0f, temp_a3);
yaw = atan2(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
distance = dist2D(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
partner->moveSpeed = 2.0f;
if (distance > 2.0f) {
partner->yaw = yaw;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].run;
if (!(partner->flags & NPC_FLAG_COLLDING_FORWARD_WITH_WORLD)) {
D_800F803A = 0;
} else {
D_800F803A++;
if (D_800F803A > 10) {
yaw = playerStatus->targetYaw;
partner->moveSpeed = 0.0f;
partner->jumpScale = 0.0f;
partner->renderYaw = yaw;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
if (D_8010CFCA == 2 || playerStatus->actionState == ACTION_STATE_TALK) {
D_8010CFCA = 0;
}
}
}
} else {
yaw = atan2(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
partner->yaw = yaw;
partner->moveSpeed = 0.0f;
partner->jumpScale = 0.0f;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
if (D_8010CFCA == 2 || playerStatus->actionState == ACTION_STATE_TALK) {
D_8010CFCA = 0;
}
}
partner->yaw = yaw;
npc_move_heading(partner, partner->moveSpeed, yaw);
return;
}
}
distance = dist2D(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z);
if (!(distance <= wPartnerTetherDistance)) {
while (TRUE) {
if (!currentSnapshot->isJumping) {
yaw = atan2(partner->pos.x, partner->pos.z, moveHistoryX, moveHistoryZ);
if (!(fabsf(get_clamped_angle_diff(yaw, atan2(partner->pos.x, partner->pos.z, playerStatus->position.x, playerStatus->position.z))) < 90.0f)) {
if (D_8010CFBC != gPlayerMoveHistoryIndex) {
D_8010CFBC++;
if (D_8010CFBC >= 40) {
D_8010CFBC = 0;
}
currentSnapshot = &gPlayerMoveHistory[D_8010CFBC];
moveHistoryX = currentSnapshot->pos.x;
moveHistoryZ = currentSnapshot->pos.z;
continue;
}
}
}
break;
}
wPartnerFollowState = 0;
}
break;
case 15:
if (!(playerStatus->animFlags & PA_FLAG_CHANGING_MAP)) {
switch (D_8010CFCE) {
case 0:
temp_f0_15 = clamp_angle(func_800E5348() + 180.0f);
partner->moveToPos.x = playerStatus->position.x;
partner->moveToPos.y = playerStatus->position.y;
partner->moveToPos.z = playerStatus->position.z;
add_vec2D_polar(&partner->moveToPos.x, &partner->moveToPos.z, playerStatus->colliderDiameter, temp_f0_15);
distance = dist2D(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
partner->moveSpeed = wPartnerMoveSpeed = distance / wPartnerMoveTime;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].anims[(partner->moveSpeed < 4.0) ? PARTNER_ANIM_INDEX_WALK : PARTNER_ANIM_INDEX_RUN];
yaw = atan2(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
partner->yaw = D_800F8034 = yaw;
D_8010CFCE++;
// fallthrough
case 1:
if (wPartnerMoveTime != 0) {
x = partner->pos.x;
y = partner->pos.y + partner->collisionHeight;
z = partner->pos.z;
distance = partner->collisionHeight + 1;
wPartnerMoveTime--;
if (npc_raycast_down_around(COLLISION_CHANNEL_10000, &x, &y, &z, &distance, partner->yaw, partner->collisionDiameter) == 0) {
if (partner->collisionHeight + 5 < fabs((partner->pos.y - playerStatus->position.y))) {
partner->pos.y += (playerStatus->position.y - partner->pos.y) / 10.0f;
}
} else {
partner->pos.y += (((playerStatus->position.y + playerStatus->colliderHeight) - partner->pos.y) * 0.125f);
}
partner->moveSpeed = wPartnerMoveSpeed;
partner->yaw = D_800F8034;
x = partner->pos.x;
y = partner->pos.y;
z = partner->pos.z;
if (npc_test_move_taller_with_slipping(0, &x, &y, &z, partner->moveSpeed, partner->yaw, partner->collisionHeight, partner->collisionDiameter)) {
partner->pos.x += (x - partner->pos.x) / 5.0f;
partner->pos.z += (z - partner->pos.z) / 5.0f;
} else {
npc_move_heading(partner, partner->moveSpeed, partner->yaw);
}
return;
}
partner_clear_player_tracking(partner);
partner->moveSpeed = 0.0f;
partner->jumpScale = 0.0f;
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
wPartnerFollowState = 0;
D_8010CFCA = 0;
D_8010CFCE = 0;
partner->yaw = clamp_angle((camera->currentYaw + 270.0f) - playerStatus->spriteFacingAngle);
}
}
break;
case 20:
partner_move_to_goal(partner, TRUE);
break;
case 40:
partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
break;
case 50:
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel popup_menu_draw_menu_contents
/* 8CB30 800F3680 27BDFFA8 */ addiu $sp, $sp, -0x58
/* 8CB34 800F3684 3C038011 */ lui $v1, %hi(gPopupState)
/* 8CB38 800F3688 8C63D640 */ lw $v1, %lo(gPopupState)($v1)
/* 8CB3C 800F368C 2402000A */ addiu $v0, $zero, 0xA
/* 8CB40 800F3690 AFBF0054 */ sw $ra, 0x54($sp)
/* 8CB44 800F3694 AFBE0050 */ sw $fp, 0x50($sp)
/* 8CB48 800F3698 AFB7004C */ sw $s7, 0x4C($sp)
/* 8CB4C 800F369C AFB60048 */ sw $s6, 0x48($sp)
/* 8CB50 800F36A0 AFB50044 */ sw $s5, 0x44($sp)
/* 8CB54 800F36A4 AFB40040 */ sw $s4, 0x40($sp)
/* 8CB58 800F36A8 AFB3003C */ sw $s3, 0x3C($sp)
/* 8CB5C 800F36AC AFB20038 */ sw $s2, 0x38($sp)
/* 8CB60 800F36B0 AFB10034 */ sw $s1, 0x34($sp)
/* 8CB64 800F36B4 AFB00030 */ sw $s0, 0x30($sp)
/* 8CB68 800F36B8 AFA5005C */ sw $a1, 0x5C($sp)
/* 8CB6C 800F36BC 1062001E */ beq $v1, $v0, .L800F3738
/* 8CB70 800F36C0 AFA60060 */ sw $a2, 0x60($sp)
/* 8CB74 800F36C4 2862000B */ slti $v0, $v1, 0xB
/* 8CB78 800F36C8 1040000E */ beqz $v0, .L800F3704
/* 8CB7C 800F36CC 28620020 */ slti $v0, $v1, 0x20
/* 8CB80 800F36D0 04610008 */ bgez $v1, .L800F36F4
/* 8CB84 800F36D4 24020001 */ addiu $v0, $zero, 0x1
/* 8CB88 800F36D8 2862FFFE */ slti $v0, $v1, -0x2
/* 8CB8C 800F36DC 10400016 */ beqz $v0, .L800F3738
/* 8CB90 800F36E0 2862FFFB */ slti $v0, $v1, -0x5
/* 8CB94 800F36E4 104003CC */ beqz $v0, .L800F4618
/* 8CB98 800F36E8 2862FFF8 */ slti $v0, $v1, -0x8
/* 8CB9C 800F36EC 0803CDCC */ j .L800F3730
/* 8CBA0 800F36F0 00000000 */ nop
.L800F36F4:
/* 8CBA4 800F36F4 10620010 */ beq $v1, $v0, .L800F3738
/* 8CBA8 800F36F8 00000000 */ nop
/* 8CBAC 800F36FC 0803D186 */ j .L800F4618
/* 8CBB0 800F3700 00000000 */ nop
.L800F3704:
/* 8CBB4 800F3704 10400007 */ beqz $v0, .L800F3724
/* 8CBB8 800F3708 2862001E */ slti $v0, $v1, 0x1E
/* 8CBBC 800F370C 1040000A */ beqz $v0, .L800F3738
/* 8CBC0 800F3710 24020014 */ addiu $v0, $zero, 0x14
/* 8CBC4 800F3714 10620008 */ beq $v1, $v0, .L800F3738
/* 8CBC8 800F3718 00000000 */ nop
/* 8CBCC 800F371C 0803D186 */ j .L800F4618
/* 8CBD0 800F3720 00000000 */ nop
.L800F3724:
/* 8CBD4 800F3724 2862006A */ slti $v0, $v1, 0x6A
/* 8CBD8 800F3728 104003BB */ beqz $v0, .L800F4618
/* 8CBDC 800F372C 28620064 */ slti $v0, $v1, 0x64
.L800F3730:
/* 8CBE0 800F3730 144003B9 */ bnez $v0, .L800F4618
/* 8CBE4 800F3734 00000000 */ nop
.L800F3738:
/* 8CBE8 800F3738 8FAA005C */ lw $t2, 0x5C($sp)
/* 8CBEC 800F373C 8FAB0060 */ lw $t3, 0x60($sp)
/* 8CBF0 800F3740 3C028011 */ lui $v0, %hi(PopupMenu_FirstDisplayIndex)
/* 8CBF4 800F3744 8042D654 */ lb $v0, %lo(PopupMenu_FirstDisplayIndex)($v0)
/* 8CBF8 800F3748 3C088011 */ lui $t0, %hi(D_8010D658)
/* 8CBFC 800F374C 8508D658 */ lh $t0, %lo(D_8010D658)($t0)
/* 8CC00 800F3750 254A0002 */ addiu $t2, $t2, 0x2
/* 8CC04 800F3754 256B000F */ addiu $t3, $t3, 0xF
/* 8CC08 800F3758 00021023 */ negu $v0, $v0
/* 8CC0C 800F375C 00021840 */ sll $v1, $v0, 1
/* 8CC10 800F3760 00621821 */ addu $v1, $v1, $v0
/* 8CC14 800F3764 00031880 */ sll $v1, $v1, 2
/* 8CC18 800F3768 00628821 */ addu $s1, $v1, $v0
/* 8CC1C 800F376C 02282023 */ subu $a0, $s1, $t0
/* 8CC20 800F3770 28820082 */ slti $v0, $a0, 0x82
/* 8CC24 800F3774 AFAA005C */ sw $t2, 0x5C($sp)
/* 8CC28 800F3778 1040000D */ beqz $v0, .L800F37B0
/* 8CC2C 800F377C AFAB0060 */ sw $t3, 0x60($sp)
/* 8CC30 800F3780 3C013FE0 */ lui $at, (0x3FE00000 >> 16)
/* 8CC34 800F3784 44811800 */ mtc1 $at, $f3
/* 8CC38 800F3788 44801000 */ mtc1 $zero, $f2
/* 8CC3C 800F378C 44840000 */ mtc1 $a0, $f0
/* 8CC40 800F3790 00000000 */ nop
/* 8CC44 800F3794 46800021 */ cvt.d.w $f0, $f0
/* 8CC48 800F3798 46220002 */ mul.d $f0, $f0, $f2
/* 8CC4C 800F379C 00000000 */ nop
/* 8CC50 800F37A0 4620018D */ trunc.w.d $f6, $f0
/* 8CC54 800F37A4 44043000 */ mfc1 $a0, $f6
/* 8CC58 800F37A8 0803CDF8 */ j .L800F37E0
/* 8CC5C 800F37AC 00000000 */ nop
.L800F37B0:
/* 8CC60 800F37B0 3C031B4E */ lui $v1, (0x1B4E81B5 >> 16)
/* 8CC64 800F37B4 346381B5 */ ori $v1, $v1, (0x1B4E81B5 & 0xFFFF)
/* 8CC68 800F37B8 00041040 */ sll $v0, $a0, 1
/* 8CC6C 800F37BC 00441021 */ addu $v0, $v0, $a0
/* 8CC70 800F37C0 000210C0 */ sll $v0, $v0, 3
/* 8CC74 800F37C4 00441021 */ addu $v0, $v0, $a0
/* 8CC78 800F37C8 00021080 */ sll $v0, $v0, 2
/* 8CC7C 800F37CC 00430018 */ mult $v0, $v1
/* 8CC80 800F37D0 000217C3 */ sra $v0, $v0, 31
/* 8CC84 800F37D4 00005010 */ mfhi $t2
/* 8CC88 800F37D8 000A1903 */ sra $v1, $t2, 4
/* 8CC8C 800F37DC 00622023 */ subu $a0, $v1, $v0
.L800F37E0:
/* 8CC90 800F37E0 14800002 */ bnez $a0, .L800F37EC
/* 8CC94 800F37E4 01044021 */ addu $t0, $t0, $a0
/* 8CC98 800F37E8 0220402D */ daddu $t0, $s1, $zero
.L800F37EC:
/* 8CC9C 800F37EC 3C054EC4 */ lui $a1, (0x4EC4EC4F >> 16)
/* 8CCA0 800F37F0 34A5EC4F */ ori $a1, $a1, (0x4EC4EC4F & 0xFFFF)
/* 8CCA4 800F37F4 00081C00 */ sll $v1, $t0, 16
/* 8CCA8 800F37F8 00031C03 */ sra $v1, $v1, 16
/* 8CCAC 800F37FC 8FAB005C */ lw $t3, 0x5C($sp)
/* 8CCB0 800F3800 8FB10060 */ lw $s1, 0x60($sp)
/* 8CCB4 800F3804 3C048011 */ lui $a0, %hi(PopupMenu_DisplayedEntryCount)
/* 8CCB8 800F3808 8084D656 */ lb $a0, %lo(PopupMenu_DisplayedEntryCount)($a0)
/* 8CCBC 800F380C 00031823 */ negu $v1, $v1
/* 8CCC0 800F3810 3C018011 */ lui $at, %hi(D_8010D658)
/* 8CCC4 800F3814 A428D658 */ sh $t0, %lo(D_8010D658)($at)
/* 8CCC8 800F3818 00041040 */ sll $v0, $a0, 1
/* 8CCCC 800F381C 00441021 */ addu $v0, $v0, $a0
/* 8CCD0 800F3820 00021080 */ sll $v0, $v0, 2
/* 8CCD4 800F3824 00441021 */ addu $v0, $v0, $a0
/* 8CCD8 800F3828 02221021 */ addu $v0, $s1, $v0
/* 8CCDC 800F382C 24480004 */ addiu $t0, $v0, 0x4
/* 8CCE0 800F3830 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8CCE4 800F3834 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8CCE8 800F3838 00650018 */ mult $v1, $a1
/* 8CCEC 800F383C AFAB0020 */ sw $t3, 0x20($sp)
/* 8CCF0 800F3840 8C450318 */ lw $a1, 0x318($v0)
/* 8CCF4 800F3844 00031FC3 */ sra $v1, $v1, 31
/* 8CCF8 800F3848 2CA2000E */ sltiu $v0, $a1, 0xE
/* 8CCFC 800F384C 00005010 */ mfhi $t2
/* 8CD00 800F3850 000A2083 */ sra $a0, $t2, 2
/* 8CD04 800F3854 00832023 */ subu $a0, $a0, $v1
/* 8CD08 800F3858 10400064 */ beqz $v0, .L800F39EC
/* 8CD0C 800F385C AFA40028 */ sw $a0, 0x28($sp)
/* 8CD10 800F3860 00051080 */ sll $v0, $a1, 2
/* 8CD14 800F3864 3C018011 */ lui $at, %hi(jtbl_8010C790)
/* 8CD18 800F3868 00220821 */ addu $at, $at, $v0
/* 8CD1C 800F386C 8C22C790 */ lw $v0, %lo(jtbl_8010C790)($at)
/* 8CD20 800F3870 00400008 */ jr $v0
/* 8CD24 800F3874 00000000 */ nop
glabel .L800F3878
/* 8CD28 800F3878 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* 8CD2C 800F387C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* 8CD30 800F3880 C7A20020 */ lwc1 $f2, 0x20($sp)
/* 8CD34 800F3884 468010A0 */ cvt.s.w $f2, $f2
/* 8CD38 800F3888 44910000 */ mtc1 $s1, $f0
/* 8CD3C 800F388C 00000000 */ nop
/* 8CD40 800F3890 46800020 */ cvt.s.w $f0, $f0
/* 8CD44 800F3894 3C014080 */ lui $at, (0x40800000 >> 16)
/* 8CD48 800F3898 44812000 */ mtc1 $at, $f4
/* 8CD4C 800F389C 8C620000 */ lw $v0, 0x0($v1)
/* 8CD50 800F38A0 46041082 */ mul.s $f2, $f2, $f4
/* 8CD54 800F38A4 00000000 */ nop
/* 8CD58 800F38A8 0040282D */ daddu $a1, $v0, $zero
/* 8CD5C 800F38AC 24420008 */ addiu $v0, $v0, 0x8
/* 8CD60 800F38B0 AC620000 */ sw $v0, 0x0($v1)
/* 8CD64 800F38B4 8FAB0020 */ lw $t3, 0x20($sp)
/* 8CD68 800F38B8 46040002 */ mul.s $f0, $f0, $f4
/* 8CD6C 800F38BC 00000000 */ nop
/* 8CD70 800F38C0 0803CE59 */ j .L800F3964
/* 8CD74 800F38C4 25620070 */ addiu $v0, $t3, 0x70
glabel .L800F38C8
/* 8CD78 800F38C8 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* 8CD7C 800F38CC 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* 8CD80 800F38D0 C7A20020 */ lwc1 $f2, 0x20($sp)
/* 8CD84 800F38D4 468010A0 */ cvt.s.w $f2, $f2
/* 8CD88 800F38D8 44910000 */ mtc1 $s1, $f0
/* 8CD8C 800F38DC 00000000 */ nop
/* 8CD90 800F38E0 46800020 */ cvt.s.w $f0, $f0
/* 8CD94 800F38E4 3C014080 */ lui $at, (0x40800000 >> 16)
/* 8CD98 800F38E8 44812000 */ mtc1 $at, $f4
/* 8CD9C 800F38EC 8C620000 */ lw $v0, 0x0($v1)
/* 8CDA0 800F38F0 46041082 */ mul.s $f2, $f2, $f4
/* 8CDA4 800F38F4 00000000 */ nop
/* 8CDA8 800F38F8 0040282D */ daddu $a1, $v0, $zero
/* 8CDAC 800F38FC 24420008 */ addiu $v0, $v0, 0x8
/* 8CDB0 800F3900 AC620000 */ sw $v0, 0x0($v1)
/* 8CDB4 800F3904 8FAB0020 */ lw $t3, 0x20($sp)
/* 8CDB8 800F3908 46040002 */ mul.s $f0, $f0, $f4
/* 8CDBC 800F390C 00000000 */ nop
/* 8CDC0 800F3910 0803CE59 */ j .L800F3964
/* 8CDC4 800F3914 2562005A */ addiu $v0, $t3, 0x5A
glabel .L800F3918
/* 8CDC8 800F3918 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* 8CDCC 800F391C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* 8CDD0 800F3920 C7A20020 */ lwc1 $f2, 0x20($sp)
/* 8CDD4 800F3924 468010A0 */ cvt.s.w $f2, $f2
/* 8CDD8 800F3928 44910000 */ mtc1 $s1, $f0
/* 8CDDC 800F392C 00000000 */ nop
/* 8CDE0 800F3930 46800020 */ cvt.s.w $f0, $f0
/* 8CDE4 800F3934 3C014080 */ lui $at, (0x40800000 >> 16)
/* 8CDE8 800F3938 44812000 */ mtc1 $at, $f4
/* 8CDEC 800F393C 8C620000 */ lw $v0, 0x0($v1)
/* 8CDF0 800F3940 46041082 */ mul.s $f2, $f2, $f4
/* 8CDF4 800F3944 00000000 */ nop
/* 8CDF8 800F3948 0040282D */ daddu $a1, $v0, $zero
/* 8CDFC 800F394C 24420008 */ addiu $v0, $v0, 0x8
/* 8CE00 800F3950 AC620000 */ sw $v0, 0x0($v1)
/* 8CE04 800F3954 8FAB0020 */ lw $t3, 0x20($sp)
/* 8CE08 800F3958 46040002 */ mul.s $f0, $f0, $f4
/* 8CE0C 800F395C 00000000 */ nop
/* 8CE10 800F3960 256200A0 */ addiu $v0, $t3, 0xA0
.L800F3964:
/* 8CE14 800F3964 4600118D */ trunc.w.s $f6, $f2
/* 8CE18 800F3968 44033000 */ mfc1 $v1, $f6
/* 8CE1C 800F396C 00000000 */ nop
/* 8CE20 800F3970 30630FFF */ andi $v1, $v1, 0xFFF
/* 8CE24 800F3974 00031B00 */ sll $v1, $v1, 12
/* 8CE28 800F3978 4600018D */ trunc.w.s $f6, $f0
/* 8CE2C 800F397C 44043000 */ mfc1 $a0, $f6
/* 8CE30 800F3980 00000000 */ nop
/* 8CE34 800F3984 30840FFF */ andi $a0, $a0, 0xFFF
/* 8CE38 800F3988 44821000 */ mtc1 $v0, $f2
/* 8CE3C 800F398C 00000000 */ nop
/* 8CE40 800F3990 468010A0 */ cvt.s.w $f2, $f2
/* 8CE44 800F3994 46041082 */ mul.s $f2, $f2, $f4
/* 8CE48 800F3998 00000000 */ nop
/* 8CE4C 800F399C 3C02ED00 */ lui $v0, (0xED000000 >> 16)
/* 8CE50 800F39A0 00822025 */ or $a0, $a0, $v0
/* 8CE54 800F39A4 00641825 */ or $v1, $v1, $a0
/* 8CE58 800F39A8 44880000 */ mtc1 $t0, $f0
/* 8CE5C 800F39AC 00000000 */ nop
/* 8CE60 800F39B0 46800020 */ cvt.s.w $f0, $f0
/* 8CE64 800F39B4 46040002 */ mul.s $f0, $f0, $f4
/* 8CE68 800F39B8 00000000 */ nop
/* 8CE6C 800F39BC ACA30000 */ sw $v1, 0x0($a1)
/* 8CE70 800F39C0 4600118D */ trunc.w.s $f6, $f2
/* 8CE74 800F39C4 44023000 */ mfc1 $v0, $f6
/* 8CE78 800F39C8 00000000 */ nop
/* 8CE7C 800F39CC 30420FFF */ andi $v0, $v0, 0xFFF
/* 8CE80 800F39D0 00021300 */ sll $v0, $v0, 12
/* 8CE84 800F39D4 4600018D */ trunc.w.s $f6, $f0
/* 8CE88 800F39D8 44033000 */ mfc1 $v1, $f6
/* 8CE8C 800F39DC 00000000 */ nop
/* 8CE90 800F39E0 30630FFF */ andi $v1, $v1, 0xFFF
/* 8CE94 800F39E4 00431025 */ or $v0, $v0, $v1
/* 8CE98 800F39E8 ACA20004 */ sw $v0, 0x4($a1)
.L800F39EC:
/* 8CE9C 800F39EC 3C028011 */ lui $v0, %hi(D_8010D658)
/* 8CEA0 800F39F0 8442D658 */ lh $v0, %lo(D_8010D658)($v0)
/* 8CEA4 800F39F4 8FAB0060 */ lw $t3, 0x60($sp)
/* 8CEA8 800F39F8 3C128011 */ lui $s2, %hi(gPopupMenu)
/* 8CEAC 800F39FC 2652D69C */ addiu $s2, $s2, %lo(gPopupMenu)
/* 8CEB0 800F3A00 01621821 */ addu $v1, $t3, $v0
/* 8CEB4 800F3A04 8E420000 */ lw $v0, 0x0($s2)
/* 8CEB8 800F3A08 24130002 */ addiu $s3, $zero, 0x2
/* 8CEBC 800F3A0C 8C420318 */ lw $v0, 0x318($v0)
/* 8CEC0 800F3A10 14530002 */ bne $v0, $s3, .L800F3A1C
/* 8CEC4 800F3A14 24710008 */ addiu $s1, $v1, 0x8
/* 8CEC8 800F3A18 24710015 */ addiu $s1, $v1, 0x15
.L800F3A1C:
/* 8CECC 800F3A1C 2626FFFD */ addiu $a2, $s1, -0x3
/* 8CED0 800F3A20 8FAA005C */ lw $t2, 0x5C($sp)
/* 8CED4 800F3A24 3C108011 */ lui $s0, %hi(PopupMenu_EmptybarHEID)
/* 8CED8 800F3A28 8E10D65C */ lw $s0, %lo(PopupMenu_EmptybarHEID)($s0)
/* 8CEDC 800F3A2C 25450049 */ addiu $a1, $t2, 0x49
/* 8CEE0 800F3A30 0C051261 */ jal hud_element_set_render_pos
/* 8CEE4 800F3A34 0200202D */ daddu $a0, $s0, $zero
/* 8CEE8 800F3A38 3C058011 */ lui $a1, %hi(PopupMenu_Alpha)
/* 8CEEC 800F3A3C 8CA5D650 */ lw $a1, %lo(PopupMenu_Alpha)($a1)
/* 8CEF0 800F3A40 0C0513AC */ jal hud_element_set_alpha
/* 8CEF4 800F3A44 0200202D */ daddu $a0, $s0, $zero
/* 8CEF8 800F3A48 8E420000 */ lw $v0, 0x0($s2)
/* 8CEFC 800F3A4C 3C038011 */ lui $v1, %hi(PopupMenu_MaxDisplayableEntryCount)
/* 8CF00 800F3A50 8063D68F */ lb $v1, %lo(PopupMenu_MaxDisplayableEntryCount)($v1)
/* 8CF04 800F3A54 8C420324 */ lw $v0, 0x324($v0)
/* 8CF08 800F3A58 0062182A */ slt $v1, $v1, $v0
/* 8CF0C 800F3A5C 10600003 */ beqz $v1, .L800F3A6C
/* 8CF10 800F3A60 00000000 */ nop
/* 8CF14 800F3A64 0C0511F8 */ jal hud_element_draw_without_clipping
/* 8CF18 800F3A68 0200202D */ daddu $a0, $s0, $zero
.L800F3A6C:
/* 8CF1C 800F3A6C 8FAB005C */ lw $t3, 0x5C($sp)
/* 8CF20 800F3A70 8FAA0060 */ lw $t2, 0x60($sp)
/* 8CF24 800F3A74 3C038011 */ lui $v1, %hi(PopupMenu_DisplayedEntryCount)
/* 8CF28 800F3A78 8063D656 */ lb $v1, %lo(PopupMenu_DisplayedEntryCount)($v1)
/* 8CF2C 800F3A7C 25510002 */ addiu $s1, $t2, 0x2
/* 8CF30 800F3A80 00031040 */ sll $v0, $v1, 1
/* 8CF34 800F3A84 00431021 */ addu $v0, $v0, $v1
/* 8CF38 800F3A88 00021080 */ sll $v0, $v0, 2
/* 8CF3C 800F3A8C AFAB0020 */ sw $t3, 0x20($sp)
/* 8CF40 800F3A90 8E440000 */ lw $a0, 0x0($s2)
/* 8CF44 800F3A94 00431021 */ addu $v0, $v0, $v1
/* 8CF48 800F3A98 8C830318 */ lw $v1, 0x318($a0)
/* 8CF4C 800F3A9C 14730008 */ bne $v1, $s3, .L800F3AC0
/* 8CF50 800F3AA0 02224021 */ addu $t0, $s1, $v0
/* 8CF54 800F3AA4 3C028011 */ lui $v0, %hi(PopupMenu_FirstDisplayIndex)
/* 8CF58 800F3AA8 8042D654 */ lb $v0, %lo(PopupMenu_FirstDisplayIndex)($v0)
/* 8CF5C 800F3AAC 28420002 */ slti $v0, $v0, 0x2
/* 8CF60 800F3AB0 10400003 */ beqz $v0, .L800F3AC0
/* 8CF64 800F3AB4 00000000 */ nop
/* 8CF68 800F3AB8 0140882D */ daddu $s1, $t2, $zero
/* 8CF6C 800F3ABC 25080001 */ addiu $t0, $t0, 0x1
.L800F3AC0:
/* 8CF70 800F3AC0 C7A20020 */ lwc1 $f2, 0x20($sp)
/* 8CF74 800F3AC4 468010A0 */ cvt.s.w $f2, $f2
/* 8CF78 800F3AC8 3C014080 */ lui $at, (0x40800000 >> 16)
/* 8CF7C 800F3ACC 44812000 */ mtc1 $at, $f4
/* 8CF80 800F3AD0 3C06800A */ lui $a2, %hi(gMainGfxPos)
/* 8CF84 800F3AD4 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos)
/* 8CF88 800F3AD8 46041082 */ mul.s $f2, $f2, $f4
/* 8CF8C 800F3ADC 00000000 */ nop
/* 8CF90 800F3AE0 44910000 */ mtc1 $s1, $f0
/* 8CF94 800F3AE4 00000000 */ nop
/* 8CF98 800F3AE8 46800020 */ cvt.s.w $f0, $f0
/* 8CF9C 800F3AEC 8CC50000 */ lw $a1, 0x0($a2)
/* 8CFA0 800F3AF0 3C04ED00 */ lui $a0, (0xED000000 >> 16)
/* 8CFA4 800F3AF4 00A0382D */ daddu $a3, $a1, $zero
/* 8CFA8 800F3AF8 46040002 */ mul.s $f0, $f0, $f4
/* 8CFAC 800F3AFC 00000000 */ nop
/* 8CFB0 800F3B00 24A50008 */ addiu $a1, $a1, 0x8
/* 8CFB4 800F3B04 4600118D */ trunc.w.s $f6, $f2
/* 8CFB8 800F3B08 44023000 */ mfc1 $v0, $f6
/* 8CFBC 800F3B0C 00000000 */ nop
/* 8CFC0 800F3B10 30420FFF */ andi $v0, $v0, 0xFFF
/* 8CFC4 800F3B14 00021300 */ sll $v0, $v0, 12
/* 8CFC8 800F3B18 4600018D */ trunc.w.s $f6, $f0
/* 8CFCC 800F3B1C 44033000 */ mfc1 $v1, $f6
/* 8CFD0 800F3B20 00000000 */ nop
/* 8CFD4 800F3B24 30630FFF */ andi $v1, $v1, 0xFFF
/* 8CFD8 800F3B28 00641825 */ or $v1, $v1, $a0
/* 8CFDC 800F3B2C 00431025 */ or $v0, $v0, $v1
/* 8CFE0 800F3B30 3C048011 */ lui $a0, %hi(gPopupMenu)
/* 8CFE4 800F3B34 8C84D69C */ lw $a0, %lo(gPopupMenu)($a0)
/* 8CFE8 800F3B38 44880000 */ mtc1 $t0, $f0
/* 8CFEC 800F3B3C 00000000 */ nop
/* 8CFF0 800F3B40 46800020 */ cvt.s.w $f0, $f0
/* 8CFF4 800F3B44 ACE20000 */ sw $v0, 0x0($a3)
/* 8CFF8 800F3B48 8FAB0020 */ lw $t3, 0x20($sp)
/* 8CFFC 800F3B4C 8C820318 */ lw $v0, 0x318($a0)
/* 8D000 800F3B50 46040002 */ mul.s $f0, $f0, $f4
/* 8D004 800F3B54 00000000 */ nop
/* 8D008 800F3B58 AFA00024 */ sw $zero, 0x24($sp)
/* 8D00C 800F3B5C 00021040 */ sll $v0, $v0, 1
/* 8D010 800F3B60 3C018011 */ lui $at, %hi(D_801098BC)
/* 8D014 800F3B64 00220821 */ addu $at, $at, $v0
/* 8D018 800F3B68 842298BC */ lh $v0, %lo(D_801098BC)($at)
/* 8D01C 800F3B6C 8FAA0060 */ lw $t2, 0x60($sp)
/* 8D020 800F3B70 01621021 */ addu $v0, $t3, $v0
/* 8D024 800F3B74 44821000 */ mtc1 $v0, $f2
/* 8D028 800F3B78 00000000 */ nop
/* 8D02C 800F3B7C 468010A0 */ cvt.s.w $f2, $f2
/* 8D030 800F3B80 3C028011 */ lui $v0, %hi(D_8010D658)
/* 8D034 800F3B84 8442D658 */ lh $v0, %lo(D_8010D658)($v0)
/* 8D038 800F3B88 46041082 */ mul.s $f2, $f2, $f4
/* 8D03C 800F3B8C 00000000 */ nop
/* 8D040 800F3B90 ACC50000 */ sw $a1, 0x0($a2)
/* 8D044 800F3B94 8FAB005C */ lw $t3, 0x5C($sp)
/* 8D048 800F3B98 01424821 */ addu $t1, $t2, $v0
/* 8D04C 800F3B9C 256B0020 */ addiu $t3, $t3, 0x20
/* 8D050 800F3BA0 AFAB0020 */ sw $t3, 0x20($sp)
/* 8D054 800F3BA4 4600118D */ trunc.w.s $f6, $f2
/* 8D058 800F3BA8 44023000 */ mfc1 $v0, $f6
/* 8D05C 800F3BAC 00000000 */ nop
/* 8D060 800F3BB0 30420FFF */ andi $v0, $v0, 0xFFF
/* 8D064 800F3BB4 00021300 */ sll $v0, $v0, 12
/* 8D068 800F3BB8 4600018D */ trunc.w.s $f6, $f0
/* 8D06C 800F3BBC 44033000 */ mfc1 $v1, $f6
/* 8D070 800F3BC0 00000000 */ nop
/* 8D074 800F3BC4 30630FFF */ andi $v1, $v1, 0xFFF
/* 8D078 800F3BC8 00431025 */ or $v0, $v0, $v1
/* 8D07C 800F3BCC ACE20004 */ sw $v0, 0x4($a3)
/* 8D080 800F3BD0 8C830318 */ lw $v1, 0x318($a0)
/* 8D084 800F3BD4 24020002 */ addiu $v0, $zero, 0x2
/* 8D088 800F3BD8 14620004 */ bne $v1, $v0, .L800F3BEC
/* 8D08C 800F3BDC 25310002 */ addiu $s1, $t1, 0x2
/* 8D090 800F3BE0 0120882D */ daddu $s1, $t1, $zero
/* 8D094 800F3BE4 0040582D */ daddu $t3, $v0, $zero
/* 8D098 800F3BE8 AFAB0024 */ sw $t3, 0x24($sp)
.L800F3BEC:
/* 8D09C 800F3BEC 8C820324 */ lw $v0, 0x324($a0)
/* 8D0A0 800F3BF0 184000EA */ blez $v0, .L800F3F9C
/* 8D0A4 800F3BF4 0000902D */ daddu $s2, $zero, $zero
/* 8D0A8 800F3BF8 AFA0002C */ sw $zero, 0x2C($sp)
.L800F3BFC:
/* 8D0AC 800F3BFC 8FAA0028 */ lw $t2, 0x28($sp)
/* 8D0B0 800F3C00 2542FFFF */ addiu $v0, $t2, -0x1
/* 8D0B4 800F3C04 0242102A */ slt $v0, $s2, $v0
/* 8D0B8 800F3C08 14400007 */ bnez $v0, .L800F3C28
/* 8D0BC 800F3C0C 00000000 */ nop
/* 8D0C0 800F3C10 3C028011 */ lui $v0, %hi(PopupMenu_DisplayedEntryCount)
/* 8D0C4 800F3C14 8042D656 */ lb $v0, %lo(PopupMenu_DisplayedEntryCount)($v0)
/* 8D0C8 800F3C18 01421021 */ addu $v0, $t2, $v0
/* 8D0CC 800F3C1C 0052102A */ slt $v0, $v0, $s2
/* 8D0D0 800F3C20 10400006 */ beqz $v0, .L800F3C3C
/* 8D0D4 800F3C24 240A0001 */ addiu $t2, $zero, 0x1
.L800F3C28:
/* 8D0D8 800F3C28 164000D3 */ bnez $s2, .L800F3F78
/* 8D0DC 800F3C2C 2631000D */ addiu $s1, $s1, 0xD
/* 8D0E0 800F3C30 8FAB0024 */ lw $t3, 0x24($sp)
/* 8D0E4 800F3C34 0803CFDE */ j .L800F3F78
/* 8D0E8 800F3C38 022B8821 */ addu $s1, $s1, $t3
.L800F3C3C:
/* 8D0EC 800F3C3C 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D0F0 800F3C40 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D0F4 800F3C44 8C430318 */ lw $v1, 0x318($v0)
/* 8D0F8 800F3C48 3C108011 */ lui $s0, %hi(D_8010D690)
/* 8D0FC 800F3C4C 8210D690 */ lb $s0, %lo(D_8010D690)($s0)
/* 8D100 800F3C50 506A0001 */ beql $v1, $t2, .L800F3C58
/* 8D104 800F3C54 2410000A */ addiu $s0, $zero, 0xA
.L800F3C58:
/* 8D108 800F3C58 8FAB002C */ lw $t3, 0x2C($sp)
/* 8D10C 800F3C5C 004B1021 */ addu $v0, $v0, $t3
/* 8D110 800F3C60 8C42018C */ lw $v0, 0x18C($v0)
/* 8D114 800F3C64 50400001 */ beql $v0, $zero, .L800F3C6C
/* 8D118 800F3C68 2410000B */ addiu $s0, $zero, 0xB
.L800F3C6C:
/* 8D11C 800F3C6C 2C62000E */ sltiu $v0, $v1, 0xE
/* 8D120 800F3C70 1040005A */ beqz $v0, .L800F3DDC
/* 8D124 800F3C74 00031080 */ sll $v0, $v1, 2
/* 8D128 800F3C78 3C018011 */ lui $at, %hi(jtbl_8010C7C8)
/* 8D12C 800F3C7C 00220821 */ addu $at, $at, $v0
/* 8D130 800F3C80 8C22C7C8 */ lw $v0, %lo(jtbl_8010C7C8)($at)
/* 8D134 800F3C84 00400008 */ jr $v0
/* 8D138 800F3C88 00000000 */ nop
glabel .L800F3C8C
/* 8D13C 800F3C8C 3C078011 */ lui $a3, %hi(PopupMenu_Alpha)
/* 8D140 800F3C90 8CE7D650 */ lw $a3, %lo(PopupMenu_Alpha)($a3)
/* 8D144 800F3C94 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D148 800F3C98 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D14C 800F3C9C 8FA50020 */ lw $a1, 0x20($sp)
/* 8D150 800F3CA0 8FAB002C */ lw $t3, 0x2C($sp)
/* 8D154 800F3CA4 240A0001 */ addiu $t2, $zero, 0x1
/* 8D158 800F3CA8 AFB00010 */ sw $s0, 0x10($sp)
/* 8D15C 800F3CAC AFAA0014 */ sw $t2, 0x14($sp)
/* 8D160 800F3CB0 004B1021 */ addu $v0, $v0, $t3
/* 8D164 800F3CB4 8C440084 */ lw $a0, 0x84($v0)
/* 8D168 800F3CB8 0803CF75 */ j .L800F3DD4
/* 8D16C 800F3CBC 0220302D */ daddu $a2, $s1, $zero
glabel .L800F3CC0
/* 8D170 800F3CC0 3C078011 */ lui $a3, %hi(PopupMenu_Alpha)
/* 8D174 800F3CC4 8CE7D650 */ lw $a3, %lo(PopupMenu_Alpha)($a3)
/* 8D178 800F3CC8 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D17C 800F3CCC 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D180 800F3CD0 8FA50020 */ lw $a1, 0x20($sp)
/* 8D184 800F3CD4 8FAB002C */ lw $t3, 0x2C($sp)
/* 8D188 800F3CD8 240A0001 */ addiu $t2, $zero, 0x1
/* 8D18C 800F3CDC AFB00010 */ sw $s0, 0x10($sp)
/* 8D190 800F3CE0 AFAA0014 */ sw $t2, 0x14($sp)
/* 8D194 800F3CE4 004B1021 */ addu $v0, $v0, $t3
/* 8D198 800F3CE8 8C440084 */ lw $a0, 0x84($v0)
/* 8D19C 800F3CEC 0803CF75 */ j .L800F3DD4
/* 8D1A0 800F3CF0 0220302D */ daddu $a2, $s1, $zero
glabel .L800F3CF4
/* 8D1A4 800F3CF4 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D1A8 800F3CF8 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D1AC 800F3CFC 8FAA002C */ lw $t2, 0x2C($sp)
/* 8D1B0 800F3D00 004A2021 */ addu $a0, $v0, $t2
/* 8D1B4 800F3D04 8C83018C */ lw $v1, 0x18C($a0)
/* 8D1B8 800F3D08 24020002 */ addiu $v0, $zero, 0x2
/* 8D1BC 800F3D0C 50620001 */ beql $v1, $v0, .L800F3D14
/* 8D1C0 800F3D10 24100022 */ addiu $s0, $zero, 0x22
.L800F3D14:
/* 8D1C4 800F3D14 8FA50020 */ lw $a1, 0x20($sp)
/* 8D1C8 800F3D18 240B0001 */ addiu $t3, $zero, 0x1
/* 8D1CC 800F3D1C AFB00010 */ sw $s0, 0x10($sp)
/* 8D1D0 800F3D20 AFAB0014 */ sw $t3, 0x14($sp)
/* 8D1D4 800F3D24 8C840084 */ lw $a0, 0x84($a0)
/* 8D1D8 800F3D28 3C078011 */ lui $a3, %hi(PopupMenu_Alpha)
/* 8D1DC 800F3D2C 8CE7D650 */ lw $a3, %lo(PopupMenu_Alpha)($a3)
/* 8D1E0 800F3D30 0803CF75 */ j .L800F3DD4
/* 8D1E4 800F3D34 0220302D */ daddu $a2, $s1, $zero
glabel .L800F3D38
/* 8D1E8 800F3D38 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D1EC 800F3D3C 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D1F0 800F3D40 8FAA002C */ lw $t2, 0x2C($sp)
/* 8D1F4 800F3D44 004A1821 */ addu $v1, $v0, $t2
/* 8D1F8 800F3D48 8C620210 */ lw $v0, 0x210($v1)
/* 8D1FC 800F3D4C 10400002 */ beqz $v0, .L800F3D58
/* 8D200 800F3D50 2410000A */ addiu $s0, $zero, 0xA
/* 8D204 800F3D54 2410000B */ addiu $s0, $zero, 0xB
.L800F3D58:
/* 8D208 800F3D58 8C640108 */ lw $a0, 0x108($v1)
/* 8D20C 800F3D5C 0000282D */ daddu $a1, $zero, $zero
/* 8D210 800F3D60 0C0496FA */ jal set_message_value
/* 8D214 800F3D64 24840001 */ addiu $a0, $a0, 0x1
/* 8D218 800F3D68 3C04001D */ lui $a0, (0x1D00CD >> 16)
/* 8D21C 800F3D6C 348400CD */ ori $a0, $a0, (0x1D00CD & 0xFFFF)
/* 8D220 800F3D70 0220302D */ daddu $a2, $s1, $zero
/* 8D224 800F3D74 8FAB0020 */ lw $t3, 0x20($sp)
/* 8D228 800F3D78 3C078011 */ lui $a3, %hi(PopupMenu_Alpha)
/* 8D22C 800F3D7C 8CE7D650 */ lw $a3, %lo(PopupMenu_Alpha)($a3)
/* 8D230 800F3D80 240A0001 */ addiu $t2, $zero, 0x1
/* 8D234 800F3D84 AFB00010 */ sw $s0, 0x10($sp)
/* 8D238 800F3D88 AFAA0014 */ sw $t2, 0x14($sp)
/* 8D23C 800F3D8C 0803CF75 */ j .L800F3DD4
/* 8D240 800F3D90 25650008 */ addiu $a1, $t3, 0x8
glabel .L800F3D94
/* 8D244 800F3D94 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D248 800F3D98 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D24C 800F3D9C 8FAB002C */ lw $t3, 0x2C($sp)
/* 8D250 800F3DA0 004B1821 */ addu $v1, $v0, $t3
/* 8D254 800F3DA4 8C620210 */ lw $v0, 0x210($v1)
/* 8D258 800F3DA8 10400002 */ beqz $v0, .L800F3DB4
/* 8D25C 800F3DAC 2410000A */ addiu $s0, $zero, 0xA
/* 8D260 800F3DB0 2410000B */ addiu $s0, $zero, 0xB
.L800F3DB4:
/* 8D264 800F3DB4 0220302D */ daddu $a2, $s1, $zero
/* 8D268 800F3DB8 8FA50020 */ lw $a1, 0x20($sp)
/* 8D26C 800F3DBC 3C078011 */ lui $a3, %hi(PopupMenu_Alpha)
/* 8D270 800F3DC0 8CE7D650 */ lw $a3, %lo(PopupMenu_Alpha)($a3)
/* 8D274 800F3DC4 8C640084 */ lw $a0, 0x84($v1)
/* 8D278 800F3DC8 240A0001 */ addiu $t2, $zero, 0x1
/* 8D27C 800F3DCC AFB00010 */ sw $s0, 0x10($sp)
/* 8D280 800F3DD0 AFAA0014 */ sw $t2, 0x14($sp)
.L800F3DD4:
/* 8D284 800F3DD4 0C04993B */ jal draw_msg
/* 8D288 800F3DD8 00000000 */ nop
.L800F3DDC:
/* 8D28C 800F3DDC 3C048011 */ lui $a0, %hi(gPopupMenu)
/* 8D290 800F3DE0 8C84D69C */ lw $a0, %lo(gPopupMenu)($a0)
/* 8D294 800F3DE4 8C830318 */ lw $v1, 0x318($a0)
/* 8D298 800F3DE8 240B0003 */ addiu $t3, $zero, 0x3
/* 8D29C 800F3DEC 106B0045 */ beq $v1, $t3, .L800F3F04
/* 8D2A0 800F3DF0 0220302D */ daddu $a2, $s1, $zero
/* 8D2A4 800F3DF4 28620004 */ slti $v0, $v1, 0x4
/* 8D2A8 800F3DF8 10400005 */ beqz $v0, .L800F3E10
/* 8D2AC 800F3DFC 240A0001 */ addiu $t2, $zero, 0x1
/* 8D2B0 800F3E00 106A000B */ beq $v1, $t2, .L800F3E30
/* 8D2B4 800F3E04 0000982D */ daddu $s3, $zero, $zero
/* 8D2B8 800F3E08 0803CFDA */ j .L800F3F68
/* 8D2BC 800F3E0C 2631000D */ addiu $s1, $s1, 0xD
.L800F3E10:
/* 8D2C0 800F3E10 24020004 */ addiu $v0, $zero, 0x4
/* 8D2C4 800F3E14 10620005 */ beq $v1, $v0, .L800F3E2C
/* 8D2C8 800F3E18 24020005 */ addiu $v0, $zero, 0x5
/* 8D2CC 800F3E1C 10620044 */ beq $v1, $v0, .L800F3F30
/* 8D2D0 800F3E20 0220302D */ daddu $a2, $s1, $zero
/* 8D2D4 800F3E24 0803CFDA */ j .L800F3F68
/* 8D2D8 800F3E28 2631000D */ addiu $s1, $s1, 0xD
.L800F3E2C:
/* 8D2DC 800F3E2C 0000982D */ daddu $s3, $zero, $zero
.L800F3E30:
/* 8D2E0 800F3E30 0012F080 */ sll $fp, $s2, 2
/* 8D2E4 800F3E34 2417005B */ addiu $s7, $zero, 0x5B
/* 8D2E8 800F3E38 24160055 */ addiu $s6, $zero, 0x55
/* 8D2EC 800F3E3C 3C158011 */ lui $s5, %hi(D_80109898)
/* 8D2F0 800F3E40 26B59898 */ addiu $s5, $s5, %lo(D_80109898)
/* 8D2F4 800F3E44 3C148011 */ lui $s4, %hi(D_80109890)
/* 8D2F8 800F3E48 26949890 */ addiu $s4, $s4, %lo(D_80109890)
.L800F3E4C:
/* 8D2FC 800F3E4C 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D300 800F3E50 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D304 800F3E54 005E1021 */ addu $v0, $v0, $fp
/* 8D308 800F3E58 8C42018C */ lw $v0, 0x18C($v0)
/* 8D30C 800F3E5C 3C108011 */ lui $s0, %hi(D_8010D668)
/* 8D310 800F3E60 8E10D668 */ lw $s0, %lo(D_8010D668)($s0)
/* 8D314 800F3E64 10400003 */ beqz $v0, .L800F3E74
/* 8D318 800F3E68 00000000 */ nop
/* 8D31C 800F3E6C 0803CF9E */ j .L800F3E78
/* 8D320 800F3E70 8E850000 */ lw $a1, 0x0($s4)
.L800F3E74:
/* 8D324 800F3E74 8EA50000 */ lw $a1, 0x0($s5)
.L800F3E78:
/* 8D328 800F3E78 0C0511FF */ jal hud_element_set_script
/* 8D32C 800F3E7C 0200202D */ daddu $a0, $s0, $zero
/* 8D330 800F3E80 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D334 800F3E84 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D338 800F3E88 8C420318 */ lw $v0, 0x318($v0)
/* 8D33C 800F3E8C 240B0001 */ addiu $t3, $zero, 0x1
/* 8D340 800F3E90 144B0005 */ bne $v0, $t3, .L800F3EA8
/* 8D344 800F3E94 0200202D */ daddu $a0, $s0, $zero
/* 8D348 800F3E98 8FAA0020 */ lw $t2, 0x20($sp)
/* 8D34C 800F3E9C 2626000A */ addiu $a2, $s1, 0xA
/* 8D350 800F3EA0 0803CFAD */ j .L800F3EB4
/* 8D354 800F3EA4 01562821 */ addu $a1, $t2, $s6
.L800F3EA8:
/* 8D358 800F3EA8 8FAB0020 */ lw $t3, 0x20($sp)
/* 8D35C 800F3EAC 2626000A */ addiu $a2, $s1, 0xA
/* 8D360 800F3EB0 01772821 */ addu $a1, $t3, $s7
.L800F3EB4:
/* 8D364 800F3EB4 0C051261 */ jal hud_element_set_render_pos
/* 8D368 800F3EB8 00000000 */ nop
/* 8D36C 800F3EBC 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D370 800F3EC0 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D374 800F3EC4 005E1021 */ addu $v0, $v0, $fp
/* 8D378 800F3EC8 8C420210 */ lw $v0, 0x210($v0)
/* 8D37C 800F3ECC 0262102A */ slt $v0, $s3, $v0
/* 8D380 800F3ED0 50400004 */ beql $v0, $zero, .L800F3EE4
/* 8D384 800F3ED4 26F7000D */ addiu $s7, $s7, 0xD
/* 8D388 800F3ED8 0C0511F1 */ jal hud_element_draw_next
/* 8D38C 800F3EDC 0200202D */ daddu $a0, $s0, $zero
/* 8D390 800F3EE0 26F7000D */ addiu $s7, $s7, 0xD
.L800F3EE4:
/* 8D394 800F3EE4 26D6000D */ addiu $s6, $s6, 0xD
/* 8D398 800F3EE8 26B50004 */ addiu $s5, $s5, 0x4
/* 8D39C 800F3EEC 26730001 */ addiu $s3, $s3, 0x1
/* 8D3A0 800F3EF0 2A620002 */ slti $v0, $s3, 0x2
/* 8D3A4 800F3EF4 1440FFD5 */ bnez $v0, .L800F3E4C
/* 8D3A8 800F3EF8 26940004 */ addiu $s4, $s4, 0x4
/* 8D3AC 800F3EFC 0803CFDA */ j .L800F3F68
/* 8D3B0 800F3F00 2631000D */ addiu $s1, $s1, 0xD
.L800F3F04:
/* 8D3B4 800F3F04 8FAA0020 */ lw $t2, 0x20($sp)
/* 8D3B8 800F3F08 3C028011 */ lui $v0, %hi(PopupMenu_Alpha)
/* 8D3BC 800F3F0C 8C42D650 */ lw $v0, %lo(PopupMenu_Alpha)($v0)
/* 8D3C0 800F3F10 25450073 */ addiu $a1, $t2, 0x73
/* 8D3C4 800F3F14 8FAA002C */ lw $t2, 0x2C($sp)
/* 8D3C8 800F3F18 240B0003 */ addiu $t3, $zero, 0x3
/* 8D3CC 800F3F1C AFB00010 */ sw $s0, 0x10($sp)
/* 8D3D0 800F3F20 AFAB0018 */ sw $t3, 0x18($sp)
/* 8D3D4 800F3F24 AFA20014 */ sw $v0, 0x14($sp)
/* 8D3D8 800F3F28 0803CFD6 */ j .L800F3F58
/* 8D3DC 800F3F2C 008A1021 */ addu $v0, $a0, $t2
.L800F3F30:
/* 8D3E0 800F3F30 8FAB0020 */ lw $t3, 0x20($sp)
/* 8D3E4 800F3F34 3C028011 */ lui $v0, %hi(PopupMenu_Alpha)
/* 8D3E8 800F3F38 8C42D650 */ lw $v0, %lo(PopupMenu_Alpha)($v0)
/* 8D3EC 800F3F3C 25650079 */ addiu $a1, $t3, 0x79
/* 8D3F0 800F3F40 8FAB002C */ lw $t3, 0x2C($sp)
/* 8D3F4 800F3F44 240A0003 */ addiu $t2, $zero, 0x3
/* 8D3F8 800F3F48 AFB00010 */ sw $s0, 0x10($sp)
/* 8D3FC 800F3F4C AFAA0018 */ sw $t2, 0x18($sp)
/* 8D400 800F3F50 AFA20014 */ sw $v0, 0x14($sp)
/* 8D404 800F3F54 008B1021 */ addu $v0, $a0, $t3
.L800F3F58:
/* 8D408 800F3F58 8C440210 */ lw $a0, 0x210($v0)
/* 8D40C 800F3F5C 0C049DA7 */ jal draw_number
/* 8D410 800F3F60 24070001 */ addiu $a3, $zero, 0x1
/* 8D414 800F3F64 2631000D */ addiu $s1, $s1, 0xD
.L800F3F68:
/* 8D418 800F3F68 56400004 */ bnel $s2, $zero, .L800F3F7C
/* 8D41C 800F3F6C 26520001 */ addiu $s2, $s2, 0x1
/* 8D420 800F3F70 8FAA0024 */ lw $t2, 0x24($sp)
/* 8D424 800F3F74 022A8821 */ addu $s1, $s1, $t2
.L800F3F78:
/* 8D428 800F3F78 26520001 */ addiu $s2, $s2, 0x1
.L800F3F7C:
/* 8D42C 800F3F7C 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D430 800F3F80 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D434 800F3F84 8FAB002C */ lw $t3, 0x2C($sp)
/* 8D438 800F3F88 8C420324 */ lw $v0, 0x324($v0)
/* 8D43C 800F3F8C 256B0004 */ addiu $t3, $t3, 0x4
/* 8D440 800F3F90 0242102A */ slt $v0, $s2, $v0
/* 8D444 800F3F94 1440FF19 */ bnez $v0, .L800F3BFC
/* 8D448 800F3F98 AFAB002C */ sw $t3, 0x2C($sp)
.L800F3F9C:
/* 8D44C 800F3F9C 8FAA005C */ lw $t2, 0x5C($sp)
/* 8D450 800F3FA0 3C028011 */ lui $v0, %hi(D_8010D658)
/* 8D454 800F3FA4 8442D658 */ lh $v0, %lo(D_8010D658)($v0)
/* 8D458 800F3FA8 8FAB0060 */ lw $t3, 0x60($sp)
/* 8D45C 800F3FAC AFA00024 */ sw $zero, 0x24($sp)
/* 8D460 800F3FB0 254A0018 */ addiu $t2, $t2, 0x18
/* 8D464 800F3FB4 01622021 */ addu $a0, $t3, $v0
/* 8D468 800F3FB8 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D46C 800F3FBC 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D470 800F3FC0 AFAA0020 */ sw $t2, 0x20($sp)
/* 8D474 800F3FC4 8C430318 */ lw $v1, 0x318($v0)
/* 8D478 800F3FC8 24020002 */ addiu $v0, $zero, 0x2
/* 8D47C 800F3FCC 14620004 */ bne $v1, $v0, .L800F3FE0
/* 8D480 800F3FD0 24910008 */ addiu $s1, $a0, 0x8
/* 8D484 800F3FD4 24910006 */ addiu $s1, $a0, 0x6
/* 8D488 800F3FD8 0040502D */ daddu $t2, $v0, $zero
/* 8D48C 800F3FDC AFAA0024 */ sw $t2, 0x24($sp)
.L800F3FE0:
/* 8D490 800F3FE0 2C62000E */ sltiu $v0, $v1, 0xE
/* 8D494 800F3FE4 104000B2 */ beqz $v0, .L800F42B0
/* 8D498 800F3FE8 00031080 */ sll $v0, $v1, 2
/* 8D49C 800F3FEC 3C018011 */ lui $at, %hi(jtbl_8010C800)
/* 8D4A0 800F3FF0 00220821 */ addu $at, $at, $v0
/* 8D4A4 800F3FF4 8C22C800 */ lw $v0, %lo(jtbl_8010C800)($at)
/* 8D4A8 800F3FF8 00400008 */ jr $v0
/* 8D4AC 800F3FFC 00000000 */ nop
glabel .L800F4000
/* 8D4B0 800F4000 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D4B4 800F4004 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D4B8 800F4008 8C420324 */ lw $v0, 0x324($v0)
/* 8D4BC 800F400C 184000A8 */ blez $v0, .L800F42B0
/* 8D4C0 800F4010 0000902D */ daddu $s2, $zero, $zero
/* 8D4C4 800F4014 8FAB0028 */ lw $t3, 0x28($sp)
/* 8D4C8 800F4018 2573FFFF */ addiu $s3, $t3, -0x1
/* 8D4CC 800F401C 0253102A */ slt $v0, $s2, $s3
.L800F4020:
/* 8D4D0 800F4020 14400008 */ bnez $v0, .L800F4044
/* 8D4D4 800F4024 00000000 */ nop
/* 8D4D8 800F4028 3C028011 */ lui $v0, %hi(PopupMenu_DisplayedEntryCount)
/* 8D4DC 800F402C 8042D656 */ lb $v0, %lo(PopupMenu_DisplayedEntryCount)($v0)
/* 8D4E0 800F4030 8FAA0028 */ lw $t2, 0x28($sp)
/* 8D4E4 800F4034 01421021 */ addu $v0, $t2, $v0
/* 8D4E8 800F4038 0052102A */ slt $v0, $v0, $s2
/* 8D4EC 800F403C 10400006 */ beqz $v0, .L800F4058
/* 8D4F0 800F4040 00121880 */ sll $v1, $s2, 2
.L800F4044:
/* 8D4F4 800F4044 1640001F */ bnez $s2, .L800F40C4
/* 8D4F8 800F4048 2631000D */ addiu $s1, $s1, 0xD
/* 8D4FC 800F404C 8FAB0024 */ lw $t3, 0x24($sp)
/* 8D500 800F4050 0803D031 */ j .L800F40C4
/* 8D504 800F4054 022B8821 */ addu $s1, $s1, $t3
.L800F4058:
/* 8D508 800F4058 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D50C 800F405C 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D510 800F4060 3C108011 */ lui $s0, %hi(D_8010D678)
/* 8D514 800F4064 8E10D678 */ lw $s0, %lo(D_8010D678)($s0)
/* 8D518 800F4068 00431021 */ addu $v0, $v0, $v1
/* 8D51C 800F406C 8C450000 */ lw $a1, 0x0($v0)
/* 8D520 800F4070 0C0511FF */ jal hud_element_set_script
/* 8D524 800F4074 0200202D */ daddu $a0, $s0, $zero
/* 8D528 800F4078 0200202D */ daddu $a0, $s0, $zero
/* 8D52C 800F407C 8FA50020 */ lw $a1, 0x20($sp)
/* 8D530 800F4080 0C051261 */ jal hud_element_set_render_pos
/* 8D534 800F4084 0220302D */ daddu $a2, $s1, $zero
/* 8D538 800F4088 0200202D */ daddu $a0, $s0, $zero
/* 8D53C 800F408C 3C058011 */ lui $a1, %hi(PopupMenu_Alpha)
/* 8D540 800F4090 8CA5D650 */ lw $a1, %lo(PopupMenu_Alpha)($a1)
/* 8D544 800F4094 0C0513AC */ jal hud_element_set_alpha
/* 8D548 800F4098 2631000D */ addiu $s1, $s1, 0xD
/* 8D54C 800F409C 3C053EE6 */ lui $a1, (0x3EE66666 >> 16)
/* 8D550 800F40A0 34A56666 */ ori $a1, $a1, (0x3EE66666 & 0xFFFF)
/* 8D554 800F40A4 0C051308 */ jal hud_element_set_scale
/* 8D558 800F40A8 0200202D */ daddu $a0, $s0, $zero
/* 8D55C 800F40AC 0C0511F8 */ jal hud_element_draw_without_clipping
/* 8D560 800F40B0 0200202D */ daddu $a0, $s0, $zero
/* 8D564 800F40B4 16400003 */ bnez $s2, .L800F40C4
/* 8D568 800F40B8 00000000 */ nop
/* 8D56C 800F40BC 8FAA0024 */ lw $t2, 0x24($sp)
/* 8D570 800F40C0 022A8821 */ addu $s1, $s1, $t2
.L800F40C4:
/* 8D574 800F40C4 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D578 800F40C8 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D57C 800F40CC 8C420324 */ lw $v0, 0x324($v0)
/* 8D580 800F40D0 26520001 */ addiu $s2, $s2, 0x1
/* 8D584 800F40D4 0242102A */ slt $v0, $s2, $v0
/* 8D588 800F40D8 1440FFD1 */ bnez $v0, .L800F4020
/* 8D58C 800F40DC 0253102A */ slt $v0, $s2, $s3
/* 8D590 800F40E0 0803D0AC */ j .L800F42B0
/* 8D594 800F40E4 00000000 */ nop
glabel .L800F40E8
/* 8D598 800F40E8 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D59C 800F40EC 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D5A0 800F40F0 8C420324 */ lw $v0, 0x324($v0)
/* 8D5A4 800F40F4 1840006E */ blez $v0, .L800F42B0
/* 8D5A8 800F40F8 0000902D */ daddu $s2, $zero, $zero
/* 8D5AC 800F40FC 8FAB0028 */ lw $t3, 0x28($sp)
/* 8D5B0 800F4100 2573FFFF */ addiu $s3, $t3, -0x1
/* 8D5B4 800F4104 0253102A */ slt $v0, $s2, $s3
.L800F4108:
/* 8D5B8 800F4108 14400008 */ bnez $v0, .L800F412C
/* 8D5BC 800F410C 00000000 */ nop
/* 8D5C0 800F4110 3C028011 */ lui $v0, %hi(PopupMenu_DisplayedEntryCount)
/* 8D5C4 800F4114 8042D656 */ lb $v0, %lo(PopupMenu_DisplayedEntryCount)($v0)
/* 8D5C8 800F4118 8FAA0028 */ lw $t2, 0x28($sp)
/* 8D5CC 800F411C 01421021 */ addu $v0, $t2, $v0
/* 8D5D0 800F4120 0052102A */ slt $v0, $v0, $s2
/* 8D5D4 800F4124 10400006 */ beqz $v0, .L800F4140
/* 8D5D8 800F4128 00121880 */ sll $v1, $s2, 2
.L800F412C:
/* 8D5DC 800F412C 1640001F */ bnez $s2, .L800F41AC
/* 8D5E0 800F4130 2631000D */ addiu $s1, $s1, 0xD
/* 8D5E4 800F4134 8FAB0024 */ lw $t3, 0x24($sp)
/* 8D5E8 800F4138 0803D06B */ j .L800F41AC
/* 8D5EC 800F413C 022B8821 */ addu $s1, $s1, $t3
.L800F4140:
/* 8D5F0 800F4140 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D5F4 800F4144 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D5F8 800F4148 3C108011 */ lui $s0, %hi(D_8010D678)
/* 8D5FC 800F414C 8E10D678 */ lw $s0, %lo(D_8010D678)($s0)
/* 8D600 800F4150 00431021 */ addu $v0, $v0, $v1
/* 8D604 800F4154 8C450000 */ lw $a1, 0x0($v0)
/* 8D608 800F4158 0C0511FF */ jal hud_element_set_script
/* 8D60C 800F415C 0200202D */ daddu $a0, $s0, $zero
/* 8D610 800F4160 0200202D */ daddu $a0, $s0, $zero
/* 8D614 800F4164 8FA50020 */ lw $a1, 0x20($sp)
/* 8D618 800F4168 0C051261 */ jal hud_element_set_render_pos
/* 8D61C 800F416C 0220302D */ daddu $a2, $s1, $zero
/* 8D620 800F4170 0200202D */ daddu $a0, $s0, $zero
/* 8D624 800F4174 3C058011 */ lui $a1, %hi(PopupMenu_Alpha)
/* 8D628 800F4178 8CA5D650 */ lw $a1, %lo(PopupMenu_Alpha)($a1)
/* 8D62C 800F417C 0C0513AC */ jal hud_element_set_alpha
/* 8D630 800F4180 2631000D */ addiu $s1, $s1, 0xD
/* 8D634 800F4184 3C053EE6 */ lui $a1, (0x3EE66666 >> 16)
/* 8D638 800F4188 34A56666 */ ori $a1, $a1, (0x3EE66666 & 0xFFFF)
/* 8D63C 800F418C 0C051308 */ jal hud_element_set_scale
/* 8D640 800F4190 0200202D */ daddu $a0, $s0, $zero
/* 8D644 800F4194 0C0511F8 */ jal hud_element_draw_without_clipping
/* 8D648 800F4198 0200202D */ daddu $a0, $s0, $zero
/* 8D64C 800F419C 16400003 */ bnez $s2, .L800F41AC
/* 8D650 800F41A0 00000000 */ nop
/* 8D654 800F41A4 8FAA0024 */ lw $t2, 0x24($sp)
/* 8D658 800F41A8 022A8821 */ addu $s1, $s1, $t2
.L800F41AC:
/* 8D65C 800F41AC 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D660 800F41B0 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D664 800F41B4 8C420324 */ lw $v0, 0x324($v0)
/* 8D668 800F41B8 26520001 */ addiu $s2, $s2, 0x1
/* 8D66C 800F41BC 0242102A */ slt $v0, $s2, $v0
/* 8D670 800F41C0 1440FFD1 */ bnez $v0, .L800F4108
/* 8D674 800F41C4 0253102A */ slt $v0, $s2, $s3
/* 8D678 800F41C8 0803D0AC */ j .L800F42B0
/* 8D67C 800F41CC 00000000 */ nop
glabel .L800F41D0
/* 8D680 800F41D0 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D684 800F41D4 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D688 800F41D8 8C420324 */ lw $v0, 0x324($v0)
/* 8D68C 800F41DC 18400034 */ blez $v0, .L800F42B0
/* 8D690 800F41E0 0000902D */ daddu $s2, $zero, $zero
/* 8D694 800F41E4 8FAB0028 */ lw $t3, 0x28($sp)
/* 8D698 800F41E8 2573FFFF */ addiu $s3, $t3, -0x1
/* 8D69C 800F41EC 0253102A */ slt $v0, $s2, $s3
.L800F41F0:
/* 8D6A0 800F41F0 14400008 */ bnez $v0, .L800F4214
/* 8D6A4 800F41F4 00000000 */ nop
/* 8D6A8 800F41F8 3C028011 */ lui $v0, %hi(PopupMenu_DisplayedEntryCount)
/* 8D6AC 800F41FC 8042D656 */ lb $v0, %lo(PopupMenu_DisplayedEntryCount)($v0)
/* 8D6B0 800F4200 8FAA0028 */ lw $t2, 0x28($sp)
/* 8D6B4 800F4204 01421021 */ addu $v0, $t2, $v0
/* 8D6B8 800F4208 0052102A */ slt $v0, $v0, $s2
/* 8D6BC 800F420C 10400006 */ beqz $v0, .L800F4228
/* 8D6C0 800F4210 00121880 */ sll $v1, $s2, 2
.L800F4214:
/* 8D6C4 800F4214 1640001F */ bnez $s2, .L800F4294
/* 8D6C8 800F4218 2631000D */ addiu $s1, $s1, 0xD
/* 8D6CC 800F421C 8FAB0024 */ lw $t3, 0x24($sp)
/* 8D6D0 800F4220 0803D0A5 */ j .L800F4294
/* 8D6D4 800F4224 022B8821 */ addu $s1, $s1, $t3
.L800F4228:
/* 8D6D8 800F4228 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D6DC 800F422C 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D6E0 800F4230 3C108011 */ lui $s0, %hi(D_8010D678)
/* 8D6E4 800F4234 8E10D678 */ lw $s0, %lo(D_8010D678)($s0)
/* 8D6E8 800F4238 00431021 */ addu $v0, $v0, $v1
/* 8D6EC 800F423C 8C450000 */ lw $a1, 0x0($v0)
/* 8D6F0 800F4240 0C0511FF */ jal hud_element_set_script
/* 8D6F4 800F4244 0200202D */ daddu $a0, $s0, $zero
/* 8D6F8 800F4248 0200202D */ daddu $a0, $s0, $zero
/* 8D6FC 800F424C 8FA50020 */ lw $a1, 0x20($sp)
/* 8D700 800F4250 0C051261 */ jal hud_element_set_render_pos
/* 8D704 800F4254 0220302D */ daddu $a2, $s1, $zero
/* 8D708 800F4258 0200202D */ daddu $a0, $s0, $zero
/* 8D70C 800F425C 3C058011 */ lui $a1, %hi(PopupMenu_Alpha)
/* 8D710 800F4260 8CA5D650 */ lw $a1, %lo(PopupMenu_Alpha)($a1)
/* 8D714 800F4264 0C0513AC */ jal hud_element_set_alpha
/* 8D718 800F4268 2631000D */ addiu $s1, $s1, 0xD
/* 8D71C 800F426C 3C053EE6 */ lui $a1, (0x3EE66666 >> 16)
/* 8D720 800F4270 34A56666 */ ori $a1, $a1, (0x3EE66666 & 0xFFFF)
/* 8D724 800F4274 0C051308 */ jal hud_element_set_scale
/* 8D728 800F4278 0200202D */ daddu $a0, $s0, $zero
/* 8D72C 800F427C 0C0511F8 */ jal hud_element_draw_without_clipping
/* 8D730 800F4280 0200202D */ daddu $a0, $s0, $zero
/* 8D734 800F4284 16400003 */ bnez $s2, .L800F4294
/* 8D738 800F4288 00000000 */ nop
/* 8D73C 800F428C 8FAA0024 */ lw $t2, 0x24($sp)
/* 8D740 800F4290 022A8821 */ addu $s1, $s1, $t2
.L800F4294:
/* 8D744 800F4294 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D748 800F4298 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D74C 800F429C 8C420324 */ lw $v0, 0x324($v0)
/* 8D750 800F42A0 26520001 */ addiu $s2, $s2, 0x1
/* 8D754 800F42A4 0242102A */ slt $v0, $s2, $v0
/* 8D758 800F42A8 1440FFD1 */ bnez $v0, .L800F41F0
/* 8D75C 800F42AC 0253102A */ slt $v0, $s2, $s3
.L800F42B0:
/* 8D760 800F42B0 8FAB005C */ lw $t3, 0x5C($sp)
/* 8D764 800F42B4 3C038011 */ lui $v1, %hi(PopupMenu_FirstDisplayIndex)
/* 8D768 800F42B8 8063D654 */ lb $v1, %lo(PopupMenu_FirstDisplayIndex)($v1)
/* 8D76C 800F42BC 3C048011 */ lui $a0, %hi(PopupMenu_SelectedIndex)
/* 8D770 800F42C0 8C84D648 */ lw $a0, %lo(PopupMenu_SelectedIndex)($a0)
/* 8D774 800F42C4 3C108011 */ lui $s0, %hi(D_8010D66C)
/* 8D778 800F42C8 8E10D66C */ lw $s0, %lo(D_8010D66C)($s0)
/* 8D77C 800F42CC 8FAA0060 */ lw $t2, 0x60($sp)
/* 8D780 800F42D0 256B0008 */ addiu $t3, $t3, 0x8
/* 8D784 800F42D4 00831823 */ subu $v1, $a0, $v1
/* 8D788 800F42D8 00031040 */ sll $v0, $v1, 1
/* 8D78C 800F42DC 00431021 */ addu $v0, $v0, $v1
/* 8D790 800F42E0 00021080 */ sll $v0, $v0, 2
/* 8D794 800F42E4 00431021 */ addu $v0, $v0, $v1
/* 8D798 800F42E8 24420009 */ addiu $v0, $v0, 0x9
/* 8D79C 800F42EC 3C038011 */ lui $v1, %hi(gPopupMenu)
/* 8D7A0 800F42F0 8C63D69C */ lw $v1, %lo(gPopupMenu)($v1)
/* 8D7A4 800F42F4 01428821 */ addu $s1, $t2, $v0
/* 8D7A8 800F42F8 AFAB0020 */ sw $t3, 0x20($sp)
/* 8D7AC 800F42FC 8C630318 */ lw $v1, 0x318($v1)
/* 8D7B0 800F4300 24020002 */ addiu $v0, $zero, 0x2
/* 8D7B4 800F4304 54620004 */ bnel $v1, $v0, .L800F4318
/* 8D7B8 800F4308 0200202D */ daddu $a0, $s0, $zero
/* 8D7BC 800F430C 50800001 */ beql $a0, $zero, .L800F4314
/* 8D7C0 800F4310 2631FFFE */ addiu $s1, $s1, -0x2
.L800F4314:
/* 8D7C4 800F4314 0200202D */ daddu $a0, $s0, $zero
.L800F4318:
/* 8D7C8 800F4318 8FA50020 */ lw $a1, 0x20($sp)
/* 8D7CC 800F431C 0C051261 */ jal hud_element_set_render_pos
/* 8D7D0 800F4320 0220302D */ daddu $a2, $s1, $zero
/* 8D7D4 800F4324 3C058011 */ lui $a1, %hi(PopupMenu_Alpha)
/* 8D7D8 800F4328 8CA5D650 */ lw $a1, %lo(PopupMenu_Alpha)($a1)
/* 8D7DC 800F432C 0C0513AC */ jal hud_element_set_alpha
/* 8D7E0 800F4330 0200202D */ daddu $a0, $s0, $zero
/* 8D7E4 800F4334 0C0511F8 */ jal hud_element_draw_without_clipping
/* 8D7E8 800F4338 0200202D */ daddu $a0, $s0, $zero
/* 8D7EC 800F433C 8FAB005C */ lw $t3, 0x5C($sp)
/* 8D7F0 800F4340 8FAA0060 */ lw $t2, 0x60($sp)
/* 8D7F4 800F4344 3C038011 */ lui $v1, %hi(PopupMenu_DisplayedEntryCount)
/* 8D7F8 800F4348 8063D656 */ lb $v1, %lo(PopupMenu_DisplayedEntryCount)($v1)
/* 8D7FC 800F434C 2551FFFA */ addiu $s1, $t2, -0x6
/* 8D800 800F4350 00031040 */ sll $v0, $v1, 1
/* 8D804 800F4354 00431021 */ addu $v0, $v0, $v1
/* 8D808 800F4358 00021080 */ sll $v0, $v0, 2
/* 8D80C 800F435C 00431021 */ addu $v0, $v0, $v1
/* 8D810 800F4360 3C038011 */ lui $v1, %hi(gPopupMenu)
/* 8D814 800F4364 8C63D69C */ lw $v1, %lo(gPopupMenu)($v1)
/* 8D818 800F4368 02221021 */ addu $v0, $s1, $v0
/* 8D81C 800F436C AFAB0020 */ sw $t3, 0x20($sp)
/* 8D820 800F4370 8C630318 */ lw $v1, 0x318($v1)
/* 8D824 800F4374 24480010 */ addiu $t0, $v0, 0x10
/* 8D828 800F4378 2C62000E */ sltiu $v0, $v1, 0xE
/* 8D82C 800F437C 1040004F */ beqz $v0, .L800F44BC
/* 8D830 800F4380 00031080 */ sll $v0, $v1, 2
/* 8D834 800F4384 3C018011 */ lui $at, %hi(jtbl_8010C838)
/* 8D838 800F4388 00220821 */ addu $at, $at, $v0
/* 8D83C 800F438C 8C22C838 */ lw $v0, %lo(jtbl_8010C838)($at)
/* 8D840 800F4390 00400008 */ jr $v0
/* 8D844 800F4394 00000000 */ nop
glabel .L800F4398
/* 8D848 800F4398 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* 8D84C 800F439C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* 8D850 800F43A0 C7A20020 */ lwc1 $f2, 0x20($sp)
/* 8D854 800F43A4 468010A0 */ cvt.s.w $f2, $f2
/* 8D858 800F43A8 44910000 */ mtc1 $s1, $f0
/* 8D85C 800F43AC 00000000 */ nop
/* 8D860 800F43B0 46800020 */ cvt.s.w $f0, $f0
/* 8D864 800F43B4 3C014080 */ lui $at, (0x40800000 >> 16)
/* 8D868 800F43B8 44812000 */ mtc1 $at, $f4
/* 8D86C 800F43BC 8C620000 */ lw $v0, 0x0($v1)
/* 8D870 800F43C0 46041082 */ mul.s $f2, $f2, $f4
/* 8D874 800F43C4 00000000 */ nop
/* 8D878 800F43C8 0040282D */ daddu $a1, $v0, $zero
/* 8D87C 800F43CC 24420008 */ addiu $v0, $v0, 0x8
/* 8D880 800F43D0 AC620000 */ sw $v0, 0x0($v1)
/* 8D884 800F43D4 8FAB0020 */ lw $t3, 0x20($sp)
/* 8D888 800F43D8 46040002 */ mul.s $f0, $f0, $f4
/* 8D88C 800F43DC 00000000 */ nop
/* 8D890 800F43E0 0803D10D */ j .L800F4434
/* 8D894 800F43E4 25620070 */ addiu $v0, $t3, 0x70
glabel .L800F43E8
/* 8D898 800F43E8 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* 8D89C 800F43EC 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* 8D8A0 800F43F0 C7A20020 */ lwc1 $f2, 0x20($sp)
/* 8D8A4 800F43F4 468010A0 */ cvt.s.w $f2, $f2
/* 8D8A8 800F43F8 44910000 */ mtc1 $s1, $f0
/* 8D8AC 800F43FC 00000000 */ nop
/* 8D8B0 800F4400 46800020 */ cvt.s.w $f0, $f0
/* 8D8B4 800F4404 3C014080 */ lui $at, (0x40800000 >> 16)
/* 8D8B8 800F4408 44812000 */ mtc1 $at, $f4
/* 8D8BC 800F440C 8C620000 */ lw $v0, 0x0($v1)
/* 8D8C0 800F4410 46041082 */ mul.s $f2, $f2, $f4
/* 8D8C4 800F4414 00000000 */ nop
/* 8D8C8 800F4418 0040282D */ daddu $a1, $v0, $zero
/* 8D8CC 800F441C 24420008 */ addiu $v0, $v0, 0x8
/* 8D8D0 800F4420 AC620000 */ sw $v0, 0x0($v1)
/* 8D8D4 800F4424 8FAB0020 */ lw $t3, 0x20($sp)
/* 8D8D8 800F4428 46040002 */ mul.s $f0, $f0, $f4
/* 8D8DC 800F442C 00000000 */ nop
/* 8D8E0 800F4430 25620064 */ addiu $v0, $t3, 0x64
.L800F4434:
/* 8D8E4 800F4434 4600118D */ trunc.w.s $f6, $f2
/* 8D8E8 800F4438 44033000 */ mfc1 $v1, $f6
/* 8D8EC 800F443C 00000000 */ nop
/* 8D8F0 800F4440 30630FFF */ andi $v1, $v1, 0xFFF
/* 8D8F4 800F4444 00031B00 */ sll $v1, $v1, 12
/* 8D8F8 800F4448 4600018D */ trunc.w.s $f6, $f0
/* 8D8FC 800F444C 44043000 */ mfc1 $a0, $f6
/* 8D900 800F4450 00000000 */ nop
/* 8D904 800F4454 30840FFF */ andi $a0, $a0, 0xFFF
/* 8D908 800F4458 44821000 */ mtc1 $v0, $f2
/* 8D90C 800F445C 00000000 */ nop
/* 8D910 800F4460 468010A0 */ cvt.s.w $f2, $f2
/* 8D914 800F4464 46041082 */ mul.s $f2, $f2, $f4
/* 8D918 800F4468 00000000 */ nop
/* 8D91C 800F446C 3C02ED00 */ lui $v0, (0xED000000 >> 16)
/* 8D920 800F4470 00822025 */ or $a0, $a0, $v0
/* 8D924 800F4474 00641825 */ or $v1, $v1, $a0
/* 8D928 800F4478 44880000 */ mtc1 $t0, $f0
/* 8D92C 800F447C 00000000 */ nop
/* 8D930 800F4480 46800020 */ cvt.s.w $f0, $f0
/* 8D934 800F4484 46040002 */ mul.s $f0, $f0, $f4
/* 8D938 800F4488 00000000 */ nop
/* 8D93C 800F448C ACA30000 */ sw $v1, 0x0($a1)
/* 8D940 800F4490 4600118D */ trunc.w.s $f6, $f2
/* 8D944 800F4494 44023000 */ mfc1 $v0, $f6
/* 8D948 800F4498 00000000 */ nop
/* 8D94C 800F449C 30420FFF */ andi $v0, $v0, 0xFFF
/* 8D950 800F44A0 00021300 */ sll $v0, $v0, 12
/* 8D954 800F44A4 4600018D */ trunc.w.s $f6, $f0
/* 8D958 800F44A8 44033000 */ mfc1 $v1, $f6
/* 8D95C 800F44AC 00000000 */ nop
/* 8D960 800F44B0 30630FFF */ andi $v1, $v1, 0xFFF
/* 8D964 800F44B4 00431025 */ or $v0, $v0, $v1
/* 8D968 800F44B8 ACA20004 */ sw $v0, 0x4($a1)
.L800F44BC:
/* 8D96C 800F44BC 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8D970 800F44C0 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8D974 800F44C4 8C420318 */ lw $v0, 0x318($v0)
/* 8D978 800F44C8 2443FFFF */ addiu $v1, $v0, -0x1
/* 8D97C 800F44CC 2C62000D */ sltiu $v0, $v1, 0xD
/* 8D980 800F44D0 10400012 */ beqz $v0, .L800F451C
/* 8D984 800F44D4 00031080 */ sll $v0, $v1, 2
/* 8D988 800F44D8 3C018011 */ lui $at, %hi(jtbl_8010C870)
/* 8D98C 800F44DC 00220821 */ addu $at, $at, $v0
/* 8D990 800F44E0 8C22C870 */ lw $v0, %lo(jtbl_8010C870)($at)
/* 8D994 800F44E4 00400008 */ jr $v0
/* 8D998 800F44E8 00000000 */ nop
glabel .L800F44EC
/* 8D99C 800F44EC 0803D150 */ j .L800F4540
/* 8D9A0 800F44F0 240B0023 */ addiu $t3, $zero, 0x23
glabel .L800F44F4
/* 8D9A4 800F44F4 240A0023 */ addiu $t2, $zero, 0x23
/* 8D9A8 800F44F8 0803D151 */ j .L800F4544
/* 8D9AC 800F44FC AFAA0024 */ sw $t2, 0x24($sp)
glabel .L800F4500
/* 8D9B0 800F4500 0803D150 */ j .L800F4540
/* 8D9B4 800F4504 240B001F */ addiu $t3, $zero, 0x1F
glabel .L800F4508
/* 8D9B8 800F4508 240A001F */ addiu $t2, $zero, 0x1F
/* 8D9BC 800F450C 0803D151 */ j .L800F4544
/* 8D9C0 800F4510 AFAA0024 */ sw $t2, 0x24($sp)
glabel .L800F4514
/* 8D9C4 800F4514 0803D150 */ j .L800F4540
/* 8D9C8 800F4518 240B001F */ addiu $t3, $zero, 0x1F
glabel .L800F451C
/* 8D9CC 800F451C 240A0025 */ addiu $t2, $zero, 0x25
/* 8D9D0 800F4520 0803D151 */ j .L800F4544
/* 8D9D4 800F4524 AFAA0024 */ sw $t2, 0x24($sp)
glabel .L800F4528
/* 8D9D8 800F4528 0803D150 */ j .L800F4540
/* 8D9DC 800F452C 240B001D */ addiu $t3, $zero, 0x1D
glabel .L800F4530
/* 8D9E0 800F4530 240A0015 */ addiu $t2, $zero, 0x15
/* 8D9E4 800F4534 0803D151 */ j .L800F4544
/* 8D9E8 800F4538 AFAA0024 */ sw $t2, 0x24($sp)
glabel .L800F453C
/* 8D9EC 800F453C 240B001E */ addiu $t3, $zero, 0x1E
.L800F4540:
/* 8D9F0 800F4540 AFAB0024 */ sw $t3, 0x24($sp)
.L800F4544:
/* 8D9F4 800F4544 3C028011 */ lui $v0, %hi(PopupMenu_FirstDisplayIndex)
/* 8D9F8 800F4548 8042D654 */ lb $v0, %lo(PopupMenu_FirstDisplayIndex)($v0)
/* 8D9FC 800F454C 18400012 */ blez $v0, .L800F4598
/* 8DA00 800F4550 00000000 */ nop
/* 8DA04 800F4554 8FAA005C */ lw $t2, 0x5C($sp)
/* 8DA08 800F4558 8FAB0024 */ lw $t3, 0x24($sp)
/* 8DA0C 800F455C 3C108011 */ lui $s0, %hi(D_8010D670)
/* 8DA10 800F4560 8E10D670 */ lw $s0, %lo(D_8010D670)($s0)
/* 8DA14 800F4564 014B5021 */ addu $t2, $t2, $t3
/* 8DA18 800F4568 AFAA0020 */ sw $t2, 0x20($sp)
/* 8DA1C 800F456C 25450023 */ addiu $a1, $t2, 0x23
/* 8DA20 800F4570 8FAA0060 */ lw $t2, 0x60($sp)
/* 8DA24 800F4574 0200202D */ daddu $a0, $s0, $zero
/* 8DA28 800F4578 0C051261 */ jal hud_element_set_render_pos
/* 8DA2C 800F457C 2546FFFF */ addiu $a2, $t2, -0x1
/* 8DA30 800F4580 3C058011 */ lui $a1, %hi(PopupMenu_Alpha)
/* 8DA34 800F4584 8CA5D650 */ lw $a1, %lo(PopupMenu_Alpha)($a1)
/* 8DA38 800F4588 0C0513AC */ jal hud_element_set_alpha
/* 8DA3C 800F458C 0200202D */ daddu $a0, $s0, $zero
/* 8DA40 800F4590 0C0511F8 */ jal hud_element_draw_without_clipping
/* 8DA44 800F4594 0200202D */ daddu $a0, $s0, $zero
.L800F4598:
/* 8DA48 800F4598 3C028011 */ lui $v0, %hi(gPopupMenu)
/* 8DA4C 800F459C 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0)
/* 8DA50 800F45A0 3C038011 */ lui $v1, %hi(PopupMenu_LastDisplayIndex)
/* 8DA54 800F45A4 8063D655 */ lb $v1, %lo(PopupMenu_LastDisplayIndex)($v1)
/* 8DA58 800F45A8 8C420324 */ lw $v0, 0x324($v0)
/* 8DA5C 800F45AC 0062182A */ slt $v1, $v1, $v0
/* 8DA60 800F45B0 10600019 */ beqz $v1, .L800F4618
/* 8DA64 800F45B4 00000000 */ nop
/* 8DA68 800F45B8 8FAB005C */ lw $t3, 0x5C($sp)
/* 8DA6C 800F45BC 8FAA0024 */ lw $t2, 0x24($sp)
/* 8DA70 800F45C0 3C038011 */ lui $v1, %hi(PopupMenu_MaxDisplayableEntryCount)
/* 8DA74 800F45C4 8063D68F */ lb $v1, %lo(PopupMenu_MaxDisplayableEntryCount)($v1)
/* 8DA78 800F45C8 3C108011 */ lui $s0, %hi(D_8010D674)
/* 8DA7C 800F45CC 8E10D674 */ lw $s0, %lo(D_8010D674)($s0)
/* 8DA80 800F45D0 016A5821 */ addu $t3, $t3, $t2
/* 8DA84 800F45D4 AFAB0020 */ sw $t3, 0x20($sp)
/* 8DA88 800F45D8 25650023 */ addiu $a1, $t3, 0x23
/* 8DA8C 800F45DC 00031040 */ sll $v0, $v1, 1
/* 8DA90 800F45E0 00431021 */ addu $v0, $v0, $v1
/* 8DA94 800F45E4 00021080 */ sll $v0, $v0, 2
/* 8DA98 800F45E8 00431021 */ addu $v0, $v0, $v1
/* 8DA9C 800F45EC 8FAB0060 */ lw $t3, 0x60($sp)
/* 8DAA0 800F45F0 0200202D */ daddu $a0, $s0, $zero
/* 8DAA4 800F45F4 01628821 */ addu $s1, $t3, $v0
/* 8DAA8 800F45F8 0C051261 */ jal hud_element_set_render_pos
/* 8DAAC 800F45FC 26260005 */ addiu $a2, $s1, 0x5
/* 8DAB0 800F4600 3C058011 */ lui $a1, %hi(PopupMenu_Alpha)
/* 8DAB4 800F4604 8CA5D650 */ lw $a1, %lo(PopupMenu_Alpha)($a1)
/* 8DAB8 800F4608 0C0513AC */ jal hud_element_set_alpha
/* 8DABC 800F460C 0200202D */ daddu $a0, $s0, $zero
/* 8DAC0 800F4610 0C0511F8 */ jal hud_element_draw_without_clipping
/* 8DAC4 800F4614 0200202D */ daddu $a0, $s0, $zero
.L800F4618:
/* 8DAC8 800F4618 8FBF0054 */ lw $ra, 0x54($sp)
/* 8DACC 800F461C 8FBE0050 */ lw $fp, 0x50($sp)
/* 8DAD0 800F4620 8FB7004C */ lw $s7, 0x4C($sp)
/* 8DAD4 800F4624 8FB60048 */ lw $s6, 0x48($sp)
/* 8DAD8 800F4628 8FB50044 */ lw $s5, 0x44($sp)
/* 8DADC 800F462C 8FB40040 */ lw $s4, 0x40($sp)
/* 8DAE0 800F4630 8FB3003C */ lw $s3, 0x3C($sp)
/* 8DAE4 800F4634 8FB20038 */ lw $s2, 0x38($sp)
/* 8DAE8 800F4638 8FB10034 */ lw $s1, 0x34($sp)
/* 8DAEC 800F463C 8FB00030 */ lw $s0, 0x30($sp)
/* 8DAF0 800F4640 03E00008 */ jr $ra
/* 8DAF4 800F4644 27BD0058 */ addiu $sp, $sp, 0x58
### DECOMPILED C INSTRUCTIONS:
void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
s32 x, y;
s32 x1, y1;
s32 offset;
s32 sp28;
s32 dy;
s32 i, j;
s32 id;
s32 msgPal;
s32 a0;
s32 v0;
s32 t;
switch (gPopupState) {
case POPUP_STATE_10:
case POPUP_STATE_CHOSE_WORLD:
case POPUP_STATE_CHOSE_BATTLE:
case POPUP_STATE_MINUS_6:
case POPUP_STATE_MINUS_7:
case POPUP_STATE_MINUS_8:
case POPUP_STATE_CHOOSING:
case POPUP_STATE_ALREADY_HAVE_PARTNER_BEGIN:
case POPUP_STATE_ALREADY_HAVE_PARTNER_SHOW:
case POPUP_STATE_20:
case POPUP_STATE_CANCEL_DIP:
case POPUP_STATE_CANCEL_DIP_AWAIT_CHOICE:
case POPUP_STATE_CANCEL_DIP_ACCEPT:
case POPUP_STATE_CANCEL_DIP_DECLINE:
case POPUP_STATE_104:
case POPUP_STATE_105:
break;
default:
return;
}
baseX += 2;
baseY += 15;
y = -PopupMenu_FirstDisplayIndex * LINE_HEIGHT;
y1 = D_8010D658;
dy = y - y1;
if (dy < 130) {
dy *= 0.5;
} else {
dy = dy * 100 / 150;
}
if (dy != 0) {
y1 += dy;
} else {
y1 = y;
}
D_8010D658 = y1;
sp28 = -D_8010D658 / LINE_HEIGHT;
x = baseX;
y = baseY;
y1 = y + PopupMenu_DisplayedEntryCount * LINE_HEIGHT + 4;
switch (gPopupMenu->popupType) {
case POPUP_MENU_USE_ITEM:
case POPUP_MENU_TRADE_FOR_BADGE:
case POPUP_MENU_SELL_ITEM:
case POPUP_MENU_CHECK_ITEM:
case POPUP_MENU_CLAIM_ITEM:
case POPUP_MENU_READ_LETTER:
case POPUP_MENU_TAKE_FROM_CHEST:
case POPUP_MENU_READ_DIARY_PAGE:
case POPUP_MENU_READ_POSTCARD:
case POPUP_MENU_USEKEY:
case POPUP_MENU_POST_OFFICE:
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 112, y1);
break;
case POPUP_MENU_SWITCH_PARTNER:
case POPUP_MENU_UPGRADE_PARTNER:
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 90, y1);
break;
case POPUP_MENU_THROW_AWAY_ITEM:
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 160, y1);
break;
}
y = baseY + D_8010D658 + 8;
if (gPopupMenu->popupType == POPUP_MENU_THROW_AWAY_ITEM) {
y = baseY + D_8010D658 + 21;
}
id = PopupMenu_EmptybarHEID;
hud_element_set_render_pos(id, baseX + 73, y - 3);
hud_element_set_alpha(id, PopupMenu_Alpha);
if (PopupMenu_MaxDisplayableEntryCount < gPopupMenu->numEntries) {
hud_element_draw_without_clipping(id);
}
x = baseX;
y = baseY + 2;
y1 = y + PopupMenu_DisplayedEntryCount * LINE_HEIGHT;
if ((gPopupMenu->popupType == POPUP_MENU_THROW_AWAY_ITEM) && (PopupMenu_FirstDisplayIndex < 2)) {
y = baseY;
y1++;
}
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + PopupContentScissorWidths[gPopupMenu->popupType], y1);
offset = 0;
x = baseX + 32;
y = baseY + D_8010D658 + 2;
if (gPopupMenu->popupType == POPUP_MENU_THROW_AWAY_ITEM) {
y = baseY + D_8010D658;
offset = 2;
}
t = 0;
for (i = 0; i < gPopupMenu->numEntries; i++, t++) {
if (i < sp28 - 1 || i > sp28 + PopupMenu_DisplayedEntryCount) {
y += LINE_HEIGHT;
if (i == 0) {
y += offset;
}
} else {
msgPal = D_8010D690;
if (gPopupMenu->popupType == POPUP_MENU_SWITCH_PARTNER) {
msgPal = MSG_PAL_STANDARD;
}
if (gPopupMenu->enabled[t] == 0) {
msgPal = MSG_PAL_0B;
}
switch (gPopupMenu->popupType) {
case POPUP_MENU_USE_ITEM:
case POPUP_MENU_THROW_AWAY_ITEM:
case POPUP_MENU_TRADE_FOR_BADGE:
case POPUP_MENU_SELL_ITEM:
case POPUP_MENU_CHECK_ITEM:
case POPUP_MENU_CLAIM_ITEM:
case POPUP_MENU_TAKE_FROM_CHEST:
case POPUP_MENU_USEKEY:
case POPUP_MENU_POST_OFFICE:
draw_msg(gPopupMenu->nameMsg[t], x, y, PopupMenu_Alpha, msgPal, DRAW_MSG_STYLE_MENU);
break;
case POPUP_MENU_SWITCH_PARTNER:
case POPUP_MENU_UPGRADE_PARTNER:
draw_msg(gPopupMenu->nameMsg[t], x, y, PopupMenu_Alpha, msgPal, DRAW_MSG_STYLE_MENU);
break;
case POPUP_MENU_READ_LETTER:
if (gPopupMenu->enabled[t] == 2) {
msgPal = MSG_PAL_22;
}
draw_msg(gPopupMenu->nameMsg[t], x, y, PopupMenu_Alpha, msgPal, DRAW_MSG_STYLE_MENU);
break;
case POPUP_MENU_READ_DIARY_PAGE:
if (gPopupMenu->value[t] != 0) {
msgPal = MSG_PAL_0B;
} else {
msgPal = MSG_PAL_STANDARD;
}
set_message_value(gPopupMenu->userIndex[t] + 1, 0);
draw_msg(MSG_Menus_00CD, x + 8, y, PopupMenu_Alpha, msgPal, DRAW_MSG_STYLE_MENU);
break;
case POPUP_MENU_READ_POSTCARD:
if (gPopupMenu->value[t] != 0) {
msgPal = MSG_PAL_0B;
} else {
msgPal = MSG_PAL_STANDARD;
}
a0 = gPopupMenu->nameMsg[t];
draw_msg(a0, x, y, PopupMenu_Alpha, msgPal, DRAW_MSG_STYLE_MENU);
break;
}
switch (gPopupMenu->popupType) {
case POPUP_MENU_SWITCH_PARTNER:
case POPUP_MENU_UPGRADE_PARTNER:
for (j = 0; j < ARRAY_COUNT(D_80109890); j++) {
id = PopupMenu_PartnerLevelHEID;
if (gPopupMenu->enabled[i]) {
hud_element_set_script(id, D_80109890[j]);
} else {
hud_element_set_script(id, D_80109898[j]);
}
if (gPopupMenu->popupType == POPUP_MENU_SWITCH_PARTNER) {
hud_element_set_render_pos(id, x + 85 + j * 13, y + 10);
} else {
hud_element_set_render_pos(id, x + 91 + j * 13, y + 10);
}
if (j < gPopupMenu->value[i]) {
hud_element_draw_next(id);
}
}
break;
case POPUP_MENU_TRADE_FOR_BADGE:
draw_number(gPopupMenu->value[t], x + 115, y, 1, msgPal, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE_RIGHT);
break;
case POPUP_MENU_SELL_ITEM:
draw_number(gPopupMenu->value[t], x + 121, y, 1, msgPal, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE_RIGHT);
break;
}
y += LINE_HEIGHT;
if (i == 0) {
y += offset;
}
}
}
x = baseX + 24;
y = baseY + D_8010D658 + 8;
offset = 0;
if (gPopupMenu->popupType == POPUP_MENU_THROW_AWAY_ITEM) {
y = baseY + D_8010D658 + 6;
offset = 2;
}
switch (gPopupMenu->popupType) {
case POPUP_MENU_USE_ITEM:
case POPUP_MENU_SWITCH_PARTNER:
case POPUP_MENU_THROW_AWAY_ITEM:
case POPUP_MENU_TRADE_FOR_BADGE:
case POPUP_MENU_UPGRADE_PARTNER:
case POPUP_MENU_SELL_ITEM:
case POPUP_MENU_CHECK_ITEM:
case POPUP_MENU_CLAIM_ITEM:
case POPUP_MENU_READ_LETTER:
case POPUP_MENU_TAKE_FROM_CHEST:
case POPUP_MENU_USEKEY:
case POPUP_MENU_POST_OFFICE:
for (i = 0; i < gPopupMenu->numEntries; i++) {
if (sp28 - 1 > i || sp28 + PopupMenu_DisplayedEntryCount < i) {
y += LINE_HEIGHT;
if (i == 0) {
y += offset;
}
} else {
id = PopupMenu_EntryIconHEID;
hud_element_set_script(id, gPopupMenu->ptrIcon[i]);
hud_element_set_render_pos(id, x, y);
hud_element_set_alpha(id, PopupMenu_Alpha);
hud_element_set_scale(id, 0.45f);
hud_element_draw_without_clipping(id);
y += LINE_HEIGHT;
if (i == 0) {
y += offset;
}
}
}
break;
case POPUP_MENU_READ_DIARY_PAGE:
for (i = 0; i < gPopupMenu->numEntries; i++) {
if (sp28 - 1 > i || sp28 + PopupMenu_DisplayedEntryCount < i) {
y += LINE_HEIGHT;
if (i == 0) {
y += offset;
}
} else {
id = PopupMenu_EntryIconHEID;
hud_element_set_script(id, gPopupMenu->ptrIcon[i]);
hud_element_set_render_pos(id, x, y);
hud_element_set_alpha(id, PopupMenu_Alpha);
hud_element_set_scale(id, 0.45f);
hud_element_draw_without_clipping(id);
y += LINE_HEIGHT;
if (i == 0) {
y += offset;
}
}
}
break;
case POPUP_MENU_READ_POSTCARD:
for (i = 0; i < gPopupMenu->numEntries; i++) {
if (sp28 - 1 > i || sp28 + PopupMenu_DisplayedEntryCount < i) {
y += LINE_HEIGHT;
if (i == 0) {
y += offset;
}
} else {
id = PopupMenu_EntryIconHEID;
hud_element_set_script(id, gPopupMenu->ptrIcon[i]);
hud_element_set_render_pos(id, x, y);
hud_element_set_alpha(id, PopupMenu_Alpha);
hud_element_set_scale(id, 0.45f);
hud_element_draw_without_clipping(id);
y += LINE_HEIGHT;
if (i == 0) {
y += offset;
}
}
}
break;
}
v0 = (PopupMenu_SelectedIndex - PopupMenu_FirstDisplayIndex) * LINE_HEIGHT;
x = baseX + 8;
y = baseY + 9 + v0;
id = PopupMenu_CursorHEID;
if (gPopupMenu->popupType == POPUP_TYPE_THROW_AWAY_ITEM && PopupMenu_SelectedIndex == 0) {
y -= 2;
}
hud_element_set_render_pos(id, x, y);
hud_element_set_alpha(id, PopupMenu_Alpha);
hud_element_draw_without_clipping(id);
x = baseX;
y = baseY - 6;
y1 = y + (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 16;
switch (gPopupMenu->popupType) {
case POPUP_MENU_USE_ITEM:
case POPUP_MENU_THROW_AWAY_ITEM:
case POPUP_MENU_TRADE_FOR_BADGE:
case POPUP_MENU_SELL_ITEM:
case POPUP_MENU_CHECK_ITEM:
case POPUP_MENU_CLAIM_ITEM:
case POPUP_MENU_READ_LETTER:
case POPUP_MENU_TAKE_FROM_CHEST:
case POPUP_MENU_READ_DIARY_PAGE:
case POPUP_MENU_READ_POSTCARD:
case POPUP_MENU_USEKEY:
case POPUP_MENU_POST_OFFICE:
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 112, y1);
break;
case POPUP_MENU_SWITCH_PARTNER:
case POPUP_MENU_UPGRADE_PARTNER:
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 100, y1);
break;
}
switch (gPopupMenu->popupType) {
case POPUP_MENU_SWITCH_PARTNER:
offset = 35;
break;
case POPUP_MENU_THROW_AWAY_ITEM:
case POPUP_MENU_UPGRADE_PARTNER:
offset = 35;
break;
case POPUP_MENU_SELL_ITEM:
offset = 31;
break;
case POPUP_MENU_CHECK_ITEM:
offset = 31;
break;
case POPUP_MENU_CLAIM_ITEM:
case POPUP_MENU_READ_LETTER:
case POPUP_MENU_TAKE_FROM_CHEST:
offset = 31;
break;
default:
offset = 37;
break;
case POPUP_MENU_READ_DIARY_PAGE:
offset = 29;
break;
case POPUP_MENU_READ_POSTCARD:
offset = 21;
break;
case POPUP_MENU_TRADE_FOR_BADGE:
case POPUP_MENU_POST_OFFICE:
offset = 30;
break;
}
if (PopupMenu_FirstDisplayIndex > 0) {
id = PopupMenu_UpArrowHEID;
x = baseX + offset;
y = baseY;
hud_element_set_render_pos(id, x + 35, y - 1);
hud_element_set_alpha(id, PopupMenu_Alpha);
hud_element_draw_without_clipping(id);
}
if (PopupMenu_LastDisplayIndex < gPopupMenu->numEntries) {
id = PopupMenu_DownArrowHEID;
x = baseX + offset;
y = baseY + PopupMenu_MaxDisplayableEntryCount * LINE_HEIGHT;
hud_element_set_render_pos(id, x + 35, y + 5);
hud_element_set_alpha(id, PopupMenu_Alpha);
hud_element_draw_without_clipping(id);
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_80275F00
/* 1A47E0 80275F00 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 1A47E4 80275F04 AFB20020 */ sw $s2, 0x20($sp)
/* 1A47E8 80275F08 3C12800E */ lui $s2, %hi(gBattleStatus + 0xD8)
/* 1A47EC 80275F0C 8E52C148 */ lw $s2, %lo(gBattleStatus + 0xD8)($s2)
/* 1A47F0 80275F10 AFB30024 */ sw $s3, 0x24($sp)
/* 1A47F4 80275F14 0080982D */ daddu $s3, $a0, $zero
/* 1A47F8 80275F18 AFBF0028 */ sw $ra, 0x28($sp)
/* 1A47FC 80275F1C AFB1001C */ sw $s1, 0x1C($sp)
/* 1A4800 80275F20 AFB00018 */ sw $s0, 0x18($sp)
/* 1A4804 80275F24 F7BA0048 */ sdc1 $f26, 0x48($sp)
/* 1A4808 80275F28 F7B80040 */ sdc1 $f24, 0x40($sp)
/* 1A480C 80275F2C F7B60038 */ sdc1 $f22, 0x38($sp)
/* 1A4810 80275F30 F7B40030 */ sdc1 $f20, 0x30($sp)
/* 1A4814 80275F34 8E71000C */ lw $s1, 0xC($s3)
/* 1A4818 80275F38 10A0001E */ beqz $a1, .L80275FB4
/* 1A481C 80275F3C 2650000C */ addiu $s0, $s2, 0xC
/* 1A4820 80275F40 8E250000 */ lw $a1, 0x0($s1)
/* 1A4824 80275F44 0C0B1EAF */ jal evt_get_variable
/* 1A4828 80275F48 26310004 */ addiu $s1, $s1, 0x4
/* 1A482C 80275F4C A6420070 */ sh $v0, 0x70($s2)
/* 1A4830 80275F50 8E250000 */ lw $a1, 0x0($s1)
/* 1A4834 80275F54 0C0B1EAF */ jal evt_get_variable
/* 1A4838 80275F58 0260202D */ daddu $a0, $s3, $zero
/* 1A483C 80275F5C A6420072 */ sh $v0, 0x72($s2)
/* 1A4840 80275F60 AE600074 */ sw $zero, 0x74($s3)
/* 1A4844 80275F64 AE600070 */ sw $zero, 0x70($s3)
/* 1A4848 80275F68 86430072 */ lh $v1, 0x72($s2)
/* 1A484C 80275F6C 24020001 */ addiu $v0, $zero, 0x1
/* 1A4850 80275F70 14620005 */ bne $v1, $v0, .L80275F88
/* 1A4854 80275F74 24020003 */ addiu $v0, $zero, 0x3
/* 1A4858 80275F78 2402000B */ addiu $v0, $zero, 0xB
/* 1A485C 80275F7C AE620070 */ sw $v0, 0x70($s3)
/* 1A4860 80275F80 86430072 */ lh $v1, 0x72($s2)
/* 1A4864 80275F84 24020003 */ addiu $v0, $zero, 0x3
.L80275F88:
/* 1A4868 80275F88 14620002 */ bne $v1, $v0, .L80275F94
/* 1A486C 80275F8C 24020014 */ addiu $v0, $zero, 0x14
/* 1A4870 80275F90 AE620070 */ sw $v0, 0x70($s3)
.L80275F94:
/* 1A4874 80275F94 86430072 */ lh $v1, 0x72($s2)
/* 1A4878 80275F98 24020002 */ addiu $v0, $zero, 0x2
/* 1A487C 80275F9C 10620003 */ beq $v1, $v0, .L80275FAC
/* 1A4880 80275FA0 24020004 */ addiu $v0, $zero, 0x4
/* 1A4884 80275FA4 14620003 */ bne $v1, $v0, .L80275FB4
/* 1A4888 80275FA8 00000000 */ nop
.L80275FAC:
/* 1A488C 80275FAC 2402001E */ addiu $v0, $zero, 0x1E
/* 1A4890 80275FB0 AE620070 */ sw $v0, 0x70($s3)
.L80275FB4:
/* 1A4894 80275FB4 8E630070 */ lw $v1, 0x70($s3)
/* 1A4898 80275FB8 2402000A */ addiu $v0, $zero, 0xA
/* 1A489C 80275FBC 106200BC */ beq $v1, $v0, .L802762B0
/* 1A48A0 80275FC0 2862000B */ slti $v0, $v1, 0xB
/* 1A48A4 80275FC4 10400005 */ beqz $v0, .L80275FDC
/* 1A48A8 80275FC8 24020014 */ addiu $v0, $zero, 0x14
/* 1A48AC 80275FCC 10600009 */ beqz $v1, .L80275FF4
/* 1A48B0 80275FD0 00000000 */ nop
/* 1A48B4 80275FD4 0809DA2C */ j .L802768B0
/* 1A48B8 80275FD8 00000000 */ nop
.L80275FDC:
/* 1A48BC 80275FDC 10620163 */ beq $v1, $v0, .L8027656C
/* 1A48C0 80275FE0 2402001E */ addiu $v0, $zero, 0x1E
/* 1A48C4 80275FE4 1062018F */ beq $v1, $v0, .L80276624
/* 1A48C8 80275FE8 00000000 */ nop
/* 1A48CC 80275FEC 0809DA2C */ j .L802768B0
/* 1A48D0 80275FF0 00000000 */ nop
.L80275FF4:
/* 1A48D4 80275FF4 C6400144 */ lwc1 $f0, 0x144($s2)
/* 1A48D8 80275FF8 C618000C */ lwc1 $f24, 0xC($s0)
/* 1A48DC 80275FFC C61A0014 */ lwc1 $f26, 0x14($s0)
/* 1A48E0 80276000 E6000000 */ swc1 $f0, 0x0($s0)
/* 1A48E4 80276004 46000586 */ mov.s $f22, $f0
/* 1A48E8 80276008 4406C000 */ mfc1 $a2, $f24
/* 1A48EC 8027600C C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A48F0 80276010 4600B306 */ mov.s $f12, $f22
/* 1A48F4 80276014 E6000004 */ swc1 $f0, 0x4($s0)
/* 1A48F8 80276018 C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A48FC 8027601C 4407D000 */ mfc1 $a3, $f26
/* 1A4900 80276020 46000506 */ mov.s $f20, $f0
/* 1A4904 80276024 46000386 */ mov.s $f14, $f0
/* 1A4908 80276028 0C00A720 */ jal atan2
/* 1A490C 8027602C E6140008 */ swc1 $f20, 0x8($s0)
/* 1A4910 80276030 4600B306 */ mov.s $f12, $f22
/* 1A4914 80276034 4406C000 */ mfc1 $a2, $f24
/* 1A4918 80276038 4407D000 */ mfc1 $a3, $f26
/* 1A491C 8027603C 4600A386 */ mov.s $f14, $f20
/* 1A4920 80276040 0C00A7B5 */ jal dist2D
/* 1A4924 80276044 E6000048 */ swc1 $f0, 0x48($s0)
/* 1A4928 80276048 86020064 */ lh $v0, 0x64($s0)
/* 1A492C 8027604C 46000106 */ mov.s $f4, $f0
/* 1A4930 80276050 14400012 */ bnez $v0, .L8027609C
/* 1A4934 80276054 E604004C */ swc1 $f4, 0x4C($s0)
/* 1A4938 80276058 C6000040 */ lwc1 $f0, 0x40($s0)
/* 1A493C 8027605C C6020040 */ lwc1 $f2, 0x40($s0)
/* 1A4940 80276060 46002003 */ div.s $f0, $f4, $f0
/* 1A4944 80276064 4600028D */ trunc.w.s $f10, $f0
/* 1A4948 80276068 44035000 */ mfc1 $v1, $f10
/* 1A494C 8027606C 00000000 */ nop
/* 1A4950 80276070 00031400 */ sll $v0, $v1, 16
/* 1A4954 80276074 00021403 */ sra $v0, $v0, 16
/* 1A4958 80276078 44820000 */ mtc1 $v0, $f0
/* 1A495C 8027607C 00000000 */ nop
/* 1A4960 80276080 46800020 */ cvt.s.w $f0, $f0
/* 1A4964 80276084 46020002 */ mul.s $f0, $f0, $f2
/* 1A4968 80276088 00000000 */ nop
/* 1A496C 8027608C 46002086 */ mov.s $f2, $f4
/* 1A4970 80276090 A6030064 */ sh $v1, 0x64($s0)
/* 1A4974 80276094 0809D834 */ j .L802760D0
/* 1A4978 80276098 46001201 */ sub.s $f8, $f2, $f0
.L8027609C:
/* 1A497C 8027609C 44821000 */ mtc1 $v0, $f2
/* 1A4980 802760A0 00000000 */ nop
/* 1A4984 802760A4 468010A0 */ cvt.s.w $f2, $f2
/* 1A4988 802760A8 86020064 */ lh $v0, 0x64($s0)
/* 1A498C 802760AC 46022083 */ div.s $f2, $f4, $f2
/* 1A4990 802760B0 44820000 */ mtc1 $v0, $f0
/* 1A4994 802760B4 00000000 */ nop
/* 1A4998 802760B8 46800020 */ cvt.s.w $f0, $f0
/* 1A499C 802760BC 46020002 */ mul.s $f0, $f0, $f2
/* 1A49A0 802760C0 00000000 */ nop
/* 1A49A4 802760C4 C604004C */ lwc1 $f4, 0x4C($s0)
/* 1A49A8 802760C8 E6020040 */ swc1 $f2, 0x40($s0)
/* 1A49AC 802760CC 46002201 */ sub.s $f8, $f4, $f0
.L802760D0:
/* 1A49B0 802760D0 86020064 */ lh $v0, 0x64($s0)
/* 1A49B4 802760D4 3C014049 */ lui $at, (0x40490FD0 >> 16)
/* 1A49B8 802760D8 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF)
/* 1A49BC 802760DC 44812000 */ mtc1 $at, $f4
/* 1A49C0 802760E0 C602000C */ lwc1 $f2, 0xC($s0)
/* 1A49C4 802760E4 44820000 */ mtc1 $v0, $f0
/* 1A49C8 802760E8 00000000 */ nop
/* 1A49CC 802760EC 46800020 */ cvt.s.w $f0, $f0
/* 1A49D0 802760F0 46002103 */ div.s $f4, $f4, $f0
/* 1A49D4 802760F4 C6000000 */ lwc1 $f0, 0x0($s0)
/* 1A49D8 802760F8 46001081 */ sub.s $f2, $f2, $f0
/* 1A49DC 802760FC 8E06005C */ lw $a2, 0x5C($s0)
/* 1A49E0 80276100 44820000 */ mtc1 $v0, $f0
/* 1A49E4 80276104 00000000 */ nop
/* 1A49E8 80276108 46800020 */ cvt.s.w $f0, $f0
/* 1A49EC 8027610C 46001083 */ div.s $f2, $f2, $f0
/* 1A49F0 80276110 C6000010 */ lwc1 $f0, 0x10($s0)
/* 1A49F4 80276114 0000202D */ daddu $a0, $zero, $zero
/* 1A49F8 80276118 E604003C */ swc1 $f4, 0x3C($s0)
/* 1A49FC 8027611C E6020030 */ swc1 $f2, 0x30($s0)
/* 1A4A00 80276120 C6020004 */ lwc1 $f2, 0x4($s0)
/* 1A4A04 80276124 C6040014 */ lwc1 $f4, 0x14($s0)
/* 1A4A08 80276128 46020001 */ sub.s $f0, $f0, $f2
/* 1A4A0C 8027612C 44821000 */ mtc1 $v0, $f2
/* 1A4A10 80276130 00000000 */ nop
/* 1A4A14 80276134 468010A0 */ cvt.s.w $f2, $f2
/* 1A4A18 80276138 46001186 */ mov.s $f6, $f2
/* 1A4A1C 8027613C 46020003 */ div.s $f0, $f0, $f2
/* 1A4A20 80276140 C6020008 */ lwc1 $f2, 0x8($s0)
/* 1A4A24 80276144 0080282D */ daddu $a1, $a0, $zero
/* 1A4A28 80276148 AE000044 */ sw $zero, 0x44($s0)
/* 1A4A2C 8027614C E6000034 */ swc1 $f0, 0x34($s0)
/* 1A4A30 80276150 46003006 */ mov.s $f0, $f6
/* 1A4A34 80276154 46022101 */ sub.s $f4, $f4, $f2
/* 1A4A38 80276158 C6020040 */ lwc1 $f2, 0x40($s0)
/* 1A4A3C 8027615C 46004003 */ div.s $f0, $f8, $f0
/* 1A4A40 80276160 46001080 */ add.s $f2, $f2, $f0
/* 1A4A44 80276164 46062103 */ div.s $f4, $f4, $f6
/* 1A4A48 80276168 E6040038 */ swc1 $f4, 0x38($s0)
/* 1A4A4C 8027616C 0C098F3F */ jal set_animation
/* 1A4A50 80276170 E6020040 */ swc1 $f2, 0x40($s0)
/* 1A4A54 80276174 C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A4A58 80276178 24040160 */ addiu $a0, $zero, 0x160
/* 1A4A5C 8027617C E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A4A60 80276180 8E460144 */ lw $a2, 0x144($s2)
/* 1A4A64 80276184 8E470148 */ lw $a3, 0x148($s2)
/* 1A4A68 80276188 0C052757 */ jal sfx_play_sound_at_position
/* 1A4A6C 8027618C 0000282D */ daddu $a1, $zero, $zero
/* 1A4A70 80276190 C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A4A74 80276194 24040147 */ addiu $a0, $zero, 0x147
/* 1A4A78 80276198 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A4A7C 8027619C 8E460144 */ lw $a2, 0x144($s2)
/* 1A4A80 802761A0 8E470148 */ lw $a3, 0x148($s2)
/* 1A4A84 802761A4 0C052757 */ jal sfx_play_sound_at_position
/* 1A4A88 802761A8 0000282D */ daddu $a1, $zero, $zero
/* 1A4A8C 802761AC 86020064 */ lh $v0, 0x64($s0)
/* 1A4A90 802761B0 24030168 */ addiu $v1, $zero, 0x168
/* 1A4A94 802761B4 14400002 */ bnez $v0, .L802761C0
/* 1A4A98 802761B8 0062001A */ div $zero, $v1, $v0
/* 1A4A9C 802761BC 0007000D */ break 7
.L802761C0:
/* 1A4AA0 802761C0 2401FFFF */ addiu $at, $zero, -0x1
/* 1A4AA4 802761C4 14410004 */ bne $v0, $at, .L802761D8
/* 1A4AA8 802761C8 3C018000 */ lui $at, (0x80000000 >> 16)
/* 1A4AAC 802761CC 14610002 */ bne $v1, $at, .L802761D8
/* 1A4AB0 802761D0 00000000 */ nop
/* 1A4AB4 802761D4 0006000D */ break 6
.L802761D8:
/* 1A4AB8 802761D8 00001812 */ mflo $v1
/* 1A4ABC 802761DC C608004C */ lwc1 $f8, 0x4C($s0)
/* 1A4AC0 802761E0 3C014034 */ lui $at, (0x40340000 >> 16)
/* 1A4AC4 802761E4 44811800 */ mtc1 $at, $f3
/* 1A4AC8 802761E8 44801000 */ mtc1 $zero, $f2
/* 1A4ACC 802761EC C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A4AD0 802761F0 C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A4AD4 802761F4 46004021 */ cvt.d.s $f0, $f8
/* 1A4AD8 802761F8 46220001 */ sub.d $f0, $f0, $f2
/* 1A4ADC 802761FC 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1A4AE0 80276200 44811000 */ mtc1 $at, $f2
/* 1A4AE4 80276204 AE000018 */ sw $zero, 0x18($s0)
/* 1A4AE8 80276208 AE00001C */ sw $zero, 0x1C($s0)
/* 1A4AEC 8027620C E6020024 */ swc1 $f2, 0x24($s0)
/* 1A4AF0 80276210 3C014018 */ lui $at, (0x40180000 >> 16)
/* 1A4AF4 80276214 44811800 */ mtc1 $at, $f3
/* 1A4AF8 80276218 44801000 */ mtc1 $zero, $f2
/* 1A4AFC 8027621C C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A4B00 80276220 46200220 */ cvt.s.d $f8, $f0
/* 1A4B04 80276224 46004021 */ cvt.d.s $f0, $f8
/* 1A4B08 80276228 46220003 */ div.d $f0, $f0, $f2
/* 1A4B0C 8027622C 46200220 */ cvt.s.d $f8, $f0
/* 1A4B10 80276230 3C01802A */ lui $at, %hi(D_8029D938)
/* 1A4B14 80276234 D420D938 */ ldc1 $f0, %lo(D_8029D938)($at)
/* 1A4B18 80276238 460040A1 */ cvt.d.s $f2, $f8
/* 1A4B1C 8027623C 46201080 */ add.d $f2, $f2, $f0
/* 1A4B20 80276240 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A4B24 80276244 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A4B28 80276248 44810000 */ mtc1 $at, $f0
/* 1A4B2C 8027624C 4600A521 */ cvt.d.s $f20, $f20
/* 1A4B30 80276250 46006302 */ mul.s $f12, $f12, $f0
/* 1A4B34 80276254 00000000 */ nop
/* 1A4B38 80276258 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A4B3C 8027625C 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A4B40 80276260 44810000 */ mtc1 $at, $f0
/* 1A4B44 80276264 46201220 */ cvt.s.d $f8, $f2
/* 1A4B48 80276268 E6080050 */ swc1 $f8, 0x50($s0)
/* 1A4B4C 8027626C 46006303 */ div.s $f12, $f12, $f0
/* 1A4B50 80276270 44830000 */ mtc1 $v1, $f0
/* 1A4B54 80276274 00000000 */ nop
/* 1A4B58 80276278 46800020 */ cvt.s.w $f0, $f0
/* 1A4B5C 8027627C 0C00A85B */ jal sin_rad
/* 1A4B60 80276280 E6000028 */ swc1 $f0, 0x28($s0)
/* 1A4B64 80276284 3C01802A */ lui $at, %hi(D_8029D940)
/* 1A4B68 80276288 D422D940 */ ldc1 $f2, %lo(D_8029D940)($at)
/* 1A4B6C 8027628C 46000021 */ cvt.d.s $f0, $f0
/* 1A4B70 80276290 46220002 */ mul.d $f0, $f0, $f2
/* 1A4B74 80276294 00000000 */ nop
/* 1A4B78 80276298 46360002 */ mul.d $f0, $f0, $f22
/* 1A4B7C 8027629C 00000000 */ nop
/* 1A4B80 802762A0 46360000 */ add.d $f0, $f0, $f22
/* 1A4B84 802762A4 4620A500 */ add.d $f20, $f20, $f0
/* 1A4B88 802762A8 0809DA29 */ j .L802768A4
/* 1A4B8C 802762AC 24020001 */ addiu $v0, $zero, 0x1
.L802762B0:
/* 1A4B90 802762B0 C6400144 */ lwc1 $f0, 0x144($s2)
/* 1A4B94 802762B4 C618000C */ lwc1 $f24, 0xC($s0)
/* 1A4B98 802762B8 C61A0014 */ lwc1 $f26, 0x14($s0)
/* 1A4B9C 802762BC E6000000 */ swc1 $f0, 0x0($s0)
/* 1A4BA0 802762C0 46000586 */ mov.s $f22, $f0
/* 1A4BA4 802762C4 4406C000 */ mfc1 $a2, $f24
/* 1A4BA8 802762C8 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A4BAC 802762CC 4600B306 */ mov.s $f12, $f22
/* 1A4BB0 802762D0 E6000004 */ swc1 $f0, 0x4($s0)
/* 1A4BB4 802762D4 C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A4BB8 802762D8 4407D000 */ mfc1 $a3, $f26
/* 1A4BBC 802762DC 46000506 */ mov.s $f20, $f0
/* 1A4BC0 802762E0 4600A386 */ mov.s $f14, $f20
/* 1A4BC4 802762E4 0C00A720 */ jal atan2
/* 1A4BC8 802762E8 E6140008 */ swc1 $f20, 0x8($s0)
/* 1A4BCC 802762EC 4600B306 */ mov.s $f12, $f22
/* 1A4BD0 802762F0 4406C000 */ mfc1 $a2, $f24
/* 1A4BD4 802762F4 4407D000 */ mfc1 $a3, $f26
/* 1A4BD8 802762F8 4600A386 */ mov.s $f14, $f20
/* 1A4BDC 802762FC 0C00A7B5 */ jal dist2D
/* 1A4BE0 80276300 E6000048 */ swc1 $f0, 0x48($s0)
/* 1A4BE4 80276304 86020064 */ lh $v0, 0x64($s0)
/* 1A4BE8 80276308 46000106 */ mov.s $f4, $f0
/* 1A4BEC 8027630C 14400012 */ bnez $v0, .L80276358
/* 1A4BF0 80276310 E604004C */ swc1 $f4, 0x4C($s0)
/* 1A4BF4 80276314 C6000040 */ lwc1 $f0, 0x40($s0)
/* 1A4BF8 80276318 C6020040 */ lwc1 $f2, 0x40($s0)
/* 1A4BFC 8027631C 46002003 */ div.s $f0, $f4, $f0
/* 1A4C00 80276320 4600028D */ trunc.w.s $f10, $f0
/* 1A4C04 80276324 44035000 */ mfc1 $v1, $f10
/* 1A4C08 80276328 00000000 */ nop
/* 1A4C0C 8027632C 00031400 */ sll $v0, $v1, 16
/* 1A4C10 80276330 00021403 */ sra $v0, $v0, 16
/* 1A4C14 80276334 44820000 */ mtc1 $v0, $f0
/* 1A4C18 80276338 00000000 */ nop
/* 1A4C1C 8027633C 46800020 */ cvt.s.w $f0, $f0
/* 1A4C20 80276340 46020002 */ mul.s $f0, $f0, $f2
/* 1A4C24 80276344 00000000 */ nop
/* 1A4C28 80276348 46002086 */ mov.s $f2, $f4
/* 1A4C2C 8027634C A6030064 */ sh $v1, 0x64($s0)
/* 1A4C30 80276350 0809D8E3 */ j .L8027638C
/* 1A4C34 80276354 46001201 */ sub.s $f8, $f2, $f0
.L80276358:
/* 1A4C38 80276358 44821000 */ mtc1 $v0, $f2
/* 1A4C3C 8027635C 00000000 */ nop
/* 1A4C40 80276360 468010A0 */ cvt.s.w $f2, $f2
/* 1A4C44 80276364 86020064 */ lh $v0, 0x64($s0)
/* 1A4C48 80276368 46022083 */ div.s $f2, $f4, $f2
/* 1A4C4C 8027636C 44820000 */ mtc1 $v0, $f0
/* 1A4C50 80276370 00000000 */ nop
/* 1A4C54 80276374 46800020 */ cvt.s.w $f0, $f0
/* 1A4C58 80276378 46020002 */ mul.s $f0, $f0, $f2
/* 1A4C5C 8027637C 00000000 */ nop
/* 1A4C60 80276380 C604004C */ lwc1 $f4, 0x4C($s0)
/* 1A4C64 80276384 E6020040 */ swc1 $f2, 0x40($s0)
/* 1A4C68 80276388 46002201 */ sub.s $f8, $f4, $f0
.L8027638C:
/* 1A4C6C 8027638C 86020064 */ lh $v0, 0x64($s0)
/* 1A4C70 80276390 3C014049 */ lui $at, (0x40490FD0 >> 16)
/* 1A4C74 80276394 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF)
/* 1A4C78 80276398 44812000 */ mtc1 $at, $f4
/* 1A4C7C 8027639C C602000C */ lwc1 $f2, 0xC($s0)
/* 1A4C80 802763A0 44820000 */ mtc1 $v0, $f0
/* 1A4C84 802763A4 00000000 */ nop
/* 1A4C88 802763A8 46800020 */ cvt.s.w $f0, $f0
/* 1A4C8C 802763AC 46002103 */ div.s $f4, $f4, $f0
/* 1A4C90 802763B0 C6000000 */ lwc1 $f0, 0x0($s0)
/* 1A4C94 802763B4 46001081 */ sub.s $f2, $f2, $f0
/* 1A4C98 802763B8 8E060058 */ lw $a2, 0x58($s0)
/* 1A4C9C 802763BC 44820000 */ mtc1 $v0, $f0
/* 1A4CA0 802763C0 00000000 */ nop
/* 1A4CA4 802763C4 46800020 */ cvt.s.w $f0, $f0
/* 1A4CA8 802763C8 46001083 */ div.s $f2, $f2, $f0
/* 1A4CAC 802763CC C6000010 */ lwc1 $f0, 0x10($s0)
/* 1A4CB0 802763D0 0000202D */ daddu $a0, $zero, $zero
/* 1A4CB4 802763D4 E604003C */ swc1 $f4, 0x3C($s0)
/* 1A4CB8 802763D8 E6020030 */ swc1 $f2, 0x30($s0)
/* 1A4CBC 802763DC C6020004 */ lwc1 $f2, 0x4($s0)
/* 1A4CC0 802763E0 C6040014 */ lwc1 $f4, 0x14($s0)
/* 1A4CC4 802763E4 46020001 */ sub.s $f0, $f0, $f2
/* 1A4CC8 802763E8 44821000 */ mtc1 $v0, $f2
/* 1A4CCC 802763EC 00000000 */ nop
/* 1A4CD0 802763F0 468010A0 */ cvt.s.w $f2, $f2
/* 1A4CD4 802763F4 46001186 */ mov.s $f6, $f2
/* 1A4CD8 802763F8 46020003 */ div.s $f0, $f0, $f2
/* 1A4CDC 802763FC C6020008 */ lwc1 $f2, 0x8($s0)
/* 1A4CE0 80276400 0080282D */ daddu $a1, $a0, $zero
/* 1A4CE4 80276404 AE000044 */ sw $zero, 0x44($s0)
/* 1A4CE8 80276408 E6000034 */ swc1 $f0, 0x34($s0)
/* 1A4CEC 8027640C 46003006 */ mov.s $f0, $f6
/* 1A4CF0 80276410 46022101 */ sub.s $f4, $f4, $f2
/* 1A4CF4 80276414 C6020040 */ lwc1 $f2, 0x40($s0)
/* 1A4CF8 80276418 46004003 */ div.s $f0, $f8, $f0
/* 1A4CFC 8027641C 46001080 */ add.s $f2, $f2, $f0
/* 1A4D00 80276420 46062103 */ div.s $f4, $f4, $f6
/* 1A4D04 80276424 E6040038 */ swc1 $f4, 0x38($s0)
/* 1A4D08 80276428 0C098F3F */ jal set_animation
/* 1A4D0C 8027642C E6020040 */ swc1 $f2, 0x40($s0)
/* 1A4D10 80276430 C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A4D14 80276434 24040160 */ addiu $a0, $zero, 0x160
/* 1A4D18 80276438 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A4D1C 8027643C 8E460144 */ lw $a2, 0x144($s2)
/* 1A4D20 80276440 8E470148 */ lw $a3, 0x148($s2)
/* 1A4D24 80276444 0C052757 */ jal sfx_play_sound_at_position
/* 1A4D28 80276448 0000282D */ daddu $a1, $zero, $zero
/* 1A4D2C 8027644C C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A4D30 80276450 24040147 */ addiu $a0, $zero, 0x147
/* 1A4D34 80276454 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A4D38 80276458 8E460144 */ lw $a2, 0x144($s2)
/* 1A4D3C 8027645C 8E470148 */ lw $a3, 0x148($s2)
/* 1A4D40 80276460 0C052757 */ jal sfx_play_sound_at_position
/* 1A4D44 80276464 0000282D */ daddu $a1, $zero, $zero
/* 1A4D48 80276468 86020064 */ lh $v0, 0x64($s0)
/* 1A4D4C 8027646C 24030168 */ addiu $v1, $zero, 0x168
/* 1A4D50 80276470 14400002 */ bnez $v0, .L8027647C
/* 1A4D54 80276474 0062001A */ div $zero, $v1, $v0
/* 1A4D58 80276478 0007000D */ break 7
.L8027647C:
/* 1A4D5C 8027647C 2401FFFF */ addiu $at, $zero, -0x1
/* 1A4D60 80276480 14410004 */ bne $v0, $at, .L80276494
/* 1A4D64 80276484 3C018000 */ lui $at, (0x80000000 >> 16)
/* 1A4D68 80276488 14610002 */ bne $v1, $at, .L80276494
/* 1A4D6C 8027648C 00000000 */ nop
/* 1A4D70 80276490 0006000D */ break 6
.L80276494:
/* 1A4D74 80276494 00001812 */ mflo $v1
/* 1A4D78 80276498 C608004C */ lwc1 $f8, 0x4C($s0)
/* 1A4D7C 8027649C 3C014034 */ lui $at, (0x40340000 >> 16)
/* 1A4D80 802764A0 44811800 */ mtc1 $at, $f3
/* 1A4D84 802764A4 44801000 */ mtc1 $zero, $f2
/* 1A4D88 802764A8 C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A4D8C 802764AC C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A4D90 802764B0 46004021 */ cvt.d.s $f0, $f8
/* 1A4D94 802764B4 46220001 */ sub.d $f0, $f0, $f2
/* 1A4D98 802764B8 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1A4D9C 802764BC 44811000 */ mtc1 $at, $f2
/* 1A4DA0 802764C0 AE000018 */ sw $zero, 0x18($s0)
/* 1A4DA4 802764C4 AE00001C */ sw $zero, 0x1C($s0)
/* 1A4DA8 802764C8 E6020024 */ swc1 $f2, 0x24($s0)
/* 1A4DAC 802764CC 3C014018 */ lui $at, (0x40180000 >> 16)
/* 1A4DB0 802764D0 44811800 */ mtc1 $at, $f3
/* 1A4DB4 802764D4 44801000 */ mtc1 $zero, $f2
/* 1A4DB8 802764D8 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A4DBC 802764DC 46200220 */ cvt.s.d $f8, $f0
/* 1A4DC0 802764E0 46004021 */ cvt.d.s $f0, $f8
/* 1A4DC4 802764E4 46220003 */ div.d $f0, $f0, $f2
/* 1A4DC8 802764E8 46200220 */ cvt.s.d $f8, $f0
/* 1A4DCC 802764EC 3C01802A */ lui $at, %hi(D_8029D948)
/* 1A4DD0 802764F0 D420D948 */ ldc1 $f0, %lo(D_8029D948)($at)
/* 1A4DD4 802764F4 460040A1 */ cvt.d.s $f2, $f8
/* 1A4DD8 802764F8 46201080 */ add.d $f2, $f2, $f0
/* 1A4DDC 802764FC 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A4DE0 80276500 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A4DE4 80276504 44810000 */ mtc1 $at, $f0
/* 1A4DE8 80276508 4600A521 */ cvt.d.s $f20, $f20
/* 1A4DEC 8027650C 46006302 */ mul.s $f12, $f12, $f0
/* 1A4DF0 80276510 00000000 */ nop
/* 1A4DF4 80276514 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A4DF8 80276518 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A4DFC 8027651C 44810000 */ mtc1 $at, $f0
/* 1A4E00 80276520 46201220 */ cvt.s.d $f8, $f2
/* 1A4E04 80276524 E6080050 */ swc1 $f8, 0x50($s0)
/* 1A4E08 80276528 46006303 */ div.s $f12, $f12, $f0
/* 1A4E0C 8027652C 44830000 */ mtc1 $v1, $f0
/* 1A4E10 80276530 00000000 */ nop
/* 1A4E14 80276534 46800020 */ cvt.s.w $f0, $f0
/* 1A4E18 80276538 0C00A85B */ jal sin_rad
/* 1A4E1C 8027653C E6000028 */ swc1 $f0, 0x28($s0)
/* 1A4E20 80276540 3C01802A */ lui $at, %hi(D_8029D950)
/* 1A4E24 80276544 D422D950 */ ldc1 $f2, %lo(D_8029D950)($at)
/* 1A4E28 80276548 46000021 */ cvt.d.s $f0, $f0
/* 1A4E2C 8027654C 46220002 */ mul.d $f0, $f0, $f2
/* 1A4E30 80276550 00000000 */ nop
/* 1A4E34 80276554 46360002 */ mul.d $f0, $f0, $f22
/* 1A4E38 80276558 00000000 */ nop
/* 1A4E3C 8027655C 46360000 */ add.d $f0, $f0, $f22
/* 1A4E40 80276560 4620A500 */ add.d $f20, $f20, $f0
/* 1A4E44 80276564 0809DA29 */ j .L802768A4
/* 1A4E48 80276568 2402000B */ addiu $v0, $zero, 0xB
.L8027656C:
/* 1A4E4C 8027656C 0000202D */ daddu $a0, $zero, $zero
/* 1A4E50 80276570 24050001 */ addiu $a1, $zero, 0x1
/* 1A4E54 80276574 3C060001 */ lui $a2, (0x1000C >> 16)
/* 1A4E58 80276578 34C6000C */ ori $a2, $a2, (0x1000C & 0xFFFF)
/* 1A4E5C 8027657C 00A0102D */ daddu $v0, $a1, $zero
/* 1A4E60 80276580 0C098F3F */ jal set_animation
/* 1A4E64 80276584 A6020064 */ sh $v0, 0x64($s0)
/* 1A4E68 80276588 AE400160 */ sw $zero, 0x160($s2)
/* 1A4E6C 8027658C 86020064 */ lh $v0, 0x64($s0)
/* 1A4E70 80276590 24030168 */ addiu $v1, $zero, 0x168
/* 1A4E74 80276594 14400002 */ bnez $v0, .L802765A0
/* 1A4E78 80276598 0062001A */ div $zero, $v1, $v0
/* 1A4E7C 8027659C 0007000D */ break 7
.L802765A0:
/* 1A4E80 802765A0 2401FFFF */ addiu $at, $zero, -0x1
/* 1A4E84 802765A4 14410004 */ bne $v0, $at, .L802765B8
/* 1A4E88 802765A8 3C018000 */ lui $at, (0x80000000 >> 16)
/* 1A4E8C 802765AC 14610002 */ bne $v1, $at, .L802765B8
/* 1A4E90 802765B0 00000000 */ nop
/* 1A4E94 802765B4 0006000D */ break 6
.L802765B8:
/* 1A4E98 802765B8 00001812 */ mflo $v1
/* 1A4E9C 802765BC C6000018 */ lwc1 $f0, 0x18($s0)
/* 1A4EA0 802765C0 C602001C */ lwc1 $f2, 0x1C($s0)
/* 1A4EA4 802765C4 46020001 */ sub.s $f0, $f0, $f2
/* 1A4EA8 802765C8 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1A4EAC 802765CC 44811000 */ mtc1 $at, $f2
/* 1A4EB0 802765D0 00000000 */ nop
/* 1A4EB4 802765D4 E6020024 */ swc1 $f2, 0x24($s0)
/* 1A4EB8 802765D8 3C01802A */ lui $at, %hi(D_8029D958)
/* 1A4EBC 802765DC D422D958 */ ldc1 $f2, %lo(D_8029D958)($at)
/* 1A4EC0 802765E0 46000005 */ abs.s $f0, $f0
/* 1A4EC4 802765E4 46000021 */ cvt.d.s $f0, $f0
/* 1A4EC8 802765E8 46220003 */ div.d $f0, $f0, $f2
/* 1A4ECC 802765EC 46200020 */ cvt.s.d $f0, $f0
/* 1A4ED0 802765F0 E6000050 */ swc1 $f0, 0x50($s0)
/* 1A4ED4 802765F4 44830000 */ mtc1 $v1, $f0
/* 1A4ED8 802765F8 00000000 */ nop
/* 1A4EDC 802765FC 46800020 */ cvt.s.w $f0, $f0
/* 1A4EE0 80276600 E6000028 */ swc1 $f0, 0x28($s0)
/* 1A4EE4 80276604 C6400144 */ lwc1 $f0, 0x144($s2)
/* 1A4EE8 80276608 E6000000 */ swc1 $f0, 0x0($s0)
/* 1A4EEC 8027660C C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A4EF0 80276610 E6000004 */ swc1 $f0, 0x4($s0)
/* 1A4EF4 80276614 C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A4EF8 80276618 24020015 */ addiu $v0, $zero, 0x15
/* 1A4EFC 8027661C 0809DA2B */ j .L802768AC
/* 1A4F00 80276620 E6000008 */ swc1 $f0, 0x8($s0)
.L80276624:
/* 1A4F04 80276624 C6400144 */ lwc1 $f0, 0x144($s2)
/* 1A4F08 80276628 C618000C */ lwc1 $f24, 0xC($s0)
/* 1A4F0C 8027662C C61A0014 */ lwc1 $f26, 0x14($s0)
/* 1A4F10 80276630 E6000000 */ swc1 $f0, 0x0($s0)
/* 1A4F14 80276634 46000586 */ mov.s $f22, $f0
/* 1A4F18 80276638 4406C000 */ mfc1 $a2, $f24
/* 1A4F1C 8027663C C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A4F20 80276640 4600B306 */ mov.s $f12, $f22
/* 1A4F24 80276644 E6000004 */ swc1 $f0, 0x4($s0)
/* 1A4F28 80276648 C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A4F2C 8027664C 4407D000 */ mfc1 $a3, $f26
/* 1A4F30 80276650 46000506 */ mov.s $f20, $f0
/* 1A4F34 80276654 46000386 */ mov.s $f14, $f0
/* 1A4F38 80276658 0C00A720 */ jal atan2
/* 1A4F3C 8027665C E6140008 */ swc1 $f20, 0x8($s0)
/* 1A4F40 80276660 4600B306 */ mov.s $f12, $f22
/* 1A4F44 80276664 4406C000 */ mfc1 $a2, $f24
/* 1A4F48 80276668 4407D000 */ mfc1 $a3, $f26
/* 1A4F4C 8027666C 4600A386 */ mov.s $f14, $f20
/* 1A4F50 80276670 0C00A7B5 */ jal dist2D
/* 1A4F54 80276674 E6000048 */ swc1 $f0, 0x48($s0)
/* 1A4F58 80276678 86020064 */ lh $v0, 0x64($s0)
/* 1A4F5C 8027667C 46000106 */ mov.s $f4, $f0
/* 1A4F60 80276680 14400012 */ bnez $v0, .L802766CC
/* 1A4F64 80276684 E604004C */ swc1 $f4, 0x4C($s0)
/* 1A4F68 80276688 C6000040 */ lwc1 $f0, 0x40($s0)
/* 1A4F6C 8027668C C6020040 */ lwc1 $f2, 0x40($s0)
/* 1A4F70 80276690 46002003 */ div.s $f0, $f4, $f0
/* 1A4F74 80276694 4600028D */ trunc.w.s $f10, $f0
/* 1A4F78 80276698 44035000 */ mfc1 $v1, $f10
/* 1A4F7C 8027669C 00000000 */ nop
/* 1A4F80 802766A0 00031400 */ sll $v0, $v1, 16
/* 1A4F84 802766A4 00021403 */ sra $v0, $v0, 16
/* 1A4F88 802766A8 44820000 */ mtc1 $v0, $f0
/* 1A4F8C 802766AC 00000000 */ nop
/* 1A4F90 802766B0 46800020 */ cvt.s.w $f0, $f0
/* 1A4F94 802766B4 46020002 */ mul.s $f0, $f0, $f2
/* 1A4F98 802766B8 00000000 */ nop
/* 1A4F9C 802766BC 46002086 */ mov.s $f2, $f4
/* 1A4FA0 802766C0 A6030064 */ sh $v1, 0x64($s0)
/* 1A4FA4 802766C4 0809D9C0 */ j .L80276700
/* 1A4FA8 802766C8 46001201 */ sub.s $f8, $f2, $f0
.L802766CC:
/* 1A4FAC 802766CC 44821000 */ mtc1 $v0, $f2
/* 1A4FB0 802766D0 00000000 */ nop
/* 1A4FB4 802766D4 468010A0 */ cvt.s.w $f2, $f2
/* 1A4FB8 802766D8 86020064 */ lh $v0, 0x64($s0)
/* 1A4FBC 802766DC 46022083 */ div.s $f2, $f4, $f2
/* 1A4FC0 802766E0 44820000 */ mtc1 $v0, $f0
/* 1A4FC4 802766E4 00000000 */ nop
/* 1A4FC8 802766E8 46800020 */ cvt.s.w $f0, $f0
/* 1A4FCC 802766EC 46020002 */ mul.s $f0, $f0, $f2
/* 1A4FD0 802766F0 00000000 */ nop
/* 1A4FD4 802766F4 C604004C */ lwc1 $f4, 0x4C($s0)
/* 1A4FD8 802766F8 E6020040 */ swc1 $f2, 0x40($s0)
/* 1A4FDC 802766FC 46002201 */ sub.s $f8, $f4, $f0
.L80276700:
/* 1A4FE0 80276700 86020064 */ lh $v0, 0x64($s0)
/* 1A4FE4 80276704 3C014049 */ lui $at, (0x40490FD0 >> 16)
/* 1A4FE8 80276708 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF)
/* 1A4FEC 8027670C 44812000 */ mtc1 $at, $f4
/* 1A4FF0 80276710 C602000C */ lwc1 $f2, 0xC($s0)
/* 1A4FF4 80276714 24420001 */ addiu $v0, $v0, 0x1
/* 1A4FF8 80276718 44820000 */ mtc1 $v0, $f0
/* 1A4FFC 8027671C 00000000 */ nop
/* 1A5000 80276720 46800020 */ cvt.s.w $f0, $f0
/* 1A5004 80276724 46002103 */ div.s $f4, $f4, $f0
/* 1A5008 80276728 C6000000 */ lwc1 $f0, 0x0($s0)
/* 1A500C 8027672C 86020064 */ lh $v0, 0x64($s0)
/* 1A5010 80276730 46001081 */ sub.s $f2, $f2, $f0
/* 1A5014 80276734 8E060058 */ lw $a2, 0x58($s0)
/* 1A5018 80276738 44820000 */ mtc1 $v0, $f0
/* 1A501C 8027673C 00000000 */ nop
/* 1A5020 80276740 46800020 */ cvt.s.w $f0, $f0
/* 1A5024 80276744 46001083 */ div.s $f2, $f2, $f0
/* 1A5028 80276748 C6000010 */ lwc1 $f0, 0x10($s0)
/* 1A502C 8027674C 0000202D */ daddu $a0, $zero, $zero
/* 1A5030 80276750 E604003C */ swc1 $f4, 0x3C($s0)
/* 1A5034 80276754 E6020030 */ swc1 $f2, 0x30($s0)
/* 1A5038 80276758 C6020004 */ lwc1 $f2, 0x4($s0)
/* 1A503C 8027675C C6040014 */ lwc1 $f4, 0x14($s0)
/* 1A5040 80276760 46020001 */ sub.s $f0, $f0, $f2
/* 1A5044 80276764 44821000 */ mtc1 $v0, $f2
/* 1A5048 80276768 00000000 */ nop
/* 1A504C 8027676C 468010A0 */ cvt.s.w $f2, $f2
/* 1A5050 80276770 46001186 */ mov.s $f6, $f2
/* 1A5054 80276774 46020003 */ div.s $f0, $f0, $f2
/* 1A5058 80276778 C6020008 */ lwc1 $f2, 0x8($s0)
/* 1A505C 8027677C 0080282D */ daddu $a1, $a0, $zero
/* 1A5060 80276780 AE000044 */ sw $zero, 0x44($s0)
/* 1A5064 80276784 E6000034 */ swc1 $f0, 0x34($s0)
/* 1A5068 80276788 46003006 */ mov.s $f0, $f6
/* 1A506C 8027678C 46022101 */ sub.s $f4, $f4, $f2
/* 1A5070 80276790 C6020040 */ lwc1 $f2, 0x40($s0)
/* 1A5074 80276794 46004003 */ div.s $f0, $f8, $f0
/* 1A5078 80276798 46001080 */ add.s $f2, $f2, $f0
/* 1A507C 8027679C 46062103 */ div.s $f4, $f4, $f6
/* 1A5080 802767A0 E6040038 */ swc1 $f4, 0x38($s0)
/* 1A5084 802767A4 0C098F3F */ jal set_animation
/* 1A5088 802767A8 E6020040 */ swc1 $f2, 0x40($s0)
/* 1A508C 802767AC C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A5090 802767B0 24040160 */ addiu $a0, $zero, 0x160
/* 1A5094 802767B4 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A5098 802767B8 8E460144 */ lw $a2, 0x144($s2)
/* 1A509C 802767BC 8E470148 */ lw $a3, 0x148($s2)
/* 1A50A0 802767C0 0C052757 */ jal sfx_play_sound_at_position
/* 1A50A4 802767C4 0000282D */ daddu $a1, $zero, $zero
/* 1A50A8 802767C8 86030064 */ lh $v1, 0x64($s0)
/* 1A50AC 802767CC 24020168 */ addiu $v0, $zero, 0x168
/* 1A50B0 802767D0 14600002 */ bnez $v1, .L802767DC
/* 1A50B4 802767D4 0043001A */ div $zero, $v0, $v1
/* 1A50B8 802767D8 0007000D */ break 7
.L802767DC:
/* 1A50BC 802767DC 2401FFFF */ addiu $at, $zero, -0x1
/* 1A50C0 802767E0 14610004 */ bne $v1, $at, .L802767F4
/* 1A50C4 802767E4 3C018000 */ lui $at, (0x80000000 >> 16)
/* 1A50C8 802767E8 14410002 */ bne $v0, $at, .L802767F4
/* 1A50CC 802767EC 00000000 */ nop
/* 1A50D0 802767F0 0006000D */ break 6
.L802767F4:
/* 1A50D4 802767F4 00001012 */ mflo $v0
/* 1A50D8 802767F8 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1A50DC 802767FC 44810000 */ mtc1 $at, $f0
/* 1A50E0 80276800 3C014234 */ lui $at, (0x42340000 >> 16)
/* 1A50E4 80276804 44811000 */ mtc1 $at, $f2
/* 1A50E8 80276808 86030066 */ lh $v1, 0x66($s0)
/* 1A50EC 8027680C E6000024 */ swc1 $f0, 0x24($s0)
/* 1A50F0 80276810 E6020050 */ swc1 $f2, 0x50($s0)
/* 1A50F4 80276814 44820000 */ mtc1 $v0, $f0
/* 1A50F8 80276818 00000000 */ nop
/* 1A50FC 8027681C 46800020 */ cvt.s.w $f0, $f0
/* 1A5100 80276820 24020004 */ addiu $v0, $zero, 0x4
/* 1A5104 80276824 14620005 */ bne $v1, $v0, .L8027683C
/* 1A5108 80276828 E6000028 */ swc1 $f0, 0x28($s0)
/* 1A510C 8027682C 3C014261 */ lui $at, (0x42610000 >> 16)
/* 1A5110 80276830 44810000 */ mtc1 $at, $f0
/* 1A5114 80276834 00000000 */ nop
/* 1A5118 80276838 E6000050 */ swc1 $f0, 0x50($s0)
.L8027683C:
/* 1A511C 8027683C C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A5120 80276840 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A5124 80276844 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A5128 80276848 44810000 */ mtc1 $at, $f0
/* 1A512C 8027684C C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A5130 80276850 C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A5134 80276854 AE000018 */ sw $zero, 0x18($s0)
/* 1A5138 80276858 46006302 */ mul.s $f12, $f12, $f0
/* 1A513C 8027685C 00000000 */ nop
/* 1A5140 80276860 AE00001C */ sw $zero, 0x1C($s0)
/* 1A5144 80276864 4600A521 */ cvt.d.s $f20, $f20
/* 1A5148 80276868 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A514C 8027686C 44810000 */ mtc1 $at, $f0
/* 1A5150 80276870 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A5154 80276874 0C00A85B */ jal sin_rad
/* 1A5158 80276878 46006303 */ div.s $f12, $f12, $f0
/* 1A515C 8027687C 3C01802A */ lui $at, %hi(D_8029D960)
/* 1A5160 80276880 D422D960 */ ldc1 $f2, %lo(D_8029D960)($at)
/* 1A5164 80276884 46000021 */ cvt.d.s $f0, $f0
/* 1A5168 80276888 46220002 */ mul.d $f0, $f0, $f2
/* 1A516C 8027688C 00000000 */ nop
/* 1A5170 80276890 46360002 */ mul.d $f0, $f0, $f22
/* 1A5174 80276894 00000000 */ nop
/* 1A5178 80276898 46360000 */ add.d $f0, $f0, $f22
/* 1A517C 8027689C 4620A500 */ add.d $f20, $f20, $f0
/* 1A5180 802768A0 2402001F */ addiu $v0, $zero, 0x1F
.L802768A4:
/* 1A5184 802768A4 4620A520 */ cvt.s.d $f20, $f20
/* 1A5188 802768A8 E6140044 */ swc1 $f20, 0x44($s0)
.L802768AC:
/* 1A518C 802768AC AE620070 */ sw $v0, 0x70($s3)
.L802768B0:
/* 1A5190 802768B0 8E640070 */ lw $a0, 0x70($s3)
/* 1A5194 802768B4 2402000B */ addiu $v0, $zero, 0xB
/* 1A5198 802768B8 10820060 */ beq $a0, $v0, .L80276A3C
/* 1A519C 802768BC 2882000C */ slti $v0, $a0, 0xC
/* 1A51A0 802768C0 10400005 */ beqz $v0, .L802768D8
/* 1A51A4 802768C4 24020001 */ addiu $v0, $zero, 0x1
/* 1A51A8 802768C8 1082000A */ beq $a0, $v0, .L802768F4
/* 1A51AC 802768CC 0000102D */ daddu $v0, $zero, $zero
/* 1A51B0 802768D0 0809DBA2 */ j .L80276E88
/* 1A51B4 802768D4 00000000 */ nop
.L802768D8:
/* 1A51B8 802768D8 24020015 */ addiu $v0, $zero, 0x15
/* 1A51BC 802768DC 108200C7 */ beq $a0, $v0, .L80276BFC
/* 1A51C0 802768E0 2402001F */ addiu $v0, $zero, 0x1F
/* 1A51C4 802768E4 10820100 */ beq $a0, $v0, .L80276CE8
/* 1A51C8 802768E8 0000102D */ daddu $v0, $zero, $zero
/* 1A51CC 802768EC 0809DBA2 */ j .L80276E88
/* 1A51D0 802768F0 00000000 */ nop
.L802768F4:
/* 1A51D4 802768F4 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A51D8 802768F8 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A51DC 802768FC 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A51E0 80276900 44810000 */ mtc1 $at, $f0
/* 1A51E4 80276904 C6160044 */ lwc1 $f22, 0x44($s0)
/* 1A51E8 80276908 46006302 */ mul.s $f12, $f12, $f0
/* 1A51EC 8027690C 00000000 */ nop
/* 1A51F0 80276910 C614003C */ lwc1 $f20, 0x3C($s0)
/* 1A51F4 80276914 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A51F8 80276918 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A51FC 8027691C 44810000 */ mtc1 $at, $f0
/* 1A5200 80276920 4600A521 */ cvt.d.s $f20, $f20
/* 1A5204 80276924 0C00A85B */ jal sin_rad
/* 1A5208 80276928 46006303 */ div.s $f12, $f12, $f0
/* 1A520C 8027692C 3C01802A */ lui $at, %hi(D_8029D968)
/* 1A5210 80276930 D422D968 */ ldc1 $f2, %lo(D_8029D968)($at)
/* 1A5214 80276934 46000021 */ cvt.d.s $f0, $f0
/* 1A5218 80276938 46220002 */ mul.d $f0, $f0, $f2
/* 1A521C 8027693C 00000000 */ nop
/* 1A5220 80276940 46340002 */ mul.d $f0, $f0, $f20
/* 1A5224 80276944 00000000 */ nop
/* 1A5228 80276948 C6080000 */ lwc1 $f8, 0x0($s0)
/* 1A522C 8027694C C6020030 */ lwc1 $f2, 0x30($s0)
/* 1A5230 80276950 C6060004 */ lwc1 $f6, 0x4($s0)
/* 1A5234 80276954 46024200 */ add.s $f8, $f8, $f2
/* 1A5238 80276958 C6020034 */ lwc1 $f2, 0x34($s0)
/* 1A523C 8027695C C6040008 */ lwc1 $f4, 0x8($s0)
/* 1A5240 80276960 46023180 */ add.s $f6, $f6, $f2
/* 1A5244 80276964 C6020038 */ lwc1 $f2, 0x38($s0)
/* 1A5248 80276968 46022100 */ add.s $f4, $f4, $f2
/* 1A524C 8027696C 46340000 */ add.d $f0, $f0, $f20
/* 1A5250 80276970 E6080000 */ swc1 $f8, 0x0($s0)
/* 1A5254 80276974 4620B580 */ add.d $f22, $f22, $f0
/* 1A5258 80276978 E6060004 */ swc1 $f6, 0x4($s0)
/* 1A525C 8027697C E6040008 */ swc1 $f4, 0x8($s0)
/* 1A5260 80276980 4620B5A0 */ cvt.s.d $f22, $f22
/* 1A5264 80276984 E6160044 */ swc1 $f22, 0x44($s0)
/* 1A5268 80276988 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A526C 8027698C 46004086 */ mov.s $f2, $f8
/* 1A5270 80276990 E6000018 */ swc1 $f0, 0x18($s0)
/* 1A5274 80276994 E6420144 */ swc1 $f2, 0x144($s2)
/* 1A5278 80276998 0C00A85B */ jal sin_rad
/* 1A527C 8027699C C60C0044 */ lwc1 $f12, 0x44($s0)
/* 1A5280 802769A0 C6020050 */ lwc1 $f2, 0x50($s0)
/* 1A5284 802769A4 46001082 */ mul.s $f2, $f2, $f0
/* 1A5288 802769A8 00000000 */ nop
/* 1A528C 802769AC C6000004 */ lwc1 $f0, 0x4($s0)
/* 1A5290 802769B0 46020000 */ add.s $f0, $f0, $f2
/* 1A5294 802769B4 E6400148 */ swc1 $f0, 0x148($s2)
/* 1A5298 802769B8 C6000008 */ lwc1 $f0, 0x8($s0)
/* 1A529C 802769BC E640014C */ swc1 $f0, 0x14C($s2)
/* 1A52A0 802769C0 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A52A4 802769C4 C6000028 */ lwc1 $f0, 0x28($s0)
/* 1A52A8 802769C8 46006300 */ add.s $f12, $f12, $f0
/* 1A52AC 802769CC C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A52B0 802769D0 E600001C */ swc1 $f0, 0x1C($s0)
/* 1A52B4 802769D4 0C00A6C9 */ jal clamp_angle
/* 1A52B8 802769D8 E60C0024 */ swc1 $f12, 0x24($s0)
/* 1A52BC 802769DC E6000024 */ swc1 $f0, 0x24($s0)
/* 1A52C0 802769E0 C64C0160 */ lwc1 $f12, 0x160($s2)
/* 1A52C4 802769E4 3C014305 */ lui $at, (0x43050000 >> 16)
/* 1A52C8 802769E8 44810000 */ mtc1 $at, $f0
/* 1A52CC 802769EC 00000000 */ nop
/* 1A52D0 802769F0 46006300 */ add.s $f12, $f12, $f0
/* 1A52D4 802769F4 0C00A6C9 */ jal clamp_angle
/* 1A52D8 802769F8 E64C0160 */ swc1 $f12, 0x160($s2)
/* 1A52DC 802769FC E6400160 */ swc1 $f0, 0x160($s2)
/* 1A52E0 80276A00 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A52E4 80276A04 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A52E8 80276A08 30422000 */ andi $v0, $v0, 0x2000
/* 1A52EC 80276A0C 1440011E */ bnez $v0, .L80276E88
/* 1A52F0 80276A10 24020002 */ addiu $v0, $zero, 0x2
/* 1A52F4 80276A14 96020064 */ lhu $v0, 0x64($s0)
/* 1A52F8 80276A18 24030004 */ addiu $v1, $zero, 0x4
/* 1A52FC 80276A1C 2442FFFF */ addiu $v0, $v0, -0x1
/* 1A5300 80276A20 A6020064 */ sh $v0, 0x64($s0)
/* 1A5304 80276A24 00021400 */ sll $v0, $v0, 16
/* 1A5308 80276A28 00021403 */ sra $v0, $v0, 16
/* 1A530C 80276A2C 14430116 */ bne $v0, $v1, .L80276E88
/* 1A5310 80276A30 0000102D */ daddu $v0, $zero, $zero
/* 1A5314 80276A34 0809DBA2 */ j .L80276E88
/* 1A5318 80276A38 24020001 */ addiu $v0, $zero, 0x1
.L80276A3C:
/* 1A531C 80276A3C C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A5320 80276A40 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A5324 80276A44 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A5328 80276A48 44810000 */ mtc1 $at, $f0
/* 1A532C 80276A4C C6160044 */ lwc1 $f22, 0x44($s0)
/* 1A5330 80276A50 46006302 */ mul.s $f12, $f12, $f0
/* 1A5334 80276A54 00000000 */ nop
/* 1A5338 80276A58 C614003C */ lwc1 $f20, 0x3C($s0)
/* 1A533C 80276A5C 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A5340 80276A60 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A5344 80276A64 44810000 */ mtc1 $at, $f0
/* 1A5348 80276A68 4600A521 */ cvt.d.s $f20, $f20
/* 1A534C 80276A6C 0C00A85B */ jal sin_rad
/* 1A5350 80276A70 46006303 */ div.s $f12, $f12, $f0
/* 1A5354 80276A74 3C01802A */ lui $at, %hi(D_8029D970)
/* 1A5358 80276A78 D422D970 */ ldc1 $f2, %lo(D_8029D970)($at)
/* 1A535C 80276A7C 46000021 */ cvt.d.s $f0, $f0
/* 1A5360 80276A80 46220002 */ mul.d $f0, $f0, $f2
/* 1A5364 80276A84 00000000 */ nop
/* 1A5368 80276A88 46340002 */ mul.d $f0, $f0, $f20
/* 1A536C 80276A8C 00000000 */ nop
/* 1A5370 80276A90 C6080000 */ lwc1 $f8, 0x0($s0)
/* 1A5374 80276A94 C6020030 */ lwc1 $f2, 0x30($s0)
/* 1A5378 80276A98 C6060004 */ lwc1 $f6, 0x4($s0)
/* 1A537C 80276A9C 46024200 */ add.s $f8, $f8, $f2
/* 1A5380 80276AA0 C6020034 */ lwc1 $f2, 0x34($s0)
/* 1A5384 80276AA4 C6040008 */ lwc1 $f4, 0x8($s0)
/* 1A5388 80276AA8 46023180 */ add.s $f6, $f6, $f2
/* 1A538C 80276AAC C6020038 */ lwc1 $f2, 0x38($s0)
/* 1A5390 80276AB0 46022100 */ add.s $f4, $f4, $f2
/* 1A5394 80276AB4 46340000 */ add.d $f0, $f0, $f20
/* 1A5398 80276AB8 E6080000 */ swc1 $f8, 0x0($s0)
/* 1A539C 80276ABC 4620B580 */ add.d $f22, $f22, $f0
/* 1A53A0 80276AC0 E6060004 */ swc1 $f6, 0x4($s0)
/* 1A53A4 80276AC4 E6040008 */ swc1 $f4, 0x8($s0)
/* 1A53A8 80276AC8 4620B5A0 */ cvt.s.d $f22, $f22
/* 1A53AC 80276ACC E6160044 */ swc1 $f22, 0x44($s0)
/* 1A53B0 80276AD0 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A53B4 80276AD4 46004086 */ mov.s $f2, $f8
/* 1A53B8 80276AD8 E6000018 */ swc1 $f0, 0x18($s0)
/* 1A53BC 80276ADC E6420144 */ swc1 $f2, 0x144($s2)
/* 1A53C0 80276AE0 0C00A85B */ jal sin_rad
/* 1A53C4 80276AE4 C60C0044 */ lwc1 $f12, 0x44($s0)
/* 1A53C8 80276AE8 C6020050 */ lwc1 $f2, 0x50($s0)
/* 1A53CC 80276AEC 46001082 */ mul.s $f2, $f2, $f0
/* 1A53D0 80276AF0 00000000 */ nop
/* 1A53D4 80276AF4 C6000004 */ lwc1 $f0, 0x4($s0)
/* 1A53D8 80276AF8 46020000 */ add.s $f0, $f0, $f2
/* 1A53DC 80276AFC E6400148 */ swc1 $f0, 0x148($s2)
/* 1A53E0 80276B00 C6000008 */ lwc1 $f0, 0x8($s0)
/* 1A53E4 80276B04 E640014C */ swc1 $f0, 0x14C($s2)
/* 1A53E8 80276B08 C6020010 */ lwc1 $f2, 0x10($s0)
/* 1A53EC 80276B0C C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A53F0 80276B10 4602003C */ c.lt.s $f0, $f2
/* 1A53F4 80276B14 00000000 */ nop
/* 1A53F8 80276B18 45000005 */ bc1f .L80276B30
/* 1A53FC 80276B1C 00000000 */ nop
/* 1A5400 80276B20 86020064 */ lh $v0, 0x64($s0)
/* 1A5404 80276B24 28420003 */ slti $v0, $v0, 0x3
/* 1A5408 80276B28 54400001 */ bnel $v0, $zero, .L80276B30
/* 1A540C 80276B2C E6420148 */ swc1 $f2, 0x148($s2)
.L80276B30:
/* 1A5410 80276B30 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A5414 80276B34 C6000028 */ lwc1 $f0, 0x28($s0)
/* 1A5418 80276B38 46006300 */ add.s $f12, $f12, $f0
/* 1A541C 80276B3C C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A5420 80276B40 E600001C */ swc1 $f0, 0x1C($s0)
/* 1A5424 80276B44 0C00A6C9 */ jal clamp_angle
/* 1A5428 80276B48 E60C0024 */ swc1 $f12, 0x24($s0)
/* 1A542C 80276B4C 0000202D */ daddu $a0, $zero, $zero
/* 1A5430 80276B50 8E06005C */ lw $a2, 0x5C($s0)
/* 1A5434 80276B54 0080282D */ daddu $a1, $a0, $zero
/* 1A5438 80276B58 0C098F3F */ jal set_animation
/* 1A543C 80276B5C E6000024 */ swc1 $f0, 0x24($s0)
/* 1A5440 80276B60 C64C0160 */ lwc1 $f12, 0x160($s2)
/* 1A5444 80276B64 3C014305 */ lui $at, (0x43050000 >> 16)
/* 1A5448 80276B68 44810000 */ mtc1 $at, $f0
/* 1A544C 80276B6C 00000000 */ nop
/* 1A5450 80276B70 46006300 */ add.s $f12, $f12, $f0
/* 1A5454 80276B74 0C00A6C9 */ jal clamp_angle
/* 1A5458 80276B78 E64C0160 */ swc1 $f12, 0x160($s2)
/* 1A545C 80276B7C E6400160 */ swc1 $f0, 0x160($s2)
/* 1A5460 80276B80 96020064 */ lhu $v0, 0x64($s0)
/* 1A5464 80276B84 2442FFFF */ addiu $v0, $v0, -0x1
/* 1A5468 80276B88 A6020064 */ sh $v0, 0x64($s0)
/* 1A546C 80276B8C 00021400 */ sll $v0, $v0, 16
/* 1A5470 80276B90 144000BD */ bnez $v0, .L80276E88
/* 1A5474 80276B94 0000102D */ daddu $v0, $zero, $zero
/* 1A5478 80276B98 C6000018 */ lwc1 $f0, 0x18($s0)
/* 1A547C 80276B9C C602001C */ lwc1 $f2, 0x1C($s0)
/* 1A5480 80276BA0 3C013FE6 */ lui $at, (0x3FE66666 >> 16)
/* 1A5484 80276BA4 34216666 */ ori $at, $at, (0x3FE66666 & 0xFFFF)
/* 1A5488 80276BA8 44812000 */ mtc1 $at, $f4
/* 1A548C 80276BAC 46020001 */ sub.s $f0, $f0, $f2
/* 1A5490 80276BB0 C6020010 */ lwc1 $f2, 0x10($s0)
/* 1A5494 80276BB4 0000202D */ daddu $a0, $zero, $zero
/* 1A5498 80276BB8 E604003C */ swc1 $f4, 0x3C($s0)
/* 1A549C 80276BBC 46000007 */ neg.s $f0, $f0
/* 1A54A0 80276BC0 E6000044 */ swc1 $f0, 0x44($s0)
/* 1A54A4 80276BC4 E6420148 */ swc1 $f2, 0x148($s2)
/* 1A54A8 80276BC8 AE400160 */ sw $zero, 0x160($s2)
/* 1A54AC 80276BCC 8E060060 */ lw $a2, 0x60($s0)
/* 1A54B0 80276BD0 0C098F3F */ jal set_animation
/* 1A54B4 80276BD4 0080282D */ daddu $a1, $a0, $zero
/* 1A54B8 80276BD8 C640018C */ lwc1 $f0, 0x18C($s2)
/* 1A54BC 80276BDC E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A54C0 80276BE0 8E450144 */ lw $a1, 0x144($s2)
/* 1A54C4 80276BE4 8E460148 */ lw $a2, 0x148($s2)
/* 1A54C8 80276BE8 8E47014C */ lw $a3, 0x14C($s2)
/* 1A54CC 80276BEC 0C0990BC */ jal play_movement_dust_effects
/* 1A54D0 80276BF0 24040002 */ addiu $a0, $zero, 0x2
/* 1A54D4 80276BF4 0809DBA2 */ j .L80276E88
/* 1A54D8 80276BF8 24020001 */ addiu $v0, $zero, 0x1
.L80276BFC:
/* 1A54DC 80276BFC C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A54E0 80276C00 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A54E4 80276C04 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A54E8 80276C08 4481B000 */ mtc1 $at, $f22
/* 1A54EC 80276C0C 00000000 */ nop
/* 1A54F0 80276C10 46166302 */ mul.s $f12, $f12, $f22
/* 1A54F4 80276C14 00000000 */ nop
/* 1A54F8 80276C18 C6140000 */ lwc1 $f20, 0x0($s0)
/* 1A54FC 80276C1C 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A5500 80276C20 4481C000 */ mtc1 $at, $f24
/* 1A5504 80276C24 4600A521 */ cvt.d.s $f20, $f20
/* 1A5508 80276C28 0C00A85B */ jal sin_rad
/* 1A550C 80276C2C 46186303 */ div.s $f12, $f12, $f24
/* 1A5510 80276C30 C6020050 */ lwc1 $f2, 0x50($s0)
/* 1A5514 80276C34 46001082 */ mul.s $f2, $f2, $f0
/* 1A5518 80276C38 00000000 */ nop
/* 1A551C 80276C3C C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A5520 80276C40 46166302 */ mul.s $f12, $f12, $f22
/* 1A5524 80276C44 00000000 */ nop
/* 1A5528 80276C48 3C01802A */ lui $at, %hi(D_8029D978)
/* 1A552C 80276C4C D420D978 */ ldc1 $f0, %lo(D_8029D978)($at)
/* 1A5530 80276C50 460010A1 */ cvt.d.s $f2, $f2
/* 1A5534 80276C54 46201083 */ div.d $f2, $f2, $f0
/* 1A5538 80276C58 4622A500 */ add.d $f20, $f20, $f2
/* 1A553C 80276C5C 46186303 */ div.s $f12, $f12, $f24
/* 1A5540 80276C60 4620A520 */ cvt.s.d $f20, $f20
/* 1A5544 80276C64 0C00A85B */ jal sin_rad
/* 1A5548 80276C68 E6140000 */ swc1 $f20, 0x0($s0)
/* 1A554C 80276C6C C6020050 */ lwc1 $f2, 0x50($s0)
/* 1A5550 80276C70 46001082 */ mul.s $f2, $f2, $f0
/* 1A5554 80276C74 00000000 */ nop
/* 1A5558 80276C78 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A555C 80276C7C C6000028 */ lwc1 $f0, 0x28($s0)
/* 1A5560 80276C80 46006300 */ add.s $f12, $f12, $f0
/* 1A5564 80276C84 C6000004 */ lwc1 $f0, 0x4($s0)
/* 1A5568 80276C88 46020001 */ sub.s $f0, $f0, $f2
/* 1A556C 80276C8C E60C0024 */ swc1 $f12, 0x24($s0)
/* 1A5570 80276C90 0C00A6C9 */ jal clamp_angle
/* 1A5574 80276C94 E6000004 */ swc1 $f0, 0x4($s0)
/* 1A5578 80276C98 C6020000 */ lwc1 $f2, 0x0($s0)
/* 1A557C 80276C9C E6000024 */ swc1 $f0, 0x24($s0)
/* 1A5580 80276CA0 E6420144 */ swc1 $f2, 0x144($s2)
/* 1A5584 80276CA4 C6000004 */ lwc1 $f0, 0x4($s0)
/* 1A5588 80276CA8 E6400148 */ swc1 $f0, 0x148($s2)
/* 1A558C 80276CAC C6000008 */ lwc1 $f0, 0x8($s0)
/* 1A5590 80276CB0 E640014C */ swc1 $f0, 0x14C($s2)
/* 1A5594 80276CB4 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A5598 80276CB8 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A559C 80276CBC 30422000 */ andi $v0, $v0, 0x2000
/* 1A55A0 80276CC0 14400071 */ bnez $v0, .L80276E88
/* 1A55A4 80276CC4 24020002 */ addiu $v0, $zero, 0x2
/* 1A55A8 80276CC8 96020064 */ lhu $v0, 0x64($s0)
/* 1A55AC 80276CCC 2442FFFF */ addiu $v0, $v0, -0x1
/* 1A55B0 80276CD0 A6020064 */ sh $v0, 0x64($s0)
/* 1A55B4 80276CD4 00021400 */ sll $v0, $v0, 16
/* 1A55B8 80276CD8 1440006B */ bnez $v0, .L80276E88
/* 1A55BC 80276CDC 0000102D */ daddu $v0, $zero, $zero
/* 1A55C0 80276CE0 0809DBA2 */ j .L80276E88
/* 1A55C4 80276CE4 24020001 */ addiu $v0, $zero, 0x1
.L80276CE8:
/* 1A55C8 80276CE8 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A55CC 80276CEC 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A55D0 80276CF0 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A55D4 80276CF4 44810000 */ mtc1 $at, $f0
/* 1A55D8 80276CF8 C6160044 */ lwc1 $f22, 0x44($s0)
/* 1A55DC 80276CFC 46006302 */ mul.s $f12, $f12, $f0
/* 1A55E0 80276D00 00000000 */ nop
/* 1A55E4 80276D04 C614003C */ lwc1 $f20, 0x3C($s0)
/* 1A55E8 80276D08 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A55EC 80276D0C 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A55F0 80276D10 44810000 */ mtc1 $at, $f0
/* 1A55F4 80276D14 4600A521 */ cvt.d.s $f20, $f20
/* 1A55F8 80276D18 0C00A85B */ jal sin_rad
/* 1A55FC 80276D1C 46006303 */ div.s $f12, $f12, $f0
/* 1A5600 80276D20 3C01802A */ lui $at, %hi(D_8029D980)
/* 1A5604 80276D24 D422D980 */ ldc1 $f2, %lo(D_8029D980)($at)
/* 1A5608 80276D28 46000021 */ cvt.d.s $f0, $f0
/* 1A560C 80276D2C 46220002 */ mul.d $f0, $f0, $f2
/* 1A5610 80276D30 00000000 */ nop
/* 1A5614 80276D34 46340002 */ mul.d $f0, $f0, $f20
/* 1A5618 80276D38 00000000 */ nop
/* 1A561C 80276D3C C6080000 */ lwc1 $f8, 0x0($s0)
/* 1A5620 80276D40 C6020030 */ lwc1 $f2, 0x30($s0)
/* 1A5624 80276D44 C6060004 */ lwc1 $f6, 0x4($s0)
/* 1A5628 80276D48 46024200 */ add.s $f8, $f8, $f2
/* 1A562C 80276D4C C6020034 */ lwc1 $f2, 0x34($s0)
/* 1A5630 80276D50 C6040008 */ lwc1 $f4, 0x8($s0)
/* 1A5634 80276D54 46023180 */ add.s $f6, $f6, $f2
/* 1A5638 80276D58 C6020038 */ lwc1 $f2, 0x38($s0)
/* 1A563C 80276D5C 46022100 */ add.s $f4, $f4, $f2
/* 1A5640 80276D60 46340000 */ add.d $f0, $f0, $f20
/* 1A5644 80276D64 E6080000 */ swc1 $f8, 0x0($s0)
/* 1A5648 80276D68 4620B580 */ add.d $f22, $f22, $f0
/* 1A564C 80276D6C E6060004 */ swc1 $f6, 0x4($s0)
/* 1A5650 80276D70 E6040008 */ swc1 $f4, 0x8($s0)
/* 1A5654 80276D74 4620B5A0 */ cvt.s.d $f22, $f22
/* 1A5658 80276D78 E6160044 */ swc1 $f22, 0x44($s0)
/* 1A565C 80276D7C C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A5660 80276D80 46004086 */ mov.s $f2, $f8
/* 1A5664 80276D84 E6000018 */ swc1 $f0, 0x18($s0)
/* 1A5668 80276D88 E6420144 */ swc1 $f2, 0x144($s2)
/* 1A566C 80276D8C 0C00A85B */ jal sin_rad
/* 1A5670 80276D90 C60C0044 */ lwc1 $f12, 0x44($s0)
/* 1A5674 80276D94 C6020050 */ lwc1 $f2, 0x50($s0)
/* 1A5678 80276D98 46001082 */ mul.s $f2, $f2, $f0
/* 1A567C 80276D9C 00000000 */ nop
/* 1A5680 80276DA0 C6000004 */ lwc1 $f0, 0x4($s0)
/* 1A5684 80276DA4 46020000 */ add.s $f0, $f0, $f2
/* 1A5688 80276DA8 E6400148 */ swc1 $f0, 0x148($s2)
/* 1A568C 80276DAC C6000008 */ lwc1 $f0, 0x8($s0)
/* 1A5690 80276DB0 E640014C */ swc1 $f0, 0x14C($s2)
/* 1A5694 80276DB4 C6020010 */ lwc1 $f2, 0x10($s0)
/* 1A5698 80276DB8 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A569C 80276DBC 4602003C */ c.lt.s $f0, $f2
/* 1A56A0 80276DC0 00000000 */ nop
/* 1A56A4 80276DC4 45000005 */ bc1f .L80276DDC
/* 1A56A8 80276DC8 00000000 */ nop
/* 1A56AC 80276DCC 86020064 */ lh $v0, 0x64($s0)
/* 1A56B0 80276DD0 28420003 */ slti $v0, $v0, 0x3
/* 1A56B4 80276DD4 54400001 */ bnel $v0, $zero, .L80276DDC
/* 1A56B8 80276DD8 E6420148 */ swc1 $f2, 0x148($s2)
.L80276DDC:
/* 1A56BC 80276DDC C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A56C0 80276DE0 C6000028 */ lwc1 $f0, 0x28($s0)
/* 1A56C4 80276DE4 46006300 */ add.s $f12, $f12, $f0
/* 1A56C8 80276DE8 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A56CC 80276DEC E600001C */ swc1 $f0, 0x1C($s0)
/* 1A56D0 80276DF0 0C00A6C9 */ jal clamp_angle
/* 1A56D4 80276DF4 E60C0024 */ swc1 $f12, 0x24($s0)
/* 1A56D8 80276DF8 0000202D */ daddu $a0, $zero, $zero
/* 1A56DC 80276DFC 8E06005C */ lw $a2, 0x5C($s0)
/* 1A56E0 80276E00 0080282D */ daddu $a1, $a0, $zero
/* 1A56E4 80276E04 0C098F3F */ jal set_animation
/* 1A56E8 80276E08 E6000024 */ swc1 $f0, 0x24($s0)
/* 1A56EC 80276E0C C64C0160 */ lwc1 $f12, 0x160($s2)
/* 1A56F0 80276E10 3C014305 */ lui $at, (0x43050000 >> 16)
/* 1A56F4 80276E14 44810000 */ mtc1 $at, $f0
/* 1A56F8 80276E18 00000000 */ nop
/* 1A56FC 80276E1C 46006300 */ add.s $f12, $f12, $f0
/* 1A5700 80276E20 0C00A6C9 */ jal clamp_angle
/* 1A5704 80276E24 E64C0160 */ swc1 $f12, 0x160($s2)
/* 1A5708 80276E28 E6400160 */ swc1 $f0, 0x160($s2)
/* 1A570C 80276E2C 96020064 */ lhu $v0, 0x64($s0)
/* 1A5710 80276E30 2442FFFF */ addiu $v0, $v0, -0x1
/* 1A5714 80276E34 A6020064 */ sh $v0, 0x64($s0)
/* 1A5718 80276E38 00021400 */ sll $v0, $v0, 16
/* 1A571C 80276E3C 14400012 */ bnez $v0, .L80276E88
/* 1A5720 80276E40 0000102D */ daddu $v0, $zero, $zero
/* 1A5724 80276E44 C6000010 */ lwc1 $f0, 0x10($s0)
/* 1A5728 80276E48 0000202D */ daddu $a0, $zero, $zero
/* 1A572C 80276E4C AE400160 */ sw $zero, 0x160($s2)
/* 1A5730 80276E50 E6400148 */ swc1 $f0, 0x148($s2)
/* 1A5734 80276E54 8E060060 */ lw $a2, 0x60($s0)
/* 1A5738 80276E58 0C098F3F */ jal set_animation
/* 1A573C 80276E5C 0080282D */ daddu $a1, $a0, $zero
/* 1A5740 80276E60 C6020018 */ lwc1 $f2, 0x18($s0)
/* 1A5744 80276E64 C600001C */ lwc1 $f0, 0x1C($s0)
/* 1A5748 80276E68 46001081 */ sub.s $f2, $f2, $f0
/* 1A574C 80276E6C 3C013FE6 */ lui $at, (0x3FE66666 >> 16)
/* 1A5750 80276E70 34216666 */ ori $at, $at, (0x3FE66666 & 0xFFFF)
/* 1A5754 80276E74 44810000 */ mtc1 $at, $f0
/* 1A5758 80276E78 24020001 */ addiu $v0, $zero, 0x1
/* 1A575C 80276E7C E600003C */ swc1 $f0, 0x3C($s0)
/* 1A5760 80276E80 46001087 */ neg.s $f2, $f2
/* 1A5764 80276E84 E6020044 */ swc1 $f2, 0x44($s0)
.L80276E88:
/* 1A5768 80276E88 8FBF0028 */ lw $ra, 0x28($sp)
/* 1A576C 80276E8C 8FB30024 */ lw $s3, 0x24($sp)
/* 1A5770 80276E90 8FB20020 */ lw $s2, 0x20($sp)
/* 1A5774 80276E94 8FB1001C */ lw $s1, 0x1C($sp)
/* 1A5778 80276E98 8FB00018 */ lw $s0, 0x18($sp)
/* 1A577C 80276E9C D7BA0048 */ ldc1 $f26, 0x48($sp)
/* 1A5780 80276EA0 D7B80040 */ ldc1 $f24, 0x40($sp)
/* 1A5784 80276EA4 D7B60038 */ ldc1 $f22, 0x38($sp)
/* 1A5788 80276EA8 D7B40030 */ ldc1 $f20, 0x30($sp)
/* 1A578C 80276EAC 03E00008 */ jr $ra
/* 1A5790 80276EB0 27BD0050 */ addiu $sp, $sp, 0x50
### DECOMPILED C INSTRUCTIONS:
ApiStatus func_80275F00(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Actor* player = gBattleStatus.playerActor;
ActorState* playerState = &player->state;
f32 posX, posY, posZ;
f32 goalX, goalZ;
f32 speed;
f32 temp;
f64 temp_f20;
f64 temp_f20_2;
f64 temp_f20_4;
f64 temp_f20_5;
f64 temp_f20_6;
f64 temp_f20_7;
f64 temp_f22;
f64 temp_f22_2;
f64 temp_f22_3;
f64 temp_f22_4;
f64 temp_f22_5;
f64 temp_f22_6;
f64 temp_f22_7;
if (isInitialCall) {
player->state.moveTime = evt_get_variable(script, *args++);
player->state.moveArcAmplitude = evt_get_variable(script, *args++);
script->functionTemp[1] = 0;
script->functionTemp[0] = 0;
if (player->state.moveArcAmplitude == 1) {
script->functionTemp[0] = 11;
}
if (player->state.moveArcAmplitude == 3) {
script->functionTemp[0] = 20;
}
if (player->state.moveArcAmplitude == 2 || player->state.moveArcAmplitude == 4) {
script->functionTemp[0] = 30;
}
}
switch (script->functionTemp[0]) {
case 0:
playerState->currentPos.x = player->currentPos.x;
playerState->currentPos.y = player->currentPos.y;
playerState->currentPos.z = player->currentPos.z;
goalX = playerState->goalPos.x;
goalZ = playerState->goalPos.z;
posX = playerState->currentPos.x;
posY = playerState->currentPos.y;
posZ = playerState->currentPos.z;
playerState->angle = atan2(posX, posZ, goalX, goalZ);
playerState->distance = dist2D(posX, posZ, goalX, goalZ);
if (playerState->moveTime == 0) {
playerState->moveTime = playerState->distance / playerState->speed;
temp = playerState->distance - (playerState->moveTime * playerState->speed);
} else {
playerState->speed = playerState->distance / playerState->moveTime;
temp = playerState->distance - (playerState->moveTime * playerState->speed);
}
playerState->acceleration = PI_S / playerState->moveTime;
playerState->velocity = 0.0f;
playerState->unk_30.x = (playerState->goalPos.x - playerState->currentPos.x) / playerState->moveTime;
playerState->unk_30.y = (playerState->goalPos.y - playerState->currentPos.y) / playerState->moveTime;
playerState->unk_30.z = (playerState->goalPos.z - playerState->currentPos.z) / playerState->moveTime;
playerState->speed += temp / playerState->moveTime;
set_animation(ACTOR_PLAYER, 0, playerState->animJumpFall);
sfx_play_sound_at_position(SOUND_160, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
sfx_play_sound_at_position(SOUND_TORNADO_JUMP, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
playerState->unk_18.x = 0.0f;
playerState->unk_18.y = 0.0f;
playerState->unk_24 = 90.0f;
temp = playerState->distance;
temp -= 20.0;
temp /= 6.0;
temp += 47.0;
playerState->bounceDivisor = temp;
temp_f20 = playerState->velocity;
temp_f22 = playerState->acceleration;
playerState->unk_28 = 360 / playerState->moveTime;
playerState->velocity = temp_f20 + (((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.53) * temp_f22) + temp_f22);
script->functionTemp[0] = 1;
break;
case 10:
playerState->currentPos.x = player->currentPos.x;
playerState->currentPos.y = player->currentPos.y;
playerState->currentPos.z = player->currentPos.z;
goalX = playerState->goalPos.x;
goalZ = playerState->goalPos.z;
posX = playerState->currentPos.x;
posY = playerState->currentPos.y;
posZ = playerState->currentPos.z;
playerState->angle = atan2(posX, posZ, goalX, goalZ);
playerState->distance = dist2D(posX, posZ, goalX, goalZ);
if (playerState->moveTime == 0) {
playerState->moveTime = playerState->distance / playerState->speed;
temp = playerState->distance - (playerState->moveTime * playerState->speed);
} else {
speed = playerState->distance / playerState->moveTime;
playerState->speed = speed;
temp = playerState->distance - (playerState->moveTime * speed);
}
playerState->acceleration = PI_S / playerState->moveTime;
playerState->velocity = 0.0f;
playerState->unk_30.x = (playerState->goalPos.x - playerState->currentPos.x) / playerState->moveTime;
playerState->unk_30.y = (playerState->goalPos.y - playerState->currentPos.y) / playerState->moveTime;
playerState->unk_30.z = (playerState->goalPos.z - playerState->currentPos.z) / playerState->moveTime;
playerState->speed += temp / playerState->moveTime;
set_animation(ACTOR_PLAYER, 0, playerState->animJumpRise);
sfx_play_sound_at_position(SOUND_160, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
sfx_play_sound_at_position(SOUND_TORNADO_JUMP, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
playerState->unk_18.x = 0.0f;
playerState->unk_18.y = 0.0f;
playerState->unk_24 = 90.0f;
temp_f20_2 = playerState->velocity;
temp_f22_2 = playerState->acceleration;
temp = playerState->distance;
temp -= 20.0;
temp /= 6.0;
temp += 47.0;
playerState->bounceDivisor = temp;
playerState->unk_28 = 360 / playerState->moveTime;
playerState->velocity = temp_f20_2 + (((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.53) * temp_f22_2) + temp_f22_2);
script->functionTemp[0] = 11;
break;
case 20:
playerState->moveTime = 1;
set_animation(ACTOR_PLAYER, 1, 0x1000C);
player->rotation.y = 0.0f;
playerState->unk_24 = 90.0f;
playerState->bounceDivisor = fabsf(playerState->unk_18.x - playerState->unk_18.y) / 16.5;
playerState->unk_28 = 360 / playerState->moveTime;
playerState->currentPos.x = player->currentPos.x;
playerState->currentPos.y = player->currentPos.y;
playerState->currentPos.z = player->currentPos.z;
script->functionTemp[0] = 21;
break;
case 30:
playerState->currentPos.x = player->currentPos.x;
playerState->currentPos.y = player->currentPos.y;
playerState->currentPos.z = player->currentPos.z;
goalX = playerState->goalPos.x;
goalZ = playerState->goalPos.z;
posX = playerState->currentPos.x;
posY = playerState->currentPos.y;
posZ = playerState->currentPos.z;
playerState->angle = atan2(posX, posZ, goalX, goalZ);
playerState->distance = dist2D(posX, posZ, goalX, goalZ);
if (playerState->moveTime == 0) {
playerState->moveTime = playerState->distance / playerState->speed;
temp = playerState->distance - (playerState->moveTime * playerState->speed);
} else {
playerState->speed = playerState->distance / playerState->moveTime;
temp = playerState->distance - (playerState->moveTime * playerState->speed);
}
playerState->acceleration = PI_S / (playerState->moveTime + 1);
playerState->velocity = 0.0f;
playerState->unk_30.x = (playerState->goalPos.x - playerState->currentPos.x) / playerState->moveTime;
playerState->unk_30.y = (playerState->goalPos.y - playerState->currentPos.y) / playerState->moveTime;
playerState->unk_30.z = (playerState->goalPos.z - playerState->currentPos.z) / playerState->moveTime;
playerState->speed += temp / playerState->moveTime;
set_animation(ACTOR_PLAYER, 0, playerState->animJumpRise);
sfx_play_sound_at_position(SOUND_160, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
playerState->unk_24 = 90.0f;
playerState->bounceDivisor = 45.0f;
playerState->unk_28 = 360 / playerState->moveTime;
if (playerState->moveArcAmplitude == 4) {
playerState->bounceDivisor = 56.25f;
}
playerState->unk_18.x = 0.0f;
playerState->unk_18.y = 0.0f;
temp_f22_3 = playerState->acceleration;
temp_f22_7 = playerState->velocity;
temp_f22_7 = temp_f22_7 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.53 * temp_f22_3) + temp_f22_3);
playerState->velocity = temp_f22_7;
script->functionTemp[0] = 31;
break;
}
switch (script->functionTemp[0]) {
case 1:
temp_f22_4 = playerState->velocity;
temp_f20_4 = playerState->acceleration;
playerState->velocity = temp_f22_4 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.53 * temp_f20_4) + temp_f20_4);
playerState->currentPos.x += playerState->unk_30.x;
playerState->currentPos.y += playerState->unk_30.y;
playerState->currentPos.z += playerState->unk_30.z;
playerState->unk_18.x = player->currentPos.y;
player->currentPos.x = playerState->currentPos.x;
player->currentPos.y = playerState->currentPos.y + (playerState->bounceDivisor * sin_rad(playerState->velocity));
player->currentPos.z = playerState->currentPos.z;
playerState->unk_18.y = player->currentPos.y;
playerState->unk_24 += playerState->unk_28;
playerState->unk_24 = clamp_angle(playerState->unk_24);
player->rotation.y += 133.0f;
player->rotation.y = clamp_angle(player->rotation.y);
if (gBattleStatus.flags1 & BS_FLAGS1_2000) {
return ApiStatus_DONE2;
}
playerState->moveTime--;
if (playerState->moveTime == 4) {
return ApiStatus_DONE1;
}
break;
case 11:
temp_f22_6 = playerState->velocity;
temp_f20_7 = playerState->acceleration;
playerState->velocity = temp_f22_6 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.53 * temp_f20_7) + temp_f20_7);
playerState->currentPos.x += playerState->unk_30.x;
playerState->currentPos.y += playerState->unk_30.y;
playerState->currentPos.z += playerState->unk_30.z;
playerState->unk_18.x = player->currentPos.y;
player->currentPos.x = playerState->currentPos.x;
player->currentPos.y = playerState->currentPos.y + (playerState->bounceDivisor * sin_rad(playerState->velocity));
player->currentPos.z = playerState->currentPos.z;
if (playerState->goalPos.y > player->currentPos.y && playerState->moveTime < 3) {
player->currentPos.y = playerState->goalPos.y;
}
playerState->unk_18.y = player->currentPos.y;
playerState->unk_24 += playerState->unk_28;
playerState->unk_24 = clamp_angle(playerState->unk_24);
set_animation(ACTOR_PLAYER, 0, playerState->animJumpFall);
player->rotation.y += 133.0f;
player->rotation.y = clamp_angle(player->rotation.y);
playerState->moveTime--;
if (playerState->moveTime == 0) {
playerState->acceleration = 1.8f;
playerState->velocity = -(playerState->unk_18.x - playerState->unk_18.y);
player->currentPos.y = playerState->goalPos.y;
player->rotation.y = 0.0f;
set_animation(ACTOR_PLAYER, 0, playerState->animJumpLand);
play_movement_dust_effects(2, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw);
return ApiStatus_DONE1;
}
break;
case 21:
temp_f20_5 = playerState->currentPos.x;
temp_f20_5 += (playerState->bounceDivisor * sin_rad(DEG_TO_RAD(playerState->unk_24))) / 33.0;
playerState->currentPos.x = temp_f20_5;
playerState->currentPos.y -= playerState->bounceDivisor * sin_rad(DEG_TO_RAD(playerState->unk_24));
playerState->unk_24 += playerState->unk_28;
playerState->unk_24 = clamp_angle(playerState->unk_24);
player->currentPos.x = playerState->currentPos.x;
player->currentPos.y = playerState->currentPos.y;
player->currentPos.z = playerState->currentPos.z;
if (gBattleStatus.flags1 & BS_FLAGS1_2000) {
return ApiStatus_DONE2;
}
playerState->moveTime--;
if (playerState->moveTime == 0) {
return ApiStatus_DONE1;
}
break;
case 31:
temp_f22_5 = playerState->velocity;
temp_f20_6 = playerState->acceleration;
playerState->velocity = temp_f22_5 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.53 * temp_f20_6) + temp_f20_6);
playerState->currentPos.x += playerState->unk_30.x;
playerState->currentPos.y += playerState->unk_30.y;
playerState->currentPos.z += playerState->unk_30.z;
playerState->unk_18.x = player->currentPos.y;
player->currentPos.x = playerState->currentPos.x;
player->currentPos.y = playerState->currentPos.y + (playerState->bounceDivisor * sin_rad(playerState->velocity));
player->currentPos.z = playerState->currentPos.z;
if (playerState->goalPos.y > player->currentPos.y && playerState->moveTime < 3) {
player->currentPos.y = playerState->goalPos.y;
}
playerState->unk_18.y = player->currentPos.y;
playerState->unk_24 += playerState->unk_28;
playerState->unk_24 = clamp_angle(playerState->unk_24);
set_animation(ACTOR_PLAYER, 0, playerState->animJumpFall);
player->rotation.y += 133.0f;
player->rotation.y = clamp_angle(player->rotation.y);
playerState->moveTime--;
if (playerState->moveTime == 0) {
player->currentPos.y = playerState->goalPos.y;
player->rotation.y = 0.0f;
set_animation(ACTOR_PLAYER, 0, playerState->animJumpLand);
playerState->acceleration = 1.8f;
playerState->velocity = -(playerState->unk_18.x - playerState->unk_18.y);
return ApiStatus_DONE1;
}
break;
}
return ApiStatus_BLOCK;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel action_update_use_spinning_flower
/* E29514 802B60A4 27BDFF98 */ addiu $sp, $sp, -0x68
.L802B60A8:
/* E29518 802B60A8 AFB30034 */ sw $s3, 0x34($sp)
.L802B60AC:
/* E2951C 802B60AC 3C138011 */ lui $s3, %hi(gPlayerStatus)
/* E29520 802B60B0 2673EFC8 */ addiu $s3, $s3, %lo(gPlayerStatus)
glabel action_update_jump
/* E29524 802B60B4 AFBF003C */ sw $ra, 0x3C($sp)
/* E29528 802B60B8 AFB40038 */ sw $s4, 0x38($sp)
/* E2952C 802B60BC AFB20030 */ sw $s2, 0x30($sp)
/* E29530 802B60C0 AFB1002C */ sw $s1, 0x2C($sp)
/* E29534 802B60C4 AFB00028 */ sw $s0, 0x28($sp)
.L802B60C8:
/* E29538 802B60C8 F7BC0060 */ sdc1 $f28, 0x60($sp)
/* E2953C 802B60CC F7BA0058 */ sdc1 $f26, 0x58($sp)
glabel .L802B60D0
/* E29540 802B60D0 F7B80050 */ sdc1 $f24, 0x50($sp)
.L802B60D4:
/* E29544 802B60D4 F7B60048 */ sdc1 $f22, 0x48($sp)
/* E29548 802B60D8 F7B40040 */ sdc1 $f20, 0x40($sp)
/* E2954C 802B60DC 8E650000 */ lw $a1, 0x0($s3)
/* E29550 802B60E0 04A10032 */ bgez $a1, .L802B61AC
/* E29554 802B60E4 3C037FFF */ lui $v1, (0x7FFFFFFF >> 16)
.L802B60E8:
/* E29558 802B60E8 3463FFFF */ ori $v1, $v1, (0x7FFFFFFF & 0xFFFF)
.L802B60EC:
/* E2955C 802B60EC 3C04800A */ lui $a0, %hi(gOverrideFlags)
.L802B60F0:
/* E29560 802B60F0 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags)
glabel .L802B60F4
/* E29564 802B60F4 8C820000 */ lw $v0, 0x0($a0)
/* E29568 802B60F8 00A31824 */ and $v1, $a1, $v1
/* E2956C 802B60FC AE630000 */ sw $v1, 0x0($s3)
.L802B6100:
/* E29570 802B6100 34420040 */ ori $v0, $v0, 0x40
.L802B6104:
/* E29574 802B6104 0C03BCC0 */ jal func_800EF300
.L802B6108:
/* E29578 802B6108 AC820000 */ sw $v0, 0x0($a0)
glabel .L802B610C
/* E2957C 802B610C C660002C */ lwc1 $f0, 0x2C($s3)
.L802B6110:
/* E29580 802B6110 3C014040 */ lui $at, (0x40400000 >> 16)
/* E29584 802B6114 44811000 */ mtc1 $at, $f2
.L802B6118:
/* E29588 802B6118 24020001 */ addiu $v0, $zero, 0x1
/* E2958C 802B611C A26200B6 */ sb $v0, 0xB6($s3)
glabel action_update_parasol
/* E29590 802B6120 A6600008 */ sh $zero, 0x8($s3)
.L802B6124:
/* E29594 802B6124 3C01802B */ lui $at, %hi(D_802B6EE4)
.L802B6128:
/* E29598 802B6128 AC206EE4 */ sw $zero, %lo(D_802B6EE4)($at)
/* E2959C 802B612C 3C01802B */ lui $at, %hi(D_802B6EE8)
/* E295A0 802B6130 AC206EE8 */ sw $zero, %lo(D_802B6EE8)($at)
glabel .L802B6134
/* E295A4 802B6134 3C01802B */ lui $at, %hi(D_802B6EF4)
/* E295A8 802B6138 E4206EF4 */ swc1 $f0, %lo(D_802B6EF4)($at)
.L802B613C:
/* E295AC 802B613C 3C01802B */ lui $at, %hi(D_802B6EDC)
.L802B6140:
/* E295B0 802B6140 E4226EDC */ swc1 $f2, %lo(D_802B6EDC)($at)
.L802B6144:
/* E295B4 802B6144 0C038045 */ jal disable_player_static_collisions
/* E295B8 802B6148 00000000 */ nop
.L802B614C:
/* E295BC 802B614C 0C03805E */ jal disable_player_input
.L802B6150:
/* E295C0 802B6150 00000000 */ nop
.L802B6154:
/* E295C4 802B6154 3C030010 */ lui $v1, (0x100000 >> 16)
.L802B6158:
/* E295C8 802B6158 8E620000 */ lw $v0, 0x0($s3)
.L802B615C:
/* E295CC 802B615C 3C048016 */ lui $a0, %hi(gCollisionStatus + 0x2)
/* E295D0 802B6160 8484A552 */ lh $a0, %lo(gCollisionStatus + 0x2)($a0)
.L802B6164:
/* E295D4 802B6164 00431025 */ or $v0, $v0, $v1
.L802B6168:
/* E295D8 802B6168 3C03802B */ lui $v1, %hi(SpinningFlower_EntityIndex)
/* E295DC 802B616C 24636ED0 */ addiu $v1, $v1, %lo(SpinningFlower_EntityIndex)
glabel .L802B6170
/* E295E0 802B6170 AE620000 */ sw $v0, 0x0($s3)
glabel .L802B6174
/* E295E4 802B6174 04800004 */ bltz $a0, .L802B6188
/* E295E8 802B6178 AFA40020 */ sw $a0, 0x20($sp)
.L802B617C:
/* E295EC 802B617C 30824000 */ andi $v0, $a0, 0x4000
.L802B6180:
/* E295F0 802B6180 14400002 */ bnez $v0, .L802B618C
glabel .L802B6184
/* E295F4 802B6184 308203FF */ andi $v0, $a0, 0x3FF
.L802B6188:
/* E295F8 802B6188 2402FFFF */ addiu $v0, $zero, -0x1
.L802B618C:
/* E295FC 802B618C AC620000 */ sw $v0, 0x0($v1)
.L802B6190:
/* E29600 802B6190 8E620004 */ lw $v0, 0x4($s3)
.L802B6194:
/* E29604 802B6194 30420003 */ andi $v0, $v0, 0x3
glabel func_802B6198
/* E29608 802B6198 14400004 */ bnez $v0, .L802B61AC
/* E2960C 802B619C 00000000 */ nop
.L802B61A0:
/* E29610 802B61A0 3C040001 */ lui $a0, (0x1002B >> 16)
.L802B61A4:
/* E29614 802B61A4 0C037FBF */ jal suggest_player_anim_allow_backward
.L802B61A8:
/* E29618 802B61A8 3484002B */ ori $a0, $a0, (0x1002B & 0xFFFF)
.L802B61AC:
/* E2961C 802B61AC 826300B6 */ lb $v1, 0xB6($s3)
.L802B61B0:
/* E29620 802B61B0 24020001 */ addiu $v0, $zero, 0x1
.L802B61B4:
/* E29624 802B61B4 10620005 */ beq $v1, $v0, .L802B61CC
/* E29628 802B61B8 24020002 */ addiu $v0, $zero, 0x2
/* E2962C 802B61BC 106200F6 */ beq $v1, $v0, .L802B6598
glabel func_802B61C0
/* E29630 802B61C0 00000000 */ nop
/* E29634 802B61C4 080AD9D6 */ j .L802B6758
.L802B61C8:
/* E29638 802B61C8 00000000 */ nop
.L802B61CC:
/* E2963C 802B61CC 3C04802B */ lui $a0, %hi(D_802B6EE4)
/* E29640 802B61D0 24846EE4 */ addiu $a0, $a0, %lo(D_802B6EE4)
.L802B61D4:
/* E29644 802B61D4 3C03800A */ lui $v1, %hi(gOverrideFlags)
.L802B61D8:
/* E29648 802B61D8 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags)
.L802B61DC:
/* E2964C 802B61DC C4800000 */ lwc1 $f0, 0x0($a0)
/* E29650 802B61E0 3C013F80 */ lui $at, (0x3F800000 >> 16)
glabel func_802B61E4
/* E29654 802B61E4 4481E000 */ mtc1 $at, $f28
.L802B61E8:
/* E29658 802B61E8 8C620000 */ lw $v0, 0x0($v1)
.L802B61EC:
/* E2965C 802B61EC 3C0141A0 */ lui $at, (0x41A00000 >> 16)
.L802B61F0:
/* E29660 802B61F0 44811000 */ mtc1 $at, $f2
.L802B61F4:
/* E29664 802B61F4 461C0000 */ add.s $f0, $f0, $f28
.L802B61F8:
/* E29668 802B61F8 34420040 */ ori $v0, $v0, 0x40
.L802B61FC:
/* E2966C 802B61FC AC620000 */ sw $v0, 0x0($v1)
.L802B6200:
/* E29670 802B6200 4600103E */ c.le.s $f2, $f0
.L802B6204:
/* E29674 802B6204 00000000 */ nop
glabel .L802B6208
/* E29678 802B6208 45000002 */ bc1f .L802B6214
/* E2967C 802B620C E4800000 */ swc1 $f0, 0x0($a0)
.L802B6210:
/* E29680 802B6210 E4820000 */ swc1 $f2, 0x0($a0)
.L802B6214:
/* E29684 802B6214 C66000A8 */ lwc1 $f0, 0xA8($s3)
glabel .L802B6218
/* E29688 802B6218 C48C0000 */ lwc1 $f12, 0x0($a0)
/* E2968C 802B621C 0C00A6C9 */ jal clamp_angle
.L802B6220:
/* E29690 802B6220 460C0300 */ add.s $f12, $f0, $f12
.L802B6224:
/* E29694 802B6224 86620008 */ lh $v0, 0x8($s3)
glabel .L802B6228
/* E29698 802B6228 96630008 */ lhu $v1, 0x8($s3)
.L802B622C:
/* E2969C 802B622C 2842000A */ slti $v0, $v0, 0xA
glabel action_update_step_up_peach
/* E296A0 802B6230 10400008 */ beqz $v0, .L802B6254
/* E296A4 802B6234 E66000A8 */ swc1 $f0, 0xA8($s3)
glabel .L802B6238
/* E296A8 802B6238 3C02802B */ lui $v0, %hi(D_802B6EF4)
glabel .L802B623C
/* E296AC 802B623C 24426EF4 */ addiu $v0, $v0, %lo(D_802B6EF4)
glabel .L802B6240
/* E296B0 802B6240 C4400000 */ lwc1 $f0, 0x0($v0)
glabel .L802B6244
/* E296B4 802B6244 461C0000 */ add.s $f0, $f0, $f28
glabel .L802B6248
/* E296B8 802B6248 24630001 */ addiu $v1, $v1, 0x1
/* E296BC 802B624C A6630008 */ sh $v1, 0x8($s3)
glabel .L802B6250
/* E296C0 802B6250 E4400000 */ swc1 $f0, 0x0($v0)
.L802B6254:
/* E296C4 802B6254 3C02802B */ lui $v0, %hi(D_802B6EE8)
glabel .L802B6258
/* E296C8 802B6258 24426EE8 */ addiu $v0, $v0, %lo(D_802B6EE8)
.L802B625C:
/* E296CC 802B625C C44C0000 */ lwc1 $f12, 0x0($v0)
/* E296D0 802B6260 3C014100 */ lui $at, (0x41000000 >> 16)
/* E296D4 802B6264 44810000 */ mtc1 $at, $f0
.L802B6268:
/* E296D8 802B6268 00000000 */ nop
.L802B626C:
/* E296DC 802B626C 46006300 */ add.s $f12, $f12, $f0
/* E296E0 802B6270 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
.L802B6274:
/* E296E4 802B6274 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
glabel .L802B6278
/* E296E8 802B6278 4481A000 */ mtc1 $at, $f20
/* E296EC 802B627C 0C00A6C9 */ jal clamp_angle
.L802B6280:
/* E296F0 802B6280 E44C0000 */ swc1 $f12, 0x0($v0)
.L802B6284:
/* E296F4 802B6284 46140002 */ mul.s $f0, $f0, $f20
glabel action_update_run
/* E296F8 802B6288 00000000 */ nop
/* E296FC 802B628C 3C0143B4 */ lui $at, (0x43B40000 >> 16)
.L802B6290:
/* E29700 802B6290 4481B000 */ mtc1 $at, $f22
glabel func_802B6294
/* E29704 802B6294 3C014080 */ lui $at, (0x40800000 >> 16)
glabel .L802B6298
/* E29708 802B6298 4481D000 */ mtc1 $at, $f26
/* E2970C 802B629C 0C00A85B */ jal sin_rad
/* E29710 802B62A0 46160303 */ div.s $f12, $f0, $f22
glabel func_802B62A4
/* E29714 802B62A4 461A0002 */ mul.s $f0, $f0, $f26
.L802B62A8:
/* E29718 802B62A8 00000000 */ nop
/* E2971C 802B62AC 3C01802B */ lui $at, %hi(D_802B6EF4)
jtbl_802B62B0:
/* E29720 802B62B0 C4226EF4 */ lwc1 $f2, %lo(D_802B6EF4)($at)
.L802B62B4:
/* E29724 802B62B4 46001080 */ add.s $f2, $f2, $f0
glabel .L802B62B8
/* E29728 802B62B8 3C04802B */ lui $a0, %hi(SpinningFlower_EntityIndex)
/* E2972C 802B62BC 8C846ED0 */ lw $a0, %lo(SpinningFlower_EntityIndex)($a0)
/* E29730 802B62C0 04800042 */ bltz $a0, .L802B63CC
/* E29734 802B62C4 E662002C */ swc1 $f2, 0x2C($s3)
.L802B62C8:
/* E29738 802B62C8 0C04417A */ jal get_entity_by_index
glabel action_update_peach_land
/* E2973C 802B62CC 00000000 */ nop
Munchlesia_LaunchVelocity:
/* E29740 802B62D0 0040902D */ daddu $s2, $v0, $zero
Munchlesia_LateralVelocity:
/* E29744 802B62D4 C64C0048 */ lwc1 $f12, 0x48($s2)
Munchlesia_LaunchAccel:
/* E29748 802B62D8 C64E0050 */ lwc1 $f14, 0x50($s2)
Munchlesia_LaunchYaw:
/* E2974C 802B62DC 8E660028 */ lw $a2, 0x28($s3)
D_802B62E0:
/* E29750 802B62E0 0C00A7B5 */ jal dist2D
.L802B62E4:
/* E29754 802B62E4 8E670030 */ lw $a3, 0x30($s3)
/* E29758 802B62E8 C64C0048 */ lwc1 $f12, 0x48($s2)
/* E2975C 802B62EC C64E0050 */ lwc1 $f14, 0x50($s2)
/* E29760 802B62F0 8E660028 */ lw $a2, 0x28($s3)
/* E29764 802B62F4 8E670030 */ lw $a3, 0x30($s3)
glabel func_802B62F8
/* E29768 802B62F8 0C00A720 */ jal atan2
.L802B62FC:
/* E2976C 802B62FC 46000606 */ mov.s $f24, $f0
D_802B6300:
/* E29770 802B6300 3C14802B */ lui $s4, %hi(SpinningFlower_AngleToCenter)
/* E29774 802B6304 26946EEC */ addiu $s4, $s4, %lo(SpinningFlower_AngleToCenter)
.L802B6308:
/* E29778 802B6308 4618D03C */ c.lt.s $f26, $f24
.L802B630C:
/* E2977C 802B630C 00000000 */ nop
.L802B6310:
/* E29780 802B6310 45000002 */ bc1f .L802B631C
/* E29784 802B6314 E6800000 */ swc1 $f0, 0x0($s4)
/* E29788 802B6318 461CC601 */ sub.s $f24, $f24, $f28
glabel .L802B631C
/* E2978C 802B631C 46140302 */ mul.s $f12, $f0, $f20
.L802B6320:
/* E29790 802B6320 00000000 */ nop
glabel .L802B6324
/* E29794 802B6324 27B00010 */ addiu $s0, $sp, 0x10
.L802B6328:
/* E29798 802B6328 0200282D */ daddu $a1, $s0, $zero
glabel .L802B632C
/* E2979C 802B632C 27B10014 */ addiu $s1, $sp, 0x14
.L802B6330:
/* E297A0 802B6330 0220302D */ daddu $a2, $s1, $zero
/* E297A4 802B6334 0C00A82D */ jal sin_cos_rad
.L802B6338:
/* E297A8 802B6338 46166303 */ div.s $f12, $f12, $f22
/* E297AC 802B633C C7A20010 */ lwc1 $f2, 0x10($sp)
.L802B6340:
/* E297B0 802B6340 46181082 */ mul.s $f2, $f2, $f24
/* E297B4 802B6344 00000000 */ nop
glabel func_802B6348
/* E297B8 802B6348 C7A40014 */ lwc1 $f4, 0x14($sp)
/* E297BC 802B634C 46182102 */ mul.s $f4, $f4, $f24
PlayerTweesterPhysicsPtr:
/* E297C0 802B6350 00000000 */ nop
glabel .L802B6354
/* E297C4 802B6354 C68C0000 */ lwc1 $f12, 0x0($s4)
/* E297C8 802B6358 3C0142B6 */ lui $at, (0x42B60000 >> 16)
.L802B635C:
/* E297CC 802B635C 44810000 */ mtc1 $at, $f0
D_802B6360:
/* E297D0 802B6360 00000000 */ nop
.L802B6364:
/* E297D4 802B6364 46006301 */ sub.s $f12, $f12, $f0
/* E297D8 802B6368 C6400048 */ lwc1 $f0, 0x48($s2)
.L802B636C:
/* E297DC 802B636C 46020000 */ add.s $f0, $f0, $f2
glabel .L802B6370
/* E297E0 802B6370 46146302 */ mul.s $f12, $f12, $f20
.L802B6374:
/* E297E4 802B6374 00000000 */ nop
/* E297E8 802B6378 E6600028 */ swc1 $f0, 0x28($s3)
glabel .L802B637C
/* E297EC 802B637C C6400050 */ lwc1 $f0, 0x50($s2)
/* E297F0 802B6380 0200282D */ daddu $a1, $s0, $zero
/* E297F4 802B6384 46040001 */ sub.s $f0, $f0, $f4
/* E297F8 802B6388 0220302D */ daddu $a2, $s1, $zero
/* E297FC 802B638C 46166303 */ div.s $f12, $f12, $f22
/* E29800 802B6390 0C00A82D */ jal sin_cos_rad
glabel .L802B6394
/* E29804 802B6394 E6600030 */ swc1 $f0, 0x30($s3)
.L802B6398:
/* E29808 802B6398 C7A20010 */ lwc1 $f2, 0x10($sp)
.L802B639C:
/* E2980C 802B639C 3C01802B */ lui $at, %hi(D_802B6EDC)
/* E29810 802B63A0 C4246EDC */ lwc1 $f4, %lo(D_802B6EDC)($at)
/* E29814 802B63A4 46041082 */ mul.s $f2, $f2, $f4
.L802B63A8:
/* E29818 802B63A8 00000000 */ nop
.L802B63AC:
/* E2981C 802B63AC C7A00014 */ lwc1 $f0, 0x14($sp)
glabel .L802B63B0
/* E29820 802B63B0 46000007 */ neg.s $f0, $f0
/* E29824 802B63B4 46040002 */ mul.s $f0, $f0, $f4
/* E29828 802B63B8 00000000 */ nop
/* E2982C 802B63BC 3C01802B */ lui $at, %hi(D_802B6ED4)
.L802B63C0:
/* E29830 802B63C0 E4226ED4 */ swc1 $f2, %lo(D_802B6ED4)($at)
.L802B63C4:
/* E29834 802B63C4 3C01802B */ lui $at, %hi(D_802B6ED8)
.L802B63C8:
/* E29838 802B63C8 E4206ED8 */ swc1 $f0, %lo(D_802B6ED8)($at)
.L802B63CC:
/* E2983C 802B63CC 27A40018 */ addiu $a0, $sp, 0x18
.L802B63D0:
/* E29840 802B63D0 0C0388FF */ jal game_input_to_move_vector
glabel action_update_first_strike
/* E29844 802B63D4 27A5001C */ addiu $a1, $sp, 0x1C
.L802B63D8:
/* E29848 802B63D8 C7A2001C */ lwc1 $f2, 0x1C($sp)
glabel .L802B63DC
/* E2984C 802B63DC 44800000 */ mtc1 $zero, $f0
.L802B63E0:
/* E29850 802B63E0 00000000 */ nop
.L802B63E4:
/* E29854 802B63E4 46001032 */ c.eq.s $f2, $f0
/* E29858 802B63E8 00000000 */ nop
/* E2985C 802B63EC 4501002C */ bc1t .L802B64A0
.L802B63F0:
/* E29860 802B63F0 27A50010 */ addiu $a1, $sp, 0x10
.L802B63F4:
/* E29864 802B63F4 C7AC0018 */ lwc1 $f12, 0x18($sp)
/* E29868 802B63F8 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* E2986C 802B63FC 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
.L802B6400:
/* E29870 802B6400 44810000 */ mtc1 $at, $f0
/* E29874 802B6404 00000000 */ nop
/* E29878 802B6408 46006302 */ mul.s $f12, $f12, $f0
.L802B640C:
/* E2987C 802B640C 00000000 */ nop
/* E29880 802B6410 3C0143B4 */ lui $at, (0x43B40000 >> 16)
.L802B6414:
/* E29884 802B6414 44810000 */ mtc1 $at, $f0
.L802B6418:
/* E29888 802B6418 27A60014 */ addiu $a2, $sp, 0x14
/* E2988C 802B641C 0C00A82D */ jal sin_cos_rad
.L802B6420:
/* E29890 802B6420 46006303 */ div.s $f12, $f12, $f0
.L802B6424:
/* E29894 802B6424 C7A4001C */ lwc1 $f4, 0x1C($sp)
.L802B6428:
/* E29898 802B6428 3C013D00 */ lui $at, (0x3D000000 >> 16)
.L802B642C:
/* E2989C 802B642C 44810000 */ mtc1 $at, $f0
D_802B6430:
/* E298A0 802B6430 00000000 */ nop
/* E298A4 802B6434 46002102 */ mul.s $f4, $f4, $f0
/* E298A8 802B6438 00000000 */ nop
/* E298AC 802B643C 3C01802B */ lui $at, %hi(D_802B6E90_E2A300)
/* E298B0 802B6440 D4226E90 */ ldc1 $f2, %lo(D_802B6E90_E2A300)($at)
/* E298B4 802B6444 46002021 */ cvt.d.s $f0, $f4
.L802B6448:
/* E298B8 802B6448 4622003C */ c.lt.d $f0, $f2
glabel action_update_peach_step_down_land
/* E298BC 802B644C 00000000 */ nop
.L802B6450:
/* E298C0 802B6450 45000006 */ bc1f .L802B646C
.L802B6454:
/* E298C4 802B6454 E7A4001C */ swc1 $f4, 0x1C($sp)
/* E298C8 802B6458 3C013DCC */ lui $at, (0x3DCCCCCD >> 16)
/* E298CC 802B645C 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF)
.L802B6460:
/* E298D0 802B6460 44810000 */ mtc1 $at, $f0
.L802B6464:
/* E298D4 802B6464 00000000 */ nop
/* E298D8 802B6468 E7A0001C */ swc1 $f0, 0x1C($sp)
glabel .L802B646C
/* E298DC 802B646C C7A00010 */ lwc1 $f0, 0x10($sp)
/* E298E0 802B6470 C7A2001C */ lwc1 $f2, 0x1C($sp)
/* E298E4 802B6474 46020002 */ mul.s $f0, $f0, $f2
glabel action_update_raise_arms
/* E298E8 802B6478 00000000 */ nop
glabel action_update_peach_falling
/* E298EC 802B647C C7A40014 */ lwc1 $f4, 0x14($sp)
/* E298F0 802B6480 46022102 */ mul.s $f4, $f4, $f2
/* E298F4 802B6484 00000000 */ nop
/* E298F8 802B6488 C6620028 */ lwc1 $f2, 0x28($s3)
.L802B648C:
/* E298FC 802B648C 46001080 */ add.s $f2, $f2, $f0
.L802B6490:
/* E29900 802B6490 C6600030 */ lwc1 $f0, 0x30($s3)
.L802B6494:
/* E29904 802B6494 46040001 */ sub.s $f0, $f0, $f4
/* E29908 802B6498 E6620028 */ swc1 $f2, 0x28($s3)
/* E2990C 802B649C E6600030 */ swc1 $f0, 0x30($s3)
.L802B64A0:
/* E29910 802B64A0 C6600028 */ lwc1 $f0, 0x28($s3)
/* E29914 802B64A4 C662002C */ lwc1 $f2, 0x2C($s3)
glabel .L802B64A8
/* E29918 802B64A8 C6640030 */ lwc1 $f4, 0x30($s3)
.L802B64AC:
/* E2991C 802B64AC 3C02800B */ lui $v0, %hi(gCameras)
/* E29920 802B64B0 24421D80 */ addiu $v0, $v0, %lo(gCameras)
.L802B64B4:
/* E29924 802B64B4 E4400060 */ swc1 $f0, 0x60($v0)
/* E29928 802B64B8 E4420064 */ swc1 $f2, 0x64($v0)
/* E2992C 802B64BC 0C0AD800 */ jal parasol_get_npc
/* E29930 802B64C0 E4440068 */ swc1 $f4, 0x68($v0)
.L802B64C4:
/* E29934 802B64C4 04400004 */ bltz $v0, .L802B64D8
/* E29938 802B64C8 AFA20020 */ sw $v0, 0x20($sp)
.L802B64CC:
/* E2993C 802B64CC 30424000 */ andi $v0, $v0, 0x4000
.L802B64D0:
/* E29940 802B64D0 14400014 */ bnez $v0, .L802B6524
.L802B64D4:
/* E29944 802B64D4 00000000 */ nop
.L802B64D8:
/* E29948 802B64D8 C660002C */ lwc1 $f0, 0x2C($s3)
glabel .L802B64DC
/* E2994C 802B64DC 24020014 */ addiu $v0, $zero, 0x14
glabel .L802B64E0
/* E29950 802B64E0 A6620008 */ sh $v0, 0x8($s3)
/* E29954 802B64E4 3C01802B */ lui $at, %hi(D_802B6EE8)
/* E29958 802B64E8 AC206EE8 */ sw $zero, %lo(D_802B6EE8)($at)
.L802B64EC:
/* E2995C 802B64EC 3C01802B */ lui $at, %hi(D_802B6EF4)
glabel .L802B64F0
/* E29960 802B64F0 E4206EF4 */ swc1 $f0, %lo(D_802B6EF4)($at)
/* E29964 802B64F4 926200B6 */ lbu $v0, 0xB6($s3)
.L802B64F8:
/* E29968 802B64F8 3C013FCC */ lui $at, (0x3FCCCCCD >> 16)
/* E2996C 802B64FC 3421CCCD */ ori $at, $at, (0x3FCCCCCD & 0xFFFF)
/* E29970 802B6500 44810000 */ mtc1 $at, $f0
/* E29974 802B6504 24420001 */ addiu $v0, $v0, 0x1
glabel action_update_pushing_block
/* E29978 802B6508 A26200B6 */ sb $v0, 0xB6($s3)
.L802B650C:
/* E2997C 802B650C 8E620000 */ lw $v0, 0x0($s3)
glabel .L802B6510
/* E29980 802B6510 3C030080 */ lui $v1, (0x800000 >> 16)
/* E29984 802B6514 3C01802B */ lui $at, %hi(D_802B6EF0)
/* E29988 802B6518 E4206EF0 */ swc1 $f0, %lo(D_802B6EF0)($at)
.L802B651C:
/* E2998C 802B651C 00431025 */ or $v0, $v0, $v1
.L802B6520:
/* E29990 802B6520 AE620000 */ sw $v0, 0x0($s3)
.L802B6524:
/* E29994 802B6524 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* E29998 802B6528 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* E2999C 802B652C 8C420010 */ lw $v0, 0x10($v0)
.L802B6530:
/* E299A0 802B6530 30422000 */ andi $v0, $v0, 0x2000
.L802B6534:
/* E299A4 802B6534 10400088 */ beqz $v0, .L802B6758
/* E299A8 802B6538 00000000 */ nop
/* E299AC 802B653C 8E620004 */ lw $v0, 0x4($s3)
/* E299B0 802B6540 30420003 */ andi $v0, $v0, 0x3
glabel .L802B6544
/* E299B4 802B6544 14400084 */ bnez $v0, .L802B6758
glabel .L802B6548
/* E299B8 802B6548 3C040001 */ lui $a0, (0x10007 >> 16)
/* E299BC 802B654C 0C037FDE */ jal suggest_player_anim_always_forward
glabel func_802B6550
/* E299C0 802B6550 34840007 */ ori $a0, $a0, (0x10007 & 0xFFFF)
.L802B6554:
/* E299C4 802B6554 3C04802B */ lui $a0, %hi(SpinningFlower_EntityIndex)
/* E299C8 802B6558 8C846ED0 */ lw $a0, %lo(SpinningFlower_EntityIndex)($a0)
/* E299CC 802B655C 24020003 */ addiu $v0, $zero, 0x3
/* E299D0 802B6560 A26200B6 */ sb $v0, 0xB6($s3)
/* E299D4 802B6564 2402001E */ addiu $v0, $zero, 0x1E
glabel .L802B6568
/* E299D8 802B6568 A6620008 */ sh $v0, 0x8($s3)
.L802B656C:
/* E299DC 802B656C 2402FFFF */ addiu $v0, $zero, -0x1
.L802B6570:
/* E299E0 802B6570 3C01802B */ lui $at, %hi(D_802B6EE0)
.L802B6574:
/* E299E4 802B6574 AC206EE0 */ sw $zero, %lo(D_802B6EE0)($at)
/* E299E8 802B6578 3C018016 */ lui $at, %hi(gCollisionStatus + 0x2)
/* E299EC 802B657C A422A552 */ sh $v0, %lo(gCollisionStatus + 0x2)($at)
.L802B6580:
/* E299F0 802B6580 0C04417A */ jal get_entity_by_index
/* E299F4 802B6584 00000000 */ nop
/* E299F8 802B6588 0C043F5A */ jal exec_entity_commandlist
glabel .L802B658C
/* E299FC 802B658C 0040202D */ daddu $a0, $v0, $zero
.L802B6590:
/* E29A00 802B6590 080AD9D6 */ j .L802B6758
glabel .L802B6594
/* E29A04 802B6594 00000000 */ nop
.L802B6598:
/* E29A08 802B6598 3C04802B */ lui $a0, %hi(D_802B6EE4)
.L802B659C:
/* E29A0C 802B659C 24846EE4 */ addiu $a0, $a0, %lo(D_802B6EE4)
/* E29A10 802B65A0 3C11800A */ lui $s1, %hi(gOverrideFlags)
glabel .L802B65A4
/* E29A14 802B65A4 2631A650 */ addiu $s1, $s1, %lo(gOverrideFlags)
.L802B65A8:
/* E29A18 802B65A8 C4800000 */ lwc1 $f0, 0x0($a0)
/* E29A1C 802B65AC 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* E29A20 802B65B0 44811000 */ mtc1 $at, $f2
glabel .L802B65B4
/* E29A24 802B65B4 8E220000 */ lw $v0, 0x0($s1)
.L802B65B8:
/* E29A28 802B65B8 46020001 */ sub.s $f0, $f0, $f2
/* E29A2C 802B65BC 44801000 */ mtc1 $zero, $f2
glabel .L802B65C0
/* E29A30 802B65C0 34420040 */ ori $v0, $v0, 0x40
/* E29A34 802B65C4 AE220000 */ sw $v0, 0x0($s1)
/* E29A38 802B65C8 4602003C */ c.lt.s $f0, $f2
glabel .L802B65CC
/* E29A3C 802B65CC 00000000 */ nop
.L802B65D0:
/* E29A40 802B65D0 45000007 */ bc1f .L802B65F0
/* E29A44 802B65D4 E4800000 */ swc1 $f0, 0x0($a0)
/* E29A48 802B65D8 3C03FFEF */ lui $v1, (0xFFEFFFFF >> 16)
.L802B65DC:
/* E29A4C 802B65DC 8E620000 */ lw $v0, 0x0($s3)
.L802B65E0:
/* E29A50 802B65E0 3463FFFF */ ori $v1, $v1, (0xFFEFFFFF & 0xFFFF)
.L802B65E4:
/* E29A54 802B65E4 E4820000 */ swc1 $f2, 0x0($a0)
glabel action_update_walk_peach
/* E29A58 802B65E8 00431024 */ and $v0, $v0, $v1
.L802B65EC:
/* E29A5C 802B65EC AE620000 */ sw $v0, 0x0($s3)
.L802B65F0:
/* E29A60 802B65F0 C66000A8 */ lwc1 $f0, 0xA8($s3)
/* E29A64 802B65F4 C48C0000 */ lwc1 $f12, 0x0($a0)
glabel func_802B65F8_E26D08
/* E29A68 802B65F8 0C00A6C9 */ jal clamp_angle
/* E29A6C 802B65FC 460C0300 */ add.s $f12, $f0, $f12
/* E29A70 802B6600 3C01802B */ lui $at, %hi(SpinningFlower_AngleToCenter)
.L802B6604:
/* E29A74 802B6604 C42C6EEC */ lwc1 $f12, %lo(SpinningFlower_AngleToCenter)($at)
/* E29A78 802B6608 3C014270 */ lui $at, (0x42700000 >> 16)
glabel .L802B660C
/* E29A7C 802B660C 44811000 */ mtc1 $at, $f2
/* E29A80 802B6610 00000000 */ nop
/* E29A84 802B6614 46026301 */ sub.s $f12, $f12, $f2
/* E29A88 802B6618 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
glabel .L802B661C
/* E29A8C 802B661C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
.L802B6620:
/* E29A90 802B6620 44811000 */ mtc1 $at, $f2
/* E29A94 802B6624 00000000 */ nop
.L802B6628:
/* E29A98 802B6628 46026302 */ mul.s $f12, $f12, $f2
/* E29A9C 802B662C 00000000 */ nop
.L802B6630:
/* E29AA0 802B6630 27A50010 */ addiu $a1, $sp, 0x10
glabel .L802B6634
/* E29AA4 802B6634 3C0143B4 */ lui $at, (0x43B40000 >> 16)
glabel action_update_talk
/* E29AA8 802B6638 44811000 */ mtc1 $at, $f2
/* E29AAC 802B663C 27A60014 */ addiu $a2, $sp, 0x14
/* E29AB0 802B6640 E66000A8 */ swc1 $f0, 0xA8($s3)
glabel .L802B6644
/* E29AB4 802B6644 0C00A82D */ jal sin_cos_rad
glabel func_802B6648_E27428
/* E29AB8 802B6648 46026303 */ div.s $f12, $f12, $f2
.L802B664C:
/* E29ABC 802B664C 3C02802B */ lui $v0, %hi(D_802B6EDC)
.L802B6650:
/* E29AC0 802B6650 24426EDC */ addiu $v0, $v0, %lo(D_802B6EDC)
glabel .L802B6654
/* E29AC4 802B6654 C4400000 */ lwc1 $f0, 0x0($v0)
/* E29AC8 802B6658 3C01802B */ lui $at, %hi(D_802B6E98_E2A308)
/* E29ACC 802B665C D4226E98 */ ldc1 $f2, %lo(D_802B6E98_E2A308)($at)
glabel .L802B6660
/* E29AD0 802B6660 46000021 */ cvt.d.s $f0, $f0
/* E29AD4 802B6664 46220000 */ add.d $f0, $f0, $f2
/* E29AD8 802B6668 C7A80010 */ lwc1 $f8, 0x10($sp)
glabel .L802B666C
/* E29ADC 802B666C 46200020 */ cvt.s.d $f0, $f0
glabel .L802B6670
/* E29AE0 802B6670 46004202 */ mul.s $f8, $f8, $f0
glabel .L802B6674
/* E29AE4 802B6674 00000000 */ nop
.L802B6678:
/* E29AE8 802B6678 3C10802B */ lui $s0, %hi(D_802B6EF0)
/* E29AEC 802B667C 26106EF0 */ addiu $s0, $s0, %lo(D_802B6EF0)
glabel .L802B6680
/* E29AF0 802B6680 C6020000 */ lwc1 $f2, 0x0($s0)
/* E29AF4 802B6684 3C01802B */ lui $at, %hi(D_802B6EA0_E2A310)
/* E29AF8 802B6688 D4246EA0 */ ldc1 $f4, %lo(D_802B6EA0_E2A310)($at)
glabel func_802B668C
/* E29AFC 802B668C 460010A1 */ cvt.d.s $f2, $f2
jtbl_802B6690:
/* E29B00 802B6690 46241081 */ sub.d $f2, $f2, $f4
/* E29B04 802B6694 C7A40014 */ lwc1 $f4, 0x14($sp)
.L802B6698:
/* E29B08 802B6698 46002107 */ neg.s $f4, $f4
/* E29B0C 802B669C 46002102 */ mul.s $f4, $f4, $f0
/* E29B10 802B66A0 00000000 */ nop
.L802B66A4:
/* E29B14 802B66A4 E4400000 */ swc1 $f0, 0x0($v0)
glabel func_802B66A8
/* E29B18 802B66A8 C6600028 */ lwc1 $f0, 0x28($s3)
/* E29B1C 802B66AC C6660030 */ lwc1 $f6, 0x30($s3)
.L802B66B0:
/* E29B20 802B66B0 46080000 */ add.s $f0, $f0, $f8
.L802B66B4:
/* E29B24 802B66B4 462010A0 */ cvt.s.d $f2, $f2
/* E29B28 802B66B8 E6020000 */ swc1 $f2, 0x0($s0)
glabel .L802B66BC
/* E29B2C 802B66BC 46043180 */ add.s $f6, $f6, $f4
glabel .L802B66C0
/* E29B30 802B66C0 3C01802B */ lui $at, %hi(D_802B6ED4)
/* E29B34 802B66C4 E4286ED4 */ swc1 $f8, %lo(D_802B6ED4)($at)
/* E29B38 802B66C8 3C01802B */ lui $at, %hi(D_802B6ED8)
/* E29B3C 802B66CC E4246ED8 */ swc1 $f4, %lo(D_802B6ED8)($at)
/* E29B40 802B66D0 E6600028 */ swc1 $f0, 0x28($s3)
/* E29B44 802B66D4 0C0392EE */ jal collision_lava_reset_check_additional_overlaps
/* E29B48 802B66D8 E6660030 */ swc1 $f6, 0x30($s3)
.L802B66DC:
/* E29B4C 802B66DC C60C0000 */ lwc1 $f12, 0x0($s0)
.L802B66E0:
/* E29B50 802B66E0 0C038D45 */ jal player_check_collision_below
/* E29B54 802B66E4 27A50020 */ addiu $a1, $sp, 0x20
/* E29B58 802B66E8 E660002C */ swc1 $f0, 0x2C($s3)
/* E29B5C 802B66EC C6600028 */ lwc1 $f0, 0x28($s3)
.L802B66F0:
/* E29B60 802B66F0 C662002C */ lwc1 $f2, 0x2C($s3)
.L802B66F4:
/* E29B64 802B66F4 C6640030 */ lwc1 $f4, 0x30($s3)
/* E29B68 802B66F8 8FA30020 */ lw $v1, 0x20($sp)
/* E29B6C 802B66FC 3C02800B */ lui $v0, %hi(gCameras)
/* E29B70 802B6700 24421D80 */ addiu $v0, $v0, %lo(gCameras)
/* E29B74 802B6704 E4400060 */ swc1 $f0, 0x60($v0)
.L802B6708:
/* E29B78 802B6708 E4420064 */ swc1 $f2, 0x64($v0)
/* E29B7C 802B670C 04600012 */ bltz $v1, .L802B6758
.L802B6710:
/* E29B80 802B6710 E4440068 */ swc1 $f4, 0x68($v0)
/* E29B84 802B6714 3C03FFEF */ lui $v1, (0xFFEFFFFF >> 16)
D_802B6718_E274F8:
/* E29B88 802B6718 8E620000 */ lw $v0, 0x0($s3)
.L802B671C:
/* E29B8C 802B671C 3463FFFF */ ori $v1, $v1, (0xFFEFFFFF & 0xFFFF)
D_802B6720_E27500:
/* E29B90 802B6720 00431024 */ and $v0, $v0, $v1
/* E29B94 802B6724 0C038069 */ jal enable_player_input
D_802B6728_E27508:
/* E29B98 802B6728 AE620000 */ sw $v0, 0x0($s3)
.L802B672C:
/* E29B9C 802B672C 0C038050 */ jal enable_player_static_collisions
D_802B6730:
/* E29BA0 802B6730 00000000 */ nop
/* E29BA4 802B6734 0C039769 */ jal set_action_state
glabel func_802B6738
/* E29BA8 802B6738 2404000A */ addiu $a0, $zero, 0xA
/* E29BAC 802B673C 0C03BCCA */ jal enable_partner_ai
.L802B6740:
/* E29BB0 802B6740 00000000 */ nop
.L802B6744:
/* E29BB4 802B6744 8E220000 */ lw $v0, 0x0($s1)
/* E29BB8 802B6748 2403FFBF */ addiu $v1, $zero, -0x41
.L802B674C:
/* E29BBC 802B674C 00431024 */ and $v0, $v0, $v1
.L802B6750:
/* E29BC0 802B6750 080ADB96 */ j .L802B6E58
/* E29BC4 802B6754 AE220000 */ sw $v0, 0x0($s1)
.L802B6758:
/* E29BC8 802B6758 926200B6 */ lbu $v0, 0xB6($s3)
/* E29BCC 802B675C 2442FFFD */ addiu $v0, $v0, -0x3
D_802B6760_E29190:
/* E29BD0 802B6760 00021600 */ sll $v0, $v0, 24
.L802B6764:
/* E29BD4 802B6764 00021E03 */ sra $v1, $v0, 24
D_802B6768_E29198:
/* E29BD8 802B6768 2C620009 */ sltiu $v0, $v1, 0x9
/* E29BDC 802B676C 104001BA */ beqz $v0, .L802B6E58
D_802B6770_E27C80:
/* E29BE0 802B6770 00031080 */ sll $v0, $v1, 2
/* E29BE4 802B6774 3C01802B */ lui $at, %hi(jtbl_802B6EA8)
.L802B6778:
/* E29BE8 802B6778 00220821 */ addu $at, $at, $v0
.L802B677C:
/* E29BEC 802B677C 8C226EA8 */ lw $v0, %lo(jtbl_802B6EA8)($at)
D_802B6780:
/* E29BF0 802B6780 00400008 */ jr $v0
D_802B6784:
/* E29BF4 802B6784 00000000 */ nop
glabel D_802B6788
/* E29BF8 802B6788 3C04802B */ lui $a0, %hi(SpinningFlower_EntityIndex)
.L802B678C:
/* E29BFC 802B678C 8C846ED0 */ lw $a0, %lo(SpinningFlower_EntityIndex)($a0)
D_802B6790:
/* E29C00 802B6790 0480004D */ bltz $a0, .L802B68C8
D_802B6794:
/* E29C04 802B6794 00000000 */ nop
D_802B6798:
/* E29C08 802B6798 0C04417A */ jal get_entity_by_index
D_802B679C:
/* E29C0C 802B679C 00000000 */ nop
/* E29C10 802B67A0 0040902D */ daddu $s2, $v0, $zero
.L802B67A4:
/* E29C14 802B67A4 C44C0048 */ lwc1 $f12, 0x48($v0)
/* E29C18 802B67A8 C64E0050 */ lwc1 $f14, 0x50($s2)
/* E29C1C 802B67AC 8E660028 */ lw $a2, 0x28($s3)
.L802B67B0:
/* E29C20 802B67B0 0C00A7B5 */ jal dist2D
.L802B67B4:
/* E29C24 802B67B4 8E670030 */ lw $a3, 0x30($s3)
/* E29C28 802B67B8 C64C0048 */ lwc1 $f12, 0x48($s2)
glabel .L802B67BC
/* E29C2C 802B67BC C64E0050 */ lwc1 $f14, 0x50($s2)
.L802B67C0:
/* E29C30 802B67C0 8E660028 */ lw $a2, 0x28($s3)
.L802B67C4:
/* E29C34 802B67C4 8E670030 */ lw $a3, 0x30($s3)
/* E29C38 802B67C8 0C00A720 */ jal atan2
/* E29C3C 802B67CC 46000606 */ mov.s $f24, $f0
/* E29C40 802B67D0 46000306 */ mov.s $f12, $f0
/* E29C44 802B67D4 3C014080 */ lui $at, (0x40800000 >> 16)
.L802B67D8:
/* E29C48 802B67D8 44810000 */ mtc1 $at, $f0
/* E29C4C 802B67DC 3C14802B */ lui $s4, %hi(SpinningFlower_AngleToCenter)
/* E29C50 802B67E0 26946EEC */ addiu $s4, $s4, %lo(SpinningFlower_AngleToCenter)
.L802B67E4:
/* E29C54 802B67E4 4618003C */ c.lt.s $f0, $f24
.L802B67E8:
/* E29C58 802B67E8 00000000 */ nop
.L802B67EC:
/* E29C5C 802B67EC 45000005 */ bc1f .L802B6804
/* E29C60 802B67F0 E68C0000 */ swc1 $f12, 0x0($s4)
.L802B67F4:
/* E29C64 802B67F4 3C013F80 */ lui $at, (0x3F800000 >> 16)
glabel .L802B67F8
/* E29C68 802B67F8 44810000 */ mtc1 $at, $f0
/* E29C6C 802B67FC 00000000 */ nop
.L802B6800:
/* E29C70 802B6800 4600C601 */ sub.s $f24, $f24, $f0
.L802B6804:
/* E29C74 802B6804 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
glabel .L802B6808
/* E29C78 802B6808 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
.L802B680C:
/* E29C7C 802B680C 4481A000 */ mtc1 $at, $f20
.L802B6810:
/* E29C80 802B6810 27B10010 */ addiu $s1, $sp, 0x10
.L802B6814:
/* E29C84 802B6814 46146302 */ mul.s $f12, $f12, $f20
/* E29C88 802B6818 00000000 */ nop
.L802B681C:
/* E29C8C 802B681C 0220282D */ daddu $a1, $s1, $zero
glabel func_802B6820_E256F0
/* E29C90 802B6820 27B00014 */ addiu $s0, $sp, 0x14
.L802B6824:
/* E29C94 802B6824 3C0143B4 */ lui $at, (0x43B40000 >> 16)
.L802B6828:
/* E29C98 802B6828 4481B000 */ mtc1 $at, $f22
glabel .L802B682C
/* E29C9C 802B682C 0200302D */ daddu $a2, $s0, $zero
/* E29CA0 802B6830 0C00A82D */ jal sin_cos_rad
/* E29CA4 802B6834 46166303 */ div.s $f12, $f12, $f22
/* E29CA8 802B6838 C7A20010 */ lwc1 $f2, 0x10($sp)
/* E29CAC 802B683C 46181082 */ mul.s $f2, $f2, $f24
/* E29CB0 802B6840 00000000 */ nop
/* E29CB4 802B6844 C7A40014 */ lwc1 $f4, 0x14($sp)
/* E29CB8 802B6848 46182102 */ mul.s $f4, $f4, $f24
/* E29CBC 802B684C 00000000 */ nop
jtbl_802B6850:
/* E29CC0 802B6850 C68C0000 */ lwc1 $f12, 0x0($s4)
.L802B6854:
/* E29CC4 802B6854 3C0142B6 */ lui $at, (0x42B60000 >> 16)
.L802B6858:
/* E29CC8 802B6858 44810000 */ mtc1 $at, $f0
/* E29CCC 802B685C 00000000 */ nop
/* E29CD0 802B6860 46006301 */ sub.s $f12, $f12, $f0
/* E29CD4 802B6864 C6400048 */ lwc1 $f0, 0x48($s2)
/* E29CD8 802B6868 46020000 */ add.s $f0, $f0, $f2
/* E29CDC 802B686C 46146302 */ mul.s $f12, $f12, $f20
.L802B6870:
/* E29CE0 802B6870 00000000 */ nop
/* E29CE4 802B6874 E6600028 */ swc1 $f0, 0x28($s3)
/* E29CE8 802B6878 C6400050 */ lwc1 $f0, 0x50($s2)
/* E29CEC 802B687C 0220282D */ daddu $a1, $s1, $zero
/* E29CF0 802B6880 46040001 */ sub.s $f0, $f0, $f4
/* E29CF4 802B6884 0200302D */ daddu $a2, $s0, $zero
/* E29CF8 802B6888 46166303 */ div.s $f12, $f12, $f22
/* E29CFC 802B688C 0C00A82D */ jal sin_cos_rad
/* E29D00 802B6890 E6600030 */ swc1 $f0, 0x30($s3)
/* E29D04 802B6894 C7A20010 */ lwc1 $f2, 0x10($sp)
/* E29D08 802B6898 3C01802B */ lui $at, %hi(D_802B6EDC)
/* E29D0C 802B689C C4246EDC */ lwc1 $f4, %lo(D_802B6EDC)($at)
.L802B68A0:
/* E29D10 802B68A0 46041082 */ mul.s $f2, $f2, $f4
/* E29D14 802B68A4 00000000 */ nop
/* E29D18 802B68A8 C7A00014 */ lwc1 $f0, 0x14($sp)
/* E29D1C 802B68AC 46000007 */ neg.s $f0, $f0
D_802B68B0:
/* E29D20 802B68B0 46040002 */ mul.s $f0, $f0, $f4
D_802B68B4:
/* E29D24 802B68B4 00000000 */ nop
.L802B68B8:
/* E29D28 802B68B8 3C01802B */ lui $at, %hi(D_802B6ED4)
D_802B68BC:
/* E29D2C 802B68BC E4226ED4 */ swc1 $f2, %lo(D_802B6ED4)($at)
.L802B68C0:
/* E29D30 802B68C0 3C01802B */ lui $at, %hi(D_802B6ED8)
/* E29D34 802B68C4 E4206ED8 */ swc1 $f0, %lo(D_802B6ED8)($at)
.L802B68C8:
/* E29D38 802B68C8 3C02802B */ lui $v0, %hi(D_802B6EE8)
/* E29D3C 802B68CC 24426EE8 */ addiu $v0, $v0, %lo(D_802B6EE8)
/* E29D40 802B68D0 C44C0000 */ lwc1 $f12, 0x0($v0)
/* E29D44 802B68D4 3C014100 */ lui $at, (0x41000000 >> 16)
/* E29D48 802B68D8 44810000 */ mtc1 $at, $f0
/* E29D4C 802B68DC 00000000 */ nop
/* E29D50 802B68E0 46006300 */ add.s $f12, $f12, $f0
/* E29D54 802B68E4 0C00A6C9 */ jal clamp_angle
/* E29D58 802B68E8 E44C0000 */ swc1 $f12, 0x0($v0)
.L802B68EC:
/* E29D5C 802B68EC 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* E29D60 802B68F0 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
.L802B68F4:
/* E29D64 802B68F4 44811000 */ mtc1 $at, $f2
/* E29D68 802B68F8 00000000 */ nop
.L802B68FC:
/* E29D6C 802B68FC 46020002 */ mul.s $f0, $f0, $f2
/* E29D70 802B6900 00000000 */ nop
.L802B6904:
/* E29D74 802B6904 3C0143B4 */ lui $at, (0x43B40000 >> 16)
.L802B6908:
/* E29D78 802B6908 44816000 */ mtc1 $at, $f12
/* E29D7C 802B690C 0C00A85B */ jal sin_rad
WalkPeachAnims:
/* E29D80 802B6910 460C0303 */ div.s $f12, $f0, $f12
/* E29D84 802B6914 3C014080 */ lui $at, (0x40800000 >> 16)
/* E29D88 802B6918 44811000 */ mtc1 $at, $f2
.L802B691C:
/* E29D8C 802B691C 00000000 */ nop
/* E29D90 802B6920 46020002 */ mul.s $f0, $f0, $f2
/* E29D94 802B6924 00000000 */ nop
/* E29D98 802B6928 3C01802B */ lui $at, %hi(D_802B6EF4)
/* E29D9C 802B692C C4226EF4 */ lwc1 $f2, %lo(D_802B6EF4)($at)
/* E29DA0 802B6930 46001080 */ add.s $f2, $f2, $f0
.L802B6934:
/* E29DA4 802B6934 C6600030 */ lwc1 $f0, 0x30($s3)
/* E29DA8 802B6938 E662002C */ swc1 $f2, 0x2C($s3)
/* E29DAC 802B693C C6620028 */ lwc1 $f2, 0x28($s3)
/* E29DB0 802B6940 C664002C */ lwc1 $f4, 0x2C($s3)
/* E29DB4 802B6944 3C02800B */ lui $v0, %hi(gCameras)
.L802B6948:
/* E29DB8 802B6948 24421D80 */ addiu $v0, $v0, %lo(gCameras)
.L802B694C:
/* E29DBC 802B694C E4400068 */ swc1 $f0, 0x68($v0)
.L802B6950:
/* E29DC0 802B6950 E4420060 */ swc1 $f2, 0x60($v0)
/* E29DC4 802B6954 E4440064 */ swc1 $f4, 0x64($v0)
/* E29DC8 802B6958 86620008 */ lh $v0, 0x8($s3)
.L802B695C:
/* E29DCC 802B695C 96640008 */ lhu $a0, 0x8($s3)
.L802B6960:
/* E29DD0 802B6960 10400016 */ beqz $v0, .L802B69BC
/* E29DD4 802B6964 2482FFFF */ addiu $v0, $a0, -0x1
glabel .L802B6968
/* E29DD8 802B6968 3C03802B */ lui $v1, %hi(D_802B6EE4)
.L802B696C:
/* E29DDC 802B696C 24636EE4 */ addiu $v1, $v1, %lo(D_802B6EE4)
/* E29DE0 802B6970 C4600000 */ lwc1 $f0, 0x0($v1)
/* E29DE4 802B6974 3C014000 */ lui $at, (0x40000000 >> 16)
/* E29DE8 802B6978 44811000 */ mtc1 $at, $f2
/* E29DEC 802B697C 00000000 */ nop
/* E29DF0 802B6980 46020000 */ add.s $f0, $f0, $f2
/* E29DF4 802B6984 3C014234 */ lui $at, (0x42340000 >> 16)
/* E29DF8 802B6988 44811000 */ mtc1 $at, $f2
/* E29DFC 802B698C A6620008 */ sh $v0, 0x8($s3)
/* E29E00 802B6990 4600103E */ c.le.s $f2, $f0
/* E29E04 802B6994 00000000 */ nop
/* E29E08 802B6998 45000002 */ bc1f .L802B69A4
/* E29E0C 802B699C E4600000 */ swc1 $f0, 0x0($v1)
D_802B69A0_E26700:
/* E29E10 802B69A0 E4620000 */ swc1 $f2, 0x0($v1)
glabel .L802B69A4
/* E29E14 802B69A4 C66000A8 */ lwc1 $f0, 0xA8($s3)
D_802B69A8_E26708:
/* E29E18 802B69A8 C46C0000 */ lwc1 $f12, 0x0($v1)
/* E29E1C 802B69AC 0C00A6C9 */ jal clamp_angle
/* E29E20 802B69B0 460C0300 */ add.s $f12, $f0, $f12
glabel .L802B69B4
/* E29E24 802B69B4 080ADB96 */ j .L802B6E58
/* E29E28 802B69B8 E66000A8 */ swc1 $f0, 0xA8($s3)
.L802B69BC:
/* E29E2C 802B69BC 926200B6 */ lbu $v0, 0xB6($s3)
/* E29E30 802B69C0 2403001E */ addiu $v1, $zero, 0x1E
/* E29E34 802B69C4 A6630008 */ sh $v1, 0x8($s3)
glabel .L802B69C8
/* E29E38 802B69C8 24420001 */ addiu $v0, $v0, 0x1
/* E29E3C 802B69CC 0C03954C */ jal phys_adjust_cam_on_landing
/* E29E40 802B69D0 A26200B6 */ sb $v0, 0xB6($s3)
/* E29E44 802B69D4 080ADB96 */ j .L802B6E58
.L802B69D8:
/* E29E48 802B69D8 00000000 */ nop
glabel .L802B69DC
/* E29E4C 802B69DC 3C02802B */ lui $v0, %hi(D_802B6EE4)
.L802B69E0:
/* E29E50 802B69E0 24426EE4 */ addiu $v0, $v0, %lo(D_802B6EE4)
/* E29E54 802B69E4 C4400000 */ lwc1 $f0, 0x0($v0)
.L802B69E8:
/* E29E58 802B69E8 3C014000 */ lui $at, (0x40000000 >> 16)
/* E29E5C 802B69EC 4481B000 */ mtc1 $at, $f22
glabel .L802B69F0
/* E29E60 802B69F0 00000000 */ nop
/* E29E64 802B69F4 46160000 */ add.s $f0, $f0, $f22
/* E29E68 802B69F8 3C014234 */ lui $at, (0x42340000 >> 16)
/* E29E6C 802B69FC 4481A000 */ mtc1 $at, $f20
/* E29E70 802B6A00 00000000 */ nop
/* E29E74 802B6A04 4600A03E */ c.le.s $f20, $f0
/* E29E78 802B6A08 00000000 */ nop
/* E29E7C 802B6A0C 45000002 */ bc1f .L802B6A18
/* E29E80 802B6A10 E4400000 */ swc1 $f0, 0x0($v0)
/* E29E84 802B6A14 E4540000 */ swc1 $f20, 0x0($v0)
.L802B6A18:
/* E29E88 802B6A18 C66000A8 */ lwc1 $f0, 0xA8($s3)
/* E29E8C 802B6A1C C44C0000 */ lwc1 $f12, 0x0($v0)
/* E29E90 802B6A20 0C00A6C9 */ jal clamp_angle
/* E29E94 802B6A24 460C0300 */ add.s $f12, $f0, $f12
/* E29E98 802B6A28 3C02802B */ lui $v0, %hi(D_802B6EE0)
/* E29E9C 802B6A2C 24426EE0 */ addiu $v0, $v0, %lo(D_802B6EE0)
/* E29EA0 802B6A30 C4420000 */ lwc1 $f2, 0x0($v0)
/* E29EA4 802B6A34 46161080 */ add.s $f2, $f2, $f22
/* E29EA8 802B6A38 E66000A8 */ swc1 $f0, 0xA8($s3)
/* E29EAC 802B6A3C 4602A03C */ c.lt.s $f20, $f2
/* E29EB0 802B6A40 00000000 */ nop
/* E29EB4 802B6A44 45000002 */ bc1f .L802B6A50
/* E29EB8 802B6A48 E4420000 */ swc1 $f2, 0x0($v0)
/* E29EBC 802B6A4C E4540000 */ swc1 $f20, 0x0($v0)
.L802B6A50:
/* E29EC0 802B6A50 C44C0000 */ lwc1 $f12, 0x0($v0)
/* E29EC4 802B6A54 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* E29EC8 802B6A58 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* E29ECC 802B6A5C 4481A000 */ mtc1 $at, $f20
/* E29ED0 802B6A60 00000000 */ nop
/* E29ED4 802B6A64 46146302 */ mul.s $f12, $f12, $f20
/* E29ED8 802B6A68 00000000 */ nop
/* E29EDC 802B6A6C 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* E29EE0 802B6A70 4481B000 */ mtc1 $at, $f22
/* E29EE4 802B6A74 0C00A85B */ jal sin_rad
/* E29EE8 802B6A78 46166303 */ div.s $f12, $f12, $f22
.L802B6A7C:
/* E29EEC 802B6A7C 3C10802C */ lui $s0, %hi(D_802BCE34)
/* E29EF0 802B6A80 2610CE34 */ addiu $s0, $s0, %lo(D_802BCE34)
/* E29EF4 802B6A84 3C11802C */ lui $s1, %hi(D_802BCE32)
/* E29EF8 802B6A88 2631CE32 */ addiu $s1, $s1, %lo(D_802BCE32)
.L802B6A8C:
/* E29EFC 802B6A8C 3C014080 */ lui $at, (0x40800000 >> 16)
/* E29F00 802B6A90 44811000 */ mtc1 $at, $f2
/* E29F04 802B6A94 8E660028 */ lw $a2, 0x28($s3)
/* E29F08 802B6A98 8E670030 */ lw $a3, 0x30($s3)
.L802B6A9C:
/* E29F0C 802B6A9C 46020182 */ mul.s $f6, $f0, $f2
.L802B6AA0:
/* E29F10 802B6AA0 00000000 */ nop
/* E29F14 802B6AA4 86020000 */ lh $v0, 0x0($s0)
/* E29F18 802B6AA8 86230000 */ lh $v1, 0x0($s1)
/* E29F1C 802B6AAC C660002C */ lwc1 $f0, 0x2C($s3)
/* E29F20 802B6AB0 44826000 */ mtc1 $v0, $f12
/* E29F24 802B6AB4 00000000 */ nop
/* E29F28 802B6AB8 46806320 */ cvt.s.w $f12, $f12
.L802B6ABC:
/* E29F2C 802B6ABC 46060000 */ add.s $f0, $f0, $f6
/* E29F30 802B6AC0 C6620028 */ lwc1 $f2, 0x28($s3)
/* E29F34 802B6AC4 44837000 */ mtc1 $v1, $f14
/* E29F38 802B6AC8 00000000 */ nop
/* E29F3C 802B6ACC 468073A0 */ cvt.s.w $f14, $f14
/* E29F40 802B6AD0 E660002C */ swc1 $f0, 0x2C($s3)
/* E29F44 802B6AD4 46000106 */ mov.s $f4, $f0
.L802B6AD8:
/* E29F48 802B6AD8 C6600030 */ lwc1 $f0, 0x30($s3)
/* E29F4C 802B6ADC 3C02800B */ lui $v0, %hi(gCameras)
/* E29F50 802B6AE0 24421D80 */ addiu $v0, $v0, %lo(gCameras)
/* E29F54 802B6AE4 E4420060 */ swc1 $f2, 0x60($v0)
/* E29F58 802B6AE8 E4440064 */ swc1 $f4, 0x64($v0)
/* E29F5C 802B6AEC 0C00A7B5 */ jal dist2D
/* E29F60 802B6AF0 E4400068 */ swc1 $f0, 0x68($v0)
/* E29F64 802B6AF4 3C014220 */ lui $at, (0x42200000 >> 16)
/* E29F68 802B6AF8 44811000 */ mtc1 $at, $f2
/* E29F6C 802B6AFC 46000605 */ abs.s $f24, $f0
/* E29F70 802B6B00 4618103C */ c.lt.s $f2, $f24
/* E29F74 802B6B04 00000000 */ nop
/* E29F78 802B6B08 45000040 */ bc1f .L802B6C0C
.L802B6B0C:
/* E29F7C 802B6B0C 00000000 */ nop
/* E29F80 802B6B10 3C02802C */ lui $v0, %hi(D_802BCE30)
/* E29F84 802B6B14 8442CE30 */ lh $v0, %lo(D_802BCE30)($v0)
/* E29F88 802B6B18 C662002C */ lwc1 $f2, 0x2C($s3)
/* E29F8C 802B6B1C 2442001E */ addiu $v0, $v0, 0x1E
/* E29F90 802B6B20 44820000 */ mtc1 $v0, $f0
/* E29F94 802B6B24 00000000 */ nop
/* E29F98 802B6B28 46800020 */ cvt.s.w $f0, $f0
/* E29F9C 802B6B2C 4602003C */ c.lt.s $f0, $f2
/* E29FA0 802B6B30 00000000 */ nop
/* E29FA4 802B6B34 450000C8 */ bc1f .L802B6E58
/* E29FA8 802B6B38 00000000 */ nop
/* E29FAC 802B6B3C C66C0028 */ lwc1 $f12, 0x28($s3)
/* E29FB0 802B6B40 86020000 */ lh $v0, 0x0($s0)
/* E29FB4 802B6B44 C66E0030 */ lwc1 $f14, 0x30($s3)
/* E29FB8 802B6B48 86230000 */ lh $v1, 0x0($s1)
/* E29FBC 802B6B4C 44825000 */ mtc1 $v0, $f10
/* E29FC0 802B6B50 00000000 */ nop
/* E29FC4 802B6B54 468052A0 */ cvt.s.w $f10, $f10
/* E29FC8 802B6B58 44065000 */ mfc1 $a2, $f10
/* E29FCC 802B6B5C 44835000 */ mtc1 $v1, $f10
/* E29FD0 802B6B60 00000000 */ nop
.L802B6B64:
/* E29FD4 802B6B64 468052A0 */ cvt.s.w $f10, $f10
/* E29FD8 802B6B68 926200B6 */ lbu $v0, 0xB6($s3)
.L802B6B6C:
/* E29FDC 802B6B6C 44075000 */ mfc1 $a3, $f10
/* E29FE0 802B6B70 24420001 */ addiu $v0, $v0, 0x1
/* E29FE4 802B6B74 0C00A720 */ jal atan2
/* E29FE8 802B6B78 A26200B6 */ sb $v0, 0xB6($s3)
.L802B6B7C:
/* E29FEC 802B6B7C 46140302 */ mul.s $f12, $f0, $f20
/* E29FF0 802B6B80 00000000 */ nop
/* E29FF4 802B6B84 27A50010 */ addiu $a1, $sp, 0x10
/* E29FF8 802B6B88 27A60014 */ addiu $a2, $sp, 0x14
/* E29FFC 802B6B8C E7A00018 */ swc1 $f0, 0x18($sp)
/* E2A000 802B6B90 0C00A82D */ jal sin_cos_rad
/* E2A004 802B6B94 46166303 */ div.s $f12, $f12, $f22
/* E2A008 802B6B98 C7A20010 */ lwc1 $f2, 0x10($sp)
/* E2A00C 802B6B9C 46181082 */ mul.s $f2, $f2, $f24
/* E2A010 802B6BA0 00000000 */ nop
/* E2A014 802B6BA4 3C013F90 */ lui $at, (0x3F900000 >> 16)
/* E2A018 802B6BA8 44812800 */ mtc1 $at, $f5
.L802B6BAC:
/* E2A01C 802B6BAC 44802000 */ mtc1 $zero, $f4
/* E2A020 802B6BB0 460010A1 */ cvt.d.s $f2, $f2
/* E2A024 802B6BB4 46241082 */ mul.d $f2, $f2, $f4
.L802B6BB8:
/* E2A028 802B6BB8 00000000 */ nop
/* E2A02C 802B6BBC C7A00014 */ lwc1 $f0, 0x14($sp)
/* E2A030 802B6BC0 46000007 */ neg.s $f0, $f0
/* E2A034 802B6BC4 46180002 */ mul.s $f0, $f0, $f24
/* E2A038 802B6BC8 00000000 */ nop
/* E2A03C 802B6BCC 46000021 */ cvt.d.s $f0, $f0
/* E2A040 802B6BD0 46240002 */ mul.d $f0, $f0, $f4
/* E2A044 802B6BD4 00000000 */ nop
/* E2A048 802B6BD8 C7A40018 */ lwc1 $f4, 0x18($sp)
/* E2A04C 802B6BDC 24020040 */ addiu $v0, $zero, 0x40
/* E2A050 802B6BE0 A6620008 */ sh $v0, 0x8($s3)
/* E2A054 802B6BE4 3C01802B */ lui $at, %hi(SpinningFlower_AngleToCenter)
/* E2A058 802B6BE8 E4246EEC */ swc1 $f4, %lo(SpinningFlower_AngleToCenter)($at)
/* E2A05C 802B6BEC 462010A0 */ cvt.s.d $f2, $f2
/* E2A060 802B6BF0 46200020 */ cvt.s.d $f0, $f0
/* E2A064 802B6BF4 3C01802B */ lui $at, %hi(D_802B6ED4)
.L802B6BF8:
/* E2A068 802B6BF8 E4226ED4 */ swc1 $f2, %lo(D_802B6ED4)($at)
/* E2A06C 802B6BFC 3C01802B */ lui $at, %hi(D_802B6ED8)
/* E2A070 802B6C00 E4206ED8 */ swc1 $f0, %lo(D_802B6ED8)($at)
/* E2A074 802B6C04 080ADB96 */ j .L802B6E58
.L802B6C08:
/* E2A078 802B6C08 00000000 */ nop
.L802B6C0C:
/* E2A07C 802B6C0C 86620008 */ lh $v0, 0x8($s3)
/* E2A080 802B6C10 96630008 */ lhu $v1, 0x8($s3)
/* E2A084 802B6C14 1440007A */ bnez $v0, .L802B6E00
/* E2A088 802B6C18 2462FFFF */ addiu $v0, $v1, -0x1
/* E2A08C 802B6C1C 2402000A */ addiu $v0, $zero, 0xA
/* E2A090 802B6C20 A26200B6 */ sb $v0, 0xB6($s3)
/* E2A094 802B6C24 24020014 */ addiu $v0, $zero, 0x14
/* E2A098 802B6C28 080ADB96 */ j .L802B6E58
/* E2A09C 802B6C2C A6620008 */ sh $v0, 0x8($s3)
glabel .L802B6C30
/* E2A0A0 802B6C30 C66000A8 */ lwc1 $f0, 0xA8($s3)
/* E2A0A4 802B6C34 3C01802B */ lui $at, %hi(D_802B6EE4)
/* E2A0A8 802B6C38 C42C6EE4 */ lwc1 $f12, %lo(D_802B6EE4)($at)
/* E2A0AC 802B6C3C 0C00A6C9 */ jal clamp_angle
/* E2A0B0 802B6C40 460C0300 */ add.s $f12, $f0, $f12
/* E2A0B4 802B6C44 86620008 */ lh $v0, 0x8($s3)
/* E2A0B8 802B6C48 96640008 */ lhu $a0, 0x8($s3)
/* E2A0BC 802B6C4C 1040002A */ beqz $v0, .L802B6CF8
/* E2A0C0 802B6C50 E66000A8 */ swc1 $f0, 0xA8($s3)
/* E2A0C4 802B6C54 3C03802B */ lui $v1, %hi(D_802B6EE0)
.L802B6C58:
/* E2A0C8 802B6C58 24636EE0 */ addiu $v1, $v1, %lo(D_802B6EE0)
/* E2A0CC 802B6C5C C4600000 */ lwc1 $f0, 0x0($v1)
/* E2A0D0 802B6C60 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* E2A0D4 802B6C64 44811000 */ mtc1 $at, $f2
/* E2A0D8 802B6C68 46000106 */ mov.s $f4, $f0
/* E2A0DC 802B6C6C 46020001 */ sub.s $f0, $f0, $f2
/* E2A0E0 802B6C70 44801000 */ mtc1 $zero, $f2
/* E2A0E4 802B6C74 2482FFFF */ addiu $v0, $a0, -0x1
/* E2A0E8 802B6C78 A6620008 */ sh $v0, 0x8($s3)
.L802B6C7C:
/* E2A0EC 802B6C7C 4602203C */ c.lt.s $f4, $f2
/* E2A0F0 802B6C80 00000000 */ nop
.L802B6C84:
/* E2A0F4 802B6C84 45000002 */ bc1f .L802B6C90
/* E2A0F8 802B6C88 E4600000 */ swc1 $f0, 0x0($v1)
/* E2A0FC 802B6C8C E4620000 */ swc1 $f2, 0x0($v1)
.L802B6C90:
/* E2A100 802B6C90 C46C0000 */ lwc1 $f12, 0x0($v1)
/* E2A104 802B6C94 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* E2A108 802B6C98 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* E2A10C 802B6C9C 44810000 */ mtc1 $at, $f0
.L802B6CA0:
/* E2A110 802B6CA0 00000000 */ nop
/* E2A114 802B6CA4 46006302 */ mul.s $f12, $f12, $f0
/* E2A118 802B6CA8 00000000 */ nop
/* E2A11C 802B6CAC 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* E2A120 802B6CB0 44810000 */ mtc1 $at, $f0
/* E2A124 802B6CB4 0C00A85B */ jal sin_rad
/* E2A128 802B6CB8 46006303 */ div.s $f12, $f12, $f0
.L802B6CBC:
/* E2A12C 802B6CBC 46000180 */ add.s $f6, $f0, $f0
/* E2A130 802B6CC0 C6640028 */ lwc1 $f4, 0x28($s3)
.L802B6CC4:
/* E2A134 802B6CC4 3C01802B */ lui $at, %hi(D_802B6ED4)
.L802B6CC8:
/* E2A138 802B6CC8 C4206ED4 */ lwc1 $f0, %lo(D_802B6ED4)($at)
/* E2A13C 802B6CCC C6620030 */ lwc1 $f2, 0x30($s3)
/* E2A140 802B6CD0 46002100 */ add.s $f4, $f4, $f0
/* E2A144 802B6CD4 3C01802B */ lui $at, %hi(D_802B6ED8)
/* E2A148 802B6CD8 C4206ED8 */ lwc1 $f0, %lo(D_802B6ED8)($at)
/* E2A14C 802B6CDC 46001080 */ add.s $f2, $f2, $f0
/* E2A150 802B6CE0 C660002C */ lwc1 $f0, 0x2C($s3)
/* E2A154 802B6CE4 46060000 */ add.s $f0, $f0, $f6
.L802B6CE8:
/* E2A158 802B6CE8 E6640028 */ swc1 $f4, 0x28($s3)
/* E2A15C 802B6CEC E6620030 */ swc1 $f2, 0x30($s3)
glabel func_802B6CF0_E2B3A0
/* E2A160 802B6CF0 080ADB40 */ j .L802B6D00
/* E2A164 802B6CF4 E660002C */ swc1 $f0, 0x2C($s3)
.L802B6CF8:
/* E2A168 802B6CF8 2402000B */ addiu $v0, $zero, 0xB
/* E2A16C 802B6CFC A26200B6 */ sb $v0, 0xB6($s3)
.L802B6D00:
/* E2A170 802B6D00 C6600028 */ lwc1 $f0, 0x28($s3)
/* E2A174 802B6D04 C662002C */ lwc1 $f2, 0x2C($s3)
/* E2A178 802B6D08 C6640030 */ lwc1 $f4, 0x30($s3)
/* E2A17C 802B6D0C 3C02800B */ lui $v0, %hi(gCameras)
/* E2A180 802B6D10 24421D80 */ addiu $v0, $v0, %lo(gCameras)
/* E2A184 802B6D14 E4400060 */ swc1 $f0, 0x60($v0)
/* E2A188 802B6D18 E4420064 */ swc1 $f2, 0x64($v0)
.L802B6D1C:
/* E2A18C 802B6D1C 080ADB96 */ j .L802B6E58
/* E2A190 802B6D20 E4440068 */ swc1 $f4, 0x68($v0)
glabel .L802B6D24
/* E2A194 802B6D24 3C02802B */ lui $v0, %hi(D_802B6EE4)
/* E2A198 802B6D28 24426EE4 */ addiu $v0, $v0, %lo(D_802B6EE4)
/* E2A19C 802B6D2C C4400000 */ lwc1 $f0, 0x0($v0)
/* E2A1A0 802B6D30 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* E2A1A4 802B6D34 44811000 */ mtc1 $at, $f2
/* E2A1A8 802B6D38 00000000 */ nop
/* E2A1AC 802B6D3C 46020000 */ add.s $f0, $f0, $f2
/* E2A1B0 802B6D40 3C014234 */ lui $at, (0x42340000 >> 16)
.L802B6D44:
/* E2A1B4 802B6D44 4481A000 */ mtc1 $at, $f20
/* E2A1B8 802B6D48 00000000 */ nop
.L802B6D4C:
/* E2A1BC 802B6D4C 4600A03E */ c.le.s $f20, $f0
.L802B6D50:
/* E2A1C0 802B6D50 00000000 */ nop
/* E2A1C4 802B6D54 45000002 */ bc1f .L802B6D60
/* E2A1C8 802B6D58 E4400000 */ swc1 $f0, 0x0($v0)
/* E2A1CC 802B6D5C E4540000 */ swc1 $f20, 0x0($v0)
.L802B6D60:
/* E2A1D0 802B6D60 C66000A8 */ lwc1 $f0, 0xA8($s3)
.L802B6D64:
/* E2A1D4 802B6D64 C44C0000 */ lwc1 $f12, 0x0($v0)
/* E2A1D8 802B6D68 0C00A6C9 */ jal clamp_angle
/* E2A1DC 802B6D6C 460C0300 */ add.s $f12, $f0, $f12
/* E2A1E0 802B6D70 3C02802B */ lui $v0, %hi(D_802B6EE0)
glabel func_802B6D74
/* E2A1E4 802B6D74 24426EE0 */ addiu $v0, $v0, %lo(D_802B6EE0)
/* E2A1E8 802B6D78 C4420000 */ lwc1 $f2, 0x0($v0)
/* E2A1EC 802B6D7C 3C014000 */ lui $at, (0x40000000 >> 16)
/* E2A1F0 802B6D80 44812000 */ mtc1 $at, $f4
/* E2A1F4 802B6D84 00000000 */ nop
/* E2A1F8 802B6D88 46041080 */ add.s $f2, $f2, $f4
/* E2A1FC 802B6D8C E66000A8 */ swc1 $f0, 0xA8($s3)
jtbl_802B6D90:
/* E2A200 802B6D90 4602A03C */ c.lt.s $f20, $f2
/* E2A204 802B6D94 00000000 */ nop
/* E2A208 802B6D98 45000002 */ bc1f .L802B6DA4
/* E2A20C 802B6D9C E4420000 */ swc1 $f2, 0x0($v0)
/* E2A210 802B6DA0 E4540000 */ swc1 $f20, 0x0($v0)
.L802B6DA4:
/* E2A214 802B6DA4 C44C0000 */ lwc1 $f12, 0x0($v0)
/* E2A218 802B6DA8 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* E2A21C 802B6DAC 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
HammerHit:
/* E2A220 802B6DB0 44810000 */ mtc1 $at, $f0
/* E2A224 802B6DB4 00000000 */ nop
/* E2A228 802B6DB8 46006302 */ mul.s $f12, $f12, $f0
/* E2A22C 802B6DBC 00000000 */ nop
D_802B6DC0_E25C90:
/* E2A230 802B6DC0 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* E2A234 802B6DC4 44810000 */ mtc1 $at, $f0
/* E2A238 802B6DC8 0C00A85B */ jal sin_rad
/* E2A23C 802B6DCC 46006303 */ div.s $f12, $f12, $f0
/* E2A240 802B6DD0 3C014040 */ lui $at, (0x40400000 >> 16)
/* E2A244 802B6DD4 44811000 */ mtc1 $at, $f2
/* E2A248 802B6DD8 00000000 */ nop
/* E2A24C 802B6DDC 46020182 */ mul.s $f6, $f0, $f2
/* E2A250 802B6DE0 00000000 */ nop
/* E2A254 802B6DE4 C660002C */ lwc1 $f0, 0x2C($s3)
/* E2A258 802B6DE8 86620008 */ lh $v0, 0x8($s3)
/* E2A25C 802B6DEC 46060000 */ add.s $f0, $f0, $f6
jtbl_802B6DF0:
/* E2A260 802B6DF0 96630008 */ lhu $v1, 0x8($s3)
/* E2A264 802B6DF4 10400004 */ beqz $v0, .L802B6E08
/* E2A268 802B6DF8 E660002C */ swc1 $f0, 0x2C($s3)
/* E2A26C 802B6DFC 2462FFFF */ addiu $v0, $v1, -0x1
.L802B6E00:
/* E2A270 802B6E00 080ADB96 */ j .L802B6E58
/* E2A274 802B6E04 A6620008 */ sh $v0, 0x8($s3)
glabel .L802B6E08
/* E2A278 802B6E08 0C038050 */ jal enable_player_static_collisions
/* E2A27C 802B6E0C 00000000 */ nop
/* E2A280 802B6E10 0C038069 */ jal enable_player_input
/* E2A284 802B6E14 00000000 */ nop
/* E2A288 802B6E18 3C03FFEF */ lui $v1, (0xFFEFFFFF >> 16)
/* E2A28C 802B6E1C 8E620000 */ lw $v0, 0x0($s3)
/* E2A290 802B6E20 3463FFFF */ ori $v1, $v1, (0xFFEFFFFF & 0xFFFF)
/* E2A294 802B6E24 00431024 */ and $v0, $v0, $v1
/* E2A298 802B6E28 3C030080 */ lui $v1, (0x800000 >> 16)
/* E2A29C 802B6E2C 00431025 */ or $v0, $v0, $v1
/* E2A2A0 802B6E30 0C0397F4 */ jal start_falling
/* E2A2A4 802B6E34 AE620000 */ sw $v0, 0x0($s3)
/* E2A2A8 802B6E38 0C03BCCA */ jal enable_partner_ai
/* E2A2AC 802B6E3C 00000000 */ nop
/* E2A2B0 802B6E40 3C04800A */ lui $a0, %hi(gOverrideFlags)
/* E2A2B4 802B6E44 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags)
/* E2A2B8 802B6E48 8C820000 */ lw $v0, 0x0($a0)
/* E2A2BC 802B6E4C 2403FFBF */ addiu $v1, $zero, -0x41
/* E2A2C0 802B6E50 00431024 */ and $v0, $v0, $v1
/* E2A2C4 802B6E54 AC820000 */ sw $v0, 0x0($a0)
glabel .L802B6E58
/* E2A2C8 802B6E58 8FBF003C */ lw $ra, 0x3C($sp)
/* E2A2CC 802B6E5C 8FB40038 */ lw $s4, 0x38($sp)
D_802B6E60_E2B510:
/* E2A2D0 802B6E60 8FB30034 */ lw $s3, 0x34($sp)
/* E2A2D4 802B6E64 8FB20030 */ lw $s2, 0x30($sp)
D_802B6E68_E2B518:
/* E2A2D8 802B6E68 8FB1002C */ lw $s1, 0x2C($sp)
/* E2A2DC 802B6E6C 8FB00028 */ lw $s0, 0x28($sp)
D_802B6E70_E2B520:
/* E2A2E0 802B6E70 D7BC0060 */ ldc1 $f28, 0x60($sp)
/* E2A2E4 802B6E74 D7BA0058 */ ldc1 $f26, 0x58($sp)
D_802B6E78_E2B528:
/* E2A2E8 802B6E78 D7B80050 */ ldc1 $f24, 0x50($sp)
/* E2A2EC 802B6E7C D7B60048 */ ldc1 $f22, 0x48($sp)
### DECOMPILED C INSTRUCTIONS:
void action_update_use_spinning_flower(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
Entity* entityByIndex;
s32* TempPointer;
s32 entityID;
f32 inputMagnitude;
f32 inputAngle;
f32 dz;
f32 dx;
f32 ascentVelocity;
f32 distToCenter;
s8 switchCondition;
if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
playerStatus->flags &= ~PS_FLAG_ACTION_STATE_CHANGED;
gOverrideFlags |= GLOBAL_OVERRIDES_40;
func_800EF300();
playerStatus->actionSubstate = SUBSTATE_ATTRACT;
playerStatus->currentStateTime = 0;
D_802B6EE4 = 0.0f;
D_802B6EE8 = 0.0f;
D_802B6EF4 = playerStatus->position.y;
D_802B6EDC = 3.0f;
disable_player_static_collisions();
disable_player_input();
playerStatus->flags |= PS_FLAG_ROTATION_LOCKED;
entityID = gCollisionStatus.currentFloor;
TempPointer = &SpinningFlower_EntityIndex;
if (entityID >= 0){
if (!(entityID & COLLISION_WITH_ENTITY_BIT)) {
SpinningFlower_EntityIndex = -1;
} else {
SpinningFlower_EntityIndex = entityID & 0x3FF;
}
} else {
SpinningFlower_EntityIndex = -1;
}
if (!(playerStatus->animFlags & (PA_FLAG_USING_WATT | PA_FLAG_WATT_IN_HANDS))) {
suggest_player_anim_allow_backward(ANIM_Mario1_Flail);
}
}
switch (playerStatus->actionSubstate) {
case SUBSTATE_ATTRACT:
gOverrideFlags |= GLOBAL_OVERRIDES_40;
D_802B6EE4 += 1.0f;
if (D_802B6EE4 >= 20.0f) {
D_802B6EE4 = 20.0f;
}
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle + D_802B6EE4);
if (playerStatus->currentStateTime < 10) {
playerStatus->currentStateTime++;
D_802B6EF4++;
}
D_802B6EE8 += 8.0f;
playerStatus->position.y = D_802B6EF4 + sin_rad(DEG_TO_RAD(clamp_angle(D_802B6EE8))) * 4.0f;
if (SpinningFlower_EntityIndex >= 0) {
entityByIndex = get_entity_by_index(SpinningFlower_EntityIndex);
distToCenter = dist2D(entityByIndex->position.x, entityByIndex->position.z, playerStatus->position.x, playerStatus->position.z);
SpinningFlower_AngleToCenter = atan2(entityByIndex->position.x, entityByIndex->position.z, playerStatus->position.x, playerStatus->position.z);
if (distToCenter > 4.0f) {
distToCenter--;
}
sin_cos_rad(DEG_TO_RAD(SpinningFlower_AngleToCenter), &dx, &dz);
playerStatus->position.x = entityByIndex->position.x + (dx * distToCenter);
playerStatus->position.z = entityByIndex->position.z - (dz * distToCenter);
sin_cos_rad(DEG_TO_RAD(SpinningFlower_AngleToCenter - 91.0f), &dx, &dz);
D_802B6ED4 = dx * D_802B6EDC;
D_802B6ED8 = -dz * D_802B6EDC;
}
game_input_to_move_vector(&inputAngle, &inputMagnitude);
if (inputMagnitude != 0.0f) {
sin_cos_rad(DEG_TO_RAD(inputAngle), &dx, &dz);
inputMagnitude *= 0.03125f;
if (inputMagnitude < 0.1) {
inputMagnitude = 0.1f;
}
playerStatus->position.x += dx * inputMagnitude;
playerStatus->position.z -= dz * inputMagnitude;
}
gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x;
gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y;
gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z;
entityID = get_entity_below_spinning_flower();
if (entityID < 0 || !(entityID & COLLISION_WITH_ENTITY_BIT)) {
playerStatus->currentStateTime = 20;
D_802B6EE8 = 0.0f;
D_802B6EF4 = playerStatus->position.y;
playerStatus->actionSubstate++;
D_802B6EF0 = 1.6f;
playerStatus->flags |= PS_FLAG_SCRIPTED_FALL;
}
if (gGameStatusPtr->pressedButtons[0] & BUTTON_Z &&
!(playerStatus->animFlags & (PA_FLAG_USING_WATT | PA_FLAG_WATT_IN_HANDS))) {
suggest_player_anim_always_forward(ANIM_Mario1_Jump);
playerStatus->actionSubstate = SUBSTATE_SPIN_UP;
playerStatus->currentStateTime = 30;
D_802B6EE0 = 0.0f;
gCollisionStatus.currentFloor = NO_COLLIDER;
exec_entity_commandlist(get_entity_by_index(SpinningFlower_EntityIndex));
}
break;
case SUBSTATE_EJECT:
gOverrideFlags |= GLOBAL_OVERRIDES_40;
if (--D_802B6EE4 < 0.0f) {
D_802B6EE4 = 0.0f;
playerStatus->flags &= ~PS_FLAG_ROTATION_LOCKED;
}
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle + D_802B6EE4);
sin_cos_rad(DEG_TO_RAD(SpinningFlower_AngleToCenter - 60.0f), &dx, &dz);
D_802B6EDC += 0.2;
D_802B6EF0 -= 0.72;
D_802B6ED4 = dx * D_802B6EDC;
D_802B6ED8 = -dz * D_802B6EDC;
playerStatus->position.x += D_802B6ED4;
playerStatus->position.z += D_802B6ED8;
collision_lava_reset_check_additional_overlaps();
playerStatus->position.y = player_check_collision_below(D_802B6EF0, &entityID);
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 (entityID >= 0) {
playerStatus->flags &= ~PS_FLAG_ROTATION_LOCKED;
enable_player_input();
enable_player_static_collisions();
set_action_state(ACTION_STATE_LAND);
enable_partner_ai();
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
return;
}
}
switch (playerStatus->actionSubstate) {
case SUBSTATE_SPIN_UP:
if (SpinningFlower_EntityIndex >= 0) {
entityByIndex = get_entity_by_index(SpinningFlower_EntityIndex);
distToCenter = dist2D(entityByIndex->position.x, entityByIndex->position.z, playerStatus->position.x, playerStatus->position.z);
SpinningFlower_AngleToCenter = atan2(entityByIndex->position.x, entityByIndex->position.z, playerStatus->position.x, playerStatus->position.z);
if (distToCenter > 4.0f) {
distToCenter -= 1.0f;
}
sin_cos_rad(DEG_TO_RAD(SpinningFlower_AngleToCenter), &dx, &dz);
playerStatus->position.x = entityByIndex->position.x + (dx * distToCenter);
playerStatus->position.z = entityByIndex->position.z - (dz * distToCenter);
sin_cos_rad(DEG_TO_RAD(SpinningFlower_AngleToCenter - 91.0f), &dx, &dz);
D_802B6ED4 = dx * D_802B6EDC;
D_802B6ED8 = -dz * D_802B6EDC;
}
D_802B6EE8 += 8.0f;
playerStatus->position.y = D_802B6EF4 + sin_rad(DEG_TO_RAD(clamp_angle(D_802B6EE8))) * 4.0f;
gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z;
gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x;
gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y;
if (playerStatus->currentStateTime != 0) {
playerStatus->currentStateTime--;
D_802B6EE4 += 2.0f;
if (D_802B6EE4 >= 45.0f) {
D_802B6EE4 = 45.0f;
}
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle + D_802B6EE4);
break;
}
playerStatus->actionSubstate++; // SUBSTATE_ASCEND_A
playerStatus->currentStateTime = 30;
phys_adjust_cam_on_landing();
break;
case SUBSTATE_ASCEND_A:
D_802B6EE4 += 2.0f;
if (D_802B6EE4 >= 45.0f) {
D_802B6EE4 = 45.0f;
}
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle + D_802B6EE4);
D_802B6EE0 += 2.0f;
if (D_802B6EE0 > 45.0f) {
D_802B6EE0 = 45.0f;
}
ascentVelocity = sin_rad(DEG_TO_RAD(D_802B6EE0)) * 4.0f;
playerStatus->position.y += ascentVelocity;
gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x;
gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y;
gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z;
distToCenter = fabsf(dist2D(D_802BCE34, D_802BCE32, playerStatus->position.x, playerStatus->position.z));
if (distToCenter > 40.0f) {
if (D_802BCE30 + 30 < playerStatus->position.y) {
playerStatus->actionSubstate++; // SUBSTATE_ASCEND_B
inputAngle = atan2(playerStatus->position.x, playerStatus->position.z, D_802BCE34, D_802BCE32);
sin_cos_rad(DEG_TO_RAD(inputAngle), &dx, &dz);
playerStatus->currentStateTime = 64;
SpinningFlower_AngleToCenter = inputAngle;
D_802B6ED4 = (dx * distToCenter) * 0.015625;
D_802B6ED8 = (-dz * distToCenter) * 0.015625;
}
break;
}
if (playerStatus->currentStateTime == 0) {
playerStatus->actionSubstate = SUBSTATE_BOOST;
playerStatus->currentStateTime = 20;
} else {
playerStatus->currentStateTime--;
}
break;
case SUBSTATE_ASCEND_B:
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle + D_802B6EE4);
if (playerStatus->currentStateTime != 0) {
playerStatus->currentStateTime--;
if (D_802B6EE0-- < 0.0f) {
D_802B6EE0 = 0.0f;
}
ascentVelocity = 2.0f * sin_rad(DEG_TO_RAD(D_802B6EE0));
playerStatus->position.x += D_802B6ED4;
playerStatus->position.y += ascentVelocity;
playerStatus->position.z += D_802B6ED8;
} else {
playerStatus->actionSubstate = SUBSTATE_FINISH;
}
gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x;
gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y;
gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z;
break;
case SUBSTATE_BOOST:
D_802B6EE4 += 1.0f;
if (D_802B6EE4 >= 45.0f) {
D_802B6EE4 = 45.0f;
}
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle + D_802B6EE4);
D_802B6EE0 += 2.0f;
if (D_802B6EE0 > 45.0f) {
D_802B6EE0 = 45.0f;
}
ascentVelocity = sin_rad(DEG_TO_RAD(D_802B6EE0)) * 3.0f;
playerStatus->position.y += ascentVelocity;
if (playerStatus->currentStateTime != 0) {
playerStatus->currentStateTime--;
break;
}
case SUBSTATE_FINISH:
enable_player_static_collisions();
enable_player_input();
playerStatus->flags &= ~PS_FLAG_ROTATION_LOCKED;
playerStatus->flags |= PS_FLAG_SCRIPTED_FALL;
start_falling();
enable_partner_ai();
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_80242024
/* 170904 80242024 27BDFFB0 */ addiu $sp, $sp, -0x50
glabel func_80242028
/* 170908 80242028 AFB30024 */ sw $s3, 0x24($sp)
D_8024202C:
/* 17090C 8024202C 3C13800E */ lui $s3, %hi(gBattleStatus)
D_80242030:
/* 170910 80242030 2673C070 */ addiu $s3, $s3, %lo(gBattleStatus)
glabel dead_flo_14_GetNpcCollisionHeight
/* 170914 80242034 AFB60030 */ sw $s6, 0x30($sp)
glabel dead_flo_16_FlyingAI_Init
/* 170918 80242038 3C168011 */ lui $s6, %hi(gPlayerData)
glabel func_8024203C
/* 17091C 8024203C 26D6F290 */ addiu $s6, $s6, %lo(gPlayerData)
D_80242040:
/* 170920 80242040 AFB20020 */ sw $s2, 0x20($sp)
D_80242044:
/* 170924 80242044 3C12800E */ lui $s2, %hi(gBattleSubState)
glabel func_80242048
/* 170928 80242048 2652C4DC */ addiu $s2, $s2, %lo(gBattleSubState)
glabel func_8024204C
/* 17092C 8024204C AFBF0034 */ sw $ra, 0x34($sp)
glabel func_80242050
/* 170930 80242050 AFB5002C */ sw $s5, 0x2C($sp)
D_80242054:
/* 170934 80242054 AFB40028 */ sw $s4, 0x28($sp)
D_80242058:
/* 170938 80242058 AFB1001C */ sw $s1, 0x1C($sp)
D_8024205C:
/* 17093C 8024205C AFB00018 */ sw $s0, 0x18($sp)
glabel func_80242060
/* 170940 80242060 F7B80048 */ sdc1 $f24, 0x48($sp)
glabel func_80242064
/* 170944 80242064 F7B60040 */ sdc1 $f22, 0x40($sp)
.L80242068:
/* 170948 80242068 F7B40038 */ sdc1 $f20, 0x38($sp)
D_8024206C:
/* 17094C 8024206C 8E7100D8 */ lw $s1, 0xD8($s3)
glabel func_80242070
/* 170950 80242070 8E7000DC */ lw $s0, 0xDC($s3)
glabel func_80242074
/* 170954 80242074 8E420000 */ lw $v0, 0x0($s2)
glabel func_80242078
/* 170958 80242078 14400007 */ bnez $v0, D_80242098
glabel dead_kzn_17_set_script_owner_npc_col_height
/* 17095C 8024207C 8E3401F4 */ lw $s4, 0x1F4($s1)
glabel func_80242080
/* 170960 80242080 0C093903 */ jal func_8024E40C
glabel func_80242084
/* 170964 80242084 24040002 */ addiu $a0, $zero, 0x2
D_80242088:
/* 170968 80242088 0C093936 */ jal D_8024E4D8_C0BD58
.L8024208C:
/* 17096C 8024208C 24040005 */ addiu $a0, $zero, 0x5
glabel func_80242090
/* 170970 80242090 24020064 */ addiu $v0, $zero, 0x64
glabel func_80242094
/* 170974 80242094 AE420000 */ sw $v0, 0x0($s2)
D_80242098:
/* 170978 80242098 8E430000 */ lw $v1, 0x0($s2)
glabel func_8024209C
/* 17097C 8024209C 24150014 */ addiu $s5, $zero, 0x14
D_802420A0:
/* 170980 802420A0 10750039 */ beq $v1, $s5, D_80242188
glabel .L802420A4
/* 170984 802420A4 24020064 */ addiu $v0, $zero, 0x64
.L802420A8:
/* 170988 802420A8 14620041 */ bne $v1, $v0, D_802421B0
glabel .L802420AC
/* 17098C 802420AC 00000000 */ nop
D_802420B0:
/* 170990 802420B0 0C093961 */ jal func_8024E584
glabel func_802420B4
/* 170994 802420B4 00000000 */ nop
.L802420B8:
/* 170998 802420B8 1040003D */ beqz $v0, D_802421B0
D_802420BC:
/* 17099C 802420BC 3C03FFF7 */ lui $v1, (0xFFF7FFFF >> 16)
.L802420C0:
/* 1709A0 802420C0 8E620000 */ lw $v0, 0x0($s3)
glabel func_802420C4
/* 1709A4 802420C4 3463FFFF */ ori $v1, $v1, (0xFFF7FFFF & 0xFFFF)
D_802420C8:
/* 1709A8 802420C8 00431024 */ and $v0, $v0, $v1
glabel .L802420CC
/* 1709AC 802420CC 0C098F18 */ jal reset_actor_turn_info
jtbl_802420D0:
/* 1709B0 802420D0 AE620000 */ sw $v0, 0x0($s3)
glabel func_802420D4
/* 1709B4 802420D4 3C04FEFF */ lui $a0, (0xFEFFFFFF >> 16)
glabel .L802420D8
/* 1709B8 802420D8 2402007F */ addiu $v0, $zero, 0x7F
.L802420DC:
/* 1709BC 802420DC A2620086 */ sb $v0, 0x86($s3)
.L802420E0:
/* 1709C0 802420E0 A2620087 */ sb $v0, 0x87($s3)
glabel func_802420E4
/* 1709C4 802420E4 8E620000 */ lw $v0, 0x0($s3)
glabel func_802420E8
/* 1709C8 802420E8 8E630004 */ lw $v1, 0x4($s3)
glabel func_802420EC
/* 1709CC 802420EC 3484FFFF */ ori $a0, $a0, (0xFEFFFFFF & 0xFFFF)
glabel func_802420F0
/* 1709D0 802420F0 A660017C */ sh $zero, 0x17C($s3)
glabel .L802420F4
/* 1709D4 802420F4 34420008 */ ori $v0, $v0, 0x8
/* 1709D8 802420F8 00641824 */ and $v1, $v1, $a0
glabel dead_kzn_17_TackleAI_Main
/* 1709DC 802420FC AE620000 */ sw $v0, 0x0($s3)
glabel func_80242100
/* 1709E0 80242100 AE630004 */ sw $v1, 0x4($s3)
glabel func_80242104
/* 1709E4 80242104 8E220000 */ lw $v0, 0x0($s1)
.L80242108:
/* 1709E8 80242108 3C030C00 */ lui $v1, (0xC000000 >> 16)
glabel .L8024210C
/* 1709EC 8024210C A220021D */ sb $zero, 0x21D($s1)
D_80242110:
/* 1709F0 80242110 00431025 */ or $v0, $v0, $v1
glabel func_80242114
/* 1709F4 80242114 12000004 */ beqz $s0, .L80242128
D_80242118:
/* 1709F8 80242118 AE220000 */ sw $v0, 0x0($s1)
glabel func_8024211C
/* 1709FC 8024211C 00431025 */ or $v0, $v0, $v1
.L80242120:
/* 170A00 80242120 AE220000 */ sw $v0, 0x0($s1)
glabel func_80242124
/* 170A04 80242124 A200021D */ sb $zero, 0x21D($s0)
glabel .L80242128
/* 170A08 80242128 8262009A */ lb $v0, 0x9A($s3)
D_8024212C:
/* 170A0C 8024212C A260008C */ sb $zero, 0x8C($s3)
.L80242130:
/* 170A10 80242130 3C01802A */ lui $at, %hi(D_8029F254)
D_80242134:
/* 170A14 80242134 AC20F254 */ sw $zero, %lo(D_8029F254)($at)
D_80242138:
/* 170A18 80242138 3C01802A */ lui $at, %hi(D_8029F258)
glabel func_8024213C
/* 170A1C 8024213C AC20F258 */ sw $zero, %lo(D_8029F258)($at)
glabel func_80242140
/* 170A20 80242140 14400004 */ bnez $v0, func_80242154
glabel func_80242144
/* 170A24 80242144 2405000A */ addiu $a1, $zero, 0xA
D_80242148:
/* 170A28 80242148 2402000A */ addiu $v0, $zero, 0xA
.L8024214C:
/* 170A2C 8024214C 0809086C */ j D_802421B0
glabel func_80242150
/* 170A30 80242150 AE420000 */ sw $v0, 0x0($s2)
glabel func_80242154
/* 170A34 80242154 2402000C */ addiu $v0, $zero, 0xC
D_80242158:
/* 170A38 80242158 A26201A7 */ sb $v0, 0x1A7($s3)
glabel dead_flo_16_FlyingAI_Main
/* 170A3C 8024215C 8E0401CC */ lw $a0, 0x1CC($s0)
D_80242160:
/* 170A40 80242160 0C0B0CF8 */ jal start_script
glabel func_80242164
/* 170A44 80242164 0000302D */ daddu $a2, $zero, $zero
.L80242168:
/* 170A48 80242168 0040182D */ daddu $v1, $v0, $zero
glabel func_8024216C
/* 170A4C 8024216C AE0301DC */ sw $v1, 0x1DC($s0)
glabel .L80242170
/* 170A50 80242170 8C620144 */ lw $v0, 0x144($v1)
D_80242174:
/* 170A54 80242174 AE550000 */ sw $s5, 0x0($s2)
glabel func_80242178
/* 170A58 80242178 AE0201EC */ sw $v0, 0x1EC($s0)
D_8024217C:
/* 170A5C 8024217C 24020100 */ addiu $v0, $zero, 0x100
glabel D_80242180
/* 170A60 80242180 0809086C */ j D_802421B0
D_80242184:
/* 170A64 80242184 AC620148 */ sw $v0, 0x148($v1)
D_80242188:
/* 170A68 80242188 8E0401EC */ lw $a0, 0x1EC($s0)
D_8024218C:
/* 170A6C 8024218C 0C0B1059 */ jal does_script_exist
glabel func_80242190
/* 170A70 80242190 00000000 */ nop
glabel .L80242194
/* 170A74 80242194 14400006 */ bnez $v0, D_802421B0
glabel func_80242198
/* 170A78 80242198 2403000A */ addiu $v1, $zero, 0xA
glabel dead_11_set_script_owner_npc_anim
/* 170A7C 8024219C 8E620004 */ lw $v0, 0x4($s3)
D_802421A0:
/* 170A80 802421A0 A260009A */ sb $zero, 0x9A($s3)
flo_24_pad_21A4:
/* 170A84 802421A4 AE430000 */ sw $v1, 0x0($s2)
glabel func_802421A8
/* 170A88 802421A8 34420004 */ ori $v0, $v0, 0x4
glabel .L802421AC
/* 170A8C 802421AC AE620004 */ sw $v0, 0x4($s3)
D_802421B0:
/* 170A90 802421B0 3C12800E */ lui $s2, %hi(gBattleSubState)
.L802421B4:
/* 170A94 802421B4 2652C4DC */ addiu $s2, $s2, %lo(gBattleSubState)
.L802421B8:
/* 170A98 802421B8 8E440000 */ lw $a0, 0x0($s2)
glabel .L802421BC
/* 170A9C 802421BC 24150002 */ addiu $s5, $zero, 0x2
glabel func_802421C0
/* 170AA0 802421C0 10950066 */ beq $a0, $s5, func_8024235C
glabel .L802421C4
/* 170AA4 802421C4 2402000A */ addiu $v0, $zero, 0xA
glabel func_802421C8
/* 170AA8 802421C8 1482006A */ bne $a0, $v0, dead_flo_16_FlyingNoAttackAI_12
glabel func_802421CC
/* 170AAC 802421CC 00000000 */ nop
D_802421D0:
/* 170AB0 802421D0 8262008C */ lb $v0, 0x8C($s3)
D_802421D4:
/* 170AB4 802421D4 14400067 */ bnez $v0, dead_flo_16_FlyingNoAttackAI_12
glabel func_802421D8
/* 170AB8 802421D8 00000000 */ nop
.L802421DC:
/* 170ABC 802421DC 8262009D */ lb $v0, 0x9D($s3)
glabel func_802421E0
/* 170AC0 802421E0 9263009D */ lbu $v1, 0x9D($s3)
glabel func_802421E4
/* 170AC4 802421E4 10400061 */ beqz $v0, dead_flo_13_UnkDistFunc
glabel func_802421E8
/* 170AC8 802421E8 2462FFFF */ addiu $v0, $v1, -0x1
D_802421EC:
/* 170ACC 802421EC 8E63043C */ lw $v1, 0x43C($s3)
glabel func_802421F0
/* 170AD0 802421F0 A262009D */ sb $v0, 0x9D($s3)
glabel func_802421F4
/* 170AD4 802421F4 00021600 */ sll $v0, $v0, 24
D_802421F8:
/* 170AD8 802421F8 8C63000C */ lw $v1, 0xC($v1)
glabel func_802421FC
/* 170ADC 802421FC 00021603 */ sra $v0, $v0, 24
glabel func_80242200
/* 170AE0 80242200 A4620010 */ sh $v0, 0x10($v1)
glabel func_80242204
/* 170AE4 80242204 8262009D */ lb $v0, 0x9D($s3)
glabel D_80242208
/* 170AE8 80242208 1C400059 */ bgtz $v0, D_80242370
D_8024220C:
/* 170AEC 8024220C 2402000B */ addiu $v0, $zero, 0xB
glabel func_80242210
/* 170AF0 80242210 8E6300A0 */ lw $v1, 0xA0($s3)
glabel func_80242214
/* 170AF4 80242214 3C014190 */ lui $at, (0x41900000 >> 16)
glabel dead_11_UnkDistFunc
/* 170AF8 80242218 44811000 */ mtc1 $at, $f2
.L8024221C:
/* 170AFC 8024221C 3C0140A0 */ lui $at, (0x40A00000 >> 16)
D_80242220:
/* 170B00 80242220 4481B000 */ mtc1 $at, $f22
glabel func_80242224
/* 170B04 80242224 8C620000 */ lw $v0, 0x0($v1)
.L80242228:
/* 170B08 80242228 3C013FC0 */ lui $at, (0x3FC00000 >> 16)
glabel func_8024222C
/* 170B0C 8024222C 44810000 */ mtc1 $at, $f0
D_80242230:
/* 170B10 80242230 34420010 */ ori $v0, $v0, 0x10
glabel func_80242234
/* 170B14 80242234 AC620000 */ sw $v0, 0x0($v1)
D_80242238:
/* 170B18 80242238 C6240148 */ lwc1 $f4, 0x148($s1)
D_8024223C:
/* 170B1C 8024223C C626014C */ lwc1 $f6, 0x14C($s1)
D_80242240:
/* 170B20 80242240 46022100 */ add.s $f4, $f4, $f2
glabel func_80242244
/* 170B24 80242244 E7A00010 */ swc1 $f0, 0x10($sp)
D_80242248:
/* 170B28 80242248 AFA40014 */ sw $a0, 0x14($sp)
glabel func_8024224C
/* 170B2C 8024224C 46163180 */ add.s $f6, $f6, $f22
glabel func_80242250
/* 170B30 80242250 8E250144 */ lw $a1, 0x144($s1)
.L80242254:
/* 170B34 80242254 44062000 */ mfc1 $a2, $f4
.L80242258:
/* 170B38 80242258 44073000 */ mfc1 $a3, $f6
/* 170B3C 8024225C 0C01C694 */ jal fx_water_block
glabel func_80242260_EE8810
/* 170B40 80242260 24040001 */ addiu $a0, $zero, 0x1
glabel .L80242264
/* 170B44 80242264 C6220144 */ lwc1 $f2, 0x144($s1)
glabel .L80242268
/* 170B48 80242268 3C014120 */ lui $at, (0x41200000 >> 16)
glabel func_8024226C
/* 170B4C 8024226C 44810000 */ mtc1 $at, $f0
glabel func_80242270
/* 170B50 80242270 00000000 */ nop
glabel mgm_02_CreateMinigame
/* 170B54 80242274 46001081 */ sub.s $f2, $f2, $f0
.L80242278:
/* 170B58 80242278 C6200148 */ lwc1 $f0, 0x148($s1)
glabel func_8024227C
/* 170B5C 8024227C 46160000 */ add.s $f0, $f0, $f22
D_80242280:
/* 170B60 80242280 44060000 */ mfc1 $a2, $f0
.L80242284:
/* 170B64 80242284 C620014C */ lwc1 $f0, 0x14C($s1)
glabel func_80242288
/* 170B68 80242288 0000202D */ daddu $a0, $zero, $zero
glabel func_8024228C
/* 170B6C 8024228C 46160000 */ add.s $f0, $f0, $f22
D_80242290:
/* 170B70 80242290 3C013F80 */ lui $at, (0x3F800000 >> 16)
glabel func_80242294
/* 170B74 80242294 4481A000 */ mtc1 $at, $f20
D_80242298:
/* 170B78 80242298 44051000 */ mfc1 $a1, $f2
.L8024229C:
/* 170B7C 8024229C 44070000 */ mfc1 $a3, $f0
glabel func_802422A0
/* 170B80 802422A0 24100018 */ addiu $s0, $zero, 0x18
.L802422A4:
/* 170B84 802422A4 E7B40010 */ swc1 $f20, 0x10($sp)
glabel func_802422A8
/* 170B88 802422A8 0C01C70C */ jal fx_water_splash
glabel func_802422AC
/* 170B8C 802422AC AFB00014 */ sw $s0, 0x14($sp)
glabel func_802422B0
/* 170B90 802422B0 C6200144 */ lwc1 $f0, 0x144($s1)
glabel dead_flo_14_ItemChoice_SaveSelected
/* 170B94 802422B4 3C014170 */ lui $at, (0x41700000 >> 16)
glabel func_802422B8
/* 170B98 802422B8 4481C000 */ mtc1 $at, $f24
D_802422BC:
/* 170B9C 802422BC 00000000 */ nop
glabel func_802422C0
/* 170BA0 802422C0 46180001 */ sub.s $f0, $f0, $f24
glabel func_802422C4
/* 170BA4 802422C4 C6220148 */ lwc1 $f2, 0x148($s1)
glabel func_802422C8
/* 170BA8 802422C8 44050000 */ mfc1 $a1, $f0
D_802422CC:
/* 170BAC 802422CC 3C014200 */ lui $at, (0x42000000 >> 16)
glabel mgm_02_DestroyMinigame
/* 170BB0 802422D0 44810000 */ mtc1 $at, $f0
D_802422D4:
/* 170BB4 802422D4 00000000 */ nop
glabel func_802422D8
/* 170BB8 802422D8 46001080 */ add.s $f2, $f2, $f0
glabel func_802422DC
/* 170BBC 802422DC C620014C */ lwc1 $f0, 0x14C($s1)
glabel .L802422E0
/* 170BC0 802422E0 46160000 */ add.s $f0, $f0, $f22
glabel func_802422E4
/* 170BC4 802422E4 44061000 */ mfc1 $a2, $f2
glabel .L802422E8
/* 170BC8 802422E8 44070000 */ mfc1 $a3, $f0
glabel func_802422EC_EE889C
/* 170BCC 802422EC 0000202D */ daddu $a0, $zero, $zero
glabel dead_flo_13_set_script_owner_npc_anim
/* 170BD0 802422F0 E7B40010 */ swc1 $f20, 0x10($sp)
glabel func_802422F4
/* 170BD4 802422F4 0C01C70C */ jal fx_water_splash
glabel func_802422F8
/* 170BD8 802422F8 AFB00014 */ sw $s0, 0x14($sp)
glabel func_802422FC
/* 170BDC 802422FC C6200144 */ lwc1 $f0, 0x144($s1)
D_80242300:
/* 170BE0 80242300 46180000 */ add.s $f0, $f0, $f24
.L80242304:
/* 170BE4 80242304 C6220148 */ lwc1 $f2, 0x148($s1)
glabel .L80242308
/* 170BE8 80242308 44050000 */ mfc1 $a1, $f0
D_8024230C:
/* 170BEC 8024230C 3C0141B0 */ lui $at, (0x41B00000 >> 16)
glabel func_80242310
/* 170BF0 80242310 44810000 */ mtc1 $at, $f0
glabel func_80242314
/* 170BF4 80242314 00000000 */ nop
glabel func_80242318
/* 170BF8 80242318 46001080 */ add.s $f2, $f2, $f0
D_8024231C:
/* 170BFC 8024231C C620014C */ lwc1 $f0, 0x14C($s1)
glabel .L80242320
/* 170C00 80242320 46160000 */ add.s $f0, $f0, $f22
glabel .L80242324
/* 170C04 80242324 44061000 */ mfc1 $a2, $f2
glabel func_80242328
/* 170C08 80242328 44070000 */ mfc1 $a3, $f0
glabel func_8024232C
/* 170C0C 8024232C 24040001 */ addiu $a0, $zero, 0x1
glabel D_80242330
/* 170C10 80242330 E7B40010 */ swc1 $f20, 0x10($sp)
glabel .L80242334
/* 170C14 80242334 0C01C70C */ jal fx_water_splash
glabel .L80242338
/* 170C18 80242338 AFB00014 */ sw $s0, 0x14($sp)
glabel func_8024233C
/* 170C1C 8024233C 24040299 */ addiu $a0, $zero, 0x299
glabel mgm_02_TakeCoinCost
/* 170C20 80242340 0C05272D */ jal sfx_play_sound
glabel D_80242344
/* 170C24 80242344 AE6000A0 */ sw $zero, 0xA0($s3)
glabel func_80242348
/* 170C28 80242348 24040027 */ addiu $a0, $zero, 0x27
glabel dead_11_UnkNpcAIFunc12
/* 170C2C 8024234C 0C093E58 */ jal func_8024F960
glabel D_80242350
/* 170C30 80242350 2405003C */ addiu $a1, $zero, 0x3C
glabel func_80242354
/* 170C34 80242354 080908DD */ j dead_flo_16_FlyingNoAttackAI_12
glabel func_80242358
/* 170C38 80242358 AE550000 */ sw $s5, 0x0($s2)
glabel func_8024235C
/* 170C3C 8024235C 0C093EAD */ jal func_8024FAB4
glabel func_80242360
/* 170C40 80242360 00000000 */ nop
glabel func_80242364
/* 170C44 80242364 14400003 */ bnez $v0, dead_flo_16_FlyingNoAttackAI_12
glabel func_80242368
/* 170C48 80242368 00000000 */ nop
glabel dead_flo_13_UnkDistFunc
/* 170C4C 8024236C 2402000B */ addiu $v0, $zero, 0xB
glabel D_80242370
/* 170C50 80242370 AE420000 */ sw $v0, 0x0($s2)
glabel dead_flo_16_FlyingNoAttackAI_12
/* 170C54 80242374 3C10800E */ lui $s0, %hi(gBattleSubState)
D_80242378:
/* 170C58 80242378 2610C4DC */ addiu $s0, $s0, %lo(gBattleSubState)
glabel .L8024237C
/* 170C5C 8024237C 8E030000 */ lw $v1, 0x0($s0)
glabel func_80242380
/* 170C60 80242380 2402000B */ addiu $v0, $zero, 0xB
glabel func_80242384
/* 170C64 80242384 10620005 */ beq $v1, $v0, func_8024239C
glabel func_80242388
/* 170C68 80242388 2402000C */ addiu $v0, $zero, 0xC
glabel .L8024238C
/* 170C6C 8024238C 10620019 */ beq $v1, $v0, .L802423F4
glabel dead_flo_14_func_80242390_EE8940
/* 170C70 80242390 2402000F */ addiu $v0, $zero, 0xF
glabel func_80242394
/* 170C74 80242394 08090907 */ j .L8024241C
glabel .L80242398
/* 170C78 80242398 00000000 */ nop
glabel func_8024239C
/* 170C7C 8024239C 826200A4 */ lb $v0, 0xA4($s3)
D_802423A0:
/* 170C80 802423A0 926300A4 */ lbu $v1, 0xA4($s3)
glabel mgm_02_HideCoinCounter
/* 170C84 802423A4 10400017 */ beqz $v0, .L80242404
glabel .L802423A8
/* 170C88 802423A8 2462FFFF */ addiu $v0, $v1, -0x1
.L802423AC:
/* 170C8C 802423AC 8E63043C */ lw $v1, 0x43C($s3)
D_802423B0:
/* 170C90 802423B0 A26200A4 */ sb $v0, 0xA4($s3)
glabel func_802423B4
/* 170C94 802423B4 00021600 */ sll $v0, $v0, 24
.L802423B8:
/* 170C98 802423B8 8C63000C */ lw $v1, 0xC($v1)
glabel func_802423BC
/* 170C9C 802423BC 00021603 */ sra $v0, $v0, 24
glabel .L802423C0
/* 170CA0 802423C0 A462001A */ sh $v0, 0x1A($v1)
D_802423C4:
/* 170CA4 802423C4 826200A4 */ lb $v0, 0xA4($s3)
glabel func_802423C8
/* 170CA8 802423C8 1C40000F */ bgtz $v0, D_80242408
glabel func_802423CC
/* 170CAC 802423CC 2402000F */ addiu $v0, $zero, 0xF
glabel func_802423D0
/* 170CB0 802423D0 8E6400A8 */ lw $a0, 0xA8($s3)
glabel func_802423D4
/* 170CB4 802423D4 0C016914 */ jal remove_effect
glabel .L802423D8
/* 170CB8 802423D8 00000000 */ nop
D_802423DC:
/* 170CBC 802423DC 24040029 */ addiu $a0, $zero, 0x29
glabel func_802423E0
/* 170CC0 802423E0 2405003C */ addiu $a1, $zero, 0x3C
D_802423E4:
/* 170CC4 802423E4 0C093E58 */ jal func_8024F960
glabel .L802423E8
/* 170CC8 802423E8 AE6000A8 */ sw $zero, 0xA8($s3)
glabel func_802423EC
/* 170CCC 802423EC 08090902 */ j D_80242408
D_802423F0:
/* 170CD0 802423F0 2402000C */ addiu $v0, $zero, 0xC
glabel .L802423F4
/* 170CD4 802423F4 0C093EAD */ jal func_8024FAB4
D_802423F8:
/* 170CD8 802423F8 00000000 */ nop
glabel func_802423FC
/* 170CDC 802423FC 14400003 */ bnez $v0, func_8024240C
glabel func_80242400
/* 170CE0 80242400 00000000 */ nop
glabel .L80242404
/* 170CE4 80242404 2402000F */ addiu $v0, $zero, 0xF
D_80242408:
/* 170CE8 80242408 AE020000 */ sw $v0, 0x0($s0)
glabel func_8024240C
/* 170CEC 8024240C 3C10800E */ lui $s0, %hi(gBattleSubState)
glabel D_80242410
/* 170CF0 80242410 2610C4DC */ addiu $s0, $s0, %lo(gBattleSubState)
glabel .L80242414
/* 170CF4 80242414 8E030000 */ lw $v1, 0x0($s0)
glabel func_80242418
/* 170CF8 80242418 2402000F */ addiu $v0, $zero, 0xF
glabel .L8024241C
/* 170CFC 8024241C 10620005 */ beq $v1, $v0, func_80242434
glabel func_80242420
/* 170D00 80242420 24020010 */ addiu $v0, $zero, 0x10
glabel func_80242424
/* 170D04 80242424 10620025 */ beq $v1, $v0, .L802424BC
D_80242428:
/* 170D08 80242428 00000000 */ nop
D_8024242C:
/* 170D0C 8024242C 08090935 */ j func_802424D4
glabel D_80242430
/* 170D10 80242430 00000000 */ nop
glabel func_80242434
/* 170D14 80242434 8262009B */ lb $v0, 0x9B($s3)
glabel func_80242438
/* 170D18 80242438 9264009B */ lbu $a0, 0x9B($s3)
glabel func_8024243C
/* 170D1C 8024243C 10400024 */ beqz $v0, func_802424D0
glabel func_80242440
/* 170D20 80242440 24020015 */ addiu $v0, $zero, 0x15
glabel .L80242444
/* 170D24 80242444 3C05800E */ lui $a1, %hi(gBattleStatus)
glabel func_80242448
/* 170D28 80242448 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus)
D_8024244C:
/* 170D2C 8024244C 8CA30004 */ lw $v1, 0x4($a1)
D_80242450:
/* 170D30 80242450 30620100 */ andi $v0, $v1, 0x100
glabel .L80242454
/* 170D34 80242454 10400004 */ beqz $v0, func_80242468
glabel func_80242458
/* 170D38 80242458 2402FEFF */ addiu $v0, $zero, -0x101
glabel .L8024245C
/* 170D3C 8024245C 00621024 */ and $v0, $v1, $v0
D_80242460:
/* 170D40 80242460 08090933 */ j func_802424CC
glabel .L80242464
/* 170D44 80242464 ACA20004 */ sw $v0, 0x4($a1)
glabel func_80242468
/* 170D48 80242468 8E63043C */ lw $v1, 0x43C($s3)
glabel func_8024246C
/* 170D4C 8024246C 2482FFFF */ addiu $v0, $a0, -0x1
D_80242470:
/* 170D50 80242470 A262009B */ sb $v0, 0x9B($s3)
D_80242474:
/* 170D54 80242474 00021600 */ sll $v0, $v0, 24
glabel func_80242478
/* 170D58 80242478 8C63000C */ lw $v1, 0xC($v1)
glabel func_8024247C
/* 170D5C 8024247C 00021603 */ sra $v0, $v0, 24
glabel func_80242480
/* 170D60 80242480 A4620024 */ sh $v0, 0x24($v1)
glabel .L80242484
/* 170D64 80242484 8262009B */ lb $v0, 0x9B($s3)
glabel func_80242488
/* 170D68 80242488 1C400011 */ bgtz $v0, func_802424D0
D_8024248C:
/* 170D6C 8024248C 24020015 */ addiu $v0, $zero, 0x15
glabel .L80242490
/* 170D70 80242490 2404002B */ addiu $a0, $zero, 0x2B
D_80242494:
/* 170D74 80242494 0C093E58 */ jal func_8024F960
glabel func_80242498
/* 170D78 80242498 2405003C */ addiu $a1, $zero, 0x3C
D_8024249C:
/* 170D7C 8024249C 08090934 */ j func_802424D0
glabel dead_flo_13_UnkNpcAIFunc12
/* 170D80 802424A0 24020010 */ addiu $v0, $zero, 0x10
glabel dead_flo_16_FlyingNoAttackAI_13
/* 170D84 802424A4 8E230440 */ lw $v1, 0x440($s1)
glabel .L802424A8
/* 170D88 802424A8 A2220216 */ sb $v0, 0x216($s1)
glabel func_802424AC
/* 170D8C 802424AC 82220217 */ lb $v0, 0x217($s1)
glabel dead_11_set_script_owner_npc_col_height
/* 170D90 802424B0 8C63000C */ lw $v1, 0xC($v1)
glabel .L802424B4
/* 170D94 802424B4 08090A05 */ j .L80242814
D_802424B8:
/* 170D98 802424B8 AC62003C */ sw $v0, 0x3C($v1)
.L802424BC:
/* 170D9C 802424BC 0C093EAD */ jal func_8024FAB4
D_802424C0:
/* 170DA0 802424C0 00000000 */ nop
glabel .L802424C4
/* 170DA4 802424C4 14400003 */ bnez $v0, func_802424D4
glabel func_802424C8
/* 170DA8 802424C8 00000000 */ nop
glabel func_802424CC
/* 170DAC 802424CC 24020015 */ addiu $v0, $zero, 0x15
glabel func_802424D0
/* 170DB0 802424D0 AE020000 */ sw $v0, 0x0($s0)
glabel func_802424D4
/* 170DB4 802424D4 3C03800E */ lui $v1, %hi(gBattleSubState)
glabel func_802424D8
/* 170DB8 802424D8 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
D_802424DC:
/* 170DBC 802424DC 24020015 */ addiu $v0, $zero, 0x15
D_802424E0:
/* 170DC0 802424E0 14620042 */ bne $v1, $v0, D_802425EC
D_802424E4:
/* 170DC4 802424E4 24020016 */ addiu $v0, $zero, 0x16
D_802424E8:
/* 170DC8 802424E8 82230210 */ lb $v1, 0x210($s1)
glabel .L802424EC
/* 170DCC 802424EC 24020009 */ addiu $v0, $zero, 0x9
D_802424F0:
/* 170DD0 802424F0 1462000C */ bne $v1, $v0, func_80242524
D_802424F4:
/* 170DD4 802424F4 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16)
glabel .L802424F8
/* 170DD8 802424F8 82220214 */ lb $v0, 0x214($s1)
D_802424FC:
/* 170DDC 802424FC 14400009 */ bnez $v0, func_80242524
glabel func_80242500
/* 170DE0 80242500 24040001 */ addiu $a0, $zero, 0x1
glabel func_80242504
/* 170DE4 80242504 3C03800E */ lui $v1, %hi(gBattleStatus)
.L80242508:
/* 170DE8 80242508 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
glabel func_8024250C
/* 170DEC 8024250C 8C620000 */ lw $v0, 0x0($v1)
glabel func_80242510
/* 170DF0 80242510 2405000A */ addiu $a1, $zero, 0xA
D_80242514:
/* 170DF4 80242514 34420020 */ ori $v0, $v0, 0x20
jtbl_80242518:
/* 170DF8 80242518 0C09CCDF */ jal dispatch_damage_event_player_0
.L8024251C:
/* 170DFC 8024251C AC620000 */ sw $v0, 0x0($v1)
D_80242520:
/* 170E00 80242520 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16)
glabel func_80242524
/* 170E04 80242524 3C10800E */ lui $s0, %hi(gBattleStatus)
glabel func_80242528
/* 170E08 80242528 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
glabel func_8024252C
/* 170E0C 8024252C 8E020004 */ lw $v0, 0x4($s0)
glabel dead_11_TackleAI_Main
/* 170E10 80242530 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF)
glabel func_80242534
/* 170E14 80242534 A2600099 */ sb $zero, 0x99($s3)
D_80242538:
/* 170E18 80242538 00431824 */ and $v1, $v0, $v1
glabel func_8024253C
/* 170E1C 8024253C 30420040 */ andi $v0, $v0, 0x40
glabel .L80242540
/* 170E20 80242540 14400024 */ bnez $v0, D_802425D4
glabel .L80242544
/* 170E24 80242544 AE030004 */ sw $v1, 0x4($s0)
glabel func_80242548
/* 170E28 80242548 82C20002 */ lb $v0, 0x2($s6)
D_8024254C:
/* 170E2C 8024254C 28420002 */ slti $v0, $v0, 0x2
/* 170E30 80242550 1040000B */ beqz $v0, func_80242580
glabel func_80242554
/* 170E34 80242554 00000000 */ nop
glabel func_80242558
/* 170E38 80242558 0C03A752 */ jal is_ability_active
glabel func_8024255C
/* 170E3C 8024255C 24040014 */ addiu $a0, $zero, 0x14
D_80242560:
/* 170E40 80242560 10400007 */ beqz $v0, func_80242580
.L80242564:
/* 170E44 80242564 3C020800 */ lui $v0, (0x8000000 >> 16)
glabel dead_kzn_17_func_80240814_97BE44
/* 170E48 80242568 8E030004 */ lw $v1, 0x4($s0)
glabel func_8024256C
/* 170E4C 8024256C 92640099 */ lbu $a0, 0x99($s3)
glabel func_80242570
/* 170E50 80242570 00621825 */ or $v1, $v1, $v0
.L80242574:
/* 170E54 80242574 34840001 */ ori $a0, $a0, 0x1
.L80242578:
/* 170E58 80242578 AE030004 */ sw $v1, 0x4($s0)
.L8024257C:
/* 170E5C 8024257C A2640099 */ sb $a0, 0x99($s3)
glabel func_80242580
/* 170E60 80242580 82C20002 */ lb $v0, 0x2($s6)
.L80242584:
/* 170E64 80242584 28420006 */ slti $v0, $v0, 0x6
.L80242588:
/* 170E68 80242588 10400013 */ beqz $v0, D_802425D8
D_8024258C:
/* 170E6C 8024258C 24020016 */ addiu $v0, $zero, 0x16
glabel func_80242590
/* 170E70 80242590 0C03A752 */ jal is_ability_active
D_80242594:
/* 170E74 80242594 2404001E */ addiu $a0, $zero, 0x1E
flo_23_pad_2598:
/* 170E78 80242598 1040000F */ beqz $v0, D_802425D8
glabel func_8024259C
/* 170E7C 8024259C 24020016 */ addiu $v0, $zero, 0x16
D_802425A0:
/* 170E80 802425A0 92620099 */ lbu $v0, 0x99($s3)
.L802425A4:
/* 170E84 802425A4 30420001 */ andi $v0, $v0, 0x1
glabel func_802425A8
/* 170E88 802425A8 1440000B */ bnez $v0, D_802425D8
glabel func_802425AC
/* 170E8C 802425AC 24020016 */ addiu $v0, $zero, 0x16
glabel dead_kzn_17_AwaitPlayerNearNpc
/* 170E90 802425B0 3C05800E */ lui $a1, %hi(gBattleStatus)
D_802425B4:
/* 170E94 802425B4 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus)
glabel func_802425B8
/* 170E98 802425B8 3C040800 */ lui $a0, (0x8000000 >> 16)
D_802425BC:
/* 170E9C 802425BC 8CA20004 */ lw $v0, 0x4($a1)
D_802425C0:
/* 170EA0 802425C0 92630099 */ lbu $v1, 0x99($s3)
.L802425C4:
/* 170EA4 802425C4 00441025 */ or $v0, $v0, $a0
D_802425C8:
/* 170EA8 802425C8 34630002 */ ori $v1, $v1, 0x2
glabel func_802425CC
/* 170EAC 802425CC ACA20004 */ sw $v0, 0x4($a1)
glabel func_802425D0
/* 170EB0 802425D0 A2630099 */ sb $v1, 0x99($s3)
D_802425D4:
/* 170EB4 802425D4 24020016 */ addiu $v0, $zero, 0x16
D_802425D8:
/* 170EB8 802425D8 3C01800E */ lui $at, %hi(gBattleSubState)
D_802425DC:
/* 170EBC 802425DC AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
D_802425E0:
/* 170EC0 802425E0 3C03800E */ lui $v1, %hi(gBattleSubState)
D_802425E4:
/* 170EC4 802425E4 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
D_802425E8:
/* 170EC8 802425E8 24020016 */ addiu $v0, $zero, 0x16
D_802425EC:
/* 170ECC 802425EC 146200A8 */ bne $v1, $v0, .L80242890
glabel func_802425F0
/* 170ED0 802425F0 00000000 */ nop
glabel .L802425F4
/* 170ED4 802425F4 8E2201D8 */ lw $v0, 0x1D8($s1)
D_802425F8:
/* 170ED8 802425F8 10400005 */ beqz $v0, D_80242610
D_802425FC:
/* 170EDC 802425FC 00000000 */ nop
glabel func_80242600
/* 170EE0 80242600 0C0B1059 */ jal does_script_exist
glabel dead_flo_13_set_script_owner_npc_col_height
/* 170EE4 80242604 8E2401E8 */ lw $a0, 0x1E8($s1)
glabel dead_kzn_17_func_802408B4_97BEE4
/* 170EE8 80242608 144000A1 */ bnez $v0, .L80242890
glabel func_8024260C
/* 170EEC 8024260C 00000000 */ nop
D_80242610:
/* 170EF0 80242610 0C098D19 */ jal btl_check_player_defeated
D_80242614:
/* 170EF4 80242614 AE2001D8 */ sw $zero, 0x1D8($s1)
D_80242618:
/* 170EF8 80242618 1440011C */ bnez $v0, .L80242A8C
glabel func_8024261C
/* 170EFC 8024261C 3C030C00 */ lui $v1, (0xC000000 >> 16)
D_80242620:
/* 170F00 80242620 2404000E */ addiu $a0, $zero, 0xE
/* 170F04 80242624 8E220000 */ lw $v0, 0x0($s1)
glabel func_80242628
/* 170F08 80242628 3C01802A */ lui $at, %hi(D_8029F254)
D_8024262C:
/* 170F0C 8024262C AC20F254 */ sw $zero, %lo(D_8029F254)($at)
D_80242630:
/* 170F10 80242630 A220021D */ sb $zero, 0x21D($s1)
glabel func_80242634
/* 170F14 80242634 00431025 */ or $v0, $v0, $v1
glabel func_80242638
/* 170F18 80242638 0C03A752 */ jal is_ability_active
D_8024263C:
/* 170F1C 8024263C AE220000 */ sw $v0, 0x0($s1)
glabel func_80242640
/* 170F20 80242640 10400015 */ beqz $v0, func_80242698
D_80242644:
/* 170F24 80242644 00000000 */ nop
.L80242648:
/* 170F28 80242648 82220210 */ lb $v0, 0x210($s1)
D_8024264C:
/* 170F2C 8024264C 10400002 */ beqz $v0, .L80242658
glabel func_80242650
/* 170F30 80242650 24020001 */ addiu $v0, $zero, 0x1
.L80242654:
/* 170F34 80242654 A2220211 */ sb $v0, 0x211($s1)
.L80242658:
/* 170F38 80242658 82220212 */ lb $v0, 0x212($s1)
glabel func_8024265C
/* 170F3C 8024265C 10400002 */ beqz $v0, .L80242668
glabel .L80242660
/* 170F40 80242660 24020001 */ addiu $v0, $zero, 0x1
glabel func_80242664
/* 170F44 80242664 A2220213 */ sb $v0, 0x213($s1)
.L80242668:
/* 170F48 80242668 82220214 */ lb $v0, 0x214($s1)
glabel func_8024266C
/* 170F4C 8024266C 10400002 */ beqz $v0, func_80242678
D_80242670:
/* 170F50 80242670 24020001 */ addiu $v0, $zero, 0x1
.L80242674:
/* 170F54 80242674 A2220215 */ sb $v0, 0x215($s1)
glabel func_80242678
/* 170F58 80242678 82220216 */ lb $v0, 0x216($s1)
glabel dead_kzn_17_StashVars
/* 170F5C 8024267C 10400002 */ beqz $v0, func_80242688
glabel func_80242680
/* 170F60 80242680 24020001 */ addiu $v0, $zero, 0x1
glabel dead_flo_13_TackleAI_Main
/* 170F64 80242684 A2220217 */ sb $v0, 0x217($s1)
glabel func_80242688
/* 170F68 80242688 82220218 */ lb $v0, 0x218($s1)
glabel func_8024268C
/* 170F6C 8024268C 10400002 */ beqz $v0, func_80242698
glabel func_80242690
/* 170F70 80242690 24020001 */ addiu $v0, $zero, 0x1
glabel func_80242694
/* 170F74 80242694 A2220219 */ sb $v0, 0x219($s1)
glabel func_80242698
/* 170F78 80242698 82220214 */ lb $v0, 0x214($s1)
glabel func_8024269C
/* 170F7C 8024269C 1040000C */ beqz $v0, func_802426D0
glabel func_802426A0
/* 170F80 802426A0 00000000 */ nop
glabel func_802426A4
/* 170F84 802426A4 92220215 */ lbu $v0, 0x215($s1)
D_802426A8:
/* 170F88 802426A8 2442FFFF */ addiu $v0, $v0, -0x1
/* 170F8C 802426AC A2220215 */ sb $v0, 0x215($s1)
D_802426B0:
/* 170F90 802426B0 00021600 */ sll $v0, $v0, 24
glabel func_802426B4
/* 170F94 802426B4 1C400058 */ bgtz $v0, func_80242818
D_802426B8:
/* 170F98 802426B8 0000902D */ daddu $s2, $zero, $zero
D_802426BC:
/* 170F9C 802426BC A2200214 */ sb $zero, 0x214($s1)
glabel func_802426C0
/* 170FA0 802426C0 0C09C596 */ jal dispatch_event_player
.L802426C4:
/* 170FA4 802426C4 24040031 */ addiu $a0, $zero, 0x31
D_802426C8:
/* 170FA8 802426C8 08090A06 */ j func_80242818
D_802426CC:
/* 170FAC 802426CC 0000902D */ daddu $s2, $zero, $zero
glabel func_802426D0
/* 170FB0 802426D0 0C03A752 */ jal is_ability_active
glabel func_802426D4
/* 170FB4 802426D4 24040013 */ addiu $a0, $zero, 0x13
glabel func_802426D8
/* 170FB8 802426D8 1440000D */ bnez $v0, func_80242710
.L802426DC:
/* 170FBC 802426DC 00000000 */ nop
D_802426E0:
/* 170FC0 802426E0 82220212 */ lb $v0, 0x212($s1)
glabel func_802426E4
/* 170FC4 802426E4 1040000A */ beqz $v0, func_80242710
.L802426E8:
/* 170FC8 802426E8 00000000 */ nop
glabel func_802426EC
/* 170FCC 802426EC 92220213 */ lbu $v0, 0x213($s1)
glabel func_802426F0
/* 170FD0 802426F0 2442FFFF */ addiu $v0, $v0, -0x1
glabel .L802426F4
/* 170FD4 802426F4 A2220213 */ sb $v0, 0x213($s1)
glabel func_802426F8
/* 170FD8 802426F8 00021600 */ sll $v0, $v0, 24
glabel func_802426FC
/* 170FDC 802426FC 1C400004 */ bgtz $v0, func_80242710
.L80242700:
/* 170FE0 80242700 00000000 */ nop
D_80242704:
/* 170FE4 80242704 86240436 */ lh $a0, 0x436($s1)
glabel func_80242708
/* 170FE8 80242708 0C011E68 */ jal remove_status_static
/* 170FEC 8024270C A2200212 */ sb $zero, 0x212($s1)
glabel func_80242710
/* 170FF0 80242710 82220218 */ lb $v0, 0x218($s1)
/* 170FF4 80242714 10400010 */ beqz $v0, D_80242758
.L80242718:
/* 170FF8 80242718 00000000 */ nop
D_8024271C:
/* 170FFC 8024271C 92220219 */ lbu $v0, 0x219($s1)
.L80242720:
/* 171000 80242720 2442FFFF */ addiu $v0, $v0, -0x1
glabel dead_flo_16_FlyingNoAttackAI_20
/* 171004 80242724 A2220219 */ sb $v0, 0x219($s1)
glabel func_80242728
/* 171008 80242728 8E820000 */ lw $v0, 0x0($s4)
glabel func_8024272C
/* 17100C 8024272C 34420100 */ ori $v0, $v0, 0x100
glabel dead_kzn_17_GetItemName
/* 171010 80242730 AE820000 */ sw $v0, 0x0($s4)
glabel func_80242734
/* 171014 80242734 82220219 */ lb $v0, 0x219($s1)
/* 171018 80242738 1C400007 */ bgtz $v0, D_80242758
mgm_02_InitialConfigurations:
/* 17101C 8024273C 2403FEFF */ addiu $v1, $zero, -0x101
.L80242740:
/* 171020 80242740 A2200218 */ sb $zero, 0x218($s1)
glabel func_80242744
/* 171024 80242744 8E820000 */ lw $v0, 0x0($s4)
.L80242748:
/* 171028 80242748 00431024 */ and $v0, $v0, $v1
D_8024274C:
/* 17102C 8024274C AE820000 */ sw $v0, 0x0($s4)
glabel func_80242750
/* 171030 80242750 0C011EAA */ jal remove_status_transparent
glabel func_80242754
/* 171034 80242754 86240436 */ lh $a0, 0x436($s1)
D_80242758:
/* 171038 80242758 82220210 */ lb $v0, 0x210($s1)
/* 17103C 8024275C 1040001F */ beqz $v0, .L802427DC
glabel func_80242760
/* 171040 80242760 28420009 */ slti $v0, $v0, 0x9
.L80242764:
/* 171044 80242764 10400003 */ beqz $v0, func_80242774
.L80242768:
/* 171048 80242768 24020001 */ addiu $v0, $zero, 0x1
glabel func_8024276C
/* 17104C 8024276C 3C01802A */ lui $at, %hi(D_8029F254)
glabel func_80242770
/* 171050 80242770 AC22F254 */ sw $v0, %lo(D_8029F254)($at)
glabel func_80242774
/* 171054 80242774 24020014 */ addiu $v0, $zero, 0x14
.L80242778:
/* 171058 80242778 3C01802A */ lui $at, %hi(D_8029F258)
glabel func_8024277C
/* 17105C 8024277C AC22F258 */ sw $v0, %lo(D_8029F258)($at)
glabel func_80242780
/* 171060 80242780 92220211 */ lbu $v0, 0x211($s1)
glabel func_80242784
/* 171064 80242784 2442FFFF */ addiu $v0, $v0, -0x1
glabel func_80242788
/* 171068 80242788 A2220211 */ sb $v0, 0x211($s1)
glabel func_8024278C
/* 17106C 8024278C 00021600 */ sll $v0, $v0, 24
glabel func_80242790
/* 171070 80242790 1C400012 */ bgtz $v0, .L802427DC
glabel dead_kzn_17_GetNpcCollisionHeight
/* 171074 80242794 24020007 */ addiu $v0, $zero, 0x7
.L80242798:
/* 171078 80242798 82230210 */ lb $v1, 0x210($s1)
.L8024279C:
/* 17107C 8024279C 14620009 */ bne $v1, $v0, .L802427C4
.L802427A0:
/* 171080 802427A0 24040031 */ addiu $a0, $zero, 0x31
glabel func_802427A4
/* 171084 802427A4 0C05272D */ jal sfx_play_sound
D_802427A8:
/* 171088 802427A8 240400E7 */ addiu $a0, $zero, 0xE7
.L802427AC:
/* 17108C 802427AC 8E230228 */ lw $v1, 0x228($s1)
D_802427B0:
/* 171090 802427B0 8C620000 */ lw $v0, 0x0($v1)
glabel func_802427B4
/* 171094 802427B4 24040032 */ addiu $a0, $zero, 0x32
glabel func_802427B8
/* 171098 802427B8 34420010 */ ori $v0, $v0, 0x10
glabel func_802427BC
/* 17109C 802427BC AC620000 */ sw $v0, 0x0($v1)
glabel func_802427C0
/* 1710A0 802427C0 AE200228 */ sw $zero, 0x228($s1)
glabel .L802427C4
/* 1710A4 802427C4 0C09C596 */ jal dispatch_event_player
D_802427C8:
/* 1710A8 802427C8 00000000 */ nop
glabel func_802427CC
/* 1710AC 802427CC 86240436 */ lh $a0, 0x436($s1)
glabel func_802427D0
/* 1710B0 802427D0 A2200210 */ sb $zero, 0x210($s1)
D_802427D4:
/* 1710B4 802427D4 0C011E26 */ jal remove_status_debuff
glabel func_802427D8
/* 1710B8 802427D8 A2200211 */ sb $zero, 0x211($s1)
.L802427DC:
/* 1710BC 802427DC 92220211 */ lbu $v0, 0x211($s1)
glabel func_802427E0
/* 1710C0 802427E0 82300217 */ lb $s0, 0x217($s1)
.L802427E4:
/* 1710C4 802427E4 A2220217 */ sb $v0, 0x217($s1)
glabel func_802427E8
/* 1710C8 802427E8 00021600 */ sll $v0, $v0, 24
D_802427EC:
/* 1710CC 802427EC 00021603 */ sra $v0, $v0, 24
glabel dead_kzn_17_AddPlayerHandsOffset
/* 1710D0 802427F0 5C40FF2C */ bgtzl $v0, dead_flo_16_FlyingNoAttackAI_13
.L802427F4:
/* 1710D4 802427F4 2402000D */ addiu $v0, $zero, 0xD
.L802427F8:
/* 1710D8 802427F8 12020007 */ beq $s0, $v0, func_80242818
glabel func_802427FC
/* 1710DC 802427FC 0000902D */ daddu $s2, $zero, $zero
.L80242800:
/* 1710E0 80242800 8E220440 */ lw $v0, 0x440($s1)
glabel func_80242804
/* 1710E4 80242804 A2200216 */ sb $zero, 0x216($s1)
.L80242808:
/* 1710E8 80242808 A2200217 */ sb $zero, 0x217($s1)
glabel func_8024280C
/* 1710EC 8024280C 8C42000C */ lw $v0, 0xC($v0)
D_80242810:
/* 1710F0 80242810 AC40003C */ sw $zero, 0x3C($v0)
.L80242814:
/* 1710F4 80242814 0000902D */ daddu $s2, $zero, $zero
glabel func_80242818
/* 1710F8 80242818 3C150C00 */ lui $s5, (0xC000000 >> 16)
glabel func_8024281C
/* 1710FC 8024281C 24140014 */ addiu $s4, $zero, 0x14
glabel func_80242820
/* 171100 80242820 0260802D */ daddu $s0, $s3, $zero
glabel func_80242824
/* 171104 80242824 8E0300E0 */ lw $v1, 0xE0($s0)
.L80242828:
/* 171108 80242828 50600013 */ beql $v1, $zero, .L80242878
glabel .L8024282C
/* 17110C 8024282C 26520001 */ addiu $s2, $s2, 0x1
glabel func_80242830
/* 171110 80242830 8C620000 */ lw $v0, 0x0($v1)
D_80242834:
/* 171114 80242834 00551025 */ or $v0, $v0, $s5
.L80242838:
/* 171118 80242838 AC620000 */ sw $v0, 0x0($v1)
glabel func_8024283C
/* 17111C 8024283C 80620224 */ lb $v0, 0x224($v1)
glabel func_80242840
/* 171120 80242840 90640224 */ lbu $a0, 0x224($v1)
glabel .L80242844
/* 171124 80242844 5040000C */ beql $v0, $zero, .L80242878
.L80242848:
/* 171128 80242848 26520001 */ addiu $s2, $s2, 0x1
flo_23_D_8024284C_pad:
/* 17112C 8024284C 2482FFFF */ addiu $v0, $a0, -0x1
flo_23_FlowerGuard_ItemChoiceList:
/* 171130 80242850 A0620224 */ sb $v0, 0x224($v1)
glabel func_80242854
/* 171134 80242854 00021600 */ sll $v0, $v0, 24
glabel func_80242858
/* 171138 80242858 54400007 */ bnel $v0, $zero, .L80242878
.L8024285C:
/* 17113C 8024285C 26520001 */ addiu $s2, $s2, 0x1
D_80242860:
/* 171140 80242860 84640436 */ lh $a0, 0x436($v1)
.L80242864:
/* 171144 80242864 0C011EE1 */ jal remove_status_chill_out
.L80242868:
/* 171148 80242868 A0600223 */ sb $zero, 0x223($v1)
D_8024286C:
/* 17114C 8024286C 3C01802A */ lui $at, %hi(D_8029F258)
glabel func_80242870
/* 171150 80242870 AC34F258 */ sw $s4, %lo(D_8029F258)($at)
flo_09_pad_2874:
/* 171154 80242874 26520001 */ addiu $s2, $s2, 0x1
.L80242878:
/* 171158 80242878 2A420018 */ slti $v0, $s2, 0x18
glabel .L8024287C
/* 17115C 8024287C 1440FFE9 */ bnez $v0, func_80242824
D_80242880:
/* 171160 80242880 26100004 */ addiu $s0, $s0, 0x4
.L80242884:
/* 171164 80242884 24020001 */ addiu $v0, $zero, 0x1
D_80242888:
/* 171168 80242888 3C01800E */ lui $at, %hi(gBattleSubState)
/* 17116C 8024288C AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
.L80242890:
/* 171170 80242890 3C12800E */ lui $s2, %hi(gBattleSubState)
glabel func_80242894
/* 171174 80242894 8E52C4DC */ lw $s2, %lo(gBattleSubState)($s2)
glabel func_80242898
/* 171178 80242898 24020001 */ addiu $v0, $zero, 0x1
glabel func_8024289C
/* 17117C 8024289C 16420051 */ bne $s2, $v0, D_802429E4
D_802428A0:
/* 171180 802428A0 00000000 */ nop
glabel .L802428A4
/* 171184 802428A4 0C098D0D */ jal btl_check_enemies_defeated
D_802428A8:
/* 171188 802428A8 00000000 */ nop
.L802428AC:
/* 17118C 802428AC 14400077 */ bnez $v0, .L80242A8C
glabel func_802428B0
/* 171190 802428B0 24100001 */ addiu $s0, $zero, 0x1
glabel func_802428B4
/* 171194 802428B4 826200AE */ lb $v0, 0xAE($s3)
D_802428B8:
/* 171198 802428B8 926300AE */ lbu $v1, 0xAE($s3)
D_802428BC:
/* 17119C 802428BC 04400015 */ bltz $v0, D_80242914
glabel func_802428C0
/* 1711A0 802428C0 A260008C */ sb $zero, 0x8C($s3)
D_802428C4:
/* 1711A4 802428C4 2462FFFF */ addiu $v0, $v1, -0x1
glabel func_802428C8
/* 1711A8 802428C8 A26200AE */ sb $v0, 0xAE($s3)
D_802428CC:
/* 1711AC 802428CC 00021600 */ sll $v0, $v0, 24
glabel func_802428D0
/* 1711B0 802428D0 00021603 */ sra $v0, $v0, 24
D_802428D4:
/* 1711B4 802428D4 2403FFFF */ addiu $v1, $zero, -0x1
glabel func_802428D8
/* 1711B8 802428D8 1443000E */ bne $v0, $v1, D_80242914
glabel .L802428DC
/* 1711BC 802428DC 2405000A */ addiu $a1, $zero, 0xA
mgm_02_BoxModelIDs:
/* 1711C0 802428E0 3C048029 */ lui $a0, %hi(EVS_PlayerRegainAbility)
D_802428E4:
/* 1711C4 802428E4 24849110 */ addiu $a0, $a0, %lo(EVS_PlayerRegainAbility)
D_802428E8:
/* 1711C8 802428E8 0C0B0CF8 */ jal start_script
.L802428EC:
/* 1711CC 802428EC 0000302D */ daddu $a2, $zero, $zero
D_802428F0:
/* 1711D0 802428F0 0040182D */ daddu $v1, $v0, $zero
glabel func_802428F4
/* 1711D4 802428F4 AE2301D4 */ sw $v1, 0x1D4($s1)
glabel func_802428F8
/* 1711D8 802428F8 8C620144 */ lw $v0, 0x144($v1)
.L802428FC:
/* 1711DC 802428FC AE2201E4 */ sw $v0, 0x1E4($s1)
glabel func_80242900
/* 1711E0 80242900 AC700084 */ sw $s0, 0x84($v1)
.L80242904:
/* 1711E4 80242904 24100009 */ addiu $s0, $zero, 0x9
dgb_03_pad_2908:
/* 1711E8 80242908 AC600148 */ sw $zero, 0x148($v1)
D_8024290C:
/* 1711EC 8024290C AC7200AC */ sw $s2, 0xAC($v1)
D_80242910:
/* 1711F0 80242910 A272008C */ sb $s2, 0x8C($s3)
D_80242914:
/* 1711F4 80242914 826200AF */ lb $v0, 0xAF($s3)
D_80242918:
/* 1711F8 80242918 926300AF */ lbu $v1, 0xAF($s3)
D_8024291C:
/* 1711FC 8024291C 04400015 */ bltz $v0, .L80242974
.L80242920:
/* 171200 80242920 2462FFFF */ addiu $v0, $v1, -0x1
glabel func_80242924
/* 171204 80242924 A26200AF */ sb $v0, 0xAF($s3)
glabel func_80242928
/* 171208 80242928 00021600 */ sll $v0, $v0, 24
D_8024292C:
/* 17120C 8024292C 00021603 */ sra $v0, $v0, 24
D_80242930:
/* 171210 80242930 2403FFFF */ addiu $v1, $zero, -0x1
D_80242934:
/* 171214 80242934 1443000F */ bne $v0, $v1, .L80242974
.L80242938:
/* 171218 80242938 2405000A */ addiu $a1, $zero, 0xA
glabel func_8024293C
/* 17121C 8024293C 3C048029 */ lui $a0, %hi(EVS_PlayerRegainAbility)
glabel func_80242940
/* 171220 80242940 24849110 */ addiu $a0, $a0, %lo(EVS_PlayerRegainAbility)
.L80242944:
/* 171224 80242944 0C0B0CF8 */ jal start_script
glabel func_80242948
/* 171228 80242948 0000302D */ daddu $a2, $zero, $zero
glabel func_8024294C
/* 17122C 8024294C 0040182D */ daddu $v1, $v0, $zero
glabel func_80242950
/* 171230 80242950 AE2301D4 */ sw $v1, 0x1D4($s1)
.L80242954:
/* 171234 80242954 8C620144 */ lw $v0, 0x144($v1)
glabel func_80242958
/* 171238 80242958 AE2201E4 */ sw $v0, 0x1E4($s1)
glabel func_8024295C
/* 17123C 8024295C AC700084 */ sw $s0, 0x84($v1)
/* 171240 80242960 26100008 */ addiu $s0, $s0, 0x8
D_80242964:
/* 171244 80242964 24020001 */ addiu $v0, $zero, 0x1
glabel .L80242968
/* 171248 80242968 AC600148 */ sw $zero, 0x148($v1)
D_8024296C:
/* 17124C 8024296C AC6000AC */ sw $zero, 0xAC($v1)
D_80242970:
/* 171250 80242970 A262008C */ sb $v0, 0x8C($s3)
glabel .L80242974
/* 171254 80242974 826200B0 */ lb $v0, 0xB0($s3)
glabel func_80242978
/* 171258 80242978 926300B0 */ lbu $v1, 0xB0($s3)
glabel .L8024297C
/* 17125C 8024297C 04400016 */ bltz $v0, .L802429D8
glabel func_80242980
/* 171260 80242980 2462FFFF */ addiu $v0, $v1, -0x1
D_80242984:
/* 171264 80242984 A26200B0 */ sb $v0, 0xB0($s3)
D_80242988:
/* 171268 80242988 00021600 */ sll $v0, $v0, 24
.L8024298C:
/* 17126C 8024298C 00021603 */ sra $v0, $v0, 24
D_80242990:
/* 171270 80242990 2403FFFF */ addiu $v1, $zero, -0x1
D_80242994:
/* 171274 80242994 14430011 */ bne $v0, $v1, .L802429DC
D_80242998:
/* 171278 80242998 2402001E */ addiu $v0, $zero, 0x1E
glabel dead_11_SpinyAI_Main
/* 17127C 8024299C 3C048029 */ lui $a0, %hi(EVS_PlayerRegainAbility)
glabel func_802429A0_EEFAA0
/* 171280 802429A0 24849110 */ addiu $a0, $a0, %lo(EVS_PlayerRegainAbility)
D_802429A4:
/* 171284 802429A4 2405000A */ addiu $a1, $zero, 0xA
.L802429A8:
/* 171288 802429A8 0C0B0CF8 */ jal start_script
D_802429AC:
/* 17128C 802429AC 0000302D */ daddu $a2, $zero, $zero
.L802429B0:
/* 171290 802429B0 0040182D */ daddu $v1, $v0, $zero
/* 171294 802429B4 AE2301D4 */ sw $v1, 0x1D4($s1)
D_802429B8:
/* 171298 802429B8 8C620144 */ lw $v0, 0x144($v1)
D_802429BC:
/* 17129C 802429BC AE2201E4 */ sw $v0, 0x1E4($s1)
glabel func_802429C0_EA32C0
/* 1712A0 802429C0 24020002 */ addiu $v0, $zero, 0x2
glabel func_802429C4
/* 1712A4 802429C4 AC6200AC */ sw $v0, 0xAC($v1)
glabel func_802429C8
/* 1712A8 802429C8 24020001 */ addiu $v0, $zero, 0x1
D_802429CC:
/* 1712AC 802429CC AC600148 */ sw $zero, 0x148($v1)
D_802429D0:
/* 1712B0 802429D0 AC700084 */ sw $s0, 0x84($v1)
D_802429D4:
/* 1712B4 802429D4 A262008C */ sb $v0, 0x8C($s3)
.L802429D8:
/* 1712B8 802429D8 2402001E */ addiu $v0, $zero, 0x1E
.L802429DC:
/* 1712BC 802429DC 3C01800E */ lui $at, %hi(gBattleSubState)
dead_flo_12_D_802429E0:
/* 1712C0 802429E0 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
D_802429E4:
/* 1712C4 802429E4 3C03800E */ lui $v1, %hi(gBattleSubState)
D_802429E8:
/* 1712C8 802429E8 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
glabel func_802429EC
/* 1712CC 802429EC 2402001E */ addiu $v0, $zero, 0x1E
.L802429F0:
/* 1712D0 802429F0 14620026 */ bne $v1, $v0, .L80242A8C
glabel func_802429F4
/* 1712D4 802429F4 00000000 */ nop
mgm_02_PanelModelIDs:
/* 1712D8 802429F8 8E2201D8 */ lw $v0, 0x1D8($s1)
D_802429FC:
/* 1712DC 802429FC 10400005 */ beqz $v0, func_80242A14
D_80242A00:
/* 1712E0 80242A00 00000000 */ nop
glabel func_80242A04
/* 1712E4 80242A04 0C0B1059 */ jal does_script_exist
glabel func_80242A08
/* 1712E8 80242A08 8E2401E8 */ lw $a0, 0x1E8($s1)
/* 1712EC 80242A0C 1440001F */ bnez $v0, .L80242A8C
glabel func_80242A10
/* 1712F0 80242A10 00000000 */ nop
glabel func_80242A14
/* 1712F4 80242A14 0C098D19 */ jal btl_check_player_defeated
glabel func_80242A18
/* 1712F8 80242A18 AE2001D8 */ sw $zero, 0x1D8($s1)
glabel func_80242A1C
/* 1712FC 80242A1C 1440001B */ bnez $v0, .L80242A8C
glabel func_80242A20
/* 171300 80242A20 00000000 */ nop
D_80242A24:
/* 171304 80242A24 0C098D0D */ jal btl_check_enemies_defeated
.L80242A28:
/* 171308 80242A28 00000000 */ nop
D_80242A2C:
/* 17130C 80242A2C 14400017 */ bnez $v0, .L80242A8C
glabel func_80242A30
/* 171310 80242A30 00000000 */ nop
glabel func_80242A34
/* 171314 80242A34 3C03802A */ lui $v1, %hi(D_8029F258)
.L80242A38:
/* 171318 80242A38 2463F258 */ addiu $v1, $v1, %lo(D_8029F258)
read_sign_instructions:
/* 17131C 80242A3C 8C620000 */ lw $v0, 0x0($v1)
D_80242A40:
/* 171320 80242A40 10400003 */ beqz $v0, .L80242A50
.L80242A44:
/* 171324 80242A44 2442FFFF */ addiu $v0, $v0, -0x1
.L80242A48:
/* 171328 80242A48 08090AA3 */ j .L80242A8C
glabel func_80242A4C_EA334C
/* 17132C 80242A4C AC620000 */ sw $v0, 0x0($v1)
.L80242A50:
/* 171330 80242A50 3C02802A */ lui $v0, %hi(D_8029F254)
glabel .L80242A54
/* 171334 80242A54 8C42F254 */ lw $v0, %lo(D_8029F254)($v0)
.L80242A58:
/* 171338 80242A58 14400005 */ bnez $v0, .L80242A70
glabel .L80242A5C
/* 17133C 80242A5C 00000000 */ nop
/* 171340 80242A60 0C090464 */ jal func_80241190
glabel func_80242A64
/* 171344 80242A64 2404000A */ addiu $a0, $zero, 0xA
glabel func_80242A68
/* 171348 80242A68 08090AA3 */ j .L80242A8C
glabel func_80242A6C
/* 17134C 80242A6C 00000000 */ nop
.L80242A70:
/* 171350 80242A70 0C090464 */ jal func_80241190
glabel func_80242A74
/* 171354 80242A74 24040008 */ addiu $a0, $zero, 0x8
D_80242A78:
/* 171358 80242A78 3C03800E */ lui $v1, %hi(gBattleStatus)
glabel func_80242A7C
/* 17135C 80242A7C 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
glabel func_80242A80
/* 171360 80242A80 8C620004 */ lw $v0, 0x4($v1)
.L80242A84:
/* 171364 80242A84 34420002 */ ori $v0, $v0, 0x2
.L80242A88:
/* 171368 80242A88 AC620004 */ sw $v0, 0x4($v1)
glabel .L80242A8C
/* 17136C 80242A8C 8FBF0034 */ lw $ra, 0x34($sp)
glabel func_80242A90
/* 171370 80242A90 8FB60030 */ lw $s6, 0x30($sp)
D_80242A94:
/* 171374 80242A94 8FB5002C */ lw $s5, 0x2C($sp)
.L80242A98:
/* 171378 80242A98 8FB40028 */ lw $s4, 0x28($sp)
D_80242A9C:
/* 17137C 80242A9C 8FB30024 */ lw $s3, 0x24($sp)
D_80242AA0:
/* 171380 80242AA0 8FB20020 */ lw $s2, 0x20($sp)
glabel .L80242AA4
/* 171384 80242AA4 8FB1001C */ lw $s1, 0x1C($sp)
.L80242AA8:
/* 171388 80242AA8 8FB00018 */ lw $s0, 0x18($sp)
glabel func_80242AAC
/* 17138C 80242AAC D7B80048 */ ldc1 $f24, 0x48($sp)
D_80242AB0:
/* 171390 80242AB0 D7B60040 */ ldc1 $f22, 0x40($sp)
glabel .L80242AB4
/* 171394 80242AB4 D7B40038 */ ldc1 $f20, 0x38($sp)
.L80242AB8:
/* 171398 80242AB8 03E00008 */ jr $ra
glabel func_80242ABC
/* 17139C 80242ABC 27BD0050 */ addiu $sp, $sp, 0x50
### DECOMPILED C INSTRUCTIONS:
void btl_state_update_begin_player_turn(void) {
BattleStatus* battleStatus = &gBattleStatus;
PlayerData* playerData = &gPlayerData;
Actor* player = battleStatus->playerActor;
Actor* partner = battleStatus->partnerActor;
ActorPart* part = &player->partsTable[0];
Evt* script;
s32 i;
s8 debuffDuration;
s32 koDuration;
s32 temp;
if (gBattleSubState == BTL_SUBSTATE_BEGIN_PLAYER_TURN_INIT) {
btl_cam_use_preset(BTL_CAM_DEFAULT);
btl_cam_move(5);
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_RESET_STATE;
}
switch (gBattleSubState) {
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_RESET_STATE:
if (btl_cam_is_moving_done()) {
gBattleStatus.flags1 &= ~BS_FLAGS1_PARTNER_ACTING;
reset_actor_turn_info();
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
battleStatus->selectedMoveID = 0;
gBattleStatus.flags1 |= BS_FLAGS1_SHOW_PLAYER_DECORATIONS;
gBattleStatus.flags2 &= ~BS_FLAGS2_1000000;
player->disableDismissTimer = 0;
player->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000;
if (partner != NULL) {
player->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000;
partner->disableDismissTimer = 0;
}
battleStatus->stateFreezeCount = 0;
D_8029F254 = 0;
D_8029F258 = 0;
if (battleStatus->outtaSightActive == 0) {
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_WATER_BLOCK;
} else {
battleStatus->battlePhase = PHASE_ENEMY_BEGIN;
script = start_script(partner->handlePhaseSource, EVT_PRIORITY_A, 0);
partner->handlePhaseScript = script;
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_OUTTA_SIGHT;
partner->handleBatttlePhaseScriptID = script->id;
script->owner1.actorID = ACTOR_PARTNER;
}
}
break;
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_OUTTA_SIGHT:
if (!does_script_exist(partner->handleBatttlePhaseScriptID)) {
battleStatus->outtaSightActive = 0;
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_WATER_BLOCK;
gBattleStatus.flags2 |= BS_FLAGS2_4;
}
break;
}
switch (gBattleSubState) {
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_WATER_BLOCK:
if (battleStatus->stateFreezeCount == 0) {
if (battleStatus->waterBlockTurnsLeft != 0) {
battleStatus->waterBlockTurnsLeft--;
battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_WATER_BLOCK].turnsLeft = battleStatus->waterBlockTurnsLeft;
if (battleStatus->waterBlockTurnsLeft <= 0) {
battleStatus->waterBlockEffect->flags |= FX_INSTANCE_FLAG_DISMISS;
fx_water_block(1, player->currentPos.x, player->currentPos.y + 18.0f, player->currentPos.z + 5.0f, 1.5f, 10);
fx_water_splash(0, player->currentPos.x - 10.0f, player->currentPos.y + 5.0f, player->currentPos.z + 5.0f, 1.0f, 24);
fx_water_splash(0, player->currentPos.x - 15.0f, player->currentPos.y + 32.0f, player->currentPos.z + 5.0f, 1.0f, 24);
fx_water_splash(1, player->currentPos.x + 15.0f, player->currentPos.y + 22.0f, player->currentPos.z + 5.0f, 1.0f, 24);
battleStatus->waterBlockEffect = NULL;
sfx_play_sound(SOUND_299);
btl_show_battle_message(BTL_MSG_WATER_BLOCK_END, 60);
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_WATER_BLOCK;
} else {
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_CLOUD_NINE;
}
} else {
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_CLOUD_NINE;
}
}
break;
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_WATER_BLOCK:
if (!btl_is_popup_displayed()) {
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_CLOUD_NINE;
}
break;
}
switch (gBattleSubState) {
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_CLOUD_NINE:
if (battleStatus->cloudNineTurnsLeft != 0) {
battleStatus->cloudNineTurnsLeft--;
battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_CLOUD_NINE].turnsLeft = battleStatus->cloudNineTurnsLeft;
if (battleStatus->cloudNineTurnsLeft <= 0) {
remove_effect(battleStatus->cloudNineEffect);
battleStatus->cloudNineEffect = NULL;
btl_show_battle_message(BTL_MSG_CLOUD_NINE_END, 60);
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_CLOUD_NINE;
} else {
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_TURBO_CHARGE;
}
} else {
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_TURBO_CHARGE;
}
break;
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_CLOUD_NINE:
if (!btl_is_popup_displayed()) {
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_TURBO_CHARGE;
}
break;
}
switch (gBattleSubState) {
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_TURBO_CHARGE:
if (battleStatus->turboChargeTurnsLeft != 0) {
if (gBattleStatus.flags2 & BS_FLAGS2_100) {
gBattleStatus.flags2 &= ~BS_FLAGS2_100;
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_TRY_STATUS_DAMAGE;
} else {
battleStatus->turboChargeTurnsLeft--;
battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_TURBO_CHARGE].turnsLeft = battleStatus->turboChargeTurnsLeft;
if (battleStatus->turboChargeTurnsLeft <= 0) {
btl_show_battle_message(BTL_MSG_TURBO_CHARGE_END, 60);
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_TURBO_CHARGE;
} else {
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_TRY_STATUS_DAMAGE;
}
}
} else {
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_TRY_STATUS_DAMAGE;
}
break;
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_TURBO_CHARGE:
if (0) { // TODO relocated block - required to match
back:
player->koStatus = STATUS_KEY_DAZE;
player->disableEffect->data.disableX->koDuration = player->koDuration;
goto later;
}
if (!btl_is_popup_displayed()) {
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_TRY_STATUS_DAMAGE;
}
break;
}
if (gBattleSubState == BTL_SUBSTATE_BEGIN_PLAYER_TURN_TRY_STATUS_DAMAGE) {
if (player->debuff == STATUS_KEY_POISON && player->stoneStatus == 0) {
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
dispatch_damage_event_player_0(1, EVENT_HIT);
}
// clear rush flags to initialize
battleStatus->rushFlags = RUSH_FLAG_NONE;
gBattleStatus.flags2 &= ~BS_FLAGS2_HAS_RUSH;
// set rush flags based on danger/peril status
if (!(gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE)) {
if (playerData->curHP <= PERIL_THRESHOLD && is_ability_active(ABILITY_MEGA_RUSH)) {
gBattleStatus.flags2 |= BS_FLAGS2_HAS_RUSH;
battleStatus->rushFlags |= RUSH_FLAG_MEGA;
}
if (playerData->curHP <= DANGER_THRESHOLD && is_ability_active(ABILITY_POWER_RUSH)) {
if (!(battleStatus->rushFlags & RUSH_FLAG_MEGA)) {
gBattleStatus.flags2 |= BS_FLAGS2_HAS_RUSH;
battleStatus->rushFlags |= RUSH_FLAG_POWER;
}
}
}
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_TRY_STATUS_RECOVER;
}
if (gBattleSubState == BTL_SUBSTATE_BEGIN_PLAYER_TURN_TRY_STATUS_RECOVER) {
if (player->handleEventScript == NULL || !does_script_exist(player->handleEventScriptID)) {
player->handleEventScript = NULL;
if (btl_check_player_defeated()) {
return;
}
D_8029F254 = 0;
player->disableDismissTimer = 0;
player->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000;
if (is_ability_active(ABILITY_FEELING_FINE)) {
if (player->debuff != 0) {
player->debuffDuration = 1;
}
if (player->staticStatus != 0) {
player->staticDuration = 1;
}
if (player->stoneStatus != 0) {
player->stoneDuration = 1;
}
if (player->koStatus != 0) {
player->koDuration = 1;
}
if (player->transparentStatus != 0) {
player->transparentDuration = 1;
}
}
if (player->stoneStatus != 0) {
player->stoneDuration--;
if (player->stoneDuration <= 0) {
player->stoneStatus = 0;
dispatch_event_player(EVENT_RECOVER_STATUS);
}
} else {
if (!is_ability_active(ABILITY_ZAP_TAP) && player->staticStatus != 0) {
player->staticDuration--;
if (player->staticDuration <= 0) {
player->staticStatus = 0;
remove_status_static(player->hudElementDataIndex);
}
}
if (player->transparentStatus != 0) {
player->transparentDuration--;
part->flags |= ACTOR_PART_FLAG_100;
do {
if (player->transparentDuration <= 0) {
player->transparentStatus = 0;
part->flags &= ~ACTOR_PART_FLAG_100;
remove_status_transparent(player->hudElementDataIndex);
}
} while (0); // TODO required to match
}
if (player->debuff != 0) {
if (player->debuff < 9) {
D_8029F254 = 1;
}
D_8029F258 = 20;
player->debuffDuration--;
if (player->debuffDuration <= 0) {
if (player->debuff == STATUS_KEY_FROZEN) {
sfx_play_sound(SOUND_FROZEN_SHATTER);
player->icePillarEffect->flags |= FX_INSTANCE_FLAG_DISMISS;
player->icePillarEffect = NULL;
dispatch_event_player(EVENT_32);
} else {
dispatch_event_player(EVENT_RECOVER_STATUS);
}
player->debuff = 0;
player->debuffDuration = 0;
remove_status_debuff(player->hudElementDataIndex);
}
}
debuffDuration = player->debuffDuration;
temp = player->koDuration;
player->koDuration = debuffDuration;
if (debuffDuration > 0) {
goto back;
} else if (temp != debuffDuration) {
player->koStatus = 0;
player->koDuration = 0;
player->disableEffect->data.disableX->koDuration = 0;
}
}
later:
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
Actor* enemy = battleStatus->enemyActors[i];
if (enemy != NULL) {
enemy->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000;
if (enemy->chillOutTurns != 0) {
enemy->chillOutTurns--;
if (enemy->chillOutTurns == 0) {
enemy->chillOutAmount = 0;
remove_status_chill_out(enemy->hudElementDataIndex);
D_8029F258 = 20;
}
}
}
}
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_TRY_COMMAND_RECOVER;
}
}
if (gBattleSubState == BTL_SUBSTATE_BEGIN_PLAYER_TURN_TRY_COMMAND_RECOVER) {
if (btl_check_enemies_defeated()) {
return;
}
temp = 1;
battleStatus->stateFreezeCount = 0;
if (battleStatus->hammerLossTurns >= 0) {
battleStatus->hammerLossTurns--;
if (battleStatus->hammerLossTurns == -1) {
script = start_script(&EVS_PlayerRegainAbility, EVT_PRIORITY_A, 0);
player->takeTurnScript = script;
player->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PLAYER;
script->varTable[0] = temp;
temp += 8;
script->varTable[10] = 1; // hammer
battleStatus->stateFreezeCount = 1;
}
}
if (battleStatus->jumpLossTurns >= 0) {
battleStatus->jumpLossTurns--;
if (battleStatus->jumpLossTurns == -1) {
script = start_script(&EVS_PlayerRegainAbility, EVT_PRIORITY_A, 0);
player->takeTurnScript = script;
player->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PLAYER;
script->varTable[0] = temp;
temp += 8;
script->varTable[10] = 0; // jump
battleStatus->stateFreezeCount = 1;
}
}
if (battleStatus->itemLossTurns >= 0) {
battleStatus->itemLossTurns--;
if (battleStatus->itemLossTurns == -1) {
script = start_script(&EVS_PlayerRegainAbility, EVT_PRIORITY_A, 0);
player->takeTurnScript = script;
player->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PLAYER;
script->varTable[0] = temp;
temp += 8;
script->varTable[10] = 2; // item
battleStatus->stateFreezeCount = 1;
}
}
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_END_DELAY;
}
if (gBattleSubState == BTL_SUBSTATE_BEGIN_PLAYER_TURN_END_DELAY) {
if (player->handleEventScript == NULL || !does_script_exist(player->handleEventScriptID)) {
player->handleEventScript = NULL;
if (btl_check_player_defeated() || btl_check_enemies_defeated()) {
return;
}
if (D_8029F258 != 0) {
D_8029F258--;
return;
}
if (D_8029F254 == 0) {
btl_set_state(BATTLE_STATE_SWITCH_TO_PLAYER);
} else{
btl_set_state(BATTLE_STATE_BEGIN_PARTNER_TURN);
gBattleStatus.flags2 |= BS_FLAGS2_2;
}
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel appendGfx_darkness_stencil
/* CF554 80138E54 27BDFF78 */ addiu $sp, $sp, -0x88
/* CF558 80138E58 F7B80068 */ sdc1 $f24, 0x68($sp)
/* CF55C 80138E5C 4487C000 */ mtc1 $a3, $f24
/* CF560 80138E60 44800000 */ mtc1 $zero, $f0
/* CF564 80138E64 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* CF568 80138E68 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* CF56C 80138E6C F7BE0080 */ sdc1 $f30, 0x80($sp)
/* CF570 80138E70 C7BE0098 */ lwc1 $f30, 0x98($sp)
/* CF574 80138E74 AFA40088 */ sw $a0, 0x88($sp)
/* CF578 80138E78 3C04800B */ lui $a0, %hi(gCameras)
/* CF57C 80138E7C 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* CF580 80138E80 AFBF0054 */ sw $ra, 0x54($sp)
/* CF584 80138E84 AFBE0050 */ sw $fp, 0x50($sp)
/* CF588 80138E88 AFB7004C */ sw $s7, 0x4C($sp)
/* CF58C 80138E8C AFB60048 */ sw $s6, 0x48($sp)
/* CF590 80138E90 AFB50044 */ sw $s5, 0x44($sp)
/* CF594 80138E94 AFB40040 */ sw $s4, 0x40($sp)
/* CF598 80138E98 AFB3003C */ sw $s3, 0x3C($sp)
/* CF59C 80138E9C AFB20038 */ sw $s2, 0x38($sp)
/* CF5A0 80138EA0 AFB10034 */ sw $s1, 0x34($sp)
/* CF5A4 80138EA4 AFB00030 */ sw $s0, 0x30($sp)
/* CF5A8 80138EA8 F7BC0078 */ sdc1 $f28, 0x78($sp)
/* CF5AC 80138EAC F7BA0070 */ sdc1 $f26, 0x70($sp)
/* CF5B0 80138EB0 F7B60060 */ sdc1 $f22, 0x60($sp)
/* CF5B4 80138EB4 F7B40058 */ sdc1 $f20, 0x58($sp)
/* CF5B8 80138EB8 AFA5008C */ sw $a1, 0x8C($sp)
/* CF5BC 80138EBC AFA60090 */ sw $a2, 0x90($sp)
/* CF5C0 80138EC0 00031080 */ sll $v0, $v1, 2
/* CF5C4 80138EC4 00431021 */ addu $v0, $v0, $v1
/* CF5C8 80138EC8 00021080 */ sll $v0, $v0, 2
/* CF5CC 80138ECC 00431023 */ subu $v0, $v0, $v1
/* CF5D0 80138ED0 000218C0 */ sll $v1, $v0, 3
/* CF5D4 80138ED4 00431021 */ addu $v0, $v0, $v1
/* CF5D8 80138ED8 000210C0 */ sll $v0, $v0, 3
/* CF5DC 80138EDC 4600C032 */ c.eq.s $f24, $f0
/* CF5E0 80138EE0 00000000 */ nop
/* CF5E4 80138EE4 450103F8 */ bc1t .L80139EC8
/* CF5E8 80138EE8 0044F021 */ addu $fp, $v0, $a0
/* CF5EC 80138EEC 8FAD0088 */ lw $t5, 0x88($sp)
/* CF5F0 80138EF0 15A00011 */ bnez $t5, .L80138F38
/* CF5F4 80138EF4 00000000 */ nop
/* CF5F8 80138EF8 3C01437F */ lui $at, (0x437F0000 >> 16)
/* CF5FC 80138EFC 44812000 */ mtc1 $at, $f4
/* CF600 80138F00 00000000 */ nop
/* CF604 80138F04 46182001 */ sub.s $f0, $f4, $f24
/* CF608 80138F08 3C014120 */ lui $at, (0x41200000 >> 16)
/* CF60C 80138F0C 44811000 */ mtc1 $at, $f2
/* CF610 80138F10 00000000 */ nop
/* CF614 80138F14 46020002 */ mul.s $f0, $f0, $f2
/* CF618 80138F18 00000000 */ nop
/* CF61C 80138F1C 3C018015 */ lui $at, %hi(D_80150F80)
/* CF620 80138F20 D4220F80 */ ldc1 $f2, %lo(D_80150F80)($at)
/* CF624 80138F24 46040003 */ div.s $f0, $f0, $f4
/* CF628 80138F28 46000021 */ cvt.d.s $f0, $f0
/* CF62C 80138F2C 46220000 */ add.d $f0, $f0, $f2
/* CF630 80138F30 0804E400 */ j .L80139000
/* CF634 80138F34 462005A0 */ cvt.s.d $f22, $f0
.L80138F38:
/* CF638 80138F38 97C2000A */ lhu $v0, 0xA($fp)
/* CF63C 80138F3C 3C01437F */ lui $at, (0x437F0000 >> 16)
/* CF640 80138F40 44814000 */ mtc1 $at, $f8
/* CF644 80138F44 8FAD008C */ lw $t5, 0x8C($sp)
/* CF648 80138F48 3C014118 */ lui $at, (0x41180000 >> 16)
/* CF64C 80138F4C 44813000 */ mtc1 $at, $f6
/* CF650 80138F50 97C4000C */ lhu $a0, 0xC($fp)
/* CF654 80138F54 00021400 */ sll $v0, $v0, 16
/* CF658 80138F58 00021C03 */ sra $v1, $v0, 16
/* CF65C 80138F5C 000217C2 */ srl $v0, $v0, 31
/* CF660 80138F60 00621821 */ addu $v1, $v1, $v0
/* CF664 80138F64 00031843 */ sra $v1, $v1, 1
/* CF668 80138F68 46184101 */ sub.s $f4, $f8, $f24
/* CF66C 80138F6C 006D1823 */ subu $v1, $v1, $t5
/* CF670 80138F70 44831000 */ mtc1 $v1, $f2
/* CF674 80138F74 00000000 */ nop
/* CF678 80138F78 468010A0 */ cvt.s.w $f2, $f2
/* CF67C 80138F7C 46062182 */ mul.s $f6, $f4, $f6
/* CF680 80138F80 00000000 */ nop
/* CF684 80138F84 00042400 */ sll $a0, $a0, 16
/* CF688 80138F88 00041403 */ sra $v0, $a0, 16
/* CF68C 80138F8C 000427C2 */ srl $a0, $a0, 31
/* CF690 80138F90 00441021 */ addu $v0, $v0, $a0
/* CF694 80138F94 46041082 */ mul.s $f2, $f2, $f4
/* CF698 80138F98 00000000 */ nop
/* CF69C 80138F9C 8FAD0090 */ lw $t5, 0x90($sp)
/* CF6A0 80138FA0 00021043 */ sra $v0, $v0, 1
/* CF6A4 80138FA4 004D1023 */ subu $v0, $v0, $t5
/* CF6A8 80138FA8 44820000 */ mtc1 $v0, $f0
/* CF6AC 80138FAC 00000000 */ nop
/* CF6B0 80138FB0 46800020 */ cvt.s.w $f0, $f0
/* CF6B4 80138FB4 46040002 */ mul.s $f0, $f0, $f4
/* CF6B8 80138FB8 00000000 */ nop
/* CF6BC 80138FBC C7A4008C */ lwc1 $f4, 0x8C($sp)
/* CF6C0 80138FC0 46802120 */ cvt.s.w $f4, $f4
/* CF6C4 80138FC4 46081083 */ div.s $f2, $f2, $f8
/* CF6C8 80138FC8 46022100 */ add.s $f4, $f4, $f2
/* CF6CC 80138FCC 448D1000 */ mtc1 $t5, $f2
/* CF6D0 80138FD0 00000000 */ nop
/* CF6D4 80138FD4 468010A0 */ cvt.s.w $f2, $f2
/* CF6D8 80138FD8 46080003 */ div.s $f0, $f0, $f8
/* CF6DC 80138FDC 46001080 */ add.s $f2, $f2, $f0
/* CF6E0 80138FE0 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* CF6E4 80138FE4 4481B000 */ mtc1 $at, $f22
/* CF6E8 80138FE8 46083183 */ div.s $f6, $f6, $f8
/* CF6EC 80138FEC 46163580 */ add.s $f22, $f6, $f22
/* CF6F0 80138FF0 4600228D */ trunc.w.s $f10, $f4
/* CF6F4 80138FF4 E7AA008C */ swc1 $f10, 0x8C($sp)
/* CF6F8 80138FF8 4600128D */ trunc.w.s $f10, $f2
/* CF6FC 80138FFC E7AA0090 */ swc1 $f10, 0x90($sp)
.L80139000:
/* CF700 80139000 3C110001 */ lui $s1, (0x11630 >> 16)
/* CF704 80139004 36311630 */ ori $s1, $s1, (0x11630 & 0xFFFF)
/* CF708 80139008 0000982D */ daddu $s3, $zero, $zero
/* CF70C 8013900C 3C02800A */ lui $v0, %hi(gMainGfxPos)
/* CF710 80139010 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos)
/* CF714 80139014 0040902D */ daddu $s2, $v0, $zero
/* CF718 80139018 3C02800A */ lui $v0, %hi(gDisplayContext)
/* CF71C 8013901C 2442A674 */ addiu $v0, $v0, %lo(gDisplayContext)
/* CF720 80139020 0040B02D */ daddu $s6, $v0, $zero
/* CF724 80139024 3C028007 */ lui $v0, %hi(gMatrixListPos)
/* CF728 80139028 244241F0 */ addiu $v0, $v0, %lo(gMatrixListPos)
/* CF72C 8013902C 0040A02D */ daddu $s4, $v0, $zero
/* CF730 80139030 3C150001 */ lui $s5, (0x11630 >> 16)
/* CF734 80139034 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF)
/* CF738 80139038 3C05C180 */ lui $a1, (0xC1800000 >> 16)
/* CF73C 8013903C 0260B82D */ daddu $s7, $s3, $zero
/* CF740 80139040 AFA00020 */ sw $zero, 0x20($sp)
/* CF744 80139044 96840000 */ lhu $a0, 0x0($s4)
/* CF748 80139048 3C018015 */ lui $at, %hi(D_80150F88)
/* CF74C 8013904C D43A0F88 */ ldc1 $f26, %lo(D_80150F88)($at)
/* CF750 80139050 8EC20000 */ lw $v0, 0x0($s6)
/* CF754 80139054 4480A000 */ mtc1 $zero, $f20
/* CF758 80139058 3C014180 */ lui $at, (0x41800000 >> 16)
/* CF75C 8013905C 44812000 */ mtc1 $at, $f4
/* CF760 80139060 3C01C47A */ lui $at, (0xC47A0000 >> 16)
/* CF764 80139064 44813000 */ mtc1 $at, $f6
/* CF768 80139068 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* CF76C 8013906C 44810000 */ mtc1 $at, $f0
/* CF770 80139070 3C01447A */ lui $at, (0x447A0000 >> 16)
/* CF774 80139074 44811000 */ mtc1 $at, $f2
/* CF778 80139078 00042180 */ sll $a0, $a0, 6
/* CF77C 8013907C 00912021 */ addu $a0, $a0, $s1
/* CF780 80139080 00442021 */ addu $a0, $v0, $a0
/* CF784 80139084 4406A000 */ mfc1 $a2, $f20
/* CF788 80139088 4407A000 */ mfc1 $a3, $f20
/* CF78C 8013908C 46000706 */ mov.s $f28, $f0
/* CF790 80139090 E7A40010 */ swc1 $f4, 0x10($sp)
/* CF794 80139094 E7A60014 */ swc1 $f6, 0x14($sp)
/* CF798 80139098 E7A20018 */ swc1 $f2, 0x18($sp)
/* CF79C 8013909C 0C018E90 */ jal guOrtho
/* CF7A0 801390A0 E7BC001C */ swc1 $f28, 0x1C($sp)
/* CF7A4 801390A4 3C03DA38 */ lui $v1, (0xDA380007 >> 16)
/* CF7A8 801390A8 34630007 */ ori $v1, $v1, (0xDA380007 & 0xFFFF)
/* CF7AC 801390AC 3C06E300 */ lui $a2, (0xE3001A01 >> 16)
/* CF7B0 801390B0 34C61A01 */ ori $a2, $a2, (0xE3001A01 & 0xFFFF)
/* CF7B4 801390B4 3C07E300 */ lui $a3, (0xE3001201 >> 16)
/* CF7B8 801390B8 34E71201 */ ori $a3, $a3, (0xE3001201 & 0xFFFF)
/* CF7BC 801390BC 3C08E300 */ lui $t0, (0xE3000C00 >> 16)
/* CF7C0 801390C0 35080C00 */ ori $t0, $t0, (0xE3000C00 & 0xFFFF)
/* CF7C4 801390C4 3C09FF18 */ lui $t1, (0xFF18003F >> 16)
/* CF7C8 801390C8 3529003F */ ori $t1, $t1, (0xFF18003F & 0xFFFF)
/* CF7CC 801390CC 8E500000 */ lw $s0, 0x0($s2)
/* CF7D0 801390D0 3C04800A */ lui $a0, %hi(nuGfxZBuffer)
/* CF7D4 801390D4 8C84A5DC */ lw $a0, %lo(nuGfxZBuffer)($a0)
/* CF7D8 801390D8 96820000 */ lhu $v0, 0x0($s4)
/* CF7DC 801390DC 0200282D */ daddu $a1, $s0, $zero
/* CF7E0 801390E0 26100008 */ addiu $s0, $s0, 0x8
/* CF7E4 801390E4 AE500000 */ sw $s0, 0x0($s2)
/* CF7E8 801390E8 ACA30000 */ sw $v1, 0x0($a1)
/* CF7EC 801390EC 24430001 */ addiu $v1, $v0, 0x1
/* CF7F0 801390F0 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CF7F4 801390F4 00021180 */ sll $v0, $v0, 6
/* CF7F8 801390F8 A6830000 */ sh $v1, 0x0($s4)
/* CF7FC 801390FC 8EC30000 */ lw $v1, 0x0($s6)
/* CF800 80139100 00511021 */ addu $v0, $v0, $s1
/* CF804 80139104 00621821 */ addu $v1, $v1, $v0
/* CF808 80139108 26020008 */ addiu $v0, $s0, 0x8
/* CF80C 8013910C ACA30004 */ sw $v1, 0x4($a1)
/* CF810 80139110 AE420000 */ sw $v0, 0x0($s2)
/* CF814 80139114 26020010 */ addiu $v0, $s0, 0x10
/* CF818 80139118 AE060000 */ sw $a2, 0x0($s0)
/* CF81C 8013911C AE000004 */ sw $zero, 0x4($s0)
/* CF820 80139120 AE420000 */ sw $v0, 0x0($s2)
/* CF824 80139124 26020018 */ addiu $v0, $s0, 0x18
/* CF828 80139128 AE070008 */ sw $a3, 0x8($s0)
/* CF82C 8013912C AE00000C */ sw $zero, 0xC($s0)
/* CF830 80139130 AE420000 */ sw $v0, 0x0($s2)
/* CF834 80139134 3C020008 */ lui $v0, (0x80000 >> 16)
/* CF838 80139138 AE020014 */ sw $v0, 0x14($s0)
/* CF83C 8013913C 26020020 */ addiu $v0, $s0, 0x20
/* CF840 80139140 AE080010 */ sw $t0, 0x10($s0)
/* CF844 80139144 AE420000 */ sw $v0, 0x0($s2)
/* CF848 80139148 0C0187A4 */ jal osVirtualToPhysical
/* CF84C 8013914C AE090018 */ sw $t1, 0x18($s0)
/* CF850 80139150 3C090010 */ lui $t1, (0x100100 >> 16)
/* CF854 80139154 35290100 */ ori $t1, $t1, (0x100100 & 0xFFFF)
/* CF858 80139158 3C0ADC08 */ lui $t2, (0xDC080008 >> 16)
/* CF85C 8013915C 354A0008 */ ori $t2, $t2, (0xDC080008 & 0xFFFF)
/* CF860 80139160 3C0CFCFF */ lui $t4, (0xFCFFFFFF >> 16)
/* CF864 80139164 358CFFFF */ ori $t4, $t4, (0xFCFFFFFF & 0xFFFF)
/* CF868 80139168 3C0BFFFF */ lui $t3, (0xFFFF7DBE >> 16)
/* CF86C 8013916C 8E430000 */ lw $v1, 0x0($s2)
/* CF870 80139170 4405A000 */ mfc1 $a1, $f20
/* CF874 80139174 356B7DBE */ ori $t3, $t3, (0xFFFF7DBE & 0xFFFF)
/* CF878 80139178 AE02001C */ sw $v0, 0x1C($s0)
/* CF87C 8013917C 96840000 */ lhu $a0, 0x0($s4)
/* CF880 80139180 8EC20000 */ lw $v0, 0x0($s6)
/* CF884 80139184 00A0302D */ daddu $a2, $a1, $zero
/* CF888 80139188 00A0382D */ daddu $a3, $a1, $zero
/* CF88C 8013918C 0060402D */ daddu $t0, $v1, $zero
/* CF890 80139190 24630008 */ addiu $v1, $v1, 0x8
/* CF894 80139194 00042180 */ sll $a0, $a0, 6
/* CF898 80139198 00912021 */ addu $a0, $a0, $s1
/* CF89C 8013919C 00442021 */ addu $a0, $v0, $a0
/* CF8A0 801391A0 3C02ED00 */ lui $v0, (0xED000000 >> 16)
/* CF8A4 801391A4 AE430000 */ sw $v1, 0x0($s2)
/* CF8A8 801391A8 AD020000 */ sw $v0, 0x0($t0)
/* CF8AC 801391AC 24620008 */ addiu $v0, $v1, 0x8
/* CF8B0 801391B0 AD090004 */ sw $t1, 0x4($t0)
/* CF8B4 801391B4 AE420000 */ sw $v0, 0x0($s2)
/* CF8B8 801391B8 3C028015 */ lui $v0, %hi(D_8014ED98)
/* CF8BC 801391BC 2442ED98 */ addiu $v0, $v0, %lo(D_8014ED98)
/* CF8C0 801391C0 AC620004 */ sw $v0, 0x4($v1)
/* CF8C4 801391C4 24620010 */ addiu $v0, $v1, 0x10
/* CF8C8 801391C8 AC6A0000 */ sw $t2, 0x0($v1)
/* CF8CC 801391CC AE420000 */ sw $v0, 0x0($s2)
/* CF8D0 801391D0 AC6C0008 */ sw $t4, 0x8($v1)
/* CF8D4 801391D4 AC6B000C */ sw $t3, 0xC($v1)
/* CF8D8 801391D8 0C019F20 */ jal guRotate
/* CF8DC 801391DC E7BC0010 */ swc1 $f28, 0x10($sp)
/* CF8E0 801391E0 3C03DA38 */ lui $v1, (0xDA380002 >> 16)
/* CF8E4 801391E4 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF)
/* CF8E8 801391E8 3C06D838 */ lui $a2, (0xD8380002 >> 16)
/* CF8EC 801391EC 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF)
/* CF8F0 801391F0 3C08FCFF */ lui $t0, (0xFCFFB7FF >> 16)
/* CF8F4 801391F4 3508B7FF */ ori $t0, $t0, (0xFCFFB7FF & 0xFFFF)
/* CF8F8 801391F8 3C07FF6F */ lui $a3, (0xFF6F9FCF >> 16)
/* CF8FC 801391FC 34E79FCF */ ori $a3, $a3, (0xFF6F9FCF & 0xFFFF)
/* CF900 80139200 8E440000 */ lw $a0, 0x0($s2)
/* CF904 80139204 96820000 */ lhu $v0, 0x0($s4)
/* CF908 80139208 0080282D */ daddu $a1, $a0, $zero
/* CF90C 8013920C 24840008 */ addiu $a0, $a0, 0x8
/* CF910 80139210 AE440000 */ sw $a0, 0x0($s2)
/* CF914 80139214 ACA30000 */ sw $v1, 0x0($a1)
/* CF918 80139218 24430001 */ addiu $v1, $v0, 0x1
/* CF91C 8013921C 3042FFFF */ andi $v0, $v0, 0xFFFF
/* CF920 80139220 00021180 */ sll $v0, $v0, 6
/* CF924 80139224 A6830000 */ sh $v1, 0x0($s4)
/* CF928 80139228 8EC30000 */ lw $v1, 0x0($s6)
/* CF92C 8013922C 00511021 */ addu $v0, $v0, $s1
/* CF930 80139230 00621821 */ addu $v1, $v1, $v0
/* CF934 80139234 24820008 */ addiu $v0, $a0, 0x8
/* CF938 80139238 ACA30004 */ sw $v1, 0x4($a1)
/* CF93C 8013923C AE420000 */ sw $v0, 0x0($s2)
/* CF940 80139240 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* CF944 80139244 AC820000 */ sw $v0, 0x0($a0)
/* CF948 80139248 3C028015 */ lui $v0, %hi(D_8014EDE8)
/* CF94C 8013924C 2442EDE8 */ addiu $v0, $v0, %lo(D_8014EDE8)
/* CF950 80139250 AC820004 */ sw $v0, 0x4($a0)
/* CF954 80139254 24820010 */ addiu $v0, $a0, 0x10
/* CF958 80139258 AE420000 */ sw $v0, 0x0($s2)
/* CF95C 8013925C 24020040 */ addiu $v0, $zero, 0x40
/* CF960 80139260 AC82000C */ sw $v0, 0xC($a0)
/* CF964 80139264 24820018 */ addiu $v0, $a0, 0x18
/* CF968 80139268 AC860008 */ sw $a2, 0x8($a0)
/* CF96C 8013926C AE420000 */ sw $v0, 0x0($s2)
/* CF970 80139270 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* CF974 80139274 AC820010 */ sw $v0, 0x10($a0)
/* CF978 80139278 24820020 */ addiu $v0, $a0, 0x20
/* CF97C 8013927C AC800014 */ sw $zero, 0x14($a0)
/* CF980 80139280 AE420000 */ sw $v0, 0x0($s2)
/* CF984 80139284 AC880018 */ sw $t0, 0x18($a0)
/* CF988 80139288 AC87001C */ sw $a3, 0x1C($a0)
.L8013928C:
/* CF98C 8013928C 1660000C */ bnez $s3, .L801392C0
/* CF990 80139290 241000FF */ addiu $s0, $zero, 0xFF
/* CF994 80139294 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* CF998 80139298 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* CF99C 8013929C 94420134 */ lhu $v0, 0x134($v0)
/* CF9A0 801392A0 44826000 */ mtc1 $v0, $f12
/* CF9A4 801392A4 00000000 */ nop
/* CF9A8 801392A8 0C00A8BB */ jal sin_deg
/* CF9AC 801392AC 46806320 */ cvt.s.w $f12, $f12
/* CF9B0 801392B0 3C018015 */ lui $at, %hi(D_80150F90)
/* CF9B4 801392B4 D4220F90 */ ldc1 $f2, %lo(D_80150F90)($at)
/* CF9B8 801392B8 0804E4BC */ j .L801392F0
/* CF9BC 801392BC 46000021 */ cvt.d.s $f0, $f0
.L801392C0:
/* CF9C0 801392C0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* CF9C4 801392C4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* CF9C8 801392C8 94420134 */ lhu $v0, 0x134($v0)
/* CF9CC 801392CC 00021040 */ sll $v0, $v0, 1
/* CF9D0 801392D0 00571021 */ addu $v0, $v0, $s7
/* CF9D4 801392D4 44826000 */ mtc1 $v0, $f12
/* CF9D8 801392D8 00000000 */ nop
/* CF9DC 801392DC 0C00A8BB */ jal sin_deg
/* CF9E0 801392E0 46806320 */ cvt.s.w $f12, $f12
/* CF9E4 801392E4 3C018015 */ lui $at, %hi(D_80150F98)
/* CF9E8 801392E8 D4220F98 */ ldc1 $f2, %lo(D_80150F98)($at)
/* CF9EC 801392EC 46000021 */ cvt.d.s $f0, $f0
.L801392F0:
/* CF9F0 801392F0 46220002 */ mul.d $f0, $f0, $f2
/* CF9F4 801392F4 00000000 */ nop
/* CF9F8 801392F8 4620D001 */ sub.d $f0, $f26, $f0
/* CF9FC 801392FC 44801000 */ mtc1 $zero, $f2
/* CFA00 80139300 2A020100 */ slti $v0, $s0, 0x100
/* CFA04 80139304 14400002 */ bnez $v0, .L80139310
/* CFA08 80139308 46200520 */ cvt.s.d $f20, $f0
/* CFA0C 8013930C 241000FF */ addiu $s0, $zero, 0xFF
.L80139310:
/* CFA10 80139310 C7A00020 */ lwc1 $f0, 0x20($sp)
/* CFA14 80139314 46800020 */ cvt.s.w $f0, $f0
/* CFA18 80139318 26F70028 */ addiu $s7, $s7, 0x28
/* CFA1C 8013931C 26730001 */ addiu $s3, $s3, 0x1
/* CFA20 80139320 46020000 */ add.s $f0, $f0, $f2
/* CFA24 80139324 8FAD0020 */ lw $t5, 0x20($sp)
/* CFA28 80139328 44061000 */ mfc1 $a2, $f2
/* CFA2C 8013932C 25AD0046 */ addiu $t5, $t5, 0x46
/* CFA30 80139330 00C0382D */ daddu $a3, $a2, $zero
/* CFA34 80139334 AFAD0020 */ sw $t5, 0x20($sp)
/* CFA38 80139338 8E430000 */ lw $v1, 0x0($s2)
/* CFA3C 8013933C 96840000 */ lhu $a0, 0x0($s4)
/* CFA40 80139340 8EC20000 */ lw $v0, 0x0($s6)
/* CFA44 80139344 0060402D */ daddu $t0, $v1, $zero
/* CFA48 80139348 24630008 */ addiu $v1, $v1, 0x8
/* CFA4C 8013934C 00042180 */ sll $a0, $a0, 6
/* CFA50 80139350 00952021 */ addu $a0, $a0, $s5
/* CFA54 80139354 00442021 */ addu $a0, $v0, $a0
/* CFA58 80139358 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* CFA5C 8013935C AE430000 */ sw $v1, 0x0($s2)
/* CFA60 80139360 AD020000 */ sw $v0, 0x0($t0)
/* CFA64 80139364 2402FF00 */ addiu $v0, $zero, -0x100
/* CFA68 80139368 44050000 */ mfc1 $a1, $f0
/* CFA6C 8013936C 02021025 */ or $v0, $s0, $v0
/* CFA70 80139370 AD020004 */ sw $v0, 0x4($t0)
/* CFA74 80139374 0C019F20 */ jal guRotate
/* CFA78 80139378 E7BC0010 */ swc1 $f28, 0x10($sp)
/* CFA7C 8013937C 3C04DA38 */ lui $a0, (0xDA380002 >> 16)
/* CFA80 80139380 34840002 */ ori $a0, $a0, (0xDA380002 & 0xFFFF)
/* CFA84 80139384 8E420000 */ lw $v0, 0x0($s2)
/* CFA88 80139388 4405A000 */ mfc1 $a1, $f20
/* CFA8C 8013938C 4407E000 */ mfc1 $a3, $f28
/* CFA90 80139390 96830000 */ lhu $v1, 0x0($s4)
/* CFA94 80139394 00A0302D */ daddu $a2, $a1, $zero
/* CFA98 80139398 0040402D */ daddu $t0, $v0, $zero
/* CFA9C 8013939C 24420008 */ addiu $v0, $v0, 0x8
/* CFAA0 801393A0 AE420000 */ sw $v0, 0x0($s2)
/* CFAA4 801393A4 24620001 */ addiu $v0, $v1, 0x1
/* CFAA8 801393A8 3063FFFF */ andi $v1, $v1, 0xFFFF
/* CFAAC 801393AC 00031980 */ sll $v1, $v1, 6
/* CFAB0 801393B0 00751821 */ addu $v1, $v1, $s5
/* CFAB4 801393B4 AD040000 */ sw $a0, 0x0($t0)
/* CFAB8 801393B8 A6820000 */ sh $v0, 0x0($s4)
/* CFABC 801393BC 8EC20000 */ lw $v0, 0x0($s6)
/* CFAC0 801393C0 96840000 */ lhu $a0, 0x0($s4)
/* CFAC4 801393C4 00431821 */ addu $v1, $v0, $v1
/* CFAC8 801393C8 00042180 */ sll $a0, $a0, 6
/* CFACC 801393CC 00952021 */ addu $a0, $a0, $s5
/* CFAD0 801393D0 00442021 */ addu $a0, $v0, $a0
/* CFAD4 801393D4 0C019DC0 */ jal guScale
/* CFAD8 801393D8 AD030004 */ sw $v1, 0x4($t0)
/* CFADC 801393DC 3C02DA38 */ lui $v0, (0xDA380001 >> 16)
/* CFAE0 801393E0 34420001 */ ori $v0, $v0, (0xDA380001 & 0xFFFF)
/* CFAE4 801393E4 3C06D838 */ lui $a2, (0xD8380002 >> 16)
/* CFAE8 801393E8 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF)
/* CFAEC 801393EC 8E440000 */ lw $a0, 0x0($s2)
/* CFAF0 801393F0 96830000 */ lhu $v1, 0x0($s4)
/* CFAF4 801393F4 0080282D */ daddu $a1, $a0, $zero
/* CFAF8 801393F8 24840008 */ addiu $a0, $a0, 0x8
/* CFAFC 801393FC AE440000 */ sw $a0, 0x0($s2)
/* CFB00 80139400 ACA20000 */ sw $v0, 0x0($a1)
/* CFB04 80139404 24620001 */ addiu $v0, $v1, 0x1
/* CFB08 80139408 3063FFFF */ andi $v1, $v1, 0xFFFF
/* CFB0C 8013940C 00031980 */ sll $v1, $v1, 6
/* CFB10 80139410 A6820000 */ sh $v0, 0x0($s4)
/* CFB14 80139414 8EC20000 */ lw $v0, 0x0($s6)
/* CFB18 80139418 00751821 */ addu $v1, $v1, $s5
/* CFB1C 8013941C 00431021 */ addu $v0, $v0, $v1
/* CFB20 80139420 ACA20004 */ sw $v0, 0x4($a1)
/* CFB24 80139424 24820008 */ addiu $v0, $a0, 0x8
/* CFB28 80139428 AE420000 */ sw $v0, 0x0($s2)
/* CFB2C 8013942C 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* CFB30 80139430 AC820000 */ sw $v0, 0x0($a0)
/* CFB34 80139434 3C028015 */ lui $v0, %hi(D_8014EDE8)
/* CFB38 80139438 2442EDE8 */ addiu $v0, $v0, %lo(D_8014EDE8)
/* CFB3C 8013943C AC820004 */ sw $v0, 0x4($a0)
/* CFB40 80139440 24820010 */ addiu $v0, $a0, 0x10
/* CFB44 80139444 AE420000 */ sw $v0, 0x0($s2)
/* CFB48 80139448 24020040 */ addiu $v0, $zero, 0x40
/* CFB4C 8013944C AC82000C */ sw $v0, 0xC($a0)
/* CFB50 80139450 2A620002 */ slti $v0, $s3, 0x2
/* CFB54 80139454 1440FF8D */ bnez $v0, .L8013928C
/* CFB58 80139458 AC860008 */ sw $a2, 0x8($a0)
/* CFB5C 8013945C 3C05E300 */ lui $a1, (0xE3000C00 >> 16)
/* CFB60 80139460 34A50C00 */ ori $a1, $a1, (0xE3000C00 & 0xFFFF)
/* CFB64 80139464 3C06FF88 */ lui $a2, (0xFF88003F >> 16)
/* CFB68 80139468 34C6003F */ ori $a2, $a2, (0xFF88003F & 0xFFFF)
/* CFB6C 8013946C 0000982D */ daddu $s3, $zero, $zero
/* CFB70 80139470 3C02800A */ lui $v0, %hi(gMainGfxPos)
/* CFB74 80139474 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos)
/* CFB78 80139478 0040882D */ daddu $s1, $v0, $zero
/* CFB7C 8013947C 3C14F518 */ lui $s4, (0xF5182000 >> 16)
/* CFB80 80139480 36942000 */ ori $s4, $s4, (0xF5182000 & 0xFFFF)
/* CFB84 80139484 3C15E700 */ lui $s5, (0xE7000000 >> 16)
/* CFB88 80139488 24120040 */ addiu $s2, $zero, 0x40
/* CFB8C 8013948C 02A0102D */ daddu $v0, $s5, $zero
/* CFB90 80139490 8E300000 */ lw $s0, 0x0($s1)
/* CFB94 80139494 3C04800A */ lui $a0, %hi(nuGfxZBuffer)
/* CFB98 80139498 8C84A5DC */ lw $a0, %lo(nuGfxZBuffer)($a0)
/* CFB9C 8013949C 0200182D */ daddu $v1, $s0, $zero
/* CFBA0 801394A0 26100008 */ addiu $s0, $s0, 0x8
/* CFBA4 801394A4 AE300000 */ sw $s0, 0x0($s1)
/* CFBA8 801394A8 AC620000 */ sw $v0, 0x0($v1)
/* CFBAC 801394AC 26020008 */ addiu $v0, $s0, 0x8
/* CFBB0 801394B0 AC600004 */ sw $zero, 0x4($v1)
/* CFBB4 801394B4 AE220000 */ sw $v0, 0x0($s1)
/* CFBB8 801394B8 26020010 */ addiu $v0, $s0, 0x10
/* CFBBC 801394BC AE050000 */ sw $a1, 0x0($s0)
/* CFBC0 801394C0 AE000004 */ sw $zero, 0x4($s0)
/* CFBC4 801394C4 AE220000 */ sw $v0, 0x0($s1)
/* CFBC8 801394C8 0C0187A4 */ jal osVirtualToPhysical
/* CFBCC 801394CC AE060008 */ sw $a2, 0x8($s0)
/* CFBD0 801394D0 3C050010 */ lui $a1, (0x100100 >> 16)
/* CFBD4 801394D4 34A50100 */ ori $a1, $a1, (0x100100 & 0xFFFF)
/* CFBD8 801394D8 3C07FCFF */ lui $a3, (0xFCFFFFFF >> 16)
/* CFBDC 801394DC 34E7FFFF */ ori $a3, $a3, (0xFCFFFFFF & 0xFFFF)
/* CFBE0 801394E0 3C06FFFC */ lui $a2, (0xFFFCFC7E >> 16)
/* CFBE4 801394E4 8E230000 */ lw $v1, 0x0($s1)
/* CFBE8 801394E8 34C6FC7E */ ori $a2, $a2, (0xFFFCFC7E & 0xFFFF)
/* CFBEC 801394EC AE02000C */ sw $v0, 0xC($s0)
/* CFBF0 801394F0 3C02ED00 */ lui $v0, (0xED000000 >> 16)
/* CFBF4 801394F4 0060202D */ daddu $a0, $v1, $zero
/* CFBF8 801394F8 24630008 */ addiu $v1, $v1, 0x8
/* CFBFC 801394FC AE230000 */ sw $v1, 0x0($s1)
/* CFC00 80139500 AC820000 */ sw $v0, 0x0($a0)
/* CFC04 80139504 24620008 */ addiu $v0, $v1, 0x8
/* CFC08 80139508 AC850004 */ sw $a1, 0x4($a0)
/* CFC0C 8013950C AE220000 */ sw $v0, 0x0($s1)
/* CFC10 80139510 AC670000 */ sw $a3, 0x0($v1)
/* CFC14 80139514 AC660004 */ sw $a2, 0x4($v1)
.L80139518:
/* CFC18 80139518 3C05FD18 */ lui $a1, (0xFD18003F >> 16)
/* CFC1C 8013951C 34A5003F */ ori $a1, $a1, (0xFD18003F & 0xFFFF)
/* CFC20 80139520 00132300 */ sll $a0, $s3, 12
/* CFC24 80139524 8E220000 */ lw $v0, 0x0($s1)
/* CFC28 80139528 3C03800A */ lui $v1, %hi(nuGfxZBuffer)
/* CFC2C 8013952C 8C63A5DC */ lw $v1, %lo(nuGfxZBuffer)($v1)
/* CFC30 80139530 0040802D */ daddu $s0, $v0, $zero
/* CFC34 80139534 24420008 */ addiu $v0, $v0, 0x8
/* CFC38 80139538 00642021 */ addu $a0, $v1, $a0
/* CFC3C 8013953C AE220000 */ sw $v0, 0x0($s1)
/* CFC40 80139540 0C0187A4 */ jal osVirtualToPhysical
/* CFC44 80139544 AE050000 */ sw $a1, 0x0($s0)
/* CFC48 80139548 3C07070F */ lui $a3, (0x70FC03C >> 16)
/* CFC4C 8013954C 34E7C03C */ ori $a3, $a3, (0x70FC03C & 0xFFFF)
/* CFC50 80139550 3C08000F */ lui $t0, (0xFC03C >> 16)
/* CFC54 80139554 3508C03C */ ori $t0, $t0, (0xFC03C & 0xFFFF)
/* CFC58 80139558 3C090400 */ lui $t1, (0x4000400 >> 16)
/* CFC5C 8013955C 35290400 */ ori $t1, $t1, (0x4000400 & 0xFFFF)
/* CFC60 80139560 32460FFF */ andi $a2, $s2, 0xFFF
/* CFC64 80139564 26520040 */ addiu $s2, $s2, 0x40
/* CFC68 80139568 00132980 */ sll $a1, $s3, 6
/* CFC6C 8013956C 8E230000 */ lw $v1, 0x0($s1)
/* CFC70 80139570 26730001 */ addiu $s3, $s3, 0x1
/* CFC74 80139574 AE020004 */ sw $v0, 0x4($s0)
/* CFC78 80139578 3C020700 */ lui $v0, (0x7000000 >> 16)
/* CFC7C 8013957C 3C0BE600 */ lui $t3, (0xE6000000 >> 16)
/* CFC80 80139580 3C0AF400 */ lui $t2, (0xF4000000 >> 16)
/* CFC84 80139584 3C17F200 */ lui $s7, (0xF2000000 >> 16)
/* CFC88 80139588 30A50FFF */ andi $a1, $a1, 0xFFF
/* CFC8C 8013958C 0060202D */ daddu $a0, $v1, $zero
/* CFC90 80139590 24630008 */ addiu $v1, $v1, 0x8
/* CFC94 80139594 AE230000 */ sw $v1, 0x0($s1)
/* CFC98 80139598 AC820004 */ sw $v0, 0x4($a0)
/* CFC9C 8013959C 24620008 */ addiu $v0, $v1, 0x8
/* CFCA0 801395A0 AC940000 */ sw $s4, 0x0($a0)
/* CFCA4 801395A4 AE220000 */ sw $v0, 0x0($s1)
/* CFCA8 801395A8 24620010 */ addiu $v0, $v1, 0x10
/* CFCAC 801395AC AC6B0000 */ sw $t3, 0x0($v1)
/* CFCB0 801395B0 AC600004 */ sw $zero, 0x4($v1)
/* CFCB4 801395B4 AE220000 */ sw $v0, 0x0($s1)
/* CFCB8 801395B8 24620018 */ addiu $v0, $v1, 0x18
/* CFCBC 801395BC AC6A0008 */ sw $t2, 0x8($v1)
/* CFCC0 801395C0 AC67000C */ sw $a3, 0xC($v1)
/* CFCC4 801395C4 AE220000 */ sw $v0, 0x0($s1)
/* CFCC8 801395C8 24620020 */ addiu $v0, $v1, 0x20
/* CFCCC 801395CC AC750010 */ sw $s5, 0x10($v1)
/* CFCD0 801395D0 AC600014 */ sw $zero, 0x14($v1)
/* CFCD4 801395D4 AE220000 */ sw $v0, 0x0($s1)
/* CFCD8 801395D8 24620028 */ addiu $v0, $v1, 0x28
/* CFCDC 801395DC AC740018 */ sw $s4, 0x18($v1)
/* CFCE0 801395E0 AC60001C */ sw $zero, 0x1C($v1)
/* CFCE4 801395E4 AE220000 */ sw $v0, 0x0($s1)
/* CFCE8 801395E8 24620030 */ addiu $v0, $v1, 0x30
/* CFCEC 801395EC AC770020 */ sw $s7, 0x20($v1)
/* CFCF0 801395F0 AC680024 */ sw $t0, 0x24($v1)
/* CFCF4 801395F4 AE220000 */ sw $v0, 0x0($s1)
/* CFCF8 801395F8 24620038 */ addiu $v0, $v1, 0x38
/* CFCFC 801395FC AC750028 */ sw $s5, 0x28($v1)
/* CFD00 80139600 AC60002C */ sw $zero, 0x2C($v1)
/* CFD04 80139604 AE220000 */ sw $v0, 0x0($s1)
/* CFD08 80139608 3C02E410 */ lui $v0, (0xE4100000 >> 16)
/* CFD0C 8013960C 00C23025 */ or $a2, $a2, $v0
/* CFD10 80139610 24620040 */ addiu $v0, $v1, 0x40
/* CFD14 80139614 AC660030 */ sw $a2, 0x30($v1)
/* CFD18 80139618 AC650034 */ sw $a1, 0x34($v1)
/* CFD1C 8013961C AE220000 */ sw $v0, 0x0($s1)
/* CFD20 80139620 3C02E100 */ lui $v0, (0xE1000000 >> 16)
/* CFD24 80139624 AC620038 */ sw $v0, 0x38($v1)
/* CFD28 80139628 24620048 */ addiu $v0, $v1, 0x48
/* CFD2C 8013962C AC60003C */ sw $zero, 0x3C($v1)
/* CFD30 80139630 AE220000 */ sw $v0, 0x0($s1)
/* CFD34 80139634 3C02F100 */ lui $v0, (0xF1000000 >> 16)
/* CFD38 80139638 AC620040 */ sw $v0, 0x40($v1)
/* CFD3C 8013963C 24620050 */ addiu $v0, $v1, 0x50
/* CFD40 80139640 AC690044 */ sw $t1, 0x44($v1)
/* CFD44 80139644 AE220000 */ sw $v0, 0x0($s1)
/* CFD48 80139648 2A620004 */ slti $v0, $s3, 0x4
/* CFD4C 8013964C AC750048 */ sw $s5, 0x48($v1)
/* CFD50 80139650 1440FFB1 */ bnez $v0, .L80139518
/* CFD54 80139654 AC60004C */ sw $zero, 0x4C($v1)
/* CFD58 80139658 3C03FD88 */ lui $v1, (0xFD88003F >> 16)
/* CFD5C 8013965C 3463003F */ ori $v1, $v1, (0xFD88003F & 0xFFFF)
/* CFD60 80139660 3C14E300 */ lui $s4, (0xE3000A01 >> 16)
/* CFD64 80139664 36940A01 */ ori $s4, $s4, (0xE3000A01 & 0xFFFF)
/* CFD68 80139668 3C15E200 */ lui $s5, (0xE200001C >> 16)
/* CFD6C 8013966C 36B5001C */ ori $s5, $s5, (0xE200001C & 0xFFFF)
/* CFD70 80139670 3C16800A */ lui $s6, %hi(gMainGfxPos)
/* CFD74 80139674 26D6A66C */ addiu $s6, $s6, %lo(gMainGfxPos)
/* CFD78 80139678 3C13800A */ lui $s3, %hi(nuGfxZBuffer)
/* CFD7C 8013967C 2673A5DC */ addiu $s3, $s3, %lo(nuGfxZBuffer)
/* CFD80 80139680 8EC20000 */ lw $v0, 0x0($s6)
/* CFD84 80139684 8E640000 */ lw $a0, 0x0($s3)
/* CFD88 80139688 0040882D */ daddu $s1, $v0, $zero
/* CFD8C 8013968C 24420008 */ addiu $v0, $v0, 0x8
/* CFD90 80139690 AEC20000 */ sw $v0, 0x0($s6)
/* CFD94 80139694 AE230000 */ sw $v1, 0x0($s1)
/* CFD98 80139698 AFAA0028 */ sw $t2, 0x28($sp)
/* CFD9C 8013969C 0C0187A4 */ jal osVirtualToPhysical
/* CFDA0 801396A0 AFAB002C */ sw $t3, 0x2C($sp)
/* CFDA4 801396A4 3C04F588 */ lui $a0, (0xF5881000 >> 16)
/* CFDA8 801396A8 34841000 */ ori $a0, $a0, (0xF5881000 & 0xFFFF)
/* CFDAC 801396AC 3C03070D */ lui $v1, (0x70DBF6F >> 16)
/* CFDB0 801396B0 3463BF6F */ ori $v1, $v1, (0x70DBF6F & 0xFFFF)
/* CFDB4 801396B4 3C05070F */ lui $a1, (0x70FC0FC >> 16)
/* CFDB8 801396B8 34A5C0FC */ ori $a1, $a1, (0x70FC0FC & 0xFFFF)
/* CFDBC 801396BC 3C06000D */ lui $a2, (0xDBF6F >> 16)
/* CFDC0 801396C0 34C6BF6F */ ori $a2, $a2, (0xDBF6F & 0xFFFF)
/* CFDC4 801396C4 3C07000F */ lui $a3, (0xFC0FC >> 16)
/* CFDC8 801396C8 34E7C0FC */ ori $a3, $a3, (0xFC0FC & 0xFFFF)
/* CFDCC 801396CC 3C08001F */ lui $t0, (0x1FC1FC >> 16)
/* CFDD0 801396D0 3508C1FC */ ori $t0, $t0, (0x1FC1FC & 0xFFFF)
/* CFDD4 801396D4 3C09FF18 */ lui $t1, (0xFF18003F >> 16)
/* CFDD8 801396D8 3529003F */ ori $t1, $t1, (0xFF18003F & 0xFFFF)
/* CFDDC 801396DC 8ED00000 */ lw $s0, 0x0($s6)
/* CFDE0 801396E0 3C12E700 */ lui $s2, (0xE7000000 >> 16)
/* CFDE4 801396E4 AE220004 */ sw $v0, 0x4($s1)
/* CFDE8 801396E8 0200102D */ daddu $v0, $s0, $zero
/* CFDEC 801396EC 26100008 */ addiu $s0, $s0, 0x8
/* CFDF0 801396F0 AED00000 */ sw $s0, 0x0($s6)
/* CFDF4 801396F4 AC440000 */ sw $a0, 0x0($v0)
/* CFDF8 801396F8 AC430004 */ sw $v1, 0x4($v0)
/* CFDFC 801396FC 26020008 */ addiu $v0, $s0, 0x8
/* CFE00 80139700 AEC20000 */ sw $v0, 0x0($s6)
/* CFE04 80139704 8FAB002C */ lw $t3, 0x2C($sp)
/* CFE08 80139708 26020010 */ addiu $v0, $s0, 0x10
/* CFE0C 8013970C AE000004 */ sw $zero, 0x4($s0)
/* CFE10 80139710 AE0B0000 */ sw $t3, 0x0($s0)
/* CFE14 80139714 AEC20000 */ sw $v0, 0x0($s6)
/* CFE18 80139718 8FAA0028 */ lw $t2, 0x28($sp)
/* CFE1C 8013971C 26020018 */ addiu $v0, $s0, 0x18
/* CFE20 80139720 AE05000C */ sw $a1, 0xC($s0)
/* CFE24 80139724 AE0A0008 */ sw $t2, 0x8($s0)
/* CFE28 80139728 AEC20000 */ sw $v0, 0x0($s6)
/* CFE2C 8013972C 26020020 */ addiu $v0, $s0, 0x20
/* CFE30 80139730 AE120010 */ sw $s2, 0x10($s0)
/* CFE34 80139734 AE000014 */ sw $zero, 0x14($s0)
/* CFE38 80139738 AEC20000 */ sw $v0, 0x0($s6)
/* CFE3C 8013973C 26020028 */ addiu $v0, $s0, 0x28
/* CFE40 80139740 AE040018 */ sw $a0, 0x18($s0)
/* CFE44 80139744 AE06001C */ sw $a2, 0x1C($s0)
/* CFE48 80139748 AEC20000 */ sw $v0, 0x0($s6)
/* CFE4C 8013974C 26020030 */ addiu $v0, $s0, 0x30
/* CFE50 80139750 AE170020 */ sw $s7, 0x20($s0)
/* CFE54 80139754 AE070024 */ sw $a3, 0x24($s0)
/* CFE58 80139758 AEC20000 */ sw $v0, 0x0($s6)
/* CFE5C 8013975C 26020038 */ addiu $v0, $s0, 0x38
/* CFE60 80139760 AE170028 */ sw $s7, 0x28($s0)
/* CFE64 80139764 AE08002C */ sw $t0, 0x2C($s0)
/* CFE68 80139768 AEC20000 */ sw $v0, 0x0($s6)
/* CFE6C 8013976C 26020040 */ addiu $v0, $s0, 0x40
/* CFE70 80139770 AE120030 */ sw $s2, 0x30($s0)
/* CFE74 80139774 AE000034 */ sw $zero, 0x34($s0)
/* CFE78 80139778 AEC20000 */ sw $v0, 0x0($s6)
/* CFE7C 8013977C 3C020030 */ lui $v0, (0x300000 >> 16)
/* CFE80 80139780 AE02003C */ sw $v0, 0x3C($s0)
/* CFE84 80139784 26020048 */ addiu $v0, $s0, 0x48
/* CFE88 80139788 AE140038 */ sw $s4, 0x38($s0)
/* CFE8C 8013978C AEC20000 */ sw $v0, 0x0($s6)
/* CFE90 80139790 26020050 */ addiu $v0, $s0, 0x50
/* CFE94 80139794 AE150040 */ sw $s5, 0x40($s0)
/* CFE98 80139798 AE000044 */ sw $zero, 0x44($s0)
/* CFE9C 8013979C AEC20000 */ sw $v0, 0x0($s6)
/* CFEA0 801397A0 AE090048 */ sw $t1, 0x48($s0)
/* CFEA4 801397A4 0C0187A4 */ jal osVirtualToPhysical
/* CFEA8 801397A8 8E640000 */ lw $a0, 0x0($s3)
/* CFEAC 801397AC 3C05FFFC */ lui $a1, (0xFFFCFFFC >> 16)
/* CFEB0 801397B0 34A5FFFC */ ori $a1, $a1, (0xFFFCFFFC & 0xFFFF)
/* CFEB4 801397B4 3C06F60F */ lui $a2, (0xF60FC0FC >> 16)
/* CFEB8 801397B8 34C6C0FC */ ori $a2, $a2, (0xF60FC0FC & 0xFFFF)
/* CFEBC 801397BC 3C07FF10 */ lui $a3, (0xFF10013F >> 16)
/* CFEC0 801397C0 8ED10000 */ lw $s1, 0x0($s6)
/* CFEC4 801397C4 34E7013F */ ori $a3, $a3, (0xFF10013F & 0xFFFF)
/* CFEC8 801397C8 AE02004C */ sw $v0, 0x4C($s0)
/* CFECC 801397CC 3C02F700 */ lui $v0, (0xF7000000 >> 16)
/* CFED0 801397D0 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr)
/* CFED4 801397D4 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0)
/* CFED8 801397D8 0220182D */ daddu $v1, $s1, $zero
/* CFEDC 801397DC 26310008 */ addiu $s1, $s1, 0x8
/* CFEE0 801397E0 AED10000 */ sw $s1, 0x0($s6)
/* CFEE4 801397E4 AC620000 */ sw $v0, 0x0($v1)
/* CFEE8 801397E8 26220008 */ addiu $v0, $s1, 0x8
/* CFEEC 801397EC AC650004 */ sw $a1, 0x4($v1)
/* CFEF0 801397F0 AEC20000 */ sw $v0, 0x0($s6)
/* CFEF4 801397F4 26220010 */ addiu $v0, $s1, 0x10
/* CFEF8 801397F8 AE260000 */ sw $a2, 0x0($s1)
/* CFEFC 801397FC AE200004 */ sw $zero, 0x4($s1)
/* CFF00 80139800 AEC20000 */ sw $v0, 0x0($s6)
/* CFF04 80139804 26220018 */ addiu $v0, $s1, 0x18
/* CFF08 80139808 AE320008 */ sw $s2, 0x8($s1)
/* CFF0C 8013980C AE20000C */ sw $zero, 0xC($s1)
/* CFF10 80139810 AEC20000 */ sw $v0, 0x0($s6)
/* CFF14 80139814 0C0187A4 */ jal osVirtualToPhysical
/* CFF18 80139818 AE270010 */ sw $a3, 0x10($s1)
/* CFF1C 8013981C 3C040050 */ lui $a0, (0x5003C0 >> 16)
/* CFF20 80139820 348403C0 */ ori $a0, $a0, (0x5003C0 & 0xFFFF)
/* CFF24 80139824 3C05E300 */ lui $a1, (0xE3001801 >> 16)
/* CFF28 80139828 34A51801 */ ori $a1, $a1, (0xE3001801 & 0xFFFF)
/* CFF2C 8013982C 3C06E300 */ lui $a2, (0xE3001A01 >> 16)
/* CFF30 80139830 34C61A01 */ ori $a2, $a2, (0xE3001A01 & 0xFFFF)
/* CFF34 80139834 3C07E300 */ lui $a3, (0xE3001201 >> 16)
/* CFF38 80139838 34E71201 */ ori $a3, $a3, (0xE3001201 & 0xFFFF)
/* CFF3C 8013983C 3C080050 */ lui $t0, (0x504340 >> 16)
/* CFF40 80139840 8EC90000 */ lw $t1, 0x0($s6)
/* CFF44 80139844 35084340 */ ori $t0, $t0, (0x504340 & 0xFFFF)
/* CFF48 80139848 AE220014 */ sw $v0, 0x14($s1)
/* CFF4C 8013984C 3C02ED00 */ lui $v0, (0xED000000 >> 16)
/* CFF50 80139850 3C01437F */ lui $at, (0x437F0000 >> 16)
/* CFF54 80139854 44810000 */ mtc1 $at, $f0
/* CFF58 80139858 0120182D */ daddu $v1, $t1, $zero
/* CFF5C 8013985C 25290008 */ addiu $t1, $t1, 0x8
/* CFF60 80139860 AEC90000 */ sw $t1, 0x0($s6)
/* CFF64 80139864 AC620000 */ sw $v0, 0x0($v1)
/* CFF68 80139868 25220008 */ addiu $v0, $t1, 0x8
/* CFF6C 8013986C AC640004 */ sw $a0, 0x4($v1)
/* CFF70 80139870 AEC20000 */ sw $v0, 0x0($s6)
/* CFF74 80139874 25220010 */ addiu $v0, $t1, 0x10
/* CFF78 80139878 AD340000 */ sw $s4, 0x0($t1)
/* CFF7C 8013987C AD200004 */ sw $zero, 0x4($t1)
/* CFF80 80139880 AEC20000 */ sw $v0, 0x0($s6)
/* CFF84 80139884 25220018 */ addiu $v0, $t1, 0x18
/* CFF88 80139888 AD250008 */ sw $a1, 0x8($t1)
/* CFF8C 8013988C AD20000C */ sw $zero, 0xC($t1)
/* CFF90 80139890 AEC20000 */ sw $v0, 0x0($s6)
/* CFF94 80139894 25220020 */ addiu $v0, $t1, 0x20
/* CFF98 80139898 AD260010 */ sw $a2, 0x10($t1)
/* CFF9C 8013989C AD200014 */ sw $zero, 0x14($t1)
/* CFFA0 801398A0 AEC20000 */ sw $v0, 0x0($s6)
/* CFFA4 801398A4 24023000 */ addiu $v0, $zero, 0x3000
/* CFFA8 801398A8 AD22001C */ sw $v0, 0x1C($t1)
/* CFFAC 801398AC 25220028 */ addiu $v0, $t1, 0x28
/* CFFB0 801398B0 4600C032 */ c.eq.s $f24, $f0
/* CFFB4 801398B4 AD270018 */ sw $a3, 0x18($t1)
/* CFFB8 801398B8 AEC20000 */ sw $v0, 0x0($s6)
/* CFFBC 801398BC AD350020 */ sw $s5, 0x20($t1)
/* CFFC0 801398C0 45000005 */ bc1f .L801398D8
/* CFFC4 801398C4 AD280024 */ sw $t0, 0x24($t1)
/* CFFC8 801398C8 8FAD0088 */ lw $t5, 0x88($sp)
/* CFFCC 801398CC 24020001 */ addiu $v0, $zero, 0x1
/* CFFD0 801398D0 55A20005 */ bnel $t5, $v0, .L801398E8
/* CFFD4 801398D4 3C04FCFF */ lui $a0, (0xFCFFEBFF >> 16)
.L801398D8:
/* CFFD8 801398D8 3C04FC61 */ lui $a0, (0xFC619AC3 >> 16)
/* CFFDC 801398DC 34849AC3 */ ori $a0, $a0, (0xFC619AC3 & 0xFFFF)
/* CFFE0 801398E0 0804E63C */ j .L801398F0
/* CFFE4 801398E4 3C031137 */ lui $v1, (0x1137F7FB >> 16)
.L801398E8:
/* CFFE8 801398E8 3484EBFF */ ori $a0, $a0, (0xFCFFEBFF & 0xFFFF)
/* CFFEC 801398EC 3C03FFD7 */ lui $v1, (0xFFD7F7FB >> 16)
.L801398F0:
/* CFFF0 801398F0 3463F7FB */ ori $v1, $v1, (0xFFD7F7FB & 0xFFFF)
/* CFFF4 801398F4 25220030 */ addiu $v0, $t1, 0x30
/* CFFF8 801398F8 AEC20000 */ sw $v0, 0x0($s6)
/* CFFFC 801398FC AD240028 */ sw $a0, 0x28($t1)
/* D0000 80139900 AD23002C */ sw $v1, 0x2C($t1)
/* D0004 80139904 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* D0008 80139908 44810000 */ mtc1 $at, $f0
/* D000C 8013990C 00000000 */ nop
/* D0010 80139910 4600C602 */ mul.s $f24, $f24, $f0
/* D0014 80139914 00000000 */ nop
/* D0018 80139918 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* D001C 8013991C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* D0020 80139920 8C620000 */ lw $v0, 0x0($v1)
/* D0024 80139924 4600C002 */ mul.s $f0, $f24, $f0
/* D0028 80139928 00000000 */ nop
/* D002C 8013992C 3C01437F */ lui $at, (0x437F0000 >> 16)
/* D0030 80139930 44811000 */ mtc1 $at, $f2
/* D0034 80139934 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* D0038 80139938 44812000 */ mtc1 $at, $f4
/* D003C 8013993C 0040202D */ daddu $a0, $v0, $zero
/* D0040 80139940 24420008 */ addiu $v0, $v0, 0x8
/* D0044 80139944 461E0002 */ mul.s $f0, $f0, $f30
/* D0048 80139948 00000000 */ nop
/* D004C 8013994C AC620000 */ sw $v0, 0x0($v1)
/* D0050 80139950 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* D0054 80139954 AC820000 */ sw $v0, 0x0($a0)
/* D0058 80139958 46020003 */ div.s $f0, $f0, $f2
/* D005C 8013995C 4600203E */ c.le.s $f4, $f0
/* D0060 80139960 00000000 */ nop
/* D0064 80139964 45010005 */ bc1t .L8013997C
/* D0068 80139968 24840004 */ addiu $a0, $a0, 0x4
/* D006C 8013996C 4600028D */ trunc.w.s $f10, $f0
/* D0070 80139970 44065000 */ mfc1 $a2, $f10
/* D0074 80139974 0804E665 */ j .L80139994
/* D0078 80139978 00000000 */ nop
.L8013997C:
/* D007C 8013997C 46040001 */ sub.s $f0, $f0, $f4
/* D0080 80139980 3C028000 */ lui $v0, (0x80000000 >> 16)
/* D0084 80139984 4600028D */ trunc.w.s $f10, $f0
/* D0088 80139988 44065000 */ mfc1 $a2, $f10
/* D008C 8013998C 00000000 */ nop
/* D0090 80139990 00C23025 */ or $a2, $a2, $v0
.L80139994:
/* D0094 80139994 3C05800A */ lui $a1, %hi(gMainGfxPos)
/* D0098 80139998 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos)
/* D009C 8013999C 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* D00A0 801399A0 44810000 */ mtc1 $at, $f0
/* D00A4 801399A4 8CA30000 */ lw $v1, 0x0($a1)
/* D00A8 801399A8 4600C002 */ mul.s $f0, $f24, $f0
/* D00AC 801399AC 00000000 */ nop
/* D00B0 801399B0 3C01437F */ lui $at, (0x437F0000 >> 16)
/* D00B4 801399B4 44811000 */ mtc1 $at, $f2
/* D00B8 801399B8 30C200FF */ andi $v0, $a2, 0xFF
/* D00BC 801399BC AC820000 */ sw $v0, 0x0($a0)
/* D00C0 801399C0 3C02FB00 */ lui $v0, (0xFB000000 >> 16)
/* D00C4 801399C4 46001001 */ sub.s $f0, $f2, $f0
/* D00C8 801399C8 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* D00CC 801399CC 44812000 */ mtc1 $at, $f4
/* D00D0 801399D0 0060202D */ daddu $a0, $v1, $zero
/* D00D4 801399D4 461E0002 */ mul.s $f0, $f0, $f30
/* D00D8 801399D8 00000000 */ nop
/* D00DC 801399DC 24630008 */ addiu $v1, $v1, 0x8
/* D00E0 801399E0 ACA30000 */ sw $v1, 0x0($a1)
/* D00E4 801399E4 AC820000 */ sw $v0, 0x0($a0)
/* D00E8 801399E8 46020003 */ div.s $f0, $f0, $f2
/* D00EC 801399EC 4600203E */ c.le.s $f4, $f0
/* D00F0 801399F0 00000000 */ nop
/* D00F4 801399F4 45010005 */ bc1t .L80139A0C
/* D00F8 801399F8 24840004 */ addiu $a0, $a0, 0x4
/* D00FC 801399FC 4600028D */ trunc.w.s $f10, $f0
/* D0100 80139A00 44035000 */ mfc1 $v1, $f10
/* D0104 80139A04 0804E68A */ j .L80139A28
/* D0108 80139A08 2402FF00 */ addiu $v0, $zero, -0x100
.L80139A0C:
/* D010C 80139A0C 46040001 */ sub.s $f0, $f0, $f4
/* D0110 80139A10 3C028000 */ lui $v0, (0x80000000 >> 16)
/* D0114 80139A14 4600028D */ trunc.w.s $f10, $f0
/* D0118 80139A18 44035000 */ mfc1 $v1, $f10
/* D011C 80139A1C 00000000 */ nop
/* D0120 80139A20 00621825 */ or $v1, $v1, $v0
/* D0124 80139A24 2402FF00 */ addiu $v0, $zero, -0x100
.L80139A28:
/* D0128 80139A28 00621025 */ or $v0, $v1, $v0
/* D012C 80139A2C AC820000 */ sw $v0, 0x0($a0)
/* D0130 80139A30 8FAD0088 */ lw $t5, 0x88($sp)
/* D0134 80139A34 15A00091 */ bnez $t5, .L80139C7C
/* D0138 80139A38 00000000 */ nop
/* D013C 80139A3C 3C06800A */ lui $a2, %hi(gMainGfxPos)
/* D0140 80139A40 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos)
/* D0144 80139A44 8CC50000 */ lw $a1, 0x0($a2)
/* D0148 80139A48 87C3000E */ lh $v1, 0xE($fp)
/* D014C 80139A4C 87C2000A */ lh $v0, 0xA($fp)
/* D0150 80139A50 3C014200 */ lui $at, (0x42000000 >> 16)
/* D0154 80139A54 44811000 */ mtc1 $at, $f2
/* D0158 80139A58 00A0382D */ daddu $a3, $a1, $zero
/* D015C 80139A5C 24A50008 */ addiu $a1, $a1, 0x8
/* D0160 80139A60 00621821 */ addu $v1, $v1, $v0
/* D0164 80139A64 00031880 */ sll $v1, $v1, 2
/* D0168 80139A68 30630FFF */ andi $v1, $v1, 0xFFF
/* D016C 80139A6C ACC50000 */ sw $a1, 0x0($a2)
/* D0170 80139A70 87C20010 */ lh $v0, 0x10($fp)
/* D0174 80139A74 87C4000C */ lh $a0, 0xC($fp)
/* D0178 80139A78 00031B00 */ sll $v1, $v1, 12
/* D017C 80139A7C 00441021 */ addu $v0, $v0, $a0
/* D0180 80139A80 00021080 */ sll $v0, $v0, 2
/* D0184 80139A84 30420FFF */ andi $v0, $v0, 0xFFF
/* D0188 80139A88 3C04E400 */ lui $a0, (0xE4000000 >> 16)
/* D018C 80139A8C 00441025 */ or $v0, $v0, $a0
/* D0190 80139A90 00621825 */ or $v1, $v1, $v0
/* D0194 80139A94 ACE30000 */ sw $v1, 0x0($a3)
/* D0198 80139A98 87C3000E */ lh $v1, 0xE($fp)
/* D019C 80139A9C 24A20008 */ addiu $v0, $a1, 0x8
/* D01A0 80139AA0 ACC20000 */ sw $v0, 0x0($a2)
/* D01A4 80139AA4 2402000C */ addiu $v0, $zero, 0xC
/* D01A8 80139AA8 8FAD008C */ lw $t5, 0x8C($sp)
/* D01AC 80139AAC 00031880 */ sll $v1, $v1, 2
/* D01B0 80139AB0 30630FFF */ andi $v1, $v1, 0xFFF
/* D01B4 80139AB4 004D1023 */ subu $v0, $v0, $t5
/* D01B8 80139AB8 44820000 */ mtc1 $v0, $f0
/* D01BC 80139ABC 00000000 */ nop
/* D01C0 80139AC0 46800020 */ cvt.s.w $f0, $f0
/* D01C4 80139AC4 00031B00 */ sll $v1, $v1, 12
/* D01C8 80139AC8 46020002 */ mul.s $f0, $f0, $f2
/* D01CC 80139ACC 00000000 */ nop
/* D01D0 80139AD0 87C20010 */ lh $v0, 0x10($fp)
/* D01D4 80139AD4 3C014180 */ lui $at, (0x41800000 >> 16)
/* D01D8 80139AD8 44811000 */ mtc1 $at, $f2
/* D01DC 80139ADC 00021080 */ sll $v0, $v0, 2
/* D01E0 80139AE0 30420FFF */ andi $v0, $v0, 0xFFF
/* D01E4 80139AE4 00621825 */ or $v1, $v1, $v0
/* D01E8 80139AE8 46160003 */ div.s $f0, $f0, $f22
/* D01EC 80139AEC 46020000 */ add.s $f0, $f0, $f2
/* D01F0 80139AF0 3C014480 */ lui $at, (0x44800000 >> 16)
/* D01F4 80139AF4 44811000 */ mtc1 $at, $f2
/* D01F8 80139AF8 3C02E100 */ lui $v0, (0xE1000000 >> 16)
/* D01FC 80139AFC ACE30004 */ sw $v1, 0x4($a3)
/* D0200 80139B00 46020000 */ add.s $f0, $f0, $f2
/* D0204 80139B04 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* D0208 80139B08 44811000 */ mtc1 $at, $f2
/* D020C 80139B0C 24A70004 */ addiu $a3, $a1, 0x4
/* D0210 80139B10 4600103E */ c.le.s $f2, $f0
/* D0214 80139B14 00000000 */ nop
/* D0218 80139B18 45010005 */ bc1t .L80139B30
/* D021C 80139B1C ACA20000 */ sw $v0, 0x0($a1)
/* D0220 80139B20 4600028D */ trunc.w.s $f10, $f0
/* D0224 80139B24 44035000 */ mfc1 $v1, $f10
/* D0228 80139B28 0804E6D3 */ j .L80139B4C
/* D022C 80139B2C 24020013 */ addiu $v0, $zero, 0x13
.L80139B30:
/* D0230 80139B30 46020001 */ sub.s $f0, $f0, $f2
/* D0234 80139B34 3C028000 */ lui $v0, (0x80000000 >> 16)
/* D0238 80139B38 4600028D */ trunc.w.s $f10, $f0
/* D023C 80139B3C 44035000 */ mfc1 $v1, $f10
/* D0240 80139B40 00000000 */ nop
/* D0244 80139B44 00621825 */ or $v1, $v1, $v0
/* D0248 80139B48 24020013 */ addiu $v0, $zero, 0x13
.L80139B4C:
/* D024C 80139B4C 8FAD0090 */ lw $t5, 0x90($sp)
/* D0250 80139B50 3C014200 */ lui $at, (0x42000000 >> 16)
/* D0254 80139B54 44811000 */ mtc1 $at, $f2
/* D0258 80139B58 004D1023 */ subu $v0, $v0, $t5
/* D025C 80139B5C 44820000 */ mtc1 $v0, $f0
/* D0260 80139B60 00000000 */ nop
/* D0264 80139B64 46800020 */ cvt.s.w $f0, $f0
/* D0268 80139B68 46020002 */ mul.s $f0, $f0, $f2
/* D026C 80139B6C 00000000 */ nop
/* D0270 80139B70 3C014180 */ lui $at, (0x41800000 >> 16)
/* D0274 80139B74 44811000 */ mtc1 $at, $f2
/* D0278 80139B78 46160003 */ div.s $f0, $f0, $f22
/* D027C 80139B7C 46020000 */ add.s $f0, $f0, $f2
/* D0280 80139B80 3C014480 */ lui $at, (0x44800000 >> 16)
/* D0284 80139B84 44811000 */ mtc1 $at, $f2
/* D0288 80139B88 00000000 */ nop
/* D028C 80139B8C 46020000 */ add.s $f0, $f0, $f2
/* D0290 80139B90 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* D0294 80139B94 44811000 */ mtc1 $at, $f2
/* D0298 80139B98 00000000 */ nop
/* D029C 80139B9C 4600103E */ c.le.s $f2, $f0
/* D02A0 80139BA0 00000000 */ nop
/* D02A4 80139BA4 45010005 */ bc1t .L80139BBC
/* D02A8 80139BA8 00033400 */ sll $a2, $v1, 16
/* D02AC 80139BAC 4600028D */ trunc.w.s $f10, $f0
/* D02B0 80139BB0 44045000 */ mfc1 $a0, $f10
/* D02B4 80139BB4 0804E6F5 */ j .L80139BD4
/* D02B8 80139BB8 00000000 */ nop
.L80139BBC:
/* D02BC 80139BBC 46020001 */ sub.s $f0, $f0, $f2
/* D02C0 80139BC0 3C028000 */ lui $v0, (0x80000000 >> 16)
/* D02C4 80139BC4 4600028D */ trunc.w.s $f10, $f0
/* D02C8 80139BC8 44045000 */ mfc1 $a0, $f10
/* D02CC 80139BCC 00000000 */ nop
/* D02D0 80139BD0 00822025 */ or $a0, $a0, $v0
.L80139BD4:
/* D02D4 80139BD4 3C05800A */ lui $a1, %hi(gMainGfxPos)
/* D02D8 80139BD8 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos)
/* D02DC 80139BDC 3082FFFF */ andi $v0, $a0, 0xFFFF
/* D02E0 80139BE0 8CA30000 */ lw $v1, 0x0($a1)
/* D02E4 80139BE4 00C21025 */ or $v0, $a2, $v0
/* D02E8 80139BE8 ACE20000 */ sw $v0, 0x0($a3)
/* D02EC 80139BEC 3C02F100 */ lui $v0, (0xF1000000 >> 16)
/* D02F0 80139BF0 3C014480 */ lui $at, (0x44800000 >> 16)
/* D02F4 80139BF4 44810000 */ mtc1 $at, $f0
/* D02F8 80139BF8 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* D02FC 80139BFC 44811000 */ mtc1 $at, $f2
/* D0300 80139C00 0060202D */ daddu $a0, $v1, $zero
/* D0304 80139C04 24630008 */ addiu $v1, $v1, 0x8
/* D0308 80139C08 46160003 */ div.s $f0, $f0, $f22
/* D030C 80139C0C ACA30000 */ sw $v1, 0x0($a1)
/* D0310 80139C10 AC820000 */ sw $v0, 0x0($a0)
/* D0314 80139C14 4600103E */ c.le.s $f2, $f0
/* D0318 80139C18 00000000 */ nop
/* D031C 80139C1C 45010005 */ bc1t .L80139C34
/* D0320 80139C20 24840004 */ addiu $a0, $a0, 0x4
/* D0324 80139C24 4600028D */ trunc.w.s $f10, $f0
/* D0328 80139C28 44035000 */ mfc1 $v1, $f10
/* D032C 80139C2C 0804E714 */ j .L80139C50
/* D0330 80139C30 00032C00 */ sll $a1, $v1, 16
.L80139C34:
/* D0334 80139C34 46020001 */ sub.s $f0, $f0, $f2
/* D0338 80139C38 3C028000 */ lui $v0, (0x80000000 >> 16)
/* D033C 80139C3C 4600028D */ trunc.w.s $f10, $f0
/* D0340 80139C40 44035000 */ mfc1 $v1, $f10
/* D0344 80139C44 00000000 */ nop
/* D0348 80139C48 00621825 */ or $v1, $v1, $v0
/* D034C 80139C4C 00032C00 */ sll $a1, $v1, 16
.L80139C50:
/* D0350 80139C50 3C014480 */ lui $at, (0x44800000 >> 16)
/* D0354 80139C54 44810000 */ mtc1 $at, $f0
/* D0358 80139C58 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* D035C 80139C5C 44811000 */ mtc1 $at, $f2
/* D0360 80139C60 46160003 */ div.s $f0, $f0, $f22
/* D0364 80139C64 4600103E */ c.le.s $f2, $f0
/* D0368 80139C68 00000000 */ nop
/* D036C 80139C6C 4500008A */ bc1f .L80139E98
/* D0370 80139C70 00000000 */ nop
/* D0374 80139C74 0804E7AA */ j .L80139EA8
/* D0378 80139C78 46020001 */ sub.s $f0, $f0, $f2
.L80139C7C:
/* D037C 80139C7C 3C06800A */ lui $a2, %hi(gMainGfxPos)
/* D0380 80139C80 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos)
/* D0384 80139C84 8CC50000 */ lw $a1, 0x0($a2)
/* D0388 80139C88 87C3000E */ lh $v1, 0xE($fp)
/* D038C 80139C8C 87C2000A */ lh $v0, 0xA($fp)
/* D0390 80139C90 3C014200 */ lui $at, (0x42000000 >> 16)
/* D0394 80139C94 44811000 */ mtc1 $at, $f2
/* D0398 80139C98 00A0382D */ daddu $a3, $a1, $zero
/* D039C 80139C9C 24A50008 */ addiu $a1, $a1, 0x8
/* D03A0 80139CA0 00621821 */ addu $v1, $v1, $v0
/* D03A4 80139CA4 00031880 */ sll $v1, $v1, 2
/* D03A8 80139CA8 30630FFF */ andi $v1, $v1, 0xFFF
/* D03AC 80139CAC ACC50000 */ sw $a1, 0x0($a2)
/* D03B0 80139CB0 87C20010 */ lh $v0, 0x10($fp)
/* D03B4 80139CB4 87C4000C */ lh $a0, 0xC($fp)
/* D03B8 80139CB8 00031B00 */ sll $v1, $v1, 12
/* D03BC 80139CBC 00441021 */ addu $v0, $v0, $a0
/* D03C0 80139CC0 00021080 */ sll $v0, $v0, 2
/* D03C4 80139CC4 30420FFF */ andi $v0, $v0, 0xFFF
/* D03C8 80139CC8 3C04E400 */ lui $a0, (0xE4000000 >> 16)
/* D03CC 80139CCC 00441025 */ or $v0, $v0, $a0
/* D03D0 80139CD0 00621825 */ or $v1, $v1, $v0
/* D03D4 80139CD4 ACE30000 */ sw $v1, 0x0($a3)
/* D03D8 80139CD8 87C3000E */ lh $v1, 0xE($fp)
/* D03DC 80139CDC 24A20008 */ addiu $v0, $a1, 0x8
/* D03E0 80139CE0 ACC20000 */ sw $v0, 0x0($a2)
/* D03E4 80139CE4 24020009 */ addiu $v0, $zero, 0x9
/* D03E8 80139CE8 87C40010 */ lh $a0, 0x10($fp)
/* D03EC 80139CEC 8FAD008C */ lw $t5, 0x8C($sp)
/* D03F0 80139CF0 00031880 */ sll $v1, $v1, 2
/* D03F4 80139CF4 30630FFF */ andi $v1, $v1, 0xFFF
/* D03F8 80139CF8 00031B00 */ sll $v1, $v1, 12
/* D03FC 80139CFC 00042080 */ sll $a0, $a0, 2
/* D0400 80139D00 004D1023 */ subu $v0, $v0, $t5
/* D0404 80139D04 44820000 */ mtc1 $v0, $f0
/* D0408 80139D08 00000000 */ nop
/* D040C 80139D0C 46800020 */ cvt.s.w $f0, $f0
/* D0410 80139D10 30840FFF */ andi $a0, $a0, 0xFFF
/* D0414 80139D14 46020002 */ mul.s $f0, $f0, $f2
/* D0418 80139D18 00000000 */ nop
/* D041C 80139D1C 00641825 */ or $v1, $v1, $a0
/* D0420 80139D20 3C014480 */ lui $at, (0x44800000 >> 16)
/* D0424 80139D24 44811000 */ mtc1 $at, $f2
/* D0428 80139D28 3C02E100 */ lui $v0, (0xE1000000 >> 16)
/* D042C 80139D2C ACE30004 */ sw $v1, 0x4($a3)
/* D0430 80139D30 46160003 */ div.s $f0, $f0, $f22
/* D0434 80139D34 46020000 */ add.s $f0, $f0, $f2
/* D0438 80139D38 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* D043C 80139D3C 44811000 */ mtc1 $at, $f2
/* D0440 80139D40 24A70004 */ addiu $a3, $a1, 0x4
/* D0444 80139D44 4600103E */ c.le.s $f2, $f0
/* D0448 80139D48 00000000 */ nop
/* D044C 80139D4C 45010005 */ bc1t .L80139D64
/* D0450 80139D50 ACA20000 */ sw $v0, 0x0($a1)
/* D0454 80139D54 4600028D */ trunc.w.s $f10, $f0
/* D0458 80139D58 44035000 */ mfc1 $v1, $f10
/* D045C 80139D5C 0804E760 */ j .L80139D80
/* D0460 80139D60 24020020 */ addiu $v0, $zero, 0x20
.L80139D64:
/* D0464 80139D64 46020001 */ sub.s $f0, $f0, $f2
/* D0468 80139D68 3C028000 */ lui $v0, (0x80000000 >> 16)
/* D046C 80139D6C 4600028D */ trunc.w.s $f10, $f0
/* D0470 80139D70 44035000 */ mfc1 $v1, $f10
/* D0474 80139D74 00000000 */ nop
/* D0478 80139D78 00621825 */ or $v1, $v1, $v0
/* D047C 80139D7C 24020020 */ addiu $v0, $zero, 0x20
.L80139D80:
/* D0480 80139D80 8FAD0090 */ lw $t5, 0x90($sp)
/* D0484 80139D84 3C014200 */ lui $at, (0x42000000 >> 16)
/* D0488 80139D88 44811000 */ mtc1 $at, $f2
/* D048C 80139D8C 004D1023 */ subu $v0, $v0, $t5
/* D0490 80139D90 44820000 */ mtc1 $v0, $f0
/* D0494 80139D94 00000000 */ nop
/* D0498 80139D98 46800020 */ cvt.s.w $f0, $f0
/* D049C 80139D9C 46020002 */ mul.s $f0, $f0, $f2
/* D04A0 80139DA0 00000000 */ nop
/* D04A4 80139DA4 3C014480 */ lui $at, (0x44800000 >> 16)
/* D04A8 80139DA8 44811000 */ mtc1 $at, $f2
/* D04AC 80139DAC 46160003 */ div.s $f0, $f0, $f22
/* D04B0 80139DB0 46020000 */ add.s $f0, $f0, $f2
/* D04B4 80139DB4 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* D04B8 80139DB8 44811000 */ mtc1 $at, $f2
/* D04BC 80139DBC 00000000 */ nop
/* D04C0 80139DC0 4600103E */ c.le.s $f2, $f0
/* D04C4 80139DC4 00000000 */ nop
/* D04C8 80139DC8 45010005 */ bc1t .L80139DE0
/* D04CC 80139DCC 00033400 */ sll $a2, $v1, 16
/* D04D0 80139DD0 4600028D */ trunc.w.s $f10, $f0
/* D04D4 80139DD4 44045000 */ mfc1 $a0, $f10
/* D04D8 80139DD8 0804E77E */ j .L80139DF8
/* D04DC 80139DDC 00000000 */ nop
.L80139DE0:
/* D04E0 80139DE0 46020001 */ sub.s $f0, $f0, $f2
/* D04E4 80139DE4 3C028000 */ lui $v0, (0x80000000 >> 16)
/* D04E8 80139DE8 4600028D */ trunc.w.s $f10, $f0
/* D04EC 80139DEC 44045000 */ mfc1 $a0, $f10
/* D04F0 80139DF0 00000000 */ nop
/* D04F4 80139DF4 00822025 */ or $a0, $a0, $v0
.L80139DF8:
/* D04F8 80139DF8 3C05800A */ lui $a1, %hi(gMainGfxPos)
/* D04FC 80139DFC 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos)
/* D0500 80139E00 3082FFFF */ andi $v0, $a0, 0xFFFF
/* D0504 80139E04 8CA30000 */ lw $v1, 0x0($a1)
/* D0508 80139E08 00C21025 */ or $v0, $a2, $v0
/* D050C 80139E0C ACE20000 */ sw $v0, 0x0($a3)
/* D0510 80139E10 3C02F100 */ lui $v0, (0xF1000000 >> 16)
/* D0514 80139E14 3C014480 */ lui $at, (0x44800000 >> 16)
/* D0518 80139E18 44810000 */ mtc1 $at, $f0
/* D051C 80139E1C 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* D0520 80139E20 44811000 */ mtc1 $at, $f2
/* D0524 80139E24 0060202D */ daddu $a0, $v1, $zero
/* D0528 80139E28 24630008 */ addiu $v1, $v1, 0x8
/* D052C 80139E2C 46160003 */ div.s $f0, $f0, $f22
/* D0530 80139E30 ACA30000 */ sw $v1, 0x0($a1)
/* D0534 80139E34 AC820000 */ sw $v0, 0x0($a0)
/* D0538 80139E38 4600103E */ c.le.s $f2, $f0
/* D053C 80139E3C 00000000 */ nop
/* D0540 80139E40 45010005 */ bc1t .L80139E58
/* D0544 80139E44 24840004 */ addiu $a0, $a0, 0x4
/* D0548 80139E48 4600028D */ trunc.w.s $f10, $f0
/* D054C 80139E4C 44035000 */ mfc1 $v1, $f10
/* D0550 80139E50 0804E79D */ j .L80139E74
/* D0554 80139E54 00032C00 */ sll $a1, $v1, 16
.L80139E58:
/* D0558 80139E58 46020001 */ sub.s $f0, $f0, $f2
/* D055C 80139E5C 3C028000 */ lui $v0, (0x80000000 >> 16)
/* D0560 80139E60 4600028D */ trunc.w.s $f10, $f0
/* D0564 80139E64 44035000 */ mfc1 $v1, $f10
/* D0568 80139E68 00000000 */ nop
/* D056C 80139E6C 00621825 */ or $v1, $v1, $v0
/* D0570 80139E70 00032C00 */ sll $a1, $v1, 16
.L80139E74:
/* D0574 80139E74 3C014480 */ lui $at, (0x44800000 >> 16)
/* D0578 80139E78 44810000 */ mtc1 $at, $f0
/* D057C 80139E7C 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* D0580 80139E80 44811000 */ mtc1 $at, $f2
/* D0584 80139E84 46160003 */ div.s $f0, $f0, $f22
/* D0588 80139E88 4600103E */ c.le.s $f2, $f0
/* D058C 80139E8C 00000000 */ nop
/* D0590 80139E90 45030005 */ bc1tl .L80139EA8
/* D0594 80139E94 46020001 */ sub.s $f0, $f0, $f2
.L80139E98:
/* D0598 80139E98 4600028D */ trunc.w.s $f10, $f0
/* D059C 80139E9C 44035000 */ mfc1 $v1, $f10
/* D05A0 80139EA0 0804E7B0 */ j .L80139EC0
/* D05A4 80139EA4 3062FFFF */ andi $v0, $v1, 0xFFFF
.L80139EA8:
/* D05A8 80139EA8 3C028000 */ lui $v0, (0x80000000 >> 16)
/* D05AC 80139EAC 4600028D */ trunc.w.s $f10, $f0
/* D05B0 80139EB0 44035000 */ mfc1 $v1, $f10
/* D05B4 80139EB4 00000000 */ nop
/* D05B8 80139EB8 00621825 */ or $v1, $v1, $v0
/* D05BC 80139EBC 3062FFFF */ andi $v0, $v1, 0xFFFF
.L80139EC0:
/* D05C0 80139EC0 00A21025 */ or $v0, $a1, $v0
/* D05C4 80139EC4 AC820000 */ sw $v0, 0x0($a0)
.L80139EC8:
/* D05C8 80139EC8 8FBF0054 */ lw $ra, 0x54($sp)
/* D05CC 80139ECC 8FBE0050 */ lw $fp, 0x50($sp)
/* D05D0 80139ED0 8FB7004C */ lw $s7, 0x4C($sp)
/* D05D4 80139ED4 8FB60048 */ lw $s6, 0x48($sp)
/* D05D8 80139ED8 8FB50044 */ lw $s5, 0x44($sp)
/* D05DC 80139EDC 8FB40040 */ lw $s4, 0x40($sp)
/* D05E0 80139EE0 8FB3003C */ lw $s3, 0x3C($sp)
/* D05E4 80139EE4 8FB20038 */ lw $s2, 0x38($sp)
/* D05E8 80139EE8 8FB10034 */ lw $s1, 0x34($sp)
/* D05EC 80139EEC 8FB00030 */ lw $s0, 0x30($sp)
/* D05F0 80139EF0 D7BE0080 */ ldc1 $f30, 0x80($sp)
/* D05F4 80139EF4 D7BC0078 */ ldc1 $f28, 0x78($sp)
/* D05F8 80139EF8 D7BA0070 */ ldc1 $f26, 0x70($sp)
/* D05FC 80139EFC D7B80068 */ ldc1 $f24, 0x68($sp)
/* D0600 80139F00 D7B60060 */ ldc1 $f22, 0x60($sp)
/* D0604 80139F04 D7B40058 */ ldc1 $f20, 0x58($sp)
/* D0608 80139F08 03E00008 */ jr $ra
/* D060C 80139F0C 27BD0088 */ addiu $sp, $sp, 0x88
### DECOMPILED C INSTRUCTIONS:
void appendGfx_darkness_stencil(b32 isWorld, s32 posX, s32 posY, f32 alpha, f32 progress) {
Camera* camera = &gCameras[gCurrentCameraID];
f32 texScale, f24;
s32 i;
if (alpha == 0.0f) {
return;
}
if (!isWorld) {
texScale = (255.0f - alpha) * 10.0f / 255.0f + 0.14;
} else {
texScale = 0.5f;
texScale = (255.0f - alpha) * 9.5f / 255.0f + texScale;
posX += (camera->viewportW / 2 - posX) * (255.0f - alpha) / 255.0f;
posY += (camera->viewportH / 2 - posY) * (255.0f - alpha) / 255.0f;
}
guOrtho(&gDisplayContext->matrixStack[gMatrixListPos], -16.0f, 0.0f, 0.0f, 16.0f, -1000.0f, 1000.0f, 1.0f);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gDPSetAlphaDither(gMainGfxPos++, G_AD_PATTERN);
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 64, osVirtualToPhysical(nuGfxZBuffer));
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, 64, 64);
gSPViewport(gMainGfxPos++, &DarknessStencilViewport);
gDPSetCombineMode(gMainGfxPos++, PM_CC_CONST_1, PM_CC_CONST_1);
guRotate(&gDisplayContext->matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, Gfx_DarknessStencilQuad);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMainGfxPos++);
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 0, PRIMITIVE, TEXEL0, PRIMITIVE, 0, 0, 0, 0, 0, PRIMITIVE, TEXEL0, PRIMITIVE, 0);
for (i = 0; i < 2; i++) {
f32 f20;
f32 f2;
s32 s0 = 255;
if (i == 0) {
f20 = 0.9 - sin_deg(gGameStatusPtr->frameCounter) * 0.05;
} else {
f20 = 0.9 - sin_deg(gGameStatusPtr->frameCounter * 2 + i * 40) * 0.07;
}
f2 = 0;
if (s0 > 255) {
s0 = 255;
}
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, s0);
guRotate(&gDisplayContext->matrixStack[gMatrixListPos], i * 70 + f2, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guScale(&gDisplayContext->matrixStack[gMatrixListPos], f20, f20, 1.0f);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, Gfx_DarknessStencilQuad);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}
gDPPipeSync(gMainGfxPos++);
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_I, G_IM_SIZ_8b, 64, osVirtualToPhysical(nuGfxZBuffer));
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, 64, 64);
gDPSetCombineMode(gMainGfxPos++, PM_CC_0F, PM_CC_0F);
for (i = 0; i < 4; i++) {
gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[i * 2048]), G_IM_FMT_RGBA, G_IM_SIZ_32b, 64, 16, 0, 0, 63, 15, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gDPPipeSync(gMainGfxPos++);
gSPTextureRectangle(gMainGfxPos++, 0, (i * 16) * 4, 64 * 4, (i * 16 + 16) * 4, G_TX_RENDERTILE, 0, 0, 0x400, 0x400);
gDPPipeSync(gMainGfxPos++);
}
gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(nuGfxZBuffer), G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, 0, 63, 63,
0, G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, 6, 6, 15, 15);
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, 0, 0x01FC, 0x01FC);
gDPPipeSync(gMainGfxPos++);
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 64, osVirtualToPhysical(nuGfxZBuffer));
gDPSetFillColor(gMainGfxPos++, GPACK_ZDZ(G_MAXFBZ, 0)<<16 | GPACK_ZDZ(G_MAXFBZ, 0));
gDPFillRectangle(gMainGfxPos++, 0, 0, 63, 63);
gDPPipeSync(gMainGfxPos++);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
gDPSetColorDither(gMainGfxPos++, G_CD_MAGICSQ);
gDPSetAlphaDither(gMainGfxPos++, G_AD_PATTERN);
gDPSetTextureFilter(gMainGfxPos++, G_TF_AVERAGE);
gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
if (alpha != 255.0f || isWorld == 1) {
gDPSetCombineLERP(gMainGfxPos++, 1, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, ENVIRONMENT, PRIMITIVE, 1, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, ENVIRONMENT, PRIMITIVE);
} else {
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 0, 1, 0, ENVIRONMENT, PRIMITIVE, 0, 0, 0, 0, 1, 0, ENVIRONMENT, PRIMITIVE);
}
alpha *= 0.5f;
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, alpha * 0.5f * progress / 255.0f);
gDPSetEnvColor(gMainGfxPos++, 255, 255, 255, (255.0f - alpha * 0.5f) * progress / 255.0f);
if (!isWorld) {
gSPTextureRectangle(gMainGfxPos++,
camera->viewportStartX * 4, camera->viewportStartY * 4,
(camera->viewportStartX + camera->viewportW) * 4, (camera->viewportStartY + camera->viewportH) * 4,
G_TX_RENDERTILE,
(12 - posX) * 32.0f / texScale + 16.0f + 1024.0f, (19 - posY) * 32.0f / texScale + 16.0f + 1024.0f,
1024.0f / texScale, 1024.0f / texScale);
} else {
gSPTextureRectangle(gMainGfxPos++,
camera->viewportStartX * 4, camera->viewportStartY * 4,
(camera->viewportStartX + camera->viewportW) * 4, (camera->viewportStartY + camera->viewportH) * 4,
G_TX_RENDERTILE,
(9 - posX) * 32.0f / texScale + 1024.0f, (32 - posY) * 32.0f / texScale + 1024.0f,
1024.0f / texScale, 1024.0f / texScale);
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_80262240
/* 190B20 80262240 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 190B24 80262244 0080582D */ daddu $t3, $a0, $zero
/* 190B28 80262248 AFB5003C */ sw $s5, 0x3C($sp)
/* 190B2C 8026224C 0000A82D */ daddu $s5, $zero, $zero
/* 190B30 80262250 AFB70044 */ sw $s7, 0x44($sp)
/* 190B34 80262254 AFB60040 */ sw $s6, 0x40($sp)
/* 190B38 80262258 3C16800E */ lui $s6, %hi(gBattleStatus)
/* 190B3C 8026225C 26D6C070 */ addiu $s6, $s6, %lo(gBattleStatus)
/* 190B40 80262260 AFBF004C */ sw $ra, 0x4C($sp)
/* 190B44 80262264 AFBE0048 */ sw $fp, 0x48($sp)
/* 190B48 80262268 AFB40038 */ sw $s4, 0x38($sp)
/* 190B4C 8026226C AFB30034 */ sw $s3, 0x34($sp)
/* 190B50 80262270 AFB20030 */ sw $s2, 0x30($sp)
/* 190B54 80262274 AFB1002C */ sw $s1, 0x2C($sp)
/* 190B58 80262278 AFB00028 */ sw $s0, 0x28($sp)
/* 190B5C 8026227C AFA00018 */ sw $zero, 0x18($sp)
/* 190B60 80262280 8EC300D8 */ lw $v1, 0xD8($s6)
/* 190B64 80262284 8EC20184 */ lw $v0, 0x184($s6)
/* 190B68 80262288 8EC400DC */ lw $a0, 0xDC($s6)
/* 190B6C 8026228C 04410004 */ bgez $v0, .L802622A0
/* 190B70 80262290 2577022C */ addiu $s7, $t3, 0x22C
/* 190B74 80262294 2402FFFF */ addiu $v0, $zero, -0x1
/* 190B78 80262298 08098BFF */ j .L80262FFC
/* 190B7C 8026229C A162040C */ sb $v0, 0x40C($t3)
.L802622A0:
/* 190B80 802622A0 30420008 */ andi $v0, $v0, 0x8
/* 190B84 802622A4 1040005B */ beqz $v0, .L80262414
/* 190B88 802622A8 24020001 */ addiu $v0, $zero, 0x1
/* 190B8C 802622AC A560022C */ sh $zero, 0x22C($t3)
/* 190B90 802622B0 14A00029 */ bnez $a1, .L80262358
/* 190B94 802622B4 A562022E */ sh $v0, 0x22E($t3)
/* 190B98 802622B8 90620190 */ lbu $v0, 0x190($v1)
/* 190B9C 802622BC 3C01802A */ lui $at, %hi(D_8029D5A0)
/* 190BA0 802622C0 D420D5A0 */ ldc1 $f0, %lo(D_8029D5A0)($at)
/* 190BA4 802622C4 44821000 */ mtc1 $v0, $f2
/* 190BA8 802622C8 00000000 */ nop
/* 190BAC 802622CC 468010A1 */ cvt.d.w $f2, $f2
/* 190BB0 802622D0 46201082 */ mul.d $f2, $f2, $f0
/* 190BB4 802622D4 00000000 */ nop
/* 190BB8 802622D8 C4600188 */ lwc1 $f0, 0x188($v1)
/* 190BBC 802622DC 46000021 */ cvt.d.s $f0, $f0
/* 190BC0 802622E0 46201082 */ mul.d $f2, $f2, $f0
/* 190BC4 802622E4 00000000 */ nop
/* 190BC8 802622E8 C4600144 */ lwc1 $f0, 0x144($v1)
/* 190BCC 802622EC 46000021 */ cvt.d.s $f0, $f0
/* 190BD0 802622F0 46220000 */ add.d $f0, $f0, $f2
/* 190BD4 802622F4 4620048D */ trunc.w.d $f18, $f0
/* 190BD8 802622F8 44029000 */ mfc1 $v0, $f18
/* 190BDC 802622FC 00000000 */ nop
/* 190BE0 80262300 A5620230 */ sh $v0, 0x230($t3)
/* 190BE4 80262304 90620191 */ lbu $v0, 0x191($v1)
/* 190BE8 80262308 3C01802A */ lui $at, %hi(D_8029D5A8)
/* 190BEC 8026230C D420D5A8 */ ldc1 $f0, %lo(D_8029D5A8)($at)
/* 190BF0 80262310 44821000 */ mtc1 $v0, $f2
/* 190BF4 80262314 00000000 */ nop
/* 190BF8 80262318 468010A1 */ cvt.d.w $f2, $f2
/* 190BFC 8026231C 46201082 */ mul.d $f2, $f2, $f0
/* 190C00 80262320 00000000 */ nop
/* 190C04 80262324 C4600188 */ lwc1 $f0, 0x188($v1)
/* 190C08 80262328 46000021 */ cvt.d.s $f0, $f0
/* 190C0C 8026232C 46201082 */ mul.d $f2, $f2, $f0
/* 190C10 80262330 00000000 */ nop
/* 190C14 80262334 C4600148 */ lwc1 $f0, 0x148($v1)
/* 190C18 80262338 46000021 */ cvt.d.s $f0, $f0
/* 190C1C 8026233C 46220000 */ add.d $f0, $f0, $f2
/* 190C20 80262340 4620048D */ trunc.w.d $f18, $f0
/* 190C24 80262344 44029000 */ mfc1 $v0, $f18
/* 190C28 80262348 00000000 */ nop
/* 190C2C 8026234C A5620232 */ sh $v0, 0x232($t3)
/* 190C30 80262350 080988FD */ j .L802623F4
/* 190C34 80262354 C460014C */ lwc1 $f0, 0x14C($v1)
.L80262358:
/* 190C38 80262358 90620190 */ lbu $v0, 0x190($v1)
/* 190C3C 8026235C 3C01802A */ lui $at, %hi(D_8029D5B0)
/* 190C40 80262360 D420D5B0 */ ldc1 $f0, %lo(D_8029D5B0)($at)
/* 190C44 80262364 44821000 */ mtc1 $v0, $f2
/* 190C48 80262368 00000000 */ nop
/* 190C4C 8026236C 468010A1 */ cvt.d.w $f2, $f2
/* 190C50 80262370 46201082 */ mul.d $f2, $f2, $f0
/* 190C54 80262374 00000000 */ nop
/* 190C58 80262378 C4600188 */ lwc1 $f0, 0x188($v1)
/* 190C5C 8026237C 46000021 */ cvt.d.s $f0, $f0
/* 190C60 80262380 46201082 */ mul.d $f2, $f2, $f0
/* 190C64 80262384 00000000 */ nop
/* 190C68 80262388 C4600138 */ lwc1 $f0, 0x138($v1)
/* 190C6C 8026238C 46000021 */ cvt.d.s $f0, $f0
/* 190C70 80262390 46220000 */ add.d $f0, $f0, $f2
/* 190C74 80262394 4620048D */ trunc.w.d $f18, $f0
/* 190C78 80262398 44029000 */ mfc1 $v0, $f18
/* 190C7C 8026239C 00000000 */ nop
/* 190C80 802623A0 A5620230 */ sh $v0, 0x230($t3)
/* 190C84 802623A4 90620191 */ lbu $v0, 0x191($v1)
/* 190C88 802623A8 3C01802A */ lui $at, %hi(D_8029D5B8)
/* 190C8C 802623AC D420D5B8 */ ldc1 $f0, %lo(D_8029D5B8)($at)
/* 190C90 802623B0 44821000 */ mtc1 $v0, $f2
/* 190C94 802623B4 00000000 */ nop
/* 190C98 802623B8 468010A1 */ cvt.d.w $f2, $f2
/* 190C9C 802623BC 46201082 */ mul.d $f2, $f2, $f0
/* 190CA0 802623C0 00000000 */ nop
/* 190CA4 802623C4 C4600188 */ lwc1 $f0, 0x188($v1)
/* 190CA8 802623C8 46000021 */ cvt.d.s $f0, $f0
/* 190CAC 802623CC 46201082 */ mul.d $f2, $f2, $f0
/* 190CB0 802623D0 00000000 */ nop
/* 190CB4 802623D4 C460013C */ lwc1 $f0, 0x13C($v1)
/* 190CB8 802623D8 46000021 */ cvt.d.s $f0, $f0
/* 190CBC 802623DC 46220000 */ add.d $f0, $f0, $f2
/* 190CC0 802623E0 4620048D */ trunc.w.d $f18, $f0
/* 190CC4 802623E4 44029000 */ mfc1 $v0, $f18
/* 190CC8 802623E8 00000000 */ nop
/* 190CCC 802623EC A5620232 */ sh $v0, 0x232($t3)
/* 190CD0 802623F0 C4600140 */ lwc1 $f0, 0x140($v1)
.L802623F4:
/* 190CD4 802623F4 4600048D */ trunc.w.s $f18, $f0
/* 190CD8 802623F8 44029000 */ mfc1 $v0, $f18
/* 190CDC 802623FC 00000000 */ nop
/* 190CE0 80262400 A5620234 */ sh $v0, 0x234($t3)
/* 190CE4 80262404 2402FF9C */ addiu $v0, $zero, -0x64
/* 190CE8 80262408 A2E20010 */ sb $v0, 0x10($s7)
/* 190CEC 8026240C 26B50001 */ addiu $s5, $s5, 0x1
/* 190CF0 80262410 26F70014 */ addiu $s7, $s7, 0x14
.L80262414:
/* 190CF4 80262414 8EC20184 */ lw $v0, 0x184($s6)
/* 190CF8 80262418 30420100 */ andi $v0, $v0, 0x100
/* 190CFC 8026241C 1040005F */ beqz $v0, .L8026259C
/* 190D00 80262420 0000982D */ daddu $s3, $zero, $zero
/* 190D04 80262424 1080005D */ beqz $a0, .L8026259C
/* 190D08 80262428 24020100 */ addiu $v0, $zero, 0x100
/* 190D0C 8026242C A6E20000 */ sh $v0, 0x0($s7)
/* 190D10 80262430 24020001 */ addiu $v0, $zero, 0x1
/* 190D14 80262434 14A00029 */ bnez $a1, .L802624DC
/* 190D18 80262438 A6E20002 */ sh $v0, 0x2($s7)
/* 190D1C 8026243C 90820190 */ lbu $v0, 0x190($a0)
/* 190D20 80262440 3C01802A */ lui $at, %hi(D_8029D5C0)
/* 190D24 80262444 D420D5C0 */ ldc1 $f0, %lo(D_8029D5C0)($at)
/* 190D28 80262448 44821000 */ mtc1 $v0, $f2
/* 190D2C 8026244C 00000000 */ nop
/* 190D30 80262450 468010A1 */ cvt.d.w $f2, $f2
/* 190D34 80262454 46201082 */ mul.d $f2, $f2, $f0
/* 190D38 80262458 00000000 */ nop
/* 190D3C 8026245C C4800188 */ lwc1 $f0, 0x188($a0)
/* 190D40 80262460 46000021 */ cvt.d.s $f0, $f0
/* 190D44 80262464 46201082 */ mul.d $f2, $f2, $f0
/* 190D48 80262468 00000000 */ nop
/* 190D4C 8026246C C4800144 */ lwc1 $f0, 0x144($a0)
/* 190D50 80262470 46000021 */ cvt.d.s $f0, $f0
/* 190D54 80262474 46220000 */ add.d $f0, $f0, $f2
/* 190D58 80262478 4620048D */ trunc.w.d $f18, $f0
/* 190D5C 8026247C 44029000 */ mfc1 $v0, $f18
/* 190D60 80262480 00000000 */ nop
/* 190D64 80262484 A6E20004 */ sh $v0, 0x4($s7)
/* 190D68 80262488 90820191 */ lbu $v0, 0x191($a0)
/* 190D6C 8026248C 3C01802A */ lui $at, %hi(D_8029D5C8)
/* 190D70 80262490 D420D5C8 */ ldc1 $f0, %lo(D_8029D5C8)($at)
/* 190D74 80262494 44821000 */ mtc1 $v0, $f2
/* 190D78 80262498 00000000 */ nop
/* 190D7C 8026249C 468010A1 */ cvt.d.w $f2, $f2
/* 190D80 802624A0 46201082 */ mul.d $f2, $f2, $f0
/* 190D84 802624A4 00000000 */ nop
/* 190D88 802624A8 C4800188 */ lwc1 $f0, 0x188($a0)
/* 190D8C 802624AC 46000021 */ cvt.d.s $f0, $f0
/* 190D90 802624B0 46201082 */ mul.d $f2, $f2, $f0
/* 190D94 802624B4 00000000 */ nop
/* 190D98 802624B8 C4800148 */ lwc1 $f0, 0x148($a0)
/* 190D9C 802624BC 46000021 */ cvt.d.s $f0, $f0
/* 190DA0 802624C0 46220000 */ add.d $f0, $f0, $f2
/* 190DA4 802624C4 4620048D */ trunc.w.d $f18, $f0
/* 190DA8 802624C8 44029000 */ mfc1 $v0, $f18
/* 190DAC 802624CC 00000000 */ nop
/* 190DB0 802624D0 A6E20006 */ sh $v0, 0x6($s7)
/* 190DB4 802624D4 0809895E */ j .L80262578
/* 190DB8 802624D8 C480014C */ lwc1 $f0, 0x14C($a0)
.L802624DC:
/* 190DBC 802624DC 90820190 */ lbu $v0, 0x190($a0)
/* 190DC0 802624E0 3C01802A */ lui $at, %hi(D_8029D5D0)
/* 190DC4 802624E4 D420D5D0 */ ldc1 $f0, %lo(D_8029D5D0)($at)
/* 190DC8 802624E8 44821000 */ mtc1 $v0, $f2
/* 190DCC 802624EC 00000000 */ nop
/* 190DD0 802624F0 468010A1 */ cvt.d.w $f2, $f2
/* 190DD4 802624F4 46201082 */ mul.d $f2, $f2, $f0
/* 190DD8 802624F8 00000000 */ nop
/* 190DDC 802624FC C4800188 */ lwc1 $f0, 0x188($a0)
/* 190DE0 80262500 46000021 */ cvt.d.s $f0, $f0
/* 190DE4 80262504 46201082 */ mul.d $f2, $f2, $f0
/* 190DE8 80262508 00000000 */ nop
/* 190DEC 8026250C C4800138 */ lwc1 $f0, 0x138($a0)
/* 190DF0 80262510 46000021 */ cvt.d.s $f0, $f0
/* 190DF4 80262514 46220000 */ add.d $f0, $f0, $f2
/* 190DF8 80262518 4620048D */ trunc.w.d $f18, $f0
/* 190DFC 8026251C 44029000 */ mfc1 $v0, $f18
/* 190E00 80262520 00000000 */ nop
/* 190E04 80262524 A6E20004 */ sh $v0, 0x4($s7)
/* 190E08 80262528 90820191 */ lbu $v0, 0x191($a0)
/* 190E0C 8026252C 3C01802A */ lui $at, %hi(D_8029D5D8)
/* 190E10 80262530 D420D5D8 */ ldc1 $f0, %lo(D_8029D5D8)($at)
/* 190E14 80262534 44821000 */ mtc1 $v0, $f2
/* 190E18 80262538 00000000 */ nop
/* 190E1C 8026253C 468010A1 */ cvt.d.w $f2, $f2
/* 190E20 80262540 46201082 */ mul.d $f2, $f2, $f0
D_80262544:
/* 190E24 80262544 00000000 */ nop
/* 190E28 80262548 C4800188 */ lwc1 $f0, 0x188($a0)
/* 190E2C 8026254C 46000021 */ cvt.d.s $f0, $f0
/* 190E30 80262550 46201082 */ mul.d $f2, $f2, $f0
/* 190E34 80262554 00000000 */ nop
/* 190E38 80262558 C480013C */ lwc1 $f0, 0x13C($a0)
/* 190E3C 8026255C 46000021 */ cvt.d.s $f0, $f0
/* 190E40 80262560 46220000 */ add.d $f0, $f0, $f2
D_80262564:
/* 190E44 80262564 4620048D */ trunc.w.d $f18, $f0
/* 190E48 80262568 44029000 */ mfc1 $v0, $f18
D_8026256C:
/* 190E4C 8026256C 00000000 */ nop
/* 190E50 80262570 A6E20006 */ sh $v0, 0x6($s7)
D_80262574:
/* 190E54 80262574 C4800140 */ lwc1 $f0, 0x140($a0)
.L80262578:
/* 190E58 80262578 4600048D */ trunc.w.s $f18, $f0
/* 190E5C 8026257C 44029000 */ mfc1 $v0, $f18
/* 190E60 80262580 00000000 */ nop
/* 190E64 80262584 A6E20008 */ sh $v0, 0x8($s7)
/* 190E68 80262588 2402FFCE */ addiu $v0, $zero, -0x32
/* 190E6C 8026258C A2E20010 */ sb $v0, 0x10($s7)
D_80262590:
/* 190E70 80262590 26B50001 */ addiu $s5, $s5, 0x1
/* 190E74 80262594 26F70014 */ addiu $s7, $s7, 0x14
/* 190E78 80262598 0000982D */ daddu $s3, $zero, $zero
.L8026259C:
/* 190E7C 8026259C 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 190E80 802625A0 44818000 */ mtc1 $at, $f16
D_802625A4:
/* 190E84 802625A4 240A0001 */ addiu $t2, $zero, 0x1
/* 190E88 802625A8 240D0002 */ addiu $t5, $zero, 0x2
/* 190E8C 802625AC 24090003 */ addiu $t1, $zero, 0x3
/* 190E90 802625B0 02C0602D */ daddu $t4, $s6, $zero
.L802625B4:
/* 190E94 802625B4 8D9200E0 */ lw $s2, 0xE0($t4)
/* 190E98 802625B8 524000B6 */ beql $s2, $zero, .L80262894
D_802625BC:
/* 190E9C 802625BC 26730001 */ addiu $s3, $s3, 0x1
/* 190EA0 802625C0 8EC20184 */ lw $v0, 0x184($s6)
D_802625C4:
/* 190EA4 802625C4 30420108 */ andi $v0, $v0, 0x108
/* 190EA8 802625C8 544000B6 */ bnel $v0, $zero, .L802628A4
/* 190EAC 802625CC A1600425 */ sb $zero, 0x425($t3)
/* 190EB0 802625D0 824801F3 */ lb $t0, 0x1F3($s2)
/* 190EB4 802625D4 8E5101F4 */ lw $s1, 0x1F4($s2)
/* 190EB8 802625D8 190000AD */ blez $t0, D_80262890
/* 190EBC 802625DC 0000382D */ daddu $a3, $zero, $zero
D_802625E0:
/* 190EC0 802625E0 26E60013 */ addiu $a2, $s7, 0x13
.L802625E4:
/* 190EC4 802625E4 8E230000 */ lw $v1, 0x0($s1)
/* 190EC8 802625E8 3C020002 */ lui $v0, (0x20000 >> 16)
/* 190ECC 802625EC 00621024 */ and $v0, $v1, $v0
/* 190ED0 802625F0 144000A2 */ bnez $v0, .L8026287C
D_802625F4:
/* 190ED4 802625F4 3C020010 */ lui $v0, (0x100000 >> 16)
/* 190ED8 802625F8 8E240008 */ lw $a0, 0x8($s1)
/* 190EDC 802625FC 00621024 */ and $v0, $v1, $v0
/* 190EE0 80262600 14400036 */ bnez $v0, .L802626DC
D_80262604:
/* 190EE4 80262604 00000000 */ nop
/* 190EE8 80262608 14A00005 */ bnez $a1, .L80262620
/* 190EEC 8026260C 00000000 */ nop
/* 190EF0 80262610 C6460144 */ lwc1 $f6, 0x144($s2)
/* 190EF4 80262614 C6480148 */ lwc1 $f8, 0x148($s2)
/* 190EF8 80262618 0809898B */ j .L8026262C
/* 190EFC 8026261C C64A014C */ lwc1 $f10, 0x14C($s2)
.L80262620:
/* 190F00 80262620 C6460138 */ lwc1 $f6, 0x138($s2)
/* 190F04 80262624 C648013C */ lwc1 $f8, 0x13C($s2)
/* 190F08 80262628 C64A0140 */ lwc1 $f10, 0x140($s2)
.L8026262C:
/* 190F0C 8026262C 86220014 */ lh $v0, 0x14($s1)
/* 190F10 80262630 C6440188 */ lwc1 $f4, 0x188($s2)
/* 190F14 80262634 44820000 */ mtc1 $v0, $f0
/* 190F18 80262638 00000000 */ nop
/* 190F1C 8026263C 46800020 */ cvt.s.w $f0, $f0
/* 190F20 80262640 46040002 */ mul.s $f0, $f0, $f4
/* 190F24 80262644 00000000 */ nop
/* 190F28 80262648 8E420000 */ lw $v0, 0x0($s2)
/* 190F2C 8026264C 30430800 */ andi $v1, $v0, 0x800
/* 190F30 80262650 14600008 */ bnez $v1, .L80262674
/* 190F34 80262654 46003180 */ add.s $f6, $f6, $f0
/* 190F38 80262658 86220016 */ lh $v0, 0x16($s1)
/* 190F3C 8026265C 44820000 */ mtc1 $v0, $f0
/* 190F40 80262660 00000000 */ nop
/* 190F44 80262664 46800020 */ cvt.s.w $f0, $f0
/* 190F48 80262668 46040002 */ mul.s $f0, $f0, $f4
/* 190F4C 8026266C 00000000 */ nop
/* 190F50 80262670 46004200 */ add.s $f8, $f8, $f0
.L80262674:
/* 190F54 80262674 86220018 */ lh $v0, 0x18($s1)
/* 190F58 80262678 44821000 */ mtc1 $v0, $f2
/* 190F5C 8026267C 00000000 */ nop
/* 190F60 80262680 468010A0 */ cvt.s.w $f2, $f2
/* 190F64 80262684 46041082 */ mul.s $f2, $f2, $f4
/* 190F68 80262688 00000000 */ nop
/* 190F6C 8026268C 8622006C */ lh $v0, 0x6C($s1)
/* 190F70 80262690 44820000 */ mtc1 $v0, $f0
/* 190F74 80262694 00000000 */ nop
/* 190F78 80262698 46800020 */ cvt.s.w $f0, $f0
/* 190F7C 8026269C 46040002 */ mul.s $f0, $f0, $f4
/* 190F80 802626A0 00000000 */ nop
/* 190F84 802626A4 46025280 */ add.s $f10, $f10, $f2
/* 190F88 802626A8 46003306 */ mov.s $f12, $f6
/* 190F8C 802626AC 46006180 */ add.s $f6, $f12, $f0
D_802626B0:
/* 190F90 802626B0 46004086 */ mov.s $f2, $f8
/* 190F94 802626B4 1460001B */ bnez $v1, .L80262724
D_802626B8:
/* 190F98 802626B8 46105380 */ add.s $f14, $f10, $f16
/* 190F9C 802626BC 8622006E */ lh $v0, 0x6E($s1)
D_802626C0:
/* 190FA0 802626C0 44820000 */ mtc1 $v0, $f0
/* 190FA4 802626C4 00000000 */ nop
D_802626C8:
/* 190FA8 802626C8 46800020 */ cvt.s.w $f0, $f0
/* 190FAC 802626CC 46040002 */ mul.s $f0, $f0, $f4
D_802626D0:
/* 190FB0 802626D0 00000000 */ nop
/* 190FB4 802626D4 080989C9 */ j .L80262724
D_802626D8:
/* 190FB8 802626D8 46001200 */ add.s $f8, $f2, $f0
.L802626DC:
/* 190FBC 802626DC C6280030 */ lwc1 $f8, 0x30($s1)
D_802626E0:
/* 190FC0 802626E0 C62A0034 */ lwc1 $f10, 0x34($s1)
/* 190FC4 802626E4 C62C002C */ lwc1 $f12, 0x2C($s1)
D_802626E8:
/* 190FC8 802626E8 8622006C */ lh $v0, 0x6C($s1)
/* 190FCC 802626EC 46004086 */ mov.s $f2, $f8
jtbl_802626F0:
/* 190FD0 802626F0 46105380 */ add.s $f14, $f10, $f16
/* 190FD4 802626F4 44820000 */ mtc1 $v0, $f0
/* 190FD8 802626F8 00000000 */ nop
/* 190FDC 802626FC 46800020 */ cvt.s.w $f0, $f0
/* 190FE0 80262700 8E420000 */ lw $v0, 0x0($s2)
/* 190FE4 80262704 30420800 */ andi $v0, $v0, 0x800
/* 190FE8 80262708 14400006 */ bnez $v0, .L80262724
/* 190FEC 8026270C 46006180 */ add.s $f6, $f12, $f0
/* 190FF0 80262710 8622006E */ lh $v0, 0x6E($s1)
/* 190FF4 80262714 44820000 */ mtc1 $v0, $f0
/* 190FF8 80262718 00000000 */ nop
/* 190FFC 8026271C 46800020 */ cvt.s.w $f0, $f0
/* 191000 80262720 46001200 */ add.s $f8, $f2, $f0
.L80262724:
/* 191004 80262724 36620200 */ ori $v0, $s3, 0x200
/* 191008 80262728 A6E20000 */ sh $v0, 0x0($s7)
/* 19100C 8026272C 90830004 */ lbu $v1, 0x4($a0)
/* 191010 80262730 4600348D */ trunc.w.s $f18, $f6
/* 191014 80262734 44029000 */ mfc1 $v0, $f18
/* 191018 80262738 00000000 */ nop
/* 19101C 8026273C A4C2FFF1 */ sh $v0, -0xF($a2)
/* 191020 80262740 4600448D */ trunc.w.s $f18, $f8
/* 191024 80262744 44029000 */ mfc1 $v0, $f18
/* 191028 80262748 00000000 */ nop
/* 19102C 8026274C A4C2FFF3 */ sh $v0, -0xD($a2)
/* 191030 80262750 4600548D */ trunc.w.s $f18, $f10
/* 191034 80262754 44029000 */ mfc1 $v0, $f18
/* 191038 80262758 00000000 */ nop
/* 19103C 8026275C A4C2FFF5 */ sh $v0, -0xB($a2)
/* 191040 80262760 A0C0FFFD */ sb $zero, -0x3($a2)
/* 191044 80262764 00031E00 */ sll $v1, $v1, 24
/* 191048 80262768 00031E03 */ sra $v1, $v1, 24
/* 19104C 8026276C A4C3FFEF */ sh $v1, -0x11($a2)
/* 191050 80262770 8E420000 */ lw $v0, 0x0($s2)
/* 191054 80262774 24034000 */ addiu $v1, $zero, 0x4000
/* 191058 80262778 30424010 */ andi $v0, $v0, 0x4010
/* 19105C 8026277C 14430002 */ bne $v0, $v1, .L80262788
/* 191060 80262780 24020064 */ addiu $v0, $zero, 0x64
/* 191064 80262784 A0C2FFFD */ sb $v0, -0x3($a2)
.L80262788:
/* 191068 80262788 92230071 */ lbu $v1, 0x71($s1)
/* 19106C 8026278C 90C4FFFD */ lbu $a0, -0x3($a2)
/* 191070 80262790 4600148D */ trunc.w.s $f18, $f2
/* 191074 80262794 44029000 */ mfc1 $v0, $f18
/* 191078 80262798 00000000 */ nop
/* 19107C 8026279C A4C2FFF9 */ sh $v0, -0x7($a2)
/* 191080 802627A0 4600748D */ trunc.w.s $f18, $f14
/* 191084 802627A4 44029000 */ mfc1 $v0, $f18
/* 191088 802627A8 00000000 */ nop
/* 19108C 802627AC A4C2FFFB */ sh $v0, -0x5($a2)
/* 191090 802627B0 00832021 */ addu $a0, $a0, $v1
/* 191094 802627B4 00041E00 */ sll $v1, $a0, 24
/* 191098 802627B8 00031E03 */ sra $v1, $v1, 24
/* 19109C 802627BC 00031040 */ sll $v0, $v1, 1
/* 1910A0 802627C0 00431021 */ addu $v0, $v0, $v1
/* 1910A4 802627C4 000210C0 */ sll $v0, $v0, 3
/* 1910A8 802627C8 00431021 */ addu $v0, $v0, $v1
/* 1910AC 802627CC 00021080 */ sll $v0, $v0, 2
/* 1910B0 802627D0 44820000 */ mtc1 $v0, $f0
/* 1910B4 802627D4 00000000 */ nop
/* 1910B8 802627D8 46800020 */ cvt.s.w $f0, $f0
/* 1910BC 802627DC 46006000 */ add.s $f0, $f12, $f0
/* 1910C0 802627E0 84C3FFF9 */ lh $v1, -0x7($a2)
/* 1910C4 802627E4 A0C4FFFD */ sb $a0, -0x3($a2)
/* 1910C8 802627E8 4600048D */ trunc.w.s $f18, $f0
/* 1910CC 802627EC 44029000 */ mfc1 $v0, $f18
/* 1910D0 802627F0 00000000 */ nop
/* 1910D4 802627F4 A4C2FFF7 */ sh $v0, -0x9($a2)
/* 1910D8 802627F8 28620028 */ slti $v0, $v1, 0x28
/* 1910DC 802627FC 10400003 */ beqz $v0, .L8026280C
/* 1910E0 80262800 28620055 */ slti $v0, $v1, 0x55
/* 1910E4 80262804 08098A0A */ j .L80262828
/* 1910E8 80262808 A0C0FFFF */ sb $zero, -0x1($a2)
.L8026280C:
/* 1910EC 8026280C 10400003 */ beqz $v0, .L8026281C
/* 1910F0 80262810 28620064 */ slti $v0, $v1, 0x64
/* 1910F4 80262814 08098A0A */ j .L80262828
/* 1910F8 80262818 A0CAFFFF */ sb $t2, -0x1($a2)
.L8026281C:
/* 1910FC 8026281C 50400002 */ beql $v0, $zero, .L80262828
/* 191100 80262820 A0C9FFFF */ sb $t1, -0x1($a2)
/* 191104 80262824 A0CDFFFF */ sb $t5, -0x1($a2)
.L80262828:
/* 191108 80262828 84C3FFF7 */ lh $v1, -0x9($a2)
/* 19110C 8026282C 28620019 */ slti $v0, $v1, 0x19
/* 191110 80262830 10400003 */ beqz $v0, .L80262840
/* 191114 80262834 28620041 */ slti $v0, $v1, 0x41
/* 191118 80262838 08098A17 */ j .L8026285C
/* 19111C 8026283C A0C0FFFE */ sb $zero, -0x2($a2)
.L80262840:
/* 191120 80262840 10400003 */ beqz $v0, .L80262850
/* 191124 80262844 28620069 */ slti $v0, $v1, 0x69
/* 191128 80262848 08098A17 */ j .L8026285C
/* 19112C 8026284C A0CAFFFE */ sb $t2, -0x2($a2)
.L80262850:
/* 191130 80262850 50400002 */ beql $v0, $zero, .L8026285C
/* 191134 80262854 A0C9FFFE */ sb $t1, -0x2($a2)
/* 191138 80262858 A0CDFFFE */ sb $t5, -0x2($a2)
.L8026285C:
/* 19113C 8026285C 84C2FFFB */ lh $v0, -0x5($a2)
/* 191140 80262860 2842FFE2 */ slti $v0, $v0, -0x1E
/* 191144 80262864 50400002 */ beql $v0, $zero, .L80262870
/* 191148 80262868 A0CA0000 */ sb $t2, 0x0($a2)
/* 19114C 8026286C A0C00000 */ sb $zero, 0x0($a2)
.L80262870:
/* 191150 80262870 26B50001 */ addiu $s5, $s5, 0x1
/* 191154 80262874 24C60014 */ addiu $a2, $a2, 0x14
/* 191158 80262878 26F70014 */ addiu $s7, $s7, 0x14
.L8026287C:
/* 19115C 8026287C 8E31000C */ lw $s1, 0xC($s1)
D_80262880:
/* 191160 80262880 24E70001 */ addiu $a3, $a3, 0x1
/* 191164 80262884 00E8102A */ slt $v0, $a3, $t0
D_80262888:
/* 191168 80262888 1440FF56 */ bnez $v0, .L802625E4
/* 19116C 8026288C 00000000 */ nop
D_80262890:
/* 191170 80262890 26730001 */ addiu $s3, $s3, 0x1
.L80262894:
/* 191174 80262894 2A620018 */ slti $v0, $s3, 0x18
D_80262898:
/* 191178 80262898 1440FF46 */ bnez $v0, .L802625B4
/* 19117C 8026289C 258C0004 */ addiu $t4, $t4, 0x4
jtbl_802628A0:
/* 191180 802628A0 A1600425 */ sb $zero, 0x425($t3)
.L802628A4:
/* 191184 802628A4 A175040C */ sb $s5, 0x40C($t3)
/* 191188 802628A8 92C30197 */ lbu $v1, 0x197($s6)
/* 19118C 802628AC 00031600 */ sll $v0, $v1, 24
/* 191190 802628B0 00022603 */ sra $a0, $v0, 24
/* 191194 802628B4 30630004 */ andi $v1, $v1, 0x4
/* 191198 802628B8 04810002 */ bgez $a0, .L802628C4
/* 19119C 802628BC AFA3001C */ sw $v1, 0x1C($sp)
/* 1911A0 802628C0 24840003 */ addiu $a0, $a0, 0x3
.L802628C4:
/* 1911A4 802628C4 2577022C */ addiu $s7, $t3, 0x22C
/* 1911A8 802628C8 00151600 */ sll $v0, $s5, 24
/* 1911AC 802628CC 0002AE03 */ sra $s5, $v0, 24
/* 1911B0 802628D0 0000982D */ daddu $s3, $zero, $zero
/* 1911B4 802628D4 1AA0006A */ blez $s5, .L80262A80
/* 1911B8 802628D8 0004F083 */ sra $fp, $a0, 2
/* 1911BC 802628DC 0260A02D */ daddu $s4, $s3, $zero
.L802628E0:
/* 1911C0 802628E0 02F48021 */ addu $s0, $s7, $s4
/* 1911C4 802628E4 86040000 */ lh $a0, 0x0($s0)
/* 1911C8 802628E8 0C09A75B */ jal get_actor
/* 1911CC 802628EC AFAB0020 */ sw $t3, 0x20($sp)
/* 1911D0 802628F0 0040902D */ daddu $s2, $v0, $zero
/* 1911D4 802628F4 86050002 */ lh $a1, 0x2($s0)
/* 1911D8 802628F8 0C099117 */ jal get_actor_part
/* 1911DC 802628FC 0240202D */ daddu $a0, $s2, $zero
/* 1911E0 80262900 86030000 */ lh $v1, 0x0($s0)
/* 1911E4 80262904 8FAB0020 */ lw $t3, 0x20($sp)
/* 1911E8 80262908 10600059 */ beqz $v1, mac_01_D_80262A70
/* 1911EC 8026290C 0040882D */ daddu $s1, $v0, $zero
/* 1911F0 80262910 24020100 */ addiu $v0, $zero, 0x100
/* 1911F4 80262914 50620057 */ beql $v1, $v0, .L80262A74
/* 1911F8 80262918 26730001 */ addiu $s3, $s3, 0x1
/* 1911FC 8026291C 8EC20184 */ lw $v0, 0x184($s6)
/* 191200 80262920 04420029 */ bltzl $v0, .L802629C8
/* 191204 80262924 24040001 */ addiu $a0, $zero, 0x1
/* 191208 80262928 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4)
/* 19120C 8026292C 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0)
/* 191210 80262930 30424000 */ andi $v0, $v0, 0x4000
/* 191214 80262934 14400013 */ bnez $v0, .L80262984
/* 191218 80262938 00000000 */ nop
/* 19121C 8026293C 82C20432 */ lb $v0, 0x432($s6)
/* 191220 80262940 18400010 */ blez $v0, .L80262984
/* 191224 80262944 24040001 */ addiu $a0, $zero, 0x1
/* 191228 80262948 27A50010 */ addiu $a1, $sp, 0x10
/* 19122C 8026294C 27A60014 */ addiu $a2, $sp, 0x14
/* 191230 80262950 0C04DF70 */ jal get_screen_overlay_params
/* 191234 80262954 AFAB0020 */ sw $t3, 0x20($sp)
/* 191238 80262958 C7A20014 */ lwc1 $f2, 0x14($sp)
/* 19123C 8026295C 3C014357 */ lui $at, (0x43570000 >> 16)
/* 191240 80262960 44810000 */ mtc1 $at, $f0
/* 191244 80262964 8FAB0020 */ lw $t3, 0x20($sp)
/* 191248 80262968 4602003E */ c.le.s $f0, $f2
/* 19124C 8026296C 00000000 */ nop
/* 191250 80262970 45000004 */ bc1f .L80262984
/* 191254 80262974 24040001 */ addiu $a0, $zero, 0x1
/* 191258 80262978 0080782D */ daddu $t7, $a0, $zero
/* 19125C 8026297C 08098A72 */ j .L802629C8
/* 191260 80262980 AFAF0018 */ sw $t7, 0x18($sp)
.L80262984:
/* 191264 80262984 8EC20184 */ lw $v0, 0x184($s6)
/* 191268 80262988 30428000 */ andi $v0, $v0, 0x8000
/* 19126C 8026298C 1040000D */ beqz $v0, .L802629C4
/* 191270 80262990 3C020080 */ lui $v0, (0x800000 >> 16)
/* 191274 80262994 8E230000 */ lw $v1, 0x0($s1)
/* 191278 80262998 00621024 */ and $v0, $v1, $v0
/* 19127C 8026299C 1040000A */ beqz $v0, .L802629C8
/* 191280 802629A0 24040001 */ addiu $a0, $zero, 0x1
/* 191284 802629A4 8E420000 */ lw $v0, 0x0($s2)
/* 191288 802629A8 30420040 */ andi $v0, $v0, 0x40
/* 19128C 802629AC 14400006 */ bnez $v0, .L802629C8
/* 191290 802629B0 30620040 */ andi $v0, $v1, 0x40
/* 191294 802629B4 50400004 */ beql $v0, $zero, .L802629C8
/* 191298 802629B8 0000202D */ daddu $a0, $zero, $zero
/* 19129C 802629BC 08098A72 */ j .L802629C8
/* 1912A0 802629C0 00000000 */ nop
.L802629C4:
/* 1912A4 802629C4 0000202D */ daddu $a0, $zero, $zero
.L802629C8:
/* 1912A8 802629C8 5080002A */ beql $a0, $zero, .L80262A74
/* 1912AC 802629CC 26730001 */ addiu $s3, $s3, 0x1
/* 1912B0 802629D0 26A5FFFF */ addiu $a1, $s5, -0x1
/* 1912B4 802629D4 0265102A */ slt $v0, $s3, $a1
/* 1912B8 802629D8 10400022 */ beqz $v0, mac_01_Quizmo_AudienceEffect
/* 1912BC 802629DC 0260382D */ daddu $a3, $s3, $zero
/* 1912C0 802629E0 00071880 */ sll $v1, $a3, 2
.L802629E4:
/* 1912C4 802629E4 00671821 */ addu $v1, $v1, $a3
/* 1912C8 802629E8 00031880 */ sll $v1, $v1, 2
/* 1912CC 802629EC 01631821 */ addu $v1, $t3, $v1
/* 1912D0 802629F0 24E40001 */ addiu $a0, $a3, 0x1
/* 1912D4 802629F4 00041080 */ sll $v0, $a0, 2
/* 1912D8 802629F8 00441021 */ addu $v0, $v0, $a0
/* 1912DC 802629FC 00021080 */ sll $v0, $v0, 2
/* 1912E0 80262A00 01621021 */ addu $v0, $t3, $v0
/* 1912E4 80262A04 8858022C */ lwl $t8, 0x22C($v0)
/* 1912E8 80262A08 9858022F */ lwr $t8, 0x22F($v0)
/* 1912EC 80262A0C 88590230 */ lwl $t9, 0x230($v0)
/* 1912F0 80262A10 98590233 */ lwr $t9, 0x233($v0)
/* 1912F4 80262A14 884E0234 */ lwl $t6, 0x234($v0)
/* 1912F8 80262A18 984E0237 */ lwr $t6, 0x237($v0)
/* 1912FC 80262A1C 884F0238 */ lwl $t7, 0x238($v0)
/* 191300 80262A20 984F023B */ lwr $t7, 0x23B($v0)
/* 191304 80262A24 A878022C */ swl $t8, 0x22C($v1)
/* 191308 80262A28 B878022F */ swr $t8, 0x22F($v1)
/* 19130C 80262A2C A8790230 */ swl $t9, 0x230($v1)
D_80262A30:
/* 191310 80262A30 B8790233 */ swr $t9, 0x233($v1)
/* 191314 80262A34 A86E0234 */ swl $t6, 0x234($v1)
/* 191318 80262A38 B86E0237 */ swr $t6, 0x237($v1)
/* 19131C 80262A3C A86F0238 */ swl $t7, 0x238($v1)
mac_01_Quizmo_Worker:
/* 191320 80262A40 B86F023B */ swr $t7, 0x23B($v1)
/* 191324 80262A44 8858023C */ lwl $t8, 0x23C($v0)
D_80262A48:
/* 191328 80262A48 9858023F */ lwr $t8, 0x23F($v0)
/* 19132C 80262A4C A878023C */ swl $t8, 0x23C($v1)
/* 191330 80262A50 B878023F */ swr $t8, 0x23F($v1)
/* 191334 80262A54 0080382D */ daddu $a3, $a0, $zero
mac_01_Quizmo_AnswerResult:
/* 191338 80262A58 00E5102A */ slt $v0, $a3, $a1
/* 19133C 80262A5C 1440FFE1 */ bnez $v0, .L802629E4
mac_01_Quizmo_StageEffect:
/* 191340 80262A60 00071880 */ sll $v1, $a3, 2
mac_01_Quizmo_AudienceEffect:
/* 191344 80262A64 26B5FFFF */ addiu $s5, $s5, -0x1
mac_01_Quizmo_VannaTEffect:
/* 191348 80262A68 2694FFEC */ addiu $s4, $s4, -0x14
/* 19134C 80262A6C 2673FFFF */ addiu $s3, $s3, -0x1
mac_01_D_80262A70:
/* 191350 80262A70 26730001 */ addiu $s3, $s3, 0x1
.L80262A74:
/* 191354 80262A74 0275102A */ slt $v0, $s3, $s5
/* 191358 80262A78 1440FF99 */ bnez $v0, .L802628E0
/* 19135C 80262A7C 26940014 */ addiu $s4, $s4, 0x14
.L80262A80:
/* 191360 80262A80 1AA00115 */ blez $s5, .L80262ED8
/* 191364 80262A84 0000982D */ daddu $s3, $zero, $zero
/* 191368 80262A88 00131080 */ sll $v0, $s3, 2
.L80262A8C:
/* 19136C 80262A8C 00531021 */ addu $v0, $v0, $s3
/* 191370 80262A90 00021080 */ sll $v0, $v0, 2
/* 191374 80262A94 02E28021 */ addu $s0, $s7, $v0
/* 191378 80262A98 86040000 */ lh $a0, 0x0($s0)
/* 19137C 80262A9C 0C09A75B */ jal get_actor
/* 191380 80262AA0 AFAB0020 */ sw $t3, 0x20($sp)
/* 191384 80262AA4 0040902D */ daddu $s2, $v0, $zero
/* 191388 80262AA8 86050002 */ lh $a1, 0x2($s0)
/* 19138C 80262AAC 0C099117 */ jal get_actor_part
/* 191390 80262AB0 0240202D */ daddu $a0, $s2, $zero
/* 191394 80262AB4 86030000 */ lh $v1, 0x0($s0)
/* 191398 80262AB8 8FAB0020 */ lw $t3, 0x20($sp)
/* 19139C 80262ABC 10600102 */ beqz $v1, .L80262EC8
/* 1913A0 80262AC0 0040882D */ daddu $s1, $v0, $zero
/* 1913A4 80262AC4 24020100 */ addiu $v0, $zero, 0x100
/* 1913A8 80262AC8 50620100 */ beql $v1, $v0, .L80262ECC
/* 1913AC 80262ACC 26730001 */ addiu $s3, $s3, 0x1
/* 1913B0 80262AD0 8EC20184 */ lw $v0, 0x184($s6)
/* 1913B4 80262AD4 30420800 */ andi $v0, $v0, 0x800
/* 1913B8 80262AD8 10400005 */ beqz $v0, .L80262AF0
/* 1913BC 80262ADC 00000000 */ nop
/* 1913C0 80262AE0 8E220004 */ lw $v0, 0x4($s1)
/* 1913C4 80262AE4 30420001 */ andi $v0, $v0, 0x1
/* 1913C8 80262AE8 544000CE */ bnel $v0, $zero, .L80262E24
/* 1913CC 80262AEC 24040001 */ addiu $a0, $zero, 0x1
.L80262AF0:
/* 1913D0 80262AF0 8EC20184 */ lw $v0, 0x184($s6)
/* 1913D4 80262AF4 30421000 */ andi $v0, $v0, 0x1000
/* 1913D8 80262AF8 10400005 */ beqz $v0, .L80262B10
/* 1913DC 80262AFC 00000000 */ nop
/* 1913E0 80262B00 8E220004 */ lw $v0, 0x4($s1)
/* 1913E4 80262B04 30420002 */ andi $v0, $v0, 0x2
/* 1913E8 80262B08 544000C6 */ bnel $v0, $zero, .L80262E24
/* 1913EC 80262B0C 24040001 */ addiu $a0, $zero, 0x1
.L80262B10:
/* 1913F0 80262B10 8EC20184 */ lw $v0, 0x184($s6)
/* 1913F4 80262B14 3C030002 */ lui $v1, (0x20000 >> 16)
/* 1913F8 80262B18 00431024 */ and $v0, $v0, $v1
/* 1913FC 80262B1C 10400009 */ beqz $v0, .L80262B44
/* 191400 80262B20 00000000 */ nop
/* 191404 80262B24 8E420000 */ lw $v0, 0x0($s2)
/* 191408 80262B28 30420080 */ andi $v0, $v0, 0x80
/* 19140C 80262B2C 544000BD */ bnel $v0, $zero, .L80262E24
/* 191410 80262B30 24040001 */ addiu $a0, $zero, 0x1
/* 191414 80262B34 8E220000 */ lw $v0, 0x0($s1)
/* 191418 80262B38 30420080 */ andi $v0, $v0, 0x80
/* 19141C 80262B3C 544000B9 */ bnel $v0, $zero, .L80262E24
/* 191420 80262B40 24040001 */ addiu $a0, $zero, 0x1
.L80262B44:
/* 191424 80262B44 8EC20184 */ lw $v0, 0x184($s6)
/* 191428 80262B48 30420400 */ andi $v0, $v0, 0x400
/* 19142C 80262B4C 10400005 */ beqz $v0, .L80262B64
/* 191430 80262B50 00000000 */ nop
/* 191434 80262B54 8E420000 */ lw $v0, 0x0($s2)
/* 191438 80262B58 30420800 */ andi $v0, $v0, 0x800
/* 19143C 80262B5C 544000B1 */ bnel $v0, $zero, .L80262E24
/* 191440 80262B60 24040001 */ addiu $a0, $zero, 0x1
.L80262B64:
/* 191444 80262B64 8EC20184 */ lw $v0, 0x184($s6)
/* 191448 80262B68 3C030001 */ lui $v1, (0x10000 >> 16)
/* 19144C 80262B6C 00431024 */ and $v0, $v0, $v1
/* 191450 80262B70 14400005 */ bnez $v0, .L80262B88
/* 191454 80262B74 00000000 */ nop
/* 191458 80262B78 8E420000 */ lw $v0, 0x0($s2)
/* 19145C 80262B7C 30424000 */ andi $v0, $v0, 0x4000
/* 191460 80262B80 544000A8 */ bnel $v0, $zero, .L80262E24
/* 191464 80262B84 24040001 */ addiu $a0, $zero, 0x1
.L80262B88:
/* 191468 80262B88 8EC20184 */ lw $v0, 0x184($s6)
/* 19146C 80262B8C 3C030004 */ lui $v1, (0x40000 >> 16)
/* 191470 80262B90 00431024 */ and $v0, $v0, $v1
/* 191474 80262B94 10400005 */ beqz $v0, .L80262BAC
/* 191478 80262B98 00000000 */ nop
/* 19147C 80262B9C 8E420000 */ lw $v0, 0x0($s2)
/* 191480 80262BA0 30420800 */ andi $v0, $v0, 0x800
/* 191484 80262BA4 5440009F */ bnel $v0, $zero, .L80262E24
/* 191488 80262BA8 24040001 */ addiu $a0, $zero, 0x1
.L80262BAC:
/* 19148C 80262BAC 8EC20184 */ lw $v0, 0x184($s6)
/* 191490 80262BB0 30420004 */ andi $v0, $v0, 0x4
/* 191494 80262BB4 10400004 */ beqz $v0, .L80262BC8
/* 191498 80262BB8 00000000 */ nop
/* 19149C 80262BBC 82020012 */ lb $v0, 0x12($s0)
/* 1914A0 80262BC0 54400098 */ bnel $v0, $zero, .L80262E24
/* 1914A4 80262BC4 24040001 */ addiu $a0, $zero, 0x1
.L80262BC8:
/* 1914A8 80262BC8 8EC20184 */ lw $v0, 0x184($s6)
/* 1914AC 80262BCC 30420010 */ andi $v0, $v0, 0x10
/* 1914B0 80262BD0 10400005 */ beqz $v0, .L80262BE8
/* 1914B4 80262BD4 00000000 */ nop
/* 1914B8 80262BD8 82020012 */ lb $v0, 0x12($s0)
/* 1914BC 80262BDC 28420002 */ slti $v0, $v0, 0x2
/* 1914C0 80262BE0 50400090 */ beql $v0, $zero, .L80262E24
/* 1914C4 80262BE4 24040001 */ addiu $a0, $zero, 0x1
.L80262BE8:
/* 1914C8 80262BE8 8EC20184 */ lw $v0, 0x184($s6)
/* 1914CC 80262BEC 30420040 */ andi $v0, $v0, 0x40
/* 1914D0 80262BF0 10400004 */ beqz $v0, .L80262C04
/* 1914D4 80262BF4 00000000 */ nop
/* 1914D8 80262BF8 82020012 */ lb $v0, 0x12($s0)
/* 1914DC 80262BFC 18400089 */ blez $v0, .L80262E24
/* 1914E0 80262C00 24040001 */ addiu $a0, $zero, 0x1
.L80262C04:
/* 1914E4 80262C04 8EC20184 */ lw $v0, 0x184($s6)
/* 1914E8 80262C08 30424000 */ andi $v0, $v0, 0x4000
/* 1914EC 80262C0C 1040001D */ beqz $v0, .L80262C84
/* 1914F0 80262C10 00000000 */ nop
/* 1914F4 80262C14 8E220000 */ lw $v0, 0x0($s1)
/* 1914F8 80262C18 30420020 */ andi $v0, $v0, 0x20
/* 1914FC 80262C1C 14400019 */ bnez $v0, .L80262C84
/* 191500 80262C20 0000302D */ daddu $a2, $zero, $zero
/* 191504 80262C24 1AA00015 */ blez $s5, .L80262C7C
/* 191508 80262C28 00C0382D */ daddu $a3, $a2, $zero
/* 19150C 80262C2C 02E0202D */ daddu $a0, $s7, $zero
.L80262C30:
/* 191510 80262C30 0080282D */ daddu $a1, $a0, $zero
mac_01_LetterDelivery_SavedNpcAnim:
/* 191514 80262C34 5205000E */ beql $s0, $a1, .L80262C70
D_80262C38:
/* 191518 80262C38 24E70001 */ addiu $a3, $a3, 0x1
/* 19151C 80262C3C 82030013 */ lb $v1, 0x13($s0)
/* 191520 80262C40 80A20013 */ lb $v0, 0x13($a1)
/* 191524 80262C44 1462000A */ bne $v1, $v0, .L80262C70
/* 191528 80262C48 24E70001 */ addiu $a3, $a3, 0x1
/* 19152C 80262C4C 82030011 */ lb $v1, 0x11($s0)
/* 191530 80262C50 80A20011 */ lb $v0, 0x11($a1)
/* 191534 80262C54 14620006 */ bne $v1, $v0, .L80262C70
/* 191538 80262C58 00000000 */ nop
/* 19153C 80262C5C 82030012 */ lb $v1, 0x12($s0)
/* 191540 80262C60 80A20012 */ lb $v0, 0x12($a1)
/* 191544 80262C64 0062182A */ slt $v1, $v1, $v0
/* 191548 80262C68 54600004 */ bnel $v1, $zero, .L80262C7C
/* 19154C 80262C6C 24060001 */ addiu $a2, $zero, 0x1
.L80262C70:
/* 191550 80262C70 00F5102A */ slt $v0, $a3, $s5
/* 191554 80262C74 1440FFEE */ bnez $v0, .L80262C30
/* 191558 80262C78 24840014 */ addiu $a0, $a0, 0x14
.L80262C7C:
/* 19155C 80262C7C 14C00069 */ bnez $a2, .L80262E24
/* 191560 80262C80 24040001 */ addiu $a0, $zero, 0x1
.L80262C84:
/* 191564 80262C84 8EC20184 */ lw $v0, 0x184($s6)
/* 191568 80262C88 30422000 */ andi $v0, $v0, 0x2000
/* 19156C 80262C8C 10400015 */ beqz $v0, .L80262CE4
/* 191570 80262C90 0000302D */ daddu $a2, $zero, $zero
/* 191574 80262C94 1AA00011 */ blez $s5, .L80262CDC
/* 191578 80262C98 00C0382D */ daddu $a3, $a2, $zero
/* 19157C 80262C9C 02E0202D */ daddu $a0, $s7, $zero
.L80262CA0:
/* 191580 80262CA0 0080282D */ daddu $a1, $a0, $zero
/* 191584 80262CA4 1205000A */ beq $s0, $a1, .L80262CD0
/* 191588 80262CA8 24E70001 */ addiu $a3, $a3, 0x1
/* 19158C 80262CAC 96030012 */ lhu $v1, 0x12($s0)
/* 191590 80262CB0 94A20012 */ lhu $v0, 0x12($a1)
/* 191594 80262CB4 14620006 */ bne $v1, $v0, .L80262CD0
/* 191598 80262CB8 00000000 */ nop
/* 19159C 80262CBC 82030011 */ lb $v1, 0x11($s0)
/* 1915A0 80262CC0 80A20011 */ lb $v0, 0x11($a1)
/* 1915A4 80262CC4 0043102A */ slt $v0, $v0, $v1
/* 1915A8 80262CC8 54400004 */ bnel $v0, $zero, .L80262CDC
/* 1915AC 80262CCC 24060001 */ addiu $a2, $zero, 0x1
.L80262CD0:
/* 1915B0 80262CD0 00F5102A */ slt $v0, $a3, $s5
/* 1915B4 80262CD4 1440FFF2 */ bnez $v0, .L80262CA0
/* 1915B8 80262CD8 24840014 */ addiu $a0, $a0, 0x14
.L80262CDC:
/* 1915BC 80262CDC 54C00051 */ bnel $a2, $zero, .L80262E24
/* 1915C0 80262CE0 24040001 */ addiu $a0, $zero, 0x1
.L80262CE4:
/* 1915C4 80262CE4 8EC20184 */ lw $v0, 0x184($s6)
/* 1915C8 80262CE8 30420020 */ andi $v0, $v0, 0x20
/* 1915CC 80262CEC 10400005 */ beqz $v0, .L80262D04
/* 1915D0 80262CF0 00000000 */ nop
/* 1915D4 80262CF4 8E420000 */ lw $v0, 0x0($s2)
/* 1915D8 80262CF8 30420200 */ andi $v0, $v0, 0x200
/* 1915DC 80262CFC 54400049 */ bnel $v0, $zero, .L80262E24
/* 1915E0 80262D00 24040001 */ addiu $a0, $zero, 0x1
.L80262D04:
/* 1915E4 80262D04 8EC20184 */ lw $v0, 0x184($s6)
/* 1915E8 80262D08 3C030010 */ lui $v1, (0x100000 >> 16)
/* 1915EC 80262D0C 00431024 */ and $v0, $v0, $v1
/* 1915F0 80262D10 10400004 */ beqz $v0, .L80262D24
/* 1915F4 80262D14 27C20001 */ addiu $v0, $fp, 0x1
/* 1915F8 80262D18 82030012 */ lb $v1, 0x12($s0)
/* 1915FC 80262D1C 50620041 */ beql $v1, $v0, .L80262E24
/* 191600 80262D20 24040001 */ addiu $a0, $zero, 0x1
.L80262D24:
/* 191604 80262D24 8EC20184 */ lw $v0, 0x184($s6)
/* 191608 80262D28 3C030020 */ lui $v1, (0x200000 >> 16)
/* 19160C 80262D2C 00431024 */ and $v0, $v0, $v1
/* 191610 80262D30 10400004 */ beqz $v0, .L80262D44
/* 191614 80262D34 27C2FFFF */ addiu $v0, $fp, -0x1
/* 191618 80262D38 82030012 */ lb $v1, 0x12($s0)
/* 19161C 80262D3C 50620039 */ beql $v1, $v0, .L80262E24
/* 191620 80262D40 24040001 */ addiu $a0, $zero, 0x1
.L80262D44:
/* 191624 80262D44 8EC20184 */ lw $v0, 0x184($s6)
/* 191628 80262D48 3C030040 */ lui $v1, (0x400000 >> 16)
/* 19162C 80262D4C 00431024 */ and $v0, $v0, $v1
/* 191630 80262D50 10400006 */ beqz $v0, .L80262D6C
/* 191634 80262D54 00000000 */ nop
/* 191638 80262D58 8FB8001C */ lw $t8, 0x1C($sp)
/* 19163C 80262D5C 82030011 */ lb $v1, 0x11($s0)
/* 191640 80262D60 2702FFFF */ addiu $v0, $t8, -0x1
/* 191644 80262D64 5062002F */ beql $v1, $v0, .L80262E24
/* 191648 80262D68 24040001 */ addiu $a0, $zero, 0x1
.L80262D6C:
/* 19164C 80262D6C 8EC20184 */ lw $v0, 0x184($s6)
/* 191650 80262D70 3C030080 */ lui $v1, (0x800000 >> 16)
/* 191654 80262D74 00431024 */ and $v0, $v0, $v1
/* 191658 80262D78 10400006 */ beqz $v0, .L80262D94
/* 19165C 80262D7C 00000000 */ nop
/* 191660 80262D80 8FB9001C */ lw $t9, 0x1C($sp)
/* 191664 80262D84 82030011 */ lb $v1, 0x11($s0)
/* 191668 80262D88 27220001 */ addiu $v0, $t9, 0x1
/* 19166C 80262D8C 50620025 */ beql $v1, $v0, .L80262E24
/* 191670 80262D90 24040001 */ addiu $a0, $zero, 0x1
.L80262D94:
/* 191674 80262D94 8EC20184 */ lw $v0, 0x184($s6)
/* 191678 80262D98 3C030010 */ lui $v1, (0x100000 >> 16)
/* 19167C 80262D9C 00431024 */ and $v0, $v0, $v1
/* 191680 80262DA0 10400005 */ beqz $v0, .L80262DB8
/* 191684 80262DA4 00000000 */ nop
/* 191688 80262DA8 82020012 */ lb $v0, 0x12($s0)
/* 19168C 80262DAC 005E102A */ slt $v0, $v0, $fp
/* 191690 80262DB0 5440001C */ bnel $v0, $zero, .L80262E24
/* 191694 80262DB4 24040001 */ addiu $a0, $zero, 0x1
.L80262DB8:
/* 191698 80262DB8 8EC20184 */ lw $v0, 0x184($s6)
/* 19169C 80262DBC 3C030020 */ lui $v1, (0x200000 >> 16)
/* 1916A0 80262DC0 00431024 */ and $v0, $v0, $v1
/* 1916A4 80262DC4 10400005 */ beqz $v0, .L80262DDC
/* 1916A8 80262DC8 00000000 */ nop
/* 1916AC 80262DCC 82020012 */ lb $v0, 0x12($s0)
/* 1916B0 80262DD0 03C2102A */ slt $v0, $fp, $v0
/* 1916B4 80262DD4 54400013 */ bnel $v0, $zero, .L80262E24
/* 1916B8 80262DD8 24040001 */ addiu $a0, $zero, 0x1
.L80262DDC:
/* 1916BC 80262DDC 8EC20184 */ lw $v0, 0x184($s6)
/* 1916C0 80262DE0 3C030040 */ lui $v1, (0x400000 >> 16)
/* 1916C4 80262DE4 00431024 */ and $v0, $v0, $v1
/* 1916C8 80262DE8 10400006 */ beqz $v0, .L80262E04
/* 1916CC 80262DEC 00000000 */ nop
/* 1916D0 80262DF0 82020011 */ lb $v0, 0x11($s0)
/* 1916D4 80262DF4 8FAE001C */ lw $t6, 0x1C($sp)
/* 1916D8 80262DF8 01C2102A */ slt $v0, $t6, $v0
/* 1916DC 80262DFC 14400009 */ bnez $v0, .L80262E24
/* 1916E0 80262E00 24040001 */ addiu $a0, $zero, 0x1
.L80262E04:
/* 1916E4 80262E04 8EC20184 */ lw $v0, 0x184($s6)
/* 1916E8 80262E08 3C030080 */ lui $v1, (0x800000 >> 16)
/* 1916EC 80262E0C 00431024 */ and $v0, $v0, $v1
/* 1916F0 80262E10 10400004 */ beqz $v0, .L80262E24
/* 1916F4 80262E14 0000202D */ daddu $a0, $zero, $zero
/* 1916F8 80262E18 82020011 */ lb $v0, 0x11($s0)
/* 1916FC 80262E1C 8FAF001C */ lw $t7, 0x1C($sp)
/* 191700 80262E20 004F202A */ slt $a0, $v0, $t7
.L80262E24:
/* 191704 80262E24 50800029 */ beql $a0, $zero, .L80262ECC
/* 191708 80262E28 26730001 */ addiu $s3, $s3, 0x1
/* 19170C 80262E2C 26A5FFFF */ addiu $a1, $s5, -0x1
/* 191710 80262E30 0265102A */ slt $v0, $s3, $a1
/* 191714 80262E34 10400022 */ beqz $v0, .L80262EC0
/* 191718 80262E38 0260382D */ daddu $a3, $s3, $zero
/* 19171C 80262E3C 00071880 */ sll $v1, $a3, 2
.L80262E40:
/* 191720 80262E40 00671821 */ addu $v1, $v1, $a3
/* 191724 80262E44 00031880 */ sll $v1, $v1, 2
/* 191728 80262E48 01631821 */ addu $v1, $t3, $v1
/* 19172C 80262E4C 24E40001 */ addiu $a0, $a3, 0x1
/* 191730 80262E50 00041080 */ sll $v0, $a0, 2
/* 191734 80262E54 00441021 */ addu $v0, $v0, $a0
/* 191738 80262E58 00021080 */ sll $v0, $v0, 2
/* 19173C 80262E5C 01621021 */ addu $v0, $t3, $v0
/* 191740 80262E60 8858022C */ lwl $t8, 0x22C($v0)
/* 191744 80262E64 9858022F */ lwr $t8, 0x22F($v0)
/* 191748 80262E68 88590230 */ lwl $t9, 0x230($v0)
/* 19174C 80262E6C 98590233 */ lwr $t9, 0x233($v0)
/* 191750 80262E70 884E0234 */ lwl $t6, 0x234($v0)
/* 191754 80262E74 984E0237 */ lwr $t6, 0x237($v0)
/* 191758 80262E78 884F0238 */ lwl $t7, 0x238($v0)
/* 19175C 80262E7C 984F023B */ lwr $t7, 0x23B($v0)
/* 191760 80262E80 A878022C */ swl $t8, 0x22C($v1)
/* 191764 80262E84 B878022F */ swr $t8, 0x22F($v1)
/* 191768 80262E88 A8790230 */ swl $t9, 0x230($v1)
/* 19176C 80262E8C B8790233 */ swr $t9, 0x233($v1)
/* 191770 80262E90 A86E0234 */ swl $t6, 0x234($v1)
/* 191774 80262E94 B86E0237 */ swr $t6, 0x237($v1)
/* 191778 80262E98 A86F0238 */ swl $t7, 0x238($v1)
/* 19177C 80262E9C B86F023B */ swr $t7, 0x23B($v1)
/* 191780 80262EA0 8858023C */ lwl $t8, 0x23C($v0)
/* 191784 80262EA4 9858023F */ lwr $t8, 0x23F($v0)
/* 191788 80262EA8 A878023C */ swl $t8, 0x23C($v1)
/* 19178C 80262EAC B878023F */ swr $t8, 0x23F($v1)
/* 191790 80262EB0 0080382D */ daddu $a3, $a0, $zero
/* 191794 80262EB4 00E5102A */ slt $v0, $a3, $a1
/* 191798 80262EB8 1440FFE1 */ bnez $v0, .L80262E40
/* 19179C 80262EBC 00071880 */ sll $v1, $a3, 2
.L80262EC0:
/* 1917A0 80262EC0 26B5FFFF */ addiu $s5, $s5, -0x1
/* 1917A4 80262EC4 2673FFFF */ addiu $s3, $s3, -0x1
.L80262EC8:
/* 1917A8 80262EC8 26730001 */ addiu $s3, $s3, 0x1
.L80262ECC:
/* 1917AC 80262ECC 0275102A */ slt $v0, $s3, $s5
/* 1917B0 80262ED0 1440FEEE */ bnez $v0, .L80262A8C
/* 1917B4 80262ED4 00131080 */ sll $v0, $s3, 2
.L80262ED8:
/* 1917B8 80262ED8 16A0000A */ bnez $s5, .L80262F04
/* 1917BC 80262EDC A175040C */ sb $s5, 0x40C($t3)
/* 1917C0 80262EE0 8FB80018 */ lw $t8, 0x18($sp)
/* 1917C4 80262EE4 13000007 */ beqz $t8, .L80262F04
/* 1917C8 80262EE8 00000000 */ nop
/* 1917CC 80262EEC 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1917D0 80262EF0 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 1917D4 80262EF4 8C620004 */ lw $v0, 0x4($v1)
/* 1917D8 80262EF8 34421000 */ ori $v0, $v0, 0x1000
/* 1917DC 80262EFC 08098BC7 */ j .L80262F1C
/* 1917E0 80262F00 AC620004 */ sw $v0, 0x4($v1)
.L80262F04:
/* 1917E4 80262F04 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1917E8 80262F08 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
/* 1917EC 80262F0C 8C430004 */ lw $v1, 0x4($v0)
/* 1917F0 80262F10 2404EFFF */ addiu $a0, $zero, -0x1001
/* 1917F4 80262F14 00641824 */ and $v1, $v1, $a0
/* 1917F8 80262F18 AC430004 */ sw $v1, 0x4($v0)
.L80262F1C:
/* 1917FC 80262F1C 2577022C */ addiu $s7, $t3, 0x22C
/* 191800 80262F20 8175040C */ lb $s5, 0x40C($t3)
/* 191804 80262F24 0000982D */ daddu $s3, $zero, $zero
/* 191808 80262F28 1AA00007 */ blez $s5, .L80262F48
/* 19180C 80262F2C 256A040D */ addiu $t2, $t3, 0x40D
/* 191810 80262F30 01531021 */ addu $v0, $t2, $s3
.L80262F34:
/* 191814 80262F34 A0530000 */ sb $s3, 0x0($v0)
/* 191818 80262F38 26730001 */ addiu $s3, $s3, 0x1
/* 19181C 80262F3C 0275102A */ slt $v0, $s3, $s5
/* 191820 80262F40 1440FFFC */ bnez $v0, .L80262F34
/* 191824 80262F44 01531021 */ addu $v0, $t2, $s3
.L80262F48:
/* 191828 80262F48 26A2FFFF */ addiu $v0, $s5, -0x1
/* 19182C 80262F4C 1840002B */ blez $v0, .L80262FFC
/* 191830 80262F50 0000982D */ daddu $s3, $zero, $zero
/* 191834 80262F54 0040582D */ daddu $t3, $v0, $zero
/* 191838 80262F58 26670001 */ addiu $a3, $s3, 0x1
.L80262F5C:
/* 19183C 80262F5C 00F5102A */ slt $v0, $a3, $s5
/* 191840 80262F60 50400023 */ beql $v0, $zero, .L80262FF0
/* 191844 80262F64 26730001 */ addiu $s3, $s3, 0x1
D_80262F68:
/* 191848 80262F68 01534821 */ addu $t1, $t2, $s3
/* 19184C 80262F6C 01474021 */ addu $t0, $t2, $a3
.L80262F70:
/* 191850 80262F70 81260000 */ lb $a2, 0x0($t1)
/* 191854 80262F74 81030000 */ lb $v1, 0x0($t0)
/* 191858 80262F78 00061080 */ sll $v0, $a2, 2
/* 19185C 80262F7C 00461021 */ addu $v0, $v0, $a2
/* 191860 80262F80 00021080 */ sll $v0, $v0, 2
/* 191864 80262F84 02E28021 */ addu $s0, $s7, $v0
/* 191868 80262F88 00031080 */ sll $v0, $v1, 2
/* 19186C 80262F8C 00431021 */ addu $v0, $v0, $v1
/* 191870 80262F90 00021080 */ sll $v0, $v0, 2
/* 191874 80262F94 02E22821 */ addu $a1, $s7, $v0
/* 191878 80262F98 82030010 */ lb $v1, 0x10($s0)
/* 19187C 80262F9C 86040004 */ lh $a0, 0x4($s0)
/* 191880 80262FA0 00031080 */ sll $v0, $v1, 2
/* 191884 80262FA4 00431021 */ addu $v0, $v0, $v1
/* 191888 80262FA8 00021040 */ sll $v0, $v0, 1
/* 19188C 80262FAC 80A30010 */ lb $v1, 0x10($a1)
/* 191890 80262FB0 00822021 */ addu $a0, $a0, $v0
/* 191894 80262FB4 00031080 */ sll $v0, $v1, 2
/* 191898 80262FB8 00431021 */ addu $v0, $v0, $v1
/* 19189C 80262FBC 84A30004 */ lh $v1, 0x4($a1)
/* 1918A0 80262FC0 00021040 */ sll $v0, $v0, 1
/* 1918A4 80262FC4 00621821 */ addu $v1, $v1, $v0
/* 1918A8 80262FC8 0064182A */ slt $v1, $v1, $a0
/* 1918AC 80262FCC 91020000 */ lbu $v0, 0x0($t0)
/* 1918B0 80262FD0 10600003 */ beqz $v1, .L80262FE0
/* 1918B4 80262FD4 24E70001 */ addiu $a3, $a3, 0x1
/* 1918B8 80262FD8 A1220000 */ sb $v0, 0x0($t1)
/* 1918BC 80262FDC A1060000 */ sb $a2, 0x0($t0)
.L80262FE0:
/* 1918C0 80262FE0 00F5102A */ slt $v0, $a3, $s5
/* 1918C4 80262FE4 1440FFE2 */ bnez $v0, .L80262F70
/* 1918C8 80262FE8 01474021 */ addu $t0, $t2, $a3
/* 1918CC 80262FEC 26730001 */ addiu $s3, $s3, 0x1
.L80262FF0:
/* 1918D0 80262FF0 026B102A */ slt $v0, $s3, $t3
/* 1918D4 80262FF4 5440FFD9 */ bnel $v0, $zero, .L80262F5C
/* 1918D8 80262FF8 26670001 */ addiu $a3, $s3, 0x1
.L80262FFC:
/* 1918DC 80262FFC 8FBF004C */ lw $ra, 0x4C($sp)
/* 1918E0 80263000 8FBE0048 */ lw $fp, 0x48($sp)
/* 1918E4 80263004 8FB70044 */ lw $s7, 0x44($sp)
/* 1918E8 80263008 8FB60040 */ lw $s6, 0x40($sp)
/* 1918EC 8026300C 8FB5003C */ lw $s5, 0x3C($sp)
/* 1918F0 80263010 8FB40038 */ lw $s4, 0x38($sp)
/* 1918F4 80263014 8FB30034 */ lw $s3, 0x34($sp)
/* 1918F8 80263018 8FB20030 */ lw $s2, 0x30($sp)
/* 1918FC 8026301C 8FB1002C */ lw $s1, 0x2C($sp)
/* 191900 80263020 8FB00028 */ lw $s0, 0x28($sp)
/* 191904 80263024 03E00008 */ jr $ra
/* 191908 80263028 27BD0050 */ addiu $sp, $sp, 0x50
### DECOMPILED C INSTRUCTIONS:
void create_target_list(Actor* actor, s32 arg1) {
s32 numTargets = 0;
BattleStatus* battleStatus = &gBattleStatus;
SelectableTarget* targetDataList = actor->targetData;
Actor* playerActor = battleStatus->playerActor;
Actor* partnerActor = battleStatus->partnerActor;
SelectableTarget* targetData;
SelectableTarget* otherTarget;
Actor* targetActor;
ActorPart* targetPart;
s8* targetIndexList;
s32 numParts;
s32 i, j;
f32 targetX, targetY, targetZ;
f32 f2, f12, f14;
u8 overlayType;
f32 overlayZoom;
s32 sp18 = FALSE;
s32 col;
s32 row;
s32 skip;
if (battleStatus->currentTargetListFlags & TARGET_FLAG_80000000) {
actor->targetListLength = -1;
return;
}
if (battleStatus->currentTargetListFlags & TARGET_FLAG_PLAYER) {
targetDataList->actorID = ACTOR_PLAYER;
targetDataList->partID = 1;
if (!arg1) {
targetDataList->posA.x = playerActor->currentPos.x + playerActor->size.x * 0.3 * playerActor->scalingFactor;
targetDataList->posA.y = playerActor->currentPos.y + playerActor->size.y * 0.9 * playerActor->scalingFactor;
targetDataList->posA.z = playerActor->currentPos.z;
} else {
targetDataList->posA.x = playerActor->homePos.x + playerActor->size.x * 0.3 * playerActor->scalingFactor;
targetDataList->posA.y = playerActor->homePos.y + playerActor->size.y * 0.9 * playerActor->scalingFactor;
targetDataList->posA.z = playerActor->homePos.z;
}
targetDataList->unk_10 = -100;
numTargets++;
targetDataList++;
}
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_100) && partnerActor != NULL) {
targetDataList->actorID = ACTOR_PARTNER;
targetDataList->partID = 1;
if (!arg1) {
targetDataList->posA.x = partnerActor->currentPos.x + partnerActor->size.x * 0.1 * partnerActor->scalingFactor;
targetDataList->posA.y = partnerActor->currentPos.y + partnerActor->size.y * 0.8 * partnerActor->scalingFactor;
targetDataList->posA.z = partnerActor->currentPos.z;
} else {
targetDataList->posA.x = partnerActor->homePos.x + partnerActor->size.x * 0.1 * partnerActor->scalingFactor;
targetDataList->posA.y = partnerActor->homePos.y + partnerActor->size.y * 0.8 * partnerActor->scalingFactor;
targetDataList->posA.z = partnerActor->homePos.z;
}
targetDataList->unk_10 = -50;
numTargets++;
targetDataList++;
}
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
targetActor = battleStatus->enemyActors[i];
if (targetActor == NULL) {
continue;
}
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_100) || (battleStatus->currentTargetListFlags & TARGET_FLAG_PLAYER)) {
break;
}
targetPart = targetActor->partsTable;
numParts = targetActor->numParts;
for (j = 0; j < numParts; targetPart = targetPart->nextPart, j++) {
if (!(targetPart->flags & ACTOR_PART_FLAG_NO_TARGET)) {
ActorPartBlueprint* partBlueprint = targetPart->staticData;
s8 partIndex;
if (!(targetPart->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
row = !arg1; // required to match
if (row) {
targetX = targetActor->currentPos.x;
targetY = targetActor->currentPos.y;
targetZ = targetActor->currentPos.z;
} else {
targetX = targetActor->homePos.x;
targetY = targetActor->homePos.y;
targetZ = targetActor->homePos.z;
}
targetX += targetPart->partOffset.x * targetActor->scalingFactor;
if (!(targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
targetY += targetPart->partOffset.y * targetActor->scalingFactor;
}
targetZ += targetPart->partOffset.z * targetActor->scalingFactor;
f12 = targetX;
targetX = targetActor->scalingFactor;
targetX = f12 + targetPart->targetOffset.x * targetX;
f2 = targetY;
f14 = targetZ + 5.0f;
if (!(targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
targetY = f2 + targetPart->targetOffset.y * targetActor->scalingFactor;
}
} else {
targetY = targetPart->absolutePosition.y;
targetZ = targetPart->absolutePosition.z;
f12 = targetPart->absolutePosition.x;
f2 = targetY;
f14 = targetZ + 5.0f;
targetX = f12 + targetPart->targetOffset.x;
if (!(targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
targetY = f2 + targetPart->targetOffset.y;
}
}
targetDataList->actorID = ACTOR_CLASS_ENEMY | i;
partIndex = partBlueprint->index;
targetDataList->posA.x = targetX;
targetDataList->posA.y = targetY;
targetDataList->posA.z = targetZ;
targetDataList->unk_10 = 0;
targetDataList->partID = partIndex;
if ((targetActor->flags & ACTOR_FLAG_TARGET_ONLY) && !(targetActor->flags & ACTOR_FLAG_10)) {
targetDataList->unk_10 = 100;
}
targetDataList->unk_10 += targetPart->unk_70;
targetDataList->posB.x = f12 + targetDataList->unk_10 * 100;
targetDataList->posB.y = f2;
targetDataList->posB.z = f14;
if (targetDataList->posB.y < 40) {
targetDataList->homeRow = 0;
} else if (targetDataList->posB.y < 85) {
targetDataList->homeRow = 1;
} else if (targetDataList->posB.y < 100) {
targetDataList->homeRow = 2;
} else {
do {
do {
targetDataList->homeRow = 3;
} while (0);
} while (0);
}
if (targetDataList->posB.x < 25) {
targetDataList->homeCol = 0;
} else if (targetDataList->posB.x < 65) {
targetDataList->homeCol = 1;
} else if (targetDataList->posB.x < 105) {
targetDataList->homeCol = 2;
} else {
do {
targetDataList->homeCol = 3;
} while (0);
}
if (targetDataList->posB.z < -30) {
targetDataList->layer = 0;
} else {
targetDataList->layer = 1;
}
numTargets++;
targetDataList++;
}
}
}
do {
actor->selectedTargetIndex = 0;
} while (0);
actor->targetListLength = numTargets;
// @bug this should be % 4
col = battleStatus->targetHomeIndex & 4;
row = battleStatus->targetHomeIndex / 4;
targetDataList = actor->targetData;
numTargets = actor->targetListLength;
for (i = 0; i < numTargets; i++) {
targetData = &targetDataList[i];
targetActor = get_actor(targetData->actorID);
targetPart = get_actor_part(targetActor, targetData->partID);
if (targetData->actorID == ACTOR_PLAYER || targetData->actorID == ACTOR_PARTNER) {
continue;
}
if (battleStatus->currentTargetListFlags & TARGET_FLAG_80000000) {
skip = TRUE;
goto END2;
}
if (!(gBattleStatus.flags2 & BS_FLAGS2_4000) && battleStatus->darknessMode > 0) {
get_screen_overlay_params(SCREEN_LAYER_BACK, &overlayType, &overlayZoom);
if (overlayZoom >= 215.0f) {
skip = TRUE;
sp18 = 1;
goto END2;
}
}
if (battleStatus->currentTargetListFlags & TARGET_FLAG_8000) {
if (!(targetPart->flags & ACTOR_PART_FLAG_MULTI_TARGET) ||
(targetActor->flags & ACTOR_FLAG_40) ||
(targetPart->flags & ACTOR_PART_FLAG_40))
{
skip = TRUE;
goto END2;
}
}
skip = 0;
END2:
if (skip) {
for (j = i; j < numTargets - 1; j++) {
actor->targetData[j] = actor->targetData[j + 1];
}
numTargets--;
i--;
}
}
for (i = 0; i < numTargets; i++) {
targetData = &targetDataList[i];
targetActor = get_actor(targetData->actorID);
targetPart = get_actor_part(targetActor, targetData->partID);
if (targetData->actorID == ACTOR_PLAYER || targetData->actorID == ACTOR_PARTNER) {
continue;
}
do {
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_800) && (targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_1)) {
skip = TRUE;
goto END;
}
} while (0);
do {
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_1000) && (targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_2)) {
skip = TRUE;
goto END;
}
} while (0);
do {
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_20000) && ((targetActor->flags & ACTOR_FLAG_80) || (targetPart->flags & ACTOR_PART_FLAG_80))) {
skip = TRUE;
goto END;
}
} while (0);
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_400) && (targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
skip = TRUE;
goto END;
}
if (!(battleStatus->currentTargetListFlags & TARGET_FLAG_10000) && (targetActor->flags & ACTOR_FLAG_TARGET_ONLY)) {
skip = TRUE;
goto END;
}
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_40000) && (targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
skip = TRUE;
goto END;
}
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_4) && targetData->homeRow != 0) {
skip = TRUE;
goto END;
}
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_10) && targetData->homeRow >= 2) {
skip = TRUE;
goto END;
}
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_40) && targetData->homeRow <= 0) {
skip = TRUE;
goto END;
}
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_4000) && !(targetPart->flags & ACTOR_PART_FLAG_20)) {
s32 cond = FALSE;
do {
for (j = 0; j < numTargets; j++) {
otherTarget = &targetDataList[j];
if (targetData != otherTarget) {
if (targetData->layer == otherTarget->layer &&
targetData->homeCol == otherTarget->homeCol &&
targetData->homeRow < otherTarget->homeRow) {
cond = TRUE;
break;
}
}
}
} while (0);
if (cond) {
skip = TRUE;
goto END;
}
}
if (battleStatus->currentTargetListFlags & TARGET_FLAG_2000) {
s32 cond = FALSE;
for (j = 0; j < numTargets; j++) {
otherTarget = &targetDataList[j];
if (targetData != otherTarget) {
if (targetData->layer == otherTarget->layer &&
targetData->homeRow == otherTarget->homeRow &&
targetData->homeCol > otherTarget->homeCol) {
cond = TRUE;
break;
}
}
}
if (cond) {
skip = TRUE;
goto END;
}
}
do {
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_20) && (targetActor->flags & ACTOR_FLAG_FLYING)) {
skip = TRUE;
goto END;
}
} while (0);
do {
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_100000) && targetData->homeRow == row + 1) {
skip = TRUE;
goto END;
}
} while (0);
do {
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_200000) && targetData->homeRow == row - 1) {
skip = TRUE;
goto END;
}
} while (0);
do {
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_400000) && targetData->homeCol == col - 1) {
skip = TRUE;
goto END;
}
} while (0);
do {
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_800000) && targetData->homeCol == col + 1) {
skip = TRUE;
goto END;
}
} while (0);
do {
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_100000) && targetData->homeRow < row) {
skip = TRUE;
goto END;
}
} while (0);
do {
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_200000) && targetData->homeRow > row) {
skip = TRUE;
goto END;
}
} while (0);
do {
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_400000) && targetData->homeCol > col) {
skip = TRUE;
goto END;
}
} while (0);
do {
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_800000) && targetData->homeCol < col) {
skip = TRUE;
goto END;
}
} while (0);
skip = FALSE;
END:
if (skip) {
for (j = i; j < numTargets - 1; j++) {
actor->targetData[j] = actor->targetData[j + 1];
}
numTargets--;
i--;
}
}
actor->targetListLength = numTargets;
if (numTargets == 0 && sp18) {
gBattleStatus.flags2 |= BS_FLAGS2_NO_TARGET_AVAILABLE;
} else {
gBattleStatus.flags2 &= ~BS_FLAGS2_NO_TARGET_AVAILABLE;
}
targetDataList = actor->targetData;
numTargets = actor->targetListLength;
targetIndexList = actor->targetIndexList;
for (i = 0; i < numTargets; i++) {
targetIndexList[i] = i;
}
for (i = 0; i < numTargets - 1; i++) {
for (j = i + 1; j < numTargets; j++) {
s32 index1 = targetIndexList[i];
s32 index2 = targetIndexList[j];
targetData = &targetDataList[index1];
otherTarget = &targetDataList[index2];
if (targetData->posA.x + targetData->unk_10 * 10 > otherTarget->posA.x + otherTarget->unk_10 * 10) {
targetIndexList[i] = targetIndexList[j];
targetIndexList[j] = index1;
}
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel au_amb_player_update
/* 2C834 80051434 27BDFF90 */ addiu $sp, $sp, -0x70
/* 2C838 80051438 AFB5005C */ sw $s5, 0x5C($sp)
/* 2C83C 8005143C 00A0A82D */ daddu $s5, $a1, $zero
/* 2C840 80051440 AFB00048 */ sw $s0, 0x48($sp)
/* 2C844 80051444 0000802D */ daddu $s0, $zero, $zero
/* 2C848 80051448 27A50010 */ addiu $a1, $sp, 0x10
/* 2C84C 8005144C AFBF006C */ sw $ra, 0x6C($sp)
/* 2C850 80051450 AFBE0068 */ sw $fp, 0x68($sp)
/* 2C854 80051454 AFB70064 */ sw $s7, 0x64($sp)
/* 2C858 80051458 AFB60060 */ sw $s6, 0x60($sp)
/* 2C85C 8005145C AFB40058 */ sw $s4, 0x58($sp)
/* 2C860 80051460 AFB30054 */ sw $s3, 0x54($sp)
/* 2C864 80051464 AFB20050 */ sw $s2, 0x50($sp)
/* 2C868 80051468 AFB1004C */ sw $s1, 0x4C($sp)
/* 2C86C 8005146C AFA40070 */ sw $a0, 0x70($sp)
/* 2C870 80051470 8C880000 */ lw $t0, 0x0($a0)
/* 2C874 80051474 27A40020 */ addiu $a0, $sp, 0x20
/* 2C878 80051478 A3A00034 */ sb $zero, 0x34($sp)
/* 2C87C 8005147C AFA80030 */ sw $t0, 0x30($sp)
.L80051480:
/* 2C880 80051480 00B01021 */ addu $v0, $a1, $s0
/* 2C884 80051484 00901821 */ addu $v1, $a0, $s0
/* 2C888 80051488 26100001 */ addiu $s0, $s0, 0x1
/* 2C88C 8005148C A0400000 */ sb $zero, 0x0($v0)
/* 2C890 80051490 2E020010 */ sltiu $v0, $s0, 0x10
/* 2C894 80051494 1440FFFA */ bnez $v0, .L80051480
/* 2C898 80051498 A0600000 */ sb $zero, 0x0($v1)
/* 2C89C 8005149C 92A20043 */ lbu $v0, 0x43($s5)
/* 2C8A0 800514A0 24100001 */ addiu $s0, $zero, 0x1
/* 2C8A4 800514A4 14500005 */ bne $v0, $s0, .L800514BC
/* 2C8A8 800514A8 00000000 */ nop
/* 2C8AC 800514AC 8FA40070 */ lw $a0, 0x70($sp)
/* 2C8B0 800514B0 0C01487A */ jal au_amb_player_stop
/* 2C8B4 800514B4 02A0282D */ daddu $a1, $s5, $zero
/* 2C8B8 800514B8 A2A00043 */ sb $zero, 0x43($s5)
.L800514BC:
/* 2C8BC 800514BC 96A20040 */ lhu $v0, 0x40($s5)
/* 2C8C0 800514C0 10400024 */ beqz $v0, .L80051554
/* 2C8C4 800514C4 0000B02D */ daddu $s6, $zero, $zero
/* 2C8C8 800514C8 8EA20038 */ lw $v0, 0x38($s5)
/* 2C8CC 800514CC 8EA4003C */ lw $a0, 0x3C($s5)
/* 2C8D0 800514D0 96A30040 */ lhu $v1, 0x40($s5)
/* 2C8D4 800514D4 00441021 */ addu $v0, $v0, $a0
/* 2C8D8 800514D8 2463FFFF */ addiu $v1, $v1, -0x1
/* 2C8DC 800514DC A6A30040 */ sh $v1, 0x40($s5)
/* 2C8E0 800514E0 3063FFFF */ andi $v1, $v1, 0xFFFF
/* 2C8E4 800514E4 14600018 */ bnez $v1, .L80051548
/* 2C8E8 800514E8 AEA20038 */ sw $v0, 0x38($s5)
/* 2C8EC 800514EC 92A20042 */ lbu $v0, 0x42($s5)
/* 2C8F0 800514F0 92A30026 */ lbu $v1, 0x26($s5)
/* 2C8F4 800514F4 00021600 */ sll $v0, $v0, 24
/* 2C8F8 800514F8 10600013 */ beqz $v1, .L80051548
/* 2C8FC 800514FC AEA20038 */ sw $v0, 0x38($s5)
/* 2C900 80051500 1470000D */ bne $v1, $s0, .L80051538
/* 2C904 80051504 24020002 */ addiu $v0, $zero, 0x2
/* 2C908 80051508 3C028008 */ lui $v0, %hi(D_80078520)
/* 2C90C 8005150C 24428520 */ addiu $v0, $v0, %lo(D_80078520)
/* 2C910 80051510 AEA20008 */ sw $v0, 0x8($s5)
/* 2C914 80051514 08014552 */ j .L80051548
/* 2C918 80051518 AEA30018 */ sw $v1, 0x18($s5)
.L8005151C:
/* 2C91C 8005151C 8FA40070 */ lw $a0, 0x70($sp)
/* 2C920 80051520 02A0282D */ daddu $a1, $s5, $zero
/* 2C924 80051524 AEA00008 */ sw $zero, 0x8($s5)
/* 2C928 80051528 0C01487A */ jal au_amb_player_stop
/* 2C92C 8005152C AEA00020 */ sw $zero, 0x20($s5)
/* 2C930 80051530 0801482F */ j .L800520BC
/* 2C934 80051534 00000000 */ nop
.L80051538:
/* 2C938 80051538 14620004 */ bne $v1, $v0, .L8005154C
/* 2C93C 8005153C 24080001 */ addiu $t0, $zero, 0x1
/* 2C940 80051540 24020003 */ addiu $v0, $zero, 0x3
/* 2C944 80051544 A2A20024 */ sb $v0, 0x24($s5)
.L80051548:
/* 2C948 80051548 24080001 */ addiu $t0, $zero, 0x1
.L8005154C:
/* 2C94C 8005154C A3A80034 */ sb $t0, 0x34($sp)
/* 2C950 80051550 0000B02D */ daddu $s6, $zero, $zero
.L80051554:
/* 2C954 80051554 27A80020 */ addiu $t0, $sp, 0x20
/* 2C958 80051558 AFA80038 */ sw $t0, 0x38($sp)
/* 2C95C 8005155C 241E0044 */ addiu $fp, $zero, 0x44
.L80051560:
/* 2C960 80051560 02BE9821 */ addu $s3, $s5, $fp
/* 2C964 80051564 86620014 */ lh $v0, 0x14($s3)
/* 2C968 80051568 96630014 */ lhu $v1, 0x14($s3)
/* 2C96C 8005156C 10400042 */ beqz $v0, .L80051678
/* 2C970 80051570 2462FFFF */ addiu $v0, $v1, -0x1
/* 2C974 80051574 A6620014 */ sh $v0, 0x14($s3)
/* 2C978 80051578 00021400 */ sll $v0, $v0, 16
/* 2C97C 8005157C 10400005 */ beqz $v0, .L80051594
/* 2C980 80051580 00000000 */ nop
/* 2C984 80051584 8E62000C */ lw $v0, 0xC($s3)
/* 2C988 80051588 8E630010 */ lw $v1, 0x10($s3)
/* 2C98C 8005158C 08014567 */ j .L8005159C
/* 2C990 80051590 00431021 */ addu $v0, $v0, $v1
.L80051594:
/* 2C994 80051594 86620016 */ lh $v0, 0x16($s3)
/* 2C998 80051598 00021400 */ sll $v0, $v0, 16
.L8005159C:
/* 2C99C 8005159C AE62000C */ sw $v0, 0xC($s3)
/* 2C9A0 800515A0 00162400 */ sll $a0, $s6, 16
/* 2C9A4 800515A4 8EB00030 */ lw $s0, 0x30($s5)
/* 2C9A8 800515A8 8EA30014 */ lw $v1, 0x14($s5)
/* 2C9AC 800515AC 8EA20034 */ lw $v0, 0x34($s5)
/* 2C9B0 800515B0 0202102B */ sltu $v0, $s0, $v0
/* 2C9B4 800515B4 10400030 */ beqz $v0, .L80051678
/* 2C9B8 800515B8 0064B821 */ addu $s7, $v1, $a0
/* 2C9BC 800515BC 001010C0 */ sll $v0, $s0, 3
/* 2C9C0 800515C0 00501021 */ addu $v0, $v0, $s0
/* 2C9C4 800515C4 000210C0 */ sll $v0, $v0, 3
/* 2C9C8 800515C8 24541320 */ addiu $s4, $v0, 0x1320
.L800515CC:
/* 2C9CC 800515CC 8EA20030 */ lw $v0, 0x30($s5)
/* 2C9D0 800515D0 8FA80070 */ lw $t0, 0x70($sp)
/* 2C9D4 800515D4 02021023 */ subu $v0, $s0, $v0
/* 2C9D8 800515D8 000210C0 */ sll $v0, $v0, 3
/* 2C9DC 800515DC 244207B4 */ addiu $v0, $v0, 0x7B4
/* 2C9E0 800515E0 01029021 */ addu $s2, $t0, $v0
/* 2C9E4 800515E4 8E420000 */ lw $v0, 0x0($s2)
/* 2C9E8 800515E8 3C08FFFF */ lui $t0, (0xFFFF0000 >> 16)
/* 2C9EC 800515EC 00481024 */ and $v0, $v0, $t0
/* 2C9F0 800515F0 1457001C */ bne $v0, $s7, .L80051664
/* 2C9F4 800515F4 00000000 */ nop
/* 2C9F8 800515F8 8FA80030 */ lw $t0, 0x30($sp)
/* 2C9FC 800515FC 01148821 */ addu $s1, $t0, $s4
/* 2CA00 80051600 8FA80070 */ lw $t0, 0x70($sp)
/* 2CA04 80051604 92230045 */ lbu $v1, 0x45($s1)
/* 2CA08 80051608 91020022 */ lbu $v0, 0x22($t0)
/* 2CA0C 8005160C 14620015 */ bne $v1, $v0, .L80051664
/* 2CA10 80051610 24080009 */ addiu $t0, $zero, 0x9
/* 2CA14 80051614 12C80013 */ beq $s6, $t0, .L80051664
/* 2CA18 80051618 00000000 */ nop
/* 2CA1C 8005161C 86420004 */ lh $v0, 0x4($s2)
/* 2CA20 80051620 8664000C */ lh $a0, 0xC($s3)
/* 2CA24 80051624 0C014E3E */ jal au_compute_pitch_ratio
/* 2CA28 80051628 00442021 */ addu $a0, $v0, $a0
/* 2CA2C 8005162C 8E620000 */ lw $v0, 0x0($s3)
/* 2CA30 80051630 C4420020 */ lwc1 $f2, 0x20($v0)
/* 2CA34 80051634 46020002 */ mul.s $f0, $f0, $f2
/* 2CA38 80051638 00000000 */ nop
/* 2CA3C 8005163C 92220043 */ lbu $v0, 0x43($s1)
/* 2CA40 80051640 34420008 */ ori $v0, $v0, 0x8
/* 2CA44 80051644 A2220043 */ sb $v0, 0x43($s1)
/* 2CA48 80051648 E6200004 */ swc1 $f0, 0x4($s1)
/* 2CA4C 8005164C 8EA20030 */ lw $v0, 0x30($s5)
/* 2CA50 80051650 8FA80038 */ lw $t0, 0x38($sp)
/* 2CA54 80051654 02021023 */ subu $v0, $s0, $v0
/* 2CA58 80051658 01021021 */ addu $v0, $t0, $v0
/* 2CA5C 8005165C 24080001 */ addiu $t0, $zero, 0x1
/* 2CA60 80051660 A0480000 */ sb $t0, 0x0($v0)
.L80051664:
/* 2CA64 80051664 8EA20034 */ lw $v0, 0x34($s5)
/* 2CA68 80051668 26100001 */ addiu $s0, $s0, 0x1
/* 2CA6C 8005166C 0202102B */ sltu $v0, $s0, $v0
/* 2CA70 80051670 1440FFD6 */ bnez $v0, .L800515CC
/* 2CA74 80051674 26940048 */ addiu $s4, $s4, 0x48
.L80051678:
/* 2CA78 80051678 26D60001 */ addiu $s6, $s6, 0x1
/* 2CA7C 8005167C 2EC2000A */ sltiu $v0, $s6, 0xA
/* 2CA80 80051680 1440FFB7 */ bnez $v0, .L80051560
/* 2CA84 80051684 27DE0028 */ addiu $fp, $fp, 0x28
/* 2CA88 80051688 0000B02D */ daddu $s6, $zero, $zero
/* 2CA8C 8005168C 3C06FFFF */ lui $a2, (0xFFFF0000 >> 16)
/* 2CA90 80051690 24050044 */ addiu $a1, $zero, 0x44
.L80051694:
/* 2CA94 80051694 02A59821 */ addu $s3, $s5, $a1
/* 2CA98 80051698 86620020 */ lh $v0, 0x20($s3)
/* 2CA9C 8005169C 96630020 */ lhu $v1, 0x20($s3)
/* 2CAA0 800516A0 1040003F */ beqz $v0, .L800517A0
/* 2CAA4 800516A4 2462FFFF */ addiu $v0, $v1, -0x1
/* 2CAA8 800516A8 A6620020 */ sh $v0, 0x20($s3)
/* 2CAAC 800516AC 00021400 */ sll $v0, $v0, 16
/* 2CAB0 800516B0 10400005 */ beqz $v0, .L800516C8
/* 2CAB4 800516B4 00000000 */ nop
/* 2CAB8 800516B8 8E620018 */ lw $v0, 0x18($s3)
/* 2CABC 800516BC 8E63001C */ lw $v1, 0x1C($s3)
/* 2CAC0 800516C0 080145B4 */ j .L800516D0
/* 2CAC4 800516C4 00431021 */ addu $v0, $v0, $v1
.L800516C8:
/* 2CAC8 800516C8 86620022 */ lh $v0, 0x22($s3)
/* 2CACC 800516CC 00021400 */ sll $v0, $v0, 16
.L800516D0:
/* 2CAD0 800516D0 AE620018 */ sw $v0, 0x18($s3)
/* 2CAD4 800516D4 00162400 */ sll $a0, $s6, 16
/* 2CAD8 800516D8 8EB00030 */ lw $s0, 0x30($s5)
/* 2CADC 800516DC 8EA30014 */ lw $v1, 0x14($s5)
/* 2CAE0 800516E0 8EA20034 */ lw $v0, 0x34($s5)
/* 2CAE4 800516E4 0202102B */ sltu $v0, $s0, $v0
/* 2CAE8 800516E8 1040002D */ beqz $v0, .L800517A0
/* 2CAEC 800516EC 0064B821 */ addu $s7, $v1, $a0
/* 2CAF0 800516F0 001010C0 */ sll $v0, $s0, 3
/* 2CAF4 800516F4 00501021 */ addu $v0, $v0, $s0
/* 2CAF8 800516F8 000210C0 */ sll $v0, $v0, 3
/* 2CAFC 800516FC 24441320 */ addiu $a0, $v0, 0x1320
.L80051700:
/* 2CB00 80051700 8EA20030 */ lw $v0, 0x30($s5)
/* 2CB04 80051704 8FA80070 */ lw $t0, 0x70($sp)
/* 2CB08 80051708 02021023 */ subu $v0, $s0, $v0
/* 2CB0C 8005170C 000210C0 */ sll $v0, $v0, 3
/* 2CB10 80051710 244207B4 */ addiu $v0, $v0, 0x7B4
/* 2CB14 80051714 01029021 */ addu $s2, $t0, $v0
/* 2CB18 80051718 8E420000 */ lw $v0, 0x0($s2)
/* 2CB1C 8005171C 00461024 */ and $v0, $v0, $a2
/* 2CB20 80051720 1457001A */ bne $v0, $s7, .L8005178C
/* 2CB24 80051724 00000000 */ nop
/* 2CB28 80051728 8FA80030 */ lw $t0, 0x30($sp)
/* 2CB2C 8005172C 01048821 */ addu $s1, $t0, $a0
/* 2CB30 80051730 8FA80070 */ lw $t0, 0x70($sp)
/* 2CB34 80051734 92230045 */ lbu $v1, 0x45($s1)
/* 2CB38 80051738 91020022 */ lbu $v0, 0x22($t0)
/* 2CB3C 8005173C 14620013 */ bne $v1, $v0, .L8005178C
/* 2CB40 80051740 00000000 */ nop
/* 2CB44 80051744 92430001 */ lbu $v1, 0x1($s2)
/* 2CB48 80051748 00031080 */ sll $v0, $v1, 2
/* 2CB4C 8005174C 00431021 */ addu $v0, $v0, $v1
/* 2CB50 80051750 000210C0 */ sll $v0, $v0, 3
/* 2CB54 80051754 00559821 */ addu $s3, $v0, $s5
/* 2CB58 80051758 82A30038 */ lb $v1, 0x38($s5)
/* 2CB5C 8005175C 8662005C */ lh $v0, 0x5C($s3)
/* 2CB60 80051760 00620018 */ mult $v1, $v0
/* 2CB64 80051764 00004012 */ mflo $t0
/* 2CB68 80051768 82420006 */ lb $v0, 0x6($s2)
/* 2CB6C 8005176C 00000000 */ nop
/* 2CB70 80051770 01020018 */ mult $t0, $v0
/* 2CB74 80051774 9222003D */ lbu $v0, 0x3D($s1)
/* 2CB78 80051778 34420020 */ ori $v0, $v0, 0x20
/* 2CB7C 8005177C A222003D */ sb $v0, 0x3D($s1)
/* 2CB80 80051780 00004012 */ mflo $t0
/* 2CB84 80051784 00081383 */ sra $v0, $t0, 14
/* 2CB88 80051788 A6220040 */ sh $v0, 0x40($s1)
.L8005178C:
/* 2CB8C 8005178C 8EA20034 */ lw $v0, 0x34($s5)
/* 2CB90 80051790 26100001 */ addiu $s0, $s0, 0x1
/* 2CB94 80051794 0202102B */ sltu $v0, $s0, $v0
/* 2CB98 80051798 1440FFD9 */ bnez $v0, .L80051700
/* 2CB9C 8005179C 24840048 */ addiu $a0, $a0, 0x48
.L800517A0:
/* 2CBA0 800517A0 26D60001 */ addiu $s6, $s6, 0x1
/* 2CBA4 800517A4 2EC2000A */ sltiu $v0, $s6, 0xA
/* 2CBA8 800517A8 1440FFBA */ bnez $v0, .L80051694
/* 2CBAC 800517AC 24A50028 */ addiu $a1, $a1, 0x28
/* 2CBB0 800517B0 8EA20018 */ lw $v0, 0x18($s5)
/* 2CBB4 800517B4 2442FFFF */ addiu $v0, $v0, -0x1
/* 2CBB8 800517B8 1C400240 */ bgtz $v0, .L800520BC
/* 2CBBC 800517BC AEA20018 */ sw $v0, 0x18($s5)
/* 2CBC0 800517C0 1440023E */ bnez $v0, .L800520BC
/* 2CBC4 800517C4 00000000 */ nop
/* 2CBC8 800517C8 241E0001 */ addiu $fp, $zero, 0x1
/* 2CBCC 800517CC 27A80010 */ addiu $t0, $sp, 0x10
/* 2CBD0 800517D0 AFA80040 */ sw $t0, 0x40($sp)
/* 2CBD4 800517D4 27A80020 */ addiu $t0, $sp, 0x20
/* 2CBD8 800517D8 AFA8003C */ sw $t0, 0x3C($sp)
.L800517DC:
/* 2CBDC 800517DC 0C014874 */ jal au_amb_read_next
/* 2CBE0 800517E0 02A0202D */ daddu $a0, $s5, $zero
/* 2CBE4 800517E4 0040802D */ daddu $s0, $v0, $zero
/* 2CBE8 800517E8 00101600 */ sll $v0, $s0, 24
/* 2CBEC 800517EC 0440000E */ bltz $v0, .L80051828
/* 2CBF0 800517F0 320300FF */ andi $v1, $s0, 0xFF
/* 2CBF4 800517F4 1060FF49 */ beqz $v1, .L8005151C
/* 2CBF8 800517F8 2C620078 */ sltiu $v0, $v1, 0x78
/* 2CBFC 800517FC 5440022C */ bnel $v0, $zero, .L800520B0
/* 2CC00 80051800 AEA30018 */ sw $v1, 0x18($s5)
/* 2CC04 80051804 0C014874 */ jal au_amb_read_next
/* 2CC08 80051808 02A0202D */ daddu $a0, $s5, $zero
/* 2CC0C 8005180C 32030007 */ andi $v1, $s0, 0x7
/* 2CC10 80051810 00031A00 */ sll $v1, $v1, 8
/* 2CC14 80051814 304200FF */ andi $v0, $v0, 0xFF
/* 2CC18 80051818 00621821 */ addu $v1, $v1, $v0
/* 2CC1C 8005181C 24630078 */ addiu $v1, $v1, 0x78
/* 2CC20 80051820 0801482C */ j .L800520B0
/* 2CC24 80051824 AEA30018 */ sw $v1, 0x18($s5)
.L80051828:
/* 2CC28 80051828 0C014874 */ jal au_amb_read_next
/* 2CC2C 8005182C 02A0202D */ daddu $a0, $s5, $zero
/* 2CC30 80051830 3216000F */ andi $s6, $s0, 0xF
/* 2CC34 80051834 00161880 */ sll $v1, $s6, 2
/* 2CC38 80051838 00761821 */ addu $v1, $v1, $s6
/* 2CC3C 8005183C 000318C0 */ sll $v1, $v1, 3
/* 2CC40 80051840 24630044 */ addiu $v1, $v1, 0x44
/* 2CC44 80051844 02A39821 */ addu $s3, $s5, $v1
/* 2CC48 80051848 0040B82D */ daddu $s7, $v0, $zero
/* 2CC4C 8005184C 320300F0 */ andi $v1, $s0, 0xF0
/* 2CC50 80051850 240200B0 */ addiu $v0, $zero, 0xB0
/* 2CC54 80051854 1062018E */ beq $v1, $v0, .L80051E90
/* 2CC58 80051858 286200B1 */ slti $v0, $v1, 0xB1
/* 2CC5C 8005185C 1040000E */ beqz $v0, .L80051898
/* 2CC60 80051860 24020090 */ addiu $v0, $zero, 0x90
/* 2CC64 80051864 10620047 */ beq $v1, $v0, .L80051984
/* 2CC68 80051868 28620091 */ slti $v0, $v1, 0x91
/* 2CC6C 8005186C 10400005 */ beqz $v0, .L80051884
/* 2CC70 80051870 24020080 */ addiu $v0, $zero, 0x80
/* 2CC74 80051874 10620011 */ beq $v1, $v0, .L800518BC
/* 2CC78 80051878 00000000 */ nop
/* 2CC7C 8005187C 0801482C */ j .L800520B0
/* 2CC80 80051880 00000000 */ nop
.L80051884:
/* 2CC84 80051884 240200A0 */ addiu $v0, $zero, 0xA0
/* 2CC88 80051888 10620111 */ beq $v1, $v0, .L80051CD0
/* 2CC8C 8005188C 32E20080 */ andi $v0, $s7, 0x80
/* 2CC90 80051890 0801482C */ j .L800520B0
/* 2CC94 80051894 00000000 */ nop
.L80051898:
/* 2CC98 80051898 240200E0 */ addiu $v0, $zero, 0xE0
/* 2CC9C 8005189C 106201C8 */ beq $v1, $v0, .L80051FC0
/* 2CCA0 800518A0 286200E1 */ slti $v0, $v1, 0xE1
/* 2CCA4 800518A4 10400202 */ beqz $v0, .L800520B0
/* 2CCA8 800518A8 240200C0 */ addiu $v0, $zero, 0xC0
/* 2CCAC 800518AC 106201B7 */ beq $v1, $v0, .L80051F8C
/* 2CCB0 800518B0 00000000 */ nop
/* 2CCB4 800518B4 0801482C */ j .L800520B0
/* 2CCB8 800518B8 00000000 */ nop
.L800518BC:
/* 2CCBC 800518BC 92A20025 */ lbu $v0, 0x25($s5)
/* 2CCC0 800518C0 144001FB */ bnez $v0, .L800520B0
/* 2CCC4 800518C4 00161400 */ sll $v0, $s6, 16
/* 2CCC8 800518C8 8EB00030 */ lw $s0, 0x30($s5)
/* 2CCCC 800518CC 8EA40014 */ lw $a0, 0x14($s5)
/* 2CCD0 800518D0 8EA30034 */ lw $v1, 0x34($s5)
/* 2CCD4 800518D4 00822021 */ addu $a0, $a0, $v0
/* 2CCD8 800518D8 32E200FF */ andi $v0, $s7, 0xFF
/* 2CCDC 800518DC 00021200 */ sll $v0, $v0, 8
/* 2CCE0 800518E0 0203182B */ sltu $v1, $s0, $v1
/* 2CCE4 800518E4 106001F2 */ beqz $v1, .L800520B0
/* 2CCE8 800518E8 0082B821 */ addu $s7, $a0, $v0
/* 2CCEC 800518EC 001010C0 */ sll $v0, $s0, 3
/* 2CCF0 800518F0 00501021 */ addu $v0, $v0, $s0
/* 2CCF4 800518F4 000210C0 */ sll $v0, $v0, 3
/* 2CCF8 800518F8 24441320 */ addiu $a0, $v0, 0x1320
.L800518FC:
/* 2CCFC 800518FC 8EA20030 */ lw $v0, 0x30($s5)
/* 2CD00 80051900 8FA80070 */ lw $t0, 0x70($sp)
/* 2CD04 80051904 02021023 */ subu $v0, $s0, $v0
/* 2CD08 80051908 000210C0 */ sll $v0, $v0, 3
/* 2CD0C 8005190C 01021821 */ addu $v1, $t0, $v0
/* 2CD10 80051910 8C6207B4 */ lw $v0, 0x7B4($v1)
/* 2CD14 80051914 1457000C */ bne $v0, $s7, .L80051948
/* 2CD18 80051918 00000000 */ nop
/* 2CD1C 8005191C 8FA80030 */ lw $t0, 0x30($sp)
/* 2CD20 80051920 A07E07B7 */ sb $fp, 0x7B7($v1)
/* 2CD24 80051924 01048821 */ addu $s1, $t0, $a0
/* 2CD28 80051928 8FA80070 */ lw $t0, 0x70($sp)
/* 2CD2C 8005192C 92230045 */ lbu $v1, 0x45($s1)
/* 2CD30 80051930 91020022 */ lbu $v0, 0x22($t0)
/* 2CD34 80051934 14620004 */ bne $v1, $v0, .L80051948
/* 2CD38 80051938 00000000 */ nop
/* 2CD3C 8005193C 9222003D */ lbu $v0, 0x3D($s1)
/* 2CD40 80051940 34420010 */ ori $v0, $v0, 0x10
/* 2CD44 80051944 A222003D */ sb $v0, 0x3D($s1)
.L80051948:
/* 2CD48 80051948 8EA20034 */ lw $v0, 0x34($s5)
/* 2CD4C 8005194C 26100001 */ addiu $s0, $s0, 0x1
/* 2CD50 80051950 0202102B */ sltu $v0, $s0, $v0
/* 2CD54 80051954 1440FFE9 */ bnez $v0, .L800518FC
/* 2CD58 80051958 24840048 */ addiu $a0, $a0, 0x48
/* 2CD5C 8005195C 0801482C */ j .L800520B0
/* 2CD60 80051960 00000000 */ nop
.L80051964:
/* 2CD64 80051964 0C014E31 */ jal au_reset_voice
/* 2CD68 80051968 320500FF */ andi $a1, $s0, 0xFF
/* 2CD6C 8005196C 0801468F */ j .L80051A3C
/* 2CD70 80051970 00000000 */ nop
.L80051974:
/* 2CD74 80051974 0C014E31 */ jal au_reset_voice
/* 2CD78 80051978 320500FF */ andi $a1, $s0, 0xFF
/* 2CD7C 8005197C 080146A8 */ j .L80051AA0
/* 2CD80 80051980 00000000 */ nop
.L80051984:
/* 2CD84 80051984 0C014874 */ jal au_amb_read_next
/* 2CD88 80051988 02A0202D */ daddu $a0, $s5, $zero
/* 2CD8C 8005198C 92A30025 */ lbu $v1, 0x25($s5)
/* 2CD90 80051990 146001C7 */ bnez $v1, .L800520B0
/* 2CD94 80051994 0040A02D */ daddu $s4, $v0, $zero
/* 2CD98 80051998 8EB00030 */ lw $s0, 0x30($s5)
/* 2CD9C 8005199C 8EA40034 */ lw $a0, 0x34($s5)
/* 2CDA0 800519A0 0204102B */ sltu $v0, $s0, $a0
/* 2CDA4 800519A4 10400012 */ beqz $v0, .L800519F0
/* 2CDA8 800519A8 001010C0 */ sll $v0, $s0, 3
/* 2CDAC 800519AC 00501021 */ addu $v0, $v0, $s0
/* 2CDB0 800519B0 000210C0 */ sll $v0, $v0, 3
/* 2CDB4 800519B4 24431320 */ addiu $v1, $v0, 0x1320
/* 2CDB8 800519B8 8FA80030 */ lw $t0, 0x30($sp)
.L800519BC:
/* 2CDBC 800519BC 01038821 */ addu $s1, $t0, $v1
/* 2CDC0 800519C0 92220045 */ lbu $v0, 0x45($s1)
/* 2CDC4 800519C4 10400005 */ beqz $v0, .L800519DC
/* 2CDC8 800519C8 00000000 */ nop
/* 2CDCC 800519CC 26100001 */ addiu $s0, $s0, 0x1
/* 2CDD0 800519D0 0204102B */ sltu $v0, $s0, $a0
/* 2CDD4 800519D4 1440FFF9 */ bnez $v0, .L800519BC
/* 2CDD8 800519D8 24630048 */ addiu $v1, $v1, 0x48
.L800519DC:
/* 2CDDC 800519DC 8EA20034 */ lw $v0, 0x34($s5)
/* 2CDE0 800519E0 0202102B */ sltu $v0, $s0, $v0
/* 2CDE4 800519E4 14400032 */ bnez $v0, .L80051AB0
/* 2CDE8 800519E8 00000000 */ nop
/* 2CDEC 800519EC 8EB00030 */ lw $s0, 0x30($s5)
.L800519F0:
/* 2CDF0 800519F0 8EA30034 */ lw $v1, 0x34($s5)
/* 2CDF4 800519F4 0203102B */ sltu $v0, $s0, $v1
/* 2CDF8 800519F8 10400014 */ beqz $v0, .L80051A4C
/* 2CDFC 800519FC 001010C0 */ sll $v0, $s0, 3
/* 2CE00 80051A00 0060202D */ daddu $a0, $v1, $zero
/* 2CE04 80051A04 00501021 */ addu $v0, $v0, $s0
/* 2CE08 80051A08 000210C0 */ sll $v0, $v0, 3
/* 2CE0C 80051A0C 8FA80070 */ lw $t0, 0x70($sp)
/* 2CE10 80051A10 24431320 */ addiu $v1, $v0, 0x1320
/* 2CE14 80051A14 91050022 */ lbu $a1, 0x22($t0)
/* 2CE18 80051A18 8FA80030 */ lw $t0, 0x30($sp)
.L80051A1C:
/* 2CE1C 80051A1C 01038821 */ addu $s1, $t0, $v1
/* 2CE20 80051A20 92220045 */ lbu $v0, 0x45($s1)
/* 2CE24 80051A24 5045FFCF */ beql $v0, $a1, .L80051964
/* 2CE28 80051A28 0220202D */ daddu $a0, $s1, $zero
/* 2CE2C 80051A2C 26100001 */ addiu $s0, $s0, 0x1
/* 2CE30 80051A30 0204102B */ sltu $v0, $s0, $a0
/* 2CE34 80051A34 1440FFF9 */ bnez $v0, .L80051A1C
/* 2CE38 80051A38 24630048 */ addiu $v1, $v1, 0x48
.L80051A3C:
/* 2CE3C 80051A3C 8EA20034 */ lw $v0, 0x34($s5)
/* 2CE40 80051A40 0202102B */ sltu $v0, $s0, $v0
/* 2CE44 80051A44 1440001A */ bnez $v0, .L80051AB0
/* 2CE48 80051A48 00000000 */ nop
.L80051A4C:
/* 2CE4C 80051A4C 8EB00030 */ lw $s0, 0x30($s5)
/* 2CE50 80051A50 8EA30034 */ lw $v1, 0x34($s5)
/* 2CE54 80051A54 0203102B */ sltu $v0, $s0, $v1
/* 2CE58 80051A58 10400195 */ beqz $v0, .L800520B0
/* 2CE5C 80051A5C 001010C0 */ sll $v0, $s0, 3
/* 2CE60 80051A60 0060202D */ daddu $a0, $v1, $zero
/* 2CE64 80051A64 00501021 */ addu $v0, $v0, $s0
/* 2CE68 80051A68 000210C0 */ sll $v0, $v0, 3
/* 2CE6C 80051A6C 8FA80070 */ lw $t0, 0x70($sp)
/* 2CE70 80051A70 24431320 */ addiu $v1, $v0, 0x1320
/* 2CE74 80051A74 91050022 */ lbu $a1, 0x22($t0)
/* 2CE78 80051A78 8FA80030 */ lw $t0, 0x30($sp)
.L80051A7C:
/* 2CE7C 80051A7C 01038821 */ addu $s1, $t0, $v1
/* 2CE80 80051A80 92220045 */ lbu $v0, 0x45($s1)
/* 2CE84 80051A84 0045102B */ sltu $v0, $v0, $a1
/* 2CE88 80051A88 5440FFBA */ bnel $v0, $zero, .L80051974
/* 2CE8C 80051A8C 0220202D */ daddu $a0, $s1, $zero
/* 2CE90 80051A90 26100001 */ addiu $s0, $s0, 0x1
/* 2CE94 80051A94 0204102B */ sltu $v0, $s0, $a0
/* 2CE98 80051A98 1440FFF8 */ bnez $v0, .L80051A7C
/* 2CE9C 80051A9C 24630048 */ addiu $v1, $v1, 0x48
.L80051AA0:
/* 2CEA0 80051AA0 8EA20034 */ lw $v0, 0x34($s5)
/* 2CEA4 80051AA4 0202102B */ sltu $v0, $s0, $v0
/* 2CEA8 80051AA8 10400181 */ beqz $v0, .L800520B0
/* 2CEAC 80051AAC 00000000 */ nop
.L80051AB0:
/* 2CEB0 80051AB0 8EA20030 */ lw $v0, 0x30($s5)
/* 2CEB4 80051AB4 8FA80040 */ lw $t0, 0x40($sp)
/* 2CEB8 80051AB8 02021023 */ subu $v0, $s0, $v0
/* 2CEBC 80051ABC 01021021 */ addu $v0, $t0, $v0
/* 2CEC0 80051AC0 A05E0000 */ sb $fp, 0x0($v0)
/* 2CEC4 80051AC4 8EA20030 */ lw $v0, 0x30($s5)
/* 2CEC8 80051AC8 8FA8003C */ lw $t0, 0x3C($sp)
/* 2CECC 80051ACC 02021023 */ subu $v0, $s0, $v0
/* 2CED0 80051AD0 01021021 */ addu $v0, $t0, $v0
/* 2CED4 80051AD4 A05E0000 */ sb $fp, 0x0($v0)
/* 2CED8 80051AD8 8EA20030 */ lw $v0, 0x30($s5)
/* 2CEDC 80051ADC 8FA80070 */ lw $t0, 0x70($sp)
/* 2CEE0 80051AE0 8EA30014 */ lw $v1, 0x14($s5)
/* 2CEE4 80051AE4 02021023 */ subu $v0, $s0, $v0
/* 2CEE8 80051AE8 000210C0 */ sll $v0, $v0, 3
/* 2CEEC 80051AEC 244207B4 */ addiu $v0, $v0, 0x7B4
/* 2CEF0 80051AF0 01029021 */ addu $s2, $t0, $v0
/* 2CEF4 80051AF4 00161400 */ sll $v0, $s6, 16
/* 2CEF8 80051AF8 00621821 */ addu $v1, $v1, $v0
/* 2CEFC 80051AFC 32E200FF */ andi $v0, $s7, 0xFF
/* 2CF00 80051B00 00021200 */ sll $v0, $v0, 8
/* 2CF04 80051B04 00621821 */ addu $v1, $v1, $v0
/* 2CF08 80051B08 AE430000 */ sw $v1, 0x0($s2)
/* 2CF0C 80051B0C 92620026 */ lbu $v0, 0x26($s3)
/* 2CF10 80051B10 30420001 */ andi $v0, $v0, 0x1
/* 2CF14 80051B14 50400002 */ beql $v0, $zero, .L80051B20
/* 2CF18 80051B18 A2400007 */ sb $zero, 0x7($s2)
/* 2CF1C 80051B1C A25E0007 */ sb $fp, 0x7($s2)
.L80051B20:
/* 2CF20 80051B20 24080009 */ addiu $t0, $zero, 0x9
/* 2CF24 80051B24 12C80033 */ beq $s6, $t0, .L80051BF4
/* 2CF28 80051B28 32E3007F */ andi $v1, $s7, 0x7F
/* 2CF2C 80051B2C 92620026 */ lbu $v0, 0x26($s3)
/* 2CF30 80051B30 30420001 */ andi $v0, $v0, 0x1
/* 2CF34 80051B34 50400002 */ beql $v0, $zero, .L80051B40
/* 2CF38 80051B38 A2400007 */ sb $zero, 0x7($s2)
/* 2CF3C 80051B3C A25E0007 */ sb $fp, 0x7($s2)
.L80051B40:
/* 2CF40 80051B40 3284007F */ andi $a0, $s4, 0x7F
/* 2CF44 80051B44 8E620000 */ lw $v0, 0x0($s3)
/* 2CF48 80051B48 32E3007F */ andi $v1, $s7, 0x7F
/* 2CF4C 80051B4C 9445001E */ lhu $a1, 0x1E($v0)
/* 2CF50 80051B50 00031040 */ sll $v0, $v1, 1
/* 2CF54 80051B54 00431021 */ addu $v0, $v0, $v1
/* 2CF58 80051B58 000210C0 */ sll $v0, $v0, 3
/* 2CF5C 80051B5C 00431021 */ addu $v0, $v0, $v1
/* 2CF60 80051B60 00021080 */ sll $v0, $v0, 2
/* 2CF64 80051B64 A2440006 */ sb $a0, 0x6($s2)
/* 2CF68 80051B68 00451023 */ subu $v0, $v0, $a1
/* 2CF6C 80051B6C A6420004 */ sh $v0, 0x4($s2)
/* 2CF70 80051B70 82A30038 */ lb $v1, 0x38($s5)
/* 2CF74 80051B74 86620018 */ lh $v0, 0x18($s3)
/* 2CF78 80051B78 00620018 */ mult $v1, $v0
/* 2CF7C 80051B7C 00004012 */ mflo $t0
/* 2CF80 80051B80 00000000 */ nop
/* 2CF84 80051B84 00000000 */ nop
/* 2CF88 80051B88 01040018 */ mult $t0, $a0
/* 2CF8C 80051B8C 00004012 */ mflo $t0
/* 2CF90 80051B90 00081383 */ sra $v0, $t0, 14
/* 2CF94 80051B94 A6220040 */ sh $v0, 0x40($s1)
/* 2CF98 80051B98 86420004 */ lh $v0, 0x4($s2)
/* 2CF9C 80051B9C 8664000C */ lh $a0, 0xC($s3)
/* 2CFA0 80051BA0 0C014E3E */ jal au_compute_pitch_ratio
/* 2CFA4 80051BA4 00442021 */ addu $a0, $v0, $a0
/* 2CFA8 80051BA8 8E620000 */ lw $v0, 0x0($s3)
/* 2CFAC 80051BAC C4420020 */ lwc1 $f2, 0x20($v0)
/* 2CFB0 80051BB0 46020002 */ mul.s $f0, $f0, $f2
/* 2CFB4 80051BB4 00000000 */ nop
/* 2CFB8 80051BB8 E6200004 */ swc1 $f0, 0x4($s1)
/* 2CFBC 80051BBC 92620024 */ lbu $v0, 0x24($s3)
/* 2CFC0 80051BC0 A222000E */ sb $v0, 0xE($s1)
/* 2CFC4 80051BC4 92620025 */ lbu $v0, 0x25($s3)
/* 2CFC8 80051BC8 A222000F */ sb $v0, 0xF($s1)
/* 2CFCC 80051BCC 8E620000 */ lw $v0, 0x0($s3)
/* 2CFD0 80051BD0 AE220000 */ sw $v0, 0x0($s1)
/* 2CFD4 80051BD4 8FA80070 */ lw $t0, 0x70($sp)
/* 2CFD8 80051BD8 91020023 */ lbu $v0, 0x23($t0)
/* 2CFDC 80051BDC A2220010 */ sb $v0, 0x10($s1)
/* 2CFE0 80051BE0 8E620004 */ lw $v0, 0x4($s3)
/* 2CFE4 80051BE4 AE220014 */ sw $v0, 0x14($s1)
/* 2CFE8 80051BE8 8E620008 */ lw $v0, 0x8($s3)
/* 2CFEC 80051BEC 0801472D */ j .L80051CB4
/* 2CFF0 80051BF0 AE220018 */ sw $v0, 0x18($s1)
.L80051BF4:
/* 2CFF4 80051BF4 A2400007 */ sb $zero, 0x7($s2)
/* 2CFF8 80051BF8 8FA80070 */ lw $t0, 0x70($sp)
/* 2CFFC 80051BFC 00031040 */ sll $v0, $v1, 1
/* 2D000 80051C00 8D040000 */ lw $a0, 0x0($t0)
/* 2D004 80051C04 00431021 */ addu $v0, $v0, $v1
/* 2D008 80051C08 8C900054 */ lw $s0, 0x54($a0)
/* 2D00C 80051C0C 00021080 */ sll $v0, $v0, 2
/* 2D010 80051C10 02028021 */ addu $s0, $s0, $v0
/* 2D014 80051C14 96060000 */ lhu $a2, 0x0($s0)
/* 2D018 80051C18 26270014 */ addiu $a3, $s1, 0x14
/* 2D01C 80051C1C 00062A02 */ srl $a1, $a2, 8
/* 2D020 80051C20 0C014EFA */ jal au_get_instrument
/* 2D024 80051C24 30C600FF */ andi $a2, $a2, 0xFF
/* 2D028 80051C28 AE220000 */ sw $v0, 0x0($s1)
/* 2D02C 80051C2C 96030002 */ lhu $v1, 0x2($s0)
/* 2D030 80051C30 9442001E */ lhu $v0, 0x1E($v0)
/* 2D034 80051C34 00621823 */ subu $v1, $v1, $v0
/* 2D038 80051C38 A6430004 */ sh $v1, 0x4($s2)
/* 2D03C 80051C3C 92030004 */ lbu $v1, 0x4($s0)
/* 2D040 80051C40 3282007F */ andi $v0, $s4, 0x7F
/* 2D044 80051C44 00430018 */ mult $v0, $v1
/* 2D048 80051C48 00004012 */ mflo $t0
/* 2D04C 80051C4C 000819C3 */ sra $v1, $t0, 7
/* 2D050 80051C50 A2430006 */ sb $v1, 0x6($s2)
/* 2D054 80051C54 82A40038 */ lb $a0, 0x38($s5)
/* 2D058 80051C58 86620018 */ lh $v0, 0x18($s3)
/* 2D05C 80051C5C 00820018 */ mult $a0, $v0
/* 2D060 80051C60 00004012 */ mflo $t0
/* 2D064 80051C64 00031E00 */ sll $v1, $v1, 24
/* 2D068 80051C68 00031E03 */ sra $v1, $v1, 24
/* 2D06C 80051C6C 01030018 */ mult $t0, $v1
/* 2D070 80051C70 00004012 */ mflo $t0
/* 2D074 80051C74 00081383 */ sra $v0, $t0, 14
/* 2D078 80051C78 A6220040 */ sh $v0, 0x40($s1)
/* 2D07C 80051C7C 0C014E3E */ jal au_compute_pitch_ratio
/* 2D080 80051C80 86440004 */ lh $a0, 0x4($s2)
/* 2D084 80051C84 8E220000 */ lw $v0, 0x0($s1)
/* 2D088 80051C88 C4420020 */ lwc1 $f2, 0x20($v0)
/* 2D08C 80051C8C 46020002 */ mul.s $f0, $f0, $f2
/* 2D090 80051C90 00000000 */ nop
/* 2D094 80051C94 E6200004 */ swc1 $f0, 0x4($s1)
/* 2D098 80051C98 92020005 */ lbu $v0, 0x5($s0)
/* 2D09C 80051C9C A222000E */ sb $v0, 0xE($s1)
/* 2D0A0 80051CA0 92020006 */ lbu $v0, 0x6($s0)
/* 2D0A4 80051CA4 A222000F */ sb $v0, 0xF($s1)
/* 2D0A8 80051CA8 8FA80070 */ lw $t0, 0x70($sp)
/* 2D0AC 80051CAC 91020023 */ lbu $v0, 0x23($t0)
/* 2D0B0 80051CB0 A2220010 */ sb $v0, 0x10($s1)
.L80051CB4:
/* 2D0B4 80051CB4 24020002 */ addiu $v0, $zero, 0x2
/* 2D0B8 80051CB8 A2220043 */ sb $v0, 0x43($s1)
/* 2D0BC 80051CBC 8FA80070 */ lw $t0, 0x70($sp)
/* 2D0C0 80051CC0 91020022 */ lbu $v0, 0x22($t0)
/* 2D0C4 80051CC4 A2220045 */ sb $v0, 0x45($s1)
/* 2D0C8 80051CC8 0801482C */ j .L800520B0
/* 2D0CC 80051CCC A2220044 */ sb $v0, 0x44($s1)
.L80051CD0:
/* 2D0D0 80051CD0 1040002C */ beqz $v0, .L80051D84
/* 2D0D4 80051CD4 32E2007F */ andi $v0, $s7, 0x7F
/* 2D0D8 80051CD8 00162400 */ sll $a0, $s6, 16
/* 2D0DC 80051CDC A2620024 */ sb $v0, 0x24($s3)
/* 2D0E0 80051CE0 8EB00030 */ lw $s0, 0x30($s5)
/* 2D0E4 80051CE4 8EA30014 */ lw $v1, 0x14($s5)
/* 2D0E8 80051CE8 8EA20034 */ lw $v0, 0x34($s5)
/* 2D0EC 80051CEC 0202102B */ sltu $v0, $s0, $v0
/* 2D0F0 80051CF0 104000EF */ beqz $v0, .L800520B0
/* 2D0F4 80051CF4 0064B821 */ addu $s7, $v1, $a0
/* 2D0F8 80051CF8 001010C0 */ sll $v0, $s0, 3
/* 2D0FC 80051CFC 00501021 */ addu $v0, $v0, $s0
/* 2D100 80051D00 000210C0 */ sll $v0, $v0, 3
/* 2D104 80051D04 24441320 */ addiu $a0, $v0, 0x1320
.L80051D08:
/* 2D108 80051D08 8EA20030 */ lw $v0, 0x30($s5)
/* 2D10C 80051D0C 8FA80070 */ lw $t0, 0x70($sp)
/* 2D110 80051D10 02021023 */ subu $v0, $s0, $v0
/* 2D114 80051D14 000210C0 */ sll $v0, $v0, 3
/* 2D118 80051D18 00489021 */ addu $s2, $v0, $t0
/* 2D11C 80051D1C 8E4207B4 */ lw $v0, 0x7B4($s2)
/* 2D120 80051D20 3C08FFFF */ lui $t0, (0xFFFF0000 >> 16)
/* 2D124 80051D24 00481024 */ and $v0, $v0, $t0
/* 2D128 80051D28 1457000F */ bne $v0, $s7, .L80051D68
/* 2D12C 80051D2C 00000000 */ nop
/* 2D130 80051D30 8FA80030 */ lw $t0, 0x30($sp)
/* 2D134 80051D34 01048821 */ addu $s1, $t0, $a0
/* 2D138 80051D38 8FA80070 */ lw $t0, 0x70($sp)
/* 2D13C 80051D3C 92230045 */ lbu $v1, 0x45($s1)
/* 2D140 80051D40 91020022 */ lbu $v0, 0x22($t0)
/* 2D144 80051D44 14620008 */ bne $v1, $v0, .L80051D68
/* 2D148 80051D48 24080009 */ addiu $t0, $zero, 0x9
/* 2D14C 80051D4C 12C80006 */ beq $s6, $t0, .L80051D68
/* 2D150 80051D50 00000000 */ nop
/* 2D154 80051D54 92220043 */ lbu $v0, 0x43($s1)
/* 2D158 80051D58 92630024 */ lbu $v1, 0x24($s3)
/* 2D15C 80051D5C 34420010 */ ori $v0, $v0, 0x10
/* 2D160 80051D60 A223000E */ sb $v1, 0xE($s1)
/* 2D164 80051D64 A2220043 */ sb $v0, 0x43($s1)
.L80051D68:
/* 2D168 80051D68 8EA20034 */ lw $v0, 0x34($s5)
/* 2D16C 80051D6C 26100001 */ addiu $s0, $s0, 0x1
/* 2D170 80051D70 0202102B */ sltu $v0, $s0, $v0
/* 2D174 80051D74 1440FFE4 */ bnez $v0, .L80051D08
/* 2D178 80051D78 24840048 */ addiu $a0, $a0, 0x48
/* 2D17C 80051D7C 0801482C */ j .L800520B0
/* 2D180 80051D80 00000000 */ nop
.L80051D84:
/* 2D184 80051D84 00171E00 */ sll $v1, $s7, 24
/* 2D188 80051D88 10600005 */ beqz $v1, .L80051DA0
/* 2D18C 80051D8C AE630018 */ sw $v1, 0x18($s3)
/* 2D190 80051D90 3C0200FF */ lui $v0, (0xFFFFFF >> 16)
/* 2D194 80051D94 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF)
/* 2D198 80051D98 00621025 */ or $v0, $v1, $v0
/* 2D19C 80051D9C AE620018 */ sw $v0, 0x18($s3)
.L80051DA0:
/* 2D1A0 80051DA0 00162400 */ sll $a0, $s6, 16
/* 2D1A4 80051DA4 8EB00030 */ lw $s0, 0x30($s5)
/* 2D1A8 80051DA8 8EA30014 */ lw $v1, 0x14($s5)
/* 2D1AC 80051DAC 8EA20034 */ lw $v0, 0x34($s5)
/* 2D1B0 80051DB0 0202102B */ sltu $v0, $s0, $v0
/* 2D1B4 80051DB4 104000BE */ beqz $v0, .L800520B0
/* 2D1B8 80051DB8 0064B821 */ addu $s7, $v1, $a0
/* 2D1BC 80051DBC 001010C0 */ sll $v0, $s0, 3
/* 2D1C0 80051DC0 00501021 */ addu $v0, $v0, $s0
/* 2D1C4 80051DC4 000210C0 */ sll $v0, $v0, 3
/* 2D1C8 80051DC8 24441320 */ addiu $a0, $v0, 0x1320
.L80051DCC:
/* 2D1CC 80051DCC 8EA20030 */ lw $v0, 0x30($s5)
/* 2D1D0 80051DD0 8FA80070 */ lw $t0, 0x70($sp)
/* 2D1D4 80051DD4 02021023 */ subu $v0, $s0, $v0
/* 2D1D8 80051DD8 000210C0 */ sll $v0, $v0, 3
/* 2D1DC 80051DDC 244207B4 */ addiu $v0, $v0, 0x7B4
/* 2D1E0 80051DE0 01029021 */ addu $s2, $t0, $v0
/* 2D1E4 80051DE4 8E420000 */ lw $v0, 0x0($s2)
/* 2D1E8 80051DE8 3C08FFFF */ lui $t0, (0xFFFF0000 >> 16)
/* 2D1EC 80051DEC 00481024 */ and $v0, $v0, $t0
/* 2D1F0 80051DF0 14570020 */ bne $v0, $s7, .L80051E74
/* 2D1F4 80051DF4 00000000 */ nop
/* 2D1F8 80051DF8 8FA80030 */ lw $t0, 0x30($sp)
/* 2D1FC 80051DFC 01048821 */ addu $s1, $t0, $a0
/* 2D200 80051E00 8FA80070 */ lw $t0, 0x70($sp)
/* 2D204 80051E04 92230045 */ lbu $v1, 0x45($s1)
/* 2D208 80051E08 91020022 */ lbu $v0, 0x22($t0)
/* 2D20C 80051E0C 14620019 */ bne $v1, $v0, .L80051E74
/* 2D210 80051E10 00000000 */ nop
/* 2D214 80051E14 82A30038 */ lb $v1, 0x38($s5)
/* 2D218 80051E18 86620018 */ lh $v0, 0x18($s3)
/* 2D21C 80051E1C 00620018 */ mult $v1, $v0
/* 2D220 80051E20 00004012 */ mflo $t0
/* 2D224 80051E24 82420006 */ lb $v0, 0x6($s2)
/* 2D228 80051E28 00000000 */ nop
/* 2D22C 80051E2C 01020018 */ mult $t0, $v0
/* 2D230 80051E30 00004012 */ mflo $t0
/* 2D234 80051E34 00081383 */ sra $v0, $t0, 14
/* 2D238 80051E38 A6220040 */ sh $v0, 0x40($s1)
/* 2D23C 80051E3C 8EA20030 */ lw $v0, 0x30($s5)
/* 2D240 80051E40 8FA80040 */ lw $t0, 0x40($sp)
/* 2D244 80051E44 02021023 */ subu $v0, $s0, $v0
/* 2D248 80051E48 01021021 */ addu $v0, $t0, $v0
/* 2D24C 80051E4C 90420000 */ lbu $v0, 0x0($v0)
/* 2D250 80051E50 14400008 */ bnez $v0, .L80051E74
/* 2D254 80051E54 00000000 */ nop
/* 2D258 80051E58 9222003D */ lbu $v0, 0x3D($s1)
/* 2D25C 80051E5C 34420020 */ ori $v0, $v0, 0x20
/* 2D260 80051E60 A222003D */ sb $v0, 0x3D($s1)
/* 2D264 80051E64 8EA20030 */ lw $v0, 0x30($s5)
/* 2D268 80051E68 02021023 */ subu $v0, $s0, $v0
/* 2D26C 80051E6C 01021021 */ addu $v0, $t0, $v0
/* 2D270 80051E70 A05E0000 */ sb $fp, 0x0($v0)
.L80051E74:
/* 2D274 80051E74 8EA20034 */ lw $v0, 0x34($s5)
/* 2D278 80051E78 26100001 */ addiu $s0, $s0, 0x1
/* 2D27C 80051E7C 0202102B */ sltu $v0, $s0, $v0
/* 2D280 80051E80 1440FFD2 */ bnez $v0, .L80051DCC
/* 2D284 80051E84 24840048 */ addiu $a0, $a0, 0x48
/* 2D288 80051E88 0801482C */ j .L800520B0
/* 2D28C 80051E8C 00000000 */ nop
.L80051E90:
/* 2D290 80051E90 0C014874 */ jal au_amb_read_next
/* 2D294 80051E94 02A0202D */ daddu $a0, $s5, $zero
/* 2D298 80051E98 0040A02D */ daddu $s4, $v0, $zero
/* 2D29C 80051E9C 32E300FF */ andi $v1, $s7, 0xFF
/* 2D2A0 80051EA0 24020067 */ addiu $v0, $zero, 0x67
/* 2D2A4 80051EA4 10620013 */ beq $v1, $v0, .L80051EF4
/* 2D2A8 80051EA8 28620068 */ slti $v0, $v1, 0x68
/* 2D2AC 80051EAC 10400005 */ beqz $v0, .L80051EC4
/* 2D2B0 80051EB0 24020066 */ addiu $v0, $zero, 0x66
/* 2D2B4 80051EB4 1062000A */ beq $v1, $v0, .L80051EE0
/* 2D2B8 80051EB8 32820001 */ andi $v0, $s4, 0x1
/* 2D2BC 80051EBC 0801482C */ j .L800520B0
/* 2D2C0 80051EC0 00000000 */ nop
.L80051EC4:
/* 2D2C4 80051EC4 24020068 */ addiu $v0, $zero, 0x68
/* 2D2C8 80051EC8 10620027 */ beq $v1, $v0, .L80051F68
/* 2D2CC 80051ECC 24020069 */ addiu $v0, $zero, 0x69
/* 2D2D0 80051ED0 10620027 */ beq $v1, $v0, .L80051F70
/* 2D2D4 80051ED4 328300FF */ andi $v1, $s4, 0xFF
/* 2D2D8 80051ED8 0801482C */ j .L800520B0
/* 2D2DC 80051EDC 00000000 */ nop
.L80051EE0:
/* 2D2E0 80051EE0 00021080 */ sll $v0, $v0, 2
/* 2D2E4 80051EE4 8EA30008 */ lw $v1, 0x8($s5)
/* 2D2E8 80051EE8 02A21021 */ addu $v0, $s5, $v0
/* 2D2EC 80051EEC 0801482C */ j .L800520B0
/* 2D2F0 80051EF0 AC43000C */ sw $v1, 0xC($v0)
.L80051EF4:
/* 2D2F4 80051EF4 3282007C */ andi $v0, $s4, 0x7C
/* 2D2F8 80051EF8 00022882 */ srl $a1, $v0, 2
/* 2D2FC 80051EFC 10A00013 */ beqz $a1, .L80051F4C
/* 2D300 80051F00 32840001 */ andi $a0, $s4, 0x1
/* 2D304 80051F04 02A41821 */ addu $v1, $s5, $a0
/* 2D308 80051F08 9062002C */ lbu $v0, 0x2C($v1)
/* 2D30C 80051F0C 10400009 */ beqz $v0, .L80051F34
/* 2D310 80051F10 2442FFFF */ addiu $v0, $v0, -0x1
/* 2D314 80051F14 A062002C */ sb $v0, 0x2C($v1)
/* 2D318 80051F18 304200FF */ andi $v0, $v0, 0xFF
/* 2D31C 80051F1C 10400064 */ beqz $v0, .L800520B0
/* 2D320 80051F20 00041080 */ sll $v0, $a0, 2
/* 2D324 80051F24 02A21021 */ addu $v0, $s5, $v0
/* 2D328 80051F28 8C42000C */ lw $v0, 0xC($v0)
/* 2D32C 80051F2C 0801482C */ j .L800520B0
/* 2D330 80051F30 AEA20008 */ sw $v0, 0x8($s5)
.L80051F34:
/* 2D334 80051F34 00041080 */ sll $v0, $a0, 2
/* 2D338 80051F38 02A21021 */ addu $v0, $s5, $v0
/* 2D33C 80051F3C 8C42000C */ lw $v0, 0xC($v0)
/* 2D340 80051F40 AEA20008 */ sw $v0, 0x8($s5)
/* 2D344 80051F44 0801482C */ j .L800520B0
/* 2D348 80051F48 A065002C */ sb $a1, 0x2C($v1)
.L80051F4C:
/* 2D34C 80051F4C 00041080 */ sll $v0, $a0, 2
/* 2D350 80051F50 02A21021 */ addu $v0, $s5, $v0
/* 2D354 80051F54 8C42000C */ lw $v0, 0xC($v0)
/* 2D358 80051F58 AEA20008 */ sw $v0, 0x8($s5)
/* 2D35C 80051F5C 02A41021 */ addu $v0, $s5, $a0
/* 2D360 80051F60 0801482C */ j .L800520B0
/* 2D364 80051F64 A040002C */ sb $zero, 0x2C($v0)
.L80051F68:
/* 2D368 80051F68 0801482C */ j .L800520B0
/* 2D36C 80051F6C A2740025 */ sb $s4, 0x25($s3)
.L80051F70:
/* 2D370 80051F70 24020001 */ addiu $v0, $zero, 0x1
/* 2D374 80051F74 1462004E */ bne $v1, $v0, .L800520B0
/* 2D378 80051F78 00000000 */ nop
/* 2D37C 80051F7C 92620026 */ lbu $v0, 0x26($s3)
/* 2D380 80051F80 34420001 */ ori $v0, $v0, 0x1
/* 2D384 80051F84 0801482C */ j .L800520B0
/* 2D388 80051F88 A2620026 */ sb $v0, 0x26($s3)
.L80051F8C:
/* 2D38C 80051F8C 0C014874 */ jal au_amb_read_next
/* 2D390 80051F90 02A0202D */ daddu $a0, $s5, $zero
/* 2D394 80051F94 24080009 */ addiu $t0, $zero, 0x9
/* 2D398 80051F98 12C80045 */ beq $s6, $t0, .L800520B0
/* 2D39C 80051F9C 0040A02D */ daddu $s4, $v0, $zero
/* 2D3A0 80051FA0 32E500FF */ andi $a1, $s7, 0xFF
/* 2D3A4 80051FA4 8FA80070 */ lw $t0, 0x70($sp)
/* 2D3A8 80051FA8 328600FF */ andi $a2, $s4, 0xFF
/* 2D3AC 80051FAC 8D040000 */ lw $a0, 0x0($t0)
/* 2D3B0 80051FB0 0C014EFA */ jal au_get_instrument
/* 2D3B4 80051FB4 26670004 */ addiu $a3, $s3, 0x4
/* 2D3B8 80051FB8 0801482C */ j .L800520B0
/* 2D3BC 80051FBC AE620000 */ sw $v0, 0x0($s3)
.L80051FC0:
/* 2D3C0 80051FC0 0C014874 */ jal au_amb_read_next
/* 2D3C4 80051FC4 02A0202D */ daddu $a0, $s5, $zero
/* 2D3C8 80051FC8 00171E00 */ sll $v1, $s7, 24
/* 2D3CC 80051FCC 304200FF */ andi $v0, $v0, 0xFF
/* 2D3D0 80051FD0 00021400 */ sll $v0, $v0, 16
/* 2D3D4 80051FD4 00621821 */ addu $v1, $v1, $v0
/* 2D3D8 80051FD8 00162400 */ sll $a0, $s6, 16
/* 2D3DC 80051FDC AE63000C */ sw $v1, 0xC($s3)
/* 2D3E0 80051FE0 8EB00030 */ lw $s0, 0x30($s5)
/* 2D3E4 80051FE4 8EA30014 */ lw $v1, 0x14($s5)
/* 2D3E8 80051FE8 8EA20034 */ lw $v0, 0x34($s5)
/* 2D3EC 80051FEC 0202102B */ sltu $v0, $s0, $v0
/* 2D3F0 80051FF0 1040002F */ beqz $v0, .L800520B0
/* 2D3F4 80051FF4 0064B821 */ addu $s7, $v1, $a0
/* 2D3F8 80051FF8 001010C0 */ sll $v0, $s0, 3
/* 2D3FC 80051FFC 00501021 */ addu $v0, $v0, $s0
/* 2D400 80052000 000210C0 */ sll $v0, $v0, 3
/* 2D404 80052004 24541320 */ addiu $s4, $v0, 0x1320
.L80052008:
/* 2D408 80052008 8EA20030 */ lw $v0, 0x30($s5)
/* 2D40C 8005200C 8FA80070 */ lw $t0, 0x70($sp)
/* 2D410 80052010 02021023 */ subu $v0, $s0, $v0
/* 2D414 80052014 000210C0 */ sll $v0, $v0, 3
/* 2D418 80052018 244207B4 */ addiu $v0, $v0, 0x7B4
/* 2D41C 8005201C 01029021 */ addu $s2, $t0, $v0
/* 2D420 80052020 8E420000 */ lw $v0, 0x0($s2)
/* 2D424 80052024 3C08FFFF */ lui $t0, (0xFFFF0000 >> 16)
/* 2D428 80052028 00481024 */ and $v0, $v0, $t0
/* 2D42C 8005202C 1457001B */ bne $v0, $s7, .L8005209C
/* 2D430 80052030 00000000 */ nop
/* 2D434 80052034 8FA80030 */ lw $t0, 0x30($sp)
/* 2D438 80052038 01148821 */ addu $s1, $t0, $s4
/* 2D43C 8005203C 8FA80070 */ lw $t0, 0x70($sp)
/* 2D440 80052040 92230045 */ lbu $v1, 0x45($s1)
/* 2D444 80052044 91020022 */ lbu $v0, 0x22($t0)
/* 2D448 80052048 14620014 */ bne $v1, $v0, .L8005209C
/* 2D44C 8005204C 24080009 */ addiu $t0, $zero, 0x9
/* 2D450 80052050 12C80012 */ beq $s6, $t0, .L8005209C
/* 2D454 80052054 00000000 */ nop
/* 2D458 80052058 86420004 */ lh $v0, 0x4($s2)
/* 2D45C 8005205C 8664000C */ lh $a0, 0xC($s3)
/* 2D460 80052060 0C014E3E */ jal au_compute_pitch_ratio
/* 2D464 80052064 00442021 */ addu $a0, $v0, $a0
/* 2D468 80052068 8E620000 */ lw $v0, 0x0($s3)
/* 2D46C 8005206C C4420020 */ lwc1 $f2, 0x20($v0)
/* 2D470 80052070 46020002 */ mul.s $f0, $f0, $f2
/* 2D474 80052074 00000000 */ nop
/* 2D478 80052078 92220043 */ lbu $v0, 0x43($s1)
/* 2D47C 8005207C 34420008 */ ori $v0, $v0, 0x8
/* 2D480 80052080 A2220043 */ sb $v0, 0x43($s1)
/* 2D484 80052084 E6200004 */ swc1 $f0, 0x4($s1)
/* 2D488 80052088 8EA20030 */ lw $v0, 0x30($s5)
/* 2D48C 8005208C 8FA8003C */ lw $t0, 0x3C($sp)
/* 2D490 80052090 02021023 */ subu $v0, $s0, $v0
/* 2D494 80052094 01021021 */ addu $v0, $t0, $v0
/* 2D498 80052098 A05E0000 */ sb $fp, 0x0($v0)
.L8005209C:
/* 2D49C 8005209C 8EA20034 */ lw $v0, 0x34($s5)
/* 2D4A0 800520A0 26100001 */ addiu $s0, $s0, 0x1
/* 2D4A4 800520A4 0202102B */ sltu $v0, $s0, $v0
/* 2D4A8 800520A8 1440FFD7 */ bnez $v0, .L80052008
/* 2D4AC 800520AC 26940048 */ addiu $s4, $s4, 0x48
.L800520B0:
/* 2D4B0 800520B0 8EA20018 */ lw $v0, 0x18($s5)
/* 2D4B4 800520B4 1040FDC9 */ beqz $v0, .L800517DC
/* 2D4B8 800520B8 00000000 */ nop
.L800520BC:
/* 2D4BC 800520BC 93A20034 */ lbu $v0, 0x34($sp)
/* 2D4C0 800520C0 10400037 */ beqz $v0, .L800521A0
/* 2D4C4 800520C4 00000000 */ nop
/* 2D4C8 800520C8 8EB00030 */ lw $s0, 0x30($s5)
/* 2D4CC 800520CC 8EA20034 */ lw $v0, 0x34($s5)
/* 2D4D0 800520D0 0202102B */ sltu $v0, $s0, $v0
/* 2D4D4 800520D4 10400032 */ beqz $v0, .L800521A0
/* 2D4D8 800520D8 001010C0 */ sll $v0, $s0, 3
/* 2D4DC 800520DC 3C07FF00 */ lui $a3, (0xFF000000 >> 16)
/* 2D4E0 800520E0 27A60010 */ addiu $a2, $sp, 0x10
/* 2D4E4 800520E4 00501021 */ addu $v0, $v0, $s0
/* 2D4E8 800520E8 000210C0 */ sll $v0, $v0, 3
/* 2D4EC 800520EC 24451320 */ addiu $a1, $v0, 0x1320
.L800520F0:
/* 2D4F0 800520F0 8EA20030 */ lw $v0, 0x30($s5)
/* 2D4F4 800520F4 8FA80070 */ lw $t0, 0x70($sp)
/* 2D4F8 800520F8 02022023 */ subu $a0, $s0, $v0
/* 2D4FC 800520FC 000410C0 */ sll $v0, $a0, 3
/* 2D500 80052100 244207B4 */ addiu $v0, $v0, 0x7B4
/* 2D504 80052104 01029021 */ addu $s2, $t0, $v0
/* 2D508 80052108 8E420000 */ lw $v0, 0x0($s2)
/* 2D50C 8005210C 8EA30014 */ lw $v1, 0x14($s5)
/* 2D510 80052110 00471024 */ and $v0, $v0, $a3
/* 2D514 80052114 1443001D */ bne $v0, $v1, .L8005218C
/* 2D518 80052118 00000000 */ nop
/* 2D51C 8005211C 8FA80030 */ lw $t0, 0x30($sp)
/* 2D520 80052120 01058821 */ addu $s1, $t0, $a1
/* 2D524 80052124 8FA80070 */ lw $t0, 0x70($sp)
/* 2D528 80052128 92230045 */ lbu $v1, 0x45($s1)
/* 2D52C 8005212C 91020022 */ lbu $v0, 0x22($t0)
/* 2D530 80052130 14620016 */ bne $v1, $v0, .L8005218C
/* 2D534 80052134 00C41021 */ addu $v0, $a2, $a0
/* 2D538 80052138 90420000 */ lbu $v0, 0x0($v0)
/* 2D53C 8005213C 14400013 */ bnez $v0, .L8005218C
/* 2D540 80052140 00000000 */ nop
/* 2D544 80052144 92430001 */ lbu $v1, 0x1($s2)
/* 2D548 80052148 00031080 */ sll $v0, $v1, 2
/* 2D54C 8005214C 00431021 */ addu $v0, $v0, $v1
/* 2D550 80052150 000210C0 */ sll $v0, $v0, 3
/* 2D554 80052154 00559821 */ addu $s3, $v0, $s5
/* 2D558 80052158 82A30038 */ lb $v1, 0x38($s5)
/* 2D55C 8005215C 8662005C */ lh $v0, 0x5C($s3)
/* 2D560 80052160 00620018 */ mult $v1, $v0
/* 2D564 80052164 00004012 */ mflo $t0
/* 2D568 80052168 82420006 */ lb $v0, 0x6($s2)
/* 2D56C 8005216C 00000000 */ nop
/* 2D570 80052170 01020018 */ mult $t0, $v0
/* 2D574 80052174 9222003D */ lbu $v0, 0x3D($s1)
/* 2D578 80052178 34420020 */ ori $v0, $v0, 0x20
/* 2D57C 8005217C A222003D */ sb $v0, 0x3D($s1)
/* 2D580 80052180 00004012 */ mflo $t0
/* 2D584 80052184 00081383 */ sra $v0, $t0, 14
/* 2D588 80052188 A6220040 */ sh $v0, 0x40($s1)
.L8005218C:
/* 2D58C 8005218C 8EA20034 */ lw $v0, 0x34($s5)
/* 2D590 80052190 26100001 */ addiu $s0, $s0, 0x1
/* 2D594 80052194 0202102B */ sltu $v0, $s0, $v0
/* 2D598 80052198 1440FFD5 */ bnez $v0, .L800520F0
/* 2D59C 8005219C 24A50048 */ addiu $a1, $a1, 0x48
.L800521A0:
/* 2D5A0 800521A0 8FBF006C */ lw $ra, 0x6C($sp)
/* 2D5A4 800521A4 8FBE0068 */ lw $fp, 0x68($sp)
/* 2D5A8 800521A8 8FB70064 */ lw $s7, 0x64($sp)
/* 2D5AC 800521AC 8FB60060 */ lw $s6, 0x60($sp)
/* 2D5B0 800521B0 8FB5005C */ lw $s5, 0x5C($sp)
/* 2D5B4 800521B4 8FB40058 */ lw $s4, 0x58($sp)
/* 2D5B8 800521B8 8FB30054 */ lw $s3, 0x54($sp)
/* 2D5BC 800521BC 8FB20050 */ lw $s2, 0x50($sp)
/* 2D5C0 800521C0 8FB1004C */ lw $s1, 0x4C($sp)
/* 2D5C4 800521C4 8FB00048 */ lw $s0, 0x48($sp)
/* 2D5C8 800521C8 03E00008 */ jr $ra
/* 2D5CC 800521CC 27BD0070 */ addiu $sp, $sp, 0x70
### DECOMPILED C INSTRUCTIONS:
void au_amb_player_update(AmbienceManager* manager, AmbiencePlayer* player) {
u8 isVolumeChanged[16];
u8 isPitchChanged[16];
AuGlobals* globals;
u8 fadeVolChanged;
AmbienceVoiceState* voiceState;
AuVoice* voice;
BGMDrumInfo* drum;
u32 trackIdx;
s32 temp;
s32 i;
u16 bankPatch;
u32 count;
s32 loopId;
u8 op, arg1, arg2;
AmbienceTrack* track;
globals = manager->globals;
fadeVolChanged = FALSE;
for (i = 0; i < 16U; i++) { // required to use unsigned literal
isVolumeChanged[i] = FALSE;
isPitchChanged[i] = FALSE;
}
if (player->resetRequired == TRUE) {
au_amb_player_stop(manager, player);
player->resetRequired = FALSE;
}
if (player->fadeTime != 0) {
player->fadeVolume += player->fadeStep;
player->fadeTime--;
if (player->fadeTime == 0) {
player->fadeVolume = player->fadeGoal << 0x18;
if (player->fadeSettingsType == AMB_FADE_IN) {
// do nothing
} else if (player->fadeSettingsType == AMB_FADE_OUT) {
player->mseqReadPos = BlankMseqData;
player->delay = 1;
} else if (player->fadeSettingsType == AMB_FADE_OUT_PAUSING) {
player->mode = AMB_MODE_PAUSING;
}
}
fadeVolChanged = TRUE;
}
// update pitch
for (trackIdx = 0; trackIdx < ARRAY_COUNT(player->tracks); trackIdx++) {
track = &player->tracks[trackIdx];
if (track->tuneLerp.time != 0) {
track->tuneLerp.time--;
if (track->tuneLerp.time != 0) {
track->tuneLerp.current += track->tuneLerp.step;
} else {
track->tuneLerp.current = track->tuneLerp.goal << 0x10;
}
temp = player->id.all + (trackIdx << 0x10);
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
voiceState = &manager->voiceStates[i - player->firstVoiceIdx];
// update all voices belonging to current track
if ((voiceState->info.all & 0xFFFF0000) == temp) {
voice = &globals->voices[i];
if (voice->priority == manager->priority && trackIdx != TRACK_ID_DRUM) {
voice->pitchRatio = au_compute_pitch_ratio(voiceState->pitch + (track->tuneLerp.current >> 0x10)) * track->instrument->pitchRatio;
voice->syncFlags |= AU_VOICE_SYNC_FLAG_PITCH;
isPitchChanged[i - player->firstVoiceIdx] = TRUE;
}
}
}
}
}
// update volume
for (trackIdx = 0; trackIdx < ARRAY_COUNT(player->tracks); trackIdx++) {
track = &player->tracks[trackIdx];
if (track->volumeLerp.time != 0) {
track->volumeLerp.time--;
if (track->volumeLerp.time != 0) {
track->volumeLerp.current += track->volumeLerp.step;
} else {
track->volumeLerp.current = track->volumeLerp.goal << 0x10;
}
temp = player->id.all + (trackIdx << 0x10);
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
voiceState = &manager->voiceStates[i - player->firstVoiceIdx];
// update all voices belonging to current track
if ((voiceState->info.all & 0xFFFF0000) == temp) {
voice = &globals->voices[i];
if (voice->priority == manager->priority) {
track = &player->tracks[voiceState->info.trackIndex];
voice->clientVolume = ((player->fadeVolume >> 0x18) * (track->volumeLerp.current >> 0x10) * voiceState->volume) >> 0xE;
voice->envelopeFlags |= AU_VOICE_ENV_FLAG_VOL_CHANGED;
}
}
}
}
}
player->delay--;
if (player->delay <= 0) {
while (player->delay == 0) {
op = au_amb_read_next(player);
if ((s8)op >= 0) {
if (op == 0) {
// stop
player->mseqReadPos = NULL;
player->mseqName = 0;
au_amb_player_stop(manager, player);
break;
}
if (op >= 0x78) {
// long delay
player->delay = ((op & 7) << 8) + au_amb_read_next(player) + 0x78;
} else {
//short delay
player->delay = op;
}
continue;
}
// op >= 0x80
// op & 0xF0 : command
// op & 0xF : track index
arg1 = au_amb_read_next(player);
trackIdx = op & 0xF;
track = &player->tracks[trackIdx];
switch (op & 0xF0) {
case MSEQ_CMD_80_STOP_SOUND:
// arg1: sound index
if (player->playState == AMB_PLAYER_PLAYING) {
temp = player->id.all + (trackIdx << 0x10) + (arg1 << 8);
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
if (manager->voiceStates[i - player->firstVoiceIdx].info.all == temp) {
manager->voiceStates[i - player->firstVoiceIdx].info.released = 1;
voice = &globals->voices[i];
if (voice->priority == manager->priority) {
voice->envelopeFlags |= AU_VOICE_ENV_FLAG_KEY_RELEASED;
}
}
}
}
break;
case MSEQ_CMD_90_PLAY_SOUND:
// arg1: pitch or drum sound id
// arg2: volume
arg2 = au_amb_read_next(player);
if (player->playState == AMB_PLAYER_PLAYING) {
// find free voice
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
voice = &globals->voices[i];
if (voice->priority == AU_PRIORITY_FREE) {
break;
}
}
if (i >= player->lastVoiceIdx) {
// use another ambience voice
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
voice = &globals->voices[i];
if (voice->priority == manager->priority) {
au_reset_voice(voice, i);
break;
}
}
}
if (i >= player->lastVoiceIdx) {
// try stealing voice with lower priority
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
voice = &globals->voices[i];
if (voice->priority < manager->priority) {
au_reset_voice(voice, i);
break;
}
}
}
if (i < player->lastVoiceIdx) {
isVolumeChanged[i - player->firstVoiceIdx] = TRUE;
isPitchChanged[i - player->firstVoiceIdx] = TRUE;
voiceState = &manager->voiceStates[i - player->firstVoiceIdx];
// set playerIndex, trackIndex and tune
voiceState->info.all = player->id.all + (trackIdx << 0x10) + (arg1 << 8);
if (track->flags & 1) {
voiceState->isResumable = TRUE;
} else {
voiceState->isResumable = FALSE;
}
if (trackIdx != TRACK_ID_DRUM) {
if (track->flags & 1) {
voiceState->isResumable = TRUE;
} else {
voiceState->isResumable = FALSE;
}
voiceState->pitch = (arg1 & 0x7F) * 100 - track->instrument->keyBase;
voiceState->volume = arg2 & 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;
} else {
voiceState->isResumable = FALSE;
drum = &manager->globals->dataPER->drums[arg1 & 0x7F];
bankPatch = drum->bankPatch;
voice->instrument = au_get_instrument(manager->globals, bankPatch >> 8, bankPatch & 0xFF, &voice->envelope);
voiceState->pitch = drum->keyBase - voice->instrument->keyBase;
voiceState->volume = ((arg2 & 0x7F) * drum->volume) >> 7;
voice->clientVolume = ((player->fadeVolume >> 0x18) * (track->volumeLerp.current >> 0x10) * voiceState->volume) >> 0xE;
voice->pitchRatio = au_compute_pitch_ratio(voiceState->pitch) * voice->instrument->pitchRatio;
voice->pan = drum->pan;
voice->reverb = drum->reverb;
voice->busId = manager->busId;
}
voice->syncFlags = AU_VOICE_SYNC_FLAG_ALL;
voice->priority = manager->priority;
voice->clientPriority = voice->priority;
}
}
break;
case MSEQ_CMD_A0_SET_VOLUME_PAN:
// higher bit: set pan (1) or volume (0)
// lower 7 bits: value
if (arg1 & 0x80) {
track->pan = arg1 & 0x7F;
temp = player->id.all + (trackIdx << 0x10);
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
voiceState = &manager->voiceStates[i - player->firstVoiceIdx];
if ((voiceState->info.all & 0xFFFF0000) == temp) {
voice = &globals->voices[i];
if (voice->priority == manager->priority && trackIdx != TRACK_ID_DRUM) {
voice->pan = track->pan;
voice->syncFlags |= AU_VOICE_SYNC_FLAG_PAN_FXMIX;
}
}
}
} else {
track->volumeLerp.current = arg1 << 0x18;
if (track->volumeLerp.current != 0) {
track->volumeLerp.current |= 0xFFFFFF;
}
temp = player->id.all + (trackIdx << 0x10);
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
voiceState = &manager->voiceStates[i - player->firstVoiceIdx];
if ((voiceState->info.all & 0xFFFF0000) == temp) {
voice = &globals->voices[i];
if (voice->priority == manager->priority) {
voice->clientVolume = ((player->fadeVolume >> 0x18) * (track->volumeLerp.current >> 0x10) * voiceState->volume) >> 0xE;
if (!isVolumeChanged[i - player->firstVoiceIdx]) {
voice->envelopeFlags |= AU_VOICE_ENV_FLAG_VOL_CHANGED;
isVolumeChanged[i - player->firstVoiceIdx] = TRUE;
}
}
}
}
}
break;
case MSEQ_CMD_B0_MULTI:
// arg1: sub command
// arg2: depends on sub command
arg2 = au_amb_read_next(player);
switch (arg1) {
case MSEQ_CMD_SUB_66_START_LOOP:
// arg2: loop id
player->loopStartPos[arg2 & 1] = player->mseqReadPos;
break;
case MSEQ_CMD_SUB_67_END_LOOP:
// arg2 lower bit: loop id
// (arg2 & 0x7C) >> 2: loop count
loopId = arg2 & 1;
count = (arg2 & 0x7C) >> 2;
if (count != 0) {
if (player->loopCount[loopId] != 0) {
player->loopCount[loopId]--;
// if it's the last iteration then don't jump to the loop start
if (player->loopCount[loopId] != 0) {
player->mseqReadPos = player->loopStartPos[loopId];
}
} else {
// first iteration, set loop counter
player->mseqReadPos = player->loopStartPos[loopId];
player->loopCount[loopId] = count;
}
} else {
// infinite loop
player->mseqReadPos = player->loopStartPos[loopId];
player->loopCount[loopId] = 0;
}
break;
case MSEQ_CMD_SUB_68_SET_REVERB:
track->reverb = arg2;
break;
case MSEQ_CMD_SUB_69_SET_RESUMABLE:
if (arg2 == 1) {
track->flags |= 1;
}
break;
}
break;
case MSEQ_CMD_C0_SET_INSTRUMENT:
// arg1: bank
// arg2: patch
arg2 = au_amb_read_next(player);
if (trackIdx != TRACK_ID_DRUM) {
track->instrument = au_get_instrument(manager->globals, arg1, arg2, &track->envelope);
}
break;
case MSEQ_CMD_E0_TUNING:
// arg1: coarse tune
// arg2: fine tune
track->tuneLerp.current = (arg1 << 0x18) + (au_amb_read_next(player) << 0x10);
temp = player->id.all + (trackIdx << 0x10);
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
voiceState = &manager->voiceStates[i - player->firstVoiceIdx];
if ((voiceState->info.all & 0xFFFF0000) == temp) {
voice = &globals->voices[i];
if (voice->priority == manager->priority && trackIdx != TRACK_ID_DRUM) {
voice->pitchRatio = au_compute_pitch_ratio(voiceState->pitch + (track->tuneLerp.current >> 0x10)) * track->instrument->pitchRatio;
voice->syncFlags |= AU_VOICE_SYNC_FLAG_PITCH;
isPitchChanged[i - player->firstVoiceIdx] = 1;
}
}
}
break;
case 0xF0: // required to match
break;
}
}
}
if (fadeVolChanged) {
for (i = player->firstVoiceIdx; i < player->lastVoiceIdx; i++) {
voiceState = &manager->voiceStates[i - player->firstVoiceIdx];
// update all voices belonging to this player
if ((voiceState->info.all & 0xFF000000) == player->id.all) {
voice = &globals->voices[i];
if (voice->priority == manager->priority && !isVolumeChanged[i - player->firstVoiceIdx]) {
track = &player->tracks[voiceState->info.trackIndex];
voice->clientVolume = ((player->fadeVolume >> 0x18) * (track->volumeLerp.current >> 0x10) * voiceState->volume) >> 0xE;
voice->envelopeFlags |= AU_VOICE_ENV_FLAG_VOL_CHANGED;
}
}
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel update_item_entity_pickup
/* CBDDC 801356DC 27BDFFC0 */ addiu $sp, $sp, -0x40
/* CBDE0 801356E0 AFB10024 */ sw $s1, 0x24($sp)
/* CBDE4 801356E4 0080882D */ daddu $s1, $a0, $zero
/* CBDE8 801356E8 AFB40030 */ sw $s4, 0x30($sp)
/* CBDEC 801356EC 3C148011 */ lui $s4, %hi(gPlayerData)
/* CBDF0 801356F0 2694F290 */ addiu $s4, $s4, %lo(gPlayerData)
/* CBDF4 801356F4 AFB3002C */ sw $s3, 0x2C($sp)
/* CBDF8 801356F8 3C138011 */ lui $s3, %hi(gPlayerStatus)
/* CBDFC 801356FC 2673EFC8 */ addiu $s3, $s3, %lo(gPlayerStatus)
/* CBE00 80135700 AFBF0038 */ sw $ra, 0x38($sp)
/* CBE04 80135704 AFB50034 */ sw $s5, 0x34($sp)
/* CBE08 80135708 AFB20028 */ sw $s2, 0x28($sp)
/* CBE0C 8013570C AFB00020 */ sw $s0, 0x20($sp)
/* CBE10 80135710 8222001A */ lb $v0, 0x1A($s1)
/* CBE14 80135714 3C108015 */ lui $s0, %hi(D_801565B0)
/* CBE18 80135718 261065B0 */ addiu $s0, $s0, %lo(D_801565B0)
/* CBE1C 8013571C 14400016 */ bnez $v0, .L80135778
/* CBE20 80135720 24120001 */ addiu $s2, $zero, 0x1
/* CBE24 80135724 8E220000 */ lw $v0, 0x0($s1)
/* CBE28 80135728 3C030200 */ lui $v1, (0x2000000 >> 16)
/* CBE2C 8013572C 3C018015 */ lui $at, %hi(isPickingUpItem)
/* CBE30 80135730 A43265A4 */ sh $s2, %lo(isPickingUpItem)($at)
/* CBE34 80135734 00431024 */ and $v0, $v0, $v1
/* CBE38 80135738 1440000C */ bnez $v0, .L8013576C
/* CBE3C 8013573C 00000000 */ nop
/* CBE40 80135740 0C03805E */ jal disable_player_input
/* CBE44 80135744 00000000 */ nop
/* CBE48 80135748 0C03BD8A */ jal partner_disable_input
/* CBE4C 8013574C 00000000 */ nop
/* CBE50 80135750 3C03800A */ lui $v1, %hi(gOverrideFlags)
/* CBE54 80135754 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags)
/* CBE58 80135758 8C620000 */ lw $v0, 0x0($v1)
/* CBE5C 8013575C 24040002 */ addiu $a0, $zero, 0x2
/* CBE60 80135760 34420040 */ ori $v0, $v0, 0x40
/* CBE64 80135764 0C009C22 */ jal set_time_freeze_mode
/* CBE68 80135768 AC620000 */ sw $v0, 0x0($v1)
.L8013576C:
/* CBE6C 8013576C 0C04C3DC */ jal hide_item_entity
/* CBE70 80135770 0220202D */ daddu $a0, $s1, $zero
/* CBE74 80135774 A232001A */ sb $s2, 0x1A($s1)
.L80135778:
/* CBE78 80135778 9222001A */ lbu $v0, 0x1A($s1)
/* CBE7C 8013577C 2442FFFF */ addiu $v0, $v0, -0x1
/* CBE80 80135780 00021600 */ sll $v0, $v0, 24
/* CBE84 80135784 00021E03 */ sra $v1, $v0, 24
/* CBE88 80135788 2C62000F */ sltiu $v0, $v1, 0xF
/* CBE8C 8013578C 104002FB */ beqz $v0, .L8013637C
/* CBE90 80135790 00031080 */ sll $v0, $v1, 2
/* CBE94 80135794 3C018015 */ lui $at, %hi(jtbl_80150E20)
/* CBE98 80135798 00220821 */ addu $at, $at, $v0
/* CBE9C 8013579C 8C220E20 */ lw $v0, %lo(jtbl_80150E20)($at)
/* CBEA0 801357A0 00400008 */ jr $v0
/* CBEA4 801357A4 00000000 */ nop
glabel .L801357A8
/* CBEA8 801357A8 8E220000 */ lw $v0, 0x0($s1)
/* CBEAC 801357AC 3C030200 */ lui $v1, (0x2000000 >> 16)
/* CBEB0 801357B0 00431024 */ and $v0, $v0, $v1
/* CBEB4 801357B4 1440001D */ bnez $v0, .L8013582C
/* CBEB8 801357B8 3C031000 */ lui $v1, (0x10000000 >> 16)
/* CBEBC 801357BC 8E620004 */ lw $v0, 0x4($s3)
/* CBEC0 801357C0 00431024 */ and $v0, $v0, $v1
/* CBEC4 801357C4 14400019 */ bnez $v0, .L8013582C
/* CBEC8 801357C8 826300B4 */ lb $v1, 0xB4($s3)
/* CBECC 801357CC 866200C0 */ lh $v0, 0xC0($s3)
/* CBED0 801357D0 14400005 */ bnez $v0, .L801357E8
/* CBED4 801357D4 24020003 */ addiu $v0, $zero, 0x3
/* CBED8 801357D8 10620003 */ beq $v1, $v0, .L801357E8
/* CBEDC 801357DC 24020008 */ addiu $v0, $zero, 0x8
/* CBEE0 801357E0 14620007 */ bne $v1, $v0, .L80135800
/* CBEE4 801357E4 24020006 */ addiu $v0, $zero, 0x6
.L801357E8:
/* CBEE8 801357E8 82620014 */ lb $v0, 0x14($s3)
/* CBEEC 801357EC 10400004 */ beqz $v0, .L80135800
/* CBEF0 801357F0 24020006 */ addiu $v0, $zero, 0x6
/* CBEF4 801357F4 82620015 */ lb $v0, 0x15($s3)
/* CBEF8 801357F8 1440000C */ bnez $v0, .L8013582C
/* CBEFC 801357FC 24020006 */ addiu $v0, $zero, 0x6
.L80135800:
/* CBF00 80135800 1062000A */ beq $v1, $v0, .L8013582C
/* CBF04 80135804 24020021 */ addiu $v0, $zero, 0x21
/* CBF08 80135808 10620008 */ beq $v1, $v0, .L8013582C
/* CBF0C 8013580C 00000000 */ nop
/* CBF10 80135810 10600006 */ beqz $v1, .L8013582C
/* CBF14 80135814 2402001D */ addiu $v0, $zero, 0x1D
/* CBF18 80135818 146202D8 */ bne $v1, $v0, .L8013637C
/* CBF1C 8013581C 24020001 */ addiu $v0, $zero, 0x1
/* CBF20 80135820 826300B6 */ lb $v1, 0xB6($s3)
/* CBF24 80135824 146202D5 */ bne $v1, $v0, .L8013637C
/* CBF28 80135828 00000000 */ nop
.L8013582C:
/* CBF2C 8013582C 96220006 */ lhu $v0, 0x6($s1)
/* CBF30 80135830 30420001 */ andi $v0, $v0, 0x1
/* CBF34 80135834 1440001C */ bnez $v0, .L801358A8
/* CBF38 80135838 00000000 */ nop
/* CBF3C 8013583C 86240018 */ lh $a0, 0x18($s1)
/* CBF40 80135840 00041140 */ sll $v0, $a0, 5
/* CBF44 80135844 3C038008 */ lui $v1, %hi(gItemTable + 0x18)
/* CBF48 80135848 00621821 */ addu $v1, $v1, $v0
/* CBF4C 8013584C 946378F8 */ lhu $v1, %lo(gItemTable + 0x18)($v1)
/* CBF50 80135850 30620040 */ andi $v0, $v1, 0x40
/* CBF54 80135854 10400003 */ beqz $v0, .L80135864
/* CBF58 80135858 30620008 */ andi $v0, $v1, 0x8
/* CBF5C 8013585C 0804D628 */ j .L801358A0
/* CBF60 80135860 240400D3 */ addiu $a0, $zero, 0xD3
.L80135864:
/* CBF64 80135864 10400003 */ beqz $v0, .L80135874
/* CBF68 80135868 24020157 */ addiu $v0, $zero, 0x157
/* CBF6C 8013586C 0804D628 */ j .L801358A0
/* CBF70 80135870 240400D2 */ addiu $a0, $zero, 0xD2
.L80135874:
/* CBF74 80135874 1482000A */ bne $a0, $v0, .L801358A0
/* CBF78 80135878 240400D1 */ addiu $a0, $zero, 0xD1
/* CBF7C 8013587C C6200010 */ lwc1 $f0, 0x10($s1)
/* CBF80 80135880 24040211 */ addiu $a0, $zero, 0x211
/* CBF84 80135884 E7A00010 */ swc1 $f0, 0x10($sp)
/* CBF88 80135888 8E260008 */ lw $a2, 0x8($s1)
/* CBF8C 8013588C 8E27000C */ lw $a3, 0xC($s1)
/* CBF90 80135890 0C052757 */ jal sfx_play_sound_at_position
/* CBF94 80135894 0000282D */ daddu $a1, $zero, $zero
/* CBF98 80135898 0804D62A */ j .L801358A8
/* CBF9C 8013589C 00000000 */ nop
.L801358A0:
/* CBFA0 801358A0 0C05272D */ jal sfx_play_sound
/* CBFA4 801358A4 00000000 */ nop
.L801358A8:
/* CBFA8 801358A8 86220018 */ lh $v0, 0x18($s1)
/* CBFAC 801358AC 00021140 */ sll $v0, $v0, 5
/* CBFB0 801358B0 3C018008 */ lui $at, %hi(gItemTable + 0x4)
/* CBFB4 801358B4 00220821 */ addu $at, $at, $v0
/* CBFB8 801358B8 842278E4 */ lh $v0, %lo(gItemTable + 0x4)($at)
/* CBFBC 801358BC 000210C0 */ sll $v0, $v0, 3
/* CBFC0 801358C0 3C048009 */ lui $a0, %hi(gItemHudScripts)
/* CBFC4 801358C4 00822021 */ addu $a0, $a0, $v0
/* CBFC8 801358C8 8C84A680 */ lw $a0, %lo(gItemHudScripts)($a0)
/* CBFCC 801358CC 0C050529 */ jal hud_element_create
/* CBFD0 801358D0 00000000 */ nop
/* CBFD4 801358D4 0040202D */ daddu $a0, $v0, $zero
/* CBFD8 801358D8 24050080 */ addiu $a1, $zero, 0x80
/* CBFDC 801358DC 3C108015 */ lui $s0, %hi(ItemPickupIconID)
/* CBFE0 801358E0 261068E0 */ addiu $s0, $s0, %lo(ItemPickupIconID)
/* CBFE4 801358E4 0C051280 */ jal hud_element_set_flags
/* CBFE8 801358E8 AE040000 */ sw $a0, 0x0($s0)
/* CBFEC 801358EC 2405FF9C */ addiu $a1, $zero, -0x64
/* CBFF0 801358F0 8E040000 */ lw $a0, 0x0($s0)
/* CBFF4 801358F4 0C051261 */ jal hud_element_set_render_pos
/* CBFF8 801358F8 00A0302D */ daddu $a2, $a1, $zero
/* CBFFC 801358FC 24020002 */ addiu $v0, $zero, 0x2
/* CC000 80135900 3C108008 */ lui $s0, %hi(gItemTable)
/* CC004 80135904 261078E0 */ addiu $s0, $s0, %lo(gItemTable)
/* CC008 80135908 A222001A */ sb $v0, 0x1A($s1)
/* CC00C 8013590C 8E220000 */ lw $v0, 0x0($s1)
/* CC010 80135910 3C030200 */ lui $v1, (0x2000000 >> 16)
/* CC014 80135914 00431024 */ and $v0, $v0, $v1
/* CC018 80135918 14400066 */ bnez $v0, .L80135AB4
/* CC01C 8013591C 00000000 */ nop
/* CC020 80135920 86220018 */ lh $v0, 0x18($s1)
/* CC024 80135924 00021140 */ sll $v0, $v0, 5
/* CC028 80135928 00501021 */ addu $v0, $v0, $s0
/* CC02C 8013592C 94420018 */ lhu $v0, 0x18($v0)
/* CC030 80135930 30420004 */ andi $v0, $v0, 0x4
/* CC034 80135934 1040000F */ beqz $v0, .L80135974
/* CC038 80135938 0000202D */ daddu $a0, $zero, $zero
/* CC03C 8013593C 0280182D */ daddu $v1, $s4, $zero
.L80135940:
/* CC040 80135940 846201B4 */ lh $v0, 0x1B4($v1)
/* CC044 80135944 10400006 */ beqz $v0, .L80135960
/* CC048 80135948 2882000A */ slti $v0, $a0, 0xA
/* CC04C 8013594C 24840001 */ addiu $a0, $a0, 0x1
/* CC050 80135950 2882000A */ slti $v0, $a0, 0xA
/* CC054 80135954 1440FFFA */ bnez $v0, .L80135940
/* CC058 80135958 24630002 */ addiu $v1, $v1, 0x2
/* CC05C 8013595C 2882000A */ slti $v0, $a0, 0xA
.L80135960:
/* CC060 80135960 1040002D */ beqz $v0, .L80135A18
/* CC064 80135964 00041040 */ sll $v0, $a0, 1
/* CC068 80135968 96230018 */ lhu $v1, 0x18($s1)
/* CC06C 8013596C 02821021 */ addu $v0, $s4, $v0
/* CC070 80135970 A44301B4 */ sh $v1, 0x1B4($v0)
.L80135974:
/* CC074 80135974 86220018 */ lh $v0, 0x18($s1)
/* CC078 80135978 00021140 */ sll $v0, $v0, 5
/* CC07C 8013597C 3C018008 */ lui $at, %hi(gItemTable + 0x18)
/* CC080 80135980 00220821 */ addu $at, $at, $v0
/* CC084 80135984 942278F8 */ lhu $v0, %lo(gItemTable + 0x18)($at)
/* CC088 80135988 30420008 */ andi $v0, $v0, 0x8
/* CC08C 8013598C 1040000F */ beqz $v0, .L801359CC
/* CC090 80135990 0000202D */ daddu $a0, $zero, $zero
/* CC094 80135994 0280182D */ daddu $v1, $s4, $zero
.L80135998:
/* CC098 80135998 84620074 */ lh $v0, 0x74($v1)
/* CC09C 8013599C 10400006 */ beqz $v0, .L801359B8
/* CC0A0 801359A0 28820020 */ slti $v0, $a0, 0x20
/* CC0A4 801359A4 24840001 */ addiu $a0, $a0, 0x1
/* CC0A8 801359A8 28820020 */ slti $v0, $a0, 0x20
/* CC0AC 801359AC 1440FFFA */ bnez $v0, .L80135998
/* CC0B0 801359B0 24630002 */ addiu $v1, $v1, 0x2
/* CC0B4 801359B4 28820020 */ slti $v0, $a0, 0x20
.L801359B8:
/* CC0B8 801359B8 10400017 */ beqz $v0, .L80135A18
/* CC0BC 801359BC 00041040 */ sll $v0, $a0, 1
/* CC0C0 801359C0 96230018 */ lhu $v1, 0x18($s1)
/* CC0C4 801359C4 02821021 */ addu $v0, $s4, $v0
/* CC0C8 801359C8 A4430074 */ sh $v1, 0x74($v0)
.L801359CC:
/* CC0CC 801359CC 86220018 */ lh $v0, 0x18($s1)
/* CC0D0 801359D0 00021140 */ sll $v0, $v0, 5
/* CC0D4 801359D4 3C018008 */ lui $at, %hi(gItemTable + 0x18)
/* CC0D8 801359D8 00220821 */ addu $at, $at, $v0
/* CC0DC 801359DC 942278F8 */ lhu $v0, %lo(gItemTable + 0x18)($at)
/* CC0E0 801359E0 30420040 */ andi $v0, $v0, 0x40
/* CC0E4 801359E4 10400012 */ beqz $v0, .L80135A30
/* CC0E8 801359E8 0000202D */ daddu $a0, $zero, $zero
/* CC0EC 801359EC 0280182D */ daddu $v1, $s4, $zero
.L801359F0:
/* CC0F0 801359F0 846200B4 */ lh $v0, 0xB4($v1)
/* CC0F4 801359F4 10400006 */ beqz $v0, .L80135A10
/* CC0F8 801359F8 28820080 */ slti $v0, $a0, 0x80
/* CC0FC 801359FC 24840001 */ addiu $a0, $a0, 0x1
/* CC100 80135A00 28820080 */ slti $v0, $a0, 0x80
/* CC104 80135A04 1440FFFA */ bnez $v0, .L801359F0
/* CC108 80135A08 24630002 */ addiu $v1, $v1, 0x2
/* CC10C 80135A0C 28820080 */ slti $v0, $a0, 0x80
.L80135A10:
/* CC110 80135A10 14400004 */ bnez $v0, .L80135A24
/* CC114 80135A14 00041040 */ sll $v0, $a0, 1
.L80135A18:
/* CC118 80135A18 2402000A */ addiu $v0, $zero, 0xA
/* CC11C 80135A1C 0804D6AD */ j .L80135AB4
/* CC120 80135A20 A222001A */ sb $v0, 0x1A($s1)
.L80135A24:
/* CC124 80135A24 96230018 */ lhu $v1, 0x18($s1)
/* CC128 80135A28 02821021 */ addu $v0, $s4, $v0
/* CC12C 80135A2C A44300B4 */ sh $v1, 0xB4($v0)
.L80135A30:
/* CC130 80135A30 86230018 */ lh $v1, 0x18($s1)
/* CC134 80135A34 2402015C */ addiu $v0, $zero, 0x15C
/* CC138 80135A38 1462000B */ bne $v1, $v0, .L80135A68
/* CC13C 80135A3C 24020007 */ addiu $v0, $zero, 0x7
/* CC140 80135A40 9282000F */ lbu $v0, 0xF($s4)
/* CC144 80135A44 24420001 */ addiu $v0, $v0, 0x1
/* CC148 80135A48 A282000F */ sb $v0, 0xF($s4)
/* CC14C 80135A4C 304200FF */ andi $v0, $v0, 0xFF
/* CC150 80135A50 2C4200DF */ sltiu $v0, $v0, 0xDF
/* CC154 80135A54 14400002 */ bnez $v0, .L80135A60
/* CC158 80135A58 240200DE */ addiu $v0, $zero, 0xDE
/* CC15C 80135A5C A282000F */ sb $v0, 0xF($s4)
.L80135A60:
/* CC160 80135A60 86230018 */ lh $v1, 0x18($s1)
/* CC164 80135A64 24020007 */ addiu $v0, $zero, 0x7
.L80135A68:
/* CC168 80135A68 14620002 */ bne $v1, $v0, .L80135A74
/* CC16C 80135A6C 24020001 */ addiu $v0, $zero, 0x1
/* CC170 80135A70 A282000A */ sb $v0, 0xA($s4)
.L80135A74:
/* CC174 80135A74 96220018 */ lhu $v0, 0x18($s1)
/* CC178 80135A78 2442FFFC */ addiu $v0, $v0, -0x4
/* CC17C 80135A7C 2C420003 */ sltiu $v0, $v0, 0x3
/* CC180 80135A80 10400004 */ beqz $v0, .L80135A94
/* CC184 80135A84 00000000 */ nop
/* CC188 80135A88 92220019 */ lbu $v0, 0x19($s1)
/* CC18C 80135A8C 2442FFFC */ addiu $v0, $v0, -0x4
/* CC190 80135A90 A2820001 */ sb $v0, 0x1($s4)
.L80135A94:
/* CC194 80135A94 96220018 */ lhu $v0, 0x18($s1)
/* CC198 80135A98 2442FFFF */ addiu $v0, $v0, -0x1
/* CC19C 80135A9C 2C420003 */ sltiu $v0, $v0, 0x3
/* CC1A0 80135AA0 10400004 */ beqz $v0, .L80135AB4
/* CC1A4 80135AA4 00000000 */ nop
/* CC1A8 80135AA8 92220019 */ lbu $v0, 0x19($s1)
/* CC1AC 80135AAC 2442FFFF */ addiu $v0, $v0, -0x1
/* CC1B0 80135AB0 A2820000 */ sb $v0, 0x0($s4)
.L80135AB4:
/* CC1B4 80135AB4 8E220000 */ lw $v0, 0x0($s1)
/* CC1B8 80135AB8 04410003 */ bgez $v0, .L80135AC8
/* CC1BC 80135ABC 00000000 */ nop
/* CC1C0 80135AC0 0C051514 */ jal set_global_flag
/* CC1C4 80135AC4 86240004 */ lh $a0, 0x4($s1)
.L80135AC8:
/* CC1C8 80135AC8 8222001A */ lb $v0, 0x1A($s1)
/* CC1CC 80135ACC 2412000A */ addiu $s2, $zero, 0xA
/* CC1D0 80135AD0 1452000E */ bne $v0, $s2, .L80135B0C
/* CC1D4 80135AD4 00000000 */ nop
/* CC1D8 80135AD8 0C04D8E8 */ jal func_801363A0
/* CC1DC 80135ADC 0220202D */ daddu $a0, $s1, $zero
/* CC1E0 80135AE0 2404000C */ addiu $a0, $zero, 0xC
/* CC1E4 80135AE4 3C108014 */ lui $s0, %hi(basic_window_update)
/* CC1E8 80135AE8 26107474 */ addiu $s0, $s0, %lo(basic_window_update)
/* CC1EC 80135AEC 0C051F9F */ jal set_window_update
/* CC1F0 80135AF0 0200282D */ daddu $a1, $s0, $zero
/* CC1F4 80135AF4 24040011 */ addiu $a0, $zero, 0x11
/* CC1F8 80135AF8 0C051F9F */ jal set_window_update
/* CC1FC 80135AFC 0200282D */ daddu $a1, $s0, $zero
/* CC200 80135B00 24040013 */ addiu $a0, $zero, 0x13
/* CC204 80135B04 0C051F9F */ jal set_window_update
/* CC208 80135B08 0200282D */ daddu $a1, $s0, $zero
.L80135B0C:
/* CC20C 80135B0C 0C03A6D5 */ jal increment_status_bar_disabled
/* CC210 80135B10 00000000 */ nop
/* CC214 80135B14 3C018015 */ lui $at, %hi(ItemPickupStateDelay)
/* CC218 80135B18 AC3268E4 */ sw $s2, %lo(ItemPickupStateDelay)($at)
/* CC21C 80135B1C 0804D8DF */ j .L8013637C
/* CC220 80135B20 00000000 */ nop
glabel .L80135B24
/* CC224 80135B24 3C038015 */ lui $v1, %hi(ItemPickupStateDelay)
/* CC228 80135B28 8C6368E4 */ lw $v1, %lo(ItemPickupStateDelay)($v1)
/* CC22C 80135B2C 24020009 */ addiu $v0, $zero, 0x9
/* CC230 80135B30 1462003C */ bne $v1, $v0, .L80135C24
/* CC234 80135B34 00000000 */ nop
/* CC238 80135B38 86240018 */ lh $a0, 0x18($s1)
/* CC23C 80135B3C 00041140 */ sll $v0, $a0, 5
/* CC240 80135B40 3C038008 */ lui $v1, %hi(gItemTable + 0x18)
/* CC244 80135B44 00621821 */ addu $v1, $v1, $v0
/* CC248 80135B48 946378F8 */ lhu $v1, %lo(gItemTable + 0x18)($v1)
/* CC24C 80135B4C 30620040 */ andi $v0, $v1, 0x40
/* CC250 80135B50 1440000F */ bnez $v0, .L80135B90
/* CC254 80135B54 30620008 */ andi $v0, $v1, 0x8
/* CC258 80135B58 1440000D */ bnez $v0, .L80135B90
/* CC25C 80135B5C 2402015C */ addiu $v0, $zero, 0x15C
/* CC260 80135B60 1082000B */ beq $a0, $v0, .L80135B90
/* CC264 80135B64 30620020 */ andi $v0, $v1, 0x20
/* CC268 80135B68 14400009 */ bnez $v0, .L80135B90
/* CC26C 80135B6C 3C030400 */ lui $v1, (0x4000000 >> 16)
/* CC270 80135B70 8E220000 */ lw $v0, 0x0($s1)
/* CC274 80135B74 00431024 */ and $v0, $v0, $v1
/* CC278 80135B78 14400005 */ bnez $v0, .L80135B90
/* CC27C 80135B7C 00000000 */ nop
/* CC280 80135B80 96220006 */ lhu $v0, 0x6($s1)
/* CC284 80135B84 30420002 */ andi $v0, $v0, 0x2
/* CC288 80135B88 1040000F */ beqz $v0, .L80135BC8
/* CC28C 80135B8C 00000000 */ nop
.L80135B90:
/* CC290 80135B90 C6600028 */ lwc1 $f0, 0x28($s3)
/* CC294 80135B94 E6200008 */ swc1 $f0, 0x8($s1)
/* CC298 80135B98 866200B0 */ lh $v0, 0xB0($s3)
/* CC29C 80135B9C C660002C */ lwc1 $f0, 0x2C($s3)
/* CC2A0 80135BA0 44821000 */ mtc1 $v0, $f2
/* CC2A4 80135BA4 00000000 */ nop
/* CC2A8 80135BA8 468010A0 */ cvt.s.w $f2, $f2
/* CC2AC 80135BAC 46020000 */ add.s $f0, $f0, $f2
/* CC2B0 80135BB0 3C040006 */ lui $a0, (0x6000C >> 16)
/* CC2B4 80135BB4 E620000C */ swc1 $f0, 0xC($s1)
/* CC2B8 80135BB8 C6600030 */ lwc1 $f0, 0x30($s3)
/* CC2BC 80135BBC 3484000C */ ori $a0, $a0, (0x6000C & 0xFFFF)
/* CC2C0 80135BC0 0C037FDE */ jal suggest_player_anim_always_forward
/* CC2C4 80135BC4 E6200010 */ swc1 $f0, 0x10($s1)
.L80135BC8:
/* CC2C8 80135BC8 86220018 */ lh $v0, 0x18($s1)
/* CC2CC 80135BCC 00021140 */ sll $v0, $v0, 5
/* CC2D0 80135BD0 3C018008 */ lui $at, %hi(gItemTable + 0x18)
/* CC2D4 80135BD4 00220821 */ addu $at, $at, $v0
/* CC2D8 80135BD8 942278F8 */ lhu $v0, %lo(gItemTable + 0x18)($at)
/* CC2DC 80135BDC 30420020 */ andi $v0, $v0, 0x20
/* CC2E0 80135BE0 10400010 */ beqz $v0, .L80135C24
/* CC2E4 80135BE4 00000000 */ nop
/* CC2E8 80135BE8 C624000C */ lwc1 $f4, 0xC($s1)
/* CC2EC 80135BEC 3C014100 */ lui $at, (0x41000000 >> 16)
/* CC2F0 80135BF0 44810000 */ mtc1 $at, $f0
/* CC2F4 80135BF4 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* CC2F8 80135BF8 44811000 */ mtc1 $at, $f2
/* CC2FC 80135BFC 3C028015 */ lui $v0, %hi(ItemPickupGotOutline)
/* CC300 80135C00 244268F0 */ addiu $v0, $v0, %lo(ItemPickupGotOutline)
/* CC304 80135C04 AFA20014 */ sw $v0, 0x14($sp)
/* CC308 80135C08 46002100 */ add.s $f4, $f4, $f0
/* CC30C 80135C0C E7A20010 */ swc1 $f2, 0x10($sp)
/* CC310 80135C10 8E250008 */ lw $a1, 0x8($s1)
/* CC314 80135C14 8E270010 */ lw $a3, 0x10($s1)
/* CC318 80135C18 44062000 */ mfc1 $a2, $f4
/* CC31C 80135C1C 0C01C0AC */ jal fx_got_item_outline
/* CC320 80135C20 24040001 */ addiu $a0, $zero, 0x1
.L80135C24:
/* CC324 80135C24 3C028015 */ lui $v0, %hi(ItemPickupStateDelay)
/* CC328 80135C28 8C4268E4 */ lw $v0, %lo(ItemPickupStateDelay)($v0)
/* CC32C 80135C2C 28420009 */ slti $v0, $v0, 0x9
/* CC330 80135C30 1040001D */ beqz $v0, .L80135CA8
/* CC334 80135C34 00000000 */ nop
/* CC338 80135C38 86240018 */ lh $a0, 0x18($s1)
/* CC33C 80135C3C 00041140 */ sll $v0, $a0, 5
/* CC340 80135C40 3C038008 */ lui $v1, %hi(gItemTable + 0x18)
/* CC344 80135C44 00621821 */ addu $v1, $v1, $v0
/* CC348 80135C48 946378F8 */ lhu $v1, %lo(gItemTable + 0x18)($v1)
/* CC34C 80135C4C 30620040 */ andi $v0, $v1, 0x40
/* CC350 80135C50 54400013 */ bnel $v0, $zero, .L80135CA0
/* CC354 80135C54 3C040006 */ lui $a0, (0x6000C >> 16)
/* CC358 80135C58 30620008 */ andi $v0, $v1, 0x8
/* CC35C 80135C5C 54400010 */ bnel $v0, $zero, .L80135CA0
/* CC360 80135C60 3C040006 */ lui $a0, (0x6000C >> 16)
/* CC364 80135C64 2402015C */ addiu $v0, $zero, 0x15C
/* CC368 80135C68 1082000C */ beq $a0, $v0, .L80135C9C
/* CC36C 80135C6C 30620020 */ andi $v0, $v1, 0x20
/* CC370 80135C70 5440000B */ bnel $v0, $zero, .L80135CA0
/* CC374 80135C74 3C040006 */ lui $a0, (0x6000C >> 16)
/* CC378 80135C78 8E220000 */ lw $v0, 0x0($s1)
/* CC37C 80135C7C 3C030400 */ lui $v1, (0x4000000 >> 16)
/* CC380 80135C80 00431024 */ and $v0, $v0, $v1
/* CC384 80135C84 54400006 */ bnel $v0, $zero, .L80135CA0
/* CC388 80135C88 3C040006 */ lui $a0, (0x6000C >> 16)
/* CC38C 80135C8C 96220006 */ lhu $v0, 0x6($s1)
/* CC390 80135C90 30420002 */ andi $v0, $v0, 0x2
/* CC394 80135C94 10400004 */ beqz $v0, .L80135CA8
/* CC398 80135C98 00000000 */ nop
.L80135C9C:
/* CC39C 80135C9C 3C040006 */ lui $a0, (0x6000C >> 16)
.L80135CA0:
/* CC3A0 80135CA0 0C037FDE */ jal suggest_player_anim_always_forward
/* CC3A4 80135CA4 3484000C */ ori $a0, $a0, (0x6000C & 0xFFFF)
.L80135CA8:
/* CC3A8 80135CA8 3C038015 */ lui $v1, %hi(ItemPickupStateDelay)
/* CC3AC 80135CAC 8C6368E4 */ lw $v1, %lo(ItemPickupStateDelay)($v1)
/* CC3B0 80135CB0 24020007 */ addiu $v0, $zero, 0x7
/* CC3B4 80135CB4 1462001E */ bne $v1, $v0, .L80135D30
/* CC3B8 80135CB8 24020006 */ addiu $v0, $zero, 0x6
/* CC3BC 80135CBC 86240018 */ lh $a0, 0x18($s1)
/* CC3C0 80135CC0 00041140 */ sll $v0, $a0, 5
/* CC3C4 80135CC4 3C038008 */ lui $v1, %hi(gItemTable + 0x18)
/* CC3C8 80135CC8 00621821 */ addu $v1, $v1, $v0
/* CC3CC 80135CCC 946378F8 */ lhu $v1, %lo(gItemTable + 0x18)($v1)
/* CC3D0 80135CD0 30620040 */ andi $v0, $v1, 0x40
/* CC3D4 80135CD4 1440000F */ bnez $v0, .L80135D14
/* CC3D8 80135CD8 30620008 */ andi $v0, $v1, 0x8
/* CC3DC 80135CDC 1440000D */ bnez $v0, .L80135D14
/* CC3E0 80135CE0 2402015C */ addiu $v0, $zero, 0x15C
/* CC3E4 80135CE4 1082000B */ beq $a0, $v0, .L80135D14
/* CC3E8 80135CE8 30620020 */ andi $v0, $v1, 0x20
/* CC3EC 80135CEC 14400009 */ bnez $v0, .L80135D14
/* CC3F0 80135CF0 3C030400 */ lui $v1, (0x4000000 >> 16)
/* CC3F4 80135CF4 8E220000 */ lw $v0, 0x0($s1)
/* CC3F8 80135CF8 00431024 */ and $v0, $v0, $v1
/* CC3FC 80135CFC 14400005 */ bnez $v0, .L80135D14
/* CC400 80135D00 00000000 */ nop
/* CC404 80135D04 96220006 */ lhu $v0, 0x6($s1)
/* CC408 80135D08 30420002 */ andi $v0, $v0, 0x2
/* CC40C 80135D0C 10400005 */ beqz $v0, .L80135D24
/* CC410 80135D10 00000000 */ nop
.L80135D14:
/* CC414 80135D14 8E220000 */ lw $v0, 0x0($s1)
/* CC418 80135D18 2403FFBF */ addiu $v1, $zero, -0x41
/* CC41C 80135D1C 00431024 */ and $v0, $v0, $v1
/* CC420 80135D20 AE220000 */ sw $v0, 0x0($s1)
.L80135D24:
/* CC424 80135D24 3C038015 */ lui $v1, %hi(ItemPickupStateDelay)
/* CC428 80135D28 8C6368E4 */ lw $v1, %lo(ItemPickupStateDelay)($v1)
/* CC42C 80135D2C 24020006 */ addiu $v0, $zero, 0x6
.L80135D30:
/* CC430 80135D30 14620010 */ bne $v1, $v0, .L80135D74
/* CC434 80135D34 00000000 */ nop
/* CC438 80135D38 0C04D8E8 */ jal func_801363A0
/* CC43C 80135D3C 0220202D */ daddu $a0, $s1, $zero
/* CC440 80135D40 2404000C */ addiu $a0, $zero, 0xC
/* CC444 80135D44 3C108014 */ lui $s0, %hi(basic_window_update)
/* CC448 80135D48 26107474 */ addiu $s0, $s0, %lo(basic_window_update)
/* CC44C 80135D4C 0C051F9F */ jal set_window_update
/* CC450 80135D50 0200282D */ daddu $a1, $s0, $zero
/* CC454 80135D54 86230018 */ lh $v1, 0x18($s1)
/* CC458 80135D58 2402015C */ addiu $v0, $zero, 0x15C
/* CC45C 80135D5C 10620005 */ beq $v1, $v0, .L80135D74
/* CC460 80135D60 24020157 */ addiu $v0, $zero, 0x157
/* CC464 80135D64 10620003 */ beq $v1, $v0, .L80135D74
/* CC468 80135D68 24040013 */ addiu $a0, $zero, 0x13
/* CC46C 80135D6C 0C051F9F */ jal set_window_update
/* CC470 80135D70 0200282D */ daddu $a1, $s0, $zero
.L80135D74:
/* CC474 80135D74 3C038015 */ lui $v1, %hi(ItemPickupStateDelay)
/* CC478 80135D78 246368E4 */ addiu $v1, $v1, %lo(ItemPickupStateDelay)
/* CC47C 80135D7C 8C620000 */ lw $v0, 0x0($v1)
/* CC480 80135D80 10400003 */ beqz $v0, .L80135D90
/* CC484 80135D84 2442FFFF */ addiu $v0, $v0, -0x1
/* CC488 80135D88 0804D8DF */ j .L8013637C
/* CC48C 80135D8C AC620000 */ sw $v0, 0x0($v1)
.L80135D90:
/* CC490 80135D90 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* CC494 80135D94 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* CC498 80135D98 3C03000F */ lui $v1, (0xFC000 >> 16)
/* CC49C 80135D9C 8C420010 */ lw $v0, 0x10($v0)
/* CC4A0 80135DA0 3463C000 */ ori $v1, $v1, (0xFC000 & 0xFFFF)
/* CC4A4 80135DA4 00431024 */ and $v0, $v0, $v1
/* CC4A8 80135DA8 10400174 */ beqz $v0, .L8013637C
/* CC4AC 80135DAC 00000000 */ nop
/* CC4B0 80135DB0 0C04C3DC */ jal hide_item_entity
/* CC4B4 80135DB4 0220202D */ daddu $a0, $s1, $zero
/* CC4B8 80135DB8 0C037F3D */ jal is_player_dismounted
/* CC4BC 80135DBC 00000000 */ nop
/* CC4C0 80135DC0 1040000A */ beqz $v0, .L80135DEC
/* CC4C4 80135DC4 2402001D */ addiu $v0, $zero, 0x1D
/* CC4C8 80135DC8 826300B4 */ lb $v1, 0xB4($s3)
/* CC4CC 80135DCC 10620007 */ beq $v1, $v0, .L80135DEC
/* CC4D0 80135DD0 3C031000 */ lui $v1, (0x10000000 >> 16)
/* CC4D4 80135DD4 8E620004 */ lw $v0, 0x4($s3)
/* CC4D8 80135DD8 00431024 */ and $v0, $v0, $v1
/* CC4DC 80135DDC 14400003 */ bnez $v0, .L80135DEC
/* CC4E0 80135DE0 00000000 */ nop
/* CC4E4 80135DE4 0C039769 */ jal set_action_state
/* CC4E8 80135DE8 0000202D */ daddu $a0, $zero, $zero
.L80135DEC:
/* CC4EC 80135DEC 86220018 */ lh $v0, 0x18($s1)
/* CC4F0 80135DF0 00021140 */ sll $v0, $v0, 5
/* CC4F4 80135DF4 3C018008 */ lui $at, %hi(gItemTable + 0x18)
/* CC4F8 80135DF8 00220821 */ addu $at, $at, $v0
/* CC4FC 80135DFC 942278F8 */ lhu $v0, %lo(gItemTable + 0x18)($at)
/* CC500 80135E00 30420020 */ andi $v0, $v0, 0x20
/* CC504 80135E04 10400006 */ beqz $v0, .L80135E20
/* CC508 80135E08 2404000C */ addiu $a0, $zero, 0xC
/* CC50C 80135E0C 3C028015 */ lui $v0, %hi(ItemPickupGotOutline)
/* CC510 80135E10 8C4268F0 */ lw $v0, %lo(ItemPickupGotOutline)($v0)
/* CC514 80135E14 8C43000C */ lw $v1, 0xC($v0)
/* CC518 80135E18 2402000A */ addiu $v0, $zero, 0xA
/* CC51C 80135E1C AC620014 */ sw $v0, 0x14($v1)
.L80135E20:
/* CC520 80135E20 3C108014 */ lui $s0, %hi(basic_hidden_window_update)
/* CC524 80135E24 26107574 */ addiu $s0, $s0, %lo(basic_hidden_window_update)
/* CC528 80135E28 0C051F9F */ jal set_window_update
/* CC52C 80135E2C 0200282D */ daddu $a1, $s0, $zero
/* CC530 80135E30 24040013 */ addiu $a0, $zero, 0x13
/* CC534 80135E34 0C051F9F */ jal set_window_update
/* CC538 80135E38 0200282D */ daddu $a1, $s0, $zero
/* CC53C 80135E3C 24020003 */ addiu $v0, $zero, 0x3
/* CC540 80135E40 0804D8DF */ j .L8013637C
/* CC544 80135E44 A222001A */ sb $v0, 0x1A($s1)
glabel .L80135E48
/* CC548 80135E48 3C038016 */ lui $v1, %hi(gWindows)
/* CC54C 80135E4C 24639D50 */ addiu $v1, $v1, %lo(gWindows)
/* CC550 80135E50 90620180 */ lbu $v0, 0x180($v1)
/* CC554 80135E54 30420008 */ andi $v0, $v0, 0x8
/* CC558 80135E58 14400148 */ bnez $v0, .L8013637C
/* CC55C 80135E5C 00000000 */ nop
/* CC560 80135E60 90620260 */ lbu $v0, 0x260($v1)
/* CC564 80135E64 30420008 */ andi $v0, $v0, 0x8
/* CC568 80135E68 14400144 */ bnez $v0, .L8013637C
/* CC56C 80135E6C 24020004 */ addiu $v0, $zero, 0x4
/* CC570 80135E70 0804D8DF */ j .L8013637C
/* CC574 80135E74 A222001A */ sb $v0, 0x1A($s1)
glabel .L80135E78
/* CC578 80135E78 86220018 */ lh $v0, 0x18($s1)
/* CC57C 80135E7C 00021140 */ sll $v0, $v0, 5
/* CC580 80135E80 3C018008 */ lui $at, %hi(gItemTable + 0x18)
/* CC584 80135E84 00220821 */ addu $at, $at, $v0
/* CC588 80135E88 942278F8 */ lhu $v0, %lo(gItemTable + 0x18)($at)
/* CC58C 80135E8C 30420004 */ andi $v0, $v0, 0x4
/* CC590 80135E90 10400009 */ beqz $v0, .L80135EB8
/* CC594 80135E94 0000202D */ daddu $a0, $zero, $zero
/* CC598 80135E98 3C05F840 */ lui $a1, (0xF8405BE1 >> 16)
/* CC59C 80135E9C 0C0B1EAF */ jal evt_get_variable
/* CC5A0 80135EA0 34A55BE1 */ ori $a1, $a1, (0xF8405BE1 & 0xFFFF)
/* CC5A4 80135EA4 14400004 */ bnez $v0, .L80135EB8
/* CC5A8 80135EA8 0000202D */ daddu $a0, $zero, $zero
/* CC5AC 80135EAC 3C05F840 */ lui $a1, (0xF8405BE1 >> 16)
/* CC5B0 80135EB0 0804D7BB */ j .L80135EEC
/* CC5B4 80135EB4 34A55BE1 */ ori $a1, $a1, (0xF8405BE1 & 0xFFFF)
.L80135EB8:
/* CC5B8 80135EB8 86230018 */ lh $v1, 0x18($s1)
/* CC5BC 80135EBC 2402015C */ addiu $v0, $zero, 0x15C
/* CC5C0 80135EC0 1462000F */ bne $v1, $v0, .L80135F00
/* CC5C4 80135EC4 24020009 */ addiu $v0, $zero, 0x9
/* CC5C8 80135EC8 0000202D */ daddu $a0, $zero, $zero
/* CC5CC 80135ECC 3C05F840 */ lui $a1, (0xF8405BE5 >> 16)
/* CC5D0 80135ED0 0C0B1EAF */ jal evt_get_variable
/* CC5D4 80135ED4 34A55BE5 */ ori $a1, $a1, (0xF8405BE5 & 0xFFFF)
/* CC5D8 80135ED8 14400009 */ bnez $v0, .L80135F00
/* CC5DC 80135EDC 24020009 */ addiu $v0, $zero, 0x9
/* CC5E0 80135EE0 0000202D */ daddu $a0, $zero, $zero
/* CC5E4 80135EE4 3C05F840 */ lui $a1, (0xF8405BE5 >> 16)
/* CC5E8 80135EE8 34A55BE5 */ ori $a1, $a1, (0xF8405BE5 & 0xFFFF)
.L80135EEC:
/* CC5EC 80135EEC 0C0B2026 */ jal evt_set_variable
/* CC5F0 80135EF0 24060001 */ addiu $a2, $zero, 0x1
/* CC5F4 80135EF4 24020005 */ addiu $v0, $zero, 0x5
/* CC5F8 80135EF8 0804D8DF */ j .L8013637C
/* CC5FC 80135EFC A222001A */ sb $v0, 0x1A($s1)
.L80135F00:
/* CC600 80135F00 0804D8DF */ j .L8013637C
/* CC604 80135F04 A222001A */ sb $v0, 0x1A($s1)
glabel .L80135F08
/* CC608 80135F08 86230018 */ lh $v1, 0x18($s1)
/* CC60C 80135F0C 00031140 */ sll $v0, $v1, 5
/* CC610 80135F10 3C018008 */ lui $at, %hi(gItemTable + 0x18)
/* CC614 80135F14 00220821 */ addu $at, $at, $v0
/* CC618 80135F18 942278F8 */ lhu $v0, %lo(gItemTable + 0x18)($at)
/* CC61C 80135F1C 30420004 */ andi $v0, $v0, 0x4
/* CC620 80135F20 10400003 */ beqz $v0, .L80135F30
/* CC624 80135F24 0000202D */ daddu $a0, $zero, $zero
/* CC628 80135F28 3C04001D */ lui $a0, (0x1D0002 >> 16)
/* CC62C 80135F2C 34840002 */ ori $a0, $a0, (0x1D0002 & 0xFFFF)
.L80135F30:
/* CC630 80135F30 2402015C */ addiu $v0, $zero, 0x15C
/* CC634 80135F34 14620003 */ bne $v1, $v0, .L80135F44
/* CC638 80135F38 00000000 */ nop
/* CC63C 80135F3C 3C04001D */ lui $a0, (0x1D0003 >> 16)
/* CC640 80135F40 34840003 */ ori $a0, $a0, (0x1D0003 & 0xFFFF)
.L80135F44:
/* CC644 80135F44 3C058015 */ lui $a1, %hi(GotItemTutorialClosed)
/* CC648 80135F48 24A568F8 */ addiu $a1, $a1, %lo(GotItemTutorialClosed)
/* CC64C 80135F4C 0C049640 */ jal msg_get_printer_for_msg
/* CC650 80135F50 00000000 */ nop
/* CC654 80135F54 0040202D */ daddu $a0, $v0, $zero
/* CC658 80135F58 0000282D */ daddu $a1, $zero, $zero
/* CC65C 80135F5C 3C018015 */ lui $at, %hi(GotItemTutorialPrinter)
/* CC660 80135F60 AC2468F4 */ sw $a0, %lo(GotItemTutorialPrinter)($at)
/* CC664 80135F64 0C0496AE */ jal msg_printer_set_origin_pos
/* CC668 80135F68 00A0302D */ daddu $a2, $a1, $zero
/* CC66C 80135F6C 24020006 */ addiu $v0, $zero, 0x6
/* CC670 80135F70 0804D8DF */ j .L8013637C
/* CC674 80135F74 A222001A */ sb $v0, 0x1A($s1)
glabel .L80135F78
/* CC678 80135F78 3C038015 */ lui $v1, %hi(GotItemTutorialClosed)
/* CC67C 80135F7C 8C6368F8 */ lw $v1, %lo(GotItemTutorialClosed)($v1)
/* CC680 80135F80 24020001 */ addiu $v0, $zero, 0x1
/* CC684 80135F84 146200FD */ bne $v1, $v0, .L8013637C
/* CC688 80135F88 00000000 */ nop
/* CC68C 80135F8C 3C018015 */ lui $at, %hi(isPickingUpItem)
/* CC690 80135F90 A42065A4 */ sh $zero, %lo(isPickingUpItem)($at)
glabel .L80135F94
/* CC694 80135F94 8E220000 */ lw $v0, 0x0($s1)
/* CC698 80135F98 3C030200 */ lui $v1, (0x2000000 >> 16)
/* CC69C 80135F9C 00431024 */ and $v0, $v0, $v1
/* CC6A0 80135FA0 1440000D */ bnez $v0, .L80135FD8
/* CC6A4 80135FA4 00000000 */ nop
/* CC6A8 80135FA8 0C009C22 */ jal set_time_freeze_mode
/* CC6AC 80135FAC 0000202D */ daddu $a0, $zero, $zero
/* CC6B0 80135FB0 0C038069 */ jal enable_player_input
/* CC6B4 80135FB4 00000000 */ nop
/* CC6B8 80135FB8 0C03BD80 */ jal partner_enable_input
/* CC6BC 80135FBC 00000000 */ nop
/* CC6C0 80135FC0 3C02800A */ lui $v0, %hi(gOverrideFlags)
/* CC6C4 80135FC4 2442A650 */ addiu $v0, $v0, %lo(gOverrideFlags)
/* CC6C8 80135FC8 8C430000 */ lw $v1, 0x0($v0)
/* CC6CC 80135FCC 2404FFBF */ addiu $a0, $zero, -0x41
/* CC6D0 80135FD0 00641824 */ and $v1, $v1, $a0
/* CC6D4 80135FD4 AC430000 */ sw $v1, 0x0($v0)
.L80135FD8:
/* CC6D8 80135FD8 3C048015 */ lui $a0, %hi(ItemPickupIconID)
/* CC6DC 80135FDC 8C8468E0 */ lw $a0, %lo(ItemPickupIconID)($a0)
/* CC6E0 80135FE0 0804D8D5 */ j .L80136354
/* CC6E4 80135FE4 00000000 */ nop
glabel .L80135FE8
/* CC6E8 80135FE8 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* CC6EC 80135FEC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* CC6F0 80135FF0 8C420010 */ lw $v0, 0x10($v0)
/* CC6F4 80135FF4 30428000 */ andi $v0, $v0, 0x8000
/* CC6F8 80135FF8 104000E0 */ beqz $v0, .L8013637C
/* CC6FC 80135FFC 24070001 */ addiu $a3, $zero, 0x1
/* CC700 80136000 0000202D */ daddu $a0, $zero, $zero
/* CC704 80136004 3C038008 */ lui $v1, %hi(gItemTable)
/* CC708 80136008 246378E0 */ addiu $v1, $v1, %lo(gItemTable)
/* CC70C 8013600C 86220018 */ lh $v0, 0x18($s1)
/* CC710 80136010 0060402D */ daddu $t0, $v1, $zero
/* CC714 80136014 00021140 */ sll $v0, $v0, 5
/* CC718 80136018 00482821 */ addu $a1, $v0, $t0
/* CC71C 8013601C 84A20004 */ lh $v0, 0x4($a1)
/* CC720 80136020 3C0A8009 */ lui $t2, %hi(gItemHudScripts)
/* CC724 80136024 254AA680 */ addiu $t2, $t2, %lo(gItemHudScripts)
/* CC728 80136028 000210C0 */ sll $v0, $v0, 3
/* CC72C 8013602C 3C018009 */ lui $at, %hi(gItemHudScripts)
/* CC730 80136030 00220821 */ addu $at, $at, $v0
/* CC734 80136034 8C22A680 */ lw $v0, %lo(gItemHudScripts)($at)
/* CC738 80136038 00E0482D */ daddu $t1, $a3, $zero
/* CC73C 8013603C AE020000 */ sw $v0, 0x0($s0)
/* CC740 80136040 86230018 */ lh $v1, 0x18($s1)
/* CC744 80136044 00E0102D */ daddu $v0, $a3, $zero
/* CC748 80136048 AE02018C */ sw $v0, 0x18C($s0)
/* CC74C 8013604C AE030108 */ sw $v1, 0x108($s0)
/* CC750 80136050 8CA20000 */ lw $v0, 0x0($a1)
/* CC754 80136054 0280302D */ daddu $a2, $s4, $zero
/* CC758 80136058 AE020084 */ sw $v0, 0x84($s0)
/* CC75C 8013605C 8CA20014 */ lw $v0, 0x14($a1)
/* CC760 80136060 26030004 */ addiu $v1, $s0, 0x4
/* CC764 80136064 AE020294 */ sw $v0, 0x294($s0)
.L80136068:
/* CC768 80136068 84C201B4 */ lh $v0, 0x1B4($a2)
/* CC76C 8013606C 10400011 */ beqz $v0, .L801360B4
/* CC770 80136070 24840001 */ addiu $a0, $a0, 0x1
/* CC774 80136074 00021140 */ sll $v0, $v0, 5
/* CC778 80136078 00482821 */ addu $a1, $v0, $t0
/* CC77C 8013607C 84A20004 */ lh $v0, 0x4($a1)
/* CC780 80136080 000210C0 */ sll $v0, $v0, 3
/* CC784 80136084 004A1021 */ addu $v0, $v0, $t2
/* CC788 80136088 8C420000 */ lw $v0, 0x0($v0)
/* CC78C 8013608C AC620000 */ sw $v0, 0x0($v1)
/* CC790 80136090 84C201B4 */ lh $v0, 0x1B4($a2)
/* CC794 80136094 AC69018C */ sw $t1, 0x18C($v1)
/* CC798 80136098 AC620108 */ sw $v0, 0x108($v1)
/* CC79C 8013609C 8CA20000 */ lw $v0, 0x0($a1)
/* CC7A0 801360A0 AC620084 */ sw $v0, 0x84($v1)
/* CC7A4 801360A4 8CA20014 */ lw $v0, 0x14($a1)
/* CC7A8 801360A8 24E70001 */ addiu $a3, $a3, 0x1
/* CC7AC 801360AC AC620294 */ sw $v0, 0x294($v1)
/* CC7B0 801360B0 24630004 */ addiu $v1, $v1, 0x4
.L801360B4:
/* CC7B4 801360B4 2882000A */ slti $v0, $a0, 0xA
/* CC7B8 801360B8 1440FFEB */ bnez $v0, .L80136068
/* CC7BC 801360BC 24C60002 */ addiu $a2, $a2, 0x2
/* CC7C0 801360C0 0200202D */ daddu $a0, $s0, $zero
/* CC7C4 801360C4 24020002 */ addiu $v0, $zero, 0x2
/* CC7C8 801360C8 AC820318 */ sw $v0, 0x318($a0)
/* CC7CC 801360CC AC870324 */ sw $a3, 0x324($a0)
/* CC7D0 801360D0 0C03D390 */ jal create_standard_popup_menu
/* CC7D4 801360D4 AC800328 */ sw $zero, 0x328($a0)
/* CC7D8 801360D8 2404000C */ addiu $a0, $zero, 0xC
/* CC7DC 801360DC 3C108014 */ lui $s0, %hi(basic_hidden_window_update)
/* CC7E0 801360E0 26107574 */ addiu $s0, $s0, %lo(basic_hidden_window_update)
/* CC7E4 801360E4 0C051F9F */ jal set_window_update
/* CC7E8 801360E8 0200282D */ daddu $a1, $s0, $zero
/* CC7EC 801360EC 24040011 */ addiu $a0, $zero, 0x11
/* CC7F0 801360F0 0C051F9F */ jal set_window_update
/* CC7F4 801360F4 0200282D */ daddu $a1, $s0, $zero
/* CC7F8 801360F8 2402000B */ addiu $v0, $zero, 0xB
/* CC7FC 801360FC 3C018015 */ lui $at, %hi(ItemPickupStateDelay)
/* CC800 80136100 AC2068E4 */ sw $zero, %lo(ItemPickupStateDelay)($at)
/* CC804 80136104 0804D8DF */ j .L8013637C
/* CC808 80136108 A222001A */ sb $v0, 0x1A($s1)
glabel .L8013610C
/* CC80C 8013610C 3C038016 */ lui $v1, %hi(gWindows)
/* CC810 80136110 24639D50 */ addiu $v1, $v1, %lo(gWindows)
/* CC814 80136114 90620180 */ lbu $v0, 0x180($v1)
/* CC818 80136118 30420008 */ andi $v0, $v0, 0x8
/* CC81C 8013611C 14400097 */ bnez $v0, .L8013637C
/* CC820 80136120 00000000 */ nop
/* CC824 80136124 90620220 */ lbu $v0, 0x220($v1)
/* CC828 80136128 30420008 */ andi $v0, $v0, 0x8
/* CC82C 8013612C 14400093 */ bnez $v0, .L8013637C
/* CC830 80136130 00000000 */ nop
/* CC834 80136134 90620260 */ lbu $v0, 0x260($v1)
/* CC838 80136138 30420008 */ andi $v0, $v0, 0x8
/* CC83C 8013613C 1440008F */ bnez $v0, .L8013637C
/* CC840 80136140 2402000C */ addiu $v0, $zero, 0xC
/* CC844 80136144 0804D8DF */ j .L8013637C
/* CC848 80136148 A222001A */ sb $v0, 0x1A($s1)
glabel .L8013614C
/* CC84C 8013614C 3C158015 */ lui $s5, %hi(ItemPickupStateDelay)
/* CC850 80136150 26B568E4 */ addiu $s5, $s5, %lo(ItemPickupStateDelay)
/* CC854 80136154 8EA20000 */ lw $v0, 0x0($s5)
/* CC858 80136158 1440000A */ bnez $v0, .L80136184
/* CC85C 8013615C 24420001 */ addiu $v0, $v0, 0x1
/* CC860 80136160 8602032C */ lh $v0, 0x32C($s0)
/* CC864 80136164 3C018015 */ lui $at, %hi(D_801568E8)
/* CC868 80136168 AC2268E8 */ sw $v0, %lo(D_801568E8)($at)
/* CC86C 8013616C 10400083 */ beqz $v0, .L8013637C
/* CC870 80136170 00000000 */ nop
/* CC874 80136174 0C03C4EC */ jal hide_popup_menu
/* CC878 80136178 00000000 */ nop
/* CC87C 8013617C 8EA20000 */ lw $v0, 0x0($s5)
/* CC880 80136180 24420001 */ addiu $v0, $v0, 0x1
.L80136184:
/* CC884 80136184 AEA20000 */ sw $v0, 0x0($s5)
/* CC888 80136188 2842000F */ slti $v0, $v0, 0xF
/* CC88C 8013618C 1440007B */ bnez $v0, .L8013637C
/* CC890 80136190 00000000 */ nop
/* CC894 80136194 0C03C54E */ jal destroy_popup_menu
/* CC898 80136198 00000000 */ nop
/* CC89C 8013619C 3C128015 */ lui $s2, %hi(D_801568E8)
/* CC8A0 801361A0 265268E8 */ addiu $s2, $s2, %lo(D_801568E8)
/* CC8A4 801361A4 8E430000 */ lw $v1, 0x0($s2)
/* CC8A8 801361A8 240200FF */ addiu $v0, $zero, 0xFF
/* CC8AC 801361AC 14620002 */ bne $v1, $v0, .L801361B8
/* CC8B0 801361B0 24020001 */ addiu $v0, $zero, 0x1
/* CC8B4 801361B4 AE420000 */ sw $v0, 0x0($s2)
.L801361B8:
/* CC8B8 801361B8 8E420000 */ lw $v0, 0x0($s2)
/* CC8BC 801361BC 3C048015 */ lui $a0, %hi(ItemPickupIconID)
/* CC8C0 801361C0 8C8468E0 */ lw $a0, %lo(ItemPickupIconID)($a0)
/* CC8C4 801361C4 2442FFFF */ addiu $v0, $v0, -0x1
/* CC8C8 801361C8 00021080 */ sll $v0, $v0, 2
/* CC8CC 801361CC 02021021 */ addu $v0, $s0, $v0
/* CC8D0 801361D0 8C450000 */ lw $a1, 0x0($v0)
/* CC8D4 801361D4 8C420108 */ lw $v0, 0x108($v0)
/* CC8D8 801361D8 3C108015 */ lui $s0, %hi(D_801568EC)
/* CC8DC 801361DC 261068EC */ addiu $s0, $s0, %lo(D_801568EC)
/* CC8E0 801361E0 0C0511FF */ jal hud_element_set_script
/* CC8E4 801361E4 AE020000 */ sw $v0, 0x0($s0)
/* CC8E8 801361E8 8E040000 */ lw $a0, 0x0($s0)
/* CC8EC 801361EC 8E650028 */ lw $a1, 0x28($s3)
/* CC8F0 801361F0 8E670030 */ lw $a3, 0x30($s3)
/* CC8F4 801361F4 24020003 */ addiu $v0, $zero, 0x3
/* CC8F8 801361F8 AFA20010 */ sw $v0, 0x10($sp)
/* CC8FC 801361FC 866200B0 */ lh $v0, 0xB0($s3)
/* CC900 80136200 C662002C */ lwc1 $f2, 0x2C($s3)
/* CC904 80136204 44820000 */ mtc1 $v0, $f0
/* CC908 80136208 00000000 */ nop
/* CC90C 8013620C 46800020 */ cvt.s.w $f0, $f0
/* CC910 80136210 46001080 */ add.s $f2, $f2, $f0
/* CC914 80136214 44061000 */ mfc1 $a2, $f2
/* CC918 80136218 AFA00014 */ sw $zero, 0x14($sp)
/* CC91C 8013621C 0C04C6B2 */ jal make_item_entity_delayed
/* CC920 80136220 AFA00018 */ sw $zero, 0x18($sp)
/* CC924 80136224 0C04C3D6 */ jal get_item_entity
/* CC928 80136228 0040202D */ daddu $a0, $v0, $zero
/* CC92C 8013622C 2403FFFF */ addiu $v1, $zero, -0x1
/* CC930 80136230 A043001D */ sb $v1, 0x1D($v0)
/* CC934 80136234 8E430000 */ lw $v1, 0x0($s2)
/* CC938 80136238 28620002 */ slti $v0, $v1, 0x2
/* CC93C 8013623C 1440000A */ bnez $v0, .L80136268
/* CC940 80136240 3C040006 */ lui $a0, (0x6000C >> 16)
/* CC944 80136244 2462FFFE */ addiu $v0, $v1, -0x2
/* CC948 80136248 00021040 */ sll $v0, $v0, 1
/* CC94C 8013624C 02821021 */ addu $v0, $s4, $v0
/* CC950 80136250 0C039DB3 */ jal sort_items
/* CC954 80136254 A44001B4 */ sh $zero, 0x1B4($v0)
/* CC958 80136258 86240018 */ lh $a0, 0x18($s1)
/* CC95C 8013625C 0C039D5D */ jal add_item
/* CC960 80136260 00000000 */ nop
/* CC964 80136264 3C040006 */ lui $a0, (0x6000C >> 16)
.L80136268:
/* CC968 80136268 0C037FDE */ jal suggest_player_anim_always_forward
/* CC96C 8013626C 3484000C */ ori $a0, $a0, (0x6000C & 0xFFFF)
/* CC970 80136270 0C04D8E8 */ jal func_801363A0
/* CC974 80136274 0220202D */ daddu $a0, $s1, $zero
/* CC978 80136278 3C058014 */ lui $a1, %hi(basic_window_update)
/* CC97C 8013627C 24A57474 */ addiu $a1, $a1, %lo(basic_window_update)
/* CC980 80136280 0C051F9F */ jal set_window_update
/* CC984 80136284 2404000C */ addiu $a0, $zero, 0xC
/* CC988 80136288 24020032 */ addiu $v0, $zero, 0x32
/* CC98C 8013628C AEA20000 */ sw $v0, 0x0($s5)
/* CC990 80136290 2402000D */ addiu $v0, $zero, 0xD
/* CC994 80136294 0804D8DF */ j .L8013637C
/* CC998 80136298 A222001A */ sb $v0, 0x1A($s1)
glabel .L8013629C
/* CC99C 8013629C 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* CC9A0 801362A0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* CC9A4 801362A4 8C420010 */ lw $v0, 0x10($v0)
/* CC9A8 801362A8 30428000 */ andi $v0, $v0, 0x8000
/* CC9AC 801362AC 10400033 */ beqz $v0, .L8013637C
/* CC9B0 801362B0 00000000 */ nop
/* CC9B4 801362B4 3C058014 */ lui $a1, %hi(basic_hidden_window_update)
/* CC9B8 801362B8 24A57574 */ addiu $a1, $a1, %lo(basic_hidden_window_update)
/* CC9BC 801362BC 0C051F9F */ jal set_window_update
/* CC9C0 801362C0 2404000C */ addiu $a0, $zero, 0xC
/* CC9C4 801362C4 2402000E */ addiu $v0, $zero, 0xE
/* CC9C8 801362C8 0804D8DF */ j .L8013637C
/* CC9CC 801362CC A222001A */ sb $v0, 0x1A($s1)
glabel .L801362D0
/* CC9D0 801362D0 3C038016 */ lui $v1, %hi(gWindows)
/* CC9D4 801362D4 24639D50 */ addiu $v1, $v1, %lo(gWindows)
/* CC9D8 801362D8 90620180 */ lbu $v0, 0x180($v1)
/* CC9DC 801362DC 30420008 */ andi $v0, $v0, 0x8
/* CC9E0 801362E0 14400026 */ bnez $v0, .L8013637C
/* CC9E4 801362E4 00000000 */ nop
/* CC9E8 801362E8 90620220 */ lbu $v0, 0x220($v1)
/* CC9EC 801362EC 30420008 */ andi $v0, $v0, 0x8
/* CC9F0 801362F0 14400022 */ bnez $v0, .L8013637C
/* CC9F4 801362F4 00000000 */ nop
/* CC9F8 801362F8 90620260 */ lbu $v0, 0x260($v1)
/* CC9FC 801362FC 30420008 */ andi $v0, $v0, 0x8
/* CCA00 80136300 1440001E */ bnez $v0, .L8013637C
/* CCA04 80136304 2402000F */ addiu $v0, $zero, 0xF
/* CCA08 80136308 0804D8DF */ j .L8013637C
/* CCA0C 8013630C A222001A */ sb $v0, 0x1A($s1)
glabel .L80136310
/* CCA10 80136310 3C040001 */ lui $a0, (0x10002 >> 16)
/* CCA14 80136314 0C037FDE */ jal suggest_player_anim_always_forward
/* CCA18 80136318 34840002 */ ori $a0, $a0, (0x10002 & 0xFFFF)
/* CCA1C 8013631C 0C009C22 */ jal set_time_freeze_mode
/* CCA20 80136320 0000202D */ daddu $a0, $zero, $zero
/* CCA24 80136324 0C038069 */ jal enable_player_input
/* CCA28 80136328 00000000 */ nop
/* CCA2C 8013632C 0C03BD80 */ jal partner_enable_input
/* CCA30 80136330 00000000 */ nop
/* CCA34 80136334 3C02800A */ lui $v0, %hi(gOverrideFlags)
/* CCA38 80136338 2442A650 */ addiu $v0, $v0, %lo(gOverrideFlags)
/* CCA3C 8013633C 2405FFBF */ addiu $a1, $zero, -0x41
/* CCA40 80136340 8C430000 */ lw $v1, 0x0($v0)
/* CCA44 80136344 3C048015 */ lui $a0, %hi(ItemPickupIconID)
/* CCA48 80136348 8C8468E0 */ lw $a0, %lo(ItemPickupIconID)($a0)
/* CCA4C 8013634C 00651824 */ and $v1, $v1, $a1
/* CCA50 80136350 AC430000 */ sw $v1, 0x0($v0)
.L80136354:
/* CCA54 80136354 0C05123D */ jal hud_element_free
/* CCA58 80136358 00000000 */ nop
/* CCA5C 8013635C 0C04CE4C */ jal remove_item_entity_by_reference
/* CCA60 80136360 0220202D */ daddu $a0, $s1, $zero
/* CCA64 80136364 0C039DB3 */ jal sort_items
/* CCA68 80136368 00000000 */ nop
/* CCA6C 8013636C 0C03A6CC */ jal decrement_status_bar_disabled
/* CCA70 80136370 00000000 */ nop
/* CCA74 80136374 3C018015 */ lui $at, %hi(isPickingUpItem)
/* CCA78 80136378 A42065A4 */ sh $zero, %lo(isPickingUpItem)($at)
glabel .L8013637C
/* CCA7C 8013637C 8FBF0038 */ lw $ra, 0x38($sp)
/* CCA80 80136380 8FB50034 */ lw $s5, 0x34($sp)
/* CCA84 80136384 8FB40030 */ lw $s4, 0x30($sp)
/* CCA88 80136388 8FB3002C */ lw $s3, 0x2C($sp)
/* CCA8C 8013638C 8FB20028 */ lw $s2, 0x28($sp)
/* CCA90 80136390 8FB10024 */ lw $s1, 0x24($sp)
/* CCA94 80136394 8FB00020 */ lw $s0, 0x20($sp)
/* CCA98 80136398 03E00008 */ jr $ra
/* CCA9C 8013639C 27BD0040 */ addiu $sp, $sp, 0x40
### DECOMPILED C INSTRUCTIONS:
void update_item_entity_pickup(ItemEntity* item) {
PlayerData* playerData = &gPlayerData;
PlayerStatus* playerStatus = &gPlayerStatus;
PopupMenu* menu = &D_801565B0;
ItemData* itemData;
s32 numEntries;
s32 msgID;
s32 i;
if (item->state == ITEM_PICKUP_STATE_INIT) {
isPickingUpItem = TRUE;
if (!(item->flags & ITEM_ENTITY_FLAG_2000000)) {
disable_player_input();
partner_disable_input();
gOverrideFlags |= GLOBAL_OVERRIDES_40;
set_time_freeze_mode(TIME_FREEZE_FULL);
}
hide_item_entity(item);
item->state = ITEM_PICKUP_STATE_AWAIT_VALID_STATE;
}
switch (item->state) {
case ITEM_PICKUP_STATE_AWAIT_VALID_STATE:
if (!(item->flags & ITEM_ENTITY_FLAG_2000000)) {
// list of action state conditions which allow item pickup
// remain in this state (via break) until one of these is TRUE
s32 actionState = playerStatus->actionState;
if (!(
playerStatus->animFlags & PA_FLAG_NO_OOB_RESPAWN
|| ((playerStatus->timeInAir != 0 || actionState == ACTION_STATE_JUMP || actionState == ACTION_STATE_FALLING)
&& playerStatus->enableCollisionOverlapsCheck
&& playerStatus->inputDisabledCount != 0)
|| actionState == ACTION_STATE_LAUNCH
|| actionState == ACTION_STATE_RIDE
|| actionState == ACTION_STATE_IDLE
|| (actionState == ACTION_STATE_USE_SPINNING_FLOWER && playerStatus->actionSubstate == 1)
)) {
break;
}
}
if (!(item->pickupMsgFlags & ITEM_PICKUP_FLAG_NO_SOUND)) {
if (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_BADGE) {
sfx_play_sound(SOUND_D3);
} else if (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_KEY) {
sfx_play_sound(SOUND_D2);
} else if (item->itemID == ITEM_COIN) {
sfx_play_sound_at_position(SOUND_211, 0, item->position.x, item->position.y, item->position.z);
} else {
sfx_play_sound(SOUND_D1);
}
}
ItemPickupIconID = hud_element_create(gItemHudScripts[gItemTable[item->itemID].hudElemID].enabled);
hud_element_set_flags(ItemPickupIconID, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(ItemPickupIconID, -100, -100);
item->state = ITEM_PICKUP_STATE_SHOW_GOT_ITEM;
if (!(item->flags & ITEM_ENTITY_FLAG_2000000)) {
if (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_CONSUMABLE) {
for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
if (playerData->invItems[i] == ITEM_NONE) {
break;
}
}
if (i < ARRAY_COUNT(playerData->invItems)) {
playerData->invItems[i] = item->itemID;
} else {
item->state = ITEM_PICKUP_STATE_SHOW_TOO_MANY;
goto block_47; // TODO required to match
}
}
if (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_KEY) {
for (i = 0; i < ARRAY_COUNT(playerData->keyItems); i++) {
if (playerData->keyItems[i] == ITEM_NONE) {
break;
}
}
if (i < ARRAY_COUNT(playerData->keyItems)) {
playerData->keyItems[i] = item->itemID;
} else {
item->state = ITEM_PICKUP_STATE_SHOW_TOO_MANY;
goto block_47; // TODO required to match
}
}
if (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_BADGE) {
for (i = 0; i < ARRAY_COUNT(playerData->badges); i++) {
if (playerData->badges[i] == ITEM_NONE) {
break;
}
}
if (i < ARRAY_COUNT(playerData->badges)) {
playerData->badges[i] = item->itemID;
} else {
item->state = ITEM_PICKUP_STATE_SHOW_TOO_MANY;
goto block_47; // TODO required to match
}
}
if (item->itemID == ITEM_STAR_PIECE) {
playerData->starPieces++;
if (playerData->starPieces > MAX_STAR_PIECES) {
playerData->starPieces = MAX_STAR_PIECES;
}
}
if (item->itemID == ITEM_LUCKY_STAR) {
playerData->hasActionCommands = TRUE;
}
if (item->itemID >= ITEM_HAMMER && item->itemID <= ITEM_ULTRA_HAMMER) {
playerData->hammerLevel = item->itemID - ITEM_HAMMER;
}
if (item->itemID >= ITEM_BOOTS && item->itemID <= ITEM_ULTRA_BOOTS) {
playerData->bootsLevel = item->itemID - ITEM_BOOTS;
}
}
block_47: // TODO required to match
if (item->flags & ITEM_ENTITY_FLAG_SAVE_ON_RECEIPT) {
set_global_flag(item->boundVar);
}
if (item->state == ITEM_PICKUP_STATE_SHOW_TOO_MANY) {
func_801363A0(item);
set_window_update(WINDOW_ID_12, (s32) basic_window_update);
set_window_update(WINDOW_ID_17, (s32) basic_window_update);
set_window_update(WINDOW_ID_19, (s32) basic_window_update);
}
increment_status_bar_disabled();
ItemPickupStateDelay = 10;
break;
case ITEM_PICKUP_STATE_SHOW_GOT_ITEM:
if (ItemPickupStateDelay == 9) {
if ( (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_BADGE)
|| (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_KEY)
|| (item->itemID == ITEM_STAR_PIECE)
|| (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR)
|| (item->flags & ITEM_ENTITY_FLAG_4000000)
|| (item->pickupMsgFlags & ITEM_PICKUP_FLAG_NO_ANIMS)
) {
item->position.x = playerStatus->position.x;
item->position.y = playerStatus->position.y + playerStatus->colliderHeight;
item->position.z = playerStatus->position.z;
suggest_player_anim_always_forward(ANIM_MarioW1_Lift);
}
if (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR) {
fx_got_item_outline(
1,
item->position.x,
item->position.y + 8.0f,
item->position.z,
1.0f,
&ItemPickupGotOutline
);
}
}
if (ItemPickupStateDelay < 9) {
if ( (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_BADGE)
|| (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_KEY)
|| (item->itemID == ITEM_STAR_PIECE)
|| (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR)
|| (item->flags & ITEM_ENTITY_FLAG_4000000)
|| (item->pickupMsgFlags & ITEM_PICKUP_FLAG_NO_ANIMS)
) {
suggest_player_anim_always_forward(ANIM_MarioW1_Lift);
}
}
if (ItemPickupStateDelay == 7) {
if ( (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_BADGE)
|| (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_KEY)
|| (item->itemID == ITEM_STAR_PIECE)
|| (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR)
|| (item->flags & ITEM_ENTITY_FLAG_4000000)
|| (item->pickupMsgFlags & ITEM_PICKUP_FLAG_NO_ANIMS)
) {
item->flags &= ~ITEM_ENTITY_FLAG_HIDDEN;
}
}
if (ItemPickupStateDelay == 6) {
func_801363A0(item);
set_window_update(WINDOW_ID_12, (s32) basic_window_update);
if (item->itemID != ITEM_STAR_PIECE && item->itemID != ITEM_COIN) {
set_window_update(WINDOW_ID_19, (s32) basic_window_update);
}
}
if (ItemPickupStateDelay != 0) {
ItemPickupStateDelay--;
break;
}
// wait for input
if (gGameStatusPtr->pressedButtons[0] &
(BUTTON_STICK_RIGHT | BUTTON_STICK_LEFT | BUTTON_STICK_DOWN | BUTTON_STICK_UP | BUTTON_A | BUTTON_B))
{
hide_item_entity(item);
if (is_player_dismounted()
&& playerStatus->actionState != ACTION_STATE_USE_SPINNING_FLOWER
&& !(playerStatus->animFlags & PA_FLAG_NO_OOB_RESPAWN)
) {
set_action_state(ACTION_STATE_IDLE);
}
if (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR) {
ItemPickupGotOutline->data.gotItemOutline->timeLeft = 10;
}
set_window_update(WINDOW_ID_12, (s32) basic_hidden_window_update);
set_window_update(WINDOW_ID_19, (s32) basic_hidden_window_update);
item->state = ITEM_PICKUP_STATE_HIDE_GOT_ITEM;
}
break;
case ITEM_PICKUP_STATE_HIDE_GOT_ITEM:
if (!(gWindows[WINDOW_ID_12].flags & WINDOW_FLAG_INITIAL_ANIMATION) &&
!(gWindows[WINDOW_ID_19].flags & WINDOW_FLAG_INITIAL_ANIMATION))
{
item->state = ITEM_PICKUP_STATE_CHECK_TUTORIALS;
}
break;
case ITEM_PICKUP_STATE_CHECK_TUTORIALS:
if ((gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_CONSUMABLE) &&
!evt_get_variable(NULL, GF_Tutorial_GotItem))
{
evt_set_variable(NULL, GF_Tutorial_GotItem, TRUE);
item->state = ITEM_PICKUP_STATE_SHOW_TUTORIAL;
break;
}
if (item->itemID == ITEM_STAR_PIECE && !evt_get_variable(NULL, GF_Tutorial_GotStarPiece)) {
evt_set_variable(NULL, GF_Tutorial_GotStarPiece, TRUE);
item->state = ITEM_PICKUP_STATE_SHOW_TUTORIAL;
break;
}
item->state = ITEM_PICKUP_STATE_DONE;
break;
case ITEM_PICKUP_STATE_SHOW_TUTORIAL:
msgID = MSG_NONE;
if (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_CONSUMABLE) {
msgID = MSG_Menus_Tutorial_GotItem;
}
if (item->itemID == ITEM_STAR_PIECE) {
msgID = MSG_Menus_Tutorial_GotStarPiece;
}
GotItemTutorialPrinter = msg_get_printer_for_msg(msgID, &GotItemTutorialClosed);
msg_printer_set_origin_pos(GotItemTutorialPrinter, 0, 0);
item->state = ITEM_PICKUP_STATE_AWAIT_TUTORIAL;
break;
case ITEM_PICKUP_STATE_AWAIT_TUTORIAL:
if (GotItemTutorialClosed == TRUE) {
isPickingUpItem = FALSE;
} else {
break;
}
case ITEM_PICKUP_STATE_DONE:
if (!(item->flags & ITEM_ENTITY_FLAG_2000000)) {
set_time_freeze_mode(TIME_FREEZE_NORMAL);
enable_player_input();
partner_enable_input();
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
}
hud_element_free(ItemPickupIconID);
remove_item_entity_by_reference(item);
sort_items();
decrement_status_bar_disabled();
isPickingUpItem = FALSE;
break;
case ITEM_PICKUP_STATE_SHOW_TOO_MANY:
numEntries = 0;
if (gGameStatusPtr->pressedButtons[0] & BUTTON_A) {
// add new item to menu
itemData = &gItemTable[item->itemID];
menu->ptrIcon[numEntries] = gItemHudScripts[itemData->hudElemID].enabled;
menu->userIndex[numEntries] = item->itemID;
menu->enabled[numEntries] = TRUE;
menu->nameMsg[numEntries] = itemData->nameMsg;
menu->descMsg[numEntries] = itemData->shortDescMsg;
numEntries++;
// add player inventory to menu
for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
if (playerData->invItems[i] != 0) {
itemData = &gItemTable[playerData->invItems[i]];
menu->ptrIcon[numEntries] = gItemHudScripts[itemData->hudElemID].enabled;
menu->userIndex[numEntries] = playerData->invItems[i];
menu->enabled[numEntries] = TRUE;
menu->nameMsg[numEntries] = itemData->nameMsg;
menu->descMsg[numEntries] = itemData->shortDescMsg;
numEntries++;
}
}
menu->popupType = POPUP_MENU_THROW_AWAY_ITEM;
menu->numEntries = numEntries;
menu->initialPos = 0;
create_standard_popup_menu(menu);
set_window_update(WINDOW_ID_12, (s32) basic_hidden_window_update);
set_window_update(WINDOW_ID_17, (s32) basic_hidden_window_update);
ItemPickupStateDelay = 0;
item->state = ITEM_PICKUP_STATE_HIDE_TOO_MANY;
}
break;
case ITEM_PICKUP_STATE_HIDE_TOO_MANY:
if (!(gWindows[WINDOW_ID_12].flags & WINDOW_FLAG_INITIAL_ANIMATION) &&
!(gWindows[WINDOW_ID_17].flags & WINDOW_FLAG_INITIAL_ANIMATION) &&
!(gWindows[WINDOW_ID_19].flags & WINDOW_FLAG_INITIAL_ANIMATION))
{
item->state = ITEM_PICKUP_STATE_AWAIT_THROW_AWAY;
}
break;
case ITEM_PICKUP_STATE_AWAIT_THROW_AWAY:
if (ItemPickupStateDelay == 0) {
D_801568E8 = menu->result;
if (D_801568E8 == 0) {
break;
}
hide_popup_menu();
}
ItemPickupStateDelay++;
if (ItemPickupStateDelay >= 15) {
destroy_popup_menu();
if (D_801568E8 == 255) {
D_801568E8 = 1;
}
D_801568EC = menu->userIndex[D_801568E8 - 1];
hud_element_set_script(ItemPickupIconID, menu->ptrIcon[D_801568E8 - 1]);
get_item_entity(
make_item_entity_delayed(
D_801568EC,
playerStatus->position.x,
playerStatus->position.y + playerStatus->colliderHeight,
playerStatus->position.z, 3, 0, 0
)
)->renderGroup = -1;
if (D_801568E8 >= 2) {
playerData->invItems[D_801568E8 - 2] = 0;
sort_items();
add_item(item->itemID);
}
suggest_player_anim_always_forward(ANIM_MarioW1_Lift);
func_801363A0(item);
set_window_update(WINDOW_ID_12, (s32) basic_window_update);
ItemPickupStateDelay = 50;
item->state = ITEM_PICKUP_STATE_SHOW_THREW_AWAY;
}
break;
case ITEM_PICKUP_STATE_SHOW_THREW_AWAY:
if (gGameStatusPtr->pressedButtons[0] & BUTTON_A) {
set_window_update(WINDOW_ID_12, (s32) basic_hidden_window_update);
item->state = ITEM_PICKUP_STATE_HIDE_THREW_AWAY;
}
break;
case ITEM_PICKUP_STATE_HIDE_THREW_AWAY:
if (!(gWindows[WINDOW_ID_12].flags & WINDOW_FLAG_INITIAL_ANIMATION) &&
!(gWindows[WINDOW_ID_17].flags & WINDOW_FLAG_INITIAL_ANIMATION) &&
!(gWindows[WINDOW_ID_19].flags & WINDOW_FLAG_INITIAL_ANIMATION))
{
item->state = ITEM_PICKUP_STATE_THROW_AWAY_DONE;
}
break;
case ITEM_PICKUP_STATE_THROW_AWAY_DONE:
suggest_player_anim_always_forward(ANIM_Mario1_Idle);
set_time_freeze_mode(TIME_FREEZE_NORMAL);
enable_player_input();
partner_enable_input();
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
hud_element_free(ItemPickupIconID);
remove_item_entity_by_reference(item);
sort_items();
decrement_status_bar_disabled();
isPickingUpItem = FALSE;
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_80245A40
/* 1662A0 80245A40 27BDFFD8 */ addiu $sp, $sp, -0x28
glabel .L80245A44
/* 1662A4 80245A44 AFB3001C */ sw $s3, 0x1C($sp)
D_80245A48:
/* 1662A8 80245A48 0080982D */ daddu $s3, $a0, $zero
/* 1662AC 80245A4C 3C028025 */ lui $v0, %hi(D_8024C08C)
D_80245A50:
/* 1662B0 80245A50 8C42C08C */ lw $v0, %lo(D_8024C08C)($v0)
/* 1662B4 80245A54 3C030004 */ lui $v1, (0x40000 >> 16)
D_80245A58:
/* 1662B8 80245A58 AFBF0020 */ sw $ra, 0x20($sp)
/* 1662BC 80245A5C AFB20018 */ sw $s2, 0x18($sp)
D_80245A60:
/* 1662C0 80245A60 AFB10014 */ sw $s1, 0x14($sp)
/* 1662C4 80245A64 AFB00010 */ sw $s0, 0x10($sp)
D_80245A68:
/* 1662C8 80245A68 92670003 */ lbu $a3, 0x3($s3)
/* 1662CC 80245A6C 00431024 */ and $v0, $v0, $v1
D_80245A70:
/* 1662D0 80245A70 1040001C */ beqz $v0, .L80245AE4
/* 1662D4 80245A74 00000000 */ nop
D_80245A78:
/* 1662D8 80245A78 92620001 */ lbu $v0, 0x1($s3)
/* 1662DC 80245A7C 2442FFFF */ addiu $v0, $v0, -0x1
/* 1662E0 80245A80 A2620001 */ sb $v0, 0x1($s3)
D_80245A84:
/* 1662E4 80245A84 00021600 */ sll $v0, $v0, 24
/* 1662E8 80245A88 00022E03 */ sra $a1, $v0, 24
/* 1662EC 80245A8C 04A20015 */ bltzl $a1, .L80245AE4
.L80245A90:
/* 1662F0 80245A90 A2600001 */ sb $zero, 0x1($s3)
/* 1662F4 80245A94 82620004 */ lb $v0, 0x4($s3)
/* 1662F8 80245A98 82630005 */ lb $v1, 0x5($s3)
/* 1662FC 80245A9C 00430018 */ mult $v0, $v1
/* 166300 80245AA0 00006012 */ mflo $t4
.L80245AA4:
/* 166304 80245AA4 82620006 */ lb $v0, 0x6($s3)
D_80245AA8:
/* 166308 80245AA8 00000000 */ nop
glabel .L80245AAC
/* 16630C 80245AAC 01820018 */ mult $t4, $v0
/* 166310 80245AB0 00002012 */ mflo $a0
D_80245AB4:
/* 166314 80245AB4 82620002 */ lb $v0, 0x2($s3)
D_80245AB8:
/* 166318 80245AB8 00000000 */ nop
D_80245ABC:
/* 16631C 80245ABC 00620018 */ mult $v1, $v0
/* 166320 80245AC0 00001812 */ mflo $v1
/* 166324 80245AC4 00831021 */ addu $v0, $a0, $v1
glabel func_80245AC8
/* 166328 80245AC8 00451021 */ addu $v0, $v0, $a1
/* 16632C 80245ACC 8E630008 */ lw $v1, 0x8($s3)
D_80245AD0:
/* 166330 80245AD0 92640003 */ lbu $a0, 0x3($s3)
/* 166334 80245AD4 00621821 */ addu $v1, $v1, $v0
D_80245AD8:
/* 166338 80245AD8 90620000 */ lbu $v0, 0x0($v1)
/* 16633C 80245ADC 1082FFE6 */ beq $a0, $v0, D_80245A78
jtbl_80245AE0:
/* 166340 80245AE0 00000000 */ nop
.L80245AE4:
/* 166344 80245AE4 3C028025 */ lui $v0, %hi(D_8024C08C)
D_80245AE8:
/* 166348 80245AE8 8C42C08C */ lw $v0, %lo(D_8024C08C)($v0)
D_80245AEC:
/* 16634C 80245AEC 3C030008 */ lui $v1, (0x80000 >> 16)
/* 166350 80245AF0 00431024 */ and $v0, $v0, $v1
/* 166354 80245AF4 1040001E */ beqz $v0, .L80245B70
D_80245AF8:
/* 166358 80245AF8 00000000 */ nop
/* 16635C 80245AFC 92660005 */ lbu $a2, 0x5($s3)
/* 166360 80245B00 82650005 */ lb $a1, 0x5($s3)
.L80245B04:
/* 166364 80245B04 92620001 */ lbu $v0, 0x1($s3)
/* 166368 80245B08 24420001 */ addiu $v0, $v0, 0x1
/* 16636C 80245B0C A2620001 */ sb $v0, 0x1($s3)
jtbl_80245B10:
/* 166370 80245B10 00021600 */ sll $v0, $v0, 24
D_80245B14:
/* 166374 80245B14 00022603 */ sra $a0, $v0, 24
/* 166378 80245B18 0085102A */ slt $v0, $a0, $a1
/* 16637C 80245B1C 1040003A */ beqz $v0, .L80245C08
D_80245B20:
/* 166380 80245B20 24C2FFFF */ addiu $v0, $a2, -0x1
/* 166384 80245B24 82620004 */ lb $v0, 0x4($s3)
D_80245B28:
/* 166388 80245B28 00450018 */ mult $v0, $a1
/* 16638C 80245B2C 00001812 */ mflo $v1
D_80245B30:
/* 166390 80245B30 82620006 */ lb $v0, 0x6($s3)
D_80245B34:
/* 166394 80245B34 00000000 */ nop
D_80245B38:
/* 166398 80245B38 00620018 */ mult $v1, $v0
/* 16639C 80245B3C 00001812 */ mflo $v1
D_80245B40:
/* 1663A0 80245B40 82620002 */ lb $v0, 0x2($s3)
/* 1663A4 80245B44 00000000 */ nop
jtbl_80245B48:
/* 1663A8 80245B48 00A20018 */ mult $a1, $v0
/* 1663AC 80245B4C 00006012 */ mflo $t4
/* 1663B0 80245B50 006C1021 */ addu $v0, $v1, $t4
/* 1663B4 80245B54 00441021 */ addu $v0, $v0, $a0
/* 1663B8 80245B58 8E630008 */ lw $v1, 0x8($s3)
/* 1663BC 80245B5C 92640003 */ lbu $a0, 0x3($s3)
/* 1663C0 80245B60 00621821 */ addu $v1, $v1, $v0
.L80245B64:
/* 1663C4 80245B64 90620000 */ lbu $v0, 0x0($v1)
/* 1663C8 80245B68 1082FFE6 */ beq $a0, $v0, .L80245B04
D_80245B6C:
/* 1663CC 80245B6C 00000000 */ nop
.L80245B70:
/* 1663D0 80245B70 3C028025 */ lui $v0, %hi(D_8024C08C)
/* 1663D4 80245B74 8C42C08C */ lw $v0, %lo(D_8024C08C)($v0)
/* 1663D8 80245B78 3C030001 */ lui $v1, (0x10000 >> 16)
/* 1663DC 80245B7C 00431024 */ and $v0, $v0, $v1
/* 1663E0 80245B80 10400007 */ beqz $v0, D_80245BA0
/* 1663E4 80245B84 00000000 */ nop
/* 1663E8 80245B88 92620002 */ lbu $v0, 0x2($s3)
/* 1663EC 80245B8C 2442FFFF */ addiu $v0, $v0, -0x1
D_80245B90:
/* 1663F0 80245B90 A2620002 */ sb $v0, 0x2($s3)
/* 1663F4 80245B94 00021600 */ sll $v0, $v0, 24
D_80245B98:
/* 1663F8 80245B98 04420001 */ bltzl $v0, D_80245BA0
/* 1663FC 80245B9C A2600002 */ sb $zero, 0x2($s3)
D_80245BA0:
/* 166400 80245BA0 3C028025 */ lui $v0, %hi(D_8024C08C)
.L80245BA4:
/* 166404 80245BA4 8C42C08C */ lw $v0, %lo(D_8024C08C)($v0)
jtbl_80245BA8:
/* 166408 80245BA8 3C030002 */ lui $v1, (0x20000 >> 16)
.L80245BAC:
/* 16640C 80245BAC 00431024 */ and $v0, $v0, $v1
/* 166410 80245BB0 1040000C */ beqz $v0, .L80245BE4
.L80245BB4:
/* 166414 80245BB4 00000000 */ nop
/* 166418 80245BB8 92620002 */ lbu $v0, 0x2($s3)
/* 16641C 80245BBC 82630006 */ lb $v1, 0x6($s3)
D_80245BC0:
/* 166420 80245BC0 24420001 */ addiu $v0, $v0, 0x1
D_80245BC4:
/* 166424 80245BC4 A2620002 */ sb $v0, 0x2($s3)
/* 166428 80245BC8 00021600 */ sll $v0, $v0, 24
glabel func_80245BCC
/* 16642C 80245BCC 00021603 */ sra $v0, $v0, 24
D_80245BD0:
/* 166430 80245BD0 0043102A */ slt $v0, $v0, $v1
/* 166434 80245BD4 92630006 */ lbu $v1, 0x6($s3)
jtbl_80245BD8:
/* 166438 80245BD8 14400002 */ bnez $v0, .L80245BE4
.L80245BDC:
/* 16643C 80245BDC 2462FFFF */ addiu $v0, $v1, -0x1
/* 166440 80245BE0 A2620002 */ sb $v0, 0x2($s3)
.L80245BE4:
/* 166444 80245BE4 82630004 */ lb $v1, 0x4($s3)
/* 166448 80245BE8 2C620005 */ sltiu $v0, $v1, 0x5
/* 16644C 80245BEC 1040001F */ beqz $v0, .L80245C6C
D_80245BF0:
/* 166450 80245BF0 00031080 */ sll $v0, $v1, 2
D_80245BF4:
/* 166454 80245BF4 3C018025 */ lui $at, %hi(jtbl_8024BF88)
.L80245BF8:
/* 166458 80245BF8 00220821 */ addu $at, $at, $v0
/* 16645C 80245BFC 8C22BF88 */ lw $v0, %lo(jtbl_8024BF88)($at)
/* 166460 80245C00 00400008 */ jr $v0
D_80245C04:
/* 166464 80245C04 00000000 */ nop
.L80245C08:
/* 166468 80245C08 080916DC */ j .L80245B70
/* 16646C 80245C0C A2620001 */ sb $v0, 0x1($s3)
glabel .L80245C10
/* 166470 80245C10 82630001 */ lb $v1, 0x1($s3)
/* 166474 80245C14 24020001 */ addiu $v0, $zero, 0x1
.L80245C18:
/* 166478 80245C18 14620014 */ bne $v1, $v0, .L80245C6C
D_80245C1C:
/* 16647C 80245C1C 00000000 */ nop
/* 166480 80245C20 92620002 */ lbu $v0, 0x2($s3)
/* 166484 80245C24 2C420002 */ sltiu $v0, $v0, 0x2
/* 166488 80245C28 54400010 */ bnel $v0, $zero, .L80245C6C
/* 16648C 80245C2C A2600001 */ sb $zero, 0x1($s3)
D_80245C30:
/* 166490 80245C30 0809171B */ j .L80245C6C
/* 166494 80245C34 00000000 */ nop
glabel .L80245C38
/* 166498 80245C38 82630001 */ lb $v1, 0x1($s3)
D_80245C3C:
/* 16649C 80245C3C 24020001 */ addiu $v0, $zero, 0x1
.L80245C40:
/* 1664A0 80245C40 14620005 */ bne $v1, $v0, .L80245C58
/* 1664A4 80245C44 00000000 */ nop
D_80245C48:
/* 1664A8 80245C48 92620002 */ lbu $v0, 0x2($s3)
/* 1664AC 80245C4C 2C420002 */ sltiu $v0, $v0, 0x2
/* 1664B0 80245C50 54400001 */ bnel $v0, $zero, .L80245C58
/* 1664B4 80245C54 A2600001 */ sb $zero, 0x1($s3)
.L80245C58:
/* 1664B8 80245C58 82630002 */ lb $v1, 0x2($s3)
/* 1664BC 80245C5C 24020002 */ addiu $v0, $zero, 0x2
.L80245C60:
/* 1664C0 80245C60 14620002 */ bne $v1, $v0, .L80245C6C
/* 1664C4 80245C64 24020001 */ addiu $v0, $zero, 0x1
/* 1664C8 80245C68 A2620001 */ sb $v0, 0x1($s3)
.L80245C6C:
/* 1664CC 80245C6C 82620004 */ lb $v0, 0x4($s3)
jtbl_80245C70:
/* 1664D0 80245C70 82630005 */ lb $v1, 0x5($s3)
D_80245C74:
/* 1664D4 80245C74 00430018 */ mult $v0, $v1
D_80245C78:
/* 1664D8 80245C78 00006012 */ mflo $t4
/* 1664DC 80245C7C 82620006 */ lb $v0, 0x6($s3)
glabel func_80245C80
/* 1664E0 80245C80 00000000 */ nop
/* 1664E4 80245C84 01820018 */ mult $t4, $v0
.L80245C88:
/* 1664E8 80245C88 00002012 */ mflo $a0
.L80245C8C:
/* 1664EC 80245C8C 82620002 */ lb $v0, 0x2($s3)
/* 1664F0 80245C90 00000000 */ nop
/* 1664F4 80245C94 00620018 */ mult $v1, $v0
/* 1664F8 80245C98 00001812 */ mflo $v1
D_80245C9C:
/* 1664FC 80245C9C 00831821 */ addu $v1, $a0, $v1
D_80245CA0:
/* 166500 80245CA0 82640001 */ lb $a0, 0x1($s3)
/* 166504 80245CA4 8E620008 */ lw $v0, 0x8($s3)
/* 166508 80245CA8 00641821 */ addu $v1, $v1, $a0
.L80245CAC:
/* 16650C 80245CAC 00431021 */ addu $v0, $v0, $v1
/* 166510 80245CB0 90420000 */ lbu $v0, 0x0($v0)
D_80245CB4:
/* 166514 80245CB4 A2620003 */ sb $v0, 0x3($s3)
/* 166518 80245CB8 304200FF */ andi $v0, $v0, 0xFF
/* 16651C 80245CBC 10E20003 */ beq $a3, $v0, .L80245CCC
/* 166520 80245CC0 00000000 */ nop
/* 166524 80245CC4 0C05272D */ jal sfx_play_sound
/* 166528 80245CC8 24042101 */ addiu $a0, $zero, 0x2101
.L80245CCC:
/* 16652C 80245CCC 82620004 */ lb $v0, 0x4($s3)
/* 166530 80245CD0 14400022 */ bnez $v0, .L80245D5C
.L80245CD4:
/* 166534 80245CD4 00000000 */ nop
D_80245CD8:
/* 166538 80245CD8 3C108007 */ lui $s0, %hi(gGameStatusPtr)
/* 16653C 80245CDC 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr)
jtbl_80245CE0:
/* 166540 80245CE0 3C058025 */ lui $a1, %hi(D_8024C084)
/* 166544 80245CE4 24A5C084 */ addiu $a1, $a1, %lo(D_8024C084)
/* 166548 80245CE8 8CA20000 */ lw $v0, 0x0($a1)
D_80245CEC:
/* 16654C 80245CEC 8E030000 */ lw $v1, 0x0($s0)
D_80245CF0:
/* 166550 80245CF0 30422000 */ andi $v0, $v0, 0x2000
glabel func_80245CF4
/* 166554 80245CF4 906400AB */ lbu $a0, 0xAB($v1)
jtbl_80245CF8:
/* 166558 80245CF8 10400002 */ beqz $v0, .L80245D04
/* 16655C 80245CFC 24020001 */ addiu $v0, $zero, 0x1
/* 166560 80245D00 A06200AB */ sb $v0, 0xAB($v1)
.L80245D04:
/* 166564 80245D04 8CA20000 */ lw $v0, 0x0($a1)
/* 166568 80245D08 30420010 */ andi $v0, $v0, 0x10
D_80245D0C:
/* 16656C 80245D0C 10400003 */ beqz $v0, .L80245D1C
/* 166570 80245D10 00000000 */ nop
/* 166574 80245D14 8E020000 */ lw $v0, 0x0($s0)
/* 166578 80245D18 A04000AB */ sb $zero, 0xAB($v0)
.L80245D1C:
/* 16657C 80245D1C 8E020000 */ lw $v0, 0x0($s0)
/* 166580 80245D20 904200AB */ lbu $v0, 0xAB($v0)
D_80245D24:
/* 166584 80245D24 1082000D */ beq $a0, $v0, .L80245D5C
D_80245D28:
/* 166588 80245D28 00000000 */ nop
/* 16658C 80245D2C 0C05272D */ jal sfx_play_sound
D_80245D30:
/* 166590 80245D30 240400C8 */ addiu $a0, $zero, 0xC8
D_80245D34:
/* 166594 80245D34 8E020000 */ lw $v0, 0x0($s0)
D_80245D38:
/* 166598 80245D38 904200AB */ lbu $v0, 0xAB($v0)
.L80245D3C:
/* 16659C 80245D3C 10400005 */ beqz $v0, .L80245D54
D_80245D40:
/* 1665A0 80245D40 00000000 */ nop
/* 1665A4 80245D44 0C015857 */ jal audio_set_stereo
D_80245D48:
/* 1665A8 80245D48 00000000 */ nop
/* 1665AC 80245D4C 08091757 */ j .L80245D5C
D_80245D50:
/* 1665B0 80245D50 00000000 */ nop
.L80245D54:
/* 1665B4 80245D54 0C015860 */ jal audio_set_mono
D_80245D58:
/* 1665B8 80245D58 00000000 */ nop
.L80245D5C:
/* 1665BC 80245D5C 3C038025 */ lui $v1, %hi(D_8024C084)
D_80245D60:
/* 1665C0 80245D60 2463C084 */ addiu $v1, $v1, %lo(D_8024C084)
/* 1665C4 80245D64 8C620000 */ lw $v0, 0x0($v1)
jtbl_80245D68:
/* 1665C8 80245D68 30421000 */ andi $v0, $v0, 0x1000
glabel func_80245D6C
/* 1665CC 80245D6C 10400009 */ beqz $v0, .L80245D94
D_80245D70:
/* 1665D0 80245D70 00000000 */ nop
/* 1665D4 80245D74 82620004 */ lb $v0, 0x4($s3)
D_80245D78:
/* 1665D8 80245D78 14400006 */ bnez $v0, .L80245D94
/* 1665DC 80245D7C 00000000 */ nop
D_80245D80:
/* 1665E0 80245D80 92620003 */ lbu $v0, 0x3($s3)
/* 1665E4 80245D84 2C420004 */ sltiu $v0, $v0, 0x4
D_80245D88:
/* 1665E8 80245D88 10400002 */ beqz $v0, .L80245D94
/* 1665EC 80245D8C 34028000 */ ori $v0, $zero, 0x8000
D_80245D90:
/* 1665F0 80245D90 AC620000 */ sw $v0, 0x0($v1)
.L80245D94:
/* 1665F4 80245D94 3C028025 */ lui $v0, %hi(D_8024C084)
D_80245D98:
/* 1665F8 80245D98 8C42C084 */ lw $v0, %lo(D_8024C084)($v0)
/* 1665FC 80245D9C 30428000 */ andi $v0, $v0, 0x8000
jtbl_80245DA0:
/* 166600 80245DA0 104002D1 */ beqz $v0, .L802468E8
/* 166604 80245DA4 00000000 */ nop
.L80245DA8:
/* 166608 80245DA8 82630004 */ lb $v1, 0x4($s3)
/* 16660C 80245DAC 2C620005 */ sltiu $v0, $v1, 0x5
D_80245DB0:
/* 166610 80245DB0 104002CD */ beqz $v0, .L802468E8
/* 166614 80245DB4 0000202D */ daddu $a0, $zero, $zero
/* 166618 80245DB8 00031080 */ sll $v0, $v1, 2
/* 16661C 80245DBC 3C018025 */ lui $at, %hi(jtbl_8024BFA0)
D_80245DC0:
/* 166620 80245DC0 00220821 */ addu $at, $at, $v0
.L80245DC4:
/* 166624 80245DC4 8C22BFA0 */ lw $v0, %lo(jtbl_8024BFA0)($at)
/* 166628 80245DC8 00400008 */ jr $v0
/* 16662C 80245DCC 00000000 */ nop
glabel .L80245DD0
/* 166630 80245DD0 92620003 */ lbu $v0, 0x3($s3)
D_80245DD4:
/* 166634 80245DD4 2C420004 */ sltiu $v0, $v0, 0x4
/* 166638 80245DD8 10400007 */ beqz $v0, .L80245DF8
/* 16663C 80245DDC 00000000 */ nop
D_80245DE0:
/* 166640 80245DE0 92620003 */ lbu $v0, 0x3($s3)
D_80245DE4:
/* 166644 80245DE4 3C018007 */ lui $at, %hi(gSaveSlotHasData)
/* 166648 80245DE8 00220821 */ addu $at, $at, $v0
/* 16664C 80245DEC 90227A24 */ lbu $v0, %lo(gSaveSlotHasData)($at)
/* 166650 80245DF0 50400001 */ beql $v0, $zero, .L80245DF8
/* 166654 80245DF4 24040001 */ addiu $a0, $zero, 0x1
.L80245DF8:
/* 166658 80245DF8 10800040 */ beqz $a0, .L80245EFC
/* 16665C 80245DFC 240400F7 */ addiu $a0, $zero, 0xF7
D_80245E00:
/* 166660 80245E00 24030007 */ addiu $v1, $zero, 0x7
/* 166664 80245E04 3C028025 */ lui $v0, %hi(D_8024C117)
/* 166668 80245E08 2442C117 */ addiu $v0, $v0, %lo(D_8024C117)
.L80245E0C:
/* 16666C 80245E0C A0440000 */ sb $a0, 0x0($v0)
/* 166670 80245E10 2463FFFF */ addiu $v1, $v1, -0x1
/* 166674 80245E14 0461FFFD */ bgez $v1, .L80245E0C
/* 166678 80245E18 2442FFFF */ addiu $v0, $v0, -0x1
/* 16667C 80245E1C 24040030 */ addiu $a0, $zero, 0x30
.L80245E20:
/* 166680 80245E20 3C108024 */ lui $s0, %hi(func_80243380)
D_80245E24:
/* 166684 80245E24 26103380 */ addiu $s0, $s0, %lo(func_80243380)
/* 166688 80245E28 3C018025 */ lui $at, %hi(D_8024C090)
flo_00_pad_5E2C:
/* 16668C 80245E2C A020C090 */ sb $zero, %lo(D_8024C090)($at)
D_80245E30:
/* 166690 80245E30 0C051F9F */ jal set_window_update
/* 166694 80245E34 0200282D */ daddu $a1, $s0, $zero
/* 166698 80245E38 24040031 */ addiu $a0, $zero, 0x31
/* 16669C 80245E3C 0C051F9F */ jal set_window_update
.L80245E40:
/* 1666A0 80245E40 0200282D */ daddu $a1, $s0, $zero
D_80245E44:
/* 1666A4 80245E44 2404002D */ addiu $a0, $zero, 0x2D
/* 1666A8 80245E48 3C108024 */ lui $s0, %hi(D_80243898)
/* 1666AC 80245E4C 26103898 */ addiu $s0, $s0, %lo(D_80243898)
.L80245E50:
/* 1666B0 80245E50 0C051F9F */ jal set_window_update
/* 1666B4 80245E54 0200282D */ daddu $a1, $s0, $zero
D_80245E58:
/* 1666B8 80245E58 24040033 */ addiu $a0, $zero, 0x33
D_80245E5C:
/* 1666BC 80245E5C 0C051F9F */ jal set_window_update
/* 1666C0 80245E60 0200282D */ daddu $a1, $s0, $zero
D_80245E64:
/* 1666C4 80245E64 24040034 */ addiu $a0, $zero, 0x34
.L80245E68:
/* 1666C8 80245E68 0C051F9F */ jal set_window_update
D_80245E6C:
/* 1666CC 80245E6C 0200282D */ daddu $a1, $s0, $zero
/* 1666D0 80245E70 24040035 */ addiu $a0, $zero, 0x35
/* 1666D4 80245E74 0C051F9F */ jal set_window_update
/* 1666D8 80245E78 0200282D */ daddu $a1, $s0, $zero
/* 1666DC 80245E7C 24040036 */ addiu $a0, $zero, 0x36
D_80245E80:
/* 1666E0 80245E80 0C051F9F */ jal set_window_update
D_80245E84:
/* 1666E4 80245E84 0200282D */ daddu $a1, $s0, $zero
D_80245E88:
/* 1666E8 80245E88 24040037 */ addiu $a0, $zero, 0x37
.L80245E8C:
/* 1666EC 80245E8C 0C051F9F */ jal set_window_update
/* 1666F0 80245E90 0200282D */ daddu $a1, $s0, $zero
/* 1666F4 80245E94 24040035 */ addiu $a0, $zero, 0x35
D_80245E98:
/* 1666F8 80245E98 0C051F9F */ jal set_window_update
glabel func_80245E9C
/* 1666FC 80245E9C 0200282D */ daddu $a1, $s0, $zero
/* 166700 80245EA0 24040038 */ addiu $a0, $zero, 0x38
/* 166704 80245EA4 0C051F9F */ jal set_window_update
/* 166708 80245EA8 0200282D */ daddu $a1, $s0, $zero
/* 16670C 80245EAC 24040039 */ addiu $a0, $zero, 0x39
/* 166710 80245EB0 0C051F9F */ jal set_window_update
/* 166714 80245EB4 0200282D */ daddu $a1, $s0, $zero
D_80245EB8:
/* 166718 80245EB8 2404003A */ addiu $a0, $zero, 0x3A
/* 16671C 80245EBC 0C051F9F */ jal set_window_update
.L80245EC0:
/* 166720 80245EC0 0200282D */ daddu $a1, $s0, $zero
/* 166724 80245EC4 2404003B */ addiu $a0, $zero, 0x3B
/* 166728 80245EC8 0C051F9F */ jal set_window_update
/* 16672C 80245ECC 0200282D */ daddu $a1, $s0, $zero
/* 166730 80245ED0 0C05272D */ jal sfx_play_sound
/* 166734 80245ED4 240400C9 */ addiu $a0, $zero, 0xC9
/* 166738 80245ED8 0000282D */ daddu $a1, $zero, $zero
D_80245EDC:
/* 16673C 80245EDC 00A0302D */ daddu $a2, $a1, $zero
D_80245EE0:
/* 166740 80245EE0 3C048025 */ lui $a0, %hi(D_80249B90)
/* 166744 80245EE4 8C849B90 */ lw $a0, %lo(D_80249B90)($a0)
jtbl_80245EE8:
/* 166748 80245EE8 24020003 */ addiu $v0, $zero, 0x3
D_80245EEC:
/* 16674C 80245EEC 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 166750 80245EF0 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 166754 80245EF4 08091A38 */ j .L802468E0
.L80245EF8:
/* 166758 80245EF8 A0800004 */ sb $zero, 0x4($a0)
.L80245EFC:
/* 16675C 80245EFC 92630003 */ lbu $v1, 0x3($s3)
/* 166760 80245F00 24020006 */ addiu $v0, $zero, 0x6
/* 166764 80245F04 1462002C */ bne $v1, $v0, .L80245FB8
D_80245F08:
/* 166768 80245F08 24020004 */ addiu $v0, $zero, 0x4
/* 16676C 80245F0C 24040033 */ addiu $a0, $zero, 0x33
D_80245F10:
/* 166770 80245F10 3C128024 */ lui $s2, %hi(D_8024368C)
/* 166774 80245F14 2652368C */ addiu $s2, $s2, %lo(D_8024368C)
D_80245F18:
/* 166778 80245F18 0C051F9F */ jal set_window_update
/* 16677C 80245F1C 0240282D */ daddu $a1, $s2, $zero
D_80245F20:
/* 166780 80245F20 24040034 */ addiu $a0, $zero, 0x34
/* 166784 80245F24 3C118024 */ lui $s1, %hi(func_802436F0)
.L80245F28:
/* 166788 80245F28 263136F0 */ addiu $s1, $s1, %lo(func_802436F0)
.L80245F2C:
/* 16678C 80245F2C 0C051F9F */ jal set_window_update
D_80245F30:
/* 166790 80245F30 0220282D */ daddu $a1, $s1, $zero
/* 166794 80245F34 24040035 */ addiu $a0, $zero, 0x35
D_80245F38:
/* 166798 80245F38 3C108024 */ lui $s0, %hi(dead_flo_16_SuperBlock_UpgradeOrbAngles)
/* 16679C 80245F3C 261037B8 */ addiu $s0, $s0, %lo(dead_flo_16_SuperBlock_UpgradeOrbAngles)
D_80245F40:
/* 1667A0 80245F40 0C051F9F */ jal set_window_update
D_80245F44:
/* 1667A4 80245F44 0200282D */ daddu $a1, $s0, $zero
D_80245F48:
/* 1667A8 80245F48 24040036 */ addiu $a0, $zero, 0x36
D_80245F4C:
/* 1667AC 80245F4C 0C051F9F */ jal set_window_update
jtbl_80245F50:
/* 1667B0 80245F50 0200282D */ daddu $a1, $s0, $zero
/* 1667B4 80245F54 24040037 */ addiu $a0, $zero, 0x37
/* 1667B8 80245F58 0C051F9F */ jal set_window_update
D_80245F5C:
/* 1667BC 80245F5C 0200282D */ daddu $a1, $s0, $zero
D_80245F60:
/* 1667C0 80245F60 24040038 */ addiu $a0, $zero, 0x38
/* 1667C4 80245F64 0C051F9F */ jal set_window_update
.L80245F68:
/* 1667C8 80245F68 0240282D */ daddu $a1, $s2, $zero
/* 1667CC 80245F6C 24040039 */ addiu $a0, $zero, 0x39
/* 1667D0 80245F70 0C051F9F */ jal set_window_update
.L80245F74:
/* 1667D4 80245F74 0220282D */ daddu $a1, $s1, $zero
.L80245F78:
/* 1667D8 80245F78 2404003A */ addiu $a0, $zero, 0x3A
/* 1667DC 80245F7C 0C051F9F */ jal set_window_update
/* 1667E0 80245F80 0240282D */ daddu $a1, $s2, $zero
/* 1667E4 80245F84 2404003B */ addiu $a0, $zero, 0x3B
/* 1667E8 80245F88 0C051F9F */ jal set_window_update
D_80245F8C:
/* 1667EC 80245F8C 0220282D */ daddu $a1, $s1, $zero
/* 1667F0 80245F90 3C058024 */ lui $a1, %hi(func_80243754)
/* 1667F4 80245F94 24A53754 */ addiu $a1, $a1, %lo(func_80243754)
.L80245F98:
/* 1667F8 80245F98 0C051F9F */ jal set_window_update
.L80245F9C:
/* 1667FC 80245F9C 2404002D */ addiu $a0, $zero, 0x2D
.L80245FA0:
/* 166800 80245FA0 0C05272D */ jal sfx_play_sound
/* 166804 80245FA4 240400D6 */ addiu $a0, $zero, 0xD6
D_80245FA8:
/* 166808 80245FA8 0C00CD3C */ jal set_game_mode
/* 16680C 80245FAC 2404000F */ addiu $a0, $zero, 0xF
.L80245FB0:
/* 166810 80245FB0 08091A3A */ j .L802468E8
/* 166814 80245FB4 00000000 */ nop
.L80245FB8:
/* 166818 80245FB8 14620005 */ bne $v1, $v0, .L80245FD0
glabel func_80245FBC
/* 16681C 80245FBC 24020005 */ addiu $v0, $zero, 0x5
/* 166820 80245FC0 0C05272D */ jal sfx_play_sound
/* 166824 80245FC4 240400C9 */ addiu $a0, $zero, 0xC9
/* 166828 80245FC8 080917F9 */ j .L80245FE4
D_80245FCC:
/* 16682C 80245FCC 24020001 */ addiu $v0, $zero, 0x1
.L80245FD0:
/* 166830 80245FD0 1462001B */ bne $v1, $v0, .L80246040
/* 166834 80245FD4 2C620004 */ sltiu $v0, $v1, 0x4
/* 166838 80245FD8 0C05272D */ jal sfx_play_sound
/* 16683C 80245FDC 240400C9 */ addiu $a0, $zero, 0xC9
/* 166840 80245FE0 24020003 */ addiu $v0, $zero, 0x3
.L80245FE4:
/* 166844 80245FE4 A2620004 */ sb $v0, 0x4($s3)
D_80245FE8:
/* 166848 80245FE8 0260202D */ daddu $a0, $s3, $zero
/* 16684C 80245FEC 24050001 */ addiu $a1, $zero, 0x1
.L80245FF0:
/* 166850 80245FF0 0C090B65 */ jal func_80242D94
/* 166854 80245FF4 24060002 */ addiu $a2, $zero, 0x2
/* 166858 80245FF8 3C058024 */ lui $a1, %hi(D_8024368C)
/* 16685C 80245FFC 24A5368C */ addiu $a1, $a1, %lo(D_8024368C)
/* 166860 80246000 0C051F9F */ jal set_window_update
/* 166864 80246004 24040033 */ addiu $a0, $zero, 0x33
/* 166868 80246008 3C058024 */ lui $a1, %hi(func_802436F0)
.L8024600C:
/* 16686C 8024600C 24A536F0 */ addiu $a1, $a1, %lo(func_802436F0)
.L80246010:
/* 166870 80246010 0C051F9F */ jal set_window_update
/* 166874 80246014 24040034 */ addiu $a0, $zero, 0x34
/* 166878 80246018 24040035 */ addiu $a0, $zero, 0x35
/* 16687C 8024601C 3C108024 */ lui $s0, %hi(dead_flo_16_SuperBlock_UpgradeOrbAngles)
D_80246020:
/* 166880 80246020 261037B8 */ addiu $s0, $s0, %lo(dead_flo_16_SuperBlock_UpgradeOrbAngles)
glabel func_80246024
/* 166884 80246024 0C051F9F */ jal set_window_update
/* 166888 80246028 0200282D */ daddu $a1, $s0, $zero
/* 16688C 8024602C 24040037 */ addiu $a0, $zero, 0x37
/* 166890 80246030 0C051F9F */ jal set_window_update
/* 166894 80246034 0200282D */ daddu $a1, $s0, $zero
D_80246038:
/* 166898 80246038 08091A3A */ j .L802468E8
D_8024603C:
/* 16689C 8024603C 00000000 */ nop
.L80246040:
/* 1668A0 80246040 10400229 */ beqz $v0, .L802468E8
/* 1668A4 80246044 00000000 */ nop
/* 1668A8 80246048 0C05272D */ jal sfx_play_sound
/* 1668AC 8024604C 240400C9 */ addiu $a0, $zero, 0xC9
/* 1668B0 80246050 2404002D */ addiu $a0, $zero, 0x2D
/* 1668B4 80246054 3C108024 */ lui $s0, %hi(D_80243898)
/* 1668B8 80246058 26103898 */ addiu $s0, $s0, %lo(D_80243898)
.L8024605C:
/* 1668BC 8024605C 0C051F9F */ jal set_window_update
.L80246060:
/* 1668C0 80246060 0200282D */ daddu $a1, $s0, $zero
/* 1668C4 80246064 24040033 */ addiu $a0, $zero, 0x33
D_80246068:
/* 1668C8 80246068 0C051F9F */ jal set_window_update
/* 1668CC 8024606C 0200282D */ daddu $a1, $s0, $zero
.L80246070:
/* 1668D0 80246070 24040034 */ addiu $a0, $zero, 0x34
/* 1668D4 80246074 0C051F9F */ jal set_window_update
/* 1668D8 80246078 0200282D */ daddu $a1, $s0, $zero
/* 1668DC 8024607C 24040035 */ addiu $a0, $zero, 0x35
/* 1668E0 80246080 0C051F9F */ jal set_window_update
/* 1668E4 80246084 0200282D */ daddu $a1, $s0, $zero
/* 1668E8 80246088 24040036 */ addiu $a0, $zero, 0x36
/* 1668EC 8024608C 0C051F9F */ jal set_window_update
D_80246090:
/* 1668F0 80246090 0200282D */ daddu $a1, $s0, $zero
D_80246094:
/* 1668F4 80246094 24040037 */ addiu $a0, $zero, 0x37
/* 1668F8 80246098 0C051F9F */ jal set_window_update
.L8024609C:
/* 1668FC 8024609C 0200282D */ daddu $a1, $s0, $zero
.L802460A0:
/* 166900 802460A0 24040035 */ addiu $a0, $zero, 0x35
/* 166904 802460A4 0C051F9F */ jal set_window_update
/* 166908 802460A8 0200282D */ daddu $a1, $s0, $zero
.L802460AC:
/* 16690C 802460AC 24040038 */ addiu $a0, $zero, 0x38
/* 166910 802460B0 0C051F9F */ jal set_window_update
/* 166914 802460B4 0200282D */ daddu $a1, $s0, $zero
/* 166918 802460B8 24040039 */ addiu $a0, $zero, 0x39
.L802460BC:
/* 16691C 802460BC 0C051F9F */ jal set_window_update
/* 166920 802460C0 0200282D */ daddu $a1, $s0, $zero
/* 166924 802460C4 2404003A */ addiu $a0, $zero, 0x3A
/* 166928 802460C8 0C051F9F */ jal set_window_update
/* 16692C 802460CC 0200282D */ daddu $a1, $s0, $zero
.L802460D0:
/* 166930 802460D0 2404003B */ addiu $a0, $zero, 0x3B
/* 166934 802460D4 0C051F9F */ jal set_window_update
/* 166938 802460D8 0200282D */ daddu $a1, $s0, $zero
/* 16693C 802460DC 92640003 */ lbu $a0, 0x3($s3)
jtbl_802460E0:
/* 166940 802460E0 3C058024 */ lui $a1, %hi(func_80243908)
glabel func_802460E4
/* 166944 802460E4 24A53908 */ addiu $a1, $a1, %lo(func_80243908)
/* 166948 802460E8 0C051F9F */ jal set_window_update
D_802460EC:
/* 16694C 802460EC 24840038 */ addiu $a0, $a0, 0x38
/* 166950 802460F0 0C05272D */ jal sfx_play_sound
/* 166954 802460F4 240400C9 */ addiu $a0, $zero, 0xC9
/* 166958 802460F8 24040032 */ addiu $a0, $zero, 0x32
/* 16695C 802460FC 0C051F9F */ jal set_window_update
/* 166960 80246100 24050001 */ addiu $a1, $zero, 0x1
.L80246104:
/* 166964 80246104 3C048016 */ lui $a0, %hi(gWindows)
D_80246108:
/* 166968 80246108 24849D50 */ addiu $a0, $a0, %lo(gWindows)
/* 16696C 8024610C 2402008F */ addiu $v0, $zero, 0x8F
/* 166970 80246110 A482064E */ sh $v0, 0x64E($a0)
/* 166974 80246114 24020045 */ addiu $v0, $zero, 0x45
/* 166978 80246118 A4820650 */ sh $v0, 0x650($a0)
/* 16697C 8024611C 2402002C */ addiu $v0, $zero, 0x2C
.L80246120:
/* 166980 80246120 80830643 */ lb $v1, 0x643($a0)
/* 166984 80246124 A4820652 */ sh $v0, 0x652($a0)
/* 166988 80246128 2402FFFF */ addiu $v0, $zero, -0x1
/* 16698C 8024612C 1062000B */ beq $v1, $v0, .L8024615C
jtbl_80246130:
/* 166990 80246130 2485064C */ addiu $a1, $a0, 0x64C
/* 166994 80246134 00031140 */ sll $v0, $v1, 5
.L80246138:
/* 166998 80246138 00441021 */ addu $v0, $v0, $a0
/* 16699C 8024613C 94420010 */ lhu $v0, 0x10($v0)
D_80246140:
/* 1669A0 80246140 00021400 */ sll $v0, $v0, 16
.L80246144:
/* 1669A4 80246144 00021C03 */ sra $v1, $v0, 16
/* 1669A8 80246148 000217C2 */ srl $v0, $v0, 31
/* 1669AC 8024614C 00621821 */ addu $v1, $v1, $v0
D_80246150:
/* 1669B0 80246150 00031843 */ sra $v1, $v1, 1
/* 1669B4 80246154 0809185A */ j .L80246168
/* 1669B8 80246158 2463FFDE */ addiu $v1, $v1, -0x22
.L8024615C:
/* 1669BC 8024615C 2403007E */ addiu $v1, $zero, 0x7E
jtbl_80246160:
/* 1669C0 80246160 3C048016 */ lui $a0, %hi(gWindows)
/* 1669C4 80246164 24849D50 */ addiu $a0, $a0, %lo(gWindows)
.L80246168:
/* 1669C8 80246168 2402FFE3 */ addiu $v0, $zero, -0x1D
/* 1669CC 8024616C A4A30000 */ sh $v1, 0x0($a1)
D_80246170:
/* 1669D0 80246170 A48205CE */ sh $v0, 0x5CE($a0)
/* 1669D4 80246174 240200C0 */ addiu $v0, $zero, 0xC0
.L80246178:
/* 1669D8 80246178 A48205D0 */ sh $v0, 0x5D0($a0)
/* 1669DC 8024617C 24020019 */ addiu $v0, $zero, 0x19
/* 1669E0 80246180 808305C3 */ lb $v1, 0x5C3($a0)
D_80246184:
/* 1669E4 80246184 A48205D2 */ sh $v0, 0x5D2($a0)
/* 1669E8 80246188 2402FFFF */ addiu $v0, $zero, -0x1
.L8024618C:
/* 1669EC 8024618C 1062000B */ beq $v1, $v0, .L802461BC
/* 1669F0 80246190 248705CC */ addiu $a3, $a0, 0x5CC
glabel .L80246194
/* 1669F4 80246194 00031140 */ sll $v0, $v1, 5
.L80246198:
/* 1669F8 80246198 00441021 */ addu $v0, $v0, $a0
glabel .L8024619C
/* 1669FC 8024619C 94420010 */ lhu $v0, 0x10($v0)
.L802461A0:
/* 166A00 802461A0 00021400 */ sll $v0, $v0, 16
glabel .L802461A4
/* 166A04 802461A4 00021C03 */ sra $v1, $v0, 16
/* 166A08 802461A8 000217C2 */ srl $v0, $v0, 31
glabel .L802461AC
/* 166A0C 802461AC 00621821 */ addu $v1, $v1, $v0
jtbl_802461B0:
/* 166A10 802461B0 00031843 */ sra $v1, $v1, 1
D_802461B4:
/* 166A14 802461B4 08091870 */ j D_802461C0
/* 166A18 802461B8 2463FFA0 */ addiu $v1, $v1, -0x60
glabel .L802461BC
/* 166A1C 802461BC 24030040 */ addiu $v1, $zero, 0x40
D_802461C0:
/* 166A20 802461C0 0000282D */ daddu $a1, $zero, $zero
glabel .L802461C4
/* 166A24 802461C4 00A0302D */ daddu $a2, $a1, $zero
/* 166A28 802461C8 A4E30000 */ sh $v1, 0x0($a3)
glabel .L802461CC
/* 166A2C 802461CC 3C048025 */ lui $a0, %hi(D_80249B88)
/* 166A30 802461D0 8C849B88 */ lw $a0, %lo(D_80249B88)($a0)
.L802461D4:
/* 166A34 802461D4 24020001 */ addiu $v0, $zero, 0x1
/* 166A38 802461D8 3C018025 */ lui $at, %hi(D_8024C098_C09918)
.L802461DC:
/* 166A3C 802461DC A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 166A40 802461E0 08091A37 */ j .L802468DC
D_802461E4:
/* 166A44 802461E4 24020004 */ addiu $v0, $zero, 0x4
glabel .L802461E8
/* 166A48 802461E8 92630003 */ lbu $v1, 0x3($s3)
/* 166A4C 802461EC 24020006 */ addiu $v0, $zero, 0x6
kkj_19_D_802461F0:
/* 166A50 802461F0 14620018 */ bne $v1, $v0, .L80246254
D_802461F4:
/* 166A54 802461F4 2C620004 */ sltiu $v0, $v1, 0x4
/* 166A58 802461F8 0C05272D */ jal sfx_play_sound
/* 166A5C 802461FC 240400C9 */ addiu $a0, $zero, 0xC9
.L80246200:
/* 166A60 80246200 A2600004 */ sb $zero, 0x4($s3)
/* 166A64 80246204 3C058024 */ lui $a1, %hi(func_802433F4)
/* 166A68 80246208 24A533F4 */ addiu $a1, $a1, %lo(func_802433F4)
.L8024620C:
/* 166A6C 8024620C 0C051F9F */ jal set_window_update
D_80246210:
/* 166A70 80246210 24040033 */ addiu $a0, $zero, 0x33
.L80246214:
/* 166A74 80246214 3C058024 */ lui $a1, %hi(func_80243468)
/* 166A78 80246218 24A53468 */ addiu $a1, $a1, %lo(func_80243468)
/* 166A7C 8024621C 0C051F9F */ jal set_window_update
/* 166A80 80246220 24040034 */ addiu $a0, $zero, 0x34
D_80246224:
/* 166A84 80246224 24040035 */ addiu $a0, $zero, 0x35
/* 166A88 80246228 3C108024 */ lui $s0, %hi(D_802434DC)
/* 166A8C 8024622C 261034DC */ addiu $s0, $s0, %lo(D_802434DC)
.L80246230:
/* 166A90 80246230 0C051F9F */ jal set_window_update
/* 166A94 80246234 0200282D */ daddu $a1, $s0, $zero
/* 166A98 80246238 24040037 */ addiu $a0, $zero, 0x37
/* 166A9C 8024623C 0C051F9F */ jal set_window_update
.L80246240:
/* 166AA0 80246240 0200282D */ daddu $a1, $s0, $zero
/* 166AA4 80246244 0260202D */ daddu $a0, $s3, $zero
/* 166AA8 80246248 0000282D */ daddu $a1, $zero, $zero
/* 166AAC 8024624C 08091A38 */ j .L802468E0
/* 166AB0 80246250 24060002 */ addiu $a2, $zero, 0x2
.L80246254:
/* 166AB4 80246254 104001A4 */ beqz $v0, .L802468E8
/* 166AB8 80246258 00000000 */ nop
D_8024625C:
/* 166ABC 8024625C 92620003 */ lbu $v0, 0x3($s3)
hos_06_D_80246260:
/* 166AC0 80246260 3C018007 */ lui $at, %hi(gSaveSlotHasData)
D_80246264:
/* 166AC4 80246264 00220821 */ addu $at, $at, $v0
/* 166AC8 80246268 90227A24 */ lbu $v0, %lo(gSaveSlotHasData)($at)
D_8024626C:
/* 166ACC 8024626C 1040007F */ beqz $v0, .L8024646C
D_80246270:
/* 166AD0 80246270 00000000 */ nop
/* 166AD4 80246274 0C05272D */ jal sfx_play_sound
D_80246278:
/* 166AD8 80246278 240400C9 */ addiu $a0, $zero, 0xC9
/* 166ADC 8024627C 3C058024 */ lui $a1, %hi(func_80243CCC)
D_80246280:
/* 166AE0 80246280 24A53CCC */ addiu $a1, $a1, %lo(func_80243CCC)
.L80246284:
/* 166AE4 80246284 0C051F9F */ jal set_window_update
jtbl_80246288:
/* 166AE8 80246288 24040032 */ addiu $a0, $zero, 0x32
/* 166AEC 8024628C 3C048016 */ lui $a0, %hi(gWindows)
D_80246290:
/* 166AF0 80246290 24849D50 */ addiu $a0, $a0, %lo(gWindows)
/* 166AF4 80246294 24020079 */ addiu $v0, $zero, 0x79
.L80246298:
/* 166AF8 80246298 A482064E */ sh $v0, 0x64E($a0)
/* 166AFC 8024629C 24020045 */ addiu $v0, $zero, 0x45
/* 166B00 802462A0 A4820650 */ sh $v0, 0x650($a0)
D_802462A4:
/* 166B04 802462A4 2402002C */ addiu $v0, $zero, 0x2C
/* 166B08 802462A8 80830643 */ lb $v1, 0x643($a0)
/* 166B0C 802462AC A4820652 */ sh $v0, 0x652($a0)
/* 166B10 802462B0 2402FFFF */ addiu $v0, $zero, -0x1
/* 166B14 802462B4 1062000B */ beq $v1, $v0, D_802462E4
.L802462B8:
/* 166B18 802462B8 2485064C */ addiu $a1, $a0, 0x64C
/* 166B1C 802462BC 00031140 */ sll $v0, $v1, 5
flo_08_ItemChoiceList:
/* 166B20 802462C0 00441021 */ addu $v0, $v0, $a0
/* 166B24 802462C4 94420010 */ lhu $v0, 0x10($v0)
jtbl_802462C8:
/* 166B28 802462C8 00021400 */ sll $v0, $v0, 16
.L802462CC:
/* 166B2C 802462CC 00021C03 */ sra $v1, $v0, 16
D_802462D0:
/* 166B30 802462D0 000217C2 */ srl $v0, $v0, 31
/* 166B34 802462D4 00621821 */ addu $v1, $v1, $v0
glabel .L802462D8
/* 166B38 802462D8 00031843 */ sra $v1, $v1, 1
/* 166B3C 802462DC 080918BC */ j .L802462F0
D_802462E0:
/* 166B40 802462E0 2463FFDE */ addiu $v1, $v1, -0x22
D_802462E4:
/* 166B44 802462E4 2403007E */ addiu $v1, $zero, 0x7E
/* 166B48 802462E8 3C048016 */ lui $a0, %hi(gWindows)
/* 166B4C 802462EC 24849D50 */ addiu $a0, $a0, %lo(gWindows)
glabel .L802462F0
/* 166B50 802462F0 2402FFE3 */ addiu $v0, $zero, -0x1D
/* 166B54 802462F4 A4A30000 */ sh $v1, 0x0($a1)
/* 166B58 802462F8 A48205CE */ sh $v0, 0x5CE($a0)
/* 166B5C 802462FC 24020076 */ addiu $v0, $zero, 0x76
glabel D_80246300
/* 166B60 80246300 A48205D0 */ sh $v0, 0x5D0($a0)
.L80246304:
/* 166B64 80246304 24020019 */ addiu $v0, $zero, 0x19
/* 166B68 80246308 808305C3 */ lb $v1, 0x5C3($a0)
/* 166B6C 8024630C A48205D2 */ sh $v0, 0x5D2($a0)
D_80246310:
/* 166B70 80246310 2402FFFF */ addiu $v0, $zero, -0x1
/* 166B74 80246314 1062000B */ beq $v1, $v0, .L80246344
glabel .L80246318
/* 166B78 80246318 248705CC */ addiu $a3, $a0, 0x5CC
/* 166B7C 8024631C 00031140 */ sll $v0, $v1, 5
glabel .L80246320
/* 166B80 80246320 00441021 */ addu $v0, $v0, $a0
/* 166B84 80246324 94420010 */ lhu $v0, 0x10($v0)
glabel .L80246328
/* 166B88 80246328 00021400 */ sll $v0, $v0, 16
/* 166B8C 8024632C 00021C03 */ sra $v1, $v0, 16
glabel .L80246330
/* 166B90 80246330 000217C2 */ srl $v0, $v0, 31
/* 166B94 80246334 00621821 */ addu $v1, $v1, $v0
glabel .L80246338
/* 166B98 80246338 00031843 */ sra $v1, $v1, 1
/* 166B9C 8024633C 080918D2 */ j .L80246348
glabel .L80246340
/* 166BA0 80246340 2463FFC5 */ addiu $v1, $v1, -0x3B
.L80246344:
/* 166BA4 80246344 24030065 */ addiu $v1, $zero, 0x65
glabel .L80246348
/* 166BA8 80246348 0000282D */ daddu $a1, $zero, $zero
/* 166BAC 8024634C 24060001 */ addiu $a2, $zero, 0x1
D_80246350:
/* 166BB0 80246350 A4E30000 */ sh $v1, 0x0($a3)
/* 166BB4 80246354 3C048025 */ lui $a0, %hi(D_80249B88)
glabel .L80246358
/* 166BB8 80246358 8C849B88 */ lw $a0, %lo(D_80249B88)($a0)
/* 166BBC 8024635C 00C0102D */ daddu $v0, $a2, $zero
D_80246360:
/* 166BC0 80246360 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 166BC4 80246364 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
glabel .L80246368
/* 166BC8 80246368 08091A38 */ j .L802468E0
D_8024636C:
/* 166BCC 8024636C A0800004 */ sb $zero, 0x4($a0)
D_80246370:
/* 166BD0 80246370 92630003 */ lbu $v1, 0x3($s3)
/* 166BD4 80246374 24020006 */ addiu $v0, $zero, 0x6
D_80246378:
/* 166BD8 80246378 14620018 */ bne $v1, $v0, .L802463DC
/* 166BDC 8024637C 2C620004 */ sltiu $v0, $v1, 0x4
D_80246380:
/* 166BE0 80246380 0C05272D */ jal sfx_play_sound
/* 166BE4 80246384 240400C9 */ addiu $a0, $zero, 0xC9
/* 166BE8 80246388 A2600004 */ sb $zero, 0x4($s3)
.L8024638C:
/* 166BEC 8024638C 3C058024 */ lui $a1, %hi(func_802433F4)
D_80246390:
/* 166BF0 80246390 24A533F4 */ addiu $a1, $a1, %lo(func_802433F4)
/* 166BF4 80246394 0C051F9F */ jal set_window_update
D_80246398:
/* 166BF8 80246398 24040033 */ addiu $a0, $zero, 0x33
D_8024639C:
/* 166BFC 8024639C 3C058024 */ lui $a1, %hi(func_80243468)
D_802463A0:
/* 166C00 802463A0 24A53468 */ addiu $a1, $a1, %lo(func_80243468)
/* 166C04 802463A4 0C051F9F */ jal set_window_update
D_802463A8:
/* 166C08 802463A8 24040034 */ addiu $a0, $zero, 0x34
/* 166C0C 802463AC 24040035 */ addiu $a0, $zero, 0x35
D_802463B0:
/* 166C10 802463B0 3C108024 */ lui $s0, %hi(D_802434DC)
/* 166C14 802463B4 261034DC */ addiu $s0, $s0, %lo(D_802434DC)
glabel D_802463B8_kkj_19
/* 166C18 802463B8 0C051F9F */ jal set_window_update
/* 166C1C 802463BC 0200282D */ daddu $a1, $s0, $zero
D_802463C0:
/* 166C20 802463C0 24040037 */ addiu $a0, $zero, 0x37
/* 166C24 802463C4 0C051F9F */ jal set_window_update
D_802463C8:
/* 166C28 802463C8 0200282D */ daddu $a1, $s0, $zero
/* 166C2C 802463CC 0260202D */ daddu $a0, $s3, $zero
D_802463D0:
/* 166C30 802463D0 0000282D */ daddu $a1, $zero, $zero
/* 166C34 802463D4 08091A38 */ j .L802468E0
jtbl_802463D8:
/* 166C38 802463D8 24060001 */ addiu $a2, $zero, 0x1
.L802463DC:
/* 166C3C 802463DC 10400142 */ beqz $v0, .L802468E8
glabel func_802463E0
/* 166C40 802463E0 00000000 */ nop
.L802463E4:
/* 166C44 802463E4 92620003 */ lbu $v0, 0x3($s3)
D_802463E8:
/* 166C48 802463E8 3C018007 */ lui $at, %hi(gSaveSlotHasData)
/* 166C4C 802463EC 00220821 */ addu $at, $at, $v0
/* 166C50 802463F0 90227A24 */ lbu $v0, %lo(gSaveSlotHasData)($at)
/* 166C54 802463F4 1040001D */ beqz $v0, .L8024646C
/* 166C58 802463F8 00000000 */ nop
/* 166C5C 802463FC 0C05272D */ jal sfx_play_sound
/* 166C60 80246400 240400C9 */ addiu $a0, $zero, 0xC9
/* 166C64 80246404 92630003 */ lbu $v1, 0x3($s3)
/* 166C68 80246408 24020004 */ addiu $v0, $zero, 0x4
/* 166C6C 8024640C A2620004 */ sb $v0, 0x4($s3)
/* 166C70 80246410 3C018025 */ lui $at, %hi(D_8024C094)
.L80246414:
/* 166C74 80246414 AC23C094 */ sw $v1, %lo(D_8024C094)($at)
/* 166C78 80246418 08091A3A */ j .L802468E8
.L8024641C:
/* 166C7C 8024641C 00000000 */ nop
/* 166C80 80246420 92630003 */ lbu $v1, 0x3($s3)
D_80246424:
/* 166C84 80246424 24020006 */ addiu $v0, $zero, 0x6
/* 166C88 80246428 14620009 */ bne $v1, $v0, func_80246450
flo_08_D_802462C4_pad:
/* 166C8C 8024642C 2C620004 */ sltiu $v0, $v1, 0x4
### DECOMPILED C INSTRUCTIONS:
void filemenu_main_handle_input(MenuPanel* menu) {
s32 originalSelected = menu->selected;
s32 i;
if (filemenu_heldButtons & BUTTON_STICK_LEFT) {
while (TRUE) {
menu->col--;
if (menu->col < 0) {
menu->col = 0;
break;
}
if (menu->selected != MENU_PANEL_SELECTED_GRID_DATA(menu)) {
break;
}
}
}
if (filemenu_heldButtons & BUTTON_STICK_RIGHT) {
while (TRUE) {
menu->col++;
if (menu->col >= menu->numCols) {
menu->col = menu->numCols - 1;
break;
}
if (menu->selected != MENU_PANEL_SELECTED_GRID_DATA(menu)) {
break;
}
}
}
if (filemenu_heldButtons & BUTTON_STICK_UP) {
menu->row--;
if (menu->row < 0) {
menu->row = 0;
}
}
if (filemenu_heldButtons & BUTTON_STICK_DOWN) {
menu->row++;
if (menu->row >= menu->numRows) {
menu->row = menu->numRows - 1;
}
}
switch (menu->page) {
case 0:
if (menu->col == 1 && (u8) menu->row < 2) {
menu->col = 0;
}
break;
case 1: // TODO required to duplicate cases 1-4 instead of using fallthrough
if (menu->col == 1 && (u8) menu->row < 2) {
menu->col = 0;
}
if (menu->row == 2) {
menu->col = 1;
}
break;
case 2:
if (menu->col == 1 && (u8) menu->row < 2) {
menu->col = 0;
}
if (menu->row == 2) {
menu->col = 1;
}
break;
case 3:
if (menu->col == 1 && (u8) menu->row < 2) {
menu->col = 0;
}
if (menu->row == 2) {
menu->col = 1;
}
break;
case 4:
if (menu->col == 1 && (u8) menu->row < 2) {
menu->col = 0;
}
if (menu->row == 2) {
menu->col = 1;
}
break;
}
menu->selected = MENU_PANEL_SELECTED_GRID_DATA(menu);
if (originalSelected != menu->selected) {
sfx_play_sound(SOUND_2101);
}
if (menu->page == 0) {
s32 originalOutputMode = gGameStatusPtr->soundOutputMode;
if (filemenu_pressedButtons & BUTTON_Z) {
gGameStatusPtr->soundOutputMode = SOUND_OUT_STEREO;
}
if (filemenu_pressedButtons & BUTTON_R) {
gGameStatusPtr->soundOutputMode = SOUND_OUT_MONO;
}
if (originalOutputMode != gGameStatusPtr->soundOutputMode) {
sfx_play_sound(SOUND_MENU_CHANGE_TAB);
if (gGameStatusPtr->soundOutputMode != SOUND_OUT_MONO) {
audio_set_stereo();
} else {
audio_set_mono();
}
}
}
if ((filemenu_pressedButtons & BUTTON_START) && menu->page == 0 && menu->selected < 4) {
filemenu_pressedButtons = BUTTON_A;
}
if (filemenu_pressedButtons & BUTTON_A) {
s32 cond = FALSE;
switch (menu->page) {
case 0:
if (menu->selected < 4 && !gSaveSlotHasData[menu->selected]) {
cond = TRUE;
}
if (cond) {
MenuPanel* temp_a0;
for (i = 0; i < ARRAY_COUNT(filemenu_filename); i++) {
filemenu_filename[i] = 0xF7;
}
filemenu_filename_pos = 0;
set_window_update(WINDOW_ID_FILEMENU_CREATEFILE_HEADER, (s32)filemenu_update_show_name_input);
set_window_update(WINDOW_ID_FILEMENU_KEYBOARD, (s32)filemenu_update_show_name_input);
set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_hidden_with_rotation);
sfx_play_sound(SOUND_MENU_NEXT);
filemenu_currentMenu = 3;
temp_a0 = filemenu_menus[filemenu_currentMenu];
temp_a0->page = 0;
filemenu_set_selected(temp_a0, 0, 0);
break;
}
if (menu->selected == 6) {
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_hidden_options_left);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_hidden_options_right);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_options_bottom);
set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_hidden_options_bottom);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_hidden_options_bottom);
set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_hidden_options_left);
set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_hidden_options_right);
set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_hidden_options_left);
set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_hidden_options_right);
set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_hidden_title);
sfx_play_sound(SOUND_D6);
set_game_mode(GAME_MODE_END_FILE_SELECT);
} else if (menu->selected == 4) {
sfx_play_sound(SOUND_MENU_NEXT);
menu->page = 1;
filemenu_set_selected(menu, 1, 2);
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_hidden_options_left);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_hidden_options_right);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_options_bottom);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_hidden_options_bottom);
} else if (menu->selected == 5) {
sfx_play_sound(SOUND_MENU_NEXT);
menu->page = 3;
filemenu_set_selected(menu, 1, 2);
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_hidden_options_left);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_hidden_options_right);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_options_bottom);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_hidden_options_bottom);
} else if (menu->selected < 4) {
MenuPanel* temp_a0;
sfx_play_sound(SOUND_MENU_NEXT);
set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_hidden_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_hidden_with_rotation);
set_window_update(menu->selected + WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_select_file);
sfx_play_sound(SOUND_MENU_NEXT);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, WINDOW_UPDATE_SHOW);
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.y = 143;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width = 69;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].height = 44;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width / 2;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.y = -29;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = 192;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 25;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2;
filemenu_currentMenu = 1;
temp_a0 = filemenu_menus[filemenu_currentMenu];
temp_a0->page = 4;
filemenu_set_selected(temp_a0, 0, 0);
}
break;
case 1:
if (menu->selected == 6) {
sfx_play_sound(SOUND_MENU_NEXT);
menu->page = 0;
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_options_left);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_options_right);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_options_bottom);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom);
filemenu_set_selected(menu, 0, 2);
} else if (menu->selected < 4) {
if (gSaveSlotHasData[menu->selected]) {
MenuPanel* temp_a0;
sfx_play_sound(SOUND_MENU_NEXT);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_show_name_confirm);
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.y = 121;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width = 69;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].height = 44;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width / 2;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.y = -29;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = 118;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 25;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2;
filemenu_currentMenu = 1;
temp_a0 = filemenu_menus[filemenu_currentMenu];
temp_a0->page = 0;
filemenu_set_selected(temp_a0, 0, 1);
} else {
sfx_play_sound(SOUND_MENU_ERROR);
}
}
break;
case 3:
if (menu->selected == 6) {
sfx_play_sound(SOUND_MENU_NEXT);
menu->page = 0;
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_options_left);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_options_right);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_options_bottom);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom);
filemenu_set_selected(menu, 0, 1);
} else if (menu->selected < 4) {
if (gSaveSlotHasData[menu->selected]) {
sfx_play_sound(SOUND_MENU_NEXT);
menu->page = 4;
filemenu_loadedFileIdx = menu->selected;
} else {
sfx_play_sound(SOUND_MENU_ERROR);
}
}
break;
case 4:
if (menu->selected == 6) {
sfx_play_sound(SOUND_MENU_NEXT);
menu->page = 3;
filemenu_set_selected(menu, 0, 2);
} else if (menu->selected < 4) {
if (filemenu_loadedFileIdx == menu->selected) {
sfx_play_sound(SOUND_MENU_ERROR);
} else {
filemenu_iterFileIdx = menu->selected;
if (!gSaveSlotHasData[menu->selected]) {
sfx_play_sound(SOUND_MENU_NEXT);
filemenu_currentMenu = 2;
filemenu_menus[filemenu_currentMenu]->page = 2;
gWindows[WINDOW_ID_FILEMENU_INFO].width = 154;
gWindows[WINDOW_ID_FILEMENU_INFO].height = 39;
gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2;
gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2)
: SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2;
set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, WINDOW_UPDATE_HIDE);
fio_load_game(filemenu_loadedFileIdx);
gSaveSlotMetadata[filemenu_iterFileIdx] = gSaveSlotMetadata[filemenu_loadedFileIdx];
fio_save_game(filemenu_iterFileIdx);
gSaveSlotHasData[filemenu_iterFileIdx] = TRUE;
} else {
MenuPanel* temp_a0;
sfx_play_sound(SOUND_MENU_NEXT);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_show_name_confirm);
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.y = 121;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width = 69;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].height = 44;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width / 2;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.y = -43;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = 182;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 39;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2;
filemenu_currentMenu = 1;
temp_a0 = filemenu_menus[filemenu_currentMenu];
temp_a0->page = 3;
filemenu_set_selected(temp_a0, 0, 1);
}
}
}
break;
case 2:
if (menu->selected == 6) {
sfx_play_sound(SOUND_MENU_NEXT);
set_game_mode(GAME_MODE_END_LANGUAGE_SELECT);
} else if (menu->selected < 4) {
if (!gSaveSlotHasData[menu->selected]) {
sfx_play_sound(SOUND_MENU_NEXT);
filemenu_currentMenu = 2;
filemenu_menus[filemenu_currentMenu]->page = 1;
set_window_update(WINDOW_ID_FILEMENU_MAIN, (s32)main_menu_window_update);
set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, WINDOW_UPDATE_HIDE);
fio_save_game(menu->selected);
gSaveSlotHasData[menu->selected] = TRUE;
} else {
MenuPanel* temp_a0;
sfx_play_sound(SOUND_MENU_NEXT);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_show_name_confirm);
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.y = 127;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width = 69;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].height = 44;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width / 2;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.y = -50;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = 148;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 38;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2;
filemenu_currentMenu = 1;
temp_a0 = filemenu_menus[filemenu_currentMenu];
temp_a0->page = 1;
filemenu_set_selected(temp_a0, 0, 1);
}
}
break;
}
}
if (filemenu_pressedButtons & BUTTON_B) {
switch (menu->page) {
case 0:
filemenu_set_selected(menu, 2, 2);
break;
case 1:
filemenu_set_selected(menu, 1, 2);
break;
case 2:
filemenu_set_selected(menu, 1, 2);
break;
case 3:
filemenu_set_selected(menu, 1, 2);
break;
case 4:
filemenu_set_selected(menu, 1, 2);
break;
}
switch (menu->page) {
case 0:
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_hidden_options_left);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_hidden_options_right);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_options_bottom);
set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_hidden_options_bottom);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_hidden_options_bottom);
set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_hidden_options_left);
set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_hidden_options_right);
set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_hidden_options_left);
set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_hidden_options_right);
set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_hidden_title);
sfx_play_sound(SOUND_D6);
set_game_mode(GAME_MODE_END_FILE_SELECT);
break;
case 1:
menu->page = 0;
filemenu_set_selected(menu, 0, 2);
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_options_left);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_options_right);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_options_bottom);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom);
sfx_play_sound(SOUND_MENU_BACK);
break;
case 3:
menu->page = 0;
filemenu_set_selected(menu, 1, 2);
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_options_left);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_options_right);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_options_bottom);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom);
sfx_play_sound(SOUND_MENU_BACK);
break;
case 4:
menu->page = 3;
filemenu_set_selected(menu, (filemenu_loadedFileIdx % 2) * 2, filemenu_loadedFileIdx / 2);
sfx_play_sound(SOUND_MENU_BACK);
break;
case 2:
sfx_play_sound(SOUND_MENU_BACK);
set_game_mode(GAME_MODE_END_LANGUAGE_SELECT);
break;
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel D_80257DA4
/* 186684 80257DA4 27BDFD18 */ addiu $sp, $sp, -0x2E8
/* 186688 80257DA8 AFB402B0 */ sw $s4, 0x2B0($sp)
/* 18668C 80257DAC 3C14800E */ lui $s4, %hi(gBattleStatus)
/* 186690 80257DB0 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
/* 186694 80257DB4 AFBF02C4 */ sw $ra, 0x2C4($sp)
/* 186698 80257DB8 AFBE02C0 */ sw $fp, 0x2C0($sp)
/* 18669C 80257DBC AFB702BC */ sw $s7, 0x2BC($sp)
/* 1866A0 80257DC0 AFB602B8 */ sw $s6, 0x2B8($sp)
/* 1866A4 80257DC4 AFB502B4 */ sw $s5, 0x2B4($sp)
/* 1866A8 80257DC8 AFB302AC */ sw $s3, 0x2AC($sp)
/* 1866AC 80257DCC AFB202A8 */ sw $s2, 0x2A8($sp)
/* 1866B0 80257DD0 AFB102A4 */ sw $s1, 0x2A4($sp)
/* 1866B4 80257DD4 AFB002A0 */ sw $s0, 0x2A0($sp)
/* 1866B8 80257DD8 F7BA02E0 */ sdc1 $f26, 0x2E0($sp)
/* 1866BC 80257DDC F7B802D8 */ sdc1 $f24, 0x2D8($sp)
/* 1866C0 80257DE0 F7B602D0 */ sdc1 $f22, 0x2D0($sp)
/* 1866C4 80257DE4 F7B402C8 */ sdc1 $f20, 0x2C8($sp)
/* 1866C8 80257DE8 8E9600D8 */ lw $s6, 0xD8($s4)
/* 1866CC 80257DEC 8E9000DC */ lw $s0, 0xDC($s4)
/* 1866D0 80257DF0 8ED701F4 */ lw $s7, 0x1F4($s6)
/* 1866D4 80257DF4 C6C8018C */ lwc1 $f8, 0x18C($s6)
/* 1866D8 80257DF8 86C40150 */ lh $a0, 0x150($s6)
/* 1866DC 80257DFC C6C60144 */ lwc1 $f6, 0x144($s6)
/* 1866E0 80257E00 86C50152 */ lh $a1, 0x152($s6)
/* 1866E4 80257E04 C6C40148 */ lwc1 $f4, 0x148($s6)
/* 1866E8 80257E08 82C6019A */ lb $a2, 0x19A($s6)
/* 1866EC 80257E0C 86C70154 */ lh $a3, 0x154($s6)
/* 1866F0 80257E10 C6CA014C */ lwc1 $f10, 0x14C($s6)
/* 1866F4 80257E14 E6E80064 */ swc1 $f8, 0x64($s7)
/* 1866F8 80257E18 8EC20008 */ lw $v0, 0x8($s6)
/* 1866FC 80257E1C 82C30194 */ lb $v1, 0x194($s6)
/* 186700 80257E20 80420024 */ lb $v0, 0x24($v0)
/* 186704 80257E24 C6C00188 */ lwc1 $f0, 0x188($s6)
/* 186708 80257E28 00431021 */ addu $v0, $v0, $v1
/* 18670C 80257E2C 44821000 */ mtc1 $v0, $f2
/* 186710 80257E30 00000000 */ nop
/* 186714 80257E34 468010A0 */ cvt.s.w $f2, $f2
/* 186718 80257E38 46001082 */ mul.s $f2, $f2, $f0
/* 18671C 80257E3C 00000000 */ nop
/* 186720 80257E40 44840000 */ mtc1 $a0, $f0
/* 186724 80257E44 00000000 */ nop
/* 186728 80257E48 46800020 */ cvt.s.w $f0, $f0
/* 18672C 80257E4C 46003500 */ add.s $f20, $f6, $f0
/* 186730 80257E50 8EC20440 */ lw $v0, 0x440($s6)
/* 186734 80257E54 4602A080 */ add.s $f2, $f20, $f2
/* 186738 80257E58 8C42000C */ lw $v0, 0xC($v0)
/* 18673C 80257E5C E4420008 */ swc1 $f2, 0x8($v0)
/* 186740 80257E60 8EC20008 */ lw $v0, 0x8($s6)
/* 186744 80257E64 82C30195 */ lb $v1, 0x195($s6)
/* 186748 80257E68 80420025 */ lb $v0, 0x25($v0)
/* 18674C 80257E6C C6C00188 */ lwc1 $f0, 0x188($s6)
/* 186750 80257E70 00431021 */ addu $v0, $v0, $v1
/* 186754 80257E74 44821000 */ mtc1 $v0, $f2
/* 186758 80257E78 00000000 */ nop
/* 18675C 80257E7C 468010A0 */ cvt.s.w $f2, $f2
/* 186760 80257E80 46001082 */ mul.s $f2, $f2, $f0
/* 186764 80257E84 00000000 */ nop
/* 186768 80257E88 44850000 */ mtc1 $a1, $f0
/* 18676C 80257E8C 00000000 */ nop
/* 186770 80257E90 46800020 */ cvt.s.w $f0, $f0
/* 186774 80257E94 46002100 */ add.s $f4, $f4, $f0
/* 186778 80257E98 44860000 */ mtc1 $a2, $f0
/* 18677C 80257E9C 00000000 */ nop
/* 186780 80257EA0 46800020 */ cvt.s.w $f0, $f0
/* 186784 80257EA4 46002600 */ add.s $f24, $f4, $f0
/* 186788 80257EA8 8EC20440 */ lw $v0, 0x440($s6)
/* 18678C 80257EAC 4602C080 */ add.s $f2, $f24, $f2
/* 186790 80257EB0 8C42000C */ lw $v0, 0xC($v0)
/* 186794 80257EB4 44870000 */ mtc1 $a3, $f0
/* 186798 80257EB8 00000000 */ nop
/* 18679C 80257EBC 46800020 */ cvt.s.w $f0, $f0
/* 1867A0 80257EC0 E442000C */ swc1 $f2, 0xC($v0)
/* 1867A4 80257EC4 8EC20440 */ lw $v0, 0x440($s6)
/* 1867A8 80257EC8 46005580 */ add.s $f22, $f10, $f0
/* 1867AC 80257ECC 8C42000C */ lw $v0, 0xC($v0)
/* 1867B0 80257ED0 3C118011 */ lui $s1, %hi(gPlayerData)
/* 1867B4 80257ED4 2631F290 */ addiu $s1, $s1, %lo(gPlayerData)
/* 1867B8 80257ED8 E4560010 */ swc1 $f22, 0x10($v0)
/* 1867BC 80257EDC 8E820000 */ lw $v0, 0x0($s4)
/* 1867C0 80257EE0 30420004 */ andi $v0, $v0, 0x4
/* 1867C4 80257EE4 1440001D */ bnez $v0, .L80257F5C
/* 1867C8 80257EE8 46004686 */ mov.s $f26, $f8
/* 1867CC 80257EEC 8EC20000 */ lw $v0, 0x0($s6)
/* 1867D0 80257EF0 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 1867D4 80257EF4 00431024 */ and $v0, $v0, $v1
/* 1867D8 80257EF8 10400018 */ beqz $v0, .L80257F5C
/* 1867DC 80257EFC 00000000 */ nop
/* 1867E0 80257F00 82C2021D */ lb $v0, 0x21D($s6)
/* 1867E4 80257F04 92C4021D */ lbu $a0, 0x21D($s6)
D_80257F08:
/* 1867E8 80257F08 10400008 */ beqz $v0, kmr_02_Quizmo_Worker
/* 1867EC 80257F0C 2482FFFF */ addiu $v0, $a0, -0x1
D_80257F10:
/* 1867F0 80257F10 8EC30440 */ lw $v1, 0x440($s6)
/* 1867F4 80257F14 3C01C47A */ lui $at, (0xC47A0000 >> 16)
/* 1867F8 80257F18 44810000 */ mtc1 $at, $f0
/* 1867FC 80257F1C A2C2021D */ sb $v0, 0x21D($s6)
kmr_02_savedColR:
/* 186800 80257F20 8C62000C */ lw $v0, 0xC($v1)
D_80257F24:
/* 186804 80257F24 08095FDE */ j .L80257F78
D_80257F28:
/* 186808 80257F28 E440000C */ swc1 $f0, 0xC($v0)
kmr_02_Quizmo_Worker:
/* 18680C 80257F2C C6C00188 */ lwc1 $f0, 0x188($s6)
D_80257F30:
/* 186810 80257F30 3C013FE8 */ lui $at, (0x3FE80000 >> 16)
/* 186814 80257F34 44811800 */ mtc1 $at, $f3
/* 186818 80257F38 44801000 */ mtc1 $zero, $f2
/* 18681C 80257F3C 46000021 */ cvt.d.s $f0, $f0
kmr_02_Quizmo_AnswerResult:
/* 186820 80257F40 46220002 */ mul.d $f0, $f0, $f2
/* 186824 80257F44 00000000 */ nop
kmr_02_Quizmo_StageEffect:
/* 186828 80257F48 8EC20440 */ lw $v0, 0x440($s6)
kmr_02_Quizmo_AudienceEffect:
/* 18682C 80257F4C 8C42000C */ lw $v0, 0xC($v0)
kmr_02_Quizmo_VannaTEffect:
/* 186830 80257F50 46200020 */ cvt.s.d $f0, $f0
/* 186834 80257F54 08095FDE */ j .L80257F78
kmr_02_D_80257F58:
/* 186838 80257F58 E4400034 */ swc1 $f0, 0x34($v0)
.L80257F5C:
/* 18683C 80257F5C 8EC20440 */ lw $v0, 0x440($s6)
/* 186840 80257F60 3C01C47A */ lui $at, (0xC47A0000 >> 16)
/* 186844 80257F64 44810000 */ mtc1 $at, $f0
/* 186848 80257F68 8C42000C */ lw $v0, 0xC($v0)
/* 18684C 80257F6C E440000C */ swc1 $f0, 0xC($v0)
/* 186850 80257F70 2402000A */ addiu $v0, $zero, 0xA
/* 186854 80257F74 A2C2021D */ sb $v0, 0x21D($s6)
.L80257F78:
/* 186858 80257F78 8282009D */ lb $v0, 0x9D($s4)
/* 18685C 80257F7C 1040001B */ beqz $v0, .L80257FEC
/* 186860 80257F80 00000000 */ nop
/* 186864 80257F84 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 186868 80257F88 8C63C070 */ lw $v1, %lo(gBattleStatus)($v1)
/* 18686C 80257F8C 30620008 */ andi $v0, $v1, 0x8
/* 186870 80257F90 14400007 */ bnez $v0, .L80257FB0
/* 186874 80257F94 30620004 */ andi $v0, $v1, 0x4
/* 186878 80257F98 1440000B */ bnez $v0, .L80257FC8
/* 18687C 80257F9C 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 186880 80257FA0 8EC20000 */ lw $v0, 0x0($s6)
/* 186884 80257FA4 00431024 */ and $v0, $v0, $v1
/* 186888 80257FA8 10400007 */ beqz $v0, .L80257FC8
/* 18688C 80257FAC 00000000 */ nop
.L80257FB0:
/* 186890 80257FB0 8E8400A0 */ lw $a0, 0xA0($s4)
/* 186894 80257FB4 8C82000C */ lw $v0, 0xC($a0)
/* 186898 80257FB8 E4540004 */ swc1 $f20, 0x4($v0)
/* 18689C 80257FBC 8C82000C */ lw $v0, 0xC($a0)
/* 1868A0 80257FC0 08095FF9 */ j .L80257FE4
/* 1868A4 80257FC4 E4580008 */ swc1 $f24, 0x8($v0)
.L80257FC8:
/* 1868A8 80257FC8 8E8400A0 */ lw $a0, 0xA0($s4)
/* 1868AC 80257FCC 3C01C47A */ lui $at, (0xC47A0000 >> 16)
/* 1868B0 80257FD0 44810000 */ mtc1 $at, $f0
/* 1868B4 80257FD4 8C82000C */ lw $v0, 0xC($a0)
/* 1868B8 80257FD8 E4540004 */ swc1 $f20, 0x4($v0)
/* 1868BC 80257FDC 8C82000C */ lw $v0, 0xC($a0)
/* 1868C0 80257FE0 E4400008 */ swc1 $f0, 0x8($v0)
.L80257FE4:
/* 1868C4 80257FE4 8C82000C */ lw $v0, 0xC($a0)
/* 1868C8 80257FE8 E456000C */ swc1 $f22, 0xC($v0)
.L80257FEC:
/* 1868CC 80257FEC 828200A4 */ lb $v0, 0xA4($s4)
/* 1868D0 80257FF0 10400020 */ beqz $v0, .L80258074
/* 1868D4 80257FF4 00000000 */ nop
/* 1868D8 80257FF8 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1868DC 80257FFC 8C63C070 */ lw $v1, %lo(gBattleStatus)($v1)
/* 1868E0 80258000 30620008 */ andi $v0, $v1, 0x8
D_80258004:
/* 1868E4 80258004 14400007 */ bnez $v0, .L80258024
/* 1868E8 80258008 30620004 */ andi $v0, $v1, 0x4
/* 1868EC 8025800C 14400010 */ bnez $v0, .L80258050
/* 1868F0 80258010 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 1868F4 80258014 8EC20000 */ lw $v0, 0x0($s6)
/* 1868F8 80258018 00431024 */ and $v0, $v0, $v1
/* 1868FC 8025801C 1040000C */ beqz $v0, .L80258050
/* 186900 80258020 00000000 */ nop
.L80258024:
/* 186904 80258024 8E8400A8 */ lw $a0, 0xA8($s4)
/* 186908 80258028 8C82000C */ lw $v0, 0xC($a0)
/* 18690C 8025802C E4540004 */ swc1 $f20, 0x4($v0)
/* 186910 80258030 8C82000C */ lw $v0, 0xC($a0)
/* 186914 80258034 E4580008 */ swc1 $f24, 0x8($v0)
/* 186918 80258038 8C82000C */ lw $v0, 0xC($a0)
/* 18691C 8025803C E456000C */ swc1 $f22, 0xC($v0)
/* 186920 80258040 8C82000C */ lw $v0, 0xC($a0)
/* 186924 80258044 C6C00188 */ lwc1 $f0, 0x188($s6)
/* 186928 80258048 0809601D */ j .L80258074
/* 18692C 8025804C E4400010 */ swc1 $f0, 0x10($v0)
.L80258050:
/* 186930 80258050 8E8400A8 */ lw $a0, 0xA8($s4)
/* 186934 80258054 3C01C47A */ lui $at, (0xC47A0000 >> 16)
/* 186938 80258058 44810000 */ mtc1 $at, $f0
/* 18693C 8025805C 8C82000C */ lw $v0, 0xC($a0)
/* 186940 80258060 E4540004 */ swc1 $f20, 0x4($v0)
/* 186944 80258064 8C82000C */ lw $v0, 0xC($a0)
/* 186948 80258068 E4400008 */ swc1 $f0, 0x8($v0)
/* 18694C 8025806C 8C82000C */ lw $v0, 0xC($a0)
/* 186950 80258070 E456000C */ swc1 $f22, 0xC($v0)
.L80258074:
/* 186954 80258074 82C30210 */ lb $v1, 0x210($s6)
/* 186958 80258078 24020007 */ addiu $v0, $zero, 0x7
/* 18695C 8025807C 1462002E */ bne $v1, $v0, .L80258138
/* 186960 80258080 00000000 */ nop
/* 186964 80258084 8EC40228 */ lw $a0, 0x228($s6)
/* 186968 80258088 10800022 */ beqz $a0, .L80258114
/* 18696C 8025808C 00000000 */ nop
/* 186970 80258090 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 186974 80258094 8C63C070 */ lw $v1, %lo(gBattleStatus)($v1)
/* 186978 80258098 30620008 */ andi $v0, $v1, 0x8
/* 18697C 8025809C 14400007 */ bnez $v0, .L802580BC
/* 186980 802580A0 30620004 */ andi $v0, $v1, 0x4
/* 186984 802580A4 1440001B */ bnez $v0, .L80258114
/* 186988 802580A8 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 18698C 802580AC 8EC20000 */ lw $v0, 0x0($s6)
/* 186990 802580B0 00431024 */ and $v0, $v0, $v1
/* 186994 802580B4 10400017 */ beqz $v0, .L80258114
/* 186998 802580B8 00000000 */ nop
.L802580BC:
/* 18699C 802580BC 3C014100 */ lui $at, (0x41000000 >> 16)
/* 1869A0 802580C0 44810000 */ mtc1 $at, $f0
/* 1869A4 802580C4 00000000 */ nop
/* 1869A8 802580C8 4600A001 */ sub.s $f0, $f20, $f0
/* 1869AC 802580CC 8C82000C */ lw $v0, 0xC($a0)
/* 1869B0 802580D0 E4400004 */ swc1 $f0, 0x4($v0)
/* 1869B4 802580D4 8C82000C */ lw $v0, 0xC($a0)
/* 1869B8 802580D8 E4580008 */ swc1 $f24, 0x8($v0)
/* 1869BC 802580DC 8C82000C */ lw $v0, 0xC($a0)
/* 1869C0 802580E0 E456000C */ swc1 $f22, 0xC($v0)
/* 1869C4 802580E4 92C20191 */ lbu $v0, 0x191($s6)
/* 1869C8 802580E8 3C014038 */ lui $at, (0x40380000 >> 16)
/* 1869CC 802580EC 44811800 */ mtc1 $at, $f3
/* 1869D0 802580F0 44801000 */ mtc1 $zero, $f2
/* 1869D4 802580F4 44820000 */ mtc1 $v0, $f0
/* 1869D8 802580F8 00000000 */ nop
/* 1869DC 802580FC 46800021 */ cvt.d.w $f0, $f0
/* 1869E0 80258100 46220003 */ div.d $f0, $f0, $f2
/* 1869E4 80258104 8C82000C */ lw $v0, 0xC($a0)
/* 1869E8 80258108 46200020 */ cvt.s.d $f0, $f0
/* 1869EC 8025810C 08096055 */ j .L80258154
/* 1869F0 80258110 E4400020 */ swc1 $f0, 0x20($v0)
.L80258114:
/* 1869F4 80258114 8C82000C */ lw $v0, 0xC($a0)
/* 1869F8 80258118 3C01C47A */ lui $at, (0xC47A0000 >> 16)
D_8025811C:
/* 1869FC 8025811C 44810000 */ mtc1 $at, $f0
D_80258120:
/* 186A00 80258120 AC400004 */ sw $zero, 0x4($v0)
/* 186A04 80258124 8C82000C */ lw $v0, 0xC($a0)
/* 186A08 80258128 E4400008 */ swc1 $f0, 0x8($v0)
/* 186A0C 8025812C 8C82000C */ lw $v0, 0xC($a0)
/* 186A10 80258130 08096055 */ j .L80258154
/* 186A14 80258134 AC40000C */ sw $zero, 0xC($v0)
.L80258138:
/* 186A18 80258138 8EC40228 */ lw $a0, 0x228($s6)
/* 186A1C 8025813C 10800005 */ beqz $a0, .L80258154
D_80258140:
/* 186A20 80258140 00000000 */ nop
/* 186A24 80258144 8C820000 */ lw $v0, 0x0($a0)
/* 186A28 80258148 34420010 */ ori $v0, $v0, 0x10
/* 186A2C 8025814C AC820000 */ sw $v0, 0x0($a0)
/* 186A30 80258150 AEC00228 */ sw $zero, 0x228($s6)
.L80258154:
/* 186A34 80258154 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 186A38 80258158 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 186A3C 8025815C 8C820004 */ lw $v0, 0x4($a0)
/* 186A40 80258160 3C030001 */ lui $v1, (0x10000 >> 16)
/* 186A44 80258164 00431024 */ and $v0, $v0, $v1
/* 186A48 80258168 1440001A */ bnez $v0, .L802581D4
/* 186A4C 8025816C 00000000 */ nop
/* 186A50 80258170 8C820000 */ lw $v0, 0x0($a0)
/* 186A54 80258174 30420004 */ andi $v0, $v0, 0x4
/* 186A58 80258178 14400016 */ bnez $v0, .L802581D4
/* 186A5C 8025817C 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 186A60 80258180 8EC20000 */ lw $v0, 0x0($s6)
/* 186A64 80258184 00431024 */ and $v0, $v0, $v1
D_80258188:
/* 186A68 80258188 10400012 */ beqz $v0, .L802581D4
/* 186A6C 8025818C 00000000 */ nop
/* 186A70 80258190 8E82043C */ lw $v0, 0x43C($s4)
/* 186A74 80258194 8C43000C */ lw $v1, 0xC($v0)
/* 186A78 80258198 24020001 */ addiu $v0, $zero, 0x1
/* 186A7C 8025819C 08096078 */ j .L802581E0
/* 186A80 802581A0 A4620002 */ sh $v0, 0x2($v1)
.L802581A4:
/* 186A84 802581A4 C6C00188 */ lwc1 $f0, 0x188($s6)
/* 186A88 802581A8 3C01802A */ lui $at, %hi(D_8029D388)
/* 186A8C 802581AC D422D388 */ ldc1 $f2, %lo(D_8029D388)($at)
/* 186A90 802581B0 46000021 */ cvt.d.s $f0, $f0
/* 186A94 802581B4 46201081 */ sub.d $f2, $f2, $f0
/* 186A98 802581B8 3C014018 */ lui $at, (0x40180000 >> 16)
/* 186A9C 802581BC 44812800 */ mtc1 $at, $f5
/* 186AA0 802581C0 44802000 */ mtc1 $zero, $f4
/* 186AA4 802581C4 00000000 */ nop
/* 186AA8 802581C8 46241083 */ div.d $f2, $f2, $f4
/* 186AAC 802581CC 08096088 */ j .L80258220
/* 186AB0 802581D0 46220000 */ add.d $f0, $f0, $f2
.L802581D4:
/* 186AB4 802581D4 8E82043C */ lw $v0, 0x43C($s4)
/* 186AB8 802581D8 8C42000C */ lw $v0, 0xC($v0)
/* 186ABC 802581DC A4400002 */ sh $zero, 0x2($v0)
.L802581E0:
/* 186AC0 802581E0 82C30210 */ lb $v1, 0x210($s6)
/* 186AC4 802581E4 2402000A */ addiu $v0, $zero, 0xA
/* 186AC8 802581E8 1062FFEE */ beq $v1, $v0, .L802581A4
/* 186ACC 802581EC 00000000 */ nop
/* 186AD0 802581F0 C6C00188 */ lwc1 $f0, 0x188($s6)
/* 186AD4 802581F4 3C013FF0 */ lui $at, (0x3FF00000 >> 16)
/* 186AD8 802581F8 44812800 */ mtc1 $at, $f5
D_802581FC:
/* 186ADC 802581FC 44802000 */ mtc1 $zero, $f4
/* 186AE0 80258200 46000021 */ cvt.d.s $f0, $f0
/* 186AE4 80258204 46202101 */ sub.d $f4, $f4, $f0
/* 186AE8 80258208 3C014018 */ lui $at, (0x40180000 >> 16)
/* 186AEC 8025820C 44811800 */ mtc1 $at, $f3
/* 186AF0 80258210 44801000 */ mtc1 $zero, $f2
/* 186AF4 80258214 00000000 */ nop
/* 186AF8 80258218 46222103 */ div.d $f4, $f4, $f2
/* 186AFC 8025821C 46240000 */ add.d $f0, $f0, $f4
.L80258220:
/* 186B00 80258220 46200020 */ cvt.s.d $f0, $f0
/* 186B04 80258224 E6C00188 */ swc1 $f0, 0x188($s6)
/* 186B08 80258228 8EC20000 */ lw $v0, 0x0($s6)
/* 186B0C 8025822C 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 186B10 80258230 00431024 */ and $v0, $v0, $v1
/* 186B14 80258234 10400019 */ beqz $v0, .L8025829C
/* 186B18 80258238 00000000 */ nop
/* 186B1C 8025823C 82820096 */ lb $v0, 0x96($s4)
/* 186B20 80258240 18400007 */ blez $v0, .L80258260
/* 186B24 80258244 00000000 */ nop
/* 186B28 80258248 0C011F4C */ jal create_status_icon_boost_hammer
/* 186B2C 8025824C 86C40436 */ lh $a0, 0x436($s6)
/* 186B30 80258250 0C011F29 */ jal remove_status_icon_boost_jump
/* 186B34 80258254 86C40436 */ lh $a0, 0x436($s6)
/* 186B38 80258258 0809609A */ j .L80258268
/* 186B3C 8025825C 00000000 */ nop
.L80258260:
/* 186B40 80258260 0C011F70 */ jal remove_status_icon_boost_hammer
D_80258264:
/* 186B44 80258264 86C40436 */ lh $a0, 0x436($s6)
.L80258268:
/* 186B48 80258268 82820097 */ lb $v0, 0x97($s4)
/* 186B4C 8025826C 18400007 */ blez $v0, .L8025828C
/* 186B50 80258270 00000000 */ nop
/* 186B54 80258274 0C011F05 */ jal create_status_icon_boost_jump
/* 186B58 80258278 86C40436 */ lh $a0, 0x436($s6)
/* 186B5C 8025827C 0C011F70 */ jal remove_status_icon_boost_hammer
/* 186B60 80258280 86C40436 */ lh $a0, 0x436($s6)
/* 186B64 80258284 080960AB */ j .L802582AC
/* 186B68 80258288 00000000 */ nop
.L8025828C:
/* 186B6C 8025828C 0C011F29 */ jal remove_status_icon_boost_jump
/* 186B70 80258290 86C40436 */ lh $a0, 0x436($s6)
/* 186B74 80258294 080960AB */ j .L802582AC
/* 186B78 80258298 00000000 */ nop
.L8025829C:
/* 186B7C 8025829C 0C011F40 */ jal enable_status_icon_boost_jump
/* 186B80 802582A0 86C40436 */ lh $a0, 0x436($s6)
/* 186B84 802582A4 0C011F87 */ jal enable_status_icon_boost_hammer
/* 186B88 802582A8 86C40436 */ lh $a0, 0x436($s6)
.L802582AC:
/* 186B8C 802582AC 8EC20000 */ lw $v0, 0x0($s6)
/* 186B90 802582B0 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 186B94 802582B4 00431024 */ and $v0, $v0, $v1
/* 186B98 802582B8 1040001C */ beqz $v0, .L8025832C
/* 186B9C 802582BC 00000000 */ nop
/* 186BA0 802582C0 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4)
/* 186BA4 802582C4 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0)
/* 186BA8 802582C8 30420040 */ andi $v0, $v0, 0x40
D_802582CC:
/* 186BAC 802582CC 14400017 */ bnez $v0, .L8025832C
/* 186BB0 802582D0 00000000 */ nop
/* 186BB4 802582D4 82220002 */ lb $v0, 0x2($s1)
/* 186BB8 802582D8 28420002 */ slti $v0, $v0, 0x2
/* 186BBC 802582DC 14400009 */ bnez $v0, .L80258304
/* 186BC0 802582E0 00000000 */ nop
/* 186BC4 802582E4 0C01203D */ jal remove_status_icon_peril
/* 186BC8 802582E8 86C40436 */ lh $a0, 0x436($s6)
/* 186BCC 802582EC 82220002 */ lb $v0, 0x2($s1)
/* 186BD0 802582F0 28420006 */ slti $v0, $v0, 0x6
/* 186BD4 802582F4 14400007 */ bnez $v0, .L80258314
/* 186BD8 802582F8 00000000 */ nop
/* 186BDC 802582FC 080960CD */ j .L80258334
/* 186BE0 80258300 00000000 */ nop
.L80258304:
/* 186BE4 80258304 0C012019 */ jal create_status_icon_peril
/* 186BE8 80258308 86C40436 */ lh $a0, 0x436($s6)
/* 186BEC 8025830C 080960CD */ j .L80258334
/* 186BF0 80258310 00000000 */ nop
.L80258314:
/* 186BF4 80258314 0C01205C */ jal create_status_icon_danger
/* 186BF8 80258318 86C40436 */ lh $a0, 0x436($s6)
/* 186BFC 8025831C 0C01203D */ jal remove_status_icon_peril
/* 186C00 80258320 86C40436 */ lh $a0, 0x436($s6)
/* 186C04 80258324 080960CF */ j .L8025833C
/* 186C08 80258328 00000000 */ nop
.L8025832C:
/* 186C0C 8025832C 0C01203D */ jal remove_status_icon_peril
/* 186C10 80258330 86C40436 */ lh $a0, 0x436($s6)
.L80258334:
/* 186C14 80258334 0C012080 */ jal remove_status_icon_danger
/* 186C18 80258338 86C40436 */ lh $a0, 0x436($s6)
.L8025833C:
/* 186C1C 8025833C 82C30218 */ lb $v1, 0x218($s6)
D_80258340:
/* 186C20 80258340 2402000E */ addiu $v0, $zero, 0xE
/* 186C24 80258344 1462000C */ bne $v1, $v0, .L80258378
/* 186C28 80258348 2403FEFF */ addiu $v1, $zero, -0x101
/* 186C2C 8025834C 8EE20000 */ lw $v0, 0x0($s7)
/* 186C30 80258350 080960E0 */ j .L80258380
/* 186C34 80258354 34420100 */ ori $v0, $v0, 0x100
.L80258358:
/* 186C38 80258358 0C099751 */ jal get_player_anim_for_status
/* 186C3C 8025835C 24040008 */ addiu $a0, $zero, 0x8
/* 186C40 80258360 AEE20088 */ sw $v0, 0x88($s7)
/* 186C44 80258364 86C40436 */ lh $a0, 0x436($s6)
/* 186C48 80258368 0C011E08 */ jal create_status_debuff
/* 186C4C 8025836C 24050008 */ addiu $a1, $zero, 0x8
/* 186C50 80258370 08096272 */ j .L802589C8
/* 186C54 80258374 00000000 */ nop
.L80258378:
/* 186C58 80258378 8EE20000 */ lw $v0, 0x0($s7)
/* 186C5C 8025837C 00431024 */ and $v0, $v0, $v1
.L80258380:
/* 186C60 80258380 AEE20000 */ sw $v0, 0x0($s7)
/* 186C64 80258384 0000882D */ daddu $s1, $zero, $zero
/* 186C68 80258388 0220902D */ daddu $s2, $s1, $zero
/* 186C6C 8025838C 0220982D */ daddu $s3, $s1, $zero
/* 186C70 80258390 8EFE0088 */ lw $fp, 0x88($s7)
/* 186C74 80258394 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4)
/* 186C78 80258398 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0)
/* 186C7C 8025839C 24030002 */ addiu $v1, $zero, 0x2
/* 186C80 802583A0 3042000A */ andi $v0, $v0, 0xA
/* 186C84 802583A4 14430003 */ bne $v0, $v1, .L802583B4
/* 186C88 802583A8 0220A82D */ daddu $s5, $s1, $zero
/* 186C8C 802583AC 16000004 */ bnez $s0, .L802583C0
/* 186C90 802583B0 00000000 */ nop
.L802583B4:
/* 186C94 802583B4 8282009A */ lb $v0, 0x9A($s4)
/* 186C98 802583B8 18400047 */ blez $v0, .L802584D8
/* 186C9C 802583BC 00000000 */ nop
.L802583C0:
/* 186CA0 802583C0 8EC20000 */ lw $v0, 0x0($s6)
/* 186CA4 802583C4 3C032000 */ lui $v1, (0x20000000 >> 16)
/* 186CA8 802583C8 00431024 */ and $v0, $v0, $v1
/* 186CAC 802583CC 14400042 */ bnez $v0, .L802584D8
/* 186CB0 802583D0 00000000 */ nop
/* 186CB4 802583D4 12000005 */ beqz $s0, .L802583EC
/* 186CB8 802583D8 3C030020 */ lui $v1, (0x200000 >> 16)
/* 186CBC 802583DC 8E020000 */ lw $v0, 0x0($s0)
/* 186CC0 802583E0 00431024 */ and $v0, $v0, $v1
/* 186CC4 802583E4 1440003C */ bnez $v0, .L802584D8
/* 186CC8 802583E8 00000000 */ nop
.L802583EC:
/* 186CCC 802583EC 3C04800E */ lui $a0, %hi(gBattleStatus + 0x4)
/* 186CD0 802583F0 8C84C074 */ lw $a0, %lo(gBattleStatus + 0x4)($a0)
/* 186CD4 802583F4 3C020010 */ lui $v0, (0x100000 >> 16)
/* 186CD8 802583F8 00821024 */ and $v0, $a0, $v0
/* 186CDC 802583FC 14400036 */ bnez $v0, .L802584D8
/* 186CE0 80258400 24020003 */ addiu $v0, $zero, 0x3
D_80258404:
/* 186CE4 80258404 82C30210 */ lb $v1, 0x210($s6)
D_80258408:
/* 186CE8 80258408 10620027 */ beq $v1, $v0, .L802584A8
/* 186CEC 8025840C 24020005 */ addiu $v0, $zero, 0x5
/* 186CF0 80258410 10620025 */ beq $v1, $v0, .L802584A8
/* 186CF4 80258414 24020007 */ addiu $v0, $zero, 0x7
/* 186CF8 80258418 10620023 */ beq $v1, $v0, .L802584A8
/* 186CFC 8025841C 24020008 */ addiu $v0, $zero, 0x8
/* 186D00 80258420 10620021 */ beq $v1, $v0, .L802584A8
/* 186D04 80258424 2402000E */ addiu $v0, $zero, 0xE
/* 186D08 80258428 82C30218 */ lb $v1, 0x218($s6)
/* 186D0C 8025842C 1062001D */ beq $v1, $v0, .L802584A4
/* 186D10 80258430 2402000C */ addiu $v0, $zero, 0xC
/* 186D14 80258434 82C30214 */ lb $v1, 0x214($s6)
/* 186D18 80258438 1062001A */ beq $v1, $v0, .L802584A4
/* 186D1C 8025843C 00000000 */ nop
/* 186D20 80258440 8282009A */ lb $v0, 0x9A($s4)
/* 186D24 80258444 1C400003 */ bgtz $v0, .L80258454
/* 186D28 80258448 30820002 */ andi $v0, $a0, 0x2
/* 186D2C 8025844C 10400015 */ beqz $v0, .L802584A4
/* 186D30 80258450 00000000 */ nop
.L80258454:
/* 186D34 80258454 0C03A752 */ jal is_ability_active
/* 186D38 80258458 24040015 */ addiu $a0, $zero, 0x15
/* 186D3C 8025845C 1440000A */ bnez $v0, .L80258488
/* 186D40 80258460 24040013 */ addiu $a0, $zero, 0x13
/* 186D44 80258464 82C30210 */ lb $v1, 0x210($s6)
/* 186D48 80258468 24020006 */ addiu $v0, $zero, 0x6
/* 186D4C 8025846C 14620003 */ bne $v1, $v0, .L8025847C
/* 186D50 80258470 24020004 */ addiu $v0, $zero, 0x4
/* 186D54 80258474 08096122 */ j .L80258488
/* 186D58 80258478 24040015 */ addiu $a0, $zero, 0x15
.L8025847C:
/* 186D5C 8025847C 14620002 */ bne $v1, $v0, .L80258488
/* 186D60 80258480 24040012 */ addiu $a0, $zero, 0x12
/* 186D64 80258484 24040018 */ addiu $a0, $zero, 0x18
.L80258488:
/* 186D68 80258488 0C099751 */ jal get_player_anim_for_status
/* 186D6C 8025848C 24110001 */ addiu $s1, $zero, 0x1
/* 186D70 80258490 AEE20088 */ sw $v0, 0x88($s7)
/* 186D74 80258494 8EE50088 */ lw $a1, 0x88($s7)
/* 186D78 80258498 8EE60090 */ lw $a2, 0x90($s7)
/* 186D7C 8025849C 0C0B76A3 */ jal spr_update_player_sprite
/* 186D80 802584A0 0000202D */ daddu $a0, $zero, $zero
.L802584A4:
/* 186D84 802584A4 82C30210 */ lb $v1, 0x210($s6)
.L802584A8:
/* 186D88 802584A8 24020009 */ addiu $v0, $zero, 0x9
/* 186D8C 802584AC 10620003 */ beq $v1, $v0, .L802584BC
/* 186D90 802584B0 02C0202D */ daddu $a0, $s6, $zero
/* 186D94 802584B4 08096130 */ j .L802584C0
/* 186D98 802584B8 2405000C */ addiu $a1, $zero, 0xC
.L802584BC:
/* 186D9C 802584BC 2405000D */ addiu $a1, $zero, 0xD
.L802584C0:
/* 186DA0 802584C0 0C099B6B */ jal set_actor_pal_adjustment
/* 186DA4 802584C4 24120001 */ addiu $s2, $zero, 0x1
/* 186DA8 802584C8 02C0202D */ daddu $a0, $s6, $zero
/* 186DAC 802584CC 0C099BBA */ jal func_80266EE8
/* 186DB0 802584D0 0000282D */ daddu $a1, $zero, $zero
/* 186DB4 802584D4 0240982D */ daddu $s3, $s2, $zero
.L802584D8:
/* 186DB8 802584D8 82C30214 */ lb $v1, 0x214($s6)
/* 186DBC 802584DC 2402000C */ addiu $v0, $zero, 0xC
/* 186DC0 802584E0 1462001C */ bne $v1, $v0, .L80258554
/* 186DC4 802584E4 00000000 */ nop
/* 186DC8 802584E8 0C099751 */ jal get_player_anim_for_status
/* 186DCC 802584EC 0040202D */ daddu $a0, $v0, $zero
/* 186DD0 802584F0 0000202D */ daddu $a0, $zero, $zero
/* 186DD4 802584F4 0040282D */ daddu $a1, $v0, $zero
/* 186DD8 802584F8 8EE60090 */ lw $a2, 0x90($s7)
/* 186DDC 802584FC 24110001 */ addiu $s1, $zero, 0x1
/* 186DE0 80258500 0C0B76A3 */ jal spr_update_player_sprite
D_80258504:
/* 186DE4 80258504 AEE50088 */ sw $a1, 0x88($s7)
/* 186DE8 80258508 16400004 */ bnez $s2, .L8025851C
/* 186DEC 8025850C 02C0202D */ daddu $a0, $s6, $zero
/* 186DF0 80258510 0C099B6B */ jal set_actor_pal_adjustment
/* 186DF4 80258514 0000282D */ daddu $a1, $zero, $zero
/* 186DF8 80258518 02C0202D */ daddu $a0, $s6, $zero
.L8025851C:
/* 186DFC 8025851C 0C099BBA */ jal func_80266EE8
/* 186E00 80258520 0000282D */ daddu $a1, $zero, $zero
/* 186E04 80258524 86C40436 */ lh $a0, 0x436($s6)
/* 186E08 80258528 0C011E3E */ jal enable_status_debuff
/* 186E0C 8025852C 24120001 */ addiu $s2, $zero, 0x1
/* 186E10 80258530 86C40436 */ lh $a0, 0x436($s6)
/* 186E14 80258534 0C011E80 */ jal enable_status_2
/* 186E18 80258538 0240982D */ daddu $s3, $s2, $zero
/* 186E1C 8025853C 86C40436 */ lh $a0, 0x436($s6)
/* 186E20 80258540 0C011EC2 */ jal enable_status_transparent
/* 186E24 80258544 0240A82D */ daddu $s5, $s2, $zero
/* 186E28 80258548 86C40436 */ lh $a0, 0x436($s6)
/* 186E2C 8025854C 0C011EF9 */ jal enable_status_chill_out
/* 186E30 80258550 00000000 */ nop
.L80258554:
/* 186E34 80258554 8EC20000 */ lw $v0, 0x0($s6)
/* 186E38 80258558 3C030400 */ lui $v1, (0x4000000 >> 16)
/* 186E3C 8025855C 00431024 */ and $v0, $v0, $v1
/* 186E40 80258560 1040000B */ beqz $v0, .L80258590
/* 186E44 80258564 00000000 */ nop
/* 186E48 80258568 16200009 */ bnez $s1, .L80258590
/* 186E4C 8025856C 00000000 */ nop
/* 186E50 80258570 8EF00088 */ lw $s0, 0x88($s7)
/* 186E54 80258574 0C099751 */ jal get_player_anim_for_status
/* 186E58 80258578 2404000C */ addiu $a0, $zero, 0xC
/* 186E5C 8025857C 16020004 */ bne $s0, $v0, .L80258590
/* 186E60 80258580 00000000 */ nop
/* 186E64 80258584 0C099751 */ jal get_player_anim_for_status
/* 186E68 80258588 24040001 */ addiu $a0, $zero, 0x1
/* 186E6C 8025858C AEE20088 */ sw $v0, 0x88($s7)
.L80258590:
/* 186E70 80258590 0C03A752 */ jal is_ability_active
/* 186E74 80258594 24040015 */ addiu $a0, $zero, 0x15
/* 186E78 80258598 10400007 */ beqz $v0, .L802585B8
/* 186E7C 8025859C 00000000 */ nop
/* 186E80 802585A0 16400005 */ bnez $s2, .L802585B8
/* 186E84 802585A4 24120001 */ addiu $s2, $zero, 0x1
/* 186E88 802585A8 02C0202D */ daddu $a0, $s6, $zero
/* 186E8C 802585AC 0C099B6B */ jal set_actor_pal_adjustment
/* 186E90 802585B0 24050008 */ addiu $a1, $zero, 0x8
/* 186E94 802585B4 24120001 */ addiu $s2, $zero, 0x1
.L802585B8:
/* 186E98 802585B8 82C30210 */ lb $v1, 0x210($s6)
/* 186E9C 802585BC 24020009 */ addiu $v0, $zero, 0x9
/* 186EA0 802585C0 14620009 */ bne $v1, $v0, .L802585E8
/* 186EA4 802585C4 24020005 */ addiu $v0, $zero, 0x5
/* 186EA8 802585C8 16400007 */ bnez $s2, .L802585E8
/* 186EAC 802585CC 24120001 */ addiu $s2, $zero, 0x1
/* 186EB0 802585D0 02C0202D */ daddu $a0, $s6, $zero
/* 186EB4 802585D4 0C099B6B */ jal set_actor_pal_adjustment
/* 186EB8 802585D8 24050006 */ addiu $a1, $zero, 0x6
/* 186EBC 802585DC 24120001 */ addiu $s2, $zero, 0x1
/* 186EC0 802585E0 82C30210 */ lb $v1, 0x210($s6)
/* 186EC4 802585E4 24020005 */ addiu $v0, $zero, 0x5
.L802585E8:
/* 186EC8 802585E8 14620007 */ bne $v1, $v0, .L80258608
/* 186ECC 802585EC 00000000 */ nop
/* 186ED0 802585F0 16400005 */ bnez $s2, .L80258608
/* 186ED4 802585F4 24120001 */ addiu $s2, $zero, 0x1
/* 186ED8 802585F8 02C0202D */ daddu $a0, $s6, $zero
/* 186EDC 802585FC 0C099B6B */ jal set_actor_pal_adjustment
/* 186EE0 80258600 24050007 */ addiu $a1, $zero, 0x7
/* 186EE4 80258604 24120001 */ addiu $s2, $zero, 0x1
.L80258608:
/* 186EE8 80258608 82C30212 */ lb $v1, 0x212($s6)
/* 186EEC 8025860C 2402000B */ addiu $v0, $zero, 0xB
/* 186EF0 80258610 14620007 */ bne $v1, $v0, .L80258630
/* 186EF4 80258614 00000000 */ nop
/* 186EF8 80258618 16400005 */ bnez $s2, .L80258630
/* 186EFC 8025861C 24120001 */ addiu $s2, $zero, 0x1
/* 186F00 80258620 02C0202D */ daddu $a0, $s6, $zero
/* 186F04 80258624 0C099B6B */ jal set_actor_pal_adjustment
/* 186F08 80258628 24050004 */ addiu $a1, $zero, 0x4
/* 186F0C 8025862C 24120001 */ addiu $s2, $zero, 0x1
.L80258630:
/* 186F10 80258630 8282009B */ lb $v0, 0x9B($s4)
/* 186F14 80258634 10400007 */ beqz $v0, .L80258654
/* 186F18 80258638 00000000 */ nop
/* 186F1C 8025863C 16600005 */ bnez $s3, .L80258654
/* 186F20 80258640 24130001 */ addiu $s3, $zero, 0x1
/* 186F24 80258644 02C0202D */ daddu $a0, $s6, $zero
/* 186F28 80258648 0C099BBA */ jal func_80266EE8
/* 186F2C 8025864C 2405000B */ addiu $a1, $zero, 0xB
/* 186F30 80258650 24130001 */ addiu $s3, $zero, 0x1
.L80258654:
/* 186F34 80258654 0C03A752 */ jal is_ability_active
/* 186F38 80258658 24040013 */ addiu $a0, $zero, 0x13
/* 186F3C 8025865C 10400007 */ beqz $v0, .L8025867C
/* 186F40 80258660 00000000 */ nop
/* 186F44 80258664 16400005 */ bnez $s2, .L8025867C
/* 186F48 80258668 24120001 */ addiu $s2, $zero, 0x1
/* 186F4C 8025866C 02C0202D */ daddu $a0, $s6, $zero
/* 186F50 80258670 0C099B6B */ jal set_actor_pal_adjustment
/* 186F54 80258674 24050004 */ addiu $a1, $zero, 0x4
/* 186F58 80258678 24120001 */ addiu $s2, $zero, 0x1
.L8025867C:
/* 186F5C 8025867C 16400003 */ bnez $s2, .L8025868C
/* 186F60 80258680 02C0202D */ daddu $a0, $s6, $zero
D_80258684:
/* 186F64 80258684 0C099B6B */ jal set_actor_pal_adjustment
/* 186F68 80258688 0000282D */ daddu $a1, $zero, $zero
.L8025868C:
/* 186F6C 8025868C 16600003 */ bnez $s3, .L8025869C
/* 186F70 80258690 02C0202D */ daddu $a0, $s6, $zero
/* 186F74 80258694 0C099BBA */ jal func_80266EE8
/* 186F78 80258698 0000282D */ daddu $a1, $zero, $zero
.L8025869C:
/* 186F7C 8025869C 8EC20000 */ lw $v0, 0x0($s6)
/* 186F80 802586A0 3C030400 */ lui $v1, (0x4000000 >> 16)
/* 186F84 802586A4 00431024 */ and $v0, $v0, $v1
/* 186F88 802586A8 1040007D */ beqz $v0, .L802588A0
/* 186F8C 802586AC 00000000 */ nop
/* 186F90 802586B0 8282008B */ lb $v0, 0x8B($s4)
/* 186F94 802586B4 10400015 */ beqz $v0, .L8025870C
/* 186F98 802586B8 00000000 */ nop
/* 186F9C 802586BC 0C099751 */ jal get_player_anim_for_status
/* 186FA0 802586C0 24040019 */ addiu $a0, $zero, 0x19
/* 186FA4 802586C4 AEE20088 */ sw $v0, 0x88($s7)
/* 186FA8 802586C8 080961CF */ j .L8025873C
/* 186FAC 802586CC 24110001 */ addiu $s1, $zero, 0x1
.L802586D0:
/* 186FB0 802586D0 86C40436 */ lh $a0, 0x436($s6)
/* 186FB4 802586D4 08096241 */ j .L80258904
/* 186FB8 802586D8 24050009 */ addiu $a1, $zero, 0x9
.L802586DC:
/* 186FBC 802586DC 86C40436 */ lh $a0, 0x436($s6)
/* 186FC0 802586E0 08096241 */ j .L80258904
/* 186FC4 802586E4 24050006 */ addiu $a1, $zero, 0x6
.L802586E8:
/* 186FC8 802586E8 86C40436 */ lh $a0, 0x436($s6)
/* 186FCC 802586EC 08096241 */ j .L80258904
/* 186FD0 802586F0 24050005 */ addiu $a1, $zero, 0x5
.L802586F4:
/* 186FD4 802586F4 86C40436 */ lh $a0, 0x436($s6)
/* 186FD8 802586F8 08096241 */ j .L80258904
/* 186FDC 802586FC 24050004 */ addiu $a1, $zero, 0x4
.L80258700:
/* 186FE0 80258700 86C40436 */ lh $a0, 0x436($s6)
/* 186FE4 80258704 08096241 */ j .L80258904
/* 186FE8 80258708 2405000A */ addiu $a1, $zero, 0xA
.L8025870C:
/* 186FEC 8025870C 1620000B */ bnez $s1, .L8025873C
/* 186FF0 80258710 00000000 */ nop
/* 186FF4 80258714 0C099751 */ jal get_player_anim_for_status
/* 186FF8 80258718 24040001 */ addiu $a0, $zero, 0x1
/* 186FFC 8025871C 0040802D */ daddu $s0, $v0, $zero
/* 187000 80258720 0C099751 */ jal get_player_anim_for_status
/* 187004 80258724 24040019 */ addiu $a0, $zero, 0x19
/* 187008 80258728 16020004 */ bne $s0, $v0, .L8025873C
/* 18700C 8025872C 00000000 */ nop
/* 187010 80258730 0C099751 */ jal get_player_anim_for_status
/* 187014 80258734 24040001 */ addiu $a0, $zero, 0x1
/* 187018 80258738 AEE20088 */ sw $v0, 0x88($s7)
.L8025873C:
/* 18701C 8025873C 82C30210 */ lb $v1, 0x210($s6)
/* 187020 80258740 24020007 */ addiu $v0, $zero, 0x7
/* 187024 80258744 54620005 */ bnel $v1, $v0, .L8025875C
/* 187028 80258748 2402000A */ addiu $v0, $zero, 0xA
/* 18702C 8025874C 16200026 */ bnez $s1, .L802587E8
/* 187030 80258750 0040202D */ daddu $a0, $v0, $zero
/* 187034 80258754 080961F7 */ j .L802587DC
/* 187038 80258758 00000000 */ nop
.L8025875C:
/* 18703C 8025875C 10620022 */ beq $v1, $v0, .L802587E8
/* 187040 80258760 24020009 */ addiu $v0, $zero, 0x9
/* 187044 80258764 54620005 */ bnel $v1, $v0, .L8025877C
/* 187048 80258768 24020004 */ addiu $v0, $zero, 0x4
/* 18704C 8025876C 1620001E */ bnez $s1, .L802587E8
/* 187050 80258770 0040202D */ daddu $a0, $v0, $zero
/* 187054 80258774 080961F7 */ j .L802587DC
/* 187058 80258778 00000000 */ nop
.L8025877C:
/* 18705C 8025877C 54620005 */ bnel $v1, $v0, .L80258794
/* 187060 80258780 24020006 */ addiu $v0, $zero, 0x6
/* 187064 80258784 16200018 */ bnez $s1, .L802587E8
/* 187068 80258788 0040202D */ daddu $a0, $v0, $zero
/* 18706C 8025878C 080961F7 */ j .L802587DC
/* 187070 80258790 00000000 */ nop
.L80258794:
/* 187074 80258794 54620005 */ bnel $v1, $v0, .L802587AC
/* 187078 80258798 24020005 */ addiu $v0, $zero, 0x5
/* 18707C 8025879C 16200012 */ bnez $s1, .L802587E8
/* 187080 802587A0 0040202D */ daddu $a0, $v0, $zero
/* 187084 802587A4 080961F7 */ j .L802587DC
/* 187088 802587A8 00000000 */ nop
.L802587AC:
/* 18708C 802587AC 14620005 */ bne $v1, $v0, .L802587C4
/* 187090 802587B0 02C0202D */ daddu $a0, $s6, $zero
/* 187094 802587B4 1620000C */ bnez $s1, .L802587E8
/* 187098 802587B8 0040202D */ daddu $a0, $v0, $zero
/* 18709C 802587BC 080961F7 */ j .L802587DC
/* 1870A0 802587C0 00000000 */ nop
.L802587C4:
/* 1870A4 802587C4 0C099CAB */ jal player_team_is_ability_active
/* 1870A8 802587C8 24050015 */ addiu $a1, $zero, 0x15
/* 1870AC 802587CC 10400006 */ beqz $v0, .L802587E8
/* 1870B0 802587D0 00000000 */ nop
/* 1870B4 802587D4 16200004 */ bnez $s1, .L802587E8
/* 1870B8 802587D8 24040010 */ addiu $a0, $zero, 0x10
.L802587DC:
/* 1870BC 802587DC 0C099751 */ jal get_player_anim_for_status
/* 1870C0 802587E0 24110001 */ addiu $s1, $zero, 0x1
/* 1870C4 802587E4 AEE20088 */ sw $v0, 0x88($s7)
.L802587E8:
/* 1870C8 802587E8 0C03A752 */ jal is_ability_active
/* 1870CC 802587EC 24040013 */ addiu $a0, $zero, 0x13
/* 1870D0 802587F0 1040000C */ beqz $v0, .L80258824
/* 1870D4 802587F4 2402000B */ addiu $v0, $zero, 0xB
/* 1870D8 802587F8 16200006 */ bnez $s1, .L80258814
/* 1870DC 802587FC 2402000B */ addiu $v0, $zero, 0xB
/* 1870E0 80258800 0C099751 */ jal get_player_anim_for_status
/* 1870E4 80258804 2404000B */ addiu $a0, $zero, 0xB
/* 1870E8 80258808 AEE20088 */ sw $v0, 0x88($s7)
/* 1870EC 8025880C 24110001 */ addiu $s1, $zero, 0x1
/* 1870F0 80258810 2402000B */ addiu $v0, $zero, 0xB
.L80258814:
/* 1870F4 80258814 A2C20212 */ sb $v0, 0x212($s6)
/* 1870F8 80258818 2402007F */ addiu $v0, $zero, 0x7F
/* 1870FC 8025881C 08096212 */ j .L80258848
/* 187100 80258820 A2C20213 */ sb $v0, 0x213($s6)
.L80258824:
/* 187104 80258824 82C30212 */ lb $v1, 0x212($s6)
/* 187108 80258828 14620007 */ bne $v1, $v0, .L80258848
/* 18710C 8025882C 00000000 */ nop
/* 187110 80258830 16200005 */ bnez $s1, .L80258848
/* 187114 80258834 00000000 */ nop
/* 187118 80258838 0C099751 */ jal get_player_anim_for_status
/* 18711C 8025883C 0040202D */ daddu $a0, $v0, $zero
/* 187120 80258840 AEE20088 */ sw $v0, 0x88($s7)
/* 187124 80258844 24110001 */ addiu $s1, $zero, 0x1
.L80258848:
/* 187128 80258848 82C30218 */ lb $v1, 0x218($s6)
/* 18712C 8025884C 2402000E */ addiu $v0, $zero, 0xE
/* 187130 80258850 10620005 */ beq $v1, $v0, .L80258868
/* 187134 80258854 00000000 */ nop
/* 187138 80258858 8EE20000 */ lw $v0, 0x0($s7)
/* 18713C 8025885C 30420100 */ andi $v0, $v0, 0x100
/* 187140 80258860 1040000A */ beqz $v0, .L8025888C
/* 187144 80258864 00000000 */ nop
.L80258868:
/* 187148 80258868 16200005 */ bnez $s1, .L80258880
/* 18714C 8025886C 00000000 */ nop
/* 187150 80258870 0C099751 */ jal get_player_anim_for_status
/* 187154 80258874 2404000E */ addiu $a0, $zero, 0xE
/* 187158 80258878 AEE20088 */ sw $v0, 0x88($s7)
/* 18715C 8025887C 24110001 */ addiu $s1, $zero, 0x1
.L80258880:
/* 187160 80258880 86C40436 */ lh $a0, 0x436($s6)
/* 187164 80258884 0C011E8C */ jal create_status_transparent
/* 187168 80258888 2405000E */ addiu $a1, $zero, 0xE
.L8025888C:
/* 18716C 8025888C 16200004 */ bnez $s1, .L802588A0
/* 187170 80258890 00000000 */ nop
/* 187174 80258894 0C099751 */ jal get_player_anim_for_status
/* 187178 80258898 24040001 */ addiu $a0, $zero, 0x1
/* 18717C 8025889C AEE20088 */ sw $v0, 0x88($s7)
.L802588A0:
/* 187180 802588A0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 187184 802588A4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 187188 802588A8 30420004 */ andi $v0, $v0, 0x4
/* 18718C 802588AC 14400030 */ bnez $v0, .L80258970
/* 187190 802588B0 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 187194 802588B4 8EC20000 */ lw $v0, 0x0($s6)
/* 187198 802588B8 00431024 */ and $v0, $v0, $v1
/* 18719C 802588BC 1040002C */ beqz $v0, .L80258970
/* 1871A0 802588C0 00000000 */ nop
/* 1871A4 802588C4 16A0001D */ bnez $s5, .L8025893C
/* 1871A8 802588C8 24020009 */ addiu $v0, $zero, 0x9
/* 1871AC 802588CC 82C30210 */ lb $v1, 0x210($s6)
/* 1871B0 802588D0 1062FF7F */ beq $v1, $v0, .L802586D0
/* 1871B4 802588D4 24020006 */ addiu $v0, $zero, 0x6
/* 1871B8 802588D8 1062FF80 */ beq $v1, $v0, .L802586DC
/* 1871BC 802588DC 24020005 */ addiu $v0, $zero, 0x5
/* 1871C0 802588E0 1062FF81 */ beq $v1, $v0, .L802586E8
/* 1871C4 802588E4 24020004 */ addiu $v0, $zero, 0x4
/* 1871C8 802588E8 1062FF82 */ beq $v1, $v0, .L802586F4
/* 1871CC 802588EC 2402000A */ addiu $v0, $zero, 0xA
/* 1871D0 802588F0 1062FF83 */ beq $v1, $v0, .L80258700
/* 1871D4 802588F4 24020007 */ addiu $v0, $zero, 0x7
/* 1871D8 802588F8 14620004 */ bne $v1, $v0, .L8025890C
/* 1871DC 802588FC 0040282D */ daddu $a1, $v0, $zero
/* 1871E0 80258900 86C40436 */ lh $a0, 0x436($s6)
.L80258904:
/* 1871E4 80258904 0C011E08 */ jal create_status_debuff
/* 1871E8 80258908 00000000 */ nop
.L8025890C:
/* 1871EC 8025890C 16A0000B */ bnez $s5, .L8025893C
/* 1871F0 80258910 00000000 */ nop
/* 1871F4 80258914 0C03A752 */ jal is_ability_active
/* 1871F8 80258918 24040013 */ addiu $a0, $zero, 0x13
/* 1871FC 8025891C 14400004 */ bnez $v0, .L80258930
/* 187200 80258920 2402000B */ addiu $v0, $zero, 0xB
/* 187204 80258924 82C30212 */ lb $v1, 0x212($s6)
/* 187208 80258928 14620004 */ bne $v1, $v0, .L8025893C
/* 18720C 8025892C 00000000 */ nop
.L80258930:
/* 187210 80258930 86C40436 */ lh $a0, 0x436($s6)
/* 187214 80258934 0C011E4A */ jal create_status_static
/* 187218 80258938 2405000B */ addiu $a1, $zero, 0xB
.L8025893C:
/* 18721C 8025893C 82C30218 */ lb $v1, 0x218($s6)
/* 187220 80258940 2402000E */ addiu $v0, $zero, 0xE
/* 187224 80258944 10620005 */ beq $v1, $v0, .L8025895C
/* 187228 80258948 00000000 */ nop
/* 18722C 8025894C 8EE20000 */ lw $v0, 0x0($s7)
/* 187230 80258950 30420100 */ andi $v0, $v0, 0x100
/* 187234 80258954 1040000E */ beqz $v0, .L80258990
/* 187238 80258958 00000000 */ nop
.L8025895C:
/* 18723C 8025895C 86C40436 */ lh $a0, 0x436($s6)
/* 187240 80258960 0C011E8C */ jal create_status_transparent
/* 187244 80258964 2405000E */ addiu $a1, $zero, 0xE
/* 187248 80258968 08096264 */ j .L80258990
/* 18724C 8025896C 00000000 */ nop
.L80258970:
/* 187250 80258970 0C011E3E */ jal enable_status_debuff
/* 187254 80258974 86C40436 */ lh $a0, 0x436($s6)
/* 187258 80258978 0C011E80 */ jal enable_status_2
/* 18725C 8025897C 86C40436 */ lh $a0, 0x436($s6)
/* 187260 80258980 0C011EC2 */ jal enable_status_transparent
/* 187264 80258984 86C40436 */ lh $a0, 0x436($s6)
/* 187268 80258988 0C011EF9 */ jal enable_status_chill_out
/* 18726C 8025898C 86C40436 */ lh $a0, 0x436($s6)
.L80258990:
/* 187270 80258990 82C30210 */ lb $v1, 0x210($s6)
/* 187274 80258994 24020008 */ addiu $v0, $zero, 0x8
/* 187278 80258998 1062FE6F */ beq $v1, $v0, .L80258358
/* 18727C 8025899C 00000000 */ nop
/* 187280 802589A0 16200009 */ bnez $s1, .L802589C8
/* 187284 802589A4 00000000 */ nop
/* 187288 802589A8 8EF00088 */ lw $s0, 0x88($s7)
/* 18728C 802589AC 0C099751 */ jal get_player_anim_for_status
/* 187290 802589B0 0040202D */ daddu $a0, $v0, $zero
/* 187294 802589B4 16020004 */ bne $s0, $v0, .L802589C8
/* 187298 802589B8 00000000 */ nop
/* 18729C 802589BC 0C099751 */ jal get_player_anim_for_status
/* 1872A0 802589C0 24040001 */ addiu $a0, $zero, 0x1
/* 1872A4 802589C4 AEE20088 */ sw $v0, 0x88($s7)
.L802589C8:
/* 1872A8 802589C8 8EC20008 */ lw $v0, 0x8($s6)
/* 1872AC 802589CC 80420024 */ lb $v0, 0x24($v0)
/* 1872B0 802589D0 C6C20188 */ lwc1 $f2, 0x188($s6)
/* 1872B4 802589D4 44820000 */ mtc1 $v0, $f0
/* 1872B8 802589D8 00000000 */ nop
/* 1872BC 802589DC 46800020 */ cvt.s.w $f0, $f0
/* 1872C0 802589E0 46020002 */ mul.s $f0, $f0, $f2
/* 1872C4 802589E4 00000000 */ nop
/* 1872C8 802589E8 86C40436 */ lh $a0, 0x436($s6)
/* 1872CC 802589EC 4600038D */ trunc.w.s $f14, $f0
/* 1872D0 802589F0 E7AE0010 */ swc1 $f14, 0x10($sp)
/* 1872D4 802589F4 8EC20008 */ lw $v0, 0x8($s6)
/* 1872D8 802589F8 80420025 */ lb $v0, 0x25($v0)
/* 1872DC 802589FC C6C20188 */ lwc1 $f2, 0x188($s6)
/* 1872E0 80258A00 44820000 */ mtc1 $v0, $f0
/* 1872E4 80258A04 00000000 */ nop
/* 1872E8 80258A08 46800020 */ cvt.s.w $f0, $f0
/* 1872EC 80258A0C 46020002 */ mul.s $f0, $f0, $f2
/* 1872F0 80258A10 00000000 */ nop
/* 1872F4 80258A14 4600038D */ trunc.w.s $f14, $f0
/* 1872F8 80258A18 E7AE0014 */ swc1 $f14, 0x14($sp)
/* 1872FC 80258A1C 8EC20008 */ lw $v0, 0x8($s6)
/* 187300 80258A20 80420026 */ lb $v0, 0x26($v0)
/* 187304 80258A24 C6C20188 */ lwc1 $f2, 0x188($s6)
/* 187308 80258A28 44820000 */ mtc1 $v0, $f0
/* 18730C 80258A2C 00000000 */ nop
/* 187310 80258A30 46800020 */ cvt.s.w $f0, $f0
/* 187314 80258A34 46020002 */ mul.s $f0, $f0, $f2
/* 187318 80258A38 00000000 */ nop
/* 18731C 80258A3C 4600038D */ trunc.w.s $f14, $f0
/* 187320 80258A40 E7AE0018 */ swc1 $f14, 0x18($sp)
/* 187324 80258A44 8EC20008 */ lw $v0, 0x8($s6)
/* 187328 80258A48 80420027 */ lb $v0, 0x27($v0)
/* 18732C 80258A4C C6C20188 */ lwc1 $f2, 0x188($s6)
/* 187330 80258A50 44820000 */ mtc1 $v0, $f0
D_80258A54:
/* 187334 80258A54 00000000 */ nop
/* 187338 80258A58 46800020 */ cvt.s.w $f0, $f0
/* 18733C 80258A5C 46020002 */ mul.s $f0, $f0, $f2
/* 187340 80258A60 00000000 */ nop
/* 187344 80258A64 4405A000 */ mfc1 $a1, $f20
D_80258A68:
/* 187348 80258A68 4406C000 */ mfc1 $a2, $f24
/* 18734C 80258A6C 4407B000 */ mfc1 $a3, $f22
/* 187350 80258A70 4600038D */ trunc.w.s $f14, $f0
/* 187354 80258A74 0C011DE3 */ jal set_status_icons_properties
/* 187358 80258A78 E7AE001C */ swc1 $f14, 0x1C($sp)
/* 18735C 80258A7C 92C20191 */ lbu $v0, 0x191($s6)
/* 187360 80258A80 C6C40188 */ lwc1 $f4, 0x188($s6)
/* 187364 80258A84 44821000 */ mtc1 $v0, $f2
/* 187368 80258A88 00000000 */ nop
/* 18736C 80258A8C 468010A0 */ cvt.s.w $f2, $f2
/* 187370 80258A90 46041082 */ mul.s $f2, $f2, $f4
/* 187374 80258A94 00000000 */ nop
/* 187378 80258A98 92C20190 */ lbu $v0, 0x190($s6)
/* 18737C 80258A9C 44820000 */ mtc1 $v0, $f0
/* 187380 80258AA0 00000000 */ nop
/* 187384 80258AA4 46800020 */ cvt.s.w $f0, $f0
/* 187388 80258AA8 46040002 */ mul.s $f0, $f0, $f4
/* 18738C 80258AAC 00000000 */ nop
/* 187390 80258AB0 86C40436 */ lh $a0, 0x436($s6)
/* 187394 80258AB4 4600138D */ trunc.w.s $f14, $f2
/* 187398 80258AB8 44057000 */ mfc1 $a1, $f14
/* 18739C 80258ABC 4600038D */ trunc.w.s $f14, $f0
/* 1873A0 80258AC0 44067000 */ mfc1 $a2, $f14
/* 1873A4 80258AC4 0C011DFD */ jal set_status_icons_offset
/* 1873A8 80258AC8 00000000 */ nop
/* 1873AC 80258ACC 86E20068 */ lh $v0, 0x68($s7)
/* 1873B0 80258AD0 44820000 */ mtc1 $v0, $f0
/* 1873B4 80258AD4 00000000 */ nop
/* 1873B8 80258AD8 46800020 */ cvt.s.w $f0, $f0
/* 1873BC 80258ADC 4600A500 */ add.s $f20, $f20, $f0
/* 1873C0 80258AE0 86E2006A */ lh $v0, 0x6A($s7)
/* 1873C4 80258AE4 27B501E0 */ addiu $s5, $sp, 0x1E0
/* 1873C8 80258AE8 44820000 */ mtc1 $v0, $f0
/* 1873CC 80258AEC 00000000 */ nop
/* 1873D0 80258AF0 46800020 */ cvt.s.w $f0, $f0
/* 1873D4 80258AF4 4600C600 */ add.s $f24, $f24, $f0
/* 1873D8 80258AF8 4407B000 */ mfc1 $a3, $f22
/* 1873DC 80258AFC 4405A000 */ mfc1 $a1, $f20
/* 1873E0 80258B00 4406C000 */ mfc1 $a2, $f24
/* 1873E4 80258B04 02A0202D */ daddu $a0, $s5, $zero
/* 1873E8 80258B08 AEE70060 */ sw $a3, 0x60($s7)
/* 1873EC 80258B0C AEE50058 */ sw $a1, 0x58($s7)
/* 1873F0 80258B10 0C019E40 */ jal guTranslateF
/* 1873F4 80258B14 AEE6005C */ sw $a2, 0x5C($s7)
/* 1873F8 80258B18 86C20168 */ lh $v0, 0x168($s6)
/* 1873FC 80258B1C C6C20188 */ lwc1 $f2, 0x188($s6)
/* 187400 80258B20 00021023 */ negu $v0, $v0
/* 187404 80258B24 44820000 */ mtc1 $v0, $f0
/* 187408 80258B28 00000000 */ nop
/* 18740C 80258B2C 46800020 */ cvt.s.w $f0, $f0
/* 187410 80258B30 46020002 */ mul.s $f0, $f0, $f2
/* 187414 80258B34 00000000 */ nop
/* 187418 80258B38 86C2016A */ lh $v0, 0x16A($s6)
/* 18741C 80258B3C 00021023 */ negu $v0, $v0
/* 187420 80258B40 44050000 */ mfc1 $a1, $f0
/* 187424 80258B44 44820000 */ mtc1 $v0, $f0
/* 187428 80258B48 00000000 */ nop
/* 18742C 80258B4C 46800020 */ cvt.s.w $f0, $f0
/* 187430 80258B50 46020002 */ mul.s $f0, $f0, $f2
/* 187434 80258B54 00000000 */ nop
/* 187438 80258B58 86C2016C */ lh $v0, 0x16C($s6)
/* 18743C 80258B5C 00021023 */ negu $v0, $v0
/* 187440 80258B60 44060000 */ mfc1 $a2, $f0
/* 187444 80258B64 44820000 */ mtc1 $v0, $f0
/* 187448 80258B68 00000000 */ nop
/* 18744C 80258B6C 46800020 */ cvt.s.w $f0, $f0
/* 187450 80258B70 46020002 */ mul.s $f0, $f0, $f2
/* 187454 80258B74 00000000 */ nop
/* 187458 80258B78 27B40160 */ addiu $s4, $sp, 0x160
/* 18745C 80258B7C 44070000 */ mfc1 $a3, $f0
/* 187460 80258B80 0C019E40 */ jal guTranslateF
/* 187464 80258B84 0280202D */ daddu $a0, $s4, $zero
/* 187468 80258B88 86C20168 */ lh $v0, 0x168($s6)
/* 18746C 80258B8C C6C20188 */ lwc1 $f2, 0x188($s6)
/* 187470 80258B90 44820000 */ mtc1 $v0, $f0
/* 187474 80258B94 00000000 */ nop
/* 187478 80258B98 46800020 */ cvt.s.w $f0, $f0
/* 18747C 80258B9C 46020002 */ mul.s $f0, $f0, $f2
/* 187480 80258BA0 00000000 */ nop
/* 187484 80258BA4 86C2016A */ lh $v0, 0x16A($s6)
/* 187488 80258BA8 44050000 */ mfc1 $a1, $f0
/* 18748C 80258BAC 44820000 */ mtc1 $v0, $f0
/* 187490 80258BB0 00000000 */ nop
/* 187494 80258BB4 46800020 */ cvt.s.w $f0, $f0
/* 187498 80258BB8 46020002 */ mul.s $f0, $f0, $f2
/* 18749C 80258BBC 00000000 */ nop
/* 1874A0 80258BC0 86C2016C */ lh $v0, 0x16C($s6)
/* 1874A4 80258BC4 44060000 */ mfc1 $a2, $f0
/* 1874A8 80258BC8 44820000 */ mtc1 $v0, $f0
/* 1874AC 80258BCC 00000000 */ nop
/* 1874B0 80258BD0 46800020 */ cvt.s.w $f0, $f0
/* 1874B4 80258BD4 46020002 */ mul.s $f0, $f0, $f2
/* 1874B8 80258BD8 00000000 */ nop
/* 1874BC 80258BDC 27B301A0 */ addiu $s3, $sp, 0x1A0
/* 1874C0 80258BE0 44070000 */ mfc1 $a3, $f0
/* 1874C4 80258BE4 4480A000 */ mtc1 $zero, $f20
/* 1874C8 80258BE8 0C019E40 */ jal guTranslateF
/* 1874CC 80258BEC 0260202D */ daddu $a0, $s3, $zero
/* 1874D0 80258BF0 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1874D4 80258BF4 4481B000 */ mtc1 $at, $f22
/* 1874D8 80258BF8 E7B40010 */ swc1 $f20, 0x10($sp)
/* 1874DC 80258BFC 8EC5015C */ lw $a1, 0x15C($s6)
/* 1874E0 80258C00 4407A000 */ mfc1 $a3, $f20
/* 1874E4 80258C04 4406B000 */ mfc1 $a2, $f22
/* 1874E8 80258C08 0C019EC8 */ jal guRotateF
/* 1874EC 80258C0C 27A40020 */ addiu $a0, $sp, 0x20
/* 1874F0 80258C10 27B10060 */ addiu $s1, $sp, 0x60
/* 1874F4 80258C14 E7B40010 */ swc1 $f20, 0x10($sp)
/* 1874F8 80258C18 8EC50160 */ lw $a1, 0x160($s6)
/* 1874FC 80258C1C 4406A000 */ mfc1 $a2, $f20
/* 187500 80258C20 4407B000 */ mfc1 $a3, $f22
/* 187504 80258C24 0C019EC8 */ jal guRotateF
/* 187508 80258C28 0220202D */ daddu $a0, $s1, $zero
/* 18750C 80258C2C 27B000A0 */ addiu $s0, $sp, 0xA0
/* 187510 80258C30 4406A000 */ mfc1 $a2, $f20
/* 187514 80258C34 0200202D */ daddu $a0, $s0, $zero
/* 187518 80258C38 E7B60010 */ swc1 $f22, 0x10($sp)
/* 18751C 80258C3C 8EC50164 */ lw $a1, 0x164($s6)
/* 187520 80258C40 0C019EC8 */ jal guRotateF
/* 187524 80258C44 00C0382D */ daddu $a3, $a2, $zero
/* 187528 80258C48 0220202D */ daddu $a0, $s1, $zero
/* 18752C 80258C4C 27A50020 */ addiu $a1, $sp, 0x20
/* 187530 80258C50 27B10220 */ addiu $s1, $sp, 0x220
/* 187534 80258C54 0C019D80 */ jal guMtxCatF
/* 187538 80258C58 0220302D */ daddu $a2, $s1, $zero
/* 18753C 80258C5C 0220202D */ daddu $a0, $s1, $zero
/* 187540 80258C60 0200282D */ daddu $a1, $s0, $zero
/* 187544 80258C64 27B200E0 */ addiu $s2, $sp, 0xE0
/* 187548 80258C68 0C019D80 */ jal guMtxCatF
/* 18754C 80258C6C 0240302D */ daddu $a2, $s2, $zero
/* 187550 80258C70 C6C60170 */ lwc1 $f6, 0x170($s6)
/* 187554 80258C74 3C01802A */ lui $at, %hi(D_8029D390)
/* 187558 80258C78 D428D390 */ ldc1 $f8, %lo(D_8029D390)($at)
/* 18755C 80258C7C 460031A1 */ cvt.d.s $f6, $f6
/* 187560 80258C80 46283182 */ mul.d $f6, $f6, $f8
/* 187564 80258C84 00000000 */ nop
/* 187568 80258C88 C6C20174 */ lwc1 $f2, 0x174($s6)
/* 18756C 80258C8C 460010A1 */ cvt.d.s $f2, $f2
/* 187570 80258C90 46281082 */ mul.d $f2, $f2, $f8
/* 187574 80258C94 00000000 */ nop
/* 187578 80258C98 C6C40178 */ lwc1 $f4, 0x178($s6)
/* 18757C 80258C9C 46002121 */ cvt.d.s $f4, $f4
/* 187580 80258CA0 46282102 */ mul.d $f4, $f4, $f8
/* 187584 80258CA4 00000000 */ nop
/* 187588 80258CA8 C6C00188 */ lwc1 $f0, 0x188($s6)
/* 18758C 80258CAC 46000021 */ cvt.d.s $f0, $f0
/* 187590 80258CB0 46203182 */ mul.d $f6, $f6, $f0
/* 187594 80258CB4 00000000 */ nop
/* 187598 80258CB8 46201082 */ mul.d $f2, $f2, $f0
/* 18759C 80258CBC 00000000 */ nop
/* 1875A0 80258CC0 82E20074 */ lb $v0, 0x74($s7)
/* 1875A4 80258CC4 44820000 */ mtc1 $v0, $f0
/* 1875A8 80258CC8 00000000 */ nop
/* 1875AC 80258CCC 46800021 */ cvt.d.w $f0, $f0
/* 1875B0 80258CD0 46201082 */ mul.d $f2, $f2, $f0
/* 1875B4 80258CD4 00000000 */ nop
/* 1875B8 80258CD8 27B00120 */ addiu $s0, $sp, 0x120
/* 1875BC 80258CDC 46202120 */ cvt.s.d $f4, $f4
/* 1875C0 80258CE0 44072000 */ mfc1 $a3, $f4
/* 1875C4 80258CE4 462031A0 */ cvt.s.d $f6, $f6
/* 1875C8 80258CE8 44053000 */ mfc1 $a1, $f6
/* 1875CC 80258CEC 462010A0 */ cvt.s.d $f2, $f2
/* 1875D0 80258CF0 44061000 */ mfc1 $a2, $f2
/* 1875D4 80258CF4 0C019DF0 */ jal guScaleF
/* 1875D8 80258CF8 0200202D */ daddu $a0, $s0, $zero
/* 1875DC 80258CFC 0200202D */ daddu $a0, $s0, $zero
/* 1875E0 80258D00 0280282D */ daddu $a1, $s4, $zero
/* 1875E4 80258D04 0C019D80 */ jal guMtxCatF
/* 1875E8 80258D08 0220302D */ daddu $a2, $s1, $zero
/* 1875EC 80258D0C 0220202D */ daddu $a0, $s1, $zero
/* 1875F0 80258D10 0240282D */ daddu $a1, $s2, $zero
/* 1875F4 80258D14 27B00260 */ addiu $s0, $sp, 0x260
/* 1875F8 80258D18 0C019D80 */ jal guMtxCatF
/* 1875FC 80258D1C 0200302D */ daddu $a2, $s0, $zero
/* 187600 80258D20 0200202D */ daddu $a0, $s0, $zero
/* 187604 80258D24 0260282D */ daddu $a1, $s3, $zero
/* 187608 80258D28 0C019D80 */ jal guMtxCatF
/* 18760C 80258D2C 0220302D */ daddu $a2, $s1, $zero
/* 187610 80258D30 0220202D */ daddu $a0, $s1, $zero
/* 187614 80258D34 02A0282D */ daddu $a1, $s5, $zero
/* 187618 80258D38 0C019D80 */ jal guMtxCatF
/* 18761C 80258D3C 0200302D */ daddu $a2, $s0, $zero
/* 187620 80258D40 8EE50088 */ lw $a1, 0x88($s7)
/* 187624 80258D44 13C50004 */ beq $fp, $a1, .L80258D58
/* 187628 80258D48 00000000 */ nop
/* 18762C 80258D4C 8EE60090 */ lw $a2, 0x90($s7)
/* 187630 80258D50 0C0B76A3 */ jal spr_update_player_sprite
/* 187634 80258D54 0000202D */ daddu $a0, $zero, $zero
.L80258D58:
/* 187638 80258D58 3C014334 */ lui $at, (0x43340000 >> 16)
/* 18763C 80258D5C 4481A000 */ mtc1 $at, $f20
/* 187640 80258D60 00000000 */ nop
/* 187644 80258D64 4614D500 */ add.s $f20, $f26, $f20
/* 187648 80258D68 0C00A6C9 */ jal clamp_angle
/* 18764C 80258D6C 4600A306 */ mov.s $f12, $f20
/* 187650 80258D70 0000202D */ daddu $a0, $zero, $zero
/* 187654 80258D74 02E0282D */ daddu $a1, $s7, $zero
/* 187658 80258D78 4600038D */ trunc.w.s $f14, $f0
/* 18765C 80258D7C 44067000 */ mfc1 $a2, $f14
/* 187660 80258D80 0C097210 */ jal func_8025C840
/* 187664 80258D84 0080382D */ daddu $a3, $a0, $zero
/* 187668 80258D88 0C00A6C9 */ jal clamp_angle
/* 18766C 80258D8C 4600A306 */ mov.s $f12, $f20
/* 187670 80258D90 0000202D */ daddu $a0, $zero, $zero
/* 187674 80258D94 02E0282D */ daddu $a1, $s7, $zero
/* 187678 80258D98 4600038D */ trunc.w.s $f14, $f0
/* 18767C 80258D9C 44067000 */ mfc1 $a2, $f14
/* 187680 80258DA0 0C097332 */ jal func_8025CCC8
/* 187684 80258DA4 0080382D */ daddu $a3, $a0, $zero
/* 187688 80258DA8 0C00A6C9 */ jal clamp_angle
/* 18768C 80258DAC 4600A306 */ mov.s $f12, $f20
/* 187690 80258DB0 0000202D */ daddu $a0, $zero, $zero
/* 187694 80258DB4 02E0282D */ daddu $a1, $s7, $zero
/* 187698 80258DB8 4600038D */ trunc.w.s $f14, $f0
/* 18769C 80258DBC 44067000 */ mfc1 $a2, $f14
/* 1876A0 80258DC0 0200382D */ daddu $a3, $s0, $zero
/* 1876A4 80258DC4 0C09647B */ jal func_802591EC
/* 1876A8 80258DC8 AFA00010 */ sw $zero, 0x10($sp)
/* 1876AC 80258DCC 0C0973B2 */ jal func_8025CEC8
/* 1876B0 80258DD0 02E0202D */ daddu $a0, $s7, $zero
/* 1876B4 80258DD4 8FBF02C4 */ lw $ra, 0x2C4($sp)
/* 1876B8 80258DD8 8FBE02C0 */ lw $fp, 0x2C0($sp)
/* 1876BC 80258DDC 8FB702BC */ lw $s7, 0x2BC($sp)
/* 1876C0 80258DE0 8FB602B8 */ lw $s6, 0x2B8($sp)
/* 1876C4 80258DE4 8FB502B4 */ lw $s5, 0x2B4($sp)
/* 1876C8 80258DE8 8FB402B0 */ lw $s4, 0x2B0($sp)
/* 1876CC 80258DEC 8FB302AC */ lw $s3, 0x2AC($sp)
/* 1876D0 80258DF0 8FB202A8 */ lw $s2, 0x2A8($sp)
/* 1876D4 80258DF4 8FB102A4 */ lw $s1, 0x2A4($sp)
/* 1876D8 80258DF8 8FB002A0 */ lw $s0, 0x2A0($sp)
/* 1876DC 80258DFC D7BA02E0 */ ldc1 $f26, 0x2E0($sp)
/* 1876E0 80258E00 D7B802D8 */ ldc1 $f24, 0x2D8($sp)
/* 1876E4 80258E04 D7B602D0 */ ldc1 $f22, 0x2D0($sp)
/* 1876E8 80258E08 D7B402C8 */ ldc1 $f20, 0x2C8($sp)
/* 1876EC 80258E0C 03E00008 */ jr $ra
/* 1876F0 80258E10 27BD02E8 */ addiu $sp, $sp, 0x2E8
### DECOMPILED C INSTRUCTIONS:
void appendGfx_player_actor_blur(Actor* actor) {
Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation;
Matrix4f mtxScale;
Matrix4f mtxPivotOn, mtxPivotOff, mtxTranslate;
Matrix4f mtxTransform, mtxTemp;
s32 delay;
s32 num;
s32 yaw;
ActorPart* partTable;
DecorationTable* decorationTable;
f32 rotX, rotY, rotZ;
s32 prevOpacity;
s32 temp_v1;
s32 pivotOffsetX;
s32 pivotOffsetY;
s32 bufPos;
s32 newOpacityBase;
s32 newOpacityModulus;
f32 x, y, z;
partTable = actor->partsTable;
decorationTable = partTable->decorationTable;
if (decorationTable->effectType != 0) {
decorationTable->effectType--;
if (decorationTable->effectType == 0) {
actor->flags &= ~ACTOR_FLAG_BLUR_ENABLED;
return;
}
}
if (!(partTable->flags & ACTOR_PART_FLAG_INVISIBLE) && partTable->idleAnimations != NULL) {
delay = 0;
num = 0;
bufPos = decorationTable->unk_7D9;
while (1) {
bufPos--;
delay++;
if (bufPos < 0) {
bufPos = ARRAY_COUNT(decorationTable->posX) - 1;
}
if (bufPos == decorationTable->unk_7D9) {
break;
}
if (delay >= 3) {
delay = 0;
num++;
if (decorationTable->unk_7DA < num) {
break;
}
temp_v1 = partTable->opacity;
x = decorationTable->posX[bufPos];
y = decorationTable->posY[bufPos];
z = decorationTable->posZ[bufPos];
yaw = decorationTable->yaw[bufPos];
pivotOffsetX = decorationTable->rotationPivotOffsetX[bufPos];
pivotOffsetY = decorationTable->rotationPivotOffsetY[bufPos];
rotX = decorationTable->rotX[bufPos] * 2;
rotY = decorationTable->rotY[bufPos] * 2;
rotZ = decorationTable->rotZ[bufPos] * 2;
newOpacityBase = 120;
newOpacityModulus = 20;
if (temp_v1 < 50) {
newOpacityBase = 50;
newOpacityModulus = 8;
} else if (temp_v1 < 100) {
newOpacityBase = 70;
newOpacityModulus = 10;
} else if (temp_v1 < 150) {
newOpacityBase = 100;
newOpacityModulus = 15;
}
guTranslateF(mtxTranslate, x, y, z);
guTranslateF(mtxPivotOn, -pivotOffsetX, -pivotOffsetY, 0.0f);
guTranslateF(mtxPivotOff, pivotOffsetX, pivotOffsetY, 0.0f);
guRotateF(mtxRotX, rotX, 1.0f, 0.0f, 0.0f);
guRotateF(mtxRotY, rotY, 0.0f, 1.0f, 0.0f);
guRotateF(mtxRotZ, rotZ, 0.0f, 0.0f, 1.0f);
guMtxCatF(mtxRotX, mtxRotY, mtxTransform);
guMtxCatF(mtxTransform, mtxRotZ, mtxRotation);
guScaleF(mtxScale, actor->scale.x * SPRITE_WORLD_SCALE_D * actor->scalingFactor,
actor->scale.y * SPRITE_WORLD_SCALE_D * actor->scalingFactor * partTable->verticalStretch,
actor->scale.z * SPRITE_WORLD_SCALE_D);
guMtxCatF(mtxScale, mtxPivotOn, mtxTemp);
guMtxCatF(mtxTemp, mtxRotation, mtxTransform);
guMtxCatF(mtxTransform, mtxPivotOff, mtxTemp);
guMtxCatF(mtxTemp, mtxTranslate, mtxTransform);
prevOpacity = partTable->opacity;
partTable->opacity = newOpacityBase - (num * newOpacityModulus);
render_with_adjusted_palettes(SPRITE_MODE_PLAYER, partTable, clamp_angle(yaw + 180), mtxTransform, 1);
partTable->opacity = prevOpacity;
}
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel tattle_cam_pre_render
/* 16D968 8023F088 27BDFF80 */ addiu $sp, $sp, -0x80
/* 16D96C 8023F08C AFB40068 */ sw $s4, 0x68($sp)
/* 16D970 8023F090 0000A02D */ daddu $s4, $zero, $zero
/* 16D974 8023F094 3C03800A */ lui $v1, %hi(gCurrentCamID)
/* 16D978 8023F098 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1)
/* 16D97C 8023F09C 3C04800B */ lui $a0, %hi(gCameras)
/* 16D980 8023F0A0 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* 16D984 8023F0A4 AFBF007C */ sw $ra, 0x7C($sp)
/* 16D988 8023F0A8 AFBE0078 */ sw $fp, 0x78($sp)
/* 16D98C 8023F0AC AFB70074 */ sw $s7, 0x74($sp)
/* 16D990 8023F0B0 AFB60070 */ sw $s6, 0x70($sp)
/* 16D994 8023F0B4 AFB5006C */ sw $s5, 0x6C($sp)
/* 16D998 8023F0B8 AFB30064 */ sw $s3, 0x64($sp)
/* 16D99C 8023F0BC AFB20060 */ sw $s2, 0x60($sp)
/* 16D9A0 8023F0C0 AFB1005C */ sw $s1, 0x5C($sp)
/* 16D9A4 8023F0C4 AFB00058 */ sw $s0, 0x58($sp)
/* 16D9A8 8023F0C8 00031080 */ sll $v0, $v1, 2
/* 16D9AC 8023F0CC 00431021 */ addu $v0, $v0, $v1
/* 16D9B0 8023F0D0 00021080 */ sll $v0, $v0, 2
/* 16D9B4 8023F0D4 00431023 */ subu $v0, $v0, $v1
/* 16D9B8 8023F0D8 000218C0 */ sll $v1, $v0, 3
/* 16D9BC 8023F0DC 00431021 */ addu $v0, $v0, $v1
/* 16D9C0 8023F0E0 000210C0 */ sll $v0, $v0, 3
/* 16D9C4 8023F0E4 0C099EF7 */ jal hide_foreground_models_unchecked
/* 16D9C8 8023F0E8 0044B821 */ addu $s7, $v0, $a0
/* 16D9CC 8023F0EC 0C046EE9 */ jal is_world_fog_enabled
/* 16D9D0 8023F0F0 00000000 */ nop
/* 16D9D4 8023F0F4 10400043 */ beqz $v0, .L8023F204
/* 16D9D8 8023F0F8 27A40010 */ addiu $a0, $sp, 0x10
/* 16D9DC 8023F0FC 24140001 */ addiu $s4, $zero, 0x1
/* 16D9E0 8023F100 27A50014 */ addiu $a1, $sp, 0x14
/* 16D9E4 8023F104 27A60018 */ addiu $a2, $sp, 0x18
/* 16D9E8 8023F108 0C046EF6 */ jal get_world_fog_color
/* 16D9EC 8023F10C 27A7001C */ addiu $a3, $sp, 0x1C
/* 16D9F0 8023F110 27A40020 */ addiu $a0, $sp, 0x20
/* 16D9F4 8023F114 27A50021 */ addiu $a1, $sp, 0x21
/* 16D9F8 8023F118 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 16D9FC 8023F11C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 16DA00 8023F120 27A60022 */ addiu $a2, $sp, 0x22
/* 16DA04 8023F124 9442015C */ lhu $v0, 0x15C($v0)
/* 16DA08 8023F128 27A70023 */ addiu $a3, $sp, 0x23
/* 16DA0C 8023F12C 0C046FA0 */ jal get_background_color_blend
/* 16DA10 8023F130 AFA2001C */ sw $v0, 0x1C($sp)
/* 16DA14 8023F134 8FA3001C */ lw $v1, 0x1C($sp)
.L8023F138:
/* 16DA18 8023F138 240200FF */ addiu $v0, $zero, 0xFF
/* 16DA1C 8023F13C 1462000B */ bne $v1, $v0, .L8023F16C
/* 16DA20 8023F140 0000902D */ daddu $s2, $zero, $zero
/* 16DA24 8023F144 0280182D */ daddu $v1, $s4, $zero
/* 16DA28 8023F148 0040902D */ daddu $s2, $v0, $zero
/* 16DA2C 8023F14C 3C02802A */ lui $v0, %hi(D_8029F236)
/* 16DA30 8023F150 2442F236 */ addiu $v0, $v0, %lo(D_8029F236)
.L8023F154:
/* 16DA34 8023F154 A4430000 */ sh $v1, 0x0($v0)
/* 16DA38 8023F158 2652FFFF */ addiu $s2, $s2, -0x1
/* 16DA3C 8023F15C 0641FFFD */ bgez $s2, .L8023F154
.L8023F160:
/* 16DA40 8023F160 2442FFFE */ addiu $v0, $v0, -0x2
/* 16DA44 8023F164 0808FC81 */ j .L8023F204
/* 16DA48 8023F168 00000000 */ nop
.L8023F16C:
/* 16DA4C 8023F16C 3C13802A */ lui $s3, %hi(gTattleBgPalette)
/* 16DA50 8023F170 2673F038 */ addiu $s3, $s3, %lo(gTattleBgPalette)
.L8023F174:
/* 16DA54 8023F174 00121840 */ sll $v1, $s2, 1
/* 16DA58 8023F178 26520001 */ addiu $s2, $s2, 0x1
/* 16DA5C 8023F17C 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 16DA60 8023F180 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 16DA64 8023F184 8FA6001C */ lw $a2, 0x1C($sp)
/* 16DA68 8023F188 8C420158 */ lw $v0, 0x158($v0)
/* 16DA6C 8023F18C 8FA50018 */ lw $a1, 0x18($sp)
/* 16DA70 8023F190 00621821 */ addu $v1, $v1, $v0
/* 16DA74 8023F194 94700000 */ lhu $s0, 0x0($v1)
/* 16DA78 8023F198 000528C3 */ sra $a1, $a1, 3
/* 16DA7C 8023F19C 00102042 */ srl $a0, $s0, 1
/* 16DA80 8023F1A0 0C08FC18 */ jal blend_background_channel_COPY
/* 16DA84 8023F1A4 3084001F */ andi $a0, $a0, 0x1F
/* 16DA88 8023F1A8 00102182 */ srl $a0, $s0, 6
/* 16DA8C 8023F1AC 3084001F */ andi $a0, $a0, 0x1F
/* 16DA90 8023F1B0 0040882D */ daddu $s1, $v0, $zero
/* 16DA94 8023F1B4 8FA50014 */ lw $a1, 0x14($sp)
/* 16DA98 8023F1B8 8FA6001C */ lw $a2, 0x1C($sp)
/* 16DA9C 8023F1BC 0C08FC18 */ jal blend_background_channel_COPY
/* 16DAA0 8023F1C0 000528C3 */ sra $a1, $a1, 3
/* 16DAA4 8023F1C4 001022C2 */ srl $a0, $s0, 11
/* 16DAA8 8023F1C8 0040802D */ daddu $s0, $v0, $zero
/* 16DAAC 8023F1CC 8FA50010 */ lw $a1, 0x10($sp)
/* 16DAB0 8023F1D0 8FA6001C */ lw $a2, 0x1C($sp)
/* 16DAB4 8023F1D4 0C08FC18 */ jal blend_background_channel_COPY
/* 16DAB8 8023F1D8 000528C3 */ sra $a1, $a1, 3
/* 16DABC 8023F1DC 00118840 */ sll $s1, $s1, 1
/* 16DAC0 8023F1E0 00108180 */ sll $s0, $s0, 6
/* 16DAC4 8023F1E4 02308825 */ or $s1, $s1, $s0
/* 16DAC8 8023F1E8 000212C0 */ sll $v0, $v0, 11
/* 16DACC 8023F1EC 02228825 */ or $s1, $s1, $v0
/* 16DAD0 8023F1F0 36310001 */ ori $s1, $s1, 0x1
/* 16DAD4 8023F1F4 A6710000 */ sh $s1, 0x0($s3)
/* 16DAD8 8023F1F8 2A420100 */ slti $v0, $s2, 0x100
/* 16DADC 8023F1FC 1440FFDD */ bnez $v0, .L8023F174
/* 16DAE0 8023F200 26730002 */ addiu $s3, $s3, 0x2
.L8023F204:
/* 16DAE4 8023F204 3C0D8007 */ lui $t5, %hi(gGameStatusPtr)
/* 16DAE8 8023F208 8DAD419C */ lw $t5, %lo(gGameStatusPtr)($t5)
/* 16DAEC 8023F20C 95A20148 */ lhu $v0, 0x148($t5)
/* 16DAF0 8023F210 30420001 */ andi $v0, $v0, 0x1
/* 16DAF4 8023F214 104001ED */ beqz $v0, .L8023F9CC
/* 16DAF8 8023F218 3C03E300 */ lui $v1, (0xE3000A01 >> 16)
/* 16DAFC 8023F21C 34630A01 */ ori $v1, $v1, (0xE3000A01 & 0xFFFF)
/* 16DB00 8023F220 3C04E300 */ lui $a0, (0xE3000C00 >> 16)
/* 16DB04 8023F224 34840C00 */ ori $a0, $a0, (0xE3000C00 & 0xFFFF)
/* 16DB08 8023F228 3C05E300 */ lui $a1, (0xE3001001 >> 16)
/* 16DB0C 8023F22C 34A51001 */ ori $a1, $a1, (0xE3001001 & 0xFFFF)
/* 16DB10 8023F230 3C09FCFF */ lui $t1, (0xFCFFFFFF >> 16)
/* 16DB14 8023F234 3529FFFF */ ori $t1, $t1, (0xFCFFFFFF & 0xFFFF)
/* 16DB18 8023F238 3C08FFFC */ lui $t0, (0xFFFCF87C >> 16)
/* 16DB1C 8023F23C 3508F87C */ ori $t0, $t0, (0xFFFCF87C & 0xFFFF)
/* 16DB20 8023F240 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* 16DB24 8023F244 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* 16DB28 8023F248 3C07E300 */ lui $a3, (0xE3001201 >> 16)
/* 16DB2C 8023F24C 3C0B800A */ lui $t3, %hi(gMainGfxPos)
/* 16DB30 8023F250 256BA66C */ addiu $t3, $t3, %lo(gMainGfxPos)
/* 16DB34 8023F254 34E71201 */ ori $a3, $a3, (0xE3001201 & 0xFFFF)
/* 16DB38 8023F258 3C0CE700 */ lui $t4, (0xE7000000 >> 16)
/* 16DB3C 8023F25C 8D6A0000 */ lw $t2, 0x0($t3)
/* 16DB40 8023F260 3C014080 */ lui $at, (0x40800000 >> 16)
/* 16DB44 8023F264 44812000 */ mtc1 $at, $f4
/* 16DB48 8023F268 0140102D */ daddu $v0, $t2, $zero
/* 16DB4C 8023F26C 254A0008 */ addiu $t2, $t2, 0x8
/* 16DB50 8023F270 AD6A0000 */ sw $t2, 0x0($t3)
/* 16DB54 8023F274 AC4C0000 */ sw $t4, 0x0($v0)
/* 16DB58 8023F278 AC400004 */ sw $zero, 0x4($v0)
/* 16DB5C 8023F27C 25420008 */ addiu $v0, $t2, 0x8
/* 16DB60 8023F280 AD620000 */ sw $v0, 0x0($t3)
/* 16DB64 8023F284 3C020020 */ lui $v0, (0x200000 >> 16)
/* 16DB68 8023F288 AD420004 */ sw $v0, 0x4($t2)
/* 16DB6C 8023F28C 25420010 */ addiu $v0, $t2, 0x10
.L8023F290:
/* 16DB70 8023F290 AD430000 */ sw $v1, 0x0($t2)
/* 16DB74 8023F294 AD620000 */ sw $v0, 0x0($t3)
/* 16DB78 8023F298 25420018 */ addiu $v0, $t2, 0x18
/* 16DB7C 8023F29C AD440008 */ sw $a0, 0x8($t2)
/* 16DB80 8023F2A0 AD40000C */ sw $zero, 0xC($t2)
/* 16DB84 8023F2A4 AD620000 */ sw $v0, 0x0($t3)
/* 16DB88 8023F2A8 34028000 */ ori $v0, $zero, 0x8000
/* 16DB8C 8023F2AC AD420014 */ sw $v0, 0x14($t2)
/* 16DB90 8023F2B0 25420020 */ addiu $v0, $t2, 0x20
/* 16DB94 8023F2B4 AD450010 */ sw $a1, 0x10($t2)
/* 16DB98 8023F2B8 AD620000 */ sw $v0, 0x0($t3)
/* 16DB9C 8023F2BC AD490018 */ sw $t1, 0x18($t2)
/* 16DBA0 8023F2C0 AD48001C */ sw $t0, 0x1C($t2)
/* 16DBA4 8023F2C4 AD460020 */ sw $a2, 0x20($t2)
/* 16DBA8 8023F2C8 AD400024 */ sw $zero, 0x24($t2)
/* 16DBAC 8023F2CC AD470028 */ sw $a3, 0x28($t2)
/* 16DBB0 8023F2D0 AD40002C */ sw $zero, 0x2C($t2)
/* 16DBB4 8023F2D4 86E2000E */ lh $v0, 0xE($s7)
/* 16DBB8 8023F2D8 25430028 */ addiu $v1, $t2, 0x28
/* 16DBBC 8023F2DC AD630000 */ sw $v1, 0x0($t3)
/* 16DBC0 8023F2E0 44821000 */ mtc1 $v0, $f2
/* 16DBC4 8023F2E4 00000000 */ nop
/* 16DBC8 8023F2E8 468010A0 */ cvt.s.w $f2, $f2
/* 16DBCC 8023F2EC 46041082 */ mul.s $f2, $f2, $f4
/* 16DBD0 8023F2F0 00000000 */ nop
/* 16DBD4 8023F2F4 25430030 */ addiu $v1, $t2, 0x30
/* 16DBD8 8023F2F8 86E20010 */ lh $v0, 0x10($s7)
/* 16DBDC 8023F2FC 3C04ED00 */ lui $a0, (0xED000000 >> 16)
/* 16DBE0 8023F300 44820000 */ mtc1 $v0, $f0
/* 16DBE4 8023F304 00000000 */ nop
/* 16DBE8 8023F308 46800020 */ cvt.s.w $f0, $f0
/* 16DBEC 8023F30C 46040002 */ mul.s $f0, $f0, $f4
/* 16DBF0 8023F310 00000000 */ nop
/* 16DBF4 8023F314 AD630000 */ sw $v1, 0x0($t3)
/* 16DBF8 8023F318 4600118D */ trunc.w.s $f6, $f2
/* 16DBFC 8023F31C 44023000 */ mfc1 $v0, $f6
/* 16DC00 8023F320 00000000 */ nop
/* 16DC04 8023F324 30420FFF */ andi $v0, $v0, 0xFFF
/* 16DC08 8023F328 00021300 */ sll $v0, $v0, 12
/* 16DC0C 8023F32C 4600018D */ trunc.w.s $f6, $f0
/* 16DC10 8023F330 44033000 */ mfc1 $v1, $f6
/* 16DC14 8023F334 00000000 */ nop
/* 16DC18 8023F338 30630FFF */ andi $v1, $v1, 0xFFF
/* 16DC1C 8023F33C 00641825 */ or $v1, $v1, $a0
/* 16DC20 8023F340 00431025 */ or $v0, $v0, $v1
/* 16DC24 8023F344 AD420030 */ sw $v0, 0x30($t2)
/* 16DC28 8023F348 86E2000E */ lh $v0, 0xE($s7)
/* 16DC2C 8023F34C 86E4000A */ lh $a0, 0xA($s7)
/* 16DC30 8023F350 25430038 */ addiu $v1, $t2, 0x38
/* 16DC34 8023F354 AD630000 */ sw $v1, 0x0($t3)
/* 16DC38 8023F358 86E3000C */ lh $v1, 0xC($s7)
/* 16DC3C 8023F35C 00441021 */ addu $v0, $v0, $a0
/* 16DC40 8023F360 2442FFFF */ addiu $v0, $v0, -0x1
/* 16DC44 8023F364 44821000 */ mtc1 $v0, $f2
/* 16DC48 8023F368 00000000 */ nop
/* 16DC4C 8023F36C 468010A0 */ cvt.s.w $f2, $f2
/* 16DC50 8023F370 25440040 */ addiu $a0, $t2, 0x40
/* 16DC54 8023F374 86E20010 */ lh $v0, 0x10($s7)
/* 16DC58 8023F378 46041082 */ mul.s $f2, $f2, $f4
/* 16DC5C 8023F37C 00000000 */ nop
/* 16DC60 8023F380 AD640000 */ sw $a0, 0x0($t3)
/* 16DC64 8023F384 00431021 */ addu $v0, $v0, $v1
/* 16DC68 8023F388 2442FFFF */ addiu $v0, $v0, -0x1
/* 16DC6C 8023F38C 44820000 */ mtc1 $v0, $f0
/* 16DC70 8023F390 00000000 */ nop
/* 16DC74 8023F394 46800020 */ cvt.s.w $f0, $f0
/* 16DC78 8023F398 46040002 */ mul.s $f0, $f0, $f4
/* 16DC7C 8023F39C 00000000 */ nop
/* 16DC80 8023F3A0 AD4C0038 */ sw $t4, 0x38($t2)
/* 16DC84 8023F3A4 4600118D */ trunc.w.s $f6, $f2
/* 16DC88 8023F3A8 44023000 */ mfc1 $v0, $f6
/* 16DC8C 8023F3AC 00000000 */ nop
/* 16DC90 8023F3B0 30420FFF */ andi $v0, $v0, 0xFFF
/* 16DC94 8023F3B4 00021300 */ sll $v0, $v0, 12
/* 16DC98 8023F3B8 4600018D */ trunc.w.s $f6, $f0
/* 16DC9C 8023F3BC 44033000 */ mfc1 $v1, $f6
/* 16DCA0 8023F3C0 00000000 */ nop
/* 16DCA4 8023F3C4 30630FFF */ andi $v1, $v1, 0xFFF
/* 16DCA8 8023F3C8 00431025 */ or $v0, $v0, $v1
/* 16DCAC 8023F3CC AD420034 */ sw $v0, 0x34($t2)
/* 16DCB0 8023F3D0 16800024 */ bnez $s4, .L8023F464
/* 16DCB4 8023F3D4 AD40003C */ sw $zero, 0x3C($t2)
/* 16DCB8 8023F3D8 3C03F500 */ lui $v1, (0xF5000100 >> 16)
/* 16DCBC 8023F3DC 34630100 */ ori $v1, $v1, (0xF5000100 & 0xFFFF)
/* 16DCC0 8023F3E0 3C05073F */ lui $a1, (0x73FC000 >> 16)
/* 16DCC4 8023F3E4 34A5C000 */ ori $a1, $a1, (0x73FC000 & 0xFFFF)
/* 16DCC8 8023F3E8 25420048 */ addiu $v0, $t2, 0x48
/* 16DCCC 8023F3EC AD620000 */ sw $v0, 0x0($t3)
/* 16DCD0 8023F3F0 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* 16DCD4 8023F3F4 AD420040 */ sw $v0, 0x40($t2)
/* 16DCD8 8023F3F8 25420050 */ addiu $v0, $t2, 0x50
/* 16DCDC 8023F3FC AD620000 */ sw $v0, 0x0($t3)
/* 16DCE0 8023F400 8DA40158 */ lw $a0, 0x158($t5)
/* 16DCE4 8023F404 3C02E800 */ lui $v0, (0xE8000000 >> 16)
/* 16DCE8 8023F408 AD420048 */ sw $v0, 0x48($t2)
/* 16DCEC 8023F40C 25420058 */ addiu $v0, $t2, 0x58
/* 16DCF0 8023F410 AD40004C */ sw $zero, 0x4C($t2)
/* 16DCF4 8023F414 AD620000 */ sw $v0, 0x0($t3)
/* 16DCF8 8023F418 3C020700 */ lui $v0, (0x7000000 >> 16)
/* 16DCFC 8023F41C AD420054 */ sw $v0, 0x54($t2)
/* 16DD00 8023F420 25420060 */ addiu $v0, $t2, 0x60
/* 16DD04 8023F424 AD430050 */ sw $v1, 0x50($t2)
/* 16DD08 8023F428 AD620000 */ sw $v0, 0x0($t3)
/* 16DD0C 8023F42C 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* 16DD10 8023F430 AD420058 */ sw $v0, 0x58($t2)
/* 16DD14 8023F434 25420068 */ addiu $v0, $t2, 0x68
/* 16DD18 8023F438 AD40005C */ sw $zero, 0x5C($t2)
/* 16DD1C 8023F43C AD620000 */ sw $v0, 0x0($t3)
/* 16DD20 8023F440 3C02F000 */ lui $v0, (0xF0000000 >> 16)
/* 16DD24 8023F444 AD420060 */ sw $v0, 0x60($t2)
/* 16DD28 8023F448 25420070 */ addiu $v0, $t2, 0x70
/* 16DD2C 8023F44C AD450064 */ sw $a1, 0x64($t2)
/* 16DD30 8023F450 AD620000 */ sw $v0, 0x0($t3)
/* 16DD34 8023F454 AD4C0068 */ sw $t4, 0x68($t2)
/* 16DD38 8023F458 AD40006C */ sw $zero, 0x6C($t2)
/* 16DD3C 8023F45C 0808FD3C */ j .L8023F4F0
/* 16DD40 8023F460 AD440044 */ sw $a0, 0x44($t2)
.L8023F464:
/* 16DD44 8023F464 3C03F500 */ lui $v1, (0xF5000100 >> 16)
/* 16DD48 8023F468 34630100 */ ori $v1, $v1, (0xF5000100 & 0xFFFF)
/* 16DD4C 8023F46C 3C04073F */ lui $a0, (0x73FC000 >> 16)
/* 16DD50 8023F470 3484C000 */ ori $a0, $a0, (0x73FC000 & 0xFFFF)
/* 16DD54 8023F474 25420048 */ addiu $v0, $t2, 0x48
/* 16DD58 8023F478 AD620000 */ sw $v0, 0x0($t3)
/* 16DD5C 8023F47C 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* 16DD60 8023F480 AD420040 */ sw $v0, 0x40($t2)
/* 16DD64 8023F484 3C02802A */ lui $v0, %hi(gTattleBgPalette)
/* 16DD68 8023F488 2442F038 */ addiu $v0, $v0, %lo(gTattleBgPalette)
/* 16DD6C 8023F48C AD420044 */ sw $v0, 0x44($t2)
/* 16DD70 8023F490 25420050 */ addiu $v0, $t2, 0x50
/* 16DD74 8023F494 AD620000 */ sw $v0, 0x0($t3)
/* 16DD78 8023F498 3C02E800 */ lui $v0, (0xE8000000 >> 16)
/* 16DD7C 8023F49C AD420048 */ sw $v0, 0x48($t2)
/* 16DD80 8023F4A0 25420058 */ addiu $v0, $t2, 0x58
/* 16DD84 8023F4A4 AD40004C */ sw $zero, 0x4C($t2)
/* 16DD88 8023F4A8 AD620000 */ sw $v0, 0x0($t3)
/* 16DD8C 8023F4AC 3C020700 */ lui $v0, (0x7000000 >> 16)
/* 16DD90 8023F4B0 AD420054 */ sw $v0, 0x54($t2)
/* 16DD94 8023F4B4 25420060 */ addiu $v0, $t2, 0x60
/* 16DD98 8023F4B8 AD430050 */ sw $v1, 0x50($t2)
/* 16DD9C 8023F4BC AD620000 */ sw $v0, 0x0($t3)
/* 16DDA0 8023F4C0 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* 16DDA4 8023F4C4 AD420058 */ sw $v0, 0x58($t2)
/* 16DDA8 8023F4C8 25420068 */ addiu $v0, $t2, 0x68
/* 16DDAC 8023F4CC AD40005C */ sw $zero, 0x5C($t2)
/* 16DDB0 8023F4D0 AD620000 */ sw $v0, 0x0($t3)
/* 16DDB4 8023F4D4 3C02F000 */ lui $v0, (0xF0000000 >> 16)
/* 16DDB8 8023F4D8 AD420060 */ sw $v0, 0x60($t2)
/* 16DDBC 8023F4DC 25420070 */ addiu $v0, $t2, 0x70
/* 16DDC0 8023F4E0 AD440064 */ sw $a0, 0x64($t2)
/* 16DDC4 8023F4E4 AD620000 */ sw $v0, 0x0($t3)
/* 16DDC8 8023F4E8 AD4C0068 */ sw $t4, 0x68($t2)
/* 16DDCC 8023F4EC AD40006C */ sw $zero, 0x6C($t2)
.L8023F4F0:
/* 16DDD0 8023F4F0 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* 16DDD4 8023F4F4 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* 16DDD8 8023F4F8 846E014E */ lh $t6, 0x14E($v1)
/* 16DDDC 8023F4FC 24020800 */ addiu $v0, $zero, 0x800
/* 16DDE0 8023F500 15C00002 */ bnez $t6, .L8023F50C
/* 16DDE4 8023F504 004E001A */ div $zero, $v0, $t6
/* 16DDE8 8023F508 0007000D */ break 7
.L8023F50C:
/* 16DDEC 8023F50C 2401FFFF */ addiu $at, $zero, -0x1
/* 16DDF0 8023F510 15C10004 */ bne $t6, $at, .L8023F524
/* 16DDF4 8023F514 3C018000 */ lui $at, (0x80000000 >> 16)
/* 16DDF8 8023F518 14410002 */ bne $v0, $at, .L8023F524
/* 16DDFC 8023F51C 00000000 */ nop
/* 16DE00 8023F520 0006000D */ break 6
.L8023F524:
/* 16DE04 8023F524 00006812 */ mflo $t5
/* 16DE08 8023F528 84630150 */ lh $v1, 0x150($v1)
/* 16DE0C 8023F52C 15A00002 */ bnez $t5, .L8023F538
/* 16DE10 8023F530 006D001A */ div $zero, $v1, $t5
/* 16DE14 8023F534 0007000D */ break 7
.L8023F538:
/* 16DE18 8023F538 2401FFFF */ addiu $at, $zero, -0x1
/* 16DE1C 8023F53C 15A10004 */ bne $t5, $at, .L8023F550
/* 16DE20 8023F540 3C018000 */ lui $at, (0x80000000 >> 16)
/* 16DE24 8023F544 14610002 */ bne $v1, $at, .L8023F550
/* 16DE28 8023F548 00000000 */ nop
/* 16DE2C 8023F54C 0006000D */ break 6
.L8023F550:
/* 16DE30 8023F550 0000B012 */ mflo $s6
/* 16DE34 8023F554 0000A810 */ mfhi $s5
/* 16DE38 8023F558 AFA00028 */ sw $zero, 0x28($sp)
/* 16DE3C 8023F55C AFA30024 */ sw $v1, 0x24($sp)
/* 16DE40 8023F560 AFB5002C */ sw $s5, 0x2C($sp)
/* 16DE44 8023F564 86F8000E */ lh $t8, 0xE($s7)
/* 16DE48 8023F568 86F90010 */ lh $t9, 0x10($s7)
/* 16DE4C 8023F56C 1AC0008F */ blez $s6, .L8023F7AC
/* 16DE50 8023F570 0000902D */ daddu $s2, $zero, $zero
/* 16DE54 8023F574 3C0A800A */ lui $t2, %hi(gMainGfxPos)
/* 16DE58 8023F578 254AA66C */ addiu $t2, $t2, %lo(gMainGfxPos)
/* 16DE5C 8023F57C 25C2FFFF */ addiu $v0, $t6, -0x1
/* 16DE60 8023F580 30420FFF */ andi $v0, $v0, 0xFFF
/* 16DE64 8023F584 3C03FD48 */ lui $v1, (0xFD480000 >> 16)
/* 16DE68 8023F588 00431025 */ or $v0, $v0, $v1
/* 16DE6C 8023F58C 3C14F548 */ lui $s4, (0xF5484A00 >> 16)
/* 16DE70 8023F590 36944A00 */ ori $s4, $s4, (0xF5484A00 & 0xFFFF)
/* 16DE74 8023F594 AFA20030 */ sw $v0, 0x30($sp)
/* 16DE78 8023F598 2702FFFF */ addiu $v0, $t8, -0x1
/* 16DE7C 8023F59C 00021080 */ sll $v0, $v0, 2
/* 16DE80 8023F5A0 30420FFF */ andi $v0, $v0, 0xFFF
/* 16DE84 8023F5A4 00021300 */ sll $v0, $v0, 12
/* 16DE88 8023F5A8 000EAD40 */ sll $s5, $t6, 21
/* 16DE8C 8023F5AC 3C1EF100 */ lui $fp, (0xF1000000 >> 16)
/* 16DE90 8023F5B0 3C131000 */ lui $s3, (0x10000400 >> 16)
/* 16DE94 8023F5B4 36730400 */ ori $s3, $s3, (0x10000400 & 0xFFFF)
/* 16DE98 8023F5B8 AFA20034 */ sw $v0, 0x34($sp)
/* 16DE9C 8023F5BC 01D81021 */ addu $v0, $t6, $t8
/* 16DEA0 8023F5C0 2442FFFF */ addiu $v0, $v0, -0x1
/* 16DEA4 8023F5C4 00021080 */ sll $v0, $v0, 2
/* 16DEA8 8023F5C8 30420FFF */ andi $v0, $v0, 0xFFF
/* 16DEAC 8023F5CC 00021300 */ sll $v0, $v0, 12
/* 16DEB0 8023F5D0 AFA2003C */ sw $v0, 0x3C($sp)
/* 16DEB4 8023F5D4 00181080 */ sll $v0, $t8, 2
/* 16DEB8 8023F5D8 30420FFF */ andi $v0, $v0, 0xFFF
/* 16DEBC 8023F5DC 00021300 */ sll $v0, $v0, 12
/* 16DEC0 8023F5E0 AFB50038 */ sw $s5, 0x38($sp)
/* 16DEC4 8023F5E4 0040A82D */ daddu $s5, $v0, $zero
/* 16DEC8 8023F5E8 0320882D */ daddu $s1, $t9, $zero
/* 16DECC 8023F5EC 01A0802D */ daddu $s0, $t5, $zero
/* 16DED0 8023F5F0 0240782D */ daddu $t7, $s2, $zero
/* 16DED4 8023F5F4 AFA20050 */ sw $v0, 0x50($sp)
/* 16DED8 8023F5F8 AFB50040 */ sw $s5, 0x40($sp)
.L8023F5FC:
/* 16DEDC 8023F5FC 3C028028 */ lui $v0, %hi(gTattleBgTextureYOffset)
/* 16DEE0 8023F600 944209FA */ lhu $v0, %lo(gTattleBgTextureYOffset)($v0)
/* 16DEE4 8023F604 3C0C8007 */ lui $t4, %hi(gGameStatusPtr)
/* 16DEE8 8023F608 8D8C419C */ lw $t4, %lo(gGameStatusPtr)($t4)
/* 16DEEC 8023F60C 004F2021 */ addu $a0, $v0, $t7
/* 16DEF0 8023F610 00041400 */ sll $v0, $a0, 16
/* 16DEF4 8023F614 85830150 */ lh $v1, 0x150($t4)
/* 16DEF8 8023F618 00021403 */ sra $v0, $v0, 16
/* 16DEFC 8023F61C 0062182A */ slt $v1, $v1, $v0
/* 16DF00 8023F620 95820150 */ lhu $v0, 0x150($t4)
/* 16DF04 8023F624 10600002 */ beqz $v1, .L8023F630
/* 16DF08 8023F628 0080582D */ daddu $t3, $a0, $zero
/* 16DF0C 8023F62C 00825823 */ subu $t3, $a0, $v0
.L8023F630:
/* 16DF10 8023F630 3C080749 */ lui $t0, (0x749C014 >> 16)
/* 16DF14 8023F634 3508C014 */ ori $t0, $t0, (0x749C014 & 0xFFFF)
/* 16DF18 8023F638 3C090049 */ lui $t1, (0x49C014 >> 16)
/* 16DF1C 8023F63C 3529C014 */ ori $t1, $t1, (0x49C014 & 0xFFFF)
/* 16DF20 8023F640 00113080 */ sll $a2, $s1, 2
/* 16DF24 8023F644 022D8821 */ addu $s1, $s1, $t5
/* 16DF28 8023F648 2725FFFF */ addiu $a1, $t9, -0x1
/* 16DF2C 8023F64C 02052821 */ addu $a1, $s0, $a1
/* 16DF30 8023F650 020D8021 */ addu $s0, $s0, $t5
/* 16DF34 8023F654 00052880 */ sll $a1, $a1, 2
/* 16DF38 8023F658 8D430000 */ lw $v1, 0x0($t2)
/* 16DF3C 8023F65C 30A50FFF */ andi $a1, $a1, 0xFFF
/* 16DF40 8023F660 0060382D */ daddu $a3, $v1, $zero
/* 16DF44 8023F664 24630008 */ addiu $v1, $v1, 0x8
/* 16DF48 8023F668 24620008 */ addiu $v0, $v1, 0x8
/* 16DF4C 8023F66C AD430000 */ sw $v1, 0x0($t2)
/* 16DF50 8023F670 8FB50030 */ lw $s5, 0x30($sp)
/* 16DF54 8023F674 24640048 */ addiu $a0, $v1, 0x48
/* 16DF58 8023F678 ACF50000 */ sw $s5, 0x0($a3)
/* 16DF5C 8023F67C AD420000 */ sw $v0, 0x0($t2)
/* 16DF60 8023F680 24620010 */ addiu $v0, $v1, 0x10
/* 16DF64 8023F684 AD420000 */ sw $v0, 0x0($t2)
/* 16DF68 8023F688 24620018 */ addiu $v0, $v1, 0x18
/* 16DF6C 8023F68C AD420000 */ sw $v0, 0x0($t2)
/* 16DF70 8023F690 24620020 */ addiu $v0, $v1, 0x20
/* 16DF74 8023F694 AD420000 */ sw $v0, 0x0($t2)
/* 16DF78 8023F698 24620028 */ addiu $v0, $v1, 0x28
/* 16DF7C 8023F69C AD420000 */ sw $v0, 0x0($t2)
/* 16DF80 8023F6A0 24620030 */ addiu $v0, $v1, 0x30
/* 16DF84 8023F6A4 AD420000 */ sw $v0, 0x0($t2)
/* 16DF88 8023F6A8 24620038 */ addiu $v0, $v1, 0x38
/* 16DF8C 8023F6AC AD420000 */ sw $v0, 0x0($t2)
/* 16DF90 8023F6B0 24620040 */ addiu $v0, $v1, 0x40
/* 16DF94 8023F6B4 AD420000 */ sw $v0, 0x0($t2)
/* 16DF98 8023F6B8 000B1400 */ sll $v0, $t3, 16
/* 16DF9C 8023F6BC 00021403 */ sra $v0, $v0, 16
/* 16DFA0 8023F6C0 01C20018 */ mult $t6, $v0
/* 16DFA4 8023F6C4 AD440000 */ sw $a0, 0x0($t2)
/* 16DFA8 8023F6C8 8D840154 */ lw $a0, 0x154($t4)
/* 16DFAC 8023F6CC 24620050 */ addiu $v0, $v1, 0x50
/* 16DFB0 8023F6D0 AD420000 */ sw $v0, 0x0($t2)
/* 16DFB4 8023F6D4 3C020700 */ lui $v0, (0x7000000 >> 16)
/* 16DFB8 8023F6D8 0000A812 */ mflo $s5
/* 16DFBC 8023F6DC 00952021 */ addu $a0, $a0, $s5
/* 16DFC0 8023F6E0 ACE40004 */ sw $a0, 0x4($a3)
/* 16DFC4 8023F6E4 AC620004 */ sw $v0, 0x4($v1)
/* 16DFC8 8023F6E8 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* 16DFCC 8023F6EC AC620008 */ sw $v0, 0x8($v1)
/* 16DFD0 8023F6F0 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* 16DFD4 8023F6F4 AC620010 */ sw $v0, 0x10($v1)
/* 16DFD8 8023F6F8 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* 16DFDC 8023F6FC AC620018 */ sw $v0, 0x18($v1)
/* 16DFE0 8023F700 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* 16DFE4 8023F704 AC620028 */ sw $v0, 0x28($v1)
/* 16DFE8 8023F708 3C02E400 */ lui $v0, (0xE4000000 >> 16)
/* 16DFEC 8023F70C AC740000 */ sw $s4, 0x0($v1)
/* 16DFF0 8023F710 AC60000C */ sw $zero, 0xC($v1)
/* 16DFF4 8023F714 AC680014 */ sw $t0, 0x14($v1)
/* 16DFF8 8023F718 AC60001C */ sw $zero, 0x1C($v1)
/* 16DFFC 8023F71C AC740020 */ sw $s4, 0x20($v1)
/* 16E000 8023F720 AC600024 */ sw $zero, 0x24($v1)
/* 16E004 8023F724 AC69002C */ sw $t1, 0x2C($v1)
/* 16E008 8023F728 8FB50034 */ lw $s5, 0x34($sp)
/* 16E00C 8023F72C 00A22825 */ or $a1, $a1, $v0
/* 16E010 8023F730 02A51025 */ or $v0, $s5, $a1
/* 16E014 8023F734 AC620030 */ sw $v0, 0x30($v1)
/* 16E018 8023F738 8FB50050 */ lw $s5, 0x50($sp)
/* 16E01C 8023F73C 30C60FFF */ andi $a2, $a2, 0xFFF
/* 16E020 8023F740 02A61025 */ or $v0, $s5, $a2
/* 16E024 8023F744 3C15E100 */ lui $s5, (0xE1000000 >> 16)
/* 16E028 8023F748 AC620034 */ sw $v0, 0x34($v1)
/* 16E02C 8023F74C AC750038 */ sw $s5, 0x38($v1)
/* 16E030 8023F750 8FB50038 */ lw $s5, 0x38($sp)
/* 16E034 8023F754 01ED7821 */ addu $t7, $t7, $t5
/* 16E038 8023F758 AC75003C */ sw $s5, 0x3C($v1)
/* 16E03C 8023F75C AC7E0040 */ sw $fp, 0x40($v1)
/* 16E040 8023F760 AC730044 */ sw $s3, 0x44($v1)
/* 16E044 8023F764 8FB5003C */ lw $s5, 0x3C($sp)
/* 16E048 8023F768 26520001 */ addiu $s2, $s2, 0x1
/* 16E04C 8023F76C 02A52825 */ or $a1, $s5, $a1
/* 16E050 8023F770 AC650048 */ sw $a1, 0x48($v1)
/* 16E054 8023F774 8FB50040 */ lw $s5, 0x40($sp)
/* 16E058 8023F778 24620058 */ addiu $v0, $v1, 0x58
/* 16E05C 8023F77C 02A63025 */ or $a2, $s5, $a2
/* 16E060 8023F780 3C15E100 */ lui $s5, (0xE1000000 >> 16)
/* 16E064 8023F784 AC66004C */ sw $a2, 0x4C($v1)
/* 16E068 8023F788 AD420000 */ sw $v0, 0x0($t2)
/* 16E06C 8023F78C 24620060 */ addiu $v0, $v1, 0x60
/* 16E070 8023F790 AC750050 */ sw $s5, 0x50($v1)
/* 16E074 8023F794 AC600054 */ sw $zero, 0x54($v1)
/* 16E078 8023F798 AD420000 */ sw $v0, 0x0($t2)
/* 16E07C 8023F79C 0256102A */ slt $v0, $s2, $s6
/* 16E080 8023F7A0 AC7E0058 */ sw $fp, 0x58($v1)
/* 16E084 8023F7A4 1440FF95 */ bnez $v0, .L8023F5FC
/* 16E088 8023F7A8 AC73005C */ sw $s3, 0x5C($v1)
.L8023F7AC:
/* 16E08C 8023F7AC 8FB5002C */ lw $s5, 0x2C($sp)
/* 16E090 8023F7B0 12A00086 */ beqz $s5, .L8023F9CC
/* 16E094 8023F7B4 01B20018 */ mult $t5, $s2
/* 16E098 8023F7B8 3C0C8007 */ lui $t4, %hi(gGameStatusPtr)
/* 16E09C 8023F7BC 8D8C419C */ lw $t4, %lo(gGameStatusPtr)($t4)
/* 16E0A0 8023F7C0 3C028028 */ lui $v0, %hi(gTattleBgTextureYOffset)
/* 16E0A4 8023F7C4 944209FA */ lhu $v0, %lo(gTattleBgTextureYOffset)($v0)
/* 16E0A8 8023F7C8 85830150 */ lh $v1, 0x150($t4)
/* 16E0AC 8023F7CC 00006812 */ mflo $t5
/* 16E0B0 8023F7D0 004D2021 */ addu $a0, $v0, $t5
/* 16E0B4 8023F7D4 00041400 */ sll $v0, $a0, 16
/* 16E0B8 8023F7D8 00021403 */ sra $v0, $v0, 16
/* 16E0BC 8023F7DC 0062182A */ slt $v1, $v1, $v0
/* 16E0C0 8023F7E0 95820150 */ lhu $v0, 0x150($t4)
/* 16E0C4 8023F7E4 10600002 */ beqz $v1, .L8023F7F0
/* 16E0C8 8023F7E8 0080582D */ daddu $t3, $a0, $zero
/* 16E0CC 8023F7EC 00825823 */ subu $t3, $a0, $v0
.L8023F7F0:
/* 16E0D0 8023F7F0 3C08F548 */ lui $t0, (0xF5484A00 >> 16)
/* 16E0D4 8023F7F4 35084A00 */ ori $t0, $t0, (0xF5484A00 & 0xFFFF)
/* 16E0D8 8023F7F8 3C050749 */ lui $a1, (0x749C000 >> 16)
/* 16E0DC 8023F7FC 34A5C000 */ ori $a1, $a1, (0x749C000 & 0xFFFF)
/* 16E0E0 8023F800 3C090049 */ lui $t1, (0x49C000 >> 16)
/* 16E0E4 8023F804 3529C000 */ ori $t1, $t1, (0x49C000 & 0xFFFF)
/* 16E0E8 8023F808 3C0A1000 */ lui $t2, (0x10000400 >> 16)
/* 16E0EC 8023F80C 3C07800A */ lui $a3, %hi(gMainGfxPos)
/* 16E0F0 8023F810 24E7A66C */ addiu $a3, $a3, %lo(gMainGfxPos)
/* 16E0F4 8023F814 354A0400 */ ori $t2, $t2, (0x10000400 & 0xFFFF)
/* 16E0F8 8023F818 25C2FFFF */ addiu $v0, $t6, -0x1
/* 16E0FC 8023F81C 30420FFF */ andi $v0, $v0, 0xFFF
/* 16E100 8023F820 3C03FD48 */ lui $v1, (0xFD480000 >> 16)
/* 16E104 8023F824 8CE40000 */ lw $a0, 0x0($a3)
/* 16E108 8023F828 00431025 */ or $v0, $v0, $v1
/* 16E10C 8023F82C 0080302D */ daddu $a2, $a0, $zero
/* 16E110 8023F830 24840008 */ addiu $a0, $a0, 0x8
/* 16E114 8023F834 ACE40000 */ sw $a0, 0x0($a3)
/* 16E118 8023F838 ACC20000 */ sw $v0, 0x0($a2)
/* 16E11C 8023F83C 24820008 */ addiu $v0, $a0, 0x8
/* 16E120 8023F840 ACE20000 */ sw $v0, 0x0($a3)
/* 16E124 8023F844 24820010 */ addiu $v0, $a0, 0x10
/* 16E128 8023F848 ACE20000 */ sw $v0, 0x0($a3)
/* 16E12C 8023F84C 24820018 */ addiu $v0, $a0, 0x18
/* 16E130 8023F850 ACE20000 */ sw $v0, 0x0($a3)
/* 16E134 8023F854 24820020 */ addiu $v0, $a0, 0x20
/* 16E138 8023F858 ACE20000 */ sw $v0, 0x0($a3)
/* 16E13C 8023F85C 24820028 */ addiu $v0, $a0, 0x28
/* 16E140 8023F860 ACE20000 */ sw $v0, 0x0($a3)
/* 16E144 8023F864 24820030 */ addiu $v0, $a0, 0x30
/* 16E148 8023F868 ACE20000 */ sw $v0, 0x0($a3)
/* 16E14C 8023F86C 24820038 */ addiu $v0, $a0, 0x38
/* 16E150 8023F870 ACE20000 */ sw $v0, 0x0($a3)
/* 16E154 8023F874 24820040 */ addiu $v0, $a0, 0x40
/* 16E158 8023F878 ACE20000 */ sw $v0, 0x0($a3)
/* 16E15C 8023F87C 000B1400 */ sll $v0, $t3, 16
/* 16E160 8023F880 00021403 */ sra $v0, $v0, 16
/* 16E164 8023F884 24830048 */ addiu $v1, $a0, 0x48
/* 16E168 8023F888 01C20018 */ mult $t6, $v0
/* 16E16C 8023F88C ACE30000 */ sw $v1, 0x0($a3)
/* 16E170 8023F890 8D820154 */ lw $v0, 0x154($t4)
/* 16E174 8023F894 24830050 */ addiu $v1, $a0, 0x50
/* 16E178 8023F898 ACE30000 */ sw $v1, 0x0($a3)
/* 16E17C 8023F89C 0000A812 */ mflo $s5
/* 16E180 8023F8A0 00551021 */ addu $v0, $v0, $s5
/* 16E184 8023F8A4 ACC20004 */ sw $v0, 0x4($a2)
/* 16E188 8023F8A8 3C020700 */ lui $v0, (0x7000000 >> 16)
/* 16E18C 8023F8AC AC820004 */ sw $v0, 0x4($a0)
/* 16E190 8023F8B0 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* 16E194 8023F8B4 AC820008 */ sw $v0, 0x8($a0)
/* 16E198 8023F8B8 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* 16E19C 8023F8BC AC880000 */ sw $t0, 0x0($a0)
/* 16E1A0 8023F8C0 AC80000C */ sw $zero, 0xC($a0)
/* 16E1A4 8023F8C4 AC820010 */ sw $v0, 0x10($a0)
/* 16E1A8 8023F8C8 8FB5002C */ lw $s5, 0x2C($sp)
/* 16E1AC 8023F8CC 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* 16E1B0 8023F8D0 26A2FFFF */ addiu $v0, $s5, -0x1
/* 16E1B4 8023F8D4 00021080 */ sll $v0, $v0, 2
/* 16E1B8 8023F8D8 30420FFF */ andi $v0, $v0, 0xFFF
/* 16E1BC 8023F8DC 00452825 */ or $a1, $v0, $a1
/* 16E1C0 8023F8E0 AC830018 */ sw $v1, 0x18($a0)
/* 16E1C4 8023F8E4 3C03F200 */ lui $v1, (0xF2000000 >> 16)
/* 16E1C8 8023F8E8 00491025 */ or $v0, $v0, $t1
/* 16E1CC 8023F8EC AC850014 */ sw $a1, 0x14($a0)
/* 16E1D0 8023F8F0 2725FFFF */ addiu $a1, $t9, -0x1
/* 16E1D4 8023F8F4 AC830028 */ sw $v1, 0x28($a0)
/* 16E1D8 8023F8F8 3C03E400 */ lui $v1, (0xE4000000 >> 16)
/* 16E1DC 8023F8FC AC880020 */ sw $t0, 0x20($a0)
/* 16E1E0 8023F900 3C08E100 */ lui $t0, (0xE1000000 >> 16)
/* 16E1E4 8023F904 AC80001C */ sw $zero, 0x1C($a0)
/* 16E1E8 8023F908 AC800024 */ sw $zero, 0x24($a0)
/* 16E1EC 8023F90C AC82002C */ sw $v0, 0x2C($a0)
/* 16E1F0 8023F910 8FB50028 */ lw $s5, 0x28($sp)
/* 16E1F4 8023F914 3C09F100 */ lui $t1, (0xF1000000 >> 16)
/* 16E1F8 8023F918 02B83021 */ addu $a2, $s5, $t8
/* 16E1FC 8023F91C 24C2FFFF */ addiu $v0, $a2, -0x1
/* 16E200 8023F920 00021080 */ sll $v0, $v0, 2
/* 16E204 8023F924 30420FFF */ andi $v0, $v0, 0xFFF
/* 16E208 8023F928 00021300 */ sll $v0, $v0, 12
/* 16E20C 8023F92C 00063080 */ sll $a2, $a2, 2
/* 16E210 8023F930 30C60FFF */ andi $a2, $a2, 0xFFF
/* 16E214 8023F934 8FB50024 */ lw $s5, 0x24($sp)
/* 16E218 8023F938 00063300 */ sll $a2, $a2, 12
/* 16E21C 8023F93C 02A52821 */ addu $a1, $s5, $a1
/* 16E220 8023F940 00052880 */ sll $a1, $a1, 2
/* 16E224 8023F944 30A50FFF */ andi $a1, $a1, 0xFFF
/* 16E228 8023F948 00A32825 */ or $a1, $a1, $v1
/* 16E22C 8023F94C 00451025 */ or $v0, $v0, $a1
/* 16E230 8023F950 AC820030 */ sw $v0, 0x30($a0)
/* 16E234 8023F954 00181080 */ sll $v0, $t8, 2
/* 16E238 8023F958 30420FFF */ andi $v0, $v0, 0xFFF
/* 16E23C 8023F95C 00021300 */ sll $v0, $v0, 12
/* 16E240 8023F960 01B91821 */ addu $v1, $t5, $t9
/* 16E244 8023F964 00031880 */ sll $v1, $v1, 2
/* 16E248 8023F968 30630FFF */ andi $v1, $v1, 0xFFF
/* 16E24C 8023F96C 00431025 */ or $v0, $v0, $v1
/* 16E250 8023F970 AC820034 */ sw $v0, 0x34($a0)
/* 16E254 8023F974 000E1540 */ sll $v0, $t6, 21
/* 16E258 8023F978 AC82003C */ sw $v0, 0x3C($a0)
/* 16E25C 8023F97C 01D81021 */ addu $v0, $t6, $t8
/* 16E260 8023F980 2442FFFF */ addiu $v0, $v0, -0x1
/* 16E264 8023F984 00021080 */ sll $v0, $v0, 2
/* 16E268 8023F988 30420FFF */ andi $v0, $v0, 0xFFF
/* 16E26C 8023F98C 00021300 */ sll $v0, $v0, 12
/* 16E270 8023F990 00451025 */ or $v0, $v0, $a1
/* 16E274 8023F994 00C33025 */ or $a2, $a2, $v1
/* 16E278 8023F998 AC880038 */ sw $t0, 0x38($a0)
/* 16E27C 8023F99C AC890040 */ sw $t1, 0x40($a0)
/* 16E280 8023F9A0 AC8A0044 */ sw $t2, 0x44($a0)
/* 16E284 8023F9A4 AC820048 */ sw $v0, 0x48($a0)
/* 16E288 8023F9A8 24820058 */ addiu $v0, $a0, 0x58
/* 16E28C 8023F9AC AC86004C */ sw $a2, 0x4C($a0)
/* 16E290 8023F9B0 ACE20000 */ sw $v0, 0x0($a3)
/* 16E294 8023F9B4 24820060 */ addiu $v0, $a0, 0x60
/* 16E298 8023F9B8 AC880050 */ sw $t0, 0x50($a0)
/* 16E29C 8023F9BC AC800054 */ sw $zero, 0x54($a0)
/* 16E2A0 8023F9C0 ACE20000 */ sw $v0, 0x0($a3)
/* 16E2A4 8023F9C4 AC890058 */ sw $t1, 0x58($a0)
/* 16E2A8 8023F9C8 AC8A005C */ sw $t2, 0x5C($a0)
.L8023F9CC:
/* 16E2AC 8023F9CC 3C02DC08 */ lui $v0, (0xDC080008 >> 16)
/* 16E2B0 8023F9D0 34420008 */ ori $v0, $v0, (0xDC080008 & 0xFFFF)
/* 16E2B4 8023F9D4 3C04D9C0 */ lui $a0, (0xD9C0F9FB >> 16)
/* 16E2B8 8023F9D8 3484F9FB */ ori $a0, $a0, (0xD9C0F9FB & 0xFFFF)
/* 16E2BC 8023F9DC 3C15E300 */ lui $s5, (0xE3000A01 >> 16)
/* 16E2C0 8023F9E0 36B50A01 */ ori $s5, $s5, (0xE3000A01 & 0xFFFF)
/* 16E2C4 8023F9E4 3C05E300 */ lui $a1, (0xE3000800 >> 16)
/* 16E2C8 8023F9E8 34A50800 */ ori $a1, $a1, (0xE3000800 & 0xFFFF)
/* 16E2CC 8023F9EC 3C07E300 */ lui $a3, (0xE3000F00 >> 16)
/* 16E2D0 8023F9F0 34E70F00 */ ori $a3, $a3, (0xE3000F00 & 0xFFFF)
/* 16E2D4 8023F9F4 3C08E300 */ lui $t0, (0xE3001001 >> 16)
/* 16E2D8 8023F9F8 35081001 */ ori $t0, $t0, (0xE3001001 & 0xFFFF)
/* 16E2DC 8023F9FC 3C09E300 */ lui $t1, (0xE3000D01 >> 16)
/* 16E2E0 8023FA00 35290D01 */ ori $t1, $t1, (0xE3000D01 & 0xFFFF)
/* 16E2E4 8023FA04 3C0AE300 */ lui $t2, (0xE3000C00 >> 16)
/* 16E2E8 8023FA08 354A0C00 */ ori $t2, $t2, (0xE3000C00 & 0xFFFF)
/* 16E2EC 8023FA0C 3C0BE300 */ lui $t3, (0xE3001201 >> 16)
/* 16E2F0 8023FA10 356B1201 */ ori $t3, $t3, (0xE3001201 & 0xFFFF)
/* 16E2F4 8023FA14 3C0CE300 */ lui $t4, (0xE3001402 >> 16)
/* 16E2F8 8023FA18 358C1402 */ ori $t4, $t4, (0xE3001402 & 0xFFFF)
/* 16E2FC 8023FA1C 3C0EFCFF */ lui $t6, (0xFCFFFFFF >> 16)
/* 16E300 8023FA20 35CEFFFF */ ori $t6, $t6, (0xFCFFFFFF & 0xFFFF)
/* 16E304 8023FA24 3C0DFFFE */ lui $t5, (0xFFFE793C >> 16)
/* 16E308 8023FA28 35AD793C */ ori $t5, $t5, (0xFFFE793C & 0xFFFF)
/* 16E30C 8023FA2C 3C0FE300 */ lui $t7, (0xE3001700 >> 16)
/* 16E310 8023FA30 35EF1700 */ ori $t7, $t7, (0xE3001700 & 0xFFFF)
/* 16E314 8023FA34 3C11E200 */ lui $s1, (0xE2001E01 >> 16)
/* 16E318 8023FA38 36311E01 */ ori $s1, $s1, (0xE2001E01 & 0xFFFF)
/* 16E31C 8023FA3C 3C12E200 */ lui $s2, (0xE200001C >> 16)
/* 16E320 8023FA40 3652001C */ ori $s2, $s2, (0xE200001C & 0xFFFF)
/* 16E324 8023FA44 3C130F0A */ lui $s3, (0xF0A4000 >> 16)
/* 16E328 8023FA48 36734000 */ ori $s3, $s3, (0xF0A4000 & 0xFFFF)
/* 16E32C 8023FA4C 3C14E300 */ lui $s4, (0xE3001801 >> 16)
/* 16E330 8023FA50 36941801 */ ori $s4, $s4, (0xE3001801 & 0xFFFF)
/* 16E334 8023FA54 AFB50044 */ sw $s5, 0x44($sp)
/* 16E338 8023FA58 3C15DB04 */ lui $s5, (0xDB040004 >> 16)
/* 16E33C 8023FA5C 36B50004 */ ori $s5, $s5, (0xDB040004 & 0xFFFF)
/* 16E340 8023FA60 AFB50050 */ sw $s5, 0x50($sp)
/* 16E344 8023FA64 3C15DB04 */ lui $s5, (0xDB04000C >> 16)
/* 16E348 8023FA68 36B5000C */ ori $s5, $s5, (0xDB04000C & 0xFFFF)
/* 16E34C 8023FA6C 3C18DB04 */ lui $t8, (0xDB040014 >> 16)
/* 16E350 8023FA70 37180014 */ ori $t8, $t8, (0xDB040014 & 0xFFFF)
/* 16E354 8023FA74 3C19DB04 */ lui $t9, (0xDB04001C >> 16)
/* 16E358 8023FA78 3739001C */ ori $t9, $t9, (0xDB04001C & 0xFFFF)
/* 16E35C 8023FA7C 3C1E800A */ lui $fp, %hi(gMainGfxPos)
/* 16E360 8023FA80 27DEA66C */ addiu $fp, $fp, %lo(gMainGfxPos)
/* 16E364 8023FA84 3C16FF10 */ lui $s6, (0xFF10013F >> 16)
/* 16E368 8023FA88 36D6013F */ ori $s6, $s6, (0xFF10013F & 0xFFFF)
/* 16E36C 8023FA8C AFB50048 */ sw $s5, 0x48($sp)
/* 16E370 8023FA90 8FD00000 */ lw $s0, 0x0($fp)
/* 16E374 8023FA94 3C014080 */ lui $at, (0x40800000 >> 16)
/* 16E378 8023FA98 44812000 */ mtc1 $at, $f4
/* 16E37C 8023FA9C 0200182D */ daddu $v1, $s0, $zero
/* 16E380 8023FAA0 26100008 */ addiu $s0, $s0, 0x8
/* 16E384 8023FAA4 AFD00000 */ sw $s0, 0x0($fp)
/* 16E388 8023FAA8 AC620000 */ sw $v0, 0x0($v1)
/* 16E38C 8023FAAC 26E200A0 */ addiu $v0, $s7, 0xA0
/* 16E390 8023FAB0 AC620004 */ sw $v0, 0x4($v1)
/* 16E394 8023FAB4 26020008 */ addiu $v0, $s0, 0x8
/* 16E398 8023FAB8 AFC20000 */ sw $v0, 0x0($fp)
/* 16E39C 8023FABC 26020010 */ addiu $v0, $s0, 0x10
/* 16E3A0 8023FAC0 AE040000 */ sw $a0, 0x0($s0)
/* 16E3A4 8023FAC4 AE000004 */ sw $zero, 0x4($s0)
/* 16E3A8 8023FAC8 AFC20000 */ sw $v0, 0x0($fp)
/* 16E3AC 8023FACC 3C02D700 */ lui $v0, (0xD7000000 >> 16)
/* 16E3B0 8023FAD0 AE020008 */ sw $v0, 0x8($s0)
/* 16E3B4 8023FAD4 26020018 */ addiu $v0, $s0, 0x18
/* 16E3B8 8023FAD8 AE00000C */ sw $zero, 0xC($s0)
/* 16E3BC 8023FADC AFC20000 */ sw $v0, 0x0($fp)
/* 16E3C0 8023FAE0 26020020 */ addiu $v0, $s0, 0x20
/* 16E3C4 8023FAE4 8FB50044 */ lw $s5, 0x44($sp)
/* 16E3C8 8023FAE8 3C04ED00 */ lui $a0, (0xED000000 >> 16)
/* 16E3CC 8023FAEC AE000014 */ sw $zero, 0x14($s0)
/* 16E3D0 8023FAF0 AE150010 */ sw $s5, 0x10($s0)
/* 16E3D4 8023FAF4 AFC20000 */ sw $v0, 0x0($fp)
/* 16E3D8 8023FAF8 26020028 */ addiu $v0, $s0, 0x28
/* 16E3DC 8023FAFC AE050018 */ sw $a1, 0x18($s0)
/* 16E3E0 8023FB00 AE00001C */ sw $zero, 0x1C($s0)
/* 16E3E4 8023FB04 AFC20000 */ sw $v0, 0x0($fp)
/* 16E3E8 8023FB08 86E2000E */ lh $v0, 0xE($s7)
/* 16E3EC 8023FB0C 86E30010 */ lh $v1, 0x10($s7)
/* 16E3F0 8023FB10 44821000 */ mtc1 $v0, $f2
/* 16E3F4 8023FB14 00000000 */ nop
/* 16E3F8 8023FB18 468010A0 */ cvt.s.w $f2, $f2
/* 16E3FC 8023FB1C 46041082 */ mul.s $f2, $f2, $f4
/* 16E400 8023FB20 00000000 */ nop
/* 16E404 8023FB24 26020030 */ addiu $v0, $s0, 0x30
/* 16E408 8023FB28 44830000 */ mtc1 $v1, $f0
/* 16E40C 8023FB2C 00000000 */ nop
/* 16E410 8023FB30 46800020 */ cvt.s.w $f0, $f0
/* 16E414 8023FB34 AFC20000 */ sw $v0, 0x0($fp)
/* 16E418 8023FB38 26020038 */ addiu $v0, $s0, 0x38
/* 16E41C 8023FB3C 46040002 */ mul.s $f0, $f0, $f4
/* 16E420 8023FB40 00000000 */ nop
/* 16E424 8023FB44 AFC20000 */ sw $v0, 0x0($fp)
/* 16E428 8023FB48 4600118D */ trunc.w.s $f6, $f2
/* 16E42C 8023FB4C 44023000 */ mfc1 $v0, $f6
/* 16E430 8023FB50 00000000 */ nop
/* 16E434 8023FB54 30420FFF */ andi $v0, $v0, 0xFFF
/* 16E438 8023FB58 00021300 */ sll $v0, $v0, 12
/* 16E43C 8023FB5C 4600018D */ trunc.w.s $f6, $f0
/* 16E440 8023FB60 44033000 */ mfc1 $v1, $f6
/* 16E444 8023FB64 00000000 */ nop
/* 16E448 8023FB68 30630FFF */ andi $v1, $v1, 0xFFF
/* 16E44C 8023FB6C 00641825 */ or $v1, $v1, $a0
/* 16E450 8023FB70 00431025 */ or $v0, $v0, $v1
/* 16E454 8023FB74 AE020020 */ sw $v0, 0x20($s0)
/* 16E458 8023FB78 86E3000E */ lh $v1, 0xE($s7)
/* 16E45C 8023FB7C 86E5000A */ lh $a1, 0xA($s7)
/* 16E460 8023FB80 86E40010 */ lh $a0, 0x10($s7)
/* 16E464 8023FB84 86E6000C */ lh $a2, 0xC($s7)
/* 16E468 8023FB88 26020040 */ addiu $v0, $s0, 0x40
/* 16E46C 8023FB8C AFC20000 */ sw $v0, 0x0($fp)
/* 16E470 8023FB90 AE070028 */ sw $a3, 0x28($s0)
/* 16E474 8023FB94 AE00002C */ sw $zero, 0x2C($s0)
/* 16E478 8023FB98 00651821 */ addu $v1, $v1, $a1
/* 16E47C 8023FB9C 44831000 */ mtc1 $v1, $f2
/* 16E480 8023FBA0 00000000 */ nop
/* 16E484 8023FBA4 468010A0 */ cvt.s.w $f2, $f2
/* 16E488 8023FBA8 46041082 */ mul.s $f2, $f2, $f4
/* 16E48C 8023FBAC 00000000 */ nop
/* 16E490 8023FBB0 AE080030 */ sw $t0, 0x30($s0)
/* 16E494 8023FBB4 AE000034 */ sw $zero, 0x34($s0)
/* 16E498 8023FBB8 00862021 */ addu $a0, $a0, $a2
/* 16E49C 8023FBBC 44840000 */ mtc1 $a0, $f0
/* 16E4A0 8023FBC0 00000000 */ nop
/* 16E4A4 8023FBC4 46800020 */ cvt.s.w $f0, $f0
/* 16E4A8 8023FBC8 46040002 */ mul.s $f0, $f0, $f4
/* 16E4AC 8023FBCC 00000000 */ nop
/* 16E4B0 8023FBD0 AE090038 */ sw $t1, 0x38($s0)
/* 16E4B4 8023FBD4 4600118D */ trunc.w.s $f6, $f2
/* 16E4B8 8023FBD8 44023000 */ mfc1 $v0, $f6
/* 16E4BC 8023FBDC 00000000 */ nop
/* 16E4C0 8023FBE0 30420FFF */ andi $v0, $v0, 0xFFF
/* 16E4C4 8023FBE4 00021300 */ sll $v0, $v0, 12
/* 16E4C8 8023FBE8 4600018D */ trunc.w.s $f6, $f0
/* 16E4CC 8023FBEC 44033000 */ mfc1 $v1, $f6
/* 16E4D0 8023FBF0 00000000 */ nop
/* 16E4D4 8023FBF4 30630FFF */ andi $v1, $v1, 0xFFF
/* 16E4D8 8023FBF8 00431025 */ or $v0, $v0, $v1
/* 16E4DC 8023FBFC AE020024 */ sw $v0, 0x24($s0)
/* 16E4E0 8023FC00 26020048 */ addiu $v0, $s0, 0x48
/* 16E4E4 8023FC04 AE00003C */ sw $zero, 0x3C($s0)
/* 16E4E8 8023FC08 AFC20000 */ sw $v0, 0x0($fp)
/* 16E4EC 8023FC0C 3C020008 */ lui $v0, (0x80000 >> 16)
/* 16E4F0 8023FC10 AE020044 */ sw $v0, 0x44($s0)
/* 16E4F4 8023FC14 26020050 */ addiu $v0, $s0, 0x50
/* 16E4F8 8023FC18 AE0A0040 */ sw $t2, 0x40($s0)
/* 16E4FC 8023FC1C AFC20000 */ sw $v0, 0x0($fp)
/* 16E500 8023FC20 24022000 */ addiu $v0, $zero, 0x2000
/* 16E504 8023FC24 AE02004C */ sw $v0, 0x4C($s0)
/* 16E508 8023FC28 26020058 */ addiu $v0, $s0, 0x58
/* 16E50C 8023FC2C AE0B0048 */ sw $t3, 0x48($s0)
/* 16E510 8023FC30 AFC20000 */ sw $v0, 0x0($fp)
/* 16E514 8023FC34 24020C00 */ addiu $v0, $zero, 0xC00
/* 16E518 8023FC38 AE020054 */ sw $v0, 0x54($s0)
/* 16E51C 8023FC3C 26020060 */ addiu $v0, $s0, 0x60
/* 16E520 8023FC40 AE0C0050 */ sw $t4, 0x50($s0)
/* 16E524 8023FC44 AFC20000 */ sw $v0, 0x0($fp)
/* 16E528 8023FC48 26020068 */ addiu $v0, $s0, 0x68
/* 16E52C 8023FC4C AE0E0058 */ sw $t6, 0x58($s0)
/* 16E530 8023FC50 AE0D005C */ sw $t5, 0x5C($s0)
/* 16E534 8023FC54 AFC20000 */ sw $v0, 0x0($fp)
/* 16E538 8023FC58 26020070 */ addiu $v0, $s0, 0x70
/* 16E53C 8023FC5C AE0F0060 */ sw $t7, 0x60($s0)
/* 16E540 8023FC60 AE000064 */ sw $zero, 0x64($s0)
/* 16E544 8023FC64 AFC20000 */ sw $v0, 0x0($fp)
/* 16E548 8023FC68 26020078 */ addiu $v0, $s0, 0x78
/* 16E54C 8023FC6C AE110068 */ sw $s1, 0x68($s0)
/* 16E550 8023FC70 AE00006C */ sw $zero, 0x6C($s0)
/* 16E554 8023FC74 AFC20000 */ sw $v0, 0x0($fp)
/* 16E558 8023FC78 26020080 */ addiu $v0, $s0, 0x80
/* 16E55C 8023FC7C AE120070 */ sw $s2, 0x70($s0)
/* 16E560 8023FC80 AE130074 */ sw $s3, 0x74($s0)
/* 16E564 8023FC84 AFC20000 */ sw $v0, 0x0($fp)
/* 16E568 8023FC88 240200C0 */ addiu $v0, $zero, 0xC0
/* 16E56C 8023FC8C AE02007C */ sw $v0, 0x7C($s0)
/* 16E570 8023FC90 26020088 */ addiu $v0, $s0, 0x88
/* 16E574 8023FC94 24030002 */ addiu $v1, $zero, 0x2
/* 16E578 8023FC98 AE140078 */ sw $s4, 0x78($s0)
/* 16E57C 8023FC9C AFC20000 */ sw $v0, 0x0($fp)
/* 16E580 8023FCA0 26020090 */ addiu $v0, $s0, 0x90
/* 16E584 8023FCA4 3C12E700 */ lui $s2, (0xE7000000 >> 16)
/* 16E588 8023FCA8 8FB50050 */ lw $s5, 0x50($sp)
/* 16E58C 8023FCAC 3C130030 */ lui $s3, (0x300000 >> 16)
/* 16E590 8023FCB0 AE150080 */ sw $s5, 0x80($s0)
/* 16E594 8023FCB4 AE030084 */ sw $v1, 0x84($s0)
/* 16E598 8023FCB8 AFC20000 */ sw $v0, 0x0($fp)
/* 16E59C 8023FCBC 8FB50048 */ lw $s5, 0x48($sp)
/* 16E5A0 8023FCC0 26020098 */ addiu $v0, $s0, 0x98
/* 16E5A4 8023FCC4 AE150088 */ sw $s5, 0x88($s0)
/* 16E5A8 8023FCC8 AE03008C */ sw $v1, 0x8C($s0)
/* 16E5AC 8023FCCC 3403FFFE */ ori $v1, $zero, 0xFFFE
/* 16E5B0 8023FCD0 AFC20000 */ sw $v0, 0x0($fp)
/* 16E5B4 8023FCD4 260200A0 */ addiu $v0, $s0, 0xA0
/* 16E5B8 8023FCD8 AE180090 */ sw $t8, 0x90($s0)
/* 16E5BC 8023FCDC AE030094 */ sw $v1, 0x94($s0)
/* 16E5C0 8023FCE0 AFC20000 */ sw $v0, 0x0($fp)
/* 16E5C4 8023FCE4 3C04800A */ lui $a0, %hi(nuGfxZBuffer)
/* 16E5C8 8023FCE8 8C84A5DC */ lw $a0, %lo(nuGfxZBuffer)($a0)
/* 16E5CC 8023FCEC 260200A8 */ addiu $v0, $s0, 0xA8
/* 16E5D0 8023FCF0 AE190098 */ sw $t9, 0x98($s0)
/* 16E5D4 8023FCF4 AE03009C */ sw $v1, 0x9C($s0)
/* 16E5D8 8023FCF8 AFC20000 */ sw $v0, 0x0($fp)
/* 16E5DC 8023FCFC 260200B0 */ addiu $v0, $s0, 0xB0
/* 16E5E0 8023FD00 AE1200A0 */ sw $s2, 0xA0($s0)
/* 16E5E4 8023FD04 AE0000A4 */ sw $zero, 0xA4($s0)
/* 16E5E8 8023FD08 AFC20000 */ sw $v0, 0x0($fp)
/* 16E5EC 8023FD0C 8FB50044 */ lw $s5, 0x44($sp)
/* 16E5F0 8023FD10 260200B8 */ addiu $v0, $s0, 0xB8
/* 16E5F4 8023FD14 AE1300AC */ sw $s3, 0xAC($s0)
/* 16E5F8 8023FD18 AE1500A8 */ sw $s5, 0xA8($s0)
/* 16E5FC 8023FD1C AFC20000 */ sw $v0, 0x0($fp)
/* 16E600 8023FD20 0C0187A4 */ jal osVirtualToPhysical
/* 16E604 8023FD24 AE1600B0 */ sw $s6, 0xB0($s0)
/* 16E608 8023FD28 3C03FFFC */ lui $v1, (0xFFFCFFFC >> 16)
/* 16E60C 8023FD2C 8FD10000 */ lw $s1, 0x0($fp)
/* 16E610 8023FD30 3463FFFC */ ori $v1, $v1, (0xFFFCFFFC & 0xFFFF)
/* 16E614 8023FD34 AE0200B4 */ sw $v0, 0xB4($s0)
/* 16E618 8023FD38 3C10F700 */ lui $s0, (0xF7000000 >> 16)
/* 16E61C 8023FD3C 3C14F600 */ lui $s4, (0xF6000000 >> 16)
/* 16E620 8023FD40 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr)
/* 16E624 8023FD44 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0)
/* 16E628 8023FD48 0220102D */ daddu $v0, $s1, $zero
/* 16E62C 8023FD4C 26310008 */ addiu $s1, $s1, 0x8
/* 16E630 8023FD50 AFD10000 */ sw $s1, 0x0($fp)
/* 16E634 8023FD54 AC500000 */ sw $s0, 0x0($v0)
/* 16E638 8023FD58 AC430004 */ sw $v1, 0x4($v0)
/* 16E63C 8023FD5C 26220008 */ addiu $v0, $s1, 0x8
/* 16E640 8023FD60 AFC20000 */ sw $v0, 0x0($fp)
/* 16E644 8023FD64 86E3000E */ lh $v1, 0xE($s7)
/* 16E648 8023FD68 86E5000A */ lh $a1, 0xA($s7)
/* 16E64C 8023FD6C 26220010 */ addiu $v0, $s1, 0x10
/* 16E650 8023FD70 AFC20000 */ sw $v0, 0x0($fp)
/* 16E654 8023FD74 86E20010 */ lh $v0, 0x10($s7)
/* 16E658 8023FD78 00651821 */ addu $v1, $v1, $a1
/* 16E65C 8023FD7C 2463FFFF */ addiu $v1, $v1, -0x1
/* 16E660 8023FD80 306303FF */ andi $v1, $v1, 0x3FF
/* 16E664 8023FD84 86E5000C */ lh $a1, 0xC($s7)
/* 16E668 8023FD88 00031B80 */ sll $v1, $v1, 14
/* 16E66C 8023FD8C 00451021 */ addu $v0, $v0, $a1
/* 16E670 8023FD90 2442FFFF */ addiu $v0, $v0, -0x1
/* 16E674 8023FD94 304203FF */ andi $v0, $v0, 0x3FF
/* 16E678 8023FD98 00021080 */ sll $v0, $v0, 2
/* 16E67C 8023FD9C 00541025 */ or $v0, $v0, $s4
/* 16E680 8023FDA0 00621825 */ or $v1, $v1, $v0
/* 16E684 8023FDA4 AE230000 */ sw $v1, 0x0($s1)
/* 16E688 8023FDA8 96E2000E */ lhu $v0, 0xE($s7)
/* 16E68C 8023FDAC 96E50010 */ lhu $a1, 0x10($s7)
/* 16E690 8023FDB0 26230018 */ addiu $v1, $s1, 0x18
/* 16E694 8023FDB4 AFC30000 */ sw $v1, 0x0($fp)
/* 16E698 8023FDB8 AE320008 */ sw $s2, 0x8($s1)
/* 16E69C 8023FDBC AE20000C */ sw $zero, 0xC($s1)
/* 16E6A0 8023FDC0 AE360010 */ sw $s6, 0x10($s1)
/* 16E6A4 8023FDC4 304203FF */ andi $v0, $v0, 0x3FF
/* 16E6A8 8023FDC8 00021380 */ sll $v0, $v0, 14
/* 16E6AC 8023FDCC 30A503FF */ andi $a1, $a1, 0x3FF
/* 16E6B0 8023FDD0 00052880 */ sll $a1, $a1, 2
/* 16E6B4 8023FDD4 00451025 */ or $v0, $v0, $a1
/* 16E6B8 8023FDD8 0C0187A4 */ jal osVirtualToPhysical
/* 16E6BC 8023FDDC AE220004 */ sw $v0, 0x4($s1)
/* 16E6C0 8023FDE0 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* 16E6C4 8023FDE4 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* 16E6C8 8023FDE8 AE220014 */ sw $v0, 0x14($s1)
/* 16E6CC 8023FDEC 94620148 */ lhu $v0, 0x148($v1)
/* 16E6D0 8023FDF0 30420001 */ andi $v0, $v0, 0x1
/* 16E6D4 8023FDF4 14400034 */ bnez $v0, .L8023FEC8
/* 16E6D8 8023FDF8 26E400D4 */ addiu $a0, $s7, 0xD4
/* 16E6DC 8023FDFC 8FC50000 */ lw $a1, 0x0($fp)
/* 16E6E0 8023FE00 00A0102D */ daddu $v0, $a1, $zero
/* 16E6E4 8023FE04 24A50008 */ addiu $a1, $a1, 0x8
/* 16E6E8 8023FE08 AC550000 */ sw $s5, 0x0($v0)
/* 16E6EC 8023FE0C AC530004 */ sw $s3, 0x4($v0)
/* 16E6F0 8023FE10 ACB00000 */ sw $s0, 0x0($a1)
/* 16E6F4 8023FE14 86E4002C */ lh $a0, 0x2C($s7)
/* 16E6F8 8023FE18 AFC50000 */ sw $a1, 0x0($fp)
/* 16E6FC 8023FE1C 86E3002E */ lh $v1, 0x2E($s7)
/* 16E700 8023FE20 96E20030 */ lhu $v0, 0x30($s7)
/* 16E704 8023FE24 00042200 */ sll $a0, $a0, 8
/* 16E708 8023FE28 3084F800 */ andi $a0, $a0, 0xF800
/* 16E70C 8023FE2C 000318C0 */ sll $v1, $v1, 3
/* 16E710 8023FE30 306307C0 */ andi $v1, $v1, 0x7C0
/* 16E714 8023FE34 00832025 */ or $a0, $a0, $v1
/* 16E718 8023FE38 00021082 */ srl $v0, $v0, 2
/* 16E71C 8023FE3C 3042003E */ andi $v0, $v0, 0x3E
/* 16E720 8023FE40 00822025 */ or $a0, $a0, $v0
/* 16E724 8023FE44 34820001 */ ori $v0, $a0, 0x1
/* 16E728 8023FE48 00021400 */ sll $v0, $v0, 16
/* 16E72C 8023FE4C 34420001 */ ori $v0, $v0, 0x1
/* 16E730 8023FE50 00441025 */ or $v0, $v0, $a0
/* 16E734 8023FE54 ACA20004 */ sw $v0, 0x4($a1)
/* 16E738 8023FE58 86E3000E */ lh $v1, 0xE($s7)
/* 16E73C 8023FE5C 86E4000A */ lh $a0, 0xA($s7)
/* 16E740 8023FE60 24A20008 */ addiu $v0, $a1, 0x8
/* 16E744 8023FE64 AFC20000 */ sw $v0, 0x0($fp)
/* 16E748 8023FE68 86E20010 */ lh $v0, 0x10($s7)
/* 16E74C 8023FE6C 00641821 */ addu $v1, $v1, $a0
/* 16E750 8023FE70 2463FFFF */ addiu $v1, $v1, -0x1
/* 16E754 8023FE74 306303FF */ andi $v1, $v1, 0x3FF
/* 16E758 8023FE78 86E4000C */ lh $a0, 0xC($s7)
/* 16E75C 8023FE7C 00031B80 */ sll $v1, $v1, 14
/* 16E760 8023FE80 00441021 */ addu $v0, $v0, $a0
/* 16E764 8023FE84 2442FFFF */ addiu $v0, $v0, -0x1
/* 16E768 8023FE88 304203FF */ andi $v0, $v0, 0x3FF
/* 16E76C 8023FE8C 00021080 */ sll $v0, $v0, 2
/* 16E770 8023FE90 00541025 */ or $v0, $v0, $s4
/* 16E774 8023FE94 00621825 */ or $v1, $v1, $v0
/* 16E778 8023FE98 ACA30008 */ sw $v1, 0x8($a1)
/* 16E77C 8023FE9C 96E3000E */ lhu $v1, 0xE($s7)
/* 16E780 8023FEA0 24A20010 */ addiu $v0, $a1, 0x10
/* 16E784 8023FEA4 AFC20000 */ sw $v0, 0x0($fp)
/* 16E788 8023FEA8 96E20010 */ lhu $v0, 0x10($s7)
/* 16E78C 8023FEAC 306303FF */ andi $v1, $v1, 0x3FF
/* 16E790 8023FEB0 00031B80 */ sll $v1, $v1, 14
/* 16E794 8023FEB4 304203FF */ andi $v0, $v0, 0x3FF
/* 16E798 8023FEB8 00021080 */ sll $v0, $v0, 2
/* 16E79C 8023FEBC 00621825 */ or $v1, $v1, $v0
/* 16E7A0 8023FEC0 ACA3000C */ sw $v1, 0xC($a1)
/* 16E7A4 8023FEC4 26E400D4 */ addiu $a0, $s7, 0xD4
.L8023FEC8:
/* 16E7A8 8023FEC8 3C10800A */ lui $s0, %hi(gCurrentCamID)
/* 16E7AC 8023FECC 2610A634 */ addiu $s0, $s0, %lo(gCurrentCamID)
/* 16E7B0 8023FED0 3C11800A */ lui $s1, %hi(gDisplayContext)
/* 16E7B4 8023FED4 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext)
/* 16E7B8 8023FED8 8FC30000 */ lw $v1, 0x0($fp)
/* 16E7BC 8023FEDC 86050000 */ lh $a1, 0x0($s0)
/* 16E7C0 8023FEE0 8E220000 */ lw $v0, 0x0($s1)
/* 16E7C4 8023FEE4 0060302D */ daddu $a2, $v1, $zero
/* 16E7C8 8023FEE8 24630008 */ addiu $v1, $v1, 0x8
/* 16E7CC 8023FEEC 00052980 */ sll $a1, $a1, 6
/* 16E7D0 8023FEF0 24A50030 */ addiu $a1, $a1, 0x30
/* 16E7D4 8023FEF4 00452821 */ addu $a1, $v0, $a1
/* 16E7D8 8023FEF8 3C02DB0E */ lui $v0, (0xDB0E0000 >> 16)
/* 16E7DC 8023FEFC AFC30000 */ sw $v1, 0x0($fp)
/* 16E7E0 8023FF00 ACD20000 */ sw $s2, 0x0($a2)
/* 16E7E4 8023FF04 ACC00004 */ sw $zero, 0x4($a2)
/* 16E7E8 8023FF08 AC620000 */ sw $v0, 0x0($v1)
/* 16E7EC 8023FF0C 96E60038 */ lhu $a2, 0x38($s7)
/* 16E7F0 8023FF10 24620008 */ addiu $v0, $v1, 0x8
/* 16E7F4 8023FF14 AFC20000 */ sw $v0, 0x0($fp)
/* 16E7F8 8023FF18 0C019D40 */ jal guMtxF2L
/* 16E7FC 8023FF1C AC660004 */ sw $a2, 0x4($v1)
/* 16E800 8023FF20 3C05DA38 */ lui $a1, (0xDA380007 >> 16)
/* 16E804 8023FF24 34A50007 */ ori $a1, $a1, (0xDA380007 & 0xFFFF)
/* 16E808 8023FF28 8FC20000 */ lw $v0, 0x0($fp)
/* 16E80C 8023FF2C 86030000 */ lh $v1, 0x0($s0)
/* 16E810 8023FF30 0040202D */ daddu $a0, $v0, $zero
/* 16E814 8023FF34 24420008 */ addiu $v0, $v0, 0x8
/* 16E818 8023FF38 00031980 */ sll $v1, $v1, 6
/* 16E81C 8023FF3C AFC20000 */ sw $v0, 0x0($fp)
/* 16E820 8023FF40 AC850000 */ sw $a1, 0x0($a0)
/* 16E824 8023FF44 8E220000 */ lw $v0, 0x0($s1)
/* 16E828 8023FF48 24630030 */ addiu $v1, $v1, 0x30
/* 16E82C 8023FF4C 00431021 */ addu $v0, $v0, $v1
/* 16E830 8023FF50 AC820004 */ sw $v0, 0x4($a0)
/* 16E834 8023FF54 8FBF007C */ lw $ra, 0x7C($sp)
/* 16E838 8023FF58 8FBE0078 */ lw $fp, 0x78($sp)
/* 16E83C 8023FF5C 8FB70074 */ lw $s7, 0x74($sp)
/* 16E840 8023FF60 8FB60070 */ lw $s6, 0x70($sp)
/* 16E844 8023FF64 8FB5006C */ lw $s5, 0x6C($sp)
/* 16E848 8023FF68 8FB40068 */ lw $s4, 0x68($sp)
/* 16E84C 8023FF6C 8FB30064 */ lw $s3, 0x64($sp)
/* 16E850 8023FF70 8FB20060 */ lw $s2, 0x60($sp)
/* 16E854 8023FF74 8FB1005C */ lw $s1, 0x5C($sp)
/* 16E858 8023FF78 8FB00058 */ lw $s0, 0x58($sp)
/* 16E85C 8023FF7C 03E00008 */ jr $ra
/* 16E860 8023FF80 27BD0080 */ addiu $sp, $sp, 0x80
### DECOMPILED C INSTRUCTIONS:
void tattle_cam_pre_render(Camera* camera) {
Camera* cam = &gCameras[gCurrentCamID];
s32 fogEnabled = FALSE;
u8 r1, g1, b1, a1;
s32 fogR, fogG, fogB, fogA;
s32 i;
s32 lineHeight;
s32 numLines;
s32 bgWidth, bgHeight;
s32 posX, posY;
s32 texOffsetX;
s32 extraHeight;
s16 texOffsetY;
hide_foreground_models_unchecked();
if (is_world_fog_enabled()) {
fogEnabled = TRUE;
get_world_fog_color(&fogR, &fogG, &fogB, &fogA);
fogA = gGameStatusPtr->backgroundDarkness;
get_background_color_blend(&r1, &g1, &b1, &a1);
if (fogA == 255) {
for (i = 0; i < ARRAY_COUNT(gTattleBgPalette); i++) {
gTattleBgPalette[i] = 1;
}
} else {
for (i = 0; i < ARRAY_COUNT(gTattleBgPalette); i++) {
u16 palColor = gGameStatusPtr->backgroundPalette[i];
u16 blendedB = blend_background_channel_COPY((palColor >> 1) & 0x1F, fogB >> 3, fogA);
u16 blendedG = blend_background_channel_COPY((palColor >> 6) & 0x1F, fogG >> 3, fogA);
u16 blendedR = blend_background_channel_COPY((palColor >> 11) & 0x1F, fogR >> 3, fogA);
gTattleBgPalette[i] = blendedB << 1 | blendedG << 6 | blendedR << 11 | 1;
}
}
}
if (gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_TEXTURE) {
gDPPipeSync(gMainGfxPos++);
gDPSetCycleType(gMainGfxPos++, G_CYC_COPY);
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGB, G_CC_DECALRGB);
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, cam->viewportStartX, cam->viewportStartY, cam->viewportStartX + cam->viewportW - 1, cam->viewportStartY + cam->viewportH - 1);
gDPPipeSync(gMainGfxPos++);
if (!fogEnabled) {
gDPLoadTLUT_pal256(gMainGfxPos++, gGameStatusPtr->backgroundPalette);
} else {
gDPLoadTLUT_pal256(gMainGfxPos++, gTattleBgPalette);
}
bgWidth = gGameStatusPtr->backgroundMaxX;
bgHeight = gGameStatusPtr->backgroundMaxY;
texOffsetX = 0;
lineHeight = 2048 / bgWidth;
numLines = gGameStatusPtr->backgroundMaxY / lineHeight;
extraHeight = gGameStatusPtr->backgroundMaxY % lineHeight;
posX = cam->viewportStartX;
posY = cam->viewportStartY;
for (i = 0; i < numLines; i++) {
texOffsetY = gTattleBgTextureYOffset + lineHeight * i;
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
texOffsetY -= gGameStatusPtr->backgroundMaxY;
}
gDPLoadTextureTile(gMainGfxPos++, gGameStatusPtr->backgroundRaster + bgWidth * texOffsetY,
G_IM_FMT_CI, G_IM_SIZ_8b, bgWidth, 6,
0, 0, 295, 5, 0,
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gMainGfxPos++, posX * 4, (lineHeight * i + posY) * 4,
(texOffsetX + posX - 1) * 4, (lineHeight * i + lineHeight - 1 + posY) * 4,
G_TX_RENDERTILE, bgWidth * 32, 0, 4096, 1024);
gSPTextureRectangle(gMainGfxPos++, (texOffsetX + posX) * 4, (lineHeight * i + posY) * 4,
(bgWidth + posX - 1) * 4, (lineHeight * i + lineHeight - 1 + posY) * 4,
G_TX_RENDERTILE, 0, 0, 4096, 1024);
}
if (extraHeight != 0) {
texOffsetY = gTattleBgTextureYOffset + lineHeight * i;
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
texOffsetY -= gGameStatusPtr->backgroundMaxY;
}
gDPLoadTextureTile(gMainGfxPos++, gGameStatusPtr->backgroundRaster + bgWidth * texOffsetY,
G_IM_FMT_CI, G_IM_SIZ_8b, bgWidth, extraHeight,
0, 0, 295, extraHeight - 1, 0,
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gMainGfxPos++, posX * 4, (i * lineHeight + posY) * 4,
(texOffsetX + posX - 1) * 4, (bgHeight + - 1 + posY) * 4,
G_TX_RENDERTILE, bgWidth * 32, 0, 4096, 1024);
gSPTextureRectangle(gMainGfxPos++, (texOffsetX + posX) * 4, (i * lineHeight + posY) * 4,
(bgWidth + posX - 1) * 4, (bgHeight - 1 + posY) * 4,
G_TX_RENDERTILE, 0, 0, 4096, 1024);
}
}
gSPViewport(gMainGfxPos++, &cam->vp);
gSPClearGeometryMode(gMainGfxPos++, G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
gSPTexture(gMainGfxPos++, 0, 0, 0, G_TX_RENDERTILE, G_OFF);
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
gDPPipelineMode(gMainGfxPos++, G_PM_NPRIMITIVE);
gDPSetScissorFrac(gMainGfxPos++, G_SC_NON_INTERLACE, cam->viewportStartX * 4.0f, cam->viewportStartY * 4.0f, (cam->viewportStartX + cam->viewportW) * 4.0f, (cam->viewportStartY + cam->viewportH) * 4.0f);
gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP);
gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP);
gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP);
gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT);
gDPSetCombineMode(gMainGfxPos++, G_CC_SHADE, G_CC_SHADE);
gDPSetCombineKey(gMainGfxPos++, G_CK_NONE);
gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE);
gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
gSPClipRatio(gMainGfxPos++, FRUSTRATIO_2);
gDPPipeSync(gMainGfxPos++);
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxZBuffer));
gDPSetFillColor(gMainGfxPos++, PACK_FILL_DEPTH(G_MAXFBZ, 0));
gDPFillRectangle(gMainGfxPos++, cam->viewportStartX, cam->viewportStartY, cam->viewportStartX + cam->viewportW - 1, cam->viewportStartY + cam->viewportH - 1);
gDPPipeSync(gMainGfxPos++);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr));
if (!(gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_TEXTURE)) {
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
gDPSetFillColor(gMainGfxPos++, PACK_FILL_COLOR(cam->bgColor[0], cam->bgColor[1], cam->bgColor[2], 1));
gDPFillRectangle(gMainGfxPos++, cam->viewportStartX, cam->viewportStartY, cam->viewportStartX + cam->viewportW - 1, cam->viewportStartY + cam->viewportH - 1);
}
gDPPipeSync(gMainGfxPos++);
gSPPerspNormalize(gMainGfxPos++, cam->perspNorm);
guMtxF2L(cam->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCamID]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel action_update_parasol
/* E2A7D0 802B6120 27BDFFB0 */ addiu $sp, $sp, -0x50
.L802B6124:
/* E2A7D4 802B6124 AFB10024 */ sw $s1, 0x24($sp)
.L802B6128:
/* E2A7D8 802B6128 3C118011 */ lui $s1, %hi(gPlayerStatus)
/* E2A7DC 802B612C 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus)
/* E2A7E0 802B6130 AFB20028 */ sw $s2, 0x28($sp)
glabel .L802B6134
/* E2A7E4 802B6134 3C12802B */ lui $s2, %hi(ParasolTransformation)
/* E2A7E8 802B6138 26526E80 */ addiu $s2, $s2, %lo(ParasolTransformation)
.L802B613C:
/* E2A7EC 802B613C 3C038007 */ lui $v1, %hi(gCurrentCameraID)
.L802B6140:
/* E2A7F0 802B6140 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
.L802B6144:
/* E2A7F4 802B6144 3C04800B */ lui $a0, %hi(gCameras)
/* E2A7F8 802B6148 24841D80 */ addiu $a0, $a0, %lo(gCameras)
.L802B614C:
/* E2A7FC 802B614C AFBF0030 */ sw $ra, 0x30($sp)
.L802B6150:
/* E2A800 802B6150 AFB3002C */ sw $s3, 0x2C($sp)
.L802B6154:
/* E2A804 802B6154 AFB00020 */ sw $s0, 0x20($sp)
.L802B6158:
/* E2A808 802B6158 F7B80048 */ sdc1 $f24, 0x48($sp)
.L802B615C:
/* E2A80C 802B615C F7B60040 */ sdc1 $f22, 0x40($sp)
/* E2A810 802B6160 F7B40038 */ sdc1 $f20, 0x38($sp)
.L802B6164:
/* E2A814 802B6164 00031080 */ sll $v0, $v1, 2
.L802B6168:
/* E2A818 802B6168 00431021 */ addu $v0, $v0, $v1
/* E2A81C 802B616C 00021080 */ sll $v0, $v0, 2
glabel .L802B6170
/* E2A820 802B6170 00431023 */ subu $v0, $v0, $v1
glabel .L802B6174
/* E2A824 802B6174 000218C0 */ sll $v1, $v0, 3
/* E2A828 802B6178 00431021 */ addu $v0, $v0, $v1
.L802B617C:
/* E2A82C 802B617C 000210C0 */ sll $v0, $v0, 3
.L802B6180:
/* E2A830 802B6180 8E230000 */ lw $v1, 0x0($s1)
glabel .L802B6184
/* E2A834 802B6184 04610043 */ bgez $v1, func_802B6294
.L802B6188:
/* E2A838 802B6188 00449821 */ addu $s3, $v0, $a0
.L802B618C:
/* E2A83C 802B618C 3C027FFF */ lui $v0, (0x7FFFFFFF >> 16)
.L802B6190:
/* E2A840 802B6190 3442FFFF */ ori $v0, $v0, (0x7FFFFFFF & 0xFFFF)
.L802B6194:
/* E2A844 802B6194 0240202D */ daddu $a0, $s2, $zero
glabel func_802B6198
/* E2A848 802B6198 24050024 */ addiu $a1, $zero, 0x24
/* E2A84C 802B619C 00621024 */ and $v0, $v1, $v0
.L802B61A0:
/* E2A850 802B61A0 0C00A580 */ jal mem_clear
.L802B61A4:
/* E2A854 802B61A4 AE220000 */ sw $v0, 0x0($s1)
.L802B61A8:
/* E2A858 802B61A8 0C038045 */ jal disable_player_static_collisions
.L802B61AC:
/* E2A85C 802B61AC 00000000 */ nop
.L802B61B0:
/* E2A860 802B61B0 3C01C000 */ lui $at, (0xC0000000 >> 16)
.L802B61B4:
/* E2A864 802B61B4 44812000 */ mtc1 $at, $f4
/* E2A868 802B61B8 C62200A8 */ lwc1 $f2, 0xA8($s1)
/* E2A86C 802B61BC 3C0142B4 */ lui $at, (0x42B40000 >> 16)
glabel func_802B61C0
/* E2A870 802B61C0 44810000 */ mtc1 $at, $f0
/* E2A874 802B61C4 2643001C */ addiu $v1, $s2, 0x1C
.L802B61C8:
/* E2A878 802B61C8 A62000C0 */ sh $zero, 0xC0($s1)
.L802B61CC:
/* E2A87C 802B61CC A62000C2 */ sh $zero, 0xC2($s1)
/* E2A880 802B61D0 AE200054 */ sw $zero, 0x54($s1)
.L802B61D4:
/* E2A884 802B61D4 4602003E */ c.le.s $f0, $f2
.L802B61D8:
/* E2A888 802B61D8 00000000 */ nop
.L802B61DC:
/* E2A88C 802B61DC 4500000A */ bc1f .L802B6208
/* E2A890 802B61E0 AE20008C */ sw $zero, 0x8C($s1)
glabel func_802B61E4
/* E2A894 802B61E4 3C014387 */ lui $at, (0x43870000 >> 16)
.L802B61E8:
/* E2A898 802B61E8 44810000 */ mtc1 $at, $f0
.L802B61EC:
/* E2A89C 802B61EC 00000000 */ nop
.L802B61F0:
/* E2A8A0 802B61F0 4600103C */ c.lt.s $f2, $f0
.L802B61F4:
/* E2A8A4 802B61F4 00000000 */ nop
.L802B61F8:
/* E2A8A8 802B61F8 45000003 */ bc1f .L802B6208
.L802B61FC:
/* E2A8AC 802B61FC 00000000 */ nop
.L802B6200:
/* E2A8B0 802B6200 3C014000 */ lui $at, (0x40000000 >> 16)
.L802B6204:
/* E2A8B4 802B6204 44812000 */ mtc1 $at, $f4
glabel .L802B6208
/* E2A8B8 802B6208 8E220004 */ lw $v0, 0x4($s1)
/* E2A8BC 802B620C 30422000 */ andi $v0, $v0, 0x2000
.L802B6210:
/* E2A8C0 802B6210 14400009 */ bnez $v0, .L802B6238
.L802B6214:
/* E2A8C4 802B6214 E4640000 */ swc1 $f4, 0x0($v1)
glabel .L802B6218
/* E2A8C8 802B6218 24020014 */ addiu $v0, $zero, 0x14
/* E2A8CC 802B621C A6220008 */ sh $v0, 0x8($s1)
.L802B6220:
/* E2A8D0 802B6220 2402000F */ addiu $v0, $zero, 0xF
.L802B6224:
/* E2A8D4 802B6224 A22000B6 */ sb $zero, 0xB6($s1)
glabel .L802B6228
/* E2A8D8 802B6228 0C0AD800 */ jal parasol_get_npc
.L802B622C:
/* E2A8DC 802B622C AE420008 */ sw $v0, 0x8($s2)
glabel action_update_step_up_peach
/* E2A8E0 802B6230 080AD8A5 */ j func_802B6294
/* E2A8E4 802B6234 AE420000 */ sw $v0, 0x0($s2)
glabel .L802B6238
/* E2A8E8 802B6238 3C048011 */ lui $a0, %hi(PeachDisguiseNpcIndex)
glabel .L802B623C
/* E2A8EC 802B623C 8C84C96C */ lw $a0, %lo(PeachDisguiseNpcIndex)($a0)
glabel .L802B6240
/* E2A8F0 802B6240 24020014 */ addiu $v0, $zero, 0x14
glabel .L802B6244
/* E2A8F4 802B6244 A22200B6 */ sb $v0, 0xB6($s1)
glabel .L802B6248
/* E2A8F8 802B6248 24020028 */ addiu $v0, $zero, 0x28
/* E2A8FC 802B624C A6220008 */ sh $v0, 0x8($s1)
glabel .L802B6250
/* E2A900 802B6250 24020001 */ addiu $v0, $zero, 0x1
.L802B6254:
/* E2A904 802B6254 AE420004 */ sw $v0, 0x4($s2)
glabel .L802B6258
/* E2A908 802B6258 2402000C */ addiu $v0, $zero, 0xC
.L802B625C:
/* E2A90C 802B625C 0C00E2B7 */ jal get_npc_by_index
/* E2A910 802B6260 AE42000C */ sw $v0, 0xC($s2)
/* E2A914 802B6264 0040802D */ daddu $s0, $v0, $zero
.L802B6268:
/* E2A918 802B6268 240400FD */ addiu $a0, $zero, 0xFD
.L802B626C:
/* E2A91C 802B626C 0000282D */ daddu $a1, $zero, $zero
/* E2A920 802B6270 8E020000 */ lw $v0, 0x0($s0)
.L802B6274:
/* E2A924 802B6274 3C030004 */ lui $v1, (0x40000 >> 16)
glabel .L802B6278
/* E2A928 802B6278 00431025 */ or $v0, $v0, $v1
/* E2A92C 802B627C AE020000 */ sw $v0, 0x0($s0)
.L802B6280:
/* E2A930 802B6280 8E220000 */ lw $v0, 0x0($s1)
.L802B6284:
/* E2A934 802B6284 3C030010 */ lui $v1, (0x100000 >> 16)
glabel action_update_run
/* E2A938 802B6288 00431025 */ or $v0, $v0, $v1
/* E2A93C 802B628C 0C052736 */ jal sfx_play_sound_at_player
.L802B6290:
/* E2A940 802B6290 AE220000 */ sw $v0, 0x0($s1)
glabel func_802B6294
/* E2A944 802B6294 822300B6 */ lb $v1, 0xB6($s1)
glabel .L802B6298
/* E2A948 802B6298 2C620033 */ sltiu $v0, $v1, 0x33
/* E2A94C 802B629C 104001D4 */ beqz $v0, .L802B69F0
/* E2A950 802B62A0 00031080 */ sll $v0, $v1, 2
glabel func_802B62A4
/* E2A954 802B62A4 3C01802B */ lui $at, %hi(jtbl_802B6D90)
.L802B62A8:
/* E2A958 802B62A8 00220821 */ addu $at, $at, $v0
/* E2A95C 802B62AC 8C226D90 */ lw $v0, %lo(jtbl_802B6D90)($at)
jtbl_802B62B0:
/* E2A960 802B62B0 00400008 */ jr $v0
.L802B62B4:
/* E2A964 802B62B4 00000000 */ nop
glabel .L802B62B8
/* E2A968 802B62B8 C6220090 */ lwc1 $f2, 0x90($s1)
/* E2A96C 802B62BC 44800000 */ mtc1 $zero, $f0
/* E2A970 802B62C0 00000000 */ nop
/* E2A974 802B62C4 46001032 */ c.eq.s $f2, $f0
.L802B62C8:
/* E2A978 802B62C8 00000000 */ nop
glabel action_update_peach_land
/* E2A97C 802B62CC 45000015 */ bc1f .L802B6324
Munchlesia_LaunchVelocity:
/* E2A980 802B62D0 00000000 */ nop
Munchlesia_LateralVelocity:
/* E2A984 802B62D4 0C0399B1 */ jal peach_disguise_check_overlaps
Munchlesia_LaunchAccel:
/* E2A988 802B62D8 00000000 */ nop
Munchlesia_LaunchYaw:
/* E2A98C 802B62DC 0441000A */ bgez $v0, .L802B6308
D_802B62E0:
/* E2A990 802B62E0 3C04000C */ lui $a0, (0xC0024 >> 16)
.L802B62E4:
/* E2A994 802B62E4 0C037FBF */ jal suggest_player_anim_allow_backward
/* E2A998 802B62E8 34840024 */ ori $a0, $a0, (0xC0024 & 0xFFFF)
/* E2A99C 802B62EC 24040092 */ addiu $a0, $zero, 0x92
/* E2A9A0 802B62F0 0C052736 */ jal sfx_play_sound_at_player
/* E2A9A4 802B62F4 0000282D */ daddu $a1, $zero, $zero
glabel func_802B62F8
/* E2A9A8 802B62F8 922200B6 */ lbu $v0, 0xB6($s1)
.L802B62FC:
/* E2A9AC 802B62FC 24420001 */ addiu $v0, $v0, 0x1
D_802B6300:
/* E2A9B0 802B6300 080AD8C9 */ j .L802B6324
/* E2A9B4 802B6304 A22200B6 */ sb $v0, 0xB6($s1)
.L802B6308:
/* E2A9B8 802B6308 0C037FBF */ jal suggest_player_anim_allow_backward
.L802B630C:
/* E2A9BC 802B630C 34840027 */ ori $a0, $a0, (0xC0027 & 0xFFFF)
.L802B6310:
/* E2A9C0 802B6310 24020032 */ addiu $v0, $zero, 0x32
/* E2A9C4 802B6314 A22200B6 */ sb $v0, 0xB6($s1)
/* E2A9C8 802B6318 2402000A */ addiu $v0, $zero, 0xA
glabel .L802B631C
/* E2A9CC 802B631C A6220008 */ sh $v0, 0x8($s1)
.L802B6320:
/* E2A9D0 802B6320 AE400008 */ sw $zero, 0x8($s2)
glabel .L802B6324
/* E2A9D4 802B6324 96220008 */ lhu $v0, 0x8($s1)
.L802B6328:
/* E2A9D8 802B6328 2442FFFF */ addiu $v0, $v0, -0x1
glabel .L802B632C
/* E2A9DC 802B632C A6220008 */ sh $v0, 0x8($s1)
.L802B6330:
/* E2A9E0 802B6330 00021400 */ sll $v0, $v0, 16
/* E2A9E4 802B6334 144001AE */ bnez $v0, .L802B69F0
.L802B6338:
/* E2A9E8 802B6338 3C04000C */ lui $a0, (0xC0025 >> 16)
/* E2A9EC 802B633C 0C037FBF */ jal suggest_player_anim_allow_backward
.L802B6340:
/* E2A9F0 802B6340 34840025 */ ori $a0, $a0, (0xC0025 & 0xFFFF)
/* E2A9F4 802B6344 8E430000 */ lw $v1, 0x0($s2)
glabel func_802B6348
/* E2A9F8 802B6348 24020002 */ addiu $v0, $zero, 0x2
/* E2A9FC 802B634C 14600004 */ bnez $v1, D_802B6360
PlayerTweesterPhysicsPtr:
/* E2AA00 802B6350 A22200B6 */ sb $v0, 0xB6($s1)
glabel .L802B6354
/* E2AA04 802B6354 24020028 */ addiu $v0, $zero, 0x28
/* E2AA08 802B6358 080ADA7C */ j .L802B69F0
.L802B635C:
/* E2AA0C 802B635C A22200B6 */ sb $v0, 0xB6($s1)
D_802B6360:
/* E2AA10 802B6360 0C009C22 */ jal set_time_freeze_mode
.L802B6364:
/* E2AA14 802B6364 24040002 */ addiu $a0, $zero, 0x2
/* E2AA18 802B6368 080ADA7C */ j .L802B69F0
.L802B636C:
/* E2AA1C 802B636C 00000000 */ nop
glabel .L802B6370
/* E2AA20 802B6370 962200BC */ lhu $v0, 0xBC($s1)
.L802B6374:
/* E2AA24 802B6374 1040019E */ beqz $v0, .L802B69F0
/* E2AA28 802B6378 240400FD */ addiu $a0, $zero, 0xFD
glabel .L802B637C
/* E2AA2C 802B637C 0000282D */ daddu $a1, $zero, $zero
/* E2AA30 802B6380 2402000C */ addiu $v0, $zero, 0xC
/* E2AA34 802B6384 3C060010 */ lui $a2, (0x100000 >> 16)
/* E2AA38 802B6388 A6220008 */ sh $v0, 0x8($s1)
/* E2AA3C 802B638C 8E220000 */ lw $v0, 0x0($s1)
/* E2AA40 802B6390 922300B6 */ lbu $v1, 0xB6($s1)
glabel .L802B6394
/* E2AA44 802B6394 00461025 */ or $v0, $v0, $a2
.L802B6398:
/* E2AA48 802B6398 24630001 */ addiu $v1, $v1, 0x1
.L802B639C:
/* E2AA4C 802B639C AE220000 */ sw $v0, 0x0($s1)
/* E2AA50 802B63A0 0C052736 */ jal sfx_play_sound_at_player
/* E2AA54 802B63A4 A22300B6 */ sb $v1, 0xB6($s1)
.L802B63A8:
/* E2AA58 802B63A8 080ADA7C */ j .L802B69F0
.L802B63AC:
/* E2AA5C 802B63AC 00000000 */ nop
glabel .L802B63B0
/* E2AA60 802B63B0 96220008 */ lhu $v0, 0x8($s1)
/* E2AA64 802B63B4 2442FFFF */ addiu $v0, $v0, -0x1
/* E2AA68 802B63B8 A6220008 */ sh $v0, 0x8($s1)
/* E2AA6C 802B63BC 00021400 */ sll $v0, $v0, 16
.L802B63C0:
/* E2AA70 802B63C0 14400116 */ bnez $v0, .L802B681C
.L802B63C4:
/* E2AA74 802B63C4 2402000A */ addiu $v0, $zero, 0xA
.L802B63C8:
/* E2AA78 802B63C8 A6220008 */ sh $v0, 0x8($s1)
.L802B63CC:
/* E2AA7C 802B63CC 922200B6 */ lbu $v0, 0xB6($s1)
.L802B63D0:
/* E2AA80 802B63D0 2403000A */ addiu $v1, $zero, 0xA
glabel action_update_first_strike
/* E2AA84 802B63D4 080ADA05 */ j .L802B6814
.L802B63D8:
/* E2AA88 802B63D8 AE43000C */ sw $v1, 0xC($s2)
glabel .L802B63DC
/* E2AA8C 802B63DC C63400A8 */ lwc1 $f20, 0xA8($s1)
.L802B63E0:
/* E2AA90 802B63E0 0C0ADB3C */ jal func_802B6CF0_E2B3A0
.L802B63E4:
/* E2AA94 802B63E4 00000000 */ nop
/* E2AA98 802B63E8 C66C006C */ lwc1 $f12, 0x6C($s3)
/* E2AA9C 802B63EC C62000A8 */ lwc1 $f0, 0xA8($s1)
.L802B63F0:
/* E2AAA0 802B63F0 46006301 */ sub.s $f12, $f12, $f0
.L802B63F4:
/* E2AAA4 802B63F4 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* E2AAA8 802B63F8 44810000 */ mtc1 $at, $f0
/* E2AAAC 802B63FC 0C00A6C9 */ jal clamp_angle
.L802B6400:
/* E2AAB0 802B6400 46006301 */ sub.s $f12, $f12, $f0
/* E2AAB4 802B6404 86220008 */ lh $v0, 0x8($s1)
/* E2AAB8 802B6408 96230008 */ lhu $v1, 0x8($s1)
.L802B640C:
/* E2AABC 802B640C 144000F7 */ bnez $v0, .L802B67EC
/* E2AAC0 802B6410 E6200080 */ swc1 $f0, 0x80($s1)
.L802B6414:
/* E2AAC4 802B6414 C642001C */ lwc1 $f2, 0x1C($s2)
.L802B6418:
/* E2AAC8 802B6418 44800000 */ mtc1 $zero, $f0
/* E2AACC 802B641C 00000000 */ nop
.L802B6420:
/* E2AAD0 802B6420 4602003C */ c.lt.s $f0, $f2
.L802B6424:
/* E2AAD4 802B6424 00000000 */ nop
.L802B6428:
/* E2AAD8 802B6428 45000010 */ bc1f .L802B646C
.L802B642C:
/* E2AADC 802B642C 0000102D */ daddu $v0, $zero, $zero
D_802B6430:
/* E2AAE0 802B6430 3C014387 */ lui $at, (0x43870000 >> 16)
/* E2AAE4 802B6434 44811000 */ mtc1 $at, $f2
/* E2AAE8 802B6438 00000000 */ nop
/* E2AAEC 802B643C 4602A03C */ c.lt.s $f20, $f2
/* E2AAF0 802B6440 00000000 */ nop
/* E2AAF4 802B6444 45000006 */ bc1f .L802B6460
.L802B6448:
/* E2AAF8 802B6448 00000000 */ nop
glabel action_update_peach_step_down_land
/* E2AAFC 802B644C C62000A8 */ lwc1 $f0, 0xA8($s1)
.L802B6450:
/* E2AB00 802B6450 4600103E */ c.le.s $f2, $f0
.L802B6454:
/* E2AB04 802B6454 00000000 */ nop
/* E2AB08 802B6458 45030001 */ bc1tl .L802B6460
/* E2AB0C 802B645C 24020001 */ addiu $v0, $zero, 0x1
.L802B6460:
/* E2AB10 802B6460 C642001C */ lwc1 $f2, 0x1C($s2)
.L802B6464:
/* E2AB14 802B6464 44800000 */ mtc1 $zero, $f0
/* E2AB18 802B6468 00000000 */ nop
glabel .L802B646C
/* E2AB1C 802B646C 4600103C */ c.lt.s $f2, $f0
/* E2AB20 802B6470 00000000 */ nop
/* E2AB24 802B6474 4500000D */ bc1f .L802B64AC
glabel action_update_raise_arms
/* E2AB28 802B6478 00000000 */ nop
glabel action_update_peach_falling
/* E2AB2C 802B647C 3C014387 */ lui $at, (0x43870000 >> 16)
/* E2AB30 802B6480 44811000 */ mtc1 $at, $f2
/* E2AB34 802B6484 00000000 */ nop
/* E2AB38 802B6488 4614103C */ c.lt.s $f2, $f20
.L802B648C:
/* E2AB3C 802B648C 00000000 */ nop
.L802B6490:
/* E2AB40 802B6490 45000006 */ bc1f .L802B64AC
.L802B6494:
/* E2AB44 802B6494 00000000 */ nop
/* E2AB48 802B6498 C62000A8 */ lwc1 $f0, 0xA8($s1)
/* E2AB4C 802B649C 4602003E */ c.le.s $f0, $f2
.L802B64A0:
/* E2AB50 802B64A0 00000000 */ nop
/* E2AB54 802B64A4 45030001 */ bc1tl .L802B64AC
glabel .L802B64A8
/* E2AB58 802B64A8 24020001 */ addiu $v0, $zero, 0x1
.L802B64AC:
/* E2AB5C 802B64AC 10400150 */ beqz $v0, .L802B69F0
/* E2AB60 802B64B0 24020006 */ addiu $v0, $zero, 0x6
.L802B64B4:
/* E2AB64 802B64B4 8224000D */ lb $a0, 0xD($s1)
/* E2AB68 802B64B8 A22200B6 */ sb $v0, 0xB6($s1)
/* E2AB6C 802B64BC 24020002 */ addiu $v0, $zero, 0x2
/* E2AB70 802B64C0 0C03995F */ jal peach_make_disguise_npc
.L802B64C4:
/* E2AB74 802B64C4 A6220008 */ sh $v0, 0x8($s1)
/* E2AB78 802B64C8 10400149 */ beqz $v0, .L802B69F0
.L802B64CC:
/* E2AB7C 802B64CC 24020005 */ addiu $v0, $zero, 0x5
.L802B64D0:
/* E2AB80 802B64D0 0C039940 */ jal peach_sync_disguise_npc
.L802B64D4:
/* E2AB84 802B64D4 A22200B6 */ sb $v0, 0xB6($s1)
.L802B64D8:
/* E2AB88 802B64D8 080ADA7C */ j .L802B69F0
glabel .L802B64DC
/* E2AB8C 802B64DC 00000000 */ nop
glabel .L802B64E0
/* E2AB90 802B64E0 8E220004 */ lw $v0, 0x4($s1)
/* E2AB94 802B64E4 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* E2AB98 802B64E8 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
.L802B64EC:
/* E2AB9C 802B64EC 34422000 */ ori $v0, $v0, 0x2000
glabel .L802B64F0
/* E2ABA0 802B64F0 AE220004 */ sw $v0, 0x4($s1)
/* E2ABA4 802B64F4 9062007E */ lbu $v0, 0x7E($v1)
.L802B64F8:
/* E2ABA8 802B64F8 34420002 */ ori $v0, $v0, 0x2
/* E2ABAC 802B64FC A062007E */ sb $v0, 0x7E($v1)
/* E2ABB0 802B6500 922200B6 */ lbu $v0, 0xB6($s1)
/* E2ABB4 802B6504 24420001 */ addiu $v0, $v0, 0x1
glabel action_update_pushing_block
/* E2ABB8 802B6508 080AD9FE */ j .L802B67F8
.L802B650C:
/* E2ABBC 802B650C A22200B6 */ sb $v0, 0xB6($s1)
glabel .L802B6510
/* E2ABC0 802B6510 C640001C */ lwc1 $f0, 0x1C($s2)
/* E2ABC4 802B6514 44802000 */ mtc1 $zero, $f4
/* E2ABC8 802B6518 00000000 */ nop
.L802B651C:
/* E2ABCC 802B651C 4600203C */ c.lt.s $f4, $f0
.L802B6520:
/* E2ABD0 802B6520 00000000 */ nop
.L802B6524:
/* E2ABD4 802B6524 4500001B */ bc1f .L802B6594
/* E2ABD8 802B6528 00000000 */ nop
/* E2ABDC 802B652C C6400020 */ lwc1 $f0, 0x20($s2)
.L802B6530:
/* E2ABE0 802B6530 3C01802B */ lui $at, %hi(D_802B6E60_E2B510)
.L802B6534:
/* E2ABE4 802B6534 D4226E60 */ ldc1 $f2, %lo(D_802B6E60_E2B510)($at)
/* E2ABE8 802B6538 46000021 */ cvt.d.s $f0, $f0
/* E2ABEC 802B653C 46220001 */ sub.d $f0, $f0, $f2
/* E2ABF0 802B6540 46200020 */ cvt.s.d $f0, $f0
glabel .L802B6544
/* E2ABF4 802B6544 4604003E */ c.le.s $f0, $f4
glabel .L802B6548
/* E2ABF8 802B6548 00000000 */ nop
/* E2ABFC 802B654C 450000F9 */ bc1f .L802B6934
glabel func_802B6550
/* E2AC00 802B6550 E6400020 */ swc1 $f0, 0x20($s2)
.L802B6554:
/* E2AC04 802B6554 3C048011 */ lui $a0, %hi(PeachDisguiseNpcIndex)
/* E2AC08 802B6558 8C84C96C */ lw $a0, %lo(PeachDisguiseNpcIndex)($a0)
/* E2AC0C 802B655C 2402000A */ addiu $v0, $zero, 0xA
/* E2AC10 802B6560 E6440020 */ swc1 $f4, 0x20($s2)
/* E2AC14 802B6564 A6220008 */ sh $v0, 0x8($s1)
glabel .L802B6568
/* E2AC18 802B6568 922200B6 */ lbu $v0, 0xB6($s1)
.L802B656C:
/* E2AC1C 802B656C 3C014334 */ lui $at, (0x43340000 >> 16)
.L802B6570:
/* E2AC20 802B6570 44810000 */ mtc1 $at, $f0
.L802B6574:
/* E2AC24 802B6574 24420001 */ addiu $v0, $v0, 0x1
/* E2AC28 802B6578 A22200B6 */ sb $v0, 0xB6($s1)
/* E2AC2C 802B657C 0C00E2B7 */ jal get_npc_by_index
.L802B6580:
/* E2AC30 802B6580 E62000A8 */ swc1 $f0, 0xA8($s1)
/* E2AC34 802B6584 0040802D */ daddu $s0, $v0, $zero
/* E2AC38 802B6588 24020001 */ addiu $v0, $zero, 0x1
glabel .L802B658C
/* E2AC3C 802B658C 080AD97B */ j .L802B65EC
.L802B6590:
/* E2AC40 802B6590 A6020088 */ sh $v0, 0x88($s0)
glabel .L802B6594
/* E2AC44 802B6594 C6400020 */ lwc1 $f0, 0x20($s2)
.L802B6598:
/* E2AC48 802B6598 3C01802B */ lui $at, %hi(D_802B6E68_E2B518)
.L802B659C:
/* E2AC4C 802B659C D4226E68 */ ldc1 $f2, %lo(D_802B6E68_E2B518)($at)
/* E2AC50 802B65A0 46000021 */ cvt.d.s $f0, $f0
glabel .L802B65A4
/* E2AC54 802B65A4 46220000 */ add.d $f0, $f0, $f2
.L802B65A8:
/* E2AC58 802B65A8 46200020 */ cvt.s.d $f0, $f0
/* E2AC5C 802B65AC 4600203E */ c.le.s $f4, $f0
/* E2AC60 802B65B0 00000000 */ nop
glabel .L802B65B4
/* E2AC64 802B65B4 450000DF */ bc1f .L802B6934
.L802B65B8:
/* E2AC68 802B65B8 E6400020 */ swc1 $f0, 0x20($s2)
/* E2AC6C 802B65BC 3C048011 */ lui $a0, %hi(PeachDisguiseNpcIndex)
glabel .L802B65C0
/* E2AC70 802B65C0 8C84C96C */ lw $a0, %lo(PeachDisguiseNpcIndex)($a0)
/* E2AC74 802B65C4 E6440020 */ swc1 $f4, 0x20($s2)
/* E2AC78 802B65C8 922300B6 */ lbu $v1, 0xB6($s1)
glabel .L802B65CC
/* E2AC7C 802B65CC 2402000A */ addiu $v0, $zero, 0xA
.L802B65D0:
/* E2AC80 802B65D0 A6220008 */ sh $v0, 0x8($s1)
/* E2AC84 802B65D4 E62400A8 */ swc1 $f4, 0xA8($s1)
/* E2AC88 802B65D8 24630001 */ addiu $v1, $v1, 0x1
.L802B65DC:
/* E2AC8C 802B65DC 0C00E2B7 */ jal get_npc_by_index
.L802B65E0:
/* E2AC90 802B65E0 A22300B6 */ sb $v1, 0xB6($s1)
.L802B65E4:
/* E2AC94 802B65E4 0040802D */ daddu $s0, $v0, $zero
glabel action_update_walk_peach
/* E2AC98 802B65E8 A6000088 */ sh $zero, 0x88($s0)
.L802B65EC:
/* E2AC9C 802B65EC C66C006C */ lwc1 $f12, 0x6C($s3)
.L802B65F0:
/* E2ACA0 802B65F0 C62000A8 */ lwc1 $f0, 0xA8($s1)
/* E2ACA4 802B65F4 46006301 */ sub.s $f12, $f12, $f0
glabel func_802B65F8_E26D08
/* E2ACA8 802B65F8 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* E2ACAC 802B65FC 44810000 */ mtc1 $at, $f0
/* E2ACB0 802B6600 0C00A6C9 */ jal clamp_angle
.L802B6604:
/* E2ACB4 802B6604 46006301 */ sub.s $f12, $f12, $f0
/* E2ACB8 802B6608 4600018D */ trunc.w.s $f6, $f0
glabel .L802B660C
/* E2ACBC 802B660C 44023000 */ mfc1 $v0, $f6
/* E2ACC0 802B6610 E600000C */ swc1 $f0, 0xC($s0)
/* E2ACC4 802B6614 080ADA4D */ j .L802B6934
/* E2ACC8 802B6618 A602008A */ sh $v0, 0x8A($s0)
glabel .L802B661C
/* E2ACCC 802B661C 96220008 */ lhu $v0, 0x8($s1)
.L802B6620:
/* E2ACD0 802B6620 2442FFFF */ addiu $v0, $v0, -0x1
/* E2ACD4 802B6624 A6220008 */ sh $v0, 0x8($s1)
.L802B6628:
/* E2ACD8 802B6628 00021400 */ sll $v0, $v0, 16
/* E2ACDC 802B662C 144000F0 */ bnez $v0, .L802B69F0
.L802B6630:
/* E2ACE0 802B6630 00000000 */ nop
glabel .L802B6634
/* E2ACE4 802B6634 0C009C22 */ jal set_time_freeze_mode
glabel action_update_talk
/* E2ACE8 802B6638 0000202D */ daddu $a0, $zero, $zero
/* E2ACEC 802B663C 3C048011 */ lui $a0, %hi(PeachDisguiseNpcIndex)
/* E2ACF0 802B6640 8C84C96C */ lw $a0, %lo(PeachDisguiseNpcIndex)($a0)
glabel .L802B6644
/* E2ACF4 802B6644 0C00E2B7 */ jal get_npc_by_index
glabel func_802B6648_E27428
/* E2ACF8 802B6648 00000000 */ nop
.L802B664C:
/* E2ACFC 802B664C 0040802D */ daddu $s0, $v0, $zero
.L802B6650:
/* E2AD00 802B6650 3C03FFFB */ lui $v1, (0xFFFBFFFF >> 16)
glabel .L802B6654
/* E2AD04 802B6654 3463FFFF */ ori $v1, $v1, (0xFFFBFFFF & 0xFFFF)
/* E2AD08 802B6658 3C05FFEF */ lui $a1, (0xFFEFFFFF >> 16)
/* E2AD0C 802B665C 8E020000 */ lw $v0, 0x0($s0)
glabel .L802B6660
/* E2AD10 802B6660 34A5FFFF */ ori $a1, $a1, (0xFFEFFFFF & 0xFFFF)
/* E2AD14 802B6664 00431024 */ and $v0, $v0, $v1
/* E2AD18 802B6668 AE020000 */ sw $v0, 0x0($s0)
glabel .L802B666C
/* E2AD1C 802B666C 8E220000 */ lw $v0, 0x0($s1)
glabel .L802B6670
/* E2AD20 802B6670 0000202D */ daddu $a0, $zero, $zero
glabel .L802B6674
/* E2AD24 802B6674 00451024 */ and $v0, $v0, $a1
.L802B6678:
/* E2AD28 802B6678 080ADA78 */ j .L802B69E0
/* E2AD2C 802B667C AE220000 */ sw $v0, 0x0($s1)
glabel .L802B6680
/* E2AD30 802B6680 96220008 */ lhu $v0, 0x8($s1)
/* E2AD34 802B6684 2442FFFF */ addiu $v0, $v0, -0x1
/* E2AD38 802B6688 A6220008 */ sh $v0, 0x8($s1)
glabel func_802B668C
/* E2AD3C 802B668C 00021400 */ sll $v0, $v0, 16
jtbl_802B6690:
/* E2AD40 802B6690 14400004 */ bnez $v0, .L802B66A4
/* E2AD44 802B6694 00000000 */ nop
.L802B6698:
/* E2AD48 802B6698 922200B6 */ lbu $v0, 0xB6($s1)
/* E2AD4C 802B669C 24420001 */ addiu $v0, $v0, 0x1
/* E2AD50 802B66A0 A22200B6 */ sb $v0, 0xB6($s1)
.L802B66A4:
/* E2AD54 802B66A4 0C0ADB3C */ jal func_802B6CF0_E2B3A0
glabel func_802B66A8
/* E2AD58 802B66A8 00000000 */ nop
/* E2AD5C 802B66AC C66C006C */ lwc1 $f12, 0x6C($s3)
.L802B66B0:
/* E2AD60 802B66B0 C62000A8 */ lwc1 $f0, 0xA8($s1)
.L802B66B4:
/* E2AD64 802B66B4 080ADA54 */ j .L802B6950
/* E2AD68 802B66B8 46006301 */ sub.s $f12, $f12, $f0
glabel .L802B66BC
/* E2AD6C 802B66BC C63400A8 */ lwc1 $f20, 0xA8($s1)
glabel .L802B66C0
/* E2AD70 802B66C0 0C0ADB3C */ jal func_802B6CF0_E2B3A0
/* E2AD74 802B66C4 00000000 */ nop
/* E2AD78 802B66C8 C66C006C */ lwc1 $f12, 0x6C($s3)
/* E2AD7C 802B66CC C62000A8 */ lwc1 $f0, 0xA8($s1)
/* E2AD80 802B66D0 46006301 */ sub.s $f12, $f12, $f0
/* E2AD84 802B66D4 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* E2AD88 802B66D8 44810000 */ mtc1 $at, $f0
.L802B66DC:
/* E2AD8C 802B66DC 0C00A6C9 */ jal clamp_angle
.L802B66E0:
/* E2AD90 802B66E0 46006301 */ sub.s $f12, $f12, $f0
/* E2AD94 802B66E4 86220008 */ lh $v0, 0x8($s1)
/* E2AD98 802B66E8 96230008 */ lhu $v1, 0x8($s1)
/* E2AD9C 802B66EC 1440003F */ bnez $v0, .L802B67EC
.L802B66F0:
/* E2ADA0 802B66F0 E6200080 */ swc1 $f0, 0x80($s1)
.L802B66F4:
/* E2ADA4 802B66F4 C642001C */ lwc1 $f2, 0x1C($s2)
/* E2ADA8 802B66F8 44800000 */ mtc1 $zero, $f0
/* E2ADAC 802B66FC 00000000 */ nop
/* E2ADB0 802B6700 4602003C */ c.lt.s $f0, $f2
/* E2ADB4 802B6704 00000000 */ nop
.L802B6708:
/* E2ADB8 802B6708 45000010 */ bc1f .L802B674C
/* E2ADBC 802B670C 0000102D */ daddu $v0, $zero, $zero
.L802B6710:
/* E2ADC0 802B6710 3C014387 */ lui $at, (0x43870000 >> 16)
/* E2ADC4 802B6714 44811000 */ mtc1 $at, $f2
D_802B6718_E274F8:
/* E2ADC8 802B6718 00000000 */ nop
.L802B671C:
/* E2ADCC 802B671C 4602A03C */ c.lt.s $f20, $f2
D_802B6720_E27500:
/* E2ADD0 802B6720 00000000 */ nop
/* E2ADD4 802B6724 45000006 */ bc1f .L802B6740
D_802B6728_E27508:
/* E2ADD8 802B6728 00000000 */ nop
.L802B672C:
/* E2ADDC 802B672C C62000A8 */ lwc1 $f0, 0xA8($s1)
D_802B6730:
/* E2ADE0 802B6730 4600103E */ c.le.s $f2, $f0
/* E2ADE4 802B6734 00000000 */ nop
glabel func_802B6738
/* E2ADE8 802B6738 45030001 */ bc1tl .L802B6740
/* E2ADEC 802B673C 24020001 */ addiu $v0, $zero, 0x1
.L802B6740:
/* E2ADF0 802B6740 C642001C */ lwc1 $f2, 0x1C($s2)
.L802B6744:
/* E2ADF4 802B6744 44800000 */ mtc1 $zero, $f0
/* E2ADF8 802B6748 00000000 */ nop
.L802B674C:
/* E2ADFC 802B674C 4600103C */ c.lt.s $f2, $f0
.L802B6750:
/* E2AE00 802B6750 00000000 */ nop
/* E2AE04 802B6754 4500000D */ bc1f .L802B678C
.L802B6758:
/* E2AE08 802B6758 00000000 */ nop
/* E2AE0C 802B675C 3C014387 */ lui $at, (0x43870000 >> 16)
D_802B6760_E29190:
/* E2AE10 802B6760 44811000 */ mtc1 $at, $f2
.L802B6764:
/* E2AE14 802B6764 00000000 */ nop
D_802B6768_E29198:
/* E2AE18 802B6768 4614103C */ c.lt.s $f2, $f20
/* E2AE1C 802B676C 00000000 */ nop
D_802B6770_E27C80:
/* E2AE20 802B6770 45000006 */ bc1f .L802B678C
/* E2AE24 802B6774 00000000 */ nop
.L802B6778:
/* E2AE28 802B6778 C62000A8 */ lwc1 $f0, 0xA8($s1)
.L802B677C:
/* E2AE2C 802B677C 4602003E */ c.le.s $f0, $f2
D_802B6780:
/* E2AE30 802B6780 00000000 */ nop
D_802B6784:
/* E2AE34 802B6784 45030001 */ bc1tl .L802B678C
glabel D_802B6788
/* E2AE38 802B6788 24020001 */ addiu $v0, $zero, 0x1
.L802B678C:
/* E2AE3C 802B678C 10400098 */ beqz $v0, .L802B69F0
D_802B6790:
/* E2AE40 802B6790 24030002 */ addiu $v1, $zero, 0x2
D_802B6794:
/* E2AE44 802B6794 922200B6 */ lbu $v0, 0xB6($s1)
D_802B6798:
/* E2AE48 802B6798 A6230008 */ sh $v1, 0x8($s1)
D_802B679C:
/* E2AE4C 802B679C 2403DFFF */ addiu $v1, $zero, -0x2001
/* E2AE50 802B67A0 24420001 */ addiu $v0, $v0, 0x1
.L802B67A4:
/* E2AE54 802B67A4 A22200B6 */ sb $v0, 0xB6($s1)
/* E2AE58 802B67A8 8E220004 */ lw $v0, 0x4($s1)
/* E2AE5C 802B67AC 3C048007 */ lui $a0, %hi(gGameStatusPtr)
.L802B67B0:
/* E2AE60 802B67B0 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0)
.L802B67B4:
/* E2AE64 802B67B4 00431024 */ and $v0, $v0, $v1
/* E2AE68 802B67B8 AE220004 */ sw $v0, 0x4($s1)
glabel .L802B67BC
/* E2AE6C 802B67BC 9082007E */ lbu $v0, 0x7E($a0)
.L802B67C0:
/* E2AE70 802B67C0 304200FD */ andi $v0, $v0, 0xFD
.L802B67C4:
/* E2AE74 802B67C4 A082007E */ sb $v0, 0x7E($a0)
/* E2AE78 802B67C8 3C048011 */ lui $a0, %hi(PeachDisguiseNpcIndex)
/* E2AE7C 802B67CC 8C84C96C */ lw $a0, %lo(PeachDisguiseNpcIndex)($a0)
/* E2AE80 802B67D0 0C00E228 */ jal free_npc_by_index
/* E2AE84 802B67D4 A220000C */ sb $zero, 0xC($s1)
.L802B67D8:
/* E2AE88 802B67D8 24020037 */ addiu $v0, $zero, 0x37
/* E2AE8C 802B67DC A62200B0 */ sh $v0, 0xB0($s1)
/* E2AE90 802B67E0 24020026 */ addiu $v0, $zero, 0x26
.L802B67E4:
/* E2AE94 802B67E4 080ADA7C */ j .L802B69F0
.L802B67E8:
/* E2AE98 802B67E8 A62200B2 */ sh $v0, 0xB2($s1)
.L802B67EC:
/* E2AE9C 802B67EC 2462FFFF */ addiu $v0, $v1, -0x1
/* E2AEA0 802B67F0 080ADA7C */ j .L802B69F0
.L802B67F4:
/* E2AEA4 802B67F4 A6220008 */ sh $v0, 0x8($s1)
glabel .L802B67F8
/* E2AEA8 802B67F8 96220008 */ lhu $v0, 0x8($s1)
/* E2AEAC 802B67FC 2442FFFF */ addiu $v0, $v0, -0x1
.L802B6800:
/* E2AEB0 802B6800 A6220008 */ sh $v0, 0x8($s1)
.L802B6804:
/* E2AEB4 802B6804 00021400 */ sll $v0, $v0, 16
glabel .L802B6808
/* E2AEB8 802B6808 14400004 */ bnez $v0, .L802B681C
.L802B680C:
/* E2AEBC 802B680C 00000000 */ nop
.L802B6810:
/* E2AEC0 802B6810 922200B6 */ lbu $v0, 0xB6($s1)
.L802B6814:
/* E2AEC4 802B6814 24420001 */ addiu $v0, $v0, 0x1
/* E2AEC8 802B6818 A22200B6 */ sb $v0, 0xB6($s1)
.L802B681C:
/* E2AECC 802B681C 0C0ADB3C */ jal func_802B6CF0_E2B3A0
glabel func_802B6820_E256F0
/* E2AED0 802B6820 00000000 */ nop
.L802B6824:
/* E2AED4 802B6824 080ADA7C */ j .L802B69F0
.L802B6828:
/* E2AED8 802B6828 00000000 */ nop
glabel .L802B682C
/* E2AEDC 802B682C C640001C */ lwc1 $f0, 0x1C($s2)
/* E2AEE0 802B6830 44802000 */ mtc1 $zero, $f4
/* E2AEE4 802B6834 00000000 */ nop
/* E2AEE8 802B6838 4600203C */ c.lt.s $f4, $f0
/* E2AEEC 802B683C 00000000 */ nop
/* E2AEF0 802B6840 4500001D */ bc1f .L802B68B8
/* E2AEF4 802B6844 00000000 */ nop
/* E2AEF8 802B6848 C6400020 */ lwc1 $f0, 0x20($s2)
/* E2AEFC 802B684C 3C01802B */ lui $at, %hi(D_802B6E70_E2B520)
jtbl_802B6850:
/* E2AF00 802B6850 D4226E70 */ ldc1 $f2, %lo(D_802B6E70_E2B520)($at)
.L802B6854:
/* E2AF04 802B6854 46000021 */ cvt.d.s $f0, $f0
.L802B6858:
/* E2AF08 802B6858 46220001 */ sub.d $f0, $f0, $f2
/* E2AF0C 802B685C 46200020 */ cvt.s.d $f0, $f0
/* E2AF10 802B6860 4604003E */ c.le.s $f0, $f4
/* E2AF14 802B6864 00000000 */ nop
/* E2AF18 802B6868 45000032 */ bc1f .L802B6934
/* E2AF1C 802B686C E6400020 */ swc1 $f0, 0x20($s2)
.L802B6870:
/* E2AF20 802B6870 2402000A */ addiu $v0, $zero, 0xA
/* E2AF24 802B6874 E6440020 */ swc1 $f4, 0x20($s2)
/* E2AF28 802B6878 A6220008 */ sh $v0, 0x8($s1)
/* E2AF2C 802B687C 922200B6 */ lbu $v0, 0xB6($s1)
/* E2AF30 802B6880 3C014334 */ lui $at, (0x43340000 >> 16)
/* E2AF34 802B6884 44810000 */ mtc1 $at, $f0
/* E2AF38 802B6888 24420001 */ addiu $v0, $v0, 0x1
/* E2AF3C 802B688C A22200B6 */ sb $v0, 0xB6($s1)
/* E2AF40 802B6890 E62000A8 */ swc1 $f0, 0xA8($s1)
/* E2AF44 802B6894 C66C006C */ lwc1 $f12, 0x6C($s3)
/* E2AF48 802B6898 46006301 */ sub.s $f12, $f12, $f0
/* E2AF4C 802B689C 3C0142B4 */ lui $at, (0x42B40000 >> 16)
.L802B68A0:
/* E2AF50 802B68A0 44810000 */ mtc1 $at, $f0
/* E2AF54 802B68A4 24020001 */ addiu $v0, $zero, 0x1
/* E2AF58 802B68A8 3C018011 */ lui $at, %hi(PrevPlayerDirection)
/* E2AF5C 802B68AC AC22C95C */ sw $v0, %lo(PrevPlayerDirection)($at)
D_802B68B0:
/* E2AF60 802B68B0 080ADA47 */ j .L802B691C
D_802B68B4:
/* E2AF64 802B68B4 46006301 */ sub.s $f12, $f12, $f0
.L802B68B8:
/* E2AF68 802B68B8 C6400020 */ lwc1 $f0, 0x20($s2)
D_802B68BC:
/* E2AF6C 802B68BC 3C01802B */ lui $at, %hi(D_802B6E78_E2B528)
.L802B68C0:
/* E2AF70 802B68C0 D4226E78 */ ldc1 $f2, %lo(D_802B6E78_E2B528)($at)
/* E2AF74 802B68C4 46000021 */ cvt.d.s $f0, $f0
.L802B68C8:
/* E2AF78 802B68C8 46220000 */ add.d $f0, $f0, $f2
/* E2AF7C 802B68CC 46200020 */ cvt.s.d $f0, $f0
/* E2AF80 802B68D0 4600203E */ c.le.s $f4, $f0
/* E2AF84 802B68D4 00000000 */ nop
/* E2AF88 802B68D8 45000016 */ bc1f .L802B6934
/* E2AF8C 802B68DC E6400020 */ swc1 $f0, 0x20($s2)
/* E2AF90 802B68E0 E6440020 */ swc1 $f4, 0x20($s2)
/* E2AF94 802B68E4 922300B6 */ lbu $v1, 0xB6($s1)
/* E2AF98 802B68E8 2402000A */ addiu $v0, $zero, 0xA
.L802B68EC:
/* E2AF9C 802B68EC A6220008 */ sh $v0, 0x8($s1)
/* E2AFA0 802B68F0 E62400A8 */ swc1 $f4, 0xA8($s1)
.L802B68F4:
/* E2AFA4 802B68F4 24630001 */ addiu $v1, $v1, 0x1
/* E2AFA8 802B68F8 A22300B6 */ sb $v1, 0xB6($s1)
.L802B68FC:
/* E2AFAC 802B68FC C66C006C */ lwc1 $f12, 0x6C($s3)
/* E2AFB0 802B6900 46046301 */ sub.s $f12, $f12, $f4
.L802B6904:
/* E2AFB4 802B6904 3C0142B4 */ lui $at, (0x42B40000 >> 16)
.L802B6908:
/* E2AFB8 802B6908 44810000 */ mtc1 $at, $f0
/* E2AFBC 802B690C 00000000 */ nop
WalkPeachAnims:
/* E2AFC0 802B6910 46006301 */ sub.s $f12, $f12, $f0
/* E2AFC4 802B6914 3C018011 */ lui $at, %hi(PrevPlayerDirection)
/* E2AFC8 802B6918 AC20C95C */ sw $zero, %lo(PrevPlayerDirection)($at)
.L802B691C:
/* E2AFCC 802B691C 0C00A6C9 */ jal clamp_angle
/* E2AFD0 802B6920 00000000 */ nop
/* E2AFD4 802B6924 4600018D */ trunc.w.s $f6, $f0
/* E2AFD8 802B6928 3C01800F */ lui $at, %hi(PrevPlayerCamRelativeYaw)
/* E2AFDC 802B692C E4267B40 */ swc1 $f6, %lo(PrevPlayerCamRelativeYaw)($at)
/* E2AFE0 802B6930 E6200084 */ swc1 $f0, 0x84($s1)
.L802B6934:
/* E2AFE4 802B6934 C62000A8 */ lwc1 $f0, 0xA8($s1)
/* E2AFE8 802B6938 C64C0020 */ lwc1 $f12, 0x20($s2)
/* E2AFEC 802B693C 0C00A6C9 */ jal clamp_angle
/* E2AFF0 802B6940 460C0300 */ add.s $f12, $f0, $f12
/* E2AFF4 802B6944 E62000A8 */ swc1 $f0, 0xA8($s1)
.L802B6948:
/* E2AFF8 802B6948 C66C006C */ lwc1 $f12, 0x6C($s3)
.L802B694C:
/* E2AFFC 802B694C 46006301 */ sub.s $f12, $f12, $f0
.L802B6950:
/* E2B000 802B6950 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* E2B004 802B6954 44810000 */ mtc1 $at, $f0
/* E2B008 802B6958 0C00A6C9 */ jal clamp_angle
.L802B695C:
/* E2B00C 802B695C 46006301 */ sub.s $f12, $f12, $f0
.L802B6960:
/* E2B010 802B6960 080ADA7C */ j .L802B69F0
/* E2B014 802B6964 E6200080 */ swc1 $f0, 0x80($s1)
glabel .L802B6968
/* E2B018 802B6968 96220008 */ lhu $v0, 0x8($s1)
.L802B696C:
/* E2B01C 802B696C 2442FFFF */ addiu $v0, $v0, -0x1
/* E2B020 802B6970 A6220008 */ sh $v0, 0x8($s1)
/* E2B024 802B6974 00021400 */ sll $v0, $v0, 16
/* E2B028 802B6978 1440001D */ bnez $v0, .L802B69F0
/* E2B02C 802B697C 00000000 */ nop
/* E2B030 802B6980 0C009C22 */ jal set_time_freeze_mode
/* E2B034 802B6984 0000202D */ daddu $a0, $zero, $zero
/* E2B038 802B6988 3C03FFEF */ lui $v1, (0xFFEFFFFF >> 16)
/* E2B03C 802B698C 3463FFFF */ ori $v1, $v1, (0xFFEFFFFF & 0xFFFF)
/* E2B040 802B6990 8E220000 */ lw $v0, 0x0($s1)
/* E2B044 802B6994 0000202D */ daddu $a0, $zero, $zero
/* E2B048 802B6998 00431024 */ and $v0, $v0, $v1
/* E2B04C 802B699C 080ADA78 */ j .L802B69E0
D_802B69A0_E26700:
/* E2B050 802B69A0 AE220000 */ sw $v0, 0x0($s1)
glabel .L802B69A4
/* E2B054 802B69A4 0C0398E9 */ jal peach_force_disguise_action
D_802B69A8_E26708:
/* E2B058 802B69A8 0000202D */ daddu $a0, $zero, $zero
/* E2B05C 802B69AC 080ADA7A */ j .L802B69E8
/* E2B060 802B69B0 00000000 */ nop
glabel .L802B69B4
/* E2B064 802B69B4 962200BC */ lhu $v0, 0xBC($s1)
/* E2B068 802B69B8 1040000D */ beqz $v0, .L802B69F0
.L802B69BC:
/* E2B06C 802B69BC 0000202D */ daddu $a0, $zero, $zero
/* E2B070 802B69C0 080ADA78 */ j .L802B69E0
/* E2B074 802B69C4 00000000 */ nop
glabel .L802B69C8
/* E2B078 802B69C8 96220008 */ lhu $v0, 0x8($s1)
/* E2B07C 802B69CC 2442FFFF */ addiu $v0, $v0, -0x1
/* E2B080 802B69D0 A6220008 */ sh $v0, 0x8($s1)
/* E2B084 802B69D4 00021400 */ sll $v0, $v0, 16
.L802B69D8:
/* E2B088 802B69D8 14400005 */ bnez $v0, .L802B69F0
glabel .L802B69DC
/* E2B08C 802B69DC 0000202D */ daddu $a0, $zero, $zero
.L802B69E0:
/* E2B090 802B69E0 0C039769 */ jal set_action_state
/* E2B094 802B69E4 00000000 */ nop
.L802B69E8:
/* E2B098 802B69E8 0C038050 */ jal enable_player_static_collisions
/* E2B09C 802B69EC 00000000 */ nop
glabel .L802B69F0
/* E2B0A0 802B69F0 8E430008 */ lw $v1, 0x8($s2)
/* E2B0A4 802B69F4 18600084 */ blez $v1, .L802B6C08
/* E2B0A8 802B69F8 2402000A */ addiu $v0, $zero, 0xA
/* E2B0AC 802B69FC 2463FFFF */ addiu $v1, $v1, -0x1
/* E2B0B0 802B6A00 14620042 */ bne $v1, $v0, .L802B6B0C
/* E2B0B4 802B6A04 AE430008 */ sw $v1, 0x8($s2)
/* E2B0B8 802B6A08 C62200A8 */ lwc1 $f2, 0xA8($s1)
/* E2B0BC 802B6A0C 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* E2B0C0 802B6A10 44810000 */ mtc1 $at, $f0
/* E2B0C4 802B6A14 00000000 */ nop
.L802B6A18:
/* E2B0C8 802B6A18 4602003E */ c.le.s $f0, $f2
/* E2B0CC 802B6A1C 00000000 */ nop
/* E2B0D0 802B6A20 45000016 */ bc1f .L802B6A7C
/* E2B0D4 802B6A24 00000000 */ nop
/* E2B0D8 802B6A28 3C014387 */ lui $at, (0x43870000 >> 16)
/* E2B0DC 802B6A2C 44812000 */ mtc1 $at, $f4
/* E2B0E0 802B6A30 00000000 */ nop
/* E2B0E4 802B6A34 4604103C */ c.lt.s $f2, $f4
/* E2B0E8 802B6A38 00000000 */ nop
/* E2B0EC 802B6A3C 4500000F */ bc1f .L802B6A7C
/* E2B0F0 802B6A40 00000000 */ nop
/* E2B0F4 802B6A44 C660006C */ lwc1 $f0, 0x6C($s3)
/* E2B0F8 802B6A48 46040001 */ sub.s $f0, $f0, $f4
/* E2B0FC 802B6A4C 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
.L802B6A50:
/* E2B100 802B6A50 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* E2B104 802B6A54 44811000 */ mtc1 $at, $f2
/* E2B108 802B6A58 00000000 */ nop
/* E2B10C 802B6A5C 46020002 */ mul.s $f0, $f0, $f2
/* E2B110 802B6A60 00000000 */ nop
/* E2B114 802B6A64 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* E2B118 802B6A68 44811000 */ mtc1 $at, $f2
/* E2B11C 802B6A6C 3C014238 */ lui $at, (0x42380000 >> 16)
/* E2B120 802B6A70 4481B000 */ mtc1 $at, $f22
/* E2B124 802B6A74 080ADAAF */ j .L802B6ABC
/* E2B128 802B6A78 46020503 */ div.s $f20, $f0, $f2
.L802B6A7C:
/* E2B12C 802B6A7C C662006C */ lwc1 $f2, 0x6C($s3)
/* E2B130 802B6A80 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* E2B134 802B6A84 44810000 */ mtc1 $at, $f0
/* E2B138 802B6A88 00000000 */ nop
.L802B6A8C:
/* E2B13C 802B6A8C 46001081 */ sub.s $f2, $f2, $f0
/* E2B140 802B6A90 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* E2B144 802B6A94 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* E2B148 802B6A98 44810000 */ mtc1 $at, $f0
.L802B6A9C:
/* E2B14C 802B6A9C 00000000 */ nop
.L802B6AA0:
/* E2B150 802B6AA0 46001082 */ mul.s $f2, $f2, $f0
/* E2B154 802B6AA4 00000000 */ nop
/* E2B158 802B6AA8 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* E2B15C 802B6AAC 44810000 */ mtc1 $at, $f0
/* E2B160 802B6AB0 3C0141F0 */ lui $at, (0x41F00000 >> 16)
/* E2B164 802B6AB4 4481B000 */ mtc1 $at, $f22
/* E2B168 802B6AB8 46001503 */ div.s $f20, $f2, $f0
.L802B6ABC:
/* E2B16C 802B6ABC 0C00A85B */ jal sin_rad
/* E2B170 802B6AC0 4600A306 */ mov.s $f12, $f20
/* E2B174 802B6AC4 4600B002 */ mul.s $f0, $f22, $f0
/* E2B178 802B6AC8 00000000 */ nop
/* E2B17C 802B6ACC C6220028 */ lwc1 $f2, 0x28($s1)
/* E2B180 802B6AD0 46001080 */ add.s $f2, $f2, $f0
/* E2B184 802B6AD4 4600A306 */ mov.s $f12, $f20
.L802B6AD8:
/* E2B188 802B6AD8 0C00A874 */ jal cos_rad
/* E2B18C 802B6ADC E6420010 */ swc1 $f2, 0x10($s2)
/* E2B190 802B6AE0 4600B002 */ mul.s $f0, $f22, $f0
/* E2B194 802B6AE4 00000000 */ nop
/* E2B198 802B6AE8 C624002C */ lwc1 $f4, 0x2C($s1)
/* E2B19C 802B6AEC 3C0141A0 */ lui $at, (0x41A00000 >> 16)
/* E2B1A0 802B6AF0 44811000 */ mtc1 $at, $f2
/* E2B1A4 802B6AF4 00000000 */ nop
/* E2B1A8 802B6AF8 46022101 */ sub.s $f4, $f4, $f2
/* E2B1AC 802B6AFC C6220030 */ lwc1 $f2, 0x30($s1)
/* E2B1B0 802B6B00 46001081 */ sub.s $f2, $f2, $f0
/* E2B1B4 802B6B04 E6440014 */ swc1 $f4, 0x14($s2)
/* E2B1B8 802B6B08 E6420018 */ swc1 $f2, 0x18($s2)
.L802B6B0C:
/* E2B1BC 802B6B0C 8E430008 */ lw $v1, 0x8($s2)
/* E2B1C0 802B6B10 2862000B */ slti $v0, $v1, 0xB
/* E2B1C4 802B6B14 10400050 */ beqz $v0, .L802B6C58
/* E2B1C8 802B6B18 30620001 */ andi $v0, $v1, 0x1
/* E2B1CC 802B6B1C 1040004E */ beqz $v0, .L802B6C58
/* E2B1D0 802B6B20 00000000 */ nop
/* E2B1D4 802B6B24 C6420010 */ lwc1 $f2, 0x10($s2)
/* E2B1D8 802B6B28 3C014100 */ lui $at, (0x41000000 >> 16)
/* E2B1DC 802B6B2C 44810000 */ mtc1 $at, $f0
/* E2B1E0 802B6B30 00000000 */ nop
/* E2B1E4 802B6B34 46001081 */ sub.s $f2, $f2, $f0
/* E2B1E8 802B6B38 3C014248 */ lui $at, (0x42480000 >> 16)
/* E2B1EC 802B6B3C 44810000 */ mtc1 $at, $f0
/* E2B1F0 802B6B40 44051000 */ mfc1 $a1, $f2
/* E2B1F4 802B6B44 C6420014 */ lwc1 $f2, 0x14($s2)
/* E2B1F8 802B6B48 46001080 */ add.s $f2, $f2, $f0
/* E2B1FC 802B6B4C 8E470018 */ lw $a3, 0x18($s2)
/* E2B200 802B6B50 3C014000 */ lui $at, (0x40000000 >> 16)
/* E2B204 802B6B54 44810000 */ mtc1 $at, $f0
/* E2B208 802B6B58 44061000 */ mfc1 $a2, $f2
/* E2B20C 802B6B5C 24040003 */ addiu $a0, $zero, 0x3
/* E2B210 802B6B60 0C01BFBC */ jal fx_sparkles
.L802B6B64:
/* E2B214 802B6B64 E7A00010 */ swc1 $f0, 0x10($sp)
/* E2B218 802B6B68 C660006C */ lwc1 $f0, 0x6C($s3)
.L802B6B6C:
/* E2B21C 802B6B6C C62200A8 */ lwc1 $f2, 0xA8($s1)
/* E2B220 802B6B70 46020000 */ add.s $f0, $f0, $f2
/* E2B224 802B6B74 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* E2B228 802B6B78 44811000 */ mtc1 $at, $f2
.L802B6B7C:
/* E2B22C 802B6B7C 00000000 */ nop
/* E2B230 802B6B80 46020001 */ sub.s $f0, $f0, $f2
/* E2B234 802B6B84 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* E2B238 802B6B88 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* E2B23C 802B6B8C 44811000 */ mtc1 $at, $f2
/* E2B240 802B6B90 00000000 */ nop
/* E2B244 802B6B94 46020002 */ mul.s $f0, $f0, $f2
/* E2B248 802B6B98 00000000 */ nop
/* E2B24C 802B6B9C C6560010 */ lwc1 $f22, 0x10($s2)
/* E2B250 802B6BA0 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* E2B254 802B6BA4 44811000 */ mtc1 $at, $f2
/* E2B258 802B6BA8 4600B5A1 */ cvt.d.s $f22, $f22
.L802B6BAC:
/* E2B25C 802B6BAC 46020503 */ div.s $f20, $f0, $f2
/* E2B260 802B6BB0 0C00A85B */ jal sin_rad
/* E2B264 802B6BB4 4600A306 */ mov.s $f12, $f20
.L802B6BB8:
/* E2B268 802B6BB8 3C014024 */ lui $at, (0x40240000 >> 16)
/* E2B26C 802B6BBC 4481C800 */ mtc1 $at, $f25
/* E2B270 802B6BC0 4480C000 */ mtc1 $zero, $f24
/* E2B274 802B6BC4 46000021 */ cvt.d.s $f0, $f0
/* E2B278 802B6BC8 46380002 */ mul.d $f0, $f0, $f24
/* E2B27C 802B6BCC 00000000 */ nop
/* E2B280 802B6BD0 4600A306 */ mov.s $f12, $f20
/* E2B284 802B6BD4 C6540018 */ lwc1 $f20, 0x18($s2)
/* E2B288 802B6BD8 4620B580 */ add.d $f22, $f22, $f0
/* E2B28C 802B6BDC 4600A521 */ cvt.d.s $f20, $f20
/* E2B290 802B6BE0 4620B5A0 */ cvt.s.d $f22, $f22
/* E2B294 802B6BE4 0C00A874 */ jal cos_rad
/* E2B298 802B6BE8 E6560010 */ swc1 $f22, 0x10($s2)
/* E2B29C 802B6BEC 46000021 */ cvt.d.s $f0, $f0
/* E2B2A0 802B6BF0 46380002 */ mul.d $f0, $f0, $f24
/* E2B2A4 802B6BF4 00000000 */ nop
.L802B6BF8:
/* E2B2A8 802B6BF8 4620A501 */ sub.d $f20, $f20, $f0
/* E2B2AC 802B6BFC 4620A520 */ cvt.s.d $f20, $f20
/* E2B2B0 802B6C00 080ADB16 */ j .L802B6C58
/* E2B2B4 802B6C04 E6540018 */ swc1 $f20, 0x18($s2)
.L802B6C08:
/* E2B2B8 802B6C08 14600013 */ bnez $v1, .L802B6C58
.L802B6C0C:
/* E2B2BC 802B6C0C 2402FFFF */ addiu $v0, $zero, -0x1
/* E2B2C0 802B6C10 8E430000 */ lw $v1, 0x0($s2)
/* E2B2C4 802B6C14 10600010 */ beqz $v1, .L802B6C58
/* E2B2C8 802B6C18 AE420008 */ sw $v0, 0x8($s2)
/* E2B2CC 802B6C1C 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* E2B2D0 802B6C20 44810000 */ mtc1 $at, $f0
/* E2B2D4 802B6C24 0060102D */ daddu $v0, $v1, $zero
/* E2B2D8 802B6C28 E7A00010 */ swc1 $f0, 0x10($sp)
/* E2B2DC 802B6C2C 8442008A */ lh $v0, 0x8A($v0)
glabel .L802B6C30
/* E2B2E0 802B6C30 44820000 */ mtc1 $v0, $f0
/* E2B2E4 802B6C34 00000000 */ nop
/* E2B2E8 802B6C38 46800020 */ cvt.s.w $f0, $f0
/* E2B2EC 802B6C3C E7A00014 */ swc1 $f0, 0x14($sp)
/* E2B2F0 802B6C40 8C650038 */ lw $a1, 0x38($v1)
/* E2B2F4 802B6C44 8C66003C */ lw $a2, 0x3C($v1)
/* E2B2F8 802B6C48 8224000D */ lb $a0, 0xD($s1)
/* E2B2FC 802B6C4C 8C670040 */ lw $a3, 0x40($v1)
/* E2B300 802B6C50 0C01CA84 */ jal fx_pink_sparkles
/* E2B304 802B6C54 2484FFFF */ addiu $a0, $a0, -0x1
.L802B6C58:
/* E2B308 802B6C58 8E43000C */ lw $v1, 0xC($s2)
/* E2B30C 802B6C5C 1060001A */ beqz $v1, .L802B6CC8
/* E2B310 802B6C60 2862000B */ slti $v0, $v1, 0xB
/* E2B314 802B6C64 10400015 */ beqz $v0, .L802B6CBC
/* E2B318 802B6C68 2402000A */ addiu $v0, $zero, 0xA
/* E2B31C 802B6C6C 14620003 */ bne $v1, $v0, .L802B6C7C
/* E2B320 802B6C70 240400FE */ addiu $a0, $zero, 0xFE
/* E2B324 802B6C74 0C052736 */ jal sfx_play_sound_at_player
/* E2B328 802B6C78 0000282D */ daddu $a1, $zero, $zero
.L802B6C7C:
/* E2B32C 802B6C7C 8E42000C */ lw $v0, 0xC($s2)
/* E2B330 802B6C80 30420003 */ andi $v0, $v0, 0x3
.L802B6C84:
/* E2B334 802B6C84 1440000D */ bnez $v0, .L802B6CBC
/* E2B338 802B6C88 24040004 */ addiu $a0, $zero, 0x4
/* E2B33C 802B6C8C 8E250028 */ lw $a1, 0x28($s1)
.L802B6C90:
/* E2B340 802B6C90 8E26002C */ lw $a2, 0x2C($s1)
/* E2B344 802B6C94 8E270030 */ lw $a3, 0x30($s1)
/* E2B348 802B6C98 3C014248 */ lui $at, (0x42480000 >> 16)
/* E2B34C 802B6C9C 44810000 */ mtc1 $at, $f0
.L802B6CA0:
/* E2B350 802B6CA0 24020028 */ addiu $v0, $zero, 0x28
/* E2B354 802B6CA4 AFA20018 */ sw $v0, 0x18($sp)
/* E2B358 802B6CA8 2402001E */ addiu $v0, $zero, 0x1E
/* E2B35C 802B6CAC AFA2001C */ sw $v0, 0x1C($sp)
/* E2B360 802B6CB0 E7A00010 */ swc1 $f0, 0x10($sp)
/* E2B364 802B6CB4 0C01C154 */ jal fx_stars_shimmer
/* E2B368 802B6CB8 E7A00014 */ swc1 $f0, 0x14($sp)
.L802B6CBC:
/* E2B36C 802B6CBC 8E42000C */ lw $v0, 0xC($s2)
/* E2B370 802B6CC0 2442FFFF */ addiu $v0, $v0, -0x1
.L802B6CC4:
/* E2B374 802B6CC4 AE42000C */ sw $v0, 0xC($s2)
.L802B6CC8:
/* E2B378 802B6CC8 8FBF0030 */ lw $ra, 0x30($sp)
/* E2B37C 802B6CCC 8FB3002C */ lw $s3, 0x2C($sp)
/* E2B380 802B6CD0 8FB20028 */ lw $s2, 0x28($sp)
/* E2B384 802B6CD4 8FB10024 */ lw $s1, 0x24($sp)
/* E2B388 802B6CD8 8FB00020 */ lw $s0, 0x20($sp)
/* E2B38C 802B6CDC D7B80048 */ ldc1 $f24, 0x48($sp)
/* E2B390 802B6CE0 D7B60040 */ ldc1 $f22, 0x40($sp)
/* E2B394 802B6CE4 D7B40038 */ ldc1 $f20, 0x38($sp)
.L802B6CE8:
/* E2B398 802B6CE8 03E00008 */ jr $ra
/* E2B39C 802B6CEC 27BD0050 */ addiu $sp, $sp, 0x50
### DECOMPILED C INSTRUCTIONS:
void action_update_parasol(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
TransformationData* transformation = &ParasolTransformation;
Camera* cam = &gCameras[gCurrentCameraID];
GameStatus* gameStatus;
GameStatus* gameStatus2;
Npc* disguiseNpc;
f32* tempUnk_1C;
f32 prevFacingAngle;
f32 phi_f4;
s32 reachedTangentAngle;
f32 angle;
f32 radius;
if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
playerStatus->flags &= ~PS_FLAG_ACTION_STATE_CHANGED;
mem_clear(&ParasolTransformation, sizeof(ParasolTransformation));
disable_player_static_collisions();
tempUnk_1C = &transformation->playerRotationRate;
playerStatus->timeInAir = 0;
playerStatus->peakJumpTime = 0;
playerStatus->currentSpeed = 0;
playerStatus->pitch = 0;
if (playerStatus->spriteFacingAngle >= 90 && playerStatus->spriteFacingAngle < 270) {
phi_f4 = 2;
} else {
phi_f4 = -2;
}
*tempUnk_1C = phi_f4;
if (!(playerStatus->animFlags & PA_FLAG_INVISIBLE)) {
playerStatus->currentStateTime = 20;
playerStatus->actionSubstate = SUBSTATE_DISGUISE_INIT;
transformation->disguiseTime = 15;
transformation->npc = parasol_get_npc();
} else {
playerStatus->actionSubstate = SUBSTATE_REVERT_INIT;
playerStatus->currentStateTime = 40;
transformation->reverted = 1;
transformation->revertTime = 12;
disguiseNpc = get_npc_by_index(PeachDisguiseNpcIndex);
disguiseNpc->flags |= NPC_FLAG_IGNORE_CAMERA_FOR_YAW;
playerStatus->flags |= PS_FLAG_ROTATION_LOCKED;
sfx_play_sound_at_player(SOUND_FD, SOUND_SPACE_MODE_0);
}
}
switch (playerStatus->actionSubstate) {
case SUBSTATE_DISGUISE_INIT:
if (playerStatus->flipYaw[CAM_DEFAULT] == 0) {
if (peach_disguise_check_overlaps() < 0) {
suggest_player_anim_allow_backward(ANIM_Peach2_UseParasol);
sfx_play_sound_at_player(SOUND_92, SOUND_SPACE_MODE_0);
playerStatus->actionSubstate++; // SUBSTATE_USE_PARASOL
} else {
suggest_player_anim_allow_backward(ANIM_Peach2_CantFitParasol);
playerStatus->actionSubstate = SUBSTATE_BLOCKED;
playerStatus->currentStateTime = 10;
transformation->disguiseTime = 0;
}
}
case SUBSTATE_USE_PARASOL:
if (--playerStatus->currentStateTime == 0) {
suggest_player_anim_allow_backward(ANIM_Peach2_PutAwayParasol);
playerStatus->actionSubstate = SUBSTATE_PUT_AWAY;
if (transformation->npc == NULL) {
playerStatus->actionSubstate = SUBSTATE_FAILED;
} else {
set_time_freeze_mode(TIME_FREEZE_FULL);
}
}
break;
case SUBSTATE_PUT_AWAY:
if (playerStatus->animNotifyValue != 0) {
playerStatus->currentStateTime = 12;
playerStatus->flags |= PS_FLAG_ROTATION_LOCKED;
playerStatus->actionSubstate++; // SUBSTATE_DISGUISE_BEGIN
sfx_play_sound_at_player(SOUND_FD, SOUND_SPACE_MODE_0);
}
break;
case SUBSTATE_DISGUISE_BEGIN:
if (--playerStatus->currentStateTime == 0) {
playerStatus->currentStateTime = 10;
transformation->revertTime = 10;
playerStatus->actionSubstate++; // SUBSTATE_DISGUISE_WAIT_FOR_ANGLE
}
parasol_update_spin();
break;
case SUBSTATE_DISGUISE_WAIT_FOR_ANGLE:
prevFacingAngle = playerStatus->spriteFacingAngle;
parasol_update_spin();
playerStatus->targetYaw = clamp_angle((cam->currentYaw - playerStatus->spriteFacingAngle) - 90);
if (playerStatus->currentStateTime == 0) {
// wait for the sprite to rotate into a position where it's tangent to the camera
reachedTangentAngle = FALSE;
if (transformation->playerRotationRate > 0) {
if (prevFacingAngle < 270 && playerStatus->spriteFacingAngle >= 270) {
reachedTangentAngle = TRUE;
}
}
if (transformation->playerRotationRate < 0) {
if (prevFacingAngle > 270 && playerStatus->spriteFacingAngle <= 270) {
reachedTangentAngle = TRUE;
}
}
if (reachedTangentAngle) {
playerStatus->actionSubstate = SUBSTATE_DISGUISE_SPIN_DOWN;
playerStatus->currentStateTime = 2;
if (peach_make_disguise_npc(playerStatus->availableDisguiseType) != NULL) {
playerStatus->actionSubstate = SUBSTATE_DISGUISE_MAKE_NPC;
peach_sync_disguise_npc();
}
}
} else {
playerStatus->currentStateTime--;
}
break;
case SUBSTATE_DISGUISE_MAKE_NPC:
gameStatus = gGameStatusPtr;
playerStatus->animFlags |= PA_FLAG_INVISIBLE;
gameStatus->peachFlags |= PEACH_STATUS_FLAG_DISGUISED;
playerStatus->actionSubstate++; // SUBSTATE_DISGUISE_SPIN_DOWN
case SUBSTATE_DISGUISE_SPIN_DOWN:
if (--playerStatus->currentStateTime == 0) {
playerStatus->actionSubstate++; // SUBSTATE_DISGUISE_FINISH_SPIN
}
parasol_update_spin();
break;
case SUBSTATE_DISGUISE_FINISH_SPIN:
if (transformation->playerRotationRate > 0.0f) {
transformation->playerYawOffset -= 2.35;
if (transformation->playerYawOffset <= 0) {
transformation->playerYawOffset = 0;
playerStatus->currentStateTime = 10;
playerStatus->actionSubstate++; // SUBSTATE_DISGUISE_DONE
playerStatus->spriteFacingAngle = 180;
disguiseNpc = get_npc_by_index(PeachDisguiseNpcIndex);
disguiseNpc->isFacingAway = TRUE;
disguiseNpc->yaw = clamp_angle((cam->currentYaw - playerStatus->spriteFacingAngle) - 90);
disguiseNpc->yawCamOffset = disguiseNpc->yaw;
}
} else {
transformation->playerYawOffset += 2.35;
if (transformation->playerYawOffset >= 0) {
transformation->playerYawOffset = 0;
playerStatus->currentStateTime = 10;
playerStatus->spriteFacingAngle = 0;
playerStatus->actionSubstate++; // SUBSTATE_DISGUISE_DONE
disguiseNpc = get_npc_by_index(PeachDisguiseNpcIndex);
disguiseNpc->isFacingAway = FALSE;
disguiseNpc->yaw = clamp_angle((cam->currentYaw - playerStatus->spriteFacingAngle) - 90);
disguiseNpc->yawCamOffset = disguiseNpc->yaw;
}
}
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle + transformation->playerYawOffset);
playerStatus->targetYaw = clamp_angle((cam->currentYaw - playerStatus->spriteFacingAngle) - 90);
break;
case SUBSTATE_DISGUISE_DONE:
if (--playerStatus->currentStateTime == 0) {
set_time_freeze_mode(TIME_FREEZE_NORMAL);
disguiseNpc = get_npc_by_index(PeachDisguiseNpcIndex);
disguiseNpc->flags &= ~NPC_FLAG_IGNORE_CAMERA_FOR_YAW;
playerStatus->flags &= ~PS_FLAG_ROTATION_LOCKED;
set_action_state(ACTION_STATE_IDLE);
enable_player_static_collisions();
}
break;
case SUBSTATE_REVERT_INIT:
if (--playerStatus->currentStateTime == 0) {
playerStatus->actionSubstate++; // SUBSTATE_REVERT_WAIT_FOR_ANGLE
}
parasol_update_spin();
playerStatus->targetYaw = clamp_angle(cam->currentYaw - playerStatus->spriteFacingAngle - 90);
break;
case SUBSTATE_REVERT_WAIT_FOR_ANGLE:
prevFacingAngle = playerStatus->spriteFacingAngle;
parasol_update_spin();
playerStatus->targetYaw = clamp_angle((cam->currentYaw - playerStatus->spriteFacingAngle) - 90);
if (playerStatus->currentStateTime == 0) {
// wait for the sprite to rotate into a position where it's tangent to the camera
reachedTangentAngle = FALSE;
if (transformation->playerRotationRate > 0) {
if (prevFacingAngle < 270 && playerStatus->spriteFacingAngle >= 270) {
reachedTangentAngle = TRUE;
}
}
if (transformation->playerRotationRate < 0) {
if (prevFacingAngle > 270 && playerStatus->spriteFacingAngle <= 270) {
reachedTangentAngle = TRUE;
}
}
if (reachedTangentAngle) {
playerStatus->currentStateTime = 2;
playerStatus->actionSubstate++; // SUBSTATE_SPIN_DOWN
gameStatus2 = gGameStatusPtr;
playerStatus->animFlags &= ~PA_FLAG_INVISIBLE;
gameStatus2->peachFlags &= ~PEACH_STATUS_FLAG_DISGUISED;
playerStatus->peachDisguise = 0;
free_npc_by_index(PeachDisguiseNpcIndex);
playerStatus->colliderHeight = 55;
playerStatus->colliderDiameter = 38;
}
} else {
playerStatus->currentStateTime--;
}
break;
case SUBSTATE_SPIN_DOWN:
if (--playerStatus->currentStateTime == 0) {
playerStatus->actionSubstate++; // SUBSTATE_FINISH_SPIN
}
parasol_update_spin();
break;
case SUBSTATE_FINISH_SPIN:
if (transformation->playerRotationRate > 0) {
transformation->playerYawOffset -= 2.35;
if (transformation->playerYawOffset <= 0) {
transformation->playerYawOffset = 0;
playerStatus->currentStateTime = 10;
playerStatus->actionSubstate++; // SUBSTATE_REVERT_DONE
playerStatus->spriteFacingAngle = 180;
PrevPlayerDirection = 1;
playerStatus->currentYaw = clamp_angle((cam->currentYaw - 180) - 90);
PrevPlayerCamRelativeYaw = playerStatus->currentYaw;
}
} else {
transformation->playerYawOffset += 2.35;
if (transformation->playerYawOffset >= 0) {
transformation->playerYawOffset = 0;
playerStatus->currentStateTime = 10;
playerStatus->spriteFacingAngle = 0;
playerStatus->actionSubstate++; // SUBSTATE_REVERT_DONE
PrevPlayerDirection = 0;
playerStatus->currentYaw = clamp_angle((cam->currentYaw - 0) - 90);
PrevPlayerCamRelativeYaw = playerStatus->currentYaw;
}
}
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle + transformation->playerYawOffset);
playerStatus->targetYaw = clamp_angle(cam->currentYaw - playerStatus->spriteFacingAngle - 90);
break;
case SUBSTATE_REVERT_DONE:
if (--playerStatus->currentStateTime == 0) {
set_time_freeze_mode(TIME_FREEZE_NORMAL);
playerStatus->flags &= ~PS_FLAG_ROTATION_LOCKED;
set_action_state(ACTION_STATE_IDLE);
enable_player_static_collisions();
}
break;
case SUBSTATE_ABORT:
peach_force_disguise_action(FALSE);
enable_player_static_collisions();
break;
case SUBSTATE_FAILED:
if (playerStatus->animNotifyValue != 0) {
set_action_state(ACTION_STATE_IDLE);
enable_player_static_collisions();
}
break;
case SUBSTATE_BLOCKED:
if (--playerStatus->currentStateTime == 0) {
set_action_state(ACTION_STATE_IDLE);
enable_player_static_collisions();
}
break;
}
if (transformation->disguiseTime > 0) {
if (--transformation->disguiseTime == 10) {
if (playerStatus->spriteFacingAngle >= 90 && playerStatus->spriteFacingAngle < 270) {
angle = DEG_TO_RAD(cam->currentYaw - 270);
radius = 46;
} else {
angle = DEG_TO_RAD(cam->currentYaw - 90);
radius = 30;
}
transformation->position.x = playerStatus->position.x + (radius * sin_rad(angle));
transformation->position.z = playerStatus->position.z - (radius * cos_rad(angle));
transformation->position.y = playerStatus->position.y - 20;
}
if (transformation->disguiseTime <= 10 && transformation->disguiseTime & 1) {
f64 tempX, tempZ;
fx_sparkles(FX_SPARKLES_3,
transformation->position.x - 8,
transformation->position.y + 50,
transformation->position.z,
2);
/*
TODO something like:
angle = DEG_TO_RAD((cam->currentYaw + playerStatus->spriteFacingAngle) - 90);
transformation->position.x += (10.0 * sin_rad(angle));
transformation->position.z -= (10.0 * cos_rad(angle));
*/
angle = DEG_TO_RAD((cam->currentYaw + playerStatus->spriteFacingAngle) - 90);
tempX = transformation->position.x;
tempX += 10.0 * sin_rad(angle);
transformation->position.x = tempX;
tempZ = transformation->position.z;
transformation->position.z = tempZ - (10.0 * cos_rad(angle));
}
} else if (transformation->disguiseTime == 0) {
transformation->disguiseTime = -1;
if (transformation->npc != NULL) {
fx_pink_sparkles(playerStatus->availableDisguiseType - 1,
transformation->npc->pos.x,
transformation->npc->pos.y,
transformation->npc->pos.z,
1, transformation->npc->yawCamOffset);
}
}
if (transformation->revertTime != 0) {
if (transformation->revertTime <= 10) {
if (transformation->revertTime == 10) {
sfx_play_sound_at_player(SOUND_FE, SOUND_SPACE_MODE_0);
}
if ((transformation->revertTime & 3) == 0) {
fx_stars_shimmer(4,
playerStatus->position.x,
playerStatus->position.y,
playerStatus->position.z,
50, 50, 40, 30);
}
}
transformation->revertTime--;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_802471EC
/* 167A4C 802471EC 27BDFFE0 */ addiu $sp, $sp, -0x20
.L802471F0:
/* 167A50 802471F0 AFB20018 */ sw $s2, 0x18($sp)
D_802471F4:
/* 167A54 802471F4 0080902D */ daddu $s2, $a0, $zero
/* 167A58 802471F8 3C028025 */ lui $v0, %hi(D_8024C08C)
.L802471FC:
/* 167A5C 802471FC 8C42C08C */ lw $v0, %lo(D_8024C08C)($v0)
/* 167A60 80247200 3C030001 */ lui $v1, (0x10000 >> 16)
/* 167A64 80247204 AFBF001C */ sw $ra, 0x1C($sp)
/* 167A68 80247208 AFB10014 */ sw $s1, 0x14($sp)
D_8024720C:
/* 167A6C 8024720C AFB00010 */ sw $s0, 0x10($sp)
/* 167A70 80247210 92450003 */ lbu $a1, 0x3($s2)
glabel func_80247214
/* 167A74 80247214 00431024 */ and $v0, $v0, $v1
/* 167A78 80247218 10400007 */ beqz $v0, .L80247238
glabel func_8024721C
/* 167A7C 8024721C 00000000 */ nop
glabel func_80247220
/* 167A80 80247220 92420002 */ lbu $v0, 0x2($s2)
/* 167A84 80247224 2442FFFF */ addiu $v0, $v0, -0x1
/* 167A88 80247228 A2420002 */ sb $v0, 0x2($s2)
/* 167A8C 8024722C 00021600 */ sll $v0, $v0, 24
/* 167A90 80247230 04420001 */ bltzl $v0, .L80247238
/* 167A94 80247234 A2400002 */ sb $zero, 0x2($s2)
.L80247238:
/* 167A98 80247238 3C028025 */ lui $v0, %hi(D_8024C08C)
/* 167A9C 8024723C 8C42C08C */ lw $v0, %lo(D_8024C08C)($v0)
D_80247240:
/* 167AA0 80247240 3C030002 */ lui $v1, (0x20000 >> 16)
/* 167AA4 80247244 00431024 */ and $v0, $v0, $v1
jtbl_80247248:
/* 167AA8 80247248 1040000C */ beqz $v0, .L8024727C
/* 167AAC 8024724C 00000000 */ nop
D_80247250:
/* 167AB0 80247250 92420002 */ lbu $v0, 0x2($s2)
/* 167AB4 80247254 82430006 */ lb $v1, 0x6($s2)
/* 167AB8 80247258 24420001 */ addiu $v0, $v0, 0x1
/* 167ABC 8024725C A2420002 */ sb $v0, 0x2($s2)
.L80247260:
/* 167AC0 80247260 00021600 */ sll $v0, $v0, 24
/* 167AC4 80247264 00021603 */ sra $v0, $v0, 24
/* 167AC8 80247268 0043102A */ slt $v0, $v0, $v1
/* 167ACC 8024726C 92430006 */ lbu $v1, 0x6($s2)
D_80247270:
/* 167AD0 80247270 14400002 */ bnez $v0, .L8024727C
/* 167AD4 80247274 2462FFFF */ addiu $v0, $v1, -0x1
jtbl_80247278:
/* 167AD8 80247278 A2420002 */ sb $v0, 0x2($s2)
.L8024727C:
/* 167ADC 8024727C 82420004 */ lb $v0, 0x4($s2)
/* 167AE0 80247280 82430005 */ lb $v1, 0x5($s2)
/* 167AE4 80247284 00430018 */ mult $v0, $v1
.L80247288:
/* 167AE8 80247288 00003812 */ mflo $a3
.L8024728C:
/* 167AEC 8024728C 82420006 */ lb $v0, 0x6($s2)
.L80247290:
/* 167AF0 80247290 00000000 */ nop
.L80247294:
/* 167AF4 80247294 00E20018 */ mult $a3, $v0
glabel func_80247298
/* 167AF8 80247298 00002012 */ mflo $a0
/* 167AFC 8024729C 82420002 */ lb $v0, 0x2($s2)
/* 167B00 802472A0 00000000 */ nop
glabel func_802472A4
/* 167B04 802472A4 00620018 */ mult $v1, $v0
glabel func_802472A8
/* 167B08 802472A8 00001812 */ mflo $v1
D_802472AC:
/* 167B0C 802472AC 00831821 */ addu $v1, $a0, $v1
glabel func_802472B0
/* 167B10 802472B0 82440001 */ lb $a0, 0x1($s2)
/* 167B14 802472B4 8E420008 */ lw $v0, 0x8($s2)
/* 167B18 802472B8 00641821 */ addu $v1, $v1, $a0
/* 167B1C 802472BC 00431021 */ addu $v0, $v0, $v1
/* 167B20 802472C0 90420000 */ lbu $v0, 0x0($v0)
D_802472C4:
/* 167B24 802472C4 A2420003 */ sb $v0, 0x3($s2)
/* 167B28 802472C8 304200FF */ andi $v0, $v0, 0xFF
/* 167B2C 802472CC 10A20003 */ beq $a1, $v0, .L802472DC
/* 167B30 802472D0 00000000 */ nop
/* 167B34 802472D4 0C05272D */ jal sfx_play_sound
.L802472D8:
/* 167B38 802472D8 240400C7 */ addiu $a0, $zero, 0xC7
.L802472DC:
/* 167B3C 802472DC 3C108025 */ lui $s0, %hi(D_8024C084)
.L802472E0:
/* 167B40 802472E0 2610C084 */ addiu $s0, $s0, %lo(D_8024C084)
.L802472E4:
/* 167B44 802472E4 8E020000 */ lw $v0, 0x0($s0)
/* 167B48 802472E8 30421000 */ andi $v0, $v0, 0x1000
/* 167B4C 802472EC 10400009 */ beqz $v0, .L80247314
/* 167B50 802472F0 24020004 */ addiu $v0, $zero, 0x4
.L802472F4:
/* 167B54 802472F4 82430004 */ lb $v1, 0x4($s2)
/* 167B58 802472F8 14620006 */ bne $v1, $v0, .L80247314
/* 167B5C 802472FC 0240202D */ daddu $a0, $s2, $zero
/* 167B60 80247300 0000282D */ daddu $a1, $zero, $zero
/* 167B64 80247304 0C090B65 */ jal func_80242D94
.L80247308:
/* 167B68 80247308 00A0302D */ daddu $a2, $a1, $zero
/* 167B6C 8024730C 34028000 */ ori $v0, $zero, 0x8000
D_80247310:
/* 167B70 80247310 AE020000 */ sw $v0, 0x0($s0)
.L80247314:
/* 167B74 80247314 3C028025 */ lui $v0, %hi(D_8024C084)
.L80247318:
/* 167B78 80247318 8C42C084 */ lw $v0, %lo(D_8024C084)($v0)
.L8024731C:
/* 167B7C 8024731C 30428000 */ andi $v0, $v0, 0x8000
/* 167B80 80247320 10400225 */ beqz $v0, D_80247BB8
/* 167B84 80247324 00000000 */ nop
/* 167B88 80247328 0C05272D */ jal sfx_play_sound
/* 167B8C 8024732C 240400C9 */ addiu $a0, $zero, 0xC9
.L80247330:
/* 167B90 80247330 92430003 */ lbu $v1, 0x3($s2)
/* 167B94 80247334 10600005 */ beqz $v1, .L8024734C
glabel func_80247338
/* 167B98 80247338 24020001 */ addiu $v0, $zero, 0x1
D_8024733C:
/* 167B9C 8024733C 106201D8 */ beq $v1, $v0, D_80247AA0
/* 167BA0 80247340 00000000 */ nop
D_80247344:
/* 167BA4 80247344 08091EEE */ j D_80247BB8
/* 167BA8 80247348 00000000 */ nop
.L8024734C:
/* 167BAC 8024734C 82430004 */ lb $v1, 0x4($s2)
/* 167BB0 80247350 2C620005 */ sltiu $v0, $v1, 0x5
.L80247354:
/* 167BB4 80247354 10400218 */ beqz $v0, D_80247BB8
/* 167BB8 80247358 00031080 */ sll $v0, $v1, 2
/* 167BBC 8024735C 3C018025 */ lui $at, %hi(jtbl_8024C018)
D_80247360:
/* 167BC0 80247360 00220821 */ addu $at, $at, $v0
/* 167BC4 80247364 8C22C018 */ lw $v0, %lo(jtbl_8024C018)($at)
.L80247368:
/* 167BC8 80247368 00400008 */ jr $v0
.L8024736C:
/* 167BCC 8024736C 00000000 */ nop
glabel .L80247370
/* 167BD0 80247370 24020002 */ addiu $v0, $zero, 0x2
/* 167BD4 80247374 3C038025 */ lui $v1, %hi(D_80249B8C)
/* 167BD8 80247378 8C639B8C */ lw $v1, %lo(D_80249B8C)($v1)
.L8024737C:
/* 167BDC 8024737C 3C048016 */ lui $a0, %hi(gWindows)
.L80247380:
/* 167BE0 80247380 24849D50 */ addiu $a0, $a0, %lo(gWindows)
/* 167BE4 80247384 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 167BE8 80247388 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 167BEC 8024738C 240200B6 */ addiu $v0, $zero, 0xB6
D_80247390:
/* 167BF0 80247390 A0600004 */ sb $zero, 0x4($v1)
.L80247394:
/* 167BF4 80247394 808305E3 */ lb $v1, 0x5E3($a0)
/* 167BF8 80247398 A48205F0 */ sh $v0, 0x5F0($a0)
/* 167BFC 8024739C 24020019 */ addiu $v0, $zero, 0x19
/* 167C00 802473A0 A48205F2 */ sh $v0, 0x5F2($a0)
/* 167C04 802473A4 2402FFFF */ addiu $v0, $zero, -0x1
/* 167C08 802473A8 1062000B */ beq $v1, $v0, D_802473D8
.L802473AC:
/* 167C0C 802473AC 248505EC */ addiu $a1, $a0, 0x5EC
D_802473B0:
/* 167C10 802473B0 00031140 */ sll $v0, $v1, 5
D_802473B4:
/* 167C14 802473B4 00441021 */ addu $v0, $v0, $a0
.L802473B8:
/* 167C18 802473B8 94420010 */ lhu $v0, 0x10($v0)
/* 167C1C 802473BC 00021400 */ sll $v0, $v0, 16
D_802473C0:
/* 167C20 802473C0 00021C03 */ sra $v1, $v0, 16
.L802473C4:
/* 167C24 802473C4 000217C2 */ srl $v0, $v0, 31
D_802473C8:
/* 167C28 802473C8 00621821 */ addu $v1, $v1, $v0
/* 167C2C 802473CC 00031843 */ sra $v1, $v1, 1
.L802473D0:
/* 167C30 802473D0 08091CF9 */ j .L802473E4
/* 167C34 802473D4 2463FFA5 */ addiu $v1, $v1, -0x5B
D_802473D8:
/* 167C38 802473D8 24030045 */ addiu $v1, $zero, 0x45
D_802473DC:
/* 167C3C 802473DC 3C048016 */ lui $a0, %hi(gWindows)
D_802473E0:
/* 167C40 802473E0 24849D50 */ addiu $a0, $a0, %lo(gWindows)
.L802473E4:
/* 167C44 802473E4 A4A30000 */ sh $v1, 0x0($a1)
D_802473E8:
/* 167C48 802473E8 948205F2 */ lhu $v0, 0x5F2($a0)
.L802473EC:
/* 167C4C 802473EC 00021400 */ sll $v0, $v0, 16
D_802473F0:
/* 167C50 802473F0 00021C03 */ sra $v1, $v0, 16
/* 167C54 802473F4 000217C2 */ srl $v0, $v0, 31
D_802473F8:
/* 167C58 802473F8 00621821 */ addu $v1, $v1, $v0
/* 167C5C 802473FC 00032843 */ sra $a1, $v1, 1
D_80247400:
/* 167C60 80247400 808305E3 */ lb $v1, 0x5E3($a0)
/* 167C64 80247404 2402FFFF */ addiu $v0, $zero, -0x1
D_80247408:
/* 167C68 80247408 1062000B */ beq $v1, $v0, D_80247438
/* 167C6C 8024740C 248605EE */ addiu $a2, $a0, 0x5EE
D_80247410:
/* 167C70 80247410 00031140 */ sll $v0, $v1, 5
.L80247414:
/* 167C74 80247414 00441021 */ addu $v0, $v0, $a0
D_80247418:
/* 167C78 80247418 94420012 */ lhu $v0, 0x12($v0)
/* 167C7C 8024741C 00021400 */ sll $v0, $v0, 16
D_80247420:
/* 167C80 80247420 00021C03 */ sra $v1, $v0, 16
/* 167C84 80247424 000217C2 */ srl $v0, $v0, 31
D_80247428:
/* 167C88 80247428 00621821 */ addu $v1, $v1, $v0
/* 167C8C 8024742C 00031843 */ sra $v1, $v1, 1
D_80247430:
/* 167C90 80247430 08091D10 */ j jtbl_80247440
.L80247434:
/* 167C94 80247434 00651023 */ subu $v0, $v1, $a1
D_80247438:
/* 167C98 80247438 24020078 */ addiu $v0, $zero, 0x78
/* 167C9C 8024743C 00451023 */ subu $v0, $v0, $a1
jtbl_80247440:
/* 167CA0 80247440 2404002F */ addiu $a0, $zero, 0x2F
D_80247444:
/* 167CA4 80247444 24050001 */ addiu $a1, $zero, 0x1
D_80247448:
/* 167CA8 80247448 0C051F9F */ jal set_window_update
/* 167CAC 8024744C A4C20000 */ sh $v0, 0x0($a2)
/* 167CB0 80247450 3C058024 */ lui $a1, %hi(func_80243EEC)
/* 167CB4 80247454 24A53EEC */ addiu $a1, $a1, %lo(func_80243EEC)
D_80247458:
/* 167CB8 80247458 0C051F9F */ jal set_window_update
/* 167CBC 8024745C 24040032 */ addiu $a0, $zero, 0x32
/* 167CC0 80247460 0000202D */ daddu $a0, $zero, $zero
/* 167CC4 80247464 3C028025 */ lui $v0, %hi(D_80249B84)
/* 167CC8 80247468 8C429B84 */ lw $v0, %lo(D_80249B84)($v0)
/* 167CCC 8024746C 3C068007 */ lui $a2, %hi(gSaveSlotMetadata)
D_80247470:
/* 167CD0 80247470 24C679C4 */ addiu $a2, $a2, %lo(gSaveSlotMetadata)
/* 167CD4 80247474 90500003 */ lbu $s0, 0x3($v0)
/* 167CD8 80247478 240500F7 */ addiu $a1, $zero, 0xF7
/* 167CDC 8024747C 00101040 */ sll $v0, $s0, 1
.L80247480:
/* 167CE0 80247480 00501021 */ addu $v0, $v0, $s0
D_80247484:
/* 167CE4 80247484 000218C0 */ sll $v1, $v0, 3
D_80247488:
/* 167CE8 80247488 00831021 */ addu $v0, $a0, $v1
.L8024748C:
/* 167CEC 8024748C 00461021 */ addu $v0, $v0, $a2
/* 167CF0 80247490 A0450007 */ sb $a1, 0x7($v0)
/* 167CF4 80247494 24840001 */ addiu $a0, $a0, 0x1
/* 167CF8 80247498 28820008 */ slti $v0, $a0, 0x8
D_8024749C:
/* 167CFC 8024749C 1440FFFB */ bnez $v0, .L8024748C
D_802474A0:
/* 167D00 802474A0 00831021 */ addu $v0, $a0, $v1
.L802474A4:
/* 167D04 802474A4 0200202D */ daddu $a0, $s0, $zero
/* 167D08 802474A8 3C038007 */ lui $v1, %hi(gSaveSlotMetadata)
/* 167D0C 802474AC 246379C4 */ addiu $v1, $v1, %lo(gSaveSlotMetadata)
D_802474B0:
/* 167D10 802474B0 00101040 */ sll $v0, $s0, 1
/* 167D14 802474B4 00501021 */ addu $v0, $v0, $s0
/* 167D18 802474B8 000210C0 */ sll $v0, $v0, 3
/* 167D1C 802474BC 00431021 */ addu $v0, $v0, $v1
jtbl_802474C0:
/* 167D20 802474C0 A0400006 */ sb $zero, 0x6($v0)
/* 167D24 802474C4 AC400000 */ sw $zero, 0x0($v0)
D_802474C8:
/* 167D28 802474C8 0C00AD0B */ jal fio_erase_game
.L802474CC:
/* 167D2C 802474CC A0400004 */ sb $zero, 0x4($v0)
glabel func_802474D0
/* 167D30 802474D0 3C018007 */ lui $at, %hi(gSaveSlotHasData)
.L802474D4:
/* 167D34 802474D4 00300821 */ addu $at, $at, $s0
D_802474D8:
/* 167D38 802474D8 A0207A24 */ sb $zero, %lo(gSaveSlotHasData)($at)
D_802474DC:
/* 167D3C 802474DC 08091EEE */ j D_80247BB8
D_802474E0:
/* 167D40 802474E0 00000000 */ nop
glabel .L802474E4
/* 167D44 802474E4 24020002 */ addiu $v0, $zero, 0x2
jtbl_802474E8:
/* 167D48 802474E8 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 167D4C 802474EC A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
.L802474F0:
/* 167D50 802474F0 24020002 */ addiu $v0, $zero, 0x2
D_802474F4:
/* 167D54 802474F4 3C048016 */ lui $a0, %hi(gWindows)
/* 167D58 802474F8 24849D50 */ addiu $a0, $a0, %lo(gWindows)
/* 167D5C 802474FC 3C038025 */ lui $v1, %hi(D_80249B8C)
D_80247500:
/* 167D60 80247500 8C639B8C */ lw $v1, %lo(D_80249B8C)($v1)
/* 167D64 80247504 A0620004 */ sb $v0, 0x4($v1)
glabel func_80247508
/* 167D68 80247508 808305E3 */ lb $v1, 0x5E3($a0)
/* 167D6C 8024750C 2402009A */ addiu $v0, $zero, 0x9A
/* 167D70 80247510 A48205F0 */ sh $v0, 0x5F0($a0)
/* 167D74 80247514 24020027 */ addiu $v0, $zero, 0x27
/* 167D78 80247518 A48205F2 */ sh $v0, 0x5F2($a0)
/* 167D7C 8024751C 2402FFFF */ addiu $v0, $zero, -0x1
/* 167D80 80247520 1062000B */ beq $v1, $v0, .L80247550
/* 167D84 80247524 248505EC */ addiu $a1, $a0, 0x5EC
/* 167D88 80247528 00031140 */ sll $v0, $v1, 5
D_8024752C:
/* 167D8C 8024752C 00441021 */ addu $v0, $v0, $a0
/* 167D90 80247530 94420010 */ lhu $v0, 0x10($v0)
/* 167D94 80247534 00021400 */ sll $v0, $v0, 16
.L80247538:
/* 167D98 80247538 00021C03 */ sra $v1, $v0, 16
/* 167D9C 8024753C 000217C2 */ srl $v0, $v0, 31
/* 167DA0 80247540 00621821 */ addu $v1, $v1, $v0
/* 167DA4 80247544 00031843 */ sra $v1, $v1, 1
D_80247548:
/* 167DA8 80247548 08091D57 */ j .L8024755C
.L8024754C:
/* 167DAC 8024754C 2463FFB3 */ addiu $v1, $v1, -0x4D
.L80247550:
/* 167DB0 80247550 24030053 */ addiu $v1, $zero, 0x53
.L80247554:
/* 167DB4 80247554 3C048016 */ lui $a0, %hi(gWindows)
D_80247558:
/* 167DB8 80247558 24849D50 */ addiu $a0, $a0, %lo(gWindows)
.L8024755C:
/* 167DBC 8024755C A4A30000 */ sh $v1, 0x0($a1)
/* 167DC0 80247560 948205F2 */ lhu $v0, 0x5F2($a0)
/* 167DC4 80247564 00021400 */ sll $v0, $v0, 16
glabel func_80247568
/* 167DC8 80247568 00021C03 */ sra $v1, $v0, 16
/* 167DCC 8024756C 000217C2 */ srl $v0, $v0, 31
glabel func_80247570
/* 167DD0 80247570 00621821 */ addu $v1, $v1, $v0
/* 167DD4 80247574 00032843 */ sra $a1, $v1, 1
/* 167DD8 80247578 808305E3 */ lb $v1, 0x5E3($a0)
/* 167DDC 8024757C 2402FFFF */ addiu $v0, $zero, -0x1
/* 167DE0 80247580 1062000B */ beq $v1, $v0, D_802475B0
D_80247584:
/* 167DE4 80247584 248605EE */ addiu $a2, $a0, 0x5EE
D_80247588:
/* 167DE8 80247588 00031140 */ sll $v0, $v1, 5
/* 167DEC 8024758C 00441021 */ addu $v0, $v0, $a0
/* 167DF0 80247590 94420012 */ lhu $v0, 0x12($v0)
/* 167DF4 80247594 00021400 */ sll $v0, $v0, 16
/* 167DF8 80247598 00021C03 */ sra $v1, $v0, 16
/* 167DFC 8024759C 000217C2 */ srl $v0, $v0, 31
/* 167E00 802475A0 00621821 */ addu $v1, $v1, $v0
D_802475A4:
/* 167E04 802475A4 00031843 */ sra $v1, $v1, 1
/* 167E08 802475A8 08091D6E */ j .L802475B8
/* 167E0C 802475AC 00651023 */ subu $v0, $v1, $a1
D_802475B0:
/* 167E10 802475B0 24020078 */ addiu $v0, $zero, 0x78
/* 167E14 802475B4 00451023 */ subu $v0, $v0, $a1
.L802475B8:
/* 167E18 802475B8 2404002F */ addiu $a0, $zero, 0x2F
/* 167E1C 802475BC 24050001 */ addiu $a1, $zero, 0x1
.L802475C0:
/* 167E20 802475C0 0C051F9F */ jal set_window_update
/* 167E24 802475C4 A4C20000 */ sh $v0, 0x0($a2)
/* 167E28 802475C8 3C058024 */ lui $a1, %hi(func_80243EEC)
glabel .L802475CC
/* 167E2C 802475CC 24A53EEC */ addiu $a1, $a1, %lo(func_80243EEC)
D_802475D0:
/* 167E30 802475D0 0C051F9F */ jal set_window_update
/* 167E34 802475D4 24040032 */ addiu $a0, $zero, 0x32
.L802475D8:
/* 167E38 802475D8 3C118025 */ lui $s1, %hi(D_8024C094)
D_802475DC:
/* 167E3C 802475DC 2631C094 */ addiu $s1, $s1, %lo(D_8024C094)
D_802475E0:
/* 167E40 802475E0 0C00ACB4 */ jal fio_load_game
D_802475E4:
/* 167E44 802475E4 8E240000 */ lw $a0, 0x0($s1)
D_802475E8:
/* 167E48 802475E8 3C108025 */ lui $s0, %hi(filemenu_iterFileIdx)
/* 167E4C 802475EC 2610C080 */ addiu $s0, $s0, %lo(filemenu_iterFileIdx)
/* 167E50 802475F0 3C068007 */ lui $a2, %hi(gSaveSlotMetadata)
/* 167E54 802475F4 24C679C4 */ addiu $a2, $a2, %lo(gSaveSlotMetadata)
/* 167E58 802475F8 8E040000 */ lw $a0, 0x0($s0)
/* 167E5C 802475FC 8E250000 */ lw $a1, 0x0($s1)
/* 167E60 80247600 0080102D */ daddu $v0, $a0, $zero
/* 167E64 80247604 00021840 */ sll $v1, $v0, 1
/* 167E68 80247608 00621821 */ addu $v1, $v1, $v0
/* 167E6C 8024760C 000318C0 */ sll $v1, $v1, 3
D_80247610:
/* 167E70 80247610 00661821 */ addu $v1, $v1, $a2
.L80247614:
/* 167E74 80247614 00051040 */ sll $v0, $a1, 1
D_80247618:
/* 167E78 80247618 00451021 */ addu $v0, $v0, $a1
/* 167E7C 8024761C 000210C0 */ sll $v0, $v0, 3
jtbl_80247620:
/* 167E80 80247620 00461021 */ addu $v0, $v0, $a2
/* 167E84 80247624 8C480000 */ lw $t0, 0x0($v0)
D_80247628:
/* 167E88 80247628 8C490004 */ lw $t1, 0x4($v0)
/* 167E8C 8024762C 8C4A0008 */ lw $t2, 0x8($v0)
/* 167E90 80247630 8C4B000C */ lw $t3, 0xC($v0)
/* 167E94 80247634 AC680000 */ sw $t0, 0x0($v1)
/* 167E98 80247638 AC690004 */ sw $t1, 0x4($v1)
/* 167E9C 8024763C AC6A0008 */ sw $t2, 0x8($v1)
/* 167EA0 80247640 AC6B000C */ sw $t3, 0xC($v1)
/* 167EA4 80247644 8C480010 */ lw $t0, 0x10($v0)
D_80247648:
/* 167EA8 80247648 8C490014 */ lw $t1, 0x14($v0)
.L8024764C:
/* 167EAC 8024764C AC680010 */ sw $t0, 0x10($v1)
/* 167EB0 80247650 0C00ACDD */ jal fio_save_game
/* 167EB4 80247654 AC690014 */ sw $t1, 0x14($v1)
/* 167EB8 80247658 8E030000 */ lw $v1, 0x0($s0)
/* 167EBC 8024765C 08091DF9 */ j D_802477E4
/* 167EC0 80247660 24020001 */ addiu $v0, $zero, 0x1
glabel D_80247664
/* 167EC4 80247664 24020002 */ addiu $v0, $zero, 0x2
.L80247668:
/* 167EC8 80247668 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 167ECC 8024766C A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
jtbl_80247670:
/* 167ED0 80247670 24020001 */ addiu $v0, $zero, 0x1
/* 167ED4 80247674 3C048016 */ lui $a0, %hi(gWindows)
D_80247678:
/* 167ED8 80247678 24849D50 */ addiu $a0, $a0, %lo(gWindows)
/* 167EDC 8024767C 3C038025 */ lui $v1, %hi(D_80249B8C)
D_80247680:
/* 167EE0 80247680 8C639B8C */ lw $v1, %lo(D_80249B8C)($v1)
/* 167EE4 80247684 A0620004 */ sb $v0, 0x4($v1)
D_80247688:
/* 167EE8 80247688 808305E3 */ lb $v1, 0x5E3($a0)
D_8024768C:
/* 167EEC 8024768C 24020099 */ addiu $v0, $zero, 0x99
D_80247690:
/* 167EF0 80247690 A48205F0 */ sh $v0, 0x5F0($a0)
/* 167EF4 80247694 24020019 */ addiu $v0, $zero, 0x19
D_80247698:
/* 167EF8 80247698 A48205F2 */ sh $v0, 0x5F2($a0)
D_8024769C:
/* 167EFC 8024769C 2402FFFF */ addiu $v0, $zero, -0x1
D_802476A0:
/* 167F00 802476A0 1062000B */ beq $v1, $v0, .L802476D0
.L802476A4:
/* 167F04 802476A4 248505EC */ addiu $a1, $a0, 0x5EC
/* 167F08 802476A8 00031140 */ sll $v0, $v1, 5
/* 167F0C 802476AC 00441021 */ addu $v0, $v0, $a0
/* 167F10 802476B0 94420010 */ lhu $v0, 0x10($v0)
/* 167F14 802476B4 00021400 */ sll $v0, $v0, 16
/* 167F18 802476B8 00021C03 */ sra $v1, $v0, 16
/* 167F1C 802476BC 000217C2 */ srl $v0, $v0, 31
/* 167F20 802476C0 00621821 */ addu $v1, $v1, $v0
.L802476C4:
/* 167F24 802476C4 00031843 */ sra $v1, $v1, 1
/* 167F28 802476C8 08091DB7 */ j D_802476DC
.L802476CC:
/* 167F2C 802476CC 2463FFB4 */ addiu $v1, $v1, -0x4C
.L802476D0:
/* 167F30 802476D0 24030054 */ addiu $v1, $zero, 0x54
/* 167F34 802476D4 3C048016 */ lui $a0, %hi(gWindows)
D_802476D8:
/* 167F38 802476D8 24849D50 */ addiu $a0, $a0, %lo(gWindows)
D_802476DC:
/* 167F3C 802476DC A4A30000 */ sh $v1, 0x0($a1)
/* 167F40 802476E0 948205F2 */ lhu $v0, 0x5F2($a0)
/* 167F44 802476E4 00021400 */ sll $v0, $v0, 16
/* 167F48 802476E8 00021C03 */ sra $v1, $v0, 16
/* 167F4C 802476EC 000217C2 */ srl $v0, $v0, 31
/* 167F50 802476F0 00621821 */ addu $v1, $v1, $v0
D_802476F4:
/* 167F54 802476F4 00032843 */ sra $a1, $v1, 1
/* 167F58 802476F8 808305E3 */ lb $v1, 0x5E3($a0)
D_802476FC:
/* 167F5C 802476FC 2402FFFF */ addiu $v0, $zero, -0x1
/* 167F60 80247700 1062000B */ beq $v1, $v0, .L80247730
/* 167F64 80247704 248605EE */ addiu $a2, $a0, 0x5EE
/* 167F68 80247708 00031140 */ sll $v0, $v1, 5
/* 167F6C 8024770C 00441021 */ addu $v0, $v0, $a0
/* 167F70 80247710 94420012 */ lhu $v0, 0x12($v0)
/* 167F74 80247714 00021400 */ sll $v0, $v0, 16
/* 167F78 80247718 00021C03 */ sra $v1, $v0, 16
D_8024771C:
/* 167F7C 8024771C 000217C2 */ srl $v0, $v0, 31
D_80247720:
/* 167F80 80247720 00621821 */ addu $v1, $v1, $v0
/* 167F84 80247724 00031843 */ sra $v1, $v1, 1
D_80247728:
/* 167F88 80247728 08091DCE */ j D_80247738
D_8024772C:
/* 167F8C 8024772C 00651023 */ subu $v0, $v1, $a1
.L80247730:
/* 167F90 80247730 24020078 */ addiu $v0, $zero, 0x78
/* 167F94 80247734 00451023 */ subu $v0, $v0, $a1
D_80247738:
/* 167F98 80247738 2404002F */ addiu $a0, $zero, 0x2F
.L8024773C:
/* 167F9C 8024773C 24050001 */ addiu $a1, $zero, 0x1
D_80247740:
/* 167FA0 80247740 0C051F9F */ jal set_window_update
/* 167FA4 80247744 A4C20000 */ sh $v0, 0x0($a2)
/* 167FA8 80247748 3C058024 */ lui $a1, %hi(func_80243EEC)
/* 167FAC 8024774C 24A53EEC */ addiu $a1, $a1, %lo(func_80243EEC)
D_80247750:
/* 167FB0 80247750 0C051F9F */ jal set_window_update
/* 167FB4 80247754 24040032 */ addiu $a0, $zero, 0x32
/* 167FB8 80247758 3C108025 */ lui $s0, %hi(D_80249B84)
.L8024775C:
/* 167FBC 8024775C 26109B84 */ addiu $s0, $s0, %lo(D_80249B84)
/* 167FC0 80247760 8E020000 */ lw $v0, 0x0($s0)
D_80247764:
/* 167FC4 80247764 90420003 */ lbu $v0, 0x3($v0)
D_80247768:
/* 167FC8 80247768 3C058007 */ lui $a1, %hi(gSaveSlotMetadata)
/* 167FCC 8024776C 24A579C4 */ addiu $a1, $a1, %lo(gSaveSlotMetadata)
D_80247770:
/* 167FD0 80247770 00021840 */ sll $v1, $v0, 1
/* 167FD4 80247774 00621821 */ addu $v1, $v1, $v0
/* 167FD8 80247778 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 167FDC 8024777C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
D_80247780:
/* 167FE0 80247780 000318C0 */ sll $v1, $v1, 3
/* 167FE4 80247784 90440166 */ lbu $a0, 0x166($v0)
D_80247788:
/* 167FE8 80247788 00651821 */ addu $v1, $v1, $a1
/* 167FEC 8024778C 00041040 */ sll $v0, $a0, 1
/* 167FF0 80247790 00441021 */ addu $v0, $v0, $a0
D_80247794:
/* 167FF4 80247794 000210C0 */ sll $v0, $v0, 3
/* 167FF8 80247798 00451021 */ addu $v0, $v0, $a1
/* 167FFC 8024779C 8C480000 */ lw $t0, 0x0($v0)
/* 168000 802477A0 8C490004 */ lw $t1, 0x4($v0)
/* 168004 802477A4 8C4A0008 */ lw $t2, 0x8($v0)
/* 168008 802477A8 8C4B000C */ lw $t3, 0xC($v0)
/* 16800C 802477AC AC680000 */ sw $t0, 0x0($v1)
D_802477B0:
/* 168010 802477B0 AC690004 */ sw $t1, 0x4($v1)
D_802477B4:
/* 168014 802477B4 AC6A0008 */ sw $t2, 0x8($v1)
D_802477B8:
/* 168018 802477B8 AC6B000C */ sw $t3, 0xC($v1)
/* 16801C 802477BC 8C480010 */ lw $t0, 0x10($v0)
D_802477C0:
/* 168020 802477C0 8C490014 */ lw $t1, 0x14($v0)
.L802477C4:
/* 168024 802477C4 AC680010 */ sw $t0, 0x10($v1)
D_802477C8:
/* 168028 802477C8 AC690014 */ sw $t1, 0x14($v1)
D_802477CC:
/* 16802C 802477CC 8E020000 */ lw $v0, 0x0($s0)
/* 168030 802477D0 0C00ACDD */ jal fio_save_game
D_802477D4:
/* 168034 802477D4 90440003 */ lbu $a0, 0x3($v0)
/* 168038 802477D8 8E020000 */ lw $v0, 0x0($s0)
/* 16803C 802477DC 90430003 */ lbu $v1, 0x3($v0)
D_802477E0:
/* 168040 802477E0 24020001 */ addiu $v0, $zero, 0x1
D_802477E4:
/* 168044 802477E4 3C018007 */ lui $at, %hi(gSaveSlotHasData)
D_802477E8:
/* 168048 802477E8 00230821 */ addu $at, $at, $v1
D_802477EC:
/* 16804C 802477EC A0227A24 */ sb $v0, %lo(gSaveSlotHasData)($at)
.L802477F0:
/* 168050 802477F0 08091EEE */ j D_80247BB8
/* 168054 802477F4 00000000 */ nop
glabel .L802477F8
/* 168058 802477F8 0C039CE8 */ jal clear_player_data
/* 16805C 802477FC 00000000 */ nop
D_80247800:
/* 168060 80247800 0C0514C8 */ jal clear_saved_variables
/* 168064 80247804 00000000 */ nop
D_80247808:
/* 168068 80247808 0000202D */ daddu $a0, $zero, $zero
/* 16806C 8024780C 3C05F5DE */ lui $a1, (0xF5DE0180 >> 16)
/* 168070 80247810 34A50180 */ ori $a1, $a1, (0xF5DE0180 & 0xFFFF)
/* 168074 80247814 2406FF80 */ addiu $a2, $zero, -0x80
/* 168078 80247818 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* 16807C 8024781C 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
.L80247820:
/* 168080 80247820 2402000B */ addiu $v0, $zero, 0xB
.L80247824:
/* 168084 80247824 A4600086 */ sh $zero, 0x86($v1)
/* 168088 80247828 A462008C */ sh $v0, 0x8C($v1)
/* 16808C 8024782C 0C0B2026 */ jal evt_set_variable
/* 168090 80247830 A460008E */ sh $zero, 0x8E($v1)
/* 168094 80247834 0000202D */ daddu $a0, $zero, $zero
/* 168098 80247838 3C028025 */ lui $v0, %hi(D_80249B84)
/* 16809C 8024783C 8C429B84 */ lw $v0, %lo(D_80249B84)($v0)
D_80247840:
/* 1680A0 80247840 3C078007 */ lui $a3, %hi(gSaveSlotMetadata)
/* 1680A4 80247844 24E779C4 */ addiu $a3, $a3, %lo(gSaveSlotMetadata)
/* 1680A8 80247848 90510003 */ lbu $s1, 0x3($v0)
.L8024784C:
/* 1680AC 8024784C 3C068025 */ lui $a2, %hi(D_8024C110)
/* 1680B0 80247850 24C6C110 */ addiu $a2, $a2, %lo(D_8024C110)
/* 1680B4 80247854 00111040 */ sll $v0, $s1, 1
/* 1680B8 80247858 00511021 */ addu $v0, $v0, $s1
/* 1680BC 8024785C 000228C0 */ sll $a1, $v0, 3
/* 1680C0 80247860 00851021 */ addu $v0, $a0, $a1
.L80247864:
/* 1680C4 80247864 00861821 */ addu $v1, $a0, $a2
/* 1680C8 80247868 24840001 */ addiu $a0, $a0, 0x1
/* 1680CC 8024786C 90630000 */ lbu $v1, 0x0($v1)
D_80247870:
/* 1680D0 80247870 00471021 */ addu $v0, $v0, $a3
/* 1680D4 80247874 A0430007 */ sb $v1, 0x7($v0)
D_80247878:
/* 1680D8 80247878 28820008 */ slti $v0, $a0, 0x8
D_8024787C:
/* 1680DC 8024787C 1440FFF9 */ bnez $v0, .L80247864
D_80247880:
/* 1680E0 80247880 00851021 */ addu $v0, $a0, $a1
/* 1680E4 80247884 0C00ACDD */ jal fio_save_game
D_80247888:
/* 1680E8 80247888 0220202D */ daddu $a0, $s1, $zero
/* 1680EC 8024788C 24040030 */ addiu $a0, $zero, 0x30
/* 1680F0 80247890 3C108024 */ lui $s0, %hi(D_80243628)
/* 1680F4 80247894 26103628 */ addiu $s0, $s0, %lo(D_80243628)
/* 1680F8 80247898 24020001 */ addiu $v0, $zero, 0x1
.L8024789C:
/* 1680FC 8024789C 3C018007 */ lui $at, %hi(gSaveSlotHasData)
/* 168100 802478A0 00310821 */ addu $at, $at, $s1
/* 168104 802478A4 A0227A24 */ sb $v0, %lo(gSaveSlotHasData)($at)
/* 168108 802478A8 0C051F9F */ jal set_window_update
/* 16810C 802478AC 0200282D */ daddu $a1, $s0, $zero
/* 168110 802478B0 24040031 */ addiu $a0, $zero, 0x31
.L802478B4:
/* 168114 802478B4 0C051F9F */ jal set_window_update
D_802478B8:
/* 168118 802478B8 0200282D */ daddu $a1, $s0, $zero
/* 16811C 802478BC 2404002D */ addiu $a0, $zero, 0x2D
D_802478C0:
/* 168120 802478C0 3C108024 */ lui $s0, %hi(func_8024381C)
/* 168124 802478C4 2610381C */ addiu $s0, $s0, %lo(func_8024381C)
D_802478C8:
/* 168128 802478C8 0C051F9F */ jal set_window_update
/* 16812C 802478CC 0200282D */ daddu $a1, $s0, $zero
/* 168130 802478D0 24040033 */ addiu $a0, $zero, 0x33
/* 168134 802478D4 0C051F9F */ jal set_window_update
/* 168138 802478D8 0200282D */ daddu $a1, $s0, $zero
/* 16813C 802478DC 24040034 */ addiu $a0, $zero, 0x34
/* 168140 802478E0 0C051F9F */ jal set_window_update
.L802478E4:
/* 168144 802478E4 0200282D */ daddu $a1, $s0, $zero
D_802478E8:
/* 168148 802478E8 24040035 */ addiu $a0, $zero, 0x35
/* 16814C 802478EC 0C051F9F */ jal set_window_update
/* 168150 802478F0 0200282D */ daddu $a1, $s0, $zero
/* 168154 802478F4 24040036 */ addiu $a0, $zero, 0x36
/* 168158 802478F8 0C051F9F */ jal set_window_update
/* 16815C 802478FC 0200282D */ daddu $a1, $s0, $zero
D_80247900:
/* 168160 80247900 24040037 */ addiu $a0, $zero, 0x37
/* 168164 80247904 0C051F9F */ jal set_window_update
/* 168168 80247908 0200282D */ daddu $a1, $s0, $zero
/* 16816C 8024790C 24040035 */ addiu $a0, $zero, 0x35
/* 168170 80247910 0C051F9F */ jal set_window_update
/* 168174 80247914 0200282D */ daddu $a1, $s0, $zero
/* 168178 80247918 24040038 */ addiu $a0, $zero, 0x38
glabel .L8024791C
/* 16817C 8024791C 0C051F9F */ jal set_window_update
/* 168180 80247920 0200282D */ daddu $a1, $s0, $zero
glabel .L80247924
/* 168184 80247924 24040039 */ addiu $a0, $zero, 0x39
/* 168188 80247928 0C051F9F */ jal set_window_update
D_8024792C:
/* 16818C 8024792C 0200282D */ daddu $a1, $s0, $zero
/* 168190 80247930 2404003A */ addiu $a0, $zero, 0x3A
glabel .L80247934
/* 168194 80247934 0C051F9F */ jal set_window_update
rodata_alignment:
/* 168198 80247938 0200282D */ daddu $a1, $s0, $zero
glabel .L8024793C
/* 16819C 8024793C 2404003B */ addiu $a0, $zero, 0x3B
D_80247940:
/* 1681A0 80247940 0C051F9F */ jal set_window_update
glabel .L80247944
/* 1681A4 80247944 0200282D */ daddu $a1, $s0, $zero
/* 1681A8 80247948 3C058024 */ lui $a1, %hi(func_80243EEC)
glabel .L8024794C
/* 1681AC 8024794C 24A53EEC */ addiu $a1, $a1, %lo(func_80243EEC)
D_80247950:
/* 1681B0 80247950 0C051F9F */ jal set_window_update
/* 1681B4 80247954 24040032 */ addiu $a0, $zero, 0x32
D_80247958:
/* 1681B8 80247958 24020002 */ addiu $v0, $zero, 0x2
.L8024795C:
/* 1681BC 8024795C 3C018025 */ lui $at, %hi(D_8024C098_C09918)
D_80247960:
/* 1681C0 80247960 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 1681C4 80247964 24020003 */ addiu $v0, $zero, 0x3
jtbl_80247968:
/* 1681C8 80247968 3C048016 */ lui $a0, %hi(gWindows)
D_8024796C:
/* 1681CC 8024796C 24849D50 */ addiu $a0, $a0, %lo(gWindows)
glabel .L80247970
/* 1681D0 80247970 3C038025 */ lui $v1, %hi(D_80249B8C)
/* 1681D4 80247974 8C639B8C */ lw $v1, %lo(D_80249B8C)($v1)
/* 1681D8 80247978 A0620004 */ sb $v0, 0x4($v1)
D_8024797C:
/* 1681DC 8024797C 808305E3 */ lb $v1, 0x5E3($a0)
D_80247980:
/* 1681E0 80247980 240200B8 */ addiu $v0, $zero, 0xB8
D_80247984:
/* 1681E4 80247984 A48205F0 */ sh $v0, 0x5F0($a0)
/* 1681E8 80247988 24020019 */ addiu $v0, $zero, 0x19
/* 1681EC 8024798C A48205F2 */ sh $v0, 0x5F2($a0)
/* 1681F0 80247990 2402FFFF */ addiu $v0, $zero, -0x1
/* 1681F4 80247994 1062000B */ beq $v1, $v0, .L802479C4
/* 1681F8 80247998 248505EC */ addiu $a1, $a0, 0x5EC
/* 1681FC 8024799C 00031140 */ sll $v0, $v1, 5
/* 168200 802479A0 00441021 */ addu $v0, $v0, $a0
glabel .L802479A4
/* 168204 802479A4 94420010 */ lhu $v0, 0x10($v0)
D_802479A8:
/* 168208 802479A8 00021400 */ sll $v0, $v0, 16
/* 16820C 802479AC 00021C03 */ sra $v1, $v0, 16
D_802479B0:
/* 168210 802479B0 000217C2 */ srl $v0, $v0, 31
/* 168214 802479B4 00621821 */ addu $v1, $v1, $v0
D_802479B8:
/* 168218 802479B8 00031843 */ sra $v1, $v1, 1
.L802479BC:
/* 16821C 802479BC 08091E74 */ j jtbl_802479D0
D_802479C0:
/* 168220 802479C0 2463FFA4 */ addiu $v1, $v1, -0x5C
.L802479C4:
/* 168224 802479C4 24030044 */ addiu $v1, $zero, 0x44
D_802479C8:
/* 168228 802479C8 3C048016 */ lui $a0, %hi(gWindows)
glabel .L802479CC
/* 16822C 802479CC 24849D50 */ addiu $a0, $a0, %lo(gWindows)
jtbl_802479D0:
/* 168230 802479D0 A4A30000 */ sh $v1, 0x0($a1)
/* 168234 802479D4 948205F2 */ lhu $v0, 0x5F2($a0)
/* 168238 802479D8 00021400 */ sll $v0, $v0, 16
/* 16823C 802479DC 00021C03 */ sra $v1, $v0, 16
/* 168240 802479E0 000217C2 */ srl $v0, $v0, 31
/* 168244 802479E4 00621821 */ addu $v1, $v1, $v0
/* 168248 802479E8 00032843 */ sra $a1, $v1, 1
/* 16824C 802479EC 808305E3 */ lb $v1, 0x5E3($a0)
D_802479F0:
/* 168250 802479F0 2402FFFF */ addiu $v0, $zero, -0x1
.L802479F4:
/* 168254 802479F4 1062000B */ beq $v1, $v0, .L80247A24
/* 168258 802479F8 248605EE */ addiu $a2, $a0, 0x5EE
D_802479FC:
/* 16825C 802479FC 00031140 */ sll $v0, $v1, 5
D_80247A00:
/* 168260 80247A00 00441021 */ addu $v0, $v0, $a0
/* 168264 80247A04 94420012 */ lhu $v0, 0x12($v0)
/* 168268 80247A08 00021400 */ sll $v0, $v0, 16
/* 16826C 80247A0C 00021C03 */ sra $v1, $v0, 16
D_80247A10:
/* 168270 80247A10 000217C2 */ srl $v0, $v0, 31
/* 168274 80247A14 00621821 */ addu $v1, $v1, $v0
D_80247A18:
/* 168278 80247A18 00031843 */ sra $v1, $v1, 1
/* 16827C 80247A1C 08091E8B */ j .L80247A2C
D_80247A20:
/* 168280 80247A20 00651023 */ subu $v0, $v1, $a1
.L80247A24:
/* 168284 80247A24 24020078 */ addiu $v0, $zero, 0x78
jtbl_80247A28:
/* 168288 80247A28 00451023 */ subu $v0, $v0, $a1
.L80247A2C:
/* 16828C 80247A2C A4C20000 */ sh $v0, 0x0($a2)
D_80247A30:
/* 168290 80247A30 2404002F */ addiu $a0, $zero, 0x2F
/* 168294 80247A34 08091EEC */ j D_80247BB0_EE6570
D_80247A38:
/* 168298 80247A38 24050001 */ addiu $a1, $zero, 0x1
glabel .L80247A3C
/* 16829C 80247A3C 3C05800E */ lui $a1, %hi(D_800D95E8)
D_80247A40:
/* 1682A0 80247A40 24A595E8 */ addiu $a1, $a1, %lo(D_800D95E8)
/* 1682A4 80247A44 24060001 */ addiu $a2, $zero, 0x1
jtbl_80247A48:
/* 1682A8 80247A48 8CA20038 */ lw $v0, 0x38($a1)
/* 1682AC 80247A4C 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* 1682B0 80247A50 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* 1682B4 80247A54 3C048025 */ lui $a0, %hi(D_80249B84)
/* 1682B8 80247A58 8C849B84 */ lw $a0, %lo(D_80249B84)($a0)
/* 1682BC 80247A5C 00C21023 */ subu $v0, $a2, $v0
.L80247A60:
/* 1682C0 80247A60 906300AB */ lbu $v1, 0xAB($v1)
/* 1682C4 80247A64 90900003 */ lbu $s0, 0x3($a0)
/* 1682C8 80247A68 14620004 */ bne $v1, $v0, .L80247A7C
/* 1682CC 80247A6C 00C31023 */ subu $v0, $a2, $v1
D_80247A70:
/* 1682D0 80247A70 90A2003F */ lbu $v0, 0x3F($a1)
/* 1682D4 80247A74 12020004 */ beq $s0, $v0, .L80247A88
jtbl_80247A78:
/* 1682D8 80247A78 00C31023 */ subu $v0, $a2, $v1
.L80247A7C:
/* 1682DC 80247A7C ACA20038 */ sw $v0, 0x38($a1)
D_80247A80:
/* 1682E0 80247A80 0C00AC13 */ jal fio_flush_backups
/* 1682E4 80247A84 ACB0003C */ sw $s0, 0x3C($a1)
.L80247A88:
/* 1682E8 80247A88 0C00ACB4 */ jal fio_load_game
/* 1682EC 80247A8C 0200202D */ daddu $a0, $s0, $zero
D_80247A90:
/* 1682F0 80247A90 0C00CD3C */ jal set_game_mode
.L80247A94:
/* 1682F4 80247A94 2404000F */ addiu $a0, $zero, 0xF
jtbl_80247A98:
/* 1682F8 80247A98 08091EEE */ j D_80247BB8
/* 1682FC 80247A9C 00000000 */ nop
D_80247AA0:
/* 168300 80247AA0 82430004 */ lb $v1, 0x4($s2)
.L80247AA4:
/* 168304 80247AA4 2C620005 */ sltiu $v0, $v1, 0x5
/* 168308 80247AA8 10400043 */ beqz $v0, D_80247BB8
/* 16830C 80247AAC 00031080 */ sll $v0, $v1, 2
.L80247AB0:
/* 168310 80247AB0 3C018025 */ lui $at, %hi(D_8024C030_C098B0)
.L80247AB4:
/* 168314 80247AB4 00220821 */ addu $at, $at, $v0
jtbl_80247AB8:
/* 168318 80247AB8 8C22C030 */ lw $v0, %lo(D_8024C030_C098B0)($at)
/* 16831C 80247ABC 00400008 */ jr $v0
D_80247AC0:
/* 168320 80247AC0 00000000 */ nop
/* 168324 80247AC4 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 168328 80247AC8 A020C098 */ sb $zero, %lo(D_8024C098_C09918)($at)
/* 16832C 80247ACC 3C058024 */ lui $a1, %hi(func_80243EEC)
/* 168330 80247AD0 24A53EEC */ addiu $a1, $a1, %lo(func_80243EEC)
.L80247AD4:
/* 168334 80247AD4 08091EEC */ j D_80247BB0_EE6570
/* 168338 80247AD8 24040032 */ addiu $a0, $zero, 0x32
/* 16833C 80247ADC 24020003 */ addiu $v0, $zero, 0x3
/* 168340 80247AE0 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 168344 80247AE4 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
D_80247AE8:
/* 168348 80247AE8 3C058024 */ lui $a1, %hi(func_80243EEC)
/* 16834C 80247AEC 24A53EEC */ addiu $a1, $a1, %lo(func_80243EEC)
D_80247AF0_EE64B0:
/* 168350 80247AF0 08091EEC */ j D_80247BB0_EE6570
/* 168354 80247AF4 24040032 */ addiu $a0, $zero, 0x32
D_80247AF8_EE64B8:
/* 168358 80247AF8 2404002D */ addiu $a0, $zero, 0x2D
glabel func_80247AFC
/* 16835C 80247AFC 3C108024 */ lui $s0, %hi(func_8024381C)
D_80247B00_EE64C0:
/* 168360 80247B00 2610381C */ addiu $s0, $s0, %lo(func_8024381C)
glabel func_80247B04
/* 168364 80247B04 3C028025 */ lui $v0, %hi(D_80249B84)
jtbl_80247B08:
/* 168368 80247B08 8C429B84 */ lw $v0, %lo(D_80249B84)($v0)
/* 16836C 80247B0C 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 168370 80247B10 A020C098 */ sb $zero, %lo(D_8024C098_C09918)($at)
/* 168374 80247B14 90510003 */ lbu $s1, 0x3($v0)
/* 168378 80247B18 0C051F9F */ jal set_window_update
/* 16837C 80247B1C 0200282D */ daddu $a1, $s0, $zero
/* 168380 80247B20 24040033 */ addiu $a0, $zero, 0x33
/* 168384 80247B24 0C051F9F */ jal set_window_update
/* 168388 80247B28 0200282D */ daddu $a1, $s0, $zero
/* 16838C 80247B2C 24040034 */ addiu $a0, $zero, 0x34
/* 168390 80247B30 0C051F9F */ jal set_window_update
/* 168394 80247B34 0200282D */ daddu $a1, $s0, $zero
.L80247B38:
/* 168398 80247B38 24040035 */ addiu $a0, $zero, 0x35
/* 16839C 80247B3C 0C051F9F */ jal set_window_update
/* 1683A0 80247B40 0200282D */ daddu $a1, $s0, $zero
D_80247B44:
/* 1683A4 80247B44 24040036 */ addiu $a0, $zero, 0x36
/* 1683A8 80247B48 0C051F9F */ jal set_window_update
/* 1683AC 80247B4C 0200282D */ daddu $a1, $s0, $zero
D_80247B50_EE6510:
/* 1683B0 80247B50 24040037 */ addiu $a0, $zero, 0x37
/* 1683B4 80247B54 0C051F9F */ jal set_window_update
jtbl_80247B58:
/* 1683B8 80247B58 0200282D */ daddu $a1, $s0, $zero
/* 1683BC 80247B5C 24040035 */ addiu $a0, $zero, 0x35
D_80247B60:
/* 1683C0 80247B60 0C051F9F */ jal set_window_update
/* 1683C4 80247B64 0200282D */ daddu $a1, $s0, $zero
/* 1683C8 80247B68 24040038 */ addiu $a0, $zero, 0x38
/* 1683CC 80247B6C 0C051F9F */ jal set_window_update
/* 1683D0 80247B70 0200282D */ daddu $a1, $s0, $zero
/* 1683D4 80247B74 24040039 */ addiu $a0, $zero, 0x39
.L80247B78:
/* 1683D8 80247B78 0C051F9F */ jal set_window_update
/* 1683DC 80247B7C 0200282D */ daddu $a1, $s0, $zero
D_80247B80:
/* 1683E0 80247B80 2404003A */ addiu $a0, $zero, 0x3A
/* 1683E4 80247B84 0C051F9F */ jal set_window_update
/* 1683E8 80247B88 0200282D */ daddu $a1, $s0, $zero
/* 1683EC 80247B8C 2404003B */ addiu $a0, $zero, 0x3B
.L80247B90:
/* 1683F0 80247B90 0C051F9F */ jal set_window_update
/* 1683F4 80247B94 0200282D */ daddu $a1, $s0, $zero
/* 1683F8 80247B98 3C058024 */ lui $a1, %hi(func_80243B10)
/* 1683FC 80247B9C 24A53B10 */ addiu $a1, $a1, %lo(func_80243B10)
D_80247BA0:
/* 168400 80247BA0 0C051F9F */ jal set_window_update
.L80247BA4:
/* 168404 80247BA4 26240038 */ addiu $a0, $s1, 0x38
/* 168408 80247BA8 24040032 */ addiu $a0, $zero, 0x32
/* 16840C 80247BAC 24050002 */ addiu $a1, $zero, 0x2
D_80247BB0_EE6570:
/* 168410 80247BB0 0C051F9F */ jal set_window_update
.L80247BB4:
/* 168414 80247BB4 00000000 */ nop
D_80247BB8:
/* 168418 80247BB8 3C028025 */ lui $v0, %hi(D_8024C084)
/* 16841C 80247BBC 8C42C084 */ lw $v0, %lo(D_8024C084)($v0)
D_80247BC0:
/* 168420 80247BC0 30424000 */ andi $v0, $v0, 0x4000
/* 168424 80247BC4 1040004D */ beqz $v0, .L80247CFC
D_80247BC8:
/* 168428 80247BC8 00000000 */ nop
D_80247BCC:
/* 16842C 80247BCC 0C05272D */ jal sfx_play_sound
D_80247BD0:
/* 168430 80247BD0 240400CA */ addiu $a0, $zero, 0xCA
/* 168434 80247BD4 0240202D */ daddu $a0, $s2, $zero
D_80247BD8:
/* 168438 80247BD8 0000282D */ daddu $a1, $zero, $zero
/* 16843C 80247BDC 0C090B65 */ jal func_80242D94
D_80247BE0_EE65A0:
/* 168440 80247BE0 24060001 */ addiu $a2, $zero, 0x1
/* 168444 80247BE4 82440004 */ lb $a0, 0x4($s2)
/* 168448 80247BE8 2C820005 */ sltiu $v0, $a0, 0x5
/* 16844C 80247BEC 10400043 */ beqz $v0, .L80247CFC
D_80247BF0:
/* 168450 80247BF0 00041080 */ sll $v0, $a0, 2
/* 168454 80247BF4 3C018025 */ lui $at, %hi(func_8024C048)
D_80247BF8:
/* 168458 80247BF8 00220821 */ addu $at, $at, $v0
/* 16845C 80247BFC 8C22C048 */ lw $v0, %lo(func_8024C048)($at)
/* 168460 80247C00 00400008 */ jr $v0
/* 168464 80247C04 00000000 */ nop
/* 168468 80247C08 3C018025 */ lui $at, %hi(D_8024C098_C09918)
.L80247C0C:
/* 16846C 80247C0C A020C098 */ sb $zero, %lo(D_8024C098_C09918)($at)
/* 168470 80247C10 3C058024 */ lui $a1, %hi(func_80243EEC)
/* 168474 80247C14 24A53EEC */ addiu $a1, $a1, %lo(func_80243EEC)
/* 168478 80247C18 08091F3D */ j .L80247CF4
D_80247C1C:
/* 16847C 80247C1C 24040032 */ addiu $a0, $zero, 0x32
D_80247C20:
/* 168480 80247C20 24020003 */ addiu $v0, $zero, 0x3
.L80247C24:
/* 168484 80247C24 3C018025 */ lui $at, %hi(D_8024C098_C09918)
jtbl_80247C28:
/* 168488 80247C28 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
.L80247C2C:
/* 16848C 80247C2C 3C058024 */ lui $a1, %hi(func_80243EEC)
/* 168490 80247C30 24A53EEC */ addiu $a1, $a1, %lo(func_80243EEC)
/* 168494 80247C34 08091F3D */ j .L80247CF4
/* 168498 80247C38 24040032 */ addiu $a0, $zero, 0x32
D_80247C3C:
/* 16849C 80247C3C 2404002D */ addiu $a0, $zero, 0x2D
D_80247C40:
/* 1684A0 80247C40 3C108024 */ lui $s0, %hi(func_8024381C)
/* 1684A4 80247C44 2610381C */ addiu $s0, $s0, %lo(func_8024381C)
/* 1684A8 80247C48 3C028025 */ lui $v0, %hi(D_80249B84)
/* 1684AC 80247C4C 8C429B84 */ lw $v0, %lo(D_80249B84)($v0)
/* 1684B0 80247C50 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 1684B4 80247C54 A020C098 */ sb $zero, %lo(D_8024C098_C09918)($at)
/* 1684B8 80247C58 90510003 */ lbu $s1, 0x3($v0)
.L80247C5C:
/* 1684BC 80247C5C 0C051F9F */ jal set_window_update
/* 1684C0 80247C60 0200282D */ daddu $a1, $s0, $zero
/* 1684C4 80247C64 24040033 */ addiu $a0, $zero, 0x33
/* 1684C8 80247C68 0C051F9F */ jal set_window_update
/* 1684CC 80247C6C 0200282D */ daddu $a1, $s0, $zero
/* 1684D0 80247C70 24040034 */ addiu $a0, $zero, 0x34
/* 1684D4 80247C74 0C051F9F */ jal set_window_update
/* 1684D8 80247C78 0200282D */ daddu $a1, $s0, $zero
.L80247C7C:
/* 1684DC 80247C7C 24040035 */ addiu $a0, $zero, 0x35
D_80247C80:
/* 1684E0 80247C80 0C051F9F */ jal set_window_update
.L80247C84:
/* 1684E4 80247C84 0200282D */ daddu $a1, $s0, $zero
D_80247C88:
/* 1684E8 80247C88 24040036 */ addiu $a0, $zero, 0x36
/* 1684EC 80247C8C 0C051F9F */ jal set_window_update
D_80247C90:
/* 1684F0 80247C90 0200282D */ daddu $a1, $s0, $zero
D_80247C94:
/* 1684F4 80247C94 24040037 */ addiu $a0, $zero, 0x37
.L80247C98:
/* 1684F8 80247C98 0C051F9F */ jal set_window_update
/* 1684FC 80247C9C 0200282D */ daddu $a1, $s0, $zero
D_80247CA0:
/* 168500 80247CA0 24040035 */ addiu $a0, $zero, 0x35
/* 168504 80247CA4 0C051F9F */ jal set_window_update
/* 168508 80247CA8 0200282D */ daddu $a1, $s0, $zero
/* 16850C 80247CAC 24040038 */ addiu $a0, $zero, 0x38
/* 168510 80247CB0 0C051F9F */ jal set_window_update
D_80247CB4:
/* 168514 80247CB4 0200282D */ daddu $a1, $s0, $zero
/* 168518 80247CB8 24040039 */ addiu $a0, $zero, 0x39
/* 16851C 80247CBC 0C051F9F */ jal set_window_update
.L80247CC0:
/* 168520 80247CC0 0200282D */ daddu $a1, $s0, $zero
D_80247CC4:
/* 168524 80247CC4 2404003A */ addiu $a0, $zero, 0x3A
/* 168528 80247CC8 0C051F9F */ jal set_window_update
/* 16852C 80247CCC 0200282D */ daddu $a1, $s0, $zero
/* 168530 80247CD0 2404003B */ addiu $a0, $zero, 0x3B
.L80247CD4:
/* 168534 80247CD4 0C051F9F */ jal set_window_update
/* 168538 80247CD8 0200282D */ daddu $a1, $s0, $zero
/* 16853C 80247CDC 3C058024 */ lui $a1, %hi(func_80243B10)
.L80247CE0:
/* 168540 80247CE0 24A53B10 */ addiu $a1, $a1, %lo(func_80243B10)
D_80247CE4:
/* 168544 80247CE4 0C051F9F */ jal set_window_update
/* 168548 80247CE8 26240038 */ addiu $a0, $s1, 0x38
/* 16854C 80247CEC 24040032 */ addiu $a0, $zero, 0x32
D_80247CF0:
/* 168550 80247CF0 24050002 */ addiu $a1, $zero, 0x2
.L80247CF4:
/* 168554 80247CF4 0C051F9F */ jal set_window_update
/* 168558 80247CF8 00000000 */ nop
.L80247CFC:
/* 16855C 80247CFC 8FBF001C */ lw $ra, 0x1C($sp)
D_80247D00:
/* 168560 80247D00 8FB20018 */ lw $s2, 0x18($sp)
.L80247D04:
/* 168564 80247D04 8FB10014 */ lw $s1, 0x14($sp)
/* 168568 80247D08 8FB00010 */ lw $s0, 0x10($sp)
D_80247D0C:
/* 16856C 80247D0C 03E00008 */ jr $ra
D_80247D10:
/* 168570 80247D10 27BD0020 */ addiu $sp, $sp, 0x20
### DECOMPILED C INSTRUCTIONS:
void filemenu_yesno_handle_input(MenuPanel* menu) {
s32 oldSelected = menu->selected;
if (filemenu_heldButtons & BUTTON_STICK_UP) {
menu->row--;
if (menu->row < 0) {
menu->row = 0;
}
}
if (filemenu_heldButtons & BUTTON_STICK_DOWN) {
menu->row++;
if (menu->row >= menu->numRows) {
menu->row = menu->numRows - 1;
}
}
menu->selected = MENU_PANEL_SELECTED_GRID_DATA(menu);
if (oldSelected != menu->selected) {
sfx_play_sound(SOUND_MENU_CHANGE_SELECTION);
}
if ((filemenu_pressedButtons & BUTTON_START) && menu->page == 4) {
filemenu_set_selected(menu, 0, 0);
filemenu_pressedButtons = BUTTON_A;
}
if (filemenu_pressedButtons & BUTTON_A) {
u32 slot;
u32 slot2;
u32 slot3;
u32 slot4;
s32 i;
sfx_play_sound(SOUND_MENU_NEXT);
switch (menu->selected) {
case 0:
switch (menu->page) {
case 0:
filemenu_currentMenu = 2;
filemenu_menus[filemenu_currentMenu]->page = 0;
gWindows[WINDOW_ID_FILEMENU_INFO].width = 182;
gWindows[WINDOW_ID_FILEMENU_INFO].height = 25;
gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2;
gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2)
: SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2;
set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
slot = filemenu_menus[0]->selected;
for (i = 0; i < ARRAY_COUNT(gSaveSlotMetadata->filename); i++) {
gSaveSlotMetadata[slot].filename[i] = 0xF7;
}
gSaveSlotMetadata[slot].level = 0;
gSaveSlotMetadata[slot].timePlayed = 0;
gSaveSlotMetadata[slot].spiritsRescued = 0;
fio_erase_game(slot);
gSaveSlotHasData[slot] = FALSE;
break;
case 3:
filemenu_currentMenu = 2;
filemenu_menus[filemenu_currentMenu]->page = 2;
gWindows[WINDOW_ID_FILEMENU_INFO].width = 154;
gWindows[WINDOW_ID_FILEMENU_INFO].height = 39;
gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2;
gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2)
: SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2;
set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
fio_load_game(filemenu_loadedFileIdx);
gSaveSlotMetadata[filemenu_iterFileIdx] = gSaveSlotMetadata[filemenu_loadedFileIdx];
fio_save_game(filemenu_iterFileIdx);
gSaveSlotHasData[filemenu_iterFileIdx] = TRUE;
break;
case 1:
filemenu_currentMenu = 2;
filemenu_menus[filemenu_currentMenu]->page = 1;
gWindows[WINDOW_ID_FILEMENU_INFO].width = 153;
gWindows[WINDOW_ID_FILEMENU_INFO].height = 25;
gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2;
gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2)
: SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2;
set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
gSaveSlotMetadata[filemenu_menus[0]->selected] = gSaveSlotMetadata[gGameStatusPtr->saveSlot];
fio_save_game(filemenu_menus[0]->selected);
gSaveSlotHasData[filemenu_menus[0]->selected] = TRUE;
break;
case 2:
clear_player_data();
clear_saved_variables();
//TODO hardcoded area/map IDs
gGameStatusPtr->areaID = 0;
gGameStatusPtr->mapID = 11;
gGameStatusPtr->entryID = 0;
evt_set_variable(NULL, GB_StoryProgress, STORY_INTRO);
slot2 = filemenu_menus[0]->selected;
for (i = 0; i < ARRAY_COUNT(gSaveSlotMetadata->filename); i++) {
gSaveSlotMetadata[slot2].filename[i] = filemenu_filename[i];
}
fio_save_game(slot2);
gSaveSlotHasData[slot2] = TRUE;
set_window_update(WINDOW_ID_FILEMENU_CREATEFILE_HEADER, (s32)filemenu_update_hidden_name_input);
set_window_update(WINDOW_ID_FILEMENU_KEYBOARD, (s32)filemenu_update_hidden_name_input);
set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
filemenu_currentMenu = 2;
filemenu_menus[2]->page = 3;
gWindows[WINDOW_ID_FILEMENU_INFO].width = 184;
gWindows[WINDOW_ID_FILEMENU_INFO].height = 25;
gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2;
gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2)
: SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2;
set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW);
break;
case 4:
slot3 = filemenu_menus[0]->selected;
if (gGameStatusPtr->soundOutputMode != 1 - D_800D95E8.saveSlot ||
slot3 != (u8)D_800D95E8.saveCount)
{
D_800D95E8.saveSlot = 1 - gGameStatusPtr->soundOutputMode;
D_800D95E8.saveCount = slot3;
fio_flush_backups();
}
fio_load_game(slot3);
set_game_mode(GAME_MODE_END_FILE_SELECT);
break;
}
break;
case 1:
switch (menu->page) {
case 0:
case 1:
case 3:
filemenu_currentMenu = 0;
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
break;
case 2:
filemenu_currentMenu = 3;
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
break;
case 4:
filemenu_currentMenu = 0;
slot4 = filemenu_menus[0]->selected;
set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_show_with_rotation);
set_window_update(slot4 + WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_deselect_file);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, WINDOW_UPDATE_HIDE);
break;
}
break;
}
}
if (filemenu_pressedButtons & BUTTON_B) {
u32 slot;
sfx_play_sound(SOUND_MENU_BACK);
filemenu_set_selected(menu, 0, 1);
switch (menu->page) {
case 0:
case 1:
case 3:
filemenu_currentMenu = 0;
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
break;
case 2:
filemenu_currentMenu = 3;
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
break;
case 4:
filemenu_currentMenu = 0;
slot = filemenu_menus[0]->selected;
set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_show_with_rotation);
set_window_update(slot + WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_deselect_file);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, WINDOW_UPDATE_HIDE);
break;
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_802A11B0_7A8B50
/* 415F40 802A11B0 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 415F44 802A11B4 3C06800E */ lui $a2, %hi(gBattleStatus)
/* 415F48 802A11B8 24C6C070 */ addiu $a2, $a2, %lo(gBattleStatus)
/* 415F4C 802A11BC AFB00018 */ sw $s0, 0x18($sp)
glabel func_802A11C0_7A8B60
/* 415F50 802A11C0 3C10802B */ lui $s0, %hi(BattleMenuState)
/* 415F54 802A11C4 2610D000 */ addiu $s0, $s0, %lo(BattleMenuState)
/* 415F58 802A11C8 AFBF0030 */ sw $ra, 0x30($sp)
glabel func_802A11CC_7A8B6C
/* 415F5C 802A11CC AFB5002C */ sw $s5, 0x2C($sp)
.L802A11D0_7A8B70:
/* 415F60 802A11D0 AFB40028 */ sw $s4, 0x28($sp)
glabel func_802A11D4_7A8B74
/* 415F64 802A11D4 AFB30024 */ sw $s3, 0x24($sp)
/* 415F68 802A11D8 AFB20020 */ sw $s2, 0x20($sp)
/* 415F6C 802A11DC AFB1001C */ sw $s1, 0x1C($sp)
/* 415F70 802A11E0 F7B60040 */ sdc1 $f22, 0x40($sp)
/* 415F74 802A11E4 F7B40038 */ sdc1 $f20, 0x38($sp)
glabel func_802A11E8_7A8B88
/* 415F78 802A11E8 82030000 */ lb $v1, 0x0($s0)
.L802A11EC_7A8B8C:
/* 415F7C 802A11EC 2402000A */ addiu $v0, $zero, 0xA
.L802A11F0_7A8B90:
/* 415F80 802A11F0 10620257 */ beq $v1, $v0, D_802A1B50_7A94F0
/* 415F84 802A11F4 00000000 */ nop
/* 415F88 802A11F8 2862000B */ slti $v0, $v1, 0xB
D_802A11FC_7A8B9C:
/* 415F8C 802A11FC 50400010 */ beql $v0, $zero, D_802A1240_7A8BE0
/* 415F90 802A1200 2402001E */ addiu $v0, $zero, 0x1E
D_802A1204_7A8BA4:
/* 415F94 802A1204 10600021 */ beqz $v1, .L802A128C_7A8C2C
/* 415F98 802A1208 24020036 */ addiu $v0, $zero, 0x36
glabel func_802A120C_7A8BAC
/* 415F9C 802A120C 1C600006 */ bgtz $v1, func_802A1228_7A8BC8
/* 415FA0 802A1210 24050001 */ addiu $a1, $zero, 0x1
/* 415FA4 802A1214 2402FFFF */ addiu $v0, $zero, -0x1
glabel func_802A1218_7A8BB8
/* 415FA8 802A1218 10620245 */ beq $v1, $v0, .L802A1B30_7A94D0
/* 415FAC 802A121C 24030064 */ addiu $v1, $zero, 0x64
/* 415FB0 802A1220 080A870A */ j .L802A1C28_7A95C8
/* 415FB4 802A1224 0000102D */ daddu $v0, $zero, $zero
glabel func_802A1228_7A8BC8
/* 415FB8 802A1228 10650159 */ beq $v1, $a1, D_802A1790_7A9130
/* 415FBC 802A122C 24020002 */ addiu $v0, $zero, 0x2
/* 415FC0 802A1230 106201EC */ beq $v1, $v0, D_802A19E4_7A9384
/* 415FC4 802A1234 0000102D */ daddu $v0, $zero, $zero
/* 415FC8 802A1238 080A870A */ j .L802A1C28_7A95C8
glabel func_802A123C_7A8BDC
/* 415FCC 802A123C 00000000 */ nop
D_802A1240_7A8BE0:
/* 415FD0 802A1240 10620262 */ beq $v1, $v0, .L802A1BCC_7A956C
/* 415FD4 802A1244 24020003 */ addiu $v0, $zero, 0x3
/* 415FD8 802A1248 2862001F */ slti $v0, $v1, 0x1F
/* 415FDC 802A124C 10400008 */ beqz $v0, func_802A1270_7A8C10
/* 415FE0 802A1250 2402000B */ addiu $v0, $zero, 0xB
/* 415FE4 802A1254 10620248 */ beq $v1, $v0, .L802A1B78_7A9518
/* 415FE8 802A1258 00000000 */ nop
/* 415FEC 802A125C 24020014 */ addiu $v0, $zero, 0x14
/* 415FF0 802A1260 1062024C */ beq $v1, $v0, .L802A1B94_7A9534
/* 415FF4 802A1264 24020003 */ addiu $v0, $zero, 0x3
/* 415FF8 802A1268 080A870A */ j .L802A1C28_7A95C8
.L802A126C_7A8C0C:
/* 415FFC 802A126C 0000102D */ daddu $v0, $zero, $zero
glabel func_802A1270_7A8C10
/* 416000 802A1270 24020064 */ addiu $v0, $zero, 0x64
/* 416004 802A1274 1062025C */ beq $v1, $v0, .L802A1BE8_7A9588
/* 416008 802A1278 24020065 */ addiu $v0, $zero, 0x65
glabel func_802A127C_7A8C1C
/* 41600C 802A127C 10620260 */ beq $v1, $v0, D_802A1C00_7A95A0
glabel func_802A1280_7A8C20
/* 416010 802A1280 0000102D */ daddu $v0, $zero, $zero
.L802A1284_7A8C24:
/* 416014 802A1284 080A870A */ j .L802A1C28_7A95C8
.L802A1288_7A8C28:
/* 416018 802A1288 00000000 */ nop
.L802A128C_7A8C2C:
/* 41601C 802A128C 3C01802B */ lui $at, %hi(BattleMenu_BasePosX)
/* 416020 802A1290 AC22D060 */ sw $v0, %lo(BattleMenu_BasePosX)($at)
.L802A1294_7A8C34:
/* 416024 802A1294 240200AD */ addiu $v0, $zero, 0xAD
.L802A1298_7A8C38:
/* 416028 802A1298 3C013E99 */ lui $at, (0x3E99999A >> 16)
D_802A129C_7A8C3C:
/* 41602C 802A129C 3421999A */ ori $at, $at, (0x3E99999A & 0xFFFF)
D_802A12A0_7A8C40:
/* 416030 802A12A0 44810000 */ mtc1 $at, $f0
/* 416034 802A12A4 3C04802B */ lui $a0, %hi(D_802AD0B3)
/* 416038 802A12A8 9084D0B3 */ lbu $a0, %lo(D_802AD0B3)($a0)
/* 41603C 802A12AC 3C05802B */ lui $a1, %hi(BattleMenu_NumOptions)
.L802A12B0_7A8C50:
/* 416040 802A12B0 24A5D0AC */ addiu $a1, $a1, %lo(BattleMenu_NumOptions)
/* 416044 802A12B4 3C01802B */ lui $at, %hi(BattleMenu_BasePosY)
.L802A12B8_7A8C58:
/* 416048 802A12B8 AC22D064 */ sw $v0, %lo(BattleMenu_BasePosY)($at)
.L802A12BC_7A8C5C:
/* 41604C 802A12BC 3C01802B */ lui $at, %hi(D_802AD004)
.L802A12C0_7A8C60:
/* 416050 802A12C0 A020D004 */ sb $zero, %lo(D_802AD004)($at)
glabel func_802A12C4_7A8C64
/* 416054 802A12C4 3C01802B */ lui $at, %hi(D_802AD070)
.L802A12C8_7A8C68:
/* 416058 802A12C8 E420D070 */ swc1 $f0, %lo(D_802AD070)($at)
.L802A12CC_7A8C6C:
/* 41605C 802A12CC 3C01802B */ lui $at, %hi(BattleMenu_HomePos)
/* 416060 802A12D0 A024D06B */ sb $a0, %lo(BattleMenu_HomePos)($at)
glabel func_802A12D4_7A8C74
/* 416064 802A12D4 90A20003 */ lbu $v0, 0x3($a1)
glabel func_802A12D8_7A8C78
/* 416068 802A12D8 00041823 */ negu $v1, $a0
/* 41606C 802A12DC 3C01802B */ lui $at, %hi(BattleMenu_MinIdx)
glabel func_802A12E0_7A8C80
/* 416070 802A12E0 A023D069 */ sb $v1, %lo(BattleMenu_MinIdx)($at)
glabel func_802A12E4_7A8C84
/* 416074 802A12E4 8CA30000 */ lw $v1, 0x0($a1)
/* 416078 802A12E8 2442FFFF */ addiu $v0, $v0, -0x1
glabel func_802A12EC_7A8C8C
/* 41607C 802A12EC 00441023 */ subu $v0, $v0, $a0
.L802A12F0_7A8C90:
/* 416080 802A12F0 3C01802B */ lui $at, %hi(BattleMenu_MaxIdx)
/* 416084 802A12F4 A022D06A */ sb $v0, %lo(BattleMenu_MaxIdx)($at)
/* 416088 802A12F8 18600036 */ blez $v1, .L802A13D4_7A8D74
glabel func_802A12FC_7A8C9C
/* 41608C 802A12FC 0000982D */ daddu $s3, $zero, $zero
/* 416090 802A1300 3C14802B */ lui $s4, %hi(D_802AD028)
/* 416094 802A1304 2694D028 */ addiu $s4, $s4, %lo(D_802AD028)
/* 416098 802A1308 3C12802B */ lui $s2, %hi(D_802AD010)
.L802A130C_7A8CAC:
/* 41609C 802A130C 2652D010 */ addiu $s2, $s2, %lo(D_802AD010)
D_802A1310_7A8CB0:
/* 4160A0 802A1310 3C10802B */ lui $s0, %hi(BattleMenu_HudScripts)
D_802A1314_7A8CB4:
/* 4160A4 802A1314 2610D078 */ addiu $s0, $s0, %lo(BattleMenu_HudScripts)
glabel func_802A1318_7A8CB8
/* 4160A8 802A1318 8E040000 */ lw $a0, 0x0($s0)
/* 4160AC 802A131C 26100004 */ addiu $s0, $s0, 0x4
D_802A1320_7A8CC0:
/* 4160B0 802A1320 0C050529 */ jal hud_element_create
.L802A1324_7A8CC4:
/* 4160B4 802A1324 26730001 */ addiu $s3, $s3, 0x1
.L802A1328_7A8CC8:
/* 4160B8 802A1328 0040882D */ daddu $s1, $v0, $zero
.L802A132C_7A8CCC:
/* 4160BC 802A132C 0220202D */ daddu $a0, $s1, $zero
/* 4160C0 802A1330 24050005 */ addiu $a1, $zero, 0x5
.L802A1334_7A8CD4:
/* 4160C4 802A1334 0C051277 */ jal hud_element_set_render_depth
/* 4160C8 802A1338 AE510000 */ sw $s1, 0x0($s2)
glabel func_802A133C_7A8CDC
/* 4160CC 802A133C 0220202D */ daddu $a0, $s1, $zero
D_802A1340_7A8CE0:
/* 4160D0 802A1340 0C051280 */ jal hud_element_set_flags
.L802A1344_7A8CE4:
/* 4160D4 802A1344 34058000 */ ori $a1, $zero, 0x8000
/* 4160D8 802A1348 0220202D */ daddu $a0, $s1, $zero
/* 4160DC 802A134C 0C051280 */ jal hud_element_set_flags
.L802A1350_7A8CF0:
/* 4160E0 802A1350 24050080 */ addiu $a1, $zero, 0x80
glabel func_802A1354_7A8CF4
/* 4160E4 802A1354 0220202D */ daddu $a0, $s1, $zero
/* 4160E8 802A1358 0C051280 */ jal hud_element_set_flags
/* 4160EC 802A135C 24050002 */ addiu $a1, $zero, 0x2
D_802A1360_7A8D00:
/* 4160F0 802A1360 0220202D */ daddu $a0, $s1, $zero
.L802A1364_7A8D04:
/* 4160F4 802A1364 3C053F40 */ lui $a1, (0x3F400000 >> 16)
.L802A1368_7A8D08:
/* 4160F8 802A1368 0C051308 */ jal hud_element_set_scale
/* 4160FC 802A136C 26520004 */ addiu $s2, $s2, 0x4
D_802A1370_7A8D10:
/* 416100 802A1370 3C048029 */ lui $a0, %hi(HES_ProjectorSpot)
/* 416104 802A1374 24842C00 */ addiu $a0, $a0, %lo(HES_ProjectorSpot)
glabel func_802A1378_7A8D18
/* 416108 802A1378 0C050529 */ jal hud_element_create
glabel func_802A137C_7A8D1C
/* 41610C 802A137C 00000000 */ nop
/* 416110 802A1380 0040882D */ daddu $s1, $v0, $zero
/* 416114 802A1384 0220202D */ daddu $a0, $s1, $zero
D_802A1388_7A8D28:
/* 416118 802A1388 0C0513F6 */ jal hud_element_create_transform_B
.L802A138C_7A8D2C:
/* 41611C 802A138C AE910000 */ sw $s1, 0x0($s4)
/* 416120 802A1390 0220202D */ daddu $a0, $s1, $zero
.L802A1394_7A8D34:
/* 416124 802A1394 0C051277 */ jal hud_element_set_render_depth
D_802A1398_7A8D38:
/* 416128 802A1398 2405000A */ addiu $a1, $zero, 0xA
.L802A139C_7A8D3C:
/* 41612C 802A139C 0220202D */ daddu $a0, $s1, $zero
D_802A13A0_7A8D40:
/* 416130 802A13A0 0C051280 */ jal hud_element_set_flags
.L802A13A4_7A8D44:
/* 416134 802A13A4 24050080 */ addiu $a1, $zero, 0x80
/* 416138 802A13A8 0220202D */ daddu $a0, $s1, $zero
/* 41613C 802A13AC 0C051280 */ jal hud_element_set_flags
/* 416140 802A13B0 34058000 */ ori $a1, $zero, 0x8000
/* 416144 802A13B4 0220202D */ daddu $a0, $s1, $zero
glabel func_802A13B8_7A8D58
/* 416148 802A13B8 0C051280 */ jal hud_element_set_flags
.L802A13BC_7A8D5C:
/* 41614C 802A13BC 24050002 */ addiu $a1, $zero, 0x2
.L802A13C0_7A8D60:
/* 416150 802A13C0 3C02802B */ lui $v0, %hi(BattleMenu_NumOptions)
.L802A13C4_7A8D64:
/* 416154 802A13C4 8C42D0AC */ lw $v0, %lo(BattleMenu_NumOptions)($v0)
/* 416158 802A13C8 0262102A */ slt $v0, $s3, $v0
/* 41615C 802A13CC 1440FFD2 */ bnez $v0, func_802A1318_7A8CB8
D_802A13D0_7A8D70:
/* 416160 802A13D0 26940004 */ addiu $s4, $s4, 0x4
.L802A13D4_7A8D74:
/* 416164 802A13D4 3C048029 */ lui $a0, %hi(HES_ProjectorSpot)
/* 416168 802A13D8 24842C00 */ addiu $a0, $a0, %lo(HES_ProjectorSpot)
/* 41616C 802A13DC 0C050529 */ jal hud_element_create
/* 416170 802A13E0 00000000 */ nop
glabel func_802A13E4_7A8D84
/* 416174 802A13E4 0040882D */ daddu $s1, $v0, $zero
.L802A13E8_7A8D88:
/* 416178 802A13E8 3C01802B */ lui $at, %hi(D_802AD040)
.L802A13EC_7A8D8C:
/* 41617C 802A13EC AC31D040 */ sw $s1, %lo(D_802AD040)($at)
/* 416180 802A13F0 0C0513F6 */ jal hud_element_create_transform_B
/* 416184 802A13F4 0220202D */ daddu $a0, $s1, $zero
.L802A13F8_7A8D98:
/* 416188 802A13F8 0220202D */ daddu $a0, $s1, $zero
glabel func_802A13FC_7A8D9C
/* 41618C 802A13FC 0C051277 */ jal hud_element_set_render_depth
D_802A1400_7A8DA0:
/* 416190 802A1400 24050007 */ addiu $a1, $zero, 0x7
.L802A1404_7A8DA4:
/* 416194 802A1404 0220202D */ daddu $a0, $s1, $zero
D_802A1408_7A8DA8:
/* 416198 802A1408 0C051280 */ jal hud_element_set_flags
.L802A140C_7A8DAC:
/* 41619C 802A140C 24050080 */ addiu $a1, $zero, 0x80
.L802A1410_7A8DB0:
/* 4161A0 802A1410 0220202D */ daddu $a0, $s1, $zero
glabel func_802A1414_7A8DB4
/* 4161A4 802A1414 0C051280 */ jal hud_element_set_flags
glabel func_802A1418_7A8DB8
/* 4161A8 802A1418 34058000 */ ori $a1, $zero, 0x8000
/* 4161AC 802A141C 0220202D */ daddu $a0, $s1, $zero
D_802A1420_7A8DC0:
/* 4161B0 802A1420 0C051280 */ jal hud_element_set_flags
/* 4161B4 802A1424 24050002 */ addiu $a1, $zero, 0x2
.L802A1428_7A8DC8:
/* 4161B8 802A1428 3C108029 */ lui $s0, %hi(HES_ProjectorReel)
/* 4161BC 802A142C 26102BD8 */ addiu $s0, $s0, %lo(HES_ProjectorReel)
.L802A1430_7A8DD0:
/* 4161C0 802A1430 0C050529 */ jal hud_element_create
glabel .L802A1434_7A8DD4
/* 4161C4 802A1434 0200202D */ daddu $a0, $s0, $zero
glabel func_802A1438_7A8DD8
/* 4161C8 802A1438 0040882D */ daddu $s1, $v0, $zero
.L802A143C_7A8DDC:
/* 4161CC 802A143C 3C01802B */ lui $at, %hi(D_802AD044)
D_802A1440_7A8DE0:
/* 4161D0 802A1440 AC31D044 */ sw $s1, %lo(D_802AD044)($at)
glabel func_802A1444_7A8DE4
/* 4161D4 802A1444 0C0513F6 */ jal hud_element_create_transform_B
/* 4161D8 802A1448 0220202D */ daddu $a0, $s1, $zero
/* 4161DC 802A144C 0220202D */ daddu $a0, $s1, $zero
glabel func_802A1450_7A8DF0
/* 4161E0 802A1450 0C051277 */ jal hud_element_set_render_depth
/* 4161E4 802A1454 0000282D */ daddu $a1, $zero, $zero
D_802A1458_7A8DF8:
/* 4161E8 802A1458 0220202D */ daddu $a0, $s1, $zero
/* 4161EC 802A145C 24050028 */ addiu $a1, $zero, 0x28
/* 4161F0 802A1460 0C051261 */ jal hud_element_set_render_pos
/* 4161F4 802A1464 240600D4 */ addiu $a2, $zero, 0xD4
/* 4161F8 802A1468 0220202D */ daddu $a0, $s1, $zero
.L802A146C_7A8E0C:
/* 4161FC 802A146C 0000282D */ daddu $a1, $zero, $zero
.L802A1470_7A8E10:
/* 416200 802A1470 2406005B */ addiu $a2, $zero, 0x5B
/* 416204 802A1474 0C0513BF */ jal hud_element_set_tint
.L802A1478_7A8E18:
/* 416208 802A1478 2407007F */ addiu $a3, $zero, 0x7F
.L802A147C_7A8E1C:
/* 41620C 802A147C 0220202D */ daddu $a0, $s1, $zero
/* 416210 802A1480 24050010 */ addiu $a1, $zero, 0x10
glabel func_802A1484_7A8E24
/* 416214 802A1484 0C05149D */ jal hud_element_set_transform_rotation_pivot
.L802A1488_7A8E28:
/* 416218 802A1488 2406FFF0 */ addiu $a2, $zero, -0x10
.L802A148C_7A8E2C:
/* 41621C 802A148C 0220202D */ daddu $a0, $s1, $zero
.L802A1490_7A8E30:
/* 416220 802A1490 0C051280 */ jal hud_element_set_flags
glabel func_802A1494_7A8E34
/* 416224 802A1494 24050080 */ addiu $a1, $zero, 0x80
D_802A1498_7A8E38:
/* 416228 802A1498 0220202D */ daddu $a0, $s1, $zero
glabel func_802A149C_7A8E3C
/* 41622C 802A149C 0C05128B */ jal hud_element_clear_flags
D_802A14A0_7A8E40:
/* 416230 802A14A0 34058000 */ ori $a1, $zero, 0x8000
/* 416234 802A14A4 0220202D */ daddu $a0, $s1, $zero
/* 416238 802A14A8 0C0513AC */ jal hud_element_set_alpha
/* 41623C 802A14AC 240500F0 */ addiu $a1, $zero, 0xF0
/* 416240 802A14B0 0C050529 */ jal hud_element_create
/* 416244 802A14B4 0200202D */ daddu $a0, $s0, $zero
/* 416248 802A14B8 0040882D */ daddu $s1, $v0, $zero
.L802A14BC_7A8E5C:
/* 41624C 802A14BC 3C01802B */ lui $at, %hi(D_802AD048)
/* 416250 802A14C0 AC31D048 */ sw $s1, %lo(D_802AD048)($at)
/* 416254 802A14C4 0C0513F6 */ jal hud_element_create_transform_B
.L802A14C8_7A8E68:
/* 416258 802A14C8 0220202D */ daddu $a0, $s1, $zero
.L802A14CC_7A8E6C:
/* 41625C 802A14CC 0220202D */ daddu $a0, $s1, $zero
glabel .L802A14D0_7A8E70
/* 416260 802A14D0 0C051277 */ jal hud_element_set_render_depth
glabel func_802A14D4_7A8E74
/* 416264 802A14D4 24050002 */ addiu $a1, $zero, 0x2
glabel func_802A14D8_7A8E78
/* 416268 802A14D8 0220202D */ daddu $a0, $s1, $zero
/* 41626C 802A14DC 24050027 */ addiu $a1, $zero, 0x27
.L802A14E0_7A8E80:
/* 416270 802A14E0 0C051261 */ jal hud_element_set_render_pos
.L802A14E4_7A8E84:
/* 416274 802A14E4 240600D4 */ addiu $a2, $zero, 0xD4
glabel func_802A14E8_7A8E88
/* 416278 802A14E8 0220202D */ daddu $a0, $s1, $zero
/* 41627C 802A14EC 0000282D */ daddu $a1, $zero, $zero
D_802A14F0_7A8E90:
/* 416280 802A14F0 2406005B */ addiu $a2, $zero, 0x5B
/* 416284 802A14F4 0C0513BF */ jal hud_element_set_tint
glabel func_802A14F8_7A8E98
/* 416288 802A14F8 2407007F */ addiu $a3, $zero, 0x7F
/* 41628C 802A14FC 0220202D */ daddu $a0, $s1, $zero
D_802A1500_7A8EA0:
/* 416290 802A1500 24050010 */ addiu $a1, $zero, 0x10
/* 416294 802A1504 0C05149D */ jal hud_element_set_transform_rotation_pivot
/* 416298 802A1508 2406FFF0 */ addiu $a2, $zero, -0x10
D_802A150C_7A8EAC:
/* 41629C 802A150C 0220202D */ daddu $a0, $s1, $zero
/* 4162A0 802A1510 0C051280 */ jal hud_element_set_flags
.L802A1514_7A8EB4:
/* 4162A4 802A1514 24050080 */ addiu $a1, $zero, 0x80
glabel func_802A1518_7A8EB8
/* 4162A8 802A1518 0220202D */ daddu $a0, $s1, $zero
.L802A151C_7A8EBC:
/* 4162AC 802A151C 0C05128B */ jal hud_element_clear_flags
D_802A1520_7A8EC0:
/* 4162B0 802A1520 34058000 */ ori $a1, $zero, 0x8000
.L802A1524_7A8EC4:
/* 4162B4 802A1524 0220202D */ daddu $a0, $s1, $zero
glabel func_802A1528_7A8EC8
/* 4162B8 802A1528 0C0513AC */ jal hud_element_set_alpha
.L802A152C_7A8ECC:
/* 4162BC 802A152C 240500F0 */ addiu $a1, $zero, 0xF0
D_802A1530_7A8ED0:
/* 4162C0 802A1530 3C048029 */ lui $a0, %hi(HES_ProjectorBeam)
.L802A1534_7A8ED4:
/* 4162C4 802A1534 24842C28 */ addiu $a0, $a0, %lo(HES_ProjectorBeam)
/* 4162C8 802A1538 0C050529 */ jal hud_element_create
glabel func_802A153C_7A8EDC
/* 4162CC 802A153C 00000000 */ nop
D_802A1540_7A8EE0:
/* 4162D0 802A1540 0040882D */ daddu $s1, $v0, $zero
D_802A1544_7A8EE4:
/* 4162D4 802A1544 3C01802B */ lui $at, %hi(D_802AD04C)
D_802A1548_7A8EE8:
/* 4162D8 802A1548 AC31D04C */ sw $s1, %lo(D_802AD04C)($at)
glabel func_802A154C_7A8EEC
/* 4162DC 802A154C 0C0513F6 */ jal hud_element_create_transform_B
D_802A1550_7A8EF0:
/* 4162E0 802A1550 0220202D */ daddu $a0, $s1, $zero
.L802A1554_7A8EF4:
/* 4162E4 802A1554 0220202D */ daddu $a0, $s1, $zero
/* 4162E8 802A1558 0C051277 */ jal hud_element_set_render_depth
/* 4162EC 802A155C 24050014 */ addiu $a1, $zero, 0x14
.L802A1560_7A8F00:
/* 4162F0 802A1560 0220202D */ daddu $a0, $s1, $zero
.L802A1564_7A8F04:
/* 4162F4 802A1564 2405004E */ addiu $a1, $zero, 0x4E
.L802A1568_7A8F08:
/* 4162F8 802A1568 0C051261 */ jal hud_element_set_render_pos
glabel func_802A156C_7A8F0C
/* 4162FC 802A156C 240600B2 */ addiu $a2, $zero, 0xB2
/* 416300 802A1570 0220202D */ daddu $a0, $s1, $zero
/* 416304 802A1574 240500FF */ addiu $a1, $zero, 0xFF
.L802A1578_7A8F18:
/* 416308 802A1578 00A0302D */ daddu $a2, $a1, $zero
/* 41630C 802A157C 0C0513BF */ jal hud_element_set_tint
/* 416310 802A1580 00A0382D */ daddu $a3, $a1, $zero
D_802A1584_7A8F24:
/* 416314 802A1584 0220202D */ daddu $a0, $s1, $zero
.L802A1588_7A8F28:
/* 416318 802A1588 0000282D */ daddu $a1, $zero, $zero
.L802A158C_7A8F2C:
/* 41631C 802A158C 0C05149D */ jal hud_element_set_transform_rotation_pivot
.L802A1590_7A8F30:
/* 416320 802A1590 00A0302D */ daddu $a2, $a1, $zero
.L802A1594_7A8F34:
/* 416324 802A1594 44800000 */ mtc1 $zero, $f0
.L802A1598_7A8F38:
/* 416328 802A1598 0220202D */ daddu $a0, $s1, $zero
/* 41632C 802A159C 44050000 */ mfc1 $a1, $f0
glabel func_802A15A0_7A8F40
/* 416330 802A15A0 3C07C234 */ lui $a3, (0xC2340000 >> 16)
D_802A15A4_7A8F44:
/* 416334 802A15A4 0C051489 */ jal hud_element_set_transform_rotation
/* 416338 802A15A8 00A0302D */ daddu $a2, $a1, $zero
glabel func_802A15AC_7A8F4C
/* 41633C 802A15AC 0220202D */ daddu $a0, $s1, $zero
D_802A15B0_7A8F50:
/* 416340 802A15B0 0C0513AC */ jal hud_element_set_alpha
glabel func_802A15B4_7A8F54
/* 416344 802A15B4 240500C8 */ addiu $a1, $zero, 0xC8
.L802A15B8_7A8F58:
/* 416348 802A15B8 0220202D */ daddu $a0, $s1, $zero
/* 41634C 802A15BC 0C051280 */ jal hud_element_set_flags
.L802A15C0_7A8F60:
/* 416350 802A15C0 24050080 */ addiu $a1, $zero, 0x80
/* 416354 802A15C4 0220202D */ daddu $a0, $s1, $zero
/* 416358 802A15C8 0C051280 */ jal hud_element_set_flags
/* 41635C 802A15CC 34058000 */ ori $a1, $zero, 0x8000
.L802A15D0_7A8F70:
/* 416360 802A15D0 0220202D */ daddu $a0, $s1, $zero
/* 416364 802A15D4 0C051280 */ jal hud_element_set_flags
D_802A15D8_7A8F78:
/* 416368 802A15D8 24050002 */ addiu $a1, $zero, 0x2
.L802A15DC_7A8F7C:
/* 41636C 802A15DC 3C048029 */ lui $a0, %hi(HES_SwapBackground)
/* 416370 802A15E0 24842CF4 */ addiu $a0, $a0, %lo(HES_SwapBackground)
D_802A15E4_7A8F84:
/* 416374 802A15E4 0C050529 */ jal hud_element_create
.L802A15E8_7A8F88:
/* 416378 802A15E8 00000000 */ nop
/* 41637C 802A15EC 0040882D */ daddu $s1, $v0, $zero
.L802A15F0_7A8F90:
/* 416380 802A15F0 0220202D */ daddu $a0, $s1, $zero
.L802A15F4_7A8F94:
/* 416384 802A15F4 3C01802B */ lui $at, %hi(D_802AD05C)
/* 416388 802A15F8 AC31D05C */ sw $s1, %lo(D_802AD05C)($at)
/* 41638C 802A15FC 0C051277 */ jal hud_element_set_render_depth
D_802A1600_7A8FA0:
/* 416390 802A1600 0000282D */ daddu $a1, $zero, $zero
.L802A1604_7A8FA4:
/* 416394 802A1604 0220202D */ daddu $a0, $s1, $zero
.L802A1608_7A8FA8:
/* 416398 802A1608 24050061 */ addiu $a1, $zero, 0x61
/* 41639C 802A160C 0C051261 */ jal hud_element_set_render_pos
.L802A1610_7A8FB0:
/* 4163A0 802A1610 240600D0 */ addiu $a2, $zero, 0xD0
D_802A1614_7A8FB4:
/* 4163A4 802A1614 0220202D */ daddu $a0, $s1, $zero
.L802A1618_7A8FB8:
/* 4163A8 802A1618 240500FF */ addiu $a1, $zero, 0xFF
D_802A161C_7A8FBC:
/* 4163AC 802A161C 00A0302D */ daddu $a2, $a1, $zero
D_802A1620_7A8FC0:
/* 4163B0 802A1620 0C0513BF */ jal hud_element_set_tint
/* 4163B4 802A1624 00A0382D */ daddu $a3, $a1, $zero
glabel func_802A1628_7A8FC8
/* 4163B8 802A1628 0220202D */ daddu $a0, $s1, $zero
/* 4163BC 802A162C 0C051280 */ jal hud_element_set_flags
D_802A1630_7A8FD0:
/* 4163C0 802A1630 24050080 */ addiu $a1, $zero, 0x80
.L802A1634_7A8FD4:
/* 4163C4 802A1634 0220202D */ daddu $a0, $s1, $zero
/* 4163C8 802A1638 0C05128B */ jal hud_element_clear_flags
glabel func_802A163C_7A8FDC
/* 4163CC 802A163C 34058000 */ ori $a1, $zero, 0x8000
/* 4163D0 802A1640 0220202D */ daddu $a0, $s1, $zero
D_802A1644_7A8FE4:
/* 4163D4 802A1644 0C0513AC */ jal hud_element_set_alpha
/* 4163D8 802A1648 240500E6 */ addiu $a1, $zero, 0xE6
.L802A164C_7A8FEC:
/* 4163DC 802A164C 3C048029 */ lui $a0, %hi(HES_SwapZ)
/* 4163E0 802A1650 24842C50 */ addiu $a0, $a0, %lo(HES_SwapZ)
.L802A1654_7A8FF4:
/* 4163E4 802A1654 0C050529 */ jal hud_element_create
/* 4163E8 802A1658 00000000 */ nop
/* 4163EC 802A165C 0040882D */ daddu $s1, $v0, $zero
.L802A1660_7A9000:
/* 4163F0 802A1660 0220202D */ daddu $a0, $s1, $zero
D_802A1664_7A9004:
/* 4163F4 802A1664 3C01802B */ lui $at, %hi(D_802AD050)
.L802A1668_7A9008:
/* 4163F8 802A1668 AC31D050 */ sw $s1, %lo(D_802AD050)($at)
/* 4163FC 802A166C 0C051277 */ jal hud_element_set_render_depth
D_802A1670_7A9010:
/* 416400 802A1670 24050005 */ addiu $a1, $zero, 0x5
/* 416404 802A1674 0220202D */ daddu $a0, $s1, $zero
.L802A1678_7A9018:
/* 416408 802A1678 0C05128B */ jal hud_element_clear_flags
.L802A167C_7A901C:
/* 41640C 802A167C 34058000 */ ori $a1, $zero, 0x8000
/* 416410 802A1680 0220202D */ daddu $a0, $s1, $zero
/* 416414 802A1684 0C051280 */ jal hud_element_set_flags
/* 416418 802A1688 24050080 */ addiu $a1, $zero, 0x80
D_802A168C_7A902C:
/* 41641C 802A168C 0220202D */ daddu $a0, $s1, $zero
D_802A1690_7A9030:
/* 416420 802A1690 2405005E */ addiu $a1, $zero, 0x5E
/* 416424 802A1694 0C051261 */ jal hud_element_set_render_pos
glabel .L802A1698_7A9038
/* 416428 802A1698 240600D1 */ addiu $a2, $zero, 0xD1
/* 41642C 802A169C 3C048029 */ lui $a0, %hi(HES_SwapArrowLeft)
.L802A16A0_7A9040:
/* 416430 802A16A0 24842C7C */ addiu $a0, $a0, %lo(HES_SwapArrowLeft)
D_802A16A4_7A9044:
/* 416434 802A16A4 0C050529 */ jal hud_element_create
/* 416438 802A16A8 00000000 */ nop
.L802A16AC_7A904C:
/* 41643C 802A16AC 0040882D */ daddu $s1, $v0, $zero
D_802A16B0_7A9050:
/* 416440 802A16B0 0220202D */ daddu $a0, $s1, $zero
/* 416444 802A16B4 3C01802B */ lui $at, %hi(D_802AD054)
.L802A16B8_7A9058:
/* 416448 802A16B8 AC31D054 */ sw $s1, %lo(D_802AD054)($at)
/* 41644C 802A16BC 0C051277 */ jal hud_element_set_render_depth
/* 416450 802A16C0 24050005 */ addiu $a1, $zero, 0x5
/* 416454 802A16C4 0220202D */ daddu $a0, $s1, $zero
/* 416458 802A16C8 0C05128B */ jal hud_element_clear_flags
glabel func_802A16CC_7A906C
/* 41645C 802A16CC 34058000 */ ori $a1, $zero, 0x8000
D_802A16D0_7A9070:
/* 416460 802A16D0 0220202D */ daddu $a0, $s1, $zero
D_802A16D4_7A9074:
/* 416464 802A16D4 0C051280 */ jal hud_element_set_flags
.L802A16D8_7A9078:
/* 416468 802A16D8 24050080 */ addiu $a1, $zero, 0x80
.L802A16DC_7A907C:
/* 41646C 802A16DC 0220202D */ daddu $a0, $s1, $zero
/* 416470 802A16E0 24050051 */ addiu $a1, $zero, 0x51
glabel func_802A16E4_7A9084
/* 416474 802A16E4 0C051261 */ jal hud_element_set_render_pos
/* 416478 802A16E8 240600D2 */ addiu $a2, $zero, 0xD2
/* 41647C 802A16EC 3C048029 */ lui $a0, %hi(HES_SwapArrowRight)
D_802A16F0_7A9090:
/* 416480 802A16F0 24842CB8 */ addiu $a0, $a0, %lo(HES_SwapArrowRight)
glabel func_802A16F4_7A9094
/* 416484 802A16F4 0C050529 */ jal hud_element_create
/* 416488 802A16F8 00000000 */ nop
.L802A16FC_7A909C:
/* 41648C 802A16FC 0040882D */ daddu $s1, $v0, $zero
.L802A1700_7A90A0:
/* 416490 802A1700 0220202D */ daddu $a0, $s1, $zero
D_802A1704_7A90A4:
/* 416494 802A1704 3C01802B */ lui $at, %hi(D_802AD058)
.L802A1708_7A90A8:
/* 416498 802A1708 AC31D058 */ sw $s1, %lo(D_802AD058)($at)
D_802A170C_7A90AC:
/* 41649C 802A170C 0C051277 */ jal hud_element_set_render_depth
D_802A1710_7A90B0:
/* 4164A0 802A1710 24050005 */ addiu $a1, $zero, 0x5
/* 4164A4 802A1714 0220202D */ daddu $a0, $s1, $zero
/* 4164A8 802A1718 0C05128B */ jal hud_element_clear_flags
.L802A171C_7A90BC:
/* 4164AC 802A171C 34058000 */ ori $a1, $zero, 0x8000
/* 4164B0 802A1720 0220202D */ daddu $a0, $s1, $zero
D_802A1724_7A90C4:
/* 4164B4 802A1724 0C051280 */ jal hud_element_set_flags
/* 4164B8 802A1728 24050080 */ addiu $a1, $zero, 0x80
/* 4164BC 802A172C 0220202D */ daddu $a0, $s1, $zero
/* 4164C0 802A1730 24050066 */ addiu $a1, $zero, 0x66
glabel .L802A1734_7A90D4
/* 4164C4 802A1734 0C051261 */ jal hud_element_set_render_pos
.L802A1738_7A90D8:
/* 4164C8 802A1738 240600D2 */ addiu $a2, $zero, 0xD2
/* 4164CC 802A173C 3C03802B */ lui $v1, %hi(D_802AD100)
D_802A1740_7A90E0:
/* 4164D0 802A1740 8C63D100 */ lw $v1, %lo(D_802AD100)($v1)
D_802A1744_7A90E4:
/* 4164D4 802A1744 24020064 */ addiu $v0, $zero, 0x64
/* 4164D8 802A1748 3C01802B */ lui $at, %hi(D_802AD00A)
D_802A174C_7A90EC:
/* 4164DC 802A174C A422D00A */ sh $v0, %lo(D_802AD00A)($at)
.L802A1750_7A90F0:
/* 4164E0 802A1750 24020003 */ addiu $v0, $zero, 0x3
glabel .L802A1754_7A90F4
/* 4164E4 802A1754 3C01802B */ lui $at, %hi(D_802AD001)
.L802A1758_7A90F8:
/* 4164E8 802A1758 A022D001 */ sb $v0, %lo(D_802AD001)($at)
.L802A175C_7A90FC:
/* 4164EC 802A175C 24020001 */ addiu $v0, $zero, 0x1
/* 4164F0 802A1760 3C01802B */ lui $at, %hi(BattleMenuState)
/* 4164F4 802A1764 A022D000 */ sb $v0, %lo(BattleMenuState)($at)
/* 4164F8 802A1768 000310C0 */ sll $v0, $v1, 3
D_802A176C_7A910C:
/* 4164FC 802A176C 00431023 */ subu $v0, $v0, $v1
D_802A1770_7A9110:
/* 416500 802A1770 00021080 */ sll $v0, $v0, 2
.L802A1774_7A9114:
/* 416504 802A1774 4482A000 */ mtc1 $v0, $f20
/* 416508 802A1778 00000000 */ nop
.L802A177C_7A911C:
/* 41650C 802A177C 4680A520 */ cvt.s.w $f20, $f20
/* 416510 802A1780 3C01802B */ lui $at, %hi(BattleMenu_WheelAngle)
D_802A1784_7A9124:
/* 416514 802A1784 E434D06C */ swc1 $f20, %lo(BattleMenu_WheelAngle)($at)
.L802A1788_7A9128:
/* 416518 802A1788 080A870A */ j .L802A1C28_7A95C8
/* 41651C 802A178C 0000102D */ daddu $v0, $zero, $zero
D_802A1790_7A9130:
/* 416520 802A1790 3C035555 */ lui $v1, (0x55555556 >> 16)
.L802A1794_7A9134:
/* 416524 802A1794 3C10802B */ lui $s0, %hi(D_802AD001)
.L802A1798_7A9138:
/* 416528 802A1798 2610D001 */ addiu $s0, $s0, %lo(D_802AD001)
.L802A179C_7A913C:
/* 41652C 802A179C 82040000 */ lb $a0, 0x0($s0)
D_802A17A0_7A9140:
/* 416530 802A17A0 34635556 */ ori $v1, $v1, (0x55555556 & 0xFFFF)
D_802A17A4_7A9144:
/* 416534 802A17A4 00041040 */ sll $v0, $a0, 1
/* 416538 802A17A8 00441021 */ addu $v0, $v0, $a0
D_802A17AC_7A914C:
/* 41653C 802A17AC 000210C0 */ sll $v0, $v0, 3
.L802A17B0_7A9150:
/* 416540 802A17B0 00441021 */ addu $v0, $v0, $a0
.L802A17B4_7A9154:
/* 416544 802A17B4 00021080 */ sll $v0, $v0, 2
.L802A17B8_7A9158:
/* 416548 802A17B8 00430018 */ mult $v0, $v1
.L802A17BC_7A915C:
/* 41654C 802A17BC 000217C3 */ sra $v0, $v0, 31
/* 416550 802A17C0 00004010 */ mfhi $t0
D_802A17C4_7A9164:
/* 416554 802A17C4 01021023 */ subu $v0, $t0, $v0
/* 416558 802A17C8 3C01802B */ lui $at, %hi(D_802AD00A)
D_802A17CC_7A916C:
/* 41655C 802A17CC A422D00A */ sh $v0, %lo(D_802AD00A)($at)
D_802A17D0_7A9170:
/* 416560 802A17D0 1080000A */ beqz $a0, D_802A17FC_7A919C
glabel func_802A17D4_7A9174
/* 416564 802A17D4 00000000 */ nop
/* 416568 802A17D8 14850005 */ bne $a0, $a1, .L802A17F0_7A9190
D_802A17DC_7A917C:
/* 41656C 802A17DC 00000000 */ nop
/* 416570 802A17E0 3C04802B */ lui $a0, %hi(D_802AD04C)
D_802A17E4_7A9184:
/* 416574 802A17E4 8C84D04C */ lw $a0, %lo(D_802AD04C)($a0)
.L802A17E8_7A9188:
/* 416578 802A17E8 0C05128B */ jal hud_element_clear_flags
/* 41657C 802A17EC 24050002 */ addiu $a1, $zero, 0x2
.L802A17F0_7A9190:
/* 416580 802A17F0 92020000 */ lbu $v0, 0x0($s0)
.L802A17F4_7A9194:
/* 416584 802A17F4 080A8708 */ j .L802A1C20_7A95C0
.L802A17F8_7A9198:
/* 416588 802A17F8 2442FFFF */ addiu $v0, $v0, -0x1
D_802A17FC_7A919C:
/* 41658C 802A17FC 3C02802B */ lui $v0, %hi(D_802AD100)
D_802A1800_7A91A0:
/* 416590 802A1800 8C42D100 */ lw $v0, %lo(D_802AD100)($v0)
D_802A1804_7A91A4:
/* 416594 802A1804 3C01802B */ lui $at, %hi(BattleMenu_CurPos)
.L802A1808_7A91A8:
/* 416598 802A1808 A020D002 */ sb $zero, %lo(BattleMenu_CurPos)($at)
D_802A180C_7A91AC:
/* 41659C 802A180C 3C01802B */ lui $at, %hi(BattleMenu_PrevPos)
/* 4165A0 802A1810 A020D003 */ sb $zero, %lo(BattleMenu_PrevPos)($at)
D_802A1814_7A91B4:
/* 4165A4 802A1814 000218C0 */ sll $v1, $v0, 3
glabel func_802A1818_7A91B8
/* 4165A8 802A1818 00621823 */ subu $v1, $v1, $v0
.L802A181C_7A91BC:
/* 4165AC 802A181C 00031880 */ sll $v1, $v1, 2
/* 4165B0 802A1820 3C02802B */ lui $v0, %hi(BattleMenu_NumOptions)
D_802A1824_7A91C4:
/* 4165B4 802A1824 8C42D0AC */ lw $v0, %lo(BattleMenu_NumOptions)($v0)
/* 4165B8 802A1828 4483A000 */ mtc1 $v1, $f20
D_802A182C_7A91CC:
/* 4165BC 802A182C 00000000 */ nop
D_802A1830_7A91D0:
/* 4165C0 802A1830 4680A520 */ cvt.s.w $f20, $f20
D_802A1834_7A91D4:
/* 4165C4 802A1834 3C01802B */ lui $at, %hi(BattleMenu_WheelAngle)
/* 4165C8 802A1838 E434D06C */ swc1 $f20, %lo(BattleMenu_WheelAngle)($at)
D_802A183C_7A91DC:
/* 4165CC 802A183C 18400039 */ blez $v0, .L802A1924_7A92C4
glabel func_802A1840_7A91E0
/* 4165D0 802A1840 0000982D */ daddu $s3, $zero, $zero
D_802A1844_7A91E4:
/* 4165D4 802A1844 4480B000 */ mtc1 $zero, $f22
glabel func_802A1848_7A91E8
/* 4165D8 802A1848 3C15802B */ lui $s5, %hi(D_802AD028)
/* 4165DC 802A184C 26B5D028 */ addiu $s5, $s5, %lo(D_802AD028)
D_802A1850_7A91F0:
/* 4165E0 802A1850 3C14802B */ lui $s4, %hi(D_802AD010)
D_802A1854_7A91F4:
/* 4165E4 802A1854 2694D010 */ addiu $s4, $s4, %lo(D_802AD010)
.L802A1858_7A91F8:
/* 4165E8 802A1858 27A40010 */ addiu $a0, $sp, 0x10
D_802A185C_7A91FC:
/* 4165EC 802A185C 27A50014 */ addiu $a1, $sp, 0x14
/* 4165F0 802A1860 3C0642AE */ lui $a2, (0x42AE0000 >> 16)
/* 4165F4 802A1864 4407A000 */ mfc1 $a3, $f20
/* 4165F8 802A1868 26730001 */ addiu $s3, $s3, 0x1
D_802A186C_7A920C:
/* 4165FC 802A186C E7B60010 */ swc1 $f22, 0x10($sp)
D_802A1870_7A9210:
/* 416600 802A1870 0C00A7E7 */ jal add_vec2D_polar
.L802A1874_7A9214:
/* 416604 802A1874 E7B60014 */ swc1 $f22, 0x14($sp)
.L802A1878_7A9218:
/* 416608 802A1878 8E910000 */ lw $s1, 0x0($s4)
.L802A187C_7A921C:
/* 41660C 802A187C 26940004 */ addiu $s4, $s4, 0x4
/* 416610 802A1880 3C01802B */ lui $at, %hi(BattleMenu_BasePosX)
D_802A1884_7A9224:
/* 416614 802A1884 C422D060 */ lwc1 $f2, %lo(BattleMenu_BasePosX)($at)
/* 416618 802A1888 468010A0 */ cvt.s.w $f2, $f2
glabel func_802A188C_7A922C
/* 41661C 802A188C C7A00010 */ lwc1 $f0, 0x10($sp)
.L802A1890_7A9230:
/* 416620 802A1890 C7A40014 */ lwc1 $f4, 0x14($sp)
glabel func_802A1894_7A9234
/* 416624 802A1894 46001080 */ add.s $f2, $f2, $f0
/* 416628 802A1898 0220202D */ daddu $a0, $s1, $zero
D_802A189C_7A923C:
/* 41662C 802A189C 3C01802B */ lui $at, %hi(BattleMenu_BasePosY)
.L802A18A0_7A9240:
/* 416630 802A18A0 C420D064 */ lwc1 $f0, %lo(BattleMenu_BasePosY)($at)
D_802A18A4_7A9244:
/* 416634 802A18A4 46800020 */ cvt.s.w $f0, $f0
/* 416638 802A18A8 46040000 */ add.s $f0, $f0, $f4
D_802A18AC_7A924C:
/* 41663C 802A18AC 4600118D */ trunc.w.s $f6, $f2
glabel .L802A18B0_7A9250
/* 416640 802A18B0 44123000 */ mfc1 $s2, $f6
/* 416644 802A18B4 00000000 */ nop
D_802A18B8_7A9258:
/* 416648 802A18B8 0240282D */ daddu $a1, $s2, $zero
/* 41664C 802A18BC 4600018D */ trunc.w.s $f6, $f0
/* 416650 802A18C0 44103000 */ mfc1 $s0, $f6
/* 416654 802A18C4 0C051261 */ jal hud_element_set_render_pos
D_802A18C8_7A9268:
/* 416658 802A18C8 0200302D */ daddu $a2, $s0, $zero
D_802A18CC_7A926C:
/* 41665C 802A18CC 0220202D */ daddu $a0, $s1, $zero
D_802A18D0_7A9270:
/* 416660 802A18D0 0C05128B */ jal hud_element_clear_flags
/* 416664 802A18D4 24050002 */ addiu $a1, $zero, 0x2
glabel func_802A18D8_7A9278
/* 416668 802A18D8 0240282D */ daddu $a1, $s2, $zero
/* 41666C 802A18DC 0200302D */ daddu $a2, $s0, $zero
D_802A18E0_7A9280:
/* 416670 802A18E0 8EB10000 */ lw $s1, 0x0($s5)
D_802A18E4_7A9284:
/* 416674 802A18E4 26B50004 */ addiu $s5, $s5, 0x4
glabel func_802A18E8_7A9288
/* 416678 802A18E8 0C051261 */ jal hud_element_set_render_pos
D_802A18EC_7A928C:
/* 41667C 802A18EC 0220202D */ daddu $a0, $s1, $zero
D_802A18F0_7A9290:
/* 416680 802A18F0 0220202D */ daddu $a0, $s1, $zero
/* 416684 802A18F4 0C0513AC */ jal hud_element_set_alpha
/* 416688 802A18F8 24050064 */ addiu $a1, $zero, 0x64
D_802A18FC_7A929C:
/* 41668C 802A18FC 0220202D */ daddu $a0, $s1, $zero
/* 416690 802A1900 0C05128B */ jal hud_element_clear_flags
D_802A1904_7A92A4:
/* 416694 802A1904 24050002 */ addiu $a1, $zero, 0x2
/* 416698 802A1908 3C02802B */ lui $v0, %hi(BattleMenu_NumOptions)
D_802A190C_7A92AC:
/* 41669C 802A190C 8C42D0AC */ lw $v0, %lo(BattleMenu_NumOptions)($v0)
/* 4166A0 802A1910 3C0141E0 */ lui $at, (0x41E00000 >> 16)
D_802A1914_7A92B4:
/* 4166A4 802A1914 44810000 */ mtc1 $at, $f0
/* 4166A8 802A1918 0262102A */ slt $v0, $s3, $v0
D_802A191C_7A92BC:
/* 4166AC 802A191C 1440FFCE */ bnez $v0, .L802A1858_7A91F8
.L802A1920_7A92C0:
/* 4166B0 802A1920 4600A500 */ add.s $f20, $f20, $f0
.L802A1924_7A92C4:
/* 4166B4 802A1924 27A40010 */ addiu $a0, $sp, 0x10
.L802A1928_7A92C8:
/* 4166B8 802A1928 3C03802B */ lui $v1, %hi(D_802AD100)
/* 4166BC 802A192C 8C63D100 */ lw $v1, %lo(D_802AD100)($v1)
D_802A1930_7A92D0:
/* 4166C0 802A1930 3C0642AE */ lui $a2, (0x42AE0000 >> 16)
D_802A1934_7A92D4:
/* 4166C4 802A1934 000310C0 */ sll $v0, $v1, 3
.L802A1938_7A92D8:
/* 4166C8 802A1938 00431023 */ subu $v0, $v0, $v1
.L802A193C_7A92DC:
/* 4166CC 802A193C 00021080 */ sll $v0, $v0, 2
/* 4166D0 802A1940 44823000 */ mtc1 $v0, $f6
D_802A1944_7A92E4:
/* 4166D4 802A1944 00000000 */ nop
D_802A1948_7A92E8:
/* 4166D8 802A1948 468031A0 */ cvt.s.w $f6, $f6
/* 4166DC 802A194C 44073000 */ mfc1 $a3, $f6
D_802A1950_7A92F0:
/* 4166E0 802A1950 27A50014 */ addiu $a1, $sp, 0x14
/* 4166E4 802A1954 AFA00010 */ sw $zero, 0x10($sp)
/* 4166E8 802A1958 0C00A7E7 */ jal add_vec2D_polar
D_802A195C_7A92FC:
/* 4166EC 802A195C AFA00014 */ sw $zero, 0x14($sp)
D_802A1960_7A9300:
/* 4166F0 802A1960 3C01802B */ lui $at, %hi(BattleMenu_BasePosX)
D_802A1964_7A9304:
/* 4166F4 802A1964 C422D060 */ lwc1 $f2, %lo(BattleMenu_BasePosX)($at)
/* 4166F8 802A1968 468010A0 */ cvt.s.w $f2, $f2
D_802A196C_7A930C:
/* 4166FC 802A196C C7A00010 */ lwc1 $f0, 0x10($sp)
D_802A1970_7A9310:
/* 416700 802A1970 3C11802B */ lui $s1, %hi(D_802AD040)
/* 416704 802A1974 8E31D040 */ lw $s1, %lo(D_802AD040)($s1)
/* 416708 802A1978 46001080 */ add.s $f2, $f2, $f0
/* 41670C 802A197C C7A40014 */ lwc1 $f4, 0x14($sp)
D_802A1980_7A9320:
/* 416710 802A1980 3C01802B */ lui $at, %hi(BattleMenu_BasePosY)
D_802A1984_7A9324:
/* 416714 802A1984 C420D064 */ lwc1 $f0, %lo(BattleMenu_BasePosY)($at)
/* 416718 802A1988 46800020 */ cvt.s.w $f0, $f0
D_802A198C_7A932C:
/* 41671C 802A198C 46040000 */ add.s $f0, $f0, $f4
/* 416720 802A1990 4600118D */ trunc.w.s $f6, $f2
/* 416724 802A1994 44053000 */ mfc1 $a1, $f6
D_802A1998_7A9338:
/* 416728 802A1998 4600018D */ trunc.w.s $f6, $f0
/* 41672C 802A199C 44063000 */ mfc1 $a2, $f6
/* 416730 802A19A0 0C051261 */ jal hud_element_set_render_pos
/* 416734 802A19A4 0220202D */ daddu $a0, $s1, $zero
glabel func_802A19A8_7A9348
/* 416738 802A19A8 0220202D */ daddu $a0, $s1, $zero
.L802A19AC_7A934C:
/* 41673C 802A19AC 0C0513AC */ jal hud_element_set_alpha
D_802A19B0:
/* 416740 802A19B0 240500B4 */ addiu $a1, $zero, 0xB4
/* 416744 802A19B4 3C053F59 */ lui $a1, (0x3F59999A >> 16)
D_802A19B8_7A9358:
/* 416748 802A19B8 34A5999A */ ori $a1, $a1, (0x3F59999A & 0xFFFF)
D_802A19BC_7A935C:
/* 41674C 802A19BC 0C051308 */ jal hud_element_set_scale
D_802A19C0_7A9360:
/* 416750 802A19C0 0220202D */ daddu $a0, $s1, $zero
/* 416754 802A19C4 0220202D */ daddu $a0, $s1, $zero
D_802A19C8_7A9368:
/* 416758 802A19C8 0C05128B */ jal hud_element_clear_flags
D_802A19CC_7A936C:
/* 41675C 802A19CC 24050002 */ addiu $a1, $zero, 0x2
/* 416760 802A19D0 24020002 */ addiu $v0, $zero, 0x2
.L802A19D4_7A9374:
/* 416764 802A19D4 3C01802B */ lui $at, %hi(BattleMenuState)
/* 416768 802A19D8 A022D000 */ sb $v0, %lo(BattleMenuState)($at)
/* 41676C 802A19DC 080A870A */ j .L802A1C28_7A95C8
D_802A19E0_7A9380:
/* 416770 802A19E0 0000102D */ daddu $v0, $zero, $zero
D_802A19E4_7A9384:
/* 416774 802A19E4 8CC20214 */ lw $v0, 0x214($a2)
/* 416778 802A19E8 30428000 */ andi $v0, $v0, 0x8000
glabel func_802A19EC_7A938C
/* 41677C 802A19EC 10400021 */ beqz $v0, D_802A1A74_7A9414
/* 416780 802A19F0 00000000 */ nop
/* 416784 802A19F4 3C11802B */ lui $s1, %hi(BattleMenu_CurPos)
/* 416788 802A19F8 2631D002 */ addiu $s1, $s1, %lo(BattleMenu_CurPos)
D_802A19FC_7A939C:
/* 41678C 802A19FC 3C12802B */ lui $s2, %hi(BattleMenu_HomePos)
D_802A1A00_7A93A0:
/* 416790 802A1A00 2652D06B */ addiu $s2, $s2, %lo(BattleMenu_HomePos)
/* 416794 802A1A04 82220000 */ lb $v0, 0x0($s1)
/* 416798 802A1A08 82430000 */ lb $v1, 0x0($s2)
D_802A1A0C_7A93AC:
/* 41679C 802A1A0C 00431021 */ addu $v0, $v0, $v1
/* 4167A0 802A1A10 00021080 */ sll $v0, $v0, 2
/* 4167A4 802A1A14 3C01802B */ lui $at, %hi(BattleMenu_OptionEnabled)
/* 4167A8 802A1A18 00220821 */ addu $at, $at, $v0
D_802A1A1C_7A93BC:
/* 4167AC 802A1A1C 8C22D0D0 */ lw $v0, %lo(BattleMenu_OptionEnabled)($at)
D_802A1A20_7A93C0:
/* 4167B0 802A1A20 14450005 */ bne $v0, $a1, .L802A1A38_7A93D8
/* 4167B4 802A1A24 00000000 */ nop
.L802A1A28_7A93C8:
/* 4167B8 802A1A28 0C05272D */ jal sfx_play_sound
/* 4167BC 802A1A2C 240400C9 */ addiu $a0, $zero, 0xC9
D_802A1A30_7A93D0:
/* 4167C0 802A1A30 080A8708 */ j .L802A1C20_7A95C0
/* 4167C4 802A1A34 2402FFFF */ addiu $v0, $zero, -0x1
.L802A1A38_7A93D8:
/* 4167C8 802A1A38 0C05272D */ jal sfx_play_sound
/* 4167CC 802A1A3C 2404021D */ addiu $a0, $zero, 0x21D
glabel func_802A1A40_7A93E0
/* 4167D0 802A1A40 82220000 */ lb $v0, 0x0($s1)
D_802A1A44_7A93E4:
/* 4167D4 802A1A44 82430000 */ lb $v1, 0x0($s2)
/* 4167D8 802A1A48 00431021 */ addu $v0, $v0, $v1
/* 4167DC 802A1A4C 00021080 */ sll $v0, $v0, 2
/* 4167E0 802A1A50 3C03802B */ lui $v1, %hi(D_802AD0EB)
/* 4167E4 802A1A54 00621821 */ addu $v1, $v1, $v0
/* 4167E8 802A1A58 9063D0EB */ lbu $v1, %lo(D_802AD0EB)($v1)
D_802A1A5C_7A93FC:
/* 4167EC 802A1A5C 24020064 */ addiu $v0, $zero, 0x64
D_802A1A60:
/* 4167F0 802A1A60 A2020000 */ sb $v0, 0x0($s0)
D_802A1A64_7A9404:
/* 4167F4 802A1A64 3C01802B */ lui $at, %hi(BattleMenuDisableMsg)
D_802A1A68_7A9408:
/* 4167F8 802A1A68 A023D068 */ sb $v1, %lo(BattleMenuDisableMsg)($at)
/* 4167FC 802A1A6C 080A870A */ j .L802A1C28_7A95C8
D_802A1A70_7A9410:
/* 416800 802A1A70 0000102D */ daddu $v0, $zero, $zero
D_802A1A74_7A9414:
/* 416804 802A1A74 3C05802B */ lui $a1, %hi(BattleMenu_CurPos)
.L802A1A78_7A9418:
/* 416808 802A1A78 24A5D002 */ addiu $a1, $a1, %lo(BattleMenu_CurPos)
/* 41680C 802A1A7C 90A40000 */ lbu $a0, 0x0($a1)
/* 416810 802A1A80 3C02802B */ lui $v0, %hi(D_802AD004)
D_802A1A84_7A9424:
/* 416814 802A1A84 8042D004 */ lb $v0, %lo(D_802AD004)($v0)
D_802A1A88_7A9428:
/* 416818 802A1A88 3C01802B */ lui $at, %hi(BattleMenu_PrevPos)
glabel func_802A1A8C_7A942C
/* 41681C 802A1A8C A024D003 */ sb $a0, %lo(BattleMenu_PrevPos)($at)
D_802A1A90_7A9430:
/* 416820 802A1A90 1440001B */ bnez $v0, .L802A1B00_7A94A0
D_802A1A94_7A9434:
/* 416824 802A1A94 3C030005 */ lui $v1, (0x50000 >> 16)
/* 416828 802A1A98 8CC20218 */ lw $v0, 0x218($a2)
/* 41682C 802A1A9C 00431024 */ and $v0, $v0, $v1
D_802A1AA0_7A9440:
/* 416830 802A1AA0 10400008 */ beqz $v0, .L802A1AC4_7A9464
/* 416834 802A1AA4 00041600 */ sll $v0, $a0, 24
D_802A1AA8_7A9448:
/* 416838 802A1AA8 3C03802B */ lui $v1, %hi(BattleMenu_MinIdx)
/* 41683C 802A1AAC 8063D069 */ lb $v1, %lo(BattleMenu_MinIdx)($v1)
/* 416840 802A1AB0 00021603 */ sra $v0, $v0, 24
/* 416844 802A1AB4 0062182A */ slt $v1, $v1, $v0
glabel .L802A1AB8_7A9458
/* 416848 802A1AB8 10600002 */ beqz $v1, .L802A1AC4_7A9464
D_802A1ABC_7A945C:
/* 41684C 802A1ABC 2482FFFF */ addiu $v0, $a0, -0x1
D_802A1AC0_7A9460:
/* 416850 802A1AC0 A0A20000 */ sb $v0, 0x0($a1)
.L802A1AC4_7A9464:
/* 416854 802A1AC4 8CC20218 */ lw $v0, 0x218($a2)
/* 416858 802A1AC8 3C03000A */ lui $v1, (0xA0000 >> 16)
D_802A1ACC_7A946C:
/* 41685C 802A1ACC 00431024 */ and $v0, $v0, $v1
D_802A1AD0_7A9470:
/* 416860 802A1AD0 1040000B */ beqz $v0, .L802A1B00_7A94A0
/* 416864 802A1AD4 00000000 */ nop
glabel func_802A1AD8_7A9478
/* 416868 802A1AD8 3C04802B */ lui $a0, %hi(BattleMenu_CurPos)
/* 41686C 802A1ADC 2484D002 */ addiu $a0, $a0, %lo(BattleMenu_CurPos)
/* 416870 802A1AE0 80820000 */ lb $v0, 0x0($a0)
/* 416874 802A1AE4 3C03802B */ lui $v1, %hi(BattleMenu_MaxIdx)
/* 416878 802A1AE8 8063D06A */ lb $v1, %lo(BattleMenu_MaxIdx)($v1)
D_802A1AEC_7A948C:
/* 41687C 802A1AEC 0043102A */ slt $v0, $v0, $v1
D_802A1AF0_7A9490:
/* 416880 802A1AF0 90830000 */ lbu $v1, 0x0($a0)
/* 416884 802A1AF4 10400002 */ beqz $v0, .L802A1B00_7A94A0
/* 416888 802A1AF8 24620001 */ addiu $v0, $v1, 0x1
D_802A1AFC_7A949C:
/* 41688C 802A1AFC A0820000 */ sb $v0, 0x0($a0)
.L802A1B00_7A94A0:
/* 416890 802A1B00 3C03802B */ lui $v1, %hi(BattleMenu_PrevPos)
/* 416894 802A1B04 8063D003 */ lb $v1, %lo(BattleMenu_PrevPos)($v1)
/* 416898 802A1B08 3C02802B */ lui $v0, %hi(BattleMenu_CurPos)
D_802A1B0C_7A94AC:
/* 41689C 802A1B0C 8042D002 */ lb $v0, %lo(BattleMenu_CurPos)($v0)
/* 4168A0 802A1B10 10620044 */ beq $v1, $v0, .L802A1C24_7A95C4
glabel func_802A1B14_7A94B4
/* 4168A4 802A1B14 24020001 */ addiu $v0, $zero, 0x1
/* 4168A8 802A1B18 3C01802B */ lui $at, %hi(D_802AD004)
/* 4168AC 802A1B1C A022D004 */ sb $v0, %lo(D_802AD004)($at)
.L802A1B20_7A94C0:
/* 4168B0 802A1B20 0C05272D */ jal sfx_play_sound
/* 4168B4 802A1B24 240400C8 */ addiu $a0, $zero, 0xC8
/* 4168B8 802A1B28 080A870A */ j .L802A1C28_7A95C8
/* 4168BC 802A1B2C 0000102D */ daddu $v0, $zero, $zero
.L802A1B30_7A94D0:
/* 4168C0 802A1B30 3C02802B */ lui $v0, %hi(BattleMenu_CurPos)
/* 4168C4 802A1B34 8042D002 */ lb $v0, %lo(BattleMenu_CurPos)($v0)
/* 4168C8 802A1B38 3C04802B */ lui $a0, %hi(BattleMenu_HomePos)
/* 4168CC 802A1B3C 8084D06B */ lb $a0, %lo(BattleMenu_HomePos)($a0)
D_802A1B40_7A94E0:
/* 4168D0 802A1B40 3C01802B */ lui $at, %hi(BattleMenuAlpha)
D_802A1B44_7A94E4:
/* 4168D4 802A1B44 A423D008 */ sh $v1, %lo(BattleMenuAlpha)($at)
/* 4168D8 802A1B48 080A86F1 */ j .L802A1BC4_7A9564
/* 4168DC 802A1B4C 00441021 */ addu $v0, $v0, $a0
D_802A1B50_7A94F0:
/* 4168E0 802A1B50 3C02802B */ lui $v0, %hi(BattleMenu_CurPos)
glabel .L802A1B54_7A94F4
/* 4168E4 802A1B54 8042D002 */ lb $v0, %lo(BattleMenu_CurPos)($v0)
/* 4168E8 802A1B58 3C04802B */ lui $a0, %hi(BattleMenu_HomePos)
/* 4168EC 802A1B5C 8084D06B */ lb $a0, %lo(BattleMenu_HomePos)($a0)
/* 4168F0 802A1B60 3C01802B */ lui $at, %hi(D_802AD001)
/* 4168F4 802A1B64 A020D001 */ sb $zero, %lo(D_802AD001)($at)
glabel func_802A1B68_7A9508
/* 4168F8 802A1B68 3C01802B */ lui $at, %hi(D_802AD006)
D_802A1B6C_7A950C:
/* 4168FC 802A1B6C A420D006 */ sh $zero, %lo(D_802AD006)($at)
/* 416900 802A1B70 080A86EF */ j D_802A1BBC_7A955C
D_802A1B74_7A9514:
/* 416904 802A1B74 2403000B */ addiu $v1, $zero, 0xB
.L802A1B78_7A9518:
/* 416908 802A1B78 3C02802B */ lui $v0, %hi(BattleMenu_CurPos)
/* 41690C 802A1B7C 8042D002 */ lb $v0, %lo(BattleMenu_CurPos)($v0)
/* 416910 802A1B80 3C03802B */ lui $v1, %hi(BattleMenu_HomePos)
/* 416914 802A1B84 8063D06B */ lb $v1, %lo(BattleMenu_HomePos)($v1)
/* 416918 802A1B88 00431021 */ addu $v0, $v0, $v1
/* 41691C 802A1B8C 080A870A */ j .L802A1C28_7A95C8
/* 416920 802A1B90 24420001 */ addiu $v0, $v0, 0x1
.L802A1B94_7A9534:
/* 416924 802A1B94 3C01802B */ lui $at, %hi(D_802AD001)
/* 416928 802A1B98 A022D001 */ sb $v0, %lo(D_802AD001)($at)
D_802A1B9C_7A953C:
/* 41692C 802A1B9C 240200FF */ addiu $v0, $zero, 0xFF
D_802A1BA0_7A9540:
/* 416930 802A1BA0 3C01802B */ lui $at, %hi(D_802AD006)
/* 416934 802A1BA4 A422D006 */ sh $v0, %lo(D_802AD006)($at)
/* 416938 802A1BA8 3C02802B */ lui $v0, %hi(BattleMenu_CurPos)
/* 41693C 802A1BAC 8042D002 */ lb $v0, %lo(BattleMenu_CurPos)($v0)
D_802A1BB0_7A9550:
/* 416940 802A1BB0 3C04802B */ lui $a0, %hi(BattleMenu_HomePos)
.L802A1BB4_7A9554:
/* 416944 802A1BB4 8084D06B */ lb $a0, %lo(BattleMenu_HomePos)($a0)
/* 416948 802A1BB8 24030002 */ addiu $v1, $zero, 0x2
D_802A1BBC_7A955C:
/* 41694C 802A1BBC A2030000 */ sb $v1, 0x0($s0)
/* 416950 802A1BC0 00441021 */ addu $v0, $v0, $a0
.L802A1BC4_7A9564:
/* 416954 802A1BC4 080A870A */ j .L802A1C28_7A95C8
/* 416958 802A1BC8 24420001 */ addiu $v0, $v0, 0x1
.L802A1BCC_7A956C:
/* 41695C 802A1BCC 3C01802B */ lui $at, %hi(D_802AD001)
/* 416960 802A1BD0 A022D001 */ sb $v0, %lo(D_802AD001)($at)
/* 416964 802A1BD4 240200FF */ addiu $v0, $zero, 0xFF
/* 416968 802A1BD8 3C01802B */ lui $at, %hi(D_802AD006)
/* 41696C 802A1BDC A422D006 */ sh $v0, %lo(D_802AD006)($at)
D_802A1BE0_7A9580:
/* 416970 802A1BE0 080A8708 */ j .L802A1C20_7A95C0
/* 416974 802A1BE4 2402FFFF */ addiu $v0, $zero, -0x1
.L802A1BE8_7A9588:
/* 416978 802A1BE8 3C04802B */ lui $a0, %hi(BattleMenuDisableMsg)
D_802A1BEC_7A958C:
/* 41697C 802A1BEC 8084D068 */ lb $a0, %lo(BattleMenuDisableMsg)($a0)
/* 416980 802A1BF0 0C093E58 */ jal func_8024F960
/* 416984 802A1BF4 2405005A */ addiu $a1, $zero, 0x5A
/* 416988 802A1BF8 080A8708 */ j .L802A1C20_7A95C0
/* 41698C 802A1BFC 24020065 */ addiu $v0, $zero, 0x65
D_802A1C00_7A95A0:
/* 416990 802A1C00 0C093EAD */ jal func_8024FAB4
/* 416994 802A1C04 00000000 */ nop
/* 416998 802A1C08 14400007 */ bnez $v0, .L802A1C28_7A95C8
/* 41699C 802A1C0C 0000102D */ daddu $v0, $zero, $zero
.L802A1C10_7A95B0:
/* 4169A0 802A1C10 2402FFFF */ addiu $v0, $zero, -0x1
/* 4169A4 802A1C14 3C01802B */ lui $at, %hi(BattleMenuDisableMsg)
/* 4169A8 802A1C18 A022D068 */ sb $v0, %lo(BattleMenuDisableMsg)($at)
/* 4169AC 802A1C1C 24020002 */ addiu $v0, $zero, 0x2
.L802A1C20_7A95C0:
/* 4169B0 802A1C20 A2020000 */ sb $v0, 0x0($s0)
.L802A1C24_7A95C4:
/* 4169B4 802A1C24 0000102D */ daddu $v0, $zero, $zero
.L802A1C28_7A95C8:
/* 4169B8 802A1C28 8FBF0030 */ lw $ra, 0x30($sp)
/* 4169BC 802A1C2C 8FB5002C */ lw $s5, 0x2C($sp)
/* 4169C0 802A1C30 8FB40028 */ lw $s4, 0x28($sp)
/* 4169C4 802A1C34 8FB30024 */ lw $s3, 0x24($sp)
/* 4169C8 802A1C38 8FB20020 */ lw $s2, 0x20($sp)
/* 4169CC 802A1C3C 8FB1001C */ lw $s1, 0x1C($sp)
D_802A1C40_7A95E0:
/* 4169D0 802A1C40 8FB00018 */ lw $s0, 0x18($sp)
/* 4169D4 802A1C44 D7B60040 */ ldc1 $f22, 0x40($sp)
/* 4169D8 802A1C48 D7B40038 */ ldc1 $f20, 0x38($sp)
/* 4169DC 802A1C4C 03E00008 */ jr $ra
D_802A1C50_7A95F0:
/* 4169E0 802A1C50 27BD0048 */ addiu $sp, $sp, 0x48
### DECOMPILED C INSTRUCTIONS:
s32 btl_main_menu_update(void) {
BattleStatus* battleStatus = &gBattleStatus;
f32 theta;
s32 id;
s32 i;
f32 x, y;
s32 l, t;
switch (BattleMenuState) {
case BTL_MENU_STATE_CREATE:
BattleMenu_BasePosX = 54;
BattleMenu_BasePosY = 173;
D_802AD070 = 0.3f;
D_802AD004 = 0;
BattleMenu_HomePos = D_802AD0B0;
BattleMenu_MinIdx = 0;
BattleMenu_MinIdx -= D_802AD0B0;
BattleMenu_MaxIdx = BattleMenu_NumOptions - 1;
BattleMenu_MaxIdx -= D_802AD0B0;
for (i = 0; i < BattleMenu_NumOptions; i++) {
D_802AD010[i] = id = hud_element_create(BattleMenu_HudScripts[i]);
hud_element_set_render_depth(id, 5);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_scale(id, 0.75f);
D_802AD028[i] = id = hud_element_create(&HES_ProjectorSpot);
hud_element_create_transform_B(id);
hud_element_set_render_depth(id, 10);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
D_802AD040 = id = hud_element_create(&HES_ProjectorSpot);
hud_element_create_transform_B(id);
hud_element_set_render_depth(id, 7);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DISABLED);
D_802AD044 = id = hud_element_create(&HES_ProjectorReel);
hud_element_create_transform_B(id);
hud_element_set_render_depth(id, 0);
hud_element_set_render_pos(id, 40, 212);
hud_element_set_tint(id, 0, 91, 127);
hud_element_set_transform_rotation_pivot(id, 16, -16);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_alpha(id, 240);
D_802AD048 = id = hud_element_create(&HES_ProjectorReel);
hud_element_create_transform_B(id);
hud_element_set_render_depth(id, 2);
hud_element_set_render_pos(id, 39, 212);
hud_element_set_tint(id, 0, 91, 127);
hud_element_set_transform_rotation_pivot(id, 16, -16);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_alpha(id, 240);
D_802AD04C = id = hud_element_create(&HES_ProjectorBeam);
hud_element_create_transform_B(id);
hud_element_set_render_depth(id, 20);
hud_element_set_render_pos(id, 78, 178);
hud_element_set_tint(id, 255, 255, 255);
hud_element_set_transform_rotation_pivot(id, 0, 0);
hud_element_set_transform_rotation(id, 0.0f, 0.0f, -45.0f);
hud_element_set_alpha(id, 200);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DISABLED);
D_802AD05C = id = hud_element_create(&HES_SwapBackground);
hud_element_set_render_depth(id, 0);
hud_element_set_render_pos(id, 97, 208);
hud_element_set_tint(id, 255, 255, 255);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_alpha(id, 230);
D_802AD050 = id = hud_element_create(&HES_SwapZ);
hud_element_set_render_depth(id, 5);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, 94, 209);
D_802AD054 = id = hud_element_create(&HES_SwapArrowLeft);
hud_element_set_render_depth(id, 5);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, 81, 210);
D_802AD058 = id = hud_element_create(&HES_SwapArrowRight);
hud_element_set_render_depth(id, 5);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, 102, 210);
D_802AD00A = 100;
D_802AD001 = 3;
BattleMenuState = BTL_MENU_STATE_UNK_1;
BattleMenu_WheelAngle = theta = D_802AD100 * 28;
break;
case BTL_MENU_STATE_UNK_1:
D_802AD00A = (D_802AD001 * 100) / 3;
switch (D_802AD001) {
case 1:
if (D_802AD001 == 1) {
id = D_802AD04C;
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
default:
D_802AD001--;
break;
case 0:
BattleMenu_CurPos = 0;
BattleMenu_PrevPos = 0;
BattleMenu_WheelAngle = theta = D_802AD100 * 28;
for (i = 0; i < BattleMenu_NumOptions; i++, theta += 28.0f) {
x = 0.0f;
y = 0.0f;
add_vec2D_polar(&x, &y, 87.0f, theta);
l = BattleMenu_BasePosX + x;
t = BattleMenu_BasePosY + y;
id = D_802AD010[i];
hud_element_set_render_pos(id, l, t);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
id = D_802AD028[i];
hud_element_set_render_pos(id, l, t);
hud_element_set_alpha(id, 100);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
x = 0.0f;
y = 0.0f;
theta = D_802AD100 * 28;
add_vec2D_polar(&x, &y, 87.0f, theta);
l = BattleMenu_BasePosX + x;
t = BattleMenu_BasePosY + y;
id = D_802AD040;
hud_element_set_render_pos(id, l, t);
hud_element_set_alpha(id, 180);
hud_element_set_scale(id, 0.85f);
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
BattleMenuState = BTL_MENU_STATE_ACCEPT_INPUT;
break;
}
break;
case BTL_MENU_STATE_ACCEPT_INPUT:
if (battleStatus->currentButtonsPressed & BUTTON_A) {
if (BattleMenu_OptionEnabled[BattleMenu_CurPos + BattleMenu_HomePos] == TRUE) {
sfx_play_sound(SOUND_MENU_NEXT);
BattleMenuState = BTL_MENU_STATE_OPENED_SUBMENU;
} else {
sfx_play_sound(SOUND_MENU_ERROR);
BattleMenuDisableMsg = battle_menu_isMessageDisabled[BattleMenu_CurPos + BattleMenu_HomePos];
BattleMenuState = BTL_MENU_STATE_SHOW_DISABLED_POPUP;
}
} else {
BattleMenu_PrevPos = BattleMenu_CurPos;
if (D_802AD004 == 0) {
if ((battleStatus->currentButtonsHeld & (BUTTON_STICK_LEFT | BUTTON_STICK_UP)) &&
BattleMenu_MinIdx < BattleMenu_CurPos)
{
BattleMenu_CurPos--;
}
if ((battleStatus->currentButtonsHeld & (BUTTON_STICK_RIGHT | BUTTON_STICK_DOWN)) &&
BattleMenu_CurPos < BattleMenu_MaxIdx)
{
BattleMenu_CurPos++;
}
}
if (BattleMenu_PrevPos != BattleMenu_CurPos) {
D_802AD004 = 1;
sfx_play_sound(SOUND_MENU_CHANGE_TAB);
}
}
break;
case BTL_MENU_STATE_OPENED_SUBMENU:
BattleMenuAlpha = 100;
return BattleMenu_CurPos + BattleMenu_HomePos + 1;
case BTL_MENU_STATE_UNK_A:
D_802AD001 = 0;
D_802AD006 = 0;
BattleMenuState = BTL_MENU_STATE_UNK_B;
return BattleMenu_CurPos + BattleMenu_HomePos + 1;
case BTL_MENU_STATE_UNK_B:
return BattleMenu_CurPos + BattleMenu_HomePos + 1;
case BTL_MENU_STATE_UNK_14:
D_802AD001 = 3;
D_802AD006 = 255;
BattleMenuState = BTL_MENU_STATE_ACCEPT_INPUT;
return BattleMenu_CurPos + BattleMenu_HomePos + 1;
case BTL_MENU_STATE_UNK_1E:
D_802AD001 = 3;
D_802AD006 = 255;
BattleMenuState = BTL_MENU_STATE_OPENED_SUBMENU;
break;
case BTL_MENU_STATE_SHOW_DISABLED_POPUP:
btl_show_battle_message(BattleMenuDisableMsg, 90);
BattleMenuState = BTL_MENU_STATE_AWAIT_DISABLED_POPUP;
break;
case BTL_MENU_STATE_AWAIT_DISABLED_POPUP:
if (btl_is_popup_displayed()) {
break;
}
BattleMenuDisableMsg = -1;
BattleMenuState = BTL_MENU_STATE_ACCEPT_INPUT;
break;
}
return 0;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel msg_draw_frame
/* C4258 8012DB58 27BDFEB0 */ addiu $sp, $sp, -0x150
/* C425C 8012DB5C 0080682D */ daddu $t5, $a0, $zero
/* C4260 8012DB60 8FAC016C */ lw $t4, 0x16C($sp)
/* C4264 8012DB64 00A0702D */ daddu $t6, $a1, $zero
/* C4268 8012DB68 AFB10144 */ sw $s1, 0x144($sp)
/* C426C 8012DB6C 8FB10170 */ lw $s1, 0x170($sp)
/* C4270 8012DB70 00C0C82D */ daddu $t9, $a2, $zero
/* C4274 8012DB74 AFB00140 */ sw $s0, 0x140($sp)
/* C4278 8012DB78 AFB20148 */ sw $s2, 0x148($sp)
/* C427C 8012DB7C 8FB20160 */ lw $s2, 0x160($sp)
/* C4280 8012DB80 2B220010 */ slti $v0, $t9, 0x10
/* C4284 8012DB84 AFB3014C */ sw $s3, 0x14C($sp)
/* C4288 8012DB88 8FB30168 */ lw $s3, 0x168($sp)
/* C428C 8012DB8C 1440034E */ bnez $v0, .L8012E8C8
/* C4290 8012DB90 00E0802D */ daddu $s0, $a3, $zero
/* C4294 8012DB94 2A020010 */ slti $v0, $s0, 0x10
/* C4298 8012DB98 1440034B */ bnez $v0, .L8012E8C8
/* C429C 8012DB9C 00000000 */ nop
/* C42A0 8012DBA0 12600005 */ beqz $s3, .L8012DBB8
/* C42A4 8012DBA4 3C03E300 */ lui $v1, (0xE3000A01 >> 16)
/* C42A8 8012DBA8 15800004 */ bnez $t4, .L8012DBBC
/* C42AC 8012DBAC 34630A01 */ ori $v1, $v1, (0xE3000A01 & 0xFFFF)
/* C42B0 8012DBB0 12200345 */ beqz $s1, .L8012E8C8
/* C42B4 8012DBB4 3C03E300 */ lui $v1, (0xE3000A01 >> 16)
.L8012DBB8:
/* C42B8 8012DBB8 34630A01 */ ori $v1, $v1, (0xE3000A01 & 0xFFFF)
.L8012DBBC:
/* C42BC 8012DBBC 3C04E300 */ lui $a0, (0xE3000C00 >> 16)
/* C42C0 8012DBC0 34840C00 */ ori $a0, $a0, (0xE3000C00 & 0xFFFF)
/* C42C4 8012DBC4 3C05E300 */ lui $a1, (0xE3000F00 >> 16)
/* C42C8 8012DBC8 34A50F00 */ ori $a1, $a1, (0xE3000F00 & 0xFFFF)
/* C42CC 8012DBCC 3C06E300 */ lui $a2, (0xE3001001 >> 16)
/* C42D0 8012DBD0 34C61001 */ ori $a2, $a2, (0xE3001001 & 0xFFFF)
/* C42D4 8012DBD4 3C07E300 */ lui $a3, (0xE3001801 >> 16)
/* C42D8 8012DBD8 34E71801 */ ori $a3, $a3, (0xE3001801 & 0xFFFF)
/* C42DC 8012DBDC 3C08E300 */ lui $t0, (0xE3001A01 >> 16)
/* C42E0 8012DBE0 35081A01 */ ori $t0, $t0, (0xE3001A01 & 0xFFFF)
/* C42E4 8012DBE4 3C18E300 */ lui $t8, (0xE3001201 >> 16)
/* C42E8 8012DBE8 3C0B800A */ lui $t3, %hi(gMainGfxPos)
/* C42EC 8012DBEC 256BA66C */ addiu $t3, $t3, %lo(gMainGfxPos)
/* C42F0 8012DBF0 37181201 */ ori $t8, $t8, (0xE3001201 & 0xFFFF)
/* C42F4 8012DBF4 8D690000 */ lw $t1, 0x0($t3)
/* C42F8 8012DBF8 3C0FE700 */ lui $t7, (0xE7000000 >> 16)
/* C42FC 8012DBFC 0120102D */ daddu $v0, $t1, $zero
/* C4300 8012DC00 25290008 */ addiu $t1, $t1, 0x8
/* C4304 8012DC04 AD690000 */ sw $t1, 0x0($t3)
/* C4308 8012DC08 AC4F0000 */ sw $t7, 0x0($v0)
/* C430C 8012DC0C AC400004 */ sw $zero, 0x4($v0)
/* C4310 8012DC10 25220008 */ addiu $v0, $t1, 0x8
/* C4314 8012DC14 AD620000 */ sw $v0, 0x0($t3)
/* C4318 8012DC18 25220010 */ addiu $v0, $t1, 0x10
/* C431C 8012DC1C AD230000 */ sw $v1, 0x0($t1)
/* C4320 8012DC20 AD200004 */ sw $zero, 0x4($t1)
/* C4324 8012DC24 AD620000 */ sw $v0, 0x0($t3)
/* C4328 8012DC28 25220018 */ addiu $v0, $t1, 0x18
/* C432C 8012DC2C AD240008 */ sw $a0, 0x8($t1)
/* C4330 8012DC30 AD20000C */ sw $zero, 0xC($t1)
/* C4334 8012DC34 AD620000 */ sw $v0, 0x0($t3)
/* C4338 8012DC38 25220020 */ addiu $v0, $t1, 0x20
/* C433C 8012DC3C AD250010 */ sw $a1, 0x10($t1)
/* C4340 8012DC40 AD200014 */ sw $zero, 0x14($t1)
/* C4344 8012DC44 AD620000 */ sw $v0, 0x0($t3)
/* C4348 8012DC48 25220028 */ addiu $v0, $t1, 0x28
/* C434C 8012DC4C AD260018 */ sw $a2, 0x18($t1)
/* C4350 8012DC50 AD20001C */ sw $zero, 0x1C($t1)
/* C4354 8012DC54 AD620000 */ sw $v0, 0x0($t3)
/* C4358 8012DC58 240200C0 */ addiu $v0, $zero, 0xC0
/* C435C 8012DC5C AD220024 */ sw $v0, 0x24($t1)
/* C4360 8012DC60 25220030 */ addiu $v0, $t1, 0x30
/* C4364 8012DC64 AD270020 */ sw $a3, 0x20($t1)
/* C4368 8012DC68 AD620000 */ sw $v0, 0x0($t3)
/* C436C 8012DC6C 24020030 */ addiu $v0, $zero, 0x30
/* C4370 8012DC70 AD280028 */ sw $t0, 0x28($t1)
/* C4374 8012DC74 25280038 */ addiu $t0, $t1, 0x38
/* C4378 8012DC78 AD22002C */ sw $v0, 0x2C($t1)
/* C437C 8012DC7C AD680000 */ sw $t0, 0x0($t3)
/* C4380 8012DC80 AD380030 */ sw $t8, 0x30($t1)
/* C4384 8012DC84 12600003 */ beqz $s3, .L8012DC94
/* C4388 8012DC88 AD200034 */ sw $zero, 0x34($t1)
/* C438C 8012DC8C 11800168 */ beqz $t4, .L8012E230
/* C4390 8012DC90 2B220020 */ slti $v0, $t9, 0x20
.L8012DC94:
/* C4394 8012DC94 24020005 */ addiu $v0, $zero, 0x5
/* C4398 8012DC98 12420005 */ beq $s2, $v0, .L8012DCB0
/* C439C 8012DC9C 24020006 */ addiu $v0, $zero, 0x6
/* C43A0 8012DCA0 1242005D */ beq $s2, $v0, .L8012DE18
/* C43A4 8012DCA4 2B220020 */ slti $v0, $t9, 0x20
/* C43A8 8012DCA8 0804B88C */ j .L8012E230
/* C43AC 8012DCAC 00000000 */ nop
.L8012DCB0:
/* C43B0 8012DCB0 3C02802F */ lui $v0, %hi(D_802EC3F8)
/* C43B4 8012DCB4 9442C3F8 */ lhu $v0, %lo(D_802EC3F8)($v0)
/* C43B8 8012DCB8 25250040 */ addiu $a1, $t1, 0x40
/* C43BC 8012DCBC AD650000 */ sw $a1, 0x0($t3)
/* C43C0 8012DCC0 AD2F0038 */ sw $t7, 0x38($t1)
/* C43C4 8012DCC4 AD000004 */ sw $zero, 0x4($t0)
/* C43C8 8012DCC8 00021AC2 */ srl $v1, $v0, 11
/* C43CC 8012DCCC 000350C0 */ sll $t2, $v1, 3
/* C43D0 8012DCD0 000218C2 */ srl $v1, $v0, 3
/* C43D4 8012DCD4 306700F8 */ andi $a3, $v1, 0xF8
/* C43D8 8012DCD8 00021080 */ sll $v0, $v0, 2
/* C43DC 8012DCDC 1260000C */ beqz $s3, .L8012DD10
/* C43E0 8012DCE0 304800F8 */ andi $t0, $v0, 0xF8
/* C43E4 8012DCE4 298200FF */ slti $v0, $t4, 0xFF
/* C43E8 8012DCE8 10400009 */ beqz $v0, .L8012DD10
/* C43EC 8012DCEC 3C04E200 */ lui $a0, (0xE200001C >> 16)
/* C43F0 8012DCF0 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF)
/* C43F4 8012DCF4 3C030050 */ lui $v1, (0x504B40 >> 16)
/* C43F8 8012DCF8 34634B40 */ ori $v1, $v1, (0x504B40 & 0xFFFF)
/* C43FC 8012DCFC 25220048 */ addiu $v0, $t1, 0x48
/* C4400 8012DD00 AD620000 */ sw $v0, 0x0($t3)
/* C4404 8012DD04 AD240040 */ sw $a0, 0x40($t1)
/* C4408 8012DD08 0804B750 */ j .L8012DD40
/* C440C 8012DD0C ACA30004 */ sw $v1, 0x4($a1)
.L8012DD10:
/* C4410 8012DD10 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* C4414 8012DD14 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* C4418 8012DD18 3C050F0A */ lui $a1, (0xF0A4000 >> 16)
/* C441C 8012DD1C 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* C4420 8012DD20 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* C4424 8012DD24 8C820000 */ lw $v0, 0x0($a0)
/* C4428 8012DD28 34A54000 */ ori $a1, $a1, (0xF0A4000 & 0xFFFF)
/* C442C 8012DD2C 0040182D */ daddu $v1, $v0, $zero
/* C4430 8012DD30 24420008 */ addiu $v0, $v0, 0x8
/* C4434 8012DD34 AC820000 */ sw $v0, 0x0($a0)
/* C4438 8012DD38 AC660000 */ sw $a2, 0x0($v1)
/* C443C 8012DD3C AC650004 */ sw $a1, 0x4($v1)
.L8012DD40:
/* C4440 8012DD40 3C04FCFF */ lui $a0, (0xFCFFFFFF >> 16)
/* C4444 8012DD44 3484FFFF */ ori $a0, $a0, (0xFCFFFFFF & 0xFFFF)
/* C4448 8012DD48 3C03FFFD */ lui $v1, (0xFFFDF6FB >> 16)
/* C444C 8012DD4C 3C06800A */ lui $a2, %hi(gMainGfxPos)
/* C4450 8012DD50 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos)
/* C4454 8012DD54 8CC50000 */ lw $a1, 0x0($a2)
/* C4458 8012DD58 3463F6FB */ ori $v1, $v1, (0xFFFDF6FB & 0xFFFF)
/* C445C 8012DD5C 00A0102D */ daddu $v0, $a1, $zero
/* C4460 8012DD60 24A50008 */ addiu $a1, $a1, 0x8
/* C4464 8012DD64 ACC50000 */ sw $a1, 0x0($a2)
/* C4468 8012DD68 AC440000 */ sw $a0, 0x0($v0)
/* C446C 8012DD6C AC430004 */ sw $v1, 0x4($v0)
/* C4470 8012DD70 24A20008 */ addiu $v0, $a1, 0x8
/* C4474 8012DD74 ACC20000 */ sw $v0, 0x0($a2)
/* C4478 8012DD78 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* C447C 8012DD7C ACA20000 */ sw $v0, 0x0($a1)
/* C4480 8012DD80 000A1600 */ sll $v0, $t2, 24
/* C4484 8012DD84 00071C00 */ sll $v1, $a3, 16
/* C4488 8012DD88 00431025 */ or $v0, $v0, $v1
/* C448C 8012DD8C 00081A00 */ sll $v1, $t0, 8
/* C4490 8012DD90 00431025 */ or $v0, $v0, $v1
/* C4494 8012DD94 318300FF */ andi $v1, $t4, 0xFF
/* C4498 8012DD98 00431025 */ or $v0, $v0, $v1
/* C449C 8012DD9C ACA20004 */ sw $v0, 0x4($a1)
/* C44A0 8012DDA0 01B91021 */ addu $v0, $t5, $t9
/* C44A4 8012DDA4 2444FFF8 */ addiu $a0, $v0, -0x8
/* C44A8 8012DDA8 18800120 */ blez $a0, .L8012E22C
/* C44AC 8012DDAC 24A20010 */ addiu $v0, $a1, 0x10
/* C44B0 8012DDB0 ACC20000 */ sw $v0, 0x0($a2)
/* C44B4 8012DDB4 01D01021 */ addu $v0, $t6, $s0
/* C44B8 8012DDB8 2443FFF8 */ addiu $v1, $v0, -0x8
/* C44BC 8012DDBC 308203FF */ andi $v0, $a0, 0x3FF
/* C44C0 8012DDC0 04610002 */ bgez $v1, .L8012DDCC
/* C44C4 8012DDC4 00022380 */ sll $a0, $v0, 14
/* C44C8 8012DDC8 0000182D */ daddu $v1, $zero, $zero
.L8012DDCC:
/* C44CC 8012DDCC 306203FF */ andi $v0, $v1, 0x3FF
/* C44D0 8012DDD0 00021080 */ sll $v0, $v0, 2
/* C44D4 8012DDD4 3C03F600 */ lui $v1, (0xF6000000 >> 16)
/* C44D8 8012DDD8 00431025 */ or $v0, $v0, $v1
/* C44DC 8012DDDC 00821025 */ or $v0, $a0, $v0
/* C44E0 8012DDE0 ACA20008 */ sw $v0, 0x8($a1)
/* C44E4 8012DDE4 25A20008 */ addiu $v0, $t5, 0x8
/* C44E8 8012DDE8 04420001 */ bltzl $v0, .L8012DDF0
/* C44EC 8012DDEC 0000102D */ daddu $v0, $zero, $zero
.L8012DDF0:
/* C44F0 8012DDF0 25C30008 */ addiu $v1, $t6, 0x8
/* C44F4 8012DDF4 304203FF */ andi $v0, $v0, 0x3FF
/* C44F8 8012DDF8 04610002 */ bgez $v1, .L8012DE04
/* C44FC 8012DDFC 00022380 */ sll $a0, $v0, 14
/* C4500 8012DE00 0000182D */ daddu $v1, $zero, $zero
.L8012DE04:
/* C4504 8012DE04 306203FF */ andi $v0, $v1, 0x3FF
/* C4508 8012DE08 00021080 */ sll $v0, $v0, 2
/* C450C 8012DE0C 00821025 */ or $v0, $a0, $v0
/* C4510 8012DE10 0804B88B */ j .L8012E22C
/* C4514 8012DE14 ACA2000C */ sw $v0, 0xC($a1)
.L8012DE18:
/* C4518 8012DE18 3C05E200 */ lui $a1, (0xE200001C >> 16)
/* C451C 8012DE1C 34A5001C */ ori $a1, $a1, (0xE200001C & 0xFFFF)
/* C4520 8012DE20 3C030050 */ lui $v1, (0x504240 >> 16)
/* C4524 8012DE24 34634240 */ ori $v1, $v1, (0x504240 & 0xFFFF)
/* C4528 8012DE28 3C06FCFF */ lui $a2, (0xFCFFFFFF >> 16)
/* C452C 8012DE2C 34C6FFFF */ ori $a2, $a2, (0xFCFFFFFF & 0xFFFF)
/* C4530 8012DE30 3C04FFFC */ lui $a0, (0xFFFCF67B >> 16)
/* C4534 8012DE34 3484F67B */ ori $a0, $a0, (0xFFFCF67B & 0xFFFF)
/* C4538 8012DE38 0160502D */ daddu $t2, $t3, $zero
/* C453C 8012DE3C 25270040 */ addiu $a3, $t1, 0x40
/* C4540 8012DE40 25220048 */ addiu $v0, $t1, 0x48
/* C4544 8012DE44 AD470000 */ sw $a3, 0x0($t2)
/* C4548 8012DE48 AD2F0038 */ sw $t7, 0x38($t1)
/* C454C 8012DE4C AD000004 */ sw $zero, 0x4($t0)
/* C4550 8012DE50 AD420000 */ sw $v0, 0x0($t2)
/* C4554 8012DE54 24023000 */ addiu $v0, $zero, 0x3000
/* C4558 8012DE58 AD380040 */ sw $t8, 0x40($t1)
/* C455C 8012DE5C ACE20004 */ sw $v0, 0x4($a3)
/* C4560 8012DE60 25220050 */ addiu $v0, $t1, 0x50
/* C4564 8012DE64 AD420000 */ sw $v0, 0x0($t2)
/* C4568 8012DE68 25220058 */ addiu $v0, $t1, 0x58
/* C456C 8012DE6C ACE50008 */ sw $a1, 0x8($a3)
/* C4570 8012DE70 ACE3000C */ sw $v1, 0xC($a3)
/* C4574 8012DE74 AD420000 */ sw $v0, 0x0($t2)
/* C4578 8012DE78 ACE60010 */ sw $a2, 0x10($a3)
/* C457C 8012DE7C 12600004 */ beqz $s3, .L8012DE90
/* C4580 8012DE80 ACE40014 */ sw $a0, 0x14($a3)
/* C4584 8012DE84 240200FF */ addiu $v0, $zero, 0xFF
/* C4588 8012DE88 55820007 */ bnel $t4, $v0, .L8012DEA8
/* C458C 8012DE8C 298200D9 */ slti $v0, $t4, 0xD9
.L8012DE90:
/* C4590 8012DE90 25220060 */ addiu $v0, $t1, 0x60
/* C4594 8012DE94 AD420000 */ sw $v0, 0x0($t2)
/* C4598 8012DE98 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* C459C 8012DE9C ACE20018 */ sw $v0, 0x18($a3)
/* C45A0 8012DEA0 0804B7B1 */ j .L8012DEC4
/* C45A4 8012DEA4 240200D8 */ addiu $v0, $zero, 0xD8
.L8012DEA8:
/* C45A8 8012DEA8 50400001 */ beql $v0, $zero, .L8012DEB0
/* C45AC 8012DEAC 240C00D8 */ addiu $t4, $zero, 0xD8
.L8012DEB0:
/* C45B0 8012DEB0 25220060 */ addiu $v0, $t1, 0x60
/* C45B4 8012DEB4 AD620000 */ sw $v0, 0x0($t3)
/* C45B8 8012DEB8 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* C45BC 8012DEBC ACE20018 */ sw $v0, 0x18($a3)
/* C45C0 8012DEC0 318200FF */ andi $v0, $t4, 0xFF
.L8012DEC4:
/* C45C4 8012DEC4 ACE2001C */ sw $v0, 0x1C($a3)
/* C45C8 8012DEC8 3C040701 */ lui $a0, (0x7018060 >> 16)
/* C45CC 8012DECC 34848060 */ ori $a0, $a0, (0x7018060 & 0xFFFF)
/* C45D0 8012DED0 3C05073F */ lui $a1, (0x73FF200 >> 16)
/* C45D4 8012DED4 34A5F200 */ ori $a1, $a1, (0x73FF200 & 0xFFFF)
/* C45D8 8012DED8 3C07F580 */ lui $a3, (0xF5800800 >> 16)
/* C45DC 8012DEDC 34E70800 */ ori $a3, $a3, (0xF5800800 & 0xFFFF)
/* C45E0 8012DEE0 3C060001 */ lui $a2, (0x18060 >> 16)
/* C45E4 8012DEE4 34C68060 */ ori $a2, $a2, (0x18060 & 0xFFFF)
/* C45E8 8012DEE8 3C08000F */ lui $t0, (0xFC0FC >> 16)
/* C45EC 8012DEEC 3C0A800A */ lui $t2, %hi(gMainGfxPos)
/* C45F0 8012DEF0 254AA66C */ addiu $t2, $t2, %lo(gMainGfxPos)
/* C45F4 8012DEF4 3508C0FC */ ori $t0, $t0, (0xFC0FC & 0xFFFF)
/* C45F8 8012DEF8 8D490000 */ lw $t1, 0x0($t2)
/* C45FC 8012DEFC 3C02FD90 */ lui $v0, (0xFD900000 >> 16)
/* C4600 8012DF00 0120182D */ daddu $v1, $t1, $zero
/* C4604 8012DF04 25290008 */ addiu $t1, $t1, 0x8
/* C4608 8012DF08 AD490000 */ sw $t1, 0x0($t2)
/* C460C 8012DF0C AC620000 */ sw $v0, 0x0($v1)
/* C4610 8012DF10 3C02802F */ lui $v0, %hi(ui_msg_background_png)
/* C4614 8012DF14 2442CD50 */ addiu $v0, $v0, %lo(ui_msg_background_png)
/* C4618 8012DF18 AC620004 */ sw $v0, 0x4($v1)
/* C461C 8012DF1C 25220008 */ addiu $v0, $t1, 0x8
/* C4620 8012DF20 AD420000 */ sw $v0, 0x0($t2)
/* C4624 8012DF24 3C02F590 */ lui $v0, (0xF5900000 >> 16)
/* C4628 8012DF28 AD220000 */ sw $v0, 0x0($t1)
/* C462C 8012DF2C 25220010 */ addiu $v0, $t1, 0x10
/* C4630 8012DF30 AD240004 */ sw $a0, 0x4($t1)
/* C4634 8012DF34 AD420000 */ sw $v0, 0x0($t2)
/* C4638 8012DF38 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* C463C 8012DF3C AD220008 */ sw $v0, 0x8($t1)
/* C4640 8012DF40 25220018 */ addiu $v0, $t1, 0x18
/* C4644 8012DF44 AD20000C */ sw $zero, 0xC($t1)
/* C4648 8012DF48 AD420000 */ sw $v0, 0x0($t2)
/* C464C 8012DF4C 3C02F300 */ lui $v0, (0xF3000000 >> 16)
/* C4650 8012DF50 AD220010 */ sw $v0, 0x10($t1)
/* C4654 8012DF54 25220020 */ addiu $v0, $t1, 0x20
/* C4658 8012DF58 AD250014 */ sw $a1, 0x14($t1)
/* C465C 8012DF5C AD420000 */ sw $v0, 0x0($t2)
/* C4660 8012DF60 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* C4664 8012DF64 AD220018 */ sw $v0, 0x18($t1)
/* C4668 8012DF68 25220028 */ addiu $v0, $t1, 0x28
/* C466C 8012DF6C 25230030 */ addiu $v1, $t1, 0x30
/* C4670 8012DF70 AD20001C */ sw $zero, 0x1C($t1)
/* C4674 8012DF74 AD420000 */ sw $v0, 0x0($t2)
/* C4678 8012DF78 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* C467C 8012DF7C AD270020 */ sw $a3, 0x20($t1)
/* C4680 8012DF80 AD260024 */ sw $a2, 0x24($t1)
/* C4684 8012DF84 AD430000 */ sw $v1, 0x0($t2)
/* C4688 8012DF88 AD220028 */ sw $v0, 0x28($t1)
/* C468C 8012DF8C 24020006 */ addiu $v0, $zero, 0x6
/* C4690 8012DF90 1642004C */ bne $s2, $v0, .L8012E0C4
/* C4694 8012DF94 AD28002C */ sw $t0, 0x2C($t1)
/* C4698 8012DF98 25220038 */ addiu $v0, $t1, 0x38
/* C469C 8012DF9C AD420000 */ sw $v0, 0x0($t2)
/* C46A0 8012DFA0 01B91021 */ addu $v0, $t5, $t9
/* C46A4 8012DFA4 2442FFFD */ addiu $v0, $v0, -0x3
/* C46A8 8012DFA8 00021480 */ sll $v0, $v0, 18
/* C46AC 8012DFAC 00021403 */ sra $v0, $v0, 16
/* C46B0 8012DFB0 18400006 */ blez $v0, .L8012DFCC
/* C46B4 8012DFB4 0060202D */ daddu $a0, $v1, $zero
/* C46B8 8012DFB8 30420FFF */ andi $v0, $v0, 0xFFF
/* C46BC 8012DFBC 00021300 */ sll $v0, $v0, 12
/* C46C0 8012DFC0 3C03E400 */ lui $v1, (0xE4000000 >> 16)
/* C46C4 8012DFC4 0804B7F4 */ j .L8012DFD0
/* C46C8 8012DFC8 00431825 */ or $v1, $v0, $v1
.L8012DFCC:
/* C46CC 8012DFCC 3C03E400 */ lui $v1, (0xE4000000 >> 16)
.L8012DFD0:
/* C46D0 8012DFD0 01D01021 */ addu $v0, $t6, $s0
/* C46D4 8012DFD4 2442FFFD */ addiu $v0, $v0, -0x3
/* C46D8 8012DFD8 00021480 */ sll $v0, $v0, 18
/* C46DC 8012DFDC 00021403 */ sra $v0, $v0, 16
/* C46E0 8012DFE0 18400004 */ blez $v0, .L8012DFF4
/* C46E4 8012DFE4 AC830000 */ sw $v1, 0x0($a0)
glabel func_8012DFE8
/* C46E8 8012DFE8 30420FFF */ andi $v0, $v0, 0xFFF
/* C46EC 8012DFEC 00621025 */ or $v0, $v1, $v0
/* C46F0 8012DFF0 AC820000 */ sw $v0, 0x0($a0)
.L8012DFF4:
/* C46F4 8012DFF4 25A20003 */ addiu $v0, $t5, 0x3
/* C46F8 8012DFF8 00021480 */ sll $v0, $v0, 18
/* C46FC 8012DFFC 00021403 */ sra $v0, $v0, 16
/* C4700 8012E000 18400004 */ blez $v0, .L8012E014
/* C4704 8012E004 24840004 */ addiu $a0, $a0, 0x4
/* C4708 8012E008 30420FFF */ andi $v0, $v0, 0xFFF
/* C470C 8012E00C 0804B806 */ j .L8012E018
/* C4710 8012E010 00021B00 */ sll $v1, $v0, 12
.L8012E014:
/* C4714 8012E014 0000182D */ daddu $v1, $zero, $zero
.L8012E018:
/* C4718 8012E018 25C20003 */ addiu $v0, $t6, 0x3
/* C471C 8012E01C 00021480 */ sll $v0, $v0, 18
/* C4720 8012E020 00021403 */ sra $v0, $v0, 16
/* C4724 8012E024 18400004 */ blez $v0, .L8012E038
/* C4728 8012E028 AC830000 */ sw $v1, 0x0($a0)
/* C472C 8012E02C 30420FFF */ andi $v0, $v0, 0xFFF
/* C4730 8012E030 00621025 */ or $v0, $v1, $v0
/* C4734 8012E034 AC820000 */ sw $v0, 0x0($a0)
.L8012E038:
/* C4738 8012E038 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* C473C 8012E03C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* C4740 8012E040 8C620000 */ lw $v0, 0x0($v1)
/* C4744 8012E044 0040202D */ daddu $a0, $v0, $zero
/* C4748 8012E048 24420008 */ addiu $v0, $v0, 0x8
/* C474C 8012E04C AC620000 */ sw $v0, 0x0($v1)
/* C4750 8012E050 3C02E100 */ lui $v0, (0xE1000000 >> 16)
/* C4754 8012E054 AC820000 */ sw $v0, 0x0($a0)
/* C4758 8012E058 25A20003 */ addiu $v0, $t5, 0x3
/* C475C 8012E05C 00021480 */ sll $v0, $v0, 18
/* C4760 8012E060 00021403 */ sra $v0, $v0, 16
/* C4764 8012E064 04410008 */ bgez $v0, .L8012E088
/* C4768 8012E068 24840004 */ addiu $a0, $a0, 0x4
/* C476C 8012E06C 000218C0 */ sll $v1, $v0, 3
/* C4770 8012E070 5C600001 */ bgtzl $v1, .L8012E078
/* C4774 8012E074 0000182D */ daddu $v1, $zero, $zero
.L8012E078:
/* C4778 8012E078 3C028015 */ lui $v0, %hi(gMsgBGScrollAmtX)
/* C477C 8012E07C 8C4212D8 */ lw $v0, %lo(gMsgBGScrollAmtX)($v0)
/* C4780 8012E080 0804B824 */ j .L8012E090
/* C4784 8012E084 00431023 */ subu $v0, $v0, $v1
.L8012E088:
/* C4788 8012E088 3C028015 */ lui $v0, %hi(D_801512DA)
/* C478C 8012E08C 944212DA */ lhu $v0, %lo(D_801512DA)($v0)
.L8012E090:
/* C4790 8012E090 00022C00 */ sll $a1, $v0, 16
/* C4794 8012E094 25C30003 */ addiu $v1, $t6, 0x3
/* C4798 8012E098 00031080 */ sll $v0, $v1, 2
/* C479C 8012E09C 04410054 */ bgez $v0, .L8012E1F0
/* C47A0 8012E0A0 00031480 */ sll $v0, $v1, 18
/* C47A4 8012E0A4 00021B43 */ sra $v1, $v0, 13
/* C47A8 8012E0A8 5C600001 */ bgtzl $v1, .L8012E0B0
/* C47AC 8012E0AC 0000182D */ daddu $v1, $zero, $zero
.L8012E0B0:
/* C47B0 8012E0B0 3C028015 */ lui $v0, %hi(gMsgBGScrollAmtY)
/* C47B4 8012E0B4 8C42130C */ lw $v0, %lo(gMsgBGScrollAmtY)($v0)
/* C47B8 8012E0B8 00431023 */ subu $v0, $v0, $v1
/* C47BC 8012E0BC 0804B87E */ j .L8012E1F8
/* C47C0 8012E0C0 3042FFFF */ andi $v0, $v0, 0xFFFF
.L8012E0C4:
/* C47C4 8012E0C4 25220038 */ addiu $v0, $t1, 0x38
/* C47C8 8012E0C8 AD420000 */ sw $v0, 0x0($t2)
/* C47CC 8012E0CC 01B91021 */ addu $v0, $t5, $t9
/* C47D0 8012E0D0 2442FFFB */ addiu $v0, $v0, -0x5
/* C47D4 8012E0D4 00021480 */ sll $v0, $v0, 18
/* C47D8 8012E0D8 00021403 */ sra $v0, $v0, 16
/* C47DC 8012E0DC 18400006 */ blez $v0, .L8012E0F8
/* C47E0 8012E0E0 0060202D */ daddu $a0, $v1, $zero
/* C47E4 8012E0E4 30420FFF */ andi $v0, $v0, 0xFFF
/* C47E8 8012E0E8 00021300 */ sll $v0, $v0, 12
/* C47EC 8012E0EC 3C03E400 */ lui $v1, (0xE4000000 >> 16)
/* C47F0 8012E0F0 0804B83F */ j .L8012E0FC
/* C47F4 8012E0F4 00431825 */ or $v1, $v0, $v1
.L8012E0F8:
/* C47F8 8012E0F8 3C03E400 */ lui $v1, (0xE4000000 >> 16)
.L8012E0FC:
/* C47FC 8012E0FC 01D01021 */ addu $v0, $t6, $s0
/* C4800 8012E100 2442FFFB */ addiu $v0, $v0, -0x5
/* C4804 8012E104 00021480 */ sll $v0, $v0, 18
/* C4808 8012E108 00021403 */ sra $v0, $v0, 16
/* C480C 8012E10C 18400004 */ blez $v0, .L8012E120
/* C4810 8012E110 AC830000 */ sw $v1, 0x0($a0)
/* C4814 8012E114 30420FFF */ andi $v0, $v0, 0xFFF
/* C4818 8012E118 00621025 */ or $v0, $v1, $v0
/* C481C 8012E11C AC820000 */ sw $v0, 0x0($a0)
.L8012E120:
/* C4820 8012E120 25A20005 */ addiu $v0, $t5, 0x5
/* C4824 8012E124 00021480 */ sll $v0, $v0, 18
/* C4828 8012E128 00021403 */ sra $v0, $v0, 16
/* C482C 8012E12C 18400004 */ blez $v0, .L8012E140
/* C4830 8012E130 24840004 */ addiu $a0, $a0, 0x4
/* C4834 8012E134 30420FFF */ andi $v0, $v0, 0xFFF
/* C4838 8012E138 0804B851 */ j .L8012E144
/* C483C 8012E13C 00021B00 */ sll $v1, $v0, 12
.L8012E140:
/* C4840 8012E140 0000182D */ daddu $v1, $zero, $zero
.L8012E144:
/* C4844 8012E144 25C20005 */ addiu $v0, $t6, 0x5
/* C4848 8012E148 00021480 */ sll $v0, $v0, 18
/* C484C 8012E14C 00021403 */ sra $v0, $v0, 16
/* C4850 8012E150 18400004 */ blez $v0, .L8012E164
/* C4854 8012E154 AC830000 */ sw $v1, 0x0($a0)
/* C4858 8012E158 30420FFF */ andi $v0, $v0, 0xFFF
/* C485C 8012E15C 00621025 */ or $v0, $v1, $v0
/* C4860 8012E160 AC820000 */ sw $v0, 0x0($a0)
.L8012E164:
/* C4864 8012E164 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* C4868 8012E168 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* C486C 8012E16C 8C620000 */ lw $v0, 0x0($v1)
/* C4870 8012E170 0040202D */ daddu $a0, $v0, $zero
/* C4874 8012E174 24420008 */ addiu $v0, $v0, 0x8
/* C4878 8012E178 AC620000 */ sw $v0, 0x0($v1)
/* C487C 8012E17C 3C02E100 */ lui $v0, (0xE1000000 >> 16)
/* C4880 8012E180 AC820000 */ sw $v0, 0x0($a0)
/* C4884 8012E184 25A20005 */ addiu $v0, $t5, 0x5
/* C4888 8012E188 00021480 */ sll $v0, $v0, 18
/* C488C 8012E18C 00021403 */ sra $v0, $v0, 16
/* C4890 8012E190 04410008 */ bgez $v0, .L8012E1B4
/* C4894 8012E194 24840004 */ addiu $a0, $a0, 0x4
/* C4898 8012E198 000218C0 */ sll $v1, $v0, 3
/* C489C 8012E19C 5C600001 */ bgtzl $v1, .L8012E1A4
/* C48A0 8012E1A0 0000182D */ daddu $v1, $zero, $zero
.L8012E1A4:
/* C48A4 8012E1A4 3C028015 */ lui $v0, %hi(gMsgBGScrollAmtX)
/* C48A8 8012E1A8 8C4212D8 */ lw $v0, %lo(gMsgBGScrollAmtX)($v0)
/* C48AC 8012E1AC 0804B86F */ j .L8012E1BC
/* C48B0 8012E1B0 00431023 */ subu $v0, $v0, $v1
.L8012E1B4:
/* C48B4 8012E1B4 3C028015 */ lui $v0, %hi(D_801512DA)
/* C48B8 8012E1B8 944212DA */ lhu $v0, %lo(D_801512DA)($v0)
.L8012E1BC:
/* C48BC 8012E1BC 00022C00 */ sll $a1, $v0, 16
/* C48C0 8012E1C0 25C30005 */ addiu $v1, $t6, 0x5
/* C48C4 8012E1C4 00031080 */ sll $v0, $v1, 2
/* C48C8 8012E1C8 04410009 */ bgez $v0, .L8012E1F0
/* C48CC 8012E1CC 00031480 */ sll $v0, $v1, 18
/* C48D0 8012E1D0 00021B43 */ sra $v1, $v0, 13
/* C48D4 8012E1D4 5C600001 */ bgtzl $v1, .L8012E1DC
/* C48D8 8012E1D8 0000182D */ daddu $v1, $zero, $zero
.L8012E1DC:
/* C48DC 8012E1DC 3C028015 */ lui $v0, %hi(gMsgBGScrollAmtY)
/* C48E0 8012E1E0 8C42130C */ lw $v0, %lo(gMsgBGScrollAmtY)($v0)
/* C48E4 8012E1E4 00431023 */ subu $v0, $v0, $v1
/* C48E8 8012E1E8 0804B87E */ j .L8012E1F8
/* C48EC 8012E1EC 3042FFFF */ andi $v0, $v0, 0xFFFF
.L8012E1F0:
/* C48F0 8012E1F0 3C028015 */ lui $v0, %hi(D_8015130E)
/* C48F4 8012E1F4 9442130E */ lhu $v0, %lo(D_8015130E)($v0)
.L8012E1F8:
/* C48F8 8012E1F8 00A21025 */ or $v0, $a1, $v0
/* C48FC 8012E1FC AC820000 */ sw $v0, 0x0($a0)
/* C4900 8012E200 3C050400 */ lui $a1, (0x4000400 >> 16)
/* C4904 8012E204 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* C4908 8012E208 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* C490C 8012E20C 8C620000 */ lw $v0, 0x0($v1)
/* C4910 8012E210 34A50400 */ ori $a1, $a1, (0x4000400 & 0xFFFF)
/* C4914 8012E214 0040202D */ daddu $a0, $v0, $zero
/* C4918 8012E218 24420008 */ addiu $v0, $v0, 0x8
/* C491C 8012E21C AC620000 */ sw $v0, 0x0($v1)
/* C4920 8012E220 3C02F100 */ lui $v0, (0xF1000000 >> 16)
/* C4924 8012E224 AC820000 */ sw $v0, 0x0($a0)
/* C4928 8012E228 AC850004 */ sw $a1, 0x4($a0)
.L8012E22C:
/* C492C 8012E22C 2B220020 */ slti $v0, $t9, 0x20
.L8012E230:
/* C4930 8012E230 14400007 */ bnez $v0, .L8012E250
/* C4934 8012E234 2722FFEF */ addiu $v0, $t9, -0x11
/* C4938 8012E238 25A30010 */ addiu $v1, $t5, 0x10
/* C493C 8012E23C 00031880 */ sll $v1, $v1, 2
/* C4940 8012E240 000E1080 */ sll $v0, $t6, 2
/* C4944 8012E244 01B92021 */ addu $a0, $t5, $t9
/* C4948 8012E248 0804B89B */ j .L8012E26C
/* C494C 8012E24C 2484FFF0 */ addiu $a0, $a0, -0x10
.L8012E250:
/* C4950 8012E250 2C420007 */ sltiu $v0, $v0, 0x7
/* C4954 8012E254 10400015 */ beqz $v0, .L8012E2AC
/* C4958 8012E258 25A30008 */ addiu $v1, $t5, 0x8
/* C495C 8012E25C 00031880 */ sll $v1, $v1, 2
/* C4960 8012E260 000E1080 */ sll $v0, $t6, 2
/* C4964 8012E264 01B92021 */ addu $a0, $t5, $t9
/* C4968 8012E268 2484FFF8 */ addiu $a0, $a0, -0x8
.L8012E26C:
/* C496C 8012E26C 00042080 */ sll $a0, $a0, 2
/* C4970 8012E270 AFA20064 */ sw $v0, 0x64($sp)
/* C4974 8012E274 25C20008 */ addiu $v0, $t6, 0x8
/* C4978 8012E278 00021080 */ sll $v0, $v0, 2
/* C497C 8012E27C AFA30060 */ sw $v1, 0x60($sp)
/* C4980 8012E280 AFA30110 */ sw $v1, 0x110($sp)
/* C4984 8012E284 01D01821 */ addu $v1, $t6, $s0
/* C4988 8012E288 AFA2006C */ sw $v0, 0x6C($sp)
/* C498C 8012E28C 2462FFF8 */ addiu $v0, $v1, -0x8
/* C4990 8012E290 00021080 */ sll $v0, $v0, 2
/* C4994 8012E294 00031880 */ sll $v1, $v1, 2
/* C4998 8012E298 AFA40068 */ sw $a0, 0x68($sp)
/* C499C 8012E29C AFA20114 */ sw $v0, 0x114($sp)
/* C49A0 8012E2A0 AFA40118 */ sw $a0, 0x118($sp)
/* C49A4 8012E2A4 0804B8AE */ j .L8012E2B8
/* C49A8 8012E2A8 AFA3011C */ sw $v1, 0x11C($sp)
.L8012E2AC:
/* C49AC 8012E2AC 24022710 */ addiu $v0, $zero, 0x2710
/* C49B0 8012E2B0 AFA20060 */ sw $v0, 0x60($sp)
/* C49B4 8012E2B4 AFA20110 */ sw $v0, 0x110($sp)
.L8012E2B8:
/* C49B8 8012E2B8 2A020020 */ slti $v0, $s0, 0x20
/* C49BC 8012E2BC 1440000A */ bnez $v0, .L8012E2E8
/* C49C0 8012E2C0 2602FFEF */ addiu $v0, $s0, -0x11
/* C49C4 8012E2C4 000D1080 */ sll $v0, $t5, 2
/* C49C8 8012E2C8 25C50010 */ addiu $a1, $t6, 0x10
/* C49CC 8012E2CC 00052880 */ sll $a1, $a1, 2
/* C49D0 8012E2D0 AFA200B0 */ sw $v0, 0xB0($sp)
/* C49D4 8012E2D4 25A20008 */ addiu $v0, $t5, 0x8
/* C49D8 8012E2D8 00021080 */ sll $v0, $v0, 2
/* C49DC 8012E2DC 01D02021 */ addu $a0, $t6, $s0
/* C49E0 8012E2E0 0804B8C4 */ j .L8012E310
/* C49E4 8012E2E4 2484FFF0 */ addiu $a0, $a0, -0x10
.L8012E2E8:
/* C49E8 8012E2E8 2C420007 */ sltiu $v0, $v0, 0x7
/* C49EC 8012E2EC 10400015 */ beqz $v0, .L8012E344
/* C49F0 8012E2F0 000D1080 */ sll $v0, $t5, 2
/* C49F4 8012E2F4 25C50008 */ addiu $a1, $t6, 0x8
/* C49F8 8012E2F8 00052880 */ sll $a1, $a1, 2
/* C49FC 8012E2FC AFA200B0 */ sw $v0, 0xB0($sp)
/* C4A00 8012E300 25A20008 */ addiu $v0, $t5, 0x8
/* C4A04 8012E304 00021080 */ sll $v0, $v0, 2
/* C4A08 8012E308 01D02021 */ addu $a0, $t6, $s0
/* C4A0C 8012E30C 2484FFF8 */ addiu $a0, $a0, -0x8
.L8012E310:
/* C4A10 8012E310 00042080 */ sll $a0, $a0, 2
/* C4A14 8012E314 01B91821 */ addu $v1, $t5, $t9
/* C4A18 8012E318 AFA200B8 */ sw $v0, 0xB8($sp)
/* C4A1C 8012E31C 2462FFF8 */ addiu $v0, $v1, -0x8
/* C4A20 8012E320 00021080 */ sll $v0, $v0, 2
/* C4A24 8012E324 00031880 */ sll $v1, $v1, 2
/* C4A28 8012E328 AFA500B4 */ sw $a1, 0xB4($sp)
/* C4A2C 8012E32C AFA400BC */ sw $a0, 0xBC($sp)
/* C4A30 8012E330 AFA200C0 */ sw $v0, 0xC0($sp)
/* C4A34 8012E334 AFA500C4 */ sw $a1, 0xC4($sp)
/* C4A38 8012E338 AFA300C8 */ sw $v1, 0xC8($sp)
/* C4A3C 8012E33C 0804B8D4 */ j .L8012E350
/* C4A40 8012E340 AFA400CC */ sw $a0, 0xCC($sp)
.L8012E344:
/* C4A44 8012E344 24022710 */ addiu $v0, $zero, 0x2710
/* C4A48 8012E348 AFA200B0 */ sw $v0, 0xB0($sp)
/* C4A4C 8012E34C AFA200C0 */ sw $v0, 0xC0($sp)
.L8012E350:
/* C4A50 8012E350 2B220018 */ slti $v0, $t9, 0x18
/* C4A54 8012E354 14400022 */ bnez $v0, .L8012E3E0
/* C4A58 8012E358 24022710 */ addiu $v0, $zero, 0x2710
/* C4A5C 8012E35C 25A40008 */ addiu $a0, $t5, 0x8
/* C4A60 8012E360 00042080 */ sll $a0, $a0, 2
/* C4A64 8012E364 000E3880 */ sll $a3, $t6, 2
/* C4A68 8012E368 25A60010 */ addiu $a2, $t5, 0x10
/* C4A6C 8012E36C 00063080 */ sll $a2, $a2, 2
/* C4A70 8012E370 25C20008 */ addiu $v0, $t6, 0x8
/* C4A74 8012E374 00021080 */ sll $v0, $v0, 2
/* C4A78 8012E378 01B91821 */ addu $v1, $t5, $t9
/* C4A7C 8012E37C 2465FFF0 */ addiu $a1, $v1, -0x10
/* C4A80 8012E380 00052880 */ sll $a1, $a1, 2
/* C4A84 8012E384 2463FFF8 */ addiu $v1, $v1, -0x8
/* C4A88 8012E388 00031880 */ sll $v1, $v1, 2
/* C4A8C 8012E38C AFA40050 */ sw $a0, 0x50($sp)
/* C4A90 8012E390 AFA40100 */ sw $a0, 0x100($sp)
/* C4A94 8012E394 01D02021 */ addu $a0, $t6, $s0
/* C4A98 8012E398 AFA2005C */ sw $v0, 0x5C($sp)
/* C4A9C 8012E39C AFA2007C */ sw $v0, 0x7C($sp)
/* C4AA0 8012E3A0 2482FFF8 */ addiu $v0, $a0, -0x8
/* C4AA4 8012E3A4 00021080 */ sll $v0, $v0, 2
/* C4AA8 8012E3A8 00042080 */ sll $a0, $a0, 2
/* C4AAC 8012E3AC AFA70054 */ sw $a3, 0x54($sp)
/* C4AB0 8012E3B0 AFA60058 */ sw $a2, 0x58($sp)
/* C4AB4 8012E3B4 AFA50070 */ sw $a1, 0x70($sp)
/* C4AB8 8012E3B8 AFA70074 */ sw $a3, 0x74($sp)
/* C4ABC 8012E3BC AFA30078 */ sw $v1, 0x78($sp)
/* C4AC0 8012E3C0 AFA20104 */ sw $v0, 0x104($sp)
/* C4AC4 8012E3C4 AFA60108 */ sw $a2, 0x108($sp)
/* C4AC8 8012E3C8 AFA4010C */ sw $a0, 0x10C($sp)
/* C4ACC 8012E3CC AFA50120 */ sw $a1, 0x120($sp)
/* C4AD0 8012E3D0 AFA20124 */ sw $v0, 0x124($sp)
/* C4AD4 8012E3D4 AFA30128 */ sw $v1, 0x128($sp)
/* C4AD8 8012E3D8 0804B8FC */ j .L8012E3F0
/* C4ADC 8012E3DC AFA4012C */ sw $a0, 0x12C($sp)
.L8012E3E0:
/* C4AE0 8012E3E0 AFA20050 */ sw $v0, 0x50($sp)
/* C4AE4 8012E3E4 AFA20070 */ sw $v0, 0x70($sp)
/* C4AE8 8012E3E8 AFA20100 */ sw $v0, 0x100($sp)
/* C4AEC 8012E3EC AFA20120 */ sw $v0, 0x120($sp)
.L8012E3F0:
/* C4AF0 8012E3F0 2A020018 */ slti $v0, $s0, 0x18
/* C4AF4 8012E3F4 14400022 */ bnez $v0, .L8012E480
/* C4AF8 8012E3F8 24022710 */ addiu $v0, $zero, 0x2710
/* C4AFC 8012E3FC 000D3880 */ sll $a3, $t5, 2
/* C4B00 8012E400 25C30008 */ addiu $v1, $t6, 0x8
/* C4B04 8012E404 00031880 */ sll $v1, $v1, 2
/* C4B08 8012E408 25A60008 */ addiu $a2, $t5, 0x8
/* C4B0C 8012E40C 00063080 */ sll $a2, $a2, 2
/* C4B10 8012E410 25C20010 */ addiu $v0, $t6, 0x10
/* C4B14 8012E414 00021080 */ sll $v0, $v0, 2
/* C4B18 8012E418 01B92021 */ addu $a0, $t5, $t9
/* C4B1C 8012E41C 2485FFF8 */ addiu $a1, $a0, -0x8
/* C4B20 8012E420 00052880 */ sll $a1, $a1, 2
/* C4B24 8012E424 00042080 */ sll $a0, $a0, 2
/* C4B28 8012E428 AFA2009C */ sw $v0, 0x9C($sp)
/* C4B2C 8012E42C AFA200AC */ sw $v0, 0xAC($sp)
/* C4B30 8012E430 01D01021 */ addu $v0, $t6, $s0
/* C4B34 8012E434 AFA30094 */ sw $v1, 0x94($sp)
/* C4B38 8012E438 AFA300A4 */ sw $v1, 0xA4($sp)
/* C4B3C 8012E43C 2443FFF0 */ addiu $v1, $v0, -0x10
/* C4B40 8012E440 00031880 */ sll $v1, $v1, 2
/* C4B44 8012E444 2442FFF8 */ addiu $v0, $v0, -0x8
/* C4B48 8012E448 00021080 */ sll $v0, $v0, 2
/* C4B4C 8012E44C AFA70090 */ sw $a3, 0x90($sp)
/* C4B50 8012E450 AFA60098 */ sw $a2, 0x98($sp)
/* C4B54 8012E454 AFA500A0 */ sw $a1, 0xA0($sp)
/* C4B58 8012E458 AFA400A8 */ sw $a0, 0xA8($sp)
/* C4B5C 8012E45C AFA700D0 */ sw $a3, 0xD0($sp)
/* C4B60 8012E460 AFA300D4 */ sw $v1, 0xD4($sp)
/* C4B64 8012E464 AFA600D8 */ sw $a2, 0xD8($sp)
/* C4B68 8012E468 AFA200DC */ sw $v0, 0xDC($sp)
/* C4B6C 8012E46C AFA500E0 */ sw $a1, 0xE0($sp)
/* C4B70 8012E470 AFA300E4 */ sw $v1, 0xE4($sp)
/* C4B74 8012E474 AFA400E8 */ sw $a0, 0xE8($sp)
/* C4B78 8012E478 0804B925 */ j .L8012E494
/* C4B7C 8012E47C AFA200EC */ sw $v0, 0xEC($sp)
.L8012E480:
/* C4B80 8012E480 AFA20090 */ sw $v0, 0x90($sp)
/* C4B84 8012E484 AFA200A0 */ sw $v0, 0xA0($sp)
/* C4B88 8012E488 AFA200D0 */ sw $v0, 0xD0($sp)
/* C4B8C 8012E48C AFA200E0 */ sw $v0, 0xE0($sp)
/* C4B90 8012E490 000D3880 */ sll $a3, $t5, 2
.L8012E494:
/* C4B94 8012E494 000E1880 */ sll $v1, $t6, 2
/* C4B98 8012E498 25A60008 */ addiu $a2, $t5, 0x8
/* C4B9C 8012E49C 00063080 */ sll $a2, $a2, 2
/* C4BA0 8012E4A0 25C20008 */ addiu $v0, $t6, 0x8
/* C4BA4 8012E4A4 00021080 */ sll $v0, $v0, 2
/* C4BA8 8012E4A8 01B92021 */ addu $a0, $t5, $t9
/* C4BAC 8012E4AC 2485FFF8 */ addiu $a1, $a0, -0x8
/* C4BB0 8012E4B0 00052880 */ sll $a1, $a1, 2
/* C4BB4 8012E4B4 00042080 */ sll $a0, $a0, 2
/* C4BB8 8012E4B8 AFA30044 */ sw $v1, 0x44($sp)
/* C4BBC 8012E4BC AFA30084 */ sw $v1, 0x84($sp)
/* C4BC0 8012E4C0 01D01821 */ addu $v1, $t6, $s0
/* C4BC4 8012E4C4 AFA2004C */ sw $v0, 0x4C($sp)
/* C4BC8 8012E4C8 AFA2008C */ sw $v0, 0x8C($sp)
/* C4BCC 8012E4CC 2462FFF8 */ addiu $v0, $v1, -0x8
/* C4BD0 8012E4D0 00021080 */ sll $v0, $v0, 2
/* C4BD4 8012E4D4 00031880 */ sll $v1, $v1, 2
/* C4BD8 8012E4D8 AFA200F4 */ sw $v0, 0xF4($sp)
/* C4BDC 8012E4DC AFA20134 */ sw $v0, 0x134($sp)
/* C4BE0 8012E4E0 24020005 */ addiu $v0, $zero, 0x5
/* C4BE4 8012E4E4 AFA70040 */ sw $a3, 0x40($sp)
/* C4BE8 8012E4E8 AFA60048 */ sw $a2, 0x48($sp)
/* C4BEC 8012E4EC AFA50080 */ sw $a1, 0x80($sp)
/* C4BF0 8012E4F0 AFA40088 */ sw $a0, 0x88($sp)
/* C4BF4 8012E4F4 AFA700F0 */ sw $a3, 0xF0($sp)
/* C4BF8 8012E4F8 AFA600F8 */ sw $a2, 0xF8($sp)
/* C4BFC 8012E4FC AFA300FC */ sw $v1, 0xFC($sp)
/* C4C00 8012E500 AFA50130 */ sw $a1, 0x130($sp)
/* C4C04 8012E504 AFA40138 */ sw $a0, 0x138($sp)
/* C4C08 8012E508 12420006 */ beq $s2, $v0, .L8012E524
/* C4C0C 8012E50C AFA3013C */ sw $v1, 0x13C($sp)
/* C4C10 8012E510 24020006 */ addiu $v0, $zero, 0x6
/* C4C14 8012E514 16420004 */ bne $s2, $v0, .L8012E528
/* C4C18 8012E518 0000102D */ daddu $v0, $zero, $zero
/* C4C1C 8012E51C 0804B94A */ j .L8012E528
/* C4C20 8012E520 24020001 */ addiu $v0, $zero, 0x1
.L8012E524:
/* C4C24 8012E524 0000102D */ daddu $v0, $zero, $zero
.L8012E528:
/* C4C28 8012E528 0000702D */ daddu $t6, $zero, $zero
/* C4C2C 8012E52C 3C058009 */ lui $a1, %hi(gMessageBoxFrameParts)
/* C4C30 8012E530 24A5FEE0 */ addiu $a1, $a1, %lo(gMessageBoxFrameParts)
/* C4C34 8012E534 03A0202D */ daddu $a0, $sp, $zero
/* C4C38 8012E538 00021980 */ sll $v1, $v0, 6
.L8012E53C:
/* C4C3C 8012E53C 00651021 */ addu $v0, $v1, $a1
/* C4C40 8012E540 24630004 */ addiu $v1, $v1, 0x4
/* C4C44 8012E544 8C420000 */ lw $v0, 0x0($v0)
/* C4C48 8012E548 25CE0001 */ addiu $t6, $t6, 0x1
/* C4C4C 8012E54C AC820000 */ sw $v0, 0x0($a0)
/* C4C50 8012E550 29C20010 */ slti $v0, $t6, 0x10
/* C4C54 8012E554 1440FFF9 */ bnez $v0, .L8012E53C
/* C4C58 8012E558 24840004 */ addiu $a0, $a0, 0x4
/* C4C5C 8012E55C 52600001 */ beql $s3, $zero, .L8012E564
/* C4C60 8012E560 241100FF */ addiu $s1, $zero, 0xFF
.L8012E564:
/* C4C64 8012E564 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* C4C68 8012E568 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* C4C6C 8012E56C 3C040050 */ lui $a0, (0x504240 >> 16)
/* C4C70 8012E570 34844240 */ ori $a0, $a0, (0x504240 & 0xFFFF)
/* C4C74 8012E574 3C07FCFF */ lui $a3, (0xFCFF97FF >> 16)
/* C4C78 8012E578 34E797FF */ ori $a3, $a3, (0xFCFF97FF & 0xFFFF)
/* C4C7C 8012E57C 3C05FF2C */ lui $a1, (0xFF2CFE7F >> 16)
/* C4C80 8012E580 34A5FE7F */ ori $a1, $a1, (0xFF2CFE7F & 0xFFFF)
/* C4C84 8012E584 3C08E300 */ lui $t0, (0xE3001001 >> 16)
/* C4C88 8012E588 35081001 */ ori $t0, $t0, (0xE3001001 & 0xFFFF)
/* C4C8C 8012E58C 3C0AF500 */ lui $t2, (0xF5000100 >> 16)
/* C4C90 8012E590 354A0100 */ ori $t2, $t2, (0xF5000100 & 0xFFFF)
/* C4C94 8012E594 3C0B0703 */ lui $t3, (0x703C000 >> 16)
/* C4C98 8012E598 356BC000 */ ori $t3, $t3, (0x703C000 & 0xFFFF)
/* C4C9C 8012E59C 0000702D */ daddu $t6, $zero, $zero
/* C4CA0 8012E5A0 3C02800A */ lui $v0, %hi(gMainGfxPos)
/* C4CA4 8012E5A4 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos)
/* C4CA8 8012E5A8 0040602D */ daddu $t4, $v0, $zero
/* C4CAC 8012E5AC 27AD0040 */ addiu $t5, $sp, 0x40
/* C4CB0 8012E5B0 03A0782D */ daddu $t7, $sp, $zero
/* C4CB4 8012E5B4 8D830000 */ lw $v1, 0x0($t4)
/* C4CB8 8012E5B8 3C09E700 */ lui $t1, (0xE7000000 >> 16)
/* C4CBC 8012E5BC 0060102D */ daddu $v0, $v1, $zero
/* C4CC0 8012E5C0 24630008 */ addiu $v1, $v1, 0x8
/* C4CC4 8012E5C4 AD830000 */ sw $v1, 0x0($t4)
/* C4CC8 8012E5C8 AC490000 */ sw $t1, 0x0($v0)
/* C4CCC 8012E5CC AC400004 */ sw $zero, 0x4($v0)
/* C4CD0 8012E5D0 24620008 */ addiu $v0, $v1, 0x8
/* C4CD4 8012E5D4 AD820000 */ sw $v0, 0x0($t4)
/* C4CD8 8012E5D8 24620010 */ addiu $v0, $v1, 0x10
/* C4CDC 8012E5DC AC660000 */ sw $a2, 0x0($v1)
/* C4CE0 8012E5E0 AC640004 */ sw $a0, 0x4($v1)
/* C4CE4 8012E5E4 AD820000 */ sw $v0, 0x0($t4)
/* C4CE8 8012E5E8 24620018 */ addiu $v0, $v1, 0x18
/* C4CEC 8012E5EC AC670008 */ sw $a3, 0x8($v1)
/* C4CF0 8012E5F0 AC65000C */ sw $a1, 0xC($v1)
/* C4CF4 8012E5F4 AD820000 */ sw $v0, 0x0($t4)
/* C4CF8 8012E5F8 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* C4CFC 8012E5FC AC620010 */ sw $v0, 0x10($v1)
/* C4D00 8012E600 322200FF */ andi $v0, $s1, 0xFF
/* C4D04 8012E604 AC620014 */ sw $v0, 0x14($v1)
/* C4D08 8012E608 24620020 */ addiu $v0, $v1, 0x20
/* C4D0C 8012E60C AD820000 */ sw $v0, 0x0($t4)
/* C4D10 8012E610 34028000 */ ori $v0, $zero, 0x8000
/* C4D14 8012E614 AC62001C */ sw $v0, 0x1C($v1)
/* C4D18 8012E618 24620028 */ addiu $v0, $v1, 0x28
/* C4D1C 8012E61C AC680018 */ sw $t0, 0x18($v1)
/* C4D20 8012E620 AD820000 */ sw $v0, 0x0($t4)
/* C4D24 8012E624 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* C4D28 8012E628 AC620020 */ sw $v0, 0x20($v1)
/* C4D2C 8012E62C 8FA20164 */ lw $v0, 0x164($sp)
/* C4D30 8012E630 3C04802F */ lui $a0, %hi(ui_msg_palettes)
/* C4D34 8012E634 2484C3F0 */ addiu $a0, $a0, %lo(ui_msg_palettes)
/* C4D38 8012E638 00021140 */ sll $v0, $v0, 5
/* C4D3C 8012E63C 00441021 */ addu $v0, $v0, $a0
/* C4D40 8012E640 AC620024 */ sw $v0, 0x24($v1)
/* C4D44 8012E644 24620030 */ addiu $v0, $v1, 0x30
/* C4D48 8012E648 AD820000 */ sw $v0, 0x0($t4)
/* C4D4C 8012E64C 3C02E800 */ lui $v0, (0xE8000000 >> 16)
/* C4D50 8012E650 AC620028 */ sw $v0, 0x28($v1)
/* C4D54 8012E654 24620038 */ addiu $v0, $v1, 0x38
/* C4D58 8012E658 AC60002C */ sw $zero, 0x2C($v1)
/* C4D5C 8012E65C AD820000 */ sw $v0, 0x0($t4)
/* C4D60 8012E660 3C020700 */ lui $v0, (0x7000000 >> 16)
/* C4D64 8012E664 AC620034 */ sw $v0, 0x34($v1)
/* C4D68 8012E668 24620040 */ addiu $v0, $v1, 0x40
/* C4D6C 8012E66C AC6A0030 */ sw $t2, 0x30($v1)
/* C4D70 8012E670 AD820000 */ sw $v0, 0x0($t4)
/* C4D74 8012E674 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* C4D78 8012E678 AC620038 */ sw $v0, 0x38($v1)
/* C4D7C 8012E67C 24620048 */ addiu $v0, $v1, 0x48
/* C4D80 8012E680 AC60003C */ sw $zero, 0x3C($v1)
/* C4D84 8012E684 AD820000 */ sw $v0, 0x0($t4)
/* C4D88 8012E688 3C02F000 */ lui $v0, (0xF0000000 >> 16)
/* C4D8C 8012E68C AC620040 */ sw $v0, 0x40($v1)
/* C4D90 8012E690 24620050 */ addiu $v0, $v1, 0x50
/* C4D94 8012E694 AC6B0044 */ sw $t3, 0x44($v1)
/* C4D98 8012E698 AD820000 */ sw $v0, 0x0($t4)
/* C4D9C 8012E69C AC690048 */ sw $t1, 0x48($v1)
/* C4DA0 8012E6A0 AC60004C */ sw $zero, 0x4C($v1)
.L8012E6A4:
/* C4DA4 8012E6A4 8DE20000 */ lw $v0, 0x0($t7)
/* C4DA8 8012E6A8 50400074 */ beql $v0, $zero, .L8012E87C
/* C4DAC 8012E6AC 25AD0010 */ addiu $t5, $t5, 0x10
/* C4DB0 8012E6B0 8DA20000 */ lw $v0, 0x0($t5)
/* C4DB4 8012E6B4 28422710 */ slti $v0, $v0, 0x2710
/* C4DB8 8012E6B8 1040006F */ beqz $v0, .L8012E878
/* C4DBC 8012E6BC 3C02FD48 */ lui $v0, (0xFD480003 >> 16)
/* C4DC0 8012E6C0 34420003 */ ori $v0, $v0, (0xFD480003 & 0xFFFF)
/* C4DC4 8012E6C4 3C08F548 */ lui $t0, (0xF5480200 >> 16)
/* C4DC8 8012E6C8 35080200 */ ori $t0, $t0, (0xF5480200 & 0xFFFF)
/* C4DCC 8012E6CC 3C070700 */ lui $a3, (0x700C030 >> 16)
/* C4DD0 8012E6D0 34E7C030 */ ori $a3, $a3, (0x700C030 & 0xFFFF)
/* C4DD4 8012E6D4 3C090700 */ lui $t1, (0x700E01C >> 16)
/* C4DD8 8012E6D8 3529E01C */ ori $t1, $t1, (0x700E01C & 0xFFFF)
/* C4DDC 8012E6DC 3C0AF540 */ lui $t2, (0xF5400200 >> 16)
/* C4DE0 8012E6E0 354A0200 */ ori $t2, $t2, (0xF5400200 & 0xFFFF)
/* C4DE4 8012E6E4 3C0B0001 */ lui $t3, (0x1C01C >> 16)
/* C4DE8 8012E6E8 8D830000 */ lw $v1, 0x0($t4)
/* C4DEC 8012E6EC 356BC01C */ ori $t3, $t3, (0x1C01C & 0xFFFF)
/* C4DF0 8012E6F0 0060282D */ daddu $a1, $v1, $zero
/* C4DF4 8012E6F4 24630008 */ addiu $v1, $v1, 0x8
/* C4DF8 8012E6F8 AD830000 */ sw $v1, 0x0($t4)
/* C4DFC 8012E6FC ACA20000 */ sw $v0, 0x0($a1)
/* C4E00 8012E700 24620008 */ addiu $v0, $v1, 0x8
/* C4E04 8012E704 AD820000 */ sw $v0, 0x0($t4)
/* C4E08 8012E708 24620010 */ addiu $v0, $v1, 0x10
/* C4E0C 8012E70C AD820000 */ sw $v0, 0x0($t4)
/* C4E10 8012E710 24620018 */ addiu $v0, $v1, 0x18
/* C4E14 8012E714 AD820000 */ sw $v0, 0x0($t4)
/* C4E18 8012E718 24620020 */ addiu $v0, $v1, 0x20
/* C4E1C 8012E71C AD820000 */ sw $v0, 0x0($t4)
/* C4E20 8012E720 24620028 */ addiu $v0, $v1, 0x28
/* C4E24 8012E724 24660030 */ addiu $a2, $v1, 0x30
/* C4E28 8012E728 AD820000 */ sw $v0, 0x0($t4)
/* C4E2C 8012E72C AD860000 */ sw $a2, 0x0($t4)
/* C4E30 8012E730 8DE40000 */ lw $a0, 0x0($t7)
/* C4E34 8012E734 24620038 */ addiu $v0, $v1, 0x38
/* C4E38 8012E738 AD820000 */ sw $v0, 0x0($t4)
/* C4E3C 8012E73C 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* C4E40 8012E740 ACA40004 */ sw $a0, 0x4($a1)
/* C4E44 8012E744 AC620008 */ sw $v0, 0x8($v1)
/* C4E48 8012E748 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* C4E4C 8012E74C AC620010 */ sw $v0, 0x10($v1)
/* C4E50 8012E750 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* C4E54 8012E754 AC620018 */ sw $v0, 0x18($v1)
/* C4E58 8012E758 3402C030 */ ori $v0, $zero, 0xC030
/* C4E5C 8012E75C AC620024 */ sw $v0, 0x24($v1)
/* C4E60 8012E760 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* C4E64 8012E764 AC680000 */ sw $t0, 0x0($v1)
/* C4E68 8012E768 AC670004 */ sw $a3, 0x4($v1)
/* C4E6C 8012E76C AC60000C */ sw $zero, 0xC($v1)
/* C4E70 8012E770 AC690014 */ sw $t1, 0x14($v1)
/* C4E74 8012E774 AC60001C */ sw $zero, 0x1C($v1)
/* C4E78 8012E778 AC6A0020 */ sw $t2, 0x20($v1)
/* C4E7C 8012E77C AC620028 */ sw $v0, 0x28($v1)
/* C4E80 8012E780 AC6B002C */ sw $t3, 0x2C($v1)
/* C4E84 8012E784 85A2000A */ lh $v0, 0xA($t5)
/* C4E88 8012E788 18400005 */ blez $v0, .L8012E7A0
/* C4E8C 8012E78C 30420FFF */ andi $v0, $v0, 0xFFF
/* C4E90 8012E790 00021300 */ sll $v0, $v0, 12
/* C4E94 8012E794 3C03E400 */ lui $v1, (0xE4000000 >> 16)
/* C4E98 8012E798 0804B9E9 */ j .L8012E7A4
/* C4E9C 8012E79C 00431825 */ or $v1, $v0, $v1
.L8012E7A0:
/* C4EA0 8012E7A0 3C03E400 */ lui $v1, (0xE4000000 >> 16)
.L8012E7A4:
/* C4EA4 8012E7A4 85A2000E */ lh $v0, 0xE($t5)
/* C4EA8 8012E7A8 18400002 */ blez $v0, .L8012E7B4
/* C4EAC 8012E7AC 30420FFF */ andi $v0, $v0, 0xFFF
/* C4EB0 8012E7B0 00621825 */ or $v1, $v1, $v0
.L8012E7B4:
/* C4EB4 8012E7B4 ACC30000 */ sw $v1, 0x0($a2)
/* C4EB8 8012E7B8 85A20002 */ lh $v0, 0x2($t5)
/* C4EBC 8012E7BC 18400004 */ blez $v0, .L8012E7D0
/* C4EC0 8012E7C0 24C60004 */ addiu $a2, $a2, 0x4
/* C4EC4 8012E7C4 30420FFF */ andi $v0, $v0, 0xFFF
/* C4EC8 8012E7C8 0804B9F5 */ j .L8012E7D4
/* C4ECC 8012E7CC 00021B00 */ sll $v1, $v0, 12
.L8012E7D0:
/* C4ED0 8012E7D0 0000182D */ daddu $v1, $zero, $zero
.L8012E7D4:
/* C4ED4 8012E7D4 85A20006 */ lh $v0, 0x6($t5)
/* C4ED8 8012E7D8 18400002 */ blez $v0, .L8012E7E4
/* C4EDC 8012E7DC 30420FFF */ andi $v0, $v0, 0xFFF
/* C4EE0 8012E7E0 00621825 */ or $v1, $v1, $v0
.L8012E7E4:
/* C4EE4 8012E7E4 8D820000 */ lw $v0, 0x0($t4)
/* C4EE8 8012E7E8 ACC30000 */ sw $v1, 0x0($a2)
/* C4EEC 8012E7EC 0040182D */ daddu $v1, $v0, $zero
/* C4EF0 8012E7F0 24420008 */ addiu $v0, $v0, 0x8
/* C4EF4 8012E7F4 AD820000 */ sw $v0, 0x0($t4)
/* C4EF8 8012E7F8 3C02E100 */ lui $v0, (0xE1000000 >> 16)
/* C4EFC 8012E7FC AC620000 */ sw $v0, 0x0($v1)
/* C4F00 8012E800 85A20002 */ lh $v0, 0x2($t5)
/* C4F04 8012E804 04410007 */ bgez $v0, .L8012E824
/* C4F08 8012E808 24630004 */ addiu $v1, $v1, 0x4
/* C4F0C 8012E80C 000210C0 */ sll $v0, $v0, 3
/* C4F10 8012E810 5C400001 */ bgtzl $v0, .L8012E818
/* C4F14 8012E814 0000102D */ daddu $v0, $zero, $zero
.L8012E818:
/* C4F18 8012E818 00021023 */ negu $v0, $v0
/* C4F1C 8012E81C 0804BA0A */ j .L8012E828
/* C4F20 8012E820 00022400 */ sll $a0, $v0, 16
.L8012E824:
/* C4F24 8012E824 0000202D */ daddu $a0, $zero, $zero
.L8012E828:
/* C4F28 8012E828 8DA20004 */ lw $v0, 0x4($t5)
/* C4F2C 8012E82C 04410008 */ bgez $v0, .L8012E850
/* C4F30 8012E830 0080282D */ daddu $a1, $a0, $zero
/* C4F34 8012E834 85A20006 */ lh $v0, 0x6($t5)
/* C4F38 8012E838 000210C0 */ sll $v0, $v0, 3
/* C4F3C 8012E83C 5C400001 */ bgtzl $v0, .L8012E844
/* C4F40 8012E840 0000102D */ daddu $v0, $zero, $zero
.L8012E844:
/* C4F44 8012E844 00021023 */ negu $v0, $v0
/* C4F48 8012E848 3042FFFF */ andi $v0, $v0, 0xFFFF
/* C4F4C 8012E84C 00A22825 */ or $a1, $a1, $v0
.L8012E850:
/* C4F50 8012E850 3C040400 */ lui $a0, (0x4000400 >> 16)
/* C4F54 8012E854 8D820000 */ lw $v0, 0x0($t4)
/* C4F58 8012E858 34840400 */ ori $a0, $a0, (0x4000400 & 0xFFFF)
/* C4F5C 8012E85C AC650000 */ sw $a1, 0x0($v1)
/* C4F60 8012E860 0040182D */ daddu $v1, $v0, $zero
/* C4F64 8012E864 24420008 */ addiu $v0, $v0, 0x8
/* C4F68 8012E868 AD820000 */ sw $v0, 0x0($t4)
/* C4F6C 8012E86C 3C02F100 */ lui $v0, (0xF1000000 >> 16)
/* C4F70 8012E870 AC620000 */ sw $v0, 0x0($v1)
/* C4F74 8012E874 AC640004 */ sw $a0, 0x4($v1)
.L8012E878:
/* C4F78 8012E878 25AD0010 */ addiu $t5, $t5, 0x10
.L8012E87C:
/* C4F7C 8012E87C 25CE0001 */ addiu $t6, $t6, 0x1
/* C4F80 8012E880 29C20010 */ slti $v0, $t6, 0x10
/* C4F84 8012E884 1440FF87 */ bnez $v0, .L8012E6A4
/* C4F88 8012E888 25EF0004 */ addiu $t7, $t7, 0x4
/* C4F8C 8012E88C 3C06E300 */ lui $a2, (0xE3001001 >> 16)
/* C4F90 8012E890 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* C4F94 8012E894 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* C4F98 8012E898 34C61001 */ ori $a2, $a2, (0xE3001001 & 0xFFFF)
/* C4F9C 8012E89C 8C820000 */ lw $v0, 0x0($a0)
/* C4FA0 8012E8A0 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* C4FA4 8012E8A4 0040282D */ daddu $a1, $v0, $zero
/* C4FA8 8012E8A8 24420008 */ addiu $v0, $v0, 0x8
/* C4FAC 8012E8AC AC820000 */ sw $v0, 0x0($a0)
/* C4FB0 8012E8B0 ACA30000 */ sw $v1, 0x0($a1)
/* C4FB4 8012E8B4 24430008 */ addiu $v1, $v0, 0x8
/* C4FB8 8012E8B8 ACA00004 */ sw $zero, 0x4($a1)
/* C4FBC 8012E8BC AC830000 */ sw $v1, 0x0($a0)
/* C4FC0 8012E8C0 AC460000 */ sw $a2, 0x0($v0)
/* C4FC4 8012E8C4 AC400004 */ sw $zero, 0x4($v0)
.L8012E8C8:
/* C4FC8 8012E8C8 8FB3014C */ lw $s3, 0x14C($sp)
/* C4FCC 8012E8CC 8FB20148 */ lw $s2, 0x148($sp)
/* C4FD0 8012E8D0 8FB10144 */ lw $s1, 0x144($sp)
/* C4FD4 8012E8D4 8FB00140 */ lw $s0, 0x140($sp)
/* C4FD8 8012E8D8 03E00008 */ jr $ra
/* C4FDC 8012E8DC 27BD0150 */ addiu $sp, $sp, 0x150
### DECOMPILED C INSTRUCTIONS:
void msg_draw_frame(s32 posX, s32 posY, s32 sizeX, s32 sizeY, s32 style, s32 palette, s32 fading, s32 bgAlpha, s32 frameAlpha) {
s32 i;
s32 frameType;
s32 textures[16];
s32 r, g, b;
Rect quads[16];
if (sizeX < 16 || sizeY < 16) {
return;
}
if (fading != 0 && bgAlpha == 0 && frameAlpha == 0) {
return;
}
gDPPipeSync(gMainGfxPos++);
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE);
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
if (fading == 0 || bgAlpha != 0) {
do {} while (0);
switch (style) {
case MSG_STYLE_CHOICE:
r = ((((u16*)(ui_msg_palettes[0]))[4] >> 11) & 0x1F) * 8;
g = ((((u16*)(ui_msg_palettes[0]))[4] >> 6) & 0x1F) * 8;
b = ((((u16*)(ui_msg_palettes[0]))[4] >> 1) & 0x1F) * 8;
gDPPipeSync(gMainGfxPos++);
if (fading != 0 && bgAlpha < 255) {
gDPSetRenderMode(gMainGfxPos++, IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
} else {
gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
}
gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
gDPSetPrimColor(gMainGfxPos++, 0, 0, r, g, b, bgAlpha);
if (posX + sizeX - 8 > 0) {
gDPScisFillRectangle(gMainGfxPos++, posX + 8, posY + 8, posX + sizeX - 8, posY + sizeY - 8);
}
break;
case MSG_STYLE_INSPECT:
gDPPipeSync(gMainGfxPos++);
gDPSetTextureFilter(gMainGfxPos++, G_TF_AVERAGE);
gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
gDPSetCombineMode(gMainGfxPos++, PM_CC_10, PM_CC_10);
if (fading == 0 || bgAlpha == 255) {
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 216);
} else {
if (bgAlpha > 216) {
bgAlpha = 216;
}
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, bgAlpha);
}
gDPLoadTextureBlock_4b(gMainGfxPos++, ui_msg_background_png, G_IM_FMT_I, 64, 64, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 6, 6, G_TX_NOLOD, G_TX_NOLOD);
if (style == MSG_STYLE_INSPECT) {
gSPScisTextureRectangle(gMainGfxPos++, (posX + 3) * 4, (posY + 3) * 4, (posX + sizeX - 3) * 4, (posY + sizeY - 3) * 4,
G_TX_RENDERTILE, gMsgBGScrollAmtX, gMsgBGScrollAmtY, 0x400, 0x400);
} else {
gSPScisTextureRectangle(gMainGfxPos++, (posX + 5) * 4, (posY + 5) * 4, (posX + sizeX - 5) * 4, (posY + sizeY - 5) * 4,
G_TX_RENDERTILE, gMsgBGScrollAmtX, gMsgBGScrollAmtY, 0x400, 0x400);
}
break;
}
}
if (sizeX >= 32) {
quads[2].ulx = (posX + 16) * 4;
quads[2].uly = posY * 4;
quads[2].lrx = (posX + sizeX - 16) * 4;
quads[2].lry = (posY + 8) * 4;
quads[13].ulx = (posX + 16) * 4;
quads[13].uly = (posY + sizeY - 8) * 4;
quads[13].lrx = (posX + sizeX - 16) * 4;
quads[13].lry = (posY + sizeY) * 4;
} else if (sizeX > 16 && sizeX < 24) {
quads[2].ulx = (posX + 8) * 4;
quads[2].uly = posY * 4;
quads[2].lrx = (posX + sizeX - 8) * 4;
quads[2].lry = (posY + 8) * 4;
quads[13].ulx = (posX + 8) * 4;
quads[13].uly = (posY + sizeY - 8) * 4;
quads[13].lrx = (posX + sizeX - 8) * 4;
quads[13].lry = (posY + sizeY) * 4;
} else {
quads[2].ulx = 10000;
quads[13].ulx = 10000;
}
if (sizeY >= 32) {
quads[7].ulx = posX * 4;
quads[7].uly = (posY + 16) * 4;
quads[7].lrx = (posX + 8) * 4;
quads[7].lry = (posY + sizeY - 16) * 4;
quads[8].ulx = (posX + sizeX - 8) * 4;
quads[8].uly = (posY + 16) * 4;
quads[8].lrx = (posX + sizeX) * 4;
quads[8].lry = (posY + sizeY - 16) * 4;
} else if (sizeY > 16 && sizeY < 24) {
quads[7].ulx = posX * 4;
quads[7].uly = (posY + 8) * 4;
quads[7].lrx = (posX + 8) * 4;
quads[7].lry = (posY + sizeY - 8) * 4;
quads[8].ulx = (posX + sizeX - 8) * 4;
quads[8].uly = (posY + 8) * 4;
quads[8].lrx = (posX + sizeX) * 4;
quads[8].lry = (posY + sizeY - 8) * 4;
} else {
quads[7].ulx = 10000;
quads[8].ulx = 10000;
}
if (sizeX >= 24) {
quads[1].ulx = (posX + 8) * 4;
quads[1].uly = posY * 4;
quads[1].lrx = (posX + 16) * 4;
quads[1].lry = (posY + 8) * 4;
quads[3].ulx = (posX + sizeX - 16) * 4;
quads[3].uly = posY * 4;
quads[3].lrx = (posX + sizeX - 8) * 4;
quads[3].lry = (posY + 8) * 4;
quads[12].ulx = (posX + 8) * 4;
quads[12].uly = (posY + sizeY - 8) * 4;
quads[12].lrx = (posX + 16) * 4;
quads[12].lry = (posY + sizeY) * 4;
quads[14].ulx = (posX + sizeX - 16) * 4;
quads[14].uly = (posY + sizeY - 8) * 4;
quads[14].lrx = (posX + sizeX - 8) * 4;
quads[14].lry = (posY + sizeY) * 4;
} else {
quads[1].ulx = 10000;
quads[3].ulx = 10000;
quads[12].ulx = 10000;
quads[14].ulx = 10000;
}
if (sizeY >= 24) {
quads[5].ulx = posX * 4;
quads[5].uly = (posY + 8) * 4;
quads[5].lrx = (posX + 8) * 4;
quads[5].lry = (posY + 16) * 4;
quads[6].ulx = (posX + sizeX - 8) * 4;
quads[6].uly = (posY + 8) * 4;
quads[6].lrx = (posX + sizeX) * 4;
quads[6].lry = (posY + 16) * 4;
quads[9].ulx = posX * 4;
quads[9].uly = (posY + sizeY - 16) * 4;
quads[9].lrx = (posX + 8) * 4;
quads[9].lry = (posY + sizeY - 8) * 4;
quads[10].ulx = (posX + sizeX - 8) * 4;
quads[10].uly = (posY + sizeY - 16) * 4;
quads[10].lrx = (posX + sizeX) * 4;
quads[10].lry = (posY + sizeY - 8) * 4;
} else {
quads[5].ulx = 10000;
quads[6].ulx = 10000;
quads[9].ulx = 10000;
quads[10].ulx = 10000;
}
quads[0].ulx = posX * 4;
quads[0].uly = posY * 4;
quads[0].lrx = (posX + 8) * 4;
quads[0].lry = (posY + 8) * 4;
quads[4].ulx = (posX + sizeX - 8) * 4;
quads[4].uly = posY * 4;
quads[4].lrx = (posX + sizeX) * 4;
quads[4].lry = (posY + 8) * 4;
quads[11].ulx = posX * 4;
quads[11].uly = (posY + sizeY - 8) * 4;
quads[11].lrx = (posX + 8) * 4;
quads[11].lry = (posY + sizeY) * 4;
quads[15].ulx = (posX + sizeX - 8) * 4;
quads[15].uly = (posY + sizeY - 8) * 4;
quads[15].lrx = (posX + sizeX) * 4;
quads[15].lry = (posY + sizeY) * 4;
switch (style) {
case MSG_STYLE_CHOICE:
frameType = 0;
break;
case MSG_STYLE_INSPECT:
frameType = 1;
break;
default:
frameType = 0;
break;
}
for (i = 0; i < ARRAY_COUNT(textures); i++) {
textures[i] = gMessageBoxFrameParts[frameType][i];
}
if (fading == 0) {
frameAlpha = 255;
}
gDPPipeSync(gMainGfxPos++);
gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
gDPSetCombineMode(gMainGfxPos++, PM_CC_02, PM_CC_02);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, frameAlpha);
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
gDPLoadTLUT_pal16(gMainGfxPos++, 0, ui_msg_palettes[palette]);
for (i = 0; i < ARRAY_COUNT(textures); i++) {
if (textures[i] != NULL && quads[i].ulx < 10000) {
gDPLoadTextureTile_4b(gMainGfxPos++, textures[i], G_IM_FMT_CI, 8, 8, 0, 0, 7, 7, 0, G_TX_WRAP, G_TX_WRAP, 3, 3, G_TX_NOLOD, G_TX_NOLOD);
gSPScisTextureRectangle(gMainGfxPos++, quads[i].ulx, quads[i].uly, quads[i].lrx, quads[i].lry,
G_TX_RENDERTILE, 0, 0, 0x400, 0x400);
}
}
gDPPipeSync(gMainGfxPos++);
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel update_camera_zone_interp
/* C894 80031494 27BDFF80 */ addiu $sp, $sp, -0x80
/* C898 80031498 AFB10044 */ sw $s1, 0x44($sp)
/* C89C 8003149C 0080882D */ daddu $s1, $a0, $zero
/* C8A0 800314A0 AFBF004C */ sw $ra, 0x4C($sp)
/* C8A4 800314A4 AFB20048 */ sw $s2, 0x48($sp)
/* C8A8 800314A8 AFB00040 */ sw $s0, 0x40($sp)
/* C8AC 800314AC F7BE0078 */ sdc1 $f30, 0x78($sp)
/* C8B0 800314B0 F7BC0070 */ sdc1 $f28, 0x70($sp)
/* C8B4 800314B4 F7BA0068 */ sdc1 $f26, 0x68($sp)
/* C8B8 800314B8 F7B80060 */ sdc1 $f24, 0x60($sp)
/* C8BC 800314BC F7B60058 */ sdc1 $f22, 0x58($sp)
/* C8C0 800314C0 F7B40050 */ sdc1 $f20, 0x50($sp)
/* C8C4 800314C4 C6300060 */ lwc1 $f16, 0x60($s1)
/* C8C8 800314C8 E7B00038 */ swc1 $f16, 0x38($sp)
/* C8CC 800314CC C63E0064 */ lwc1 $f30, 0x64($s1)
/* C8D0 800314D0 86220008 */ lh $v0, 0x8($s1)
/* C8D4 800314D4 C6300068 */ lwc1 $f16, 0x68($s1)
/* C8D8 800314D8 0000802D */ daddu $s0, $zero, $zero
/* C8DC 800314DC 10400017 */ beqz $v0, .L8003153C
/* C8E0 800314E0 E7B0003C */ swc1 $f16, 0x3C($sp)
/* C8E4 800314E4 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* C8E8 800314E8 44810000 */ mtc1 $at, $f0
/* C8EC 800314EC AE200448 */ sw $zero, 0x448($s1)
/* C8F0 800314F0 AE200444 */ sw $zero, 0x444($s1)
/* C8F4 800314F4 AE200488 */ sw $zero, 0x488($s1)
/* C8F8 800314F8 AE200494 */ sw $zero, 0x494($s1)
/* C8FC 800314FC E63E04A0 */ swc1 $f30, 0x4A0($s1)
/* C900 80031500 AE200098 */ sw $zero, 0x98($s1)
/* C904 80031504 AE20009C */ sw $zero, 0x9C($s1)
/* C908 80031508 AE2004A4 */ sw $zero, 0x4A4($s1)
/* C90C 8003150C AE2004A8 */ sw $zero, 0x4A8($s1)
/* C910 80031510 AE2004AC */ sw $zero, 0x4AC($s1)
/* C914 80031514 A62004D4 */ sh $zero, 0x4D4($s1)
/* C918 80031518 A62004D6 */ sh $zero, 0x4D6($s1)
/* C91C 8003151C AE200508 */ sw $zero, 0x508($s1)
/* C920 80031520 3C01800A */ lui $at, %hi(D_800A08DC)
/* C924 80031524 AC2008DC */ sw $zero, %lo(D_800A08DC)($at)
/* C928 80031528 3C01800A */ lui $at, %hi(D_800A08E0)
/* C92C 8003152C AC2008E0 */ sw $zero, %lo(D_800A08E0)($at)
/* C930 80031530 E6200484 */ swc1 $f0, 0x484($s1)
/* C934 80031534 E6200498 */ swc1 $f0, 0x498($s1)
/* C938 80031538 E620048C */ swc1 $f0, 0x48C($s1)
.L8003153C:
/* C93C 8003153C 96220002 */ lhu $v0, 0x2($s1)
/* C940 80031540 C7B60038 */ lwc1 $f22, 0x38($sp)
/* C944 80031544 30420001 */ andi $v0, $v0, 0x1
/* C948 80031548 54400008 */ bnel $v0, $zero, .L8003156C
/* C94C 8003154C AE200498 */ sw $zero, 0x498($s1)
/* C950 80031550 C6200494 */ lwc1 $f0, 0x494($s1)
/* C954 80031554 461E0032 */ c.eq.s $f0, $f30
/* C958 80031558 00000000 */ nop
/* C95C 8003155C 45010004 */ bc1t .L80031570
/* C960 80031560 00000000 */ nop
/* C964 80031564 E63E0494 */ swc1 $f30, 0x494($s1)
/* C968 80031568 AE200498 */ sw $zero, 0x498($s1)
.L8003156C:
/* C96C 8003156C C6200494 */ lwc1 $f0, 0x494($s1)
.L80031570:
/* C970 80031570 4600F03C */ c.lt.s $f30, $f0
/* C974 80031574 00000000 */ nop
/* C978 80031578 4500000A */ bc1f .L800315A4
/* C97C 8003157C 00000000 */ nop
/* C980 80031580 C62004A0 */ lwc1 $f0, 0x4A0($s1)
/* C984 80031584 4600F03E */ c.le.s $f30, $f0
/* C988 80031588 00000000 */ nop
/* C98C 8003158C 45000005 */ bc1f .L800315A4
/* C990 80031590 00000000 */ nop
/* C994 80031594 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* C998 80031598 44810000 */ mtc1 $at, $f0
/* C99C 8003159C E63E0494 */ swc1 $f30, 0x494($s1)
/* C9A0 800315A0 E6200498 */ swc1 $f0, 0x498($s1)
.L800315A4:
/* C9A4 800315A4 C6220498 */ lwc1 $f2, 0x498($s1)
/* C9A8 800315A8 3C01800A */ lui $at, %hi(D_80098250)
/* C9AC 800315AC D4248250 */ ldc1 $f4, %lo(D_80098250)($at)
/* C9B0 800315B0 C620049C */ lwc1 $f0, 0x49C($s1)
/* C9B4 800315B4 460010A1 */ cvt.d.s $f2, $f2
/* C9B8 800315B8 46222101 */ sub.d $f4, $f4, $f2
/* C9BC 800315BC 46000021 */ cvt.d.s $f0, $f0
/* C9C0 800315C0 46202103 */ div.d $f4, $f4, $f0
/* C9C4 800315C4 46241080 */ add.d $f2, $f2, $f4
/* C9C8 800315C8 3C013FF0 */ lui $at, (0x3FF00000 >> 16)
/* C9CC 800315CC 44812800 */ mtc1 $at, $f5
/* C9D0 800315D0 44802000 */ mtc1 $zero, $f4
/* C9D4 800315D4 462010A0 */ cvt.s.d $f2, $f2
/* C9D8 800315D8 46001021 */ cvt.d.s $f0, $f2
/* C9DC 800315DC 4620203C */ c.lt.d $f4, $f0
/* C9E0 800315E0 00000000 */ nop
/* C9E4 800315E4 45000005 */ bc1f .L800315FC
/* C9E8 800315E8 E6220498 */ swc1 $f2, 0x498($s1)
/* C9EC 800315EC 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* C9F0 800315F0 44810000 */ mtc1 $at, $f0
/* C9F4 800315F4 00000000 */ nop
/* C9F8 800315F8 E6200498 */ swc1 $f0, 0x498($s1)
.L800315FC:
/* C9FC 800315FC 96220002 */ lhu $v0, 0x2($s1)
/* CA00 80031600 30420004 */ andi $v0, $v0, 0x4
/* CA04 80031604 10400010 */ beqz $v0, .L80031648
/* CA08 80031608 00000000 */ nop
/* CA0C 8003160C C6200498 */ lwc1 $f0, 0x498($s1)
/* CA10 80031610 3C01800A */ lui $at, %hi(D_80098258)
/* CA14 80031614 D4228258 */ ldc1 $f2, %lo(D_80098258)($at)
/* CA18 80031618 46000021 */ cvt.d.s $f0, $f0
/* CA1C 8003161C 46220000 */ add.d $f0, $f0, $f2
/* CA20 80031620 46200020 */ cvt.s.d $f0, $f0
/* CA24 80031624 460000A1 */ cvt.d.s $f2, $f0
/* CA28 80031628 4622203E */ c.le.d $f4, $f2
/* CA2C 8003162C 00000000 */ nop
/* CA30 80031630 45000005 */ bc1f .L80031648
/* CA34 80031634 E6200498 */ swc1 $f0, 0x498($s1)
/* CA38 80031638 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* CA3C 8003163C 44810000 */ mtc1 $at, $f0
/* CA40 80031640 00000000 */ nop
/* CA44 80031644 E6200498 */ swc1 $f0, 0x498($s1)
.L80031648:
/* CA48 80031648 96220002 */ lhu $v0, 0x2($s1)
/* CA4C 8003164C 30420002 */ andi $v0, $v0, 0x2
/* CA50 80031650 14400009 */ bnez $v0, .L80031678
/* CA54 80031654 00000000 */ nop
/* CA58 80031658 C6200494 */ lwc1 $f0, 0x494($s1)
/* CA5C 8003165C C62204A0 */ lwc1 $f2, 0x4A0($s1)
/* CA60 80031660 46020001 */ sub.s $f0, $f0, $f2
/* CA64 80031664 C6240498 */ lwc1 $f4, 0x498($s1)
/* CA68 80031668 46040002 */ mul.s $f0, $f0, $f4
/* CA6C 8003166C 00000000 */ nop
/* CA70 80031670 46001080 */ add.s $f2, $f2, $f0
/* CA74 80031674 E62204A0 */ swc1 $f2, 0x4A0($s1)
.L80031678:
/* CA78 80031678 96220506 */ lhu $v0, 0x506($s1)
/* CA7C 8003167C 14400014 */ bnez $v0, .L800316D0
/* CA80 80031680 C7B4003C */ lwc1 $f20, 0x3C($sp)
/* CA84 80031684 C62004A4 */ lwc1 $f0, 0x4A4($s1)
/* CA88 80031688 C7B00038 */ lwc1 $f16, 0x38($sp)
/* CA8C 8003168C 46100032 */ c.eq.s $f0, $f16
/* CA90 80031690 00000000 */ nop
/* CA94 80031694 4500000E */ bc1f .L800316D0
/* CA98 80031698 00000000 */ nop
/* CA9C 8003169C C62004A8 */ lwc1 $f0, 0x4A8($s1)
/* CAA0 800316A0 461E0032 */ c.eq.s $f0, $f30
/* CAA4 800316A4 00000000 */ nop
/* CAA8 800316A8 45000009 */ bc1f .L800316D0
/* CAAC 800316AC 00000000 */ nop
/* CAB0 800316B0 C62004AC */ lwc1 $f0, 0x4AC($s1)
/* CAB4 800316B4 46140032 */ c.eq.s $f0, $f20
/* CAB8 800316B8 00000000 */ nop
/* CABC 800316BC 45000004 */ bc1f .L800316D0
/* CAC0 800316C0 00000000 */ nop
/* CAC4 800316C4 86220008 */ lh $v0, 0x8($s1)
/* CAC8 800316C8 104000C6 */ beqz $v0, .L800319E4
/* CACC 800316CC 00000000 */ nop
.L800316D0:
/* CAD0 800316D0 96220504 */ lhu $v0, 0x504($s1)
/* CAD4 800316D4 14400008 */ bnez $v0, .L800316F8
/* CAD8 800316D8 262404D8 */ addiu $a0, $s1, 0x4D8
/* CADC 800316DC 3C014120 */ lui $at, (0x41200000 >> 16)
/* CAE0 800316E0 44817000 */ mtc1 $at, $f14
/* CAE4 800316E4 8FA6003C */ lw $a2, 0x3C($sp)
/* CAE8 800316E8 C7AC0038 */ lwc1 $f12, 0x38($sp)
/* CAEC 800316EC 0C00C116 */ jal test_ray_zone_aabb
/* CAF0 800316F0 460EF380 */ add.s $f14, $f30, $f14
/* CAF4 800316F4 0040202D */ daddu $a0, $v0, $zero
.L800316F8:
/* CAF8 800316F8 0000402D */ daddu $t0, $zero, $zero
/* CAFC 800316FC 8E230448 */ lw $v1, 0x448($s1)
/* CB00 80031700 1080007E */ beqz $a0, .L800318FC
/* CB04 80031704 0080382D */ daddu $a3, $a0, $zero
/* CB08 80031708 1060007C */ beqz $v1, .L800318FC
/* CB0C 8003170C 00000000 */ nop
/* CB10 80031710 8C850000 */ lw $a1, 0x0($a0)
/* CB14 80031714 8C620000 */ lw $v0, 0x0($v1)
/* CB18 80031718 14A20078 */ bne $a1, $v0, .L800318FC
/* CB1C 8003171C 00000000 */ nop
/* CB20 80031720 8C860028 */ lw $a2, 0x28($a0)
/* CB24 80031724 8C620028 */ lw $v0, 0x28($v1)
/* CB28 80031728 14C20074 */ bne $a2, $v0, .L800318FC
/* CB2C 8003172C 00000000 */ nop
/* CB30 80031730 C4820004 */ lwc1 $f2, 0x4($a0)
/* CB34 80031734 C4600004 */ lwc1 $f0, 0x4($v1)
/* CB38 80031738 46001032 */ c.eq.s $f2, $f0
/* CB3C 8003173C 00000000 */ nop
/* CB40 80031740 4500006E */ bc1f .L800318FC
/* CB44 80031744 00000000 */ nop
/* CB48 80031748 C4820008 */ lwc1 $f2, 0x8($a0)
/* CB4C 8003174C C4600008 */ lwc1 $f0, 0x8($v1)
/* CB50 80031750 46001032 */ c.eq.s $f2, $f0
/* CB54 80031754 00000000 */ nop
/* CB58 80031758 45000068 */ bc1f .L800318FC
/* CB5C 8003175C 00000000 */ nop
/* CB60 80031760 C4820024 */ lwc1 $f2, 0x24($a0)
/* CB64 80031764 C4600024 */ lwc1 $f0, 0x24($v1)
/* CB68 80031768 46001032 */ c.eq.s $f2, $f0
/* CB6C 8003176C 00000000 */ nop
/* CB70 80031770 45000062 */ bc1f .L800318FC
/* CB74 80031774 00000000 */ nop
/* CB78 80031778 10A00005 */ beqz $a1, .L80031790
/* CB7C 8003177C 24020001 */ addiu $v0, $zero, 0x1
/* CB80 80031780 10A20017 */ beq $a1, $v0, .L800317E0
/* CB84 80031784 00000000 */ nop
/* CB88 80031788 0800C61B */ j .L8003186C
/* CB8C 8003178C 00000000 */ nop
.L80031790:
/* CB90 80031790 C482000C */ lwc1 $f2, 0xC($a0)
/* CB94 80031794 C460000C */ lwc1 $f0, 0xC($v1)
/* CB98 80031798 46001032 */ c.eq.s $f2, $f0
/* CB9C 8003179C 00000000 */ nop
/* CBA0 800317A0 45000056 */ bc1f .L800318FC
/* CBA4 800317A4 00000000 */ nop
/* CBA8 800317A8 C4820014 */ lwc1 $f2, 0x14($a0)
/* CBAC 800317AC C4600014 */ lwc1 $f0, 0x14($v1)
/* CBB0 800317B0 46001032 */ c.eq.s $f2, $f0
/* CBB4 800317B4 00000000 */ nop
/* CBB8 800317B8 45000050 */ bc1f .L800318FC
/* CBBC 800317BC 00000000 */ nop
/* CBC0 800317C0 C4820018 */ lwc1 $f2, 0x18($a0)
/* CBC4 800317C4 C4600018 */ lwc1 $f0, 0x18($v1)
/* CBC8 800317C8 46001032 */ c.eq.s $f2, $f0
/* CBCC 800317CC 00000000 */ nop
/* CBD0 800317D0 4500004A */ bc1f .L800318FC
/* CBD4 800317D4 00000000 */ nop
/* CBD8 800317D8 0800C63A */ j .L800318E8
/* CBDC 800317DC C4820020 */ lwc1 $f2, 0x20($a0)
.L800317E0:
/* CBE0 800317E0 10C00005 */ beqz $a2, .L800317F8
/* CBE4 800317E4 00000000 */ nop
/* CBE8 800317E8 10C5000C */ beq $a2, $a1, .L8003181C
/* CBEC 800317EC 00000000 */ nop
/* CBF0 800317F0 0800C63F */ j .L800318FC
/* CBF4 800317F4 00000000 */ nop
.L800317F8:
/* CBF8 800317F8 C482000C */ lwc1 $f2, 0xC($a0)
/* CBFC 800317FC C460000C */ lwc1 $f0, 0xC($v1)
/* CC00 80031800 46001032 */ c.eq.s $f2, $f0
/* CC04 80031804 00000000 */ nop
/* CC08 80031808 4500003C */ bc1f .L800318FC
/* CC0C 8003180C 00000000 */ nop
/* CC10 80031810 C4820014 */ lwc1 $f2, 0x14($a0)
/* CC14 80031814 0800C63B */ j .L800318EC
/* CC18 80031818 C4600014 */ lwc1 $f0, 0x14($v1)
.L8003181C:
/* CC1C 8003181C C482000C */ lwc1 $f2, 0xC($a0)
/* CC20 80031820 C460000C */ lwc1 $f0, 0xC($v1)
/* CC24 80031824 46001032 */ c.eq.s $f2, $f0
/* CC28 80031828 00000000 */ nop
/* CC2C 8003182C 45000033 */ bc1f .L800318FC
/* CC30 80031830 00000000 */ nop
/* CC34 80031834 C4820014 */ lwc1 $f2, 0x14($a0)
/* CC38 80031838 C4600014 */ lwc1 $f0, 0x14($v1)
/* CC3C 8003183C 46001032 */ c.eq.s $f2, $f0
/* CC40 80031840 00000000 */ nop
/* CC44 80031844 4500002D */ bc1f .L800318FC
/* CC48 80031848 00000000 */ nop
/* CC4C 8003184C C4820018 */ lwc1 $f2, 0x18($a0)
/* CC50 80031850 C4600018 */ lwc1 $f0, 0x18($v1)
/* CC54 80031854 46001032 */ c.eq.s $f2, $f0
/* CC58 80031858 00000000 */ nop
/* CC5C 8003185C 45000027 */ bc1f .L800318FC
/* CC60 80031860 00000000 */ nop
/* CC64 80031864 0800C63A */ j .L800318E8
/* CC68 80031868 C4820020 */ lwc1 $f2, 0x20($a0)
.L8003186C:
/* CC6C 8003186C C4E2000C */ lwc1 $f2, 0xC($a3)
/* CC70 80031870 C460000C */ lwc1 $f0, 0xC($v1)
/* CC74 80031874 46001032 */ c.eq.s $f2, $f0
/* CC78 80031878 00000000 */ nop
/* CC7C 8003187C 4500001F */ bc1f .L800318FC
/* CC80 80031880 00000000 */ nop
/* CC84 80031884 C4E20014 */ lwc1 $f2, 0x14($a3)
/* CC88 80031888 C4600014 */ lwc1 $f0, 0x14($v1)
/* CC8C 8003188C 46001032 */ c.eq.s $f2, $f0
/* CC90 80031890 00000000 */ nop
/* CC94 80031894 45000019 */ bc1f .L800318FC
/* CC98 80031898 00000000 */ nop
/* CC9C 8003189C C4E20010 */ lwc1 $f2, 0x10($a3)
/* CCA0 800318A0 C4600010 */ lwc1 $f0, 0x10($v1)
/* CCA4 800318A4 46001032 */ c.eq.s $f2, $f0
/* CCA8 800318A8 00000000 */ nop
/* CCAC 800318AC 45000013 */ bc1f .L800318FC
/* CCB0 800318B0 00000000 */ nop
/* CCB4 800318B4 C4E2001C */ lwc1 $f2, 0x1C($a3)
/* CCB8 800318B8 C460001C */ lwc1 $f0, 0x1C($v1)
/* CCBC 800318BC 46001032 */ c.eq.s $f2, $f0
/* CCC0 800318C0 00000000 */ nop
/* CCC4 800318C4 4500000D */ bc1f .L800318FC
/* CCC8 800318C8 00000000 */ nop
/* CCCC 800318CC C4E20018 */ lwc1 $f2, 0x18($a3)
/* CCD0 800318D0 C4600018 */ lwc1 $f0, 0x18($v1)
/* CCD4 800318D4 46001032 */ c.eq.s $f2, $f0
/* CCD8 800318D8 00000000 */ nop
/* CCDC 800318DC 45000007 */ bc1f .L800318FC
/* CCE0 800318E0 00000000 */ nop
/* CCE4 800318E4 C4E20020 */ lwc1 $f2, 0x20($a3)
.L800318E8:
/* CCE8 800318E8 C4600020 */ lwc1 $f0, 0x20($v1)
.L800318EC:
/* CCEC 800318EC 46001032 */ c.eq.s $f2, $f0
/* CCF0 800318F0 00000000 */ nop
/* CCF4 800318F4 45030001 */ bc1tl .L800318FC
/* CCF8 800318F8 24080001 */ addiu $t0, $zero, 0x1
.L800318FC:
/* CCFC 800318FC 96220506 */ lhu $v0, 0x506($s1)
/* CD00 80031900 14400005 */ bnez $v0, .L80031918
/* CD04 80031904 00000000 */ nop
/* CD08 80031908 15000036 */ bnez $t0, .L800319E4
/* CD0C 8003190C 00000000 */ nop
/* CD10 80031910 10E30034 */ beq $a3, $v1, .L800319E4
/* CD14 80031914 00000000 */ nop
.L80031918:
/* CD18 80031918 C6220484 */ lwc1 $f2, 0x484($s1)
/* CD1C 8003191C 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* CD20 80031920 44810000 */ mtc1 $at, $f0
/* CD24 80031924 00000000 */ nop
/* CD28 80031928 46001032 */ c.eq.s $f2, $f0
/* CD2C 8003192C 00000000 */ nop
/* CD30 80031930 45000004 */ bc1f .L80031944
/* CD34 80031934 2402FFFF */ addiu $v0, $zero, -0x1
/* CD38 80031938 8E220448 */ lw $v0, 0x448($s1)
/* CD3C 8003193C 0800C652 */ j .L80031948
/* CD40 80031940 AE220444 */ sw $v0, 0x444($s1)
.L80031944:
/* CD44 80031944 AE220444 */ sw $v0, 0x444($s1)
.L80031948:
/* CD48 80031948 3C0C800A */ lui $t4, %hi(gCurrentCamConfiguration)
/* CD4C 8003194C 258C08C0 */ addiu $t4, $t4, %lo(gCurrentCamConfiguration)
/* CD50 80031950 8D890000 */ lw $t1, 0x0($t4)
/* CD54 80031954 8D8A0004 */ lw $t2, 0x4($t4)
/* CD58 80031958 8D8B0008 */ lw $t3, 0x8($t4)
/* CD5C 8003195C AE29044C */ sw $t1, 0x44C($s1)
/* CD60 80031960 AE2A0450 */ sw $t2, 0x450($s1)
/* CD64 80031964 AE2B0454 */ sw $t3, 0x454($s1)
/* CD68 80031968 8D89000C */ lw $t1, 0xC($t4)
/* CD6C 8003196C 8D8A0010 */ lw $t2, 0x10($t4)
/* CD70 80031970 8D8B0014 */ lw $t3, 0x14($t4)
/* CD74 80031974 AE290458 */ sw $t1, 0x458($s1)
/* CD78 80031978 AE2A045C */ sw $t2, 0x45C($s1)
/* CD7C 8003197C AE2B0460 */ sw $t3, 0x460($s1)
/* CD80 80031980 8D890018 */ lw $t1, 0x18($t4)
/* CD84 80031984 AE290464 */ sw $t1, 0x464($s1)
/* CD88 80031988 C6200490 */ lwc1 $f0, 0x490($s1)
/* CD8C 8003198C 962204D6 */ lhu $v0, 0x4D6($s1)
/* CD90 80031990 96230504 */ lhu $v1, 0x504($s1)
/* CD94 80031994 C62204C8 */ lwc1 $f2, 0x4C8($s1)
/* CD98 80031998 C62404CC */ lwc1 $f4, 0x4CC($s1)
/* CD9C 8003199C C62604D0 */ lwc1 $f6, 0x4D0($s1)
/* CDA0 800319A0 C62804B0 */ lwc1 $f8, 0x4B0($s1)
/* CDA4 800319A4 C62A04B4 */ lwc1 $f10, 0x4B4($s1)
/* CDA8 800319A8 C62C04B8 */ lwc1 $f12, 0x4B8($s1)
/* CDAC 800319AC 24100001 */ addiu $s0, $zero, 0x1
/* CDB0 800319B0 AE240448 */ sw $a0, 0x448($s1)
/* CDB4 800319B4 AE200484 */ sw $zero, 0x484($s1)
/* CDB8 800319B8 AE200488 */ sw $zero, 0x488($s1)
/* CDBC 800319BC A6200506 */ sh $zero, 0x506($s1)
/* CDC0 800319C0 E620048C */ swc1 $f0, 0x48C($s1)
/* CDC4 800319C4 A62204D4 */ sh $v0, 0x4D4($s1)
/* CDC8 800319C8 A62304D6 */ sh $v1, 0x4D6($s1)
/* CDCC 800319CC E62204BC */ swc1 $f2, 0x4BC($s1)
/* CDD0 800319D0 E62404C0 */ swc1 $f4, 0x4C0($s1)
/* CDD4 800319D4 E62604C4 */ swc1 $f6, 0x4C4($s1)
/* CDD8 800319D8 E62804C8 */ swc1 $f8, 0x4C8($s1)
/* CDDC 800319DC E62A04CC */ swc1 $f10, 0x4CC($s1)
/* CDE0 800319E0 E62C04D0 */ swc1 $f12, 0x4D0($s1)
.L800319E4:
/* CDE4 800319E4 962204D4 */ lhu $v0, 0x4D4($s1)
/* CDE8 800319E8 10400005 */ beqz $v0, .L80031A00
/* CDEC 800319EC 4600B286 */ mov.s $f10, $f22
/* CDF0 800319F0 C62A04BC */ lwc1 $f10, 0x4BC($s1)
/* CDF4 800319F4 C62804C0 */ lwc1 $f8, 0x4C0($s1)
/* CDF8 800319F8 0800C682 */ j .L80031A08
/* CDFC 800319FC C62604C4 */ lwc1 $f6, 0x4C4($s1)
.L80031A00:
/* CE00 80031A00 C62804A0 */ lwc1 $f8, 0x4A0($s1)
/* CE04 80031A04 4600A186 */ mov.s $f6, $f20
.L80031A08:
/* CE08 80031A08 962204D6 */ lhu $v0, 0x4D6($s1)
/* CE0C 80031A0C 10400006 */ beqz $v0, .L80031A28
/* CE10 80031A10 4600B106 */ mov.s $f4, $f22
/* CE14 80031A14 C62004CC */ lwc1 $f0, 0x4CC($s1)
/* CE18 80031A18 C62404C8 */ lwc1 $f4, 0x4C8($s1)
/* CE1C 80031A1C C62204D0 */ lwc1 $f2, 0x4D0($s1)
/* CE20 80031A20 0800C68C */ j .L80031A30
/* CE24 80031A24 E62004A0 */ swc1 $f0, 0x4A0($s1)
.L80031A28:
/* CE28 80031A28 C62004A0 */ lwc1 $f0, 0x4A0($s1)
/* CE2C 80031A2C 4600A086 */ mov.s $f2, $f20
.L80031A30:
/* CE30 80031A30 0220202D */ daddu $a0, $s1, $zero
/* CE34 80031A34 26260444 */ addiu $a2, $s1, 0x444
/* CE38 80031A38 26270468 */ addiu $a3, $s1, 0x468
/* CE3C 80031A3C 26220448 */ addiu $v0, $s1, 0x448
/* CE40 80031A40 AFA20010 */ sw $v0, 0x10($sp)
/* CE44 80031A44 26220484 */ addiu $v0, $s1, 0x484
/* CE48 80031A48 E7AA0014 */ swc1 $f10, 0x14($sp)
/* CE4C 80031A4C E7A80018 */ swc1 $f8, 0x18($sp)
/* CE50 80031A50 E7A6001C */ swc1 $f6, 0x1C($sp)
/* CE54 80031A54 E7A40020 */ swc1 $f4, 0x20($sp)
/* CE58 80031A58 E7A00024 */ swc1 $f0, 0x24($sp)
/* CE5C 80031A5C E7A20028 */ swc1 $f2, 0x28($sp)
/* CE60 80031A60 86230008 */ lh $v1, 0x8($s1)
/* CE64 80031A64 2625044C */ addiu $a1, $s1, 0x44C
/* CE68 80031A68 AFA20030 */ sw $v0, 0x30($sp)
/* CE6C 80031A6C AFB00034 */ sw $s0, 0x34($sp)
/* CE70 80031A70 0C00C13F */ jal update_camera_from_controller
/* CE74 80031A74 AFA3002C */ sw $v1, 0x2C($sp)
/* CE78 80031A78 86220008 */ lh $v0, 0x8($s1)
/* CE7C 80031A7C 10400013 */ beqz $v0, .L80031ACC
/* CE80 80031A80 00000000 */ nop
/* CE84 80031A84 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* CE88 80031A88 44810000 */ mtc1 $at, $f0
/* CE8C 80031A8C 8E290468 */ lw $t1, 0x468($s1)
/* CE90 80031A90 8E2A046C */ lw $t2, 0x46C($s1)
/* CE94 80031A94 8E2B0470 */ lw $t3, 0x470($s1)
/* CE98 80031A98 8E2C0474 */ lw $t4, 0x474($s1)
/* CE9C 80031A9C AE29044C */ sw $t1, 0x44C($s1)
/* CEA0 80031AA0 AE2A0450 */ sw $t2, 0x450($s1)
/* CEA4 80031AA4 AE2B0454 */ sw $t3, 0x454($s1)
/* CEA8 80031AA8 AE2C0458 */ sw $t4, 0x458($s1)
/* CEAC 80031AAC 8E290478 */ lw $t1, 0x478($s1)
/* CEB0 80031AB0 8E2A047C */ lw $t2, 0x47C($s1)
/* CEB4 80031AB4 8E2B0480 */ lw $t3, 0x480($s1)
/* CEB8 80031AB8 AE29045C */ sw $t1, 0x45C($s1)
/* CEBC 80031ABC AE2A0460 */ sw $t2, 0x460($s1)
/* CEC0 80031AC0 AE2B0464 */ sw $t3, 0x464($s1)
/* CEC4 80031AC4 A6200008 */ sh $zero, 0x8($s1)
/* CEC8 80031AC8 E6200484 */ swc1 $f0, 0x484($s1)
.L80031ACC:
/* CECC 80031ACC C622044C */ lwc1 $f2, 0x44C($s1)
/* CED0 80031AD0 C6200468 */ lwc1 $f0, 0x468($s1)
/* CED4 80031AD4 46001001 */ sub.s $f0, $f2, $f0
/* CED8 80031AD8 3C014334 */ lui $at, (0x43340000 >> 16)
/* CEDC 80031ADC 44813000 */ mtc1 $at, $f6
/* CEE0 80031AE0 00000000 */ nop
/* CEE4 80031AE4 4600303C */ c.lt.s $f6, $f0
/* CEE8 80031AE8 00000000 */ nop
/* CEEC 80031AEC 45000006 */ bc1f .L80031B08
/* CEF0 80031AF0 00000000 */ nop
/* CEF4 80031AF4 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* CEF8 80031AF8 44810000 */ mtc1 $at, $f0
/* CEFC 80031AFC 00000000 */ nop
/* CF00 80031B00 46001001 */ sub.s $f0, $f2, $f0
/* CF04 80031B04 E620044C */ swc1 $f0, 0x44C($s1)
.L80031B08:
/* CF08 80031B08 C624044C */ lwc1 $f4, 0x44C($s1)
/* CF0C 80031B0C C6200468 */ lwc1 $f0, 0x468($s1)
/* CF10 80031B10 46002001 */ sub.s $f0, $f4, $f0
/* CF14 80031B14 3C01C334 */ lui $at, (0xC3340000 >> 16)
/* CF18 80031B18 44811000 */ mtc1 $at, $f2
/* CF1C 80031B1C 00000000 */ nop
/* CF20 80031B20 4602003C */ c.lt.s $f0, $f2
/* CF24 80031B24 00000000 */ nop
/* CF28 80031B28 45000006 */ bc1f .L80031B44
/* CF2C 80031B2C 00000000 */ nop
/* CF30 80031B30 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* CF34 80031B34 44810000 */ mtc1 $at, $f0
/* CF38 80031B38 00000000 */ nop
/* CF3C 80031B3C 46002000 */ add.s $f0, $f4, $f0
/* CF40 80031B40 E620044C */ swc1 $f0, 0x44C($s1)
.L80031B44:
/* CF44 80031B44 C622044C */ lwc1 $f2, 0x44C($s1)
/* CF48 80031B48 C6200468 */ lwc1 $f0, 0x468($s1)
/* CF4C 80031B4C 46001301 */ sub.s $f12, $f2, $f0
/* CF50 80031B50 44804000 */ mtc1 $zero, $f8
/* CF54 80031B54 00000000 */ nop
/* CF58 80031B58 4608603C */ c.lt.s $f12, $f8
/* CF5C 80031B5C 00000000 */ nop
/* CF60 80031B60 45030001 */ bc1tl .L80031B68
/* CF64 80031B64 46006307 */ neg.s $f12, $f12
.L80031B68:
/* CF68 80031B68 460C303C */ c.lt.s $f6, $f12
/* CF6C 80031B6C 00000000 */ nop
/* CF70 80031B70 45000005 */ bc1f .L80031B88
/* CF74 80031B74 00000000 */ nop
/* CF78 80031B78 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* CF7C 80031B7C 44810000 */ mtc1 $at, $f0
/* CF80 80031B80 00000000 */ nop
/* CF84 80031B84 460C0301 */ sub.s $f12, $f0, $f12
.L80031B88:
/* CF88 80031B88 C6220454 */ lwc1 $f2, 0x454($s1)
/* CF8C 80031B8C C6200470 */ lwc1 $f0, 0x470($s1)
/* CF90 80031B90 46006506 */ mov.s $f20, $f12
/* CF94 80031B94 46001301 */ sub.s $f12, $f2, $f0
/* CF98 80031B98 4608603C */ c.lt.s $f12, $f8
/* CF9C 80031B9C 00000000 */ nop
/* CFA0 80031BA0 45030001 */ bc1tl .L80031BA8
/* CFA4 80031BA4 46006307 */ neg.s $f12, $f12
.L80031BA8:
/* CFA8 80031BA8 460C303C */ c.lt.s $f6, $f12
/* CFAC 80031BAC 00000000 */ nop
/* CFB0 80031BB0 45000005 */ bc1f .L80031BC8
/* CFB4 80031BB4 00000000 */ nop
/* CFB8 80031BB8 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* CFBC 80031BBC 44810000 */ mtc1 $at, $f0
/* CFC0 80031BC0 00000000 */ nop
/* CFC4 80031BC4 460C0301 */ sub.s $f12, $f0, $f12
.L80031BC8:
/* CFC8 80031BC8 460CA03C */ c.lt.s $f20, $f12
/* CFCC 80031BCC 00000000 */ nop
/* CFD0 80031BD0 45030001 */ bc1tl .L80031BD8
/* CFD4 80031BD4 46006506 */ mov.s $f20, $f12
.L80031BD8:
/* CFD8 80031BD8 C6220458 */ lwc1 $f2, 0x458($s1)
/* CFDC 80031BDC C6200474 */ lwc1 $f0, 0x474($s1)
/* CFE0 80031BE0 46001301 */ sub.s $f12, $f2, $f0
/* CFE4 80031BE4 4608603C */ c.lt.s $f12, $f8
/* CFE8 80031BE8 00000000 */ nop
/* CFEC 80031BEC 45030001 */ bc1tl .L80031BF4
/* CFF0 80031BF0 46006307 */ neg.s $f12, $f12
.L80031BF4:
/* CFF4 80031BF4 460C303C */ c.lt.s $f6, $f12
/* CFF8 80031BF8 00000000 */ nop
/* CFFC 80031BFC 45000005 */ bc1f .L80031C14
/* D000 80031C00 00000000 */ nop
/* D004 80031C04 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* D008 80031C08 44810000 */ mtc1 $at, $f0
/* D00C 80031C0C 00000000 */ nop
/* D010 80031C10 460C0301 */ sub.s $f12, $f0, $f12
.L80031C14:
/* D014 80031C14 460CA03C */ c.lt.s $f20, $f12
/* D018 80031C18 00000000 */ nop
/* D01C 80031C1C 45030001 */ bc1tl .L80031C24
/* D020 80031C20 46006506 */ mov.s $f20, $f12
.L80031C24:
/* D024 80031C24 C6220450 */ lwc1 $f2, 0x450($s1)
/* D028 80031C28 C620046C */ lwc1 $f0, 0x46C($s1)
/* D02C 80031C2C 46001301 */ sub.s $f12, $f2, $f0
/* D030 80031C30 4608603C */ c.lt.s $f12, $f8
/* D034 80031C34 00000000 */ nop
/* D038 80031C38 45030001 */ bc1tl .L80031C40
/* D03C 80031C3C 46006307 */ neg.s $f12, $f12
.L80031C40:
/* D040 80031C40 460CA03C */ c.lt.s $f20, $f12
/* D044 80031C44 00000000 */ nop
/* D048 80031C48 45030001 */ bc1tl .L80031C50
/* D04C 80031C4C 46006506 */ mov.s $f20, $f12
.L80031C50:
/* D050 80031C50 C620045C */ lwc1 $f0, 0x45C($s1)
/* D054 80031C54 C6220478 */ lwc1 $f2, 0x478($s1)
/* D058 80031C58 46020001 */ sub.s $f0, $f0, $f2
/* D05C 80031C5C 46000302 */ mul.s $f12, $f0, $f0
/* D060 80031C60 00000000 */ nop
/* D064 80031C64 C6240460 */ lwc1 $f4, 0x460($s1)
/* D068 80031C68 C620047C */ lwc1 $f0, 0x47C($s1)
/* D06C 80031C6C 46002101 */ sub.s $f4, $f4, $f0
/* D070 80031C70 46042102 */ mul.s $f4, $f4, $f4
/* D074 80031C74 00000000 */ nop
/* D078 80031C78 C6220480 */ lwc1 $f2, 0x480($s1)
/* D07C 80031C7C C6200464 */ lwc1 $f0, 0x464($s1)
/* D080 80031C80 46020001 */ sub.s $f0, $f0, $f2
/* D084 80031C84 46000002 */ mul.s $f0, $f0, $f0
/* D088 80031C88 00000000 */ nop
/* D08C 80031C8C 46046300 */ add.s $f12, $f12, $f4
/* D090 80031C90 46006300 */ add.s $f12, $f12, $f0
/* D094 80031C94 46086032 */ c.eq.s $f12, $f8
/* D098 80031C98 00000000 */ nop
/* D09C 80031C9C 4501000E */ bc1t .L80031CD8
/* D0A0 80031CA0 00000000 */ nop
/* D0A4 80031CA4 46006004 */ sqrt.s $f0, $f12
/* D0A8 80031CA8 46000032 */ c.eq.s $f0, $f0
/* D0AC 80031CAC 00000000 */ nop
/* D0B0 80031CB0 45010003 */ bc1t .L80031CC0
/* D0B4 80031CB4 00000000 */ nop
/* D0B8 80031CB8 0C0187BC */ jal sqrtf
/* D0BC 80031CBC 00000000 */ nop
.L80031CC0:
/* D0C0 80031CC0 3C01800A */ lui $at, %hi(D_80098260)
/* D0C4 80031CC4 D4228260 */ ldc1 $f2, %lo(D_80098260)($at)
/* D0C8 80031CC8 46000021 */ cvt.d.s $f0, $f0
/* D0CC 80031CCC 46220002 */ mul.d $f0, $f0, $f2
/* D0D0 80031CD0 00000000 */ nop
/* D0D4 80031CD4 46200320 */ cvt.s.d $f12, $f0
.L80031CD8:
/* D0D8 80031CD8 460CA03C */ c.lt.s $f20, $f12
/* D0DC 80031CDC 00000000 */ nop
/* D0E0 80031CE0 45030001 */ bc1tl .L80031CE8
/* D0E4 80031CE4 46006506 */ mov.s $f20, $f12
.L80031CE8:
/* D0E8 80031CE8 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* D0EC 80031CEC 44810000 */ mtc1 $at, $f0
/* D0F0 80031CF0 00000000 */ nop
/* D0F4 80031CF4 4614003C */ c.lt.s $f0, $f20
/* D0F8 80031CF8 00000000 */ nop
/* D0FC 80031CFC 45030001 */ bc1tl .L80031D04
/* D100 80031D00 46000506 */ mov.s $f20, $f0
.L80031D04:
/* D104 80031D04 3C0141A0 */ lui $at, (0x41A00000 >> 16)
/* D108 80031D08 44810000 */ mtc1 $at, $f0
/* D10C 80031D0C 00000000 */ nop
/* D110 80031D10 4600A03C */ c.lt.s $f20, $f0
/* D114 80031D14 00000000 */ nop
/* D118 80031D18 45030001 */ bc1tl .L80031D20
/* D11C 80031D1C 46000506 */ mov.s $f20, $f0
.L80031D20:
/* D120 80031D20 44800000 */ mtc1 $zero, $f0
/* D124 80031D24 00000000 */ nop
/* D128 80031D28 4600A032 */ c.eq.s $f20, $f0
/* D12C 80031D2C 00000000 */ nop
/* D130 80031D30 4501000E */ bc1t .L80031D6C
/* D134 80031D34 00000000 */ nop
/* D138 80031D38 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* D13C 80031D3C 44812000 */ mtc1 $at, $f4
/* D140 80031D40 C620048C */ lwc1 $f0, 0x48C($s1)
/* D144 80031D44 46142083 */ div.s $f2, $f4, $f20
/* D148 80031D48 46001082 */ mul.s $f2, $f2, $f0
/* D14C 80031D4C 00000000 */ nop
/* D150 80031D50 C6200488 */ lwc1 $f0, 0x488($s1)
/* D154 80031D54 46020000 */ add.s $f0, $f0, $f2
/* D158 80031D58 4600203C */ c.lt.s $f4, $f0
/* D15C 80031D5C 00000000 */ nop
/* D160 80031D60 45000002 */ bc1f .L80031D6C
/* D164 80031D64 E6200488 */ swc1 $f0, 0x488($s1)
/* D168 80031D68 E6240488 */ swc1 $f4, 0x488($s1)
.L80031D6C:
/* D16C 80031D6C C6200484 */ lwc1 $f0, 0x484($s1)
/* D170 80031D70 3C013FF0 */ lui $at, (0x3FF00000 >> 16)
/* D174 80031D74 4481E800 */ mtc1 $at, $f29
/* D178 80031D78 4480E000 */ mtc1 $zero, $f28
/* D17C 80031D7C 46000021 */ cvt.d.s $f0, $f0
/* D180 80031D80 463C003C */ c.lt.d $f0, $f28
/* D184 80031D84 00000000 */ nop
/* D188 80031D88 45000036 */ bc1f .L80031E64
/* D18C 80031D8C 00000000 */ nop
/* D190 80031D90 C6340508 */ lwc1 $f20, 0x508($s1)
/* D194 80031D94 3C01800A */ lui $at, %hi(D_80098268)
/* D198 80031D98 D4388268 */ ldc1 $f24, %lo(D_80098268)($at)
/* D19C 80031D9C 4600A5A1 */ cvt.d.s $f22, $f20
/* D1A0 80031DA0 4638B582 */ mul.d $f22, $f22, $f24
/* D1A4 80031DA4 00000000 */ nop
/* D1A8 80031DA8 4620B5A0 */ cvt.s.d $f22, $f22
/* D1AC 80031DAC 0C00A874 */ jal cos_rad
/* D1B0 80031DB0 4600B306 */ mov.s $f12, $f22
/* D1B4 80031DB4 C62C0488 */ lwc1 $f12, 0x488($s1)
/* D1B8 80031DB8 46006321 */ cvt.d.s $f12, $f12
/* D1BC 80031DBC 46386302 */ mul.d $f12, $f12, $f24
/* D1C0 80031DC0 00000000 */ nop
/* D1C4 80031DC4 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* D1C8 80031DC8 4481D000 */ mtc1 $at, $f26
/* D1CC 80031DCC 00000000 */ nop
/* D1D0 80031DD0 4614D501 */ sub.s $f20, $f26, $f20
/* D1D4 80031DD4 4600A521 */ cvt.d.s $f20, $f20
/* D1D8 80031DD8 46346302 */ mul.d $f12, $f12, $f20
/* D1DC 80031DDC 00000000 */ nop
/* D1E0 80031DE0 461A0600 */ add.s $f24, $f0, $f26
/* D1E4 80031DE4 4600B0A1 */ cvt.d.s $f2, $f22
/* D1E8 80031DE8 3C014000 */ lui $at, (0x40000000 >> 16)
/* D1EC 80031DEC 4481A000 */ mtc1 $at, $f20
/* D1F0 80031DF0 46226300 */ add.d $f12, $f12, $f2
/* D1F4 80031DF4 4618A603 */ div.s $f24, $f20, $f24
/* D1F8 80031DF8 0C00A874 */ jal cos_rad
/* D1FC 80031DFC 46206320 */ cvt.s.d $f12, $f12
/* D200 80031E00 4600B306 */ mov.s $f12, $f22
/* D204 80031E04 0C00A874 */ jal cos_rad
/* D208 80031E08 460005A1 */ cvt.d.s $f22, $f0
/* D20C 80031E0C 46000021 */ cvt.d.s $f0, $f0
/* D210 80031E10 4620E001 */ sub.d $f0, $f28, $f0
/* D214 80031E14 3C013FE0 */ lui $at, (0x3FE00000 >> 16)
/* D218 80031E18 44811800 */ mtc1 $at, $f3
/* D21C 80031E1C 44801000 */ mtc1 $zero, $f2
/* D220 80031E20 00000000 */ nop
/* D224 80031E24 46220002 */ mul.d $f0, $f0, $f2
/* D228 80031E28 00000000 */ nop
/* D22C 80031E2C 4620B580 */ add.d $f22, $f22, $f0
/* D230 80031E30 4600C621 */ cvt.d.s $f24, $f24
/* D234 80031E34 4638B582 */ mul.d $f22, $f22, $f24
/* D238 80031E38 00000000 */ nop
/* D23C 80031E3C 4620B5A0 */ cvt.s.d $f22, $f22
/* D240 80031E40 461AB680 */ add.s $f26, $f22, $f26
/* D244 80031E44 461AA501 */ sub.s $f20, $f20, $f26
/* D248 80031E48 3C01800A */ lui $at, %hi(D_80098270)
/* D24C 80031E4C D4208270 */ ldc1 $f0, %lo(D_80098270)($at)
/* D250 80031E50 4600A521 */ cvt.d.s $f20, $f20
/* D254 80031E54 4620A502 */ mul.d $f20, $f20, $f0
/* D258 80031E58 00000000 */ nop
/* D25C 80031E5C 4620A5A0 */ cvt.s.d $f22, $f20
/* D260 80031E60 E6360484 */ swc1 $f22, 0x484($s1)
.L80031E64:
/* D264 80031E64 C6200484 */ lwc1 $f0, 0x484($s1)
/* D268 80031E68 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* D26C 80031E6C 44814000 */ mtc1 $at, $f8
/* D270 80031E70 00000000 */ nop
/* D274 80031E74 4600403E */ c.le.s $f8, $f0
/* D278 80031E78 00000000 */ nop
/* D27C 80031E7C 45000003 */ bc1f .L80031E8C
/* D280 80031E80 00000000 */ nop
/* D284 80031E84 E6280484 */ swc1 $f8, 0x484($s1)
/* D288 80031E88 AE200488 */ sw $zero, 0x488($s1)
.L80031E8C:
/* D28C 80031E8C C6260484 */ lwc1 $f6, 0x484($s1)
/* D290 80031E90 C6200468 */ lwc1 $f0, 0x468($s1)
/* D294 80031E94 46060002 */ mul.s $f0, $f0, $f6
/* D298 80031E98 00000000 */ nop
/* D29C 80031E9C 46064201 */ sub.s $f8, $f8, $f6
/* D2A0 80031EA0 C622044C */ lwc1 $f2, 0x44C($s1)
/* D2A4 80031EA4 C7B00038 */ lwc1 $f16, 0x38($sp)
/* D2A8 80031EA8 46081082 */ mul.s $f2, $f2, $f8
/* D2AC 80031EAC 00000000 */ nop
/* D2B0 80031EB0 E63004A4 */ swc1 $f16, 0x4A4($s1)
/* D2B4 80031EB4 E63E04A8 */ swc1 $f30, 0x4A8($s1)
/* D2B8 80031EB8 C7B0003C */ lwc1 $f16, 0x3C($sp)
/* D2BC 80031EBC 46001080 */ add.s $f2, $f2, $f0
/* D2C0 80031EC0 3C12800A */ lui $s2, %hi(gCurrentCamConfiguration)
/* D2C4 80031EC4 265208C0 */ addiu $s2, $s2, %lo(gCurrentCamConfiguration)
/* D2C8 80031EC8 E63004AC */ swc1 $f16, 0x4AC($s1)
/* D2CC 80031ECC E6420000 */ swc1 $f2, 0x0($s2)
/* D2D0 80031ED0 C6240450 */ lwc1 $f4, 0x450($s1)
/* D2D4 80031ED4 46082102 */ mul.s $f4, $f4, $f8
/* D2D8 80031ED8 00000000 */ nop
/* D2DC 80031EDC C620046C */ lwc1 $f0, 0x46C($s1)
/* D2E0 80031EE0 46060002 */ mul.s $f0, $f0, $f6
/* D2E4 80031EE4 00000000 */ nop
/* D2E8 80031EE8 46002100 */ add.s $f4, $f4, $f0
/* D2EC 80031EEC E6440004 */ swc1 $f4, 0x4($s2)
/* D2F0 80031EF0 C6220454 */ lwc1 $f2, 0x454($s1)
/* D2F4 80031EF4 46081082 */ mul.s $f2, $f2, $f8
/* D2F8 80031EF8 00000000 */ nop
/* D2FC 80031EFC C6200470 */ lwc1 $f0, 0x470($s1)
/* D300 80031F00 46060002 */ mul.s $f0, $f0, $f6
/* D304 80031F04 00000000 */ nop
/* D308 80031F08 46001080 */ add.s $f2, $f2, $f0
/* D30C 80031F0C E6420008 */ swc1 $f2, 0x8($s2)
/* D310 80031F10 C6220458 */ lwc1 $f2, 0x458($s1)
/* D314 80031F14 46081082 */ mul.s $f2, $f2, $f8
/* D318 80031F18 00000000 */ nop
/* D31C 80031F1C C6200474 */ lwc1 $f0, 0x474($s1)
/* D320 80031F20 46060002 */ mul.s $f0, $f0, $f6
/* D324 80031F24 00000000 */ nop
/* D328 80031F28 46001080 */ add.s $f2, $f2, $f0
/* D32C 80031F2C E642000C */ swc1 $f2, 0xC($s2)
/* D330 80031F30 C622045C */ lwc1 $f2, 0x45C($s1)
/* D334 80031F34 46081082 */ mul.s $f2, $f2, $f8
/* D338 80031F38 00000000 */ nop
/* D33C 80031F3C C6200478 */ lwc1 $f0, 0x478($s1)
/* D340 80031F40 46060002 */ mul.s $f0, $f0, $f6
/* D344 80031F44 00000000 */ nop
/* D348 80031F48 46001080 */ add.s $f2, $f2, $f0
/* D34C 80031F4C E6420010 */ swc1 $f2, 0x10($s2)
/* D350 80031F50 C6220460 */ lwc1 $f2, 0x460($s1)
/* D354 80031F54 46081082 */ mul.s $f2, $f2, $f8
/* D358 80031F58 00000000 */ nop
/* D35C 80031F5C C620047C */ lwc1 $f0, 0x47C($s1)
/* D360 80031F60 46060002 */ mul.s $f0, $f0, $f6
/* D364 80031F64 00000000 */ nop
/* D368 80031F68 46001080 */ add.s $f2, $f2, $f0
/* D36C 80031F6C E6420014 */ swc1 $f2, 0x14($s2)
/* D370 80031F70 C6220464 */ lwc1 $f2, 0x464($s1)
/* D374 80031F74 46081082 */ mul.s $f2, $f2, $f8
/* D378 80031F78 00000000 */ nop
/* D37C 80031F7C C6200480 */ lwc1 $f0, 0x480($s1)
/* D380 80031F80 46060002 */ mul.s $f0, $f0, $f6
/* D384 80031F84 00000000 */ nop
/* D388 80031F88 46001080 */ add.s $f2, $f2, $f0
/* D38C 80031F8C E6420018 */ swc1 $f2, 0x18($s2)
/* D390 80031F90 8622002A */ lh $v0, 0x2A($s1)
/* D394 80031F94 44820000 */ mtc1 $v0, $f0
/* D398 80031F98 00000000 */ nop
/* D39C 80031F9C 46800020 */ cvt.s.w $f0, $f0
/* D3A0 80031FA0 46002102 */ mul.s $f4, $f4, $f0
/* D3A4 80031FA4 00000000 */ nop
/* D3A8 80031FA8 3C01800A */ lui $at, %hi(D_80098278)
/* D3AC 80031FAC D4208278 */ ldc1 $f0, %lo(D_80098278)($at)
/* D3B0 80031FB0 46002121 */ cvt.d.s $f4, $f4
/* D3B4 80031FB4 46202102 */ mul.d $f4, $f4, $f0
/* D3B8 80031FB8 00000000 */ nop
/* D3BC 80031FBC 0220202D */ daddu $a0, $s1, $zero
/* D3C0 80031FC0 46202120 */ cvt.s.d $f4, $f4
/* D3C4 80031FC4 0C00C114 */ jal func_80030450
/* D3C8 80031FC8 E6440004 */ swc1 $f4, 0x4($s2)
/* D3CC 80031FCC C6540000 */ lwc1 $f20, 0x0($s2)
/* D3D0 80031FD0 3C01800A */ lui $at, %hi(D_800A08E0)
/* D3D4 80031FD4 C42008E0 */ lwc1 $f0, %lo(D_800A08E0)($at)
/* D3D8 80031FD8 4600A500 */ add.s $f20, $f20, $f0
/* D3DC 80031FDC 0C00A8BB */ jal sin_deg
/* D3E0 80031FE0 4600A306 */ mov.s $f12, $f20
/* D3E4 80031FE4 4600A306 */ mov.s $f12, $f20
/* D3E8 80031FE8 0C00A8D4 */ jal cos_deg
/* D3EC 80031FEC 46000686 */ mov.s $f26, $f0
/* D3F0 80031FF0 3C10800A */ lui $s0, %hi(D_800A08DC)
/* D3F4 80031FF4 261008DC */ addiu $s0, $s0, %lo(D_800A08DC)
/* D3F8 80031FF8 C6420008 */ lwc1 $f2, 0x8($s2)
/* D3FC 80031FFC C60C0000 */ lwc1 $f12, 0x0($s0)
/* D400 80032000 460C1300 */ add.s $f12, $f2, $f12
/* D404 80032004 0C00A8D4 */ jal cos_deg
/* D408 80032008 46000607 */ neg.s $f24, $f0
/* D40C 8003200C C6420008 */ lwc1 $f2, 0x8($s2)
/* D410 80032010 C60C0000 */ lwc1 $f12, 0x0($s0)
/* D414 80032014 460C1300 */ add.s $f12, $f2, $f12
/* D418 80032018 0C00A8BB */ jal sin_deg
/* D41C 8003201C 46000586 */ mov.s $f22, $f0
/* D420 80032020 96220002 */ lhu $v0, 0x2($s1)
/* D424 80032024 30420002 */ andi $v0, $v0, 0x2
/* D428 80032028 14400007 */ bnez $v0, .L80032048
/* D42C 8003202C 46000506 */ mov.s $f20, $f0
/* D430 80032030 C6420004 */ lwc1 $f2, 0x4($s2)
/* D434 80032034 46141082 */ mul.s $f2, $f2, $f20
/* D438 80032038 00000000 */ nop
/* D43C 8003203C C6400014 */ lwc1 $f0, 0x14($s2)
/* D440 80032040 46020000 */ add.s $f0, $f0, $f2
/* D444 80032044 E6200040 */ swc1 $f0, 0x40($s1)
.L80032048:
/* D448 80032048 C6420004 */ lwc1 $f2, 0x4($s2)
/* D44C 8003204C 4602D082 */ mul.s $f2, $f26, $f2
/* D450 80032050 00000000 */ nop
/* D454 80032054 46161082 */ mul.s $f2, $f2, $f22
/* D458 80032058 00000000 */ nop
/* D45C 8003205C C6400010 */ lwc1 $f0, 0x10($s2)
/* D460 80032060 46020001 */ sub.s $f0, $f0, $f2
/* D464 80032064 E620003C */ swc1 $f0, 0x3C($s1)
/* D468 80032068 C6420004 */ lwc1 $f2, 0x4($s2)
/* D46C 8003206C 4602C082 */ mul.s $f2, $f24, $f2
/* D470 80032070 00000000 */ nop
/* D474 80032074 46161082 */ mul.s $f2, $f2, $f22
/* D478 80032078 00000000 */ nop
/* D47C 8003207C C6400018 */ lwc1 $f0, 0x18($s2)
/* D480 80032080 46020001 */ sub.s $f0, $f0, $f2
/* D484 80032084 E6200044 */ swc1 $f0, 0x44($s1)
/* D488 80032088 C64C000C */ lwc1 $f12, 0xC($s2)
/* D48C 8003208C 0C00A8D4 */ jal cos_deg
/* D490 80032090 46006307 */ neg.s $f12, $f12
/* D494 80032094 C64C000C */ lwc1 $f12, 0xC($s2)
/* D498 80032098 46000586 */ mov.s $f22, $f0
/* D49C 8003209C 0C00A8BB */ jal sin_deg
/* D4A0 800320A0 46006307 */ neg.s $f12, $f12
/* D4A4 800320A4 C624003C */ lwc1 $f4, 0x3C($s1)
/* D4A8 800320A8 C6420010 */ lwc1 $f2, 0x10($s2)
/* D4AC 800320AC 46022032 */ c.eq.s $f4, $f2
/* D4B0 800320B0 00000000 */ nop
/* D4B4 800320B4 4500000A */ bc1f .L800320E0
/* D4B8 800320B8 46000506 */ mov.s $f20, $f0
/* D4BC 800320BC C6220044 */ lwc1 $f2, 0x44($s1)
/* D4C0 800320C0 C6400018 */ lwc1 $f0, 0x18($s2)
/* D4C4 800320C4 46001032 */ c.eq.s $f2, $f0
/* D4C8 800320C8 00000000 */ nop
/* D4CC 800320CC 45000004 */ bc1f .L800320E0
/* D4D0 800320D0 00000000 */ nop
/* D4D4 800320D4 44802000 */ mtc1 $zero, $f4
/* D4D8 800320D8 0800C840 */ j .L80032100
/* D4DC 800320DC 00000000 */ nop
.L800320E0:
/* D4E0 800320E0 3C02800A */ lui $v0, %hi(gCurrentCamConfiguration)
/* D4E4 800320E4 244208C0 */ addiu $v0, $v0, %lo(gCurrentCamConfiguration)
/* D4E8 800320E8 C62C003C */ lwc1 $f12, 0x3C($s1)
/* D4EC 800320EC C62E0044 */ lwc1 $f14, 0x44($s1)
/* D4F0 800320F0 8C460010 */ lw $a2, 0x10($v0)
/* D4F4 800320F4 0C00A7B5 */ jal dist2D
/* D4F8 800320F8 8C470018 */ lw $a3, 0x18($v0)
/* D4FC 800320FC 46000106 */ mov.s $f4, $f0
.L80032100:
/* D500 80032100 3C03800A */ lui $v1, %hi(gCurrentCamConfiguration)
/* D504 80032104 246308C0 */ addiu $v1, $v1, %lo(gCurrentCamConfiguration)
/* D508 80032108 C4600014 */ lwc1 $f0, 0x14($v1)
/* D50C 8003210C 96220002 */ lhu $v0, 0x2($s1)
/* D510 80032110 C6260040 */ lwc1 $f6, 0x40($s1)
/* D514 80032114 30420002 */ andi $v0, $v0, 0x2
/* D518 80032118 14400008 */ bnez $v0, .L8003213C
/* D51C 8003211C 46060201 */ sub.s $f8, $f0, $f6
/* D520 80032120 46142002 */ mul.s $f0, $f4, $f20
/* D524 80032124 00000000 */ nop
/* D528 80032128 46164082 */ mul.s $f2, $f8, $f22
/* D52C 8003212C 00000000 */ nop
/* D530 80032130 46020000 */ add.s $f0, $f0, $f2
/* D534 80032134 46003000 */ add.s $f0, $f6, $f0
/* D538 80032138 E620004C */ swc1 $f0, 0x4C($s1)
.L8003213C:
/* D53C 8003213C 46162102 */ mul.s $f4, $f4, $f22
/* D540 80032140 00000000 */ nop
/* D544 80032144 46144002 */ mul.s $f0, $f8, $f20
/* D548 80032148 00000000 */ nop
/* D54C 8003214C 46002101 */ sub.s $f4, $f4, $f0
/* D550 80032150 4604D002 */ mul.s $f0, $f26, $f4
/* D554 80032154 00000000 */ nop
/* D558 80032158 4604C102 */ mul.s $f4, $f24, $f4
/* D55C 8003215C 00000000 */ nop
/* D560 80032160 C622003C */ lwc1 $f2, 0x3C($s1)
/* D564 80032164 46001080 */ add.s $f2, $f2, $f0
/* D568 80032168 C6200044 */ lwc1 $f0, 0x44($s1)
/* D56C 8003216C 46040000 */ add.s $f0, $f0, $f4
/* D570 80032170 E6220048 */ swc1 $f2, 0x48($s1)
/* D574 80032174 3C01800A */ lui $at, %hi(D_800A08E0)
/* D578 80032178 C42208E0 */ lwc1 $f2, %lo(D_800A08E0)($at)
/* D57C 8003217C E6200050 */ swc1 $f0, 0x50($s1)
/* D580 80032180 C4600000 */ lwc1 $f0, 0x0($v1)
/* D584 80032184 46020000 */ add.s $f0, $f0, $f2
/* D588 80032188 C6240048 */ lwc1 $f4, 0x48($s1)
/* D58C 8003218C E620006C */ swc1 $f0, 0x6C($s1)
/* D590 80032190 E6200084 */ swc1 $f0, 0x84($s1)
/* D594 80032194 C4600004 */ lwc1 $f0, 0x4($v1)
/* D598 80032198 E6200078 */ swc1 $f0, 0x78($s1)
/* D59C 8003219C C4600000 */ lwc1 $f0, 0x0($v1)
/* D5A0 800321A0 C622004C */ lwc1 $f2, 0x4C($s1)
/* D5A4 800321A4 46000007 */ neg.s $f0, $f0
/* D5A8 800321A8 E6200090 */ swc1 $f0, 0x90($s1)
/* D5AC 800321AC C4600008 */ lwc1 $f0, 0x8($v1)
/* D5B0 800321B0 C466000C */ lwc1 $f6, 0xC($v1)
/* D5B4 800321B4 E6220058 */ swc1 $f2, 0x58($s1)
/* D5B8 800321B8 C6220050 */ lwc1 $f2, 0x50($s1)
/* D5BC 800321BC E6240054 */ swc1 $f4, 0x54($s1)
/* D5C0 800321C0 46000007 */ neg.s $f0, $f0
/* D5C4 800321C4 46060001 */ sub.s $f0, $f0, $f6
/* D5C8 800321C8 AE20007C */ sw $zero, 0x7C($s1)
/* D5CC 800321CC E622005C */ swc1 $f2, 0x5C($s1)
/* D5D0 800321D0 E6200094 */ swc1 $f0, 0x94($s1)
/* D5D4 800321D4 8FBF004C */ lw $ra, 0x4C($sp)
/* D5D8 800321D8 8FB20048 */ lw $s2, 0x48($sp)
/* D5DC 800321DC 8FB10044 */ lw $s1, 0x44($sp)
/* D5E0 800321E0 8FB00040 */ lw $s0, 0x40($sp)
/* D5E4 800321E4 D7BE0078 */ ldc1 $f30, 0x78($sp)
/* D5E8 800321E8 D7BC0070 */ ldc1 $f28, 0x70($sp)
/* D5EC 800321EC D7BA0068 */ ldc1 $f26, 0x68($sp)
/* D5F0 800321F0 D7B80060 */ ldc1 $f24, 0x60($sp)
/* D5F4 800321F4 D7B60058 */ ldc1 $f22, 0x58($sp)
/* D5F8 800321F8 D7B40050 */ ldc1 $f20, 0x50($sp)
/* D5FC 800321FC 03E00008 */ jr $ra
/* D600 80032200 27BD0080 */ addiu $sp, $sp, 0x80
/* D604 80032204 00000000 */ nop
/* D608 80032208 00000000 */ nop
/* D60C 8003220C 00000000 */ nop
### DECOMPILED C INSTRUCTIONS:
void update_camera_zone_interp(Camera* camera) {
CameraControlSettings* currentController;
CameraControlSettings* cs;
CameraControlSettings* cs2;
f32 targetX;
f32 targetY;
f32 targetZ;
f32 deltaX;
f32 deltaY;
f32 deltaZ;
f32 maxDelta;
f32 delta;
f32 deltaSqSum;
f32 panPhase;
f32 temp_f20_2;
f32 panRad;
f32 cosAngle;
f32 sinAngle;
f32 temp_f24;
f32 temp_f24_2;
f32 temp_f26;
f32 temp_f4_4;
f32 interpAlpha;
f32 interpAlphaInv;
f32 temp_f8_2;
f64 temp_f22_2;
s32 cond2;
f32 posX;
f32 posY;
f32 posZ;
f32 tX;
f32 tY;
f32 tZ;
s32 changingZone;
f32 dist;
f32 tempX;
f32 tempZ;
targetX = camera->targetPos.x;
targetY = camera->targetPos.y;
targetZ = camera->targetPos.z;
changingZone = FALSE;
if (camera->isChangingMap) {
camera->currentController = NULL;
camera->prevController = NULL;
camera->linearInterp = 0.0f;
camera->unk_494 = 0.0f;
camera->savedTargetY = targetY;
camera->unk_98 = 0;
camera->unk_9C = 0;
camera->prevTargetPos.x = 0.0f;
camera->prevTargetPos.y = 0.0f;
camera->prevTargetPos.z = 0.0f;
camera->prevPrevFollowFlags = 0;
camera->prevFollowFlags = 0;
camera->panPhase = 0.0f;
D_800A08DC = 0.0f;
D_800A08E0 = 0.0f;
camera->interpAlpha = 1.0f;
camera->unk_498 = 1.0f;
camera->linearInterpScale = 1.0f;
}
tempX = targetX;
if (camera->moveFlags & CAMERA_MOVE_IGNORE_PLAYER_Y) {
camera->unk_498 = 0.0f;
} else if (camera->unk_494 != targetY) {
camera->unk_494 = targetY;
camera->unk_498 = 0.0f;
}
if (targetY < camera->unk_494 && targetY <= camera->savedTargetY) {
camera->unk_494 = targetY;
camera->unk_498 = 1.0f;
}
camera->unk_498 += (1.01 - camera->unk_498) / camera->unk_49C;
if (camera->unk_498 > 1.0) {
camera->unk_498 = 1.0f;
}
if (camera->moveFlags & CAMERA_MOVE_FLAG_4) {
camera->unk_498 += 0.3;
if (camera->unk_498 >= 1.0) {
camera->unk_498 = 1.0f;
}
}
if (!(camera->moveFlags & CAMERA_MOVE_FLAG_2)) {
camera->savedTargetY += (camera->unk_494 - camera->savedTargetY) * camera->unk_498;
}
tempZ = targetZ;
if (camera->panActive
|| camera->prevTargetPos.x != targetX
|| camera->prevTargetPos.y != targetY
|| camera->prevTargetPos.z != targetZ
|| camera->isChangingMap
) {
if (camera->followPlayer) {
cs = &camera->controlSettings;
} else {
cs = test_ray_zone_aabb(targetX, targetY + 10.0f, targetZ);
}
cond2 = FALSE;
cs2 = cs;
currentController = camera->currentController;
if (cs != NULL
&& currentController != NULL
&& cs->type == currentController->type
&& cs->flag == currentController->flag
&& cs->boomLength == currentController->boomLength
&& cs->boomPitch == currentController->boomPitch
&& cs->viewPitch == currentController->viewPitch
) {
switch (cs->type) {
case CAM_CONTROL_FIXED_ORIENTATION:
if (cs->points.two.Ax == currentController->points.two.Ax
&& cs->points.two.Az == currentController->points.two.Az
&& cs->points.two.Bx == currentController->points.two.Bx
&& cs->points.two.Bz == currentController->points.two.Bz
) {
cond2 = TRUE;
}
break;
case CAM_CONTROL_LOOK_AT_POINT:
switch (cs->flag){
case 0:
if (cs->points.two.Ax == currentController->points.two.Ax
&& cs->points.two.Az == currentController->points.two.Az
) {
cond2 = TRUE;
}
break;
case 1:
if (cs->points.two.Ax == currentController->points.two.Ax
&& cs->points.two.Az == currentController->points.two.Az
&& cs->points.two.Bx == currentController->points.two.Bx
&& cs->points.two.Bz == currentController->points.two.Bz
) {
cond2 = TRUE;
}
break;
}
break;
default:
if (cs2->points.two.Ax == currentController->points.two.Ax
&& cs2->points.two.Az == currentController->points.two.Az
&& cs2->points.two.Ay == currentController->points.two.Ay
&& cs2->points.two.By == currentController->points.two.By
&& cs2->points.two.Bx == currentController->points.two.Bx
&& cs2->points.two.Bz == currentController->points.two.Bz
) {
cond2 = TRUE;
}
break;
}
}
if (camera->panActive || (!cond2 && cs2 != currentController)) {
if (camera->interpAlpha == 1.0f) {
camera->prevController = camera->currentController;
} else {
camera->prevController = (CameraControlSettings*) CAMERA_SETTINGS_PTR_MINUS_1;
}
changingZone = TRUE;
camera->prevConfiguration = gCurrentCamConfiguration;
camera->currentController = cs;
camera->interpAlpha = 0.0f;
camera->linearInterp = 0.0f;
camera->panActive = FALSE;
camera->linearInterpScale = camera->moveSpeed;
camera->prevPrevFollowFlags = camera->prevFollowFlags;
camera->prevFollowFlags = camera->followPlayer;
camera->prevPrevMovePos.x = camera->prevMovePos.x;
camera->prevPrevMovePos.y = camera->prevMovePos.y;
camera->prevPrevMovePos.z = camera->prevMovePos.z;
camera->prevMovePos.x = camera->movePos.x;
camera->prevMovePos.y = camera->movePos.y;
camera->prevMovePos.z = camera->movePos.z;
}
}
if (camera->prevPrevFollowFlags) {
posX = camera->prevPrevMovePos.x;
posY = camera->prevPrevMovePos.y;
posZ = camera->prevPrevMovePos.z;
} else {
posX = tempX;
posY = camera->savedTargetY;
posZ = tempZ;
}
if (camera->prevFollowFlags) {
camera->savedTargetY = camera->prevMovePos.y;
tX = camera->prevMovePos.x;
tY = camera->savedTargetY;
tZ = camera->prevMovePos.z;
} else {
tX = tempX;
tY = camera->savedTargetY;
tZ = tempZ;
}
update_camera_from_controller(camera, &camera->prevConfiguration, &camera->prevController,
&camera->goalConfiguration, &camera->currentController, posX, posY, posZ, tX, tY, tZ,
camera->isChangingMap, &camera->interpAlpha, changingZone);
if (camera->isChangingMap) {
camera->prevConfiguration = camera->goalConfiguration;
camera->isChangingMap = FALSE;
camera->interpAlpha = 1.0f;
}
if (camera->prevConfiguration.boomYaw - camera->goalConfiguration.boomYaw > 180.0f) {
camera->prevConfiguration.boomYaw -= 360.0f;
}
if (camera->prevConfiguration.boomYaw - camera->goalConfiguration.boomYaw < -180.0f) {
camera->prevConfiguration.boomYaw += 360.0f;
}
delta = camera->prevConfiguration.boomYaw - camera->goalConfiguration.boomYaw;
if (delta < 0.0f) {
delta = -delta;
}
if (delta > 180.0f) {
delta = 360.0f - delta;
}
maxDelta = delta;
delta = camera->prevConfiguration.boomPitch - camera->goalConfiguration.boomPitch;
if (delta < 0.0f) {
delta = -delta;
}
if (delta > 180.0f) {
delta = 360.0f - delta;
}
if (maxDelta < delta) {
maxDelta = delta;
}
delta = camera->prevConfiguration.viewPitch - camera->goalConfiguration.viewPitch;
if (delta < 0.0f) {
delta = -delta;
}
if (delta > 180.0f) {
delta = 360.0f - delta;
}
if (maxDelta < delta) {
maxDelta = delta;
}
delta = camera->prevConfiguration.boomLength - camera->goalConfiguration.boomLength;
if (delta < 0.0f) {
delta = -delta;
}
if (maxDelta < delta) {
maxDelta = delta;
}
deltaX = camera->prevConfiguration.targetPos.x - camera->goalConfiguration.targetPos.x;
deltaY = camera->prevConfiguration.targetPos.y - camera->goalConfiguration.targetPos.y;
deltaZ = camera->prevConfiguration.targetPos.z - camera->goalConfiguration.targetPos.z;
delta = SQ(deltaX);
delta += SQ(deltaY);
delta += SQ(deltaZ);
if (delta != 0.0f) {
delta = sqrtf(delta) * 0.2;
}
if (maxDelta < delta) {
maxDelta = delta;
delta++;
delta--;
}
if (maxDelta > 90.0f) {
maxDelta = 90.0f;
}
if (maxDelta < 20.0f) {
maxDelta = 20.0f;
}
if (maxDelta != 0.0f) {
camera->linearInterp += (1.0f / maxDelta) * camera->linearInterpScale;
if (camera->linearInterp > 1.0f) {
camera->linearInterp = 1.0f;
}
}
if (camera->interpAlpha < 1.0) {
panPhase = camera->panPhase;
panRad = panPhase * PI_D;
temp_f24 = 2.0f / (cos_rad(panRad) + 1.0f);
temp_f22_2 = cos_rad((camera->linearInterp * PI_D * (1.0f - panPhase)) + panRad);
cosAngle = (temp_f22_2 + (1.0 - cos_rad(panRad)) * 0.5) * temp_f24;
cosAngle = (2.0f - (cosAngle + 1.0f)) * 0.5001;
camera->interpAlpha = cosAngle;
}
if (camera->interpAlpha >= 1.0f) {
camera->interpAlpha = 1.0f;
camera->linearInterp = 0.0f;
}
camera->prevTargetPos.x = targetX;
camera->prevTargetPos.y = targetY;
camera->prevTargetPos.z = targetZ;
interpAlpha = camera->interpAlpha;
interpAlphaInv = 1.0f - interpAlpha;
gCurrentCamConfiguration.boomYaw = (camera->prevConfiguration.boomYaw * interpAlphaInv) + (camera->goalConfiguration.boomYaw * interpAlpha);
gCurrentCamConfiguration.boomLength = (camera->prevConfiguration.boomLength * interpAlphaInv) + (camera->goalConfiguration.boomLength * interpAlpha);
gCurrentCamConfiguration.boomPitch = (camera->prevConfiguration.boomPitch * interpAlphaInv) + (camera->goalConfiguration.boomPitch * interpAlpha);
gCurrentCamConfiguration.viewPitch = (camera->prevConfiguration.viewPitch * interpAlphaInv) + (camera->goalConfiguration.viewPitch * interpAlpha);
gCurrentCamConfiguration.targetPos.x = (camera->prevConfiguration.targetPos.x * interpAlphaInv) + (camera->goalConfiguration.targetPos.x * interpAlpha);
gCurrentCamConfiguration.targetPos.y = (camera->prevConfiguration.targetPos.y * interpAlphaInv) + (camera->goalConfiguration.targetPos.y * interpAlpha);
gCurrentCamConfiguration.targetPos.z = (camera->prevConfiguration.targetPos.z * interpAlphaInv) + (camera->goalConfiguration.targetPos.z * interpAlpha);
gCurrentCamConfiguration.boomLength *= camera->zoomPercent;
gCurrentCamConfiguration.boomLength *= 0.01;
func_80030450(camera);
temp_f20_2 = gCurrentCamConfiguration.boomYaw + D_800A08E0;
temp_f26 = sin_deg(temp_f20_2);
temp_f24_2 = -cos_deg(temp_f20_2);
cosAngle = cos_deg(gCurrentCamConfiguration.boomPitch + D_800A08DC);
sinAngle = sin_deg(gCurrentCamConfiguration.boomPitch + D_800A08DC);
if (!(camera->moveFlags & CAMERA_MOVE_FLAG_2)) {
camera->lookAt_eye.y = gCurrentCamConfiguration.targetPos.y + (gCurrentCamConfiguration.boomLength * sinAngle);
}
camera->lookAt_eye.x = gCurrentCamConfiguration.targetPos.x - (temp_f26 * gCurrentCamConfiguration.boomLength * cosAngle);
camera->lookAt_eye.z = gCurrentCamConfiguration.targetPos.z - (temp_f24_2 * gCurrentCamConfiguration.boomLength * cosAngle);
cosAngle = cos_deg(-gCurrentCamConfiguration.viewPitch);
sinAngle = sin_deg(-gCurrentCamConfiguration.viewPitch);
if (camera->lookAt_eye.x == gCurrentCamConfiguration.targetPos.x && camera->lookAt_eye.z == gCurrentCamConfiguration.targetPos.z) {
dist = 0.0f;
} else {
dist = dist2D(camera->lookAt_eye.x, camera->lookAt_eye.z, gCurrentCamConfiguration.targetPos.x, gCurrentCamConfiguration.targetPos.z);
}
temp_f8_2 = gCurrentCamConfiguration.targetPos.y - camera->lookAt_eye.y;
if (!(camera->moveFlags & CAMERA_MOVE_FLAG_2)) {
camera->lookAt_obj.y = camera->lookAt_eye.y + ((dist * sinAngle) + (temp_f8_2 * cosAngle));
}
temp_f4_4 = (dist * cosAngle) - (temp_f8_2 * sinAngle);
camera->lookAt_obj.x = camera->lookAt_eye.x + (temp_f26 * temp_f4_4);
camera->lookAt_obj.z = camera->lookAt_eye.z + (temp_f24_2 * temp_f4_4);
camera->currentYaw = gCurrentCamConfiguration.boomYaw + D_800A08E0;
camera->trueRotation.x = camera->currentYaw;
camera->currentBoomLength = gCurrentCamConfiguration.boomLength;
camera->currentBlendedYawNegated = -gCurrentCamConfiguration.boomYaw;
camera->currentPitch = -gCurrentCamConfiguration.boomPitch - gCurrentCamConfiguration.viewPitch;
camera->lookAt_obj_target.x = camera->lookAt_obj.x;
camera->lookAt_obj_target.y = camera->lookAt_obj.y;
camera->lookAt_obj_target.z = camera->lookAt_obj.z;
camera->currentYOffset = 0.0f;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel collision_main_lateral
/* 7CAEC 800E363C 27BDFF80 */ addiu $sp, $sp, -0x80
/* 7CAF0 800E3640 AFB1005C */ sw $s1, 0x5C($sp)
/* 7CAF4 800E3644 3C118011 */ lui $s1, %hi(gPlayerStatus)
/* 7CAF8 800E3648 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus)
/* 7CAFC 800E364C AFB40068 */ sw $s4, 0x68($sp)
/* 7CB00 800E3650 3C148016 */ lui $s4, %hi(gCollisionStatus)
/* 7CB04 800E3654 2694A550 */ addiu $s4, $s4, %lo(gCollisionStatus)
/* 7CB08 800E3658 AFBF006C */ sw $ra, 0x6C($sp)
/* 7CB0C 800E365C AFB30064 */ sw $s3, 0x64($sp)
/* 7CB10 800E3660 AFB20060 */ sw $s2, 0x60($sp)
/* 7CB14 800E3664 AFB00058 */ sw $s0, 0x58($sp)
/* 7CB18 800E3668 F7B60078 */ sdc1 $f22, 0x78($sp)
/* 7CB1C 800E366C F7B40070 */ sdc1 $f20, 0x70($sp)
/* 7CB20 800E3670 8E230000 */ lw $v1, 0x0($s1)
/* 7CB24 800E3674 2402FFFF */ addiu $v0, $zero, -0x1
/* 7CB28 800E3678 A6820000 */ sh $v0, 0x0($s4)
/* 7CB2C 800E367C 30624000 */ andi $v0, $v1, 0x4000
/* 7CB30 800E3680 10400012 */ beqz $v0, .L800E36CC
/* 7CB34 800E3684 3C020004 */ lui $v0, (0x40000 >> 16)
/* 7CB38 800E3688 C6220054 */ lwc1 $f2, 0x54($s1)
/* 7CB3C 800E368C 00621024 */ and $v0, $v1, $v0
/* 7CB40 800E3690 10400007 */ beqz $v0, .L800E36B0
/* 7CB44 800E3694 E7A20030 */ swc1 $f2, 0x30($sp)
/* 7CB48 800E3698 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 7CB4C 800E369C 44810000 */ mtc1 $at, $f0
/* 7CB50 800E36A0 00000000 */ nop
/* 7CB54 800E36A4 46001002 */ mul.s $f0, $f2, $f0
/* 7CB58 800E36A8 00000000 */ nop
/* 7CB5C 800E36AC E7A00030 */ swc1 $f0, 0x30($sp)
.L800E36B0:
/* 7CB60 800E36B0 26240028 */ addiu $a0, $s1, 0x28
/* 7CB64 800E36B4 8FA60030 */ lw $a2, 0x30($sp)
/* 7CB68 800E36B8 8E2700A0 */ lw $a3, 0xA0($s1)
/* 7CB6C 800E36BC 0C00A7E7 */ jal add_vec2D_polar
/* 7CB70 800E36C0 26250030 */ addiu $a1, $s1, 0x30
/* 7CB74 800E36C4 080390B8 */ j .L800E42E0
/* 7CB78 800E36C8 00000000 */ nop
.L800E36CC:
/* 7CB7C 800E36CC 922200B4 */ lbu $v0, 0xB4($s1)
/* 7CB80 800E36D0 2442FFF9 */ addiu $v0, $v0, -0x7
/* 7CB84 800E36D4 00021600 */ sll $v0, $v0, 24
/* 7CB88 800E36D8 00021E03 */ sra $v1, $v0, 24
/* 7CB8C 800E36DC 2C620020 */ sltiu $v0, $v1, 0x20
/* 7CB90 800E36E0 1040010D */ beqz $v0, .L800E3B18
/* 7CB94 800E36E4 00031080 */ sll $v0, $v1, 2
/* 7CB98 800E36E8 3C018011 */ lui $at, %hi(jtbl_8010BE58)
/* 7CB9C 800E36EC 00220821 */ addu $at, $at, $v0
/* 7CBA0 800E36F0 8C22BE58 */ lw $v0, %lo(jtbl_8010BE58)($at)
/* 7CBA4 800E36F4 00400008 */ jr $v0
/* 7CBA8 800E36F8 00000000 */ nop
glabel .L800E36FC
/* 7CBAC 800E36FC 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 7CBB0 800E3700 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 7CBB4 800E3704 C62200A8 */ lwc1 $f2, 0xA8($s1)
/* 7CBB8 800E3708 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 7CBBC 800E370C 44810000 */ mtc1 $at, $f0
/* 7CBC0 800E3710 00031080 */ sll $v0, $v1, 2
/* 7CBC4 800E3714 00431021 */ addu $v0, $v0, $v1
/* 7CBC8 800E3718 00021080 */ sll $v0, $v0, 2
/* 7CBCC 800E371C 00431023 */ subu $v0, $v0, $v1
/* 7CBD0 800E3720 000218C0 */ sll $v1, $v0, 3
/* 7CBD4 800E3724 00431021 */ addu $v0, $v0, $v1
/* 7CBD8 800E3728 000210C0 */ sll $v0, $v0, 3
/* 7CBDC 800E372C 46001081 */ sub.s $f2, $f2, $f0
/* 7CBE0 800E3730 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* 7CBE4 800E3734 00220821 */ addu $at, $at, $v0
/* 7CBE8 800E3738 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at)
/* 7CBEC 800E373C 46001080 */ add.s $f2, $f2, $f0
/* 7CBF0 800E3740 0000202D */ daddu $a0, $zero, $zero
/* 7CBF4 800E3744 44061000 */ mfc1 $a2, $f2
/* 7CBF8 800E3748 080390B6 */ j .L800E42D8
/* 7CBFC 800E374C 0080282D */ daddu $a1, $a0, $zero
glabel .L800E3750
/* 7CC00 800E3750 0C039422 */ jal get_current_partner_id
/* 7CC04 800E3754 00000000 */ nop
/* 7CC08 800E3758 00021600 */ sll $v0, $v0, 24
/* 7CC0C 800E375C 00021603 */ sra $v0, $v0, 24
/* 7CC10 800E3760 24030009 */ addiu $v1, $zero, 0x9
/* 7CC14 800E3764 144302DE */ bne $v0, $v1, .L800E42E0
/* 7CC18 800E3768 00000000 */ nop
/* 7CC1C 800E376C C6260028 */ lwc1 $f6, 0x28($s1)
/* 7CC20 800E3770 C620001C */ lwc1 $f0, 0x1C($s1)
/* 7CC24 800E3774 C624002C */ lwc1 $f4, 0x2C($s1)
/* 7CC28 800E3778 C628001C */ lwc1 $f8, 0x1C($s1)
/* 7CC2C 800E377C 46003180 */ add.s $f6, $f6, $f0
/* 7CC30 800E3780 C6200020 */ lwc1 $f0, 0x20($s1)
/* 7CC34 800E3784 44805000 */ mtc1 $zero, $f10
/* 7CC38 800E3788 46002100 */ add.s $f4, $f4, $f0
/* 7CC3C 800E378C C6220024 */ lwc1 $f2, 0x24($s1)
/* 7CC40 800E3790 C6200030 */ lwc1 $f0, 0x30($s1)
/* 7CC44 800E3794 460A4032 */ c.eq.s $f8, $f10
/* 7CC48 800E3798 46020000 */ add.s $f0, $f0, $f2
/* 7CC4C 800E379C E6260028 */ swc1 $f6, 0x28($s1)
/* 7CC50 800E37A0 E624002C */ swc1 $f4, 0x2C($s1)
/* 7CC54 800E37A4 4500000A */ bc1f .L800E37D0
/* 7CC58 800E37A8 E6200030 */ swc1 $f0, 0x30($s1)
/* 7CC5C 800E37AC C6200020 */ lwc1 $f0, 0x20($s1)
/* 7CC60 800E37B0 460A0032 */ c.eq.s $f0, $f10
/* 7CC64 800E37B4 00000000 */ nop
/* 7CC68 800E37B8 45000005 */ bc1f .L800E37D0
/* 7CC6C 800E37BC 46001006 */ mov.s $f0, $f2
/* 7CC70 800E37C0 460A0032 */ c.eq.s $f0, $f10
/* 7CC74 800E37C4 00000000 */ nop
/* 7CC78 800E37C8 450102C5 */ bc1t .L800E42E0
/* 7CC7C 800E37CC 00000000 */ nop
.L800E37D0:
/* 7CC80 800E37D0 C6200028 */ lwc1 $f0, 0x28($s1)
/* 7CC84 800E37D4 C622002C */ lwc1 $f2, 0x2C($s1)
/* 7CC88 800E37D8 C6240030 */ lwc1 $f4, 0x30($s1)
/* 7CC8C 800E37DC 3C02800B */ lui $v0, %hi(gCameras)
/* 7CC90 800E37E0 24421D80 */ addiu $v0, $v0, %lo(gCameras)
/* 7CC94 800E37E4 E4400060 */ swc1 $f0, 0x60($v0)
/* 7CC98 800E37E8 E4420064 */ swc1 $f2, 0x64($v0)
/* 7CC9C 800E37EC E4440068 */ swc1 $f4, 0x68($v0)
/* 7CCA0 800E37F0 9223000E */ lbu $v1, 0xE($s1)
/* 7CCA4 800E37F4 24020080 */ addiu $v0, $zero, 0x80
/* 7CCA8 800E37F8 106202B9 */ beq $v1, $v0, .L800E42E0
/* 7CCAC 800E37FC 00000000 */ nop
/* 7CCB0 800E3800 8E26001C */ lw $a2, 0x1C($s1)
/* 7CCB4 800E3804 44806000 */ mtc1 $zero, $f12
/* 7CCB8 800E3808 8E270024 */ lw $a3, 0x24($s1)
/* 7CCBC 800E380C 0C00A720 */ jal atan2
/* 7CCC0 800E3810 46006386 */ mov.s $f14, $f12
/* 7CCC4 800E3814 0000202D */ daddu $a0, $zero, $zero
/* 7CCC8 800E3818 44060000 */ mfc1 $a2, $f0
/* 7CCCC 800E381C 080390B6 */ j .L800E42D8
/* 7CCD0 800E3820 0080282D */ daddu $a1, $a0, $zero
glabel .L800E3824
/* 7CCD4 800E3824 C6260028 */ lwc1 $f6, 0x28($s1)
/* 7CCD8 800E3828 C620001C */ lwc1 $f0, 0x1C($s1)
/* 7CCDC 800E382C C624002C */ lwc1 $f4, 0x2C($s1)
/* 7CCE0 800E3830 C628001C */ lwc1 $f8, 0x1C($s1)
/* 7CCE4 800E3834 46003180 */ add.s $f6, $f6, $f0
/* 7CCE8 800E3838 C6200020 */ lwc1 $f0, 0x20($s1)
/* 7CCEC 800E383C 44805000 */ mtc1 $zero, $f10
/* 7CCF0 800E3840 46002100 */ add.s $f4, $f4, $f0
/* 7CCF4 800E3844 C6220024 */ lwc1 $f2, 0x24($s1)
/* 7CCF8 800E3848 C6200030 */ lwc1 $f0, 0x30($s1)
/* 7CCFC 800E384C 460A4032 */ c.eq.s $f8, $f10
/* 7CD00 800E3850 46020000 */ add.s $f0, $f0, $f2
/* 7CD04 800E3854 E6260028 */ swc1 $f6, 0x28($s1)
/* 7CD08 800E3858 E624002C */ swc1 $f4, 0x2C($s1)
/* 7CD0C 800E385C 4500000A */ bc1f .L800E3888
/* 7CD10 800E3860 E6200030 */ swc1 $f0, 0x30($s1)
/* 7CD14 800E3864 C6200020 */ lwc1 $f0, 0x20($s1)
/* 7CD18 800E3868 460A0032 */ c.eq.s $f0, $f10
/* 7CD1C 800E386C 00000000 */ nop
/* 7CD20 800E3870 45000005 */ bc1f .L800E3888
/* 7CD24 800E3874 46001006 */ mov.s $f0, $f2
/* 7CD28 800E3878 460A0032 */ c.eq.s $f0, $f10
/* 7CD2C 800E387C 00000000 */ nop
/* 7CD30 800E3880 45010009 */ bc1t .L800E38A8
/* 7CD34 800E3884 00000000 */ nop
.L800E3888:
/* 7CD38 800E3888 C6200028 */ lwc1 $f0, 0x28($s1)
/* 7CD3C 800E388C C622002C */ lwc1 $f2, 0x2C($s1)
/* 7CD40 800E3890 C6240030 */ lwc1 $f4, 0x30($s1)
/* 7CD44 800E3894 3C02800B */ lui $v0, %hi(gCameras)
/* 7CD48 800E3898 24421D80 */ addiu $v0, $v0, %lo(gCameras)
/* 7CD4C 800E389C E4400060 */ swc1 $f0, 0x60($v0)
/* 7CD50 800E38A0 E4420064 */ swc1 $f2, 0x64($v0)
/* 7CD54 800E38A4 E4440068 */ swc1 $f4, 0x68($v0)
.L800E38A8:
/* 7CD58 800E38A8 C620001C */ lwc1 $f0, 0x1C($s1)
/* 7CD5C 800E38AC 44801000 */ mtc1 $zero, $f2
/* 7CD60 800E38B0 00000000 */ nop
/* 7CD64 800E38B4 46020032 */ c.eq.s $f0, $f2
/* 7CD68 800E38B8 00000000 */ nop
/* 7CD6C 800E38BC 4500000B */ bc1f .L800E38EC
/* 7CD70 800E38C0 00000000 */ nop
/* 7CD74 800E38C4 C6200020 */ lwc1 $f0, 0x20($s1)
/* 7CD78 800E38C8 46020032 */ c.eq.s $f0, $f2
/* 7CD7C 800E38CC 00000000 */ nop
/* 7CD80 800E38D0 45000006 */ bc1f .L800E38EC
/* 7CD84 800E38D4 00000000 */ nop
/* 7CD88 800E38D8 C6200024 */ lwc1 $f0, 0x24($s1)
/* 7CD8C 800E38DC 46020032 */ c.eq.s $f0, $f2
/* 7CD90 800E38E0 00000000 */ nop
/* 7CD94 800E38E4 4501027E */ bc1t .L800E42E0
/* 7CD98 800E38E8 00000000 */ nop
.L800E38EC:
/* 7CD9C 800E38EC 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 7CDA0 800E38F0 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 7CDA4 800E38F4 C62200A8 */ lwc1 $f2, 0xA8($s1)
/* 7CDA8 800E38F8 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 7CDAC 800E38FC 44810000 */ mtc1 $at, $f0
/* 7CDB0 800E3900 00031080 */ sll $v0, $v1, 2
/* 7CDB4 800E3904 00431021 */ addu $v0, $v0, $v1
/* 7CDB8 800E3908 00021080 */ sll $v0, $v0, 2
/* 7CDBC 800E390C 00431023 */ subu $v0, $v0, $v1
/* 7CDC0 800E3910 000218C0 */ sll $v1, $v0, 3
/* 7CDC4 800E3914 00431021 */ addu $v0, $v0, $v1
/* 7CDC8 800E3918 000210C0 */ sll $v0, $v0, 3
/* 7CDCC 800E391C 46001081 */ sub.s $f2, $f2, $f0
/* 7CDD0 800E3920 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* 7CDD4 800E3924 00220821 */ addu $at, $at, $v0
/* 7CDD8 800E3928 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at)
/* 7CDDC 800E392C 46001080 */ add.s $f2, $f2, $f0
/* 7CDE0 800E3930 0000202D */ daddu $a0, $zero, $zero
/* 7CDE4 800E3934 44061000 */ mfc1 $a2, $f2
/* 7CDE8 800E3938 080390B6 */ j .L800E42D8
/* 7CDEC 800E393C 0080282D */ daddu $a1, $a0, $zero
glabel .L800E3940
/* 7CDF0 800E3940 C6260028 */ lwc1 $f6, 0x28($s1)
/* 7CDF4 800E3944 C620001C */ lwc1 $f0, 0x1C($s1)
/* 7CDF8 800E3948 C624002C */ lwc1 $f4, 0x2C($s1)
/* 7CDFC 800E394C C628001C */ lwc1 $f8, 0x1C($s1)
/* 7CE00 800E3950 46003180 */ add.s $f6, $f6, $f0
/* 7CE04 800E3954 C6200020 */ lwc1 $f0, 0x20($s1)
/* 7CE08 800E3958 44805000 */ mtc1 $zero, $f10
/* 7CE0C 800E395C 46002100 */ add.s $f4, $f4, $f0
/* 7CE10 800E3960 C6220024 */ lwc1 $f2, 0x24($s1)
/* 7CE14 800E3964 C6200030 */ lwc1 $f0, 0x30($s1)
/* 7CE18 800E3968 460A4032 */ c.eq.s $f8, $f10
/* 7CE1C 800E396C 46020000 */ add.s $f0, $f0, $f2
/* 7CE20 800E3970 E6260028 */ swc1 $f6, 0x28($s1)
/* 7CE24 800E3974 E624002C */ swc1 $f4, 0x2C($s1)
/* 7CE28 800E3978 4500000A */ bc1f .L800E39A4
/* 7CE2C 800E397C E6200030 */ swc1 $f0, 0x30($s1)
/* 7CE30 800E3980 C6200020 */ lwc1 $f0, 0x20($s1)
/* 7CE34 800E3984 460A0032 */ c.eq.s $f0, $f10
/* 7CE38 800E3988 00000000 */ nop
/* 7CE3C 800E398C 45000005 */ bc1f .L800E39A4
/* 7CE40 800E3990 46001006 */ mov.s $f0, $f2
/* 7CE44 800E3994 460A0032 */ c.eq.s $f0, $f10
/* 7CE48 800E3998 00000000 */ nop
/* 7CE4C 800E399C 45010009 */ bc1t .L800E39C4
/* 7CE50 800E39A0 00000000 */ nop
.L800E39A4:
/* 7CE54 800E39A4 C6200028 */ lwc1 $f0, 0x28($s1)
/* 7CE58 800E39A8 C622002C */ lwc1 $f2, 0x2C($s1)
/* 7CE5C 800E39AC C6240030 */ lwc1 $f4, 0x30($s1)
/* 7CE60 800E39B0 3C02800B */ lui $v0, %hi(gCameras)
/* 7CE64 800E39B4 24421D80 */ addiu $v0, $v0, %lo(gCameras)
/* 7CE68 800E39B8 E4400060 */ swc1 $f0, 0x60($v0)
/* 7CE6C 800E39BC E4420064 */ swc1 $f2, 0x64($v0)
/* 7CE70 800E39C0 E4440068 */ swc1 $f4, 0x68($v0)
.L800E39C4:
/* 7CE74 800E39C4 C6260028 */ lwc1 $f6, 0x28($s1)
/* 7CE78 800E39C8 C628002C */ lwc1 $f8, 0x2C($s1)
/* 7CE7C 800E39CC C6220054 */ lwc1 $f2, 0x54($s1)
/* 7CE80 800E39D0 44800000 */ mtc1 $zero, $f0
/* 7CE84 800E39D4 C6240030 */ lwc1 $f4, 0x30($s1)
/* 7CE88 800E39D8 46001032 */ c.eq.s $f2, $f0
/* 7CE8C 800E39DC E7A60020 */ swc1 $f6, 0x20($sp)
/* 7CE90 800E39E0 E7A80024 */ swc1 $f8, 0x24($sp)
/* 7CE94 800E39E4 45010004 */ bc1t .L800E39F8
/* 7CE98 800E39E8 E7A40028 */ swc1 $f4, 0x28($sp)
/* 7CE9C 800E39EC C6200080 */ lwc1 $f0, 0x80($s1)
/* 7CEA0 800E39F0 08038E90 */ j .L800E3A40
/* 7CEA4 800E39F4 E7A0002C */ swc1 $f0, 0x2C($sp)
.L800E39F8:
/* 7CEA8 800E39F8 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 7CEAC 800E39FC 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 7CEB0 800E3A00 C62000A8 */ lwc1 $f0, 0xA8($s1)
/* 7CEB4 800E3A04 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 7CEB8 800E3A08 44811000 */ mtc1 $at, $f2
/* 7CEBC 800E3A0C 00031080 */ sll $v0, $v1, 2
/* 7CEC0 800E3A10 00431021 */ addu $v0, $v0, $v1
/* 7CEC4 800E3A14 00021080 */ sll $v0, $v0, 2
/* 7CEC8 800E3A18 00431023 */ subu $v0, $v0, $v1
/* 7CECC 800E3A1C 000218C0 */ sll $v1, $v0, 3
/* 7CED0 800E3A20 00431021 */ addu $v0, $v0, $v1
/* 7CED4 800E3A24 000210C0 */ sll $v0, $v0, 3
/* 7CED8 800E3A28 46020001 */ sub.s $f0, $f0, $f2
/* 7CEDC 800E3A2C 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* 7CEE0 800E3A30 00220821 */ addu $at, $at, $v0
/* 7CEE4 800E3A34 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at)
/* 7CEE8 800E3A38 46020000 */ add.s $f0, $f0, $f2
/* 7CEEC 800E3A3C E7A0002C */ swc1 $f0, 0x2C($sp)
.L800E3A40:
/* 7CEF0 800E3A40 862200B2 */ lh $v0, 0xB2($s1)
/* 7CEF4 800E3A44 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 7CEF8 800E3A48 44811000 */ mtc1 $at, $f2
/* 7CEFC 800E3A4C 44820000 */ mtc1 $v0, $f0
/* 7CF00 800E3A50 00000000 */ nop
/* 7CF04 800E3A54 46800020 */ cvt.s.w $f0, $f0
/* 7CF08 800E3A58 46020002 */ mul.s $f0, $f0, $f2
/* 7CF0C 800E3A5C 00000000 */ nop
/* 7CF10 800E3A60 0220202D */ daddu $a0, $s1, $zero
/* 7CF14 800E3A64 27A50020 */ addiu $a1, $sp, 0x20
/* 7CF18 800E3A68 27A60024 */ addiu $a2, $sp, 0x24
/* 7CF1C 800E3A6C E7A00010 */ swc1 $f0, 0x10($sp)
/* 7CF20 800E3A70 C7A0002C */ lwc1 $f0, 0x2C($sp)
/* 7CF24 800E3A74 27A70028 */ addiu $a3, $sp, 0x28
/* 7CF28 800E3A78 0C037D18 */ jal player_test_move_with_slipping
/* 7CF2C 800E3A7C E7A00014 */ swc1 $f0, 0x14($sp)
/* 7CF30 800E3A80 C620001C */ lwc1 $f0, 0x1C($s1)
/* 7CF34 800E3A84 44801000 */ mtc1 $zero, $f2
/* 7CF38 800E3A88 00000000 */ nop
/* 7CF3C 800E3A8C 46020032 */ c.eq.s $f0, $f2
/* 7CF40 800E3A90 00000000 */ nop
/* 7CF44 800E3A94 4500000B */ bc1f .L800E3AC4
/* 7CF48 800E3A98 A6820012 */ sh $v0, 0x12($s4)
/* 7CF4C 800E3A9C C6200020 */ lwc1 $f0, 0x20($s1)
/* 7CF50 800E3AA0 46020032 */ c.eq.s $f0, $f2
/* 7CF54 800E3AA4 00000000 */ nop
/* 7CF58 800E3AA8 45000006 */ bc1f .L800E3AC4
/* 7CF5C 800E3AAC 00000000 */ nop
/* 7CF60 800E3AB0 C6200024 */ lwc1 $f0, 0x24($s1)
/* 7CF64 800E3AB4 46020032 */ c.eq.s $f0, $f2
/* 7CF68 800E3AB8 00000000 */ nop
/* 7CF6C 800E3ABC 45010208 */ bc1t .L800E42E0
/* 7CF70 800E3AC0 00000000 */ nop
.L800E3AC4:
/* 7CF74 800E3AC4 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 7CF78 800E3AC8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 7CF7C 800E3ACC C62200A8 */ lwc1 $f2, 0xA8($s1)
/* 7CF80 800E3AD0 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 7CF84 800E3AD4 44810000 */ mtc1 $at, $f0
/* 7CF88 800E3AD8 00031080 */ sll $v0, $v1, 2
/* 7CF8C 800E3ADC 00431021 */ addu $v0, $v0, $v1
/* 7CF90 800E3AE0 00021080 */ sll $v0, $v0, 2
/* 7CF94 800E3AE4 00431023 */ subu $v0, $v0, $v1
/* 7CF98 800E3AE8 000218C0 */ sll $v1, $v0, 3
/* 7CF9C 800E3AEC 00431021 */ addu $v0, $v0, $v1
/* 7CFA0 800E3AF0 000210C0 */ sll $v0, $v0, 3
/* 7CFA4 800E3AF4 46001081 */ sub.s $f2, $f2, $f0
/* 7CFA8 800E3AF8 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* 7CFAC 800E3AFC 00220821 */ addu $at, $at, $v0
/* 7CFB0 800E3B00 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at)
/* 7CFB4 800E3B04 46001080 */ add.s $f2, $f2, $f0
/* 7CFB8 800E3B08 0000202D */ daddu $a0, $zero, $zero
/* 7CFBC 800E3B0C 44061000 */ mfc1 $a2, $f2
/* 7CFC0 800E3B10 080390B6 */ j .L800E42D8
/* 7CFC4 800E3B14 0080282D */ daddu $a1, $a0, $zero
glabel .L800E3B18
/* 7CFC8 800E3B18 8E220000 */ lw $v0, 0x0($s1)
/* 7CFCC 800E3B1C 30420008 */ andi $v0, $v0, 0x8
/* 7CFD0 800E3B20 144001EF */ bnez $v0, .L800E42E0
/* 7CFD4 800E3B24 3C030080 */ lui $v1, (0x802000 >> 16)
/* 7CFD8 800E3B28 8E220000 */ lw $v0, 0x0($s1)
/* 7CFDC 800E3B2C 34632000 */ ori $v1, $v1, (0x802000 & 0xFFFF)
/* 7CFE0 800E3B30 00431024 */ and $v0, $v0, $v1
/* 7CFE4 800E3B34 144000AA */ bnez $v0, .L800E3DE0
/* 7CFE8 800E3B38 AFA00030 */ sw $zero, 0x30($sp)
/* 7CFEC 800E3B3C 27A4002C */ addiu $a0, $sp, 0x2C
/* 7CFF0 800E3B40 0C0388C1 */ jal player_input_to_move_vector
/* 7CFF4 800E3B44 27A50030 */ addiu $a1, $sp, 0x30
/* 7CFF8 800E3B48 8E220004 */ lw $v0, 0x4($s1)
/* 7CFFC 800E3B4C 3C030001 */ lui $v1, (0x10000 >> 16)
/* 7D000 800E3B50 00431024 */ and $v0, $v0, $v1
/* 7D004 800E3B54 1440002C */ bnez $v0, .L800E3C08
/* 7D008 800E3B58 00000000 */ nop
/* 7D00C 800E3B5C C7A20030 */ lwc1 $f2, 0x30($sp)
/* 7D010 800E3B60 3C013D00 */ lui $at, (0x3D000000 >> 16)
/* 7D014 800E3B64 44810000 */ mtc1 $at, $f0
/* 7D018 800E3B68 00000000 */ nop
/* 7D01C 800E3B6C 46001002 */ mul.s $f0, $f2, $f0
/* 7D020 800E3B70 00000000 */ nop
/* 7D024 800E3B74 8E220000 */ lw $v0, 0x0($s1)
/* 7D028 800E3B78 30420006 */ andi $v0, $v0, 0x6
/* 7D02C 800E3B7C 14400009 */ bnez $v0, .L800E3BA4
/* 7D030 800E3B80 E7A00030 */ swc1 $f0, 0x30($sp)
/* 7D034 800E3B84 3C013FD0 */ lui $at, (0x3FD00000 >> 16)
/* 7D038 800E3B88 44811800 */ mtc1 $at, $f3
/* 7D03C 800E3B8C 44801000 */ mtc1 $zero, $f2
/* 7D040 800E3B90 46000021 */ cvt.d.s $f0, $f0
/* 7D044 800E3B94 46220002 */ mul.d $f0, $f0, $f2
/* 7D048 800E3B98 00000000 */ nop
/* 7D04C 800E3B9C 46200020 */ cvt.s.d $f0, $f0
/* 7D050 800E3BA0 E7A00030 */ swc1 $f0, 0x30($sp)
.L800E3BA4:
/* 7D054 800E3BA4 822300B4 */ lb $v1, 0xB4($s1)
/* 7D058 800E3BA8 24020006 */ addiu $v0, $zero, 0x6
/* 7D05C 800E3BAC 1462000A */ bne $v1, $v0, .L800E3BD8
/* 7D060 800E3BB0 00000000 */ nop
/* 7D064 800E3BB4 C7A00030 */ lwc1 $f0, 0x30($sp)
/* 7D068 800E3BB8 3C013FF8 */ lui $at, (0x3FF80000 >> 16)
/* 7D06C 800E3BBC 44811800 */ mtc1 $at, $f3
/* 7D070 800E3BC0 44801000 */ mtc1 $zero, $f2
/* 7D074 800E3BC4 46000021 */ cvt.d.s $f0, $f0
/* 7D078 800E3BC8 46220002 */ mul.d $f0, $f0, $f2
/* 7D07C 800E3BCC 00000000 */ nop
/* 7D080 800E3BD0 46200020 */ cvt.s.d $f0, $f0
/* 7D084 800E3BD4 E7A00030 */ swc1 $f0, 0x30($sp)
.L800E3BD8:
/* 7D088 800E3BD8 8E220000 */ lw $v0, 0x0($s1)
/* 7D08C 800E3BDC 3C030004 */ lui $v1, (0x40000 >> 16)
/* 7D090 800E3BE0 00431024 */ and $v0, $v0, $v1
/* 7D094 800E3BE4 10400008 */ beqz $v0, .L800E3C08
/* 7D098 800E3BE8 00000000 */ nop
/* 7D09C 800E3BEC C7A00030 */ lwc1 $f0, 0x30($sp)
/* 7D0A0 800E3BF0 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 7D0A4 800E3BF4 44811000 */ mtc1 $at, $f2
/* 7D0A8 800E3BF8 00000000 */ nop
/* 7D0AC 800E3BFC 46020002 */ mul.s $f0, $f0, $f2
/* 7D0B0 800E3C00 00000000 */ nop
/* 7D0B4 800E3C04 E7A00030 */ swc1 $f0, 0x30($sp)
.L800E3C08:
/* 7D0B8 800E3C08 C7AC002C */ lwc1 $f12, 0x2C($sp)
/* 7D0BC 800E3C0C 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 7D0C0 800E3C10 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 7D0C4 800E3C14 44810000 */ mtc1 $at, $f0
/* 7D0C8 800E3C18 00000000 */ nop
/* 7D0CC 800E3C1C 46006302 */ mul.s $f12, $f12, $f0
/* 7D0D0 800E3C20 00000000 */ nop
/* 7D0D4 800E3C24 27A50034 */ addiu $a1, $sp, 0x34
/* 7D0D8 800E3C28 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 7D0DC 800E3C2C 44810000 */ mtc1 $at, $f0
/* 7D0E0 800E3C30 27A60038 */ addiu $a2, $sp, 0x38
/* 7D0E4 800E3C34 0C00A82D */ jal sin_cos_rad
/* 7D0E8 800E3C38 46006303 */ div.s $f12, $f12, $f0
/* 7D0EC 800E3C3C 822300B4 */ lb $v1, 0xB4($s1)
/* 7D0F0 800E3C40 24020014 */ addiu $v0, $zero, 0x14
/* 7D0F4 800E3C44 14620014 */ bne $v1, $v0, .L800E3C98
/* 7D0F8 800E3C48 3C030001 */ lui $v1, (0x10000 >> 16)
/* 7D0FC 800E3C4C C7A60034 */ lwc1 $f6, 0x34($sp)
/* 7D100 800E3C50 C7A40038 */ lwc1 $f4, 0x38($sp)
/* 7D104 800E3C54 46003085 */ abs.s $f2, $f6
/* 7D108 800E3C58 46002005 */ abs.s $f0, $f4
/* 7D10C 800E3C5C 4602003C */ c.lt.s $f0, $f2
/* 7D110 800E3C60 00000000 */ nop
/* 7D114 800E3C64 45000006 */ bc1f .L800E3C80
/* 7D118 800E3C68 00000000 */ nop
/* 7D11C 800E3C6C C7A00030 */ lwc1 $f0, 0x30($sp)
/* 7D120 800E3C70 4480A000 */ mtc1 $zero, $f20
/* 7D124 800E3C74 46060582 */ mul.s $f22, $f0, $f6
/* 7D128 800E3C78 08038F36 */ j .L800E3CD8
/* 7D12C 800E3C7C 00000000 */ nop
.L800E3C80:
/* 7D130 800E3C80 C7A00030 */ lwc1 $f0, 0x30($sp)
/* 7D134 800E3C84 4480B000 */ mtc1 $zero, $f22
/* 7D138 800E3C88 46000007 */ neg.s $f0, $f0
/* 7D13C 800E3C8C 46040502 */ mul.s $f20, $f0, $f4
/* 7D140 800E3C90 08038F36 */ j .L800E3CD8
/* 7D144 800E3C94 00000000 */ nop
.L800E3C98:
/* 7D148 800E3C98 8E220004 */ lw $v0, 0x4($s1)
/* 7D14C 800E3C9C 00431024 */ and $v0, $v0, $v1
/* 7D150 800E3CA0 1440000A */ bnez $v0, .L800E3CCC
/* 7D154 800E3CA4 00000000 */ nop
/* 7D158 800E3CA8 C7A00030 */ lwc1 $f0, 0x30($sp)
/* 7D15C 800E3CAC C7A20034 */ lwc1 $f2, 0x34($sp)
/* 7D160 800E3CB0 46020582 */ mul.s $f22, $f0, $f2
/* 7D164 800E3CB4 00000000 */ nop
/* 7D168 800E3CB8 C7A20038 */ lwc1 $f2, 0x38($sp)
/* 7D16C 800E3CBC 46000007 */ neg.s $f0, $f0
/* 7D170 800E3CC0 46020502 */ mul.s $f20, $f0, $f2
/* 7D174 800E3CC4 08038F36 */ j .L800E3CD8
/* 7D178 800E3CC8 00000000 */ nop
.L800E3CCC:
/* 7D17C 800E3CCC 4480A000 */ mtc1 $zero, $f20
/* 7D180 800E3CD0 00000000 */ nop
/* 7D184 800E3CD4 4600A586 */ mov.s $f22, $f20
.L800E3CD8:
/* 7D188 800E3CD8 C62C0080 */ lwc1 $f12, 0x80($s1)
/* 7D18C 800E3CDC 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 7D190 800E3CE0 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 7D194 800E3CE4 44810000 */ mtc1 $at, $f0
/* 7D198 800E3CE8 00000000 */ nop
/* 7D19C 800E3CEC 46006302 */ mul.s $f12, $f12, $f0
/* 7D1A0 800E3CF0 00000000 */ nop
/* 7D1A4 800E3CF4 27A50034 */ addiu $a1, $sp, 0x34
/* 7D1A8 800E3CF8 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 7D1AC 800E3CFC 44810000 */ mtc1 $at, $f0
/* 7D1B0 800E3D00 27A60038 */ addiu $a2, $sp, 0x38
/* 7D1B4 800E3D04 0C00A82D */ jal sin_cos_rad
/* 7D1B8 800E3D08 46006303 */ div.s $f12, $f12, $f0
/* 7D1BC 800E3D0C C6220054 */ lwc1 $f2, 0x54($s1)
/* 7D1C0 800E3D10 E7A20030 */ swc1 $f2, 0x30($sp)
/* 7D1C4 800E3D14 8E220000 */ lw $v0, 0x0($s1)
/* 7D1C8 800E3D18 3C030004 */ lui $v1, (0x40000 >> 16)
/* 7D1CC 800E3D1C 00431024 */ and $v0, $v0, $v1
/* 7D1D0 800E3D20 10400007 */ beqz $v0, .L800E3D40
/* 7D1D4 800E3D24 00000000 */ nop
/* 7D1D8 800E3D28 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 7D1DC 800E3D2C 44810000 */ mtc1 $at, $f0
/* 7D1E0 800E3D30 00000000 */ nop
/* 7D1E4 800E3D34 46001002 */ mul.s $f0, $f2, $f0
/* 7D1E8 800E3D38 00000000 */ nop
/* 7D1EC 800E3D3C E7A00030 */ swc1 $f0, 0x30($sp)
.L800E3D40:
/* 7D1F0 800E3D40 C7A40030 */ lwc1 $f4, 0x30($sp)
/* 7D1F4 800E3D44 C7A20034 */ lwc1 $f2, 0x34($sp)
/* 7D1F8 800E3D48 46022082 */ mul.s $f2, $f4, $f2
/* 7D1FC 800E3D4C 00000000 */ nop
/* 7D200 800E3D50 C7A00038 */ lwc1 $f0, 0x38($sp)
/* 7D204 800E3D54 46002102 */ mul.s $f4, $f4, $f0
/* 7D208 800E3D58 00000000 */ nop
/* 7D20C 800E3D5C 4602B080 */ add.s $f2, $f22, $f2
/* 7D210 800E3D60 4604A101 */ sub.s $f4, $f20, $f4
/* 7D214 800E3D64 44806000 */ mtc1 $zero, $f12
/* 7D218 800E3D68 44061000 */ mfc1 $a2, $f2
/* 7D21C 800E3D6C 44072000 */ mfc1 $a3, $f4
/* 7D220 800E3D70 46006386 */ mov.s $f14, $f12
/* 7D224 800E3D74 AFA60020 */ sw $a2, 0x20($sp)
/* 7D228 800E3D78 0C00A720 */ jal atan2
/* 7D22C 800E3D7C AFA70028 */ sw $a3, 0x28($sp)
/* 7D230 800E3D80 C7A40020 */ lwc1 $f4, 0x20($sp)
/* 7D234 800E3D84 46042102 */ mul.s $f4, $f4, $f4
/* 7D238 800E3D88 00000000 */ nop
/* 7D23C 800E3D8C C7A20028 */ lwc1 $f2, 0x28($sp)
/* 7D240 800E3D90 46021082 */ mul.s $f2, $f2, $f2
/* 7D244 800E3D94 00000000 */ nop
/* 7D248 800E3D98 46022300 */ add.s $f12, $f4, $f2
/* 7D24C 800E3D9C E7A0002C */ swc1 $f0, 0x2C($sp)
/* 7D250 800E3DA0 46006004 */ sqrt.s $f0, $f12
/* 7D254 800E3DA4 46000032 */ c.eq.s $f0, $f0
/* 7D258 800E3DA8 00000000 */ nop
/* 7D25C 800E3DAC 45010003 */ bc1t .L800E3DBC
/* 7D260 800E3DB0 00000000 */ nop
/* 7D264 800E3DB4 0C0187BC */ jal sqrtf
/* 7D268 800E3DB8 00000000 */ nop
.L800E3DBC:
/* 7D26C 800E3DBC 8E220000 */ lw $v0, 0x0($s1)
/* 7D270 800E3DC0 30420006 */ andi $v0, $v0, 0x6
/* 7D274 800E3DC4 10400006 */ beqz $v0, .L800E3DE0
/* 7D278 800E3DC8 E7A00030 */ swc1 $f0, 0x30($sp)
/* 7D27C 800E3DCC C622005C */ lwc1 $f2, 0x5C($s1)
/* 7D280 800E3DD0 4600103C */ c.lt.s $f2, $f0
/* 7D284 800E3DD4 00000000 */ nop
/* 7D288 800E3DD8 45030001 */ bc1tl .L800E3DE0
/* 7D28C 800E3DDC E7A20030 */ swc1 $f2, 0x30($sp)
.L800E3DE0:
/* 7D290 800E3DE0 C6240028 */ lwc1 $f4, 0x28($s1)
/* 7D294 800E3DE4 C620001C */ lwc1 $f0, 0x1C($s1)
/* 7D298 800E3DE8 C6220030 */ lwc1 $f2, 0x30($s1)
/* 7D29C 800E3DEC 46002100 */ add.s $f4, $f4, $f0
/* 7D2A0 800E3DF0 C6200024 */ lwc1 $f0, 0x24($s1)
/* 7D2A4 800E3DF4 862200C0 */ lh $v0, 0xC0($s1)
/* 7D2A8 800E3DF8 46001080 */ add.s $f2, $f2, $f0
/* 7D2AC 800E3DFC E6240028 */ swc1 $f4, 0x28($s1)
/* 7D2B0 800E3E00 14400005 */ bnez $v0, .L800E3E18
/* 7D2B4 800E3E04 E6220030 */ swc1 $f2, 0x30($s1)
/* 7D2B8 800E3E08 C620002C */ lwc1 $f0, 0x2C($s1)
/* 7D2BC 800E3E0C C6220020 */ lwc1 $f2, 0x20($s1)
/* 7D2C0 800E3E10 46020000 */ add.s $f0, $f0, $f2
/* 7D2C4 800E3E14 E620002C */ swc1 $f0, 0x2C($s1)
.L800E3E18:
/* 7D2C8 800E3E18 C620001C */ lwc1 $f0, 0x1C($s1)
/* 7D2CC 800E3E1C 44801000 */ mtc1 $zero, $f2
/* 7D2D0 800E3E20 00000000 */ nop
/* 7D2D4 800E3E24 46020032 */ c.eq.s $f0, $f2
/* 7D2D8 800E3E28 00000000 */ nop
/* 7D2DC 800E3E2C 4500000B */ bc1f .L800E3E5C
/* 7D2E0 800E3E30 00000000 */ nop
/* 7D2E4 800E3E34 C6200020 */ lwc1 $f0, 0x20($s1)
/* 7D2E8 800E3E38 46020032 */ c.eq.s $f0, $f2
/* 7D2EC 800E3E3C 00000000 */ nop
/* 7D2F0 800E3E40 45000006 */ bc1f .L800E3E5C
/* 7D2F4 800E3E44 00000000 */ nop
/* 7D2F8 800E3E48 C6200024 */ lwc1 $f0, 0x24($s1)
/* 7D2FC 800E3E4C 46020032 */ c.eq.s $f0, $f2
/* 7D300 800E3E50 00000000 */ nop
/* 7D304 800E3E54 4501000A */ bc1t .L800E3E80
/* 7D308 800E3E58 0220202D */ daddu $a0, $s1, $zero
.L800E3E5C:
/* 7D30C 800E3E5C C6200028 */ lwc1 $f0, 0x28($s1)
/* 7D310 800E3E60 C622002C */ lwc1 $f2, 0x2C($s1)
/* 7D314 800E3E64 C6240030 */ lwc1 $f4, 0x30($s1)
/* 7D318 800E3E68 3C02800B */ lui $v0, %hi(gCameras)
/* 7D31C 800E3E6C 24421D80 */ addiu $v0, $v0, %lo(gCameras)
/* 7D320 800E3E70 E4400060 */ swc1 $f0, 0x60($v0)
/* 7D324 800E3E74 E4420064 */ swc1 $f2, 0x64($v0)
/* 7D328 800E3E78 E4440068 */ swc1 $f4, 0x68($v0)
/* 7D32C 800E3E7C 0220202D */ daddu $a0, $s1, $zero
.L800E3E80:
/* 7D330 800E3E80 27B30020 */ addiu $s3, $sp, 0x20
/* 7D334 800E3E84 0260282D */ daddu $a1, $s3, $zero
/* 7D338 800E3E88 27B00024 */ addiu $s0, $sp, 0x24
/* 7D33C 800E3E8C 0200302D */ daddu $a2, $s0, $zero
/* 7D340 800E3E90 27B20028 */ addiu $s2, $sp, 0x28
/* 7D344 800E3E94 0240382D */ daddu $a3, $s2, $zero
/* 7D348 800E3E98 862200B2 */ lh $v0, 0xB2($s1)
/* 7D34C 800E3E9C C6240028 */ lwc1 $f4, 0x28($s1)
/* 7D350 800E3EA0 C626002C */ lwc1 $f6, 0x2C($s1)
/* 7D354 800E3EA4 C6280030 */ lwc1 $f8, 0x30($s1)
/* 7D358 800E3EA8 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 7D35C 800E3EAC 4481B000 */ mtc1 $at, $f22
/* 7D360 800E3EB0 C6220080 */ lwc1 $f2, 0x80($s1)
/* 7D364 800E3EB4 44820000 */ mtc1 $v0, $f0
/* 7D368 800E3EB8 00000000 */ nop
/* 7D36C 800E3EBC 46800020 */ cvt.s.w $f0, $f0
/* 7D370 800E3EC0 46160002 */ mul.s $f0, $f0, $f22
/* 7D374 800E3EC4 00000000 */ nop
/* 7D378 800E3EC8 E7A40020 */ swc1 $f4, 0x20($sp)
/* 7D37C 800E3ECC E7A60024 */ swc1 $f6, 0x24($sp)
/* 7D380 800E3ED0 E7A80028 */ swc1 $f8, 0x28($sp)
/* 7D384 800E3ED4 E7A20014 */ swc1 $f2, 0x14($sp)
/* 7D388 800E3ED8 0C037D18 */ jal player_test_move_with_slipping
/* 7D38C 800E3EDC E7A00010 */ swc1 $f0, 0x10($sp)
/* 7D390 800E3EE0 C7A20030 */ lwc1 $f2, 0x30($sp)
/* 7D394 800E3EE4 44800000 */ mtc1 $zero, $f0
/* 7D398 800E3EE8 00000000 */ nop
/* 7D39C 800E3EEC 46001032 */ c.eq.s $f2, $f0
/* 7D3A0 800E3EF0 00000000 */ nop
/* 7D3A4 800E3EF4 45020045 */ bc1fl .L800E400C
/* 7D3A8 800E3EF8 A6820012 */ sh $v0, 0x12($s4)
/* 7D3AC 800E3EFC 04430043 */ bgezl $v0, .L800E400C
/* 7D3B0 800E3F00 A6820012 */ sh $v0, 0x12($s4)
/* 7D3B4 800E3F04 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 7D3B8 800E3F08 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 7D3BC 800E3F0C C62200A8 */ lwc1 $f2, 0xA8($s1)
/* 7D3C0 800E3F10 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 7D3C4 800E3F14 44810000 */ mtc1 $at, $f0
/* 7D3C8 800E3F18 00031080 */ sll $v0, $v1, 2
/* 7D3CC 800E3F1C 00431021 */ addu $v0, $v0, $v1
/* 7D3D0 800E3F20 00021080 */ sll $v0, $v0, 2
/* 7D3D4 800E3F24 00431023 */ subu $v0, $v0, $v1
/* 7D3D8 800E3F28 000218C0 */ sll $v1, $v0, 3
/* 7D3DC 800E3F2C 00431021 */ addu $v0, $v0, $v1
/* 7D3E0 800E3F30 000210C0 */ sll $v0, $v0, 3
/* 7D3E4 800E3F34 46001081 */ sub.s $f2, $f2, $f0
/* 7D3E8 800E3F38 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* 7D3EC 800E3F3C 00220821 */ addu $at, $at, $v0
/* 7D3F0 800E3F40 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at)
/* 7D3F4 800E3F44 46001500 */ add.s $f20, $f2, $f0
/* 7D3F8 800E3F48 3C014334 */ lui $at, (0x43340000 >> 16)
/* 7D3FC 800E3F4C 44816000 */ mtc1 $at, $f12
/* 7D400 800E3F50 00000000 */ nop
/* 7D404 800E3F54 460CA300 */ add.s $f12, $f20, $f12
/* 7D408 800E3F58 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 7D40C 800E3F5C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 7D410 800E3F60 44810000 */ mtc1 $at, $f0
/* 7D414 800E3F64 00000000 */ nop
/* 7D418 800E3F68 46006302 */ mul.s $f12, $f12, $f0
/* 7D41C 800E3F6C 00000000 */ nop
/* 7D420 800E3F70 27A50034 */ addiu $a1, $sp, 0x34
/* 7D424 800E3F74 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 7D428 800E3F78 44810000 */ mtc1 $at, $f0
/* 7D42C 800E3F7C 27A60038 */ addiu $a2, $sp, 0x38
/* 7D430 800E3F80 0C00A82D */ jal sin_cos_rad
/* 7D434 800E3F84 46006303 */ div.s $f12, $f12, $f0
/* 7D438 800E3F88 862200B2 */ lh $v0, 0xB2($s1)
/* 7D43C 800E3F8C C7A60034 */ lwc1 $f6, 0x34($sp)
/* 7D440 800E3F90 44820000 */ mtc1 $v0, $f0
/* 7D444 800E3F94 00000000 */ nop
/* 7D448 800E3F98 46800020 */ cvt.s.w $f0, $f0
/* 7D44C 800E3F9C 46003182 */ mul.s $f6, $f6, $f0
/* 7D450 800E3FA0 00000000 */ nop
/* 7D454 800E3FA4 C7A40038 */ lwc1 $f4, 0x38($sp)
/* 7D458 800E3FA8 46002102 */ mul.s $f4, $f4, $f0
/* 7D45C 800E3FAC 00000000 */ nop
/* 7D460 800E3FB0 46163182 */ mul.s $f6, $f6, $f22
/* 7D464 800E3FB4 00000000 */ nop
/* 7D468 800E3FB8 46162102 */ mul.s $f4, $f4, $f22
/* 7D46C 800E3FBC 00000000 */ nop
/* 7D470 800E3FC0 0220202D */ daddu $a0, $s1, $zero
/* 7D474 800E3FC4 0260282D */ daddu $a1, $s3, $zero
/* 7D478 800E3FC8 C6220028 */ lwc1 $f2, 0x28($s1)
/* 7D47C 800E3FCC 0200302D */ daddu $a2, $s0, $zero
/* 7D480 800E3FD0 46061080 */ add.s $f2, $f2, $f6
/* 7D484 800E3FD4 C6200030 */ lwc1 $f0, 0x30($s1)
/* 7D488 800E3FD8 C626002C */ lwc1 $f6, 0x2C($s1)
/* 7D48C 800E3FDC 46040001 */ sub.s $f0, $f0, $f4
/* 7D490 800E3FE0 0240382D */ daddu $a3, $s2, $zero
/* 7D494 800E3FE4 E7A60024 */ swc1 $f6, 0x24($sp)
/* 7D498 800E3FE8 E7A00028 */ swc1 $f0, 0x28($sp)
/* 7D49C 800E3FEC 44820000 */ mtc1 $v0, $f0
/* 7D4A0 800E3FF0 00000000 */ nop
/* 7D4A4 800E3FF4 46800020 */ cvt.s.w $f0, $f0
/* 7D4A8 800E3FF8 E7A20020 */ swc1 $f2, 0x20($sp)
/* 7D4AC 800E3FFC E7A00010 */ swc1 $f0, 0x10($sp)
/* 7D4B0 800E4000 0C037D18 */ jal player_test_move_with_slipping
/* 7D4B4 800E4004 E7B40014 */ swc1 $f20, 0x14($sp)
/* 7D4B8 800E4008 A6820012 */ sh $v0, 0x12($s4)
.L800E400C:
/* 7D4BC 800E400C 8E220000 */ lw $v0, 0x0($s1)
/* 7D4C0 800E4010 3C030040 */ lui $v1, (0x400000 >> 16)
/* 7D4C4 800E4014 00431024 */ and $v0, $v0, $v1
/* 7D4C8 800E4018 144000B1 */ bnez $v0, .L800E42E0
/* 7D4CC 800E401C 24020012 */ addiu $v0, $zero, 0x12
/* 7D4D0 800E4020 822300B4 */ lb $v1, 0xB4($s1)
/* 7D4D4 800E4024 106200AE */ beq $v1, $v0, .L800E42E0
/* 7D4D8 800E4028 00000000 */ nop
/* 7D4DC 800E402C C7A60030 */ lwc1 $f6, 0x30($sp)
/* 7D4E0 800E4030 44800000 */ mtc1 $zero, $f0
/* 7D4E4 800E4034 00000000 */ nop
/* 7D4E8 800E4038 46003032 */ c.eq.s $f6, $f0
/* 7D4EC 800E403C 00000000 */ nop
/* 7D4F0 800E4040 45000015 */ bc1f .L800E4098
/* 7D4F4 800E4044 0000202D */ daddu $a0, $zero, $zero
/* 7D4F8 800E4048 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 7D4FC 800E404C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 7D500 800E4050 C62200A8 */ lwc1 $f2, 0xA8($s1)
/* 7D504 800E4054 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 7D508 800E4058 44810000 */ mtc1 $at, $f0
/* 7D50C 800E405C 00031080 */ sll $v0, $v1, 2
/* 7D510 800E4060 00431021 */ addu $v0, $v0, $v1
/* 7D514 800E4064 00021080 */ sll $v0, $v0, 2
/* 7D518 800E4068 00431023 */ subu $v0, $v0, $v1
/* 7D51C 800E406C 000218C0 */ sll $v1, $v0, 3
/* 7D520 800E4070 00431021 */ addu $v0, $v0, $v1
/* 7D524 800E4074 000210C0 */ sll $v0, $v0, 3
/* 7D528 800E4078 46001081 */ sub.s $f2, $f2, $f0
/* 7D52C 800E407C 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* 7D530 800E4080 00220821 */ addu $at, $at, $v0
/* 7D534 800E4084 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at)
/* 7D538 800E4088 46001080 */ add.s $f2, $f2, $f0
/* 7D53C 800E408C 44061000 */ mfc1 $a2, $f2
/* 7D540 800E4090 080390B6 */ j .L800E42D8
/* 7D544 800E4094 0080282D */ daddu $a1, $a0, $zero
.L800E4098:
/* 7D548 800E4098 C7B4002C */ lwc1 $f20, 0x2C($sp)
/* 7D54C 800E409C C6200028 */ lwc1 $f0, 0x28($s1)
/* 7D550 800E40A0 C6240030 */ lwc1 $f4, 0x30($s1)
/* 7D554 800E40A4 3C014080 */ lui $at, (0x40800000 >> 16)
/* 7D558 800E40A8 4481B000 */ mtc1 $at, $f22
/* 7D55C 800E40AC C622002C */ lwc1 $f2, 0x2C($s1)
/* 7D560 800E40B0 4606B03C */ c.lt.s $f22, $f6
/* 7D564 800E40B4 E7A00020 */ swc1 $f0, 0x20($sp)
/* 7D568 800E40B8 E7A40028 */ swc1 $f4, 0x28($sp)
/* 7D56C 800E40BC 45000016 */ bc1f .L800E4118
/* 7D570 800E40C0 E7A20024 */ swc1 $f2, 0x24($sp)
/* 7D574 800E40C4 0220202D */ daddu $a0, $s1, $zero
/* 7D578 800E40C8 27B00020 */ addiu $s0, $sp, 0x20
/* 7D57C 800E40CC 0200282D */ daddu $a1, $s0, $zero
/* 7D580 800E40D0 27B20024 */ addiu $s2, $sp, 0x24
/* 7D584 800E40D4 0240302D */ daddu $a2, $s2, $zero
/* 7D588 800E40D8 27B30028 */ addiu $s3, $sp, 0x28
/* 7D58C 800E40DC 0260382D */ daddu $a3, $s3, $zero
/* 7D590 800E40E0 E7B60010 */ swc1 $f22, 0x10($sp)
/* 7D594 800E40E4 0C037D18 */ jal player_test_move_with_slipping
/* 7D598 800E40E8 E7B40014 */ swc1 $f20, 0x14($sp)
/* 7D59C 800E40EC 04430013 */ bgezl $v0, .L800E413C
/* 7D5A0 800E40F0 A6820000 */ sh $v0, 0x0($s4)
/* 7D5A4 800E40F4 0220202D */ daddu $a0, $s1, $zero
/* 7D5A8 800E40F8 0200282D */ daddu $a1, $s0, $zero
/* 7D5AC 800E40FC C7A00030 */ lwc1 $f0, 0x30($sp)
/* 7D5B0 800E4100 0240302D */ daddu $a2, $s2, $zero
/* 7D5B4 800E4104 46160001 */ sub.s $f0, $f0, $f22
/* 7D5B8 800E4108 0260382D */ daddu $a3, $s3, $zero
/* 7D5BC 800E410C E7B40014 */ swc1 $f20, 0x14($sp)
/* 7D5C0 800E4110 0803904C */ j .L800E4130
/* 7D5C4 800E4114 E7A00010 */ swc1 $f0, 0x10($sp)
.L800E4118:
/* 7D5C8 800E4118 0220202D */ daddu $a0, $s1, $zero
/* 7D5CC 800E411C 27A50020 */ addiu $a1, $sp, 0x20
/* 7D5D0 800E4120 27A60024 */ addiu $a2, $sp, 0x24
/* 7D5D4 800E4124 27A70028 */ addiu $a3, $sp, 0x28
/* 7D5D8 800E4128 E7A60010 */ swc1 $f6, 0x10($sp)
/* 7D5DC 800E412C E7B40014 */ swc1 $f20, 0x14($sp)
.L800E4130:
/* 7D5E0 800E4130 0C037D18 */ jal player_test_move_with_slipping
/* 7D5E4 800E4134 00000000 */ nop
/* 7D5E8 800E4138 A6820000 */ sh $v0, 0x0($s4)
.L800E413C:
/* 7D5EC 800E413C C7A00020 */ lwc1 $f0, 0x20($sp)
/* 7D5F0 800E4140 C7A20024 */ lwc1 $f2, 0x24($sp)
/* 7D5F4 800E4144 3C018011 */ lui $at, %hi(D_8010BED8)
/* 7D5F8 800E4148 D436BED8 */ ldc1 $f22, %lo(D_8010BED8)($at)
/* 7D5FC 800E414C 4600A521 */ cvt.d.s $f20, $f20
/* 7D600 800E4150 E7A0003C */ swc1 $f0, 0x3C($sp)
/* 7D604 800E4154 C7A00028 */ lwc1 $f0, 0x28($sp)
/* 7D608 800E4158 4636A301 */ sub.d $f12, $f20, $f22
/* 7D60C 800E415C E7A20040 */ swc1 $f2, 0x40($sp)
/* 7D610 800E4160 E7A00044 */ swc1 $f0, 0x44($sp)
/* 7D614 800E4164 0C00A6C9 */ jal clamp_angle
/* 7D618 800E4168 46206320 */ cvt.s.d $f12, $f12
/* 7D61C 800E416C 0000202D */ daddu $a0, $zero, $zero
/* 7D620 800E4170 0220282D */ daddu $a1, $s1, $zero
/* 7D624 800E4174 27A6003C */ addiu $a2, $sp, 0x3C
/* 7D628 800E4178 27A70040 */ addiu $a3, $sp, 0x40
/* 7D62C 800E417C 27A20044 */ addiu $v0, $sp, 0x44
/* 7D630 800E4180 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 7D634 800E4184 AFA20010 */ sw $v0, 0x10($sp)
/* 7D638 800E4188 AFA00014 */ sw $zero, 0x14($sp)
/* 7D63C 800E418C 0C037B01 */ jal player_test_lateral_overlap
/* 7D640 800E4190 E7A00018 */ swc1 $f0, 0x18($sp)
/* 7D644 800E4194 C7A00020 */ lwc1 $f0, 0x20($sp)
/* 7D648 800E4198 C7A20028 */ lwc1 $f2, 0x28($sp)
/* 7D64C 800E419C 4636A500 */ add.d $f20, $f20, $f22
/* 7D650 800E41A0 E7A00048 */ swc1 $f0, 0x48($sp)
/* 7D654 800E41A4 C7A00024 */ lwc1 $f0, 0x24($sp)
/* 7D658 800E41A8 0040802D */ daddu $s0, $v0, $zero
/* 7D65C 800E41AC E7A20050 */ swc1 $f2, 0x50($sp)
/* 7D660 800E41B0 4620A320 */ cvt.s.d $f12, $f20
/* 7D664 800E41B4 0C00A6C9 */ jal clamp_angle
/* 7D668 800E41B8 E7A0004C */ swc1 $f0, 0x4C($sp)
/* 7D66C 800E41BC 0000202D */ daddu $a0, $zero, $zero
/* 7D670 800E41C0 0220282D */ daddu $a1, $s1, $zero
/* 7D674 800E41C4 27A60048 */ addiu $a2, $sp, 0x48
/* 7D678 800E41C8 27A7004C */ addiu $a3, $sp, 0x4C
/* 7D67C 800E41CC 27A20050 */ addiu $v0, $sp, 0x50
/* 7D680 800E41D0 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 7D684 800E41D4 AFA20010 */ sw $v0, 0x10($sp)
/* 7D688 800E41D8 AFA00014 */ sw $zero, 0x14($sp)
/* 7D68C 800E41DC 0C037B01 */ jal player_test_lateral_overlap
/* 7D690 800E41E0 E7A00018 */ swc1 $f0, 0x18($sp)
/* 7D694 800E41E4 0601000B */ bgez $s0, .L800E4214
/* 7D698 800E41E8 00000000 */ nop
/* 7D69C 800E41EC 04410005 */ bgez $v0, .L800E4204
/* 7D6A0 800E41F0 00000000 */ nop
/* 7D6A4 800E41F4 C7A00020 */ lwc1 $f0, 0x20($sp)
/* 7D6A8 800E41F8 C7A20028 */ lwc1 $f2, 0x28($sp)
/* 7D6AC 800E41FC 0803908A */ j .L800E4228
/* 7D6B0 800E4200 E6200028 */ swc1 $f0, 0x28($s1)
.L800E4204:
/* 7D6B4 800E4204 C7A0003C */ lwc1 $f0, 0x3C($sp)
/* 7D6B8 800E4208 C7A20044 */ lwc1 $f2, 0x44($sp)
/* 7D6BC 800E420C 0803908A */ j .L800E4228
/* 7D6C0 800E4210 E6200028 */ swc1 $f0, 0x28($s1)
.L800E4214:
/* 7D6C4 800E4214 04410005 */ bgez $v0, .L800E422C
/* 7D6C8 800E4218 00000000 */ nop
/* 7D6CC 800E421C C7A00048 */ lwc1 $f0, 0x48($sp)
/* 7D6D0 800E4220 C7A20050 */ lwc1 $f2, 0x50($sp)
/* 7D6D4 800E4224 E6200028 */ swc1 $f0, 0x28($s1)
.L800E4228:
/* 7D6D8 800E4228 E6220030 */ swc1 $f2, 0x30($s1)
.L800E422C:
/* 7D6DC 800E422C 82220014 */ lb $v0, 0x14($s1)
/* 7D6E0 800E4230 1440002B */ bnez $v0, .L800E42E0
/* 7D6E4 800E4234 3C030001 */ lui $v1, (0x10000 >> 16)
/* 7D6E8 800E4238 8E220004 */ lw $v0, 0x4($s1)
glabel func_800E423C
/* 7D6EC 800E423C 00431024 */ and $v0, $v0, $v1
/* 7D6F0 800E4240 10400004 */ beqz $v0, .L800E4254
/* 7D6F4 800E4244 0000202D */ daddu $a0, $zero, $zero
/* 7D6F8 800E4248 C6340080 */ lwc1 $f20, 0x80($s1)
/* 7D6FC 800E424C 080390A6 */ j .L800E4298
/* 7D700 800E4250 00000000 */ nop
.L800E4254:
/* 7D704 800E4254 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 7D708 800E4258 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 7D70C 800E425C C62200A8 */ lwc1 $f2, 0xA8($s1)
/* 7D710 800E4260 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 7D714 800E4264 44810000 */ mtc1 $at, $f0
/* 7D718 800E4268 00031080 */ sll $v0, $v1, 2
/* 7D71C 800E426C 00431021 */ addu $v0, $v0, $v1
/* 7D720 800E4270 00021080 */ sll $v0, $v0, 2
/* 7D724 800E4274 00431023 */ subu $v0, $v0, $v1
/* 7D728 800E4278 000218C0 */ sll $v1, $v0, 3
/* 7D72C 800E427C 00431021 */ addu $v0, $v0, $v1
/* 7D730 800E4280 000210C0 */ sll $v0, $v0, 3
/* 7D734 800E4284 46001081 */ sub.s $f2, $f2, $f0
/* 7D738 800E4288 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* 7D73C 800E428C 00220821 */ addu $at, $at, $v0
/* 7D740 800E4290 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at)
/* 7D744 800E4294 46001500 */ add.s $f20, $f2, $f0
.L800E4298:
/* 7D748 800E4298 4406A000 */ mfc1 $a2, $f20
/* 7D74C 800E429C 0C0390C2 */ jal collision_check_player_intersecting_world
/* 7D750 800E42A0 0080282D */ daddu $a1, $a0, $zero
/* 7D754 800E42A4 0441000E */ bgez $v0, .L800E42E0
/* 7D758 800E42A8 24040001 */ addiu $a0, $zero, 0x1
/* 7D75C 800E42AC 862200B0 */ lh $v0, 0xB0($s1)
/* 7D760 800E42B0 3C013F40 */ lui $at, (0x3F400000 >> 16)
/* 7D764 800E42B4 44811000 */ mtc1 $at, $f2
/* 7D768 800E42B8 44820000 */ mtc1 $v0, $f0
/* 7D76C 800E42BC 00000000 */ nop
/* 7D770 800E42C0 46800020 */ cvt.s.w $f0, $f0
/* 7D774 800E42C4 46020002 */ mul.s $f0, $f0, $f2
/* 7D778 800E42C8 00000000 */ nop
/* 7D77C 800E42CC 4406A000 */ mfc1 $a2, $f20
/* 7D780 800E42D0 4600040D */ trunc.w.s $f16, $f0
/* 7D784 800E42D4 44058000 */ mfc1 $a1, $f16
.L800E42D8:
/* 7D788 800E42D8 0C0390C2 */ jal collision_check_player_intersecting_world
/* 7D78C 800E42DC 00000000 */ nop
glabel .L800E42E0
/* 7D790 800E42E0 8FBF006C */ lw $ra, 0x6C($sp)
/* 7D794 800E42E4 8FB40068 */ lw $s4, 0x68($sp)
/* 7D798 800E42E8 8FB30064 */ lw $s3, 0x64($sp)
/* 7D79C 800E42EC 8FB20060 */ lw $s2, 0x60($sp)
/* 7D7A0 800E42F0 8FB1005C */ lw $s1, 0x5C($sp)
/* 7D7A4 800E42F4 8FB00058 */ lw $s0, 0x58($sp)
/* 7D7A8 800E42F8 D7B60078 */ ldc1 $f22, 0x78($sp)
/* 7D7AC 800E42FC D7B40070 */ ldc1 $f20, 0x70($sp)
/* 7D7B0 800E4300 03E00008 */ jr $ra
/* 7D7B4 800E4304 27BD0080 */ addiu $sp, $sp, 0x80
### DECOMPILED C INSTRUCTIONS:
void collision_main_lateral(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
CollisionStatus* collisionStatus = &gCollisionStatus;
f32 playerX, playerY, playerZ;
f32 test1X, test1Y, test1Z;
f32 test2X, test2Y, test2Z;
f32 yaw;
f32 yaw2;
f32 speed;
f32 sinTheta;
f32 cosTheta;
s32 result;
s32 test1;
s32 test2;
f32 xBump;
f32 zBump;
gCollisionStatus.pushingAgainstWall = NO_COLLIDER;
if (playerStatus->flags & PS_FLAG_CUTSCENE_MOVEMENT) {
speed = playerStatus->currentSpeed;
if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) {
speed *= 0.5f;
}
add_vec2D_polar(&playerStatus->position.x, &playerStatus->position.z, speed, playerStatus->heading);
return;
}
switch (playerStatus->actionState) {
case ACTION_STATE_STEP_UP:
collision_check_player_intersecting_world(0, 0,
playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].currentYaw);
break;
case ACTION_STATE_RIDE:
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 hud_element_update
/* D7E04 80141704 27BDFFD8 */ addiu $sp, $sp, -0x28
/* D7E08 80141708 AFB3001C */ sw $s3, 0x1C($sp)
/* D7E0C 8014170C 0080982D */ daddu $s3, $a0, $zero
/* D7E10 80141710 AFBF0020 */ sw $ra, 0x20($sp)
/* D7E14 80141714 AFB20018 */ sw $s2, 0x18($sp)
/* D7E18 80141718 AFB10014 */ sw $s1, 0x14($sp)
/* D7E1C 8014171C AFB00010 */ sw $s0, 0x10($sp)
/* D7E20 80141720 8E700004 */ lw $s0, 0x4($s3)
/* D7E24 80141724 8E64001C */ lw $a0, 0x1C($s3)
/* D7E28 80141728 8E030000 */ lw $v1, 0x0($s0)
/* D7E2C 8014172C 2C62001C */ sltiu $v0, $v1, 0x1C
/* D7E30 80141730 104002AF */ beqz $v0, .L801421F0
/* D7E34 80141734 26100004 */ addiu $s0, $s0, 0x4
/* D7E38 80141738 00031080 */ sll $v0, $v1, 2
/* D7E3C 8014173C 3C018015 */ lui $at, %hi(jtbl_801511B0)
/* D7E40 80141740 00220821 */ addu $at, $at, $v0
/* D7E44 80141744 8C2211B0 */ lw $v0, %lo(jtbl_801511B0)($at)
/* D7E48 80141748 00400008 */ jr $v0
/* D7E4C 8014174C 00000000 */ nop
glabel .L80141750
/* D7E50 80141750 8E620000 */ lw $v0, 0x0($s3)
/* D7E54 80141754 2403003C */ addiu $v1, $zero, 0x3C
/* D7E58 80141758 A2630047 */ sb $v1, 0x47($s3)
/* D7E5C 8014175C 34420004 */ ori $v0, $v0, 0x4
/* D7E60 80141760 0805087C */ j .L801421F0
/* D7E64 80141764 AE620000 */ sw $v0, 0x0($s3)
glabel .L80141768
/* D7E68 80141768 2402003C */ addiu $v0, $zero, 0x3C
/* D7E6C 8014176C A2620047 */ sb $v0, 0x47($s3)
/* D7E70 80141770 8E620000 */ lw $v0, 0x0($s3)
/* D7E74 80141774 3C030004 */ lui $v1, (0x40000 >> 16)
/* D7E78 80141778 00431025 */ or $v0, $v0, $v1
/* D7E7C 8014177C 0805087C */ j .L801421F0
/* D7E80 80141780 AE620000 */ sw $v0, 0x0($s3)
glabel .L80141784
/* D7E84 80141784 24020001 */ addiu $v0, $zero, 0x1
/* D7E88 80141788 8E630000 */ lw $v1, 0x0($s3)
/* D7E8C 8014178C 3C040008 */ lui $a0, (0x80000 >> 16)
/* D7E90 80141790 AE700004 */ sw $s0, 0x4($s3)
/* D7E94 80141794 00641825 */ or $v1, $v1, $a0
/* D7E98 80141798 0805087D */ j .L801421F4
/* D7E9C 8014179C AE630000 */ sw $v1, 0x0($s3)
glabel .L801417A0
/* D7EA0 801417A0 8E630000 */ lw $v1, 0x0($s3)
/* D7EA4 801417A4 24020001 */ addiu $v0, $zero, 0x1
/* D7EA8 801417A8 AE700004 */ sw $s0, 0x4($s3)
/* D7EAC 801417AC 34634000 */ ori $v1, $v1, 0x4000
/* D7EB0 801417B0 0805087D */ j .L801421F4
/* D7EB4 801417B4 AE630000 */ sw $v1, 0x0($s3)
glabel .L801417B8
/* D7EB8 801417B8 24020001 */ addiu $v0, $zero, 0x1
/* D7EBC 801417BC 8E630000 */ lw $v1, 0x0($s3)
/* D7EC0 801417C0 2404BFFF */ addiu $a0, $zero, -0x4001
/* D7EC4 801417C4 0805073C */ j .L80141CF0
/* D7EC8 801417C8 AE700004 */ sw $s0, 0x4($s3)
glabel .L801417CC
/* D7ECC 801417CC 8E110000 */ lw $s1, 0x0($s0)
/* D7ED0 801417D0 26100004 */ addiu $s0, $s0, 0x4
/* D7ED4 801417D4 8E630000 */ lw $v1, 0x0($s3)
/* D7ED8 801417D8 24020001 */ addiu $v0, $zero, 0x1
/* D7EDC 801417DC AE700004 */ sw $s0, 0x4($s3)
/* D7EE0 801417E0 00711825 */ or $v1, $v1, $s1
/* D7EE4 801417E4 0805087D */ j .L801421F4
/* D7EE8 801417E8 AE630000 */ sw $v1, 0x0($s3)
glabel .L801417EC
/* D7EEC 801417EC 8E110000 */ lw $s1, 0x0($s0)
/* D7EF0 801417F0 26100004 */ addiu $s0, $s0, 0x4
/* D7EF4 801417F4 8E630000 */ lw $v1, 0x0($s3)
/* D7EF8 801417F8 24020001 */ addiu $v0, $zero, 0x1
/* D7EFC 801417FC AE700004 */ sw $s0, 0x4($s3)
/* D7F00 80141800 0805073C */ j .L80141CF0
/* D7F04 80141804 00112027 */ nor $a0, $zero, $s1
glabel .L80141808
/* D7F08 80141808 92020003 */ lbu $v0, 0x3($s0)
/* D7F0C 8014180C 26100004 */ addiu $s0, $s0, 0x4
/* D7F10 80141810 A2620047 */ sb $v0, 0x47($s3)
/* D7F14 80141814 8E020000 */ lw $v0, 0x0($s0)
/* D7F18 80141818 3C030040 */ lui $v1, (0x400000 >> 16)
/* D7F1C 8014181C AE620010 */ sw $v0, 0x10($s3)
/* D7F20 80141820 8E620000 */ lw $v0, 0x0($s3)
/* D7F24 80141824 26100004 */ addiu $s0, $s0, 0x4
/* D7F28 80141828 00431024 */ and $v0, $v0, $v1
/* D7F2C 8014182C 10400005 */ beqz $v0, .L80141844
/* D7F30 80141830 AE700004 */ sw $s0, 0x4($s3)
/* D7F34 80141834 8E620010 */ lw $v0, 0x10($s3)
/* D7F38 80141838 8E630018 */ lw $v1, 0x18($s3)
/* D7F3C 8014183C 00431021 */ addu $v0, $v0, $v1
/* D7F40 80141840 AE620010 */ sw $v0, 0x10($s3)
.L80141844:
/* D7F44 80141844 8E630000 */ lw $v1, 0x0($s3)
/* D7F48 80141848 30620100 */ andi $v0, $v1, 0x100
/* D7F4C 8014184C 10400268 */ beqz $v0, .L801421F0
/* D7F50 80141850 3C020010 */ lui $v0, (0x100000 >> 16)
/* D7F54 80141854 00621024 */ and $v0, $v1, $v0
/* D7F58 80141858 14400012 */ bnez $v0, .L801418A4
/* D7F5C 8014185C 00000000 */ nop
/* D7F60 80141860 3C028015 */ lui $v0, %hi(gHudElementSizes)
/* D7F64 80141864 2442EFCC */ addiu $v0, $v0, %lo(gHudElementSizes)
/* D7F68 80141868 82650046 */ lb $a1, 0x46($s3)
/* D7F6C 8014186C 82660045 */ lb $a2, 0x45($s3)
/* D7F70 80141870 00051840 */ sll $v1, $a1, 1
/* D7F74 80141874 00651821 */ addu $v1, $v1, $a1
/* D7F78 80141878 00031840 */ sll $v1, $v1, 1
/* D7F7C 8014187C 00621821 */ addu $v1, $v1, $v0
/* D7F80 80141880 84670000 */ lh $a3, 0x0($v1)
/* D7F84 80141884 84680002 */ lh $t0, 0x2($v1)
/* D7F88 80141888 00061840 */ sll $v1, $a2, 1
/* D7F8C 8014188C 00661821 */ addu $v1, $v1, $a2
/* D7F90 80141890 00031840 */ sll $v1, $v1, 1
/* D7F94 80141894 00621821 */ addu $v1, $v1, $v0
/* D7F98 80141898 84640000 */ lh $a0, 0x0($v1)
/* D7F9C 8014189C 0805062D */ j .L801418B4
/* D7FA0 801418A0 84650002 */ lh $a1, 0x2($v1)
.L801418A4:
/* D7FA4 801418A4 9267004E */ lbu $a3, 0x4E($s3)
/* D7FA8 801418A8 9268004F */ lbu $t0, 0x4F($s3)
/* D7FAC 801418AC 92640050 */ lbu $a0, 0x50($s3)
/* D7FB0 801418B0 92650051 */ lbu $a1, 0x51($s3)
.L801418B4:
/* D7FB4 801418B4 8E630000 */ lw $v1, 0x0($s3)
/* D7FB8 801418B8 30620200 */ andi $v0, $v1, 0x200
/* D7FBC 801418BC 144000CD */ bnez $v0, .L80141BF4
/* D7FC0 801418C0 2402FDFF */ addiu $v0, $zero, -0x201
/* D7FC4 801418C4 34620200 */ ori $v0, $v1, 0x200
/* D7FC8 801418C8 44870000 */ mtc1 $a3, $f0
/* D7FCC 801418CC 00000000 */ nop
/* D7FD0 801418D0 46800020 */ cvt.s.w $f0, $f0
/* D7FD4 801418D4 44882000 */ mtc1 $t0, $f4
/* D7FD8 801418D8 00000000 */ nop
/* D7FDC 801418DC 46802120 */ cvt.s.w $f4, $f4
/* D7FE0 801418E0 44841000 */ mtc1 $a0, $f2
/* D7FE4 801418E4 00000000 */ nop
/* D7FE8 801418E8 468010A0 */ cvt.s.w $f2, $f2
/* D7FEC 801418EC AE620000 */ sw $v0, 0x0($s3)
/* D7FF0 801418F0 82620047 */ lb $v0, 0x47($s3)
/* D7FF4 801418F4 46001081 */ sub.s $f2, $f2, $f0
/* D7FF8 801418F8 E6600028 */ swc1 $f0, 0x28($s3)
/* D7FFC 801418FC 44820000 */ mtc1 $v0, $f0
/* D8000 80141900 00000000 */ nop
/* D8004 80141904 46800020 */ cvt.s.w $f0, $f0
/* D8008 80141908 46001083 */ div.s $f2, $f2, $f0
/* D800C 8014190C 44850000 */ mtc1 $a1, $f0
/* D8010 80141910 00000000 */ nop
/* D8014 80141914 46800020 */ cvt.s.w $f0, $f0
/* D8018 80141918 08050713 */ j .L80141C4C
/* D801C 8014191C E664002C */ swc1 $f4, 0x2C($s3)
glabel .L80141920
/* D8020 80141920 92020003 */ lbu $v0, 0x3($s0)
/* D8024 80141924 26100004 */ addiu $s0, $s0, 0x4
/* D8028 80141928 A2620047 */ sb $v0, 0x47($s3)
/* D802C 8014192C 8E020000 */ lw $v0, 0x0($s0)
/* D8030 80141930 26100004 */ addiu $s0, $s0, 0x4
/* D8034 80141934 AE620010 */ sw $v0, 0x10($s3)
/* D8038 80141938 8E020000 */ lw $v0, 0x0($s0)
/* D803C 8014193C 3C030040 */ lui $v1, (0x400000 >> 16)
/* D8040 80141940 AE620014 */ sw $v0, 0x14($s3)
/* D8044 80141944 8E620000 */ lw $v0, 0x0($s3)
/* D8048 80141948 26100004 */ addiu $s0, $s0, 0x4
/* D804C 8014194C 00431024 */ and $v0, $v0, $v1
/* D8050 80141950 10400009 */ beqz $v0, .L80141978
/* D8054 80141954 AE700004 */ sw $s0, 0x4($s3)
/* D8058 80141958 8E620010 */ lw $v0, 0x10($s3)
/* D805C 8014195C 8E640018 */ lw $a0, 0x18($s3)
/* D8060 80141960 8E630014 */ lw $v1, 0x14($s3)
/* D8064 80141964 0080282D */ daddu $a1, $a0, $zero
/* D8068 80141968 00441021 */ addu $v0, $v0, $a0
/* D806C 8014196C 00651821 */ addu $v1, $v1, $a1
/* D8070 80141970 AE620010 */ sw $v0, 0x10($s3)
/* D8074 80141974 AE630014 */ sw $v1, 0x14($s3)
.L80141978:
/* D8078 80141978 8E630000 */ lw $v1, 0x0($s3)
/* D807C 8014197C 30620100 */ andi $v0, $v1, 0x100
/* D8080 80141980 1040021B */ beqz $v0, .L801421F0
/* D8084 80141984 3C020010 */ lui $v0, (0x100000 >> 16)
/* D8088 80141988 00621024 */ and $v0, $v1, $v0
/* D808C 8014198C 14400012 */ bnez $v0, .L801419D8
/* D8090 80141990 00000000 */ nop
/* D8094 80141994 3C028015 */ lui $v0, %hi(gHudElementSizes)
/* D8098 80141998 2442EFCC */ addiu $v0, $v0, %lo(gHudElementSizes)
/* D809C 8014199C 82650046 */ lb $a1, 0x46($s3)
/* D80A0 801419A0 82660045 */ lb $a2, 0x45($s3)
/* D80A4 801419A4 00051840 */ sll $v1, $a1, 1
/* D80A8 801419A8 00651821 */ addu $v1, $v1, $a1
/* D80AC 801419AC 00031840 */ sll $v1, $v1, 1
/* D80B0 801419B0 00621821 */ addu $v1, $v1, $v0
/* D80B4 801419B4 84670000 */ lh $a3, 0x0($v1)
/* D80B8 801419B8 84680002 */ lh $t0, 0x2($v1)
/* D80BC 801419BC 00061840 */ sll $v1, $a2, 1
/* D80C0 801419C0 00661821 */ addu $v1, $v1, $a2
/* D80C4 801419C4 00031840 */ sll $v1, $v1, 1
/* D80C8 801419C8 00621821 */ addu $v1, $v1, $v0
/* D80CC 801419CC 84640000 */ lh $a0, 0x0($v1)
/* D80D0 801419D0 0805067A */ j .L801419E8
/* D80D4 801419D4 84650002 */ lh $a1, 0x2($v1)
.L801419D8:
/* D80D8 801419D8 9267004E */ lbu $a3, 0x4E($s3)
/* D80DC 801419DC 9268004F */ lbu $t0, 0x4F($s3)
/* D80E0 801419E0 92640050 */ lbu $a0, 0x50($s3)
/* D80E4 801419E4 92650051 */ lbu $a1, 0x51($s3)
.L801419E8:
/* D80E8 801419E8 8E630000 */ lw $v1, 0x0($s3)
/* D80EC 801419EC 30620200 */ andi $v0, $v1, 0x200
/* D80F0 801419F0 14400080 */ bnez $v0, .L80141BF4
/* D80F4 801419F4 2402FDFF */ addiu $v0, $zero, -0x201
/* D80F8 801419F8 34620200 */ ori $v0, $v1, 0x200
/* D80FC 801419FC 44870000 */ mtc1 $a3, $f0
/* D8100 80141A00 00000000 */ nop
/* D8104 80141A04 46800020 */ cvt.s.w $f0, $f0
/* D8108 80141A08 44882000 */ mtc1 $t0, $f4
/* D810C 80141A0C 00000000 */ nop
/* D8110 80141A10 46802120 */ cvt.s.w $f4, $f4
/* D8114 80141A14 44841000 */ mtc1 $a0, $f2
/* D8118 80141A18 00000000 */ nop
/* D811C 80141A1C 468010A0 */ cvt.s.w $f2, $f2
/* D8120 80141A20 AE620000 */ sw $v0, 0x0($s3)
/* D8124 80141A24 82620047 */ lb $v0, 0x47($s3)
/* D8128 80141A28 46001081 */ sub.s $f2, $f2, $f0
/* D812C 80141A2C E6600028 */ swc1 $f0, 0x28($s3)
/* D8130 80141A30 44820000 */ mtc1 $v0, $f0
/* D8134 80141A34 00000000 */ nop
/* D8138 80141A38 46800020 */ cvt.s.w $f0, $f0
/* D813C 80141A3C 46001083 */ div.s $f2, $f2, $f0
/* D8140 80141A40 44850000 */ mtc1 $a1, $f0
/* D8144 80141A44 00000000 */ nop
/* D8148 80141A48 46800020 */ cvt.s.w $f0, $f0
/* D814C 80141A4C 08050713 */ j .L80141C4C
/* D8150 80141A50 E664002C */ swc1 $f4, 0x2C($s3)
glabel .L80141A54
/* D8154 80141A54 92030003 */ lbu $v1, 0x3($s0)
/* D8158 80141A58 8E620000 */ lw $v0, 0x0($s3)
/* D815C 80141A5C 26100004 */ addiu $s0, $s0, 0x4
/* D8160 80141A60 30420400 */ andi $v0, $v0, 0x400
/* D8164 80141A64 14400007 */ bnez $v0, .L80141A84
/* D8168 80141A68 A2630047 */ sb $v1, 0x47($s3)
/* D816C 80141A6C 3C058015 */ lui $a1, %hi(gHudElementCacheTableRasterWorld)
/* D8170 80141A70 24A57970 */ addiu $a1, $a1, %lo(gHudElementCacheTableRasterWorld)
/* D8174 80141A74 3C078015 */ lui $a3, %hi(gHudElementCacheTablePaletteWorld)
/* D8178 80141A78 24E77F70 */ addiu $a3, $a3, %lo(gHudElementCacheTablePaletteWorld)
/* D817C 80141A7C 080506A6 */ j .L80141A98
/* D8180 80141A80 0000182D */ daddu $v1, $zero, $zero
.L80141A84:
/* D8184 80141A84 3C058016 */ lui $a1, %hi(gHudElementCacheTableRasterBattle)
/* D8188 80141A88 24A58580 */ addiu $a1, $a1, %lo(gHudElementCacheTableRasterBattle)
/* D818C 80141A8C 3C078016 */ lui $a3, %hi(gHudElementCacheTablePaletteBattle)
/* D8190 80141A90 24E78B80 */ addiu $a3, $a3, %lo(gHudElementCacheTablePaletteBattle)
/* D8194 80141A94 0000182D */ daddu $v1, $zero, $zero
.L80141A98:
/* D8198 80141A98 8E060000 */ lw $a2, 0x0($s0)
/* D819C 80141A9C 00A0202D */ daddu $a0, $a1, $zero
.L80141AA0:
/* D81A0 80141AA0 8C820000 */ lw $v0, 0x0($a0)
/* D81A4 80141AA4 50460007 */ beql $v0, $a2, .L80141AC4
/* D81A8 80141AA8 26100004 */ addiu $s0, $s0, 0x4
/* D81AC 80141AAC 24630001 */ addiu $v1, $v1, 0x1
/* D81B0 80141AB0 286200C0 */ slti $v0, $v1, 0xC0
/* D81B4 80141AB4 1440FFFA */ bnez $v0, .L80141AA0
/* D81B8 80141AB8 24840008 */ addiu $a0, $a0, 0x8
.L80141ABC:
/* D81BC 80141ABC 080506AF */ j .L80141ABC
/* D81C0 80141AC0 00000000 */ nop
.L80141AC4:
/* D81C4 80141AC4 000310C0 */ sll $v0, $v1, 3
/* D81C8 80141AC8 0000182D */ daddu $v1, $zero, $zero
/* D81CC 80141ACC 00451021 */ addu $v0, $v0, $a1
/* D81D0 80141AD0 8C420004 */ lw $v0, 0x4($v0)
/* D81D4 80141AD4 00E0202D */ daddu $a0, $a3, $zero
/* D81D8 80141AD8 AE620010 */ sw $v0, 0x10($s3)
/* D81DC 80141ADC 8E050000 */ lw $a1, 0x0($s0)
.L80141AE0:
/* D81E0 80141AE0 8C820000 */ lw $v0, 0x0($a0)
/* D81E4 80141AE4 10450007 */ beq $v0, $a1, .L80141B04
/* D81E8 80141AE8 000310C0 */ sll $v0, $v1, 3
/* D81EC 80141AEC 24630001 */ addiu $v1, $v1, 0x1
/* D81F0 80141AF0 286200C0 */ slti $v0, $v1, 0xC0
/* D81F4 80141AF4 1440FFFA */ bnez $v0, .L80141AE0
/* D81F8 80141AF8 24840008 */ addiu $a0, $a0, 0x8
.L80141AFC:
/* D81FC 80141AFC 080506BF */ j .L80141AFC
/* D8200 80141B00 00000000 */ nop
.L80141B04:
/* D8204 80141B04 00471021 */ addu $v0, $v0, $a3
/* D8208 80141B08 8C420004 */ lw $v0, 0x4($v0)
/* D820C 80141B0C 8E630000 */ lw $v1, 0x0($s3)
/* D8210 80141B10 2610000C */ addiu $s0, $s0, 0xC
/* D8214 80141B14 AE700004 */ sw $s0, 0x4($s3)
/* D8218 80141B18 AE620014 */ sw $v0, 0x14($s3)
/* D821C 80141B1C 30620100 */ andi $v0, $v1, 0x100
/* D8220 80141B20 104001B3 */ beqz $v0, .L801421F0
/* D8224 80141B24 3C020010 */ lui $v0, (0x100000 >> 16)
/* D8228 80141B28 00621024 */ and $v0, $v1, $v0
/* D822C 80141B2C 14400012 */ bnez $v0, .L80141B78
/* D8230 80141B30 00000000 */ nop
/* D8234 80141B34 3C028015 */ lui $v0, %hi(gHudElementSizes)
/* D8238 80141B38 2442EFCC */ addiu $v0, $v0, %lo(gHudElementSizes)
/* D823C 80141B3C 82650046 */ lb $a1, 0x46($s3)
/* D8240 80141B40 82660045 */ lb $a2, 0x45($s3)
/* D8244 80141B44 00051840 */ sll $v1, $a1, 1
/* D8248 80141B48 00651821 */ addu $v1, $v1, $a1
/* D824C 80141B4C 00031840 */ sll $v1, $v1, 1
/* D8250 80141B50 00621821 */ addu $v1, $v1, $v0
/* D8254 80141B54 84670000 */ lh $a3, 0x0($v1)
/* D8258 80141B58 84680002 */ lh $t0, 0x2($v1)
/* D825C 80141B5C 00061840 */ sll $v1, $a2, 1
/* D8260 80141B60 00661821 */ addu $v1, $v1, $a2
/* D8264 80141B64 00031840 */ sll $v1, $v1, 1
/* D8268 80141B68 00621821 */ addu $v1, $v1, $v0
/* D826C 80141B6C 84640000 */ lh $a0, 0x0($v1)
/* D8270 80141B70 080506E2 */ j .L80141B88
/* D8274 80141B74 84650002 */ lh $a1, 0x2($v1)
.L80141B78:
/* D8278 80141B78 9267004E */ lbu $a3, 0x4E($s3)
/* D827C 80141B7C 9268004F */ lbu $t0, 0x4F($s3)
/* D8280 80141B80 92640050 */ lbu $a0, 0x50($s3)
/* D8284 80141B84 92650051 */ lbu $a1, 0x51($s3)
.L80141B88:
/* D8288 80141B88 8E630000 */ lw $v1, 0x0($s3)
/* D828C 80141B8C 30620200 */ andi $v0, $v1, 0x200
/* D8290 80141B90 14400018 */ bnez $v0, .L80141BF4
/* D8294 80141B94 2402FDFF */ addiu $v0, $zero, -0x201
/* D8298 80141B98 34620200 */ ori $v0, $v1, 0x200
/* D829C 80141B9C 44870000 */ mtc1 $a3, $f0
/* D82A0 80141BA0 00000000 */ nop
/* D82A4 80141BA4 46800020 */ cvt.s.w $f0, $f0
/* D82A8 80141BA8 44882000 */ mtc1 $t0, $f4
/* D82AC 80141BAC 00000000 */ nop
/* D82B0 80141BB0 46802120 */ cvt.s.w $f4, $f4
/* D82B4 80141BB4 44841000 */ mtc1 $a0, $f2
/* D82B8 80141BB8 00000000 */ nop
/* D82BC 80141BBC 468010A0 */ cvt.s.w $f2, $f2
/* D82C0 80141BC0 AE620000 */ sw $v0, 0x0($s3)
/* D82C4 80141BC4 82620047 */ lb $v0, 0x47($s3)
/* D82C8 80141BC8 46001081 */ sub.s $f2, $f2, $f0
/* D82CC 80141BCC E6600028 */ swc1 $f0, 0x28($s3)
/* D82D0 80141BD0 44820000 */ mtc1 $v0, $f0
/* D82D4 80141BD4 00000000 */ nop
/* D82D8 80141BD8 46800020 */ cvt.s.w $f0, $f0
/* D82DC 80141BDC 46001083 */ div.s $f2, $f2, $f0
/* D82E0 80141BE0 44850000 */ mtc1 $a1, $f0
/* D82E4 80141BE4 00000000 */ nop
/* D82E8 80141BE8 46800020 */ cvt.s.w $f0, $f0
/* D82EC 80141BEC 08050713 */ j .L80141C4C
/* D82F0 80141BF0 E664002C */ swc1 $f4, 0x2C($s3)
.L80141BF4:
/* D82F4 80141BF4 00621024 */ and $v0, $v1, $v0
/* D82F8 80141BF8 44840000 */ mtc1 $a0, $f0
/* D82FC 80141BFC 00000000 */ nop
/* D8300 80141C00 46800020 */ cvt.s.w $f0, $f0
/* D8304 80141C04 44852000 */ mtc1 $a1, $f4
/* D8308 80141C08 00000000 */ nop
/* D830C 80141C0C 46802120 */ cvt.s.w $f4, $f4
/* D8310 80141C10 44871000 */ mtc1 $a3, $f2
/* D8314 80141C14 00000000 */ nop
/* D8318 80141C18 468010A0 */ cvt.s.w $f2, $f2
/* D831C 80141C1C AE620000 */ sw $v0, 0x0($s3)
/* D8320 80141C20 82620047 */ lb $v0, 0x47($s3)
/* D8324 80141C24 46001081 */ sub.s $f2, $f2, $f0
/* D8328 80141C28 E6600028 */ swc1 $f0, 0x28($s3)
/* D832C 80141C2C E664002C */ swc1 $f4, 0x2C($s3)
/* D8330 80141C30 44820000 */ mtc1 $v0, $f0
/* D8334 80141C34 00000000 */ nop
/* D8338 80141C38 46800020 */ cvt.s.w $f0, $f0
/* D833C 80141C3C 46001083 */ div.s $f2, $f2, $f0
/* D8340 80141C40 44880000 */ mtc1 $t0, $f0
/* D8344 80141C44 00000000 */ nop
/* D8348 80141C48 46800020 */ cvt.s.w $f0, $f0
.L80141C4C:
/* D834C 80141C4C 46040001 */ sub.s $f0, $f0, $f4
/* D8350 80141C50 E6620020 */ swc1 $f2, 0x20($s3)
/* D8354 80141C54 44821000 */ mtc1 $v0, $f2
/* D8358 80141C58 00000000 */ nop
/* D835C 80141C5C 468010A0 */ cvt.s.w $f2, $f2
/* D8360 80141C60 46020003 */ div.s $f0, $f0, $f2
/* D8364 80141C64 0805087C */ j .L801421F0
/* D8368 80141C68 E6600024 */ swc1 $f0, 0x24($s3)
glabel .L80141C6C
/* D836C 80141C6C 8E63000C */ lw $v1, 0xC($s3)
/* D8370 80141C70 24020001 */ addiu $v0, $zero, 0x1
/* D8374 80141C74 0805087D */ j .L801421F4
/* D8378 80141C78 AE630004 */ sw $v1, 0x4($s3)
glabel .L80141C7C
/* D837C 80141C7C 24020001 */ addiu $v0, $zero, 0x1
/* D8380 80141C80 AE70000C */ sw $s0, 0xC($s3)
/* D8384 80141C84 0805087D */ j .L801421F4
/* D8388 80141C88 AE700004 */ sw $s0, 0x4($s3)
glabel .L80141C8C
/* D838C 80141C8C 8E110000 */ lw $s1, 0x0($s0)
/* D8390 80141C90 26100004 */ addiu $s0, $s0, 0x4
/* D8394 80141C94 8E120000 */ lw $s2, 0x0($s0)
/* D8398 80141C98 26100004 */ addiu $s0, $s0, 0x4
/* D839C 80141C9C 0C00A67F */ jal rand_int
/* D83A0 80141CA0 0220202D */ daddu $a0, $s1, $zero
/* D83A4 80141CA4 0052102A */ slt $v0, $v0, $s2
/* D83A8 80141CA8 50400102 */ beql $v0, $zero, .L801420B4
/* D83AC 80141CAC AE700004 */ sw $s0, 0x4($s3)
/* D83B0 80141CB0 8E62000C */ lw $v0, 0xC($s3)
/* D83B4 80141CB4 0805082D */ j .L801420B4
/* D83B8 80141CB8 AE620004 */ sw $v0, 0x4($s3)
glabel .L80141CBC
/* D83BC 80141CBC 92040003 */ lbu $a0, 0x3($s0)
/* D83C0 80141CC0 26100004 */ addiu $s0, $s0, 0x4
/* D83C4 80141CC4 24030400 */ addiu $v1, $zero, 0x400
/* D83C8 80141CC8 AE630034 */ sw $v1, 0x34($s3)
/* D83CC 80141CCC AE630038 */ sw $v1, 0x38($s3)
/* D83D0 80141CD0 8E630000 */ lw $v1, 0x0($s3)
/* D83D4 80141CD4 24020001 */ addiu $v0, $zero, 0x1
/* D83D8 80141CD8 AE700004 */ sw $s0, 0x4($s3)
/* D83DC 80141CDC A2640045 */ sb $a0, 0x45($s3)
/* D83E0 80141CE0 A2640046 */ sb $a0, 0x46($s3)
/* D83E4 80141CE4 2404FEFF */ addiu $a0, $zero, -0x101
/* D83E8 80141CE8 00641824 */ and $v1, $v1, $a0
/* D83EC 80141CEC 2404F7FF */ addiu $a0, $zero, -0x801
.L80141CF0:
/* D83F0 80141CF0 00641824 */ and $v1, $v1, $a0
/* D83F4 80141CF4 0805087D */ j .L801421F4
/* D83F8 80141CF8 AE630000 */ sw $v1, 0x0($s3)
glabel .L80141CFC
/* D83FC 80141CFC 8E050000 */ lw $a1, 0x0($s0)
/* D8400 80141D00 26100004 */ addiu $s0, $s0, 0x4
/* D8404 80141D04 8E060000 */ lw $a2, 0x0($s0)
/* D8408 80141D08 26100004 */ addiu $s0, $s0, 0x4
/* D840C 80141D0C 24020001 */ addiu $v0, $zero, 0x1
/* D8410 80141D10 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* D8414 80141D14 44813000 */ mtc1 $at, $f6
/* D8418 80141D18 3C048015 */ lui $a0, %hi(gHudElementSizes)
/* D841C 80141D1C 2484EFCC */ addiu $a0, $a0, %lo(gHudElementSizes)
/* D8420 80141D20 AE700004 */ sw $s0, 0x4($s3)
/* D8424 80141D24 00451804 */ sllv $v1, $a1, $v0
/* D8428 80141D28 00651821 */ addu $v1, $v1, $a1
/* D842C 80141D2C 00431804 */ sllv $v1, $v1, $v0
/* D8430 80141D30 00641821 */ addu $v1, $v1, $a0
/* D8434 80141D34 A2650046 */ sb $a1, 0x46($s3)
/* D8438 80141D38 A2660045 */ sb $a2, 0x45($s3)
/* D843C 80141D3C 84670000 */ lh $a3, 0x0($v1)
/* D8440 80141D40 84680002 */ lh $t0, 0x2($v1)
/* D8444 80141D44 00461804 */ sllv $v1, $a2, $v0
/* D8448 80141D48 00661821 */ addu $v1, $v1, $a2
/* D844C 80141D4C 00431804 */ sllv $v1, $v1, $v0
/* D8450 80141D50 00641821 */ addu $v1, $v1, $a0
/* D8454 80141D54 84640000 */ lh $a0, 0x0($v1)
/* D8458 80141D58 84650002 */ lh $a1, 0x2($v1)
/* D845C 80141D5C 8E630000 */ lw $v1, 0x0($s3)
/* D8460 80141D60 44841000 */ mtc1 $a0, $f2
/* D8464 80141D64 00000000 */ nop
/* D8468 80141D68 468010A0 */ cvt.s.w $f2, $f2
/* D846C 80141D6C 44870000 */ mtc1 $a3, $f0
/* D8470 80141D70 00000000 */ nop
/* D8474 80141D74 46800020 */ cvt.s.w $f0, $f0
/* D8478 80141D78 46001203 */ div.s $f8, $f2, $f0
/* D847C 80141D7C 46083203 */ div.s $f8, $f6, $f8
/* D8480 80141D80 3C014480 */ lui $at, (0x44800000 >> 16)
/* D8484 80141D84 44811000 */ mtc1 $at, $f2
/* D8488 80141D88 44852000 */ mtc1 $a1, $f4
/* D848C 80141D8C 00000000 */ nop
/* D8490 80141D90 46802120 */ cvt.s.w $f4, $f4
/* D8494 80141D94 46024202 */ mul.s $f8, $f8, $f2
/* D8498 80141D98 00000000 */ nop
/* D849C 80141D9C 44880000 */ mtc1 $t0, $f0
/* D84A0 80141DA0 00000000 */ nop
/* D84A4 80141DA4 46800020 */ cvt.s.w $f0, $f0
/* D84A8 80141DA8 46002283 */ div.s $f10, $f4, $f0
/* D84AC 80141DAC 460A3283 */ div.s $f10, $f6, $f10
/* D84B0 80141DB0 2404FEFF */ addiu $a0, $zero, -0x101
/* D84B4 80141DB4 46025082 */ mul.s $f2, $f10, $f2
/* D84B8 80141DB8 00000000 */ nop
/* D84BC 80141DBC 00641824 */ and $v1, $v1, $a0
/* D84C0 80141DC0 34630800 */ ori $v1, $v1, 0x800
/* D84C4 80141DC4 AE630000 */ sw $v1, 0x0($s3)
/* D84C8 80141DC8 4600430D */ trunc.w.s $f12, $f8
/* D84CC 80141DCC E66C0034 */ swc1 $f12, 0x34($s3)
/* D84D0 80141DD0 4600130D */ trunc.w.s $f12, $f2
/* D84D4 80141DD4 0805087D */ j .L801421F4
/* D84D8 80141DD8 E66C0038 */ swc1 $f12, 0x38($s3)
glabel .L80141DDC
/* D84DC 80141DDC 8E050000 */ lw $a1, 0x0($s0)
/* D84E0 80141DE0 26100004 */ addiu $s0, $s0, 0x4
/* D84E4 80141DE4 8E060000 */ lw $a2, 0x0($s0)
/* D84E8 80141DE8 26100004 */ addiu $s0, $s0, 0x4
/* D84EC 80141DEC 24020001 */ addiu $v0, $zero, 0x1
/* D84F0 80141DF0 8E630000 */ lw $v1, 0x0($s3)
/* D84F4 80141DF4 24040400 */ addiu $a0, $zero, 0x400
/* D84F8 80141DF8 AE640034 */ sw $a0, 0x34($s3)
/* D84FC 80141DFC AE640038 */ sw $a0, 0x38($s3)
/* D8500 80141E00 2404F7FF */ addiu $a0, $zero, -0x801
/* D8504 80141E04 AE700004 */ sw $s0, 0x4($s3)
/* D8508 80141E08 34630100 */ ori $v1, $v1, 0x100
/* D850C 80141E0C 00641824 */ and $v1, $v1, $a0
/* D8510 80141E10 2404FDFF */ addiu $a0, $zero, -0x201
/* D8514 80141E14 00641824 */ and $v1, $v1, $a0
/* D8518 80141E18 A2650046 */ sb $a1, 0x46($s3)
/* D851C 80141E1C A2660045 */ sb $a2, 0x45($s3)
/* D8520 80141E20 0805087D */ j .L801421F4
/* D8524 80141E24 AE630000 */ sw $v1, 0x0($s3)
glabel .L80141E28
/* D8528 80141E28 8E110000 */ lw $s1, 0x0($s0)
/* D852C 80141E2C 26100004 */ addiu $s0, $s0, 0x4
/* D8530 80141E30 92630040 */ lbu $v1, 0x40($s3)
/* D8534 80141E34 24020001 */ addiu $v0, $zero, 0x1
/* D8538 80141E38 AE700004 */ sw $s0, 0x4($s3)
/* D853C 80141E3C 00711821 */ addu $v1, $v1, $s1
/* D8540 80141E40 0805087D */ j .L801421F4
/* D8544 80141E44 A2630040 */ sb $v1, 0x40($s3)
glabel .L80141E48
/* D8548 80141E48 8E120000 */ lw $s2, 0x0($s0)
/* D854C 80141E4C 8E620000 */ lw $v0, 0x0($s3)
/* D8550 80141E50 30422000 */ andi $v0, $v0, 0x2000
/* D8554 80141E54 14400004 */ bnez $v0, .L80141E68
/* D8558 80141E58 26100004 */ addiu $s0, $s0, 0x4
/* D855C 80141E5C 92620041 */ lbu $v0, 0x41($s3)
/* D8560 80141E60 080507A8 */ j .L80141EA0
/* D8564 80141E64 00521021 */ addu $v0, $v0, $s2
.L80141E68:
/* D8568 80141E68 92620041 */ lbu $v0, 0x41($s3)
/* D856C 80141E6C 080507A8 */ j .L80141EA0
/* D8570 80141E70 00521023 */ subu $v0, $v0, $s2
glabel .L80141E74
/* D8574 80141E74 8E110000 */ lw $s1, 0x0($s0)
/* D8578 80141E78 26100004 */ addiu $s0, $s0, 0x4
/* D857C 80141E7C 8E120000 */ lw $s2, 0x0($s0)
/* D8580 80141E80 8E620000 */ lw $v0, 0x0($s3)
/* D8584 80141E84 26100004 */ addiu $s0, $s0, 0x4
/* D8588 80141E88 30422000 */ andi $v0, $v0, 0x2000
/* D858C 80141E8C 14400003 */ bnez $v0, .L80141E9C
/* D8590 80141E90 A2710040 */ sb $s1, 0x40($s3)
/* D8594 80141E94 0805082C */ j .L801420B0
/* D8598 80141E98 A2720041 */ sb $s2, 0x41($s3)
.L80141E9C:
/* D859C 80141E9C 00121023 */ negu $v0, $s2
.L80141EA0:
/* D85A0 80141EA0 0805082C */ j .L801420B0
/* D85A4 80141EA4 A2620041 */ sb $v0, 0x41($s3)
glabel .L80141EA8
/* D85A8 80141EA8 3C013780 */ lui $at, (0x37800000 >> 16)
/* D85AC 80141EAC 44810000 */ mtc1 $at, $f0
/* D85B0 80141EB0 C6040000 */ lwc1 $f4, 0x0($s0)
/* D85B4 80141EB4 46802120 */ cvt.s.w $f4, $f4
/* D85B8 80141EB8 46002102 */ mul.s $f4, $f4, $f0
/* D85BC 80141EBC 00000000 */ nop
/* D85C0 80141EC0 26100004 */ addiu $s0, $s0, 0x4
/* D85C4 80141EC4 8E620000 */ lw $v0, 0x0($s3)
/* D85C8 80141EC8 3C030010 */ lui $v1, (0x100000 >> 16)
/* D85CC 80141ECC 00431024 */ and $v0, $v0, $v1
/* D85D0 80141ED0 14400012 */ bnez $v0, .L80141F1C
/* D85D4 80141ED4 E6640030 */ swc1 $f4, 0x30($s3)
/* D85D8 80141ED8 82630046 */ lb $v1, 0x46($s3)
/* D85DC 80141EDC 3C048015 */ lui $a0, %hi(gHudElementSizes)
/* D85E0 80141EE0 2484EFCC */ addiu $a0, $a0, %lo(gHudElementSizes)
/* D85E4 80141EE4 00031040 */ sll $v0, $v1, 1
/* D85E8 80141EE8 00431021 */ addu $v0, $v0, $v1
/* D85EC 80141EEC 00021040 */ sll $v0, $v0, 1
/* D85F0 80141EF0 00441021 */ addu $v0, $v0, $a0
/* D85F4 80141EF4 84470000 */ lh $a3, 0x0($v0)
/* D85F8 80141EF8 82630045 */ lb $v1, 0x45($s3)
/* D85FC 80141EFC 84480002 */ lh $t0, 0x2($v0)
/* D8600 80141F00 00031040 */ sll $v0, $v1, 1
/* D8604 80141F04 00431021 */ addu $v0, $v0, $v1
/* D8608 80141F08 00021040 */ sll $v0, $v0, 1
/* D860C 80141F0C 00441021 */ addu $v0, $v0, $a0
/* D8610 80141F10 84440000 */ lh $a0, 0x0($v0)
/* D8614 80141F14 080507CB */ j .L80141F2C
/* D8618 80141F18 84450002 */ lh $a1, 0x2($v0)
.L80141F1C:
/* D861C 80141F1C 9267004E */ lbu $a3, 0x4E($s3)
/* D8620 80141F20 9268004F */ lbu $t0, 0x4F($s3)
/* D8624 80141F24 92640050 */ lbu $a0, 0x50($s3)
/* D8628 80141F28 92650051 */ lbu $a1, 0x51($s3)
.L80141F2C:
/* D862C 80141F2C 44840000 */ mtc1 $a0, $f0
/* D8630 80141F30 00000000 */ nop
/* D8634 80141F34 46800020 */ cvt.s.w $f0, $f0
/* D8638 80141F38 46040002 */ mul.s $f0, $f0, $f4
/* D863C 80141F3C 00000000 */ nop
/* D8640 80141F40 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* D8644 80141F44 44811000 */ mtc1 $at, $f2
/* D8648 80141F48 00000000 */ nop
/* D864C 80141F4C 4600103E */ c.le.s $f2, $f0
/* D8650 80141F50 00000000 */ nop
/* D8654 80141F54 45010005 */ bc1t .L80141F6C
/* D8658 80141F58 26660048 */ addiu $a2, $s3, 0x48
/* D865C 80141F5C 4600030D */ trunc.w.s $f12, $f0
/* D8660 80141F60 44036000 */ mfc1 $v1, $f12
/* D8664 80141F64 080507E1 */ j .L80141F84
/* D8668 80141F68 00000000 */ nop
.L80141F6C:
/* D866C 80141F6C 46020001 */ sub.s $f0, $f0, $f2
/* D8670 80141F70 3C028000 */ lui $v0, (0x80000000 >> 16)
/* D8674 80141F74 4600030D */ trunc.w.s $f12, $f0
/* D8678 80141F78 44036000 */ mfc1 $v1, $f12
/* D867C 80141F7C 00000000 */ nop
/* D8680 80141F80 00621825 */ or $v1, $v1, $v0
.L80141F84:
/* D8684 80141F84 44850000 */ mtc1 $a1, $f0
/* D8688 80141F88 00000000 */ nop
/* D868C 80141F8C 46800020 */ cvt.s.w $f0, $f0
/* D8690 80141F90 46040002 */ mul.s $f0, $f0, $f4
/* D8694 80141F94 00000000 */ nop
/* D8698 80141F98 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* D869C 80141F9C 44811000 */ mtc1 $at, $f2
/* D86A0 80141FA0 A0C30000 */ sb $v1, 0x0($a2)
/* D86A4 80141FA4 4600103E */ c.le.s $f2, $f0
/* D86A8 80141FA8 00000000 */ nop
/* D86AC 80141FAC 45010005 */ bc1t .L80141FC4
/* D86B0 80141FB0 26660049 */ addiu $a2, $s3, 0x49
/* D86B4 80141FB4 4600030D */ trunc.w.s $f12, $f0
/* D86B8 80141FB8 44036000 */ mfc1 $v1, $f12
/* D86BC 80141FBC 080507F7 */ j .L80141FDC
/* D86C0 80141FC0 00000000 */ nop
.L80141FC4:
/* D86C4 80141FC4 46020001 */ sub.s $f0, $f0, $f2
/* D86C8 80141FC8 3C028000 */ lui $v0, (0x80000000 >> 16)
/* D86CC 80141FCC 4600030D */ trunc.w.s $f12, $f0
/* D86D0 80141FD0 44036000 */ mfc1 $v1, $f12
/* D86D4 80141FD4 00000000 */ nop
/* D86D8 80141FD8 00621825 */ or $v1, $v1, $v0
.L80141FDC:
/* D86DC 80141FDC 44840000 */ mtc1 $a0, $f0
/* D86E0 80141FE0 00000000 */ nop
/* D86E4 80141FE4 46800020 */ cvt.s.w $f0, $f0
/* D86E8 80141FE8 44871000 */ mtc1 $a3, $f2
/* D86EC 80141FEC 00000000 */ nop
/* D86F0 80141FF0 468010A0 */ cvt.s.w $f2, $f2
/* D86F4 80141FF4 46020003 */ div.s $f0, $f0, $f2
/* D86F8 80141FF8 46040202 */ mul.s $f8, $f0, $f4
/* D86FC 80141FFC 00000000 */ nop
/* D8700 80142000 44850000 */ mtc1 $a1, $f0
/* D8704 80142004 00000000 */ nop
/* D8708 80142008 46800020 */ cvt.s.w $f0, $f0
/* D870C 8014200C 44881000 */ mtc1 $t0, $f2
/* D8710 80142010 00000000 */ nop
/* D8714 80142014 468010A0 */ cvt.s.w $f2, $f2
/* D8718 80142018 46020003 */ div.s $f0, $f0, $f2
/* D871C 8014201C 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* D8720 80142020 44811000 */ mtc1 $at, $f2
/* D8724 80142024 46040282 */ mul.s $f10, $f0, $f4
/* D8728 80142028 00000000 */ nop
/* D872C 8014202C 3C014480 */ lui $at, (0x44800000 >> 16)
/* D8730 80142030 44810000 */ mtc1 $at, $f0
/* D8734 80142034 A0C30000 */ sb $v1, 0x0($a2)
/* D8738 80142038 46081203 */ div.s $f8, $f2, $f8
/* D873C 8014203C 46004102 */ mul.s $f4, $f8, $f0
/* D8740 80142040 00000000 */ nop
/* D8744 80142044 8E630000 */ lw $v1, 0x0($s3)
/* D8748 80142048 2404FEFF */ addiu $a0, $zero, -0x101
/* D874C 8014204C AE700004 */ sw $s0, 0x4($s3)
/* D8750 80142050 460A1283 */ div.s $f10, $f2, $f10
/* D8754 80142054 46005002 */ mul.s $f0, $f10, $f0
/* D8758 80142058 00000000 */ nop
/* D875C 8014205C 00641824 */ and $v1, $v1, $a0
/* D8760 80142060 34630810 */ ori $v1, $v1, 0x810
/* D8764 80142064 AE630000 */ sw $v1, 0x0($s3)
/* D8768 80142068 4600230D */ trunc.w.s $f12, $f4
/* D876C 8014206C E66C0034 */ swc1 $f12, 0x34($s3)
/* D8770 80142070 4600030D */ trunc.w.s $f12, $f0
/* D8774 80142074 E66C0038 */ swc1 $f12, 0x38($s3)
/* D8778 80142078 0805087D */ j .L801421F4
/* D877C 8014207C 24020001 */ addiu $v0, $zero, 0x1
glabel .L80142080
/* D8780 80142080 8E110000 */ lw $s1, 0x0($s0)
/* D8784 80142084 8E620000 */ lw $v0, 0x0($s3)
/* D8788 80142088 26100004 */ addiu $s0, $s0, 0x4
/* D878C 8014208C 34440020 */ ori $a0, $v0, 0x20
/* D8790 80142090 A271004A */ sb $s1, 0x4A($s3)
/* D8794 80142094 322300FF */ andi $v1, $s1, 0xFF
/* D8798 80142098 240200FF */ addiu $v0, $zero, 0xFF
/* D879C 8014209C 14620004 */ bne $v1, $v0, .L801420B0
/* D87A0 801420A0 AE640000 */ sw $a0, 0x0($s3)
/* D87A4 801420A4 2402FFDF */ addiu $v0, $zero, -0x21
/* D87A8 801420A8 00821024 */ and $v0, $a0, $v0
/* D87AC 801420AC AE620000 */ sw $v0, 0x0($s3)
.L801420B0:
/* D87B0 801420B0 AE700004 */ sw $s0, 0x4($s3)
.L801420B4:
/* D87B4 801420B4 0805087D */ j .L801421F4
/* D87B8 801420B8 24020001 */ addiu $v0, $zero, 0x1
glabel .L801420BC
/* D87BC 801420BC 8E110000 */ lw $s1, 0x0($s0)
/* D87C0 801420C0 26100004 */ addiu $s0, $s0, 0x4
/* D87C4 801420C4 8E120000 */ lw $s2, 0x0($s0)
/* D87C8 801420C8 26100004 */ addiu $s0, $s0, 0x4
/* D87CC 801420CC 0C00A67F */ jal rand_int
/* D87D0 801420D0 02512023 */ subu $a0, $s2, $s1
/* D87D4 801420D4 00511021 */ addu $v0, $v0, $s1
/* D87D8 801420D8 A2620047 */ sb $v0, 0x47($s3)
/* D87DC 801420DC 0805087C */ j .L801421F0
/* D87E0 801420E0 AE700004 */ sw $s0, 0x4($s3)
glabel .L801420E4
/* D87E4 801420E4 92030003 */ lbu $v1, 0x3($s0)
/* D87E8 801420E8 26100004 */ addiu $s0, $s0, 0x4
/* D87EC 801420EC 24020001 */ addiu $v0, $zero, 0x1
/* D87F0 801420F0 2404FEFF */ addiu $a0, $zero, -0x101
/* D87F4 801420F4 A263004E */ sb $v1, 0x4E($s3)
/* D87F8 801420F8 A2630050 */ sb $v1, 0x50($s3)
/* D87FC 801420FC 92050003 */ lbu $a1, 0x3($s0)
/* D8800 80142100 24030400 */ addiu $v1, $zero, 0x400
/* D8804 80142104 AE630034 */ sw $v1, 0x34($s3)
/* D8808 80142108 AE630038 */ sw $v1, 0x38($s3)
/* D880C 8014210C 8E630000 */ lw $v1, 0x0($s3)
/* D8810 80142110 26100004 */ addiu $s0, $s0, 0x4
/* D8814 80142114 AE700004 */ sw $s0, 0x4($s3)
/* D8818 80142118 A2600045 */ sb $zero, 0x45($s3)
/* D881C 8014211C A2600046 */ sb $zero, 0x46($s3)
/* D8820 80142120 00641824 */ and $v1, $v1, $a0
/* D8824 80142124 2404F7FF */ addiu $a0, $zero, -0x801
/* D8828 80142128 00641824 */ and $v1, $v1, $a0
/* D882C 8014212C 3C040010 */ lui $a0, (0x100000 >> 16)
/* D8830 80142130 00641825 */ or $v1, $v1, $a0
/* D8834 80142134 AE630000 */ sw $v1, 0x0($s3)
/* D8838 80142138 A265004F */ sb $a1, 0x4F($s3)
/* D883C 8014213C 0805087D */ j .L801421F4
/* D8840 80142140 A2650051 */ sb $a1, 0x51($s3)
glabel .L80142144
/* D8844 80142144 8E110000 */ lw $s1, 0x0($s0)
/* D8848 80142148 26100004 */ addiu $s0, $s0, 0x4
/* D884C 8014214C 3C03F0FF */ lui $v1, (0xF0FFFFFF >> 16)
/* D8850 80142150 3463FFFF */ ori $v1, $v1, (0xF0FFFFFF & 0xFFFF)
/* D8854 80142154 8E640000 */ lw $a0, 0x0($s3)
/* D8858 80142158 24020001 */ addiu $v0, $zero, 0x1
/* D885C 8014215C AE700004 */ sw $s0, 0x4($s3)
/* D8860 80142160 00832024 */ and $a0, $a0, $v1
/* D8864 80142164 00111E00 */ sll $v1, $s1, 24
/* D8868 80142168 00832025 */ or $a0, $a0, $v1
/* D886C 8014216C 0805087D */ j .L801421F4
/* D8870 80142170 AE640000 */ sw $a0, 0x0($s3)
glabel .L80142174
/* D8874 80142174 8E110000 */ lw $s1, 0x0($s0)
/* D8878 80142178 26100004 */ addiu $s0, $s0, 0x4
/* D887C 8014217C 0C00A67F */ jal rand_int
/* D8880 80142180 2624FFFF */ addiu $a0, $s1, -0x1
/* D8884 80142184 00021080 */ sll $v0, $v0, 2
/* D8888 80142188 00501021 */ addu $v0, $v0, $s0
/* D888C 8014218C 8C450000 */ lw $a1, 0x0($v0)
/* D8890 80142190 0260202D */ daddu $a0, $s3, $zero
/* D8894 80142194 0C04FCD4 */ jal hud_element_load_script
/* D8898 80142198 AC850004 */ sw $a1, 0x4($a0)
/* D889C 8014219C 0805087D */ j .L801421F4
/* D88A0 801421A0 24020001 */ addiu $v0, $zero, 0x1
glabel .L801421A4
/* D88A4 801421A4 8E060000 */ lw $a2, 0x0($s0)
/* D88A8 801421A8 26100004 */ addiu $s0, $s0, 0x4
/* D88AC 801421AC 0C05272D */ jal sfx_play_sound
/* D88B0 801421B0 00C0202D */ daddu $a0, $a2, $zero
/* D88B4 801421B4 24020001 */ addiu $v0, $zero, 0x1
/* D88B8 801421B8 0805087D */ j .L801421F4
/* D88BC 801421BC AE700004 */ sw $s0, 0x4($s3)
glabel .L801421C0
/* D88C0 801421C0 8E050000 */ lw $a1, 0x0($s0)
/* D88C4 801421C4 26100004 */ addiu $s0, $s0, 0x4
/* D88C8 801421C8 8E060000 */ lw $a2, 0x0($s0)
/* D88CC 801421CC 26100004 */ addiu $s0, $s0, 0x4
/* D88D0 801421D0 8E620000 */ lw $v0, 0x0($s3)
/* D88D4 801421D4 3C030001 */ lui $v1, (0x10000 >> 16)
/* D88D8 801421D8 00431024 */ and $v0, $v0, $v1
/* D88DC 801421DC 1040FFB5 */ beqz $v0, .L801420B4
/* D88E0 801421E0 AE700004 */ sw $s0, 0x4($s3)
/* D88E4 801421E4 A4850028 */ sh $a1, 0x28($a0)
/* D88E8 801421E8 0805082D */ j .L801420B4
/* D88EC 801421EC A486002A */ sh $a2, 0x2A($a0)
glabel .L801421F0
/* D88F0 801421F0 0000102D */ daddu $v0, $zero, $zero
.L801421F4:
/* D88F4 801421F4 8FBF0020 */ lw $ra, 0x20($sp)
/* D88F8 801421F8 8FB3001C */ lw $s3, 0x1C($sp)
/* D88FC 801421FC 8FB20018 */ lw $s2, 0x18($sp)
/* D8900 80142200 8FB10014 */ lw $s1, 0x14($sp)
/* D8904 80142204 8FB00010 */ lw $s0, 0x10($sp)
/* D8908 80142208 03E00008 */ jr $ra
/* D890C 8014220C 27BD0028 */ addiu $sp, $sp, 0x28
### DECOMPILED C INSTRUCTIONS:
s32 hud_element_update(HudElement* hudElement) {
HudCacheEntry* entryRaster;
HudCacheEntry* entryPalette;
s32 i;
s32 drawSizePreset;
s32 tileSizePreset;
u8 sizePreset;
f32 xScaled, yScaled;
s32 imageWidth, imageHeight, drawWidth, drawHeight;
u32 min, max;
u32 flags;
s32 raster, palette;
s32 s1, s2;
s32 arg1, arg2;
f32 uniformScale;
HudScript* newReadPos;
HudTransform* hudTransform = hudElement->hudTransform;
s32* nextPos = (s32*)hudElement->readPos;
switch (*nextPos++) {
case HUD_ELEMENT_OP_End:
hudElement->updateTimer = 60;
flags = hudElement->flags;
hudElement->flags = flags | HUD_ELEMENT_FLAG_ANIMATION_FINISHED;
break;
case HUD_ELEMENT_OP_Delete:
hudElement->updateTimer = 60;
hudElement->flags |= HUD_ELEMENT_FLAG_DELETE;
break;
case HUD_ELEMENT_OP_UseIA8:
hudElement->readPos = (HudScript*)nextPos;
hudElement->flags |= HUD_ELEMENT_FLAG_FMT_IA8;
return TRUE;
case HUD_ELEMENT_OP_SetVisible:
hudElement->readPos = (HudScript*)nextPos;
hudElement->flags |= HUD_ELEMENT_FLAG_FMT_CI4;
return TRUE;
case HUD_ELEMENT_OP_SetHidden:
hudElement->readPos = (HudScript*)nextPos;
hudElement->flags &= ~HUD_ELEMENT_FLAG_FMT_CI4;
return TRUE;
case HUD_ELEMENT_OP_SetFlags:
s1 = *nextPos++;
hudElement->readPos = (HudScript*)nextPos;
hudElement->flags |= s1;
return TRUE;
case HUD_ELEMENT_OP_ClearFlags:
s1 = *nextPos++;
hudElement->readPos = (HudScript*)nextPos;
hudElement->flags &= ~s1;
return TRUE;
case HUD_ELEMENT_OP_SetRGBA:
hudElement->updateTimer = *nextPos++;
hudElement->imageAddr = (u8*)*nextPos++;
hudElement->readPos = (HudScript*)nextPos;
if (hudElement->flags & HUD_ELEMENT_FLAG_MEMOFFSET) {
hudElement->imageAddr += hudElement->memOffset;
}
if (hudElement->flags & HUD_ELEMENT_FLAG_FIXEDSCALE) {
if (!(hudElement->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) {
tileSizePreset = hudElement->tileSizePreset;
drawSizePreset = hudElement->drawSizePreset;
imageWidth = gHudElementSizes[tileSizePreset].width;
imageHeight = gHudElementSizes[tileSizePreset].height;
drawWidth = gHudElementSizes[drawSizePreset].width;
drawHeight = gHudElementSizes[drawSizePreset].height;
} else {
imageWidth = hudElement->customImageSize.x;
imageHeight = hudElement->customImageSize.y;
drawWidth = hudElement->customDrawSize.x;
drawHeight = hudElement->customDrawSize.y;
}
if (!(hudElement->flags & HUD_ELEMENT_FLAG_200)) {
hudElement->flags |= HUD_ELEMENT_FLAG_200;
hudElement->unkImgScale[0] = imageWidth;
hudElement->unkImgScale[1] = imageHeight;
hudElement->deltaSizeX = ((f32)drawWidth - (f32)imageWidth) / (f32)hudElement->updateTimer;
hudElement->deltaSizeY = ((f32)drawHeight - (f32)imageHeight) / (f32)hudElement->updateTimer;
} else {
hudElement->flags &= ~HUD_ELEMENT_FLAG_200;
hudElement->unkImgScale[0] = drawWidth;
hudElement->unkImgScale[1] = drawHeight;
hudElement->deltaSizeX = ((f32)imageWidth - (f32)drawWidth) / (f32)hudElement->updateTimer;
hudElement->deltaSizeY = ((f32)imageHeight - (f32)drawHeight) / (f32)hudElement->updateTimer;
}
}
break;
case HUD_ELEMENT_OP_SetCI:
hudElement->updateTimer = *nextPos++;
hudElement->imageAddr = (u8*)*nextPos++;
hudElement->paletteAddr = (u8*)*nextPos++;
hudElement->readPos = (HudScript*)nextPos;
if (hudElement->flags & HUD_ELEMENT_FLAG_MEMOFFSET) {
hudElement->imageAddr += hudElement->memOffset;
hudElement->paletteAddr += hudElement->memOffset;
}
if (hudElement->flags & HUD_ELEMENT_FLAG_FIXEDSCALE) {
if (!(hudElement->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) {
tileSizePreset = hudElement->tileSizePreset;
drawSizePreset = hudElement->drawSizePreset;
imageWidth = gHudElementSizes[tileSizePreset].width;
imageHeight = gHudElementSizes[tileSizePreset].height;
drawWidth = gHudElementSizes[drawSizePreset].width;
drawHeight = gHudElementSizes[drawSizePreset].height;
} else {
imageWidth = hudElement->customImageSize.x;
imageHeight = hudElement->customImageSize.y;
drawWidth = hudElement->customDrawSize.x;
drawHeight = hudElement->customDrawSize.y;
}
if (!(hudElement->flags & HUD_ELEMENT_FLAG_200)) {
hudElement->flags |= HUD_ELEMENT_FLAG_200;
hudElement->unkImgScale[0] = imageWidth;
hudElement->unkImgScale[1] = imageHeight;
hudElement->deltaSizeX = ((f32)drawWidth - (f32)imageWidth) / (f32)hudElement->updateTimer;
hudElement->deltaSizeY = ((f32)drawHeight - (f32)imageHeight) / (f32)hudElement->updateTimer;
} else {
hudElement->flags &= ~HUD_ELEMENT_FLAG_200;
hudElement->unkImgScale[0] = drawWidth;
hudElement->unkImgScale[1] = drawHeight;
hudElement->deltaSizeX = ((f32)imageWidth - (f32)drawWidth) / (f32)hudElement->updateTimer;
hudElement->deltaSizeY = ((f32)imageHeight - (f32)drawHeight) / (f32)hudElement->updateTimer;
}
}
break;
case HUD_ELEMENT_OP_SetImage:
hudElement->updateTimer = *nextPos++;
if (!(hudElement->flags & HUD_ELEMENT_FLAG_BATTLE)) {
entryRaster = gHudElementCacheTableRasterWorld;
entryPalette = gHudElementCacheTablePaletteWorld;
} else {
entryRaster = gHudElementCacheTableRasterBattle;
entryPalette = gHudElementCacheTablePaletteBattle;
}
i = 0;
while (TRUE) {
if (entryRaster[i].id == *nextPos) {
break;
}
ASSERT(++i < MAX_HUD_CACHE_ENTRIES);
}
nextPos++;
hudElement->imageAddr = entryRaster[i].data;
i = 0;
while (TRUE) {
if (entryPalette[i].id == *nextPos) {
break;
}
ASSERT(++i < MAX_HUD_CACHE_ENTRIES);
}
hudElement->paletteAddr = entryPalette[i].data;
nextPos += 3;
hudElement->readPos = (HudScript*)nextPos;
if (hudElement->flags & HUD_ELEMENT_FLAG_FIXEDSCALE) {
if (!(hudElement->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) {
tileSizePreset = hudElement->tileSizePreset;
drawSizePreset = hudElement->drawSizePreset;
imageWidth = gHudElementSizes[tileSizePreset].width;
imageHeight = gHudElementSizes[tileSizePreset].height;
drawWidth = gHudElementSizes[drawSizePreset].width;
drawHeight = gHudElementSizes[drawSizePreset].height;
} else {
imageWidth = hudElement->customImageSize.x;
imageHeight = hudElement->customImageSize.y;
drawWidth = hudElement->customDrawSize.x;
drawHeight = hudElement->customDrawSize.y;
}
if (!(hudElement->flags & HUD_ELEMENT_FLAG_200)) {
hudElement->flags |= HUD_ELEMENT_FLAG_200;
hudElement->unkImgScale[0] = imageWidth;
hudElement->unkImgScale[1] = imageHeight;
hudElement->deltaSizeX = ((f32)drawWidth - (f32)imageWidth) / (f32)hudElement->updateTimer;
hudElement->deltaSizeY = ((f32)drawHeight - (f32)imageHeight) / (f32)hudElement->updateTimer;
} else {
hudElement->flags &= ~HUD_ELEMENT_FLAG_200;
hudElement->unkImgScale[0] = drawWidth;
hudElement->unkImgScale[1] = drawHeight;
hudElement->deltaSizeX = ((f32)imageWidth - (f32)drawWidth) / (f32)hudElement->updateTimer;
hudElement->deltaSizeY = ((f32)imageHeight - (f32)drawHeight) / (f32)hudElement->updateTimer;
}
}
break;
case HUD_ELEMENT_OP_Restart:
hudElement->readPos = hudElement->loopStartPos;
return TRUE;
case HUD_ELEMENT_OP_Loop:
hudElement->loopStartPos = (HudScript*)nextPos;
hudElement->readPos = (HudScript*)nextPos;
return TRUE;
case HUD_ELEMENT_OP_RandomRestart:
s1 = *nextPos++;
s2 = *nextPos++;
if (rand_int(s1) < s2) {
hudElement->readPos = hudElement->loopStartPos;
} else {
hudElement->readPos = (HudScript*)nextPos;
}
return TRUE;
case HUD_ELEMENT_OP_SetTileSize:
sizePreset = *nextPos++;
hudElement->widthScale = X10(1);
hudElement->heightScale = X10(1);
hudElement->readPos = (HudScript*)nextPos;
hudElement->drawSizePreset = sizePreset;
hudElement->tileSizePreset = sizePreset;
hudElement->flags &= ~HUD_ELEMENT_FLAG_FIXEDSCALE;
hudElement->flags &= ~HUD_ELEMENT_FLAG_REPEATED;
return TRUE;
case HUD_ELEMENT_OP_SetSizesAutoScale:
tileSizePreset = *nextPos++;
arg2 = *nextPos++;
hudElement->readPos = (HudScript*)nextPos;
hudElement->tileSizePreset = tileSizePreset;
hudElement->drawSizePreset = arg2;
imageWidth = gHudElementSizes[tileSizePreset].width;
imageHeight = gHudElementSizes[tileSizePreset].height;
drawWidth = gHudElementSizes[arg2].width;
drawHeight = gHudElementSizes[arg2].height;
xScaled = (f32) drawWidth / (f32) imageWidth;
yScaled = (f32) drawHeight / (f32) imageHeight;
xScaled = 1.0f / xScaled;
yScaled = 1.0f / yScaled;
hudElement->widthScale = X10(xScaled);
hudElement->heightScale = X10(yScaled);
hudElement->flags &= ~HUD_ELEMENT_FLAG_FIXEDSCALE;
hudElement->flags |= HUD_ELEMENT_FLAG_REPEATED;
return TRUE;
case HUD_ELEMENT_OP_SetSizesFixedScale:
tileSizePreset = *nextPos++;
drawSizePreset = *nextPos++;
hudElement->widthScale = X10(1);
hudElement->heightScale = X10(1);
hudElement->readPos = (HudScript*)nextPos;
hudElement->tileSizePreset = tileSizePreset;
hudElement->drawSizePreset = drawSizePreset;
hudElement->flags |= HUD_ELEMENT_FLAG_FIXEDSCALE;
hudElement->flags &= ~HUD_ELEMENT_FLAG_REPEATED;
hudElement->flags &= ~HUD_ELEMENT_FLAG_200;
return TRUE;
case HUD_ELEMENT_OP_AddTexelOffsetX:
s1 = *nextPos++;
hudElement->readPos = (HudScript*)nextPos;
hudElement->screenPosOffset.x += s1;
return TRUE;
case HUD_ELEMENT_OP_AddTexelOffsetY:
s2 = *nextPos++;
if (!(hudElement->flags & HUD_ELEMENT_FLAG_FLIPY)) {
hudElement->screenPosOffset.y += s2;
} else {
hudElement->screenPosOffset.y -= s2;
}
hudElement->readPos = (HudScript*)nextPos;
return TRUE;
case HUD_ELEMENT_OP_SetTexelOffset:
s1 = *nextPos++;
s2 = *nextPos++;
hudElement->screenPosOffset.x = s1;
if (!(hudElement->flags & HUD_ELEMENT_FLAG_FLIPY)) {
hudElement->screenPosOffset.y = s2;
} else {
hudElement->screenPosOffset.y = -s2;
}
hudElement->readPos = (HudScript*)nextPos;
return TRUE;
case HUD_ELEMENT_OP_SetScale:
uniformScale = (f32)*nextPos++;
uniformScale /= 65536;
hudElement->uniformScale = uniformScale;
if (!(hudElement->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) {
imageWidth = gHudElementSizes[hudElement->tileSizePreset].width;
imageHeight = gHudElementSizes[hudElement->tileSizePreset].height;
drawWidth = gHudElementSizes[hudElement->drawSizePreset].width;
drawHeight = gHudElementSizes[hudElement->drawSizePreset].height;
} else {
imageWidth = hudElement->customImageSize.x;
imageHeight = hudElement->customImageSize.y;
drawWidth = hudElement->customDrawSize.x;
drawHeight = hudElement->customDrawSize.y;
}
hudElement->sizeX = drawWidth * uniformScale;
hudElement->sizeY = drawHeight * uniformScale;
xScaled = (f32) drawWidth / (f32) imageWidth * uniformScale;
yScaled = (f32) drawHeight / (f32) imageHeight * uniformScale;
xScaled = 1.0f / xScaled;
yScaled = 1.0f / yScaled;
hudElement->widthScale = X10(xScaled);
hudElement->heightScale = X10(yScaled);
hudElement->readPos = (HudScript*)nextPos;
hudElement->flags &= ~HUD_ELEMENT_FLAG_FIXEDSCALE;
hudElement->flags |= HUD_ELEMENT_FLAG_REPEATED | HUD_ELEMENT_FLAG_SCALED;
return TRUE;
case HUD_ELEMENT_OP_SetAlpha:
s1 = *nextPos++;
hudElement->opacity = s1;
hudElement->flags |= HUD_ELEMENT_FLAG_TRANSPARENT;
if (hudElement->opacity == 255) {
hudElement->flags &= ~HUD_ELEMENT_FLAG_TRANSPARENT;
}
hudElement->readPos = (HudScript*)nextPos;
return TRUE;
case HUD_ELEMENT_OP_RandomDelay:
s1 = *nextPos++;
s2 = *nextPos++;
hudElement->updateTimer = rand_int(s2 - s1) + s1;
hudElement->readPos = (HudScript*)nextPos;
break;
case HUD_ELEMENT_OP_SetCustomSize:
hudElement->customDrawSize.x = hudElement->customImageSize.x = *nextPos++;
hudElement->customDrawSize.y = hudElement->customImageSize.y = *nextPos++;
hudElement->readPos = (HudScript*)nextPos;
hudElement->widthScale = X10(1);
hudElement->heightScale = X10(1);
hudElement->drawSizePreset = 0;
hudElement->tileSizePreset = 0;
hudElement->flags &= ~HUD_ELEMENT_FLAG_FIXEDSCALE;
hudElement->flags &= ~HUD_ELEMENT_FLAG_REPEATED;
hudElement->flags |= HUD_ELEMENT_FLAG_CUSTOM_SIZE;
return TRUE;
case HUD_ELEMENT_OP_op_15:
s1 = *nextPos++;
hudElement->readPos = (HudScript*)nextPos;
hudElement->flags &= ~(HUD_ELEMENT_FLAG_1000000 | HUD_ELEMENT_FLAG_2000000 | HUD_ELEMENT_FLAG_4000000 | HUD_ELEMENT_FLAG_8000000);
hudElement->flags |= s1 << 24;
return TRUE;
case HUD_ELEMENT_OP_RandomBranch:
s1 = *nextPos++;
newReadPos = (HudScript*)nextPos[rand_int(s1 - 1)];
hudElement->readPos = newReadPos;
hud_element_load_script(hudElement, newReadPos);
return TRUE;
case HUD_ELEMENT_OP_PlaySound:
arg2 = *nextPos++;
sfx_play_sound(arg2);
hudElement->readPos = (HudScript*)nextPos;
return TRUE;
case HUD_ELEMENT_OP_SetPivot:
arg1 = *nextPos++;
arg2 = *nextPos++;
hudElement->readPos = (HudScript*)nextPos;
if (hudElement->flags & HUD_ELEMENT_FLAG_TRANSFORM) {
hudTransform->pivot.x = arg1;
// TODO find better match
do {
hudTransform->pivot.y = arg2;
} while (0);
}
return TRUE;
case HUD_ELEMENT_OP_op_16:
break;
}
return FALSE;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_802752AC
/* 1A3B8C 802752AC 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 1A3B90 802752B0 AFB20020 */ sw $s2, 0x20($sp)
/* 1A3B94 802752B4 3C12800E */ lui $s2, %hi(gBattleStatus + 0xD8)
/* 1A3B98 802752B8 8E52C148 */ lw $s2, %lo(gBattleStatus + 0xD8)($s2)
/* 1A3B9C 802752BC AFB30024 */ sw $s3, 0x24($sp)
/* 1A3BA0 802752C0 0080982D */ daddu $s3, $a0, $zero
/* 1A3BA4 802752C4 AFBF0028 */ sw $ra, 0x28($sp)
/* 1A3BA8 802752C8 AFB1001C */ sw $s1, 0x1C($sp)
/* 1A3BAC 802752CC AFB00018 */ sw $s0, 0x18($sp)
/* 1A3BB0 802752D0 F7BA0048 */ sdc1 $f26, 0x48($sp)
/* 1A3BB4 802752D4 F7B80040 */ sdc1 $f24, 0x40($sp)
/* 1A3BB8 802752D8 F7B60038 */ sdc1 $f22, 0x38($sp)
/* 1A3BBC 802752DC F7B40030 */ sdc1 $f20, 0x30($sp)
/* 1A3BC0 802752E0 8E71000C */ lw $s1, 0xC($s3)
/* 1A3BC4 802752E4 10A00019 */ beqz $a1, .L8027534C
/* 1A3BC8 802752E8 2650000C */ addiu $s0, $s2, 0xC
/* 1A3BCC 802752EC 8E250000 */ lw $a1, 0x0($s1)
/* 1A3BD0 802752F0 0C0B1EAF */ jal evt_get_variable
/* 1A3BD4 802752F4 26310004 */ addiu $s1, $s1, 0x4
/* 1A3BD8 802752F8 A6420070 */ sh $v0, 0x70($s2)
/* 1A3BDC 802752FC 8E250000 */ lw $a1, 0x0($s1)
/* 1A3BE0 80275300 0C0B1EAF */ jal evt_get_variable
/* 1A3BE4 80275304 0260202D */ daddu $a0, $s3, $zero
/* 1A3BE8 80275308 A6420072 */ sh $v0, 0x72($s2)
/* 1A3BEC 8027530C AE600070 */ sw $zero, 0x70($s3)
/* 1A3BF0 80275310 86430072 */ lh $v1, 0x72($s2)
/* 1A3BF4 80275314 24020001 */ addiu $v0, $zero, 0x1
/* 1A3BF8 80275318 10620005 */ beq $v1, $v0, .L80275330
/* 1A3BFC 8027531C 24020005 */ addiu $v0, $zero, 0x5
/* 1A3C00 80275320 10620003 */ beq $v1, $v0, .L80275330
/* 1A3C04 80275324 24020006 */ addiu $v0, $zero, 0x6
/* 1A3C08 80275328 14620003 */ bne $v1, $v0, .L80275338
/* 1A3C0C 8027532C 00000000 */ nop
.L80275330:
/* 1A3C10 80275330 2402000A */ addiu $v0, $zero, 0xA
/* 1A3C14 80275334 AE620070 */ sw $v0, 0x70($s3)
.L80275338:
/* 1A3C18 80275338 86030066 */ lh $v1, 0x66($s0)
/* 1A3C1C 8027533C 24020002 */ addiu $v0, $zero, 0x2
/* 1A3C20 80275340 14620002 */ bne $v1, $v0, .L8027534C
/* 1A3C24 80275344 24020014 */ addiu $v0, $zero, 0x14
/* 1A3C28 80275348 AE620070 */ sw $v0, 0x70($s3)
.L8027534C:
/* 1A3C2C 8027534C 8E630070 */ lw $v1, 0x70($s3)
/* 1A3C30 80275350 2402000A */ addiu $v0, $zero, 0xA
/* 1A3C34 80275354 106200C0 */ beq $v1, $v0, .L80275658
/* 1A3C38 80275358 2862000B */ slti $v0, $v1, 0xB
/* 1A3C3C 8027535C 10400005 */ beqz $v0, .L80275374
/* 1A3C40 80275360 24020014 */ addiu $v0, $zero, 0x14
/* 1A3C44 80275364 10600007 */ beqz $v1, .L80275384
/* 1A3C48 80275368 24020002 */ addiu $v0, $zero, 0x2
/* 1A3C4C 8027536C 0809D679 */ j .L802759E4
/* 1A3C50 80275370 00000000 */ nop
.L80275374:
/* 1A3C54 80275374 10620172 */ beq $v1, $v0, .L80275940
/* 1A3C58 80275378 24020001 */ addiu $v0, $zero, 0x1
/* 1A3C5C 8027537C 0809D677 */ j .L802759DC
/* 1A3C60 80275380 00000000 */ nop
.L80275384:
/* 1A3C64 80275384 C6400144 */ lwc1 $f0, 0x144($s2)
/* 1A3C68 80275388 C618000C */ lwc1 $f24, 0xC($s0)
/* 1A3C6C 8027538C C61A0014 */ lwc1 $f26, 0x14($s0)
/* 1A3C70 80275390 E6000000 */ swc1 $f0, 0x0($s0)
/* 1A3C74 80275394 46000586 */ mov.s $f22, $f0
/* 1A3C78 80275398 4406C000 */ mfc1 $a2, $f24
/* 1A3C7C 8027539C C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A3C80 802753A0 4600B306 */ mov.s $f12, $f22
/* 1A3C84 802753A4 E6000004 */ swc1 $f0, 0x4($s0)
/* 1A3C88 802753A8 C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A3C8C 802753AC 4407D000 */ mfc1 $a3, $f26
/* 1A3C90 802753B0 46000506 */ mov.s $f20, $f0
/* 1A3C94 802753B4 4600A386 */ mov.s $f14, $f20
/* 1A3C98 802753B8 0C00A720 */ jal atan2
/* 1A3C9C 802753BC E6140008 */ swc1 $f20, 0x8($s0)
/* 1A3CA0 802753C0 4600B306 */ mov.s $f12, $f22
/* 1A3CA4 802753C4 4406C000 */ mfc1 $a2, $f24
/* 1A3CA8 802753C8 4407D000 */ mfc1 $a3, $f26
/* 1A3CAC 802753CC 4600A386 */ mov.s $f14, $f20
/* 1A3CB0 802753D0 0C00A7B5 */ jal dist2D
/* 1A3CB4 802753D4 E6000048 */ swc1 $f0, 0x48($s0)
/* 1A3CB8 802753D8 86020064 */ lh $v0, 0x64($s0)
/* 1A3CBC 802753DC 46000106 */ mov.s $f4, $f0
/* 1A3CC0 802753E0 14400012 */ bnez $v0, .L8027542C
/* 1A3CC4 802753E4 E604004C */ swc1 $f4, 0x4C($s0)
/* 1A3CC8 802753E8 C6000040 */ lwc1 $f0, 0x40($s0)
/* 1A3CCC 802753EC C6020040 */ lwc1 $f2, 0x40($s0)
/* 1A3CD0 802753F0 46002003 */ div.s $f0, $f4, $f0
/* 1A3CD4 802753F4 4600028D */ trunc.w.s $f10, $f0
/* 1A3CD8 802753F8 44035000 */ mfc1 $v1, $f10
/* 1A3CDC 802753FC 00000000 */ nop
/* 1A3CE0 80275400 00031400 */ sll $v0, $v1, 16
/* 1A3CE4 80275404 00021403 */ sra $v0, $v0, 16
/* 1A3CE8 80275408 44820000 */ mtc1 $v0, $f0
/* 1A3CEC 8027540C 00000000 */ nop
/* 1A3CF0 80275410 46800020 */ cvt.s.w $f0, $f0
/* 1A3CF4 80275414 46020002 */ mul.s $f0, $f0, $f2
/* 1A3CF8 80275418 00000000 */ nop
/* 1A3CFC 8027541C 46002086 */ mov.s $f2, $f4
/* 1A3D00 80275420 A6030064 */ sh $v1, 0x64($s0)
/* 1A3D04 80275424 0809D518 */ j .L80275460
/* 1A3D08 80275428 46001201 */ sub.s $f8, $f2, $f0
.L8027542C:
/* 1A3D0C 8027542C 44821000 */ mtc1 $v0, $f2
/* 1A3D10 80275430 00000000 */ nop
/* 1A3D14 80275434 468010A0 */ cvt.s.w $f2, $f2
/* 1A3D18 80275438 86020064 */ lh $v0, 0x64($s0)
/* 1A3D1C 8027543C 46022083 */ div.s $f2, $f4, $f2
/* 1A3D20 80275440 44820000 */ mtc1 $v0, $f0
/* 1A3D24 80275444 00000000 */ nop
/* 1A3D28 80275448 46800020 */ cvt.s.w $f0, $f0
/* 1A3D2C 8027544C 46020002 */ mul.s $f0, $f0, $f2
/* 1A3D30 80275450 00000000 */ nop
/* 1A3D34 80275454 C604004C */ lwc1 $f4, 0x4C($s0)
/* 1A3D38 80275458 E6020040 */ swc1 $f2, 0x40($s0)
/* 1A3D3C 8027545C 46002201 */ sub.s $f8, $f4, $f0
.L80275460:
/* 1A3D40 80275460 86030064 */ lh $v1, 0x64($s0)
/* 1A3D44 80275464 1060029B */ beqz $v1, .L80275ED4
/* 1A3D48 80275468 24020002 */ addiu $v0, $zero, 0x2
/* 1A3D4C 8027546C 86020064 */ lh $v0, 0x64($s0)
/* 1A3D50 80275470 C602000C */ lwc1 $f2, 0xC($s0)
/* 1A3D54 80275474 3C013FC9 */ lui $at, (0x3FC90FD0 >> 16)
/* 1A3D58 80275478 34210FD0 */ ori $at, $at, (0x3FC90FD0 & 0xFFFF)
/* 1A3D5C 8027547C 44810000 */ mtc1 $at, $f0
/* 1A3D60 80275480 C6040000 */ lwc1 $f4, 0x0($s0)
/* 1A3D64 80275484 44823000 */ mtc1 $v0, $f6
/* 1A3D68 80275488 00000000 */ nop
/* 1A3D6C 8027548C 468031A0 */ cvt.s.w $f6, $f6
/* 1A3D70 80275490 46060003 */ div.s $f0, $f0, $f6
/* 1A3D74 80275494 46041081 */ sub.s $f2, $f2, $f4
/* 1A3D78 80275498 E600003C */ swc1 $f0, 0x3C($s0)
/* 1A3D7C 8027549C 44830000 */ mtc1 $v1, $f0
/* 1A3D80 802754A0 00000000 */ nop
/* 1A3D84 802754A4 46800020 */ cvt.s.w $f0, $f0
/* 1A3D88 802754A8 46001083 */ div.s $f2, $f2, $f0
/* 1A3D8C 802754AC C6000010 */ lwc1 $f0, 0x10($s0)
/* 1A3D90 802754B0 0000202D */ daddu $a0, $zero, $zero
/* 1A3D94 802754B4 E6020030 */ swc1 $f2, 0x30($s0)
/* 1A3D98 802754B8 C6020004 */ lwc1 $f2, 0x4($s0)
/* 1A3D9C 802754BC 8E060058 */ lw $a2, 0x58($s0)
/* 1A3DA0 802754C0 46020001 */ sub.s $f0, $f0, $f2
/* 1A3DA4 802754C4 C6040014 */ lwc1 $f4, 0x14($s0)
/* 1A3DA8 802754C8 46003086 */ mov.s $f2, $f6
/* 1A3DAC 802754CC 46020003 */ div.s $f0, $f0, $f2
/* 1A3DB0 802754D0 C6020008 */ lwc1 $f2, 0x8($s0)
/* 1A3DB4 802754D4 0080282D */ daddu $a1, $a0, $zero
/* 1A3DB8 802754D8 AE000044 */ sw $zero, 0x44($s0)
/* 1A3DBC 802754DC E6000034 */ swc1 $f0, 0x34($s0)
/* 1A3DC0 802754E0 46003006 */ mov.s $f0, $f6
/* 1A3DC4 802754E4 46022101 */ sub.s $f4, $f4, $f2
/* 1A3DC8 802754E8 C6020040 */ lwc1 $f2, 0x40($s0)
/* 1A3DCC 802754EC 46004003 */ div.s $f0, $f8, $f0
/* 1A3DD0 802754F0 46001080 */ add.s $f2, $f2, $f0
/* 1A3DD4 802754F4 46062103 */ div.s $f4, $f4, $f6
/* 1A3DD8 802754F8 E6040038 */ swc1 $f4, 0x38($s0)
/* 1A3DDC 802754FC 0C098F3F */ jal set_animation
/* 1A3DE0 80275500 E6020040 */ swc1 $f2, 0x40($s0)
/* 1A3DE4 80275504 C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A3DE8 80275508 24040160 */ addiu $a0, $zero, 0x160
/* 1A3DEC 8027550C E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A3DF0 80275510 8E460144 */ lw $a2, 0x144($s2)
/* 1A3DF4 80275514 8E470148 */ lw $a3, 0x148($s2)
/* 1A3DF8 80275518 0C052757 */ jal sfx_play_sound_at_position
/* 1A3DFC 8027551C 0000282D */ daddu $a1, $zero, $zero
/* 1A3E00 80275520 86030064 */ lh $v1, 0x64($s0)
/* 1A3E04 80275524 24020168 */ addiu $v0, $zero, 0x168
/* 1A3E08 80275528 14600002 */ bnez $v1, .L80275534
/* 1A3E0C 8027552C 0043001A */ div $zero, $v0, $v1
/* 1A3E10 80275530 0007000D */ break 7
.L80275534:
/* 1A3E14 80275534 2401FFFF */ addiu $at, $zero, -0x1
/* 1A3E18 80275538 14610004 */ bne $v1, $at, .L8027554C
/* 1A3E1C 8027553C 3C018000 */ lui $at, (0x80000000 >> 16)
/* 1A3E20 80275540 14410002 */ bne $v0, $at, .L8027554C
/* 1A3E24 80275544 00000000 */ nop
/* 1A3E28 80275548 0006000D */ break 6
.L8027554C:
/* 1A3E2C 8027554C 00001012 */ mflo $v0
/* 1A3E30 80275550 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1A3E34 80275554 44810000 */ mtc1 $at, $f0
/* 1A3E38 80275558 3C014234 */ lui $at, (0x42340000 >> 16)
/* 1A3E3C 8027555C 44811000 */ mtc1 $at, $f2
/* 1A3E40 80275560 86030066 */ lh $v1, 0x66($s0)
/* 1A3E44 80275564 E6000024 */ swc1 $f0, 0x24($s0)
/* 1A3E48 80275568 E6020050 */ swc1 $f2, 0x50($s0)
/* 1A3E4C 8027556C 44820000 */ mtc1 $v0, $f0
/* 1A3E50 80275570 00000000 */ nop
/* 1A3E54 80275574 46800020 */ cvt.s.w $f0, $f0
/* 1A3E58 80275578 24020004 */ addiu $v0, $zero, 0x4
/* 1A3E5C 8027557C 14620005 */ bne $v1, $v0, .L80275594
/* 1A3E60 80275580 E6000028 */ swc1 $f0, 0x28($s0)
/* 1A3E64 80275584 3C014261 */ lui $at, (0x42610000 >> 16)
/* 1A3E68 80275588 44810000 */ mtc1 $at, $f0
/* 1A3E6C 8027558C 00000000 */ nop
/* 1A3E70 80275590 E6000050 */ swc1 $f0, 0x50($s0)
.L80275594:
/* 1A3E74 80275594 86020066 */ lh $v0, 0x66($s0)
/* 1A3E78 80275598 AE000018 */ sw $zero, 0x18($s0)
/* 1A3E7C 8027559C 14400013 */ bnez $v0, .L802755EC
/* 1A3E80 802755A0 AE00001C */ sw $zero, 0x1C($s0)
/* 1A3E84 802755A4 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A3E88 802755A8 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A3E8C 802755AC 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A3E90 802755B0 44810000 */ mtc1 $at, $f0
/* 1A3E94 802755B4 C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A3E98 802755B8 46006302 */ mul.s $f12, $f12, $f0
/* 1A3E9C 802755BC 00000000 */ nop
/* 1A3EA0 802755C0 C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A3EA4 802755C4 4600A521 */ cvt.d.s $f20, $f20
/* 1A3EA8 802755C8 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A3EAC 802755CC 44810000 */ mtc1 $at, $f0
/* 1A3EB0 802755D0 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A3EB4 802755D4 0C00A85B */ jal sin_rad
/* 1A3EB8 802755D8 46006303 */ div.s $f12, $f12, $f0
/* 1A3EBC 802755DC 3C01802A */ lui $at, %hi(D_8029D8E8)
/* 1A3EC0 802755E0 D422D8E8 */ ldc1 $f2, %lo(D_8029D8E8)($at)
/* 1A3EC4 802755E4 0809D58C */ j .L80275630
/* 1A3EC8 802755E8 46000021 */ cvt.d.s $f0, $f0
.L802755EC:
/* 1A3ECC 802755EC C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A3ED0 802755F0 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A3ED4 802755F4 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A3ED8 802755F8 44810000 */ mtc1 $at, $f0
/* 1A3EDC 802755FC C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A3EE0 80275600 46006302 */ mul.s $f12, $f12, $f0
/* 1A3EE4 80275604 00000000 */ nop
/* 1A3EE8 80275608 C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A3EEC 8027560C 4600A521 */ cvt.d.s $f20, $f20
/* 1A3EF0 80275610 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A3EF4 80275614 44810000 */ mtc1 $at, $f0
/* 1A3EF8 80275618 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A3EFC 8027561C 0C00A85B */ jal sin_rad
/* 1A3F00 80275620 46006303 */ div.s $f12, $f12, $f0
/* 1A3F04 80275624 3C01802A */ lui $at, %hi(D_8029D8F0)
/* 1A3F08 80275628 D422D8F0 */ ldc1 $f2, %lo(D_8029D8F0)($at)
/* 1A3F0C 8027562C 46000021 */ cvt.d.s $f0, $f0
.L80275630:
/* 1A3F10 80275630 46220002 */ mul.d $f0, $f0, $f2
/* 1A3F14 80275634 00000000 */ nop
/* 1A3F18 80275638 46360002 */ mul.d $f0, $f0, $f22
/* 1A3F1C 8027563C 00000000 */ nop
/* 1A3F20 80275640 46360000 */ add.d $f0, $f0, $f22
/* 1A3F24 80275644 4620A500 */ add.d $f20, $f20, $f0
/* 1A3F28 80275648 4620A520 */ cvt.s.d $f20, $f20
/* 1A3F2C 8027564C E6140044 */ swc1 $f20, 0x44($s0)
/* 1A3F30 80275650 0809D676 */ j .L802759D8
/* 1A3F34 80275654 24020001 */ addiu $v0, $zero, 0x1
.L80275658:
/* 1A3F38 80275658 C6400144 */ lwc1 $f0, 0x144($s2)
/* 1A3F3C 8027565C C618000C */ lwc1 $f24, 0xC($s0)
/* 1A3F40 80275660 C61A0014 */ lwc1 $f26, 0x14($s0)
/* 1A3F44 80275664 E6000000 */ swc1 $f0, 0x0($s0)
/* 1A3F48 80275668 46000586 */ mov.s $f22, $f0
/* 1A3F4C 8027566C 4406C000 */ mfc1 $a2, $f24
/* 1A3F50 80275670 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A3F54 80275674 4600B306 */ mov.s $f12, $f22
/* 1A3F58 80275678 E6000004 */ swc1 $f0, 0x4($s0)
/* 1A3F5C 8027567C C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A3F60 80275680 4407D000 */ mfc1 $a3, $f26
/* 1A3F64 80275684 46000506 */ mov.s $f20, $f0
/* 1A3F68 80275688 4600A386 */ mov.s $f14, $f20
/* 1A3F6C 8027568C 0C00A720 */ jal atan2
/* 1A3F70 80275690 E6140008 */ swc1 $f20, 0x8($s0)
/* 1A3F74 80275694 4600B306 */ mov.s $f12, $f22
/* 1A3F78 80275698 4406C000 */ mfc1 $a2, $f24
/* 1A3F7C 8027569C 4407D000 */ mfc1 $a3, $f26
/* 1A3F80 802756A0 4600A386 */ mov.s $f14, $f20
/* 1A3F84 802756A4 0C00A7B5 */ jal dist2D
/* 1A3F88 802756A8 E6000048 */ swc1 $f0, 0x48($s0)
/* 1A3F8C 802756AC 86020064 */ lh $v0, 0x64($s0)
/* 1A3F90 802756B0 46000106 */ mov.s $f4, $f0
/* 1A3F94 802756B4 14400012 */ bnez $v0, .L80275700
/* 1A3F98 802756B8 E604004C */ swc1 $f4, 0x4C($s0)
/* 1A3F9C 802756BC C6000040 */ lwc1 $f0, 0x40($s0)
/* 1A3FA0 802756C0 C6020040 */ lwc1 $f2, 0x40($s0)
/* 1A3FA4 802756C4 46002003 */ div.s $f0, $f4, $f0
/* 1A3FA8 802756C8 4600028D */ trunc.w.s $f10, $f0
/* 1A3FAC 802756CC 44035000 */ mfc1 $v1, $f10
/* 1A3FB0 802756D0 00000000 */ nop
/* 1A3FB4 802756D4 00031400 */ sll $v0, $v1, 16
/* 1A3FB8 802756D8 00021403 */ sra $v0, $v0, 16
/* 1A3FBC 802756DC 44820000 */ mtc1 $v0, $f0
/* 1A3FC0 802756E0 00000000 */ nop
/* 1A3FC4 802756E4 46800020 */ cvt.s.w $f0, $f0
/* 1A3FC8 802756E8 46020002 */ mul.s $f0, $f0, $f2
/* 1A3FCC 802756EC 00000000 */ nop
/* 1A3FD0 802756F0 46002086 */ mov.s $f2, $f4
/* 1A3FD4 802756F4 A6030064 */ sh $v1, 0x64($s0)
/* 1A3FD8 802756F8 0809D5CD */ j .L80275734
/* 1A3FDC 802756FC 46001201 */ sub.s $f8, $f2, $f0
.L80275700:
/* 1A3FE0 80275700 44821000 */ mtc1 $v0, $f2
/* 1A3FE4 80275704 00000000 */ nop
/* 1A3FE8 80275708 468010A0 */ cvt.s.w $f2, $f2
/* 1A3FEC 8027570C 86020064 */ lh $v0, 0x64($s0)
/* 1A3FF0 80275710 46022083 */ div.s $f2, $f4, $f2
/* 1A3FF4 80275714 44820000 */ mtc1 $v0, $f0
/* 1A3FF8 80275718 00000000 */ nop
/* 1A3FFC 8027571C 46800020 */ cvt.s.w $f0, $f0
/* 1A4000 80275720 46020002 */ mul.s $f0, $f0, $f2
/* 1A4004 80275724 00000000 */ nop
/* 1A4008 80275728 C604004C */ lwc1 $f4, 0x4C($s0)
/* 1A400C 8027572C E6020040 */ swc1 $f2, 0x40($s0)
/* 1A4010 80275730 46002201 */ sub.s $f8, $f4, $f0
.L80275734:
/* 1A4014 80275734 86030064 */ lh $v1, 0x64($s0)
/* 1A4018 80275738 106001DD */ beqz $v1, .L80275EB0
/* 1A401C 8027573C 0000202D */ daddu $a0, $zero, $zero
/* 1A4020 80275740 8E060060 */ lw $a2, 0x60($s0)
/* 1A4024 80275744 3C013FC9 */ lui $at, (0x3FC90FD0 >> 16)
/* 1A4028 80275748 34210FD0 */ ori $at, $at, (0x3FC90FD0 & 0xFFFF)
/* 1A402C 8027574C 44810000 */ mtc1 $at, $f0
/* 1A4030 80275750 86020064 */ lh $v0, 0x64($s0)
/* 1A4034 80275754 C602000C */ lwc1 $f2, 0xC($s0)
/* 1A4038 80275758 C6040000 */ lwc1 $f4, 0x0($s0)
/* 1A403C 8027575C 24420001 */ addiu $v0, $v0, 0x1
/* 1A4040 80275760 44823000 */ mtc1 $v0, $f6
/* 1A4044 80275764 00000000 */ nop
/* 1A4048 80275768 468031A0 */ cvt.s.w $f6, $f6
/* 1A404C 8027576C 46041081 */ sub.s $f2, $f2, $f4
/* 1A4050 80275770 E6000044 */ swc1 $f0, 0x44($s0)
/* 1A4054 80275774 3C013F49 */ lui $at, (0x3F490FD0 >> 16)
/* 1A4058 80275778 34210FD0 */ ori $at, $at, (0x3F490FD0 & 0xFFFF)
/* 1A405C 8027577C 44810000 */ mtc1 $at, $f0
/* 1A4060 80275780 86020064 */ lh $v0, 0x64($s0)
/* 1A4064 80275784 46060003 */ div.s $f0, $f0, $f6
/* 1A4068 80275788 E600003C */ swc1 $f0, 0x3C($s0)
/* 1A406C 8027578C 44830000 */ mtc1 $v1, $f0
/* 1A4070 80275790 00000000 */ nop
/* 1A4074 80275794 46800020 */ cvt.s.w $f0, $f0
/* 1A4078 80275798 46001083 */ div.s $f2, $f2, $f0
/* 1A407C 8027579C C6000010 */ lwc1 $f0, 0x10($s0)
/* 1A4080 802757A0 E6020030 */ swc1 $f2, 0x30($s0)
/* 1A4084 802757A4 C6020004 */ lwc1 $f2, 0x4($s0)
/* 1A4088 802757A8 C6040014 */ lwc1 $f4, 0x14($s0)
/* 1A408C 802757AC 46020001 */ sub.s $f0, $f0, $f2
/* 1A4090 802757B0 44821000 */ mtc1 $v0, $f2
/* 1A4094 802757B4 00000000 */ nop
/* 1A4098 802757B8 468010A0 */ cvt.s.w $f2, $f2
/* 1A409C 802757BC 46001186 */ mov.s $f6, $f2
/* 1A40A0 802757C0 46020003 */ div.s $f0, $f0, $f2
/* 1A40A4 802757C4 C6020008 */ lwc1 $f2, 0x8($s0)
/* 1A40A8 802757C8 0080282D */ daddu $a1, $a0, $zero
/* 1A40AC 802757CC E6000034 */ swc1 $f0, 0x34($s0)
/* 1A40B0 802757D0 46003006 */ mov.s $f0, $f6
/* 1A40B4 802757D4 46022101 */ sub.s $f4, $f4, $f2
/* 1A40B8 802757D8 C6020040 */ lwc1 $f2, 0x40($s0)
/* 1A40BC 802757DC 46004003 */ div.s $f0, $f8, $f0
/* 1A40C0 802757E0 46001080 */ add.s $f2, $f2, $f0
/* 1A40C4 802757E4 46062103 */ div.s $f4, $f4, $f6
/* 1A40C8 802757E8 E6040038 */ swc1 $f4, 0x38($s0)
/* 1A40CC 802757EC 0C098F3F */ jal set_animation
/* 1A40D0 802757F0 E6020040 */ swc1 $f2, 0x40($s0)
/* 1A40D4 802757F4 86030064 */ lh $v1, 0x64($s0)
/* 1A40D8 802757F8 24020168 */ addiu $v0, $zero, 0x168
/* 1A40DC 802757FC 14600002 */ bnez $v1, .L80275808
/* 1A40E0 80275800 0043001A */ div $zero, $v0, $v1
/* 1A40E4 80275804 0007000D */ break 7
.L80275808:
/* 1A40E8 80275808 2401FFFF */ addiu $at, $zero, -0x1
/* 1A40EC 8027580C 14610004 */ bne $v1, $at, .L80275820
/* 1A40F0 80275810 3C018000 */ lui $at, (0x80000000 >> 16)
/* 1A40F4 80275814 14410002 */ bne $v0, $at, .L80275820
/* 1A40F8 80275818 00000000 */ nop
/* 1A40FC 8027581C 0006000D */ break 6
.L80275820:
/* 1A4100 80275820 00001012 */ mflo $v0
/* 1A4104 80275824 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1A4108 80275828 44810000 */ mtc1 $at, $f0
/* 1A410C 8027582C 3C014234 */ lui $at, (0x42340000 >> 16)
/* 1A4110 80275830 44811000 */ mtc1 $at, $f2
/* 1A4114 80275834 86030066 */ lh $v1, 0x66($s0)
/* 1A4118 80275838 E6000024 */ swc1 $f0, 0x24($s0)
/* 1A411C 8027583C E6020050 */ swc1 $f2, 0x50($s0)
/* 1A4120 80275840 44820000 */ mtc1 $v0, $f0
/* 1A4124 80275844 00000000 */ nop
/* 1A4128 80275848 46800020 */ cvt.s.w $f0, $f0
/* 1A412C 8027584C 24020005 */ addiu $v0, $zero, 0x5
/* 1A4130 80275850 14620005 */ bne $v1, $v0, .L80275868
/* 1A4134 80275854 E6000028 */ swc1 $f0, 0x28($s0)
/* 1A4138 80275858 3C014261 */ lui $at, (0x42610000 >> 16)
/* 1A413C 8027585C 44810000 */ mtc1 $at, $f0
/* 1A4140 80275860 00000000 */ nop
/* 1A4144 80275864 E6000050 */ swc1 $f0, 0x50($s0)
.L80275868:
/* 1A4148 80275868 86030066 */ lh $v1, 0x66($s0)
/* 1A414C 8027586C 24020001 */ addiu $v0, $zero, 0x1
/* 1A4150 80275870 AE000018 */ sw $zero, 0x18($s0)
/* 1A4154 80275874 14620013 */ bne $v1, $v0, .L802758C4
/* 1A4158 80275878 AE00001C */ sw $zero, 0x1C($s0)
/* 1A415C 8027587C C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A4160 80275880 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A4164 80275884 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A4168 80275888 44810000 */ mtc1 $at, $f0
/* 1A416C 8027588C C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A4170 80275890 46006302 */ mul.s $f12, $f12, $f0
/* 1A4174 80275894 00000000 */ nop
/* 1A4178 80275898 C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A417C 8027589C 4600A521 */ cvt.d.s $f20, $f20
/* 1A4180 802758A0 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A4184 802758A4 44810000 */ mtc1 $at, $f0
/* 1A4188 802758A8 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A418C 802758AC 0C00A85B */ jal sin_rad
/* 1A4190 802758B0 46006303 */ div.s $f12, $f12, $f0
/* 1A4194 802758B4 3C01802A */ lui $at, %hi(D_8029D8F8)
/* 1A4198 802758B8 D422D8F8 */ ldc1 $f2, %lo(D_8029D8F8)($at)
/* 1A419C 802758BC 0809D642 */ j .L80275908
/* 1A41A0 802758C0 46000021 */ cvt.d.s $f0, $f0
.L802758C4:
/* 1A41A4 802758C4 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A41A8 802758C8 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A41AC 802758CC 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A41B0 802758D0 44810000 */ mtc1 $at, $f0
/* 1A41B4 802758D4 C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A41B8 802758D8 46006302 */ mul.s $f12, $f12, $f0
/* 1A41BC 802758DC 00000000 */ nop
/* 1A41C0 802758E0 C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A41C4 802758E4 4600A521 */ cvt.d.s $f20, $f20
/* 1A41C8 802758E8 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A41CC 802758EC 44810000 */ mtc1 $at, $f0
/* 1A41D0 802758F0 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A41D4 802758F4 0C00A85B */ jal sin_rad
/* 1A41D8 802758F8 46006303 */ div.s $f12, $f12, $f0
/* 1A41DC 802758FC 3C01802A */ lui $at, %hi(D_8029D900)
/* 1A41E0 80275900 D422D900 */ ldc1 $f2, %lo(D_8029D900)($at)
/* 1A41E4 80275904 46000021 */ cvt.d.s $f0, $f0
.L80275908:
/* 1A41E8 80275908 46220002 */ mul.d $f0, $f0, $f2
/* 1A41EC 8027590C 00000000 */ nop
/* 1A41F0 80275910 46360002 */ mul.d $f0, $f0, $f22
/* 1A41F4 80275914 00000000 */ nop
/* 1A41F8 80275918 46360000 */ add.d $f0, $f0, $f22
/* 1A41FC 8027591C 4620A500 */ add.d $f20, $f20, $f0
/* 1A4200 80275920 4620A520 */ cvt.s.d $f20, $f20
/* 1A4204 80275924 E6140044 */ swc1 $f20, 0x44($s0)
/* 1A4208 80275928 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A420C 8027592C C6020050 */ lwc1 $f2, 0x50($s0)
/* 1A4210 80275930 46020001 */ sub.s $f0, $f0, $f2
/* 1A4214 80275934 2402000B */ addiu $v0, $zero, 0xB
/* 1A4218 80275938 0809D676 */ j .L802759D8
/* 1A421C 8027593C E6000004 */ swc1 $f0, 0x4($s0)
.L80275940:
/* 1A4220 80275940 A6020064 */ sh $v0, 0x64($s0)
/* 1A4224 80275944 86020064 */ lh $v0, 0x64($s0)
/* 1A4228 80275948 24030168 */ addiu $v1, $zero, 0x168
/* 1A422C 8027594C 14400002 */ bnez $v0, .L80275958
/* 1A4230 80275950 0062001A */ div $zero, $v1, $v0
/* 1A4234 80275954 0007000D */ break 7
.L80275958:
/* 1A4238 80275958 2401FFFF */ addiu $at, $zero, -0x1
/* 1A423C 8027595C 14410004 */ bne $v0, $at, .L80275970
/* 1A4240 80275960 3C018000 */ lui $at, (0x80000000 >> 16)
/* 1A4244 80275964 14610002 */ bne $v1, $at, .L80275970
/* 1A4248 80275968 00000000 */ nop
/* 1A424C 8027596C 0006000D */ break 6
.L80275970:
/* 1A4250 80275970 00001812 */ mflo $v1
/* 1A4254 80275974 C6000018 */ lwc1 $f0, 0x18($s0)
/* 1A4258 80275978 C602001C */ lwc1 $f2, 0x1C($s0)
/* 1A425C 8027597C 46020001 */ sub.s $f0, $f0, $f2
/* 1A4260 80275980 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1A4264 80275984 44811000 */ mtc1 $at, $f2
/* 1A4268 80275988 00000000 */ nop
/* 1A426C 8027598C E6020024 */ swc1 $f2, 0x24($s0)
/* 1A4270 80275990 3C01802A */ lui $at, %hi(D_8029D908)
/* 1A4274 80275994 D422D908 */ ldc1 $f2, %lo(D_8029D908)($at)
/* 1A4278 80275998 46000005 */ abs.s $f0, $f0
/* 1A427C 8027599C 46000021 */ cvt.d.s $f0, $f0
/* 1A4280 802759A0 46220003 */ div.d $f0, $f0, $f2
/* 1A4284 802759A4 46200020 */ cvt.s.d $f0, $f0
/* 1A4288 802759A8 E6000050 */ swc1 $f0, 0x50($s0)
/* 1A428C 802759AC 44830000 */ mtc1 $v1, $f0
/* 1A4290 802759B0 00000000 */ nop
/* 1A4294 802759B4 46800020 */ cvt.s.w $f0, $f0
/* 1A4298 802759B8 E6000028 */ swc1 $f0, 0x28($s0)
/* 1A429C 802759BC C6400144 */ lwc1 $f0, 0x144($s2)
/* 1A42A0 802759C0 E6000000 */ swc1 $f0, 0x0($s0)
/* 1A42A4 802759C4 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A42A8 802759C8 E6000004 */ swc1 $f0, 0x4($s0)
/* 1A42AC 802759CC C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A42B0 802759D0 24020015 */ addiu $v0, $zero, 0x15
/* 1A42B4 802759D4 E6000008 */ swc1 $f0, 0x8($s0)
.L802759D8:
/* 1A42B8 802759D8 AE620070 */ sw $v0, 0x70($s3)
.L802759DC:
/* 1A42BC 802759DC 8E630070 */ lw $v1, 0x70($s3)
/* 1A42C0 802759E0 24020002 */ addiu $v0, $zero, 0x2
.L802759E4:
/* 1A42C4 802759E4 10620085 */ beq $v1, $v0, .L80275BFC
/* 1A42C8 802759E8 28620003 */ slti $v0, $v1, 0x3
/* 1A42CC 802759EC 10400005 */ beqz $v0, .L80275A04
/* 1A42D0 802759F0 24020001 */ addiu $v0, $zero, 0x1
/* 1A42D4 802759F4 1062000A */ beq $v1, $v0, .L80275A20
/* 1A42D8 802759F8 0000102D */ daddu $v0, $zero, $zero
/* 1A42DC 802759FC 0809D7B5 */ j .L80275ED4
/* 1A42E0 80275A00 00000000 */ nop
.L80275A04:
/* 1A42E4 80275A04 2402000B */ addiu $v0, $zero, 0xB
/* 1A42E8 80275A08 10620090 */ beq $v1, $v0, .L80275C4C
/* 1A42EC 80275A0C 24020015 */ addiu $v0, $zero, 0x15
/* 1A42F0 80275A10 106200F4 */ beq $v1, $v0, .L80275DE4
/* 1A42F4 80275A14 0000102D */ daddu $v0, $zero, $zero
/* 1A42F8 80275A18 0809D7B5 */ j .L80275ED4
/* 1A42FC 80275A1C 00000000 */ nop
.L80275A20:
/* 1A4300 80275A20 86020066 */ lh $v0, 0x66($s0)
/* 1A4304 80275A24 14400013 */ bnez $v0, .L80275A74
/* 1A4308 80275A28 00000000 */ nop
/* 1A430C 80275A2C C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A4310 80275A30 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A4314 80275A34 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A4318 80275A38 44810000 */ mtc1 $at, $f0
/* 1A431C 80275A3C C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A4320 80275A40 46006302 */ mul.s $f12, $f12, $f0
/* 1A4324 80275A44 00000000 */ nop
/* 1A4328 80275A48 C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A432C 80275A4C 4600A521 */ cvt.d.s $f20, $f20
/* 1A4330 80275A50 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A4334 80275A54 44810000 */ mtc1 $at, $f0
/* 1A4338 80275A58 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A433C 80275A5C 0C00A85B */ jal sin_rad
/* 1A4340 80275A60 46006303 */ div.s $f12, $f12, $f0
/* 1A4344 80275A64 3C01802A */ lui $at, %hi(D_8029D910)
/* 1A4348 80275A68 D422D910 */ ldc1 $f2, %lo(D_8029D910)($at)
/* 1A434C 80275A6C 0809D6AE */ j .L80275AB8
/* 1A4350 80275A70 46000021 */ cvt.d.s $f0, $f0
.L80275A74:
/* 1A4354 80275A74 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A4358 80275A78 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A435C 80275A7C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A4360 80275A80 44810000 */ mtc1 $at, $f0
/* 1A4364 80275A84 C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A4368 80275A88 46006302 */ mul.s $f12, $f12, $f0
/* 1A436C 80275A8C 00000000 */ nop
/* 1A4370 80275A90 C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A4374 80275A94 4600A521 */ cvt.d.s $f20, $f20
/* 1A4378 80275A98 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A437C 80275A9C 44810000 */ mtc1 $at, $f0
/* 1A4380 80275AA0 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A4384 80275AA4 0C00A85B */ jal sin_rad
/* 1A4388 80275AA8 46006303 */ div.s $f12, $f12, $f0
/* 1A438C 80275AAC 3C01802A */ lui $at, %hi(D_8029D918)
/* 1A4390 80275AB0 D422D918 */ ldc1 $f2, %lo(D_8029D918)($at)
/* 1A4394 80275AB4 46000021 */ cvt.d.s $f0, $f0
.L80275AB8:
/* 1A4398 80275AB8 46220002 */ mul.d $f0, $f0, $f2
/* 1A439C 80275ABC 00000000 */ nop
/* 1A43A0 80275AC0 46360002 */ mul.d $f0, $f0, $f22
/* 1A43A4 80275AC4 00000000 */ nop
/* 1A43A8 80275AC8 46360000 */ add.d $f0, $f0, $f22
/* 1A43AC 80275ACC 4620A500 */ add.d $f20, $f20, $f0
/* 1A43B0 80275AD0 4620A520 */ cvt.s.d $f20, $f20
/* 1A43B4 80275AD4 E6140044 */ swc1 $f20, 0x44($s0)
/* 1A43B8 80275AD8 C6060000 */ lwc1 $f6, 0x0($s0)
/* 1A43BC 80275ADC C6000030 */ lwc1 $f0, 0x30($s0)
/* 1A43C0 80275AE0 C6040004 */ lwc1 $f4, 0x4($s0)
/* 1A43C4 80275AE4 46003180 */ add.s $f6, $f6, $f0
/* 1A43C8 80275AE8 C6000034 */ lwc1 $f0, 0x34($s0)
/* 1A43CC 80275AEC C6020008 */ lwc1 $f2, 0x8($s0)
/* 1A43D0 80275AF0 46002100 */ add.s $f4, $f4, $f0
/* 1A43D4 80275AF4 C6000038 */ lwc1 $f0, 0x38($s0)
/* 1A43D8 80275AF8 46001080 */ add.s $f2, $f2, $f0
/* 1A43DC 80275AFC E6060000 */ swc1 $f6, 0x0($s0)
/* 1A43E0 80275B00 E6040004 */ swc1 $f4, 0x4($s0)
/* 1A43E4 80275B04 E6020008 */ swc1 $f2, 0x8($s0)
/* 1A43E8 80275B08 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A43EC 80275B0C 46003086 */ mov.s $f2, $f6
/* 1A43F0 80275B10 E6000018 */ swc1 $f0, 0x18($s0)
/* 1A43F4 80275B14 E6420144 */ swc1 $f2, 0x144($s2)
/* 1A43F8 80275B18 C60C0044 */ lwc1 $f12, 0x44($s0)
/* 1A43FC 80275B1C 3C013FC9 */ lui $at, (0x3FC90FD0 >> 16)
/* 1A4400 80275B20 34210FD0 */ ori $at, $at, (0x3FC90FD0 & 0xFFFF)
/* 1A4404 80275B24 4481A000 */ mtc1 $at, $f20
/* 1A4408 80275B28 0C00A85B */ jal sin_rad
/* 1A440C 80275B2C 00000000 */ nop
/* 1A4410 80275B30 46140302 */ mul.s $f12, $f0, $f20
/* 1A4414 80275B34 0C00A85B */ jal sin_rad
/* 1A4418 80275B38 00000000 */ nop
/* 1A441C 80275B3C 46140302 */ mul.s $f12, $f0, $f20
/* 1A4420 80275B40 0C00A85B */ jal sin_rad
/* 1A4424 80275B44 00000000 */ nop
/* 1A4428 80275B48 C6020050 */ lwc1 $f2, 0x50($s0)
/* 1A442C 80275B4C 46001082 */ mul.s $f2, $f2, $f0
/* 1A4430 80275B50 00000000 */ nop
/* 1A4434 80275B54 C6000004 */ lwc1 $f0, 0x4($s0)
/* 1A4438 80275B58 46020000 */ add.s $f0, $f0, $f2
/* 1A443C 80275B5C E6400148 */ swc1 $f0, 0x148($s2)
/* 1A4440 80275B60 C6000008 */ lwc1 $f0, 0x8($s0)
/* 1A4444 80275B64 E640014C */ swc1 $f0, 0x14C($s2)
/* 1A4448 80275B68 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A444C 80275B6C C6000028 */ lwc1 $f0, 0x28($s0)
/* 1A4450 80275B70 46006300 */ add.s $f12, $f12, $f0
/* 1A4454 80275B74 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A4458 80275B78 E600001C */ swc1 $f0, 0x1C($s0)
/* 1A445C 80275B7C 0C00A6C9 */ jal clamp_angle
/* 1A4460 80275B80 E60C0024 */ swc1 $f12, 0x24($s0)
/* 1A4464 80275B84 96020064 */ lhu $v0, 0x64($s0)
/* 1A4468 80275B88 E6000024 */ swc1 $f0, 0x24($s0)
/* 1A446C 80275B8C 2442FFFF */ addiu $v0, $v0, -0x1
/* 1A4470 80275B90 A6020064 */ sh $v0, 0x64($s0)
/* 1A4474 80275B94 00021400 */ sll $v0, $v0, 16
/* 1A4478 80275B98 144000CE */ bnez $v0, .L80275ED4
/* 1A447C 80275B9C 0000102D */ daddu $v0, $zero, $zero
/* 1A4480 80275BA0 C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A4484 80275BA4 24040160 */ addiu $a0, $zero, 0x160
/* 1A4488 80275BA8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A448C 80275BAC 8E460144 */ lw $a2, 0x144($s2)
/* 1A4490 80275BB0 8E470148 */ lw $a3, 0x148($s2)
/* 1A4494 80275BB4 0C052757 */ jal sfx_play_sound_at_position
/* 1A4498 80275BB8 0000282D */ daddu $a1, $zero, $zero
/* 1A449C 80275BBC 0000202D */ daddu $a0, $zero, $zero
/* 1A44A0 80275BC0 8E06005C */ lw $a2, 0x5C($s0)
/* 1A44A4 80275BC4 0C098F3F */ jal set_animation
/* 1A44A8 80275BC8 0080282D */ daddu $a1, $a0, $zero
/* 1A44AC 80275BCC C6420164 */ lwc1 $f2, 0x164($s2)
/* 1A44B0 80275BD0 3C014284 */ lui $at, (0x42840000 >> 16)
/* 1A44B4 80275BD4 44810000 */ mtc1 $at, $f0
/* 1A44B8 80275BD8 2402000E */ addiu $v0, $zero, 0xE
/* 1A44BC 80275BDC 46001081 */ sub.s $f2, $f2, $f0
/* 1A44C0 80275BE0 A642016A */ sh $v0, 0x16A($s2)
/* 1A44C4 80275BE4 24020007 */ addiu $v0, $zero, 0x7
/* 1A44C8 80275BE8 E6420164 */ swc1 $f2, 0x164($s2)
/* 1A44CC 80275BEC A6020064 */ sh $v0, 0x64($s0)
/* 1A44D0 80275BF0 24020002 */ addiu $v0, $zero, 0x2
/* 1A44D4 80275BF4 0809D7B4 */ j .L80275ED0
/* 1A44D8 80275BF8 AE620070 */ sw $v0, 0x70($s3)
.L80275BFC:
/* 1A44DC 80275BFC C6420164 */ lwc1 $f2, 0x164($s2)
/* 1A44E0 80275C00 3C014284 */ lui $at, (0x42840000 >> 16)
/* 1A44E4 80275C04 44810000 */ mtc1 $at, $f0
/* 1A44E8 80275C08 00000000 */ nop
/* 1A44EC 80275C0C 46001081 */ sub.s $f2, $f2, $f0
/* 1A44F0 80275C10 2402000E */ addiu $v0, $zero, 0xE
/* 1A44F4 80275C14 A642016A */ sh $v0, 0x16A($s2)
/* 1A44F8 80275C18 E6420164 */ swc1 $f2, 0x164($s2)
/* 1A44FC 80275C1C 96020064 */ lhu $v0, 0x64($s0)
/* 1A4500 80275C20 2442FFFF */ addiu $v0, $v0, -0x1
/* 1A4504 80275C24 A6020064 */ sh $v0, 0x64($s0)
/* 1A4508 80275C28 00021400 */ sll $v0, $v0, 16
/* 1A450C 80275C2C 144000A9 */ bnez $v0, .L80275ED4
/* 1A4510 80275C30 0000102D */ daddu $v0, $zero, $zero
/* 1A4514 80275C34 0000202D */ daddu $a0, $zero, $zero
/* 1A4518 80275C38 AE400164 */ sw $zero, 0x164($s2)
/* 1A451C 80275C3C A640016A */ sh $zero, 0x16A($s2)
/* 1A4520 80275C40 8E060060 */ lw $a2, 0x60($s0)
/* 1A4524 80275C44 0809D775 */ j .L80275DD4
/* 1A4528 80275C48 0080282D */ daddu $a1, $a0, $zero
.L80275C4C:
/* 1A452C 80275C4C C6060000 */ lwc1 $f6, 0x0($s0)
/* 1A4530 80275C50 C6000030 */ lwc1 $f0, 0x30($s0)
/* 1A4534 80275C54 C6040004 */ lwc1 $f4, 0x4($s0)
/* 1A4538 80275C58 46003180 */ add.s $f6, $f6, $f0
/* 1A453C 80275C5C C6000034 */ lwc1 $f0, 0x34($s0)
/* 1A4540 80275C60 C6020008 */ lwc1 $f2, 0x8($s0)
/* 1A4544 80275C64 46002100 */ add.s $f4, $f4, $f0
/* 1A4548 80275C68 C6000038 */ lwc1 $f0, 0x38($s0)
/* 1A454C 80275C6C 46001080 */ add.s $f2, $f2, $f0
/* 1A4550 80275C70 E6060000 */ swc1 $f6, 0x0($s0)
/* 1A4554 80275C74 E6040004 */ swc1 $f4, 0x4($s0)
/* 1A4558 80275C78 E6020008 */ swc1 $f2, 0x8($s0)
/* 1A455C 80275C7C C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A4560 80275C80 46003086 */ mov.s $f2, $f6
/* 1A4564 80275C84 E6000018 */ swc1 $f0, 0x18($s0)
/* 1A4568 80275C88 E6420144 */ swc1 $f2, 0x144($s2)
/* 1A456C 80275C8C 0C00A85B */ jal sin_rad
/* 1A4570 80275C90 C60C0044 */ lwc1 $f12, 0x44($s0)
/* 1A4574 80275C94 C6020050 */ lwc1 $f2, 0x50($s0)
/* 1A4578 80275C98 46001082 */ mul.s $f2, $f2, $f0
/* 1A457C 80275C9C 00000000 */ nop
/* 1A4580 80275CA0 C6000004 */ lwc1 $f0, 0x4($s0)
/* 1A4584 80275CA4 46020000 */ add.s $f0, $f0, $f2
/* 1A4588 80275CA8 E6400148 */ swc1 $f0, 0x148($s2)
/* 1A458C 80275CAC C6000008 */ lwc1 $f0, 0x8($s0)
/* 1A4590 80275CB0 E640014C */ swc1 $f0, 0x14C($s2)
/* 1A4594 80275CB4 C6020010 */ lwc1 $f2, 0x10($s0)
/* 1A4598 80275CB8 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A459C 80275CBC 4602003C */ c.lt.s $f0, $f2
/* 1A45A0 80275CC0 00000000 */ nop
/* 1A45A4 80275CC4 45030001 */ bc1tl .L80275CCC
/* 1A45A8 80275CC8 E6420148 */ swc1 $f2, 0x148($s2)
.L80275CCC:
/* 1A45AC 80275CCC C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A45B0 80275CD0 86030066 */ lh $v1, 0x66($s0)
/* 1A45B4 80275CD4 24020001 */ addiu $v0, $zero, 0x1
/* 1A45B8 80275CD8 14620013 */ bne $v1, $v0, .L80275D28
/* 1A45BC 80275CDC E600001C */ swc1 $f0, 0x1C($s0)
/* 1A45C0 80275CE0 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A45C4 80275CE4 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A45C8 80275CE8 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A45CC 80275CEC 44810000 */ mtc1 $at, $f0
/* 1A45D0 80275CF0 C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A45D4 80275CF4 46006302 */ mul.s $f12, $f12, $f0
/* 1A45D8 80275CF8 00000000 */ nop
/* 1A45DC 80275CFC C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A45E0 80275D00 4600A521 */ cvt.d.s $f20, $f20
/* 1A45E4 80275D04 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A45E8 80275D08 44810000 */ mtc1 $at, $f0
/* 1A45EC 80275D0C 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A45F0 80275D10 0C00A85B */ jal sin_rad
/* 1A45F4 80275D14 46006303 */ div.s $f12, $f12, $f0
/* 1A45F8 80275D18 3C01802A */ lui $at, %hi(D_8029D920)
/* 1A45FC 80275D1C D422D920 */ ldc1 $f2, %lo(D_8029D920)($at)
/* 1A4600 80275D20 0809D75B */ j .L80275D6C
/* 1A4604 80275D24 46000021 */ cvt.d.s $f0, $f0
.L80275D28:
/* 1A4608 80275D28 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A460C 80275D2C 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A4610 80275D30 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A4614 80275D34 44810000 */ mtc1 $at, $f0
/* 1A4618 80275D38 C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A461C 80275D3C 46006302 */ mul.s $f12, $f12, $f0
/* 1A4620 80275D40 00000000 */ nop
/* 1A4624 80275D44 C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A4628 80275D48 4600A521 */ cvt.d.s $f20, $f20
/* 1A462C 80275D4C 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A4630 80275D50 44810000 */ mtc1 $at, $f0
/* 1A4634 80275D54 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A4638 80275D58 0C00A85B */ jal sin_rad
/* 1A463C 80275D5C 46006303 */ div.s $f12, $f12, $f0
/* 1A4640 80275D60 3C01802A */ lui $at, %hi(D_8029D928)
/* 1A4644 80275D64 D422D928 */ ldc1 $f2, %lo(D_8029D928)($at)
/* 1A4648 80275D68 46000021 */ cvt.d.s $f0, $f0
.L80275D6C:
/* 1A464C 80275D6C 46220002 */ mul.d $f0, $f0, $f2
/* 1A4650 80275D70 00000000 */ nop
/* 1A4654 80275D74 46360002 */ mul.d $f0, $f0, $f22
/* 1A4658 80275D78 00000000 */ nop
/* 1A465C 80275D7C 46360000 */ add.d $f0, $f0, $f22
/* 1A4660 80275D80 4620A500 */ add.d $f20, $f20, $f0
/* 1A4664 80275D84 4620A520 */ cvt.s.d $f20, $f20
/* 1A4668 80275D88 E6140044 */ swc1 $f20, 0x44($s0)
/* 1A466C 80275D8C C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A4670 80275D90 C6000028 */ lwc1 $f0, 0x28($s0)
/* 1A4674 80275D94 46006300 */ add.s $f12, $f12, $f0
/* 1A4678 80275D98 0C00A6C9 */ jal clamp_angle
/* 1A467C 80275D9C E60C0024 */ swc1 $f12, 0x24($s0)
/* 1A4680 80275DA0 96020064 */ lhu $v0, 0x64($s0)
/* 1A4684 80275DA4 E6000024 */ swc1 $f0, 0x24($s0)
/* 1A4688 80275DA8 2442FFFF */ addiu $v0, $v0, -0x1
/* 1A468C 80275DAC A6020064 */ sh $v0, 0x64($s0)
/* 1A4690 80275DB0 00021400 */ sll $v0, $v0, 16
/* 1A4694 80275DB4 14400047 */ bnez $v0, .L80275ED4
/* 1A4698 80275DB8 0000102D */ daddu $v0, $zero, $zero
/* 1A469C 80275DBC 0000202D */ daddu $a0, $zero, $zero
/* 1A46A0 80275DC0 0080282D */ daddu $a1, $a0, $zero
/* 1A46A4 80275DC4 3C060001 */ lui $a2, (0x1000C >> 16)
/* 1A46A8 80275DC8 C6000010 */ lwc1 $f0, 0x10($s0)
/* 1A46AC 80275DCC 34C6000C */ ori $a2, $a2, (0x1000C & 0xFFFF)
/* 1A46B0 80275DD0 E6400148 */ swc1 $f0, 0x148($s2)
.L80275DD4:
/* 1A46B4 80275DD4 0C098F3F */ jal set_animation
/* 1A46B8 80275DD8 00000000 */ nop
/* 1A46BC 80275DDC 0809D7B5 */ j .L80275ED4
/* 1A46C0 80275DE0 24020001 */ addiu $v0, $zero, 0x1
.L80275DE4:
/* 1A46C4 80275DE4 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A46C8 80275DE8 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A46CC 80275DEC 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A46D0 80275DF0 4481B000 */ mtc1 $at, $f22
/* 1A46D4 80275DF4 00000000 */ nop
/* 1A46D8 80275DF8 46166302 */ mul.s $f12, $f12, $f22
/* 1A46DC 80275DFC 00000000 */ nop
/* 1A46E0 80275E00 C6140000 */ lwc1 $f20, 0x0($s0)
/* 1A46E4 80275E04 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A46E8 80275E08 4481C000 */ mtc1 $at, $f24
/* 1A46EC 80275E0C 4600A521 */ cvt.d.s $f20, $f20
/* 1A46F0 80275E10 0C00A85B */ jal sin_rad
/* 1A46F4 80275E14 46186303 */ div.s $f12, $f12, $f24
/* 1A46F8 80275E18 C6020050 */ lwc1 $f2, 0x50($s0)
/* 1A46FC 80275E1C 46001082 */ mul.s $f2, $f2, $f0
/* 1A4700 80275E20 00000000 */ nop
/* 1A4704 80275E24 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A4708 80275E28 46166302 */ mul.s $f12, $f12, $f22
/* 1A470C 80275E2C 00000000 */ nop
/* 1A4710 80275E30 3C01802A */ lui $at, %hi(D_8029D930)
/* 1A4714 80275E34 D420D930 */ ldc1 $f0, %lo(D_8029D930)($at)
/* 1A4718 80275E38 460010A1 */ cvt.d.s $f2, $f2
/* 1A471C 80275E3C 46201083 */ div.d $f2, $f2, $f0
/* 1A4720 80275E40 4622A500 */ add.d $f20, $f20, $f2
/* 1A4724 80275E44 46186303 */ div.s $f12, $f12, $f24
/* 1A4728 80275E48 4620A520 */ cvt.s.d $f20, $f20
/* 1A472C 80275E4C 0C00A85B */ jal sin_rad
/* 1A4730 80275E50 E6140000 */ swc1 $f20, 0x0($s0)
/* 1A4734 80275E54 C6020050 */ lwc1 $f2, 0x50($s0)
/* 1A4738 80275E58 46001082 */ mul.s $f2, $f2, $f0
/* 1A473C 80275E5C 00000000 */ nop
/* 1A4740 80275E60 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A4744 80275E64 C6000028 */ lwc1 $f0, 0x28($s0)
/* 1A4748 80275E68 46006300 */ add.s $f12, $f12, $f0
/* 1A474C 80275E6C C6000004 */ lwc1 $f0, 0x4($s0)
/* 1A4750 80275E70 46020001 */ sub.s $f0, $f0, $f2
/* 1A4754 80275E74 E60C0024 */ swc1 $f12, 0x24($s0)
/* 1A4758 80275E78 0C00A6C9 */ jal clamp_angle
/* 1A475C 80275E7C E6000004 */ swc1 $f0, 0x4($s0)
/* 1A4760 80275E80 C6020000 */ lwc1 $f2, 0x0($s0)
/* 1A4764 80275E84 E6000024 */ swc1 $f0, 0x24($s0)
/* 1A4768 80275E88 E6420144 */ swc1 $f2, 0x144($s2)
/* 1A476C 80275E8C C6000004 */ lwc1 $f0, 0x4($s0)
/* 1A4770 80275E90 E6400148 */ swc1 $f0, 0x148($s2)
/* 1A4774 80275E94 C6000008 */ lwc1 $f0, 0x8($s0)
/* 1A4778 80275E98 E640014C */ swc1 $f0, 0x14C($s2)
/* 1A477C 80275E9C 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A4780 80275EA0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A4784 80275EA4 30422000 */ andi $v0, $v0, 0x2000
/* 1A4788 80275EA8 10400003 */ beqz $v0, .L80275EB8
/* 1A478C 80275EAC 00000000 */ nop
.L80275EB0:
/* 1A4790 80275EB0 0809D7B5 */ j .L80275ED4
/* 1A4794 80275EB4 24020002 */ addiu $v0, $zero, 0x2
.L80275EB8:
/* 1A4798 80275EB8 96030064 */ lhu $v1, 0x64($s0)
/* 1A479C 80275EBC 2463FFFF */ addiu $v1, $v1, -0x1
/* 1A47A0 80275EC0 A6030064 */ sh $v1, 0x64($s0)
/* 1A47A4 80275EC4 00031C00 */ sll $v1, $v1, 16
/* 1A47A8 80275EC8 10600002 */ beqz $v1, .L80275ED4
/* 1A47AC 80275ECC 24020001 */ addiu $v0, $zero, 0x1
.L80275ED0:
/* 1A47B0 80275ED0 0000102D */ daddu $v0, $zero, $zero
.L80275ED4:
/* 1A47B4 80275ED4 8FBF0028 */ lw $ra, 0x28($sp)
/* 1A47B8 80275ED8 8FB30024 */ lw $s3, 0x24($sp)
/* 1A47BC 80275EDC 8FB20020 */ lw $s2, 0x20($sp)
/* 1A47C0 80275EE0 8FB1001C */ lw $s1, 0x1C($sp)
/* 1A47C4 80275EE4 8FB00018 */ lw $s0, 0x18($sp)
/* 1A47C8 80275EE8 D7BA0048 */ ldc1 $f26, 0x48($sp)
/* 1A47CC 80275EEC D7B80040 */ ldc1 $f24, 0x40($sp)
/* 1A47D0 80275EF0 D7B60038 */ ldc1 $f22, 0x38($sp)
/* 1A47D4 80275EF4 D7B40030 */ ldc1 $f20, 0x30($sp)
/* 1A47D8 80275EF8 03E00008 */ jr $ra
/* 1A47DC 80275EFC 27BD0050 */ addiu $sp, $sp, 0x50
### DECOMPILED C INSTRUCTIONS:
ApiStatus func_802752AC(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Actor* player = gBattleStatus.playerActor;
ActorState* playerState = &player->state;
f32 posX, posY, posZ;
f32 goalX, goalZ;
f32 temp;
f64 temp_f20;
f64 vel1, vel2;
f64 vel3, vel4;
f64 vel5, vel6;
f64 vel7, vel8;
f64 acc1, acc2;
f64 acc3, acc4;
f64 acc5, acc6;
f64 acc7, acc8;
if (isInitialCall) {
player->state.moveTime = evt_get_variable(script, *args++);
player->state.moveArcAmplitude = evt_get_variable(script, *args++);
script->functionTemp[0] = 0;
if (player->state.moveArcAmplitude == 1 ||
player->state.moveArcAmplitude == 5 ||
player->state.moveArcAmplitude == 6)
{
script->functionTemp[0] = 10;
}
if (playerState->moveArcAmplitude == 2) {
script->functionTemp[0] = 20;
}
}
switch (script->functionTemp[0]) {
case 0:
playerState->currentPos.x = player->currentPos.x;
playerState->currentPos.y = player->currentPos.y;
playerState->currentPos.z = player->currentPos.z;
goalX = playerState->goalPos.x;
goalZ = playerState->goalPos.z;
posX = playerState->currentPos.x;
posY = playerState->currentPos.y;
posZ = playerState->currentPos.z;
playerState->angle = atan2(posX, posZ, goalX, goalZ);
playerState->distance = dist2D(posX, posZ, goalX, goalZ);
if (playerState->moveTime == 0) {
playerState->moveTime = playerState->distance / playerState->speed;
temp = playerState->distance - (playerState->moveTime * playerState->speed);
} else {
playerState->speed = playerState->distance / playerState->moveTime;
temp = playerState->distance - (playerState->moveTime * playerState->speed);
}
if (playerState->moveTime == 0) {
return ApiStatus_DONE2;
}
playerState->unk_30.x = (playerState->goalPos.x - playerState->currentPos.x) / playerState->moveTime;
playerState->unk_30.y = (playerState->goalPos.y - playerState->currentPos.y) / playerState->moveTime;
playerState->unk_30.z = (playerState->goalPos.z - playerState->currentPos.z) / playerState->moveTime;
playerState->acceleration = (PI_S / 2) / playerState->moveTime;
playerState->velocity = 0.0f;
playerState->speed += temp / playerState->moveTime;
set_animation(ACTOR_PLAYER, 0, playerState->animJumpRise);
sfx_play_sound_at_position(SOUND_160, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
playerState->unk_24 = 90.0f;
playerState->bounceDivisor = 45.0f;
playerState->unk_28 = 360 / playerState->moveTime;
if (playerState->moveArcAmplitude == 4) {
playerState->bounceDivisor = 56.25f;
}
playerState->unk_18.x = 0.0f;
playerState->unk_18.y = 0.0f;
if (playerState->moveArcAmplitude == 0) {
vel1 = playerState->velocity;
acc1 = playerState->acceleration;
playerState->velocity = (vel1 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.53 * acc1) + acc1));
} else {
vel2 = playerState->velocity;
acc2 = playerState->acceleration;
playerState->velocity = (vel2 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.01 * acc2) + acc2));
}
script->functionTemp[0] = 1;
break;
case 10:
playerState->currentPos.x = player->currentPos.x;
playerState->currentPos.y = player->currentPos.y;
playerState->currentPos.z = player->currentPos.z;
goalX = playerState->goalPos.x;
goalZ = playerState->goalPos.z;
posX = playerState->currentPos.x;
posY = playerState->currentPos.y;
posZ = playerState->currentPos.z;
playerState->angle = atan2(posX, posZ, goalX, goalZ);
playerState->distance = dist2D(posX, posZ, goalX, goalZ);
if (playerState->moveTime == 0) {
playerState->moveTime = playerState->distance / playerState->speed;
temp = playerState->distance - (playerState->moveTime * playerState->speed);
} else {
playerState->speed = playerState->distance / playerState->moveTime;
temp = playerState->distance - (playerState->moveTime * playerState->speed);
}
if (playerState->moveTime == 0) {
return ApiStatus_DONE2;
}
playerState->unk_30.x = (playerState->goalPos.x - playerState->currentPos.x) / playerState->moveTime;
playerState->unk_30.y = (playerState->goalPos.y - playerState->currentPos.y) / playerState->moveTime;
playerState->unk_30.z = (playerState->goalPos.z - playerState->currentPos.z) / playerState->moveTime;
playerState->velocity = (PI_S / 2);
playerState->acceleration = (PI_S / 4) / (playerState->moveTime + 1);
playerState->speed += temp / playerState->moveTime;
set_animation(ACTOR_PLAYER, 0, playerState->animJumpLand);
playerState->unk_24 = 90.0f;
playerState->bounceDivisor = 45.0f;
playerState->unk_28 = (360 / playerState->moveTime);
if (playerState->moveArcAmplitude == 5) {
playerState->bounceDivisor = 56.25f;
}
playerState->unk_18.x = 0.0f;
playerState->unk_18.y = 0.0f;
if (playerState->moveArcAmplitude == 1) {
vel3 = playerState->velocity;
acc3 = playerState->acceleration;
playerState->velocity = (vel3 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.53 * acc3) + acc3));
} else {
vel4 = playerState->velocity;
acc4 = playerState->acceleration;
playerState->velocity = (vel4 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.01 * acc4) + acc4));
}
playerState->currentPos.y = player->currentPos.y - playerState->bounceDivisor;
script->functionTemp[0] = 11;
break;
case 20:
playerState->moveTime = 1;
playerState->unk_24 = 90.0f;
playerState->bounceDivisor = (fabsf(playerState->unk_18.x - playerState->unk_18.y) / 16.5);
playerState->unk_28 = (360 / playerState->moveTime);
playerState->currentPos.x = player->currentPos.x;
playerState->currentPos.y = player->currentPos.y;
playerState->currentPos.z = player->currentPos.z;
script->functionTemp[0] = 21;
break;
}
switch (script->functionTemp[0]) {
case 1:
if (playerState->moveArcAmplitude == 0) {
vel5 = playerState->velocity;
acc5 = playerState->acceleration;
playerState->velocity = (vel5 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.53 * acc5) + acc5));
} else {
vel6 = playerState->velocity;
acc6 = playerState->acceleration;
playerState->velocity = (vel6 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.01 * acc6) + acc6));
}
playerState->currentPos.x += playerState->unk_30.x;
playerState->currentPos.y += playerState->unk_30.y;
playerState->currentPos.z += playerState->unk_30.z;
playerState->unk_18.x = player->currentPos.y;
player->currentPos.x = playerState->currentPos.x;
player->currentPos.y = playerState->currentPos.y + (playerState->bounceDivisor * sin_rad(sin_rad(sin_rad(playerState->velocity) * (PI_S / 2)) * (PI_S / 2)));
player->currentPos.z = playerState->currentPos.z;
playerState->unk_18.y = player->currentPos.y;
playerState->unk_24 += playerState->unk_28;
playerState->unk_24 = clamp_angle(playerState->unk_24);
playerState->moveTime--;
if (playerState->moveTime == 0) {
sfx_play_sound_at_position(SOUND_160, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
set_animation(ACTOR_PLAYER, 0, playerState->animJumpFall);
player->rotationPivotOffset.y = 14;
player->rotation.z -= 66.0f;
playerState->moveTime = 7;
script->functionTemp[0] = 2;
}
break;
case 2:
player->rotationPivotOffset.y = 14;
player->rotation.z -= 66.0f;
playerState->moveTime--;
if (playerState->moveTime == 0) {
player->rotation.z = 0.0f;
player->rotationPivotOffset.y = 0;
set_animation(ACTOR_PLAYER, 0, playerState->animJumpLand);
return ApiStatus_DONE1;
}
break;
case 11:
playerState->currentPos.x += playerState->unk_30.x;
playerState->currentPos.y += playerState->unk_30.y;
playerState->currentPos.z += playerState->unk_30.z;
playerState->unk_18.x = player->currentPos.y;
player->currentPos.x = playerState->currentPos.x;
player->currentPos.y = playerState->currentPos.y + (playerState->bounceDivisor * sin_rad(playerState->velocity));
player->currentPos.z = playerState->currentPos.z;
if (playerState->goalPos.y > player->currentPos.y) {
player->currentPos.y = playerState->goalPos.y;
}
playerState->unk_18.y = player->currentPos.y;
if (playerState->moveArcAmplitude == 1) {
vel7 = playerState->velocity;
acc7 = playerState->acceleration;
playerState->velocity = (vel7 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.53 * acc7) + acc7));
} else {
vel8 = playerState->velocity;
acc8 = playerState->acceleration;
playerState->velocity = (vel8 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.01 * acc8) + acc8));
}
playerState->unk_24 += playerState->unk_28;
playerState->unk_24 = clamp_angle(playerState->unk_24);
playerState->moveTime--;
if (playerState->moveTime == 0) {
player->currentPos.y = playerState->goalPos.y;
set_animation(ACTOR_PLAYER, 0, 0x1000C);
return ApiStatus_DONE1;
}
break;
case 21:
temp_f20 = playerState->currentPos.x;
temp_f20 += (playerState->bounceDivisor * sin_rad(DEG_TO_RAD(playerState->unk_24))) / 33.0;
playerState->currentPos.x = temp_f20;
playerState->currentPos.y -= playerState->bounceDivisor * sin_rad(DEG_TO_RAD(playerState->unk_24));
playerState->unk_24 += playerState->unk_28;
playerState->unk_24 = clamp_angle(playerState->unk_24);
player->currentPos.x = playerState->currentPos.x;
player->currentPos.y = playerState->currentPos.y;
player->currentPos.z = playerState->currentPos.z;
if (gBattleStatus.flags1 & BS_FLAGS1_2000) {
return ApiStatus_DONE2;
}
playerState->moveTime--;
if (playerState->moveTime == 0) {
return ApiStatus_DONE1;
}
break;
}
return ApiStatus_BLOCK;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel D_80242FE0
/* 1718C0 80242FE0 27BDFFB8 */ addiu $sp, $sp, -0x48
glabel func_80242FE4
/* 1718C4 80242FE4 AFB60028 */ sw $s6, 0x28($sp)
D_80242FE8:
/* 1718C8 80242FE8 3C16800E */ lui $s6, %hi(gBattleStatus)
.L80242FEC:
/* 1718CC 80242FEC 26D6C070 */ addiu $s6, $s6, %lo(gBattleStatus)
D_80242FF0:
/* 1718D0 80242FF0 AFBF002C */ sw $ra, 0x2C($sp)
glabel func_80242FF4
/* 1718D4 80242FF4 AFB50024 */ sw $s5, 0x24($sp)
D_80242FF8:
/* 1718D8 80242FF8 AFB40020 */ sw $s4, 0x20($sp)
.L80242FFC:
/* 1718DC 80242FFC AFB3001C */ sw $s3, 0x1C($sp)
glabel func_80243000
/* 1718E0 80243000 AFB20018 */ sw $s2, 0x18($sp)
glabel func_80243004
/* 1718E4 80243004 AFB10014 */ sw $s1, 0x14($sp)
D_80243008:
/* 1718E8 80243008 AFB00010 */ sw $s0, 0x10($sp)
D_8024300C:
/* 1718EC 8024300C F7B80040 */ sdc1 $f24, 0x40($sp)
D_80243010:
/* 1718F0 80243010 F7B60038 */ sdc1 $f22, 0x38($sp)
glabel func_80243014
/* 1718F4 80243014 F7B40030 */ sdc1 $f20, 0x30($sp)
glabel func_80243018
/* 1718F8 80243018 8ED500D8 */ lw $s5, 0xD8($s6)
glabel func_8024301C
/* 1718FC 8024301C 3C02800E */ lui $v0, %hi(gBattleSubState)
.L80243020:
/* 171900 80243020 8C42C4DC */ lw $v0, %lo(gBattleSubState)($v0)
/* 171904 80243024 1440002D */ bnez $v0, .L802430DC
D_80243028:
/* 171908 80243028 8ED200DC */ lw $s2, 0xDC($s6)
.L8024302C:
/* 17190C 8024302C 8EC30004 */ lw $v1, 0x4($s6)
.L80243030:
/* 171910 80243030 30620002 */ andi $v0, $v1, 0x2
glabel func_80243034
/* 171914 80243034 10400227 */ beqz $v0, D_802438D4
glabel func_80243038
/* 171918 80243038 2404000A */ addiu $a0, $zero, 0xA
D_8024303C:
/* 17191C 8024303C 1240000A */ beqz $s2, func_80243068
glabel func_80243040
/* 171920 80243040 30620004 */ andi $v0, $v1, 0x4
glabel func_80243044
/* 171924 80243044 14400009 */ bnez $v0, .L8024306C
glabel func_80243048
/* 171928 80243048 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16)
D_8024304C:
/* 17192C 8024304C 8E420000 */ lw $v0, 0x0($s2)
glabel func_80243050
/* 171930 80243050 3C030020 */ lui $v1, (0x200000 >> 16)
glabel func_80243054_EA3954
/* 171934 80243054 00431024 */ and $v0, $v0, $v1
glabel func_80243058
/* 171938 80243058 14400004 */ bnez $v0, .L8024306C
D_8024305C:
/* 17193C 8024305C 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16)
.L80243060:
/* 171940 80243060 08090E35 */ j D_802438D4
.L80243064:
/* 171944 80243064 2404000B */ addiu $a0, $zero, 0xB
glabel func_80243068
/* 171948 80243068 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16)
.L8024306C:
/* 17194C 8024306C 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF)
glabel func_80243070
/* 171950 80243070 8EA20000 */ lw $v0, 0x0($s5)
.L80243074:
/* 171954 80243074 3C040400 */ lui $a0, (0x4000000 >> 16)
D_80243078:
/* 171958 80243078 00431024 */ and $v0, $v0, $v1
/* 17195C 8024307C 00441025 */ or $v0, $v0, $a0
D_80243080:
/* 171960 80243080 12400005 */ beqz $s2, D_80243098
glabel func_80243084
/* 171964 80243084 AEA20000 */ sw $v0, 0x0($s5)
D_80243088:
/* 171968 80243088 8E420000 */ lw $v0, 0x0($s2)
D_8024308C:
/* 17196C 8024308C 00431024 */ and $v0, $v0, $v1
D_80243090:
/* 171970 80243090 00441025 */ or $v0, $v0, $a0
glabel func_80243094
/* 171974 80243094 AE420000 */ sw $v0, 0x0($s2)
D_80243098:
/* 171978 80243098 24020001 */ addiu $v0, $zero, 0x1
D_8024309C:
/* 17197C 8024309C 3C04800E */ lui $a0, %hi(gBattleStatus)
D_802430A0:
/* 171980 802430A0 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
.L802430A4:
/* 171984 802430A4 3C01800E */ lui $at, %hi(gBattleSubState)
glabel func_802430A8
/* 171988 802430A8 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
.L802430AC:
/* 17198C 802430AC 8C820004 */ lw $v0, 0x4($a0)
D_802430B0:
/* 171990 802430B0 2403FFFD */ addiu $v1, $zero, -0x3
glabel func_802430B4
/* 171994 802430B4 3C01802A */ lui $at, %hi(D_8029F258)
dead_flo_08_ItemChoice_HasSelectedItem:
/* 171998 802430B8 AC20F258 */ sw $zero, %lo(D_8029F258)($at)
dead_flo_08_ItemChoice_SelectedItemID:
/* 17199C 802430BC 00431024 */ and $v0, $v0, $v1
glabel func_802430C0
/* 1719A0 802430C0 2403FFFB */ addiu $v1, $zero, -0x5
D_802430C4:
/* 1719A4 802430C4 00431024 */ and $v0, $v0, $v1
glabel func_802430C8
/* 1719A8 802430C8 2403FFF7 */ addiu $v1, $zero, -0x9
glabel func_802430CC
/* 1719AC 802430CC 00431024 */ and $v0, $v0, $v1
glabel func_802430D0
/* 1719B0 802430D0 2403FFEF */ addiu $v1, $zero, -0x11
D_802430D4:
/* 1719B4 802430D4 00431024 */ and $v0, $v0, $v1
dgb_03_pad_30D8:
/* 1719B8 802430D8 AC820004 */ sw $v0, 0x4($a0)
.L802430DC:
/* 1719BC 802430DC 3C03800E */ lui $v1, %hi(gBattleSubState)
D_802430E0:
/* 1719C0 802430E0 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
glabel dead_kzn_17_UnkFunc51
/* 1719C4 802430E4 24020001 */ addiu $v0, $zero, 0x1
D_802430E8:
/* 1719C8 802430E8 14620091 */ bne $v1, $v0, .L80243330
flo_11_pad_30EC:
/* 1719CC 802430EC 24020002 */ addiu $v0, $zero, 0x2
D_802430F0:
/* 1719D0 802430F0 0000A02D */ daddu $s4, $zero, $zero
/* 1719D4 802430F4 0280882D */ daddu $s1, $s4, $zero
.L802430F8:
/* 1719D8 802430F8 02C0982D */ daddu $s3, $s6, $zero
.L802430FC:
/* 1719DC 802430FC 8E7000E0 */ lw $s0, 0xE0($s3)
D_80243100:
/* 1719E0 80243100 5200000B */ beql $s0, $zero, D_80243130
glabel func_80243104
/* 1719E4 80243104 26310001 */ addiu $s1, $s1, 0x1
glabel func_80243108
/* 1719E8 80243108 8E0201D8 */ lw $v0, 0x1D8($s0)
glabel .L8024310C
/* 1719EC 8024310C 50400008 */ beql $v0, $zero, D_80243130
end_01_Font4Patterns:
/* 1719F0 80243110 26310001 */ addiu $s1, $s1, 0x1
.L80243114:
/* 1719F4 80243114 8E0401E8 */ lw $a0, 0x1E8($s0)
D_80243118:
/* 1719F8 80243118 0C0B1059 */ jal does_script_exist
D_8024311C:
/* 1719FC 8024311C 00000000 */ nop
D_80243120:
/* 171A00 80243120 50400002 */ beql $v0, $zero, .L8024312C
glabel func_80243124
/* 171A04 80243124 AE0001D8 */ sw $zero, 0x1D8($s0)
.L80243128:
/* 171A08 80243128 24140001 */ addiu $s4, $zero, 0x1
.L8024312C:
/* 171A0C 8024312C 26310001 */ addiu $s1, $s1, 0x1
D_80243130:
/* 171A10 80243130 2A220018 */ slti $v0, $s1, 0x18
glabel func_80243134
/* 171A14 80243134 1440FFF1 */ bnez $v0, .L802430FC
glabel func_80243138
/* 171A18 80243138 26730004 */ addiu $s3, $s3, 0x4
glabel func_8024313C
/* 171A1C 8024313C 16800079 */ bnez $s4, func_80243324
/* 171A20 80243140 00000000 */ nop
.L80243144:
/* 171A24 80243144 0C098F18 */ jal reset_actor_turn_info
.L80243148:
/* 171A28 80243148 0000882D */ daddu $s1, $zero, $zero
D_8024314C:
/* 171A2C 8024314C 24130014 */ addiu $s3, $zero, 0x14
.L80243150:
/* 171A30 80243150 3C14800E */ lui $s4, %hi(gBattleStatus)
.L80243154:
/* 171A34 80243154 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
.L80243158:
/* 171A38 80243158 00111080 */ sll $v0, $s1, 2
.L8024315C:
/* 171A3C 8024315C 02C21021 */ addu $v0, $s6, $v0
D_80243160:
/* 171A40 80243160 8C5000E0 */ lw $s0, 0xE0($v0)
glabel func_80243164
/* 171A44 80243164 52000069 */ beql $s0, $zero, D_8024330C
D_80243168:
/* 171A48 80243168 26310001 */ addiu $s1, $s1, 0x1
.L8024316C:
/* 171A4C 8024316C 3C04FFFE */ lui $a0, (0xFFFEFFFF >> 16)
D_80243170_EDBF90:
/* 171A50 80243170 3484FFFF */ ori $a0, $a0, (0xFFFEFFFF & 0xFFFF)
.L80243174:
/* 171A54 80243174 8E020000 */ lw $v0, 0x0($s0)
end_01_Font3Patterns:
/* 171A58 80243178 3C030C00 */ lui $v1, (0xC000000 >> 16)
glabel func_8024317C
/* 171A5C 8024317C 00431025 */ or $v0, $v0, $v1
.L80243180:
/* 171A60 80243180 00442024 */ and $a0, $v0, $a0
.L80243184:
/* 171A64 80243184 82020210 */ lb $v0, 0x210($s0)
glabel func_80243188
/* 171A68 80243188 92030210 */ lbu $v1, 0x210($s0)
D_8024318C:
/* 171A6C 8024318C 10400015 */ beqz $v0, D_802431E4
D_80243190:
/* 171A70 80243190 AE040000 */ sw $a0, 0x0($s0)
.L80243194:
/* 171A74 80243194 2462FFFD */ addiu $v0, $v1, -0x3
glabel func_80243198
/* 171A78 80243198 2C420006 */ sltiu $v0, $v0, 0x6
glabel .L8024319C
/* 171A7C 8024319C 10400003 */ beqz $v0, .L802431AC
glabel func_802431A0
/* 171A80 802431A0 3C020001 */ lui $v0, (0x10000 >> 16)
D_802431A4:
/* 171A84 802431A4 00821025 */ or $v0, $a0, $v0
.L802431A8:
/* 171A88 802431A8 AE020000 */ sw $v0, 0x0($s0)
.L802431AC:
/* 171A8C 802431AC 92020211 */ lbu $v0, 0x211($s0)
glabel func_802431B0
/* 171A90 802431B0 2442FFFF */ addiu $v0, $v0, -0x1
glabel func_802431B4
/* 171A94 802431B4 A2020211 */ sb $v0, 0x211($s0)
glabel func_802431B8
/* 171A98 802431B8 00021600 */ sll $v0, $v0, 24
glabel .L802431BC
/* 171A9C 802431BC 1C400009 */ bgtz $v0, D_802431E4
.L802431C0:
/* 171AA0 802431C0 00000000 */ nop
D_802431C4:
/* 171AA4 802431C4 86040436 */ lh $a0, 0x436($s0)
D_802431C8:
/* 171AA8 802431C8 0C011E26 */ jal remove_status_debuff
D_802431CC:
/* 171AAC 802431CC A2000210 */ sb $zero, 0x210($s0)
D_802431D0:
/* 171AB0 802431D0 0200202D */ daddu $a0, $s0, $zero
D_802431D4:
/* 171AB4 802431D4 0C09DC58 */ jal dispatch_event_actor
/* 171AB8 802431D8 24050031 */ addiu $a1, $zero, 0x31
glabel func_802431DC
/* 171ABC 802431DC 3C01802A */ lui $at, %hi(D_8029F258)
glabel func_802431E0
/* 171AC0 802431E0 AC33F258 */ sw $s3, %lo(D_8029F258)($at)
D_802431E4:
/* 171AC4 802431E4 82020212 */ lb $v0, 0x212($s0)
D_802431E8:
/* 171AC8 802431E8 1040000C */ beqz $v0, .L8024321C
.L802431EC:
/* 171ACC 802431EC 00000000 */ nop
D_802431F0:
/* 171AD0 802431F0 92020213 */ lbu $v0, 0x213($s0)
glabel func_802431F4
/* 171AD4 802431F4 2442FFFF */ addiu $v0, $v0, -0x1
glabel func_802431F8
/* 171AD8 802431F8 A2020213 */ sb $v0, 0x213($s0)
D_802431FC:
/* 171ADC 802431FC 00021600 */ sll $v0, $v0, 24
D_80243200:
/* 171AE0 80243200 1C400006 */ bgtz $v0, .L8024321C
.L80243204:
/* 171AE4 80243204 00000000 */ nop
dgb_04_pad_3208:
/* 171AE8 80243208 86040436 */ lh $a0, 0x436($s0)
glabel .L8024320C
/* 171AEC 8024320C 0C011E68 */ jal remove_status_static
D_80243210:
/* 171AF0 80243210 A2000212 */ sb $zero, 0x212($s0)
D_80243214:
/* 171AF4 80243214 3C01802A */ lui $at, %hi(D_8029F258)
flo_10_pad_3218:
/* 171AF8 80243218 AC33F258 */ sw $s3, %lo(D_8029F258)($at)
.L8024321C:
/* 171AFC 8024321C 82020218 */ lb $v0, 0x218($s0)
glabel func_80243220
/* 171B00 80243220 1040000C */ beqz $v0, D_80243254
glabel .L80243224
/* 171B04 80243224 00000000 */ nop
D_80243228:
/* 171B08 80243228 92020219 */ lbu $v0, 0x219($s0)
.L8024322C:
/* 171B0C 8024322C 2442FFFF */ addiu $v0, $v0, -0x1
glabel func_80243230
/* 171B10 80243230 A2020219 */ sb $v0, 0x219($s0)
.L80243234:
/* 171B14 80243234 00021600 */ sll $v0, $v0, 24
glabel func_80243238
/* 171B18 80243238 1C400006 */ bgtz $v0, D_80243254
/* 171B1C 8024323C 00000000 */ nop
D_80243240:
/* 171B20 80243240 86040436 */ lh $a0, 0x436($s0)
glabel .L80243244
/* 171B24 80243244 0C011EAA */ jal remove_status_transparent
D_80243248:
/* 171B28 80243248 A2000218 */ sb $zero, 0x218($s0)
glabel func_8024324C
/* 171B2C 8024324C 3C01802A */ lui $at, %hi(D_8029F258)
D_80243250:
/* 171B30 80243250 AC33F258 */ sw $s3, %lo(D_8029F258)($at)
D_80243254:
/* 171B34 80243254 82020214 */ lb $v0, 0x214($s0)
D_80243258:
/* 171B38 80243258 1040000A */ beqz $v0, D_80243284
.L8024325C:
/* 171B3C 8024325C 00000000 */ nop
glabel func_80243260
/* 171B40 80243260 92020215 */ lbu $v0, 0x215($s0)
D_80243264:
/* 171B44 80243264 2442FFFF */ addiu $v0, $v0, -0x1
.L80243268:
/* 171B48 80243268 A2020215 */ sb $v0, 0x215($s0)
D_8024326C:
/* 171B4C 8024326C 00021600 */ sll $v0, $v0, 24
glabel func_80243270
/* 171B50 80243270 1C400004 */ bgtz $v0, D_80243284
.L80243274:
/* 171B54 80243274 00000000 */ nop
.L80243278:
/* 171B58 80243278 A2000214 */ sb $zero, 0x214($s0)
.L8024327C:
/* 171B5C 8024327C 3C01802A */ lui $at, %hi(D_8029F258)
D_80243280:
/* 171B60 80243280 AC33F258 */ sw $s3, %lo(D_8029F258)($at)
D_80243284:
/* 171B64 80243284 92020211 */ lbu $v0, 0x211($s0)
D_80243288:
/* 171B68 80243288 82030217 */ lb $v1, 0x217($s0)
glabel func_8024328C
/* 171B6C 8024328C A2020217 */ sb $v0, 0x217($s0)
glabel .L80243290
/* 171B70 80243290 00021600 */ sll $v0, $v0, 24
glabel func_80243294
/* 171B74 80243294 00021603 */ sra $v0, $v0, 24
glabel .L80243298
/* 171B78 80243298 18400008 */ blez $v0, .L802432BC
D_8024329C:
/* 171B7C 8024329C 00000000 */ nop
.L802432A0:
/* 171B80 802432A0 8E030440 */ lw $v1, 0x440($s0)
glabel .L802432A4
/* 171B84 802432A4 2402000D */ addiu $v0, $zero, 0xD
glabel .L802432A8
/* 171B88 802432A8 A2020216 */ sb $v0, 0x216($s0)
glabel func_802432AC
/* 171B8C 802432AC 82020217 */ lb $v0, 0x217($s0)
glabel func_802432B0
/* 171B90 802432B0 8C63000C */ lw $v1, 0xC($v1)
glabel .L802432B4
/* 171B94 802432B4 08090CB5 */ j D_802432D4
/* 171B98 802432B8 AC62003C */ sw $v0, 0x3C($v1)
.L802432BC:
/* 171B9C 802432BC 10620005 */ beq $v1, $v0, D_802432D4
glabel func_802432C0
/* 171BA0 802432C0 00000000 */ nop
D_802432C4:
/* 171BA4 802432C4 8E020440 */ lw $v0, 0x440($s0)
glabel .L802432C8
/* 171BA8 802432C8 A2000216 */ sb $zero, 0x216($s0)
glabel .L802432CC
/* 171BAC 802432CC 8C42000C */ lw $v0, 0xC($v0)
D_802432D0:
/* 171BB0 802432D0 AC40003C */ sw $zero, 0x3C($v0)
D_802432D4:
/* 171BB4 802432D4 82030210 */ lb $v1, 0x210($s0)
glabel .L802432D8
/* 171BB8 802432D8 24020009 */ addiu $v0, $zero, 0x9
glabel .L802432DC
/* 171BBC 802432DC 5462000B */ bnel $v1, $v0, D_8024330C
D_802432E0:
/* 171BC0 802432E0 26310001 */ addiu $s1, $s1, 0x1
/* 171BC4 802432E4 0200202D */ daddu $a0, $s0, $zero
D_802432E8:
/* 171BC8 802432E8 24050001 */ addiu $a1, $zero, 0x1
.L802432EC:
/* 171BCC 802432EC 8E820000 */ lw $v0, 0x0($s4)
D_802432F0:
/* 171BD0 802432F0 2406000A */ addiu $a2, $zero, 0xA
glabel .L802432F4
/* 171BD4 802432F4 34420020 */ ori $v0, $v0, 0x20
glabel .L802432F8
/* 171BD8 802432F8 0C09E23E */ jal dispatch_damage_event_actor_0
glabel func_802432FC
/* 171BDC 802432FC AE820000 */ sw $v0, 0x0($s4)
D_80243300:
/* 171BE0 80243300 3C01802A */ lui $at, %hi(D_8029F258)
/* 171BE4 80243304 AC33F258 */ sw $s3, %lo(D_8029F258)($at)
.L80243308:
/* 171BE8 80243308 26310001 */ addiu $s1, $s1, 0x1
D_8024330C:
/* 171BEC 8024330C 2A220018 */ slti $v0, $s1, 0x18
glabel func_80243310
/* 171BF0 80243310 1440FF92 */ bnez $v0, .L8024315C
glabel func_80243314
/* 171BF4 80243314 00111080 */ sll $v0, $s1, 2
.L80243318:
/* 171BF8 80243318 24020002 */ addiu $v0, $zero, 0x2
glabel .L8024331C
/* 171BFC 8024331C 3C01800E */ lui $at, %hi(gBattleSubState)
D_80243320:
/* 171C00 80243320 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
glabel func_80243324
/* 171C04 80243324 3C03800E */ lui $v1, %hi(gBattleSubState)
D_80243328:
/* 171C08 80243328 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
/* 171C0C 8024332C 24020002 */ addiu $v0, $zero, 0x2
glabel .L80243330
/* 171C10 80243330 14620070 */ bne $v1, $v0, func_802434F4
glabel func_80243334
/* 171C14 80243334 00000000 */ nop
glabel .L80243338
/* 171C18 80243338 8EA201D8 */ lw $v0, 0x1D8($s5)
/* 171C1C 8024333C 10400005 */ beqz $v0, D_80243354
D_80243340:
/* 171C20 80243340 00000000 */ nop
glabel .L80243344
/* 171C24 80243344 0C0B1059 */ jal does_script_exist
.L80243348:
/* 171C28 80243348 8EA401E8 */ lw $a0, 0x1E8($s5)
D_8024334C:
/* 171C2C 8024334C 14400069 */ bnez $v0, func_802434F4
glabel func_80243350
/* 171C30 80243350 00000000 */ nop
D_80243354:
/* 171C34 80243354 1240000A */ beqz $s2, func_80243380
jtbl_80243358:
/* 171C38 80243358 AEA001D8 */ sw $zero, 0x1D8($s5)
glabel func_8024335C
/* 171C3C 8024335C 8E4201D8 */ lw $v0, 0x1D8($s2)
glabel func_80243360
/* 171C40 80243360 50400007 */ beql $v0, $zero, func_80243380
glabel func_80243364
/* 171C44 80243364 AE4001D8 */ sw $zero, 0x1D8($s2)
glabel func_80243368
/* 171C48 80243368 8E4401E8 */ lw $a0, 0x1E8($s2)
/* 171C4C 8024336C 0C0B1059 */ jal does_script_exist
D_80243370:
/* 171C50 80243370 00000000 */ nop
glabel D_80243374
/* 171C54 80243374 1440005F */ bnez $v0, func_802434F4
D_80243378:
/* 171C58 80243378 00000000 */ nop
.L8024337C:
/* 171C5C 8024337C AE4001D8 */ sw $zero, 0x1D8($s2)
glabel func_80243380
/* 171C60 80243380 0000A02D */ daddu $s4, $zero, $zero
D_80243384:
/* 171C64 80243384 0280882D */ daddu $s1, $s4, $zero
glabel func_80243388
/* 171C68 80243388 02C0982D */ daddu $s3, $s6, $zero
D_8024338C:
/* 171C6C 8024338C 8E7000E0 */ lw $s0, 0xE0($s3)
D_80243390:
/* 171C70 80243390 5200000B */ beql $s0, $zero, func_802433C0
D_80243394:
/* 171C74 80243394 26310001 */ addiu $s1, $s1, 0x1
/* 171C78 80243398 8E0201D8 */ lw $v0, 0x1D8($s0)
D_8024339C:
/* 171C7C 8024339C 50400008 */ beql $v0, $zero, func_802433C0
glabel func_802433A0
/* 171C80 802433A0 26310001 */ addiu $s1, $s1, 0x1
.L802433A4:
/* 171C84 802433A4 8E0401E8 */ lw $a0, 0x1E8($s0)
/* 171C88 802433A8 0C0B1059 */ jal does_script_exist
D_802433AC:
/* 171C8C 802433AC 00000000 */ nop
D_802433B0:
/* 171C90 802433B0 50400002 */ beql $v0, $zero, func_802433BC
glabel func_802433B4
/* 171C94 802433B4 AE0001D8 */ sw $zero, 0x1D8($s0)
glabel .L802433B8
/* 171C98 802433B8 24140001 */ addiu $s4, $zero, 0x1
glabel func_802433BC
/* 171C9C 802433BC 26310001 */ addiu $s1, $s1, 0x1
glabel func_802433C0
/* 171CA0 802433C0 2A220018 */ slti $v0, $s1, 0x18
glabel func_802433C4
/* 171CA4 802433C4 1440FFF1 */ bnez $v0, D_8024338C
D_802433C8:
/* 171CA8 802433C8 26730004 */ addiu $s3, $s3, 0x4
glabel .L802433CC
/* 171CAC 802433CC 16800049 */ bnez $s4, func_802434F4
D_802433D0:
/* 171CB0 802433D0 00000000 */ nop
/* 171CB4 802433D4 0C098D19 */ jal btl_check_player_defeated
D_802433D8:
/* 171CB8 802433D8 00000000 */ nop
glabel .L802433DC
/* 171CBC 802433DC 1440013F */ bnez $v0, .L802438DC
.L802433E0:
/* 171CC0 802433E0 00000000 */ nop
/* 171CC4 802433E4 0C098D0D */ jal btl_check_enemies_defeated
glabel func_802433E8
/* 171CC8 802433E8 00000000 */ nop
glabel .L802433EC
/* 171CCC 802433EC 1440013B */ bnez $v0, .L802438DC
D_802433F0:
/* 171CD0 802433F0 00000000 */ nop
glabel func_802433F4
/* 171CD4 802433F4 0C093903 */ jal func_8024E40C
jtbl_802433F8:
/* 171CD8 802433F8 24040002 */ addiu $a0, $zero, 0x2
/* 171CDC 802433FC 12400007 */ beqz $s2, .L8024341C
D_80243400:
/* 171CE0 80243400 3C030010 */ lui $v1, (0x100000 >> 16)
glabel .L80243404
/* 171CE4 80243404 3C04800E */ lui $a0, %hi(gBattleStatus)
.L80243408:
/* 171CE8 80243408 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
D_8024340C:
/* 171CEC 8024340C 8C820000 */ lw $v0, 0x0($a0)
/* 171CF0 80243410 00431024 */ and $v0, $v0, $v1
D_80243414:
/* 171CF4 80243414 14400003 */ bnez $v0, .L80243424
glabel dead_flo_13_UnkFunc42
/* 171CF8 80243418 00000000 */ nop
.L8024341C:
/* 171CFC 8024341C 08090D3B */ j D_802434EC
D_80243420:
/* 171D00 80243420 24020004 */ addiu $v0, $zero, 0x4
.L80243424:
/* 171D04 80243424 8C820004 */ lw $v0, 0x4($a0)
D_80243428:
/* 171D08 80243428 30420040 */ andi $v0, $v0, 0x40
glabel .L8024342C
/* 171D0C 8024342C 1440002F */ bnez $v0, D_802434EC
.L80243430:
/* 171D10 80243430 24020004 */ addiu $v0, $zero, 0x4
D_80243434:
/* 171D14 80243434 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16)
D_80243438:
/* 171D18 80243438 8EA20000 */ lw $v0, 0x0($s5)
D_8024343C:
/* 171D1C 8024343C 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF)
D_80243440:
/* 171D20 80243440 00431024 */ and $v0, $v0, $v1
D_80243444:
/* 171D24 80243444 AEA20000 */ sw $v0, 0x0($s5)
D_80243448:
/* 171D28 80243448 8E420000 */ lw $v0, 0x0($s2)
D_8024344C:
/* 171D2C 8024344C 00431024 */ and $v0, $v0, $v1
D_80243450:
/* 171D30 80243450 AE420000 */ sw $v0, 0x0($s2)
glabel .L80243454
/* 171D34 80243454 8EA20000 */ lw $v0, 0x0($s5)
.L80243458:
/* 171D38 80243458 3C030400 */ lui $v1, (0x4000000 >> 16)
.L8024345C:
/* 171D3C 8024345C 00431025 */ or $v0, $v0, $v1
D_80243460:
/* 171D40 80243460 AEA20000 */ sw $v0, 0x0($s5)
glabel .L80243464
/* 171D44 80243464 8E420000 */ lw $v0, 0x0($s2)
glabel func_80243468
/* 171D48 80243468 00431025 */ or $v0, $v0, $v1
D_8024346C:
/* 171D4C 8024346C AE420000 */ sw $v0, 0x0($s2)
glabel func_80243470_EE1E30
/* 171D50 80243470 82C2009A */ lb $v0, 0x9A($s6)
D_80243474:
/* 171D54 80243474 1440000A */ bnez $v0, D_802434A0
.L80243478:
/* 171D58 80243478 2643000C */ addiu $v1, $s2, 0xC
D_8024347C:
/* 171D5C 8024347C C6400138 */ lwc1 $f0, 0x138($s2)
D_80243480:
/* 171D60 80243480 C6420140 */ lwc1 $f2, 0x140($s2)
D_80243484:
/* 171D64 80243484 E640000C */ swc1 $f0, 0xC($s2)
/* 171D68 80243488 E6420014 */ swc1 $f2, 0x14($s2)
D_8024348C:
/* 171D6C 8024348C C6A00138 */ lwc1 $f0, 0x138($s5)
/* 171D70 80243490 E6400018 */ swc1 $f0, 0x18($s2)
glabel func_80243494
/* 171D74 80243494 C6A00140 */ lwc1 $f0, 0x140($s5)
D_80243498:
/* 171D78 80243498 08090D37 */ j D_802434DC
glabel func_8024349C
/* 171D7C 8024349C E6400020 */ swc1 $f0, 0x20($s2)
D_802434A0:
/* 171D80 802434A0 C6400138 */ lwc1 $f0, 0x138($s2)
glabel func_802434A4
/* 171D84 802434A4 C6460140 */ lwc1 $f6, 0x140($s2)
D_802434A8:
/* 171D88 802434A8 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 171D8C 802434AC 44811000 */ mtc1 $at, $f2
glabel func_802434B0
/* 171D90 802434B0 C6440138 */ lwc1 $f4, 0x138($s2)
glabel func_802434B4
/* 171D94 802434B4 E640000C */ swc1 $f0, 0xC($s2)
D_802434B8:
/* 171D98 802434B8 46003006 */ mov.s $f0, $f6
/* 171D9C 802434BC 46020000 */ add.s $f0, $f0, $f2
D_802434C0:
/* 171DA0 802434C0 E6460014 */ swc1 $f6, 0x14($s2)
D_802434C4:
/* 171DA4 802434C4 E6440018 */ swc1 $f4, 0x18($s2)
jtbl_802434C8:
/* 171DA8 802434C8 E6400020 */ swc1 $f0, 0x20($s2)
D_802434CC:
/* 171DAC 802434CC C6A00138 */ lwc1 $f0, 0x138($s5)
.L802434D0:
/* 171DB0 802434D0 E6400138 */ swc1 $f0, 0x138($s2)
glabel func_802434D4
/* 171DB4 802434D4 C6A00140 */ lwc1 $f0, 0x140($s5)
D_802434D8:
/* 171DB8 802434D8 E6400140 */ swc1 $f0, 0x140($s2)
D_802434DC:
/* 171DBC 802434DC 24020004 */ addiu $v0, $zero, 0x4
.L802434E0:
/* 171DC0 802434E0 A4620064 */ sh $v0, 0x64($v1)
glabel .L802434E4
/* 171DC4 802434E4 24020003 */ addiu $v0, $zero, 0x3
.L802434E8:
/* 171DC8 802434E8 AC600048 */ sw $zero, 0x48($v1)
D_802434EC:
/* 171DCC 802434EC 3C01800E */ lui $at, %hi(gBattleSubState)
.L802434F0:
/* 171DD0 802434F0 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
glabel func_802434F4
/* 171DD4 802434F4 3C03800E */ lui $v1, %hi(gBattleSubState)
D_802434F8:
/* 171DD8 802434F8 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
D_802434FC:
/* 171DDC 802434FC 24020003 */ addiu $v0, $zero, 0x3
glabel func_80243500
/* 171DE0 80243500 1462006F */ bne $v1, $v0, func_802436C0
glabel func_80243504
/* 171DE4 80243504 00000000 */ nop
glabel func_80243508
/* 171DE8 80243508 86420070 */ lh $v0, 0x70($s2)
glabel .L8024350C
/* 171DEC 8024350C 10400022 */ beqz $v0, func_80243598
D_80243510:
/* 171DF0 80243510 00000000 */ nop
glabel func_80243514
/* 171DF4 80243514 C6400018 */ lwc1 $f0, 0x18($s2)
glabel func_80243518
/* 171DF8 80243518 C6480144 */ lwc1 $f8, 0x144($s2)
glabel func_8024351C
/* 171DFC 8024351C C6420020 */ lwc1 $f2, 0x20($s2)
.L80243520:
/* 171E00 80243520 46080001 */ sub.s $f0, $f0, $f8
/* 171E04 80243524 C644014C */ lwc1 $f4, 0x14C($s2)
/* 171E08 80243528 46041081 */ sub.s $f2, $f2, $f4
D_8024352C:
/* 171E0C 8024352C 44823000 */ mtc1 $v0, $f6
glabel func_80243530
/* 171E10 80243530 00000000 */ nop
.L80243534:
/* 171E14 80243534 468031A0 */ cvt.s.w $f6, $f6
D_80243538:
/* 171E18 80243538 46060003 */ div.s $f0, $f0, $f6
D_8024353C:
/* 171E1C 8024353C 46004200 */ add.s $f8, $f8, $f0
D_80243540:
/* 171E20 80243540 46003006 */ mov.s $f0, $f6
glabel .L80243544
/* 171E24 80243544 46061083 */ div.s $f2, $f2, $f6
dgb_01_pad_3548:
/* 171E28 80243548 C640000C */ lwc1 $f0, 0xC($s2)
.L8024354C:
/* 171E2C 8024354C 46022100 */ add.s $f4, $f4, $f2
D_80243550:
/* 171E30 80243550 E6480144 */ swc1 $f8, 0x144($s2)
/* 171E34 80243554 E644014C */ swc1 $f4, 0x14C($s2)
glabel dgb_04_pad_3558
/* 171E38 80243558 C6A40144 */ lwc1 $f4, 0x144($s5)
.L8024355C:
/* 171E3C 8024355C 46040001 */ sub.s $f0, $f0, $f4
D_80243560:
/* 171E40 80243560 46003086 */ mov.s $f2, $f6
D_80243564:
/* 171E44 80243564 46060003 */ div.s $f0, $f0, $f6
D_80243568:
/* 171E48 80243568 46002100 */ add.s $f4, $f4, $f0
glabel func_8024356C
/* 171E4C 8024356C E6A40144 */ swc1 $f4, 0x144($s5)
glabel func_80243570
/* 171E50 80243570 C6400014 */ lwc1 $f0, 0x14($s2)
glabel func_80243574
/* 171E54 80243574 C6A4014C */ lwc1 $f4, 0x14C($s5)
glabel func_80243578
/* 171E58 80243578 86420070 */ lh $v0, 0x70($s2)
.L8024357C:
/* 171E5C 8024357C 46040001 */ sub.s $f0, $f0, $f4
glabel func_80243580
/* 171E60 80243580 44821000 */ mtc1 $v0, $f2
glabel func_80243584_EE1F44
/* 171E64 80243584 00000000 */ nop
glabel func_80243588
/* 171E68 80243588 468010A0 */ cvt.s.w $f2, $f2
/* 171E6C 8024358C 46020003 */ div.s $f0, $f0, $f2
glabel .L80243590
/* 171E70 80243590 46002100 */ add.s $f4, $f4, $f0
.L80243594:
/* 171E74 80243594 E6A4014C */ swc1 $f4, 0x14C($s5)
glabel func_80243598
/* 171E78 80243598 C64C0054 */ lwc1 $f12, 0x54($s2)
D_8024359C:
/* 171E7C 8024359C 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
glabel func_802435A0
/* 171E80 802435A0 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 171E84 802435A4 4481B000 */ mtc1 $at, $f22
D_802435A8:
/* 171E88 802435A8 00000000 */ nop
/* 171E8C 802435AC 46166302 */ mul.s $f12, $f12, $f22
D_802435B0:
/* 171E90 802435B0 00000000 */ nop
D_802435B4:
/* 171E94 802435B4 3C0143B4 */ lui $at, (0x43B40000 >> 16)
D_802435B8:
/* 171E98 802435B8 4481C000 */ mtc1 $at, $f24
.L802435BC:
/* 171E9C 802435BC 3C014180 */ lui $at, (0x41800000 >> 16)
D_802435C0:
/* 171EA0 802435C0 4481A000 */ mtc1 $at, $f20
glabel func_802435C4
/* 171EA4 802435C4 0C00A85B */ jal sin_rad
D_802435C8:
/* 171EA8 802435C8 46186303 */ div.s $f12, $f12, $f24
glabel func_802435CC
/* 171EAC 802435CC 46140002 */ mul.s $f0, $f0, $f20
D_802435D0:
/* 171EB0 802435D0 00000000 */ nop
D_802435D4:
/* 171EB4 802435D4 C642014C */ lwc1 $f2, 0x14C($s2)
D_802435D8:
/* 171EB8 802435D8 46001081 */ sub.s $f2, $f2, $f0
/* 171EBC 802435DC C64C0054 */ lwc1 $f12, 0x54($s2)
D_802435E0:
/* 171EC0 802435E0 0C00A6C9 */ jal clamp_angle
D_802435E4:
/* 171EC4 802435E4 E642014C */ swc1 $f2, 0x14C($s2)
D_802435E8:
/* 171EC8 802435E8 C64C0054 */ lwc1 $f12, 0x54($s2)
D_802435EC:
/* 171ECC 802435EC 46166302 */ mul.s $f12, $f12, $f22
D_802435F0:
/* 171ED0 802435F0 00000000 */ nop
/* 171ED4 802435F4 E640018C */ swc1 $f0, 0x18C($s2)
D_802435F8:
/* 171ED8 802435F8 0C00A85B */ jal sin_rad
.L802435FC:
/* 171EDC 802435FC 46186303 */ div.s $f12, $f12, $f24
D_80243600:
/* 171EE0 80243600 46140002 */ mul.s $f0, $f0, $f20
D_80243604:
/* 171EE4 80243604 00000000 */ nop
D_80243608:
/* 171EE8 80243608 C6A2014C */ lwc1 $f2, 0x14C($s5)
D_8024360C:
/* 171EEC 8024360C 46001080 */ add.s $f2, $f2, $f0
glabel func_80243610
/* 171EF0 80243610 E6A2014C */ swc1 $f2, 0x14C($s5)
D_80243614:
/* 171EF4 80243614 0C00A6C9 */ jal clamp_angle
.L80243618:
/* 171EF8 80243618 C64C0054 */ lwc1 $f12, 0x54($s2)
/* 171EFC 8024361C E6A0018C */ swc1 $f0, 0x18C($s5)
glabel .L80243620
/* 171F00 80243620 C6400054 */ lwc1 $f0, 0x54($s2)
glabel func_80243624
/* 171F04 80243624 3C0142B4 */ lui $at, (0x42B40000 >> 16)
D_80243628:
/* 171F08 80243628 44811000 */ mtc1 $at, $f2
D_8024362C:
/* 171F0C 8024362C 86420070 */ lh $v0, 0x70($s2)
/* 171F10 80243630 46020000 */ add.s $f0, $f0, $f2
.L80243634:
/* 171F14 80243634 96430070 */ lhu $v1, 0x70($s2)
glabel .L80243638
/* 171F18 80243638 10400004 */ beqz $v0, .L8024364C
/* 171F1C 8024363C E6400054 */ swc1 $f0, 0x54($s2)
glabel func_80243640
/* 171F20 80243640 2462FFFF */ addiu $v0, $v1, -0x1
D_80243644:
/* 171F24 80243644 08090DB0 */ j func_802436C0
/* 171F28 80243648 A6420070 */ sh $v0, 0x70($s2)
.L8024364C:
/* 171F2C 8024364C C6400018 */ lwc1 $f0, 0x18($s2)
glabel func_80243650
/* 171F30 80243650 C6420020 */ lwc1 $f2, 0x20($s2)
arn_04_pad_3654:
/* 171F34 80243654 C644000C */ lwc1 $f4, 0xC($s2)
D_80243658:
/* 171F38 80243658 E6400144 */ swc1 $f0, 0x144($s2)
dead_flo_09_FlyingAI_JumpVels:
/* 171F3C 8024365C E642014C */ swc1 $f2, 0x14C($s2)
D_80243660:
/* 171F40 80243660 E6A40144 */ swc1 $f4, 0x144($s5)
glabel func_80243664
/* 171F44 80243664 C6400014 */ lwc1 $f0, 0x14($s2)
/* 171F48 80243668 E6A0014C */ swc1 $f0, 0x14C($s5)
glabel func_8024366C
/* 171F4C 8024366C 82C2009A */ lb $v0, 0x9A($s6)
D_80243670:
/* 171F50 80243670 14400005 */ bnez $v0, .L80243688
D_80243674:
/* 171F54 80243674 00000000 */ nop
.L80243678:
/* 171F58 80243678 C6400144 */ lwc1 $f0, 0x144($s2)
D_8024367C:
/* 171F5C 8024367C C642014C */ lwc1 $f2, 0x14C($s2)
glabel dead_flo_13_LoadPartyImage
/* 171F60 80243680 E6400138 */ swc1 $f0, 0x138($s2)
D_80243684:
/* 171F64 80243684 E6420140 */ swc1 $f2, 0x140($s2)
glabel .L80243688
/* 171F68 80243688 C6A00144 */ lwc1 $f0, 0x144($s5)
D_8024368C:
/* 171F6C 8024368C C6A2014C */ lwc1 $f2, 0x14C($s5)
D_80243690:
/* 171F70 80243690 E6A00138 */ swc1 $f0, 0x138($s5)
.L80243694:
/* 171F74 80243694 E6A20140 */ swc1 $f2, 0x140($s5)
glabel func_80243698
/* 171F78 80243698 3C05FFEF */ lui $a1, (0xFFEFFFFF >> 16)
D_8024369C:
/* 171F7C 8024369C 34A5FFFF */ ori $a1, $a1, (0xFFEFFFFF & 0xFFFF)
glabel .L802436A0
/* 171F80 802436A0 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 171F84 802436A4 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 171F88 802436A8 8C820000 */ lw $v0, 0x0($a0)
D_802436AC:
/* 171F8C 802436AC 24030004 */ addiu $v1, $zero, 0x4
D_802436B0:
/* 171F90 802436B0 3C01800E */ lui $at, %hi(gBattleSubState)
D_802436B4:
/* 171F94 802436B4 AC23C4DC */ sw $v1, %lo(gBattleSubState)($at)
D_802436B8:
/* 171F98 802436B8 00451024 */ and $v0, $v0, $a1
D_802436BC:
/* 171F9C 802436BC AC820000 */ sw $v0, 0x0($a0)
glabel func_802436C0
/* 171FA0 802436C0 3C10800E */ lui $s0, %hi(gBattleSubState)
/* 171FA4 802436C4 2610C4DC */ addiu $s0, $s0, %lo(gBattleSubState)
.L802436C8:
/* 171FA8 802436C8 8E030000 */ lw $v1, 0x0($s0)
.L802436CC:
/* 171FAC 802436CC 24020004 */ addiu $v0, $zero, 0x4
D_802436D0:
/* 171FB0 802436D0 14620038 */ bne $v1, $v0, D_802437B4
glabel func_802436D4
/* 171FB4 802436D4 00000000 */ nop
glabel dgb_18_pad_36D8
/* 171FB8 802436D8 3C03802A */ lui $v1, %hi(D_8029F258)
D_802436DC:
/* 171FBC 802436DC 2463F258 */ addiu $v1, $v1, %lo(D_8029F258)
D_802436E0:
/* 171FC0 802436E0 8C620000 */ lw $v0, 0x0($v1)
D_802436E4:
/* 171FC4 802436E4 10400003 */ beqz $v0, D_802436F4
.L802436E8:
/* 171FC8 802436E8 2442FFFF */ addiu $v0, $v0, -0x1
D_802436EC:
/* 171FCC 802436EC 08090DED */ j D_802437B4
glabel func_802436F0
/* 171FD0 802436F0 AC620000 */ sw $v0, 0x0($v1)
D_802436F4:
/* 171FD4 802436F4 82C3008A */ lb $v1, 0x8A($s6)
glabel .L802436F8
/* 171FD8 802436F8 24020002 */ addiu $v0, $zero, 0x2
flo_16_pad_36FC:
/* 171FDC 802436FC 14620011 */ bne $v1, $v0, func_80243744
D_80243700:
/* 171FE0 80243700 3C04F7FF */ lui $a0, (0xF7FFFFFF >> 16)
.L80243704:
/* 171FE4 80243704 3C048028 */ lui $a0, %hi(EVS_Mario_HandlePhase)
D_80243708:
/* 171FE8 80243708 24844EBC */ addiu $a0, $a0, %lo(EVS_Mario_HandlePhase)
glabel func_8024370C
/* 171FEC 8024370C 2405000A */ addiu $a1, $zero, 0xA
D_80243710:
/* 171FF0 80243710 0000302D */ daddu $a2, $zero, $zero
glabel func_80243714
/* 171FF4 80243714 24020003 */ addiu $v0, $zero, 0x3
D_80243718:
/* 171FF8 80243718 A2C200AD */ sb $v0, 0xAD($s6)
D_8024371C:
/* 171FFC 8024371C 24020015 */ addiu $v0, $zero, 0x15
D_80243720:
/* 172000 80243720 A2C0008A */ sb $zero, 0x8A($s6)
D_80243724:
/* 172004 80243724 0C0B0CF8 */ jal start_script
/* 172008 80243728 A2C201A7 */ sb $v0, 0x1A7($s6)
.L8024372C:
/* 17200C 8024372C 0040182D */ daddu $v1, $v0, $zero
jtbl_80243730:
/* 172010 80243730 AEA301D4 */ sw $v1, 0x1D4($s5)
/* 172014 80243734 8C620144 */ lw $v0, 0x144($v1)
dgb_03_pad_3738:
/* 172018 80243738 AEA201E4 */ sw $v0, 0x1E4($s5)
D_8024373C:
/* 17201C 8024373C AC600148 */ sw $zero, 0x148($v1)
D_80243740:
/* 172020 80243740 3C04F7FF */ lui $a0, (0xF7FFFFFF >> 16)
glabel func_80243744
/* 172024 80243744 3C05800E */ lui $a1, %hi(gBattleStatus)
glabel func_80243748
/* 172028 80243748 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus)
D_8024374C:
/* 17202C 8024374C 2406FFFD */ addiu $a2, $zero, -0x3
/* 172030 80243750 8CA20000 */ lw $v0, 0x0($a1)
glabel func_80243754
/* 172034 80243754 3484FFFF */ ori $a0, $a0, (0xF7FFFFFF & 0xFFFF)
glabel dgb_00_pad_3758
/* 172038 80243758 00461024 */ and $v0, $v0, $a2
.L8024375C:
/* 17203C 8024375C ACA20000 */ sw $v0, 0x0($a1)
dead_flo_16_SuperBlock_CantUpgradeMessages:
/* 172040 80243760 8EA20000 */ lw $v0, 0x0($s5)
D_80243764:
/* 172044 80243764 3C030400 */ lui $v1, (0x4000000 >> 16)
dead_flo_16_SuperBlock_PartnerIDs:
/* 172048 80243768 00441024 */ and $v0, $v0, $a0
D_8024376C:
/* 17204C 8024376C 00431025 */ or $v0, $v0, $v1
glabel D_80243770
/* 172050 80243770 12400005 */ beqz $s2, .L80243788
/* 172054 80243774 AEA20000 */ sw $v0, 0x0($s5)
dead_flo_16_SuperBlock_UpgradeDescMessages:
/* 172058 80243778 8E420000 */ lw $v0, 0x0($s2)
/* 17205C 8024377C 00441024 */ and $v0, $v0, $a0
glabel func_80243780
/* 172060 80243780 00431025 */ or $v0, $v0, $v1
/* 172064 80243784 AE420000 */ sw $v0, 0x0($s2)
glabel .L80243788
/* 172068 80243788 8CA20004 */ lw $v0, 0x4($a1)
.L8024378C:
/* 17206C 8024378C 24030005 */ addiu $v1, $zero, 0x5
D_80243790:
/* 172070 80243790 AE030000 */ sw $v1, 0x0($s0)
D_80243794:
/* 172074 80243794 2403FFFB */ addiu $v1, $zero, -0x5
glabel func_80243798
/* 172078 80243798 00461024 */ and $v0, $v0, $a2
/* 17207C 8024379C 00431024 */ and $v0, $v0, $v1
D_802437A0:
/* 172080 802437A0 2403FFF7 */ addiu $v1, $zero, -0x9
/* 172084 802437A4 00431024 */ and $v0, $v0, $v1
D_802437A8:
/* 172088 802437A8 2403FFEF */ addiu $v1, $zero, -0x11
D_802437AC:
/* 17208C 802437AC 00431024 */ and $v0, $v0, $v1
D_802437B0:
/* 172090 802437B0 ACA20004 */ sw $v0, 0x4($a1)
D_802437B4:
/* 172094 802437B4 3C03800E */ lui $v1, %hi(gBattleSubState)
dead_flo_16_SuperBlock_UpgradeOrbAngles:
/* 172098 802437B8 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
D_802437BC:
/* 17209C 802437BC 24020005 */ addiu $v0, $zero, 0x5
glabel D_802437C0
/* 1720A0 802437C0 14620028 */ bne $v1, $v0, .L80243864
/* 1720A4 802437C4 24020006 */ addiu $v0, $zero, 0x6
D_802437C8:
/* 1720A8 802437C8 8EA201D4 */ lw $v0, 0x1D4($s5)
glabel func_802437CC
/* 1720AC 802437CC 50400007 */ beql $v0, $zero, .L802437EC
glabel func_802437D0
/* 1720B0 802437D0 AEA001D4 */ sw $zero, 0x1D4($s5)
/* 1720B4 802437D4 8EA401E4 */ lw $a0, 0x1E4($s5)
/* 1720B8 802437D8 0C0B1059 */ jal does_script_exist
D_802437DC:
/* 1720BC 802437DC 00000000 */ nop
D_802437E0:
/* 1720C0 802437E0 1440001D */ bnez $v0, .L80243858
/* 1720C4 802437E4 00000000 */ nop
glabel .L802437E8
/* 1720C8 802437E8 AEA001D4 */ sw $zero, 0x1D4($s5)
.L802437EC:
/* 1720CC 802437EC 0000882D */ daddu $s1, $zero, $zero
D_802437F0:
/* 1720D0 802437F0 2413000D */ addiu $s3, $zero, 0xD
glabel func_802437F4
/* 1720D4 802437F4 02C0902D */ daddu $s2, $s6, $zero
.L802437F8:
/* 1720D8 802437F8 8E5000E0 */ lw $s0, 0xE0($s2)
/* 1720DC 802437FC 52000010 */ beql $s0, $zero, D_80243840
D_80243800:
/* 1720E0 80243800 26310001 */ addiu $s1, $s1, 0x1
D_80243804:
/* 1720E4 80243804 8E0201CC */ lw $v0, 0x1CC($s0)
glabel func_80243808
/* 1720E8 80243808 5040000D */ beql $v0, $zero, D_80243840
/* 1720EC 8024380C 26310001 */ addiu $s1, $s1, 0x1
/* 1720F0 80243810 2405000A */ addiu $a1, $zero, 0xA
D_80243814:
/* 1720F4 80243814 A2D301A7 */ sb $s3, 0x1A7($s6)
/* 1720F8 80243818 8E0401CC */ lw $a0, 0x1CC($s0)
glabel func_8024381C
/* 1720FC 8024381C 0C0B0CF8 */ jal start_script
D_80243820:
/* 172100 80243820 0000302D */ daddu $a2, $zero, $zero
.L80243824:
/* 172104 80243824 0040182D */ daddu $v1, $v0, $zero
glabel .L80243828
/* 172108 80243828 AE0301DC */ sw $v1, 0x1DC($s0)
D_8024382C:
/* 17210C 8024382C 8C620144 */ lw $v0, 0x144($v1)
D_80243830:
/* 172110 80243830 AE0201EC */ sw $v0, 0x1EC($s0)
.L80243834:
/* 172114 80243834 36220200 */ ori $v0, $s1, 0x200
jtbl_80243838:
/* 172118 80243838 AC620148 */ sw $v0, 0x148($v1)
/* 17211C 8024383C 26310001 */ addiu $s1, $s1, 0x1
D_80243840:
/* 172120 80243840 2A220018 */ slti $v0, $s1, 0x18
/* 172124 80243844 1440FFEC */ bnez $v0, .L802437F8
glabel .L80243848
/* 172128 80243848 26520004 */ addiu $s2, $s2, 0x4
.L8024384C:
/* 17212C 8024384C 24020006 */ addiu $v0, $zero, 0x6
.L80243850:
/* 172130 80243850 3C01800E */ lui $at, %hi(gBattleSubState)
D_80243854:
/* 172134 80243854 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
.L80243858:
/* 172138 80243858 3C03800E */ lui $v1, %hi(gBattleSubState)
.L8024385C:
/* 17213C 8024385C 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
.L80243860:
/* 172140 80243860 24020006 */ addiu $v0, $zero, 0x6
.L80243864:
/* 172144 80243864 14620016 */ bne $v1, $v0, .L802438C0
glabel .L80243868
/* 172148 80243868 0000A02D */ daddu $s4, $zero, $zero
glabel func_8024386C
/* 17214C 8024386C 0280882D */ daddu $s1, $s4, $zero
D_80243870:
/* 172150 80243870 02C0902D */ daddu $s2, $s6, $zero
D_80243874:
/* 172154 80243874 8E5000E0 */ lw $s0, 0xE0($s2)
glabel .L80243878
/* 172158 80243878 5200000A */ beql $s0, $zero, func_802438A4
D_8024387C:
/* 17215C 8024387C 26310001 */ addiu $s1, $s1, 0x1
D_80243880:
/* 172160 80243880 8E0201CC */ lw $v0, 0x1CC($s0)
/* 172164 80243884 50400007 */ beql $v0, $zero, func_802438A4
D_80243888:
/* 172168 80243888 26310001 */ addiu $s1, $s1, 0x1
D_8024388C:
/* 17216C 8024388C 8E0401EC */ lw $a0, 0x1EC($s0)
D_80243890:
/* 172170 80243890 0C0B1059 */ jal does_script_exist
/* 172174 80243894 00000000 */ nop
D_80243898:
/* 172178 80243898 54400001 */ bnel $v0, $zero, .L802438A0
/* 17217C 8024389C 24140001 */ addiu $s4, $zero, 0x1
.L802438A0:
/* 172180 802438A0 26310001 */ addiu $s1, $s1, 0x1
glabel func_802438A4
/* 172184 802438A4 2A220018 */ slti $v0, $s1, 0x18
D_802438A8:
/* 172188 802438A8 1440FFF2 */ bnez $v0, D_80243874
/* 17218C 802438AC 26520004 */ addiu $s2, $s2, 0x4
D_802438B0:
/* 172190 802438B0 16800003 */ bnez $s4, .L802438C0
/* 172194 802438B4 24020007 */ addiu $v0, $zero, 0x7
/* 172198 802438B8 3C01800E */ lui $at, %hi(gBattleSubState)
/* 17219C 802438BC AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
.L802438C0:
/* 1721A0 802438C0 3C03800E */ lui $v1, %hi(gBattleSubState)
/* 1721A4 802438C4 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
D_802438C8:
/* 1721A8 802438C8 24020007 */ addiu $v0, $zero, 0x7
D_802438CC:
/* 1721AC 802438CC 14620003 */ bne $v1, $v0, .L802438DC
glabel func_802438D0
/* 1721B0 802438D0 24040014 */ addiu $a0, $zero, 0x14
D_802438D4:
/* 1721B4 802438D4 0C090464 */ jal func_80241190
D_802438D8:
/* 1721B8 802438D8 00000000 */ nop
.L802438DC:
/* 1721BC 802438DC 8FBF002C */ lw $ra, 0x2C($sp)
D_802438E0:
/* 1721C0 802438E0 8FB60028 */ lw $s6, 0x28($sp)
/* 1721C4 802438E4 8FB50024 */ lw $s5, 0x24($sp)
pra_13_802438E8:
/* 1721C8 802438E8 8FB40020 */ lw $s4, 0x20($sp)
D_802438EC:
/* 1721CC 802438EC 8FB3001C */ lw $s3, 0x1C($sp)
glabel func_802438F0
/* 1721D0 802438F0 8FB20018 */ lw $s2, 0x18($sp)
.L802438F4:
/* 1721D4 802438F4 8FB10014 */ lw $s1, 0x14($sp)
D_802438F8:
/* 1721D8 802438F8 8FB00010 */ lw $s0, 0x10($sp)
/* 1721DC 802438FC D7B80040 */ ldc1 $f24, 0x40($sp)
jtbl_80243900:
/* 1721E0 80243900 D7B60038 */ ldc1 $f22, 0x38($sp)
/* 1721E4 80243904 D7B40030 */ ldc1 $f20, 0x30($sp)
glabel func_80243908
/* 1721E8 80243908 03E00008 */ jr $ra
/* 1721EC 8024390C 27BD0048 */ addiu $sp, $sp, 0x48
### DECOMPILED C INSTRUCTIONS:
void btl_state_update_9(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor;
Actor* partner = battleStatus->partnerActor;
Actor* actor;
ActorState* state;
Evt* script;
s32 cond;
s32 i;
s32 oldKoDuration;
if (gBattleSubState == BTL_SUBSTATE_9_INIT) {
if (gBattleStatus.flags2 & BS_FLAGS2_2) {
if (partner != NULL) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_4) && !(partner->flags & ACTOR_FLAG_NO_ATTACK)) {
btl_set_state(BATTLE_STATE_SWITCH_TO_PARTNER);
return;
}
}
player->flags &= ~ACTOR_FLAG_8000000;
player->flags |= ACTOR_FLAG_4000000;
if (partner != NULL) {
partner->flags &= ~ACTOR_FLAG_8000000;
partner->flags |= ACTOR_FLAG_4000000;
}
gBattleSubState = BTL_SUBSTATE_9_1;
D_8029F258 = 0;
gBattleStatus.flags2 &= ~BS_FLAGS2_2;
gBattleStatus.flags2 &= ~BS_FLAGS2_4;
gBattleStatus.flags2 &= ~BS_FLAGS2_8;
gBattleStatus.flags2 &= ~BS_FLAGS2_10;
} else {
btl_set_state(BATTLE_STATE_SWITCH_TO_PLAYER);
return;
}
}
if (gBattleSubState == BTL_SUBSTATE_9_1) {
cond = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL && actor->handleEventScript != NULL) {
if (does_script_exist(actor->handleEventScriptID)) {
cond = TRUE;
} else {
actor->handleEventScript = NULL;
}
}
}
if (!cond) {
reset_actor_turn_info();
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL) {
actor->flags |= ACTOR_FLAG_4000000 | ACTOR_FLAG_8000000;
actor->flags &= ~ACTOR_FLAG_10000;
if (actor->debuff != 0) {
if (actor->debuff == STATUS_KEY_FEAR ||
actor->debuff == STATUS_KEY_DIZZY ||
actor->debuff == STATUS_KEY_PARALYZE ||
actor->debuff == STATUS_KEY_SLEEP ||
actor->debuff == STATUS_KEY_FROZEN ||
actor->debuff == STATUS_KEY_STOP)
{
actor->flags |= ACTOR_FLAG_10000;
}
actor->debuffDuration--;
if (actor->debuffDuration <= 0) {
actor->debuff = 0;
remove_status_debuff(actor->hudElementDataIndex);
dispatch_event_actor(actor, EVENT_RECOVER_STATUS);
D_8029F258 = 20;
}
}
if (actor->staticStatus != 0) {
actor->staticDuration--;
if (actor->staticDuration <= 0) {
actor->staticStatus = 0;
remove_status_static(actor->hudElementDataIndex);
D_8029F258 = 20;
}
}
if (actor->transparentStatus != 0) {
actor->transparentDuration--;
if (actor->transparentDuration <= 0) {
actor->transparentStatus = 0;
remove_status_transparent(actor->hudElementDataIndex);
D_8029F258 = 20;
}
}
if (actor->stoneStatus != 0) {
actor->stoneDuration--;
if (actor->stoneDuration <= 0) {
actor->stoneStatus = 0;
D_8029F258 = 20;
}
}
oldKoDuration = actor->koDuration;
actor->koDuration = actor->debuffDuration;
if (actor->koDuration > 0) {
actor->koStatus = STATUS_KEY_DAZE;
actor->disableEffect->data.disableX->koDuration = actor->koDuration;
} else if (oldKoDuration != actor->koDuration) {
actor->koStatus = 0;
actor->disableEffect->data.disableX->koDuration = 0;
}
if (actor->debuff == STATUS_KEY_POISON) {
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
dispatch_damage_event_actor_0(actor, 1, EVENT_HIT);
D_8029F258 = 20;
}
}
}
gBattleSubState = BTL_SUBSTATE_9_2;
}
}
if (gBattleSubState == BTL_SUBSTATE_9_2) {
if(player->handleEventScript == NULL || !does_script_exist(player->handleEventScriptID)) {
player->handleEventScript = NULL;
if (partner != NULL) {
if (partner->handleEventScript == NULL || !does_script_exist(partner->handleEventScriptID)) {
partner->handleEventScript = NULL;
goto block_52; // TODO find a way to remove
}
} else {
block_52:
cond = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if ((actor != NULL) && (actor->handleEventScript != NULL)) {
if (does_script_exist(actor->handleEventScriptID)) {
cond = TRUE;
} else {
actor->handleEventScript = NULL;
}
}
}
if (!cond) {
if (btl_check_player_defeated() || btl_check_enemies_defeated()) {
return;
}
btl_cam_use_preset(BTL_CAM_DEFAULT);
if (partner == NULL || !(gBattleStatus.flags1 & BS_FLAGS1_PLAYER_IN_BACK)) {
gBattleSubState = BTL_SUBSTATE_9_4;
} else if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
gBattleSubState = BTL_SUBSTATE_9_4;
} else {
player->flags &= ~ACTOR_FLAG_8000000;
partner->flags &= ~ACTOR_FLAG_8000000;
player->flags |= ACTOR_FLAG_4000000;
partner->flags |= ACTOR_FLAG_4000000;
state = &partner->state;
if (!battleStatus->outtaSightActive) {
partner->state.currentPos.x = partner->homePos.x;
partner->state.currentPos.z = partner->homePos.z;
partner->state.goalPos.x = player->homePos.x;
partner->state.goalPos.z = player->homePos.z;
} else {
partner->state.currentPos.x = partner->homePos.x;
partner->state.currentPos.z = partner->homePos.z;
partner->state.goalPos.x = partner->homePos.x;
partner->state.goalPos.z = partner->homePos.z + 5.0f;
partner->homePos.x = player->homePos.x;
partner->homePos.z = player->homePos.z;
}
state->moveTime = 4;
state->angle = 0.0f;
gBattleSubState = BTL_SUBSTATE_9_3;
}
}
}
}
}
if (gBattleSubState == BTL_SUBSTATE_9_3) {
if (partner->state.moveTime != 0) {
partner->currentPos.x += (partner->state.goalPos.x - partner->currentPos.x) / partner->state.moveTime;
partner->currentPos.z += (partner->state.goalPos.z - partner->currentPos.z) / partner->state.moveTime;
player->currentPos.x += (partner->state.currentPos.x - player->currentPos.x) / partner->state.moveTime;
player->currentPos.z += (partner->state.currentPos.z - player->currentPos.z) / partner->state.moveTime;
}
partner->currentPos.z -= sin_rad(DEG_TO_RAD(partner->state.angle)) * 16.0f;
partner->yaw = clamp_angle(partner->state.angle);
player->currentPos.z += sin_rad(DEG_TO_RAD(partner->state.angle)) * 16.0f;
player->yaw = clamp_angle(partner->state.angle);
partner->state.angle += 90.0f;
if (partner->state.moveTime != 0) {
partner->state.moveTime--;
} else {
partner->currentPos.x = partner->state.goalPos.x;
partner->currentPos.z = partner->state.goalPos.z;
player->currentPos.x = partner->state.currentPos.x;
player->currentPos.z = partner->state.currentPos.z;
if (!battleStatus->outtaSightActive) {
partner->homePos.x = partner->currentPos.x;
partner->homePos.z = partner->currentPos.z;
player->homePos.x = player->currentPos.x;
player->homePos.z = player->currentPos.z;
} else {
player->homePos.x = player->currentPos.x;
player->homePos.z = player->currentPos.z;
}
gBattleSubState = BTL_SUBSTATE_9_4;
gBattleStatus.flags1 &= ~ACTOR_FLAG_100000;
}
}
if (gBattleSubState == BTL_SUBSTATE_9_4) {
if (D_8029F258 != 0) {
D_8029F258--;
} else {
if (battleStatus->nextMerleeSpellType == MERLEE_SPELL_2) {
battleStatus->merleeDefenseBoost = 3;
battleStatus->nextMerleeSpellType = MERLEE_SPELL_0;
battleStatus->battlePhase = PHASE_MERLEE_DEFENSE_BONUS;
script = start_script(&EVS_Mario_HandlePhase, EVT_PRIORITY_A, 0);
player->takeTurnScript = script;
player->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PLAYER;
}
gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN;
player->flags &= ~ACTOR_FLAG_8000000;
player->flags |= ACTOR_FLAG_4000000;
if (partner != NULL) {
partner->flags &= ~ACTOR_FLAG_8000000;
partner->flags |= ACTOR_FLAG_4000000;
}
gBattleSubState = BTL_SUBSTATE_9_5;
gBattleStatus.flags2 &= ~BS_FLAGS2_2;
gBattleStatus.flags2 &= ~BS_FLAGS2_4;
gBattleStatus.flags2 &= ~BS_FLAGS2_8;
gBattleStatus.flags2 &= ~BS_FLAGS2_10;
}
}
if (gBattleSubState == BTL_SUBSTATE_9_5) {
if (player->takeTurnScript == NULL || (does_script_exist(player->takeTurnScriptID) == 0)) {
player->takeTurnScript = NULL;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL && actor->handlePhaseSource != NULL) {
battleStatus->battlePhase = PHASE_PLAYER_END;
script = start_script(actor->handlePhaseSource, EVT_PRIORITY_A, 0);
actor->handlePhaseScript = script;
actor->handleBatttlePhaseScriptID = script->id;
script->owner1.enemyID = i | ACTOR_CLASS_ENEMY;
}
}
gBattleSubState = BTL_SUBSTATE_9_6;
}
}
cond = FALSE;
if (gBattleSubState == BTL_SUBSTATE_9_6) {
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL && actor->handlePhaseSource != NULL && does_script_exist(actor->handleBatttlePhaseScriptID)) {
cond = TRUE;
}
}
if (!cond) {
gBattleSubState = BTL_SUBSTATE_9_7;
}
}
if (gBattleSubState == BTL_SUBSTATE_9_7) {
btl_set_state(BATTLE_STATE_NEXT_ENEMY);
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel create_encounters
/* 1EAB0 800436B0 27BDFFA0 */ addiu $sp, $sp, -0x60
/* 1EAB4 800436B4 AFBE0058 */ sw $fp, 0x58($sp)
/* 1EAB8 800436B8 27BE0010 */ addiu $fp, $sp, 0x10
/* 1EABC 800436BC 3C07800B */ lui $a3, %hi(gCurrentEncounter + 0x24)
/* 1EAC0 800436C0 8CE70F34 */ lw $a3, %lo(gCurrentEncounter + 0x24)($a3)
/* 1EAC4 800436C4 3C03800A */ lui $v1, %hi(gEncounterSubState)
/* 1EAC8 800436C8 8C63A5D0 */ lw $v1, %lo(gEncounterSubState)($v1)
/* 1EACC 800436CC 3C08800B */ lui $t0, %hi(gCurrentEncounter + 0x20)
/* 1EAD0 800436D0 81080F30 */ lb $t0, %lo(gCurrentEncounter + 0x20)($t0)
/* 1EAD4 800436D4 24040001 */ addiu $a0, $zero, 0x1
/* 1EAD8 800436D8 AFBF005C */ sw $ra, 0x5C($sp)
/* 1EADC 800436DC AFB70054 */ sw $s7, 0x54($sp)
/* 1EAE0 800436E0 AFB60050 */ sw $s6, 0x50($sp)
/* 1EAE4 800436E4 AFB5004C */ sw $s5, 0x4C($sp)
/* 1EAE8 800436E8 AFB40048 */ sw $s4, 0x48($sp)
/* 1EAEC 800436EC AFB30044 */ sw $s3, 0x44($sp)
/* 1EAF0 800436F0 AFB20040 */ sw $s2, 0x40($sp)
/* 1EAF4 800436F4 AFB1003C */ sw $s1, 0x3C($sp)
/* 1EAF8 800436F8 AFB00038 */ sw $s0, 0x38($sp)
/* 1EAFC 800436FC AFA70020 */ sw $a3, 0x20($sp)
/* 1EB00 80043700 106401A5 */ beq $v1, $a0, .L80043D98
/* 1EB04 80043704 AFA80028 */ sw $t0, 0x28($sp)
/* 1EB08 80043708 28620002 */ slti $v0, $v1, 0x2
/* 1EB0C 8004370C 50400005 */ beql $v0, $zero, .L80043724
/* 1EB10 80043710 24020002 */ addiu $v0, $zero, 0x2
/* 1EB14 80043714 10600007 */ beqz $v1, .L80043734
/* 1EB18 80043718 00000000 */ nop
/* 1EB1C 8004371C 08011044 */ j .L80044110
/* 1EB20 80043720 00000000 */ nop
.L80043724:
/* 1EB24 80043724 106201EF */ beq $v1, $v0, .L80043EE4
/* 1EB28 80043728 0000A82D */ daddu $s5, $zero, $zero
/* 1EB2C 8004372C 08011044 */ j .L80044110
/* 1EB30 80043730 00000000 */ nop
.L80043734:
/* 1EB34 80043734 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x21)
/* 1EB38 80043738 80420F31 */ lb $v0, %lo(gCurrentEncounter + 0x21)($v0)
/* 1EB3C 8004373C 1044002A */ beq $v0, $a0, .L800437E8
/* 1EB40 80043740 00000000 */ nop
/* 1EB44 80043744 0000982D */ daddu $s3, $zero, $zero
/* 1EB48 80043748 3C03800B */ lui $v1, %hi(gCurrentEncounter)
/* 1EB4C 8004374C 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter)
.L80043750:
/* 1EB50 80043750 84620BF0 */ lh $v0, 0xBF0($v1)
/* 1EB54 80043754 8FA70028 */ lw $a3, 0x28($sp)
/* 1EB58 80043758 10470006 */ beq $v0, $a3, .L80043774
/* 1EB5C 8004375C 2A620002 */ slti $v0, $s3, 0x2
/* 1EB60 80043760 26730001 */ addiu $s3, $s3, 0x1
/* 1EB64 80043764 2A620002 */ slti $v0, $s3, 0x2
/* 1EB68 80043768 1440FFF9 */ bnez $v0, .L80043750
/* 1EB6C 8004376C 24630002 */ addiu $v1, $v1, 0x2
/* 1EB70 80043770 2A620002 */ slti $v0, $s3, 0x2
.L80043774:
/* 1EB74 80043774 1440000F */ bnez $v0, .L800437B4
/* 1EB78 80043778 0000982D */ daddu $s3, $zero, $zero
/* 1EB7C 8004377C 8FA80028 */ lw $t0, 0x28($sp)
/* 1EB80 80043780 0000182D */ daddu $v1, $zero, $zero
/* 1EB84 80043784 00081040 */ sll $v0, $t0, 1
/* 1EB88 80043788 00481021 */ addu $v0, $v0, $t0
/* 1EB8C 8004378C 00022100 */ sll $a0, $v0, 4
/* 1EB90 80043790 3C07800B */ lui $a3, %hi(gCurrentEncounter)
/* 1EB94 80043794 24E70F10 */ addiu $a3, $a3, %lo(gCurrentEncounter)
.L80043798:
/* 1EB98 80043798 00E41021 */ addu $v0, $a3, $a0
/* 1EB9C 8004379C AC4000B0 */ sw $zero, 0xB0($v0)
/* 1EBA0 800437A0 24630001 */ addiu $v1, $v1, 0x1
/* 1EBA4 800437A4 2862000C */ slti $v0, $v1, 0xC
/* 1EBA8 800437A8 1440FFFB */ bnez $v0, .L80043798
/* 1EBAC 800437AC 24840004 */ addiu $a0, $a0, 0x4
/* 1EBB0 800437B0 0000982D */ daddu $s3, $zero, $zero
.L800437B4:
/* 1EBB4 800437B4 00131840 */ sll $v1, $s3, 1
/* 1EBB8 800437B8 26620001 */ addiu $v0, $s3, 0x1
/* 1EBBC 800437BC 0040982D */ daddu $s3, $v0, $zero
/* 1EBC0 800437C0 00131040 */ sll $v0, $s3, 1
/* 1EBC4 800437C4 3C08800B */ lui $t0, %hi(gCurrentEncounter)
/* 1EBC8 800437C8 25080F10 */ addiu $t0, $t0, %lo(gCurrentEncounter)
/* 1EBCC 800437CC 01022021 */ addu $a0, $t0, $v0
/* 1EBD0 800437D0 94820BF0 */ lhu $v0, 0xBF0($a0)
/* 1EBD4 800437D4 01031821 */ addu $v1, $t0, $v1
/* 1EBD8 800437D8 1A60FFF6 */ blez $s3, .L800437B4
/* 1EBDC 800437DC A4620BF0 */ sh $v0, 0xBF0($v1)
/* 1EBE0 800437E0 97A7002A */ lhu $a3, 0x2A($sp)
/* 1EBE4 800437E4 A4870BF0 */ sh $a3, 0xBF0($a0)
.L800437E8:
/* 1EBE8 800437E8 8FA80020 */ lw $t0, 0x20($sp)
/* 1EBEC 800437EC 0000B02D */ daddu $s6, $zero, $zero
/* 1EBF0 800437F0 AFA0002C */ sw $zero, 0x2C($sp)
/* 1EBF4 800437F4 2508000A */ addiu $t0, $t0, 0xA
/* 1EBF8 800437F8 AFA80034 */ sw $t0, 0x34($sp)
.L800437FC:
/* 1EBFC 800437FC 8FA70020 */ lw $a3, 0x20($sp)
/* 1EC00 80043800 8CE20000 */ lw $v0, 0x0($a3)
/* 1EC04 80043804 1040015D */ beqz $v0, .L80043D7C
/* 1EC08 80043808 2404004C */ addiu $a0, $zero, 0x4C
/* 1EC0C 8004380C 8FA80034 */ lw $t0, 0x34($sp)
/* 1EC10 80043810 8D17FFFA */ lw $s7, -0x6($t0)
/* 1EC14 80043814 0C00AB39 */ jal heap_malloc
/* 1EC18 80043818 AFA20024 */ sw $v0, 0x24($sp)
/* 1EC1C 8004381C 0040A02D */ daddu $s4, $v0, $zero
/* 1EC20 80043820 00161080 */ sll $v0, $s6, 2
/* 1EC24 80043824 3C07800B */ lui $a3, %hi(gCurrentEncounter)
/* 1EC28 80043828 24E70F10 */ addiu $a3, $a3, %lo(gCurrentEncounter)
/* 1EC2C 8004382C 00E21021 */ addu $v0, $a3, $v0
/* 1EC30 80043830 16800003 */ bnez $s4, .L80043840
/* 1EC34 80043834 AC540028 */ sw $s4, 0x28($v0)
.L80043838:
/* 1EC38 80043838 08010E0E */ j .L80043838
/* 1EC3C 8004383C 00000000 */ nop
.L80043840:
/* 1EC40 80043840 8FA80024 */ lw $t0, 0x24($sp)
/* 1EC44 80043844 AE880000 */ sw $t0, 0x0($s4)
/* 1EC48 80043848 8FA70034 */ lw $a3, 0x34($sp)
/* 1EC4C 8004384C 94E2FFFE */ lhu $v0, -0x2($a3)
/* 1EC50 80043850 A6820044 */ sh $v0, 0x44($s4)
/* 1EC54 80043854 94E20000 */ lhu $v0, 0x0($a3)
/* 1EC58 80043858 97A8002E */ lhu $t0, 0x2E($sp)
/* 1EC5C 8004385C 2442FFFF */ addiu $v0, $v0, -0x1
/* 1EC60 80043860 A6880048 */ sh $t0, 0x48($s4)
/* 1EC64 80043864 A6820046 */ sh $v0, 0x46($s4)
/* 1EC68 80043868 8FA70024 */ lw $a3, 0x24($sp)
/* 1EC6C 8004386C 18E00137 */ blez $a3, .L80043D4C
/* 1EC70 80043870 0000982D */ daddu $s3, $zero, $zero
/* 1EC74 80043874 AFB40030 */ sw $s4, 0x30($sp)
/* 1EC78 80043878 26F20024 */ addiu $s2, $s7, 0x24
.L8004387C:
/* 1EC7C 8004387C 86850048 */ lh $a1, 0x48($s4)
/* 1EC80 80043880 8FA40028 */ lw $a0, 0x28($sp)
/* 1EC84 80043884 0C00FB7C */ jal get_defeated
/* 1EC88 80043888 00B32821 */ addu $a1, $a1, $s3
/* 1EC8C 8004388C 10400006 */ beqz $v0, .L800438A8
/* 1EC90 80043890 00000000 */ nop
/* 1EC94 80043894 265201F0 */ addiu $s2, $s2, 0x1F0
/* 1EC98 80043898 8FA80030 */ lw $t0, 0x30($sp)
/* 1EC9C 8004389C 26F701F0 */ addiu $s7, $s7, 0x1F0
/* 1ECA0 800438A0 08010F4C */ j .L80043D30
/* 1ECA4 800438A4 AD000004 */ sw $zero, 0x4($t0)
.L800438A8:
/* 1ECA8 800438A8 0C00AB39 */ jal heap_malloc
/* 1ECAC 800438AC 240400E8 */ addiu $a0, $zero, 0xE8
/* 1ECB0 800438B0 8FA70030 */ lw $a3, 0x30($sp)
/* 1ECB4 800438B4 0040802D */ daddu $s0, $v0, $zero
/* 1ECB8 800438B8 16000003 */ bnez $s0, .L800438C8
/* 1ECBC 800438BC ACE20004 */ sw $v0, 0x4($a3)
.L800438C0:
/* 1ECC0 800438C0 08010E30 */ j .L800438C0
/* 1ECC4 800438C4 00000000 */ nop
.L800438C8:
/* 1ECC8 800438C8 2403000F */ addiu $v1, $zero, 0xF
/* 1ECCC 800438CC 2602003C */ addiu $v0, $s0, 0x3C
.L800438D0:
/* 1ECD0 800438D0 AC40006C */ sw $zero, 0x6C($v0)
/* 1ECD4 800438D4 2463FFFF */ addiu $v1, $v1, -0x1
/* 1ECD8 800438D8 0461FFFD */ bgez $v1, .L800438D0
/* 1ECDC 800438DC 2442FFFC */ addiu $v0, $v0, -0x4
/* 1ECE0 800438E0 A2160004 */ sb $s6, 0x4($s0)
/* 1ECE4 800438E4 9642FFDE */ lhu $v0, -0x22($s2)
/* 1ECE8 800438E8 A6020008 */ sh $v0, 0x8($s0)
/* 1ECEC 800438EC 8E44FFE0 */ lw $a0, -0x20($s2)
/* 1ECF0 800438F0 26E20028 */ addiu $v0, $s7, 0x28
/* 1ECF4 800438F4 AE0200D4 */ sw $v0, 0xD4($s0)
/* 1ECF8 800438F8 34028000 */ ori $v0, $zero, 0x8000
/* 1ECFC 800438FC AE040018 */ sw $a0, 0x18($s0)
/* 1ED00 80043900 86430004 */ lh $v1, 0x4($s2)
/* 1ED04 80043904 3063FF00 */ andi $v1, $v1, 0xFF00
/* 1ED08 80043908 10620004 */ beq $v1, $v0, .L8004391C
/* 1ED0C 8004390C 0080A82D */ daddu $s5, $a0, $zero
/* 1ED10 80043910 3C028007 */ lui $v0, %hi(D_80077EB8)
/* 1ED14 80043914 24427EB8 */ addiu $v0, $v0, %lo(D_80077EB8)
/* 1ED18 80043918 AE0200D4 */ sw $v0, 0xD4($s0)
.L8004391C:
/* 1ED1C 8004391C 3C02EFE8 */ lui $v0, (0xEFE82080 >> 16)
/* 1ED20 80043920 A2000005 */ sb $zero, 0x5($s0)
/* 1ED24 80043924 8E43FFF4 */ lw $v1, -0xC($s2)
/* 1ED28 80043928 34422080 */ ori $v0, $v0, (0xEFE82080 & 0xFFFF)
/* 1ED2C 8004392C 0062102A */ slt $v0, $v1, $v0
/* 1ED30 80043930 50400002 */ beql $v0, $zero, .L8004393C
/* 1ED34 80043934 AE00001C */ sw $zero, 0x1C($s0)
/* 1ED38 80043938 AE03001C */ sw $v1, 0x1C($s0)
.L8004393C:
/* 1ED3C 8004393C 8EA2000C */ lw $v0, 0xC($s5)
/* 1ED40 80043940 AE020020 */ sw $v0, 0x20($s0)
/* 1ED44 80043944 8EA20010 */ lw $v0, 0x10($s5)
/* 1ED48 80043948 AE020024 */ sw $v0, 0x24($s0)
/* 1ED4C 8004394C 8EA20014 */ lw $v0, 0x14($s5)
/* 1ED50 80043950 AE020028 */ sw $v0, 0x28($s0)
/* 1ED54 80043954 8EA20018 */ lw $v0, 0x18($s5)
/* 1ED58 80043958 AE02002C */ sw $v0, 0x2C($s0)
/* 1ED5C 8004395C 8EA2001C */ lw $v0, 0x1C($s5)
/* 1ED60 80043960 AE000034 */ sw $zero, 0x34($s0)
/* 1ED64 80043964 AE000038 */ sw $zero, 0x38($s0)
/* 1ED68 80043968 AE00003C */ sw $zero, 0x3C($s0)
/* 1ED6C 8004396C AE000040 */ sw $zero, 0x40($s0)
/* 1ED70 80043970 AE000044 */ sw $zero, 0x44($s0)
/* 1ED74 80043974 AE000048 */ sw $zero, 0x48($s0)
/* 1ED78 80043978 AE000050 */ sw $zero, 0x50($s0)
/* 1ED7C 8004397C AE000054 */ sw $zero, 0x54($s0)
/* 1ED80 80043980 AE000058 */ sw $zero, 0x58($s0)
/* 1ED84 80043984 AE00005C */ sw $zero, 0x5C($s0)
/* 1ED88 80043988 AE000060 */ sw $zero, 0x60($s0)
/* 1ED8C 8004398C A2000007 */ sb $zero, 0x7($s0)
/* 1ED90 80043990 A20000B5 */ sb $zero, 0xB5($s0)
/* 1ED94 80043994 AE020030 */ sw $v0, 0x30($s0)
/* 1ED98 80043998 924201BF */ lbu $v0, 0x1BF($s2)
/* 1ED9C 8004399C A20200AC */ sb $v0, 0xAC($s0)
/* 1EDA0 800439A0 8E4201C0 */ lw $v0, 0x1C0($s2)
/* 1EDA4 800439A4 AE0000DC */ sw $zero, 0xDC($s0)
/* 1EDA8 800439A8 A20000B4 */ sb $zero, 0xB4($s0)
/* 1EDAC 800439AC AE0200B0 */ sw $v0, 0xB0($s0)
/* 1EDB0 800439B0 8EA20024 */ lw $v0, 0x24($s5)
/* 1EDB4 800439B4 AE0000BC */ sw $zero, 0xBC($s0)
/* 1EDB8 800439B8 AE0000C0 */ sw $zero, 0xC0($s0)
/* 1EDBC 800439BC AE0200B8 */ sw $v0, 0xB8($s0)
/* 1EDC0 800439C0 26E201A0 */ addiu $v0, $s7, 0x1A0
/* 1EDC4 800439C4 AE0000C4 */ sw $zero, 0xC4($s0)
/* 1EDC8 800439C8 AE0200CC */ sw $v0, 0xCC($s0)
/* 1EDCC 800439CC 26E200E0 */ addiu $v0, $s7, 0xE0
/* 1EDD0 800439D0 AE0200D0 */ sw $v0, 0xD0($s0)
/* 1EDD4 800439D4 8EA20020 */ lw $v0, 0x20($s5)
/* 1EDD8 800439D8 AE020000 */ sw $v0, 0x0($s0)
/* 1EDDC 800439DC 8E43FFF0 */ lw $v1, -0x10($s2)
/* 1EDE0 800439E0 AE000064 */ sw $zero, 0x64($s0)
/* 1EDE4 800439E4 00431025 */ or $v0, $v0, $v1
/* 1EDE8 800439E8 AE020000 */ sw $v0, 0x0($s0)
/* 1EDEC 800439EC 8E4201C8 */ lw $v0, 0x1C8($s2)
/* 1EDF0 800439F0 AE0200D8 */ sw $v0, 0xD8($s0)
/* 1EDF4 800439F4 8E44FFF8 */ lw $a0, -0x8($s2)
/* 1EDF8 800439F8 10800012 */ beqz $a0, .L80043A44
/* 1EDFC 800439FC 24020001 */ addiu $v0, $zero, 0x1
/* 1EE00 80043A00 14820004 */ bne $a0, $v0, .L80043A14
/* 1EE04 80043A04 00000000 */ nop
/* 1EE08 80043A08 8E42FFFC */ lw $v0, -0x4($s2)
/* 1EE0C 80043A0C 08010E91 */ j .L80043A44
/* 1EE10 80043A10 AE02006C */ sw $v0, 0x6C($s0)
.L80043A14:
/* 1EE14 80043A14 8E45FFFC */ lw $a1, -0x4($s2)
/* 1EE18 80043A18 1880000A */ blez $a0, .L80043A44
/* 1EE1C 80043A1C 0000182D */ daddu $v1, $zero, $zero
/* 1EE20 80043A20 0200202D */ daddu $a0, $s0, $zero
.L80043A24:
/* 1EE24 80043A24 8CA20000 */ lw $v0, 0x0($a1)
/* 1EE28 80043A28 24A50004 */ addiu $a1, $a1, 0x4
/* 1EE2C 80043A2C 24630001 */ addiu $v1, $v1, 0x1
/* 1EE30 80043A30 AC82006C */ sw $v0, 0x6C($a0)
/* 1EE34 80043A34 8E42FFF8 */ lw $v0, -0x8($s2)
/* 1EE38 80043A38 0062102A */ slt $v0, $v1, $v0
/* 1EE3C 80043A3C 1440FFF9 */ bnez $v0, .L80043A24
/* 1EE40 80043A40 24840004 */ addiu $a0, $a0, 0x4
.L80043A44:
/* 1EE44 80043A44 AFC00000 */ sw $zero, 0x0($fp)
/* 1EE48 80043A48 8EA20000 */ lw $v0, 0x0($s5)
/* 1EE4C 80043A4C 54400004 */ bnel $v0, $zero, .L80043A60
/* 1EE50 80043A50 AFC20004 */ sw $v0, 0x4($fp)
/* 1EE54 80043A54 8E0200CC */ lw $v0, 0xCC($s0)
/* 1EE58 80043A58 8C420000 */ lw $v0, 0x0($v0)
/* 1EE5C 80043A5C AFC20004 */ sw $v0, 0x4($fp)
.L80043A60:
/* 1EE60 80043A60 AFC00008 */ sw $zero, 0x8($fp)
/* 1EE64 80043A64 AFC0000C */ sw $zero, 0xC($fp)
/* 1EE68 80043A68 8E020000 */ lw $v0, 0x0($s0)
/* 1EE6C 80043A6C 3C030002 */ lui $v1, (0x20000 >> 16)
/* 1EE70 80043A70 00431024 */ and $v0, $v0, $v1
/* 1EE74 80043A74 14400006 */ bnez $v0, .L80043A90
/* 1EE78 80043A78 00000000 */ nop
/* 1EE7C 80043A7C 8E4501C4 */ lw $a1, 0x1C4($s2)
/* 1EE80 80043A80 0C00E219 */ jal create_standard_npc
/* 1EE84 80043A84 03C0202D */ daddu $a0, $fp, $zero
/* 1EE88 80043A88 08010EA6 */ j .L80043A98
/* 1EE8C 80043A8C 00000000 */ nop
.L80043A90:
/* 1EE90 80043A90 0C00E220 */ jal create_peach_npc
/* 1EE94 80043A94 03C0202D */ daddu $a0, $fp, $zero
.L80043A98:
/* 1EE98 80043A98 0C00E2B7 */ jal get_npc_by_index
/* 1EE9C 80043A9C 0040202D */ daddu $a0, $v0, $zero
/* 1EEA0 80043AA0 9243FFDF */ lbu $v1, -0x21($s2)
/* 1EEA4 80043AA4 0040882D */ daddu $s1, $v0, $zero
/* 1EEA8 80043AA8 A22300A4 */ sb $v1, 0xA4($s1)
/* 1EEAC 80043AAC 96A20006 */ lhu $v0, 0x6($s5)
/* 1EEB0 80043AB0 A62200A6 */ sh $v0, 0xA6($s1)
/* 1EEB4 80043AB4 96A20004 */ lhu $v0, 0x4($s5)
/* 1EEB8 80043AB8 A62200A8 */ sh $v0, 0xA8($s1)
/* 1EEBC 80043ABC C640FFE4 */ lwc1 $f0, -0x1C($s2)
/* 1EEC0 80043AC0 4600010D */ trunc.w.s $f4, $f0
/* 1EEC4 80043AC4 44022000 */ mfc1 $v0, $f4
/* 1EEC8 80043AC8 E6200038 */ swc1 $f0, 0x38($s1)
/* 1EECC 80043ACC A602000A */ sh $v0, 0xA($s0)
/* 1EED0 80043AD0 C640FFE8 */ lwc1 $f0, -0x18($s2)
/* 1EED4 80043AD4 4600010D */ trunc.w.s $f4, $f0
/* 1EED8 80043AD8 44022000 */ mfc1 $v0, $f4
/* 1EEDC 80043ADC E620003C */ swc1 $f0, 0x3C($s1)
/* 1EEE0 80043AE0 A602000C */ sh $v0, 0xC($s0)
/* 1EEE4 80043AE4 C640FFEC */ lwc1 $f0, -0x14($s2)
/* 1EEE8 80043AE8 4600010D */ trunc.w.s $f4, $f0
/* 1EEEC 80043AEC 44022000 */ mfc1 $v0, $f4
/* 1EEF0 80043AF0 E6200040 */ swc1 $f0, 0x40($s1)
/* 1EEF4 80043AF4 A602000E */ sh $v0, 0xE($s0)
/* 1EEF8 80043AF8 C6200038 */ lwc1 $f0, 0x38($s1)
/* 1EEFC 80043AFC C6220040 */ lwc1 $f2, 0x40($s1)
/* 1EF00 80043B00 4600010D */ trunc.w.s $f4, $f0
/* 1EF04 80043B04 44022000 */ mfc1 $v0, $f4
/* 1EF08 80043B08 C620003C */ lwc1 $f0, 0x3C($s1)
/* 1EF0C 80043B0C A6200096 */ sh $zero, 0x96($s1)
/* 1EF10 80043B10 AE200010 */ sw $zero, 0x10($s1)
/* 1EF14 80043B14 A6220090 */ sh $v0, 0x90($s1)
/* 1EF18 80043B18 4600010D */ trunc.w.s $f4, $f0
/* 1EF1C 80043B1C 44022000 */ mfc1 $v0, $f4
/* 1EF20 80043B20 00000000 */ nop
/* 1EF24 80043B24 A6220092 */ sh $v0, 0x92($s1)
/* 1EF28 80043B28 4600110D */ trunc.w.s $f4, $f2
/* 1EF2C 80043B2C 44022000 */ mfc1 $v0, $f4
/* 1EF30 80043B30 00000000 */ nop
/* 1EF34 80043B34 A6220094 */ sh $v0, 0x94($s1)
/* 1EF38 80043B38 C6440000 */ lwc1 $f4, 0x0($s2)
/* 1EF3C 80043B3C 46802120 */ cvt.s.w $f4, $f4
/* 1EF40 80043B40 44052000 */ mfc1 $a1, $f4
/* 1EF44 80043B44 0C00ECD0 */ jal set_npc_yaw
/* 1EF48 80043B48 0220202D */ daddu $a0, $s1, $zero
/* 1EF4C 80043B4C 24023039 */ addiu $v0, $zero, 0x3039
/* 1EF50 80043B50 A60200E0 */ sh $v0, 0xE0($s0)
/* 1EF54 80043B54 862200A6 */ lh $v0, 0xA6($s1)
/* 1EF58 80043B58 3C014038 */ lui $at, (0x40380000 >> 16)
/* 1EF5C 80043B5C 44811800 */ mtc1 $at, $f3
/* 1EF60 80043B60 44801000 */ mtc1 $zero, $f2
/* 1EF64 80043B64 44820000 */ mtc1 $v0, $f0
/* 1EF68 80043B68 00000000 */ nop
/* 1EF6C 80043B6C 46800021 */ cvt.d.w $f0, $f0
/* 1EF70 80043B70 4620103E */ c.le.d $f2, $f0
/* 1EF74 80043B74 00000000 */ nop
/* 1EF78 80043B78 45000004 */ bc1f .L80043B8C
/* 1EF7C 80043B7C 00000000 */ nop
/* 1EF80 80043B80 46220003 */ div.d $f0, $f0, $f2
/* 1EF84 80043B84 08010EE6 */ j .L80043B98
/* 1EF88 80043B88 46200020 */ cvt.s.d $f0, $f0
.L80043B8C:
/* 1EF8C 80043B8C 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1EF90 80043B90 44810000 */ mtc1 $at, $f0
/* 1EF94 80043B94 00000000 */ nop
.L80043B98:
/* 1EF98 80043B98 E620007C */ swc1 $f0, 0x7C($s1)
/* 1EF9C 80043B9C 8E020000 */ lw $v0, 0x0($s0)
/* 1EFA0 80043BA0 30420100 */ andi $v0, $v0, 0x100
/* 1EFA4 80043BA4 10400004 */ beqz $v0, .L80043BB8
/* 1EFA8 80043BA8 00000000 */ nop
/* 1EFAC 80043BAC 8E220000 */ lw $v0, 0x0($s1)
/* 1EFB0 80043BB0 34420040 */ ori $v0, $v0, 0x40
/* 1EFB4 80043BB4 AE220000 */ sw $v0, 0x0($s1)
.L80043BB8:
/* 1EFB8 80043BB8 8E020000 */ lw $v0, 0x0($s0)
/* 1EFBC 80043BBC 30420200 */ andi $v0, $v0, 0x200
/* 1EFC0 80043BC0 10400004 */ beqz $v0, .L80043BD4
/* 1EFC4 80043BC4 00000000 */ nop
/* 1EFC8 80043BC8 8E220000 */ lw $v0, 0x0($s1)
/* 1EFCC 80043BCC 34420100 */ ori $v0, $v0, 0x100
/* 1EFD0 80043BD0 AE220000 */ sw $v0, 0x0($s1)
.L80043BD4:
/* 1EFD4 80043BD4 8E020000 */ lw $v0, 0x0($s0)
/* 1EFD8 80043BD8 30420400 */ andi $v0, $v0, 0x400
/* 1EFDC 80043BDC 10400004 */ beqz $v0, .L80043BF0
/* 1EFE0 80043BE0 00000000 */ nop
/* 1EFE4 80043BE4 8E220000 */ lw $v0, 0x0($s1)
/* 1EFE8 80043BE8 34428000 */ ori $v0, $v0, 0x8000
/* 1EFEC 80043BEC AE220000 */ sw $v0, 0x0($s1)
.L80043BF0:
/* 1EFF0 80043BF0 8E020000 */ lw $v0, 0x0($s0)
/* 1EFF4 80043BF4 30420800 */ andi $v0, $v0, 0x800
/* 1EFF8 80043BF8 10400004 */ beqz $v0, .L80043C0C
/* 1EFFC 80043BFC 00000000 */ nop
/* 1F000 80043C00 8E220000 */ lw $v0, 0x0($s1)
/* 1F004 80043C04 34420008 */ ori $v0, $v0, 0x8
/* 1F008 80043C08 AE220000 */ sw $v0, 0x0($s1)
.L80043C0C:
/* 1F00C 80043C0C 8E020000 */ lw $v0, 0x0($s0)
/* 1F010 80043C10 30421000 */ andi $v0, $v0, 0x1000
/* 1F014 80043C14 10400004 */ beqz $v0, .L80043C28
/* 1F018 80043C18 00000000 */ nop
/* 1F01C 80043C1C 8E220000 */ lw $v0, 0x0($s1)
/* 1F020 80043C20 34420200 */ ori $v0, $v0, 0x200
/* 1F024 80043C24 AE220000 */ sw $v0, 0x0($s1)
.L80043C28:
/* 1F028 80043C28 8E020000 */ lw $v0, 0x0($s0)
/* 1F02C 80043C2C 30420001 */ andi $v0, $v0, 0x1
/* 1F030 80043C30 14400004 */ bnez $v0, .L80043C44
/* 1F034 80043C34 00000000 */ nop
/* 1F038 80043C38 8E220000 */ lw $v0, 0x0($s1)
/* 1F03C 80043C3C 34420100 */ ori $v0, $v0, 0x100
/* 1F040 80043C40 AE220000 */ sw $v0, 0x0($s1)
.L80043C44:
/* 1F044 80043C44 8E020000 */ lw $v0, 0x0($s0)
/* 1F048 80043C48 30424000 */ andi $v0, $v0, 0x4000
/* 1F04C 80043C4C 10400004 */ beqz $v0, .L80043C60
/* 1F050 80043C50 3C030100 */ lui $v1, (0x1000000 >> 16)
/* 1F054 80043C54 8E220000 */ lw $v0, 0x0($s1)
/* 1F058 80043C58 00431025 */ or $v0, $v0, $v1
/* 1F05C 80043C5C AE220000 */ sw $v0, 0x0($s1)
.L80043C60:
/* 1F060 80043C60 8E020000 */ lw $v0, 0x0($s0)
/* 1F064 80043C64 30422000 */ andi $v0, $v0, 0x2000
/* 1F068 80043C68 10400004 */ beqz $v0, .L80043C7C
/* 1F06C 80043C6C 00000000 */ nop
/* 1F070 80043C70 8E220000 */ lw $v0, 0x0($s1)
/* 1F074 80043C74 34420020 */ ori $v0, $v0, 0x20
/* 1F078 80043C78 AE220000 */ sw $v0, 0x0($s1)
.L80043C7C:
/* 1F07C 80043C7C 8E020000 */ lw $v0, 0x0($s0)
/* 1F080 80043C80 30428000 */ andi $v0, $v0, 0x8000
/* 1F084 80043C84 10400004 */ beqz $v0, .L80043C98
/* 1F088 80043C88 3C031000 */ lui $v1, (0x10000000 >> 16)
/* 1F08C 80043C8C 8E220000 */ lw $v0, 0x0($s1)
/* 1F090 80043C90 00431025 */ or $v0, $v0, $v1
/* 1F094 80043C94 AE220000 */ sw $v0, 0x0($s1)
.L80043C98:
/* 1F098 80043C98 8E020000 */ lw $v0, 0x0($s0)
/* 1F09C 80043C9C 3C030001 */ lui $v1, (0x10000 >> 16)
/* 1F0A0 80043CA0 00431024 */ and $v0, $v0, $v1
/* 1F0A4 80043CA4 10400004 */ beqz $v0, .L80043CB8
/* 1F0A8 80043CA8 3C032000 */ lui $v1, (0x20000000 >> 16)
/* 1F0AC 80043CAC 8E220000 */ lw $v0, 0x0($s1)
/* 1F0B0 80043CB0 00431025 */ or $v0, $v0, $v1
/* 1F0B4 80043CB4 AE220000 */ sw $v0, 0x0($s1)
.L80043CB8:
/* 1F0B8 80043CB8 8E020000 */ lw $v0, 0x0($s0)
/* 1F0BC 80043CBC 30420080 */ andi $v0, $v0, 0x80
/* 1F0C0 80043CC0 10400004 */ beqz $v0, .L80043CD4
/* 1F0C4 80043CC4 00000000 */ nop
/* 1F0C8 80043CC8 8E220000 */ lw $v0, 0x0($s1)
/* 1F0CC 80043CCC 34420400 */ ori $v0, $v0, 0x400
/* 1F0D0 80043CD0 AE220000 */ sw $v0, 0x0($s1)
.L80043CD4:
/* 1F0D4 80043CD4 8E030000 */ lw $v1, 0x0($s0)
/* 1F0D8 80043CD8 2402000B */ addiu $v0, $zero, 0xB
/* 1F0DC 80043CDC 30630001 */ andi $v1, $v1, 0x1
/* 1F0E0 80043CE0 10600003 */ beqz $v1, .L80043CF0
/* 1F0E4 80043CE4 A2020006 */ sb $v0, 0x6($s0)
/* 1F0E8 80043CE8 2402000A */ addiu $v0, $zero, 0xA
/* 1F0EC 80043CEC A2020006 */ sb $v0, 0x6($s0)
.L80043CF0:
/* 1F0F0 80043CF0 8EA40008 */ lw $a0, 0x8($s5)
/* 1F0F4 80043CF4 1080000C */ beqz $a0, .L80043D28
/* 1F0F8 80043CF8 2405000A */ addiu $a1, $zero, 0xA
/* 1F0FC 80043CFC 0C0B0CF8 */ jal start_script
/* 1F100 80043D00 0000302D */ daddu $a2, $zero, $zero
/* 1F104 80043D04 0040182D */ daddu $v1, $v0, $zero
/* 1F108 80043D08 AE03003C */ sw $v1, 0x3C($s0)
/* 1F10C 80043D0C 8C620144 */ lw $v0, 0x144($v1)
/* 1F110 80043D10 AE020054 */ sw $v0, 0x54($s0)
/* 1F114 80043D14 AC700148 */ sw $s0, 0x148($v1)
/* 1F118 80043D18 86020008 */ lh $v0, 0x8($s0)
/* 1F11C 80043D1C AC62014C */ sw $v0, 0x14C($v1)
/* 1F120 80043D20 92020006 */ lbu $v0, 0x6($s0)
/* 1F124 80043D24 A0620004 */ sb $v0, 0x4($v1)
.L80043D28:
/* 1F128 80043D28 265201F0 */ addiu $s2, $s2, 0x1F0
/* 1F12C 80043D2C 26F701F0 */ addiu $s7, $s7, 0x1F0
.L80043D30:
/* 1F130 80043D30 26730001 */ addiu $s3, $s3, 0x1
/* 1F134 80043D34 8FA70030 */ lw $a3, 0x30($sp)
/* 1F138 80043D38 8FA80024 */ lw $t0, 0x24($sp)
/* 1F13C 80043D3C 24E70004 */ addiu $a3, $a3, 0x4
/* 1F140 80043D40 0268102A */ slt $v0, $s3, $t0
/* 1F144 80043D44 1440FECD */ bnez $v0, .L8004387C
/* 1F148 80043D48 AFA70030 */ sw $a3, 0x30($sp)
.L80043D4C:
/* 1F14C 80043D4C 8FA70034 */ lw $a3, 0x34($sp)
/* 1F150 80043D50 8FA80020 */ lw $t0, 0x20($sp)
/* 1F154 80043D54 24E7000C */ addiu $a3, $a3, 0xC
/* 1F158 80043D58 AFA70034 */ sw $a3, 0x34($sp)
/* 1F15C 80043D5C 8FA7002C */ lw $a3, 0x2C($sp)
/* 1F160 80043D60 2508000C */ addiu $t0, $t0, 0xC
/* 1F164 80043D64 AFA80020 */ sw $t0, 0x20($sp)
/* 1F168 80043D68 8FA80024 */ lw $t0, 0x24($sp)
/* 1F16C 80043D6C 26D60001 */ addiu $s6, $s6, 0x1
/* 1F170 80043D70 00E83821 */ addu $a3, $a3, $t0
/* 1F174 80043D74 08010DFF */ j .L800437FC
/* 1F178 80043D78 AFA7002C */ sw $a3, 0x2C($sp)
.L80043D7C:
/* 1F17C 80043D7C 24020001 */ addiu $v0, $zero, 0x1
/* 1F180 80043D80 3C01800B */ lui $at, %hi(gCurrentEncounter + 0x1C)
/* 1F184 80043D84 A0360F2C */ sb $s6, %lo(gCurrentEncounter + 0x1C)($at)
/* 1F188 80043D88 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1F18C 80043D8C AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1F190 80043D90 08011044 */ j .L80044110
/* 1F194 80043D94 00000000 */ nop
.L80043D98:
/* 1F198 80043D98 0000A82D */ daddu $s5, $zero, $zero
/* 1F19C 80043D9C 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x1C)
/* 1F1A0 80043DA0 80420F2C */ lb $v0, %lo(gCurrentEncounter + 0x1C)($v0)
/* 1F1A4 80043DA4 1840001F */ blez $v0, .L80043E24
/* 1F1A8 80043DA8 02A0B02D */ daddu $s6, $s5, $zero
/* 1F1AC 80043DAC 3C12800B */ lui $s2, %hi(gCurrentEncounter)
/* 1F1B0 80043DB0 26520F10 */ addiu $s2, $s2, %lo(gCurrentEncounter)
.L80043DB4:
/* 1F1B4 80043DB4 8E540028 */ lw $s4, 0x28($s2)
/* 1F1B8 80043DB8 12800014 */ beqz $s4, .L80043E0C
/* 1F1BC 80043DBC 00000000 */ nop
/* 1F1C0 80043DC0 8E820000 */ lw $v0, 0x0($s4)
/* 1F1C4 80043DC4 18400011 */ blez $v0, .L80043E0C
/* 1F1C8 80043DC8 0000982D */ daddu $s3, $zero, $zero
/* 1F1CC 80043DCC 0280882D */ daddu $s1, $s4, $zero
.L80043DD0:
/* 1F1D0 80043DD0 8E300004 */ lw $s0, 0x4($s1)
/* 1F1D4 80043DD4 12000008 */ beqz $s0, .L80043DF8
/* 1F1D8 80043DD8 00000000 */ nop
/* 1F1DC 80043DDC 8E02003C */ lw $v0, 0x3C($s0)
/* 1F1E0 80043DE0 10400005 */ beqz $v0, .L80043DF8
/* 1F1E4 80043DE4 00000000 */ nop
/* 1F1E8 80043DE8 0C0B1059 */ jal does_script_exist
/* 1F1EC 80043DEC 8E040054 */ lw $a0, 0x54($s0)
/* 1F1F0 80043DF0 54400001 */ bnel $v0, $zero, .L80043DF8
/* 1F1F4 80043DF4 24150001 */ addiu $s5, $zero, 0x1
.L80043DF8:
/* 1F1F8 80043DF8 8E820000 */ lw $v0, 0x0($s4)
/* 1F1FC 80043DFC 26730001 */ addiu $s3, $s3, 0x1
/* 1F200 80043E00 0262102A */ slt $v0, $s3, $v0
/* 1F204 80043E04 1440FFF2 */ bnez $v0, .L80043DD0
/* 1F208 80043E08 26310004 */ addiu $s1, $s1, 0x4
.L80043E0C:
/* 1F20C 80043E0C 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x1C)
/* 1F210 80043E10 80420F2C */ lb $v0, %lo(gCurrentEncounter + 0x1C)($v0)
/* 1F214 80043E14 26D60001 */ addiu $s6, $s6, 0x1
/* 1F218 80043E18 02C2102A */ slt $v0, $s6, $v0
/* 1F21C 80043E1C 1440FFE5 */ bnez $v0, .L80043DB4
/* 1F220 80043E20 26520004 */ addiu $s2, $s2, 0x4
.L80043E24:
/* 1F224 80043E24 16A000BA */ bnez $s5, .L80044110
/* 1F228 80043E28 00000000 */ nop
/* 1F22C 80043E2C 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x1C)
/* 1F230 80043E30 80420F2C */ lb $v0, %lo(gCurrentEncounter + 0x1C)($v0)
/* 1F234 80043E34 18400026 */ blez $v0, .L80043ED0
/* 1F238 80043E38 0000B02D */ daddu $s6, $zero, $zero
/* 1F23C 80043E3C 3C12800B */ lui $s2, %hi(gCurrentEncounter)
/* 1F240 80043E40 26520F10 */ addiu $s2, $s2, %lo(gCurrentEncounter)
.L80043E44:
/* 1F244 80043E44 8E540028 */ lw $s4, 0x28($s2)
/* 1F248 80043E48 1280001B */ beqz $s4, .L80043EB8
/* 1F24C 80043E4C 00000000 */ nop
/* 1F250 80043E50 8E820000 */ lw $v0, 0x0($s4)
/* 1F254 80043E54 18400018 */ blez $v0, .L80043EB8
/* 1F258 80043E58 0000982D */ daddu $s3, $zero, $zero
/* 1F25C 80043E5C 0280882D */ daddu $s1, $s4, $zero
.L80043E60:
/* 1F260 80043E60 8E300004 */ lw $s0, 0x4($s1)
/* 1F264 80043E64 1200000F */ beqz $s0, .L80043EA4
/* 1F268 80043E68 00000000 */ nop
/* 1F26C 80043E6C 8E04001C */ lw $a0, 0x1C($s0)
/* 1F270 80043E70 1080000C */ beqz $a0, .L80043EA4
/* 1F274 80043E74 2405000A */ addiu $a1, $zero, 0xA
/* 1F278 80043E78 0C0B0CF8 */ jal start_script
/* 1F27C 80043E7C 0000302D */ daddu $a2, $zero, $zero
/* 1F280 80043E80 0040182D */ daddu $v1, $v0, $zero
/* 1F284 80043E84 AE030034 */ sw $v1, 0x34($s0)
/* 1F288 80043E88 8C620144 */ lw $v0, 0x144($v1)
/* 1F28C 80043E8C AE02004C */ sw $v0, 0x4C($s0)
/* 1F290 80043E90 AC700148 */ sw $s0, 0x148($v1)
/* 1F294 80043E94 86020008 */ lh $v0, 0x8($s0)
/* 1F298 80043E98 AC62014C */ sw $v0, 0x14C($v1)
/* 1F29C 80043E9C 92020006 */ lbu $v0, 0x6($s0)
/* 1F2A0 80043EA0 A0620004 */ sb $v0, 0x4($v1)
.L80043EA4:
/* 1F2A4 80043EA4 8E820000 */ lw $v0, 0x0($s4)
/* 1F2A8 80043EA8 26730001 */ addiu $s3, $s3, 0x1
/* 1F2AC 80043EAC 0262102A */ slt $v0, $s3, $v0
/* 1F2B0 80043EB0 1440FFEB */ bnez $v0, .L80043E60
/* 1F2B4 80043EB4 26310004 */ addiu $s1, $s1, 0x4
.L80043EB8:
/* 1F2B8 80043EB8 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x1C)
/* 1F2BC 80043EBC 80420F2C */ lb $v0, %lo(gCurrentEncounter + 0x1C)($v0)
/* 1F2C0 80043EC0 26D60001 */ addiu $s6, $s6, 0x1
/* 1F2C4 80043EC4 02C2102A */ slt $v0, $s6, $v0
/* 1F2C8 80043EC8 1440FFDE */ bnez $v0, .L80043E44
/* 1F2CC 80043ECC 26520004 */ addiu $s2, $s2, 0x4
.L80043ED0:
/* 1F2D0 80043ED0 24020002 */ addiu $v0, $zero, 0x2
/* 1F2D4 80043ED4 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1F2D8 80043ED8 AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at)
/* 1F2DC 80043EDC 08011044 */ j .L80044110
/* 1F2E0 80043EE0 00000000 */ nop
.L80043EE4:
/* 1F2E4 80043EE4 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x1C)
/* 1F2E8 80043EE8 80420F2C */ lb $v0, %lo(gCurrentEncounter + 0x1C)($v0)
/* 1F2EC 80043EEC 18400020 */ blez $v0, .L80043F70
/* 1F2F0 80043EF0 02A0B02D */ daddu $s6, $s5, $zero
/* 1F2F4 80043EF4 3C12800B */ lui $s2, %hi(gCurrentEncounter)
/* 1F2F8 80043EF8 26520F10 */ addiu $s2, $s2, %lo(gCurrentEncounter)
.L80043EFC:
/* 1F2FC 80043EFC 8E540028 */ lw $s4, 0x28($s2)
/* 1F300 80043F00 12800015 */ beqz $s4, .L80043F58
/* 1F304 80043F04 00000000 */ nop
/* 1F308 80043F08 8E820000 */ lw $v0, 0x0($s4)
/* 1F30C 80043F0C 18400012 */ blez $v0, .L80043F58
/* 1F310 80043F10 0000982D */ daddu $s3, $zero, $zero
/* 1F314 80043F14 0280882D */ daddu $s1, $s4, $zero
.L80043F18:
/* 1F318 80043F18 8E300004 */ lw $s0, 0x4($s1)
/* 1F31C 80043F1C 12000009 */ beqz $s0, .L80043F44
/* 1F320 80043F20 00000000 */ nop
/* 1F324 80043F24 8E020034 */ lw $v0, 0x34($s0)
/* 1F328 80043F28 10400006 */ beqz $v0, .L80043F44
/* 1F32C 80043F2C 00000000 */ nop
/* 1F330 80043F30 0C0B1059 */ jal does_script_exist
/* 1F334 80043F34 8E04004C */ lw $a0, 0x4C($s0)
/* 1F338 80043F38 50400002 */ beql $v0, $zero, .L80043F44
/* 1F33C 80043F3C AE000034 */ sw $zero, 0x34($s0)
/* 1F340 80043F40 24150001 */ addiu $s5, $zero, 0x1
.L80043F44:
/* 1F344 80043F44 8E820000 */ lw $v0, 0x0($s4)
/* 1F348 80043F48 26730001 */ addiu $s3, $s3, 0x1
/* 1F34C 80043F4C 0262102A */ slt $v0, $s3, $v0
/* 1F350 80043F50 1440FFF1 */ bnez $v0, .L80043F18
/* 1F354 80043F54 26310004 */ addiu $s1, $s1, 0x4
.L80043F58:
/* 1F358 80043F58 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x1C)
/* 1F35C 80043F5C 80420F2C */ lb $v0, %lo(gCurrentEncounter + 0x1C)($v0)
/* 1F360 80043F60 26D60001 */ addiu $s6, $s6, 0x1
/* 1F364 80043F64 02C2102A */ slt $v0, $s6, $v0
/* 1F368 80043F68 1440FFE4 */ bnez $v0, .L80043EFC
/* 1F36C 80043F6C 26520004 */ addiu $s2, $s2, 0x4
.L80043F70:
/* 1F370 80043F70 16A00067 */ bnez $s5, .L80044110
/* 1F374 80043F74 00000000 */ nop
/* 1F378 80043F78 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x1C)
/* 1F37C 80043F7C 80420F2C */ lb $v0, %lo(gCurrentEncounter + 0x1C)($v0)
/* 1F380 80043F80 1840002E */ blez $v0, .L8004403C
/* 1F384 80043F84 0000B02D */ daddu $s6, $zero, $zero
/* 1F388 80043F88 24150064 */ addiu $s5, $zero, 0x64
/* 1F38C 80043F8C 3C12800B */ lui $s2, %hi(gCurrentEncounter)
/* 1F390 80043F90 26520F10 */ addiu $s2, $s2, %lo(gCurrentEncounter)
.L80043F94:
/* 1F394 80043F94 8E540028 */ lw $s4, 0x28($s2)
/* 1F398 80043F98 12800020 */ beqz $s4, .L8004401C
/* 1F39C 80043F9C 00000000 */ nop
/* 1F3A0 80043FA0 8E820000 */ lw $v0, 0x0($s4)
/* 1F3A4 80043FA4 1840001D */ blez $v0, .L8004401C
/* 1F3A8 80043FA8 0000982D */ daddu $s3, $zero, $zero
/* 1F3AC 80043FAC 0280882D */ daddu $s1, $s4, $zero
.L80043FB0:
/* 1F3B0 80043FB0 8E300004 */ lw $s0, 0x4($s1)
/* 1F3B4 80043FB4 12000014 */ beqz $s0, .L80044008
/* 1F3B8 80043FB8 00000000 */ nop
/* 1F3BC 80043FBC 8E020000 */ lw $v0, 0x0($s0)
/* 1F3C0 80043FC0 30420020 */ andi $v0, $v0, 0x20
/* 1F3C4 80043FC4 14400010 */ bnez $v0, .L80044008
/* 1F3C8 80043FC8 00000000 */ nop
/* 1F3CC 80043FCC 8E040024 */ lw $a0, 0x24($s0)
/* 1F3D0 80043FD0 1080000D */ beqz $a0, .L80044008
/* 1F3D4 80043FD4 2405000A */ addiu $a1, $zero, 0xA
/* 1F3D8 80043FD8 0C0B0CF8 */ jal start_script
/* 1F3DC 80043FDC 0000302D */ daddu $a2, $zero, $zero
/* 1F3E0 80043FE0 0040182D */ daddu $v1, $v0, $zero
/* 1F3E4 80043FE4 AE03003C */ sw $v1, 0x3C($s0)
/* 1F3E8 80043FE8 8C620144 */ lw $v0, 0x144($v1)
/* 1F3EC 80043FEC AE1500C8 */ sw $s5, 0xC8($s0)
/* 1F3F0 80043FF0 AE020054 */ sw $v0, 0x54($s0)
/* 1F3F4 80043FF4 AC700148 */ sw $s0, 0x148($v1)
/* 1F3F8 80043FF8 86020008 */ lh $v0, 0x8($s0)
/* 1F3FC 80043FFC AC62014C */ sw $v0, 0x14C($v1)
/* 1F400 80044000 92020006 */ lbu $v0, 0x6($s0)
/* 1F404 80044004 A0620004 */ sb $v0, 0x4($v1)
.L80044008:
/* 1F408 80044008 8E820000 */ lw $v0, 0x0($s4)
/* 1F40C 8004400C 26730001 */ addiu $s3, $s3, 0x1
/* 1F410 80044010 0262102A */ slt $v0, $s3, $v0
/* 1F414 80044014 1440FFE6 */ bnez $v0, .L80043FB0
/* 1F418 80044018 26310004 */ addiu $s1, $s1, 0x4
.L8004401C:
/* 1F41C 8004401C 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x1C)
/* 1F420 80044020 80420F2C */ lb $v0, %lo(gCurrentEncounter + 0x1C)($v0)
/* 1F424 80044024 26D60001 */ addiu $s6, $s6, 0x1
/* 1F428 80044028 02C2102A */ slt $v0, $s6, $v0
/* 1F42C 8004402C 1440FFD9 */ bnez $v0, .L80043F94
/* 1F430 80044030 26520004 */ addiu $s2, $s2, 0x4
/* 1F434 80044034 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x1C)
/* 1F438 80044038 80420F2C */ lb $v0, %lo(gCurrentEncounter + 0x1C)($v0)
.L8004403C:
/* 1F43C 8004403C 1840002A */ blez $v0, .L800440E8
/* 1F440 80044040 0000B02D */ daddu $s6, $zero, $zero
/* 1F444 80044044 3C12800B */ lui $s2, %hi(gCurrentEncounter)
/* 1F448 80044048 26520F10 */ addiu $s2, $s2, %lo(gCurrentEncounter)
.L8004404C:
/* 1F44C 8004404C 8E540028 */ lw $s4, 0x28($s2)
/* 1F450 80044050 1280001F */ beqz $s4, .L800440D0
/* 1F454 80044054 00000000 */ nop
/* 1F458 80044058 8E820000 */ lw $v0, 0x0($s4)
/* 1F45C 8004405C 1840001C */ blez $v0, .L800440D0
/* 1F460 80044060 0000982D */ daddu $s3, $zero, $zero
/* 1F464 80044064 0280882D */ daddu $s1, $s4, $zero
.L80044068:
/* 1F468 80044068 8E300004 */ lw $s0, 0x4($s1)
/* 1F46C 8004406C 12000013 */ beqz $s0, .L800440BC
/* 1F470 80044070 00000000 */ nop
/* 1F474 80044074 8E020000 */ lw $v0, 0x0($s0)
/* 1F478 80044078 30420020 */ andi $v0, $v0, 0x20
/* 1F47C 8004407C 1440000F */ bnez $v0, .L800440BC
/* 1F480 80044080 00000000 */ nop
/* 1F484 80044084 8E04002C */ lw $a0, 0x2C($s0)
/* 1F488 80044088 1080000C */ beqz $a0, .L800440BC
/* 1F48C 8004408C 2405000A */ addiu $a1, $zero, 0xA
/* 1F490 80044090 0C0B0CF8 */ jal start_script
/* 1F494 80044094 0000302D */ daddu $a2, $zero, $zero
/* 1F498 80044098 0040182D */ daddu $v1, $v0, $zero
/* 1F49C 8004409C AE030044 */ sw $v1, 0x44($s0)
/* 1F4A0 800440A0 8C620144 */ lw $v0, 0x144($v1)
/* 1F4A4 800440A4 AE02005C */ sw $v0, 0x5C($s0)
/* 1F4A8 800440A8 AC700148 */ sw $s0, 0x148($v1)
/* 1F4AC 800440AC 86020008 */ lh $v0, 0x8($s0)
/* 1F4B0 800440B0 AC62014C */ sw $v0, 0x14C($v1)
/* 1F4B4 800440B4 92020006 */ lbu $v0, 0x6($s0)
/* 1F4B8 800440B8 A0620004 */ sb $v0, 0x4($v1)
.L800440BC:
/* 1F4BC 800440BC 8E820000 */ lw $v0, 0x0($s4)
/* 1F4C0 800440C0 26730001 */ addiu $s3, $s3, 0x1
/* 1F4C4 800440C4 0262102A */ slt $v0, $s3, $v0
/* 1F4C8 800440C8 1440FFE7 */ bnez $v0, .L80044068
/* 1F4CC 800440CC 26310004 */ addiu $s1, $s1, 0x4
.L800440D0:
/* 1F4D0 800440D0 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x1C)
/* 1F4D4 800440D4 80420F2C */ lb $v0, %lo(gCurrentEncounter + 0x1C)($v0)
/* 1F4D8 800440D8 26D60001 */ addiu $s6, $s6, 0x1
/* 1F4DC 800440DC 02C2102A */ slt $v0, $s6, $v0
/* 1F4E0 800440E0 1440FFDA */ bnez $v0, .L8004404C
/* 1F4E4 800440E4 26520004 */ addiu $s2, $s2, 0x4
.L800440E8:
/* 1F4E8 800440E8 0C0B1192 */ jal resume_all_group
/* 1F4EC 800440EC 24040010 */ addiu $a0, $zero, 0x10
/* 1F4F0 800440F0 24020002 */ addiu $v0, $zero, 0x2
/* 1F4F4 800440F4 3C01800A */ lui $at, %hi(gEncounterState)
/* 1F4F8 800440F8 AC22A600 */ sw $v0, %lo(gEncounterState)($at)
/* 1F4FC 800440FC 24020001 */ addiu $v0, $zero, 0x1
/* 1F500 80044100 3C01800A */ lui $at, %hi(D_8009A678)
/* 1F504 80044104 AC22A678 */ sw $v0, %lo(D_8009A678)($at)
/* 1F508 80044108 3C01800A */ lui $at, %hi(gEncounterSubState)
/* 1F50C 8004410C AC20A5D0 */ sw $zero, %lo(gEncounterSubState)($at)
.L80044110:
/* 1F510 80044110 8FBF005C */ lw $ra, 0x5C($sp)
/* 1F514 80044114 8FBE0058 */ lw $fp, 0x58($sp)
/* 1F518 80044118 8FB70054 */ lw $s7, 0x54($sp)
/* 1F51C 8004411C 8FB60050 */ lw $s6, 0x50($sp)
/* 1F520 80044120 8FB5004C */ lw $s5, 0x4C($sp)
/* 1F524 80044124 8FB40048 */ lw $s4, 0x48($sp)
/* 1F528 80044128 8FB30044 */ lw $s3, 0x44($sp)
/* 1F52C 8004412C 8FB20040 */ lw $s2, 0x40($sp)
/* 1F530 80044130 8FB1003C */ lw $s1, 0x3C($sp)
/* 1F534 80044134 8FB00038 */ lw $s0, 0x38($sp)
/* 1F538 80044138 03E00008 */ jr $ra
/* 1F53C 8004413C 27BD0060 */ addiu $sp, $sp, 0x60
### DECOMPILED C INSTRUCTIONS:
void create_encounters(void) {
EncounterStatus* currentEncounter = &gCurrentEncounter;
NpcBlueprint sp10;
NpcBlueprint* bp = &sp10;
NpcGroup* groupList = (NpcGroup*)(currentEncounter->npcGroupList);
s32 groupNpcCount;
s32 mapID = currentEncounter->mapID;
Npc* newNpc;
s32 newNpcIndex;
s32 npcCount;
NpcSettings* npcSettings;
NpcData* npcData;
Enemy* enemy;
Encounter* encounter;
Evt* script;
s32 totalNpcCount;
s32 cond1;
s32 cond2;
s32 i;
s32 k;
s32 e;
switch (gEncounterSubState) {
case ENCOUNTER_SUBSTATE_CREATE_INIT:
if (currentEncounter->resetMapEncounterFlags != 1) {
// check for current map among most recently visited
for (i = 0; i < ARRAY_COUNT(currentEncounter->recentMaps); i++) {
if (currentEncounter->recentMaps[i] == mapID) {
break;
}
}
// current map not found in recent: reset all defeat flags
if (i >= ARRAY_COUNT(currentEncounter->recentMaps)) {
for (k = 0; k < ARRAY_COUNT(currentEncounter->defeatFlags[mapID]); k++) {
currentEncounter->defeatFlags[mapID][k] = FALSE;
}
}
// add current map to recent maps, pushing out the least recent
for (i = 0; i < ARRAY_COUNT(currentEncounter->recentMaps) - 1; i++) {
currentEncounter->recentMaps[i] = currentEncounter->recentMaps[i + 1];
}
currentEncounter->recentMaps[i] = mapID;
}
e = 0;
totalNpcCount = 0;
while (TRUE) {
if (groupList->npcCount == 0) {
break;
}
npcData = groupList->npcs;
groupNpcCount = groupList->npcCount;
encounter = heap_malloc(sizeof(*encounter));
currentEncounter->encounterList[e] = encounter;
ASSERT(encounter != NULL);
encounter->count = groupNpcCount;
encounter->battle = groupList->battle;
encounter->stage = groupList->stage - 1;
encounter->encounterID = totalNpcCount;
for (i = 0; i < groupNpcCount; i++) {
if (get_defeated(mapID, encounter->encounterID + i)) {
npcData++;
encounter->enemy[i] = NULL;
continue;
}
enemy = encounter->enemy[i] = heap_malloc(sizeof(*enemy));
ASSERT (enemy != NULL);
for (k = 0; k < ARRAY_COUNT(enemy->varTable); k++) {
enemy->varTable[k] = 0;
}
enemy->encounterIndex = e;
enemy->npcID = npcData->id;
npcSettings = enemy->npcSettings = npcData->settings;
enemy->drops = &npcData->drops;
if ((*(s16*)(&npcData->drops) & 0xFF00) != 0x8000) { //TODO s16?
enemy->drops = &DefaultEnemyDrops;
}
enemy->encountered = 0;
if ((s32) npcData->init < EVT_LIMIT) {
enemy->initBytecode = npcData->init;
} else {
enemy->initBytecode = NULL;
}
enemy->interactBytecode = npcSettings->onInteract;
enemy->aiBytecode = npcSettings->ai;
enemy->hitBytecode = npcSettings->onHit;
enemy->auxBytecode = npcSettings->aux;
enemy->defeatBytecode = npcSettings->onDefeat;
enemy->initScript = NULL;
enemy->interactScript = NULL;
enemy->aiScript = NULL;
enemy->hitScript = NULL;
enemy->auxScript = NULL;
enemy->defeatScript = NULL;
enemy->interactScriptID = 0;
enemy->aiScriptID = 0;
enemy->hitScriptID = 0;
enemy->auxScriptID = 0;
enemy->defeatScriptID = 0;
enemy->hitboxIsActive = FALSE;
enemy->instigatorValue = 0;
enemy->aiDetectFlags = npcData->aiDetectFlags;
enemy->aiFlags = npcData->aiFlags;
enemy->unk_DC = 0;
enemy->aiSuspendTime = 0;
enemy->unk_B8 = (EvtScript*)npcSettings->unk_24; // ??
enemy->unk_BC = NULL;
enemy->unk_C0 = 0;
enemy->unk_C4 = 0;
enemy->animList = (s32*)&npcData->animations;
enemy->territory = &npcData->territory;
enemy->flags = npcSettings->flags;
enemy->flags |= npcData->flags;
enemy->unk_64 = NULL;
enemy->tattleMsg = npcData->tattle;
if (npcData->initVarCount != 0) {
if (npcData->initVarCount == 1) {
enemy->varTable[0] = npcData->initVar.value;
} else {
s32* initialVars = npcData->initVar.array;
for (k = 0; k < npcData->initVarCount; k++) {
enemy->varTable[k] = *initialVars++;
}
}
}
// create the new NPC
bp->flags = 0;
if (npcSettings->defaultAnim == 0) {
bp->initialAnim = enemy->animList[0];
} else {
bp->initialAnim = npcSettings->defaultAnim;
}
bp->onUpdate = NULL;
bp->onRender = NULL;
if (!(enemy->flags & ENEMY_FLAG_USE_PLAYER_SPRITE)) {
newNpcIndex = create_standard_npc(bp, npcData->extraAnimations);
} else {
newNpcIndex = create_peach_npc(bp);
}
newNpc = get_npc_by_index(newNpcIndex);
newNpc->npcID = npcData->id;
newNpc->collisionDiameter = npcSettings->radius;
newNpc->collisionHeight = npcSettings->height;
enemy->spawnPos[0] = newNpc->pos.x = npcData->pos.x;
enemy->spawnPos[1] = newNpc->pos.y = npcData->pos.y;
enemy->spawnPos[2] = newNpc->pos.z = npcData->pos.z;
newNpc->unk_96 = 0;
newNpc->planarFlyDist = 0.0f;
newNpc->homePos.x = newNpc->pos.x;
newNpc->homePos.y = newNpc->pos.y;
newNpc->homePos.z = newNpc->pos.z;
set_npc_yaw(newNpc, npcData->yaw);
enemy->savedNpcYaw = 12345;
if (newNpc->collisionDiameter >= 24.0) {
newNpc->shadowScale = newNpc->collisionDiameter / 24.0;
} else {
newNpc->shadowScale = 1.0f;
}
if (enemy->flags & ENEMY_FLAG_IGNORE_WORLD_COLLISION) {
newNpc->flags |= NPC_FLAG_IGNORE_WORLD_COLLISION;
}
if (enemy->flags & ENEMY_FLAG_IGNORE_PLAYER_COLLISION) {
newNpc->flags |= NPC_FLAG_IGNORE_PLAYER_COLLISION;
}
if (enemy->flags & ENEMY_FLAG_IGNORE_ENTITY_COLLISION) {
newNpc->flags |= NPC_FLAG_IGNORE_ENTITY_COLLISION;
}
if (enemy->flags & ENEMY_FLAG_800) {
newNpc->flags |= NPC_FLAG_8;
}
if (enemy->flags & ENEMY_FLAG_GRAVITY) {
newNpc->flags |= NPC_FLAG_GRAVITY;
}
if (!(enemy->flags & ENEMY_FLAG_PASSIVE)) {
newNpc->flags |= NPC_FLAG_IGNORE_PLAYER_COLLISION;
}
if (enemy->flags & ENEMY_FLAG_HAS_NO_SPRITE) {
newNpc->flags |= NPC_FLAG_HAS_NO_SPRITE;
}
if (enemy->flags & ENEMY_FLAG_NO_SHADOW_RAYCAST) {
newNpc->flags |= NPC_FLAG_NO_SHADOW_RAYCAST;
}
if (enemy->flags & ENEMY_FLAG_8000) {
newNpc->flags |= NPC_FLAG_10000000;
}
if (enemy->flags & ENEMY_FLAG_10000) {
newNpc->flags |= NPC_FLAG_20000000;
}
if (enemy->flags & ENEMY_FLAG_DONT_UPDATE_SHADOW_Y) {
newNpc->flags |= NPC_FLAG_DONT_UPDATE_SHADOW_Y;
}
enemy->scriptGroup = EVT_GROUP_0B;
if (enemy->flags & ENEMY_FLAG_PASSIVE) {
enemy->scriptGroup = EVT_GROUP_0A;
}
if (npcSettings->otherAI != NULL) {
script = start_script(npcSettings->otherAI, EVT_PRIORITY_A, 0);
enemy->aiScript = script;
enemy->aiScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
}
npcData++;
}
groupList++;
e++;
totalNpcCount += groupNpcCount;
}
currentEncounter->numEncounters = e;
gEncounterSubState = ENCOUNTER_SUBSTATE_CREATE_RUN_INIT_SCRIPT;
break;
case ENCOUNTER_SUBSTATE_CREATE_RUN_INIT_SCRIPT:
cond2 = FALSE;
for (e = 0; e < currentEncounter->numEncounters; e++) {
encounter = currentEncounter->encounterList[e];
if (encounter == NULL) {
continue;
}
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if (enemy->aiScript != NULL) {
if (does_script_exist(enemy->aiScriptID)) {
cond2 = TRUE;
}
}
}
}
if (!cond2) {
for (e = 0; e < currentEncounter->numEncounters; e++) {
encounter = currentEncounter->encounterList[e];
if (encounter == NULL) {
continue;
}
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if (enemy->initBytecode != NULL) {
script = start_script(enemy->initBytecode, EVT_PRIORITY_A, 0);
enemy->initScript = script;
enemy->initScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
}
}
}
gEncounterSubState = ENCOUNTER_SUBSTATE_CREATE_RUN_AI;
}
break;
case ENCOUNTER_SUBSTATE_CREATE_RUN_AI:
cond1 = FALSE;
for (e = 0; e < currentEncounter->numEncounters; e++) {
encounter = currentEncounter->encounterList[e];
if (encounter == NULL) {
continue;
}
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if (enemy->initScript != NULL) {
if (does_script_exist(enemy->initScriptID)) {
cond1 = TRUE;
} else {
enemy->initScript = NULL;
}
}
}
}
if (cond1) {
break;
}
for (e = 0; e < currentEncounter->numEncounters; e++) {
encounter = currentEncounter->encounterList[e];
if (encounter == NULL) {
continue;
}
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if (!(enemy->flags & ENEMY_FLAG_DISABLE_AI)) {
if (enemy->aiBytecode != NULL) {
script = start_script(enemy->aiBytecode, EVT_PRIORITY_A, 0);
enemy->aiScript = script;
enemy->aiScriptID = script->id;
enemy->unk_C8 = 100;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
}
}
}
}
for (e = 0; e < currentEncounter->numEncounters; e++) {
encounter = currentEncounter->encounterList[e];
if (encounter == NULL) {
continue;
}
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy == NULL) {
continue;
}
if (!(enemy->flags & ENEMY_FLAG_DISABLE_AI)) {
if (enemy->auxBytecode != NULL) {
script = start_script(enemy->auxBytecode, EVT_PRIORITY_A, 0);
enemy->auxScript = script;
enemy->auxScriptID = script->id;
script->owner1.enemy = enemy;
script->owner2.npcID = enemy->npcID;
script->groupFlags = enemy->scriptGroup;
}
}
}
}
resume_all_group(EVT_GROUP_10);
gEncounterState = ENCOUNTER_STATE_NEUTRAL;
D_8009A678 = 1;
gEncounterSubState = ENCOUNTER_SUBSTATE_NEUTRAL;
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel D_80245AD0
/* 1743B0 80245AD0 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 1743B4 80245AD4 AFB40020 */ sw $s4, 0x20($sp)
D_80245AD8:
/* 1743B8 80245AD8 3C14800E */ lui $s4, %hi(gBattleStatus)
/* 1743BC 80245ADC 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
jtbl_80245AE0:
/* 1743C0 80245AE0 AFBF0028 */ sw $ra, 0x28($sp)
.L80245AE4:
/* 1743C4 80245AE4 AFB50024 */ sw $s5, 0x24($sp)
D_80245AE8:
/* 1743C8 80245AE8 AFB3001C */ sw $s3, 0x1C($sp)
D_80245AEC:
/* 1743CC 80245AEC AFB20018 */ sw $s2, 0x18($sp)
/* 1743D0 80245AF0 AFB10014 */ sw $s1, 0x14($sp)
/* 1743D4 80245AF4 AFB00010 */ sw $s0, 0x10($sp)
D_80245AF8:
/* 1743D8 80245AF8 8E9500D8 */ lw $s5, 0xD8($s4)
/* 1743DC 80245AFC 3C02800E */ lui $v0, %hi(gBattleSubState)
/* 1743E0 80245B00 8C42C4DC */ lw $v0, %lo(gBattleSubState)($v0)
.L80245B04:
/* 1743E4 80245B04 8E9200DC */ lw $s2, 0xDC($s4)
/* 1743E8 80245B08 14400068 */ bnez $v0, .L80245CAC
/* 1743EC 80245B0C 2402007F */ addiu $v0, $zero, 0x7F
jtbl_80245B10:
/* 1743F0 80245B10 A2820086 */ sb $v0, 0x86($s4)
D_80245B14:
/* 1743F4 80245B14 A2820087 */ sb $v0, 0x87($s4)
/* 1743F8 80245B18 8E820000 */ lw $v0, 0x0($s4)
/* 1743FC 80245B1C 2403EFFF */ addiu $v1, $zero, -0x1001
D_80245B20:
/* 174400 80245B20 A280008C */ sb $zero, 0x8C($s4)
/* 174404 80245B24 A6800180 */ sh $zero, 0x180($s4)
D_80245B28:
/* 174408 80245B28 A280019A */ sb $zero, 0x19A($s4)
/* 17440C 80245B2C 00431024 */ and $v0, $v0, $v1
D_80245B30:
/* 174410 80245B30 2403FFFD */ addiu $v1, $zero, -0x3
D_80245B34:
/* 174414 80245B34 00431024 */ and $v0, $v0, $v1
D_80245B38:
/* 174418 80245B38 0C098F18 */ jal reset_actor_turn_info
/* 17441C 80245B3C AE820000 */ sw $v0, 0x0($s4)
D_80245B40:
/* 174420 80245B40 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16)
/* 174424 80245B44 8EA20000 */ lw $v0, 0x0($s5)
jtbl_80245B48:
/* 174428 80245B48 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF)
/* 17442C 80245B4C 00431024 */ and $v0, $v0, $v1
/* 174430 80245B50 12400004 */ beqz $s2, .L80245B64
/* 174434 80245B54 AEA20000 */ sw $v0, 0x0($s5)
/* 174438 80245B58 8E420000 */ lw $v0, 0x0($s2)
/* 17443C 80245B5C 00431024 */ and $v0, $v0, $v1
/* 174440 80245B60 AE420000 */ sw $v0, 0x0($s2)
.L80245B64:
/* 174444 80245B64 0C09390F */ jal func_8024E43C
/* 174448 80245B68 0000202D */ daddu $a0, $zero, $zero
D_80245B6C:
/* 17444C 80245B6C 3C04FFDF */ lui $a0, (0xFFDFFFFF >> 16)
.L80245B70:
/* 174450 80245B70 3484FFFF */ ori $a0, $a0, (0xFFDFFFFF & 0xFFFF)
/* 174454 80245B74 0000882D */ daddu $s1, $zero, $zero
/* 174458 80245B78 0280282D */ daddu $a1, $s4, $zero
/* 17445C 80245B7C 8E820000 */ lw $v0, 0x0($s4)
/* 174460 80245B80 2403FFF7 */ addiu $v1, $zero, -0x9
/* 174464 80245B84 00431024 */ and $v0, $v0, $v1
/* 174468 80245B88 AE820000 */ sw $v0, 0x0($s4)
/* 17446C 80245B8C A2A0021C */ sb $zero, 0x21C($s5)
D_80245B90:
/* 174470 80245B90 8E820004 */ lw $v0, 0x4($s4)
/* 174474 80245B94 8E830000 */ lw $v1, 0x0($s4)
D_80245B98:
/* 174478 80245B98 34420008 */ ori $v0, $v0, 0x8
/* 17447C 80245B9C 00641824 */ and $v1, $v1, $a0
D_80245BA0:
/* 174480 80245BA0 AE820004 */ sw $v0, 0x4($s4)
.L80245BA4:
/* 174484 80245BA4 AE830000 */ sw $v1, 0x0($s4)
jtbl_80245BA8:
/* 174488 80245BA8 8CB000E0 */ lw $s0, 0xE0($a1)
.L80245BAC:
/* 17448C 80245BAC 56000001 */ bnel $s0, $zero, .L80245BB4
/* 174490 80245BB0 A200021C */ sb $zero, 0x21C($s0)
.L80245BB4:
/* 174494 80245BB4 26310001 */ addiu $s1, $s1, 0x1
/* 174498 80245BB8 2A220018 */ slti $v0, $s1, 0x18
/* 17449C 80245BBC 1440FFFA */ bnez $v0, jtbl_80245BA8
D_80245BC0:
/* 1744A0 80245BC0 24A50004 */ addiu $a1, $a1, 0x4
D_80245BC4:
/* 1744A4 80245BC4 0000882D */ daddu $s1, $zero, $zero
/* 1744A8 80245BC8 3C05FFF7 */ lui $a1, (0xFFF7FFFF >> 16)
glabel func_80245BCC
/* 1744AC 80245BCC 34A5FFFF */ ori $a1, $a1, (0xFFF7FFFF & 0xFFFF)
D_80245BD0:
/* 1744B0 80245BD0 3C04F7FF */ lui $a0, (0xF7FFFFFF >> 16)
/* 1744B4 80245BD4 3484FFFF */ ori $a0, $a0, (0xF7FFFFFF & 0xFFFF)
jtbl_80245BD8:
/* 1744B8 80245BD8 0280182D */ daddu $v1, $s4, $zero
.L80245BDC:
/* 1744BC 80245BDC 8C7000E0 */ lw $s0, 0xE0($v1)
/* 1744C0 80245BE0 12000005 */ beqz $s0, .L80245BF8
.L80245BE4:
/* 1744C4 80245BE4 26310001 */ addiu $s1, $s1, 0x1
/* 1744C8 80245BE8 8E020000 */ lw $v0, 0x0($s0)
/* 1744CC 80245BEC 00451024 */ and $v0, $v0, $a1
D_80245BF0:
/* 1744D0 80245BF0 00441024 */ and $v0, $v0, $a0
D_80245BF4:
/* 1744D4 80245BF4 AE020000 */ sw $v0, 0x0($s0)
.L80245BF8:
/* 1744D8 80245BF8 2A220018 */ slti $v0, $s1, 0x18
/* 1744DC 80245BFC 1440FFF7 */ bnez $v0, .L80245BDC
/* 1744E0 80245C00 24630004 */ addiu $v1, $v1, 0x4
D_80245C04:
/* 1744E4 80245C04 92820178 */ lbu $v0, 0x178($s4)
.L80245C08:
/* 1744E8 80245C08 2C420002 */ sltiu $v0, $v0, 0x2
/* 1744EC 80245C0C 1040001E */ beqz $v0, .L80245C88
glabel .L80245C10
/* 1744F0 80245C10 24020001 */ addiu $v0, $zero, 0x1
/* 1744F4 80245C14 8290008A */ lb $s0, 0x8A($s4)
.L80245C18:
/* 1744F8 80245C18 1602001C */ bne $s0, $v0, .L80245C8C
D_80245C1C:
/* 1744FC 80245C1C 24020003 */ addiu $v0, $zero, 0x3
/* 174500 80245C20 3C048028 */ lui $a0, %hi(EVS_Mario_HandlePhase)
/* 174504 80245C24 24844EBC */ addiu $a0, $a0, %lo(EVS_Mario_HandlePhase)
/* 174508 80245C28 2405000A */ addiu $a1, $zero, 0xA
/* 17450C 80245C2C 0000302D */ daddu $a2, $zero, $zero
D_80245C30:
/* 174510 80245C30 24020003 */ addiu $v0, $zero, 0x3
/* 174514 80245C34 A28200AC */ sb $v0, 0xAC($s4)
glabel .L80245C38
/* 174518 80245C38 24020014 */ addiu $v0, $zero, 0x14
D_80245C3C:
/* 17451C 80245C3C A280008A */ sb $zero, 0x8A($s4)
.L80245C40:
/* 174520 80245C40 0C0B0CF8 */ jal start_script
/* 174524 80245C44 A28201A7 */ sb $v0, 0x1A7($s4)
D_80245C48:
/* 174528 80245C48 0040202D */ daddu $a0, $v0, $zero
/* 17452C 80245C4C AEA401D4 */ sw $a0, 0x1D4($s5)
/* 174530 80245C50 8C820144 */ lw $v0, 0x144($a0)
/* 174534 80245C54 AEA201E4 */ sw $v0, 0x1E4($s5)
.L80245C58:
/* 174538 80245C58 AC800148 */ sw $zero, 0x148($a0)
/* 17453C 80245C5C 3C04800E */ lui $a0, %hi(gBattleStatus)
.L80245C60:
/* 174540 80245C60 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 174544 80245C64 8C820000 */ lw $v0, 0x0($a0)
/* 174548 80245C68 3C030001 */ lui $v1, (0x10000 >> 16)
.L80245C6C:
/* 17454C 80245C6C 00431025 */ or $v0, $v0, $v1
jtbl_80245C70:
/* 174550 80245C70 0C093EC3 */ jal func_8024FB0C
D_80245C74:
/* 174554 80245C74 AC820000 */ sw $v0, 0x0($a0)
D_80245C78:
/* 174558 80245C78 3C01800E */ lui $at, %hi(gBattleSubState)
/* 17455C 80245C7C AC30C4DC */ sw $s0, %lo(gBattleSubState)($at)
glabel func_80245C80
/* 174560 80245C80 0809172B */ j .L80245CAC
/* 174564 80245C84 00000000 */ nop
.L80245C88:
/* 174568 80245C88 24020003 */ addiu $v0, $zero, 0x3
.L80245C8C:
/* 17456C 80245C8C 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 174570 80245C90 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 174574 80245C94 3C01800E */ lui $at, %hi(gBattleSubState)
/* 174578 80245C98 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
D_80245C9C:
/* 17457C 80245C9C 8C820000 */ lw $v0, 0x0($a0)
D_80245CA0:
/* 174580 80245CA0 2403FFFD */ addiu $v1, $zero, -0x3
/* 174584 80245CA4 00431024 */ and $v0, $v0, $v1
/* 174588 80245CA8 AC820000 */ sw $v0, 0x0($a0)
.L80245CAC:
/* 17458C 80245CAC 3C04800E */ lui $a0, %hi(gBattleSubState)
/* 174590 80245CB0 2484C4DC */ addiu $a0, $a0, %lo(gBattleSubState)
D_80245CB4:
/* 174594 80245CB4 8C830000 */ lw $v1, 0x0($a0)
/* 174598 80245CB8 24020001 */ addiu $v0, $zero, 0x1
/* 17459C 80245CBC 10620005 */ beq $v1, $v0, .L80245CD4
/* 1745A0 80245CC0 24020002 */ addiu $v0, $zero, 0x2
/* 1745A4 80245CC4 10620023 */ beq $v1, $v0, .L80245D54
/* 1745A8 80245CC8 00000000 */ nop
.L80245CCC:
/* 1745AC 80245CCC 0809175E */ j D_80245D78
/* 1745B0 80245CD0 00000000 */ nop
.L80245CD4:
/* 1745B4 80245CD4 8EA201D4 */ lw $v0, 0x1D4($s5)
D_80245CD8:
/* 1745B8 80245CD8 50400007 */ beql $v0, $zero, jtbl_80245CF8
/* 1745BC 80245CDC AEA001D4 */ sw $zero, 0x1D4($s5)
jtbl_80245CE0:
/* 1745C0 80245CE0 8EA401E4 */ lw $a0, 0x1E4($s5)
/* 1745C4 80245CE4 0C0B1059 */ jal does_script_exist
/* 1745C8 80245CE8 00000000 */ nop
D_80245CEC:
/* 1745CC 80245CEC 14400022 */ bnez $v0, D_80245D78
D_80245CF0:
/* 1745D0 80245CF0 00000000 */ nop
glabel func_80245CF4
/* 1745D4 80245CF4 AEA001D4 */ sw $zero, 0x1D4($s5)
jtbl_80245CF8:
/* 1745D8 80245CF8 0C03A752 */ jal is_ability_active
/* 1745DC 80245CFC 24040015 */ addiu $a0, $zero, 0x15
/* 1745E0 80245D00 1440000E */ bnez $v0, .L80245D3C
.L80245D04:
/* 1745E4 80245D04 24020002 */ addiu $v0, $zero, 0x2
/* 1745E8 80245D08 8683017C */ lh $v1, 0x17C($s4)
D_80245D0C:
/* 1745EC 80245D0C 1060000A */ beqz $v1, D_80245D38
/* 1745F0 80245D10 00031080 */ sll $v0, $v1, 2
/* 1745F4 80245D14 00431021 */ addu $v0, $v0, $v1
/* 1745F8 80245D18 00021080 */ sll $v0, $v0, 2
.L80245D1C:
/* 1745FC 80245D1C 3C048009 */ lui $a0, %hi(D_8008F073)
/* 174600 80245D20 00822021 */ addu $a0, $a0, $v0
D_80245D24:
/* 174604 80245D24 8084F073 */ lb $a0, %lo(D_8008F073)($a0)
D_80245D28:
/* 174608 80245D28 04800003 */ bltz $a0, D_80245D38
/* 17460C 80245D2C 2484002E */ addiu $a0, $a0, 0x2E
D_80245D30:
/* 174610 80245D30 0C093E58 */ jal func_8024F960
D_80245D34:
/* 174614 80245D34 2405003C */ addiu $a1, $zero, 0x3C
D_80245D38:
/* 174618 80245D38 24020002 */ addiu $v0, $zero, 0x2
.L80245D3C:
/* 17461C 80245D3C 3C01802A */ lui $at, %hi(D_8029F248)
D_80245D40:
/* 174620 80245D40 AC22F248 */ sw $v0, %lo(D_8029F248)($at)
/* 174624 80245D44 3C01800E */ lui $at, %hi(gBattleSubState)
D_80245D48:
/* 174628 80245D48 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 17462C 80245D4C 0809175E */ j D_80245D78
D_80245D50:
/* 174630 80245D50 00000000 */ nop
.L80245D54:
/* 174634 80245D54 3C03802A */ lui $v1, %hi(D_8029F248)
D_80245D58:
/* 174638 80245D58 2463F248 */ addiu $v1, $v1, %lo(D_8029F248)
.L80245D5C:
/* 17463C 80245D5C 8C620000 */ lw $v0, 0x0($v1)
D_80245D60:
/* 174640 80245D60 10400003 */ beqz $v0, D_80245D70
/* 174644 80245D64 2442FFFF */ addiu $v0, $v0, -0x1
jtbl_80245D68:
/* 174648 80245D68 0809175E */ j D_80245D78
glabel func_80245D6C
/* 17464C 80245D6C AC620000 */ sw $v0, 0x0($v1)
D_80245D70:
/* 174650 80245D70 24020003 */ addiu $v0, $zero, 0x3
/* 174654 80245D74 AC820000 */ sw $v0, 0x0($a0)
D_80245D78:
/* 174658 80245D78 3C10800E */ lui $s0, %hi(gBattleSubState)
/* 17465C 80245D7C 2610C4DC */ addiu $s0, $s0, %lo(gBattleSubState)
D_80245D80:
/* 174660 80245D80 8E030000 */ lw $v1, 0x0($s0)
/* 174664 80245D84 24020004 */ addiu $v0, $zero, 0x4
D_80245D88:
/* 174668 80245D88 10620031 */ beq $v1, $v0, .L80245E50
/* 17466C 80245D8C 28620005 */ slti $v0, $v1, 0x5
D_80245D90:
/* 174670 80245D90 10400005 */ beqz $v0, .L80245DA8
.L80245D94:
/* 174674 80245D94 24020003 */ addiu $v0, $zero, 0x3
D_80245D98:
/* 174678 80245D98 1062000A */ beq $v1, $v0, .L80245DC4
/* 17467C 80245D9C 24020015 */ addiu $v0, $zero, 0x15
jtbl_80245DA0:
/* 174680 80245DA0 080918A6 */ j .L80246298
/* 174684 80245DA4 00000000 */ nop
.L80245DA8:
/* 174688 80245DA8 2402000B */ addiu $v0, $zero, 0xB
/* 17468C 80245DAC 10620120 */ beq $v1, $v0, .L80246230
D_80245DB0:
/* 174690 80245DB0 2402000C */ addiu $v0, $zero, 0xC
/* 174694 80245DB4 1062012B */ beq $v1, $v0, D_80246264
/* 174698 80245DB8 00000000 */ nop
/* 17469C 80245DBC 080918A2 */ j jtbl_80246288
D_80245DC0:
/* 1746A0 80245DC0 00000000 */ nop
.L80245DC4:
/* 1746A4 80245DC4 3C04FFFE */ lui $a0, (0xFFFEFFFF >> 16)
/* 1746A8 80245DC8 3484FFFF */ ori $a0, $a0, (0xFFFEFFFF & 0xFFFF)
/* 1746AC 80245DCC 3C10800E */ lui $s0, %hi(gBattleStatus)
glabel .L80245DD0
/* 1746B0 80245DD0 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
D_80245DD4:
/* 1746B4 80245DD4 8E020000 */ lw $v0, 0x0($s0)
/* 1746B8 80245DD8 2403BFFF */ addiu $v1, $zero, -0x4001
/* 1746BC 80245DDC 00431024 */ and $v0, $v0, $v1
D_80245DE0:
/* 1746C0 80245DE0 00441024 */ and $v0, $v0, $a0
D_80245DE4:
/* 1746C4 80245DE4 0C03A6D5 */ jal increment_status_bar_disabled
/* 1746C8 80245DE8 AE020000 */ sw $v0, 0x0($s0)
/* 1746CC 80245DEC 8E020000 */ lw $v0, 0x0($s0)
/* 1746D0 80245DF0 02A0202D */ daddu $a0, $s5, $zero
/* 1746D4 80245DF4 34420100 */ ori $v0, $v0, 0x100
.L80245DF8:
/* 1746D8 80245DF8 0C099EA7 */ jal reset_all_actor_sounds
/* 1746DC 80245DFC AE020000 */ sw $v0, 0x0($s0)
D_80245E00:
/* 1746E0 80245E00 8E020004 */ lw $v0, 0x4($s0)
/* 1746E4 80245E04 30420040 */ andi $v0, $v0, 0x40
/* 1746E8 80245E08 3C048028 */ lui $a0, %hi(EVS_Mario_HandlePhase)
.L80245E0C:
/* 1746EC 80245E0C 24844EBC */ addiu $a0, $a0, %lo(EVS_Mario_HandlePhase)
/* 1746F0 80245E10 10400003 */ beqz $v0, .L80245E20
/* 1746F4 80245E14 A28001A7 */ sb $zero, 0x1A7($s4)
/* 1746F8 80245E18 3C048028 */ lui $a0, %hi(EVS_Peach_HandlePhase)
/* 1746FC 80245E1C 24845010 */ addiu $a0, $a0, %lo(EVS_Peach_HandlePhase)
.L80245E20:
/* 174700 80245E20 2405000A */ addiu $a1, $zero, 0xA
D_80245E24:
/* 174704 80245E24 0C0B0CF8 */ jal start_script
/* 174708 80245E28 0000302D */ daddu $a2, $zero, $zero
flo_00_pad_5E2C:
/* 17470C 80245E2C 0040202D */ daddu $a0, $v0, $zero
D_80245E30:
/* 174710 80245E30 AEA401D4 */ sw $a0, 0x1D4($s5)
/* 174714 80245E34 8C830144 */ lw $v1, 0x144($a0)
/* 174718 80245E38 24020004 */ addiu $v0, $zero, 0x4
/* 17471C 80245E3C 3C01800E */ lui $at, %hi(gBattleSubState)
.L80245E40:
/* 174720 80245E40 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
D_80245E44:
/* 174724 80245E44 AEA301E4 */ sw $v1, 0x1E4($s5)
/* 174728 80245E48 080918A2 */ j jtbl_80246288
/* 17472C 80245E4C AC800148 */ sw $zero, 0x148($a0)
.L80245E50:
/* 174730 80245E50 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 174734 80245E54 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
D_80245E58:
/* 174738 80245E58 3C030020 */ lui $v1, (0x200000 >> 16)
D_80245E5C:
/* 17473C 80245E5C 00431024 */ and $v0, $v0, $v1
/* 174740 80245E60 1440000A */ bnez $v0, .L80245E8C
D_80245E64:
/* 174744 80245E64 00000000 */ nop
.L80245E68:
/* 174748 80245E68 8EA201D4 */ lw $v0, 0x1D4($s5)
D_80245E6C:
/* 17474C 80245E6C 50400007 */ beql $v0, $zero, .L80245E8C
/* 174750 80245E70 AEA001D4 */ sw $zero, 0x1D4($s5)
/* 174754 80245E74 8EA401E4 */ lw $a0, 0x1E4($s5)
/* 174758 80245E78 0C0B1059 */ jal does_script_exist
/* 17475C 80245E7C 00000000 */ nop
D_80245E80:
/* 174760 80245E80 14400101 */ bnez $v0, jtbl_80246288
D_80245E84:
/* 174764 80245E84 00000000 */ nop
D_80245E88:
/* 174768 80245E88 AEA001D4 */ sw $zero, 0x1D4($s5)
.L80245E8C:
/* 17476C 80245E8C 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 174770 80245E90 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 174774 80245E94 8C820000 */ lw $v0, 0x0($a0)
D_80245E98:
/* 174778 80245E98 2403FEFF */ addiu $v1, $zero, -0x101
glabel func_80245E9C
/* 17477C 80245E9C 00431024 */ and $v0, $v0, $v1
/* 174780 80245EA0 AC820000 */ sw $v0, 0x0($a0)
/* 174784 80245EA4 8EA201D8 */ lw $v0, 0x1D8($s5)
/* 174788 80245EA8 10400005 */ beqz $v0, .L80245EC0
/* 17478C 80245EAC 00000000 */ nop
/* 174790 80245EB0 0C0B1059 */ jal does_script_exist
/* 174794 80245EB4 8EA401E8 */ lw $a0, 0x1E8($s5)
D_80245EB8:
/* 174798 80245EB8 144000F3 */ bnez $v0, jtbl_80246288
/* 17479C 80245EBC 00000000 */ nop
.L80245EC0:
/* 1747A0 80245EC0 1240000A */ beqz $s2, D_80245EEC
/* 1747A4 80245EC4 AEA001D8 */ sw $zero, 0x1D8($s5)
/* 1747A8 80245EC8 8E4201D8 */ lw $v0, 0x1D8($s2)
/* 1747AC 80245ECC 50400007 */ beql $v0, $zero, D_80245EEC
/* 1747B0 80245ED0 AE4001D8 */ sw $zero, 0x1D8($s2)
/* 1747B4 80245ED4 8E4401E8 */ lw $a0, 0x1E8($s2)
/* 1747B8 80245ED8 0C0B1059 */ jal does_script_exist
D_80245EDC:
/* 1747BC 80245EDC 00000000 */ nop
D_80245EE0:
/* 1747C0 80245EE0 144000E9 */ bnez $v0, jtbl_80246288
/* 1747C4 80245EE4 00000000 */ nop
jtbl_80245EE8:
/* 1747C8 80245EE8 AE4001D8 */ sw $zero, 0x1D8($s2)
D_80245EEC:
/* 1747CC 80245EEC 0000982D */ daddu $s3, $zero, $zero
/* 1747D0 80245EF0 0260882D */ daddu $s1, $s3, $zero
/* 1747D4 80245EF4 0280902D */ daddu $s2, $s4, $zero
.L80245EF8:
/* 1747D8 80245EF8 8E5000E0 */ lw $s0, 0xE0($s2)
.L80245EFC:
/* 1747DC 80245EFC 5200000B */ beql $s0, $zero, .L80245F2C
/* 1747E0 80245F00 26310001 */ addiu $s1, $s1, 0x1
/* 1747E4 80245F04 8E0201D4 */ lw $v0, 0x1D4($s0)
D_80245F08:
/* 1747E8 80245F08 50400008 */ beql $v0, $zero, .L80245F2C
/* 1747EC 80245F0C 26310001 */ addiu $s1, $s1, 0x1
D_80245F10:
/* 1747F0 80245F10 8E0401E4 */ lw $a0, 0x1E4($s0)
/* 1747F4 80245F14 0C0B1059 */ jal does_script_exist
D_80245F18:
/* 1747F8 80245F18 00000000 */ nop
/* 1747FC 80245F1C 50400002 */ beql $v0, $zero, .L80245F28
D_80245F20:
/* 174800 80245F20 AE0001D4 */ sw $zero, 0x1D4($s0)
/* 174804 80245F24 24130001 */ addiu $s3, $zero, 0x1
.L80245F28:
/* 174808 80245F28 26310001 */ addiu $s1, $s1, 0x1
.L80245F2C:
/* 17480C 80245F2C 2A220018 */ slti $v0, $s1, 0x18
D_80245F30:
/* 174810 80245F30 1440FFF1 */ bnez $v0, .L80245EF8
/* 174814 80245F34 26520004 */ addiu $s2, $s2, 0x4
D_80245F38:
/* 174818 80245F38 166000D3 */ bnez $s3, jtbl_80246288
/* 17481C 80245F3C 0000882D */ daddu $s1, $zero, $zero
D_80245F40:
/* 174820 80245F40 0280902D */ daddu $s2, $s4, $zero
D_80245F44:
/* 174824 80245F44 8E5000E0 */ lw $s0, 0xE0($s2)
D_80245F48:
/* 174828 80245F48 5200000B */ beql $s0, $zero, .L80245F78
D_80245F4C:
/* 17482C 80245F4C 26310001 */ addiu $s1, $s1, 0x1
jtbl_80245F50:
/* 174830 80245F50 8E0201D8 */ lw $v0, 0x1D8($s0)
/* 174834 80245F54 50400008 */ beql $v0, $zero, .L80245F78
/* 174838 80245F58 26310001 */ addiu $s1, $s1, 0x1
D_80245F5C:
/* 17483C 80245F5C 8E0401E8 */ lw $a0, 0x1E8($s0)
D_80245F60:
/* 174840 80245F60 0C0B1059 */ jal does_script_exist
/* 174844 80245F64 00000000 */ nop
.L80245F68:
/* 174848 80245F68 50400002 */ beql $v0, $zero, .L80245F74
/* 17484C 80245F6C AE0001D8 */ sw $zero, 0x1D8($s0)
/* 174850 80245F70 24130001 */ addiu $s3, $zero, 0x1
.L80245F74:
/* 174854 80245F74 26310001 */ addiu $s1, $s1, 0x1
.L80245F78:
/* 174858 80245F78 2A220018 */ slti $v0, $s1, 0x18
/* 17485C 80245F7C 1440FFF1 */ bnez $v0, D_80245F44
/* 174860 80245F80 26520004 */ addiu $s2, $s2, 0x4
/* 174864 80245F84 166000C0 */ bnez $s3, jtbl_80246288
/* 174868 80245F88 0000882D */ daddu $s1, $zero, $zero
D_80245F8C:
/* 17486C 80245F8C 3C04FFF7 */ lui $a0, (0xFFF7FFFF >> 16)
/* 174870 80245F90 3484FFFF */ ori $a0, $a0, (0xFFF7FFFF & 0xFFFF)
/* 174874 80245F94 0280182D */ daddu $v1, $s4, $zero
.L80245F98:
/* 174878 80245F98 8C7000E0 */ lw $s0, 0xE0($v1)
.L80245F9C:
/* 17487C 80245F9C 12000004 */ beqz $s0, .L80245FB0
.L80245FA0:
/* 174880 80245FA0 26310001 */ addiu $s1, $s1, 0x1
/* 174884 80245FA4 8E020000 */ lw $v0, 0x0($s0)
D_80245FA8:
/* 174888 80245FA8 00441024 */ and $v0, $v0, $a0
/* 17488C 80245FAC AE020000 */ sw $v0, 0x0($s0)
.L80245FB0:
/* 174890 80245FB0 2A220018 */ slti $v0, $s1, 0x18
/* 174894 80245FB4 1440FFF8 */ bnez $v0, .L80245F98
.L80245FB8:
/* 174898 80245FB8 24630004 */ addiu $v1, $v1, 0x4
glabel func_80245FBC
/* 17489C 80245FBC 8282008C */ lb $v0, 0x8C($s4)
/* 1748A0 80245FC0 144000B1 */ bnez $v0, jtbl_80246288
/* 1748A4 80245FC4 00000000 */ nop
/* 1748A8 80245FC8 3C028007 */ lui $v0, %hi(gGameStatusPtr)
D_80245FCC:
/* 1748AC 80245FCC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
.L80245FD0:
/* 1748B0 80245FD0 904200AA */ lbu $v0, 0xAA($v0)
/* 1748B4 80245FD4 30420001 */ andi $v0, $v0, 0x1
/* 1748B8 80245FD8 10400005 */ beqz $v0, .L80245FF0
/* 1748BC 80245FDC 00000000 */ nop
/* 1748C0 80245FE0 0C090464 */ jal func_80241190
.L80245FE4:
/* 1748C4 80245FE4 24040023 */ addiu $a0, $zero, 0x23
D_80245FE8:
/* 1748C8 80245FE8 080918A2 */ j jtbl_80246288
/* 1748CC 80245FEC 00000000 */ nop
.L80245FF0:
/* 1748D0 80245FF0 0C03A6CC */ jal decrement_status_bar_disabled
/* 1748D4 80245FF4 00000000 */ nop
/* 1748D8 80245FF8 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 1748DC 80245FFC 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 1748E0 80246000 8E020000 */ lw $v0, 0x0($s0)
/* 1748E4 80246004 34420008 */ ori $v0, $v0, 0x8
/* 1748E8 80246008 AE020000 */ sw $v0, 0x0($s0)
.L8024600C:
/* 1748EC 8024600C 8E020004 */ lw $v0, 0x4($s0)
.L80246010:
/* 1748F0 80246010 2403FFF7 */ addiu $v1, $zero, -0x9
/* 1748F4 80246014 00431024 */ and $v0, $v0, $v1
/* 1748F8 80246018 0C098D19 */ jal btl_check_player_defeated
/* 1748FC 8024601C AE020004 */ sw $v0, 0x4($s0)
D_80246020:
/* 174900 80246020 14400100 */ bnez $v0, D_80246424
glabel func_80246024
/* 174904 80246024 24020001 */ addiu $v0, $zero, 0x1
/* 174908 80246028 82830178 */ lb $v1, 0x178($s4)
/* 17490C 8024602C 1462000C */ bne $v1, $v0, .L80246060
/* 174910 80246030 2402000B */ addiu $v0, $zero, 0xB
/* 174914 80246034 8683017C */ lh $v1, 0x17C($s4)
D_80246038:
/* 174918 80246038 10620009 */ beq $v1, $v0, .L80246060
D_8024603C:
/* 17491C 8024603C 2402000F */ addiu $v0, $zero, 0xF
.L80246040:
/* 174920 80246040 10620007 */ beq $v1, $v0, .L80246060
/* 174924 80246044 24020011 */ addiu $v0, $zero, 0x11
/* 174928 80246048 10620005 */ beq $v1, $v0, .L80246060
/* 17492C 8024604C 3C03EFFF */ lui $v1, (0xEFFFFFFF >> 16)
/* 174930 80246050 8E020000 */ lw $v0, 0x0($s0)
/* 174934 80246054 3463FFFF */ ori $v1, $v1, (0xEFFFFFFF & 0xFFFF)
/* 174938 80246058 00431024 */ and $v0, $v0, $v1
.L8024605C:
/* 17493C 8024605C AE020000 */ sw $v0, 0x0($s0)
.L80246060:
/* 174940 80246060 82820178 */ lb $v0, 0x178($s4)
/* 174944 80246064 1440000E */ bnez $v0, .L802460A0
D_80246068:
/* 174948 80246068 24020023 */ addiu $v0, $zero, 0x23
/* 17494C 8024606C 8683017C */ lh $v1, 0x17C($s4)
.L80246070:
/* 174950 80246070 1062000B */ beq $v1, $v0, .L802460A0
/* 174954 80246074 24020025 */ addiu $v0, $zero, 0x25
/* 174958 80246078 10620009 */ beq $v1, $v0, .L802460A0
/* 17495C 8024607C 24020027 */ addiu $v0, $zero, 0x27
/* 174960 80246080 10620007 */ beq $v1, $v0, .L802460A0
/* 174964 80246084 3C04DFFF */ lui $a0, (0xDFFFFFFF >> 16)
/* 174968 80246088 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 17496C 8024608C 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
D_80246090:
/* 174970 80246090 8C620000 */ lw $v0, 0x0($v1)
D_80246094:
/* 174974 80246094 3484FFFF */ ori $a0, $a0, (0xDFFFFFFF & 0xFFFF)
/* 174978 80246098 00441024 */ and $v0, $v0, $a0
.L8024609C:
/* 17497C 8024609C AC620000 */ sw $v0, 0x0($v1)
.L802460A0:
/* 174980 802460A0 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 174984 802460A4 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 174988 802460A8 8C820000 */ lw $v0, 0x0($a0)
.L802460AC:
/* 17498C 802460AC 3C032000 */ lui $v1, (0x20000000 >> 16)
/* 174990 802460B0 00431024 */ and $v0, $v0, $v1
/* 174994 802460B4 50400001 */ beql $v0, $zero, .L802460BC
/* 174998 802460B8 A2800097 */ sb $zero, 0x97($s4)
.L802460BC:
/* 17499C 802460BC 8C820000 */ lw $v0, 0x0($a0)
/* 1749A0 802460C0 3C031000 */ lui $v1, (0x10000000 >> 16)
/* 1749A4 802460C4 00431024 */ and $v0, $v0, $v1
/* 1749A8 802460C8 50400001 */ beql $v0, $zero, .L802460D0
/* 1749AC 802460CC A2800096 */ sb $zero, 0x96($s4)
.L802460D0:
/* 1749B0 802460D0 0000882D */ daddu $s1, $zero, $zero
/* 1749B4 802460D4 3C060040 */ lui $a2, (0x400000 >> 16)
/* 1749B8 802460D8 3C050C00 */ lui $a1, (0xC000000 >> 16)
/* 1749BC 802460DC 0280202D */ daddu $a0, $s4, $zero
jtbl_802460E0:
/* 1749C0 802460E0 8C9000E0 */ lw $s0, 0xE0($a0)
glabel func_802460E4
/* 1749C4 802460E4 12000007 */ beqz $s0, .L80246104
/* 1749C8 802460E8 26310001 */ addiu $s1, $s1, 0x1
D_802460EC:
/* 1749CC 802460EC 8E030000 */ lw $v1, 0x0($s0)
/* 1749D0 802460F0 00661024 */ and $v0, $v1, $a2
/* 1749D4 802460F4 14400003 */ bnez $v0, .L80246104
/* 1749D8 802460F8 00000000 */ nop
/* 1749DC 802460FC 00651025 */ or $v0, $v1, $a1
/* 1749E0 80246100 AE020000 */ sw $v0, 0x0($s0)
.L80246104:
/* 1749E4 80246104 2A220018 */ slti $v0, $s1, 0x18
D_80246108:
/* 1749E8 80246108 1440FFF5 */ bnez $v0, jtbl_802460E0
/* 1749EC 8024610C 24840004 */ addiu $a0, $a0, 0x4
/* 1749F0 80246110 0C099DDF */ jal btl_update_ko_status
/* 1749F4 80246114 0000982D */ daddu $s3, $zero, $zero
/* 1749F8 80246118 0260882D */ daddu $s1, $s3, $zero
/* 1749FC 8024611C 0280182D */ daddu $v1, $s4, $zero
.L80246120:
/* 174A00 80246120 8C7000E0 */ lw $s0, 0xE0($v1)
/* 174A04 80246124 12000004 */ beqz $s0, .L80246138
/* 174A08 80246128 26310001 */ addiu $s1, $s1, 0x1
/* 174A0C 8024612C 8202021C */ lb $v0, 0x21C($s0)
jtbl_80246130:
/* 174A10 80246130 54400004 */ bnel $v0, $zero, .L80246144
/* 174A14 80246134 24130001 */ addiu $s3, $zero, 0x1
.L80246138:
/* 174A18 80246138 2A220018 */ slti $v0, $s1, 0x18
/* 174A1C 8024613C 1440FFF8 */ bnez $v0, .L80246120
D_80246140:
/* 174A20 80246140 24630004 */ addiu $v1, $v1, 0x4
.L80246144:
/* 174A24 80246144 16600005 */ bnez $s3, .L8024615C
/* 174A28 80246148 24020014 */ addiu $v0, $zero, 0x14
/* 174A2C 8024614C 3C01800E */ lui $at, %hi(gBattleSubState)
D_80246150:
/* 174A30 80246150 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 174A34 80246154 080918A2 */ j jtbl_80246288
/* 174A38 80246158 00000000 */ nop
.L8024615C:
/* 174A3C 8024615C 0C093903 */ jal func_8024E40C
jtbl_80246160:
/* 174A40 80246160 24040003 */ addiu $a0, $zero, 0x3
/* 174A44 80246164 9202021C */ lbu $v0, 0x21C($s0)
.L80246168:
/* 174A48 80246168 2442FFFC */ addiu $v0, $v0, -0x4
/* 174A4C 8024616C 00021600 */ sll $v0, $v0, 24
D_80246170:
/* 174A50 80246170 00021E03 */ sra $v1, $v0, 24
/* 174A54 80246174 2C620008 */ sltiu $v0, $v1, 0x8
.L80246178:
/* 174A58 80246178 10400016 */ beqz $v0, .L802461D4
/* 174A5C 8024617C 00031080 */ sll $v0, $v1, 2
/* 174A60 80246180 3C01802A */ lui $at, %hi(jtbl_8029CAF0)
D_80246184:
/* 174A64 80246184 00220821 */ addu $at, $at, $v0
/* 174A68 80246188 8C22CAF0 */ lw $v0, %lo(jtbl_8029CAF0)($at)
.L8024618C:
/* 174A6C 8024618C 00400008 */ jr $v0
/* 174A70 80246190 00000000 */ nop
glabel .L80246194
/* 174A74 80246194 08091879 */ j D_802461E4
.L80246198:
/* 174A78 80246198 24100012 */ addiu $s0, $zero, 0x12
glabel .L8024619C
/* 174A7C 8024619C 08091879 */ j D_802461E4
.L802461A0:
/* 174A80 802461A0 24100013 */ addiu $s0, $zero, 0x13
glabel .L802461A4
/* 174A84 802461A4 08091879 */ j D_802461E4
/* 174A88 802461A8 24100014 */ addiu $s0, $zero, 0x14
glabel .L802461AC
/* 174A8C 802461AC 08091879 */ j D_802461E4
jtbl_802461B0:
/* 174A90 802461B0 24100015 */ addiu $s0, $zero, 0x15
D_802461B4:
/* 174A94 802461B4 08091879 */ j D_802461E4
/* 174A98 802461B8 24100016 */ addiu $s0, $zero, 0x16
glabel .L802461BC
/* 174A9C 802461BC 08091879 */ j D_802461E4
D_802461C0:
/* 174AA0 802461C0 24100017 */ addiu $s0, $zero, 0x17
glabel .L802461C4
/* 174AA4 802461C4 08091879 */ j D_802461E4
/* 174AA8 802461C8 24100018 */ addiu $s0, $zero, 0x18
glabel .L802461CC
/* 174AAC 802461CC 08091879 */ j D_802461E4
/* 174AB0 802461D0 24100019 */ addiu $s0, $zero, 0x19
.L802461D4:
/* 174AB4 802461D4 0000802D */ daddu $s0, $zero, $zero
/* 174AB8 802461D8 24020014 */ addiu $v0, $zero, 0x14
.L802461DC:
/* 174ABC 802461DC 3C01800E */ lui $at, %hi(gBattleSubState)
/* 174AC0 802461E0 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
D_802461E4:
/* 174AC4 802461E4 0C05272D */ jal sfx_play_sound
glabel .L802461E8
/* 174AC8 802461E8 24042107 */ addiu $a0, $zero, 0x2107
/* 174ACC 802461EC 0200202D */ daddu $a0, $s0, $zero
kkj_19_D_802461F0:
/* 174AD0 802461F0 0C093E58 */ jal func_8024F960
D_802461F4:
/* 174AD4 802461F4 2405003C */ addiu $a1, $zero, 0x3C
/* 174AD8 802461F8 0000882D */ daddu $s1, $zero, $zero
/* 174ADC 802461FC 0280182D */ daddu $v1, $s4, $zero
.L80246200:
/* 174AE0 80246200 8C7000E0 */ lw $s0, 0xE0($v1)
/* 174AE4 80246204 56000001 */ bnel $s0, $zero, .L8024620C
/* 174AE8 80246208 A200021C */ sb $zero, 0x21C($s0)
.L8024620C:
/* 174AEC 8024620C 26310001 */ addiu $s1, $s1, 0x1
D_80246210:
/* 174AF0 80246210 2A220018 */ slti $v0, $s1, 0x18
.L80246214:
/* 174AF4 80246214 1440FFFA */ bnez $v0, .L80246200
/* 174AF8 80246218 24630004 */ addiu $v1, $v1, 0x4
/* 174AFC 8024621C 2402000B */ addiu $v0, $zero, 0xB
/* 174B00 80246220 3C01800E */ lui $at, %hi(gBattleSubState)
D_80246224:
/* 174B04 80246224 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 174B08 80246228 080918A2 */ j jtbl_80246288
/* 174B0C 8024622C 00000000 */ nop
.L80246230:
/* 174B10 80246230 0C093EAD */ jal func_8024FAB4
/* 174B14 80246234 00000000 */ nop
/* 174B18 80246238 14400013 */ bnez $v0, jtbl_80246288
/* 174B1C 8024623C 00000000 */ nop
.L80246240:
/* 174B20 80246240 0C093903 */ jal func_8024E40C
/* 174B24 80246244 24040002 */ addiu $a0, $zero, 0x2
/* 174B28 80246248 0C093936 */ jal D_8024E4D8_C0BD58
/* 174B2C 8024624C 2404000F */ addiu $a0, $zero, 0xF
/* 174B30 80246250 2402000A */ addiu $v0, $zero, 0xA
.L80246254:
/* 174B34 80246254 3C01802A */ lui $at, %hi(D_8029F248)
/* 174B38 80246258 AC22F248 */ sw $v0, %lo(D_8029F248)($at)
D_8024625C:
/* 174B3C 8024625C 080918A1 */ j .L80246284
hos_06_D_80246260:
/* 174B40 80246260 2402000C */ addiu $v0, $zero, 0xC
D_80246264:
/* 174B44 80246264 3C03802A */ lui $v1, %hi(D_8029F248)
/* 174B48 80246268 2463F248 */ addiu $v1, $v1, %lo(D_8029F248)
D_8024626C:
/* 174B4C 8024626C 8C620000 */ lw $v0, 0x0($v1)
D_80246270:
/* 174B50 80246270 10400003 */ beqz $v0, D_80246280
/* 174B54 80246274 2442FFFF */ addiu $v0, $v0, -0x1
D_80246278:
/* 174B58 80246278 080918A2 */ j jtbl_80246288
/* 174B5C 8024627C AC620000 */ sw $v0, 0x0($v1)
D_80246280:
/* 174B60 80246280 24020014 */ addiu $v0, $zero, 0x14
.L80246284:
/* 174B64 80246284 AE020000 */ sw $v0, 0x0($s0)
jtbl_80246288:
/* 174B68 80246288 3C10800E */ lui $s0, %hi(gBattleSubState)
/* 174B6C 8024628C 2610C4DC */ addiu $s0, $s0, %lo(gBattleSubState)
D_80246290:
/* 174B70 80246290 8E030000 */ lw $v1, 0x0($s0)
/* 174B74 80246294 24020015 */ addiu $v0, $zero, 0x15
.L80246298:
/* 174B78 80246298 1062003C */ beq $v1, $v0, .L8024638C
/* 174B7C 8024629C 28620016 */ slti $v0, $v1, 0x16
/* 174B80 802462A0 10400005 */ beqz $v0, .L802462B8
D_802462A4:
/* 174B84 802462A4 24020014 */ addiu $v0, $zero, 0x14
/* 174B88 802462A8 10620008 */ beq $v1, $v0, .L802462CC
/* 174B8C 802462AC 00000000 */ nop
/* 174B90 802462B0 080918F9 */ j .L802463E4
/* 174B94 802462B4 00000000 */ nop
.L802462B8:
/* 174B98 802462B8 24020016 */ addiu $v0, $zero, 0x16
/* 174B9C 802462BC 10620040 */ beq $v1, $v0, D_802463C0
flo_08_ItemChoiceList:
/* 174BA0 802462C0 00000000 */ nop
/* 174BA4 802462C4 080918F9 */ j .L802463E4
jtbl_802462C8:
/* 174BA8 802462C8 00000000 */ nop
.L802462CC:
/* 174BAC 802462CC 82A2021C */ lb $v0, 0x21C($s5)
D_802462D0:
/* 174BB0 802462D0 10400043 */ beqz $v0, func_802463E0
/* 174BB4 802462D4 2402001E */ addiu $v0, $zero, 0x1E
glabel .L802462D8
/* 174BB8 802462D8 0C093903 */ jal func_8024E40C
/* 174BBC 802462DC 24040021 */ addiu $a0, $zero, 0x21
D_802462E0:
/* 174BC0 802462E0 92A2021C */ lbu $v0, 0x21C($s5)
D_802462E4:
/* 174BC4 802462E4 2442FFFC */ addiu $v0, $v0, -0x4
/* 174BC8 802462E8 00021600 */ sll $v0, $v0, 24
/* 174BCC 802462EC 00021E03 */ sra $v1, $v0, 24
glabel .L802462F0
/* 174BD0 802462F0 2C620008 */ sltiu $v0, $v1, 0x8
/* 174BD4 802462F4 10400014 */ beqz $v0, .L80246348
/* 174BD8 802462F8 00031080 */ sll $v0, $v1, 2
/* 174BDC 802462FC 3C01802A */ lui $at, %hi(jtbl_8029CB10)
glabel D_80246300
/* 174BE0 80246300 00220821 */ addu $at, $at, $v0
.L80246304:
/* 174BE4 80246304 8C22CB10 */ lw $v0, %lo(jtbl_8029CB10)($at)
/* 174BE8 80246308 00400008 */ jr $v0
/* 174BEC 8024630C 00000000 */ nop
D_80246310:
/* 174BF0 80246310 080918D6 */ j .L80246358
/* 174BF4 80246314 2410000A */ addiu $s0, $zero, 0xA
glabel .L80246318
/* 174BF8 80246318 080918D6 */ j .L80246358
/* 174BFC 8024631C 2410000B */ addiu $s0, $zero, 0xB
glabel .L80246320
/* 174C00 80246320 080918D6 */ j .L80246358
/* 174C04 80246324 2410000C */ addiu $s0, $zero, 0xC
glabel .L80246328
/* 174C08 80246328 080918D6 */ j .L80246358
/* 174C0C 8024632C 2410000D */ addiu $s0, $zero, 0xD
glabel .L80246330
/* 174C10 80246330 080918D6 */ j .L80246358
/* 174C14 80246334 2410000E */ addiu $s0, $zero, 0xE
glabel .L80246338
/* 174C18 80246338 080918D6 */ j .L80246358
/* 174C1C 8024633C 2410000F */ addiu $s0, $zero, 0xF
glabel .L80246340
/* 174C20 80246340 080918D6 */ j .L80246358
.L80246344:
/* 174C24 80246344 24100010 */ addiu $s0, $zero, 0x10
glabel .L80246348
/* 174C28 80246348 0000802D */ daddu $s0, $zero, $zero
/* 174C2C 8024634C 2402001E */ addiu $v0, $zero, 0x1E
D_80246350:
/* 174C30 80246350 3C01800E */ lui $at, %hi(gBattleSubState)
/* 174C34 80246354 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
glabel .L80246358
/* 174C38 80246358 0200202D */ daddu $a0, $s0, $zero
/* 174C3C 8024635C 0C093E58 */ jal func_8024F960
D_80246360:
/* 174C40 80246360 2405003C */ addiu $a1, $zero, 0x3C
/* 174C44 80246364 24020015 */ addiu $v0, $zero, 0x15
glabel .L80246368
/* 174C48 80246368 A2A0021C */ sb $zero, 0x21C($s5)
D_8024636C:
/* 174C4C 8024636C A2A0021D */ sb $zero, 0x21D($s5)
D_80246370:
/* 174C50 80246370 3C01800E */ lui $at, %hi(gBattleSubState)
/* 174C54 80246374 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
D_80246378:
/* 174C58 80246378 8EA20000 */ lw $v0, 0x0($s5)
/* 174C5C 8024637C 3C030800 */ lui $v1, (0x8000000 >> 16)
D_80246380:
/* 174C60 80246380 00431025 */ or $v0, $v0, $v1
/* 174C64 80246384 080918F9 */ j .L802463E4
/* 174C68 80246388 AEA20000 */ sw $v0, 0x0($s5)
.L8024638C:
/* 174C6C 8024638C 0C093EAD */ jal func_8024FAB4
D_80246390:
/* 174C70 80246390 00000000 */ nop
/* 174C74 80246394 14400013 */ bnez $v0, .L802463E4
D_80246398:
/* 174C78 80246398 00000000 */ nop
D_8024639C:
/* 174C7C 8024639C 0C093903 */ jal func_8024E40C
D_802463A0:
/* 174C80 802463A0 24040002 */ addiu $a0, $zero, 0x2
/* 174C84 802463A4 0C093936 */ jal D_8024E4D8_C0BD58
D_802463A8:
/* 174C88 802463A8 2404000F */ addiu $a0, $zero, 0xF
/* 174C8C 802463AC 2402000A */ addiu $v0, $zero, 0xA
D_802463B0:
/* 174C90 802463B0 3C01802A */ lui $at, %hi(D_8029F248)
/* 174C94 802463B4 AC22F248 */ sw $v0, %lo(D_8029F248)($at)
glabel D_802463B8_kkj_19
/* 174C98 802463B8 080918F8 */ j func_802463E0
/* 174C9C 802463BC 24020016 */ addiu $v0, $zero, 0x16
D_802463C0:
/* 174CA0 802463C0 3C03802A */ lui $v1, %hi(D_8029F248)
/* 174CA4 802463C4 2463F248 */ addiu $v1, $v1, %lo(D_8029F248)
D_802463C8:
/* 174CA8 802463C8 8C620000 */ lw $v0, 0x0($v1)
/* 174CAC 802463CC 10400003 */ beqz $v0, .L802463DC
D_802463D0:
/* 174CB0 802463D0 2442FFFF */ addiu $v0, $v0, -0x1
/* 174CB4 802463D4 080918F9 */ j .L802463E4
jtbl_802463D8:
/* 174CB8 802463D8 AC620000 */ sw $v0, 0x0($v1)
.L802463DC:
/* 174CBC 802463DC 2402001E */ addiu $v0, $zero, 0x1E
glabel func_802463E0
/* 174CC0 802463E0 AE020000 */ sw $v0, 0x0($s0)
.L802463E4:
/* 174CC4 802463E4 3C03800E */ lui $v1, %hi(gBattleSubState)
D_802463E8:
/* 174CC8 802463E8 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
/* 174CCC 802463EC 2402001E */ addiu $v0, $zero, 0x1E
/* 174CD0 802463F0 1462000C */ bne $v1, $v0, D_80246424
/* 174CD4 802463F4 00000000 */ nop
/* 174CD8 802463F8 8EA201D4 */ lw $v0, 0x1D4($s5)
/* 174CDC 802463FC 50400007 */ beql $v0, $zero, .L8024641C
/* 174CE0 80246400 AEA001D4 */ sw $zero, 0x1D4($s5)
/* 174CE4 80246404 8EA401E4 */ lw $a0, 0x1E4($s5)
/* 174CE8 80246408 0C0B1059 */ jal does_script_exist
/* 174CEC 8024640C 00000000 */ nop
/* 174CF0 80246410 14400004 */ bnez $v0, D_80246424
.L80246414:
/* 174CF4 80246414 00000000 */ nop
/* 174CF8 80246418 AEA001D4 */ sw $zero, 0x1D4($s5)
.L8024641C:
/* 174CFC 8024641C 0C090464 */ jal func_80241190
/* 174D00 80246420 24040016 */ addiu $a0, $zero, 0x16
D_80246424:
/* 174D04 80246424 8FBF0028 */ lw $ra, 0x28($sp)
/* 174D08 80246428 8FB50024 */ lw $s5, 0x24($sp)
flo_08_D_802462C4_pad:
/* 174D0C 8024642C 8FB40020 */ lw $s4, 0x20($sp)
flo_08_FlowerGuard_ItemChoiceList:
/* 174D10 80246430 8FB3001C */ lw $s3, 0x1C($sp)
D_80246434:
/* 174D14 80246434 8FB20018 */ lw $s2, 0x18($sp)
/* 174D18 80246438 8FB10014 */ lw $s1, 0x14($sp)
/* 174D1C 8024643C 8FB00010 */ lw $s0, 0x10($sp)
/* 174D20 80246440 03E00008 */ jr $ra
/* 174D24 80246444 27BD0030 */ addiu $sp, $sp, 0x30
### DECOMPILED C INSTRUCTIONS:
void btl_state_update_player_move(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor;
Actor* partner = battleStatus->partnerActor;
s32 messageIndex;
Actor* actor;
Evt* script;
s32 enemyNotDone;
s8 tipIndex;
s32 i;
if (gBattleSubState == BTL_SUBSTATE_PLAYER_MOVE_INIT) {
battleStatus->stateFreezeCount = 0;
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
battleStatus->lastAttackDamage = 0;
battleStatus->currentDamageSource = DMG_SRC_DEFAULT;
gBattleStatus.flags1 &= ~BS_FLAGS1_AUTO_SUCCEED_ACTION;
gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN;
reset_actor_turn_info();
player->flags &= ~ACTOR_FLAG_8000000;
if (partner != NULL) {
partner->flags &= ~ACTOR_FLAG_8000000;
}
btl_cam_target_actor(ACTOR_PLAYER);
gBattleStatus.flags1 &= ~BS_FLAGS1_SHOW_PLAYER_DECORATIONS;
player->statusAfflicted = 0;
gBattleStatus.flags2 |= BS_FLAGS2_8;
gBattleStatus.flags1 &= ~BS_FLAGS1_YIELD_TURN;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL) {
actor->statusAfflicted = 0;
}
}
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL) {
actor->flags &= ~ACTOR_FLAG_HEALTH_BAR_HIDDEN;
actor->flags &= ~ACTOR_FLAG_8000000;
}
}
if (battleStatus->moveCategory == BTL_MENU_TYPE_JUMP || battleStatus->moveCategory == BTL_MENU_TYPE_SMASH) {
if (battleStatus->nextMerleeSpellType == MERLEE_SPELL_1) {
battleStatus->merleeAttackBoost = 3;
battleStatus->nextMerleeSpellType = MERLEE_SPELL_0;
battleStatus->battlePhase = PHASE_MERLEE_ATTACK_BONUS;
script = start_script(&EVS_Mario_HandlePhase, EVT_PRIORITY_A, 0);
player->takeTurnScript = script;
player->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PLAYER;
gBattleStatus.flags1 |= BS_FLAGS1_10000;
close_action_command_instruction_popup();
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_BEGIN_SHOW_TIP;
} else {
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_EXECUTE_MOVE;
gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN;
}
} else {
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_EXECUTE_MOVE;
gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN;
}
}
switch (gBattleSubState) {
case BTL_SUBSTATE_PLAYER_MOVE_BEGIN_SHOW_TIP:
if (player->takeTurnScript != NULL && does_script_exist(player->takeTurnScriptID)) {
break;
}
player->takeTurnScript = NULL;
if (!is_ability_active(ABILITY_BERSERKER)) {
if (battleStatus->selectedMoveID != MOVE_NONE) {
tipIndex = gMoveTable[battleStatus->selectedMoveID].actionTip;
if (tipIndex >= 0) {
btl_show_battle_message(BTL_MSG_ACTION_TIP_00 + tipIndex, 60);
}
}
}
D_8029F248 = 2;
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_SHOW_TIP_DELAY;
break;
case BTL_SUBSTATE_PLAYER_MOVE_SHOW_TIP_DELAY:
if (D_8029F248 != 0) {
D_8029F248--;
} else {
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_EXECUTE_MOVE;
}
break;
}
switch (gBattleSubState) {
case BTL_SUBSTATE_PLAYER_MOVE_EXECUTE_MOVE:
gBattleStatus.flags1 &= ~BS_FLAGS1_4000;
gBattleStatus.flags1 &= ~BS_FLAGS1_10000;
increment_status_bar_disabled();
gBattleStatus.flags1 |= BS_FLAGS1_100;
reset_all_actor_sounds(player);
battleStatus->battlePhase = PHASE_EXECUTE_ACTION;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
script = start_script(&EVS_Peach_HandlePhase, EVT_PRIORITY_A, 0);
} else {
script = start_script(&EVS_Mario_HandlePhase, EVT_PRIORITY_A, 0);
}
player->takeTurnScript = script;
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_HANDLE_RESULTS;
player->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PLAYER;
break;
case BTL_SUBSTATE_PLAYER_MOVE_HANDLE_RESULTS:
// wait for player battle phase script to finish
if (!(gBattleStatus.flags1 & BS_FLAGS1_YIELD_TURN)) {
if (player->takeTurnScript != NULL && does_script_exist(player->takeTurnScriptID)) {
break;
}
player->takeTurnScript = NULL;
}
gBattleStatus.flags1 &= ~BS_FLAGS1_100;
// wait for player battle event script to finish
if (player->handleEventScript != NULL && does_script_exist(player->handleEventScriptID)) {
break;
}
player->handleEventScript = NULL;
// wait for partner battle event script to finish
if (partner != NULL) {
if (partner->handleEventScript != NULL && does_script_exist(partner->handleEventScriptID)) {
break;
}
partner->handleEventScript = NULL;
}
// wait for all enemy battle phase scripts to finish
enemyNotDone = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL && actor->takeTurnScript != NULL) {
if (does_script_exist(actor->takeTurnScriptID)) {
enemyNotDone = TRUE;
} else {
actor->takeTurnScript = NULL;
}
}
}
if (enemyNotDone) {
break;
}
// wait for all enemy battle event scripts to finish
enemyNotDone = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL && actor->handleEventScript != NULL) {
if (does_script_exist(actor->handleEventScriptID)) {
enemyNotDone = TRUE;
} else {
actor->handleEventScript = NULL;
}
}
}
if (enemyNotDone) {
break;
}
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL) {
actor->flags &= ~ACTOR_FLAG_HEALTH_BAR_HIDDEN;
}
}
if (battleStatus->stateFreezeCount != 0) {
break;
}
if (gGameStatusPtr->demoFlags & 1) {
btl_set_state(BATTLE_STATE_END_DEMO_BATTLE);
break;
}
decrement_status_bar_disabled();
gBattleStatus.flags1 |= BS_FLAGS1_SHOW_PLAYER_DECORATIONS;
gBattleStatus.flags2 &= ~BS_FLAGS2_8;
if (btl_check_player_defeated()) {
return;
}
if ((battleStatus->moveCategory == BTL_MENU_TYPE_SMASH)
&& (battleStatus->selectedMoveID != MOVE_SMASH_CHARGE0)
&& (battleStatus->selectedMoveID != MOVE_SMASH_CHARGE)
&& (battleStatus->selectedMoveID != MOVE_SUPER_SMASH_CHARGE)
) {
gBattleStatus.flags1 &= ~BS_FLAGS1_HAMMER_CHARGED;
}
if ((battleStatus->moveCategory == BTL_MENU_TYPE_JUMP)
&& (battleStatus->selectedMoveID != MOVE_JUMP_CHARGE0)
&& (battleStatus->selectedMoveID != MOVE_JUMP_CHARGE)
&& (battleStatus->selectedMoveID != MOVE_SUPER_JUMP_CHARGE)
) {
gBattleStatus.flags1 &= ~BS_FLAGS1_JUMP_CHARGED;
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_JUMP_CHARGED)) {
battleStatus->jumpCharge = 0;
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_HAMMER_CHARGED)) {
battleStatus->hammerCharge = 0;
}
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL && !(actor->flags & ACTOR_FLAG_NO_DMG_APPLY)) {
actor->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000;
}
}
btl_update_ko_status();
enemyNotDone = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL) {
if (actor->statusAfflicted != 0) {
enemyNotDone = TRUE;
break;
}
}
}
if (!enemyNotDone) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_CHECK_PLAYER_STATUS;
} else {
btl_cam_use_preset(BTL_CAM_PRESET_03);
switch (actor->statusAfflicted) {
case 4:
messageIndex = BTL_MSG_ENEMY_DAZED;
break;
case 6:
messageIndex = BTL_MSG_ENEMY_ASLEEP;
break;
case 7:
messageIndex = BTL_MSG_ENEMY_FROZEN;
break;
case 9:
messageIndex = BTL_MSG_ENEMY_POISONED;
break;
case 10:
messageIndex = BTL_MSG_ENEMY_SHRUNK;
break;
case 5:
messageIndex = BTL_MSG_ENEMY_PARALYZED;
break;
case 11:
messageIndex = BTL_MSG_ENEMY_ELECTRIFIED;
break;
case 8:
messageIndex = BTL_MSG_ENEMY_CANT_MOVE;
break;
default:
messageIndex = 0;
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_CHECK_PLAYER_STATUS;
break;
}
sfx_play_sound(SOUND_2107);
btl_show_battle_message(messageIndex, 60);
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL) {
actor->statusAfflicted = 0;
}
}
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_AWAIT_ENEMY_STATUS_POPUP;
}
break;
case BTL_SUBSTATE_PLAYER_MOVE_AWAIT_ENEMY_STATUS_POPUP:
if (!btl_is_popup_displayed()) {
btl_cam_use_preset(BTL_CAM_DEFAULT);
btl_cam_move(15);
D_8029F248 = 10;
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_POST_ENEMY_STATUS_POPUP;
}
break;
case BTL_SUBSTATE_PLAYER_MOVE_POST_ENEMY_STATUS_POPUP:
if (D_8029F248 != 0) {
D_8029F248--;
} else {
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_CHECK_PLAYER_STATUS;
}
break;
}
switch (gBattleSubState) {
case BTL_SUBSTATE_PLAYER_MOVE_CHECK_PLAYER_STATUS:
if (player->statusAfflicted != 0) {
btl_cam_use_preset(BTL_CAM_PLAYER_STATUS_AFFLICTED);
switch (player->statusAfflicted) {
case 4:
messageIndex = BTL_MSG_PLAYER_DAZED;
break;
case 6:
messageIndex = BTL_MSG_PLAYER_ASLEEP;
break;
case 7:
messageIndex = BTL_MSG_PLAYER_FROZEN;
break;
case 9:
messageIndex = BTL_MSG_PLAYER_POISONED;
break;
case 10:
messageIndex = BTL_MSG_PLAYER_SHRUNK;
break;
case 5:
messageIndex = BTL_MSG_PLAYER_PARALYZED;
break;
case 11:
messageIndex = BTL_MSG_PLAYER_CHARGED;
break;
default:
messageIndex = 0;
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_AWAIT_DONE;
break;
}
btl_show_battle_message(messageIndex, 60);
player->statusAfflicted = 0;
player->disableDismissTimer = 0;
player->flags |= ACTOR_FLAG_8000000;
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_AWAIT_PLAYER_STATUS_POPUP;
} else {
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_AWAIT_DONE;
}
break;
case BTL_SUBSTATE_PLAYER_MOVE_AWAIT_PLAYER_STATUS_POPUP:
if (!btl_is_popup_displayed()) {
btl_cam_use_preset(BTL_CAM_DEFAULT);
btl_cam_move(15);
D_8029F248 = 10;
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_POST_PLAYER_STATUS_POPUP;
}
break;
case BTL_SUBSTATE_PLAYER_MOVE_POST_PLAYER_STATUS_POPUP:
if (D_8029F248 != 0) {
D_8029F248--;
} else {
gBattleSubState = BTL_SUBSTATE_PLAYER_MOVE_AWAIT_DONE;
}
break;
}
if (gBattleSubState == BTL_SUBSTATE_PLAYER_MOVE_AWAIT_DONE) {
if (player->takeTurnScript == NULL || !does_script_exist(player->takeTurnScriptID)) {
player->takeTurnScript = NULL;
btl_set_state(BATTLE_STATE_END_PLAYER_TURN);
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel _use_partner_ability
/* 83B7C 800EA6CC 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 83B80 800EA6D0 AFB3001C */ sw $s3, 0x1C($sp)
/* 83B84 800EA6D4 3C138011 */ lui $s3, %hi(gPlayerData)
/* 83B88 800EA6D8 2673F290 */ addiu $s3, $s3, %lo(gPlayerData)
/* 83B8C 800EA6DC 3C058011 */ lui $a1, %hi(gPartnerStatus)
/* 83B90 800EA6E0 24A5EBB0 */ addiu $a1, $a1, %lo(gPartnerStatus)
/* 83B94 800EA6E4 AFBF0020 */ sw $ra, 0x20($sp)
/* 83B98 800EA6E8 AFB20018 */ sw $s2, 0x18($sp)
/* 83B9C 800EA6EC AFB10014 */ sw $s1, 0x14($sp)
/* 83BA0 800EA6F0 AFB00010 */ sw $s0, 0x10($sp)
/* 83BA4 800EA6F4 80A20014 */ lb $v0, 0x14($a1)
/* 83BA8 800EA6F8 3C068011 */ lui $a2, %hi(gPlayerStatus)
/* 83BAC 800EA6FC 24C6EFC8 */ addiu $a2, $a2, %lo(gPlayerStatus)
/* 83BB0 800EA700 5440001F */ bnel $v0, $zero, .L800EA780
/* 83BB4 800EA704 A4A00004 */ sh $zero, 0x4($a1)
/* 83BB8 800EA708 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* 83BBC 800EA70C 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* 83BC0 800EA710 80620081 */ lb $v0, 0x81($v1)
/* 83BC4 800EA714 00621021 */ addu $v0, $v1, $v0
/* 83BC8 800EA718 90420040 */ lbu $v0, 0x40($v0)
/* 83BCC 800EA71C 00021600 */ sll $v0, $v0, 24
/* 83BD0 800EA720 00021603 */ sra $v0, $v0, 24
/* 83BD4 800EA724 A4A20004 */ sh $v0, 0x4($a1)
/* 83BD8 800EA728 80620081 */ lb $v0, 0x81($v1)
/* 83BDC 800EA72C 00621021 */ addu $v0, $v1, $v0
/* 83BE0 800EA730 90420044 */ lbu $v0, 0x44($v0)
/* 83BE4 800EA734 00021600 */ sll $v0, $v0, 24
/* 83BE8 800EA738 00021603 */ sra $v0, $v0, 24
/* 83BEC 800EA73C A4A20006 */ sh $v0, 0x6($a1)
/* 83BF0 800EA740 80620081 */ lb $v0, 0x81($v1)
/* 83BF4 800EA744 00021080 */ sll $v0, $v0, 2
/* 83BF8 800EA748 00621021 */ addu $v0, $v1, $v0
/* 83BFC 800EA74C 8C420000 */ lw $v0, 0x0($v0)
/* 83C00 800EA750 ACA20008 */ sw $v0, 0x8($a1)
/* 83C04 800EA754 80620081 */ lb $v0, 0x81($v1)
/* 83C08 800EA758 00021080 */ sll $v0, $v0, 2
/* 83C0C 800EA75C 00621021 */ addu $v0, $v1, $v0
/* 83C10 800EA760 8C420010 */ lw $v0, 0x10($v0)
/* 83C14 800EA764 ACA2000C */ sw $v0, 0xC($a1)
/* 83C18 800EA768 80620081 */ lb $v0, 0x81($v1)
/* 83C1C 800EA76C 00021080 */ sll $v0, $v0, 2
/* 83C20 800EA770 00621821 */ addu $v1, $v1, $v0
/* 83C24 800EA774 8C620020 */ lw $v0, 0x20($v1)
/* 83C28 800EA778 0803A9E4 */ j .L800EA790
/* 83C2C 800EA77C ACA20010 */ sw $v0, 0x10($a1)
.L800EA780:
/* 83C30 800EA780 A4A00006 */ sh $zero, 0x6($a1)
/* 83C34 800EA784 ACA00008 */ sw $zero, 0x8($a1)
/* 83C38 800EA788 ACA0000C */ sw $zero, 0xC($a1)
/* 83C3C 800EA78C ACA00010 */ sw $zero, 0x10($a1)
.L800EA790:
/* 83C40 800EA790 8CC40004 */ lw $a0, 0x4($a2)
/* 83C44 800EA794 30820004 */ andi $v0, $a0, 0x4
/* 83C48 800EA798 1040000A */ beqz $v0, .L800EA7C4
/* 83C4C 800EA79C 2402FFFB */ addiu $v0, $zero, -0x5
/* 83C50 800EA7A0 8CA3000C */ lw $v1, 0xC($a1)
/* 83C54 800EA7A4 00821024 */ and $v0, $a0, $v0
/* 83C58 800EA7A8 ACC20004 */ sw $v0, 0x4($a2)
/* 83C5C 800EA7AC 34634004 */ ori $v1, $v1, 0x4004
/* 83C60 800EA7B0 ACA3000C */ sw $v1, 0xC($a1)
/* 83C64 800EA7B4 8CC20004 */ lw $v0, 0x4($a2)
/* 83C68 800EA7B8 3C034000 */ lui $v1, (0x40000000 >> 16)
/* 83C6C 800EA7BC 00431025 */ or $v0, $v0, $v1
/* 83C70 800EA7C0 ACC20004 */ sw $v0, 0x4($a2)
.L800EA7C4:
/* 83C74 800EA7C4 3C038011 */ lui $v1, %hi(NextPartnerCommand)
/* 83C78 800EA7C8 2463CFE8 */ addiu $v1, $v1, %lo(NextPartnerCommand)
/* 83C7C 800EA7CC 8C620000 */ lw $v0, 0x0($v1)
/* 83C80 800EA7D0 10400006 */ beqz $v0, .L800EA7EC
/* 83C84 800EA7D4 00000000 */ nop
/* 83C88 800EA7D8 3C018011 */ lui $at, %hi(PartnerCommand)
/* 83C8C 800EA7DC AC22CD30 */ sw $v0, %lo(PartnerCommand)($at)
/* 83C90 800EA7E0 3C018011 */ lui $at, %hi(PartnerCommandState)
/* 83C94 800EA7E4 AC20CD34 */ sw $zero, %lo(PartnerCommandState)($at)
/* 83C98 800EA7E8 AC600000 */ sw $zero, 0x0($v1)
.L800EA7EC:
/* 83C9C 800EA7EC 3C038011 */ lui $v1, %hi(PartnerCommand)
/* 83CA0 800EA7F0 8C63CD30 */ lw $v1, %lo(PartnerCommand)($v1)
/* 83CA4 800EA7F4 2C620002 */ sltiu $v0, $v1, 0x2
/* 83CA8 800EA7F8 14400009 */ bnez $v0, .L800EA820
/* 83CAC 800EA7FC 2C62000B */ sltiu $v0, $v1, 0xB
/* 83CB0 800EA800 24020008 */ addiu $v0, $zero, 0x8
/* 83CB4 800EA804 10620006 */ beq $v1, $v0, .L800EA820
/* 83CB8 800EA808 2C62000B */ sltiu $v0, $v1, 0xB
/* 83CBC 800EA80C 3C018011 */ lui $at, %hi(D_8010CFC4)
/* 83CC0 800EA810 AC20CFC4 */ sw $zero, %lo(D_8010CFC4)($at)
/* 83CC4 800EA814 3C038011 */ lui $v1, %hi(PartnerCommand)
/* 83CC8 800EA818 8C63CD30 */ lw $v1, %lo(PartnerCommand)($v1)
/* 83CCC 800EA81C 2C62000B */ sltiu $v0, $v1, 0xB
.L800EA820:
/* 83CD0 800EA820 1040024A */ beqz $v0, .L800EB14C
/* 83CD4 800EA824 00031080 */ sll $v0, $v1, 2
/* 83CD8 800EA828 3C018011 */ lui $at, %hi(jtbl_8010C118)
/* 83CDC 800EA82C 00220821 */ addu $at, $at, $v0
/* 83CE0 800EA830 8C22C118 */ lw $v0, %lo(jtbl_8010C118)($at)
/* 83CE4 800EA834 00400008 */ jr $v0
/* 83CE8 800EA838 00000000 */ nop
glabel .L800EA83C
/* 83CEC 800EA83C 24040003 */ addiu $a0, $zero, 0x3
/* 83CF0 800EA840 3C118011 */ lui $s1, %hi(PartnerCommandState)
/* 83CF4 800EA844 2631CD34 */ addiu $s1, $s1, %lo(PartnerCommandState)
/* 83CF8 800EA848 3C018011 */ lui $at, %hi(D_8010CFC4)
/* 83CFC 800EA84C AC24CFC4 */ sw $a0, %lo(D_8010CFC4)($at)
/* 83D00 800EA850 8E230000 */ lw $v1, 0x0($s1)
/* 83D04 800EA854 24120001 */ addiu $s2, $zero, 0x1
/* 83D08 800EA858 1072002B */ beq $v1, $s2, .L800EA908
/* 83D0C 800EA85C 28620002 */ slti $v0, $v1, 0x2
/* 83D10 800EA860 50400005 */ beql $v0, $zero, .L800EA878
/* 83D14 800EA864 24020002 */ addiu $v0, $zero, 0x2
/* 83D18 800EA868 10600009 */ beqz $v1, .L800EA890
/* 83D1C 800EA86C 00000000 */ nop
/* 83D20 800EA870 0803AC53 */ j .L800EB14C
/* 83D24 800EA874 00000000 */ nop
.L800EA878:
/* 83D28 800EA878 1062003F */ beq $v1, $v0, .L800EA978
/* 83D2C 800EA87C 00000000 */ nop
/* 83D30 800EA880 10640056 */ beq $v1, $a0, .L800EA9DC
/* 83D34 800EA884 00000000 */ nop
/* 83D38 800EA888 0803AC53 */ j .L800EB14C
/* 83D3C 800EA88C 00000000 */ nop
.L800EA890:
/* 83D40 800EA890 0C03805E */ jal disable_player_input
/* 83D44 800EA894 00000000 */ nop
/* 83D48 800EA898 0C05272D */ jal sfx_play_sound
/* 83D4C 800EA89C 2404000D */ addiu $a0, $zero, 0xD
/* 83D50 800EA8A0 3C108011 */ lui $s0, %hi(D_8010CFDC)
/* 83D54 800EA8A4 2610CFDC */ addiu $s0, $s0, %lo(D_8010CFDC)
/* 83D58 800EA8A8 0C0B102B */ jal kill_script_by_ID
/* 83D5C 800EA8AC 8E040000 */ lw $a0, 0x0($s0)
/* 83D60 800EA8B0 3C028011 */ lui $v0, %hi(wPartner)
/* 83D64 800EA8B4 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 83D68 800EA8B8 24050014 */ addiu $a1, $zero, 0x14
/* 83D6C 800EA8BC 8C440020 */ lw $a0, 0x20($v0)
/* 83D70 800EA8C0 0C0B0CF8 */ jal start_script
/* 83D74 800EA8C4 24060020 */ addiu $a2, $zero, 0x20
/* 83D78 800EA8C8 8C430144 */ lw $v1, 0x144($v0)
/* 83D7C 800EA8CC 3C018011 */ lui $at, %hi(D_8010CFD4)
/* 83D80 800EA8D0 AC22CFD4 */ sw $v0, %lo(D_8010CFD4)($at)
/* 83D84 800EA8D4 AE030000 */ sw $v1, 0x0($s0)
/* 83D88 800EA8D8 3C058011 */ lui $a1, %hi(wPartnerNpc)
/* 83D8C 800EA8DC 8CA5C930 */ lw $a1, %lo(wPartnerNpc)($a1)
/* 83D90 800EA8E0 2403000A */ addiu $v1, $zero, 0xA
/* 83D94 800EA8E4 A0430004 */ sb $v1, 0x4($v0)
/* 83D98 800EA8E8 8E230000 */ lw $v1, 0x0($s1)
/* 83D9C 800EA8EC 24040001 */ addiu $a0, $zero, 0x1
/* 83DA0 800EA8F0 00641821 */ addu $v1, $v1, $a0
/* 83DA4 800EA8F4 AC45014C */ sw $a1, 0x14C($v0)
/* 83DA8 800EA8F8 0C009C22 */ jal set_time_freeze_mode
/* 83DAC 800EA8FC AE230000 */ sw $v1, 0x0($s1)
/* 83DB0 800EA900 0803AC53 */ j .L800EB14C
/* 83DB4 800EA904 00000000 */ nop
.L800EA908:
/* 83DB8 800EA908 3C048011 */ lui $a0, %hi(D_8010CFDC)
/* 83DBC 800EA90C 8C84CFDC */ lw $a0, %lo(D_8010CFDC)($a0)
/* 83DC0 800EA910 0C0B1059 */ jal does_script_exist
/* 83DC4 800EA914 00000000 */ nop
/* 83DC8 800EA918 1440020C */ bnez $v0, .L800EB14C
/* 83DCC 800EA91C 00000000 */ nop
/* 83DD0 800EA920 0C009C22 */ jal set_time_freeze_mode
/* 83DD4 800EA924 0000202D */ daddu $a0, $zero, $zero
/* 83DD8 800EA928 0C03A9AA */ jal partner_free_npc
/* 83DDC 800EA92C 00000000 */ nop
/* 83DE0 800EA930 3C028011 */ lui $v0, %hi(NextPartnerID)
/* 83DE4 800EA934 8C42CFE4 */ lw $v0, %lo(NextPartnerID)($v0)
/* 83DE8 800EA938 3C018011 */ lui $at, %hi(wCurrentPartnerId)
/* 83DEC 800EA93C AC22CFD8 */ sw $v0, %lo(wCurrentPartnerId)($at)
/* 83DF0 800EA940 0C03A974 */ jal create_partner_npc
/* 83DF4 800EA944 A2620012 */ sb $v0, 0x12($s3)
/* 83DF8 800EA948 0C05272D */ jal sfx_play_sound
/* 83DFC 800EA94C 2404000E */ addiu $a0, $zero, 0xE
/* 83E00 800EA950 3C028011 */ lui $v0, %hi(wPartner)
/* 83E04 800EA954 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 83E08 800EA958 3C048011 */ lui $a0, %hi(wPartnerNpc)
/* 83E0C 800EA95C 8C84C930 */ lw $a0, %lo(wPartnerNpc)($a0)
/* 83E10 800EA960 8C420010 */ lw $v0, 0x10($v0)
/* 83E14 800EA964 0040F809 */ jalr $v0
/* 83E18 800EA968 00000000 */ nop
/* 83E1C 800EA96C 8E220000 */ lw $v0, 0x0($s1)
/* 83E20 800EA970 24420001 */ addiu $v0, $v0, 0x1
/* 83E24 800EA974 AE220000 */ sw $v0, 0x0($s1)
.L800EA978:
/* 83E28 800EA978 3C028011 */ lui $v0, %hi(wPartner)
/* 83E2C 800EA97C 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 83E30 800EA980 24050014 */ addiu $a1, $zero, 0x14
/* 83E34 800EA984 8C440014 */ lw $a0, 0x14($v0)
/* 83E38 800EA988 0C0B0CF8 */ jal start_script
/* 83E3C 800EA98C 24060020 */ addiu $a2, $zero, 0x20
/* 83E40 800EA990 8C430144 */ lw $v1, 0x144($v0)
/* 83E44 800EA994 3C068011 */ lui $a2, %hi(wPartnerNpc)
/* 83E48 800EA998 8CC6C930 */ lw $a2, %lo(wPartnerNpc)($a2)
/* 83E4C 800EA99C 3C058011 */ lui $a1, %hi(PartnerCommandState)
/* 83E50 800EA9A0 24A5CD34 */ addiu $a1, $a1, %lo(PartnerCommandState)
/* 83E54 800EA9A4 3C018011 */ lui $at, %hi(D_8010CFD4)
/* 83E58 800EA9A8 AC22CFD4 */ sw $v0, %lo(D_8010CFD4)($at)
/* 83E5C 800EA9AC 3C018011 */ lui $at, %hi(D_8010CFDC)
/* 83E60 800EA9B0 AC23CFDC */ sw $v1, %lo(D_8010CFDC)($at)
/* 83E64 800EA9B4 2403000A */ addiu $v1, $zero, 0xA
/* 83E68 800EA9B8 A0430004 */ sb $v1, 0x4($v0)
/* 83E6C 800EA9BC 8CA30000 */ lw $v1, 0x0($a1)
/* 83E70 800EA9C0 24040001 */ addiu $a0, $zero, 0x1
/* 83E74 800EA9C4 AC46014C */ sw $a2, 0x14C($v0)
/* 83E78 800EA9C8 00641821 */ addu $v1, $v1, $a0
/* 83E7C 800EA9CC 0C009C22 */ jal set_time_freeze_mode
/* 83E80 800EA9D0 ACA30000 */ sw $v1, 0x0($a1)
/* 83E84 800EA9D4 0803AC53 */ j .L800EB14C
/* 83E88 800EA9D8 00000000 */ nop
.L800EA9DC:
/* 83E8C 800EA9DC 3C108011 */ lui $s0, %hi(D_8010CFDC)
/* 83E90 800EA9E0 2610CFDC */ addiu $s0, $s0, %lo(D_8010CFDC)
/* 83E94 800EA9E4 0C0B1059 */ jal does_script_exist
/* 83E98 800EA9E8 8E040000 */ lw $a0, 0x0($s0)
/* 83E9C 800EA9EC 144001D7 */ bnez $v0, .L800EB14C
/* 83EA0 800EA9F0 24050014 */ addiu $a1, $zero, 0x14
/* 83EA4 800EA9F4 3C028011 */ lui $v0, %hi(wPartner)
/* 83EA8 800EA9F8 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 83EAC 800EA9FC 8C440018 */ lw $a0, 0x18($v0)
/* 83EB0 800EAA00 0C0B0CF8 */ jal start_script
/* 83EB4 800EAA04 24060020 */ addiu $a2, $zero, 0x20
/* 83EB8 800EAA08 3C038011 */ lui $v1, %hi(wPartnerNpc)
/* 83EBC 800EAA0C 8C63C930 */ lw $v1, %lo(wPartnerNpc)($v1)
/* 83EC0 800EAA10 8C440144 */ lw $a0, 0x144($v0)
/* 83EC4 800EAA14 3C018011 */ lui $at, %hi(D_8010CFD4)
/* 83EC8 800EAA18 AC22CFD4 */ sw $v0, %lo(D_8010CFD4)($at)
/* 83ECC 800EAA1C AC43014C */ sw $v1, 0x14C($v0)
/* 83ED0 800EAA20 2403000A */ addiu $v1, $zero, 0xA
/* 83ED4 800EAA24 AE040000 */ sw $a0, 0x0($s0)
/* 83ED8 800EAA28 A0430004 */ sb $v1, 0x4($v0)
/* 83EDC 800EAA2C 3C018011 */ lui $at, %hi(PartnerCommand)
/* 83EE0 800EAA30 0C038069 */ jal enable_player_input
/* 83EE4 800EAA34 AC32CD30 */ sw $s2, %lo(PartnerCommand)($at)
/* 83EE8 800EAA38 0C009C22 */ jal set_time_freeze_mode
/* 83EEC 800EAA3C 0000202D */ daddu $a0, $zero, $zero
/* 83EF0 800EAA40 0803AC53 */ j .L800EB14C
/* 83EF4 800EAA44 00000000 */ nop
glabel .L800EAA48
/* 83EF8 800EAA48 24040003 */ addiu $a0, $zero, 0x3
/* 83EFC 800EAA4C 3C108011 */ lui $s0, %hi(PartnerCommandState)
/* 83F00 800EAA50 2610CD34 */ addiu $s0, $s0, %lo(PartnerCommandState)
/* 83F04 800EAA54 3C018011 */ lui $at, %hi(D_8010CFC4)
/* 83F08 800EAA58 AC24CFC4 */ sw $a0, %lo(D_8010CFC4)($at)
/* 83F0C 800EAA5C 8E030000 */ lw $v1, 0x0($s0)
/* 83F10 800EAA60 24110001 */ addiu $s1, $zero, 0x1
/* 83F14 800EAA64 10710014 */ beq $v1, $s1, .L800EAAB8
/* 83F18 800EAA68 28620002 */ slti $v0, $v1, 0x2
/* 83F1C 800EAA6C 50400005 */ beql $v0, $zero, .L800EAA84
/* 83F20 800EAA70 24020002 */ addiu $v0, $zero, 0x2
/* 83F24 800EAA74 10600009 */ beqz $v1, .L800EAA9C
/* 83F28 800EAA78 00000000 */ nop
/* 83F2C 800EAA7C 0803AC53 */ j .L800EB14C
/* 83F30 800EAA80 00000000 */ nop
.L800EAA84:
/* 83F34 800EAA84 10620170 */ beq $v1, $v0, .L800EB048
/* 83F38 800EAA88 00000000 */ nop
/* 83F3C 800EAA8C 1064002E */ beq $v1, $a0, .L800EAB48
/* 83F40 800EAA90 24050014 */ addiu $a1, $zero, 0x14
/* 83F44 800EAA94 0803AC53 */ j .L800EB14C
/* 83F48 800EAA98 00000000 */ nop
.L800EAA9C:
/* 83F4C 800EAA9C 3C048011 */ lui $a0, %hi(D_8010CFDC)
/* 83F50 800EAAA0 8C84CFDC */ lw $a0, %lo(D_8010CFDC)($a0)
/* 83F54 800EAAA4 0C0B102B */ jal kill_script_by_ID
/* 83F58 800EAAA8 00000000 */ nop
/* 83F5C 800EAAAC 8E020000 */ lw $v0, 0x0($s0)
/* 83F60 800EAAB0 24420001 */ addiu $v0, $v0, 0x1
/* 83F64 800EAAB4 AE020000 */ sw $v0, 0x0($s0)
.L800EAAB8:
/* 83F68 800EAAB8 0C03A9AA */ jal partner_free_npc
/* 83F6C 800EAABC 00000000 */ nop
/* 83F70 800EAAC0 3C028011 */ lui $v0, %hi(NextPartnerID)
/* 83F74 800EAAC4 8C42CFE4 */ lw $v0, %lo(NextPartnerID)($v0)
/* 83F78 800EAAC8 3C018011 */ lui $at, %hi(wCurrentPartnerId)
/* 83F7C 800EAACC AC22CFD8 */ sw $v0, %lo(wCurrentPartnerId)($at)
/* 83F80 800EAAD0 0C03A974 */ jal create_partner_npc
/* 83F84 800EAAD4 A2620012 */ sb $v0, 0x12($s3)
/* 83F88 800EAAD8 3C048011 */ lui $a0, %hi(wPartnerNpc)
/* 83F8C 800EAADC 8C84C930 */ lw $a0, %lo(wPartnerNpc)($a0)
/* 83F90 800EAAE0 3C018010 */ lui $at, %hi(wSavedPartnerPosX)
/* 83F94 800EAAE4 C422833C */ lwc1 $f2, %lo(wSavedPartnerPosX)($at)
/* 83F98 800EAAE8 3C018010 */ lui $at, %hi(wSavedPartnerPosY)
/* 83F9C 800EAAEC C4248340 */ lwc1 $f4, %lo(wSavedPartnerPosY)($at)
/* 83FA0 800EAAF0 3C018010 */ lui $at, %hi(wSavedPartnerPosZ)
/* 83FA4 800EAAF4 C4268344 */ lwc1 $f6, %lo(wSavedPartnerPosZ)($at)
/* 83FA8 800EAAF8 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 83FAC 800EAAFC 44810000 */ mtc1 $at, $f0
/* 83FB0 800EAB00 3C028011 */ lui $v0, %hi(wPartner)
/* 83FB4 800EAB04 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 83FB8 800EAB08 E4820038 */ swc1 $f2, 0x38($a0)
/* 83FBC 800EAB0C E484003C */ swc1 $f4, 0x3C($a0)
/* 83FC0 800EAB10 E4860040 */ swc1 $f6, 0x40($a0)
/* 83FC4 800EAB14 AC80001C */ sw $zero, 0x1C($a0)
/* 83FC8 800EAB18 E4800054 */ swc1 $f0, 0x54($a0)
/* 83FCC 800EAB1C E4800058 */ swc1 $f0, 0x58($a0)
/* 83FD0 800EAB20 E480005C */ swc1 $f0, 0x5C($a0)
/* 83FD4 800EAB24 8C420010 */ lw $v0, 0x10($v0)
/* 83FD8 800EAB28 0040F809 */ jalr $v0
/* 83FDC 800EAB2C 00000000 */ nop
/* 83FE0 800EAB30 3C038011 */ lui $v1, %hi(PartnerCommandState)
/* 83FE4 800EAB34 2463CD34 */ addiu $v1, $v1, %lo(PartnerCommandState)
/* 83FE8 800EAB38 8C620000 */ lw $v0, 0x0($v1)
/* 83FEC 800EAB3C 24420001 */ addiu $v0, $v0, 0x1
/* 83FF0 800EAB40 0803AC14 */ j .L800EB050
/* 83FF4 800EAB44 AC620000 */ sw $v0, 0x0($v1)
.L800EAB48:
/* 83FF8 800EAB48 3C028011 */ lui $v0, %hi(wPartner)
/* 83FFC 800EAB4C 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 84000 800EAB50 8C440018 */ lw $a0, 0x18($v0)
/* 84004 800EAB54 0C0B0CF8 */ jal start_script
/* 84008 800EAB58 24060020 */ addiu $a2, $zero, 0x20
/* 8400C 800EAB5C 3C038011 */ lui $v1, %hi(wPartnerNpc)
/* 84010 800EAB60 8C63C930 */ lw $v1, %lo(wPartnerNpc)($v1)
/* 84014 800EAB64 8C440144 */ lw $a0, 0x144($v0)
/* 84018 800EAB68 3C018011 */ lui $at, %hi(D_8010CFD4)
/* 8401C 800EAB6C AC22CFD4 */ sw $v0, %lo(D_8010CFD4)($at)
/* 84020 800EAB70 AC43014C */ sw $v1, 0x14C($v0)
/* 84024 800EAB74 2403000A */ addiu $v1, $zero, 0xA
/* 84028 800EAB78 3C018011 */ lui $at, %hi(D_8010CFDC)
/* 8402C 800EAB7C AC24CFDC */ sw $a0, %lo(D_8010CFDC)($at)
/* 84030 800EAB80 A0430004 */ sb $v1, 0x4($v0)
/* 84034 800EAB84 3C018011 */ lui $at, %hi(PartnerCommand)
/* 84038 800EAB88 0803AC53 */ j .L800EB14C
/* 8403C 800EAB8C AC31CD30 */ sw $s1, %lo(PartnerCommand)($at)
glabel .L800EAB90
/* 84040 800EAB90 3C118011 */ lui $s1, %hi(PartnerCommandState)
/* 84044 800EAB94 2631CD34 */ addiu $s1, $s1, %lo(PartnerCommandState)
/* 84048 800EAB98 8E300000 */ lw $s0, 0x0($s1)
/* 8404C 800EAB9C 12000005 */ beqz $s0, .L800EABB4
/* 84050 800EABA0 24020001 */ addiu $v0, $zero, 0x1
/* 84054 800EABA4 12020010 */ beq $s0, $v0, .L800EABE8
/* 84058 800EABA8 00000000 */ nop
/* 8405C 800EABAC 0803AC53 */ j .L800EB14C
/* 84060 800EABB0 00000000 */ nop
.L800EABB4:
/* 84064 800EABB4 0C03805E */ jal disable_player_input
/* 84068 800EABB8 00000000 */ nop
/* 8406C 800EABBC 0C05272D */ jal sfx_play_sound
/* 84070 800EABC0 2404000D */ addiu $a0, $zero, 0xD
/* 84074 800EABC4 3C108011 */ lui $s0, %hi(D_8010CFDC)
/* 84078 800EABC8 2610CFDC */ addiu $s0, $s0, %lo(D_8010CFDC)
/* 8407C 800EABCC 0C0B102B */ jal kill_script_by_ID
/* 84080 800EABD0 8E040000 */ lw $a0, 0x0($s0)
/* 84084 800EABD4 3C028011 */ lui $v0, %hi(wPartner)
/* 84088 800EABD8 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 8408C 800EABDC 8C440020 */ lw $a0, 0x20($v0)
/* 84090 800EABE0 0803ABCE */ j .L800EAF38
/* 84094 800EABE4 24050014 */ addiu $a1, $zero, 0x14
.L800EABE8:
/* 84098 800EABE8 3C048011 */ lui $a0, %hi(D_8010CFDC)
/* 8409C 800EABEC 8C84CFDC */ lw $a0, %lo(D_8010CFDC)($a0)
/* 840A0 800EABF0 0C0B1059 */ jal does_script_exist
/* 840A4 800EABF4 00000000 */ nop
/* 840A8 800EABF8 14400154 */ bnez $v0, .L800EB14C
/* 840AC 800EABFC 00000000 */ nop
/* 840B0 800EAC00 0C03A9AA */ jal partner_free_npc
/* 840B4 800EAC04 00000000 */ nop
/* 840B8 800EAC08 3C028011 */ lui $v0, %hi(NextPartnerID)
/* 840BC 800EAC0C 8C42CFE4 */ lw $v0, %lo(NextPartnerID)($v0)
/* 840C0 800EAC10 3C018011 */ lui $at, %hi(PartnerCommand)
/* 840C4 800EAC14 AC30CD30 */ sw $s0, %lo(PartnerCommand)($at)
/* 840C8 800EAC18 3C018011 */ lui $at, %hi(wCurrentPartnerId)
/* 840CC 800EAC1C AC22CFD8 */ sw $v0, %lo(wCurrentPartnerId)($at)
/* 840D0 800EAC20 0C038069 */ jal enable_player_input
/* 840D4 800EAC24 A2620012 */ sb $v0, 0x12($s3)
/* 840D8 800EAC28 0803AC53 */ j .L800EB14C
/* 840DC 800EAC2C 00000000 */ nop
glabel .L800EAC30
/* 840E0 800EAC30 3C028011 */ lui $v0, %hi(PartnerCommandState)
/* 840E4 800EAC34 8C42CD34 */ lw $v0, %lo(PartnerCommandState)($v0)
/* 840E8 800EAC38 14400144 */ bnez $v0, .L800EB14C
/* 840EC 800EAC3C 00000000 */ nop
/* 840F0 800EAC40 3C048011 */ lui $a0, %hi(D_8010CFDC)
/* 840F4 800EAC44 8C84CFDC */ lw $a0, %lo(D_8010CFDC)($a0)
/* 840F8 800EAC48 0C0B102B */ jal kill_script_by_ID
/* 840FC 800EAC4C 00000000 */ nop
/* 84100 800EAC50 0C03A9AA */ jal partner_free_npc
/* 84104 800EAC54 00000000 */ nop
/* 84108 800EAC58 3C038011 */ lui $v1, %hi(NextPartnerID)
/* 8410C 800EAC5C 8C63CFE4 */ lw $v1, %lo(NextPartnerID)($v1)
/* 84110 800EAC60 24020001 */ addiu $v0, $zero, 0x1
/* 84114 800EAC64 3C018011 */ lui $at, %hi(PartnerCommand)
/* 84118 800EAC68 AC22CD30 */ sw $v0, %lo(PartnerCommand)($at)
/* 8411C 800EAC6C 3C018011 */ lui $at, %hi(wCurrentPartnerId)
/* 84120 800EAC70 AC23CFD8 */ sw $v1, %lo(wCurrentPartnerId)($at)
/* 84124 800EAC74 0803AC53 */ j .L800EB14C
/* 84128 800EAC78 A2630012 */ sb $v1, 0x12($s3)
glabel .L800EAC7C
/* 8412C 800EAC7C 3C108011 */ lui $s0, %hi(PartnerCommandState)
/* 84130 800EAC80 2610CD34 */ addiu $s0, $s0, %lo(PartnerCommandState)
/* 84134 800EAC84 8E030000 */ lw $v1, 0x0($s0)
/* 84138 800EAC88 24110001 */ addiu $s1, $zero, 0x1
/* 8413C 800EAC8C 1071001D */ beq $v1, $s1, .L800EAD04
/* 84140 800EAC90 28620002 */ slti $v0, $v1, 0x2
/* 84144 800EAC94 50400005 */ beql $v0, $zero, .L800EACAC
/* 84148 800EAC98 24020002 */ addiu $v0, $zero, 0x2
/* 8414C 800EAC9C 10600007 */ beqz $v1, .L800EACBC
/* 84150 800EACA0 00000000 */ nop
/* 84154 800EACA4 0803AC53 */ j .L800EB14C
/* 84158 800EACA8 00000000 */ nop
.L800EACAC:
/* 8415C 800EACAC 1062002B */ beq $v1, $v0, .L800EAD5C
/* 84160 800EACB0 00000000 */ nop
/* 84164 800EACB4 0803AC53 */ j .L800EB14C
/* 84168 800EACB8 00000000 */ nop
.L800EACBC:
/* 8416C 800EACBC 0C03805E */ jal disable_player_input
/* 84170 800EACC0 00000000 */ nop
/* 84174 800EACC4 3C028011 */ lui $v0, %hi(NextPartnerID)
/* 84178 800EACC8 8C42CFE4 */ lw $v0, %lo(NextPartnerID)($v0)
/* 8417C 800EACCC 3C018011 */ lui $at, %hi(wCurrentPartnerId)
/* 84180 800EACD0 AC22CFD8 */ sw $v0, %lo(wCurrentPartnerId)($at)
/* 84184 800EACD4 0C03A974 */ jal create_partner_npc
/* 84188 800EACD8 A2620012 */ sb $v0, 0x12($s3)
/* 8418C 800EACDC 3C028011 */ lui $v0, %hi(wPartner)
/* 84190 800EACE0 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 84194 800EACE4 3C048011 */ lui $a0, %hi(wPartnerNpc)
/* 84198 800EACE8 8C84C930 */ lw $a0, %lo(wPartnerNpc)($a0)
/* 8419C 800EACEC 8C420010 */ lw $v0, 0x10($v0)
/* 841A0 800EACF0 0040F809 */ jalr $v0
/* 841A4 800EACF4 00000000 */ nop
/* 841A8 800EACF8 8E020000 */ lw $v0, 0x0($s0)
/* 841AC 800EACFC 24420001 */ addiu $v0, $v0, 0x1
/* 841B0 800EAD00 AE020000 */ sw $v0, 0x0($s0)
.L800EAD04:
/* 841B4 800EAD04 3C028011 */ lui $v0, %hi(wPartner)
/* 841B8 800EAD08 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 841BC 800EAD0C 24050014 */ addiu $a1, $zero, 0x14
/* 841C0 800EAD10 8C440014 */ lw $a0, 0x14($v0)
/* 841C4 800EAD14 0C0B0CF8 */ jal start_script
/* 841C8 800EAD18 24060020 */ addiu $a2, $zero, 0x20
/* 841CC 800EAD1C 8C430144 */ lw $v1, 0x144($v0)
/* 841D0 800EAD20 3C058011 */ lui $a1, %hi(wPartnerNpc)
/* 841D4 800EAD24 8CA5C930 */ lw $a1, %lo(wPartnerNpc)($a1)
/* 841D8 800EAD28 3C048011 */ lui $a0, %hi(PartnerCommandState)
/* 841DC 800EAD2C 2484CD34 */ addiu $a0, $a0, %lo(PartnerCommandState)
/* 841E0 800EAD30 3C018011 */ lui $at, %hi(D_8010CFD4)
/* 841E4 800EAD34 AC22CFD4 */ sw $v0, %lo(D_8010CFD4)($at)
/* 841E8 800EAD38 3C018011 */ lui $at, %hi(D_8010CFDC)
/* 841EC 800EAD3C AC23CFDC */ sw $v1, %lo(D_8010CFDC)($at)
/* 841F0 800EAD40 2403000A */ addiu $v1, $zero, 0xA
/* 841F4 800EAD44 A0430004 */ sb $v1, 0x4($v0)
/* 841F8 800EAD48 8C830000 */ lw $v1, 0x0($a0)
/* 841FC 800EAD4C AC45014C */ sw $a1, 0x14C($v0)
/* 84200 800EAD50 24630001 */ addiu $v1, $v1, 0x1
/* 84204 800EAD54 0803AC53 */ j .L800EB14C
/* 84208 800EAD58 AC830000 */ sw $v1, 0x0($a0)
.L800EAD5C:
/* 8420C 800EAD5C 3C108011 */ lui $s0, %hi(D_8010CFDC)
/* 84210 800EAD60 2610CFDC */ addiu $s0, $s0, %lo(D_8010CFDC)
/* 84214 800EAD64 0C0B1059 */ jal does_script_exist
/* 84218 800EAD68 8E040000 */ lw $a0, 0x0($s0)
/* 8421C 800EAD6C 144000F7 */ bnez $v0, .L800EB14C
/* 84220 800EAD70 24050014 */ addiu $a1, $zero, 0x14
/* 84224 800EAD74 3C028011 */ lui $v0, %hi(wPartner)
/* 84228 800EAD78 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 8422C 800EAD7C 8C440018 */ lw $a0, 0x18($v0)
/* 84230 800EAD80 0C0B0CF8 */ jal start_script
/* 84234 800EAD84 24060020 */ addiu $a2, $zero, 0x20
/* 84238 800EAD88 3C038011 */ lui $v1, %hi(wPartnerNpc)
/* 8423C 800EAD8C 8C63C930 */ lw $v1, %lo(wPartnerNpc)($v1)
/* 84240 800EAD90 8C440144 */ lw $a0, 0x144($v0)
/* 84244 800EAD94 3C018011 */ lui $at, %hi(D_8010CFD4)
/* 84248 800EAD98 AC22CFD4 */ sw $v0, %lo(D_8010CFD4)($at)
/* 8424C 800EAD9C AC43014C */ sw $v1, 0x14C($v0)
/* 84250 800EADA0 2403000A */ addiu $v1, $zero, 0xA
/* 84254 800EADA4 AE040000 */ sw $a0, 0x0($s0)
/* 84258 800EADA8 A0430004 */ sb $v1, 0x4($v0)
/* 8425C 800EADAC 3C018011 */ lui $at, %hi(PartnerCommand)
/* 84260 800EADB0 0C038069 */ jal enable_player_input
/* 84264 800EADB4 AC31CD30 */ sw $s1, %lo(PartnerCommand)($at)
/* 84268 800EADB8 0803AC53 */ j .L800EB14C
/* 8426C 800EADBC 00000000 */ nop
glabel .L800EADC0
/* 84270 800EADC0 3C118011 */ lui $s1, %hi(PartnerCommandState)
/* 84274 800EADC4 2631CD34 */ addiu $s1, $s1, %lo(PartnerCommandState)
/* 84278 800EADC8 8E300000 */ lw $s0, 0x0($s1)
/* 8427C 800EADCC 24020002 */ addiu $v0, $zero, 0x2
/* 84280 800EADD0 3C018011 */ lui $at, %hi(D_8010CFC4)
/* 84284 800EADD4 AC22CFC4 */ sw $v0, %lo(D_8010CFC4)($at)
/* 84288 800EADD8 12000005 */ beqz $s0, .L800EADF0
/* 8428C 800EADDC 24020001 */ addiu $v0, $zero, 0x1
/* 84290 800EADE0 12020025 */ beq $s0, $v0, .L800EAE78
/* 84294 800EADE4 24050014 */ addiu $a1, $zero, 0x14
/* 84298 800EADE8 0803AC53 */ j .L800EB14C
/* 8429C 800EADEC 00000000 */ nop
.L800EADF0:
/* 842A0 800EADF0 0C03805E */ jal disable_player_input
/* 842A4 800EADF4 00000000 */ nop
/* 842A8 800EADF8 3C028011 */ lui $v0, %hi(NextPartnerID)
/* 842AC 800EADFC 8C42CFE4 */ lw $v0, %lo(NextPartnerID)($v0)
/* 842B0 800EAE00 3C018011 */ lui $at, %hi(wCurrentPartnerId)
/* 842B4 800EAE04 AC22CFD8 */ sw $v0, %lo(wCurrentPartnerId)($at)
/* 842B8 800EAE08 0C03A974 */ jal create_partner_npc
/* 842BC 800EAE0C A2620012 */ sb $v0, 0x12($s3)
/* 842C0 800EAE10 3C048011 */ lui $a0, %hi(wPartnerNpc)
/* 842C4 800EAE14 8C84C930 */ lw $a0, %lo(wPartnerNpc)($a0)
/* 842C8 800EAE18 3C018010 */ lui $at, %hi(wSavedPartnerPosX)
/* 842CC 800EAE1C C422833C */ lwc1 $f2, %lo(wSavedPartnerPosX)($at)
/* 842D0 800EAE20 3C018010 */ lui $at, %hi(wSavedPartnerPosY)
/* 842D4 800EAE24 C4248340 */ lwc1 $f4, %lo(wSavedPartnerPosY)($at)
/* 842D8 800EAE28 3C018010 */ lui $at, %hi(wSavedPartnerPosZ)
/* 842DC 800EAE2C C4268344 */ lwc1 $f6, %lo(wSavedPartnerPosZ)($at)
/* 842E0 800EAE30 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 842E4 800EAE34 44810000 */ mtc1 $at, $f0
/* 842E8 800EAE38 3C028011 */ lui $v0, %hi(wPartner)
/* 842EC 800EAE3C 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 842F0 800EAE40 E4820038 */ swc1 $f2, 0x38($a0)
/* 842F4 800EAE44 E484003C */ swc1 $f4, 0x3C($a0)
/* 842F8 800EAE48 E4860040 */ swc1 $f6, 0x40($a0)
/* 842FC 800EAE4C AC80001C */ sw $zero, 0x1C($a0)
/* 84300 800EAE50 E4800054 */ swc1 $f0, 0x54($a0)
/* 84304 800EAE54 E4800058 */ swc1 $f0, 0x58($a0)
/* 84308 800EAE58 E480005C */ swc1 $f0, 0x5C($a0)
/* 8430C 800EAE5C 8C420010 */ lw $v0, 0x10($v0)
/* 84310 800EAE60 0040F809 */ jalr $v0
/* 84314 800EAE64 00000000 */ nop
/* 84318 800EAE68 8E220000 */ lw $v0, 0x0($s1)
/* 8431C 800EAE6C 24420001 */ addiu $v0, $v0, 0x1
/* 84320 800EAE70 0803AC53 */ j .L800EB14C
/* 84324 800EAE74 AE220000 */ sw $v0, 0x0($s1)
.L800EAE78:
/* 84328 800EAE78 3C028011 */ lui $v0, %hi(wPartner)
/* 8432C 800EAE7C 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 84330 800EAE80 8C440018 */ lw $a0, 0x18($v0)
/* 84334 800EAE84 0C0B0CF8 */ jal start_script
/* 84338 800EAE88 24060020 */ addiu $a2, $zero, 0x20
/* 8433C 800EAE8C 8C430144 */ lw $v1, 0x144($v0)
/* 84340 800EAE90 3C058011 */ lui $a1, %hi(wPartnerNpc)
/* 84344 800EAE94 24A5C930 */ addiu $a1, $a1, %lo(wPartnerNpc)
/* 84348 800EAE98 3C018011 */ lui $at, %hi(D_8010CFD4)
/* 8434C 800EAE9C AC22CFD4 */ sw $v0, %lo(D_8010CFD4)($at)
/* 84350 800EAEA0 3C018011 */ lui $at, %hi(D_8010CFDC)
/* 84354 800EAEA4 AC23CFDC */ sw $v1, %lo(D_8010CFDC)($at)
/* 84358 800EAEA8 8CA40000 */ lw $a0, 0x0($a1)
/* 8435C 800EAEAC 2403000A */ addiu $v1, $zero, 0xA
/* 84360 800EAEB0 A0430004 */ sb $v1, 0x4($v0)
/* 84364 800EAEB4 3C038011 */ lui $v1, %hi(wCurrentPartnerId)
/* 84368 800EAEB8 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1)
/* 8436C 800EAEBC AC44014C */ sw $a0, 0x14C($v0)
/* 84370 800EAEC0 000310C0 */ sll $v0, $v1, 3
/* 84374 800EAEC4 00431021 */ addu $v0, $v0, $v1
/* 84378 800EAEC8 00021080 */ sll $v0, $v0, 2
/* 8437C 800EAECC 8CA30000 */ lw $v1, 0x0($a1)
/* 84380 800EAED0 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x10)
/* 84384 800EAED4 00220821 */ addu $at, $at, $v0
/* 84388 800EAED8 8C228358 */ lw $v0, %lo(gPartnerAnimations + 0x10)($at)
/* 8438C 800EAEDC 3C018011 */ lui $at, %hi(PartnerCommand)
/* 84390 800EAEE0 AC30CD30 */ sw $s0, %lo(PartnerCommand)($at)
/* 84394 800EAEE4 0C038069 */ jal enable_player_input
/* 84398 800EAEE8 AC620028 */ sw $v0, 0x28($v1)
/* 8439C 800EAEEC 0803AC53 */ j .L800EB14C
/* 843A0 800EAEF0 00000000 */ nop
glabel .L800EAEF4
/* 843A4 800EAEF4 3C118011 */ lui $s1, %hi(PartnerCommandState)
/* 843A8 800EAEF8 2631CD34 */ addiu $s1, $s1, %lo(PartnerCommandState)
/* 843AC 800EAEFC 8E300000 */ lw $s0, 0x0($s1)
/* 843B0 800EAF00 12000005 */ beqz $s0, .L800EAF18
/* 843B4 800EAF04 24020001 */ addiu $v0, $zero, 0x1
/* 843B8 800EAF08 1202001A */ beq $s0, $v0, .L800EAF74
/* 843BC 800EAF0C 00000000 */ nop
/* 843C0 800EAF10 0803AC53 */ j .L800EB14C
/* 843C4 800EAF14 00000000 */ nop
.L800EAF18:
/* 843C8 800EAF18 3C108011 */ lui $s0, %hi(D_8010CFDC)
/* 843CC 800EAF1C 2610CFDC */ addiu $s0, $s0, %lo(D_8010CFDC)
/* 843D0 800EAF20 0C0B102B */ jal kill_script_by_ID
/* 843D4 800EAF24 8E040000 */ lw $a0, 0x0($s0)
/* 843D8 800EAF28 3C028011 */ lui $v0, %hi(wPartner)
/* 843DC 800EAF2C 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 843E0 800EAF30 24050014 */ addiu $a1, $zero, 0x14
/* 843E4 800EAF34 8C44001C */ lw $a0, 0x1C($v0)
.L800EAF38:
/* 843E8 800EAF38 0C0B0CF8 */ jal start_script
/* 843EC 800EAF3C 24060020 */ addiu $a2, $zero, 0x20
/* 843F0 800EAF40 8C430144 */ lw $v1, 0x144($v0)
/* 843F4 800EAF44 3C018011 */ lui $at, %hi(D_8010CFD4)
/* 843F8 800EAF48 AC22CFD4 */ sw $v0, %lo(D_8010CFD4)($at)
/* 843FC 800EAF4C AE030000 */ sw $v1, 0x0($s0)
/* 84400 800EAF50 3C048011 */ lui $a0, %hi(wPartnerNpc)
/* 84404 800EAF54 8C84C930 */ lw $a0, %lo(wPartnerNpc)($a0)
/* 84408 800EAF58 2403000A */ addiu $v1, $zero, 0xA
/* 8440C 800EAF5C A0430004 */ sb $v1, 0x4($v0)
/* 84410 800EAF60 8E230000 */ lw $v1, 0x0($s1)
/* 84414 800EAF64 24630001 */ addiu $v1, $v1, 0x1
/* 84418 800EAF68 AC44014C */ sw $a0, 0x14C($v0)
/* 8441C 800EAF6C 0803AC53 */ j .L800EB14C
/* 84420 800EAF70 AE230000 */ sw $v1, 0x0($s1)
.L800EAF74:
/* 84424 800EAF74 3C118011 */ lui $s1, %hi(D_8010CFDC)
/* 84428 800EAF78 2631CFDC */ addiu $s1, $s1, %lo(D_8010CFDC)
/* 8442C 800EAF7C 0C0B1059 */ jal does_script_exist
/* 84430 800EAF80 8E240000 */ lw $a0, 0x0($s1)
/* 84434 800EAF84 14400071 */ bnez $v0, .L800EB14C
/* 84438 800EAF88 24050014 */ addiu $a1, $zero, 0x14
/* 8443C 800EAF8C 3C028011 */ lui $v0, %hi(wPartner)
/* 84440 800EAF90 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 84444 800EAF94 8C440018 */ lw $a0, 0x18($v0)
/* 84448 800EAF98 0C0B0CF8 */ jal start_script
/* 8444C 800EAF9C 24060020 */ addiu $a2, $zero, 0x20
/* 84450 800EAFA0 3C038011 */ lui $v1, %hi(wPartnerNpc)
/* 84454 800EAFA4 8C63C930 */ lw $v1, %lo(wPartnerNpc)($v1)
/* 84458 800EAFA8 8C440144 */ lw $a0, 0x144($v0)
/* 8445C 800EAFAC 3C018011 */ lui $at, %hi(D_8010CFD4)
/* 84460 800EAFB0 AC22CFD4 */ sw $v0, %lo(D_8010CFD4)($at)
/* 84464 800EAFB4 AC43014C */ sw $v1, 0x14C($v0)
/* 84468 800EAFB8 2403000A */ addiu $v1, $zero, 0xA
/* 8446C 800EAFBC AE240000 */ sw $a0, 0x0($s1)
/* 84470 800EAFC0 A0430004 */ sb $v1, 0x4($v0)
/* 84474 800EAFC4 3C018011 */ lui $at, %hi(PartnerCommand)
/* 84478 800EAFC8 0803AC53 */ j .L800EB14C
/* 8447C 800EAFCC AC30CD30 */ sw $s0, %lo(PartnerCommand)($at)
glabel .L800EAFD0
/* 84480 800EAFD0 3C108011 */ lui $s0, %hi(PartnerCommandState)
/* 84484 800EAFD4 2610CD34 */ addiu $s0, $s0, %lo(PartnerCommandState)
/* 84488 800EAFD8 8E030000 */ lw $v1, 0x0($s0)
/* 8448C 800EAFDC 24110001 */ addiu $s1, $zero, 0x1
/* 84490 800EAFE0 3C018011 */ lui $at, %hi(D_8010CFC4)
/* 84494 800EAFE4 AC31CFC4 */ sw $s1, %lo(D_8010CFC4)($at)
/* 84498 800EAFE8 10710017 */ beq $v1, $s1, .L800EB048
/* 8449C 800EAFEC 28620002 */ slti $v0, $v1, 0x2
/* 844A0 800EAFF0 50400005 */ beql $v0, $zero, .L800EB008
/* 844A4 800EAFF4 24020002 */ addiu $v0, $zero, 0x2
/* 844A8 800EAFF8 10600007 */ beqz $v1, .L800EB018
/* 844AC 800EAFFC 00000000 */ nop
/* 844B0 800EB000 0803AC53 */ j .L800EB14C
/* 844B4 800EB004 00000000 */ nop
.L800EB008:
/* 844B8 800EB008 10620015 */ beq $v1, $v0, .L800EB060
/* 844BC 800EB00C 00000000 */ nop
/* 844C0 800EB010 0803AC53 */ j .L800EB14C
/* 844C4 800EB014 00000000 */ nop
.L800EB018:
/* 844C8 800EB018 0C03805E */ jal disable_player_input
/* 844CC 800EB01C 00000000 */ nop
/* 844D0 800EB020 3C028011 */ lui $v0, %hi(wPartner)
/* 844D4 800EB024 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 844D8 800EB028 3C048011 */ lui $a0, %hi(wPartnerNpc)
/* 844DC 800EB02C 8C84C930 */ lw $a0, %lo(wPartnerNpc)($a0)
/* 844E0 800EB030 8C420010 */ lw $v0, 0x10($v0)
/* 844E4 800EB034 0040F809 */ jalr $v0
/* 844E8 800EB038 00000000 */ nop
/* 844EC 800EB03C 8E020000 */ lw $v0, 0x0($s0)
/* 844F0 800EB040 24420001 */ addiu $v0, $v0, 0x1
/* 844F4 800EB044 AE020000 */ sw $v0, 0x0($s0)
.L800EB048:
/* 844F8 800EB048 3C038011 */ lui $v1, %hi(PartnerCommandState)
/* 844FC 800EB04C 2463CD34 */ addiu $v1, $v1, %lo(PartnerCommandState)
.L800EB050:
/* 84500 800EB050 8C620000 */ lw $v0, 0x0($v1)
/* 84504 800EB054 24420001 */ addiu $v0, $v0, 0x1
/* 84508 800EB058 0803AC53 */ j .L800EB14C
/* 8450C 800EB05C AC620000 */ sw $v0, 0x0($v1)
.L800EB060:
/* 84510 800EB060 80A20000 */ lb $v0, 0x0($a1)
/* 84514 800EB064 10510019 */ beq $v0, $s1, .L800EB0CC
/* 84518 800EB068 24050014 */ addiu $a1, $zero, 0x14
/* 8451C 800EB06C 3C028011 */ lui $v0, %hi(wPartner)
/* 84520 800EB070 8C42CFEC */ lw $v0, %lo(wPartner)($v0)
/* 84524 800EB074 C4C00028 */ lwc1 $f0, 0x28($a2)
/* 84528 800EB078 C4C2002C */ lwc1 $f2, 0x2C($a2)
/* 8452C 800EB07C C4C40030 */ lwc1 $f4, 0x30($a2)
/* 84530 800EB080 8C440018 */ lw $a0, 0x18($v0)
/* 84534 800EB084 3C018010 */ lui $at, %hi(wSavedPartnerPosX)
/* 84538 800EB088 E420833C */ swc1 $f0, %lo(wSavedPartnerPosX)($at)
/* 8453C 800EB08C 3C018010 */ lui $at, %hi(wSavedPartnerPosY)
/* 84540 800EB090 E4228340 */ swc1 $f2, %lo(wSavedPartnerPosY)($at)
/* 84544 800EB094 3C018010 */ lui $at, %hi(wSavedPartnerPosZ)
/* 84548 800EB098 E4248344 */ swc1 $f4, %lo(wSavedPartnerPosZ)($at)
/* 8454C 800EB09C 0C0B0CF8 */ jal start_script
/* 84550 800EB0A0 24060020 */ addiu $a2, $zero, 0x20
/* 84554 800EB0A4 3C038011 */ lui $v1, %hi(wPartnerNpc)
/* 84558 800EB0A8 8C63C930 */ lw $v1, %lo(wPartnerNpc)($v1)
/* 8455C 800EB0AC 8C440144 */ lw $a0, 0x144($v0)
/* 84560 800EB0B0 3C018011 */ lui $at, %hi(D_8010CFD4)
/* 84564 800EB0B4 AC22CFD4 */ sw $v0, %lo(D_8010CFD4)($at)
/* 84568 800EB0B8 AC43014C */ sw $v1, 0x14C($v0)
/* 8456C 800EB0BC 2403000A */ addiu $v1, $zero, 0xA
/* 84570 800EB0C0 3C018011 */ lui $at, %hi(D_8010CFDC)
/* 84574 800EB0C4 AC24CFDC */ sw $a0, %lo(D_8010CFDC)($at)
/* 84578 800EB0C8 A0430004 */ sb $v1, 0x4($v0)
.L800EB0CC:
/* 8457C 800EB0CC 0C038069 */ jal enable_player_input
/* 84580 800EB0D0 00000000 */ nop
/* 84584 800EB0D4 3C018011 */ lui $at, %hi(PartnerCommand)
/* 84588 800EB0D8 0803AC53 */ j .L800EB14C
/* 8458C 800EB0DC AC31CD30 */ sw $s1, %lo(PartnerCommand)($at)
glabel .L800EB0E0
/* 84590 800EB0E0 3C108011 */ lui $s0, %hi(PartnerCommandState)
/* 84594 800EB0E4 2610CD34 */ addiu $s0, $s0, %lo(PartnerCommandState)
/* 84598 800EB0E8 8E020000 */ lw $v0, 0x0($s0)
/* 8459C 800EB0EC 14400017 */ bnez $v0, .L800EB14C
/* 845A0 800EB0F0 00000000 */ nop
/* 845A4 800EB0F4 3C118011 */ lui $s1, %hi(D_8010CFDC)
/* 845A8 800EB0F8 2631CFDC */ addiu $s1, $s1, %lo(D_8010CFDC)
/* 845AC 800EB0FC 0C0B1059 */ jal does_script_exist
/* 845B0 800EB100 8E240000 */ lw $a0, 0x0($s1)
/* 845B4 800EB104 10400003 */ beqz $v0, .L800EB114
/* 845B8 800EB108 00000000 */ nop
/* 845BC 800EB10C 0C0B102B */ jal kill_script_by_ID
/* 845C0 800EB110 8E240000 */ lw $a0, 0x0($s1)
.L800EB114:
/* 845C4 800EB114 8E020000 */ lw $v0, 0x0($s0)
/* 845C8 800EB118 24420001 */ addiu $v0, $v0, 0x1
/* 845CC 800EB11C 0803AC53 */ j .L800EB14C
/* 845D0 800EB120 AE020000 */ sw $v0, 0x0($s0)
glabel .L800EB124
/* 845D4 800EB124 3C048011 */ lui $a0, %hi(D_8010CFC4)
/* 845D8 800EB128 2484CFC4 */ addiu $a0, $a0, %lo(D_8010CFC4)
/* 845DC 800EB12C 3C018011 */ lui $at, %hi(PartnerCommand)
/* 845E0 800EB130 AC20CD30 */ sw $zero, %lo(PartnerCommand)($at)
/* 845E4 800EB134 3C018011 */ lui $at, %hi(D_8010CFE0)
/* 845E8 800EB138 AC20CFE0 */ sw $zero, %lo(D_8010CFE0)($at)
/* 845EC 800EB13C 8C830000 */ lw $v1, 0x0($a0)
/* 845F0 800EB140 24020003 */ addiu $v0, $zero, 0x3
/* 845F4 800EB144 54620001 */ bnel $v1, $v0, .L800EB14C
/* 845F8 800EB148 AC800000 */ sw $zero, 0x0($a0)
glabel .L800EB14C
/* 845FC 800EB14C 8FBF0020 */ lw $ra, 0x20($sp)
/* 84600 800EB150 8FB3001C */ lw $s3, 0x1C($sp)
/* 84604 800EB154 8FB20018 */ lw $s2, 0x18($sp)
/* 84608 800EB158 8FB10014 */ lw $s1, 0x14($sp)
/* 8460C 800EB15C 8FB00010 */ lw $s0, 0x10($sp)
/* 84610 800EB160 03E00008 */ jr $ra
/* 84614 800EB164 27BD0028 */ addiu $sp, $sp, 0x28
### DECOMPILED C INSTRUCTIONS:
void _use_partner_ability(void) {
static u32 PartnerCommand; // goes into BSS, needs to be static for the function to match
PlayerData* playerData = &gPlayerData;
PartnerStatus* partnerStatus = &gPartnerStatus;
PlayerStatus* playerStatus = &gPlayerStatus;
if (partnerStatus->inputDisabledCount == 0) {
partnerStatus->stickX = gGameStatusPtr->stickX[gGameStatusPtr->multiplayerEnabled];
partnerStatus->stickY = gGameStatusPtr->stickY[gGameStatusPtr->multiplayerEnabled];
partnerStatus->currentButtons = gGameStatusPtr->currentButtons[gGameStatusPtr->multiplayerEnabled];
partnerStatus->pressedButtons = gGameStatusPtr->pressedButtons[gGameStatusPtr->multiplayerEnabled];
partnerStatus->heldButtons = gGameStatusPtr->heldButtons[gGameStatusPtr->multiplayerEnabled];
} else {
partnerStatus->stickX = 0;
partnerStatus->stickY = 0;
partnerStatus->currentButtons = 0;
partnerStatus->pressedButtons = 0;
partnerStatus->heldButtons = 0;
}
if (playerStatus->animFlags & PA_FLAG_INTERRUPT_USE_PARTNER) {
playerStatus->animFlags &= ~PA_FLAG_INTERRUPT_USE_PARTNER;
partnerStatus->pressedButtons |= BUTTON_B | BUTTON_C_DOWN;
playerStatus->animFlags |= PA_FLAG_FORCED_PARTNER_ABILITY_END;
}
if (NextPartnerCommand != PARTNER_CMD_NONE) {
PartnerCommand = NextPartnerCommand;
PartnerCommandState = 0;
NextPartnerCommand = PARTNER_CMD_NONE;
}
if (PartnerCommand >= PARTNER_CMD_INSTA_SWITCH) {
if (PartnerCommand != PARTNER_CMD_USE_ABILITY) {
D_8010CFC4 = 0;
}
}
switch (PartnerCommand) {
case PARTNER_CMD_NONE:
break;
case PARTNER_CMD_SWITCH:
D_8010CFC4 = 3;
switch (PartnerCommandState) {
case 0: // put away current partner
disable_player_input();
sfx_play_sound(SOUND_D);
kill_script_by_ID(wPartnerCurrentScriptID);
wPartnerCurrentScript = start_script(wPartner->putAway, EVT_PRIORITY_14, EVT_FLAG_RUN_IMMEDIATELY);
wPartnerCurrentScript->owner2.npc = wPartnerNpc;
wPartnerCurrentScriptID = wPartnerCurrentScript->id;
wPartnerCurrentScript->groupFlags = EVT_GROUP_08 | EVT_GROUP_02;
PartnerCommandState += 1;
set_time_freeze_mode(TIME_FREEZE_PARTIAL);
break;
case 1: // free old partner and create new one
if (does_script_exist(wPartnerCurrentScriptID)) {
break;
}
set_time_freeze_mode(TIME_FREEZE_NORMAL);
partner_free_npc();
playerData->currentPartner = wCurrentPartnerId = NextPartnerID;
create_partner_npc();
sfx_play_sound(SOUND_E);
wPartner->init(wPartnerNpc);
PartnerCommandState += 1;
// fallthrough
case 2: // take out new partner
wPartnerCurrentScript = start_script(wPartner->takeOut, EVT_PRIORITY_14, EVT_FLAG_RUN_IMMEDIATELY);
wPartnerCurrentScript->owner2.npc = wPartnerNpc;
wPartnerCurrentScriptID = wPartnerCurrentScript->id;
wPartnerCurrentScript->groupFlags = EVT_GROUP_08 | EVT_GROUP_02;
PartnerCommandState += 1;
set_time_freeze_mode(TIME_FREEZE_PARTIAL);
break;
case 3: // resume normal partner behaviour
if (does_script_exist(wPartnerCurrentScriptID)) {
break;
}
wPartnerCurrentScript = start_script(wPartner->update, EVT_PRIORITY_14, EVT_FLAG_RUN_IMMEDIATELY);
wPartnerCurrentScript->owner2.npc = wPartnerNpc;
wPartnerCurrentScriptID = wPartnerCurrentScript->id;
wPartnerCurrentScript->groupFlags = EVT_GROUP_08 | EVT_GROUP_02;
PartnerCommand = PARTNER_CMD_INIT;
enable_player_input();
set_time_freeze_mode(TIME_FREEZE_NORMAL);
break;
}
break;
case PARTNER_CMD_INSTA_SWITCH:
D_8010CFC4 = 3;
switch (PartnerCommandState) {
case 0:
kill_script_by_ID(wPartnerCurrentScriptID);
PartnerCommandState += 1;
case 1:
partner_free_npc();
playerData->currentPartner = wCurrentPartnerId = NextPartnerID;
create_partner_npc();
wPartnerNpc->pos.x = wSavedPartnerPosX;
wPartnerNpc->pos.y = wSavedPartnerPosY;
wPartnerNpc->pos.z = wSavedPartnerPosZ;
wPartnerNpc->jumpVelocity = 0.0f;
wPartnerNpc->scale.x = 1.0f;
wPartnerNpc->scale.y = 1.0f;
wPartnerNpc->scale.z = 1.0f;
wPartner->init(wPartnerNpc);
PartnerCommandState += 1;
// fallthrough
case 2:
PartnerCommandState += 1;
break;
case 3:
wPartnerCurrentScript = start_script(wPartner->update, EVT_PRIORITY_14, EVT_FLAG_RUN_IMMEDIATELY);
wPartnerCurrentScript->owner2.npc = wPartnerNpc;
wPartnerCurrentScriptID = wPartnerCurrentScript->id;
wPartnerCurrentScript->groupFlags = EVT_GROUP_08 | EVT_GROUP_02;
PartnerCommand = PARTNER_CMD_INIT;
break;
}
break;
case PARTNER_CMD_PUT_AWAY:
switch (PartnerCommandState) {
case 0: // put away current partner
disable_player_input();
sfx_play_sound(SOUND_D);
kill_script_by_ID(wPartnerCurrentScriptID);
wPartnerCurrentScript = start_script(wPartner->putAway, EVT_PRIORITY_14, EVT_FLAG_RUN_IMMEDIATELY);
wPartnerCurrentScript->owner2.npc = wPartnerNpc;
wPartnerCurrentScriptID = wPartnerCurrentScript->id;
wPartnerCurrentScript->groupFlags = EVT_GROUP_08 | EVT_GROUP_02;
PartnerCommandState += 1;
break;
case 1: // free old partner and resume game
if (does_script_exist(wPartnerCurrentScriptID)) {
break;
}
partner_free_npc();
PartnerCommand = PARTNER_CMD_INIT;
playerData->currentPartner = wCurrentPartnerId = NextPartnerID;
enable_player_input();
break;
}
break;
case PARTNER_CMD_INSTA_PUT_AWAY:
if (PartnerCommandState == 0) {
kill_script_by_ID(wPartnerCurrentScriptID);
partner_free_npc();
PartnerCommand = PARTNER_CMD_INIT;
playerData->currentPartner = wCurrentPartnerId = NextPartnerID;
break;
}
break;
case PARTNER_CMD_TAKE_OUT:
switch (PartnerCommandState) {
case 0: // create the new partner
disable_player_input();
playerData->currentPartner = wCurrentPartnerId = NextPartnerID;
create_partner_npc();
wPartner->init(wPartnerNpc);
PartnerCommandState += 1;
// fallthrough
case 1: // take out new partner
wPartnerCurrentScript = start_script(wPartner->takeOut, EVT_PRIORITY_14, EVT_FLAG_RUN_IMMEDIATELY);
wPartnerCurrentScript->owner2.npc = wPartnerNpc;
wPartnerCurrentScriptID = wPartnerCurrentScript->id;
wPartnerCurrentScript->groupFlags = EVT_GROUP_08 | EVT_GROUP_02;
PartnerCommandState += 1;
break;
case 2: // resume standard partner behaviour
if (does_script_exist(wPartnerCurrentScriptID)) {
break;
}
wPartnerCurrentScript = start_script(wPartner->update, EVT_PRIORITY_14, EVT_FLAG_RUN_IMMEDIATELY);
wPartnerCurrentScript->owner2.npc = wPartnerNpc;
wPartnerCurrentScriptID = wPartnerCurrentScript->id;
wPartnerCurrentScript->groupFlags = EVT_GROUP_08 | EVT_GROUP_02;
PartnerCommand = PARTNER_CMD_INIT;
enable_player_input();
break;
}
break;
case PARTNER_CMD_INSTA_TAKE_OUT:
D_8010CFC4 = 2;
switch (PartnerCommandState) {
case 0:
disable_player_input();
playerData->currentPartner = wCurrentPartnerId = NextPartnerID;
create_partner_npc();
wPartnerNpc->pos.x = wSavedPartnerPosX;
wPartnerNpc->pos.y = wSavedPartnerPosY;
wPartnerNpc->pos.z = wSavedPartnerPosZ;
wPartnerNpc->jumpVelocity = 0.0f;
wPartnerNpc->scale.x = 1.0f;
wPartnerNpc->scale.y = 1.0f;
wPartnerNpc->scale.z = 1.0f;
wPartner->init(wPartnerNpc);
PartnerCommandState += 1;
break;
case 1:
wPartnerCurrentScript = start_script(wPartner->update, EVT_PRIORITY_14, EVT_FLAG_RUN_IMMEDIATELY);
wPartnerCurrentScript->owner2.npc = wPartnerNpc;
wPartnerCurrentScriptID = wPartnerCurrentScript->id;
wPartnerCurrentScript->groupFlags = EVT_GROUP_08 | EVT_GROUP_02;
PartnerCommand = PARTNER_CMD_INIT;
wPartnerNpc->currentAnim = gPartnerAnimations[wCurrentPartnerId].fly;
enable_player_input();
break;
}
break;
case PARTNER_CMD_USE_ABILITY:
switch (PartnerCommandState) {
case 0:
kill_script_by_ID(wPartnerCurrentScriptID);
wPartnerCurrentScript = start_script(wPartner->useAbility, EVT_PRIORITY_14, EVT_FLAG_RUN_IMMEDIATELY);
wPartnerCurrentScript->owner2.npc = wPartnerNpc;
wPartnerCurrentScriptID = wPartnerCurrentScript->id;
wPartnerCurrentScript->groupFlags = EVT_GROUP_08 | EVT_GROUP_02;
PartnerCommandState += 1;
break;
case 1:
if (does_script_exist(wPartnerCurrentScriptID)) {
break;
}
wPartnerCurrentScript = start_script(wPartner->update, EVT_PRIORITY_14, EVT_FLAG_RUN_IMMEDIATELY);
wPartnerCurrentScript->owner2.npc = wPartnerNpc;
wPartnerCurrentScriptID = wPartnerCurrentScript->id;
wPartnerCurrentScript->groupFlags = EVT_GROUP_08 | EVT_GROUP_02;
PartnerCommand = PARTNER_CMD_INIT;
break;
}
break;
case PARTNER_CMD_RESET:
D_8010CFC4 = 1;
switch (PartnerCommandState) {
case 0:
disable_player_input();
wPartner->init(wPartnerNpc);
PartnerCommandState += 1;
// fallthrough
case 1:
PartnerCommandState += 1;
break;
case 2:
if (partnerStatus->partnerActionState != 1) {
wSavedPartnerPosX = playerStatus->position.x;
wSavedPartnerPosY = playerStatus->position.y;
wSavedPartnerPosZ = playerStatus->position.z;
wPartnerCurrentScript = start_script(wPartner->update, EVT_PRIORITY_14, EVT_FLAG_RUN_IMMEDIATELY);
wPartnerCurrentScript->owner2.npc = wPartnerNpc;
wPartnerCurrentScriptID = wPartnerCurrentScript->id;
wPartnerCurrentScript->groupFlags = EVT_GROUP_08 | EVT_GROUP_02;
}
enable_player_input();
PartnerCommand = PARTNER_CMD_INIT;
break;
}
break;
case PARTNER_CMD_ABORT:
if (PartnerCommandState == 0) {
if (does_script_exist(wPartnerCurrentScriptID)) {
kill_script_by_ID(wPartnerCurrentScriptID);
}
PartnerCommandState += 1;
}
break;
case PARTNER_CMD_INIT:
PartnerCommand = PARTNER_CMD_NONE;
D_8010CFE0 = 0;
if (D_8010CFC4 != 3) {
D_8010CFC4 = 0;
}
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel imgfx_appendGfx_mesh
/* D18B0 8013B1B0 27BDFFD0 */ addiu $sp, $sp, -0x30
/* D18B4 8013B1B4 AFB20018 */ sw $s2, 0x18($sp)
/* D18B8 8013B1B8 0080902D */ daddu $s2, $a0, $zero
/* D18BC 8013B1BC AFB3001C */ sw $s3, 0x1C($sp)
/* D18C0 8013B1C0 00A0982D */ daddu $s3, $a1, $zero
/* D18C4 8013B1C4 0000482D */ daddu $t1, $zero, $zero
/* D18C8 8013B1C8 3C05800A */ lui $a1, %hi(gMainGfxPos)
/* D18CC 8013B1CC 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos)
/* D18D0 8013B1D0 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* D18D4 8013B1D4 AFBF0020 */ sw $ra, 0x20($sp)
/* D18D8 8013B1D8 AFB10014 */ sw $s1, 0x14($sp)
/* D18DC 8013B1DC AFB00010 */ sw $s0, 0x10($sp)
/* D18E0 8013B1E0 F7B40028 */ sdc1 $f20, 0x28($sp)
/* D18E4 8013B1E4 8E480038 */ lw $t0, 0x38($s2)
/* D18E8 8013B1E8 8CA40000 */ lw $a0, 0x0($a1)
/* D18EC 8013B1EC 924A0002 */ lbu $t2, 0x2($s2)
/* D18F0 8013B1F0 0080102D */ daddu $v0, $a0, $zero
/* D18F4 8013B1F4 AC430000 */ sw $v1, 0x0($v0)
/* D18F8 8013B1F8 AC400004 */ sw $zero, 0x4($v0)
/* D18FC 8013B1FC 8E420014 */ lw $v0, 0x14($s2)
/* D1900 8013B200 24840008 */ addiu $a0, $a0, 0x8
/* D1904 8013B204 30420010 */ andi $v0, $v0, 0x10
/* D1908 8013B208 14400257 */ bnez $v0, .L8013BB68
/* D190C 8013B20C ACA40000 */ sw $a0, 0x0($a1)
/* D1910 8013B210 24820008 */ addiu $v0, $a0, 0x8
/* D1914 8013B214 ACA20000 */ sw $v0, 0x0($a1)
/* D1918 8013B218 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* D191C 8013B21C AC820000 */ sw $v0, 0x0($a0)
/* D1920 8013B220 3C028015 */ lui $v0, %hi(D_8014EE68)
/* D1924 8013B224 2442EE68 */ addiu $v0, $v0, %lo(D_8014EE68)
/* D1928 8013B228 AC820004 */ sw $v0, 0x4($a0)
/* D192C 8013B22C 8E420014 */ lw $v0, 0x14($s2)
/* D1930 8013B230 3C030001 */ lui $v1, (0x10000 >> 16)
/* D1934 8013B234 00431024 */ and $v0, $v0, $v1
/* D1938 8013B238 10400006 */ beqz $v0, .L8013B254
/* D193C 8013B23C 3C03E300 */ lui $v1, (0xE3001201 >> 16)
/* D1940 8013B240 34631201 */ ori $v1, $v1, (0xE3001201 & 0xFFFF)
/* D1944 8013B244 24820010 */ addiu $v0, $a0, 0x10
/* D1948 8013B248 ACA20000 */ sw $v0, 0x0($a1)
/* D194C 8013B24C AC830008 */ sw $v1, 0x8($a0)
/* D1950 8013B250 AC80000C */ sw $zero, 0xC($a0)
.L8013B254:
/* D1954 8013B254 8E420014 */ lw $v0, 0x14($s2)
/* D1958 8013B258 30420002 */ andi $v0, $v0, 0x2
/* D195C 8013B25C 10400009 */ beqz $v0, .L8013B284
/* D1960 8013B260 3C04D9FF */ lui $a0, (0xD9FFFFFF >> 16)
/* D1964 8013B264 8CA20000 */ lw $v0, 0x0($a1)
/* D1968 8013B268 3484FFFF */ ori $a0, $a0, (0xD9FFFFFF & 0xFFFF)
/* D196C 8013B26C 0040182D */ daddu $v1, $v0, $zero
/* D1970 8013B270 24420008 */ addiu $v0, $v0, 0x8
/* D1974 8013B274 ACA20000 */ sw $v0, 0x0($a1)
/* D1978 8013B278 24020400 */ addiu $v0, $zero, 0x400
/* D197C 8013B27C AC640000 */ sw $a0, 0x0($v1)
/* D1980 8013B280 AC620004 */ sw $v0, 0x4($v1)
.L8013B284:
/* D1984 8013B284 8E420014 */ lw $v0, 0x14($s2)
/* D1988 8013B288 30420004 */ andi $v0, $v0, 0x4
/* D198C 8013B28C 10400009 */ beqz $v0, .L8013B2B4
/* D1990 8013B290 3C04D9FF */ lui $a0, (0xD9FFFFFF >> 16)
/* D1994 8013B294 8CA20000 */ lw $v0, 0x0($a1)
/* D1998 8013B298 3484FFFF */ ori $a0, $a0, (0xD9FFFFFF & 0xFFFF)
/* D199C 8013B29C 0040182D */ daddu $v1, $v0, $zero
/* D19A0 8013B2A0 24420008 */ addiu $v0, $v0, 0x8
/* D19A4 8013B2A4 ACA20000 */ sw $v0, 0x0($a1)
/* D19A8 8013B2A8 24020200 */ addiu $v0, $zero, 0x200
/* D19AC 8013B2AC AC640000 */ sw $a0, 0x0($v1)
/* D19B0 8013B2B0 AC620004 */ sw $v0, 0x4($v1)
.L8013B2B4:
/* D19B4 8013B2B4 92430002 */ lbu $v1, 0x2($s2)
/* D19B8 8013B2B8 3C048015 */ lui $a0, %hi(ImgFXRenderModes)
/* D19BC 8013B2BC 2484EE98 */ addiu $a0, $a0, %lo(ImgFXRenderModes)
/* D19C0 8013B2C0 00031040 */ sll $v0, $v1, 1
/* D19C4 8013B2C4 00431021 */ addu $v0, $v0, $v1
/* D19C8 8013B2C8 00021080 */ sll $v0, $v0, 2
/* D19CC 8013B2CC 00441021 */ addu $v0, $v0, $a0
/* D19D0 8013B2D0 8C470000 */ lw $a3, 0x0($v0)
/* D19D4 8013B2D4 90430008 */ lbu $v1, 0x8($v0)
/* D19D8 8013B2D8 8C460004 */ lw $a2, 0x4($v0)
/* D19DC 8013B2DC 30630001 */ andi $v1, $v1, 0x1
/* D19E0 8013B2E0 54600001 */ bnel $v1, $zero, .L8013B2E8
/* D19E4 8013B2E4 24090001 */ addiu $t1, $zero, 0x1
.L8013B2E8:
/* D19E8 8013B2E8 3C028015 */ lui $v0, %hi(ImgFXCurrentTexturePtr)
/* D19EC 8013B2EC 8C42EE10 */ lw $v0, %lo(ImgFXCurrentTexturePtr)($v0)
/* D19F0 8013B2F0 3C018015 */ lui $at, %hi(D_80151050)
/* D19F4 8013B2F4 D4221050 */ ldc1 $f2, %lo(D_80151050)($at)
/* D19F8 8013B2F8 90430024 */ lbu $v1, 0x24($v0)
/* D19FC 8013B2FC 0120102D */ daddu $v0, $t1, $zero
/* D1A00 8013B300 44830000 */ mtc1 $v1, $f0
/* D1A04 8013B304 00000000 */ nop
/* D1A08 8013B308 46800020 */ cvt.s.w $f0, $f0
/* D1A0C 8013B30C 46000021 */ cvt.d.s $f0, $f0
/* D1A10 8013B310 46220003 */ div.d $f0, $f0, $f2
/* D1A14 8013B314 1440001E */ bnez $v0, .L8013B390
/* D1A18 8013B318 462000A0 */ cvt.s.d $f2, $f0
/* D1A1C 8013B31C 2C6200FF */ sltiu $v0, $v1, 0xFF
/* D1A20 8013B320 1040001B */ beqz $v0, .L8013B390
/* D1A24 8013B324 240200FF */ addiu $v0, $zero, 0xFF
/* D1A28 8013B328 92430002 */ lbu $v1, 0x2($s2)
/* D1A2C 8013B32C AE420038 */ sw $v0, 0x38($s2)
/* D1A30 8013B330 2C62000C */ sltiu $v0, $v1, 0xC
/* D1A34 8013B334 1040000B */ beqz $v0, .L8013B364
/* D1A38 8013B338 00031080 */ sll $v0, $v1, 2
/* D1A3C 8013B33C 3C018015 */ lui $at, %hi(jtbl_80151058)
/* D1A40 8013B340 00220821 */ addu $at, $at, $v0
/* D1A44 8013B344 8C221058 */ lw $v0, %lo(jtbl_80151058)($at)
/* D1A48 8013B348 00400008 */ jr $v0
/* D1A4C 8013B34C 00000000 */ nop
glabel .L8013B350
/* D1A50 8013B350 0804ECD9 */ j .L8013B364
/* D1A54 8013B354 240A0002 */ addiu $t2, $zero, 0x2
glabel .L8013B358
/* D1A58 8013B358 0804ECD9 */ j .L8013B364
/* D1A5C 8013B35C 240A0003 */ addiu $t2, $zero, 0x3
glabel .L8013B360
/* D1A60 8013B360 240A000A */ addiu $t2, $zero, 0xA
glabel .L8013B364
/* D1A64 8013B364 3C070040 */ lui $a3, (0x404B40 >> 16)
/* D1A68 8013B368 C6400038 */ lwc1 $f0, 0x38($s2)
/* D1A6C 8013B36C 46800020 */ cvt.s.w $f0, $f0
/* D1A70 8013B370 46020002 */ mul.s $f0, $f0, $f2
/* D1A74 8013B374 00000000 */ nop
/* D1A78 8013B378 34E74B40 */ ori $a3, $a3, (0x404B40 & 0xFFFF)
/* D1A7C 8013B37C 3C060010 */ lui $a2, (0x104B40 >> 16)
/* D1A80 8013B380 34C64B40 */ ori $a2, $a2, (0x104B40 & 0xFFFF)
/* D1A84 8013B384 24090001 */ addiu $t1, $zero, 0x1
/* D1A88 8013B388 4600018D */ trunc.w.s $f6, $f0
/* D1A8C 8013B38C 44083000 */ mfc1 $t0, $f6
.L8013B390:
/* D1A90 8013B390 8E420014 */ lw $v0, 0x14($s2)
/* D1A94 8013B394 30420400 */ andi $v0, $v0, 0x400
/* D1A98 8013B398 10400007 */ beqz $v0, .L8013B3B8
/* D1A9C 8013B39C 0120102D */ daddu $v0, $t1, $zero
/* D1AA0 8013B3A0 14400005 */ bnez $v0, .L8013B3B8
/* D1AA4 8013B3A4 2402FDFF */ addiu $v0, $zero, -0x201
/* D1AA8 8013B3A8 00E23824 */ and $a3, $a3, $v0
/* D1AAC 8013B3AC 00C23024 */ and $a2, $a2, $v0
/* D1AB0 8013B3B0 34E72040 */ ori $a3, $a3, 0x2040
/* D1AB4 8013B3B4 34C62040 */ ori $a2, $a2, 0x2040
.L8013B3B8:
/* D1AB8 8013B3B8 8E420014 */ lw $v0, 0x14($s2)
/* D1ABC 8013B3BC 30420040 */ andi $v0, $v0, 0x40
/* D1AC0 8013B3C0 1040000B */ beqz $v0, .L8013B3F0
/* D1AC4 8013B3C4 3C05D9FF */ lui $a1, (0xD9FFFFFE >> 16)
/* D1AC8 8013B3C8 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* D1ACC 8013B3CC 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* D1AD0 8013B3D0 8C820000 */ lw $v0, 0x0($a0)
/* D1AD4 8013B3D4 34A5FFFE */ ori $a1, $a1, (0xD9FFFFFE & 0xFFFF)
/* D1AD8 8013B3D8 0040182D */ daddu $v1, $v0, $zero
/* D1ADC 8013B3DC 24420008 */ addiu $v0, $v0, 0x8
/* D1AE0 8013B3E0 AC820000 */ sw $v0, 0x0($a0)
/* D1AE4 8013B3E4 AC650000 */ sw $a1, 0x0($v1)
/* D1AE8 8013B3E8 0804ED0D */ j .L8013B434
/* D1AEC 8013B3EC AC600004 */ sw $zero, 0x4($v1)
.L8013B3F0:
/* D1AF0 8013B3F0 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* D1AF4 8013B3F4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* D1AF8 8013B3F8 8C620000 */ lw $v0, 0x0($v1)
/* D1AFC 8013B3FC 34A5FFFF */ ori $a1, $a1, (0xD9FFFFFF & 0xFFFF)
/* D1B00 8013B400 0040202D */ daddu $a0, $v0, $zero
/* D1B04 8013B404 24420008 */ addiu $v0, $v0, 0x8
/* D1B08 8013B408 AC620000 */ sw $v0, 0x0($v1)
/* D1B0C 8013B40C 24020001 */ addiu $v0, $zero, 0x1
/* D1B10 8013B410 AC820004 */ sw $v0, 0x4($a0)
/* D1B14 8013B414 0120102D */ daddu $v0, $t1, $zero
/* D1B18 8013B418 10400004 */ beqz $v0, .L8013B42C
/* D1B1C 8013B41C AC850000 */ sw $a1, 0x0($a0)
/* D1B20 8013B420 34E70010 */ ori $a3, $a3, 0x10
/* D1B24 8013B424 0804ED0D */ j .L8013B434
/* D1B28 8013B428 34C60010 */ ori $a2, $a2, 0x10
.L8013B42C:
/* D1B2C 8013B42C 34E70030 */ ori $a3, $a3, 0x30
/* D1B30 8013B430 34C60030 */ ori $a2, $a2, 0x30
.L8013B434:
/* D1B34 8013B434 3C05E200 */ lui $a1, (0xE200001C >> 16)
/* D1B38 8013B438 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* D1B3C 8013B43C 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* D1B40 8013B440 8C820000 */ lw $v0, 0x0($a0)
/* D1B44 8013B444 34A5001C */ ori $a1, $a1, (0xE200001C & 0xFFFF)
/* D1B48 8013B448 AE460078 */ sw $a2, 0x78($s2)
/* D1B4C 8013B44C 0040182D */ daddu $v1, $v0, $zero
/* D1B50 8013B450 24420008 */ addiu $v0, $v0, 0x8
/* D1B54 8013B454 AC820000 */ sw $v0, 0x0($a0)
/* D1B58 8013B458 00E61025 */ or $v0, $a3, $a2
/* D1B5C 8013B45C AC620004 */ sw $v0, 0x4($v1)
/* D1B60 8013B460 2D420011 */ sltiu $v0, $t2, 0x11
/* D1B64 8013B464 104001C0 */ beqz $v0, .L8013BB68
/* D1B68 8013B468 AC650000 */ sw $a1, 0x0($v1)
/* D1B6C 8013B46C 000A1080 */ sll $v0, $t2, 2
/* D1B70 8013B470 3C018015 */ lui $at, %hi(jtbl_80151088)
/* D1B74 8013B474 00220821 */ addu $at, $at, $v0
/* D1B78 8013B478 8C221088 */ lw $v0, %lo(jtbl_80151088)($at)
/* D1B7C 8013B47C 00400008 */ jr $v0
/* D1B80 8013B480 00000000 */ nop
glabel .L8013B484
/* D1B84 8013B484 3C02FC11 */ lui $v0, (0xFC11FE23 >> 16)
/* D1B88 8013B488 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* D1B8C 8013B48C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* D1B90 8013B490 8C650000 */ lw $a1, 0x0($v1)
/* D1B94 8013B494 3442FE23 */ ori $v0, $v0, (0xFC11FE23 & 0xFFFF)
/* D1B98 8013B498 00A0202D */ daddu $a0, $a1, $zero
/* D1B9C 8013B49C 24A50008 */ addiu $a1, $a1, 0x8
/* D1BA0 8013B4A0 AC650000 */ sw $a1, 0x0($v1)
/* D1BA4 8013B4A4 AC820000 */ sw $v0, 0x0($a0)
/* D1BA8 8013B4A8 2402F3F9 */ addiu $v0, $zero, -0xC07
/* D1BAC 8013B4AC 0804EEAD */ j .L8013BAB4
/* D1BB0 8013B4B0 AC820004 */ sw $v0, 0x4($a0)
glabel .L8013B4B4
/* D1BB4 8013B4B4 190001EC */ blez $t0, .L8013BC68
/* D1BB8 8013B4B8 3C06FCFF */ lui $a2, (0xFCFF97FF >> 16)
/* D1BBC 8013B4BC 34C697FF */ ori $a2, $a2, (0xFCFF97FF & 0xFFFF)
/* D1BC0 8013B4C0 3C05FF2C */ lui $a1, (0xFF2CFE7F >> 16)
/* D1BC4 8013B4C4 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* D1BC8 8013B4C8 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* D1BCC 8013B4CC 8C820000 */ lw $v0, 0x0($a0)
/* D1BD0 8013B4D0 34A5FE7F */ ori $a1, $a1, (0xFF2CFE7F & 0xFFFF)
/* D1BD4 8013B4D4 0040182D */ daddu $v1, $v0, $zero
/* D1BD8 8013B4D8 24420008 */ addiu $v0, $v0, 0x8
/* D1BDC 8013B4DC AC820000 */ sw $v0, 0x0($a0)
/* D1BE0 8013B4E0 AC660000 */ sw $a2, 0x0($v1)
/* D1BE4 8013B4E4 AC650004 */ sw $a1, 0x4($v1)
/* D1BE8 8013B4E8 24430008 */ addiu $v1, $v0, 0x8
/* D1BEC 8013B4EC AC830000 */ sw $v1, 0x0($a0)
/* D1BF0 8013B4F0 3C03FA00 */ lui $v1, (0xFA000000 >> 16)
/* D1BF4 8013B4F4 AC430000 */ sw $v1, 0x0($v0)
/* D1BF8 8013B4F8 0804EED9 */ j .L8013BB64
/* D1BFC 8013B4FC 310300FF */ andi $v1, $t0, 0xFF
glabel .L8013B500
/* D1C00 8013B500 190001D9 */ blez $t0, .L8013BC68
/* D1C04 8013B504 3C06FC11 */ lui $a2, (0xFC119623 >> 16)
/* D1C08 8013B508 34C69623 */ ori $a2, $a2, (0xFC119623 & 0xFFFF)
/* D1C0C 8013B50C 3C04FF2F */ lui $a0, (0xFF2FFFFF >> 16)
/* D1C10 8013B510 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* D1C14 8013B514 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* D1C18 8013B518 8C650000 */ lw $a1, 0x0($v1)
/* D1C1C 8013B51C 3484FFFF */ ori $a0, $a0, (0xFF2FFFFF & 0xFFFF)
/* D1C20 8013B520 00A0102D */ daddu $v0, $a1, $zero
/* D1C24 8013B524 24A50008 */ addiu $a1, $a1, 0x8
/* D1C28 8013B528 AC650000 */ sw $a1, 0x0($v1)
/* D1C2C 8013B52C AC460000 */ sw $a2, 0x0($v0)
/* D1C30 8013B530 AC440004 */ sw $a0, 0x4($v0)
/* D1C34 8013B534 24A20008 */ addiu $v0, $a1, 0x8
/* D1C38 8013B538 AC620000 */ sw $v0, 0x0($v1)
/* D1C3C 8013B53C 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* D1C40 8013B540 ACA20000 */ sw $v0, 0x0($a1)
/* D1C44 8013B544 9242002F */ lbu $v0, 0x2F($s2)
/* D1C48 8013B548 92440033 */ lbu $a0, 0x33($s2)
/* D1C4C 8013B54C 92430037 */ lbu $v1, 0x37($s2)
/* D1C50 8013B550 00021600 */ sll $v0, $v0, 24
/* D1C54 8013B554 00042400 */ sll $a0, $a0, 16
/* D1C58 8013B558 00441025 */ or $v0, $v0, $a0
/* D1C5C 8013B55C 00031A00 */ sll $v1, $v1, 8
/* D1C60 8013B560 00431025 */ or $v0, $v0, $v1
/* D1C64 8013B564 0804EEB8 */ j .L8013BAE0
/* D1C68 8013B568 310300FF */ andi $v1, $t0, 0xFF
glabel .L8013B56C
/* D1C6C 8013B56C 3C06FC60 */ lui $a2, (0xFC60FEC1 >> 16)
/* D1C70 8013B570 34C6FEC1 */ ori $a2, $a2, (0xFC60FEC1 & 0xFFFF)
/* D1C74 8013B574 0804EEA4 */ j .L8013BA90
/* D1C78 8013B578 3C0433FD */ lui $a0, (0x33FDF2F9 >> 16)
glabel .L8013B57C
/* D1C7C 8013B57C 190001BA */ blez $t0, .L8013BC68
/* D1C80 8013B580 3C06FC60 */ lui $a2, (0xFC6096C1 >> 16)
/* D1C84 8013B584 34C696C1 */ ori $a2, $a2, (0xFC6096C1 & 0xFFFF)
/* D1C88 8013B588 3C04FF2D */ lui $a0, (0xFF2DFEFF >> 16)
/* D1C8C 8013B58C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* D1C90 8013B590 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* D1C94 8013B594 8C650000 */ lw $a1, 0x0($v1)
/* D1C98 8013B598 3484FEFF */ ori $a0, $a0, (0xFF2DFEFF & 0xFFFF)
/* D1C9C 8013B59C 00A0102D */ daddu $v0, $a1, $zero
/* D1CA0 8013B5A0 24A50008 */ addiu $a1, $a1, 0x8
/* D1CA4 8013B5A4 AC650000 */ sw $a1, 0x0($v1)
/* D1CA8 8013B5A8 AC460000 */ sw $a2, 0x0($v0)
/* D1CAC 8013B5AC AC440004 */ sw $a0, 0x4($v0)
/* D1CB0 8013B5B0 24A20008 */ addiu $v0, $a1, 0x8
/* D1CB4 8013B5B4 AC620000 */ sw $v0, 0x0($v1)
/* D1CB8 8013B5B8 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* D1CBC 8013B5BC ACA20000 */ sw $v0, 0x0($a1)
/* D1CC0 8013B5C0 9242002F */ lbu $v0, 0x2F($s2)
/* D1CC4 8013B5C4 92440033 */ lbu $a0, 0x33($s2)
/* D1CC8 8013B5C8 92430037 */ lbu $v1, 0x37($s2)
/* D1CCC 8013B5CC 00021600 */ sll $v0, $v0, 24
/* D1CD0 8013B5D0 00042400 */ sll $a0, $a0, 16
/* D1CD4 8013B5D4 00441025 */ or $v0, $v0, $a0
/* D1CD8 8013B5D8 00031A00 */ sll $v1, $v1, 8
/* D1CDC 8013B5DC 00431025 */ or $v0, $v0, $v1
/* D1CE0 8013B5E0 0804EEB8 */ j .L8013BAE0
/* D1CE4 8013B5E4 310300FF */ andi $v1, $t0, 0xFF
glabel .L8013B5E8
/* D1CE8 8013B5E8 3C03FC12 */ lui $v1, (0xFC127E24 >> 16)
/* D1CEC 8013B5EC 34637E24 */ ori $v1, $v1, (0xFC127E24 & 0xFFFF)
/* D1CF0 8013B5F0 3C07D9FF */ lui $a3, (0xD9FFFFFF >> 16)
/* D1CF4 8013B5F4 34E7FFFF */ ori $a3, $a3, (0xD9FFFFFF & 0xFFFF)
/* D1CF8 8013B5F8 3C060020 */ lui $a2, (0x200004 >> 16)
/* D1CFC 8013B5FC 34C60004 */ ori $a2, $a2, (0x200004 & 0xFFFF)
/* D1D00 8013B600 3C08D9FD */ lui $t0, (0xD9FDFFFF >> 16)
/* D1D04 8013B604 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* D1D08 8013B608 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* D1D0C 8013B60C 8C820000 */ lw $v0, 0x0($a0)
/* D1D10 8013B610 3508FFFF */ ori $t0, $t0, (0xD9FDFFFF & 0xFFFF)
/* D1D14 8013B614 0040282D */ daddu $a1, $v0, $zero
/* D1D18 8013B618 24420008 */ addiu $v0, $v0, 0x8
/* D1D1C 8013B61C AC820000 */ sw $v0, 0x0($a0)
/* D1D20 8013B620 ACA30000 */ sw $v1, 0x0($a1)
/* D1D24 8013B624 2403F3F9 */ addiu $v1, $zero, -0xC07
/* D1D28 8013B628 ACA30004 */ sw $v1, 0x4($a1)
/* D1D2C 8013B62C 24430008 */ addiu $v1, $v0, 0x8
/* D1D30 8013B630 AC830000 */ sw $v1, 0x0($a0)
/* D1D34 8013B634 24430010 */ addiu $v1, $v0, 0x10
/* D1D38 8013B638 AC470000 */ sw $a3, 0x0($v0)
/* D1D3C 8013B63C AC460004 */ sw $a2, 0x4($v0)
/* D1D40 8013B640 AC830000 */ sw $v1, 0x0($a0)
/* D1D44 8013B644 AC480008 */ sw $t0, 0x8($v0)
/* D1D48 8013B648 0804EEDA */ j .L8013BB68
/* D1D4C 8013B64C AC40000C */ sw $zero, 0xC($v0)
glabel .L8013B650
/* D1D50 8013B650 3C07FC60 */ lui $a3, (0xFC60FEC1 >> 16)
/* D1D54 8013B654 34E7FEC1 */ ori $a3, $a3, (0xFC60FEC1 & 0xFFFF)
/* D1D58 8013B658 3C0544FE */ lui $a1, (0x44FE7339 >> 16)
/* D1D5C 8013B65C 0804EDA7 */ j .L8013B69C
/* D1D60 8013B660 34A57339 */ ori $a1, $a1, (0x44FE7339 & 0xFFFF)
glabel .L8013B664
/* D1D64 8013B664 3C07FCFF */ lui $a3, (0xFCFF99FF >> 16)
/* D1D68 8013B668 34E799FF */ ori $a3, $a3, (0xFCFF99FF & 0xFFFF)
/* D1D6C 8013B66C 3C05FF30 */ lui $a1, (0xFF30FE7F >> 16)
/* D1D70 8013B670 0804EDA7 */ j .L8013B69C
/* D1D74 8013B674 34A5FE7F */ ori $a1, $a1, (0xFF30FE7F & 0xFFFF)
glabel .L8013B678
/* D1D78 8013B678 3C07FC12 */ lui $a3, (0xFC121824 >> 16)
/* D1D7C 8013B67C 34E71824 */ ori $a3, $a3, (0xFC121824 & 0xFFFF)
/* D1D80 8013B680 3C05FF33 */ lui $a1, (0xFF33FFFF >> 16)
/* D1D84 8013B684 0804EDA7 */ j .L8013B69C
/* D1D88 8013B688 34A5FFFF */ ori $a1, $a1, (0xFF33FFFF & 0xFFFF)
glabel .L8013B68C
/* D1D8C 8013B68C 3C07FC60 */ lui $a3, (0xFC6098C1 >> 16)
/* D1D90 8013B690 34E798C1 */ ori $a3, $a3, (0xFC6098C1 & 0xFFFF)
/* D1D94 8013B694 3C054432 */ lui $a1, (0x44327F3F >> 16)
/* D1D98 8013B698 34A57F3F */ ori $a1, $a1, (0x44327F3F & 0xFFFF)
.L8013B69C:
/* D1D9C 8013B69C 3C08D9FF */ lui $t0, (0xD9FFFFFF >> 16)
/* D1DA0 8013B6A0 3508FFFF */ ori $t0, $t0, (0xD9FFFFFF & 0xFFFF)
/* D1DA4 8013B6A4 3C060020 */ lui $a2, (0x200004 >> 16)
/* D1DA8 8013B6A8 34C60004 */ ori $a2, $a2, (0x200004 & 0xFFFF)
/* D1DAC 8013B6AC 3C09D9FD */ lui $t1, (0xD9FDFFFF >> 16)
/* D1DB0 8013B6B0 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* D1DB4 8013B6B4 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* D1DB8 8013B6B8 8C820000 */ lw $v0, 0x0($a0)
/* D1DBC 8013B6BC 3529FFFF */ ori $t1, $t1, (0xD9FDFFFF & 0xFFFF)
/* D1DC0 8013B6C0 0040182D */ daddu $v1, $v0, $zero
/* D1DC4 8013B6C4 24420008 */ addiu $v0, $v0, 0x8
/* D1DC8 8013B6C8 AC820000 */ sw $v0, 0x0($a0)
/* D1DCC 8013B6CC AC670000 */ sw $a3, 0x0($v1)
/* D1DD0 8013B6D0 AC650004 */ sw $a1, 0x4($v1)
/* D1DD4 8013B6D4 24430008 */ addiu $v1, $v0, 0x8
/* D1DD8 8013B6D8 AC830000 */ sw $v1, 0x0($a0)
/* D1DDC 8013B6DC 24430010 */ addiu $v1, $v0, 0x10
/* D1DE0 8013B6E0 AC480000 */ sw $t0, 0x0($v0)
/* D1DE4 8013B6E4 AC460004 */ sw $a2, 0x4($v0)
/* D1DE8 8013B6E8 AC830000 */ sw $v1, 0x0($a0)
/* D1DEC 8013B6EC AC490008 */ sw $t1, 0x8($v0)
/* D1DF0 8013B6F0 0804EEDA */ j .L8013BB68
/* D1DF4 8013B6F4 AC40000C */ sw $zero, 0xC($v0)
glabel .L8013B6F8
/* D1DF8 8013B6F8 8E420014 */ lw $v0, 0x14($s2)
/* D1DFC 8013B6FC 3042A000 */ andi $v0, $v0, 0xA000
/* D1E00 8013B700 104000FA */ beqz $v0, .L8013BAEC
/* D1E04 8013B704 3C02FC12 */ lui $v0, (0xFC127E24 >> 16)
/* D1E08 8013B708 34427E24 */ ori $v0, $v0, (0xFC127E24 & 0xFFFF)
/* D1E0C 8013B70C 3C06D9FF */ lui $a2, (0xD9FFFFFF >> 16)
/* D1E10 8013B710 34C6FFFF */ ori $a2, $a2, (0xD9FFFFFF & 0xFFFF)
/* D1E14 8013B714 3C050022 */ lui $a1, (0x220004 >> 16)
/* D1E18 8013B718 3C11800A */ lui $s1, %hi(gMainGfxPos)
/* D1E1C 8013B71C 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos)
/* D1E20 8013B720 8E230000 */ lw $v1, 0x0($s1)
/* D1E24 8013B724 34A50004 */ ori $a1, $a1, (0x220004 & 0xFFFF)
/* D1E28 8013B728 0060202D */ daddu $a0, $v1, $zero
/* D1E2C 8013B72C 24630008 */ addiu $v1, $v1, 0x8
/* D1E30 8013B730 AE230000 */ sw $v1, 0x0($s1)
/* D1E34 8013B734 AC820000 */ sw $v0, 0x0($a0)
/* D1E38 8013B738 2402F3F9 */ addiu $v0, $zero, -0xC07
/* D1E3C 8013B73C AC820004 */ sw $v0, 0x4($a0)
/* D1E40 8013B740 3C028007 */ lui $v0, %hi(gCurrentCameraID)
/* D1E44 8013B744 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0)
/* D1E48 8013B748 3C04800B */ lui $a0, %hi(gCameras)
/* D1E4C 8013B74C 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* D1E50 8013B750 AC660000 */ sw $a2, 0x0($v1)
/* D1E54 8013B754 AC650004 */ sw $a1, 0x4($v1)
/* D1E58 8013B758 00028080 */ sll $s0, $v0, 2
/* D1E5C 8013B75C 02028021 */ addu $s0, $s0, $v0
/* D1E60 8013B760 00108080 */ sll $s0, $s0, 2
/* D1E64 8013B764 02028023 */ subu $s0, $s0, $v0
/* D1E68 8013B768 001010C0 */ sll $v0, $s0, 3
/* D1E6C 8013B76C 02028021 */ addu $s0, $s0, $v0
/* D1E70 8013B770 001080C0 */ sll $s0, $s0, 3
/* D1E74 8013B774 02048021 */ addu $s0, $s0, $a0
/* D1E78 8013B778 C600006C */ lwc1 $f0, 0x6C($s0)
/* D1E7C 8013B77C 24630008 */ addiu $v1, $v1, 0x8
/* D1E80 8013B780 AE230000 */ sw $v1, 0x0($s1)
/* D1E84 8013B784 4600018D */ trunc.w.s $f6, $f0
/* D1E88 8013B788 44043000 */ mfc1 $a0, $f6
/* D1E8C 8013B78C 00000000 */ nop
/* D1E90 8013B790 00042400 */ sll $a0, $a0, 16
/* D1E94 8013B794 0C00A4F5 */ jal cosine
/* D1E98 8013B798 00042403 */ sra $a0, $a0, 16
/* D1E9C 8013B79C C604006C */ lwc1 $f4, 0x6C($s0)
/* D1EA0 8013B7A0 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* D1EA4 8013B7A4 44811000 */ mtc1 $at, $f2
/* D1EA8 8013B7A8 00000000 */ nop
/* D1EAC 8013B7AC 46022100 */ add.s $f4, $f4, $f2
/* D1EB0 8013B7B0 3C0142F0 */ lui $at, (0x42F00000 >> 16)
/* D1EB4 8013B7B4 4481A000 */ mtc1 $at, $f20
/* D1EB8 8013B7B8 00000000 */ nop
/* D1EBC 8013B7BC 46140002 */ mul.s $f0, $f0, $f20
/* D1EC0 8013B7C0 00000000 */ nop
/* D1EC4 8013B7C4 4600218D */ trunc.w.s $f6, $f4
/* D1EC8 8013B7C8 44043000 */ mfc1 $a0, $f6
/* D1ECC 8013B7CC 00000000 */ nop
/* D1ED0 8013B7D0 00042400 */ sll $a0, $a0, 16
/* D1ED4 8013B7D4 4600018D */ trunc.w.s $f6, $f0
/* D1ED8 8013B7D8 44103000 */ mfc1 $s0, $f6
/* D1EDC 8013B7DC 0C00A4F5 */ jal cosine
/* D1EE0 8013B7E0 00042403 */ sra $a0, $a0, 16
/* D1EE4 8013B7E4 3C06DC08 */ lui $a2, (0xDC08060A >> 16)
/* D1EE8 8013B7E8 34C6060A */ ori $a2, $a2, (0xDC08060A & 0xFFFF)
/* D1EEC 8013B7EC 3C07DC08 */ lui $a3, (0xDC08090A >> 16)
/* D1EF0 8013B7F0 34E7090A */ ori $a3, $a3, (0xDC08090A & 0xFFFF)
/* D1EF4 8013B7F4 3C08DC08 */ lui $t0, (0xDC080C0A >> 16)
/* D1EF8 8013B7F8 35080C0A */ ori $t0, $t0, (0xDC080C0A & 0xFFFF)
/* D1EFC 8013B7FC 00101600 */ sll $v0, $s0, 24
/* D1F00 8013B800 00021603 */ sra $v0, $v0, 24
/* D1F04 8013B804 00021023 */ negu $v0, $v0
/* D1F08 8013B808 3C048015 */ lui $a0, %hi(ImgFXLights)
/* D1F0C 8013B80C 2484EE18 */ addiu $a0, $a0, %lo(ImgFXLights)
/* D1F10 8013B810 8E230000 */ lw $v1, 0x0($s1)
/* D1F14 8013B814 46140002 */ mul.s $f0, $f0, $f20
/* D1F18 8013B818 00000000 */ nop
/* D1F1C 8013B81C A0820010 */ sb $v0, 0x10($a0)
/* D1F20 8013B820 A0900020 */ sb $s0, 0x20($a0)
/* D1F24 8013B824 0060282D */ daddu $a1, $v1, $zero
/* D1F28 8013B828 24630008 */ addiu $v1, $v1, 0x8
/* D1F2C 8013B82C 24620008 */ addiu $v0, $v1, 0x8
/* D1F30 8013B830 AE230000 */ sw $v1, 0x0($s1)
/* D1F34 8013B834 AE220000 */ sw $v0, 0x0($s1)
/* D1F38 8013B838 24620010 */ addiu $v0, $v1, 0x10
/* D1F3C 8013B83C AE220000 */ sw $v0, 0x0($s1)
/* D1F40 8013B840 24620018 */ addiu $v0, $v1, 0x18
/* D1F44 8013B844 AE220000 */ sw $v0, 0x0($s1)
/* D1F48 8013B848 4600018D */ trunc.w.s $f6, $f0
/* D1F4C 8013B84C 44023000 */ mfc1 $v0, $f6
/* D1F50 8013B850 00000000 */ nop
/* D1F54 8013B854 A0820012 */ sb $v0, 0x12($a0)
/* D1F58 8013B858 00021600 */ sll $v0, $v0, 24
/* D1F5C 8013B85C 00021603 */ sra $v0, $v0, 24
/* D1F60 8013B860 00021023 */ negu $v0, $v0
/* D1F64 8013B864 A0820022 */ sb $v0, 0x22($a0)
/* D1F68 8013B868 3C02DB02 */ lui $v0, (0xDB020000 >> 16)
/* D1F6C 8013B86C ACA20000 */ sw $v0, 0x0($a1)
/* D1F70 8013B870 24020030 */ addiu $v0, $zero, 0x30
/* D1F74 8013B874 ACA20004 */ sw $v0, 0x4($a1)
/* D1F78 8013B878 24820008 */ addiu $v0, $a0, 0x8
/* D1F7C 8013B87C AC620004 */ sw $v0, 0x4($v1)
/* D1F80 8013B880 24820018 */ addiu $v0, $a0, 0x18
/* D1F84 8013B884 AC660000 */ sw $a2, 0x0($v1)
/* D1F88 8013B888 AC670008 */ sw $a3, 0x8($v1)
/* D1F8C 8013B88C AC62000C */ sw $v0, 0xC($v1)
/* D1F90 8013B890 AC680010 */ sw $t0, 0x10($v1)
/* D1F94 8013B894 0804EEDA */ j .L8013BB68
/* D1F98 8013B898 AC640014 */ sw $a0, 0x14($v1)
glabel .L8013B89C
/* D1F9C 8013B89C 8E43002C */ lw $v1, 0x2C($s2)
/* D1FA0 8013B8A0 1460001F */ bnez $v1, .L8013B920
/* D1FA4 8013B8A4 240B0001 */ addiu $t3, $zero, 0x1
/* D1FA8 8013B8A8 3C06FC71 */ lui $a2, (0xFC7196E3 >> 16)
/* D1FAC 8013B8AC 34C696E3 */ ori $a2, $a2, (0xFC7196E3 & 0xFFFF)
/* D1FB0 8013B8B0 3C04332C */ lui $a0, (0x332CFE7F >> 16)
/* D1FB4 8013B8B4 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* D1FB8 8013B8B8 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* D1FBC 8013B8BC 8C650000 */ lw $a1, 0x0($v1)
/* D1FC0 8013B8C0 3484FE7F */ ori $a0, $a0, (0x332CFE7F & 0xFFFF)
/* D1FC4 8013B8C4 00A0102D */ daddu $v0, $a1, $zero
/* D1FC8 8013B8C8 24A50008 */ addiu $a1, $a1, 0x8
/* D1FCC 8013B8CC AC650000 */ sw $a1, 0x0($v1)
/* D1FD0 8013B8D0 C6400038 */ lwc1 $f0, 0x38($s2)
/* D1FD4 8013B8D4 46800020 */ cvt.s.w $f0, $f0
/* D1FD8 8013B8D8 AC460000 */ sw $a2, 0x0($v0)
/* D1FDC 8013B8DC AC440004 */ sw $a0, 0x4($v0)
/* D1FE0 8013B8E0 24A20008 */ addiu $v0, $a1, 0x8
/* D1FE4 8013B8E4 AC620000 */ sw $v0, 0x0($v1)
/* D1FE8 8013B8E8 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* D1FEC 8013B8EC ACA20000 */ sw $v0, 0x0($a1)
/* D1FF0 8013B8F0 92430033 */ lbu $v1, 0x33($s2)
/* D1FF4 8013B8F4 46020002 */ mul.s $f0, $f0, $f2
/* D1FF8 8013B8F8 00000000 */ nop
/* D1FFC 8013B8FC 00031600 */ sll $v0, $v1, 24
/* D2000 8013B900 00032400 */ sll $a0, $v1, 16
/* D2004 8013B904 00441025 */ or $v0, $v0, $a0
/* D2008 8013B908 00031A00 */ sll $v1, $v1, 8
/* D200C 8013B90C 00431025 */ or $v0, $v0, $v1
/* D2010 8013B910 4600018D */ trunc.w.s $f6, $f0
/* D2014 8013B914 44083000 */ mfc1 $t0, $f6
/* D2018 8013B918 0804EEB8 */ j .L8013BAE0
/* D201C 8013B91C 310300FF */ andi $v1, $t0, 0xFF
.L8013B920:
/* D2020 8013B920 146B0022 */ bne $v1, $t3, .L8013B9AC
/* D2024 8013B924 24020002 */ addiu $v0, $zero, 0x2
/* D2028 8013B928 3C06FCFF */ lui $a2, (0xFCFF97FF >> 16)
/* D202C 8013B92C 34C697FF */ ori $a2, $a2, (0xFCFF97FF & 0xFFFF)
/* D2030 8013B930 3C05FF2C */ lui $a1, (0xFF2CFE7F >> 16)
/* D2034 8013B934 34A5FE7F */ ori $a1, $a1, (0xFF2CFE7F & 0xFFFF)
/* D2038 8013B938 3C07E200 */ lui $a3, (0xE2001E01 >> 16)
/* D203C 8013B93C 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* D2040 8013B940 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* D2044 8013B944 8C830000 */ lw $v1, 0x0($a0)
/* D2048 8013B948 34E71E01 */ ori $a3, $a3, (0xE2001E01 & 0xFFFF)
/* D204C 8013B94C 0060102D */ daddu $v0, $v1, $zero
/* D2050 8013B950 24630008 */ addiu $v1, $v1, 0x8
/* D2054 8013B954 AC830000 */ sw $v1, 0x0($a0)
/* D2058 8013B958 C6400038 */ lwc1 $f0, 0x38($s2)
/* D205C 8013B95C 46800020 */ cvt.s.w $f0, $f0
/* D2060 8013B960 AC460000 */ sw $a2, 0x0($v0)
/* D2064 8013B964 AC450004 */ sw $a1, 0x4($v0)
/* D2068 8013B968 24620008 */ addiu $v0, $v1, 0x8
/* D206C 8013B96C AC820000 */ sw $v0, 0x0($a0)
/* D2070 8013B970 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* D2074 8013B974 AC620000 */ sw $v0, 0x0($v1)
/* D2078 8013B978 24620010 */ addiu $v0, $v1, 0x10
/* D207C 8013B97C 46020002 */ mul.s $f0, $f0, $f2
/* D2080 8013B980 00000000 */ nop
/* D2084 8013B984 AC820000 */ sw $v0, 0x0($a0)
/* D2088 8013B988 24020003 */ addiu $v0, $zero, 0x3
/* D208C 8013B98C AC670008 */ sw $a3, 0x8($v1)
/* D2090 8013B990 AC62000C */ sw $v0, 0xC($v1)
/* D2094 8013B994 4600018D */ trunc.w.s $f6, $f0
/* D2098 8013B998 44083000 */ mfc1 $t0, $f6
/* D209C 8013B99C 00000000 */ nop
/* D20A0 8013B9A0 310200FF */ andi $v0, $t0, 0xFF
/* D20A4 8013B9A4 0804EEDA */ j .L8013BB68
/* D20A8 8013B9A8 AC620004 */ sw $v0, 0x4($v1)
.L8013B9AC:
/* D20AC 8013B9AC 1462006E */ bne $v1, $v0, .L8013BB68
/* D20B0 8013B9B0 00000000 */ nop
/* D20B4 8013B9B4 8E4A0038 */ lw $t2, 0x38($s2)
/* D20B8 8013B9B8 8E420030 */ lw $v0, 0x30($s2)
/* D20BC 8013B9BC 01424821 */ addu $t1, $t2, $v0
/* D20C0 8013B9C0 29220100 */ slti $v0, $t1, 0x100
/* D20C4 8013B9C4 50400001 */ beql $v0, $zero, .L8013B9CC
/* D20C8 8013B9C8 240900FF */ addiu $t1, $zero, 0xFF
.L8013B9CC:
/* D20CC 8013B9CC 3C06FCFF */ lui $a2, (0xFCFF97FF >> 16)
/* D20D0 8013B9D0 34C697FF */ ori $a2, $a2, (0xFCFF97FF & 0xFFFF)
/* D20D4 8013B9D4 3C05FF2C */ lui $a1, (0xFF2CFE7F >> 16)
/* D20D8 8013B9D8 34A5FE7F */ ori $a1, $a1, (0xFF2CFE7F & 0xFFFF)
/* D20DC 8013B9DC 3C07E300 */ lui $a3, (0xE3001A01 >> 16)
/* D20E0 8013B9E0 34E71A01 */ ori $a3, $a3, (0xE3001A01 & 0xFFFF)
/* D20E4 8013B9E4 3C08E200 */ lui $t0, (0xE2001E01 >> 16)
/* D20E8 8013B9E8 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* D20EC 8013B9EC 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* D20F0 8013B9F0 35081E01 */ ori $t0, $t0, (0xE2001E01 & 0xFFFF)
/* D20F4 8013B9F4 448A0000 */ mtc1 $t2, $f0
/* D20F8 8013B9F8 00000000 */ nop
/* D20FC 8013B9FC 46800020 */ cvt.s.w $f0, $f0
/* D2100 8013BA00 8C820000 */ lw $v0, 0x0($a0)
/* D2104 8013BA04 46020002 */ mul.s $f0, $f0, $f2
/* D2108 8013BA08 00000000 */ nop
/* D210C 8013BA0C 0040182D */ daddu $v1, $v0, $zero
/* D2110 8013BA10 24420008 */ addiu $v0, $v0, 0x8
/* D2114 8013BA14 AC820000 */ sw $v0, 0x0($a0)
/* D2118 8013BA18 AC660000 */ sw $a2, 0x0($v1)
/* D211C 8013BA1C AC650004 */ sw $a1, 0x4($v1)
/* D2120 8013BA20 24430008 */ addiu $v1, $v0, 0x8
/* D2124 8013BA24 AC830000 */ sw $v1, 0x0($a0)
/* D2128 8013BA28 24030020 */ addiu $v1, $zero, 0x20
/* D212C 8013BA2C AC430004 */ sw $v1, 0x4($v0)
/* D2130 8013BA30 24430010 */ addiu $v1, $v0, 0x10
/* D2134 8013BA34 AC470000 */ sw $a3, 0x0($v0)
/* D2138 8013BA38 AC830000 */ sw $v1, 0x0($a0)
/* D213C 8013BA3C 24430018 */ addiu $v1, $v0, 0x18
/* D2140 8013BA40 AC480008 */ sw $t0, 0x8($v0)
/* D2144 8013BA44 AC4B000C */ sw $t3, 0xC($v0)
/* D2148 8013BA48 AC830000 */ sw $v1, 0x0($a0)
/* D214C 8013BA4C 3C03FA00 */ lui $v1, (0xFA000000 >> 16)
/* D2150 8013BA50 AC430010 */ sw $v1, 0x10($v0)
/* D2154 8013BA54 24430020 */ addiu $v1, $v0, 0x20
/* D2158 8013BA58 AC830000 */ sw $v1, 0x0($a0)
/* D215C 8013BA5C 3C03F900 */ lui $v1, (0xF9000000 >> 16)
/* D2160 8013BA60 AC430018 */ sw $v1, 0x18($v0)
/* D2164 8013BA64 312300FF */ andi $v1, $t1, 0xFF
/* D2168 8013BA68 AC43001C */ sw $v1, 0x1C($v0)
/* D216C 8013BA6C 4600018D */ trunc.w.s $f6, $f0
/* D2170 8013BA70 44083000 */ mfc1 $t0, $f6
/* D2174 8013BA74 00000000 */ nop
/* D2178 8013BA78 310300FF */ andi $v1, $t0, 0xFF
/* D217C 8013BA7C 0804EEDA */ j .L8013BB68
/* D2180 8013BA80 AC430014 */ sw $v1, 0x14($v0)
glabel .L8013BA84
/* D2184 8013BA84 3C06FCFF */ lui $a2, (0xFCFFFFFF >> 16)
/* D2188 8013BA88 34C6FFFF */ ori $a2, $a2, (0xFCFFFFFF & 0xFFFF)
/* D218C 8013BA8C 3C04FFFD */ lui $a0, (0xFFFDF2F9 >> 16)
.L8013BA90:
/* D2190 8013BA90 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* D2194 8013BA94 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* D2198 8013BA98 8C650000 */ lw $a1, 0x0($v1)
/* D219C 8013BA9C 3484F2F9 */ ori $a0, $a0, (0xFFFDF2F9 & 0xFFFF)
/* D21A0 8013BAA0 00A0102D */ daddu $v0, $a1, $zero
/* D21A4 8013BAA4 24A50008 */ addiu $a1, $a1, 0x8
/* D21A8 8013BAA8 AC650000 */ sw $a1, 0x0($v1)
/* D21AC 8013BAAC AC460000 */ sw $a2, 0x0($v0)
/* D21B0 8013BAB0 AC440004 */ sw $a0, 0x4($v0)
.L8013BAB4:
/* D21B4 8013BAB4 24A20008 */ addiu $v0, $a1, 0x8
/* D21B8 8013BAB8 AC620000 */ sw $v0, 0x0($v1)
/* D21BC 8013BABC 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* D21C0 8013BAC0 ACA20000 */ sw $v0, 0x0($a1)
/* D21C4 8013BAC4 9242002F */ lbu $v0, 0x2F($s2)
/* D21C8 8013BAC8 92440033 */ lbu $a0, 0x33($s2)
/* D21CC 8013BACC 92430037 */ lbu $v1, 0x37($s2)
/* D21D0 8013BAD0 00021600 */ sll $v0, $v0, 24
/* D21D4 8013BAD4 00042400 */ sll $a0, $a0, 16
/* D21D8 8013BAD8 00441025 */ or $v0, $v0, $a0
/* D21DC 8013BADC 00031A00 */ sll $v1, $v1, 8
.L8013BAE0:
/* D21E0 8013BAE0 00431025 */ or $v0, $v0, $v1
/* D21E4 8013BAE4 0804EEDA */ j .L8013BB68
/* D21E8 8013BAE8 ACA20004 */ sw $v0, 0x4($a1)
glabel .L8013BAEC
/* D21EC 8013BAEC 3C06FCFF */ lui $a2, (0xFCFFFFFF >> 16)
/* D21F0 8013BAF0 34C6FFFF */ ori $a2, $a2, (0xFCFFFFFF & 0xFFFF)
/* D21F4 8013BAF4 3C05FFFC */ lui $a1, (0xFFFCF279 >> 16)
/* D21F8 8013BAF8 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* D21FC 8013BAFC 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* D2200 8013BB00 8C820000 */ lw $v0, 0x0($a0)
/* D2204 8013BB04 34A5F279 */ ori $a1, $a1, (0xFFFCF279 & 0xFFFF)
/* D2208 8013BB08 0040182D */ daddu $v1, $v0, $zero
/* D220C 8013BB0C 24420008 */ addiu $v0, $v0, 0x8
/* D2210 8013BB10 AC820000 */ sw $v0, 0x0($a0)
/* D2214 8013BB14 AC660000 */ sw $a2, 0x0($v1)
/* D2218 8013BB18 0804EEDA */ j .L8013BB68
/* D221C 8013BB1C AC650004 */ sw $a1, 0x4($v1)
glabel .L8013BB20
/* D2220 8013BB20 3C06FCFF */ lui $a2, (0xFCFF97FF >> 16)
/* D2224 8013BB24 34C697FF */ ori $a2, $a2, (0xFCFF97FF & 0xFFFF)
/* D2228 8013BB28 3C05FF2C */ lui $a1, (0xFF2CFE7F >> 16)
/* D222C 8013BB2C 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* D2230 8013BB30 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* D2234 8013BB34 8C820000 */ lw $v0, 0x0($a0)
/* D2238 8013BB38 34A5FE7F */ ori $a1, $a1, (0xFF2CFE7F & 0xFFFF)
/* D223C 8013BB3C 0040182D */ daddu $v1, $v0, $zero
/* D2240 8013BB40 24420008 */ addiu $v0, $v0, 0x8
/* D2244 8013BB44 AC820000 */ sw $v0, 0x0($a0)
/* D2248 8013BB48 AC660000 */ sw $a2, 0x0($v1)
/* D224C 8013BB4C AC650004 */ sw $a1, 0x4($v1)
/* D2250 8013BB50 24430008 */ addiu $v1, $v0, 0x8
/* D2254 8013BB54 AC830000 */ sw $v1, 0x0($a0)
/* D2258 8013BB58 3C03FA00 */ lui $v1, (0xFA000000 >> 16)
/* D225C 8013BB5C AC430000 */ sw $v1, 0x0($v0)
/* D2260 8013BB60 92430033 */ lbu $v1, 0x33($s2)
.L8013BB64:
/* D2264 8013BB64 AC430004 */ sw $v1, 0x4($v0)
.L8013BB68:
/* D2268 8013BB68 92430001 */ lbu $v1, 0x1($s2)
/* D226C 8013BB6C 2C620005 */ sltiu $v0, $v1, 0x5
/* D2270 8013BB70 10400024 */ beqz $v0, .L8013BC04
/* D2274 8013BB74 00031080 */ sll $v0, $v1, 2
/* D2278 8013BB78 3C018015 */ lui $at, %hi(jtbl_801510D0)
/* D227C 8013BB7C 00220821 */ addu $at, $at, $v0
/* D2280 8013BB80 8C2210D0 */ lw $v0, %lo(jtbl_801510D0)($at)
/* D2284 8013BB84 00400008 */ jr $v0
/* D2288 8013BB88 00000000 */ nop
glabel .L8013BB8C
/* D228C 8013BB8C 0240202D */ daddu $a0, $s2, $zero
/* D2290 8013BB90 0C04F3EA */ jal imgfx_appendGfx_mesh_basic
/* D2294 8013BB94 0260282D */ daddu $a1, $s3, $zero
/* D2298 8013BB98 0804EF01 */ j .L8013BC04
/* D229C 8013BB9C 00000000 */ nop
glabel .L8013BBA0
/* D22A0 8013BBA0 0240202D */ daddu $a0, $s2, $zero
/* D22A4 8013BBA4 0C04F6AD */ jal imgfx_appendGfx_mesh_grid
/* D22A8 8013BBA8 0260282D */ daddu $a1, $s3, $zero
/* D22AC 8013BBAC 0804EF01 */ j .L8013BC04
/* D22B0 8013BBB0 00000000 */ nop
glabel .L8013BBB4
/* D22B4 8013BBB4 0240202D */ daddu $a0, $s2, $zero
/* D22B8 8013BBB8 0C04F8BC */ jal imgfx_appendGfx_mesh_anim
/* D22BC 8013BBBC 0260282D */ daddu $a1, $s3, $zero
/* D22C0 8013BBC0 0804EF01 */ j .L8013BC04
/* D22C4 8013BBC4 00000000 */ nop
glabel .L8013BBC8
/* D22C8 8013BBC8 0240202D */ daddu $a0, $s2, $zero
/* D22CC 8013BBCC 0C04F3EA */ jal imgfx_appendGfx_mesh_basic
/* D22D0 8013BBD0 0260282D */ daddu $a1, $s3, $zero
/* D22D4 8013BBD4 0240202D */ daddu $a0, $s2, $zero
/* D22D8 8013BBD8 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* D22DC 8013BBDC 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* D22E0 8013BBE0 8C620000 */ lw $v0, 0x0($v1)
/* D22E4 8013BBE4 0260282D */ daddu $a1, $s3, $zero
/* D22E8 8013BBE8 0040302D */ daddu $a2, $v0, $zero
/* D22EC 8013BBEC 24420008 */ addiu $v0, $v0, 0x8
/* D22F0 8013BBF0 AC620000 */ sw $v0, 0x0($v1)
/* D22F4 8013BBF4 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* D22F8 8013BBF8 ACC20000 */ sw $v0, 0x0($a2)
/* D22FC 8013BBFC 0C04FA41 */ jal imgfx_appendGfx_mesh_strip
/* D2300 8013BC00 ACC00004 */ sw $zero, 0x4($a2)
.L8013BC04:
/* D2304 8013BC04 3C06800A */ lui $a2, %hi(gMainGfxPos)
/* D2308 8013BC08 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos)
/* D230C 8013BC0C 8CC50000 */ lw $a1, 0x0($a2)
/* D2310 8013BC10 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* D2314 8013BC14 00A0182D */ daddu $v1, $a1, $zero
/* D2318 8013BC18 24A50008 */ addiu $a1, $a1, 0x8
/* D231C 8013BC1C ACC50000 */ sw $a1, 0x0($a2)
/* D2320 8013BC20 AC620000 */ sw $v0, 0x0($v1)
/* D2324 8013BC24 AC600004 */ sw $zero, 0x4($v1)
/* D2328 8013BC28 92430002 */ lbu $v1, 0x2($s2)
/* D232C 8013BC2C 2402000C */ addiu $v0, $zero, 0xC
/* D2330 8013BC30 1462000D */ bne $v1, $v0, .L8013BC68
/* D2334 8013BC34 3C03E200 */ lui $v1, (0xE2001E01 >> 16)
/* D2338 8013BC38 34631E01 */ ori $v1, $v1, (0xE2001E01 & 0xFFFF)
/* D233C 8013BC3C 3C04E300 */ lui $a0, (0xE3001A01 >> 16)
/* D2340 8013BC40 34841A01 */ ori $a0, $a0, (0xE3001A01 & 0xFFFF)
/* D2344 8013BC44 24A20008 */ addiu $v0, $a1, 0x8
/* D2348 8013BC48 ACC20000 */ sw $v0, 0x0($a2)
/* D234C 8013BC4C 24A20010 */ addiu $v0, $a1, 0x10
/* D2350 8013BC50 ACA30000 */ sw $v1, 0x0($a1)
/* D2354 8013BC54 ACA00004 */ sw $zero, 0x4($a1)
/* D2358 8013BC58 ACC20000 */ sw $v0, 0x0($a2)
/* D235C 8013BC5C 24020030 */ addiu $v0, $zero, 0x30
/* D2360 8013BC60 ACA40008 */ sw $a0, 0x8($a1)
/* D2364 8013BC64 ACA2000C */ sw $v0, 0xC($a1)
.L8013BC68:
/* D2368 8013BC68 8FBF0020 */ lw $ra, 0x20($sp)
/* D236C 8013BC6C 8FB3001C */ lw $s3, 0x1C($sp)
/* D2370 8013BC70 8FB20018 */ lw $s2, 0x18($sp)
/* D2374 8013BC74 8FB10014 */ lw $s1, 0x14($sp)
/* D2378 8013BC78 8FB00010 */ lw $s0, 0x10($sp)
/* D237C 8013BC7C D7B40028 */ ldc1 $f20, 0x28($sp)
/* D2380 8013BC80 03E00008 */ jr $ra
/* D2384 8013BC84 27BD0030 */ addiu $sp, $sp, 0x30
### DECOMPILED C INSTRUCTIONS:
void imgfx_appendGfx_mesh(ImgFXState* state, Matrix4f mtx) {
s16 skipModeChange = FALSE;
s32 primAlpha = state->ints.color.a;
s32 renderType = state->renderType;
s8 angle1;
s8 angle2;
f32 ifxImgAlpha;
ImgFXRenderMode* renderMode;
s32 mode1;
s32 mode2;
s32 dirX1;
s32 dirZ2;
gDPPipeSync(gMainGfxPos++);
if (!(state->flags & IMGFX_FLAG_SKIP_GFX_SETUP)) {
gSPDisplayList(gMainGfxPos++, DefaultImgFXSetupGfx);
if (state->flags & IMGFX_FLAG_NO_FILTERING) {
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
}
if (state->flags & IMGFX_FLAG_G_CULL_BACK) {
gSPSetGeometryMode(gMainGfxPos++, G_CULL_BACK);
}
if (state->flags & IMGFX_FLAG_G_CULL_FRONT) {
gSPSetGeometryMode(gMainGfxPos++, G_CULL_FRONT);
}
renderMode = &ImgFXRenderModes[state->renderType];
mode1 = renderMode->mode1;
mode2 = renderMode->mode2;
if (renderMode->flags & IMGFX_RENDER_NO_OVERRIDE) {
skipModeChange = TRUE;
}
ifxImgAlpha = (f32) ImgFXCurrentTexturePtr->alphaMultiplier / 255.0;
// some modes dont support alpha < 255 and must be replaced
if (!skipModeChange && (ImgFXCurrentTexturePtr->alphaMultiplier < 255)) {
state->ints.color.a = 255;
switch (state->renderType) {
case IMGFX_RENDER_DEFAULT:
case IMGFX_RENDER_ANIM:
renderType = IMGFX_RENDER_MULTIPLY_ALPHA;
break;
case IMGFX_RENDER_MULTIPLY_RGB:
case IMGFX_RENDER_MODULATE_PRIM_RGB:
renderType = IMGFX_RENDER_MULTIPLY_RGBA;
break;
case IMGFX_RENDER_MODULATE_SHADE_RGB:
renderType = IMGFX_RENDER_MODULATE_SHADE_RGBA;
break;
}
primAlpha = state->ints.color.a * ifxImgAlpha;
//TODO figure out bits
mode1 = 0x404B40;
mode2 = 0x104B40;
skipModeChange = TRUE;
}
if ((state->flags & IMGFX_FLAG_400) && !skipModeChange) {
mode1 &= ~CVG_DST_FULL;
mode2 &= ~CVG_DST_FULL;
mode1 |= (ALPHA_CVG_SEL | IM_RD);
mode2 |= (ALPHA_CVG_SEL | IM_RD);
}
if (state->flags & IMGFX_FLAG_40) {
gSPClearGeometryMode(gMainGfxPos++, G_ZBUFFER);
} else {
gSPSetGeometryMode(gMainGfxPos++, G_ZBUFFER);
if (skipModeChange) {
mode1 |= Z_CMP;
mode2 |= Z_CMP;
} else {
mode1 |= (Z_CMP | Z_UPD);
mode2 |= (Z_CMP | Z_UPD);
}
}
state->otherModeL = mode2;
gDPSetRenderMode(gMainGfxPos++, mode1, mode2);
switch (renderType) {
case IMGFX_RENDER_MULTIPLY_RGB:
// color: texture * prim
// alpha: texture
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIDECALA_PRIM, G_CC_MODULATEIDECALA_PRIM);
gDPSetPrimColor(gMainGfxPos++, 0, 0, state->ints.color.r, state->ints.color.g,
state->ints.color.b, 0);
break;
case IMGFX_RENDER_MULTIPLY_ALPHA:
// color: texture
// alpha: texture * prim
if (primAlpha <= 0) {
return;
}
gDPSetCombineMode(gMainGfxPos++, PM_CC_02, PM_CC_02);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, primAlpha);
break;
case IMGFX_RENDER_MULTIPLY_RGBA:
// color: texture * prim
// alpha: texture * prim
if (primAlpha <= 0) {
return;
}
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(gMainGfxPos++, 0, 0, state->ints.color.r, state->ints.color.g,
state->ints.color.b, primAlpha);
break;
case IMGFX_RENDER_MODULATE_PRIM_RGB:
// color: lerp from prim color to 1 based on texture intensity
// alpha: texture
gDPSetCombineLERP(gMainGfxPos++,
1, PRIMITIVE, TEXEL0, PRIMITIVE, 0, 0, 0, TEXEL0,
1, PRIMITIVE, TEXEL0, PRIMITIVE, 0, 0, 0, TEXEL0);
gDPSetPrimColor(gMainGfxPos++, 0, 0, state->ints.color.r, state->ints.color.g,
state->ints.color.b, 0);
break;
case IMGFX_RENDER_MODULATE_PRIM_RGBA:
// color: lerp from prim color to 1 based on texture intensity
// alpha: texture * vtx
if (primAlpha <= 0) {
return;
}
gDPSetCombineLERP(gMainGfxPos++,
1, 0, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0,
1, 0, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
gDPSetPrimColor(gMainGfxPos++, 0, 0, state->ints.color.r, state->ints.color.g,
state->ints.color.b, primAlpha);
break;
case IMGFX_RENDER_MULTIPLY_SHADE_RGB:
// color: modulate vtx color by texture intensity
// alpha: texture
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH);
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
break;
case IMGFX_RENDER_MODULATE_SHADE_RGB:
// color: lerp from vtx color to 1 based on texture intensity
// alpha: texture
gDPSetCombineLERP(gMainGfxPos++,
1, SHADE, TEXEL0, SHADE, 0, 0, 0, TEXEL0,
1, SHADE, TEXEL0, SHADE, 0, 0, 0, TEXEL0);
gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH);
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
break;
case IMGFX_RENDER_MULTIPLY_SHADE_ALPHA:
// color: texture
// alpha: texture * vtx color
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, SHADE, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, SHADE, 0);
gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH);
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
break;
case IMGFX_RENDER_MULTIPLY_SHADE_RGBA:
// color: modulate vtx color by texture intensity
// alpha: modulate vtx alpha by texture intensity
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH);
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
break;
case IMGFX_RENDER_MODULATE_SHADE_RGBA:
// color: lerp from vtx color to 1 based on texture intensity
// alpha: vtx color * texture
gDPSetCombineLERP(gMainGfxPos++,
1, SHADE, TEXEL0, SHADE, TEXEL0, 0, SHADE, 0,
1, SHADE, TEXEL0, SHADE, TEXEL0, 0, SHADE, 0);
gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH);
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
break;
case IMGFX_RENDER_ANIM:
if (state->flags & (IMGFX_FLAG_2000 | IMGFX_FLAG_8000)) {
Camera* currentCam = &gCameras[gCurrentCameraID];
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
angle1 = cosine(currentCam->currentYaw) * 120.0f;
angle2 = cosine(currentCam->currentYaw + 90.0f) * 120.0f;
dirX1 = -angle1;
dirZ2 = -angle2;
ImgFXLights.l[0].l.dir[0] = dirX1;
ImgFXLights.l[1].l.dir[0] = angle1;
ImgFXLights.l[0].l.dir[2] = angle2;
ImgFXLights.l[1].l.dir[2] = dirZ2;
gSPSetLights2(gMainGfxPos++, ImgFXLights);
break;
}
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
break;
case IMGFX_RENDER_HOLOGRAM:
if (state->ints.hologram.mode == IMGFX_HOLOGRAM_NOISE) {
primAlpha = state->ints.hologram.alphaAmt * ifxImgAlpha;
// color: blend texure and noise
// alpha: texure * prim
gDPSetCombineMode(gMainGfxPos++, PM_CC_IMGFX_HOLOGRAM, PM_CC_IMGFX_HOLOGRAM);
gDPSetPrimColor(gMainGfxPos++, 0, 0,
state->ints.hologram.noiseAmt,
state->ints.hologram.noiseAmt,
state->ints.hologram.noiseAmt,
primAlpha);
} else if (state->ints.hologram.mode == IMGFX_HOLOGRAM_DITHER) {
primAlpha = state->ints.hologram.alphaAmt * ifxImgAlpha;
// color: texture
// alpha: texture * prim
gDPSetCombineMode(gMainGfxPos++, PM_CC_02, PM_CC_02);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, primAlpha);
gDPSetAlphaCompare(gMainGfxPos++, G_AC_DITHER);
} else if (state->ints.hologram.mode == IMGFX_HOLOGRAM_THRESHOLD) {
s32 blendAlpha = state->ints.hologram.alphaAmt + state->ints.hologram.noiseAmt;
if (blendAlpha > 255) {
blendAlpha = 255;
}
primAlpha = state->ints.hologram.alphaAmt * ifxImgAlpha;
// color: texture
// alpha: texture * prim
gDPSetCombineMode(gMainGfxPos++, PM_CC_02, PM_CC_02);
gDPSetAlphaDither(gMainGfxPos++, G_AD_NOISE);
gDPSetAlphaCompare(gMainGfxPos++, G_AC_THRESHOLD);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, primAlpha);
gDPSetBlendColor(gMainGfxPos++, 0, 0, 0, blendAlpha);
}
break;
case IMGFX_RENDER_COLOR_FILL:
// color: prim
// alpha: texture
gDPSetCombineMode(gMainGfxPos++, PM_CC_IMGFX_COLOR_FILL, PM_CC_IMGFX_COLOR_FILL);
gDPSetPrimColor(gMainGfxPos++, 0, 0, state->ints.color.r, state->ints.color.g,
state->ints.color.b, 0);
break;
case IMGFX_RENDER_DEFAULT:
case IMGFX_RENDER_OVERLAY_RGB:
case IMGFX_RENDER_UNUSED:
// color: texture
// alpha: texture
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
break;
case IMGFX_RENDER_OVERLAY_RGBA:
// color: texture
// alpha: texture * prim
gDPSetCombineMode(gMainGfxPos++, PM_CC_02, PM_CC_02);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, state->ints.overlay.alpha);
break;
}
}
switch (state->meshType) {
case IMGFX_MESH_DEFAULT:
imgfx_appendGfx_mesh_basic(state, mtx);
break;
case IMGFX_MESH_GRID_WAVY:
case IMGFX_MESH_GRID_UNUSED:
imgfx_appendGfx_mesh_grid(state, mtx);
break;
case IMGFX_MESH_ANIMATED:
imgfx_appendGfx_mesh_anim(state, mtx);
break;
case IMGFX_MESH_STRIP:
imgfx_appendGfx_mesh_basic(state, mtx);
gDPPipeSync(gMainGfxPos++);
imgfx_appendGfx_mesh_strip(state, mtx);
break;
}
gDPPipeSync(gMainGfxPos++);
if (state->renderType == IMGFX_RENDER_HOLOGRAM) {
gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE);
gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE);
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel appendGfx_entity_model
/* B7884 80121184 27BDFF08 */ addiu $sp, $sp, -0xF8
/* B7888 80121188 AFB200F0 */ sw $s2, 0xF0($sp)
/* B788C 8012118C 0080902D */ daddu $s2, $a0, $zero
/* B7890 80121190 3C020001 */ lui $v0, (0x11630 >> 16)
/* B7894 80121194 34421630 */ ori $v0, $v0, (0x11630 & 0xFFFF)
/* B7898 80121198 26450018 */ addiu $a1, $s2, 0x18
/* B789C 8012119C 3C038007 */ lui $v1, %hi(gMatrixListPos)
/* B78A0 801211A0 946341F0 */ lhu $v1, %lo(gMatrixListPos)($v1)
/* B78A4 801211A4 3C04800A */ lui $a0, %hi(gDisplayContext)
/* B78A8 801211A8 8C84A674 */ lw $a0, %lo(gDisplayContext)($a0)
/* B78AC 801211AC 26460058 */ addiu $a2, $s2, 0x58
/* B78B0 801211B0 AFBF00F4 */ sw $ra, 0xF4($sp)
/* B78B4 801211B4 AFB100EC */ sw $s1, 0xEC($sp)
/* B78B8 801211B8 AFB000E8 */ sw $s0, 0xE8($sp)
/* B78BC 801211BC 00031980 */ sll $v1, $v1, 6
/* B78C0 801211C0 00832021 */ addu $a0, $a0, $v1
/* B78C4 801211C4 00822021 */ addu $a0, $a0, $v0
.L801211C8:
/* B78C8 801211C8 8CAE0000 */ lw $t6, 0x0($a1)
/* B78CC 801211CC 8CAF0004 */ lw $t7, 0x4($a1)
/* B78D0 801211D0 8CB80008 */ lw $t8, 0x8($a1)
/* B78D4 801211D4 8CB9000C */ lw $t9, 0xC($a1)
/* B78D8 801211D8 AC8E0000 */ sw $t6, 0x0($a0)
/* B78DC 801211DC AC8F0004 */ sw $t7, 0x4($a0)
/* B78E0 801211E0 AC980008 */ sw $t8, 0x8($a0)
/* B78E4 801211E4 AC99000C */ sw $t9, 0xC($a0)
/* B78E8 801211E8 24A50010 */ addiu $a1, $a1, 0x10
/* B78EC 801211EC 14A6FFF6 */ bne $a1, $a2, .L801211C8
/* B78F0 801211F0 24840010 */ addiu $a0, $a0, 0x10
/* B78F4 801211F4 3C02DA38 */ lui $v0, (0xDA380002 >> 16)
/* B78F8 801211F8 34420002 */ ori $v0, $v0, (0xDA380002 & 0xFFFF)
/* B78FC 801211FC 3C070001 */ lui $a3, (0x11630 >> 16)
/* B7900 80121200 3C0D800A */ lui $t5, %hi(gMainGfxPos)
/* B7904 80121204 25ADA66C */ addiu $t5, $t5, %lo(gMainGfxPos)
/* B7908 80121208 34E71630 */ ori $a3, $a3, (0x11630 & 0xFFFF)
/* B790C 8012120C 3C068007 */ lui $a2, %hi(gMatrixListPos)
/* B7910 80121210 24C641F0 */ addiu $a2, $a2, %lo(gMatrixListPos)
/* B7914 80121214 8DAC0000 */ lw $t4, 0x0($t5)
/* B7918 80121218 94C40000 */ lhu $a0, 0x0($a2)
/* B791C 8012121C 0180282D */ daddu $a1, $t4, $zero
/* B7920 80121220 258C0008 */ addiu $t4, $t4, 0x8
/* B7924 80121224 ADAC0000 */ sw $t4, 0x0($t5)
/* B7928 80121228 ACA20000 */ sw $v0, 0x0($a1)
/* B792C 8012122C 3082FFFF */ andi $v0, $a0, 0xFFFF
/* B7930 80121230 00021180 */ sll $v0, $v0, 6
/* B7934 80121234 3C03800A */ lui $v1, %hi(gDisplayContext)
/* B7938 80121238 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* B793C 8012123C 00471021 */ addu $v0, $v0, $a3
/* B7940 80121240 00621821 */ addu $v1, $v1, $v0
/* B7944 80121244 ACA30004 */ sw $v1, 0x4($a1)
/* B7948 80121248 8E430000 */ lw $v1, 0x0($s2)
/* B794C 8012124C 24840001 */ addiu $a0, $a0, 0x1
/* B7950 80121250 30620400 */ andi $v0, $v1, 0x400
/* B7954 80121254 14400232 */ bnez $v0, .L80121B20
/* B7958 80121258 A4C40000 */ sh $a0, 0x0($a2)
/* B795C 8012125C 3C020001 */ lui $v0, (0x10000 >> 16)
/* B7960 80121260 00621024 */ and $v0, $v1, $v0
/* B7964 80121264 144001B1 */ bnez $v0, .L8012192C
/* B7968 80121268 3C04E200 */ lui $a0, (0xE200001C >> 16)
/* B796C 8012126C 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF)
/* B7970 80121270 3C030F0A */ lui $v1, (0xF0A7008 >> 16)
/* B7974 80121274 34637008 */ ori $v1, $v1, (0xF0A7008 & 0xFFFF)
/* B7978 80121278 3C06FC11 */ lui $a2, (0xFC119623 >> 16)
/* B797C 8012127C 34C69623 */ ori $a2, $a2, (0xFC119623 & 0xFFFF)
/* B7980 80121280 3C05FF2F */ lui $a1, (0xFF2FFFFF >> 16)
/* B7984 80121284 34A5FFFF */ ori $a1, $a1, (0xFF2FFFFF & 0xFFFF)
/* B7988 80121288 3C07E200 */ lui $a3, (0xE2001E01 >> 16)
/* B798C 8012128C 34E71E01 */ ori $a3, $a3, (0xE2001E01 & 0xFFFF)
/* B7990 80121290 3C08E300 */ lui $t0, (0xE3000A11 >> 16)
/* B7994 80121294 35080A11 */ ori $t0, $t0, (0xE3000A11 & 0xFFFF)
/* B7998 80121298 0000482D */ daddu $t1, $zero, $zero
/* B799C 8012129C 25820008 */ addiu $v0, $t4, 0x8
/* B79A0 801212A0 ADA20000 */ sw $v0, 0x0($t5)
/* B79A4 801212A4 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B79A8 801212A8 AD820000 */ sw $v0, 0x0($t4)
/* B79AC 801212AC 25820010 */ addiu $v0, $t4, 0x10
/* B79B0 801212B0 AD800004 */ sw $zero, 0x4($t4)
/* B79B4 801212B4 ADA20000 */ sw $v0, 0x0($t5)
/* B79B8 801212B8 25820018 */ addiu $v0, $t4, 0x18
/* B79BC 801212BC AD840008 */ sw $a0, 0x8($t4)
/* B79C0 801212C0 AD83000C */ sw $v1, 0xC($t4)
/* B79C4 801212C4 ADA20000 */ sw $v0, 0x0($t5)
/* B79C8 801212C8 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* B79CC 801212CC AD820010 */ sw $v0, 0x10($t4)
/* B79D0 801212D0 2402FFFF */ addiu $v0, $zero, -0x1
/* B79D4 801212D4 AD820014 */ sw $v0, 0x14($t4)
/* B79D8 801212D8 25820020 */ addiu $v0, $t4, 0x20
/* B79DC 801212DC ADA20000 */ sw $v0, 0x0($t5)
/* B79E0 801212E0 25820028 */ addiu $v0, $t4, 0x28
/* B79E4 801212E4 AD860018 */ sw $a2, 0x18($t4)
/* B79E8 801212E8 AD85001C */ sw $a1, 0x1C($t4)
/* B79EC 801212EC ADA20000 */ sw $v0, 0x0($t5)
/* B79F0 801212F0 25820030 */ addiu $v0, $t4, 0x30
/* B79F4 801212F4 AD870020 */ sw $a3, 0x20($t4)
/* B79F8 801212F8 AD800024 */ sw $zero, 0x24($t4)
/* B79FC 801212FC ADA20000 */ sw $v0, 0x0($t5)
/* B7A00 80121300 3C038015 */ lui $v1, %hi(entity_fog_enabled)
/* B7A04 80121304 8C634378 */ lw $v1, %lo(entity_fog_enabled)($v1)
/* B7A08 80121308 24020CF0 */ addiu $v0, $zero, 0xCF0
/* B7A0C 8012130C AD880028 */ sw $t0, 0x28($t4)
/* B7A10 80121310 10600004 */ beqz $v1, .L80121324
/* B7A14 80121314 AD82002C */ sw $v0, 0x2C($t4)
/* B7A18 80121318 8E420000 */ lw $v0, 0x0($s2)
/* B7A1C 8012131C 30420800 */ andi $v0, $v0, 0x800
/* B7A20 80121320 2C490001 */ sltiu $t1, $v0, 0x1
.L80121324:
/* B7A24 80121324 11200005 */ beqz $t1, .L8012133C
/* B7A28 80121328 24020001 */ addiu $v0, $zero, 0x1
/* B7A2C 8012132C 112200C3 */ beq $t1, $v0, .L8012163C
/* B7A30 80121330 3C02D9FD */ lui $v0, (0xD9FDFFFF >> 16)
/* B7A34 80121334 0804862C */ j .L801218B0
/* B7A38 80121338 00000000 */ nop
.L8012133C:
/* B7A3C 8012133C 92420004 */ lbu $v0, 0x4($s2)
/* B7A40 80121340 2442FFFF */ addiu $v0, $v0, -0x1
/* B7A44 80121344 00021600 */ sll $v0, $v0, 24
/* B7A48 80121348 00021E03 */ sra $v1, $v0, 24
/* B7A4C 8012134C 2C62002D */ sltiu $v0, $v1, 0x2D
/* B7A50 80121350 10400156 */ beqz $v0, .L801218AC
/* B7A54 80121354 00031080 */ sll $v0, $v1, 2
/* B7A58 80121358 3C018015 */ lui $at, %hi(jtbl_801500D0)
/* B7A5C 8012135C 00220821 */ addu $at, $at, $v0
/* B7A60 80121360 8C2200D0 */ lw $v0, %lo(jtbl_801500D0)($at)
/* B7A64 80121364 00400008 */ jr $v0
/* B7A68 80121368 00000000 */ nop
glabel .L8012136C
/* B7A6C 8012136C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7A70 80121370 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7A74 80121374 8C620000 */ lw $v0, 0x0($v1)
/* B7A78 80121378 0040202D */ daddu $a0, $v0, $zero
/* B7A7C 8012137C 24420008 */ addiu $v0, $v0, 0x8
/* B7A80 80121380 AC620000 */ sw $v0, 0x0($v1)
/* B7A84 80121384 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7A88 80121388 AC820000 */ sw $v0, 0x0($a0)
/* B7A8C 8012138C 3C028015 */ lui $v0, %hi(D_8014B7F8)
/* B7A90 80121390 2442B7F8 */ addiu $v0, $v0, %lo(D_8014B7F8)
/* B7A94 80121394 0804862B */ j .L801218AC
/* B7A98 80121398 AC820004 */ sw $v0, 0x4($a0)
glabel .L8012139C
/* B7A9C 8012139C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7AA0 801213A0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7AA4 801213A4 8C620000 */ lw $v0, 0x0($v1)
/* B7AA8 801213A8 0040202D */ daddu $a0, $v0, $zero
/* B7AAC 801213AC 24420008 */ addiu $v0, $v0, 0x8
/* B7AB0 801213B0 AC620000 */ sw $v0, 0x0($v1)
/* B7AB4 801213B4 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7AB8 801213B8 AC820000 */ sw $v0, 0x0($a0)
/* B7ABC 801213BC 3C028015 */ lui $v0, %hi(D_8014B820)
/* B7AC0 801213C0 2442B820 */ addiu $v0, $v0, %lo(D_8014B820)
/* B7AC4 801213C4 0804862B */ j .L801218AC
/* B7AC8 801213C8 AC820004 */ sw $v0, 0x4($a0)
glabel .L801213CC
/* B7ACC 801213CC 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7AD0 801213D0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7AD4 801213D4 8C620000 */ lw $v0, 0x0($v1)
/* B7AD8 801213D8 0040202D */ daddu $a0, $v0, $zero
/* B7ADC 801213DC 24420008 */ addiu $v0, $v0, 0x8
/* B7AE0 801213E0 AC620000 */ sw $v0, 0x0($v1)
/* B7AE4 801213E4 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7AE8 801213E8 AC820000 */ sw $v0, 0x0($a0)
/* B7AEC 801213EC 3C028015 */ lui $v0, %hi(D_8014B848)
/* B7AF0 801213F0 2442B848 */ addiu $v0, $v0, %lo(D_8014B848)
/* B7AF4 801213F4 0804862B */ j .L801218AC
/* B7AF8 801213F8 AC820004 */ sw $v0, 0x4($a0)
glabel .L801213FC
/* B7AFC 801213FC 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7B00 80121400 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7B04 80121404 8C620000 */ lw $v0, 0x0($v1)
/* B7B08 80121408 0040202D */ daddu $a0, $v0, $zero
/* B7B0C 8012140C 24420008 */ addiu $v0, $v0, 0x8
/* B7B10 80121410 AC620000 */ sw $v0, 0x0($v1)
/* B7B14 80121414 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7B18 80121418 AC820000 */ sw $v0, 0x0($a0)
/* B7B1C 8012141C 3C028015 */ lui $v0, %hi(D_8014B870)
/* B7B20 80121420 2442B870 */ addiu $v0, $v0, %lo(D_8014B870)
/* B7B24 80121424 0804862B */ j .L801218AC
/* B7B28 80121428 AC820004 */ sw $v0, 0x4($a0)
glabel .L8012142C
/* B7B2C 8012142C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7B30 80121430 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7B34 80121434 8C620000 */ lw $v0, 0x0($v1)
/* B7B38 80121438 0040202D */ daddu $a0, $v0, $zero
/* B7B3C 8012143C 24420008 */ addiu $v0, $v0, 0x8
/* B7B40 80121440 AC620000 */ sw $v0, 0x0($v1)
/* B7B44 80121444 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7B48 80121448 AC820000 */ sw $v0, 0x0($a0)
/* B7B4C 8012144C 3C028015 */ lui $v0, %hi(D_8014B898)
/* B7B50 80121450 2442B898 */ addiu $v0, $v0, %lo(D_8014B898)
/* B7B54 80121454 0804862B */ j .L801218AC
/* B7B58 80121458 AC820004 */ sw $v0, 0x4($a0)
glabel .L8012145C
/* B7B5C 8012145C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7B60 80121460 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7B64 80121464 8C620000 */ lw $v0, 0x0($v1)
/* B7B68 80121468 0040202D */ daddu $a0, $v0, $zero
/* B7B6C 8012146C 24420008 */ addiu $v0, $v0, 0x8
/* B7B70 80121470 AC620000 */ sw $v0, 0x0($v1)
/* B7B74 80121474 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7B78 80121478 AC820000 */ sw $v0, 0x0($a0)
/* B7B7C 8012147C 3C028015 */ lui $v0, %hi(D_8014B9B0)
/* B7B80 80121480 2442B9B0 */ addiu $v0, $v0, %lo(D_8014B9B0)
/* B7B84 80121484 0804862B */ j .L801218AC
/* B7B88 80121488 AC820004 */ sw $v0, 0x4($a0)
glabel .L8012148C
/* B7B8C 8012148C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7B90 80121490 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7B94 80121494 8C620000 */ lw $v0, 0x0($v1)
/* B7B98 80121498 0040202D */ daddu $a0, $v0, $zero
/* B7B9C 8012149C 24420008 */ addiu $v0, $v0, 0x8
/* B7BA0 801214A0 AC620000 */ sw $v0, 0x0($v1)
/* B7BA4 801214A4 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7BA8 801214A8 AC820000 */ sw $v0, 0x0($a0)
/* B7BAC 801214AC 3C028015 */ lui $v0, %hi(D_8014B8C0)
/* B7BB0 801214B0 2442B8C0 */ addiu $v0, $v0, %lo(D_8014B8C0)
/* B7BB4 801214B4 0804862B */ j .L801218AC
/* B7BB8 801214B8 AC820004 */ sw $v0, 0x4($a0)
glabel .L801214BC
/* B7BBC 801214BC 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7BC0 801214C0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7BC4 801214C4 8C620000 */ lw $v0, 0x0($v1)
/* B7BC8 801214C8 0040202D */ daddu $a0, $v0, $zero
/* B7BCC 801214CC 24420008 */ addiu $v0, $v0, 0x8
/* B7BD0 801214D0 AC620000 */ sw $v0, 0x0($v1)
/* B7BD4 801214D4 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7BD8 801214D8 AC820000 */ sw $v0, 0x0($a0)
/* B7BDC 801214DC 3C028015 */ lui $v0, %hi(D_8014B9D8)
/* B7BE0 801214E0 2442B9D8 */ addiu $v0, $v0, %lo(D_8014B9D8)
/* B7BE4 801214E4 0804862B */ j .L801218AC
/* B7BE8 801214E8 AC820004 */ sw $v0, 0x4($a0)
glabel .L801214EC
/* B7BEC 801214EC 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7BF0 801214F0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7BF4 801214F4 8C620000 */ lw $v0, 0x0($v1)
/* B7BF8 801214F8 0040202D */ daddu $a0, $v0, $zero
/* B7BFC 801214FC 24420008 */ addiu $v0, $v0, 0x8
/* B7C00 80121500 AC620000 */ sw $v0, 0x0($v1)
/* B7C04 80121504 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7C08 80121508 AC820000 */ sw $v0, 0x0($a0)
/* B7C0C 8012150C 3C028015 */ lui $v0, %hi(D_8014B8E8)
/* B7C10 80121510 2442B8E8 */ addiu $v0, $v0, %lo(D_8014B8E8)
/* B7C14 80121514 0804862B */ j .L801218AC
/* B7C18 80121518 AC820004 */ sw $v0, 0x4($a0)
glabel .L8012151C
/* B7C1C 8012151C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7C20 80121520 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7C24 80121524 8C620000 */ lw $v0, 0x0($v1)
/* B7C28 80121528 0040202D */ daddu $a0, $v0, $zero
/* B7C2C 8012152C 24420008 */ addiu $v0, $v0, 0x8
/* B7C30 80121530 AC620000 */ sw $v0, 0x0($v1)
/* B7C34 80121534 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7C38 80121538 AC820000 */ sw $v0, 0x0($a0)
/* B7C3C 8012153C 3C028015 */ lui $v0, %hi(D_8014BA00)
/* B7C40 80121540 2442BA00 */ addiu $v0, $v0, %lo(D_8014BA00)
/* B7C44 80121544 0804862B */ j .L801218AC
/* B7C48 80121548 AC820004 */ sw $v0, 0x4($a0)
glabel .L8012154C
/* B7C4C 8012154C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7C50 80121550 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7C54 80121554 8C620000 */ lw $v0, 0x0($v1)
/* B7C58 80121558 0040202D */ daddu $a0, $v0, $zero
/* B7C5C 8012155C 24420008 */ addiu $v0, $v0, 0x8
/* B7C60 80121560 AC620000 */ sw $v0, 0x0($v1)
/* B7C64 80121564 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7C68 80121568 AC820000 */ sw $v0, 0x0($a0)
/* B7C6C 8012156C 3C028015 */ lui $v0, %hi(D_8014B988)
/* B7C70 80121570 2442B988 */ addiu $v0, $v0, %lo(D_8014B988)
/* B7C74 80121574 0804862B */ j .L801218AC
/* B7C78 80121578 AC820004 */ sw $v0, 0x4($a0)
glabel .L8012157C
/* B7C7C 8012157C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7C80 80121580 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7C84 80121584 8C620000 */ lw $v0, 0x0($v1)
/* B7C88 80121588 0040202D */ daddu $a0, $v0, $zero
/* B7C8C 8012158C 24420008 */ addiu $v0, $v0, 0x8
/* B7C90 80121590 AC620000 */ sw $v0, 0x0($v1)
/* B7C94 80121594 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7C98 80121598 AC820000 */ sw $v0, 0x0($a0)
/* B7C9C 8012159C 3C028015 */ lui $v0, %hi(D_8014BA48)
/* B7CA0 801215A0 2442BA48 */ addiu $v0, $v0, %lo(D_8014BA48)
/* B7CA4 801215A4 0804862B */ j .L801218AC
/* B7CA8 801215A8 AC820004 */ sw $v0, 0x4($a0)
glabel .L801215AC
/* B7CAC 801215AC 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7CB0 801215B0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7CB4 801215B4 8C620000 */ lw $v0, 0x0($v1)
/* B7CB8 801215B8 0040202D */ daddu $a0, $v0, $zero
/* B7CBC 801215BC 24420008 */ addiu $v0, $v0, 0x8
/* B7CC0 801215C0 AC620000 */ sw $v0, 0x0($v1)
/* B7CC4 801215C4 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7CC8 801215C8 AC820000 */ sw $v0, 0x0($a0)
/* B7CCC 801215CC 3C028015 */ lui $v0, %hi(D_8014BA70)
/* B7CD0 801215D0 2442BA70 */ addiu $v0, $v0, %lo(D_8014BA70)
/* B7CD4 801215D4 0804862B */ j .L801218AC
/* B7CD8 801215D8 AC820004 */ sw $v0, 0x4($a0)
glabel .L801215DC
/* B7CDC 801215DC 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7CE0 801215E0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7CE4 801215E4 8C620000 */ lw $v0, 0x0($v1)
/* B7CE8 801215E8 0040202D */ daddu $a0, $v0, $zero
/* B7CEC 801215EC 24420008 */ addiu $v0, $v0, 0x8
/* B7CF0 801215F0 AC620000 */ sw $v0, 0x0($v1)
/* B7CF4 801215F4 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7CF8 801215F8 AC820000 */ sw $v0, 0x0($a0)
/* B7CFC 801215FC 3C028015 */ lui $v0, %hi(D_8014BA98)
/* B7D00 80121600 2442BA98 */ addiu $v0, $v0, %lo(D_8014BA98)
/* B7D04 80121604 0804862B */ j .L801218AC
/* B7D08 80121608 AC820004 */ sw $v0, 0x4($a0)
glabel .L8012160C
/* B7D0C 8012160C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7D10 80121610 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7D14 80121614 8C620000 */ lw $v0, 0x0($v1)
/* B7D18 80121618 0040202D */ daddu $a0, $v0, $zero
/* B7D1C 8012161C 24420008 */ addiu $v0, $v0, 0x8
/* B7D20 80121620 AC620000 */ sw $v0, 0x0($v1)
/* B7D24 80121624 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7D28 80121628 AC820000 */ sw $v0, 0x0($a0)
/* B7D2C 8012162C 3C028015 */ lui $v0, %hi(D_8014BAE8)
/* B7D30 80121630 2442BAE8 */ addiu $v0, $v0, %lo(D_8014BAE8)
/* B7D34 80121634 0804862B */ j .L801218AC
/* B7D38 80121638 AC820004 */ sw $v0, 0x4($a0)
.L8012163C:
/* B7D3C 8012163C 92420004 */ lbu $v0, 0x4($s2)
/* B7D40 80121640 2442FFFF */ addiu $v0, $v0, -0x1
/* B7D44 80121644 00021600 */ sll $v0, $v0, 24
/* B7D48 80121648 00021E03 */ sra $v1, $v0, 24
/* B7D4C 8012164C 2C620026 */ sltiu $v0, $v1, 0x26
/* B7D50 80121650 10400059 */ beqz $v0, .L801217B8
/* B7D54 80121654 00031080 */ sll $v0, $v1, 2
/* B7D58 80121658 3C018015 */ lui $at, %hi(jtbl_80150188)
/* B7D5C 8012165C 00220821 */ addu $at, $at, $v0
/* B7D60 80121660 8C220188 */ lw $v0, %lo(jtbl_80150188)($at)
/* B7D64 80121664 00400008 */ jr $v0
/* B7D68 80121668 00000000 */ nop
glabel .L8012166C
/* B7D6C 8012166C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7D70 80121670 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7D74 80121674 8C620000 */ lw $v0, 0x0($v1)
/* B7D78 80121678 0040202D */ daddu $a0, $v0, $zero
/* B7D7C 8012167C 24420008 */ addiu $v0, $v0, 0x8
/* B7D80 80121680 AC620000 */ sw $v0, 0x0($v1)
/* B7D84 80121684 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7D88 80121688 AC820000 */ sw $v0, 0x0($a0)
/* B7D8C 8012168C 3C028015 */ lui $v0, %hi(D_8014BE78)
/* B7D90 80121690 2442BE78 */ addiu $v0, $v0, %lo(D_8014BE78)
/* B7D94 80121694 080485EE */ j .L801217B8
/* B7D98 80121698 AC820004 */ sw $v0, 0x4($a0)
glabel .L8012169C
/* B7D9C 8012169C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7DA0 801216A0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7DA4 801216A4 8C620000 */ lw $v0, 0x0($v1)
/* B7DA8 801216A8 0040202D */ daddu $a0, $v0, $zero
/* B7DAC 801216AC 24420008 */ addiu $v0, $v0, 0x8
/* B7DB0 801216B0 AC620000 */ sw $v0, 0x0($v1)
/* B7DB4 801216B4 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7DB8 801216B8 AC820000 */ sw $v0, 0x0($a0)
/* B7DBC 801216BC 3C028015 */ lui $v0, %hi(D_8014BEA0)
/* B7DC0 801216C0 2442BEA0 */ addiu $v0, $v0, %lo(D_8014BEA0)
/* B7DC4 801216C4 080485EE */ j .L801217B8
/* B7DC8 801216C8 AC820004 */ sw $v0, 0x4($a0)
glabel .L801216CC
/* B7DCC 801216CC 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7DD0 801216D0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7DD4 801216D4 8C620000 */ lw $v0, 0x0($v1)
/* B7DD8 801216D8 0040202D */ daddu $a0, $v0, $zero
/* B7DDC 801216DC 24420008 */ addiu $v0, $v0, 0x8
/* B7DE0 801216E0 AC620000 */ sw $v0, 0x0($v1)
/* B7DE4 801216E4 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7DE8 801216E8 AC820000 */ sw $v0, 0x0($a0)
/* B7DEC 801216EC 3C028015 */ lui $v0, %hi(D_8014BEC8)
/* B7DF0 801216F0 2442BEC8 */ addiu $v0, $v0, %lo(D_8014BEC8)
/* B7DF4 801216F4 080485EE */ j .L801217B8
/* B7DF8 801216F8 AC820004 */ sw $v0, 0x4($a0)
glabel .L801216FC
/* B7DFC 801216FC 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7E00 80121700 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7E04 80121704 8C620000 */ lw $v0, 0x0($v1)
/* B7E08 80121708 0040202D */ daddu $a0, $v0, $zero
/* B7E0C 8012170C 24420008 */ addiu $v0, $v0, 0x8
/* B7E10 80121710 AC620000 */ sw $v0, 0x0($v1)
/* B7E14 80121714 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7E18 80121718 AC820000 */ sw $v0, 0x0($a0)
/* B7E1C 8012171C 3C028015 */ lui $v0, %hi(D_8014BEF0)
/* B7E20 80121720 2442BEF0 */ addiu $v0, $v0, %lo(D_8014BEF0)
/* B7E24 80121724 080485EE */ j .L801217B8
/* B7E28 80121728 AC820004 */ sw $v0, 0x4($a0)
glabel .L8012172C
/* B7E2C 8012172C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7E30 80121730 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7E34 80121734 8C620000 */ lw $v0, 0x0($v1)
/* B7E38 80121738 0040202D */ daddu $a0, $v0, $zero
/* B7E3C 8012173C 24420008 */ addiu $v0, $v0, 0x8
/* B7E40 80121740 AC620000 */ sw $v0, 0x0($v1)
/* B7E44 80121744 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7E48 80121748 AC820000 */ sw $v0, 0x0($a0)
/* B7E4C 8012174C 3C028015 */ lui $v0, %hi(D_8014BF18)
/* B7E50 80121750 2442BF18 */ addiu $v0, $v0, %lo(D_8014BF18)
/* B7E54 80121754 080485EE */ j .L801217B8
/* B7E58 80121758 AC820004 */ sw $v0, 0x4($a0)
glabel .L8012175C
/* B7E5C 8012175C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7E60 80121760 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7E64 80121764 8C620000 */ lw $v0, 0x0($v1)
/* B7E68 80121768 0040202D */ daddu $a0, $v0, $zero
/* B7E6C 8012176C 24420008 */ addiu $v0, $v0, 0x8
/* B7E70 80121770 AC620000 */ sw $v0, 0x0($v1)
/* B7E74 80121774 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7E78 80121778 AC820000 */ sw $v0, 0x0($a0)
/* B7E7C 8012177C 3C028015 */ lui $v0, %hi(D_8014BF40)
/* B7E80 80121780 2442BF40 */ addiu $v0, $v0, %lo(D_8014BF40)
/* B7E84 80121784 080485EE */ j .L801217B8
/* B7E88 80121788 AC820004 */ sw $v0, 0x4($a0)
glabel .L8012178C
/* B7E8C 8012178C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B7E90 80121790 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B7E94 80121794 8C620000 */ lw $v0, 0x0($v1)
/* B7E98 80121798 0040202D */ daddu $a0, $v0, $zero
/* B7E9C 8012179C 24420008 */ addiu $v0, $v0, 0x8
/* B7EA0 801217A0 AC620000 */ sw $v0, 0x0($v1)
/* B7EA4 801217A4 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B7EA8 801217A8 AC820000 */ sw $v0, 0x0($a0)
/* B7EAC 801217AC 3C028015 */ lui $v0, %hi(D_8014BF68)
/* B7EB0 801217B0 2442BF68 */ addiu $v0, $v0, %lo(D_8014BF68)
/* B7EB4 801217B4 AC820004 */ sw $v0, 0x4($a0)
glabel .L801217B8
/* B7EB8 801217B8 3C070001 */ lui $a3, (0x1F400 >> 16)
/* B7EBC 801217BC 3C028015 */ lui $v0, %hi(entity_fog_dist_max)
/* B7EC0 801217C0 8C424390 */ lw $v0, %lo(entity_fog_dist_max)($v0)
/* B7EC4 801217C4 3C038015 */ lui $v1, %hi(entity_fog_dist_min)
/* B7EC8 801217C8 8C63438C */ lw $v1, %lo(entity_fog_dist_min)($v1)
/* B7ECC 801217CC 34E7F400 */ ori $a3, $a3, (0x1F400 & 0xFFFF)
/* B7ED0 801217D0 00431023 */ subu $v0, $v0, $v1
/* B7ED4 801217D4 14400002 */ bnez $v0, .L801217E0
/* B7ED8 801217D8 00E2001A */ div $zero, $a3, $v0
/* B7EDC 801217DC 0007000D */ break 7
.L801217E0:
/* B7EE0 801217E0 2401FFFF */ addiu $at, $zero, -0x1
/* B7EE4 801217E4 14410004 */ bne $v0, $at, .L801217F8
/* B7EE8 801217E8 3C018000 */ lui $at, (0x80000000 >> 16)
/* B7EEC 801217EC 14E10002 */ bne $a3, $at, .L801217F8
/* B7EF0 801217F0 00000000 */ nop
/* B7EF4 801217F4 0006000D */ break 6
.L801217F8:
/* B7EF8 801217F8 00003812 */ mflo $a3
/* B7EFC 801217FC 240501F4 */ addiu $a1, $zero, 0x1F4
/* B7F00 80121800 00A32823 */ subu $a1, $a1, $v1
/* B7F04 80121804 00052A00 */ sll $a1, $a1, 8
/* B7F08 80121808 14400002 */ bnez $v0, .L80121814
/* B7F0C 8012180C 00A2001A */ div $zero, $a1, $v0
/* B7F10 80121810 0007000D */ break 7
.L80121814:
/* B7F14 80121814 2401FFFF */ addiu $at, $zero, -0x1
/* B7F18 80121818 14410004 */ bne $v0, $at, .L8012182C
/* B7F1C 8012181C 3C018000 */ lui $at, (0x80000000 >> 16)
/* B7F20 80121820 14A10002 */ bne $a1, $at, .L8012182C
/* B7F24 80121824 00000000 */ nop
/* B7F28 80121828 0006000D */ break 6
.L8012182C:
/* B7F2C 8012182C 00002812 */ mflo $a1
/* B7F30 80121830 3C08800A */ lui $t0, %hi(gMainGfxPos)
/* B7F34 80121834 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos)
/* B7F38 80121838 8D060000 */ lw $a2, 0x0($t0)
/* B7F3C 8012183C 00C0482D */ daddu $t1, $a2, $zero
/* B7F40 80121840 24C60008 */ addiu $a2, $a2, 0x8
/* B7F44 80121844 3C02F800 */ lui $v0, (0xF8000000 >> 16)
/* B7F48 80121848 AD060000 */ sw $a2, 0x0($t0)
/* B7F4C 8012184C AD220000 */ sw $v0, 0x0($t1)
/* B7F50 80121850 3C028015 */ lui $v0, %hi(D_8015437F)
/* B7F54 80121854 9042437F */ lbu $v0, %lo(D_8015437F)($v0)
/* B7F58 80121858 3C038015 */ lui $v1, %hi(D_80154383)
/* B7F5C 8012185C 90634383 */ lbu $v1, %lo(D_80154383)($v1)
/* B7F60 80121860 3C048015 */ lui $a0, %hi(D_80154387)
/* B7F64 80121864 90844387 */ lbu $a0, %lo(D_80154387)($a0)
/* B7F68 80121868 00021600 */ sll $v0, $v0, 24
/* B7F6C 8012186C 00031C00 */ sll $v1, $v1, 16
/* B7F70 80121870 00431025 */ or $v0, $v0, $v1
/* B7F74 80121874 00042200 */ sll $a0, $a0, 8
/* B7F78 80121878 3C038015 */ lui $v1, %hi(D_8015438B)
/* B7F7C 8012187C 9063438B */ lbu $v1, %lo(D_8015438B)($v1)
/* B7F80 80121880 00441025 */ or $v0, $v0, $a0
/* B7F84 80121884 00431025 */ or $v0, $v0, $v1
/* B7F88 80121888 AD220004 */ sw $v0, 0x4($t1)
/* B7F8C 8012188C 24C20008 */ addiu $v0, $a2, 0x8
/* B7F90 80121890 AD020000 */ sw $v0, 0x0($t0)
/* B7F94 80121894 3C02DB08 */ lui $v0, (0xDB080000 >> 16)
/* B7F98 80121898 ACC20000 */ sw $v0, 0x0($a2)
/* B7F9C 8012189C 00073C00 */ sll $a3, $a3, 16
/* B7FA0 801218A0 30A5FFFF */ andi $a1, $a1, 0xFFFF
/* B7FA4 801218A4 00E53825 */ or $a3, $a3, $a1
/* B7FA8 801218A8 ACC70004 */ sw $a3, 0x4($a2)
glabel .L801218AC
/* B7FAC 801218AC 3C02D9FD */ lui $v0, (0xD9FDFFFF >> 16)
.L801218B0:
/* B7FB0 801218B0 3C06800A */ lui $a2, %hi(gMainGfxPos)
/* B7FB4 801218B4 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos)
/* B7FB8 801218B8 3442FFFF */ ori $v0, $v0, (0xD9FDFFFF & 0xFFFF)
/* B7FBC 801218BC 8CC50000 */ lw $a1, 0x0($a2)
/* B7FC0 801218C0 3C048015 */ lui $a0, %hi(entity_fog_enabled)
/* B7FC4 801218C4 8C844378 */ lw $a0, %lo(entity_fog_enabled)($a0)
/* B7FC8 801218C8 00A0182D */ daddu $v1, $a1, $zero
/* B7FCC 801218CC 24A50008 */ addiu $a1, $a1, 0x8
/* B7FD0 801218D0 ACC50000 */ sw $a1, 0x0($a2)
/* B7FD4 801218D4 AC620000 */ sw $v0, 0x0($v1)
/* B7FD8 801218D8 10800005 */ beqz $a0, .L801218F0
/* B7FDC 801218DC AC600004 */ sw $zero, 0x4($v1)
/* B7FE0 801218E0 8E420000 */ lw $v0, 0x0($s2)
/* B7FE4 801218E4 30420800 */ andi $v0, $v0, 0x800
/* B7FE8 801218E8 1040000A */ beqz $v0, .L80121914
/* B7FEC 801218EC 3C02FC12 */ lui $v0, (0xFC121E04 >> 16)
.L801218F0:
/* B7FF0 801218F0 3C04FC12 */ lui $a0, (0xFC121824 >> 16)
/* B7FF4 801218F4 34841824 */ ori $a0, $a0, (0xFC121824 & 0xFFFF)
/* B7FF8 801218F8 3C03FF33 */ lui $v1, (0xFF33FFFF >> 16)
/* B7FFC 801218FC 3463FFFF */ ori $v1, $v1, (0xFF33FFFF & 0xFFFF)
/* B8000 80121900 24A20008 */ addiu $v0, $a1, 0x8
/* B8004 80121904 ACC20000 */ sw $v0, 0x0($a2)
/* B8008 80121908 ACA40000 */ sw $a0, 0x0($a1)
/* B800C 8012190C 0804864B */ j .L8012192C
/* B8010 80121910 ACA30004 */ sw $v1, 0x4($a1)
.L80121914:
/* B8014 80121914 34421E04 */ ori $v0, $v0, (0xFC121E04 & 0xFFFF)
/* B8018 80121918 24A30008 */ addiu $v1, $a1, 0x8
/* B801C 8012191C ACC30000 */ sw $v1, 0x0($a2)
/* B8020 80121920 ACA20000 */ sw $v0, 0x0($a1)
/* B8024 80121924 2402F3F8 */ addiu $v0, $zero, -0xC08
/* B8028 80121928 ACA20004 */ sw $v0, 0x4($a1)
.L8012192C:
/* B802C 8012192C 8E42005C */ lw $v0, 0x5C($s2)
/* B8030 80121930 10400012 */ beqz $v0, .L8012197C
/* B8034 80121934 00000000 */ nop
/* B8038 80121938 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* B803C 8012193C 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* B8040 80121940 8C830000 */ lw $v1, 0x0($a0)
/* B8044 80121944 3C028015 */ lui $v0, %hi(D_80154374)
/* B8048 80121948 8C424374 */ lw $v0, %lo(D_80154374)($v0)
/* B804C 8012194C 0060282D */ daddu $a1, $v1, $zero
/* B8050 80121950 24630008 */ addiu $v1, $v1, 0x8
/* B8054 80121954 00021080 */ sll $v0, $v0, 2
/* B8058 80121958 3042FFFF */ andi $v0, $v0, 0xFFFF
/* B805C 8012195C AC830000 */ sw $v1, 0x0($a0)
/* B8060 80121960 3C03DB06 */ lui $v1, (0xDB060000 >> 16)
/* B8064 80121964 00431025 */ or $v0, $v0, $v1
/* B8068 80121968 ACA20000 */ sw $v0, 0x0($a1)
/* B806C 8012196C 8E42005C */ lw $v0, 0x5C($s2)
/* B8070 80121970 3C038000 */ lui $v1, (0x80000000 >> 16)
/* B8074 80121974 00431021 */ addu $v0, $v0, $v1
/* B8078 80121978 ACA20004 */ sw $v0, 0x4($a1)
.L8012197C:
/* B807C 8012197C 3C10800A */ lui $s0, %hi(gMainGfxPos)
/* B8080 80121980 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos)
/* B8084 80121984 8E020000 */ lw $v0, 0x0($s0)
/* B8088 80121988 3C11E700 */ lui $s1, (0xE7000000 >> 16)
/* B808C 8012198C 0040182D */ daddu $v1, $v0, $zero
/* B8090 80121990 AC710000 */ sw $s1, 0x0($v1)
/* B8094 80121994 AC600004 */ sw $zero, 0x4($v1)
/* B8098 80121998 8E430060 */ lw $v1, 0x60($s2)
/* B809C 8012199C 24420008 */ addiu $v0, $v0, 0x8
/* B80A0 801219A0 10600004 */ beqz $v1, .L801219B4
/* B80A4 801219A4 AE020000 */ sw $v0, 0x0($s0)
/* B80A8 801219A8 8E440064 */ lw $a0, 0x64($s2)
/* B80AC 801219AC 0060F809 */ jalr $v1
/* B80B0 801219B0 00000000 */ nop
.L801219B4:
/* B80B4 801219B4 3C05D838 */ lui $a1, (0xD8380002 >> 16)
/* B80B8 801219B8 8E020000 */ lw $v0, 0x0($s0)
/* B80BC 801219BC 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF)
/* B80C0 801219C0 0040182D */ daddu $v1, $v0, $zero
/* B80C4 801219C4 24420008 */ addiu $v0, $v0, 0x8
/* B80C8 801219C8 AE020000 */ sw $v0, 0x0($s0)
/* B80CC 801219CC AC710000 */ sw $s1, 0x0($v1)
/* B80D0 801219D0 AC600004 */ sw $zero, 0x4($v1)
/* B80D4 801219D4 24430008 */ addiu $v1, $v0, 0x8
/* B80D8 801219D8 AE030000 */ sw $v1, 0x0($s0)
/* B80DC 801219DC 3C03DE00 */ lui $v1, (0xDE000000 >> 16)
/* B80E0 801219E0 AC430000 */ sw $v1, 0x0($v0)
/* B80E4 801219E4 8E440014 */ lw $a0, 0x14($s2)
/* B80E8 801219E8 24430010 */ addiu $v1, $v0, 0x10
/* B80EC 801219EC AE030000 */ sw $v1, 0x0($s0)
/* B80F0 801219F0 24030040 */ addiu $v1, $zero, 0x40
/* B80F4 801219F4 AC450008 */ sw $a1, 0x8($v0)
/* B80F8 801219F8 AC43000C */ sw $v1, 0xC($v0)
/* B80FC 801219FC AC510010 */ sw $s1, 0x10($v0)
/* B8100 80121A00 AC400014 */ sw $zero, 0x14($v0)
/* B8104 80121A04 AC440004 */ sw $a0, 0x4($v0)
/* B8108 80121A08 8E430000 */ lw $v1, 0x0($s2)
/* B810C 80121A0C 24420018 */ addiu $v0, $v0, 0x18
/* B8110 80121A10 30630200 */ andi $v1, $v1, 0x200
/* B8114 80121A14 106000AE */ beqz $v1, .L80121CD0
/* B8118 80121A18 AE020000 */ sw $v0, 0x0($s0)
/* B811C 80121A1C 27A40010 */ addiu $a0, $sp, 0x10
/* B8120 80121A20 26510018 */ addiu $s1, $s2, 0x18
/* B8124 80121A24 0C019D60 */ jal guMtxL2F
/* B8128 80121A28 0220282D */ daddu $a1, $s1, $zero
/* B812C 80121A2C 27B00050 */ addiu $s0, $sp, 0x50
/* B8130 80121A30 0C048450 */ jal make_entity_model_mtx_flipZ
/* B8134 80121A34 0200202D */ daddu $a0, $s0, $zero
/* B8138 80121A38 27A40010 */ addiu $a0, $sp, 0x10
/* B813C 80121A3C 0200282D */ daddu $a1, $s0, $zero
/* B8140 80121A40 0C019D80 */ jal guMtxCatF
/* B8144 80121A44 0080302D */ daddu $a2, $a0, $zero
/* B8148 80121A48 27A40010 */ addiu $a0, $sp, 0x10
/* B814C 80121A4C 0C019D40 */ jal guMtxF2L
/* B8150 80121A50 0220282D */ daddu $a1, $s1, $zero
/* B8154 80121A54 3C040001 */ lui $a0, (0x11630 >> 16)
/* B8158 80121A58 34841630 */ ori $a0, $a0, (0x11630 & 0xFFFF)
/* B815C 80121A5C 26450058 */ addiu $a1, $s2, 0x58
/* B8160 80121A60 3C028007 */ lui $v0, %hi(gMatrixListPos)
/* B8164 80121A64 944241F0 */ lhu $v0, %lo(gMatrixListPos)($v0)
/* B8168 80121A68 3C03800A */ lui $v1, %hi(gDisplayContext)
/* B816C 80121A6C 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* B8170 80121A70 00021180 */ sll $v0, $v0, 6
/* B8174 80121A74 00621821 */ addu $v1, $v1, $v0
/* B8178 80121A78 00641821 */ addu $v1, $v1, $a0
.L80121A7C:
/* B817C 80121A7C 8E2E0000 */ lw $t6, 0x0($s1)
/* B8180 80121A80 8E2F0004 */ lw $t7, 0x4($s1)
/* B8184 80121A84 8E380008 */ lw $t8, 0x8($s1)
/* B8188 80121A88 8E39000C */ lw $t9, 0xC($s1)
/* B818C 80121A8C AC6E0000 */ sw $t6, 0x0($v1)
/* B8190 80121A90 AC6F0004 */ sw $t7, 0x4($v1)
/* B8194 80121A94 AC780008 */ sw $t8, 0x8($v1)
/* B8198 80121A98 AC79000C */ sw $t9, 0xC($v1)
/* B819C 80121A9C 26310010 */ addiu $s1, $s1, 0x10
/* B81A0 80121AA0 1625FFF6 */ bne $s1, $a1, .L80121A7C
/* B81A4 80121AA4 24630010 */ addiu $v1, $v1, 0x10
/* B81A8 80121AA8 3C03DA38 */ lui $v1, (0xDA380002 >> 16)
/* B81AC 80121AAC 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF)
/* B81B0 80121AB0 3C080001 */ lui $t0, (0x11630 >> 16)
/* B81B4 80121AB4 3C06800A */ lui $a2, %hi(gMainGfxPos)
/* B81B8 80121AB8 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos)
/* B81BC 80121ABC 35081630 */ ori $t0, $t0, (0x11630 & 0xFFFF)
/* B81C0 80121AC0 3C058007 */ lui $a1, %hi(gMatrixListPos)
/* B81C4 80121AC4 24A541F0 */ addiu $a1, $a1, %lo(gMatrixListPos)
/* B81C8 80121AC8 8CC40000 */ lw $a0, 0x0($a2)
/* B81CC 80121ACC 94A20000 */ lhu $v0, 0x0($a1)
/* B81D0 80121AD0 0080382D */ daddu $a3, $a0, $zero
/* B81D4 80121AD4 24840008 */ addiu $a0, $a0, 0x8
/* B81D8 80121AD8 ACC40000 */ sw $a0, 0x0($a2)
/* B81DC 80121ADC ACE30000 */ sw $v1, 0x0($a3)
/* B81E0 80121AE0 24430001 */ addiu $v1, $v0, 0x1
/* B81E4 80121AE4 3042FFFF */ andi $v0, $v0, 0xFFFF
/* B81E8 80121AE8 00021180 */ sll $v0, $v0, 6
/* B81EC 80121AEC A4A30000 */ sh $v1, 0x0($a1)
/* B81F0 80121AF0 3C03800A */ lui $v1, %hi(gDisplayContext)
/* B81F4 80121AF4 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* B81F8 80121AF8 00481021 */ addu $v0, $v0, $t0
/* B81FC 80121AFC 00621821 */ addu $v1, $v1, $v0
/* B8200 80121B00 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8204 80121B04 ACE30004 */ sw $v1, 0x4($a3)
/* B8208 80121B08 AC820000 */ sw $v0, 0x0($a0)
/* B820C 80121B0C 8E430014 */ lw $v1, 0x14($s2)
/* B8210 80121B10 24820008 */ addiu $v0, $a0, 0x8
/* B8214 80121B14 ACC20000 */ sw $v0, 0x0($a2)
/* B8218 80121B18 08048724 */ j .L80121C90
/* B821C 80121B1C AC830004 */ sw $v1, 0x4($a0)
.L80121B20:
/* B8220 80121B20 3C03D9C0 */ lui $v1, (0xD9C0F9FA >> 16)
/* B8224 80121B24 3463F9FA */ ori $v1, $v1, (0xD9C0F9FA & 0xFFFF)
/* B8228 80121B28 3C05D9FF */ lui $a1, (0xD9FFFFFF >> 16)
/* B822C 80121B2C 34A5FFFF */ ori $a1, $a1, (0xD9FFFFFF & 0xFFFF)
/* B8230 80121B30 3C040022 */ lui $a0, (0x220005 >> 16)
/* B8234 80121B34 34840005 */ ori $a0, $a0, (0x220005 & 0xFFFF)
/* B8238 80121B38 3C06DC08 */ lui $a2, (0xDC08060A >> 16)
/* B823C 80121B3C 34C6060A */ ori $a2, $a2, (0xDC08060A & 0xFFFF)
/* B8240 80121B40 3C07DC08 */ lui $a3, (0xDC08090A >> 16)
/* B8244 80121B44 34E7090A */ ori $a3, $a3, (0xDC08090A & 0xFFFF)
/* B8248 80121B48 3C08D700 */ lui $t0, (0xD7000002 >> 16)
/* B824C 80121B4C 35080002 */ ori $t0, $t0, (0xD7000002 & 0xFFFF)
/* B8250 80121B50 3C0AE200 */ lui $t2, (0xE2001E01 >> 16)
/* B8254 80121B54 354A1E01 */ ori $t2, $t2, (0xE2001E01 & 0xFFFF)
/* B8258 80121B58 3C0BE300 */ lui $t3, (0xE3000A11 >> 16)
/* B825C 80121B5C 356B0A11 */ ori $t3, $t3, (0xE3000A11 & 0xFFFF)
/* B8260 80121B60 3C090008 */ lui $t1, (0x82CF0 >> 16)
/* B8264 80121B64 35292CF0 */ ori $t1, $t1, (0x82CF0 & 0xFFFF)
/* B8268 80121B68 25820008 */ addiu $v0, $t4, 0x8
/* B826C 80121B6C ADA20000 */ sw $v0, 0x0($t5)
/* B8270 80121B70 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B8274 80121B74 AD820000 */ sw $v0, 0x0($t4)
/* B8278 80121B78 25820010 */ addiu $v0, $t4, 0x10
/* B827C 80121B7C AD800004 */ sw $zero, 0x4($t4)
/* B8280 80121B80 ADA20000 */ sw $v0, 0x0($t5)
/* B8284 80121B84 25820018 */ addiu $v0, $t4, 0x18
/* B8288 80121B88 AD830008 */ sw $v1, 0x8($t4)
/* B828C 80121B8C AD80000C */ sw $zero, 0xC($t4)
/* B8290 80121B90 ADA20000 */ sw $v0, 0x0($t5)
/* B8294 80121B94 25820020 */ addiu $v0, $t4, 0x20
/* B8298 80121B98 AD850010 */ sw $a1, 0x10($t4)
/* B829C 80121B9C AD840014 */ sw $a0, 0x14($t4)
/* B82A0 80121BA0 ADA20000 */ sw $v0, 0x0($t5)
/* B82A4 80121BA4 3C02DB02 */ lui $v0, (0xDB020000 >> 16)
/* B82A8 80121BA8 AD820018 */ sw $v0, 0x18($t4)
/* B82AC 80121BAC 24020018 */ addiu $v0, $zero, 0x18
/* B82B0 80121BB0 AD82001C */ sw $v0, 0x1C($t4)
/* B82B4 80121BB4 25820028 */ addiu $v0, $t4, 0x28
/* B82B8 80121BB8 ADA20000 */ sw $v0, 0x0($t5)
/* B82BC 80121BBC 3C028015 */ lui $v0, %hi(D_8014C270)
/* B82C0 80121BC0 2442C270 */ addiu $v0, $v0, %lo(D_8014C270)
/* B82C4 80121BC4 AD820024 */ sw $v0, 0x24($t4)
/* B82C8 80121BC8 2442FFF8 */ addiu $v0, $v0, -0x8
/* B82CC 80121BCC AD82002C */ sw $v0, 0x2C($t4)
/* B82D0 80121BD0 2402FFFF */ addiu $v0, $zero, -0x1
/* B82D4 80121BD4 AD860020 */ sw $a2, 0x20($t4)
/* B82D8 80121BD8 AD870028 */ sw $a3, 0x28($t4)
/* B82DC 80121BDC AD880030 */ sw $t0, 0x30($t4)
/* B82E0 80121BE0 AD820034 */ sw $v0, 0x34($t4)
/* B82E4 80121BE4 AD8A0038 */ sw $t2, 0x38($t4)
/* B82E8 80121BE8 AD80003C */ sw $zero, 0x3C($t4)
/* B82EC 80121BEC AD8B0040 */ sw $t3, 0x40($t4)
/* B82F0 80121BF0 AD890044 */ sw $t1, 0x44($t4)
/* B82F4 80121BF4 8E460014 */ lw $a2, 0x14($s2)
/* B82F8 80121BF8 25820030 */ addiu $v0, $t4, 0x30
/* B82FC 80121BFC ADA20000 */ sw $v0, 0x0($t5)
/* B8300 80121C00 25820038 */ addiu $v0, $t4, 0x38
/* B8304 80121C04 8CC30000 */ lw $v1, 0x0($a2)
/* B8308 80121C08 27B000A8 */ addiu $s0, $sp, 0xA8
/* B830C 80121C0C ADA20000 */ sw $v0, 0x0($t5)
/* B8310 80121C10 AFA30090 */ sw $v1, 0x90($sp)
/* B8314 80121C14 8CC30004 */ lw $v1, 0x4($a2)
/* B8318 80121C18 25820040 */ addiu $v0, $t4, 0x40
/* B831C 80121C1C ADA20000 */ sw $v0, 0x0($t5)
/* B8320 80121C20 AFA30094 */ sw $v1, 0x94($sp)
/* B8324 80121C24 94C3000A */ lhu $v1, 0xA($a2)
/* B8328 80121C28 25820048 */ addiu $v0, $t4, 0x48
/* B832C 80121C2C ADA20000 */ sw $v0, 0x0($t5)
/* B8330 80121C30 A7A30098 */ sh $v1, 0x98($sp)
/* B8334 80121C34 94C2000E */ lhu $v0, 0xE($a2)
/* B8338 80121C38 0200202D */ daddu $a0, $s0, $zero
/* B833C 80121C3C A7A2009A */ sh $v0, 0x9A($sp)
/* B8340 80121C40 8CC20008 */ lw $v0, 0x8($a2)
/* B8344 80121C44 26450018 */ addiu $a1, $s2, 0x18
/* B8348 80121C48 00021023 */ negu $v0, $v0
/* B834C 80121C4C 00021FC2 */ srl $v1, $v0, 31
/* B8350 80121C50 00431021 */ addu $v0, $v0, $v1
/* B8354 80121C54 00021043 */ sra $v0, $v0, 1
/* B8358 80121C58 A7A2009C */ sh $v0, 0x9C($sp)
/* B835C 80121C5C 8CC2000C */ lw $v0, 0xC($a2)
/* B8360 80121C60 240300FF */ addiu $v1, $zero, 0xFF
/* B8364 80121C64 A3A300A0 */ sb $v1, 0xA0($sp)
/* B8368 80121C68 00021FC2 */ srl $v1, $v0, 31
/* B836C 80121C6C 00431021 */ addu $v0, $v0, $v1
/* B8370 80121C70 00021043 */ sra $v0, $v0, 1
/* B8374 80121C74 0C019D60 */ jal guMtxL2F
/* B8378 80121C78 A7A2009E */ sh $v0, 0x9E($sp)
/* B837C 80121C7C 0000202D */ daddu $a0, $zero, $zero
/* B8380 80121C80 27A50090 */ addiu $a1, $sp, 0x90
/* B8384 80121C84 0080302D */ daddu $a2, $a0, $zero
/* B8388 80121C88 0C04EBDC */ jal imgfx_appendGfx_component
/* B838C 80121C8C 0200382D */ daddu $a3, $s0, $zero
.L80121C90:
/* B8390 80121C90 3C03D838 */ lui $v1, (0xD8380002 >> 16)
/* B8394 80121C94 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* B8398 80121C98 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* B839C 80121C9C 8C820000 */ lw $v0, 0x0($a0)
/* B83A0 80121CA0 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF)
/* B83A4 80121CA4 0040282D */ daddu $a1, $v0, $zero
/* B83A8 80121CA8 24420008 */ addiu $v0, $v0, 0x8
/* B83AC 80121CAC AC820000 */ sw $v0, 0x0($a0)
/* B83B0 80121CB0 ACA30000 */ sw $v1, 0x0($a1)
/* B83B4 80121CB4 24030040 */ addiu $v1, $zero, 0x40
/* B83B8 80121CB8 ACA30004 */ sw $v1, 0x4($a1)
/* B83BC 80121CBC 24430008 */ addiu $v1, $v0, 0x8
/* B83C0 80121CC0 AC830000 */ sw $v1, 0x0($a0)
/* B83C4 80121CC4 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* B83C8 80121CC8 AC430000 */ sw $v1, 0x0($v0)
/* B83CC 80121CCC AC400004 */ sw $zero, 0x4($v0)
.L80121CD0:
/* B83D0 80121CD0 8FBF00F4 */ lw $ra, 0xF4($sp)
/* B83D4 80121CD4 8FB200F0 */ lw $s2, 0xF0($sp)
/* B83D8 80121CD8 8FB100EC */ lw $s1, 0xEC($sp)
/* B83DC 80121CDC 8FB000E8 */ lw $s0, 0xE8($sp)
/* B83E0 80121CE0 03E00008 */ jr $ra
/* B83E4 80121CE4 27BD00F8 */ addiu $sp, $sp, 0xF8
### DECOMPILED C INSTRUCTIONS:
void appendGfx_entity_model(EntityModel* model) {
Matrix4f mtx;
Matrix4f mtx2;
ImgFXTexture ifxImg;
Matrix4f imgfxMtx;
gDisplayContext->matrixStack[gMatrixListPos] = model->transform;
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (!(model->flags & ENTITY_MODEL_FLAG_USE_IMAGE)) {
if (!(model->flags & ENTITY_MODEL_FLAG_10000)) {
s32 cond;
gDPPipeSync(gMainGfxPos++);
gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, 255);
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE);
gSPSetOtherMode(gMainGfxPos++, G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 18, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE);
cond = FALSE;
if (entity_fog_enabled && !(model->flags & ENTITY_MODEL_FLAG_FOG_DISABLED)) {
cond = TRUE;
}
switch (cond) {
case FALSE:
switch (model->renderMode) {
case RENDER_MODE_SURFACE_OPA:
gSPDisplayList(gMainGfxPos++, D_8014B7F8);
break;
case RENDER_MODE_DECAL_OPA:
gSPDisplayList(gMainGfxPos++, D_8014B820);
break;
case RENDER_MODE_INTERSECTING_OPA:
gSPDisplayList(gMainGfxPos++, D_8014B848);
break;
case RENDER_MODE_ALPHATEST:
gSPDisplayList(gMainGfxPos++, D_8014B870);
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
case RENDER_MODE_SURFACE_XLU_LAYER2:
case RENDER_MODE_SURFACE_XLU_LAYER3:
gSPDisplayList(gMainGfxPos++, D_8014B898);
break;
case RENDER_MODE_SURFACE_XLU_NO_AA:
gSPDisplayList(gMainGfxPos++, D_8014B9B0);
break;
case RENDER_MODE_DECAL_XLU:
case RENDER_MODE_1E:
gSPDisplayList(gMainGfxPos++, D_8014B8C0);
break;
case RENDER_MODE_DECAL_XLU_NOAA:
case RENDER_MODE_SHADOW:
gSPDisplayList(gMainGfxPos++, D_8014B9D8);
break;
case RENDER_MODE_INTERSECTING_XLU:
gSPDisplayList(gMainGfxPos++, D_8014B8E8);
break;
case RENDER_MODE_28:
gSPDisplayList(gMainGfxPos++, D_8014BA00);
break;
case RENDER_MODE_ALPHATEST_ONESIDED:
gSPDisplayList(gMainGfxPos++, D_8014B988);
break;
case RENDER_MODE_SURFACE_OPA_NO_ZB:
case RENDER_MODE_2A:
gSPDisplayList(gMainGfxPos++, D_8014BA48);
break;
case RENDER_MODE_ALPHATEST_NO_ZB:
case RENDER_MODE_2B:
gSPDisplayList(gMainGfxPos++, D_8014BA70);
break;
case RENDER_MODE_SURFACE_XLU_NO_ZB:
case RENDER_MODE_2C:
gSPDisplayList(gMainGfxPos++, D_8014BA98);
break;
case RENDER_MODE_2D:
gSPDisplayList(gMainGfxPos++, D_8014BAE8);
break;
}
break;
case TRUE:
switch (model->renderMode) {
case RENDER_MODE_SURFACE_OPA:
gSPDisplayList(gMainGfxPos++, D_8014BE78);
break;
case RENDER_MODE_DECAL_OPA:
gSPDisplayList(gMainGfxPos++, D_8014BEA0);
break;
case RENDER_MODE_INTERSECTING_OPA:
gSPDisplayList(gMainGfxPos++, D_8014BEC8);
break;
case RENDER_MODE_ALPHATEST:
gSPDisplayList(gMainGfxPos++, D_8014BEF0);
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
gSPDisplayList(gMainGfxPos++, D_8014BF18);
break;
case RENDER_MODE_DECAL_XLU:
gSPDisplayList(gMainGfxPos++, D_8014BF40);
break;
case RENDER_MODE_INTERSECTING_XLU:
gSPDisplayList(gMainGfxPos++, D_8014BF68);
break;
}
gDPSetFogColor(gMainGfxPos++, entity_fog_red, entity_fog_green, entity_fog_blue, entity_fog_alpha);
gSPFogPosition(gMainGfxPos++, entity_fog_dist_min, entity_fog_dist_max);
break;
}
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
if (!entity_fog_enabled || (model->flags & ENTITY_MODEL_FLAG_FOG_DISABLED)) {
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
} else {
gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, 0, TEXEL0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED);
}
}
if (model->vertexArray != NULL) {
gSPSegment(gMainGfxPos++, D_80154374, VIRTUAL_TO_PHYSICAL(model->vertexArray));
}
gDPPipeSync(gMainGfxPos++);
if (model->fpSetupGfxCallback != NULL) {
model->fpSetupGfxCallback(model->setupGfxCallbackArg0);
}
gDPPipeSync(gMainGfxPos++);
gSPDisplayList(gMainGfxPos++, model->gfx.displayList);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMainGfxPos++);
if (!(model->flags & ENTITY_MODEL_FLAG_REFLECT)) {
return;
}
guMtxL2F(mtx, &model->transform);
make_entity_model_mtx_flipZ(mtx2);
guMtxCatF(mtx, mtx2, mtx);
guMtxF2L(mtx, &model->transform);
gDisplayContext->matrixStack[gMatrixListPos] = model->transform;
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, model->gfx.displayList);
} else {
SpriteRasterInfo* imageData;
gDPPipeSync(gMainGfxPos++);
gSPClearGeometryMode(gMainGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
gSPSetGeometryMode(gMainGfxPos++, G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
gSPSetLights1(gMainGfxPos++, D_8014C268);
gSPTexture(gMainGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE);
gSPSetOtherMode(gMainGfxPos++, G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 18, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_PERSP | G_CYC_1CYCLE);
imageData = model->gfx.imageData;
ifxImg.raster = imageData->raster;
ifxImg.palette = imageData->defaultPal;
ifxImg.width = imageData->width;
ifxImg.height = imageData->height;
ifxImg.xOffset = -imageData->width / 2;
ifxImg.yOffset = imageData->height / 2;
ifxImg.alpha = 255;
guMtxL2F(imgfxMtx, &model->transform);
imgfx_appendGfx_component(0, &ifxImg, 0, imgfxMtx);
}
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMainGfxPos++);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel render_item_entities
/* C9554 80132E54 27BDFEB0 */ addiu $sp, $sp, -0x150
/* C9558 80132E58 AFB60138 */ sw $s6, 0x138($sp)
/* C955C 80132E5C 0000B02D */ daddu $s6, $zero, $zero
/* C9560 80132E60 AFB40130 */ sw $s4, 0x130($sp)
/* C9564 80132E64 27B40058 */ addiu $s4, $sp, 0x58
/* C9568 80132E68 AFB50134 */ sw $s5, 0x134($sp)
/* C956C 80132E6C 27B50098 */ addiu $s5, $sp, 0x98
/* C9570 80132E70 AFB10124 */ sw $s1, 0x124($sp)
/* C9574 80132E74 3C11800A */ lui $s1, %hi(gMainGfxPos)
/* C9578 80132E78 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos)
/* C957C 80132E7C AFBE0140 */ sw $fp, 0x140($sp)
/* C9580 80132E80 3C1EE600 */ lui $fp, (0xE6000000 >> 16)
/* C9584 80132E84 AFB7013C */ sw $s7, 0x13C($sp)
/* C9588 80132E88 3C17E700 */ lui $s7, (0xE7000000 >> 16)
/* C958C 80132E8C AFB3012C */ sw $s3, 0x12C($sp)
/* C9590 80132E90 3C13F540 */ lui $s3, (0xF5400400 >> 16)
/* C9594 80132E94 36730400 */ ori $s3, $s3, (0xF5400400 & 0xFFFF)
/* C9598 80132E98 AFBF0144 */ sw $ra, 0x144($sp)
/* C959C 80132E9C AFB20128 */ sw $s2, 0x128($sp)
/* C95A0 80132EA0 AFB00120 */ sw $s0, 0x120($sp)
/* C95A4 80132EA4 F7B40148 */ sdc1 $f20, 0x148($sp)
.L80132EA8:
/* C95A8 80132EA8 3C038015 */ lui $v1, %hi(gCurrentItemEntities)
/* C95AC 80132EAC 8C6365A0 */ lw $v1, %lo(gCurrentItemEntities)($v1)
/* C95B0 80132EB0 00161080 */ sll $v0, $s6, 2
/* C95B4 80132EB4 00431021 */ addu $v0, $v0, $v1
/* C95B8 80132EB8 8C520000 */ lw $s2, 0x0($v0)
/* C95BC 80132EBC 5240028C */ beql $s2, $zero, .L801338F0
/* C95C0 80132EC0 26D60001 */ addiu $s6, $s6, 0x1
/* C95C4 80132EC4 8E430000 */ lw $v1, 0x0($s2)
/* C95C8 80132EC8 10600288 */ beqz $v1, .L801338EC
/* C95CC 80132ECC 30620040 */ andi $v0, $v1, 0x40
/* C95D0 80132ED0 54400287 */ bnel $v0, $zero, .L801338F0
/* C95D4 80132ED4 26D60001 */ addiu $s6, $s6, 0x1
/* C95D8 80132ED8 3C020010 */ lui $v0, (0x100000 >> 16)
/* C95DC 80132EDC 00621024 */ and $v0, $v1, $v0
/* C95E0 80132EE0 10400282 */ beqz $v0, .L801338EC
/* C95E4 80132EE4 3C020004 */ lui $v0, (0x40000 >> 16)
/* C95E8 80132EE8 00621024 */ and $v0, $v1, $v0
/* C95EC 80132EEC 14400002 */ bnez $v0, .L80132EF8
/* C95F0 80132EF0 0000802D */ daddu $s0, $zero, $zero
/* C95F4 80132EF4 2410FFFC */ addiu $s0, $zero, -0x4
.L80132EF8:
/* C95F8 80132EF8 86430018 */ lh $v1, 0x18($s2)
/* C95FC 80132EFC 24020157 */ addiu $v0, $zero, 0x157
/* C9600 80132F00 10620005 */ beq $v1, $v0, .L80132F18
/* C9604 80132F04 24020159 */ addiu $v0, $zero, 0x159
/* C9608 80132F08 10620003 */ beq $v1, $v0, .L80132F18
/* C960C 80132F0C 24020156 */ addiu $v0, $zero, 0x156
/* C9610 80132F10 14620005 */ bne $v1, $v0, .L80132F28
/* C9614 80132F14 00000000 */ nop
.L80132F18:
/* C9618 80132F18 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* C961C 80132F1C 44810000 */ mtc1 $at, $f0
/* C9620 80132F20 0000802D */ daddu $s0, $zero, $zero
/* C9624 80132F24 E6400030 */ swc1 $f0, 0x30($s2)
.L80132F28:
/* C9628 80132F28 3C0E800B */ lui $t6, %hi(gCameras)
/* C962C 80132F2C 25CE1D80 */ addiu $t6, $t6, %lo(gCameras)
/* C9630 80132F30 3C03800A */ lui $v1, %hi(gCurrentCamID)
/* C9634 80132F34 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1)
/* C9638 80132F38 3C014334 */ lui $at, (0x43340000 >> 16)
/* C963C 80132F3C 44816000 */ mtc1 $at, $f12
/* C9640 80132F40 00031080 */ sll $v0, $v1, 2
/* C9644 80132F44 00431021 */ addu $v0, $v0, $v1
/* C9648 80132F48 00021080 */ sll $v0, $v0, 2
/* C964C 80132F4C 00431023 */ subu $v0, $v0, $v1
/* C9650 80132F50 000218C0 */ sll $v1, $v0, 3
/* C9654 80132F54 00431021 */ addu $v0, $v0, $v1
/* C9658 80132F58 000210C0 */ sll $v0, $v0, 3
/* C965C 80132F5C 004E1021 */ addu $v0, $v0, $t6
/* C9660 80132F60 C440006C */ lwc1 $f0, 0x6C($v0)
/* C9664 80132F64 0C00A6C9 */ jal clamp_angle
/* C9668 80132F68 46006301 */ sub.s $f12, $f12, $f0
/* C966C 80132F6C 0280202D */ daddu $a0, $s4, $zero
/* C9670 80132F70 C642000C */ lwc1 $f2, 0xC($s2)
/* C9674 80132F74 44902000 */ mtc1 $s0, $f4
/* C9678 80132F78 00000000 */ nop
/* C967C 80132F7C 46802120 */ cvt.s.w $f4, $f4
/* C9680 80132F80 46001087 */ neg.s $f2, $f2
/* C9684 80132F84 46041081 */ sub.s $f2, $f2, $f4
/* C9688 80132F88 8E450008 */ lw $a1, 0x8($s2)
/* C968C 80132F8C 8E470010 */ lw $a3, 0x10($s2)
/* C9690 80132F90 44061000 */ mfc1 $a2, $f2
/* C9694 80132F94 0C019E40 */ jal guTranslateF
/* C9698 80132F98 46000506 */ mov.s $f20, $f0
/* C969C 80132F9C 4405A000 */ mfc1 $a1, $f20
/* C96A0 80132FA0 44800000 */ mtc1 $zero, $f0
/* C96A4 80132FA4 3C073F80 */ lui $a3, (0x3F800000 >> 16)
/* C96A8 80132FA8 44060000 */ mfc1 $a2, $f0
/* C96AC 80132FAC 02A0202D */ daddu $a0, $s5, $zero
/* C96B0 80132FB0 0C019EC8 */ jal guRotateF
/* C96B4 80132FB4 AFA60010 */ sw $a2, 0x10($sp)
/* C96B8 80132FB8 8E420000 */ lw $v0, 0x0($s2)
/* C96BC 80132FBC 30424000 */ andi $v0, $v0, 0x4000
/* C96C0 80132FC0 1040000A */ beqz $v0, .L80132FEC
/* C96C4 80132FC4 27B000D8 */ addiu $s0, $sp, 0xD8
/* C96C8 80132FC8 8E450030 */ lw $a1, 0x30($s2)
/* C96CC 80132FCC 0200202D */ daddu $a0, $s0, $zero
/* C96D0 80132FD0 00A0302D */ daddu $a2, $a1, $zero
/* C96D4 80132FD4 0C019DF0 */ jal guScaleF
/* C96D8 80132FD8 00A0382D */ daddu $a3, $a1, $zero
/* C96DC 80132FDC 02A0202D */ daddu $a0, $s5, $zero
/* C96E0 80132FE0 0200282D */ daddu $a1, $s0, $zero
/* C96E4 80132FE4 0C019D80 */ jal guMtxCatF
/* C96E8 80132FE8 02A0302D */ daddu $a2, $s5, $zero
.L80132FEC:
/* C96EC 80132FEC 02A0202D */ daddu $a0, $s5, $zero
/* C96F0 80132FF0 0280282D */ daddu $a1, $s4, $zero
/* C96F4 80132FF4 0C019D80 */ jal guMtxCatF
/* C96F8 80132FF8 0280302D */ daddu $a2, $s4, $zero
/* C96FC 80132FFC 0280202D */ daddu $a0, $s4, $zero
/* C9700 80133000 0C019D40 */ jal guMtxF2L
/* C9704 80133004 27A50018 */ addiu $a1, $sp, 0x18
/* C9708 80133008 3C020001 */ lui $v0, (0x11630 >> 16)
/* C970C 8013300C 34421630 */ ori $v0, $v0, (0x11630 & 0xFFFF)
/* C9710 80133010 27A50018 */ addiu $a1, $sp, 0x18
/* C9714 80133014 3C038007 */ lui $v1, %hi(gMatrixListPos)
/* C9718 80133018 946341F0 */ lhu $v1, %lo(gMatrixListPos)($v1)
/* C971C 8013301C 3C04800A */ lui $a0, %hi(gDisplayContext)
/* C9720 80133020 8C84A674 */ lw $a0, %lo(gDisplayContext)($a0)
/* C9724 80133024 00031980 */ sll $v1, $v1, 6
/* C9728 80133028 00832021 */ addu $a0, $a0, $v1
/* C972C 8013302C 00822021 */ addu $a0, $a0, $v0
.L80133030:
/* C9730 80133030 8CAF0000 */ lw $t7, 0x0($a1)
/* C9734 80133034 8CB80004 */ lw $t8, 0x4($a1)
/* C9738 80133038 8CB90008 */ lw $t9, 0x8($a1)
/* C973C 8013303C 8CAE000C */ lw $t6, 0xC($a1)
/* C9740 80133040 AC8F0000 */ sw $t7, 0x0($a0)
/* C9744 80133044 AC980004 */ sw $t8, 0x4($a0)
/* C9748 80133048 AC990008 */ sw $t9, 0x8($a0)
/* C974C 8013304C AC8E000C */ sw $t6, 0xC($a0)
/* C9750 80133050 24A50010 */ addiu $a1, $a1, 0x10
/* C9754 80133054 14B4FFF6 */ bne $a1, $s4, .L80133030
/* C9758 80133058 24840010 */ addiu $a0, $a0, 0x10
/* C975C 8013305C 3C02DA38 */ lui $v0, (0xDA380002 >> 16)
/* C9760 80133060 34420002 */ ori $v0, $v0, (0xDA380002 & 0xFFFF)
/* C9764 80133064 3C040001 */ lui $a0, (0x11630 >> 16)
/* C9768 80133068 34841630 */ ori $a0, $a0, (0x11630 & 0xFFFF)
/* C976C 8013306C 3C078007 */ lui $a3, %hi(gMatrixListPos)
/* C9770 80133070 24E741F0 */ addiu $a3, $a3, %lo(gMatrixListPos)
/* C9774 80133074 8E280000 */ lw $t0, 0x0($s1)
/* C9778 80133078 94E50000 */ lhu $a1, 0x0($a3)
/* C977C 8013307C 0100302D */ daddu $a2, $t0, $zero
/* C9780 80133080 25080008 */ addiu $t0, $t0, 0x8
/* C9784 80133084 30A3FFFF */ andi $v1, $a1, 0xFFFF
/* C9788 80133088 00031980 */ sll $v1, $v1, 6
/* C978C 8013308C 00641821 */ addu $v1, $v1, $a0
/* C9790 80133090 AE280000 */ sw $t0, 0x0($s1)
/* C9794 80133094 ACC20000 */ sw $v0, 0x0($a2)
/* C9798 80133098 3C02800A */ lui $v0, %hi(gDisplayContext)
/* C979C 8013309C 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0)
/* C97A0 801330A0 3C048015 */ lui $a0, %hi(gSpriteShadingProfile)
/* C97A4 801330A4 8C841328 */ lw $a0, %lo(gSpriteShadingProfile)($a0)
/* C97A8 801330A8 00431021 */ addu $v0, $v0, $v1
/* C97AC 801330AC ACC20004 */ sw $v0, 0x4($a2)
/* C97B0 801330B0 94820000 */ lhu $v0, 0x0($a0)
/* C97B4 801330B4 24A50001 */ addiu $a1, $a1, 0x1
/* C97B8 801330B8 10400008 */ beqz $v0, .L801330DC
/* C97BC 801330BC A4E50000 */ sh $a1, 0x0($a3)
/* C97C0 801330C0 25020008 */ addiu $v0, $t0, 0x8
/* C97C4 801330C4 3C0FDE00 */ lui $t7, (0xDE000000 >> 16)
/* C97C8 801330C8 AE220000 */ sw $v0, 0x0($s1)
/* C97CC 801330CC 3C028015 */ lui $v0, %hi(D_8014BBD8)
/* C97D0 801330D0 2442BBD8 */ addiu $v0, $v0, %lo(D_8014BBD8)
/* C97D4 801330D4 0804CC3D */ j .L801330F4
/* C97D8 801330D8 AD0F0000 */ sw $t7, 0x0($t0)
.L801330DC:
/* C97DC 801330DC 25020008 */ addiu $v0, $t0, 0x8
/* C97E0 801330E0 3C18DE00 */ lui $t8, (0xDE000000 >> 16)
/* C97E4 801330E4 AE220000 */ sw $v0, 0x0($s1)
/* C97E8 801330E8 3C028015 */ lui $v0, %hi(D_8014B870)
/* C97EC 801330EC 2442B870 */ addiu $v0, $v0, %lo(D_8014B870)
/* C97F0 801330F0 AD180000 */ sw $t8, 0x0($t0)
.L801330F4:
/* C97F4 801330F4 AD020004 */ sw $v0, 0x4($t0)
/* C97F8 801330F8 3C04D9FD */ lui $a0, (0xD9FDFFFF >> 16)
/* C97FC 801330FC 3484FFFF */ ori $a0, $a0, (0xD9FDFFFF & 0xFFFF)
/* C9800 80133100 241000FF */ addiu $s0, $zero, 0xFF
/* C9804 80133104 8E230000 */ lw $v1, 0x0($s1)
/* C9808 80133108 3C0E0808 */ lui $t6, (0x8080000 >> 16)
/* C980C 8013310C 0060102D */ daddu $v0, $v1, $zero
/* C9810 80133110 24630008 */ addiu $v1, $v1, 0x8
/* C9814 80133114 AE230000 */ sw $v1, 0x0($s1)
/* C9818 80133118 AC440000 */ sw $a0, 0x0($v0)
/* C981C 8013311C AC400004 */ sw $zero, 0x4($v0)
/* C9820 80133120 3C19DE00 */ lui $t9, (0xDE000000 >> 16)
/* C9824 80133124 3C028015 */ lui $v0, %hi(D_8014C620)
/* C9828 80133128 2442C620 */ addiu $v0, $v0, %lo(D_8014C620)
/* C982C 8013312C AC790000 */ sw $t9, 0x0($v1)
/* C9830 80133130 AC620004 */ sw $v0, 0x4($v1)
/* C9834 80133134 8E440000 */ lw $a0, 0x0($s2)
/* C9838 80133138 24630008 */ addiu $v1, $v1, 0x8
/* C983C 8013313C 008E1024 */ and $v0, $a0, $t6
/* C9840 80133140 10400052 */ beqz $v0, .L8013328C
/* C9844 80133144 AE230000 */ sw $v1, 0x0($s1)
/* C9848 80133148 3C020008 */ lui $v0, (0x80000 >> 16)
/* C984C 8013314C 00821024 */ and $v0, $a0, $v0
/* C9850 80133150 1040000C */ beqz $v0, .L80133184
/* C9854 80133154 3C038080 */ lui $v1, (0x80808081 >> 16)
/* C9858 80133158 9242002F */ lbu $v0, 0x2F($s2)
/* C985C 8013315C 00500018 */ mult $v0, $s0
/* C9860 80133160 00001012 */ mflo $v0
/* C9864 80133164 34638081 */ ori $v1, $v1, (0x80808081 & 0xFFFF)
/* C9868 80133168 00000000 */ nop
/* C986C 8013316C 00430018 */ mult $v0, $v1
/* C9870 80133170 00001810 */ mfhi $v1
/* C9874 80133174 00621821 */ addu $v1, $v1, $v0
/* C9878 80133178 000319C3 */ sra $v1, $v1, 7
/* C987C 8013317C 000217C3 */ sra $v0, $v0, 31
/* C9880 80133180 00628023 */ subu $s0, $v1, $v0
.L80133184:
/* C9884 80133184 3C020800 */ lui $v0, (0x8000000 >> 16)
/* C9888 80133188 00821024 */ and $v0, $a0, $v0
/* C988C 8013318C 10400012 */ beqz $v0, .L801331D8
/* C9890 80133190 27A40118 */ addiu $a0, $sp, 0x118
/* C9894 80133194 27A50119 */ addiu $a1, $sp, 0x119
/* C9898 80133198 27A6011A */ addiu $a2, $sp, 0x11A
/* C989C 8013319C 0C046FA0 */ jal get_background_color_blend
/* C98A0 801331A0 27A7011B */ addiu $a3, $sp, 0x11B
/* C98A4 801331A4 93A3011B */ lbu $v1, 0x11B($sp)
/* C98A8 801331A8 240200FF */ addiu $v0, $zero, 0xFF
/* C98AC 801331AC 00431023 */ subu $v0, $v0, $v1
/* C98B0 801331B0 02020018 */ mult $s0, $v0
/* C98B4 801331B4 00001012 */ mflo $v0
/* C98B8 801331B8 3C038080 */ lui $v1, (0x80808081 >> 16)
/* C98BC 801331BC 34638081 */ ori $v1, $v1, (0x80808081 & 0xFFFF)
/* C98C0 801331C0 00430018 */ mult $v0, $v1
/* C98C4 801331C4 00001810 */ mfhi $v1
/* C98C8 801331C8 00621821 */ addu $v1, $v1, $v0
/* C98CC 801331CC 000319C3 */ sra $v1, $v1, 7
/* C98D0 801331D0 000217C3 */ sra $v0, $v0, 31
/* C98D4 801331D4 00628023 */ subu $s0, $v1, $v0
.L801331D8:
/* C98D8 801331D8 8E420000 */ lw $v0, 0x0($s2)
/* C98DC 801331DC 3C0E0808 */ lui $t6, (0x8080000 >> 16)
/* C98E0 801331E0 004E1024 */ and $v0, $v0, $t6
/* C98E4 801331E4 10400029 */ beqz $v0, .L8013328C
/* C98E8 801331E8 00000000 */ nop
/* C98EC 801331EC 3C028015 */ lui $v0, %hi(gSpriteShadingProfile)
/* C98F0 801331F0 8C421328 */ lw $v0, %lo(gSpriteShadingProfile)($v0)
/* C98F4 801331F4 94420000 */ lhu $v0, 0x0($v0)
/* C98F8 801331F8 1040000B */ beqz $v0, .L80133228
/* C98FC 801331FC 3C05E200 */ lui $a1, (0xE200001C >> 16)
/* C9900 80133200 34A5001C */ ori $a1, $a1, (0xE200001C & 0xFFFF)
/* C9904 80133204 3C040C18 */ lui $a0, (0xC184348 >> 16)
/* C9908 80133208 8E220000 */ lw $v0, 0x0($s1)
/* C990C 8013320C 34844348 */ ori $a0, $a0, (0xC184348 & 0xFFFF)
/* C9910 80133210 0040182D */ daddu $v1, $v0, $zero
/* C9914 80133214 24420008 */ addiu $v0, $v0, 0x8
/* C9918 80133218 AE220000 */ sw $v0, 0x0($s1)
/* C991C 8013321C AC650000 */ sw $a1, 0x0($v1)
/* C9920 80133220 0804CCA3 */ j .L8013328C
/* C9924 80133224 AC640004 */ sw $a0, 0x4($v1)
.L80133228:
/* C9928 80133228 3C06E200 */ lui $a2, (0xE200001C >> 16)
/* C992C 8013322C 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF)
/* C9930 80133230 3C040050 */ lui $a0, (0x504348 >> 16)
/* C9934 80133234 34844348 */ ori $a0, $a0, (0x504348 & 0xFFFF)
/* C9938 80133238 3C07FC30 */ lui $a3, (0xFC30B261 >> 16)
/* C993C 8013323C 34E7B261 */ ori $a3, $a3, (0xFC30B261 & 0xFFFF)
/* C9940 80133240 3C05FF2F */ lui $a1, (0xFF2FFFFF >> 16)
/* C9944 80133244 8E230000 */ lw $v1, 0x0($s1)
/* C9948 80133248 34A5FFFF */ ori $a1, $a1, (0xFF2FFFFF & 0xFFFF)
/* C994C 8013324C 0060102D */ daddu $v0, $v1, $zero
/* C9950 80133250 24630008 */ addiu $v1, $v1, 0x8
/* C9954 80133254 AE230000 */ sw $v1, 0x0($s1)
/* C9958 80133258 AC460000 */ sw $a2, 0x0($v0)
/* C995C 8013325C AC440004 */ sw $a0, 0x4($v0)
/* C9960 80133260 24620008 */ addiu $v0, $v1, 0x8
/* C9964 80133264 AE220000 */ sw $v0, 0x0($s1)
/* C9968 80133268 24620010 */ addiu $v0, $v1, 0x10
/* C996C 8013326C AC670000 */ sw $a3, 0x0($v1)
/* C9970 80133270 AC650004 */ sw $a1, 0x4($v1)
/* C9974 80133274 AE220000 */ sw $v0, 0x0($s1)
/* C9978 80133278 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* C997C 8013327C AC620008 */ sw $v0, 0x8($v1)
/* C9980 80133280 2402FF00 */ addiu $v0, $zero, -0x100
/* C9984 80133284 02021025 */ or $v0, $s0, $v0
/* C9988 80133288 AC62000C */ sw $v0, 0xC($v1)
.L8013328C:
/* C998C 8013328C 8E420000 */ lw $v0, 0x0($s2)
/* C9990 80133290 3C030004 */ lui $v1, (0x40000 >> 16)
/* C9994 80133294 00431024 */ and $v0, $v0, $v1
/* C9998 80133298 144000C4 */ bnez $v0, .L801335AC
/* C999C 8013329C 3C05F500 */ lui $a1, (0xF5000100 >> 16)
/* C99A0 801332A0 34A50100 */ ori $a1, $a1, (0xF5000100 & 0xFFFF)
/* C99A4 801332A4 3C060703 */ lui $a2, (0x703C000 >> 16)
/* C99A8 801332A8 34C6C000 */ ori $a2, $a2, (0x703C000 & 0xFFFF)
/* C99AC 801332AC 8E2D0000 */ lw $t5, 0x0($s1)
/* C99B0 801332B0 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* C99B4 801332B4 01A0202D */ daddu $a0, $t5, $zero
/* C99B8 801332B8 25AD0008 */ addiu $t5, $t5, 0x8
/* C99BC 801332BC AE2D0000 */ sw $t5, 0x0($s1)
/* C99C0 801332C0 AC820000 */ sw $v0, 0x0($a0)
/* C99C4 801332C4 9243002D */ lbu $v1, 0x2D($s2)
/* C99C8 801332C8 25A20008 */ addiu $v0, $t5, 0x8
/* C99CC 801332CC AE220000 */ sw $v0, 0x0($s1)
/* C99D0 801332D0 25A20010 */ addiu $v0, $t5, 0x10
/* C99D4 801332D4 AE220000 */ sw $v0, 0x0($s1)
/* C99D8 801332D8 25A20018 */ addiu $v0, $t5, 0x18
/* C99DC 801332DC AE220000 */ sw $v0, 0x0($s1)
/* C99E0 801332E0 3C028015 */ lui $v0, %hi(gHudElementCacheTablePalette)
/* C99E4 801332E4 8C4212D0 */ lw $v0, %lo(gHudElementCacheTablePalette)($v0)
/* C99E8 801332E8 000318C0 */ sll $v1, $v1, 3
/* C99EC 801332EC 00621821 */ addu $v1, $v1, $v0
/* C99F0 801332F0 8C630004 */ lw $v1, 0x4($v1)
/* C99F4 801332F4 25A20020 */ addiu $v0, $t5, 0x20
/* C99F8 801332F8 AE220000 */ sw $v0, 0x0($s1)
/* C99FC 801332FC AC830004 */ sw $v1, 0x4($a0)
/* C9A00 80133300 3C038015 */ lui $v1, %hi(gSpriteShadingProfile)
/* C9A04 80133304 8C631328 */ lw $v1, %lo(gSpriteShadingProfile)($v1)
/* C9A08 80133308 3C02E800 */ lui $v0, (0xE8000000 >> 16)
/* C9A0C 8013330C ADA20000 */ sw $v0, 0x0($t5)
/* C9A10 80133310 3C020700 */ lui $v0, (0x7000000 >> 16)
/* C9A14 80133314 ADA2000C */ sw $v0, 0xC($t5)
/* C9A18 80133318 3C02F000 */ lui $v0, (0xF0000000 >> 16)
/* C9A1C 8013331C ADA00004 */ sw $zero, 0x4($t5)
/* C9A20 80133320 ADA50008 */ sw $a1, 0x8($t5)
/* C9A24 80133324 ADBE0010 */ sw $fp, 0x10($t5)
/* C9A28 80133328 ADA00014 */ sw $zero, 0x14($t5)
/* C9A2C 8013332C ADA20018 */ sw $v0, 0x18($t5)
/* C9A30 80133330 ADA6001C */ sw $a2, 0x1C($t5)
/* C9A34 80133334 ADB70020 */ sw $s7, 0x20($t5)
/* C9A38 80133338 ADA00024 */ sw $zero, 0x24($t5)
/* C9A3C 8013333C 94630000 */ lhu $v1, 0x0($v1)
/* C9A40 80133340 25A20028 */ addiu $v0, $t5, 0x28
/* C9A44 80133344 1060005F */ beqz $v1, .L801334C4
/* C9A48 80133348 AE220000 */ sw $v0, 0x0($s1)
/* C9A4C 8013334C 3C03FD48 */ lui $v1, (0xFD48000B >> 16)
/* C9A50 80133350 3463000B */ ori $v1, $v1, (0xFD48000B & 0xFFFF)
/* C9A54 80133354 3C05F548 */ lui $a1, (0xF5480400 >> 16)
/* C9A58 80133358 34A50400 */ ori $a1, $a1, (0xF5480400 & 0xFFFF)
/* C9A5C 8013335C 3C04070A */ lui $a0, (0x70A0280 >> 16)
/* C9A60 80133360 34840280 */ ori $a0, $a0, (0x70A0280 & 0xFFFF)
/* C9A64 80133364 3C070702 */ lui $a3, (0x702E05C >> 16)
/* C9A68 80133368 34E7E05C */ ori $a3, $a3, (0x702E05C & 0xFFFF)
/* C9A6C 8013336C 3C0B010A */ lui $t3, (0x10A0280 >> 16)
/* C9A70 80133370 356B0280 */ ori $t3, $t3, (0x10A0280 & 0xFFFF)
/* C9A74 80133374 3C0AF240 */ lui $t2, (0xF2400400 >> 16)
/* C9A78 80133378 354A0400 */ ori $t2, $t2, (0xF2400400 & 0xFFFF)
/* C9A7C 8013337C 3C080145 */ lui $t0, (0x145C45C >> 16)
/* C9A80 80133380 3508C45C */ ori $t0, $t0, (0x145C45C & 0xFFFF)
/* C9A84 80133384 3C09001A */ lui $t1, (0x1A0280 >> 16)
/* C9A88 80133388 35290280 */ ori $t1, $t1, (0x1A0280 & 0xFFFF)
/* C9A8C 8013338C 3C06F510 */ lui $a2, (0xF5100900 >> 16)
/* C9A90 80133390 34C60900 */ ori $a2, $a2, (0xF5100900 & 0xFFFF)
/* C9A94 80133394 3C0C020F */ lui $t4, (0x20FC000 >> 16)
/* C9A98 80133398 358CC000 */ ori $t4, $t4, (0x20FC000 & 0xFFFF)
/* C9A9C 8013339C 25A20030 */ addiu $v0, $t5, 0x30
/* C9AA0 801333A0 AE220000 */ sw $v0, 0x0($s1)
/* C9AA4 801333A4 ADA30028 */ sw $v1, 0x28($t5)
/* C9AA8 801333A8 9243002C */ lbu $v1, 0x2C($s2)
/* C9AAC 801333AC 25A20038 */ addiu $v0, $t5, 0x38
/* C9AB0 801333B0 AE220000 */ sw $v0, 0x0($s1)
/* C9AB4 801333B4 25A20040 */ addiu $v0, $t5, 0x40
/* C9AB8 801333B8 AE220000 */ sw $v0, 0x0($s1)
/* C9ABC 801333BC 25A20048 */ addiu $v0, $t5, 0x48
/* C9AC0 801333C0 AE220000 */ sw $v0, 0x0($s1)
/* C9AC4 801333C4 25A20050 */ addiu $v0, $t5, 0x50
/* C9AC8 801333C8 AE220000 */ sw $v0, 0x0($s1)
/* C9ACC 801333CC 25A20058 */ addiu $v0, $t5, 0x58
/* C9AD0 801333D0 AE220000 */ sw $v0, 0x0($s1)
/* C9AD4 801333D4 25A20060 */ addiu $v0, $t5, 0x60
/* C9AD8 801333D8 AE220000 */ sw $v0, 0x0($s1)
/* C9ADC 801333DC 25A20068 */ addiu $v0, $t5, 0x68
/* C9AE0 801333E0 3C0F0808 */ lui $t7, (0x8080000 >> 16)
/* C9AE4 801333E4 AE220000 */ sw $v0, 0x0($s1)
/* C9AE8 801333E8 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster)
/* C9AEC 801333EC 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0)
/* C9AF0 801333F0 000318C0 */ sll $v1, $v1, 3
/* C9AF4 801333F4 00621821 */ addu $v1, $v1, $v0
/* C9AF8 801333F8 8C630004 */ lw $v1, 0x4($v1)
/* C9AFC 801333FC 25A20070 */ addiu $v0, $t5, 0x70
/* C9B00 80133400 AE220000 */ sw $v0, 0x0($s1)
/* C9B04 80133404 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* C9B08 80133408 ADA20040 */ sw $v0, 0x40($t5)
/* C9B0C 8013340C 3C020200 */ lui $v0, (0x2000000 >> 16)
/* C9B10 80133410 ADA2006C */ sw $v0, 0x6C($t5)
/* C9B14 80133414 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* C9B18 80133418 ADA50030 */ sw $a1, 0x30($t5)
/* C9B1C 8013341C ADA40034 */ sw $a0, 0x34($t5)
/* C9B20 80133420 ADBE0038 */ sw $fp, 0x38($t5)
/* C9B24 80133424 ADA0003C */ sw $zero, 0x3C($t5)
/* C9B28 80133428 ADA70044 */ sw $a3, 0x44($t5)
/* C9B2C 8013342C ADB70048 */ sw $s7, 0x48($t5)
/* C9B30 80133430 ADA0004C */ sw $zero, 0x4C($t5)
/* C9B34 80133434 ADB30050 */ sw $s3, 0x50($t5)
/* C9B38 80133438 ADAB0054 */ sw $t3, 0x54($t5)
/* C9B3C 8013343C ADAA0058 */ sw $t2, 0x58($t5)
/* C9B40 80133440 ADA8005C */ sw $t0, 0x5C($t5)
/* C9B44 80133444 ADB30060 */ sw $s3, 0x60($t5)
/* C9B48 80133448 ADA90064 */ sw $t1, 0x64($t5)
/* C9B4C 8013344C ADA60068 */ sw $a2, 0x68($t5)
/* C9B50 80133450 ADA20070 */ sw $v0, 0x70($t5)
/* C9B54 80133454 ADAC0074 */ sw $t4, 0x74($t5)
/* C9B58 80133458 ADA3002C */ sw $v1, 0x2C($t5)
/* C9B5C 8013345C 8E430000 */ lw $v1, 0x0($s2)
/* C9B60 80133460 25A20078 */ addiu $v0, $t5, 0x78
/* C9B64 80133464 006F1824 */ and $v1, $v1, $t7
/* C9B68 80133468 1060000B */ beqz $v1, .L80133498
/* C9B6C 8013346C AE220000 */ sw $v0, 0x0($s1)
/* C9B70 80133470 27A40058 */ addiu $a0, $sp, 0x58
/* C9B74 80133474 0000282D */ daddu $a1, $zero, $zero
/* C9B78 80133478 00A0302D */ daddu $a2, $a1, $zero
/* C9B7C 8013347C 24070018 */ addiu $a3, $zero, 0x18
/* C9B80 80133480 00E0102D */ daddu $v0, $a3, $zero
/* C9B84 80133484 AFA20010 */ sw $v0, 0x10($sp)
/* C9B88 80133488 0C052479 */ jal func_801491E4
/* C9B8C 8013348C AFB00014 */ sw $s0, 0x14($sp)
/* C9B90 80133490 0804CD62 */ j .L80133588
/* C9B94 80133494 00000000 */ nop
.L80133498:
/* C9B98 80133498 27A40058 */ addiu $a0, $sp, 0x58
/* C9B9C 8013349C 0000282D */ daddu $a1, $zero, $zero
/* C9BA0 801334A0 00A0302D */ daddu $a2, $a1, $zero
/* C9BA4 801334A4 24070018 */ addiu $a3, $zero, 0x18
/* C9BA8 801334A8 00E0102D */ daddu $v0, $a3, $zero
/* C9BAC 801334AC AFA20010 */ sw $v0, 0x10($sp)
/* C9BB0 801334B0 240200FF */ addiu $v0, $zero, 0xFF
/* C9BB4 801334B4 0C052479 */ jal func_801491E4
/* C9BB8 801334B8 AFA20014 */ sw $v0, 0x14($sp)
/* C9BBC 801334BC 0804CD62 */ j .L80133588
/* C9BC0 801334C0 00000000 */ nop
.L801334C4:
/* C9BC4 801334C4 3C03FD48 */ lui $v1, (0xFD48000B >> 16)
/* C9BC8 801334C8 3463000B */ ori $v1, $v1, (0xFD48000B & 0xFFFF)
/* C9BCC 801334CC 3C05F548 */ lui $a1, (0xF5480400 >> 16)
/* C9BD0 801334D0 34A50400 */ ori $a1, $a1, (0xF5480400 & 0xFFFF)
/* C9BD4 801334D4 3C04070A */ lui $a0, (0x70A0280 >> 16)
/* C9BD8 801334D8 34840280 */ ori $a0, $a0, (0x70A0280 & 0xFFFF)
/* C9BDC 801334DC 3C060702 */ lui $a2, (0x702E05C >> 16)
/* C9BE0 801334E0 34C6E05C */ ori $a2, $a2, (0x702E05C & 0xFFFF)
/* C9BE4 801334E4 3C09000A */ lui $t1, (0xA0280 >> 16)
/* C9BE8 801334E8 35290280 */ ori $t1, $t1, (0xA0280 & 0xFFFF)
/* C9BEC 801334EC 3C08F240 */ lui $t0, (0xF2400400 >> 16)
/* C9BF0 801334F0 35080400 */ ori $t0, $t0, (0xF2400400 & 0xFFFF)
/* C9BF4 801334F4 3C070045 */ lui $a3, (0x45C45C >> 16)
/* C9BF8 801334F8 34E7C45C */ ori $a3, $a3, (0x45C45C & 0xFFFF)
/* C9BFC 801334FC 25A20030 */ addiu $v0, $t5, 0x30
/* C9C00 80133500 AE220000 */ sw $v0, 0x0($s1)
/* C9C04 80133504 ADA30028 */ sw $v1, 0x28($t5)
/* C9C08 80133508 9243002C */ lbu $v1, 0x2C($s2)
/* C9C0C 8013350C 25A20038 */ addiu $v0, $t5, 0x38
/* C9C10 80133510 AE220000 */ sw $v0, 0x0($s1)
/* C9C14 80133514 25A20040 */ addiu $v0, $t5, 0x40
/* C9C18 80133518 AE220000 */ sw $v0, 0x0($s1)
/* C9C1C 8013351C 25A20048 */ addiu $v0, $t5, 0x48
/* C9C20 80133520 AE220000 */ sw $v0, 0x0($s1)
/* C9C24 80133524 25A20050 */ addiu $v0, $t5, 0x50
/* C9C28 80133528 AE220000 */ sw $v0, 0x0($s1)
/* C9C2C 8013352C 25A20058 */ addiu $v0, $t5, 0x58
/* C9C30 80133530 AE220000 */ sw $v0, 0x0($s1)
/* C9C34 80133534 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster)
/* C9C38 80133538 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0)
/* C9C3C 8013353C 000318C0 */ sll $v1, $v1, 3
/* C9C40 80133540 00621821 */ addu $v1, $v1, $v0
/* C9C44 80133544 8C630004 */ lw $v1, 0x4($v1)
/* C9C48 80133548 25A20060 */ addiu $v0, $t5, 0x60
/* C9C4C 8013354C AE220000 */ sw $v0, 0x0($s1)
/* C9C50 80133550 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* C9C54 80133554 ADA50030 */ sw $a1, 0x30($t5)
/* C9C58 80133558 ADA40034 */ sw $a0, 0x34($t5)
/* C9C5C 8013355C ADBE0038 */ sw $fp, 0x38($t5)
/* C9C60 80133560 ADA0003C */ sw $zero, 0x3C($t5)
/* C9C64 80133564 ADA20040 */ sw $v0, 0x40($t5)
/* C9C68 80133568 ADA60044 */ sw $a2, 0x44($t5)
/* C9C6C 8013356C ADB70048 */ sw $s7, 0x48($t5)
/* C9C70 80133570 ADA0004C */ sw $zero, 0x4C($t5)
/* C9C74 80133574 ADB30050 */ sw $s3, 0x50($t5)
/* C9C78 80133578 ADA90054 */ sw $t1, 0x54($t5)
/* C9C7C 8013357C ADA80058 */ sw $t0, 0x58($t5)
/* C9C80 80133580 ADA7005C */ sw $a3, 0x5C($t5)
/* C9C84 80133584 ADA3002C */ sw $v1, 0x2C($t5)
.L80133588:
/* C9C88 80133588 8E220000 */ lw $v0, 0x0($s1)
/* C9C8C 8013358C 0040182D */ daddu $v1, $v0, $zero
/* C9C90 80133590 24420008 */ addiu $v0, $v0, 0x8
/* C9C94 80133594 3C18DE00 */ lui $t8, (0xDE000000 >> 16)
/* C9C98 80133598 AE220000 */ sw $v0, 0x0($s1)
/* C9C9C 8013359C 3C028015 */ lui $v0, %hi(D_8014C678)
/* C9CA0 801335A0 2442C678 */ addiu $v0, $v0, %lo(D_8014C678)
/* C9CA4 801335A4 0804CE2D */ j .L801338B4
/* C9CA8 801335A8 AC780000 */ sw $t8, 0x0($v1)
.L801335AC:
/* C9CAC 801335AC 34A50100 */ ori $a1, $a1, (0xF5000100 & 0xFFFF)
/* C9CB0 801335B0 3C060703 */ lui $a2, (0x703C000 >> 16)
/* C9CB4 801335B4 34C6C000 */ ori $a2, $a2, (0x703C000 & 0xFFFF)
/* C9CB8 801335B8 8E2D0000 */ lw $t5, 0x0($s1)
/* C9CBC 801335BC 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* C9CC0 801335C0 01A0202D */ daddu $a0, $t5, $zero
/* C9CC4 801335C4 25AD0008 */ addiu $t5, $t5, 0x8
/* C9CC8 801335C8 AE2D0000 */ sw $t5, 0x0($s1)
/* C9CCC 801335CC AC820000 */ sw $v0, 0x0($a0)
/* C9CD0 801335D0 9243002D */ lbu $v1, 0x2D($s2)
/* C9CD4 801335D4 25A20008 */ addiu $v0, $t5, 0x8
/* C9CD8 801335D8 AE220000 */ sw $v0, 0x0($s1)
/* C9CDC 801335DC 25A20010 */ addiu $v0, $t5, 0x10
/* C9CE0 801335E0 AE220000 */ sw $v0, 0x0($s1)
/* C9CE4 801335E4 25A20018 */ addiu $v0, $t5, 0x18
/* C9CE8 801335E8 AE220000 */ sw $v0, 0x0($s1)
/* C9CEC 801335EC 3C028015 */ lui $v0, %hi(gHudElementCacheTablePalette)
/* C9CF0 801335F0 8C4212D0 */ lw $v0, %lo(gHudElementCacheTablePalette)($v0)
/* C9CF4 801335F4 000318C0 */ sll $v1, $v1, 3
/* C9CF8 801335F8 00621821 */ addu $v1, $v1, $v0
/* C9CFC 801335FC 8C630004 */ lw $v1, 0x4($v1)
/* C9D00 80133600 25A20020 */ addiu $v0, $t5, 0x20
/* C9D04 80133604 AE220000 */ sw $v0, 0x0($s1)
/* C9D08 80133608 AC830004 */ sw $v1, 0x4($a0)
/* C9D0C 8013360C 3C038015 */ lui $v1, %hi(gSpriteShadingProfile)
/* C9D10 80133610 8C631328 */ lw $v1, %lo(gSpriteShadingProfile)($v1)
/* C9D14 80133614 3C02E800 */ lui $v0, (0xE8000000 >> 16)
/* C9D18 80133618 ADA20000 */ sw $v0, 0x0($t5)
/* C9D1C 8013361C 3C020700 */ lui $v0, (0x7000000 >> 16)
/* C9D20 80133620 ADA2000C */ sw $v0, 0xC($t5)
/* C9D24 80133624 3C02F000 */ lui $v0, (0xF0000000 >> 16)
/* C9D28 80133628 ADA00004 */ sw $zero, 0x4($t5)
/* C9D2C 8013362C ADA50008 */ sw $a1, 0x8($t5)
/* C9D30 80133630 ADBE0010 */ sw $fp, 0x10($t5)
/* C9D34 80133634 ADA00014 */ sw $zero, 0x14($t5)
/* C9D38 80133638 ADA20018 */ sw $v0, 0x18($t5)
/* C9D3C 8013363C ADA6001C */ sw $a2, 0x1C($t5)
/* C9D40 80133640 ADB70020 */ sw $s7, 0x20($t5)
/* C9D44 80133644 ADA00024 */ sw $zero, 0x24($t5)
/* C9D48 80133648 94630000 */ lhu $v1, 0x0($v1)
/* C9D4C 8013364C 25A20028 */ addiu $v0, $t5, 0x28
/* C9D50 80133650 1060005F */ beqz $v1, .L801337D0
/* C9D54 80133654 AE220000 */ sw $v0, 0x0($s1)
/* C9D58 80133658 3C03FD48 */ lui $v1, (0xFD48000F >> 16)
/* C9D5C 8013365C 3463000F */ ori $v1, $v1, (0xFD48000F & 0xFFFF)
/* C9D60 80133660 3C05F548 */ lui $a1, (0xF5480400 >> 16)
/* C9D64 80133664 34A50400 */ ori $a1, $a1, (0xF5480400 & 0xFFFF)
/* C9D68 80133668 3C04070A */ lui $a0, (0x70A0280 >> 16)
/* C9D6C 8013366C 34840280 */ ori $a0, $a0, (0x70A0280 & 0xFFFF)
/* C9D70 80133670 3C070703 */ lui $a3, (0x703E07C >> 16)
/* C9D74 80133674 34E7E07C */ ori $a3, $a3, (0x703E07C & 0xFFFF)
/* C9D78 80133678 3C0B010A */ lui $t3, (0x10A0280 >> 16)
/* C9D7C 8013367C 356B0280 */ ori $t3, $t3, (0x10A0280 & 0xFFFF)
/* C9D80 80133680 3C0AF240 */ lui $t2, (0xF2400400 >> 16)
/* C9D84 80133684 354A0400 */ ori $t2, $t2, (0xF2400400 & 0xFFFF)
/* C9D88 80133688 3C080147 */ lui $t0, (0x147C47C >> 16)
/* C9D8C 8013368C 3508C47C */ ori $t0, $t0, (0x147C47C & 0xFFFF)
/* C9D90 80133690 3C09001A */ lui $t1, (0x1A0280 >> 16)
/* C9D94 80133694 35290280 */ ori $t1, $t1, (0x1A0280 & 0xFFFF)
/* C9D98 80133698 3C06F510 */ lui $a2, (0xF5100900 >> 16)
/* C9D9C 8013369C 34C60900 */ ori $a2, $a2, (0xF5100900 & 0xFFFF)
/* C9DA0 801336A0 3C0C020F */ lui $t4, (0x20FC000 >> 16)
/* C9DA4 801336A4 358CC000 */ ori $t4, $t4, (0x20FC000 & 0xFFFF)
/* C9DA8 801336A8 25A20030 */ addiu $v0, $t5, 0x30
/* C9DAC 801336AC AE220000 */ sw $v0, 0x0($s1)
/* C9DB0 801336B0 ADA30028 */ sw $v1, 0x28($t5)
/* C9DB4 801336B4 9243002C */ lbu $v1, 0x2C($s2)
/* C9DB8 801336B8 25A20038 */ addiu $v0, $t5, 0x38
/* C9DBC 801336BC AE220000 */ sw $v0, 0x0($s1)
/* C9DC0 801336C0 25A20040 */ addiu $v0, $t5, 0x40
/* C9DC4 801336C4 AE220000 */ sw $v0, 0x0($s1)
/* C9DC8 801336C8 25A20048 */ addiu $v0, $t5, 0x48
/* C9DCC 801336CC AE220000 */ sw $v0, 0x0($s1)
/* C9DD0 801336D0 25A20050 */ addiu $v0, $t5, 0x50
/* C9DD4 801336D4 AE220000 */ sw $v0, 0x0($s1)
/* C9DD8 801336D8 25A20058 */ addiu $v0, $t5, 0x58
/* C9DDC 801336DC AE220000 */ sw $v0, 0x0($s1)
/* C9DE0 801336E0 25A20060 */ addiu $v0, $t5, 0x60
/* C9DE4 801336E4 AE220000 */ sw $v0, 0x0($s1)
/* C9DE8 801336E8 25A20068 */ addiu $v0, $t5, 0x68
/* C9DEC 801336EC 3C190808 */ lui $t9, (0x8080000 >> 16)
/* C9DF0 801336F0 AE220000 */ sw $v0, 0x0($s1)
/* C9DF4 801336F4 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster)
/* C9DF8 801336F8 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0)
/* C9DFC 801336FC 000318C0 */ sll $v1, $v1, 3
/* C9E00 80133700 00621821 */ addu $v1, $v1, $v0
/* C9E04 80133704 8C630004 */ lw $v1, 0x4($v1)
/* C9E08 80133708 25A20070 */ addiu $v0, $t5, 0x70
/* C9E0C 8013370C AE220000 */ sw $v0, 0x0($s1)
/* C9E10 80133710 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* C9E14 80133714 ADA20040 */ sw $v0, 0x40($t5)
/* C9E18 80133718 3C020200 */ lui $v0, (0x2000000 >> 16)
/* C9E1C 8013371C ADA2006C */ sw $v0, 0x6C($t5)
/* C9E20 80133720 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* C9E24 80133724 ADA50030 */ sw $a1, 0x30($t5)
/* C9E28 80133728 ADA40034 */ sw $a0, 0x34($t5)
/* C9E2C 8013372C ADBE0038 */ sw $fp, 0x38($t5)
/* C9E30 80133730 ADA0003C */ sw $zero, 0x3C($t5)
/* C9E34 80133734 ADA70044 */ sw $a3, 0x44($t5)
/* C9E38 80133738 ADB70048 */ sw $s7, 0x48($t5)
/* C9E3C 8013373C ADA0004C */ sw $zero, 0x4C($t5)
/* C9E40 80133740 ADB30050 */ sw $s3, 0x50($t5)
/* C9E44 80133744 ADAB0054 */ sw $t3, 0x54($t5)
/* C9E48 80133748 ADAA0058 */ sw $t2, 0x58($t5)
/* C9E4C 8013374C ADA8005C */ sw $t0, 0x5C($t5)
/* C9E50 80133750 ADB30060 */ sw $s3, 0x60($t5)
/* C9E54 80133754 ADA90064 */ sw $t1, 0x64($t5)
/* C9E58 80133758 ADA60068 */ sw $a2, 0x68($t5)
/* C9E5C 8013375C ADA20070 */ sw $v0, 0x70($t5)
/* C9E60 80133760 ADAC0074 */ sw $t4, 0x74($t5)
/* C9E64 80133764 ADA3002C */ sw $v1, 0x2C($t5)
/* C9E68 80133768 8E430000 */ lw $v1, 0x0($s2)
/* C9E6C 8013376C 25A20078 */ addiu $v0, $t5, 0x78
/* C9E70 80133770 00791824 */ and $v1, $v1, $t9
/* C9E74 80133774 1060000B */ beqz $v1, .L801337A4
/* C9E78 80133778 AE220000 */ sw $v0, 0x0($s1)
/* C9E7C 8013377C 27A40058 */ addiu $a0, $sp, 0x58
/* C9E80 80133780 0000282D */ daddu $a1, $zero, $zero
/* C9E84 80133784 00A0302D */ daddu $a2, $a1, $zero
/* C9E88 80133788 24070020 */ addiu $a3, $zero, 0x20
/* C9E8C 8013378C 00E0102D */ daddu $v0, $a3, $zero
/* C9E90 80133790 AFA20010 */ sw $v0, 0x10($sp)
/* C9E94 80133794 0C052479 */ jal func_801491E4
/* C9E98 80133798 AFB00014 */ sw $s0, 0x14($sp)
/* C9E9C 8013379C 0804CE25 */ j .L80133894
/* C9EA0 801337A0 00000000 */ nop
.L801337A4:
/* C9EA4 801337A4 27A40058 */ addiu $a0, $sp, 0x58
/* C9EA8 801337A8 0000282D */ daddu $a1, $zero, $zero
/* C9EAC 801337AC 00A0302D */ daddu $a2, $a1, $zero
/* C9EB0 801337B0 24070020 */ addiu $a3, $zero, 0x20
/* C9EB4 801337B4 00E0102D */ daddu $v0, $a3, $zero
/* C9EB8 801337B8 AFA20010 */ sw $v0, 0x10($sp)
/* C9EBC 801337BC 240200FF */ addiu $v0, $zero, 0xFF
/* C9EC0 801337C0 0C052479 */ jal func_801491E4
/* C9EC4 801337C4 AFA20014 */ sw $v0, 0x14($sp)
/* C9EC8 801337C8 0804CE25 */ j .L80133894
/* C9ECC 801337CC 00000000 */ nop
.L801337D0:
/* C9ED0 801337D0 3C03FD48 */ lui $v1, (0xFD48000F >> 16)
/* C9ED4 801337D4 3463000F */ ori $v1, $v1, (0xFD48000F & 0xFFFF)
/* C9ED8 801337D8 3C05F548 */ lui $a1, (0xF5480400 >> 16)
/* C9EDC 801337DC 34A50400 */ ori $a1, $a1, (0xF5480400 & 0xFFFF)
/* C9EE0 801337E0 3C04070A */ lui $a0, (0x70A0280 >> 16)
/* C9EE4 801337E4 34840280 */ ori $a0, $a0, (0x70A0280 & 0xFFFF)
/* C9EE8 801337E8 3C060703 */ lui $a2, (0x703E07C >> 16)
/* C9EEC 801337EC 34C6E07C */ ori $a2, $a2, (0x703E07C & 0xFFFF)
/* C9EF0 801337F0 3C09000A */ lui $t1, (0xA0280 >> 16)
/* C9EF4 801337F4 35290280 */ ori $t1, $t1, (0xA0280 & 0xFFFF)
/* C9EF8 801337F8 3C08F240 */ lui $t0, (0xF2400400 >> 16)
/* C9EFC 801337FC 35080400 */ ori $t0, $t0, (0xF2400400 & 0xFFFF)
/* C9F00 80133800 3C070047 */ lui $a3, (0x47C47C >> 16)
/* C9F04 80133804 34E7C47C */ ori $a3, $a3, (0x47C47C & 0xFFFF)
/* C9F08 80133808 25A20030 */ addiu $v0, $t5, 0x30
/* C9F0C 8013380C AE220000 */ sw $v0, 0x0($s1)
/* C9F10 80133810 ADA30028 */ sw $v1, 0x28($t5)
/* C9F14 80133814 9243002C */ lbu $v1, 0x2C($s2)
/* C9F18 80133818 25A20038 */ addiu $v0, $t5, 0x38
/* C9F1C 8013381C AE220000 */ sw $v0, 0x0($s1)
/* C9F20 80133820 25A20040 */ addiu $v0, $t5, 0x40
/* C9F24 80133824 AE220000 */ sw $v0, 0x0($s1)
/* C9F28 80133828 25A20048 */ addiu $v0, $t5, 0x48
/* C9F2C 8013382C AE220000 */ sw $v0, 0x0($s1)
/* C9F30 80133830 25A20050 */ addiu $v0, $t5, 0x50
/* C9F34 80133834 AE220000 */ sw $v0, 0x0($s1)
/* C9F38 80133838 25A20058 */ addiu $v0, $t5, 0x58
/* C9F3C 8013383C AE220000 */ sw $v0, 0x0($s1)
/* C9F40 80133840 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster)
/* C9F44 80133844 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0)
/* C9F48 80133848 000318C0 */ sll $v1, $v1, 3
/* C9F4C 8013384C 00621821 */ addu $v1, $v1, $v0
/* C9F50 80133850 8C630004 */ lw $v1, 0x4($v1)
/* C9F54 80133854 25A20060 */ addiu $v0, $t5, 0x60
/* C9F58 80133858 AE220000 */ sw $v0, 0x0($s1)
/* C9F5C 8013385C 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* C9F60 80133860 ADA50030 */ sw $a1, 0x30($t5)
/* C9F64 80133864 ADA40034 */ sw $a0, 0x34($t5)
/* C9F68 80133868 ADBE0038 */ sw $fp, 0x38($t5)
/* C9F6C 8013386C ADA0003C */ sw $zero, 0x3C($t5)
/* C9F70 80133870 ADA20040 */ sw $v0, 0x40($t5)
/* C9F74 80133874 ADA60044 */ sw $a2, 0x44($t5)
/* C9F78 80133878 ADB70048 */ sw $s7, 0x48($t5)
/* C9F7C 8013387C ADA0004C */ sw $zero, 0x4C($t5)
/* C9F80 80133880 ADB30050 */ sw $s3, 0x50($t5)
/* C9F84 80133884 ADA90054 */ sw $t1, 0x54($t5)
/* C9F88 80133888 ADA80058 */ sw $t0, 0x58($t5)
/* C9F8C 8013388C ADA7005C */ sw $a3, 0x5C($t5)
/* C9F90 80133890 ADA3002C */ sw $v1, 0x2C($t5)
.L80133894:
/* C9F94 80133894 8E220000 */ lw $v0, 0x0($s1)
/* C9F98 80133898 0040182D */ daddu $v1, $v0, $zero
/* C9F9C 8013389C 24420008 */ addiu $v0, $v0, 0x8
/* C9FA0 801338A0 3C0EDE00 */ lui $t6, (0xDE000000 >> 16)
/* C9FA4 801338A4 AE220000 */ sw $v0, 0x0($s1)
/* C9FA8 801338A8 3C028015 */ lui $v0, %hi(D_8014C6A0)
/* C9FAC 801338AC 2442C6A0 */ addiu $v0, $v0, %lo(D_8014C6A0)
/* C9FB0 801338B0 AC6E0000 */ sw $t6, 0x0($v1)
.L801338B4:
/* C9FB4 801338B4 AC620004 */ sw $v0, 0x4($v1)
/* C9FB8 801338B8 3C02D838 */ lui $v0, (0xD8380002 >> 16)
/* C9FBC 801338BC 8E230000 */ lw $v1, 0x0($s1)
/* C9FC0 801338C0 34420002 */ ori $v0, $v0, (0xD8380002 & 0xFFFF)
/* C9FC4 801338C4 0060202D */ daddu $a0, $v1, $zero
/* C9FC8 801338C8 24630008 */ addiu $v1, $v1, 0x8
/* C9FCC 801338CC AE230000 */ sw $v1, 0x0($s1)
/* C9FD0 801338D0 AC820000 */ sw $v0, 0x0($a0)
/* C9FD4 801338D4 24020040 */ addiu $v0, $zero, 0x40
/* C9FD8 801338D8 AC820004 */ sw $v0, 0x4($a0)
/* C9FDC 801338DC 24620008 */ addiu $v0, $v1, 0x8
/* C9FE0 801338E0 AE220000 */ sw $v0, 0x0($s1)
/* C9FE4 801338E4 AC770000 */ sw $s7, 0x0($v1)
/* C9FE8 801338E8 AC600004 */ sw $zero, 0x4($v1)
.L801338EC:
/* C9FEC 801338EC 26D60001 */ addiu $s6, $s6, 0x1
.L801338F0:
/* C9FF0 801338F0 2AC20100 */ slti $v0, $s6, 0x100
/* C9FF4 801338F4 1440FD6C */ bnez $v0, .L80132EA8
/* C9FF8 801338F8 00000000 */ nop
/* C9FFC 801338FC 8FBF0144 */ lw $ra, 0x144($sp)
/* CA000 80133900 8FBE0140 */ lw $fp, 0x140($sp)
/* CA004 80133904 8FB7013C */ lw $s7, 0x13C($sp)
/* CA008 80133908 8FB60138 */ lw $s6, 0x138($sp)
/* CA00C 8013390C 8FB50134 */ lw $s5, 0x134($sp)
/* CA010 80133910 8FB40130 */ lw $s4, 0x130($sp)
/* CA014 80133914 8FB3012C */ lw $s3, 0x12C($sp)
/* CA018 80133918 8FB20128 */ lw $s2, 0x128($sp)
/* CA01C 8013391C 8FB10124 */ lw $s1, 0x124($sp)
/* CA020 80133920 8FB00120 */ lw $s0, 0x120($sp)
/* CA024 80133924 D7B40148 */ ldc1 $f20, 0x148($sp)
/* CA028 80133928 03E00008 */ jr $ra
/* CA02C 8013392C 27BD0150 */ addiu $sp, $sp, 0x150
### DECOMPILED C INSTRUCTIONS:
void render_item_entities(void) {
s32 i;
s32 offsetY;
f32 rotX;
Mtx sp18;
Matrix4f sp58;
Matrix4f sp98;
Matrix4f spD8;
u8 r1, g1, b1, a1;
s32 alpha;
// needed to move 'i++' to the bottom
for (i = 0; i < MAX_ITEM_ENTITIES;) {
ItemEntity* item = gCurrentItemEntities[i];
if (item != NULL) {
if ((item->flags != 0)) {
if (!(item->flags & ITEM_ENTITY_FLAG_HIDDEN)) {
if ((item->flags & ITEM_ENTITY_FLAG_100000)) {
if (!(item->flags & ITEM_ENTITY_FLAG_40000)) {
offsetY = -4;
} else {
offsetY = 0;
}
if (item->itemID == ITEM_COIN || item->itemID == ITEM_STAR_POINT || item->itemID == ITEM_HEART) {
offsetY = 0;
item->scale = 1.0f;
}
rotX = clamp_angle(180.0f - gCameras[gCurrentCamID].currentYaw);
guTranslateF(sp58, item->position.x, -item->position.y - offsetY, item->position.z);
guRotateF(sp98, rotX, 0.0f, 1.0f, 0.0f);
if (item->flags & ITEM_ENTITY_RESIZABLE) {
guScaleF(spD8, item->scale, item->scale, item->scale);
guMtxCatF(sp98, spD8, sp98);
}
guMtxCatF(sp98, sp58, sp58);
guMtxF2L(sp58, &sp18);
gDisplayContext->matrixStack[gMatrixListPos] = sp18;
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (gSpriteShadingProfile->flags != 0) {
gSPDisplayList(gMainGfxPos++, D_8014BBD8);
} else {
gSPDisplayList(gMainGfxPos++, D_8014B870);
}
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
gSPDisplayList(gMainGfxPos++, D_8014C620);
alpha = 255;
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_HIDING)) {
if (item->flags & ITEM_ENTITY_FLAG_TRANSPARENT) {
alpha = item->alpha * alpha / 255;
}
if (item->flags & ITEM_ENTITY_FLAG_HIDING) {
get_background_color_blend(&r1, &g1, &b1, &a1);
alpha = alpha * (255 - a1) / 255;
}
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_HIDING)) {
if (gSpriteShadingProfile->flags) {
gDPSetRenderMode(gMainGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | G_RM_PASS,
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
} else {
gDPSetRenderMode(gMainGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA),
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
gDPSetCombineLERP(gMainGfxPos++, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, alpha);
}
}
}
if (!(item->flags & ITEM_ENTITY_FLAG_40000)) {
gDPLoadTLUT_pal16(gMainGfxPos++, 0, gHudElementCacheTablePalette[item->lookupPaletteIndex].data);
if (gSpriteShadingProfile->flags) {
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPLoadSync(gMainGfxPos++);
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
gDPPipeSync(gMainGfxPos++);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, 1, 0x0400, 0x0400, 0x045C, 0x045C);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 0x00FC, 0);
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_HIDING)) {
func_801491E4(sp58, 0, 0, 24, 24, alpha);
} else {
func_801491E4(sp58, 0, 0, 24, 24, 255);
}
} else {
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPLoadSync(gMainGfxPos++);
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
gDPPipeSync(gMainGfxPos++);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x045C, 0x045C);
}
gSPDisplayList(gMainGfxPos++, D_8014C678);
} else {
gDPLoadTLUT_pal16(gMainGfxPos++, 0, gHudElementCacheTablePalette[item->lookupPaletteIndex].data);
if (gSpriteShadingProfile->flags) {
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPLoadSync(gMainGfxPos++);
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
gDPPipeSync(gMainGfxPos++);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, 1, 0x0400, 0x0400, 0x047C, 0x047C);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 0x00FC, 0);
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_HIDING)) {
func_801491E4(sp58, 0, 0, 32, 32, alpha);
} else {
func_801491E4(sp58, 0, 0, 32, 32, 255);
}
} else {
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPLoadSync(gMainGfxPos++);
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
gDPPipeSync(gMainGfxPos++);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x047C, 0x047C);
}
gSPDisplayList(gMainGfxPos++, D_8014C6A0);
}
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMainGfxPos++);
}
}
}
}
i++;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel parasol_get_npc
/* E25D60 802B6000 27BDFFB0 */ addiu $sp, $sp, -0x50
/* E25D64 802B6004 AFB5002C */ sw $s5, 0x2C($sp)
/* E25D68 802B6008 AFB1001C */ sw $s1, 0x1C($sp)
/* E25D6C 802B600C 3C118011 */ lui $s1, %hi(gPlayerStatus)
/* E25D70 802B6010 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus)
/* E25D74 802B6014 AFBF0030 */ sw $ra, 0x30($sp)
.L802B6018:
/* E25D78 802B6018 AFB40028 */ sw $s4, 0x28($sp)
/* E25D7C 802B601C AFB30024 */ sw $s3, 0x24($sp)
/* E25D80 802B6020 AFB20020 */ sw $s2, 0x20($sp)
/* E25D84 802B6024 AFB00018 */ sw $s0, 0x18($sp)
/* E25D88 802B6028 F7B80048 */ sdc1 $f24, 0x48($sp)
/* E25D8C 802B602C F7B60040 */ sdc1 $f22, 0x40($sp)
/* E25D90 802B6030 F7B40038 */ sdc1 $f20, 0x38($sp)
/* E25D94 802B6034 8E220000 */ lw $v0, 0x0($s1)
/* E25D98 802B6038 3C108011 */ lui $s0, %hi(gPlayerSpinState)
/* E25D9C 802B603C 2610F250 */ addiu $s0, $s0, %lo(gPlayerSpinState)
.L802B6040:
/* E25DA0 802B6040 0441009D */ bgez $v0, .L802B62B8
.L802B6044:
/* E25DA4 802B6044 0000A82D */ daddu $s5, $zero, $zero
glabel action_hammer_play_hit_fx
/* E25DA8 802B6048 3C037FF7 */ lui $v1, (0x7FF7FFFF >> 16)
.L802B604C:
/* E25DAC 802B604C 3463FFFF */ ori $v1, $v1, (0x7FF7FFFF & 0xFFFF)
.L802B6050:
/* E25DB0 802B6050 3C05FFFB */ lui $a1, (0xFFFBFFFF >> 16)
/* E25DB4 802B6054 34A5FFFF */ ori $a1, $a1, (0xFFFBFFFF & 0xFFFF)
.L802B6058:
/* E25DB8 802B6058 24150001 */ addiu $s5, $zero, 0x1
/* E25DBC 802B605C 24040028 */ addiu $a0, $zero, 0x28
glabel action_update_sliding
/* E25DC0 802B6060 00431824 */ and $v1, $v0, $v1
/* E25DC4 802B6064 3C020002 */ lui $v0, (0x20000 >> 16)
.L802B6068:
/* E25DC8 802B6068 AE230000 */ sw $v1, 0x0($s1)
/* E25DCC 802B606C 00621825 */ or $v1, $v1, $v0
/* E25DD0 802B6070 24020019 */ addiu $v0, $zero, 0x19
.L802B6074:
/* E25DD4 802B6074 AE230000 */ sw $v1, 0x0($s1)
/* E25DD8 802B6078 A6200008 */ sh $zero, 0x8($s1)
glabel .L802B607C
/* E25DDC 802B607C A22000B6 */ sb $zero, 0xB6($s1)
.L802B6080:
/* E25DE0 802B6080 A2000000 */ sb $zero, 0x0($s0)
/* E25DE4 802B6084 A2000001 */ sb $zero, 0x1($s0)
/* E25DE8 802B6088 AE000010 */ sw $zero, 0x10($s0)
.L802B608C:
/* E25DEC 802B608C AE000014 */ sw $zero, 0x14($s0)
.L802B6090:
/* E25DF0 802B6090 AE000018 */ sw $zero, 0x18($s0)
.L802B6094:
/* E25DF4 802B6094 A2000002 */ sb $zero, 0x2($s0)
/* E25DF8 802B6098 AE000008 */ sw $zero, 0x8($s0)
glabel action_update_state_23
/* E25DFC 802B609C AE00000C */ sw $zero, 0xC($s0)
/* E25E00 802B60A0 AE000030 */ sw $zero, 0x30($s0)
glabel action_update_use_spinning_flower
/* E25E04 802B60A4 AE2000D8 */ sw $zero, 0xD8($s1)
.L802B60A8:
/* E25E08 802B60A8 A602002C */ sh $v0, 0x2C($s0)
.L802B60AC:
/* E25E0C 802B60AC 8E230004 */ lw $v1, 0x4($s1)
/* E25E10 802B60B0 2402000F */ addiu $v0, $zero, 0xF
glabel action_update_jump
/* E25E14 802B60B4 A602002E */ sh $v0, 0x2E($s0)
/* E25E18 802B60B8 3C020001 */ lui $v0, (0x10000 >> 16)
/* E25E1C 802B60BC 3C014220 */ lui $at, (0x42200000 >> 16)
/* E25E20 802B60C0 4481A000 */ mtc1 $at, $f20
/* E25E24 802B60C4 3C014000 */ lui $at, (0x40000000 >> 16)
.L802B60C8:
/* E25E28 802B60C8 44810000 */ mtc1 $at, $f0
/* E25E2C 802B60CC 3C013F00 */ lui $at, (0x3F000000 >> 16)
glabel .L802B60D0
/* E25E30 802B60D0 44811000 */ mtc1 $at, $f2
.L802B60D4:
/* E25E34 802B60D4 00651824 */ and $v1, $v1, $a1
/* E25E38 802B60D8 9205002D */ lbu $a1, 0x2D($s0)
/* E25E3C 802B60DC 00621825 */ or $v1, $v1, $v0
/* E25E40 802B60E0 AE230004 */ sw $v1, 0x4($s1)
/* E25E44 802B60E4 E6140020 */ swc1 $f20, 0x20($s0)
.L802B60E8:
/* E25E48 802B60E8 E6000024 */ swc1 $f0, 0x24($s0)
.L802B60EC:
/* E25E4C 802B60EC E6020028 */ swc1 $f2, 0x28($s0)
.L802B60F0:
/* E25E50 802B60F0 0C03A752 */ jal is_ability_active
glabel .L802B60F4
/* E25E54 802B60F4 A2050003 */ sb $a1, 0x3($s0)
/* E25E58 802B60F8 0002102B */ sltu $v0, $zero, $v0
/* E25E5C 802B60FC 00029080 */ sll $s2, $v0, 2
.L802B6100:
/* E25E60 802B6100 0C03A752 */ jal is_ability_active
.L802B6104:
/* E25E64 802B6104 2404002D */ addiu $a0, $zero, 0x2D
.L802B6108:
/* E25E68 802B6108 54400001 */ bnel $v0, $zero, .L802B6110
glabel .L802B610C
/* E25E6C 802B610C 36520002 */ ori $s2, $s2, 0x2
.L802B6110:
/* E25E70 802B6110 0C03A752 */ jal is_ability_active
/* E25E74 802B6114 24040027 */ addiu $a0, $zero, 0x27
.L802B6118:
/* E25E78 802B6118 10400010 */ beqz $v0, .L802B615C
/* E25E7C 802B611C 2402001E */ addiu $v0, $zero, 0x1E
glabel action_update_parasol
/* E25E80 802B6120 36520001 */ ori $s2, $s2, 0x1
.L802B6124:
/* E25E84 802B6124 A602002C */ sh $v0, 0x2C($s0)
.L802B6128:
/* E25E88 802B6128 9203002D */ lbu $v1, 0x2D($s0)
/* E25E8C 802B612C 3C01402C */ lui $at, (0x402CCCCD >> 16)
/* E25E90 802B6130 3421CCCD */ ori $at, $at, (0x402CCCCD & 0xFFFF)
glabel .L802B6134
/* E25E94 802B6134 44810000 */ mtc1 $at, $f0
/* E25E98 802B6138 3C013F66 */ lui $at, (0x3F666666 >> 16)
.L802B613C:
/* E25E9C 802B613C 34216666 */ ori $at, $at, (0x3F666666 & 0xFFFF)
.L802B6140:
/* E25EA0 802B6140 44811000 */ mtc1 $at, $f2
.L802B6144:
/* E25EA4 802B6144 24020014 */ addiu $v0, $zero, 0x14
/* E25EA8 802B6148 E6140020 */ swc1 $f20, 0x20($s0)
.L802B614C:
/* E25EAC 802B614C A602002E */ sh $v0, 0x2E($s0)
.L802B6150:
/* E25EB0 802B6150 A2030003 */ sb $v1, 0x3($s0)
.L802B6154:
/* E25EB4 802B6154 E6000024 */ swc1 $f0, 0x24($s0)
.L802B6158:
/* E25EB8 802B6158 E6020028 */ swc1 $f2, 0x28($s0)
.L802B615C:
/* E25EBC 802B615C 2414FFFF */ addiu $s4, $zero, -0x1
/* E25EC0 802B6160 3C130001 */ lui $s3, (0x10010 >> 16)
.L802B6164:
/* E25EC4 802B6164 12400011 */ beqz $s2, .L802B61AC
.L802B6168:
/* E25EC8 802B6168 36730010 */ ori $s3, $s3, (0x10010 & 0xFFFF)
/* E25ECC 802B616C 32420004 */ andi $v0, $s2, 0x4
glabel .L802B6170
/* E25ED0 802B6170 10400005 */ beqz $v0, .L802B6188
glabel .L802B6174
/* E25ED4 802B6174 32420002 */ andi $v0, $s2, 0x2
/* E25ED8 802B6178 24140002 */ addiu $s4, $zero, 0x2
.L802B617C:
/* E25EDC 802B617C 3C130001 */ lui $s3, (0x10012 >> 16)
.L802B6180:
/* E25EE0 802B6180 080AD86B */ j .L802B61AC
glabel .L802B6184
/* E25EE4 802B6184 36730012 */ ori $s3, $s3, (0x10012 & 0xFFFF)
.L802B6188:
/* E25EE8 802B6188 10400003 */ beqz $v0, func_802B6198
.L802B618C:
/* E25EEC 802B618C 32420001 */ andi $v0, $s2, 0x1
.L802B6190:
/* E25EF0 802B6190 080AD86B */ j .L802B61AC
.L802B6194:
/* E25EF4 802B6194 24140004 */ addiu $s4, $zero, 0x4
glabel func_802B6198
/* E25EF8 802B6198 10400005 */ beqz $v0, .L802B61B0
/* E25EFC 802B619C 24022111 */ addiu $v0, $zero, 0x2111
.L802B61A0:
/* E25F00 802B61A0 0000A02D */ daddu $s4, $zero, $zero
.L802B61A4:
/* E25F04 802B61A4 3C130001 */ lui $s3, (0x10011 >> 16)
.L802B61A8:
/* E25F08 802B61A8 36730011 */ ori $s3, $s3, (0x10011 & 0xFFFF)
.L802B61AC:
/* E25F0C 802B61AC 24022111 */ addiu $v0, $zero, 0x2111
.L802B61B0:
/* E25F10 802B61B0 AE020030 */ sw $v0, 0x30($s0)
.L802B61B4:
/* E25F14 802B61B4 2402FFFD */ addiu $v0, $zero, -0x3
/* E25F18 802B61B8 02421824 */ and $v1, $s2, $v0
/* E25F1C 802B61BC 24020004 */ addiu $v0, $zero, 0x4
glabel func_802B61C0
/* E25F20 802B61C0 14620004 */ bne $v1, $v0, .L802B61D4
/* E25F24 802B61C4 24020001 */ addiu $v0, $zero, 0x1
.L802B61C8:
/* E25F28 802B61C8 24022113 */ addiu $v0, $zero, 0x2113
.L802B61CC:
/* E25F2C 802B61CC AE020030 */ sw $v0, 0x30($s0)
/* E25F30 802B61D0 24020001 */ addiu $v0, $zero, 0x1
.L802B61D4:
/* E25F34 802B61D4 14620004 */ bne $v1, $v0, .L802B61E8
.L802B61D8:
/* E25F38 802B61D8 24020005 */ addiu $v0, $zero, 0x5
.L802B61DC:
/* E25F3C 802B61DC 24022112 */ addiu $v0, $zero, 0x2112
/* E25F40 802B61E0 AE020030 */ sw $v0, 0x30($s0)
glabel func_802B61E4
/* E25F44 802B61E4 24020005 */ addiu $v0, $zero, 0x5
.L802B61E8:
/* E25F48 802B61E8 14620002 */ bne $v1, $v0, .L802B61F4
.L802B61EC:
/* E25F4C 802B61EC 24022114 */ addiu $v0, $zero, 0x2114
.L802B61F0:
/* E25F50 802B61F0 AE020030 */ sw $v0, 0x30($s0)
.L802B61F4:
/* E25F54 802B61F4 8E040030 */ lw $a0, 0x30($s0)
.L802B61F8:
/* E25F58 802B61F8 0C052736 */ jal sfx_play_sound_at_player
.L802B61FC:
/* E25F5C 802B61FC 0000282D */ daddu $a1, $zero, $zero
.L802B6200:
/* E25F60 802B6200 0C037FDE */ jal suggest_player_anim_always_forward
.L802B6204:
/* E25F64 802B6204 0260202D */ daddu $a0, $s3, $zero
glabel .L802B6208
/* E25F68 802B6208 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* E25F6C 802B620C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
.L802B6210:
/* E25F70 802B6210 C6200080 */ lwc1 $f0, 0x80($s1)
.L802B6214:
/* E25F74 802B6214 00031080 */ sll $v0, $v1, 2
glabel .L802B6218
/* E25F78 802B6218 00431021 */ addu $v0, $v0, $v1
/* E25F7C 802B621C 00021080 */ sll $v0, $v0, 2
.L802B6220:
/* E25F80 802B6220 00431023 */ subu $v0, $v0, $v1
.L802B6224:
/* E25F84 802B6224 000218C0 */ sll $v1, $v0, 3
glabel .L802B6228
/* E25F88 802B6228 00431021 */ addu $v0, $v0, $v1
.L802B622C:
/* E25F8C 802B622C 000210C0 */ sll $v0, $v0, 3
glabel action_update_step_up_peach
/* E25F90 802B6230 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* E25F94 802B6234 00220821 */ addu $at, $at, $v0
glabel .L802B6238
/* E25F98 802B6238 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
glabel .L802B623C
/* E25F9C 802B623C 0C00A6C9 */ jal clamp_angle
glabel .L802B6240
/* E25FA0 802B6240 460C0301 */ sub.s $f12, $f0, $f12
glabel .L802B6244
/* E25FA4 802B6244 3C014334 */ lui $at, (0x43340000 >> 16)
glabel .L802B6248
/* E25FA8 802B6248 44811000 */ mtc1 $at, $f2
/* E25FAC 802B624C 00000000 */ nop
glabel .L802B6250
/* E25FB0 802B6250 4602003E */ c.le.s $f0, $f2
.L802B6254:
/* E25FB4 802B6254 00000000 */ nop
glabel .L802B6258
/* E25FB8 802B6258 45020004 */ bc1fl .L802B626C
.L802B625C:
/* E25FBC 802B625C 26940001 */ addiu $s4, $s4, 0x1
/* E25FC0 802B6260 C6000020 */ lwc1 $f0, 0x20($s0)
/* E25FC4 802B6264 080AD89E */ j .L802B6278
.L802B6268:
/* E25FC8 802B6268 E62000D4 */ swc1 $f0, 0xD4($s1)
.L802B626C:
/* E25FCC 802B626C C6000020 */ lwc1 $f0, 0x20($s0)
/* E25FD0 802B6270 46000007 */ neg.s $f0, $f0
.L802B6274:
/* E25FD4 802B6274 E62000D4 */ swc1 $f0, 0xD4($s1)
glabel .L802B6278
/* E25FD8 802B6278 12400006 */ beqz $s2, func_802B6294
/* E25FDC 802B627C 0280202D */ daddu $a0, $s4, $zero
.L802B6280:
/* E25FE0 802B6280 0220282D */ daddu $a1, $s1, $zero
.L802B6284:
/* E25FE4 802B6284 3C063F80 */ lui $a2, (0x3F800000 >> 16)
glabel action_update_run
/* E25FE8 802B6288 0C01C4B4 */ jal fx_46
/* E25FEC 802B628C 240703E8 */ addiu $a3, $zero, 0x3E8
.L802B6290:
/* E25FF0 802B6290 AE2200D8 */ sw $v0, 0xD8($s1)
glabel func_802B6294
/* E25FF4 802B6294 0C03963C */ jal phys_clear_spin_history
glabel .L802B6298
/* E25FF8 802B6298 00000000 */ nop
/* E25FFC 802B629C 27A40010 */ addiu $a0, $sp, 0x10
/* E26000 802B62A0 0C0388C1 */ jal player_input_to_move_vector
glabel func_802B62A4
/* E26004 802B62A4 27A50014 */ addiu $a1, $sp, 0x14
.L802B62A8:
/* E26008 802B62A8 C7A00010 */ lwc1 $f0, 0x10($sp)
/* E2600C 802B62AC C7A20014 */ lwc1 $f2, 0x14($sp)
jtbl_802B62B0:
/* E26010 802B62B0 E6200080 */ swc1 $f0, 0x80($s1)
.L802B62B4:
/* E26014 802B62B4 E602001C */ swc1 $f2, 0x1C($s0)
glabel .L802B62B8
/* E26018 802B62B8 3C058011 */ lui $a1, %hi(gSpinHistoryBufferPos)
/* E2601C 802B62BC 24A5C944 */ addiu $a1, $a1, %lo(gSpinHistoryBufferPos)
/* E26020 802B62C0 3C068011 */ lui $a2, %hi(gSpinHistoryPosAngle)
/* E26024 802B62C4 24C6F6B8 */ addiu $a2, $a2, %lo(gSpinHistoryPosAngle)
.L802B62C8:
/* E26028 802B62C8 8CA20000 */ lw $v0, 0x0($a1)
glabel action_update_peach_land
/* E2602C 802B62CC C62000A8 */ lwc1 $f0, 0xA8($s1)
Munchlesia_LaunchVelocity:
/* E26030 802B62D0 00022040 */ sll $a0, $v0, 1
Munchlesia_LateralVelocity:
/* E26034 802B62D4 24420001 */ addiu $v0, $v0, 0x1
Munchlesia_LaunchAccel:
/* E26038 802B62D8 4600018D */ trunc.w.s $f6, $f0
Munchlesia_LaunchYaw:
/* E2603C 802B62DC 44033000 */ mfc1 $v1, $f6
D_802B62E0:
/* E26040 802B62E0 3C018011 */ lui $at, %hi(gSpinHistoryPosAngle)
.L802B62E4:
/* E26044 802B62E4 00240821 */ addu $at, $at, $a0
/* E26048 802B62E8 A423F6B8 */ sh $v1, %lo(gSpinHistoryPosAngle)($at)
/* E2604C 802B62EC ACA20000 */ sw $v0, 0x0($a1)
/* E26050 802B62F0 28420006 */ slti $v0, $v0, 0x6
/* E26054 802B62F4 50400001 */ beql $v0, $zero, .L802B62FC
glabel func_802B62F8
/* E26058 802B62F8 ACA00000 */ sw $zero, 0x0($a1)
.L802B62FC:
/* E2605C 802B62FC 8CA30000 */ lw $v1, 0x0($a1)
D_802B6300:
/* E26060 802B6300 C6200028 */ lwc1 $f0, 0x28($s1)
/* E26064 802B6304 00031080 */ sll $v0, $v1, 2
.L802B6308:
/* E26068 802B6308 4600018D */ trunc.w.s $f6, $f0
.L802B630C:
/* E2606C 802B630C 3C018011 */ lui $at, %hi(gSpinHistoryPosX)
.L802B6310:
/* E26070 802B6310 00220821 */ addu $at, $at, $v0
/* E26074 802B6314 E426EF28 */ swc1 $f6, %lo(gSpinHistoryPosX)($at)
/* E26078 802B6318 24640001 */ addiu $a0, $v1, 0x1
glabel .L802B631C
/* E2607C 802B631C C620002C */ lwc1 $f0, 0x2C($s1)
.L802B6320:
/* E26080 802B6320 00031840 */ sll $v1, $v1, 1
glabel .L802B6324
/* E26084 802B6324 4600018D */ trunc.w.s $f6, $f0
.L802B6328:
/* E26088 802B6328 3C018011 */ lui $at, %hi(gSpinHistoryPosY)
glabel .L802B632C
/* E2608C 802B632C 00220821 */ addu $at, $at, $v0
.L802B6330:
/* E26090 802B6330 E426EF10 */ swc1 $f6, %lo(gSpinHistoryPosY)($at)
/* E26094 802B6334 C6200030 */ lwc1 $f0, 0x30($s1)
.L802B6338:
/* E26098 802B6338 00661821 */ addu $v1, $v1, $a2
/* E2609C 802B633C ACA40000 */ sw $a0, 0x0($a1)
.L802B6340:
/* E260A0 802B6340 4600018D */ trunc.w.s $f6, $f0
/* E260A4 802B6344 3C018011 */ lui $at, %hi(gSpinHistoryPosZ)
glabel func_802B6348
/* E260A8 802B6348 00220821 */ addu $at, $at, $v0
/* E260AC 802B634C E426EF40 */ swc1 $f6, %lo(gSpinHistoryPosZ)($at)
PlayerTweesterPhysicsPtr:
/* E260B0 802B6350 C62000A8 */ lwc1 $f0, 0xA8($s1)
glabel .L802B6354
/* E260B4 802B6354 28840006 */ slti $a0, $a0, 0x6
/* E260B8 802B6358 4600018D */ trunc.w.s $f6, $f0
.L802B635C:
/* E260BC 802B635C 44023000 */ mfc1 $v0, $f6
D_802B6360:
/* E260C0 802B6360 14800002 */ bnez $a0, .L802B636C
.L802B6364:
/* E260C4 802B6364 A4620000 */ sh $v0, 0x0($v1)
/* E260C8 802B6368 ACA00000 */ sw $zero, 0x0($a1)
.L802B636C:
/* E260CC 802B636C 16A0001A */ bnez $s5, .L802B63D8
glabel .L802B6370
/* E260D0 802B6370 00000000 */ nop
.L802B6374:
/* E260D4 802B6374 0C039838 */ jal check_input_hammer
/* E260D8 802B6378 00000000 */ nop
glabel .L802B637C
/* E260DC 802B637C 14400005 */ bnez $v0, .L802B6394
/* E260E0 802B6380 3C05FFFE */ lui $a1, (0xFFFEFFFF >> 16)
/* E260E4 802B6384 0C039858 */ jal check_input_jump
/* E260E8 802B6388 00000000 */ nop
/* E260EC 802B638C 10400012 */ beqz $v0, .L802B63D8
/* E260F0 802B6390 3C05FFFE */ lui $a1, (0xFFFEFFFF >> 16)
glabel .L802B6394
/* E260F4 802B6394 34A5FFFF */ ori $a1, $a1, (0xFFFEFFFF & 0xFFFF)
.L802B6398:
/* E260F8 802B6398 3C06FFFD */ lui $a2, (0xFFFDFFFF >> 16)
.L802B639C:
/* E260FC 802B639C 34C6FFFF */ ori $a2, $a2, (0xFFFDFFFF & 0xFFFF)
/* E26100 802B63A0 8E040030 */ lw $a0, 0x30($s0)
/* E26104 802B63A4 8E220004 */ lw $v0, 0x4($s1)
.L802B63A8:
/* E26108 802B63A8 8E230000 */ lw $v1, 0x0($s1)
.L802B63AC:
/* E2610C 802B63AC 00451024 */ and $v0, $v0, $a1
glabel .L802B63B0
/* E26110 802B63B0 00661824 */ and $v1, $v1, $a2
/* E26114 802B63B4 AE220004 */ sw $v0, 0x4($s1)
/* E26118 802B63B8 0C05271B */ jal sfx_stop_sound
/* E2611C 802B63BC AE230000 */ sw $v1, 0x0($s1)
.L802B63C0:
/* E26120 802B63C0 27A40010 */ addiu $a0, $sp, 0x10
.L802B63C4:
/* E26124 802B63C4 0C0388C1 */ jal player_input_to_move_vector
.L802B63C8:
/* E26128 802B63C8 27A50014 */ addiu $a1, $sp, 0x14
.L802B63CC:
/* E2612C 802B63CC C7A00010 */ lwc1 $f0, 0x10($sp)
.L802B63D0:
/* E26130 802B63D0 080ADA5B */ j .L802B696C
glabel action_update_first_strike
/* E26134 802B63D4 E6200080 */ swc1 $f0, 0x80($s1)
.L802B63D8:
/* E26138 802B63D8 82020003 */ lb $v0, 0x3($s0)
glabel .L802B63DC
/* E2613C 802B63DC 2842000B */ slti $v0, $v0, 0xB
.L802B63E0:
/* E26140 802B63E0 1040000C */ beqz $v0, .L802B6414
.L802B63E4:
/* E26144 802B63E4 00000000 */ nop
/* E26148 802B63E8 8E2200E0 */ lw $v0, 0xE0($s1)
/* E2614C 802B63EC 30422000 */ andi $v0, $v0, 0x2000
.L802B63F0:
/* E26150 802B63F0 10400008 */ beqz $v0, .L802B6414
.L802B63F4:
/* E26154 802B63F4 24020001 */ addiu $v0, $zero, 0x1
/* E26158 802B63F8 822300B5 */ lb $v1, 0xB5($s1)
/* E2615C 802B63FC 8E2400E8 */ lw $a0, 0xE8($s1)
.L802B6400:
/* E26160 802B6400 8E2500EC */ lw $a1, 0xEC($s1)
/* E26164 802B6404 A2020001 */ sb $v0, 0x1($s0)
/* E26168 802B6408 AE030004 */ sw $v1, 0x4($s0)
.L802B640C:
/* E2616C 802B640C AE040008 */ sw $a0, 0x8($s0)
/* E26170 802B6410 AE05000C */ sw $a1, 0xC($s0)
.L802B6414:
/* E26174 802B6414 822300B6 */ lb $v1, 0xB6($s1)
.L802B6418:
/* E26178 802B6418 28620002 */ slti $v0, $v1, 0x2
/* E2617C 802B641C 1440004C */ bnez $v0, func_802B6550
.L802B6420:
/* E26180 802B6420 00000000 */ nop
.L802B6424:
/* E26184 802B6424 C6000010 */ lwc1 $f0, 0x10($s0)
.L802B6428:
/* E26188 802B6428 3C013F80 */ lui $at, (0x3F800000 >> 16)
.L802B642C:
/* E2618C 802B642C 44811000 */ mtc1 $at, $f2
D_802B6430:
/* E26190 802B6430 00000000 */ nop
/* E26194 802B6434 46020001 */ sub.s $f0, $f0, $f2
/* E26198 802B6438 4480C000 */ mtc1 $zero, $f24
/* E2619C 802B643C 00000000 */ nop
/* E261A0 802B6440 4618003C */ c.lt.s $f0, $f24
/* E261A4 802B6444 00000000 */ nop
.L802B6448:
/* E261A8 802B6448 45000002 */ bc1f .L802B6454
glabel action_update_peach_step_down_land
/* E261AC 802B644C E6000010 */ swc1 $f0, 0x10($s0)
.L802B6450:
/* E261B0 802B6450 E6180010 */ swc1 $f24, 0x10($s0)
.L802B6454:
/* E261B4 802B6454 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* E261B8 802B6458 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* E261BC 802B645C C6200080 */ lwc1 $f0, 0x80($s1)
.L802B6460:
/* E261C0 802B6460 00031080 */ sll $v0, $v1, 2
.L802B6464:
/* E261C4 802B6464 00431021 */ addu $v0, $v0, $v1
/* E261C8 802B6468 00021080 */ sll $v0, $v0, 2
glabel .L802B646C
/* E261CC 802B646C 00431023 */ subu $v0, $v0, $v1
/* E261D0 802B6470 000218C0 */ sll $v1, $v0, 3
/* E261D4 802B6474 00431021 */ addu $v0, $v0, $v1
glabel action_update_raise_arms
/* E261D8 802B6478 000210C0 */ sll $v0, $v0, 3
glabel action_update_peach_falling
/* E261DC 802B647C 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* E261E0 802B6480 00220821 */ addu $at, $at, $v0
/* E261E4 802B6484 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
/* E261E8 802B6488 0C00A6C9 */ jal clamp_angle
.L802B648C:
/* E261EC 802B648C 460C0301 */ sub.s $f12, $f0, $f12
.L802B6490:
/* E261F0 802B6490 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
.L802B6494:
/* E261F4 802B6494 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* E261F8 802B6498 4481A000 */ mtc1 $at, $f20
/* E261FC 802B649C 00000000 */ nop
.L802B64A0:
/* E26200 802B64A0 46140302 */ mul.s $f12, $f0, $f20
/* E26204 802B64A4 00000000 */ nop
glabel .L802B64A8
/* E26208 802B64A8 3C0143B4 */ lui $at, (0x43B40000 >> 16)
.L802B64AC:
/* E2620C 802B64AC 4481B000 */ mtc1 $at, $f22
/* E26210 802B64B0 E7A00010 */ swc1 $f0, 0x10($sp)
.L802B64B4:
/* E26214 802B64B4 0C00A85B */ jal sin_rad
/* E26218 802B64B8 46166303 */ div.s $f12, $f12, $f22
/* E2621C 802B64BC C7AC0010 */ lwc1 $f12, 0x10($sp)
/* E26220 802B64C0 46146302 */ mul.s $f12, $f12, $f20
.L802B64C4:
/* E26224 802B64C4 00000000 */ nop
/* E26228 802B64C8 C6020010 */ lwc1 $f2, 0x10($s0)
.L802B64CC:
/* E2622C 802B64CC 46020002 */ mul.s $f0, $f0, $f2
.L802B64D0:
/* E26230 802B64D0 00000000 */ nop
.L802B64D4:
/* E26234 802B64D4 46166303 */ div.s $f12, $f12, $f22
.L802B64D8:
/* E26238 802B64D8 0C00A874 */ jal cos_rad
glabel .L802B64DC
/* E2623C 802B64DC E6000014 */ swc1 $f0, 0x14($s0)
glabel .L802B64E0
/* E26240 802B64E0 46000007 */ neg.s $f0, $f0
/* E26244 802B64E4 C6020010 */ lwc1 $f2, 0x10($s0)
/* E26248 802B64E8 96220008 */ lhu $v0, 0x8($s1)
.L802B64EC:
/* E2624C 802B64EC 46020002 */ mul.s $f0, $f0, $f2
glabel .L802B64F0
/* E26250 802B64F0 00000000 */ nop
/* E26254 802B64F4 2442FFFF */ addiu $v0, $v0, -0x1
.L802B64F8:
/* E26258 802B64F8 A6220008 */ sh $v0, 0x8($s1)
/* E2625C 802B64FC 00021400 */ sll $v0, $v0, 16
/* E26260 802B6500 14400011 */ bnez $v0, .L802B6548
/* E26264 802B6504 E6000018 */ swc1 $f0, 0x18($s0)
glabel action_update_pushing_block
/* E26268 802B6508 0000202D */ daddu $a0, $zero, $zero
.L802B650C:
/* E2626C 802B650C 24020004 */ addiu $v0, $zero, 0x4
glabel .L802B6510
/* E26270 802B6510 0C039769 */ jal set_action_state
/* E26274 802B6514 A2020000 */ sb $v0, 0x0($s0)
/* E26278 802B6518 3C05FFFD */ lui $a1, (0xFFFDFFFF >> 16)
.L802B651C:
/* E2627C 802B651C 34A5FFFF */ ori $a1, $a1, (0xFFFDFFFF & 0xFFFF)
.L802B6520:
/* E26280 802B6520 3C06FFFE */ lui $a2, (0xFFFEFFFF >> 16)
.L802B6524:
/* E26284 802B6524 34C6FFFF */ ori $a2, $a2, (0xFFFEFFFF & 0xFFFF)
/* E26288 802B6528 8E040030 */ lw $a0, 0x30($s0)
/* E2628C 802B652C 8E220000 */ lw $v0, 0x0($s1)
.L802B6530:
/* E26290 802B6530 8E230004 */ lw $v1, 0x4($s1)
.L802B6534:
/* E26294 802B6534 00451024 */ and $v0, $v0, $a1
/* E26298 802B6538 00661824 */ and $v1, $v1, $a2
/* E2629C 802B653C AE220000 */ sw $v0, 0x0($s1)
/* E262A0 802B6540 0C05271B */ jal sfx_stop_sound
glabel .L802B6544
/* E262A4 802B6544 AE230004 */ sw $v1, 0x4($s1)
glabel .L802B6548
/* E262A8 802B6548 080ADA5B */ j .L802B696C
/* E262AC 802B654C E6380054 */ swc1 $f24, 0x54($s1)
glabel func_802B6550
/* E262B0 802B6550 14600012 */ bnez $v1, .L802B659C
.L802B6554:
/* E262B4 802B6554 3C030004 */ lui $v1, (0x40000 >> 16)
/* E262B8 802B6558 8E220004 */ lw $v0, 0x4($s1)
/* E262BC 802B655C 00431024 */ and $v0, $v0, $v1
/* E262C0 802B6560 1440000D */ bnez $v0, .L802B6598
/* E262C4 802B6564 24020001 */ addiu $v0, $zero, 0x1
glabel .L802B6568
/* E262C8 802B6568 3C028016 */ lui $v0, %hi(gCollisionStatus)
.L802B656C:
/* E262CC 802B656C 8442A550 */ lh $v0, %lo(gCollisionStatus)($v0)
.L802B6570:
/* E262D0 802B6570 0440000A */ bltz $v0, .L802B659C
.L802B6574:
/* E262D4 802B6574 00000000 */ nop
/* E262D8 802B6578 92020002 */ lbu $v0, 0x2($s0)
/* E262DC 802B657C 24420001 */ addiu $v0, $v0, 0x1
.L802B6580:
/* E262E0 802B6580 A2020002 */ sb $v0, 0x2($s0)
/* E262E4 802B6584 00021600 */ sll $v0, $v0, 24
/* E262E8 802B6588 00021603 */ sra $v0, $v0, 24
glabel .L802B658C
/* E262EC 802B658C 2842000A */ slti $v0, $v0, 0xA
.L802B6590:
/* E262F0 802B6590 14400002 */ bnez $v0, .L802B659C
glabel .L802B6594
/* E262F4 802B6594 24020001 */ addiu $v0, $zero, 0x1
.L802B6598:
/* E262F8 802B6598 A22200B6 */ sb $v0, 0xB6($s1)
.L802B659C:
/* E262FC 802B659C 86240008 */ lh $a0, 0x8($s1)
/* E26300 802B65A0 8603002E */ lh $v1, 0x2E($s0)
glabel .L802B65A4
/* E26304 802B65A4 0064102A */ slt $v0, $v1, $a0
.L802B65A8:
/* E26308 802B65A8 5440003F */ bnel $v0, $zero, func_802B66A8
/* E2630C 802B65AC 00831023 */ subu $v0, $a0, $v1
/* E26310 802B65B0 C600001C */ lwc1 $f0, 0x1C($s0)
glabel .L802B65B4
/* E26314 802B65B4 44801000 */ mtc1 $zero, $f2
.L802B65B8:
/* E26318 802B65B8 00000000 */ nop
/* E2631C 802B65BC 46020032 */ c.eq.s $f0, $f2
glabel .L802B65C0
/* E26320 802B65C0 00000000 */ nop
/* E26324 802B65C4 45010002 */ bc1t .L802B65D0
/* E26328 802B65C8 46001606 */ mov.s $f24, $f2
glabel .L802B65CC
/* E2632C 802B65CC C6180024 */ lwc1 $f24, 0x24($s0)
.L802B65D0:
/* E26330 802B65D0 C6000010 */ lwc1 $f0, 0x10($s0)
/* E26334 802B65D4 3C01802B */ lui $at, %hi(D_802B69A0_E26700)
/* E26338 802B65D8 D42269A0 */ ldc1 $f2, %lo(D_802B69A0_E26700)($at)
.L802B65DC:
/* E2633C 802B65DC 46000021 */ cvt.d.s $f0, $f0
.L802B65E0:
/* E26340 802B65E0 46220000 */ add.d $f0, $f0, $f2
.L802B65E4:
/* E26344 802B65E4 3C014110 */ lui $at, (0x41100000 >> 16)
glabel action_update_walk_peach
/* E26348 802B65E8 44811000 */ mtc1 $at, $f2
.L802B65EC:
/* E2634C 802B65EC 46200020 */ cvt.s.d $f0, $f0
.L802B65F0:
/* E26350 802B65F0 4600103C */ c.lt.s $f2, $f0
/* E26354 802B65F4 00000000 */ nop
glabel func_802B65F8_E26D08
/* E26358 802B65F8 45000002 */ bc1f .L802B6604
/* E2635C 802B65FC E6000010 */ swc1 $f0, 0x10($s0)
/* E26360 802B6600 E6020010 */ swc1 $f2, 0x10($s0)
.L802B6604:
/* E26364 802B6604 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* E26368 802B6608 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
glabel .L802B660C
/* E2636C 802B660C C6200080 */ lwc1 $f0, 0x80($s1)
/* E26370 802B6610 00031080 */ sll $v0, $v1, 2
/* E26374 802B6614 00431021 */ addu $v0, $v0, $v1
/* E26378 802B6618 00021080 */ sll $v0, $v0, 2
glabel .L802B661C
/* E2637C 802B661C 00431023 */ subu $v0, $v0, $v1
.L802B6620:
/* E26380 802B6620 000218C0 */ sll $v1, $v0, 3
/* E26384 802B6624 00431021 */ addu $v0, $v0, $v1
.L802B6628:
/* E26388 802B6628 000210C0 */ sll $v0, $v0, 3
/* E2638C 802B662C 3C01800B */ lui $at, %hi(gCameras + 0x6C)
.L802B6630:
/* E26390 802B6630 00220821 */ addu $at, $at, $v0
glabel .L802B6634
/* E26394 802B6634 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at)
glabel action_update_talk
/* E26398 802B6638 0C00A6C9 */ jal clamp_angle
/* E2639C 802B663C 460C0301 */ sub.s $f12, $f0, $f12
/* E263A0 802B6640 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
glabel .L802B6644
/* E263A4 802B6644 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
glabel func_802B6648_E27428
/* E263A8 802B6648 4481A000 */ mtc1 $at, $f20
.L802B664C:
/* E263AC 802B664C 00000000 */ nop
.L802B6650:
/* E263B0 802B6650 46140302 */ mul.s $f12, $f0, $f20
glabel .L802B6654
/* E263B4 802B6654 00000000 */ nop
/* E263B8 802B6658 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* E263BC 802B665C 4481B000 */ mtc1 $at, $f22
glabel .L802B6660
/* E263C0 802B6660 E7A00010 */ swc1 $f0, 0x10($sp)
/* E263C4 802B6664 0C00A85B */ jal sin_rad
/* E263C8 802B6668 46166303 */ div.s $f12, $f12, $f22
glabel .L802B666C
/* E263CC 802B666C C7AC0010 */ lwc1 $f12, 0x10($sp)
glabel .L802B6670
/* E263D0 802B6670 46146302 */ mul.s $f12, $f12, $f20
glabel .L802B6674
/* E263D4 802B6674 00000000 */ nop
.L802B6678:
/* E263D8 802B6678 C6020010 */ lwc1 $f2, 0x10($s0)
/* E263DC 802B667C 46020002 */ mul.s $f0, $f0, $f2
glabel .L802B6680
/* E263E0 802B6680 00000000 */ nop
/* E263E4 802B6684 46166303 */ div.s $f12, $f12, $f22
/* E263E8 802B6688 0C00A874 */ jal cos_rad
glabel func_802B668C
/* E263EC 802B668C E6000014 */ swc1 $f0, 0x14($s0)
jtbl_802B6690:
/* E263F0 802B6690 C6020010 */ lwc1 $f2, 0x10($s0)
/* E263F4 802B6694 46000007 */ neg.s $f0, $f0
.L802B6698:
/* E263F8 802B6698 46020002 */ mul.s $f0, $f0, $f2
/* E263FC 802B669C 00000000 */ nop
/* E26400 802B66A0 080AD9CE */ j func_802B6738
.L802B66A4:
/* E26404 802B66A4 E6000018 */ swc1 $f0, 0x18($s0)
glabel func_802B66A8
/* E26408 802B66A8 2442FFFF */ addiu $v0, $v0, -0x1
/* E2640C 802B66AC C6020028 */ lwc1 $f2, 0x28($s0)
.L802B66B0:
/* E26410 802B66B0 44820000 */ mtc1 $v0, $f0
.L802B66B4:
/* E26414 802B66B4 00000000 */ nop
/* E26418 802B66B8 46800020 */ cvt.s.w $f0, $f0
glabel .L802B66BC
/* E2641C 802B66BC 46020002 */ mul.s $f0, $f0, $f2
glabel .L802B66C0
/* E26420 802B66C0 00000000 */ nop
/* E26424 802B66C4 C6020024 */ lwc1 $f2, 0x24($s0)
/* E26428 802B66C8 46001601 */ sub.s $f24, $f2, $f0
/* E2642C 802B66CC 3C01802B */ lui $at, %hi(D_802B69A8_E26708)
/* E26430 802B66D0 D42269A8 */ ldc1 $f2, %lo(D_802B69A8_E26708)($at)
/* E26434 802B66D4 4600C021 */ cvt.d.s $f0, $f24
/* E26438 802B66D8 4622003C */ c.lt.d $f0, $f2
.L802B66DC:
/* E2643C 802B66DC 00000000 */ nop
.L802B66E0:
/* E26440 802B66E0 45000004 */ bc1f .L802B66F4
/* E26444 802B66E4 00000000 */ nop
/* E26448 802B66E8 3C013DCC */ lui $at, (0x3DCCCCCD >> 16)
/* E2644C 802B66EC 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF)
.L802B66F0:
/* E26450 802B66F0 4481C000 */ mtc1 $at, $f24
.L802B66F4:
/* E26454 802B66F4 C600001C */ lwc1 $f0, 0x1C($s0)
/* E26458 802B66F8 44802000 */ mtc1 $zero, $f4
/* E2645C 802B66FC 00000000 */ nop
/* E26460 802B6700 46040032 */ c.eq.s $f0, $f4
/* E26464 802B6704 00000000 */ nop
.L802B6708:
/* E26468 802B6708 45030001 */ bc1tl .L802B6710
/* E2646C 802B670C 46002606 */ mov.s $f24, $f4
.L802B6710:
/* E26470 802B6710 C6000010 */ lwc1 $f0, 0x10($s0)
/* E26474 802B6714 3C013F80 */ lui $at, (0x3F800000 >> 16)
D_802B6718_E274F8:
/* E26478 802B6718 44811000 */ mtc1 $at, $f2
.L802B671C:
/* E2647C 802B671C 00000000 */ nop
D_802B6720_E27500:
/* E26480 802B6720 46020001 */ sub.s $f0, $f0, $f2
/* E26484 802B6724 4604003C */ c.lt.s $f0, $f4
D_802B6728_E27508:
/* E26488 802B6728 00000000 */ nop
.L802B672C:
/* E2648C 802B672C 45000002 */ bc1f func_802B6738
D_802B6730:
/* E26490 802B6730 E6000010 */ swc1 $f0, 0x10($s0)
/* E26494 802B6734 E6040010 */ swc1 $f4, 0x10($s0)
glabel func_802B6738
/* E26498 802B6738 96220008 */ lhu $v0, 0x8($s1)
/* E2649C 802B673C 822300B5 */ lb $v1, 0xB5($s1)
.L802B6740:
/* E264A0 802B6740 24420001 */ addiu $v0, $v0, 0x1
.L802B6744:
/* E264A4 802B6744 10600007 */ beqz $v1, .L802B6764
/* E264A8 802B6748 A6220008 */ sh $v0, 0x8($s1)
.L802B674C:
/* E264AC 802B674C 04600030 */ bltz $v1, .L802B6810
.L802B6750:
/* E264B0 802B6750 28620003 */ slti $v0, $v1, 0x3
/* E264B4 802B6754 1040002E */ beqz $v0, .L802B6810
.L802B6758:
/* E264B8 802B6758 00000000 */ nop
/* E264BC 802B675C 080ADA00 */ j .L802B6800
D_802B6760_E29190:
/* E264C0 802B6760 00000000 */ nop
.L802B6764:
/* E264C4 802B6764 27A40010 */ addiu $a0, $sp, 0x10
D_802B6768_E29198:
/* E264C8 802B6768 0C0388C1 */ jal player_input_to_move_vector
/* E264CC 802B676C 27A50014 */ addiu $a1, $sp, 0x14
D_802B6770_E27C80:
/* E264D0 802B6770 0C039454 */ jal phys_update_interact_collider
/* E264D4 802B6774 00000000 */ nop
.L802B6778:
/* E264D8 802B6778 0C039858 */ jal check_input_jump
.L802B677C:
/* E264DC 802B677C 00000000 */ nop
D_802B6780:
/* E264E0 802B6780 10400010 */ beqz $v0, .L802B67C4
D_802B6784:
/* E264E4 802B6784 00000000 */ nop
glabel D_802B6788
/* E264E8 802B6788 C7A20014 */ lwc1 $f2, 0x14($sp)
.L802B678C:
/* E264EC 802B678C 44800000 */ mtc1 $zero, $f0
D_802B6790:
/* E264F0 802B6790 00000000 */ nop
D_802B6794:
/* E264F4 802B6794 46001032 */ c.eq.s $f2, $f0
D_802B6798:
/* E264F8 802B6798 00000000 */ nop
D_802B679C:
/* E264FC 802B679C 45000007 */ bc1f .L802B67BC
/* E26500 802B67A0 00000000 */ nop
.L802B67A4:
/* E26504 802B67A4 C6220080 */ lwc1 $f2, 0x80($s1)
/* E26508 802B67A8 C7A00010 */ lwc1 $f0, 0x10($sp)
/* E2650C 802B67AC 46001032 */ c.eq.s $f2, $f0
.L802B67B0:
/* E26510 802B67B0 00000000 */ nop
.L802B67B4:
/* E26514 802B67B4 45010003 */ bc1t .L802B67C4
/* E26518 802B67B8 00000000 */ nop
glabel .L802B67BC
/* E2651C 802B67BC C7A00010 */ lwc1 $f0, 0x10($sp)
.L802B67C0:
/* E26520 802B67C0 E6200080 */ swc1 $f0, 0x80($s1)
.L802B67C4:
/* E26524 802B67C4 C7A00014 */ lwc1 $f0, 0x14($sp)
/* E26528 802B67C8 44801000 */ mtc1 $zero, $f2
/* E2652C 802B67CC 00000000 */ nop
/* E26530 802B67D0 46020032 */ c.eq.s $f0, $f2
/* E26534 802B67D4 00000000 */ nop
.L802B67D8:
/* E26538 802B67D8 45010006 */ bc1t .L802B67F4
/* E2653C 802B67DC 26220054 */ addiu $v0, $s1, 0x54
/* E26540 802B67E0 C620005C */ lwc1 $f0, 0x5C($s1)
.L802B67E4:
/* E26544 802B67E4 46180002 */ mul.s $f0, $f0, $f24
.L802B67E8:
/* E26548 802B67E8 00000000 */ nop
.L802B67EC:
/* E2654C 802B67EC 080ADA04 */ j .L802B6810
/* E26550 802B67F0 E4400000 */ swc1 $f0, 0x0($v0)
.L802B67F4:
/* E26554 802B67F4 46001006 */ mov.s $f0, $f2
glabel .L802B67F8
/* E26558 802B67F8 080ADA04 */ j .L802B6810
/* E2655C 802B67FC E4400000 */ swc1 $f0, 0x0($v0)
.L802B6800:
/* E26560 802B6800 C620005C */ lwc1 $f0, 0x5C($s1)
.L802B6804:
/* E26564 802B6804 46180002 */ mul.s $f0, $f0, $f24
glabel .L802B6808
/* E26568 802B6808 00000000 */ nop
.L802B680C:
/* E2656C 802B680C E6200054 */ swc1 $f0, 0x54($s1)
.L802B6810:
/* E26570 802B6810 822200B6 */ lb $v0, 0xB6($s1)
.L802B6814:
/* E26574 802B6814 14400010 */ bnez $v0, .L802B6858
/* E26578 802B6818 00000000 */ nop
.L802B681C:
/* E2657C 802B681C 92020003 */ lbu $v0, 0x3($s0)
glabel func_802B6820_E256F0
/* E26580 802B6820 2442FFFF */ addiu $v0, $v0, -0x1
.L802B6824:
/* E26584 802B6824 A2020003 */ sb $v0, 0x3($s0)
.L802B6828:
/* E26588 802B6828 00021600 */ sll $v0, $v0, 24
glabel .L802B682C
/* E2658C 802B682C 18400009 */ blez $v0, .L802B6854
/* E26590 802B6830 24020001 */ addiu $v0, $zero, 0x1
/* E26594 802B6834 86220008 */ lh $v0, 0x8($s1)
/* E26598 802B6838 28420002 */ slti $v0, $v0, 0x2
/* E2659C 802B683C 1440004B */ bnez $v0, .L802B696C
/* E265A0 802B6840 00000000 */ nop
/* E265A4 802B6844 C62000A8 */ lwc1 $f0, 0xA8($s1)
/* E265A8 802B6848 C62C00D4 */ lwc1 $f12, 0xD4($s1)
/* E265AC 802B684C 080ADA58 */ j .L802B6960
jtbl_802B6850:
/* E265B0 802B6850 460C0300 */ add.s $f12, $f0, $f12
.L802B6854:
/* E265B4 802B6854 A22200B6 */ sb $v0, 0xB6($s1)
.L802B6858:
/* E265B8 802B6858 822300B6 */ lb $v1, 0xB6($s1)
/* E265BC 802B685C 24020001 */ addiu $v0, $zero, 0x1
/* E265C0 802B6860 14620042 */ bne $v1, $v0, .L802B696C
/* E265C4 802B6864 00000000 */ nop
/* E265C8 802B6868 C62200A8 */ lwc1 $f2, 0xA8($s1)
/* E265CC 802B686C C62000D4 */ lwc1 $f0, 0xD4($s1)
.L802B6870:
/* E265D0 802B6870 82020001 */ lb $v0, 0x1($s0)
/* E265D4 802B6874 46001000 */ add.s $f0, $f2, $f0
/* E265D8 802B6878 E7A20010 */ swc1 $f2, 0x10($sp)
/* E265DC 802B687C 10400008 */ beqz $v0, .L802B68A0
/* E265E0 802B6880 E62000A8 */ swc1 $f0, 0xA8($s1)
/* E265E4 802B6884 3C02FFFD */ lui $v0, (0xFFFDFFFF >> 16)
/* E265E8 802B6888 3442FFFF */ ori $v0, $v0, (0xFFFDFFFF & 0xFFFF)
/* E265EC 802B688C 3C040001 */ lui $a0, (0x10002 >> 16)
/* E265F0 802B6890 34840002 */ ori $a0, $a0, (0x10002 & 0xFFFF)
/* E265F4 802B6894 8E230000 */ lw $v1, 0x0($s1)
/* E265F8 802B6898 080ADA52 */ j .L802B6948
/* E265FC 802B689C 24050002 */ addiu $a1, $zero, 0x2
.L802B68A0:
/* E26600 802B68A0 46001106 */ mov.s $f4, $f2
/* E26604 802B68A4 4600203C */ c.lt.s $f4, $f0
/* E26608 802B68A8 00000000 */ nop
/* E2660C 802B68AC 45000013 */ bc1f .L802B68FC
D_802B68B0:
/* E26610 802B68B0 00000000 */ nop
D_802B68B4:
/* E26614 802B68B4 3C014334 */ lui $at, (0x43340000 >> 16)
.L802B68B8:
/* E26618 802B68B8 44811000 */ mtc1 $at, $f2
D_802B68BC:
/* E2661C 802B68BC 00000000 */ nop
.L802B68C0:
/* E26620 802B68C0 4600103E */ c.le.s $f2, $f0
/* E26624 802B68C4 00000000 */ nop
.L802B68C8:
/* E26628 802B68C8 45000024 */ bc1f .L802B695C
/* E2662C 802B68CC 00000000 */ nop
/* E26630 802B68D0 4602203C */ c.lt.s $f4, $f2
/* E26634 802B68D4 00000000 */ nop
/* E26638 802B68D8 45000020 */ bc1f .L802B695C
/* E2663C 802B68DC 3C02FFFD */ lui $v0, (0xFFFDFFFF >> 16)
/* E26640 802B68E0 3442FFFF */ ori $v0, $v0, (0xFFFDFFFF & 0xFFFF)
/* E26644 802B68E4 3C040001 */ lui $a0, (0x10002 >> 16)
/* E26648 802B68E8 34840002 */ ori $a0, $a0, (0x10002 & 0xFFFF)
.L802B68EC:
/* E2664C 802B68EC 8E230000 */ lw $v1, 0x0($s1)
/* E26650 802B68F0 24050002 */ addiu $a1, $zero, 0x2
.L802B68F4:
/* E26654 802B68F4 080ADA52 */ j .L802B6948
/* E26658 802B68F8 E62200A8 */ swc1 $f2, 0xA8($s1)
.L802B68FC:
/* E2665C 802B68FC 44802000 */ mtc1 $zero, $f4
/* E26660 802B6900 00000000 */ nop
.L802B6904:
/* E26664 802B6904 4604003E */ c.le.s $f0, $f4
.L802B6908:
/* E26668 802B6908 00000000 */ nop
/* E2666C 802B690C 45000013 */ bc1f .L802B695C
WalkPeachAnims:
/* E26670 802B6910 00000000 */ nop
/* E26674 802B6914 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* E26678 802B6918 44810000 */ mtc1 $at, $f0
.L802B691C:
/* E2667C 802B691C 00000000 */ nop
/* E26680 802B6920 4600103C */ c.lt.s $f2, $f0
/* E26684 802B6924 00000000 */ nop
/* E26688 802B6928 4500000C */ bc1f .L802B695C
/* E2668C 802B692C 3C02FFFD */ lui $v0, (0xFFFDFFFF >> 16)
/* E26690 802B6930 3442FFFF */ ori $v0, $v0, (0xFFFDFFFF & 0xFFFF)
.L802B6934:
/* E26694 802B6934 3C040001 */ lui $a0, (0x10002 >> 16)
/* E26698 802B6938 34840002 */ ori $a0, $a0, (0x10002 & 0xFFFF)
/* E2669C 802B693C 8E230000 */ lw $v1, 0x0($s1)
/* E266A0 802B6940 24050002 */ addiu $a1, $zero, 0x2
/* E266A4 802B6944 E62400A8 */ swc1 $f4, 0xA8($s1)
.L802B6948:
/* E266A8 802B6948 A6250008 */ sh $a1, 0x8($s1)
.L802B694C:
/* E266AC 802B694C A22500B6 */ sb $a1, 0xB6($s1)
.L802B6950:
/* E266B0 802B6950 00621824 */ and $v1, $v1, $v0
/* E266B4 802B6954 0C037FBF */ jal suggest_player_anim_allow_backward
/* E266B8 802B6958 AE230000 */ sw $v1, 0x0($s1)
.L802B695C:
/* E266BC 802B695C C62C00A8 */ lwc1 $f12, 0xA8($s1)
.L802B6960:
/* E266C0 802B6960 0C00A6C9 */ jal clamp_angle
/* E266C4 802B6964 00000000 */ nop
glabel .L802B6968
/* E266C8 802B6968 E62000A8 */ swc1 $f0, 0xA8($s1)
.L802B696C:
/* E266CC 802B696C 8FBF0030 */ lw $ra, 0x30($sp)
/* E266D0 802B6970 8FB5002C */ lw $s5, 0x2C($sp)
/* E266D4 802B6974 8FB40028 */ lw $s4, 0x28($sp)
/* E266D8 802B6978 8FB30024 */ lw $s3, 0x24($sp)
/* E266DC 802B697C 8FB20020 */ lw $s2, 0x20($sp)
/* E266E0 802B6980 8FB1001C */ lw $s1, 0x1C($sp)
/* E266E4 802B6984 8FB00018 */ lw $s0, 0x18($sp)
/* E266E8 802B6988 D7B80048 */ ldc1 $f24, 0x48($sp)
/* E266EC 802B698C D7B60040 */ ldc1 $f22, 0x40($sp)
/* E266F0 802B6990 D7B40038 */ ldc1 $f20, 0x38($sp)
/* E266F4 802B6994 03E00008 */ jr $ra
/* E266F8 802B6998 27BD0050 */ addiu $sp, $sp, 0x50
/* E266FC 802B699C 00000000 */ nop
### DECOMPILED C INSTRUCTIONS:
void action_update_spin(void) {
PlayerSpinState* playerSpinState = &gPlayerSpinState;
PlayerStatus* playerStatus = &gPlayerStatus;
f32 angle, magnitude, speedModifier;
s32 spinFlags, nonDizzyFlags;
s32 effectType;
AnimID anim;
s32 firstCall = FALSE;
// initialization
if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
playerStatus->flags &= ~(PS_FLAG_ACTION_STATE_CHANGED | PS_FLAG_ARMS_RAISED);
playerStatus->animFlags &= ~PA_FLAG_INTERRUPT_SPIN;
playerStatus->animFlags |= PA_FLAG_SPINNING;
playerStatus->flags |= PS_FLAG_SPINNING;
playerStatus->currentStateTime = 0;
playerStatus->actionSubstate = SUBSTATE_SPIN_0;
playerSpinState->stopSoundTimer = 0;
playerSpinState->hasBufferedSpin = FALSE;
playerSpinState->spinDirectionMagnitude = 0.0f;
playerSpinState->spinDirection.x = 0.0f;
playerSpinState->spinDirection.y = 0.0f;
playerSpinState->hitWallTime = 0;
playerSpinState->bufferedStickAxis.x = 0;
playerSpinState->bufferedStickAxis.y = 0;
playerSpinState->spinSoundID = 0;
playerStatus->specialDecorationEffect = NULL;
playerSpinState->initialSpinTime = 25;
playerSpinState->fullSpeedSpinTime = 15;
playerSpinState->spinRate = 40.0f;
playerSpinState->speedScale = 2.0f;
playerSpinState->frictionScale = 0.5f;
playerSpinState->spinCountdown = playerSpinState->initialSpinTime;
spinFlags = SPIN_TYPE_DEFAULT;
firstCall = TRUE;
if (is_ability_active(ABILITY_SPIN_ATTACK)) {
spinFlags |= SPIN_TYPE_ATTACK;
}
if (is_ability_active(ABILITY_DIZZY_ATTACK)) {
spinFlags |= SPIN_TYPE_DIZZY;
}
if (is_ability_active(ABILITY_SPEEDY_SPIN)) {
playerSpinState->initialSpinTime = 30;
playerSpinState->spinRate = 40.0f;
playerSpinState->fullSpeedSpinTime = 20;
playerSpinState->spinCountdown = playerSpinState->initialSpinTime;
playerSpinState->speedScale = 2.7f;
playerSpinState->frictionScale = 0.9f;
spinFlags |= SPIN_TYPE_SPEEDY;
}
effectType = -1;
anim = ANIM_Mario1_Spin;
if (spinFlags) {
if (spinFlags & SPIN_TYPE_ATTACK) {
effectType = 2;
anim = ANIM_Mario1_SpinAttack;
} else if (spinFlags & SPIN_TYPE_DIZZY) {
effectType = 4;
anim = ANIM_Mario1_Spin;
} else if (spinFlags & SPIN_TYPE_SPEEDY) {
effectType = 0;
anim = ANIM_Mario1_SpeedySpin;
}
}
playerSpinState->spinSoundID = SOUND_2111;
nonDizzyFlags = spinFlags & ~SPIN_TYPE_DIZZY;
if (nonDizzyFlags == SPIN_TYPE_ATTACK) {
playerSpinState->spinSoundID = SOUND_2113;
}
if (nonDizzyFlags == SPIN_TYPE_SPEEDY) {
playerSpinState->spinSoundID = SOUND_2112;
}
if (nonDizzyFlags == (SPIN_TYPE_ATTACK | SPIN_TYPE_SPEEDY)) {
playerSpinState->spinSoundID = SOUND_2114;
}
sfx_play_sound_at_player(playerSpinState->spinSoundID, SOUND_SPACE_MODE_0);
suggest_player_anim_always_forward(anim);
if ((clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw) <= 180.0f)) {
playerStatus->spinRate = playerSpinState->spinRate;
} else {
effectType++;
playerStatus->spinRate = -playerSpinState->spinRate;
}
if (spinFlags != 0) {
playerStatus->specialDecorationEffect = fx_46(effectType, playerStatus, 1.0f, 1000);
}
phys_clear_spin_history();
player_input_to_move_vector(&angle, &magnitude);
playerStatus->targetYaw = angle;
playerSpinState->inputMagnitude = magnitude;
}
// update saved position and rotation values for motion blur effect
gSpinHistoryPosAngle[gSpinHistoryBufferPos++] = playerStatus->spriteFacingAngle;
if (gSpinHistoryBufferPos > ARRAY_COUNT(gSpinHistoryPosX)) {
gSpinHistoryBufferPos = 0;
}
gSpinHistoryPosX[gSpinHistoryBufferPos] = playerStatus->position.x;
gSpinHistoryPosY[gSpinHistoryBufferPos] = playerStatus->position.y;
gSpinHistoryPosZ[gSpinHistoryBufferPos] = playerStatus->position.z;
gSpinHistoryPosAngle[gSpinHistoryBufferPos] = playerStatus->spriteFacingAngle;
gSpinHistoryBufferPos++;
if (gSpinHistoryBufferPos > ARRAY_COUNT(gSpinHistoryPosX)) {
gSpinHistoryBufferPos = 0;
}
// check for spin cancel
if (!firstCall && (check_input_hammer() || check_input_jump())) {
playerStatus->animFlags &= ~PA_FLAG_SPINNING;
playerStatus->flags &= ~PS_FLAG_SPINNING;
sfx_stop_sound(playerSpinState->spinSoundID);
player_input_to_move_vector(&angle, &magnitude);
playerStatus->targetYaw = angle;
return;
}
// check for buffered next spin
if (playerSpinState->spinCountdown < 11 && playerStatus->pressedButtons & BUTTON_Z) {
playerSpinState->hasBufferedSpin = TRUE;
playerSpinState->prevActionState = playerStatus->prevActionState;
playerSpinState->bufferedStickAxis.x = playerStatus->stickAxis[0];
playerSpinState->bufferedStickAxis.y = playerStatus->stickAxis[1];
}
// check for action finished
if (playerStatus->actionSubstate >= SUBSTATE_SPIN_2) {
playerSpinState->spinDirectionMagnitude -= 1.0f;
if (playerSpinState->spinDirectionMagnitude < 0.0f) {
playerSpinState->spinDirectionMagnitude = 0.0f;
}
angle = clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw);
playerSpinState->spinDirection.x = sin_rad(DEG_TO_RAD(angle)) * playerSpinState->spinDirectionMagnitude;
playerSpinState->spinDirection.y = -cos_rad(DEG_TO_RAD(angle)) * playerSpinState->spinDirectionMagnitude;
playerStatus->currentStateTime--;
if (playerStatus->currentStateTime == 0) {
playerSpinState->stopSoundTimer = 4;
set_action_state(ACTION_STATE_IDLE);
playerStatus->flags &= ~PS_FLAG_SPINNING;
playerStatus->animFlags &= ~PA_FLAG_SPINNING;
sfx_stop_sound(playerSpinState->spinSoundID);
}
playerStatus->currentSpeed = 0.0f;
return;
}
if (playerStatus->actionSubstate == SUBSTATE_SPIN_0) {
if (playerStatus->animFlags & PA_FLAG_INTERRUPT_SPIN) {
playerStatus->actionSubstate = SUBSTATE_SPIN_1;
} else if (gCollisionStatus.pushingAgainstWall > NO_COLLIDER) {
playerSpinState->hitWallTime++;
if (playerSpinState->hitWallTime >= 10) {
playerStatus->actionSubstate = SUBSTATE_SPIN_1;
}
}
}
if (!(playerStatus->currentStateTime > playerSpinState->fullSpeedSpinTime)) {
speedModifier = (playerSpinState->inputMagnitude) ? playerSpinState->speedScale : 0.0f;
playerSpinState->spinDirectionMagnitude = playerSpinState->spinDirectionMagnitude + 0.9;
if (playerSpinState->spinDirectionMagnitude > 9.0f) {
playerSpinState->spinDirectionMagnitude = 9.0f;
}
angle = clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw);
playerSpinState->spinDirection.x = sin_rad(DEG_TO_RAD(angle)) * playerSpinState->spinDirectionMagnitude;
playerSpinState->spinDirection.y = -cos_rad(DEG_TO_RAD(angle)) * playerSpinState->spinDirectionMagnitude;
} else {
speedModifier = playerSpinState->speedScale - (playerStatus->currentStateTime - playerSpinState->fullSpeedSpinTime - 1) * playerSpinState->frictionScale;
if (speedModifier < 0.1) {
speedModifier = 0.1f;
}
if (playerSpinState->inputMagnitude == 0.0f) {
speedModifier = 0.0f;
}
playerSpinState->spinDirectionMagnitude -= 1.0f;
if (playerSpinState->spinDirectionMagnitude < 0.0f) {
playerSpinState->spinDirectionMagnitude = 0.0f;
}
}
playerStatus->currentStateTime++;
switch (playerStatus->prevActionState) {
case ACTION_STATE_IDLE:
player_input_to_move_vector(&angle, &magnitude);
phys_update_interact_collider();
if (check_input_jump()) {
if (magnitude != 0.0f || playerStatus->targetYaw != angle) {
playerStatus->targetYaw = angle;
}
}
playerStatus->currentSpeed = (magnitude != 0.0f) ? playerStatus->runSpeed * speedModifier : 0.0f;
break;
case ACTION_STATE_WALK:
case ACTION_STATE_RUN:
playerStatus->currentSpeed = playerStatus->runSpeed * speedModifier;
break;
}
if (playerStatus->actionSubstate == SUBSTATE_SPIN_0) {
playerSpinState->spinCountdown--;
if (playerSpinState->spinCountdown > 0) {
if (playerStatus->currentStateTime >= 2) {
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle + playerStatus->spinRate);
}
return;
} else {
playerStatus->actionSubstate = SUBSTATE_SPIN_1;
}
}
if (playerStatus->actionSubstate == SUBSTATE_SPIN_1) {
angle = playerStatus->spriteFacingAngle;
playerStatus->spriteFacingAngle = angle + playerStatus->spinRate;
if (playerSpinState->hasBufferedSpin) {
playerStatus->currentStateTime = 2;
playerStatus->actionSubstate = SUBSTATE_SPIN_2;
playerStatus->flags &= ~PS_FLAG_SPINNING;
suggest_player_anim_allow_backward(ANIM_Mario1_Idle);
} else if (angle < playerStatus->spriteFacingAngle) {
if (playerStatus->spriteFacingAngle >= 180.0f && angle < 180.0f) {
playerStatus->spriteFacingAngle = 180.0f;
playerStatus->currentStateTime = 2;
playerStatus->actionSubstate = SUBSTATE_SPIN_2;
playerStatus->flags &= ~PS_FLAG_SPINNING;
suggest_player_anim_allow_backward(ANIM_Mario1_Idle);
}
} else if (playerStatus->spriteFacingAngle <= 0.0f && angle < 90.0f) {
playerStatus->spriteFacingAngle = 0.0f;
playerStatus->currentStateTime = 2;
playerStatus->actionSubstate = SUBSTATE_SPIN_2;
playerStatus->flags &= ~PS_FLAG_SPINNING;
suggest_player_anim_allow_backward(ANIM_Mario1_Idle);
}
playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle);
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel au_pull_voice
/* 33450 80058050 27BDFFA0 */ addiu $sp, $sp, -0x60
/* 33454 80058054 AFB60050 */ sw $s6, 0x50($sp)
/* 33458 80058058 00A0B02D */ daddu $s6, $a1, $zero
/* 3345C 8005805C AFB1003C */ sw $s1, 0x3C($sp)
/* 33460 80058060 02C0882D */ daddu $s1, $s6, $zero
/* 33464 80058064 AFB70054 */ sw $s7, 0x54($sp)
/* 33468 80058068 AFA40060 */ sw $a0, 0x60($sp)
/* 3346C 8005806C 24970048 */ addiu $s7, $a0, 0x48
/* 33470 80058070 24880038 */ addiu $t0, $a0, 0x38
/* 33474 80058074 AFB20040 */ sw $s2, 0x40($sp)
/* 33478 80058078 AFBF005C */ sw $ra, 0x5C($sp)
/* 3347C 8005807C AFBE0058 */ sw $fp, 0x58($sp)
/* 33480 80058080 AFB5004C */ sw $s5, 0x4C($sp)
/* 33484 80058084 AFB40048 */ sw $s4, 0x48($sp)
/* 33488 80058088 AFB30044 */ sw $s3, 0x44($sp)
/* 3348C 8005808C AFB00038 */ sw $s0, 0x38($sp)
/* 33490 80058090 AFA80020 */ sw $t0, 0x20($sp)
/* 33494 80058094 8C830070 */ lw $v1, 0x70($a0)
/* 33498 80058098 24020001 */ addiu $v0, $zero, 0x1
/* 3349C 8005809C 14620293 */ bne $v1, $v0, .L80058AEC
/* 334A0 800580A0 24920004 */ addiu $s2, $a0, 0x4
/* 334A4 800580A4 8FA80060 */ lw $t0, 0x60($sp)
/* 334A8 800580A8 C500003C */ lwc1 $f0, 0x3C($t0)
/* 334AC 800580AC 3C01800A */ lui $at, %hi(D_80098930)
/* 334B0 800580B0 D4228930 */ ldc1 $f2, %lo(D_80098930)($at)
/* 334B4 800580B4 46000021 */ cvt.d.s $f0, $f0
/* 334B8 800580B8 4620103C */ c.lt.d $f2, $f0
/* 334BC 800580BC 00000000 */ nop
/* 334C0 800580C0 45000007 */ bc1f .L800580E0
/* 334C4 800580C4 241E0170 */ addiu $fp, $zero, 0x170
/* 334C8 800580C8 3C013FFF */ lui $at, (0x3FFFFEB0 >> 16)
/* 334CC 800580CC 3421FEB0 */ ori $at, $at, (0x3FFFFEB0 & 0xFFFF)
/* 334D0 800580D0 44810000 */ mtc1 $at, $f0
/* 334D4 800580D4 00000000 */ nop
/* 334D8 800580D8 E500003C */ swc1 $f0, 0x3C($t0)
/* 334DC 800580DC 8FA80060 */ lw $t0, 0x60($sp)
.L800580E0:
/* 334E0 800580E0 3C014700 */ lui $at, (0x47000000 >> 16)
/* 334E4 800580E4 44811000 */ mtc1 $at, $f2
/* 334E8 800580E8 C500003C */ lwc1 $f0, 0x3C($t0)
/* 334EC 800580EC 46020002 */ mul.s $f0, $f0, $f2
/* 334F0 800580F0 00000000 */ nop
/* 334F4 800580F4 4600018D */ trunc.w.s $f6, $f0
/* 334F8 800580F8 44023000 */ mfc1 $v0, $f6
/* 334FC 800580FC 3C013800 */ lui $at, (0x38000000 >> 16)
/* 33500 80058100 44810000 */ mtc1 $at, $f0
/* 33504 80058104 44822000 */ mtc1 $v0, $f4
/* 33508 80058108 00000000 */ nop
/* 3350C 8005810C 46802120 */ cvt.s.w $f4, $f4
/* 33510 80058110 46002102 */ mul.s $f4, $f4, $f0
/* 33514 80058114 00000000 */ nop
/* 33518 80058118 3C014338 */ lui $at, (0x43380000 >> 16)
/* 3351C 8005811C 44810000 */ mtc1 $at, $f0
/* 33520 80058120 00000000 */ nop
/* 33524 80058124 46002002 */ mul.s $f0, $f4, $f0
/* 33528 80058128 00000000 */ nop
/* 3352C 8005812C 8FA80060 */ lw $t0, 0x60($sp)
/* 33530 80058130 C5020040 */ lwc1 $f2, 0x40($t0)
/* 33534 80058134 46001080 */ add.s $f2, $f2, $f0
/* 33538 80058138 4600118D */ trunc.w.s $f6, $f2
/* 3353C 8005813C 44143000 */ mfc1 $s4, $f6
/* 33540 80058140 00000000 */ nop
/* 33544 80058144 44940000 */ mtc1 $s4, $f0
/* 33548 80058148 00000000 */ nop
/* 3354C 8005814C 46800020 */ cvt.s.w $f0, $f0
/* 33550 80058150 46001081 */ sub.s $f2, $f2, $f0
/* 33554 80058154 8FA80060 */ lw $t0, 0x60($sp)
/* 33558 80058158 E504003C */ swc1 $f4, 0x3C($t0)
/* 3355C 8005815C 128001BA */ beqz $s4, .L80058848
/* 33560 80058160 E5020040 */ swc1 $f2, 0x40($t0)
/* 33564 80058164 8E470014 */ lw $a3, 0x14($s2)
/* 33568 80058168 90E20024 */ lbu $v0, 0x24($a3)
/* 3356C 8005816C 144000F2 */ bnez $v0, .L80058538
/* 33570 80058170 3C0300FF */ lui $v1, (0xFFFFFF >> 16)
/* 33574 80058174 3463FFFF */ ori $v1, $v1, (0xFFFFFF & 0xFFFF)
/* 33578 80058178 AFA00024 */ sw $zero, 0x24($sp)
/* 3357C 8005817C 8D02001C */ lw $v0, 0x1C($t0)
/* 33580 80058180 3C041FFF */ lui $a0, (0x1FFFFFFF >> 16)
/* 33584 80058184 00431024 */ and $v0, $v0, $v1
/* 33588 80058188 3C030B00 */ lui $v1, (0xB000000 >> 16)
/* 3358C 8005818C 00431025 */ or $v0, $v0, $v1
/* 33590 80058190 AE220000 */ sw $v0, 0x0($s1)
/* 33594 80058194 8E420014 */ lw $v0, 0x14($s2)
/* 33598 80058198 3484FFFF */ ori $a0, $a0, (0x1FFFFFFF & 0xFFFF)
/* 3359C 8005819C 8C420018 */ lw $v0, 0x18($v0)
/* 335A0 800581A0 8FA50024 */ lw $a1, 0x24($sp)
/* 335A4 800581A4 00441024 */ and $v0, $v0, $a0
/* 335A8 800581A8 AE220004 */ sw $v0, 0x4($s1)
/* 335AC 800581AC 8D040028 */ lw $a0, 0x28($t0)
/* 335B0 800581B0 8D030010 */ lw $v1, 0x10($t0)
/* 335B4 800581B4 02841021 */ addu $v0, $s4, $a0
/* 335B8 800581B8 0062102B */ sltu $v0, $v1, $v0
/* 335BC 800581BC 10400003 */ beqz $v0, .L800581CC
/* 335C0 800581C0 26D60008 */ addiu $s6, $s6, 0x8
/* 335C4 800581C4 8D020014 */ lw $v0, 0x14($t0)
/* 335C8 800581C8 0002282B */ sltu $a1, $zero, $v0
.L800581CC:
/* 335CC 800581CC 10A00002 */ beqz $a1, .L800581D8
/* 335D0 800581D0 0280802D */ daddu $s0, $s4, $zero
/* 335D4 800581D4 00648023 */ subu $s0, $v1, $a0
.L800581D8:
/* 335D8 800581D8 8E430028 */ lw $v1, 0x28($s2)
/* 335DC 800581DC 10600003 */ beqz $v1, .L800581EC
/* 335E0 800581E0 24020010 */ addiu $v0, $zero, 0x10
/* 335E4 800581E4 0801607C */ j .L800581F0
/* 335E8 800581E8 0043A823 */ subu $s5, $v0, $v1
.L800581EC:
/* 335EC 800581EC 0000A82D */ daddu $s5, $zero, $zero
.L800581F0:
/* 335F0 800581F0 02153023 */ subu $a2, $s0, $s5
/* 335F4 800581F4 04C20001 */ bltzl $a2, .L800581FC
/* 335F8 800581F8 0000302D */ daddu $a2, $zero, $zero
.L800581FC:
/* 335FC 800581FC 24C2000F */ addiu $v0, $a2, 0xF
/* 33600 80058200 00028903 */ sra $s1, $v0, 4
/* 33604 80058204 001110C0 */ sll $v0, $s1, 3
/* 33608 80058208 10A00072 */ beqz $a1, .L800583D4
/* 3360C 8005820C 00513821 */ addu $a3, $v0, $s1
/* 33610 80058210 02C0202D */ daddu $a0, $s6, $zero
/* 33614 80058214 001E1400 */ sll $v0, $fp, 16
/* 33618 80058218 00021403 */ sra $v0, $v0, 16
/* 3361C 8005821C AFA20010 */ sw $v0, 0x10($sp)
/* 33620 80058220 AFA00014 */ sw $zero, 0x14($sp)
/* 33624 80058224 8E42002C */ lw $v0, 0x2C($s2)
/* 33628 80058228 0240282D */ daddu $a1, $s2, $zero
/* 3362C 8005822C 0C0162C8 */ jal _decodeChunk
/* 33630 80058230 AFA20018 */ sw $v0, 0x18($sp)
/* 33634 80058234 8E430028 */ lw $v1, 0x28($s2)
/* 33638 80058238 10600005 */ beqz $v1, .L80058250
/* 3363C 8005823C 0040B02D */ daddu $s6, $v0, $zero
/* 33640 80058240 9642002A */ lhu $v0, 0x2A($s2)
/* 33644 80058244 00021040 */ sll $v0, $v0, 1
/* 33648 80058248 08016095 */ j .L80058254
/* 3364C 8005824C 03C2F021 */ addu $fp, $fp, $v0
.L80058250:
/* 33650 80058250 27DE0020 */ addiu $fp, $fp, 0x20
.L80058254:
/* 33654 80058254 001E2C00 */ sll $a1, $fp, 16
/* 33658 80058258 8E420008 */ lw $v0, 0x8($s2)
/* 3365C 8005825C 00059C03 */ sra $s3, $a1, 16
/* 33660 80058260 3042000F */ andi $v0, $v0, 0xF
/* 33664 80058264 AE420028 */ sw $v0, 0x28($s2)
/* 33668 80058268 8E420014 */ lw $v0, 0x14($s2)
/* 3366C 8005826C 8E430008 */ lw $v1, 0x8($s2)
/* 33670 80058270 8C440000 */ lw $a0, 0x0($v0)
/* 33674 80058274 0060102D */ daddu $v0, $v1, $zero
/* 33678 80058278 00031902 */ srl $v1, $v1, 4
/* 3367C 8005827C 24630001 */ addiu $v1, $v1, 0x1
/* 33680 80058280 AE420024 */ sw $v0, 0x24($s2)
/* 33684 80058284 000310C0 */ sll $v0, $v1, 3
/* 33688 80058288 00431021 */ addu $v0, $v0, $v1
/* 3368C 8005828C 00822021 */ addu $a0, $a0, $v0
/* 33690 80058290 0214102A */ slt $v0, $s0, $s4
/* 33694 80058294 10400042 */ beqz $v0, .L800583A0
/* 33698 80058298 AE440030 */ sw $a0, 0x30($s2)
/* 3369C 8005829C 0000402D */ daddu $t0, $zero, $zero
/* 336A0 800582A0 00081400 */ sll $v0, $t0, 16
/* 336A4 800582A4 00021403 */ sra $v0, $v0, 16
/* 336A8 800582A8 AFA2002C */ sw $v0, 0x2C($sp)
.L800582AC:
/* 336AC 800582AC 26220001 */ addiu $v0, $s1, 0x1
/* 336B0 800582B0 00021140 */ sll $v0, $v0, 5
/* 336B4 800582B4 02621021 */ addu $v0, $s3, $v0
/* 336B8 800582B8 00101840 */ sll $v1, $s0, 1
/* 336BC 800582BC 02639821 */ addu $s3, $s3, $v1
/* 336C0 800582C0 24420010 */ addiu $v0, $v0, 0x10
/* 336C4 800582C4 2403FFE0 */ addiu $v1, $zero, -0x20
/* 336C8 800582C8 0043A824 */ and $s5, $v0, $v1
/* 336CC 800582CC 8E430010 */ lw $v1, 0x10($s2)
/* 336D0 800582D0 2402FFFF */ addiu $v0, $zero, -0x1
/* 336D4 800582D4 10620004 */ beq $v1, $v0, .L800582E8
/* 336D8 800582D8 0290A023 */ subu $s4, $s4, $s0
/* 336DC 800582DC 10600002 */ beqz $v1, .L800582E8
/* 336E0 800582E0 00621021 */ addu $v0, $v1, $v0
/* 336E4 800582E4 AE420010 */ sw $v0, 0x10($s2)
.L800582E8:
/* 336E8 800582E8 8E43000C */ lw $v1, 0xC($s2)
/* 336EC 800582EC 8E420008 */ lw $v0, 0x8($s2)
/* 336F0 800582F0 00621823 */ subu $v1, $v1, $v0
/* 336F4 800582F4 0283102B */ sltu $v0, $s4, $v1
/* 336F8 800582F8 14400002 */ bnez $v0, .L80058304
/* 336FC 800582FC 0280802D */ daddu $s0, $s4, $zero
/* 33700 80058300 0060802D */ daddu $s0, $v1, $zero
.L80058304:
/* 33704 80058304 8E420028 */ lw $v0, 0x28($s2)
/* 33708 80058308 2442FFF0 */ addiu $v0, $v0, -0x10
/* 3370C 8005830C 02023021 */ addu $a2, $s0, $v0
/* 33710 80058310 04C20001 */ bltzl $a2, .L80058318
/* 33714 80058314 0000302D */ daddu $a2, $zero, $zero
.L80058318:
/* 33718 80058318 24C2000F */ addiu $v0, $a2, 0xF
/* 3371C 8005831C 00028903 */ sra $s1, $v0, 4
/* 33720 80058320 02C0202D */ daddu $a0, $s6, $zero
/* 33724 80058324 0240282D */ daddu $a1, $s2, $zero
/* 33728 80058328 00151400 */ sll $v0, $s5, 16
/* 3372C 8005832C 00021403 */ sra $v0, $v0, 16
/* 33730 80058330 8FA8002C */ lw $t0, 0x2C($sp)
/* 33734 80058334 001138C0 */ sll $a3, $s1, 3
/* 33738 80058338 AFA20010 */ sw $v0, 0x10($sp)
/* 3373C 8005833C AFA80014 */ sw $t0, 0x14($sp)
/* 33740 80058340 8E42002C */ lw $v0, 0x2C($s2)
/* 33744 80058344 00F13821 */ addu $a3, $a3, $s1
/* 33748 80058348 34420002 */ ori $v0, $v0, 0x2
/* 3374C 8005834C 0C0162C8 */ jal _decodeChunk
/* 33750 80058350 AFA20018 */ sw $v0, 0x18($sp)
/* 33754 80058354 0040B02D */ daddu $s6, $v0, $zero
/* 33758 80058358 02C0282D */ daddu $a1, $s6, $zero
/* 3375C 8005835C 3C0600FF */ lui $a2, (0xFFFFFF >> 16)
/* 33760 80058360 34C6FFFF */ ori $a2, $a2, (0xFFFFFF & 0xFFFF)
/* 33764 80058364 00132400 */ sll $a0, $s3, 16
/* 33768 80058368 00101840 */ sll $v1, $s0, 1
/* 3376C 8005836C 3063FFFF */ andi $v1, $v1, 0xFFFF
/* 33770 80058370 00832025 */ or $a0, $a0, $v1
/* 33774 80058374 8E420028 */ lw $v0, 0x28($s2)
/* 33778 80058378 3C030A00 */ lui $v1, (0xA000000 >> 16)
/* 3377C 8005837C ACA40004 */ sw $a0, 0x4($a1)
/* 33780 80058380 00021040 */ sll $v0, $v0, 1
/* 33784 80058384 02A21021 */ addu $v0, $s5, $v0
/* 33788 80058388 00461024 */ and $v0, $v0, $a2
/* 3378C 8005838C 00431025 */ or $v0, $v0, $v1
/* 33790 80058390 ACA20000 */ sw $v0, 0x0($a1)
/* 33794 80058394 0214102A */ slt $v0, $s0, $s4
/* 33798 80058398 1440FFC4 */ bnez $v0, .L800582AC
/* 3379C 8005839C 26D60008 */ addiu $s6, $s6, 0x8
.L800583A0:
/* 337A0 800583A0 8E420028 */ lw $v0, 0x28($s2)
/* 337A4 800583A4 8E430024 */ lw $v1, 0x24($s2)
/* 337A8 800583A8 02821021 */ addu $v0, $s4, $v0
/* 337AC 800583AC 3042000F */ andi $v0, $v0, 0xF
/* 337B0 800583B0 00741821 */ addu $v1, $v1, $s4
/* 337B4 800583B4 AE420028 */ sw $v0, 0x28($s2)
/* 337B8 800583B8 001110C0 */ sll $v0, $s1, 3
/* 337BC 800583BC AE430024 */ sw $v1, 0x24($s2)
/* 337C0 800583C0 8E430030 */ lw $v1, 0x30($s2)
/* 337C4 800583C4 00511021 */ addu $v0, $v0, $s1
/* 337C8 800583C8 00621821 */ addu $v1, $v1, $v0
/* 337CC 800583CC 08016212 */ j .L80058848
/* 337D0 800583D0 AE430030 */ sw $v1, 0x30($s2)
.L800583D4:
/* 337D4 800583D4 8E440014 */ lw $a0, 0x14($s2)
/* 337D8 800583D8 8E430030 */ lw $v1, 0x30($s2)
/* 337DC 800583DC 8C820000 */ lw $v0, 0x0($a0)
/* 337E0 800583E0 8C840004 */ lw $a0, 0x4($a0)
/* 337E4 800583E4 00671821 */ addu $v1, $v1, $a3
/* 337E8 800583E8 00441021 */ addu $v0, $v0, $a0
/* 337EC 800583EC 00622023 */ subu $a0, $v1, $v0
/* 337F0 800583F0 1C800003 */ bgtz $a0, .L80058400
/* 337F4 800583F4 00118100 */ sll $s0, $s1, 4
/* 337F8 800583F8 08016101 */ j .L80058404
/* 337FC 800583FC 0000202D */ daddu $a0, $zero, $zero
.L80058400:
/* 33800 80058400 AEE00028 */ sw $zero, 0x28($s7)
.L80058404:
/* 33804 80058404 3C0238E3 */ lui $v0, (0x38E38E39 >> 16)
/* 33808 80058408 34428E39 */ ori $v0, $v0, (0x38E38E39 & 0xFFFF)
/* 3380C 8005840C 00820018 */ mult $a0, $v0
/* 33810 80058410 00041FC3 */ sra $v1, $a0, 31
/* 33814 80058414 00004010 */ mfhi $t0
/* 33818 80058418 00081043 */ sra $v0, $t0, 1
/* 3381C 8005841C 00431023 */ subu $v0, $v0, $v1
/* 33820 80058420 00029900 */ sll $s3, $v0, 4
/* 33824 80058424 02151821 */ addu $v1, $s0, $s5
/* 33828 80058428 0073102A */ slt $v0, $v1, $s3
/* 3382C 8005842C 54400001 */ bnel $v0, $zero, .L80058434
/* 33830 80058430 0060982D */ daddu $s3, $v1, $zero
.L80058434:
/* 33834 80058434 3262000F */ andi $v0, $s3, 0xF
/* 33838 80058438 02621023 */ subu $v0, $s3, $v0
/* 3383C 8005843C 0054102A */ slt $v0, $v0, $s4
/* 33840 80058440 10400020 */ beqz $v0, .L800584C4
/* 33844 80058444 00E43823 */ subu $a3, $a3, $a0
/* 33848 80058448 24080001 */ addiu $t0, $zero, 0x1
/* 3384C 8005844C 02C0202D */ daddu $a0, $s6, $zero
/* 33850 80058450 0240282D */ daddu $a1, $s2, $zero
/* 33854 80058454 001E1400 */ sll $v0, $fp, 16
/* 33858 80058458 00021403 */ sra $v0, $v0, 16
/* 3385C 8005845C AFA80024 */ sw $t0, 0x24($sp)
/* 33860 80058460 AFA20010 */ sw $v0, 0x10($sp)
/* 33864 80058464 AFA00014 */ sw $zero, 0x14($sp)
/* 33868 80058468 8E42002C */ lw $v0, 0x2C($s2)
/* 3386C 8005846C 02133023 */ subu $a2, $s0, $s3
/* 33870 80058470 0C0162C8 */ jal _decodeChunk
/* 33874 80058474 AFA20018 */ sw $v0, 0x18($sp)
/* 33878 80058478 8E430028 */ lw $v1, 0x28($s2)
/* 3387C 8005847C 10600005 */ beqz $v1, .L80058494
/* 33880 80058480 0040B02D */ daddu $s6, $v0, $zero
/* 33884 80058484 9642002A */ lhu $v0, 0x2A($s2)
/* 33888 80058488 00021040 */ sll $v0, $v0, 1
/* 3388C 8005848C 08016126 */ j .L80058498
/* 33890 80058490 03C2F021 */ addu $fp, $fp, $v0
.L80058494:
/* 33894 80058494 27DE0020 */ addiu $fp, $fp, 0x20
.L80058498:
/* 33898 80058498 8E420028 */ lw $v0, 0x28($s2)
/* 3389C 8005849C 8E430024 */ lw $v1, 0x24($s2)
/* 338A0 800584A0 02821021 */ addu $v0, $s4, $v0
/* 338A4 800584A4 3042000F */ andi $v0, $v0, 0xF
/* 338A8 800584A8 00741821 */ addu $v1, $v1, $s4
/* 338AC 800584AC AE420028 */ sw $v0, 0x28($s2)
/* 338B0 800584B0 001110C0 */ sll $v0, $s1, 3
/* 338B4 800584B4 AE430024 */ sw $v1, 0x24($s2)
/* 338B8 800584B8 8E430030 */ lw $v1, 0x30($s2)
/* 338BC 800584BC 08016135 */ j .L800584D4
/* 338C0 800584C0 00511021 */ addu $v0, $v0, $s1
.L800584C4:
/* 338C4 800584C4 001110C0 */ sll $v0, $s1, 3
/* 338C8 800584C8 8E430030 */ lw $v1, 0x30($s2)
/* 338CC 800584CC 00511021 */ addu $v0, $v0, $s1
/* 338D0 800584D0 AE400028 */ sw $zero, 0x28($s2)
.L800584D4:
/* 338D4 800584D4 00621821 */ addu $v1, $v1, $v0
/* 338D8 800584D8 126000DB */ beqz $s3, .L80058848
/* 338DC 800584DC AE430030 */ sw $v1, 0x30($s2)
/* 338E0 800584E0 AE400028 */ sw $zero, 0x28($s2)
/* 338E4 800584E4 8FA80024 */ lw $t0, 0x24($sp)
/* 338E8 800584E8 11000004 */ beqz $t0, .L800584FC
/* 338EC 800584EC 02B01021 */ addu $v0, $s5, $s0
/* 338F0 800584F0 00531023 */ subu $v0, $v0, $s3
/* 338F4 800584F4 08016140 */ j .L80058500
/* 338F8 800584F8 00022840 */ sll $a1, $v0, 1
.L800584FC:
/* 338FC 800584FC 0000282D */ daddu $a1, $zero, $zero
.L80058500:
/* 33900 80058500 02C0202D */ daddu $a0, $s6, $zero
/* 33904 80058504 26D60008 */ addiu $s6, $s6, 0x8
/* 33908 80058508 3C0300FF */ lui $v1, (0xFFFFFF >> 16)
/* 3390C 8005850C 3463FFFF */ ori $v1, $v1, (0xFFFFFF & 0xFFFF)
/* 33910 80058510 001E1400 */ sll $v0, $fp, 16
/* 33914 80058514 00021403 */ sra $v0, $v0, 16
/* 33918 80058518 00A21021 */ addu $v0, $a1, $v0
/* 3391C 8005851C 00431024 */ and $v0, $v0, $v1
/* 33920 80058520 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 33924 80058524 00431025 */ or $v0, $v0, $v1
/* 33928 80058528 AC820000 */ sw $v0, 0x0($a0)
/* 3392C 8005852C 00131040 */ sll $v0, $s3, 1
/* 33930 80058530 08016212 */ j .L80058848
/* 33934 80058534 AC820004 */ sw $v0, 0x4($a0)
.L80058538:
/* 33938 80058538 8FA80060 */ lw $t0, 0x60($sp)
/* 3393C 8005853C 8D040028 */ lw $a0, 0x28($t0)
/* 33940 80058540 8D030010 */ lw $v1, 0x10($t0)
/* 33944 80058544 02841021 */ addu $v0, $s4, $a0
/* 33948 80058548 0062102B */ sltu $v0, $v1, $v0
/* 3394C 8005854C 10400079 */ beqz $v0, .L80058734
/* 33950 80058550 00148040 */ sll $s0, $s4, 1
/* 33954 80058554 8D020014 */ lw $v0, 0x14($t0)
/* 33958 80058558 10400076 */ beqz $v0, .L80058734
/* 3395C 8005855C 00649823 */ subu $s3, $v1, $a0
/* 33960 80058560 1A600017 */ blez $s3, .L800585C0
/* 33964 80058564 00138040 */ sll $s0, $s3, 1
/* 33968 80058568 0200282D */ daddu $a1, $s0, $zero
/* 3396C 8005856C 8D040034 */ lw $a0, 0x34($t0)
/* 33970 80058570 8D060024 */ lw $a2, 0x24($t0)
/* 33974 80058574 90E70025 */ lbu $a3, 0x25($a3)
/* 33978 80058578 8D020020 */ lw $v0, 0x20($t0)
/* 3397C 8005857C 0040F809 */ jalr $v0
/* 33980 80058580 26D60008 */ addiu $s6, $s6, 0x8
/* 33984 80058584 0040382D */ daddu $a3, $v0, $zero
/* 33988 80058588 30E60007 */ andi $a2, $a3, 0x7
/* 3398C 8005858C 02068021 */ addu $s0, $s0, $a2
/* 33990 80058590 3C030400 */ lui $v1, (0x4000170 >> 16)
/* 33994 80058594 34630170 */ ori $v1, $v1, (0x4000170 & 0xFFFF)
/* 33998 80058598 32020007 */ andi $v0, $s0, 0x7
/* 3399C 8005859C 2442FFF8 */ addiu $v0, $v0, -0x8
/* 339A0 800585A0 02021023 */ subu $v0, $s0, $v0
/* 339A4 800585A4 30420FFF */ andi $v0, $v0, 0xFFF
/* 339A8 800585A8 00021300 */ sll $v0, $v0, 12
/* 339AC 800585AC 00431025 */ or $v0, $v0, $v1
/* 339B0 800585B0 AE220000 */ sw $v0, 0x0($s1)
/* 339B4 800585B4 00E61023 */ subu $v0, $a3, $a2
/* 339B8 800585B8 08016171 */ j .L800585C4
/* 339BC 800585BC AE220004 */ sw $v0, 0x4($s1)
.L800585C0:
/* 339C0 800585C0 0000302D */ daddu $a2, $zero, $zero
.L800585C4:
/* 339C4 800585C4 03C61021 */ addu $v0, $fp, $a2
/* 339C8 800585C8 0040F02D */ daddu $fp, $v0, $zero
/* 339CC 800585CC 00021400 */ sll $v0, $v0, 16
/* 339D0 800585D0 0002AC03 */ sra $s5, $v0, 16
/* 339D4 800585D4 0274102A */ slt $v0, $s3, $s4
/* 339D8 800585D8 8E430008 */ lw $v1, 0x8($s2)
/* 339DC 800585DC 8E440014 */ lw $a0, 0x14($s2)
/* 339E0 800585E0 0060282D */ daddu $a1, $v1, $zero
/* 339E4 800585E4 8C840000 */ lw $a0, 0x0($a0)
/* 339E8 800585E8 00031840 */ sll $v1, $v1, 1
/* 339EC 800585EC AE450024 */ sw $a1, 0x24($s2)
/* 339F0 800585F0 00832021 */ addu $a0, $a0, $v1
/* 339F4 800585F4 10400047 */ beqz $v0, .L80058714
/* 339F8 800585F8 AE440030 */ sw $a0, 0x30($s2)
/* 339FC 800585FC 26D1FFFC */ addiu $s1, $s6, -0x4
/* 33A00 80058600 00131040 */ sll $v0, $s3, 1
.L80058604:
/* 33A04 80058604 02A2A821 */ addu $s5, $s5, $v0
/* 33A08 80058608 8E430010 */ lw $v1, 0x10($s2)
/* 33A0C 8005860C 2402FFFF */ addiu $v0, $zero, -0x1
/* 33A10 80058610 10620004 */ beq $v1, $v0, .L80058624
/* 33A14 80058614 0293A023 */ subu $s4, $s4, $s3
/* 33A18 80058618 10600002 */ beqz $v1, .L80058624
/* 33A1C 8005861C 00621021 */ addu $v0, $v1, $v0
/* 33A20 80058620 AE420010 */ sw $v0, 0x10($s2)
.L80058624:
/* 33A24 80058624 8E43000C */ lw $v1, 0xC($s2)
/* 33A28 80058628 8E420008 */ lw $v0, 0x8($s2)
/* 33A2C 8005862C 00621823 */ subu $v1, $v1, $v0
/* 33A30 80058630 0283102B */ sltu $v0, $s4, $v1
/* 33A34 80058634 14400002 */ bnez $v0, .L80058640
/* 33A38 80058638 0280982D */ daddu $s3, $s4, $zero
/* 33A3C 8005863C 0060982D */ daddu $s3, $v1, $zero
.L80058640:
/* 33A40 80058640 00138040 */ sll $s0, $s3, 1
/* 33A44 80058644 8E440030 */ lw $a0, 0x30($s2)
/* 33A48 80058648 8E420014 */ lw $v0, 0x14($s2)
/* 33A4C 8005864C 8E460020 */ lw $a2, 0x20($s2)
/* 33A50 80058650 90470025 */ lbu $a3, 0x25($v0)
/* 33A54 80058654 8E42001C */ lw $v0, 0x1C($s2)
/* 33A58 80058658 0040F809 */ jalr $v0
/* 33A5C 8005865C 0200282D */ daddu $a1, $s0, $zero
/* 33A60 80058660 0040382D */ daddu $a3, $v0, $zero
/* 33A64 80058664 30E60007 */ andi $a2, $a3, 0x7
/* 33A68 80058668 32A30007 */ andi $v1, $s5, 0x7
/* 33A6C 8005866C 10600004 */ beqz $v1, .L80058680
/* 33A70 80058670 02068021 */ addu $s0, $s0, $a2
/* 33A74 80058674 24020008 */ addiu $v0, $zero, 0x8
/* 33A78 80058678 080161A1 */ j .L80058684
/* 33A7C 8005867C 00432823 */ subu $a1, $v0, $v1
.L80058680:
/* 33A80 80058680 0000282D */ daddu $a1, $zero, $zero
.L80058684:
/* 33A84 80058684 26310008 */ addiu $s1, $s1, 0x8
/* 33A88 80058688 26D60008 */ addiu $s6, $s6, 0x8
/* 33A8C 8005868C 32020007 */ andi $v0, $s0, 0x7
/* 33A90 80058690 2442FFF8 */ addiu $v0, $v0, -0x8
/* 33A94 80058694 02021023 */ subu $v0, $s0, $v0
/* 33A98 80058698 30420FFF */ andi $v0, $v0, 0xFFF
/* 33A9C 8005869C 00021300 */ sll $v0, $v0, 12
/* 33AA0 800586A0 02A51821 */ addu $v1, $s5, $a1
/* 33AA4 800586A4 30630FFF */ andi $v1, $v1, 0xFFF
/* 33AA8 800586A8 3C040400 */ lui $a0, (0x4000000 >> 16)
/* 33AAC 800586AC 00641825 */ or $v1, $v1, $a0
/* 33AB0 800586B0 00431025 */ or $v0, $v0, $v1
/* 33AB4 800586B4 AE22FFFC */ sw $v0, -0x4($s1)
/* 33AB8 800586B8 00E61023 */ subu $v0, $a3, $a2
/* 33ABC 800586BC 14C00003 */ bnez $a2, .L800586CC
/* 33AC0 800586C0 AE220000 */ sw $v0, 0x0($s1)
/* 33AC4 800586C4 10A00011 */ beqz $a1, .L8005870C
/* 33AC8 800586C8 0274102A */ slt $v0, $s3, $s4
.L800586CC:
/* 33ACC 800586CC 26310008 */ addiu $s1, $s1, 0x8
/* 33AD0 800586D0 26D60008 */ addiu $s6, $s6, 0x8
/* 33AD4 800586D4 3C0300FF */ lui $v1, (0xFFFFFF >> 16)
/* 33AD8 800586D8 3463FFFF */ ori $v1, $v1, (0xFFFFFF & 0xFFFF)
/* 33ADC 800586DC 02A61021 */ addu $v0, $s5, $a2
/* 33AE0 800586E0 00451021 */ addu $v0, $v0, $a1
/* 33AE4 800586E4 00431024 */ and $v0, $v0, $v1
/* 33AE8 800586E8 3C030A00 */ lui $v1, (0xA000000 >> 16)
/* 33AEC 800586EC 00431025 */ or $v0, $v0, $v1
/* 33AF0 800586F0 00151C00 */ sll $v1, $s5, 16
/* 33AF4 800586F4 AE22FFFC */ sw $v0, -0x4($s1)
/* 33AF8 800586F8 00131040 */ sll $v0, $s3, 1
/* 33AFC 800586FC 3042FFFF */ andi $v0, $v0, 0xFFFF
/* 33B00 80058700 00621825 */ or $v1, $v1, $v0
/* 33B04 80058704 AE230000 */ sw $v1, 0x0($s1)
/* 33B08 80058708 0274102A */ slt $v0, $s3, $s4
.L8005870C:
/* 33B0C 8005870C 1440FFBD */ bnez $v0, .L80058604
/* 33B10 80058710 00131040 */ sll $v0, $s3, 1
.L80058714:
/* 33B14 80058714 8E420024 */ lw $v0, 0x24($s2)
/* 33B18 80058718 00541021 */ addu $v0, $v0, $s4
/* 33B1C 8005871C AE420024 */ sw $v0, 0x24($s2)
/* 33B20 80058720 8E420030 */ lw $v0, 0x30($s2)
/* 33B24 80058724 00141840 */ sll $v1, $s4, 1
/* 33B28 80058728 00431021 */ addu $v0, $v0, $v1
/* 33B2C 8005872C 08016212 */ j .L80058848
/* 33B30 80058730 AE420030 */ sw $v0, 0x30($s2)
.L80058734:
/* 33B34 80058734 8E440014 */ lw $a0, 0x14($s2)
/* 33B38 80058738 8E430030 */ lw $v1, 0x30($s2)
/* 33B3C 8005873C 8C820000 */ lw $v0, 0x0($a0)
/* 33B40 80058740 8C840004 */ lw $a0, 0x4($a0)
/* 33B44 80058744 00701821 */ addu $v1, $v1, $s0
/* 33B48 80058748 00441021 */ addu $v0, $v0, $a0
/* 33B4C 8005874C 00628823 */ subu $s1, $v1, $v0
/* 33B50 80058750 5E200002 */ bgtzl $s1, .L8005875C
/* 33B54 80058754 AEE00028 */ sw $zero, 0x28($s7)
/* 33B58 80058758 0000882D */ daddu $s1, $zero, $zero
.L8005875C:
/* 33B5C 8005875C 0211102A */ slt $v0, $s0, $s1
/* 33B60 80058760 54400001 */ bnel $v0, $zero, .L80058768
/* 33B64 80058764 0200882D */ daddu $s1, $s0, $zero
.L80058768:
/* 33B68 80058768 0230102A */ slt $v0, $s1, $s0
/* 33B6C 8005876C 10400021 */ beqz $v0, .L800587F4
/* 33B70 80058770 00000000 */ nop
/* 33B74 80058774 1A80001A */ blez $s4, .L800587E0
/* 33B78 80058778 02118023 */ subu $s0, $s0, $s1
/* 33B7C 8005877C 8E440030 */ lw $a0, 0x30($s2)
/* 33B80 80058780 8E420014 */ lw $v0, 0x14($s2)
/* 33B84 80058784 8E460020 */ lw $a2, 0x20($s2)
/* 33B88 80058788 90470025 */ lbu $a3, 0x25($v0)
/* 33B8C 8005878C 8E42001C */ lw $v0, 0x1C($s2)
/* 33B90 80058790 0040F809 */ jalr $v0
/* 33B94 80058794 0200282D */ daddu $a1, $s0, $zero
/* 33B98 80058798 0040382D */ daddu $a3, $v0, $zero
/* 33B9C 8005879C 30E60007 */ andi $a2, $a3, 0x7
/* 33BA0 800587A0 02068021 */ addu $s0, $s0, $a2
/* 33BA4 800587A4 02C0282D */ daddu $a1, $s6, $zero
/* 33BA8 800587A8 26D60008 */ addiu $s6, $s6, 0x8
/* 33BAC 800587AC 32020007 */ andi $v0, $s0, 0x7
/* 33BB0 800587B0 2442FFF8 */ addiu $v0, $v0, -0x8
/* 33BB4 800587B4 02021023 */ subu $v0, $s0, $v0
/* 33BB8 800587B8 30420FFF */ andi $v0, $v0, 0xFFF
/* 33BBC 800587BC 00021300 */ sll $v0, $v0, 12
/* 33BC0 800587C0 33C30FFF */ andi $v1, $fp, 0xFFF
/* 33BC4 800587C4 3C040400 */ lui $a0, (0x4000000 >> 16)
/* 33BC8 800587C8 00641825 */ or $v1, $v1, $a0
/* 33BCC 800587CC 00431025 */ or $v0, $v0, $v1
/* 33BD0 800587D0 ACA20000 */ sw $v0, 0x0($a1)
/* 33BD4 800587D4 00E61023 */ subu $v0, $a3, $a2
/* 33BD8 800587D8 080161F9 */ j .L800587E4
/* 33BDC 800587DC ACA20004 */ sw $v0, 0x4($a1)
.L800587E0:
/* 33BE0 800587E0 0000302D */ daddu $a2, $zero, $zero
.L800587E4:
/* 33BE4 800587E4 8E420024 */ lw $v0, 0x24($s2)
/* 33BE8 800587E8 03C6F021 */ addu $fp, $fp, $a2
/* 33BEC 800587EC 00541021 */ addu $v0, $v0, $s4
/* 33BF0 800587F0 AE420024 */ sw $v0, 0x24($s2)
.L800587F4:
/* 33BF4 800587F4 8E420030 */ lw $v0, 0x30($s2)
/* 33BF8 800587F8 00141840 */ sll $v1, $s4, 1
/* 33BFC 800587FC 00431021 */ addu $v0, $v0, $v1
/* 33C00 80058800 12200011 */ beqz $s1, .L80058848
/* 33C04 80058804 AE420030 */ sw $v0, 0x30($s2)
/* 33C08 80058808 00141040 */ sll $v0, $s4, 1
/* 33C0C 8005880C 00512823 */ subu $a1, $v0, $s1
/* 33C10 80058810 04A20001 */ bltzl $a1, .L80058818
/* 33C14 80058814 0000282D */ daddu $a1, $zero, $zero
.L80058818:
/* 33C18 80058818 02C0202D */ daddu $a0, $s6, $zero
/* 33C1C 8005881C 26D60008 */ addiu $s6, $s6, 0x8
/* 33C20 80058820 3C0300FF */ lui $v1, (0xFFFFFF >> 16)
/* 33C24 80058824 3463FFFF */ ori $v1, $v1, (0xFFFFFF & 0xFFFF)
/* 33C28 80058828 001E1400 */ sll $v0, $fp, 16
/* 33C2C 8005882C 00021403 */ sra $v0, $v0, 16
/* 33C30 80058830 00A21021 */ addu $v0, $a1, $v0
/* 33C34 80058834 00431024 */ and $v0, $v0, $v1
/* 33C38 80058838 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 33C3C 8005883C 00431025 */ or $v0, $v0, $v1
/* 33C40 80058840 AC820000 */ sw $v0, 0x0($a0)
/* 33C44 80058844 AC910004 */ sw $s1, 0x4($a0)
.L80058848:
/* 33C48 80058848 8FA80020 */ lw $t0, 0x20($sp)
/* 33C4C 8005884C 3C014700 */ lui $at, (0x47000000 >> 16)
/* 33C50 80058850 44811000 */ mtc1 $at, $f2
/* 33C54 80058854 C5000004 */ lwc1 $f0, 0x4($t0)
/* 33C58 80058858 46020002 */ mul.s $f0, $f0, $f2
/* 33C5C 8005885C 00000000 */ nop
/* 33C60 80058860 8D040000 */ lw $a0, 0x0($t0)
/* 33C64 80058864 4600018D */ trunc.w.s $f6, $f0
/* 33C68 80058868 44103000 */ mfc1 $s0, $f6
/* 33C6C 8005886C 0C0187A4 */ jal osVirtualToPhysical
/* 33C70 80058870 3210FFFF */ andi $s0, $s0, 0xFFFF
/* 33C74 80058874 3C0300FF */ lui $v1, (0xFFFFFF >> 16)
/* 33C78 80058878 3463FFFF */ ori $v1, $v1, (0xFFFFFF & 0xFFFF)
/* 33C7C 8005887C 02C0202D */ daddu $a0, $s6, $zero
/* 33C80 80058880 00431024 */ and $v0, $v0, $v1
/* 33C84 80058884 3C030500 */ lui $v1, (0x5000000 >> 16)
/* 33C88 80058888 00431025 */ or $v0, $v0, $v1
/* 33C8C 8005888C 00108380 */ sll $s0, $s0, 14
/* 33C90 80058890 AC820000 */ sw $v0, 0x0($a0)
/* 33C94 80058894 8FA80020 */ lw $t0, 0x20($sp)
/* 33C98 80058898 33C20FFF */ andi $v0, $fp, 0xFFF
/* 33C9C 8005889C 8D03000C */ lw $v1, 0xC($t0)
/* 33CA0 800588A0 00021080 */ sll $v0, $v0, 2
/* 33CA4 800588A4 00031F80 */ sll $v1, $v1, 30
/* 33CA8 800588A8 00701825 */ or $v1, $v1, $s0
/* 33CAC 800588AC 00621825 */ or $v1, $v1, $v0
/* 33CB0 800588B0 AC830004 */ sw $v1, 0x4($a0)
/* 33CB4 800588B4 AD00000C */ sw $zero, 0xC($t0)
/* 33CB8 800588B8 8EE20024 */ lw $v0, 0x24($s7)
/* 33CBC 800588BC 10400069 */ beqz $v0, .L80058A64
/* 33CC0 800588C0 26D60008 */ addiu $s6, $s6, 0x8
/* 33CC4 800588C4 3C028008 */ lui $v0, %hi(AuSynUseStereo)
/* 33CC8 800588C8 24428181 */ addiu $v0, $v0, %lo(AuSynUseStereo)
/* 33CCC 800588CC 90420000 */ lbu $v0, 0x0($v0)
/* 33CD0 800588D0 1440000C */ bnez $v0, .L80058904
/* 33CD4 800588D4 AEE00024 */ sw $zero, 0x24($s7)
/* 33CD8 800588D8 3C048008 */ lui $a0, %hi(AlCosineBlend)
/* 33CDC 800588DC 24848E60 */ addiu $a0, $a0, %lo(AlCosineBlend)
/* 33CE0 800588E0 86E30006 */ lh $v1, 0x6($s7)
/* 33CE4 800588E4 84820080 */ lh $v0, 0x80($a0)
/* 33CE8 800588E8 00620018 */ mult $v1, $v0
/* 33CEC 800588EC 00004012 */ mflo $t0
/* 33CF0 800588F0 000813C3 */ sra $v0, $t0, 15
/* 33CF4 800588F4 A6E20014 */ sh $v0, 0x14($s7)
/* 33CF8 800588F8 84820080 */ lh $v0, 0x80($a0)
/* 33CFC 800588FC 08016254 */ j .L80058950
/* 33D00 80058900 00620018 */ mult $v1, $v0
.L80058904:
/* 33D04 80058904 86E20004 */ lh $v0, 0x4($s7)
/* 33D08 80058908 86E30006 */ lh $v1, 0x6($s7)
/* 33D0C 8005890C 00021040 */ sll $v0, $v0, 1
/* 33D10 80058910 3C018008 */ lui $at, %hi(AlCosineBlend)
/* 33D14 80058914 00220821 */ addu $at, $at, $v0
/* 33D18 80058918 84228E60 */ lh $v0, %lo(AlCosineBlend)($at)
/* 33D1C 8005891C 00620018 */ mult $v1, $v0
/* 33D20 80058920 86E30004 */ lh $v1, 0x4($s7)
/* 33D24 80058924 00004012 */ mflo $t0
/* 33D28 80058928 000813C3 */ sra $v0, $t0, 15
/* 33D2C 8005892C A6E20014 */ sh $v0, 0x14($s7)
/* 33D30 80058930 2402007F */ addiu $v0, $zero, 0x7F
/* 33D34 80058934 00431023 */ subu $v0, $v0, $v1
/* 33D38 80058938 00021040 */ sll $v0, $v0, 1
/* 33D3C 8005893C 86E30006 */ lh $v1, 0x6($s7)
/* 33D40 80058940 3C018008 */ lui $at, %hi(AlCosineBlend)
/* 33D44 80058944 00220821 */ addu $at, $at, $v0
/* 33D48 80058948 84228E60 */ lh $v0, %lo(AlCosineBlend)($at)
/* 33D4C 8005894C 00620018 */ mult $v1, $v0
.L80058950:
/* 33D50 80058950 00004012 */ mflo $t0
/* 33D54 80058954 000813C3 */ sra $v0, $t0, 15
/* 33D58 80058958 A6E2001A */ sh $v0, 0x1A($s7)
/* 33D5C 8005895C 86E30008 */ lh $v1, 0x8($s7)
/* 33D60 80058960 86E40014 */ lh $a0, 0x14($s7)
/* 33D64 80058964 8EE50020 */ lw $a1, 0x20($s7)
/* 33D68 80058968 26E20010 */ addiu $v0, $s7, 0x10
/* 33D6C 8005896C AFA20014 */ sw $v0, 0x14($sp)
/* 33D70 80058970 44836000 */ mtc1 $v1, $f12
/* 33D74 80058974 00000000 */ nop
/* 33D78 80058978 46806321 */ cvt.d.w $f12, $f12
/* 33D7C 8005897C 44847000 */ mtc1 $a0, $f14
/* 33D80 80058980 00000000 */ nop
/* 33D84 80058984 468073A1 */ cvt.d.w $f14, $f14
/* 33D88 80058988 0C01631B */ jal _getRate
/* 33D8C 8005898C AFA50010 */ sw $a1, 0x10($sp)
/* 33D90 80058990 86E3000A */ lh $v1, 0xA($s7)
/* 33D94 80058994 86E4001A */ lh $a0, 0x1A($s7)
/* 33D98 80058998 8EE50020 */ lw $a1, 0x20($s7)
/* 33D9C 8005899C A6E20012 */ sh $v0, 0x12($s7)
/* 33DA0 800589A0 26E20016 */ addiu $v0, $s7, 0x16
/* 33DA4 800589A4 AFA20014 */ sw $v0, 0x14($sp)
/* 33DA8 800589A8 44836000 */ mtc1 $v1, $f12
/* 33DAC 800589AC 00000000 */ nop
/* 33DB0 800589B0 46806321 */ cvt.d.w $f12, $f12
/* 33DB4 800589B4 44847000 */ mtc1 $a0, $f14
/* 33DB8 800589B8 00000000 */ nop
/* 33DBC 800589BC 468073A1 */ cvt.d.w $f14, $f14
/* 33DC0 800589C0 0C01631B */ jal _getRate
/* 33DC4 800589C4 AFA50010 */ sw $a1, 0x10($sp)
/* 33DC8 800589C8 02C0202D */ daddu $a0, $s6, $zero
/* 33DCC 800589CC 26D60008 */ addiu $s6, $s6, 0x8
/* 33DD0 800589D0 02C0282D */ daddu $a1, $s6, $zero
/* 33DD4 800589D4 26D60008 */ addiu $s6, $s6, 0x8
/* 33DD8 800589D8 02C0302D */ daddu $a2, $s6, $zero
/* 33DDC 800589DC 26D60008 */ addiu $s6, $s6, 0x8
/* 33DE0 800589E0 3C030900 */ lui $v1, (0x9000000 >> 16)
/* 33DE4 800589E4 A6E20018 */ sh $v0, 0x18($s7)
/* 33DE8 800589E8 96E20014 */ lhu $v0, 0x14($s7)
/* 33DEC 800589EC 02C0802D */ daddu $s0, $s6, $zero
/* 33DF0 800589F0 00431025 */ or $v0, $v0, $v1
/* 33DF4 800589F4 AC820000 */ sw $v0, 0x0($a0)
/* 33DF8 800589F8 96E20012 */ lhu $v0, 0x12($s7)
/* 33DFC 800589FC 96E30010 */ lhu $v1, 0x10($s7)
/* 33E00 80058A00 00021400 */ sll $v0, $v0, 16
/* 33E04 80058A04 00431025 */ or $v0, $v0, $v1
/* 33E08 80058A08 AC820004 */ sw $v0, 0x4($a0)
/* 33E0C 80058A0C 96E20008 */ lhu $v0, 0x8($s7)
/* 33E10 80058A10 3C030906 */ lui $v1, (0x9060000 >> 16)
/* 33E14 80058A14 00431025 */ or $v0, $v0, $v1
/* 33E18 80058A18 ACA20000 */ sw $v0, 0x0($a1)
/* 33E1C 80058A1C 96E2000C */ lhu $v0, 0xC($s7)
/* 33E20 80058A20 96E3000E */ lhu $v1, 0xE($s7)
/* 33E24 80058A24 00021400 */ sll $v0, $v0, 16
/* 33E28 80058A28 00431025 */ or $v0, $v0, $v1
/* 33E2C 80058A2C ACA20004 */ sw $v0, 0x4($a1)
/* 33E30 80058A30 96E2001A */ lhu $v0, 0x1A($s7)
/* 33E34 80058A34 3C030904 */ lui $v1, (0x9040000 >> 16)
/* 33E38 80058A38 00431025 */ or $v0, $v0, $v1
/* 33E3C 80058A3C ACC20000 */ sw $v0, 0x0($a2)
/* 33E40 80058A40 96E20018 */ lhu $v0, 0x18($s7)
/* 33E44 80058A44 96E30016 */ lhu $v1, 0x16($s7)
/* 33E48 80058A48 00021400 */ sll $v0, $v0, 16
/* 33E4C 80058A4C 00431025 */ or $v0, $v0, $v1
/* 33E50 80058A50 ACC20004 */ sw $v0, 0x4($a2)
/* 33E54 80058A54 96E2000A */ lhu $v0, 0xA($s7)
/* 33E58 80058A58 3C030301 */ lui $v1, (0x3010000 >> 16)
/* 33E5C 80058A5C 0801629B */ j .L80058A6C
/* 33E60 80058A60 00431025 */ or $v0, $v0, $v1
.L80058A64:
/* 33E64 80058A64 02C0802D */ daddu $s0, $s6, $zero
/* 33E68 80058A68 3C020300 */ lui $v0, (0x3000000 >> 16)
.L80058A6C:
/* 33E6C 80058A6C AE020000 */ sw $v0, 0x0($s0)
/* 33E70 80058A70 8EE40000 */ lw $a0, 0x0($s7)
/* 33E74 80058A74 0C0187A4 */ jal osVirtualToPhysical
/* 33E78 80058A78 26D60008 */ addiu $s6, $s6, 0x8
/* 33E7C 80058A7C AE020004 */ sw $v0, 0x4($s0)
/* 33E80 80058A80 8EE2001C */ lw $v0, 0x1C($s7)
/* 33E84 80058A84 8EE30020 */ lw $v1, 0x20($s7)
/* 33E88 80058A88 244200B8 */ addiu $v0, $v0, 0xB8
/* 33E8C 80058A8C AEE2001C */ sw $v0, 0x1C($s7)
/* 33E90 80058A90 0062102A */ slt $v0, $v1, $v0
/* 33E94 80058A94 54400001 */ bnel $v0, $zero, .L80058A9C
/* 33E98 80058A98 AEE3001C */ sw $v1, 0x1C($s7)
.L80058A9C:
/* 33E9C 80058A9C 8EE20028 */ lw $v0, 0x28($s7)
/* 33EA0 80058AA0 14400013 */ bnez $v0, .L80058AF0
/* 33EA4 80058AA4 02C0102D */ daddu $v0, $s6, $zero
/* 33EA8 80058AA8 24020001 */ addiu $v0, $zero, 0x1
/* 33EAC 80058AAC AEE20024 */ sw $v0, 0x24($s7)
/* 33EB0 80058AB0 A6E20006 */ sh $v0, 0x6($s7)
/* 33EB4 80058AB4 8FA80020 */ lw $t0, 0x20($sp)
/* 33EB8 80058AB8 AD000008 */ sw $zero, 0x8($t0)
/* 33EBC 80058ABC AD02000C */ sw $v0, 0xC($t0)
/* 33EC0 80058AC0 8E430014 */ lw $v1, 0x14($s2)
/* 33EC4 80058AC4 AE400028 */ sw $zero, 0x28($s2)
/* 33EC8 80058AC8 AE42002C */ sw $v0, 0x2C($s2)
/* 33ECC 80058ACC AE400024 */ sw $zero, 0x24($s2)
/* 33ED0 80058AD0 8C620000 */ lw $v0, 0x0($v1)
/* 33ED4 80058AD4 AE420030 */ sw $v0, 0x30($s2)
/* 33ED8 80058AD8 8C620014 */ lw $v0, 0x14($v1)
/* 33EDC 80058ADC AE420010 */ sw $v0, 0x10($s2)
/* 33EE0 80058AE0 8FA80060 */ lw $t0, 0x60($sp)
/* 33EE4 80058AE4 0C014B8C */ jal func_80052E30
/* 33EE8 80058AE8 91040079 */ lbu $a0, 0x79($t0)
.L80058AEC:
/* 33EEC 80058AEC 02C0102D */ daddu $v0, $s6, $zero
.L80058AF0:
/* 33EF0 80058AF0 8FBF005C */ lw $ra, 0x5C($sp)
/* 33EF4 80058AF4 8FBE0058 */ lw $fp, 0x58($sp)
/* 33EF8 80058AF8 8FB70054 */ lw $s7, 0x54($sp)
/* 33EFC 80058AFC 8FB60050 */ lw $s6, 0x50($sp)
/* 33F00 80058B00 8FB5004C */ lw $s5, 0x4C($sp)
/* 33F04 80058B04 8FB40048 */ lw $s4, 0x48($sp)
/* 33F08 80058B08 8FB30044 */ lw $s3, 0x44($sp)
/* 33F0C 80058B0C 8FB20040 */ lw $s2, 0x40($sp)
/* 33F10 80058B10 8FB1003C */ lw $s1, 0x3C($sp)
/* 33F14 80058B14 8FB00038 */ lw $s0, 0x38($sp)
/* 33F18 80058B18 03E00008 */ jr $ra
/* 33F1C 80058B1C 27BD0060 */ addiu $sp, $sp, 0x60
### DECOMPILED C INSTRUCTIONS:
Acmd* au_pull_voice(AuPVoice* pvoice, Acmd* cmdBufPos) {
Acmd* ptr = cmdBufPos;
AuLoadFilter* decoder;
AuResampler* resampler;
AuEnvMixer* envMixer;
s16 inp;
f32 finCount;
s16 outp;
s32 startZero;
s32 outCount;
s32 incr;
envMixer = &pvoice->envMixer;
resampler = &pvoice->resampler;
decoder = &pvoice->decoder;
if (envMixer->motion != AL_PLAYING) {
return ptr;
}
outp = N_AL_DECODER_OUT;
if (resampler->ratio > MAX_RATIO) {
resampler->ratio = MAX_RATIO;
}
resampler->ratio = (s32)(resampler->ratio * UNITY_PITCH);
resampler->ratio = resampler->ratio / UNITY_PITCH;
finCount = resampler->delta + resampler->ratio * (f32)184;
outCount = (s32) finCount;
resampler->delta = finCount - (f32) outCount;
if (outCount != 0) {
if (decoder->instrument->type == AL_ADPCM_WAVE) {
s32 nSam;
s32 nbytes;
s32 nframes;
s32 op;
s32 tsam;
s32 nLeft;
s32 bEnd;
s32 nOver;
s32 overFlow;
s32 decoded = FALSE;
s32 looped = FALSE;
inp = N_AL_DECODER_IN;
aLoadADPCM(ptr++, decoder->bookSize, K0_TO_PHYS(decoder->instrument->predictor));
looped = (decoder->loop.end < outCount + decoder->sample) && (decoder->loop.count != 0);
if (looped) {
nSam = decoder->loop.end - decoder->sample;
} else {
nSam = outCount;
}
if (decoder->lastsam != 0) {
nLeft = ADPCMFSIZE - decoder->lastsam;
} else {
nLeft = 0;
}
tsam = nSam - nLeft;
if (tsam < 0) {
tsam = 0;
}
nframes = (tsam + ADPCMFSIZE - 1) >> LFSAMPLES;
nbytes = nframes * ADPCMFBYTES;
if (looped) {
ptr = _decodeChunk(ptr, decoder, tsam, nbytes, outp, inp, decoder->first);
if (decoder->lastsam != 0) {
outp += (decoder->lastsam << 1);
} else {
outp += (ADPCMFSIZE << 1);
}
decoder->lastsam = decoder->loop.start & 0xF;
decoder->memin = (s32)decoder->instrument->base + ADPCMFBYTES * ((s32)(decoder->loop.start >> LFSAMPLES) + 1);
decoder->sample = decoder->loop.start;
bEnd = outp;
while (outCount > nSam) {
outCount -= nSam;
op = (bEnd + ((nframes + 1) << (LFSAMPLES + 1)) + 16) & ~0x1f;
bEnd += nSam << 1;
if (decoder->loop.count != -1 && decoder->loop.count != 0) {
decoder->loop.count--;
}
nSam = MIN(outCount, decoder->loop.end - decoder->loop.start);
tsam = nSam - ADPCMFSIZE + decoder->lastsam;
if (tsam < 0) {
tsam = 0;
}
nframes = (tsam + ADPCMFSIZE - 1) >> LFSAMPLES;
nbytes = nframes * ADPCMFBYTES;
ptr = _decodeChunk(ptr, decoder, tsam, nbytes, op, inp, decoder->first | A_LOOP);
aDMEMMove(ptr++, op + (decoder->lastsam << 1), bEnd, nSam << 1);
}
decoder->lastsam = (outCount + decoder->lastsam) & 0xF;
decoder->sample += outCount;
decoder->memin += ADPCMFBYTES * nframes;
} else {
nSam = nframes << LFSAMPLES;
overFlow = decoder->memin + nbytes - ((s32)decoder->instrument->base + decoder->instrument->wavDataLength);
if (overFlow <= 0) {
overFlow = 0;
} else {
envMixer->motion = AL_STOPPED;
}
nOver = (overFlow / ADPCMFBYTES) << LFSAMPLES;
if (nOver > nSam + nLeft) {
nOver = nSam + nLeft;
}
nbytes -= overFlow;
if (nOver - (nOver & 0xF) < outCount) {
decoded = TRUE;
ptr = _decodeChunk(ptr, decoder, nSam - nOver, nbytes, outp, inp, decoder->first);
if (decoder->lastsam != 0) {
outp += decoder->lastsam << 1;
} else {
outp += ADPCMFSIZE << 1;
}
decoder->lastsam = (outCount + decoder->lastsam) & 0xF;
decoder->sample += outCount;
decoder->memin += ADPCMFBYTES * nframes;
} else {
decoder->lastsam = 0;
decoder->memin += ADPCMFBYTES * nframes;
}
if (nOver != 0) {
decoder->lastsam = 0;
if (decoded) {
startZero = (nLeft + nSam - nOver) << 1;
} else {
startZero = 0;
}
aClearBuffer(ptr++, startZero + outp, nOver << 1);
}
}
} else {
s32 nSam;
s32 nbytes;
s32 op;
s32 dramAlign;
s32 dramLoc;
s32 dmemAlign;
s32 overFlow;
if (decoder->loop.end < outCount + decoder->sample && decoder->loop.count != 0) {
nSam = decoder->loop.end - decoder->sample;
nbytes = nSam << 1;
if (nSam > 0) {
dramLoc = decoder->dmaFunc(decoder->memin, nbytes, decoder->dmaState, decoder->instrument->unk_25);
dramAlign = dramLoc & 7;
nbytes += dramAlign;
n_aLoadBuffer(ptr++, nbytes + 8 - (nbytes & 7), outp, dramLoc - dramAlign);
} else {
dramAlign = 0;
}
outp += dramAlign;
decoder->memin = (s32)decoder->instrument->base + (decoder->loop.start << 1);
decoder->sample = decoder->loop.start;
op = outp;
while (outCount > nSam){
op += nSam << 1;
outCount -= nSam;
if (decoder->loop.count != -1 && decoder->loop.count != 0) {
decoder->loop.count--;
}
nSam = MIN(outCount, decoder->loop.end - decoder->loop.start);
nbytes = nSam << 1;
dramLoc = decoder->dmaFunc(decoder->memin, nbytes, decoder->dmaState, decoder->instrument->unk_25);
dramAlign = dramLoc & 7;
nbytes += dramAlign;
if ((op & 7) != 0) {
dmemAlign = 8 - (op & 7);
} else {
dmemAlign = 0;
}
n_aLoadBuffer(ptr++, nbytes + 8 - (nbytes & 7), op + dmemAlign, dramLoc - dramAlign);
if (dramAlign != 0 || dmemAlign != 0) {
aDMEMMove(ptr++, op + dramAlign + dmemAlign, op, nSam * 2);
}
}
decoder->sample += outCount;
decoder->memin += outCount << 1;
} else {
nbytes = outCount << 1;
overFlow = decoder->memin + nbytes - ((s32)decoder->instrument->base + decoder->instrument->wavDataLength);
if (overFlow <= 0) {
overFlow = 0;
} else {
envMixer->motion = AL_STOPPED;
}
if (nbytes < overFlow) {
overFlow = nbytes;
}
if (overFlow < nbytes) {
if (outCount > 0) {
nbytes -= overFlow;
dramLoc = decoder->dmaFunc(decoder->memin, nbytes, decoder->dmaState, decoder->instrument->unk_25);
dramAlign = dramLoc & 7;
nbytes += dramAlign;
n_aLoadBuffer(ptr++, nbytes + 8 - (nbytes & 7), outp, dramLoc - dramAlign);
} else {
dramAlign = 0;
}
outp += dramAlign;
decoder->sample += outCount;
decoder->memin += outCount << 1;
} else {
decoder->memin += outCount << 1;
}
if (overFlow != 0) {
startZero = (outCount << 1) - overFlow;
if (startZero < 0) {
startZero = 0;
}
aClearBuffer(ptr++, startZero + outp, overFlow);
}
}
}
}
incr = (s32)(resampler->ratio * UNITY_PITCH);
n_aResample(ptr++, osVirtualToPhysical(resampler->state), resampler->first, incr, outp, 0);
resampler->first = 0;
if (envMixer->first != 0) {
envMixer->first = 0;
if (!AuSynUseStereo) {
envMixer->ltgt = (envMixer->volume * AuEqPower[AUEQPOWER_LENGTH / 2]) >> 15;
envMixer->rtgt = (envMixer->volume * AuEqPower[AUEQPOWER_LENGTH / 2]) >> 15;
} else {
envMixer->ltgt = (envMixer->volume * AuEqPower[envMixer->pan]) >> 15;
envMixer->rtgt = (envMixer->volume * AuEqPower[AUEQPOWER_LENGTH - envMixer->pan - 1]) >> 15;
}
envMixer->lratm = _getRate(envMixer->cvolL, envMixer->ltgt, envMixer->segEnd, &envMixer->lratl);
envMixer->rratm = _getRate(envMixer->cvolR, envMixer->rtgt, envMixer->segEnd, &envMixer->rratl);
n_aSetVolume(ptr++, A_RATE, envMixer->ltgt, envMixer->lratm, envMixer->lratl);
n_aSetVolume(ptr++, A_LEFT | A_VOL, envMixer->cvolL, envMixer->dryamt, envMixer->wetamt);
n_aSetVolume(ptr++, A_RIGHT | A_VOL, envMixer->rtgt, envMixer->rratm, envMixer->rratl);
n_aEnvMixer(ptr++, A_INIT, envMixer->cvolR, osVirtualToPhysical(envMixer->state));
} else {
n_aEnvMixer(ptr++, A_CONTINUE, 0, osVirtualToPhysical(envMixer->state));
}
envMixer->delta += AUDIO_SAMPLES;
if (envMixer->segEnd < envMixer->delta) {
envMixer->delta = envMixer->segEnd;
}
if (envMixer->motion == AL_STOPPED) {
envMixer->first = 1;
envMixer->volume = 1;
resampler->delta = 0.0f;
resampler->first = 1;
decoder->lastsam = 0;
decoder->first = 1;
decoder->sample = 0;
decoder->memin = (s32) decoder->instrument->base;
decoder->loop.count = decoder->instrument->loopCount;
func_80052E30(pvoice->index);
}
return ptr;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel appendGfx_item_entity
/* C88A4 801321A4 27BDFEB8 */ addiu $sp, $sp, -0x148
/* C88A8 801321A8 AFB3012C */ sw $s3, 0x12C($sp)
/* C88AC 801321AC 0080982D */ daddu $s3, $a0, $zero
/* C88B0 801321B0 AFB40130 */ sw $s4, 0x130($sp)
/* C88B4 801321B4 AFBF013C */ sw $ra, 0x13C($sp)
/* C88B8 801321B8 AFB60138 */ sw $s6, 0x138($sp)
/* C88BC 801321BC AFB50134 */ sw $s5, 0x134($sp)
/* C88C0 801321C0 AFB20128 */ sw $s2, 0x128($sp)
/* C88C4 801321C4 AFB10124 */ sw $s1, 0x124($sp)
/* C88C8 801321C8 AFB00120 */ sw $s0, 0x120($sp)
/* C88CC 801321CC F7B40140 */ sdc1 $f20, 0x140($sp)
/* C88D0 801321D0 8E640000 */ lw $a0, 0x0($s3)
/* C88D4 801321D4 3C020808 */ lui $v0, (0x8080000 >> 16)
/* C88D8 801321D8 00821024 */ and $v0, $a0, $v0
/* C88DC 801321DC 10400025 */ beqz $v0, .L80132274
/* C88E0 801321E0 241400FF */ addiu $s4, $zero, 0xFF
/* C88E4 801321E4 3C020008 */ lui $v0, (0x80000 >> 16)
/* C88E8 801321E8 00821024 */ and $v0, $a0, $v0
/* C88EC 801321EC 1040000C */ beqz $v0, .L80132220
/* C88F0 801321F0 3C038080 */ lui $v1, (0x80808081 >> 16)
/* C88F4 801321F4 9262002F */ lbu $v0, 0x2F($s3)
/* C88F8 801321F8 00540018 */ mult $v0, $s4
/* C88FC 801321FC 00001012 */ mflo $v0
/* C8900 80132200 34638081 */ ori $v1, $v1, (0x80808081 & 0xFFFF)
/* C8904 80132204 00000000 */ nop
/* C8908 80132208 00430018 */ mult $v0, $v1
/* C890C 8013220C 00001810 */ mfhi $v1
/* C8910 80132210 00621821 */ addu $v1, $v1, $v0
/* C8914 80132214 000319C3 */ sra $v1, $v1, 7
/* C8918 80132218 000217C3 */ sra $v0, $v0, 31
/* C891C 8013221C 0062A023 */ subu $s4, $v1, $v0
.L80132220:
/* C8920 80132220 3C020800 */ lui $v0, (0x8000000 >> 16)
/* C8924 80132224 00821024 */ and $v0, $a0, $v0
/* C8928 80132228 10400012 */ beqz $v0, .L80132274
/* C892C 8013222C 27A40118 */ addiu $a0, $sp, 0x118
/* C8930 80132230 27A50119 */ addiu $a1, $sp, 0x119
/* C8934 80132234 27A6011A */ addiu $a2, $sp, 0x11A
/* C8938 80132238 0C046FA0 */ jal get_background_color_blend
/* C893C 8013223C 27A7011B */ addiu $a3, $sp, 0x11B
/* C8940 80132240 93A3011B */ lbu $v1, 0x11B($sp)
/* C8944 80132244 240200FF */ addiu $v0, $zero, 0xFF
/* C8948 80132248 00431023 */ subu $v0, $v0, $v1
/* C894C 8013224C 02820018 */ mult $s4, $v0
/* C8950 80132250 00001012 */ mflo $v0
/* C8954 80132254 3C038080 */ lui $v1, (0x80808081 >> 16)
/* C8958 80132258 34638081 */ ori $v1, $v1, (0x80808081 & 0xFFFF)
/* C895C 8013225C 00430018 */ mult $v0, $v1
/* C8960 80132260 00001810 */ mfhi $v1
/* C8964 80132264 00621821 */ addu $v1, $v1, $v0
/* C8968 80132268 000319C3 */ sra $v1, $v1, 7
/* C896C 8013226C 000217C3 */ sra $v0, $v0, 31
/* C8970 80132270 0062A023 */ subu $s4, $v1, $v0
.L80132274:
/* C8974 80132274 8E620000 */ lw $v0, 0x0($s3)
/* C8978 80132278 3C030004 */ lui $v1, (0x40000 >> 16)
/* C897C 8013227C 00431024 */ and $v0, $v0, $v1
/* C8980 80132280 14400002 */ bnez $v0, .L8013228C
/* C8984 80132284 2410FFFD */ addiu $s0, $zero, -0x3
/* C8988 80132288 2410FFFE */ addiu $s0, $zero, -0x2
.L8013228C:
/* C898C 8013228C 86630018 */ lh $v1, 0x18($s3)
/* C8990 80132290 24020157 */ addiu $v0, $zero, 0x157
/* C8994 80132294 10620005 */ beq $v1, $v0, .L801322AC
/* C8998 80132298 24020159 */ addiu $v0, $zero, 0x159
/* C899C 8013229C 10620003 */ beq $v1, $v0, .L801322AC
/* C89A0 801322A0 24020156 */ addiu $v0, $zero, 0x156
/* C89A4 801322A4 14620005 */ bne $v1, $v0, .L801322BC
/* C89A8 801322A8 00000000 */ nop
.L801322AC:
/* C89AC 801322AC 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* C89B0 801322B0 44810000 */ mtc1 $at, $f0
/* C89B4 801322B4 00000000 */ nop
/* C89B8 801322B8 E6600030 */ swc1 $f0, 0x30($s3)
.L801322BC:
/* C89BC 801322BC 3C03800A */ lui $v1, %hi(gCurrentCamID)
/* C89C0 801322C0 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1)
/* C89C4 801322C4 3C014334 */ lui $at, (0x43340000 >> 16)
/* C89C8 801322C8 44816000 */ mtc1 $at, $f12
/* C89CC 801322CC 00031080 */ sll $v0, $v1, 2
/* C89D0 801322D0 00431021 */ addu $v0, $v0, $v1
/* C89D4 801322D4 00021080 */ sll $v0, $v0, 2
/* C89D8 801322D8 00431023 */ subu $v0, $v0, $v1
/* C89DC 801322DC 000218C0 */ sll $v1, $v0, 3
/* C89E0 801322E0 00431021 */ addu $v0, $v0, $v1
/* C89E4 801322E4 000210C0 */ sll $v0, $v0, 3
/* C89E8 801322E8 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* C89EC 801322EC 00220821 */ addu $at, $at, $v0
/* C89F0 801322F0 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at)
/* C89F4 801322F4 0C00A6C9 */ jal clamp_angle
/* C89F8 801322F8 46006301 */ sub.s $f12, $f12, $f0
/* C89FC 801322FC 27B20058 */ addiu $s2, $sp, 0x58
/* C8A00 80132300 0240202D */ daddu $a0, $s2, $zero
/* C8A04 80132304 C664000C */ lwc1 $f4, 0xC($s3)
/* C8A08 80132308 44901000 */ mtc1 $s0, $f2
/* C8A0C 8013230C 00000000 */ nop
/* C8A10 80132310 468010A0 */ cvt.s.w $f2, $f2
/* C8A14 80132314 46022100 */ add.s $f4, $f4, $f2
/* C8A18 80132318 8E650008 */ lw $a1, 0x8($s3)
/* C8A1C 8013231C 8E670010 */ lw $a3, 0x10($s3)
/* C8A20 80132320 44062000 */ mfc1 $a2, $f4
/* C8A24 80132324 0C019E40 */ jal guTranslateF
/* C8A28 80132328 46000506 */ mov.s $f20, $f0
/* C8A2C 8013232C 27B10098 */ addiu $s1, $sp, 0x98
/* C8A30 80132330 4405A000 */ mfc1 $a1, $f20
/* C8A34 80132334 44800000 */ mtc1 $zero, $f0
/* C8A38 80132338 3C073F80 */ lui $a3, (0x3F800000 >> 16)
/* C8A3C 8013233C 44060000 */ mfc1 $a2, $f0
/* C8A40 80132340 0220202D */ daddu $a0, $s1, $zero
/* C8A44 80132344 0C019EC8 */ jal guRotateF
/* C8A48 80132348 AFA60010 */ sw $a2, 0x10($sp)
/* C8A4C 8013234C 8E620000 */ lw $v0, 0x0($s3)
/* C8A50 80132350 30424000 */ andi $v0, $v0, 0x4000
/* C8A54 80132354 1040000A */ beqz $v0, .L80132380
/* C8A58 80132358 27B000D8 */ addiu $s0, $sp, 0xD8
/* C8A5C 8013235C 8E650030 */ lw $a1, 0x30($s3)
/* C8A60 80132360 0200202D */ daddu $a0, $s0, $zero
/* C8A64 80132364 00A0302D */ daddu $a2, $a1, $zero
/* C8A68 80132368 0C019DF0 */ jal guScaleF
/* C8A6C 8013236C 00A0382D */ daddu $a3, $a1, $zero
/* C8A70 80132370 0220202D */ daddu $a0, $s1, $zero
/* C8A74 80132374 0200282D */ daddu $a1, $s0, $zero
/* C8A78 80132378 0C019D80 */ jal guMtxCatF
/* C8A7C 8013237C 0220302D */ daddu $a2, $s1, $zero
.L80132380:
/* C8A80 80132380 0220202D */ daddu $a0, $s1, $zero
/* C8A84 80132384 0240282D */ daddu $a1, $s2, $zero
/* C8A88 80132388 0C019D80 */ jal guMtxCatF
/* C8A8C 8013238C 0240302D */ daddu $a2, $s2, $zero
/* C8A90 80132390 0240202D */ daddu $a0, $s2, $zero
/* C8A94 80132394 0C019D40 */ jal guMtxF2L
/* C8A98 80132398 27A50018 */ addiu $a1, $sp, 0x18
/* C8A9C 8013239C 3C020001 */ lui $v0, (0x11630 >> 16)
/* C8AA0 801323A0 34421630 */ ori $v0, $v0, (0x11630 & 0xFFFF)
/* C8AA4 801323A4 27A70018 */ addiu $a3, $sp, 0x18
/* C8AA8 801323A8 0240282D */ daddu $a1, $s2, $zero
/* C8AAC 801323AC 3C038007 */ lui $v1, %hi(gMatrixListPos)
/* C8AB0 801323B0 946341F0 */ lhu $v1, %lo(gMatrixListPos)($v1)
/* C8AB4 801323B4 3C04800A */ lui $a0, %hi(gDisplayContext)
/* C8AB8 801323B8 8C84A674 */ lw $a0, %lo(gDisplayContext)($a0)
/* C8ABC 801323BC 00031980 */ sll $v1, $v1, 6
/* C8AC0 801323C0 00832021 */ addu $a0, $a0, $v1
/* C8AC4 801323C4 00822021 */ addu $a0, $a0, $v0
.L801323C8:
/* C8AC8 801323C8 8CF50000 */ lw $s5, 0x0($a3)
/* C8ACC 801323CC 8CF60004 */ lw $s6, 0x4($a3)
/* C8AD0 801323D0 8CF80008 */ lw $t8, 0x8($a3)
/* C8AD4 801323D4 8CF9000C */ lw $t9, 0xC($a3)
/* C8AD8 801323D8 AC950000 */ sw $s5, 0x0($a0)
/* C8ADC 801323DC AC960004 */ sw $s6, 0x4($a0)
/* C8AE0 801323E0 AC980008 */ sw $t8, 0x8($a0)
/* C8AE4 801323E4 AC99000C */ sw $t9, 0xC($a0)
/* C8AE8 801323E8 24E70010 */ addiu $a3, $a3, 0x10
/* C8AEC 801323EC 14E5FFF6 */ bne $a3, $a1, .L801323C8
/* C8AF0 801323F0 24840010 */ addiu $a0, $a0, 0x10
/* C8AF4 801323F4 3C02DA38 */ lui $v0, (0xDA380002 >> 16)
/* C8AF8 801323F8 34420002 */ ori $v0, $v0, (0xDA380002 & 0xFFFF)
/* C8AFC 801323FC 3C050001 */ lui $a1, (0x11630 >> 16)
/* C8B00 80132400 3C09800A */ lui $t1, %hi(gMainGfxPos)
/* C8B04 80132404 2529A66C */ addiu $t1, $t1, %lo(gMainGfxPos)
/* C8B08 80132408 34A51630 */ ori $a1, $a1, (0x11630 & 0xFFFF)
/* C8B0C 8013240C 3C078007 */ lui $a3, %hi(gMatrixListPos)
/* C8B10 80132410 24E741F0 */ addiu $a3, $a3, %lo(gMatrixListPos)
/* C8B14 80132414 8D280000 */ lw $t0, 0x0($t1)
/* C8B18 80132418 94E40000 */ lhu $a0, 0x0($a3)
/* C8B1C 8013241C 0100302D */ daddu $a2, $t0, $zero
/* C8B20 80132420 25080008 */ addiu $t0, $t0, 0x8
/* C8B24 80132424 3083FFFF */ andi $v1, $a0, 0xFFFF
/* C8B28 80132428 00031980 */ sll $v1, $v1, 6
/* C8B2C 8013242C 00651821 */ addu $v1, $v1, $a1
/* C8B30 80132430 AD280000 */ sw $t0, 0x0($t1)
/* C8B34 80132434 ACC20000 */ sw $v0, 0x0($a2)
/* C8B38 80132438 3C02800A */ lui $v0, %hi(gDisplayContext)
/* C8B3C 8013243C 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0)
/* C8B40 80132440 3C058015 */ lui $a1, %hi(gSpriteShadingProfile)
/* C8B44 80132444 8CA51328 */ lw $a1, %lo(gSpriteShadingProfile)($a1)
/* C8B48 80132448 00431021 */ addu $v0, $v0, $v1
/* C8B4C 8013244C ACC20004 */ sw $v0, 0x4($a2)
/* C8B50 80132450 94A20000 */ lhu $v0, 0x0($a1)
/* C8B54 80132454 24840001 */ addiu $a0, $a0, 0x1
/* C8B58 80132458 10400009 */ beqz $v0, .L80132480
/* C8B5C 8013245C A4E40000 */ sh $a0, 0x0($a3)
/* C8B60 80132460 25020008 */ addiu $v0, $t0, 0x8
/* C8B64 80132464 AD220000 */ sw $v0, 0x0($t1)
/* C8B68 80132468 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* C8B6C 8013246C AD020000 */ sw $v0, 0x0($t0)
/* C8B70 80132470 3C028015 */ lui $v0, %hi(D_8014BBD8)
/* C8B74 80132474 2442BBD8 */ addiu $v0, $v0, %lo(D_8014BBD8)
/* C8B78 80132478 0804C927 */ j .L8013249C
/* C8B7C 8013247C AD020004 */ sw $v0, 0x4($t0)
.L80132480:
/* C8B80 80132480 25020008 */ addiu $v0, $t0, 0x8
/* C8B84 80132484 AD220000 */ sw $v0, 0x0($t1)
/* C8B88 80132488 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* C8B8C 8013248C AD020000 */ sw $v0, 0x0($t0)
/* C8B90 80132490 3C028015 */ lui $v0, %hi(D_8014B870)
/* C8B94 80132494 2442B870 */ addiu $v0, $v0, %lo(D_8014B870)
/* C8B98 80132498 AD020004 */ sw $v0, 0x4($t0)
.L8013249C:
/* C8B9C 8013249C 3C03D9FD */ lui $v1, (0xD9FDF9FF >> 16)
/* C8BA0 801324A0 3C08800A */ lui $t0, %hi(gMainGfxPos)
/* C8BA4 801324A4 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos)
/* C8BA8 801324A8 8D070000 */ lw $a3, 0x0($t0)
/* C8BAC 801324AC 3463F9FF */ ori $v1, $v1, (0xD9FDF9FF & 0xFFFF)
/* C8BB0 801324B0 00E0102D */ daddu $v0, $a3, $zero
/* C8BB4 801324B4 24E70008 */ addiu $a3, $a3, 0x8
/* C8BB8 801324B8 AD070000 */ sw $a3, 0x0($t0)
/* C8BBC 801324BC AC430000 */ sw $v1, 0x0($v0)
/* C8BC0 801324C0 AC400004 */ sw $zero, 0x4($v0)
/* C8BC4 801324C4 24E20008 */ addiu $v0, $a3, 0x8
/* C8BC8 801324C8 AD020000 */ sw $v0, 0x0($t0)
/* C8BCC 801324CC 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* C8BD0 801324D0 ACE20000 */ sw $v0, 0x0($a3)
/* C8BD4 801324D4 3C028015 */ lui $v0, %hi(D_8014C620)
/* C8BD8 801324D8 2442C620 */ addiu $v0, $v0, %lo(D_8014C620)
/* C8BDC 801324DC ACE20004 */ sw $v0, 0x4($a3)
/* C8BE0 801324E0 8E620000 */ lw $v0, 0x0($s3)
/* C8BE4 801324E4 3C030808 */ lui $v1, (0x8080000 >> 16)
/* C8BE8 801324E8 00431024 */ and $v0, $v0, $v1
/* C8BEC 801324EC 10400025 */ beqz $v0, .L80132584
/* C8BF0 801324F0 00000000 */ nop
/* C8BF4 801324F4 3C028015 */ lui $v0, %hi(gSpriteShadingProfile)
/* C8BF8 801324F8 8C421328 */ lw $v0, %lo(gSpriteShadingProfile)($v0)
/* C8BFC 801324FC 94420000 */ lhu $v0, 0x0($v0)
/* C8C00 80132500 10400009 */ beqz $v0, .L80132528
/* C8C04 80132504 3C04E200 */ lui $a0, (0xE200001C >> 16)
/* C8C08 80132508 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF)
/* C8C0C 8013250C 3C030C18 */ lui $v1, (0xC184348 >> 16)
/* C8C10 80132510 34634348 */ ori $v1, $v1, (0xC184348 & 0xFFFF)
/* C8C14 80132514 24E20010 */ addiu $v0, $a3, 0x10
/* C8C18 80132518 AD020000 */ sw $v0, 0x0($t0)
/* C8C1C 8013251C ACE40008 */ sw $a0, 0x8($a3)
/* C8C20 80132520 0804C961 */ j .L80132584
/* C8C24 80132524 ACE3000C */ sw $v1, 0xC($a3)
.L80132528:
/* C8C28 80132528 3C05E200 */ lui $a1, (0xE200001C >> 16)
/* C8C2C 8013252C 34A5001C */ ori $a1, $a1, (0xE200001C & 0xFFFF)
/* C8C30 80132530 3C030050 */ lui $v1, (0x504348 >> 16)
/* C8C34 80132534 34634348 */ ori $v1, $v1, (0x504348 & 0xFFFF)
/* C8C38 80132538 3C06FC30 */ lui $a2, (0xFC30B261 >> 16)
/* C8C3C 8013253C 34C6B261 */ ori $a2, $a2, (0xFC30B261 & 0xFFFF)
/* C8C40 80132540 3C04FF2F */ lui $a0, (0xFF2FFFFF >> 16)
/* C8C44 80132544 3484FFFF */ ori $a0, $a0, (0xFF2FFFFF & 0xFFFF)
/* C8C48 80132548 24E20010 */ addiu $v0, $a3, 0x10
/* C8C4C 8013254C AD020000 */ sw $v0, 0x0($t0)
/* C8C50 80132550 24E20018 */ addiu $v0, $a3, 0x18
/* C8C54 80132554 ACE50008 */ sw $a1, 0x8($a3)
/* C8C58 80132558 ACE3000C */ sw $v1, 0xC($a3)
/* C8C5C 8013255C AD020000 */ sw $v0, 0x0($t0)
/* C8C60 80132560 24E20020 */ addiu $v0, $a3, 0x20
/* C8C64 80132564 ACE60010 */ sw $a2, 0x10($a3)
/* C8C68 80132568 ACE40014 */ sw $a0, 0x14($a3)
/* C8C6C 8013256C AD020000 */ sw $v0, 0x0($t0)
/* C8C70 80132570 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* C8C74 80132574 ACE20018 */ sw $v0, 0x18($a3)
/* C8C78 80132578 2402FF00 */ addiu $v0, $zero, -0x100
/* C8C7C 8013257C 02821025 */ or $v0, $s4, $v0
/* C8C80 80132580 ACE2001C */ sw $v0, 0x1C($a3)
.L80132584:
/* C8C84 80132584 8E620000 */ lw $v0, 0x0($s3)
/* C8C88 80132588 3C030004 */ lui $v1, (0x40000 >> 16)
/* C8C8C 8013258C 00431024 */ and $v0, $v0, $v1
/* C8C90 80132590 144000CE */ bnez $v0, .L801328CC
/* C8C94 80132594 3C05F500 */ lui $a1, (0xF5000100 >> 16)
/* C8C98 80132598 34A50100 */ ori $a1, $a1, (0xF5000100 & 0xFFFF)
/* C8C9C 8013259C 3C060703 */ lui $a2, (0x703C000 >> 16)
/* C8CA0 801325A0 3C0F800A */ lui $t7, %hi(gMainGfxPos)
/* C8CA4 801325A4 25EFA66C */ addiu $t7, $t7, %lo(gMainGfxPos)
/* C8CA8 801325A8 34C6C000 */ ori $a2, $a2, (0x703C000 & 0xFFFF)
/* C8CAC 801325AC 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* C8CB0 801325B0 8DEE0000 */ lw $t6, 0x0($t7)
/* C8CB4 801325B4 3C10E600 */ lui $s0, (0xE6000000 >> 16)
/* C8CB8 801325B8 01C0202D */ daddu $a0, $t6, $zero
/* C8CBC 801325BC 25CE0008 */ addiu $t6, $t6, 0x8
/* C8CC0 801325C0 ADEE0000 */ sw $t6, 0x0($t7)
/* C8CC4 801325C4 AC820000 */ sw $v0, 0x0($a0)
/* C8CC8 801325C8 9263002D */ lbu $v1, 0x2D($s3)
/* C8CCC 801325CC 25C20008 */ addiu $v0, $t6, 0x8
/* C8CD0 801325D0 ADE20000 */ sw $v0, 0x0($t7)
/* C8CD4 801325D4 25C20010 */ addiu $v0, $t6, 0x10
/* C8CD8 801325D8 ADE20000 */ sw $v0, 0x0($t7)
/* C8CDC 801325DC 25C20018 */ addiu $v0, $t6, 0x18
/* C8CE0 801325E0 ADE20000 */ sw $v0, 0x0($t7)
/* C8CE4 801325E4 3C028015 */ lui $v0, %hi(gHudElementCacheTablePalette)
/* C8CE8 801325E8 8C4212D0 */ lw $v0, %lo(gHudElementCacheTablePalette)($v0)
/* C8CEC 801325EC 000318C0 */ sll $v1, $v1, 3
/* C8CF0 801325F0 00621821 */ addu $v1, $v1, $v0
/* C8CF4 801325F4 8C630004 */ lw $v1, 0x4($v1)
/* C8CF8 801325F8 25C20020 */ addiu $v0, $t6, 0x20
/* C8CFC 801325FC ADE20000 */ sw $v0, 0x0($t7)
/* C8D00 80132600 3C02E800 */ lui $v0, (0xE8000000 >> 16)
/* C8D04 80132604 AC830004 */ sw $v1, 0x4($a0)
/* C8D08 80132608 ADC20000 */ sw $v0, 0x0($t6)
/* C8D0C 8013260C 3C020700 */ lui $v0, (0x7000000 >> 16)
/* C8D10 80132610 ADC2000C */ sw $v0, 0xC($t6)
/* C8D14 80132614 3C02F000 */ lui $v0, (0xF0000000 >> 16)
/* C8D18 80132618 ADC20018 */ sw $v0, 0x18($t6)
/* C8D1C 8013261C 3C028015 */ lui $v0, %hi(gSpriteShadingProfile)
/* C8D20 80132620 8C421328 */ lw $v0, %lo(gSpriteShadingProfile)($v0)
/* C8D24 80132624 3C11E700 */ lui $s1, (0xE7000000 >> 16)
/* C8D28 80132628 ADC00004 */ sw $zero, 0x4($t6)
/* C8D2C 8013262C ADC50008 */ sw $a1, 0x8($t6)
/* C8D30 80132630 ADD00010 */ sw $s0, 0x10($t6)
/* C8D34 80132634 ADC00014 */ sw $zero, 0x14($t6)
/* C8D38 80132638 ADC6001C */ sw $a2, 0x1C($t6)
/* C8D3C 8013263C ADD10020 */ sw $s1, 0x20($t6)
/* C8D40 80132640 ADC00024 */ sw $zero, 0x24($t6)
/* C8D44 80132644 94430000 */ lhu $v1, 0x0($v0)
/* C8D48 80132648 25C20028 */ addiu $v0, $t6, 0x28
/* C8D4C 8013264C 10600060 */ beqz $v1, .L801327D0
/* C8D50 80132650 ADE20000 */ sw $v0, 0x0($t7)
/* C8D54 80132654 3C03FD48 */ lui $v1, (0xFD48000B >> 16)
/* C8D58 80132658 3463000B */ ori $v1, $v1, (0xFD48000B & 0xFFFF)
/* C8D5C 8013265C 3C07F548 */ lui $a3, (0xF5480400 >> 16)
/* C8D60 80132660 34E70400 */ ori $a3, $a3, (0xF5480400 & 0xFFFF)
/* C8D64 80132664 3C05070A */ lui $a1, (0x70A0280 >> 16)
/* C8D68 80132668 34A50280 */ ori $a1, $a1, (0x70A0280 & 0xFFFF)
/* C8D6C 8013266C 3C0B0702 */ lui $t3, (0x702E05C >> 16)
/* C8D70 80132670 356BE05C */ ori $t3, $t3, (0x702E05C & 0xFFFF)
/* C8D74 80132674 3C04F540 */ lui $a0, (0xF5400400 >> 16)
/* C8D78 80132678 34840400 */ ori $a0, $a0, (0xF5400400 & 0xFFFF)
/* C8D7C 8013267C 3C0C010A */ lui $t4, (0x10A0280 >> 16)
/* C8D80 80132680 358C0280 */ ori $t4, $t4, (0x10A0280 & 0xFFFF)
/* C8D84 80132684 3C0AF240 */ lui $t2, (0xF2400400 >> 16)
/* C8D88 80132688 354A0400 */ ori $t2, $t2, (0xF2400400 & 0xFFFF)
/* C8D8C 8013268C 3C080145 */ lui $t0, (0x145C45C >> 16)
/* C8D90 80132690 3508C45C */ ori $t0, $t0, (0x145C45C & 0xFFFF)
/* C8D94 80132694 3C09001A */ lui $t1, (0x1A0280 >> 16)
/* C8D98 80132698 35290280 */ ori $t1, $t1, (0x1A0280 & 0xFFFF)
/* C8D9C 8013269C 3C06F510 */ lui $a2, (0xF5100900 >> 16)
/* C8DA0 801326A0 34C60900 */ ori $a2, $a2, (0xF5100900 & 0xFFFF)
/* C8DA4 801326A4 3C0D020F */ lui $t5, (0x20FC000 >> 16)
/* C8DA8 801326A8 35ADC000 */ ori $t5, $t5, (0x20FC000 & 0xFFFF)
/* C8DAC 801326AC 25C20030 */ addiu $v0, $t6, 0x30
/* C8DB0 801326B0 ADE20000 */ sw $v0, 0x0($t7)
/* C8DB4 801326B4 ADC30028 */ sw $v1, 0x28($t6)
/* C8DB8 801326B8 9263002C */ lbu $v1, 0x2C($s3)
/* C8DBC 801326BC 25C20038 */ addiu $v0, $t6, 0x38
/* C8DC0 801326C0 ADE20000 */ sw $v0, 0x0($t7)
/* C8DC4 801326C4 25C20040 */ addiu $v0, $t6, 0x40
/* C8DC8 801326C8 ADE20000 */ sw $v0, 0x0($t7)
/* C8DCC 801326CC 25C20048 */ addiu $v0, $t6, 0x48
/* C8DD0 801326D0 ADE20000 */ sw $v0, 0x0($t7)
/* C8DD4 801326D4 25C20050 */ addiu $v0, $t6, 0x50
/* C8DD8 801326D8 ADE20000 */ sw $v0, 0x0($t7)
/* C8DDC 801326DC 25C20058 */ addiu $v0, $t6, 0x58
/* C8DE0 801326E0 ADE20000 */ sw $v0, 0x0($t7)
/* C8DE4 801326E4 25C20060 */ addiu $v0, $t6, 0x60
/* C8DE8 801326E8 ADE20000 */ sw $v0, 0x0($t7)
/* C8DEC 801326EC 25C20068 */ addiu $v0, $t6, 0x68
/* C8DF0 801326F0 ADE20000 */ sw $v0, 0x0($t7)
/* C8DF4 801326F4 25C20070 */ addiu $v0, $t6, 0x70
/* C8DF8 801326F8 ADE20000 */ sw $v0, 0x0($t7)
/* C8DFC 801326FC 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster)
/* C8E00 80132700 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0)
/* C8E04 80132704 000318C0 */ sll $v1, $v1, 3
/* C8E08 80132708 00621821 */ addu $v1, $v1, $v0
/* C8E0C 8013270C 8C630004 */ lw $v1, 0x4($v1)
/* C8E10 80132710 25C20078 */ addiu $v0, $t6, 0x78
/* C8E14 80132714 ADE20000 */ sw $v0, 0x0($t7)
/* C8E18 80132718 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* C8E1C 8013271C ADC20040 */ sw $v0, 0x40($t6)
/* C8E20 80132720 3C020200 */ lui $v0, (0x2000000 >> 16)
/* C8E24 80132724 ADC2006C */ sw $v0, 0x6C($t6)
/* C8E28 80132728 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* C8E2C 8013272C ADC70030 */ sw $a3, 0x30($t6)
/* C8E30 80132730 ADC50034 */ sw $a1, 0x34($t6)
/* C8E34 80132734 ADD00038 */ sw $s0, 0x38($t6)
/* C8E38 80132738 ADC0003C */ sw $zero, 0x3C($t6)
/* C8E3C 8013273C ADCB0044 */ sw $t3, 0x44($t6)
/* C8E40 80132740 ADD10048 */ sw $s1, 0x48($t6)
/* C8E44 80132744 ADC0004C */ sw $zero, 0x4C($t6)
/* C8E48 80132748 ADC40050 */ sw $a0, 0x50($t6)
/* C8E4C 8013274C ADCC0054 */ sw $t4, 0x54($t6)
/* C8E50 80132750 ADCA0058 */ sw $t2, 0x58($t6)
/* C8E54 80132754 ADC8005C */ sw $t0, 0x5C($t6)
/* C8E58 80132758 ADC40060 */ sw $a0, 0x60($t6)
/* C8E5C 8013275C ADC90064 */ sw $t1, 0x64($t6)
/* C8E60 80132760 ADC60068 */ sw $a2, 0x68($t6)
/* C8E64 80132764 ADC20070 */ sw $v0, 0x70($t6)
/* C8E68 80132768 ADCD0074 */ sw $t5, 0x74($t6)
/* C8E6C 8013276C ADC3002C */ sw $v1, 0x2C($t6)
/* C8E70 80132770 8E620000 */ lw $v0, 0x0($s3)
/* C8E74 80132774 3C030808 */ lui $v1, (0x8080000 >> 16)
/* C8E78 80132778 00431024 */ and $v0, $v0, $v1
/* C8E7C 8013277C 1040000A */ beqz $v0, .L801327A8
/* C8E80 80132780 27A40058 */ addiu $a0, $sp, 0x58
/* C8E84 80132784 0000282D */ daddu $a1, $zero, $zero
/* C8E88 80132788 00A0302D */ daddu $a2, $a1, $zero
/* C8E8C 8013278C 24070018 */ addiu $a3, $zero, 0x18
/* C8E90 80132790 00E0102D */ daddu $v0, $a3, $zero
/* C8E94 80132794 AFA20010 */ sw $v0, 0x10($sp)
/* C8E98 80132798 0C052479 */ jal func_801491E4
/* C8E9C 8013279C AFB40014 */ sw $s4, 0x14($sp)
/* C8EA0 801327A0 0804CA27 */ j .L8013289C
/* C8EA4 801327A4 00000000 */ nop
.L801327A8:
/* C8EA8 801327A8 0000282D */ daddu $a1, $zero, $zero
/* C8EAC 801327AC 00A0302D */ daddu $a2, $a1, $zero
/* C8EB0 801327B0 24070018 */ addiu $a3, $zero, 0x18
/* C8EB4 801327B4 00E0102D */ daddu $v0, $a3, $zero
/* C8EB8 801327B8 AFA20010 */ sw $v0, 0x10($sp)
/* C8EBC 801327BC 240200FF */ addiu $v0, $zero, 0xFF
/* C8EC0 801327C0 0C052479 */ jal func_801491E4
/* C8EC4 801327C4 AFA20014 */ sw $v0, 0x14($sp)
/* C8EC8 801327C8 0804CA27 */ j .L8013289C
/* C8ECC 801327CC 00000000 */ nop
.L801327D0:
/* C8ED0 801327D0 3C03FD48 */ lui $v1, (0xFD48000B >> 16)
/* C8ED4 801327D4 3463000B */ ori $v1, $v1, (0xFD48000B & 0xFFFF)
/* C8ED8 801327D8 3C05F548 */ lui $a1, (0xF5480400 >> 16)
/* C8EDC 801327DC 34A50400 */ ori $a1, $a1, (0xF5480400 & 0xFFFF)
/* C8EE0 801327E0 3C04070A */ lui $a0, (0x70A0280 >> 16)
/* C8EE4 801327E4 34840280 */ ori $a0, $a0, (0x70A0280 & 0xFFFF)
/* C8EE8 801327E8 3C080702 */ lui $t0, (0x702E05C >> 16)
/* C8EEC 801327EC 3508E05C */ ori $t0, $t0, (0x702E05C & 0xFFFF)
/* C8EF0 801327F0 3C0AF540 */ lui $t2, (0xF5400400 >> 16)
/* C8EF4 801327F4 354A0400 */ ori $t2, $t2, (0xF5400400 & 0xFFFF)
/* C8EF8 801327F8 3C09000A */ lui $t1, (0xA0280 >> 16)
/* C8EFC 801327FC 35290280 */ ori $t1, $t1, (0xA0280 & 0xFFFF)
/* C8F00 80132800 3C07F240 */ lui $a3, (0xF2400400 >> 16)
/* C8F04 80132804 34E70400 */ ori $a3, $a3, (0xF2400400 & 0xFFFF)
/* C8F08 80132808 3C060045 */ lui $a2, (0x45C45C >> 16)
/* C8F0C 8013280C 34C6C45C */ ori $a2, $a2, (0x45C45C & 0xFFFF)
/* C8F10 80132810 25C20030 */ addiu $v0, $t6, 0x30
/* C8F14 80132814 ADE20000 */ sw $v0, 0x0($t7)
/* C8F18 80132818 ADC30028 */ sw $v1, 0x28($t6)
/* C8F1C 8013281C 9263002C */ lbu $v1, 0x2C($s3)
/* C8F20 80132820 25C20038 */ addiu $v0, $t6, 0x38
/* C8F24 80132824 ADE20000 */ sw $v0, 0x0($t7)
/* C8F28 80132828 25C20040 */ addiu $v0, $t6, 0x40
/* C8F2C 8013282C ADE20000 */ sw $v0, 0x0($t7)
/* C8F30 80132830 25C20048 */ addiu $v0, $t6, 0x48
/* C8F34 80132834 ADE20000 */ sw $v0, 0x0($t7)
/* C8F38 80132838 25C20050 */ addiu $v0, $t6, 0x50
/* C8F3C 8013283C ADE20000 */ sw $v0, 0x0($t7)
/* C8F40 80132840 25C20058 */ addiu $v0, $t6, 0x58
/* C8F44 80132844 ADE20000 */ sw $v0, 0x0($t7)
/* C8F48 80132848 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster)
/* C8F4C 8013284C 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0)
/* C8F50 80132850 000318C0 */ sll $v1, $v1, 3
/* C8F54 80132854 00621821 */ addu $v1, $v1, $v0
/* C8F58 80132858 8C630004 */ lw $v1, 0x4($v1)
/* C8F5C 8013285C 25C20060 */ addiu $v0, $t6, 0x60
/* C8F60 80132860 ADE20000 */ sw $v0, 0x0($t7)
/* C8F64 80132864 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* C8F68 80132868 ADC50030 */ sw $a1, 0x30($t6)
/* C8F6C 8013286C ADC40034 */ sw $a0, 0x34($t6)
/* C8F70 80132870 ADD00038 */ sw $s0, 0x38($t6)
/* C8F74 80132874 ADC0003C */ sw $zero, 0x3C($t6)
/* C8F78 80132878 ADC20040 */ sw $v0, 0x40($t6)
/* C8F7C 8013287C ADC80044 */ sw $t0, 0x44($t6)
/* C8F80 80132880 ADD10048 */ sw $s1, 0x48($t6)
/* C8F84 80132884 ADC0004C */ sw $zero, 0x4C($t6)
/* C8F88 80132888 ADCA0050 */ sw $t2, 0x50($t6)
/* C8F8C 8013288C ADC90054 */ sw $t1, 0x54($t6)
/* C8F90 80132890 ADC70058 */ sw $a3, 0x58($t6)
/* C8F94 80132894 ADC6005C */ sw $a2, 0x5C($t6)
/* C8F98 80132898 ADC3002C */ sw $v1, 0x2C($t6)
.L8013289C:
/* C8F9C 8013289C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* C8FA0 801328A0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* C8FA4 801328A4 8C620000 */ lw $v0, 0x0($v1)
/* C8FA8 801328A8 0040202D */ daddu $a0, $v0, $zero
/* C8FAC 801328AC 24420008 */ addiu $v0, $v0, 0x8
/* C8FB0 801328B0 AC620000 */ sw $v0, 0x0($v1)
/* C8FB4 801328B4 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* C8FB8 801328B8 AC820000 */ sw $v0, 0x0($a0)
/* C8FBC 801328BC 3C028015 */ lui $v0, %hi(D_8014C678)
/* C8FC0 801328C0 2442C678 */ addiu $v0, $v0, %lo(D_8014C678)
/* C8FC4 801328C4 0804CAFF */ j .L80132BFC
/* C8FC8 801328C8 AC820004 */ sw $v0, 0x4($a0)
.L801328CC:
/* C8FCC 801328CC 34A50100 */ ori $a1, $a1, (0xF5000100 & 0xFFFF)
/* C8FD0 801328D0 3C060703 */ lui $a2, (0x703C000 >> 16)
/* C8FD4 801328D4 3C0F800A */ lui $t7, %hi(gMainGfxPos)
/* C8FD8 801328D8 25EFA66C */ addiu $t7, $t7, %lo(gMainGfxPos)
/* C8FDC 801328DC 34C6C000 */ ori $a2, $a2, (0x703C000 & 0xFFFF)
/* C8FE0 801328E0 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* C8FE4 801328E4 8DEE0000 */ lw $t6, 0x0($t7)
/* C8FE8 801328E8 3C10E600 */ lui $s0, (0xE6000000 >> 16)
/* C8FEC 801328EC 01C0202D */ daddu $a0, $t6, $zero
/* C8FF0 801328F0 25CE0008 */ addiu $t6, $t6, 0x8
/* C8FF4 801328F4 ADEE0000 */ sw $t6, 0x0($t7)
/* C8FF8 801328F8 AC820000 */ sw $v0, 0x0($a0)
/* C8FFC 801328FC 9263002D */ lbu $v1, 0x2D($s3)
/* C9000 80132900 25C20008 */ addiu $v0, $t6, 0x8
/* C9004 80132904 ADE20000 */ sw $v0, 0x0($t7)
/* C9008 80132908 25C20010 */ addiu $v0, $t6, 0x10
/* C900C 8013290C ADE20000 */ sw $v0, 0x0($t7)
/* C9010 80132910 25C20018 */ addiu $v0, $t6, 0x18
/* C9014 80132914 ADE20000 */ sw $v0, 0x0($t7)
/* C9018 80132918 3C028015 */ lui $v0, %hi(gHudElementCacheTablePalette)
/* C901C 8013291C 8C4212D0 */ lw $v0, %lo(gHudElementCacheTablePalette)($v0)
/* C9020 80132920 000318C0 */ sll $v1, $v1, 3
/* C9024 80132924 00621821 */ addu $v1, $v1, $v0
/* C9028 80132928 8C630004 */ lw $v1, 0x4($v1)
/* C902C 8013292C 25C20020 */ addiu $v0, $t6, 0x20
/* C9030 80132930 ADE20000 */ sw $v0, 0x0($t7)
/* C9034 80132934 3C02E800 */ lui $v0, (0xE8000000 >> 16)
/* C9038 80132938 AC830004 */ sw $v1, 0x4($a0)
/* C903C 8013293C ADC20000 */ sw $v0, 0x0($t6)
/* C9040 80132940 3C020700 */ lui $v0, (0x7000000 >> 16)
/* C9044 80132944 ADC2000C */ sw $v0, 0xC($t6)
/* C9048 80132948 3C02F000 */ lui $v0, (0xF0000000 >> 16)
/* C904C 8013294C ADC20018 */ sw $v0, 0x18($t6)
/* C9050 80132950 3C028015 */ lui $v0, %hi(gSpriteShadingProfile)
/* C9054 80132954 8C421328 */ lw $v0, %lo(gSpriteShadingProfile)($v0)
/* C9058 80132958 3C11E700 */ lui $s1, (0xE7000000 >> 16)
/* C905C 8013295C ADC00004 */ sw $zero, 0x4($t6)
/* C9060 80132960 ADC50008 */ sw $a1, 0x8($t6)
/* C9064 80132964 ADD00010 */ sw $s0, 0x10($t6)
/* C9068 80132968 ADC00014 */ sw $zero, 0x14($t6)
/* C906C 8013296C ADC6001C */ sw $a2, 0x1C($t6)
/* C9070 80132970 ADD10020 */ sw $s1, 0x20($t6)
/* C9074 80132974 ADC00024 */ sw $zero, 0x24($t6)
/* C9078 80132978 94430000 */ lhu $v1, 0x0($v0)
/* C907C 8013297C 25C20028 */ addiu $v0, $t6, 0x28
/* C9080 80132980 10600060 */ beqz $v1, .L80132B04
/* C9084 80132984 ADE20000 */ sw $v0, 0x0($t7)
/* C9088 80132988 3C03FD48 */ lui $v1, (0xFD48000F >> 16)
/* C908C 8013298C 3463000F */ ori $v1, $v1, (0xFD48000F & 0xFFFF)
/* C9090 80132990 3C07F548 */ lui $a3, (0xF5480400 >> 16)
/* C9094 80132994 34E70400 */ ori $a3, $a3, (0xF5480400 & 0xFFFF)
/* C9098 80132998 3C05070A */ lui $a1, (0x70A0280 >> 16)
/* C909C 8013299C 34A50280 */ ori $a1, $a1, (0x70A0280 & 0xFFFF)
/* C90A0 801329A0 3C0B0703 */ lui $t3, (0x703E07C >> 16)
/* C90A4 801329A4 356BE07C */ ori $t3, $t3, (0x703E07C & 0xFFFF)
/* C90A8 801329A8 3C04F540 */ lui $a0, (0xF5400400 >> 16)
/* C90AC 801329AC 34840400 */ ori $a0, $a0, (0xF5400400 & 0xFFFF)
/* C90B0 801329B0 3C0C010A */ lui $t4, (0x10A0280 >> 16)
/* C90B4 801329B4 358C0280 */ ori $t4, $t4, (0x10A0280 & 0xFFFF)
/* C90B8 801329B8 3C0AF240 */ lui $t2, (0xF2400400 >> 16)
/* C90BC 801329BC 354A0400 */ ori $t2, $t2, (0xF2400400 & 0xFFFF)
/* C90C0 801329C0 3C080147 */ lui $t0, (0x147C47C >> 16)
/* C90C4 801329C4 3508C47C */ ori $t0, $t0, (0x147C47C & 0xFFFF)
/* C90C8 801329C8 3C09001A */ lui $t1, (0x1A0280 >> 16)
/* C90CC 801329CC 35290280 */ ori $t1, $t1, (0x1A0280 & 0xFFFF)
/* C90D0 801329D0 3C06F510 */ lui $a2, (0xF5100900 >> 16)
/* C90D4 801329D4 34C60900 */ ori $a2, $a2, (0xF5100900 & 0xFFFF)
/* C90D8 801329D8 3C0D020F */ lui $t5, (0x20FC000 >> 16)
/* C90DC 801329DC 35ADC000 */ ori $t5, $t5, (0x20FC000 & 0xFFFF)
/* C90E0 801329E0 25C20030 */ addiu $v0, $t6, 0x30
/* C90E4 801329E4 ADE20000 */ sw $v0, 0x0($t7)
/* C90E8 801329E8 ADC30028 */ sw $v1, 0x28($t6)
/* C90EC 801329EC 9263002C */ lbu $v1, 0x2C($s3)
/* C90F0 801329F0 25C20038 */ addiu $v0, $t6, 0x38
/* C90F4 801329F4 ADE20000 */ sw $v0, 0x0($t7)
/* C90F8 801329F8 25C20040 */ addiu $v0, $t6, 0x40
/* C90FC 801329FC ADE20000 */ sw $v0, 0x0($t7)
/* C9100 80132A00 25C20048 */ addiu $v0, $t6, 0x48
/* C9104 80132A04 ADE20000 */ sw $v0, 0x0($t7)
/* C9108 80132A08 25C20050 */ addiu $v0, $t6, 0x50
/* C910C 80132A0C ADE20000 */ sw $v0, 0x0($t7)
/* C9110 80132A10 25C20058 */ addiu $v0, $t6, 0x58
/* C9114 80132A14 ADE20000 */ sw $v0, 0x0($t7)
/* C9118 80132A18 25C20060 */ addiu $v0, $t6, 0x60
/* C911C 80132A1C ADE20000 */ sw $v0, 0x0($t7)
/* C9120 80132A20 25C20068 */ addiu $v0, $t6, 0x68
/* C9124 80132A24 ADE20000 */ sw $v0, 0x0($t7)
/* C9128 80132A28 25C20070 */ addiu $v0, $t6, 0x70
/* C912C 80132A2C ADE20000 */ sw $v0, 0x0($t7)
/* C9130 80132A30 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster)
/* C9134 80132A34 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0)
/* C9138 80132A38 000318C0 */ sll $v1, $v1, 3
/* C913C 80132A3C 00621821 */ addu $v1, $v1, $v0
/* C9140 80132A40 8C630004 */ lw $v1, 0x4($v1)
/* C9144 80132A44 25C20078 */ addiu $v0, $t6, 0x78
/* C9148 80132A48 ADE20000 */ sw $v0, 0x0($t7)
/* C914C 80132A4C 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* C9150 80132A50 ADC20040 */ sw $v0, 0x40($t6)
/* C9154 80132A54 3C020200 */ lui $v0, (0x2000000 >> 16)
/* C9158 80132A58 ADC2006C */ sw $v0, 0x6C($t6)
/* C915C 80132A5C 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* C9160 80132A60 ADC70030 */ sw $a3, 0x30($t6)
/* C9164 80132A64 ADC50034 */ sw $a1, 0x34($t6)
/* C9168 80132A68 ADD00038 */ sw $s0, 0x38($t6)
/* C916C 80132A6C ADC0003C */ sw $zero, 0x3C($t6)
/* C9170 80132A70 ADCB0044 */ sw $t3, 0x44($t6)
/* C9174 80132A74 ADD10048 */ sw $s1, 0x48($t6)
/* C9178 80132A78 ADC0004C */ sw $zero, 0x4C($t6)
/* C917C 80132A7C ADC40050 */ sw $a0, 0x50($t6)
/* C9180 80132A80 ADCC0054 */ sw $t4, 0x54($t6)
/* C9184 80132A84 ADCA0058 */ sw $t2, 0x58($t6)
/* C9188 80132A88 ADC8005C */ sw $t0, 0x5C($t6)
/* C918C 80132A8C ADC40060 */ sw $a0, 0x60($t6)
/* C9190 80132A90 ADC90064 */ sw $t1, 0x64($t6)
/* C9194 80132A94 ADC60068 */ sw $a2, 0x68($t6)
/* C9198 80132A98 ADC20070 */ sw $v0, 0x70($t6)
/* C919C 80132A9C ADCD0074 */ sw $t5, 0x74($t6)
/* C91A0 80132AA0 ADC3002C */ sw $v1, 0x2C($t6)
/* C91A4 80132AA4 8E620000 */ lw $v0, 0x0($s3)
/* C91A8 80132AA8 3C030808 */ lui $v1, (0x8080000 >> 16)
/* C91AC 80132AAC 00431024 */ and $v0, $v0, $v1
/* C91B0 80132AB0 1040000A */ beqz $v0, .L80132ADC
/* C91B4 80132AB4 27A40058 */ addiu $a0, $sp, 0x58
/* C91B8 80132AB8 0000282D */ daddu $a1, $zero, $zero
/* C91BC 80132ABC 00A0302D */ daddu $a2, $a1, $zero
/* C91C0 80132AC0 24070020 */ addiu $a3, $zero, 0x20
/* C91C4 80132AC4 00E0102D */ daddu $v0, $a3, $zero
/* C91C8 80132AC8 AFA20010 */ sw $v0, 0x10($sp)
/* C91CC 80132ACC 0C052479 */ jal func_801491E4
/* C91D0 80132AD0 AFB40014 */ sw $s4, 0x14($sp)
/* C91D4 80132AD4 0804CAF4 */ j .L80132BD0
/* C91D8 80132AD8 00000000 */ nop
.L80132ADC:
/* C91DC 80132ADC 0000282D */ daddu $a1, $zero, $zero
/* C91E0 80132AE0 00A0302D */ daddu $a2, $a1, $zero
/* C91E4 80132AE4 24070020 */ addiu $a3, $zero, 0x20
/* C91E8 80132AE8 00E0102D */ daddu $v0, $a3, $zero
/* C91EC 80132AEC AFA20010 */ sw $v0, 0x10($sp)
/* C91F0 80132AF0 240200FF */ addiu $v0, $zero, 0xFF
/* C91F4 80132AF4 0C052479 */ jal func_801491E4
/* C91F8 80132AF8 AFA20014 */ sw $v0, 0x14($sp)
/* C91FC 80132AFC 0804CAF4 */ j .L80132BD0
/* C9200 80132B00 00000000 */ nop
.L80132B04:
/* C9204 80132B04 3C03FD48 */ lui $v1, (0xFD48000F >> 16)
/* C9208 80132B08 3463000F */ ori $v1, $v1, (0xFD48000F & 0xFFFF)
/* C920C 80132B0C 3C05F548 */ lui $a1, (0xF5480400 >> 16)
/* C9210 80132B10 34A50400 */ ori $a1, $a1, (0xF5480400 & 0xFFFF)
/* C9214 80132B14 3C04070A */ lui $a0, (0x70A0280 >> 16)
/* C9218 80132B18 34840280 */ ori $a0, $a0, (0x70A0280 & 0xFFFF)
/* C921C 80132B1C 3C080703 */ lui $t0, (0x703E07C >> 16)
/* C9220 80132B20 3508E07C */ ori $t0, $t0, (0x703E07C & 0xFFFF)
/* C9224 80132B24 3C0AF540 */ lui $t2, (0xF5400400 >> 16)
/* C9228 80132B28 354A0400 */ ori $t2, $t2, (0xF5400400 & 0xFFFF)
/* C922C 80132B2C 3C09000A */ lui $t1, (0xA0280 >> 16)
/* C9230 80132B30 35290280 */ ori $t1, $t1, (0xA0280 & 0xFFFF)
/* C9234 80132B34 3C07F240 */ lui $a3, (0xF2400400 >> 16)
/* C9238 80132B38 34E70400 */ ori $a3, $a3, (0xF2400400 & 0xFFFF)
/* C923C 80132B3C 3C060047 */ lui $a2, (0x47C47C >> 16)
/* C9240 80132B40 34C6C47C */ ori $a2, $a2, (0x47C47C & 0xFFFF)
/* C9244 80132B44 25C20030 */ addiu $v0, $t6, 0x30
/* C9248 80132B48 ADE20000 */ sw $v0, 0x0($t7)
/* C924C 80132B4C ADC30028 */ sw $v1, 0x28($t6)
/* C9250 80132B50 9263002C */ lbu $v1, 0x2C($s3)
/* C9254 80132B54 25C20038 */ addiu $v0, $t6, 0x38
/* C9258 80132B58 ADE20000 */ sw $v0, 0x0($t7)
/* C925C 80132B5C 25C20040 */ addiu $v0, $t6, 0x40
/* C9260 80132B60 ADE20000 */ sw $v0, 0x0($t7)
/* C9264 80132B64 25C20048 */ addiu $v0, $t6, 0x48
/* C9268 80132B68 ADE20000 */ sw $v0, 0x0($t7)
/* C926C 80132B6C 25C20050 */ addiu $v0, $t6, 0x50
/* C9270 80132B70 ADE20000 */ sw $v0, 0x0($t7)
/* C9274 80132B74 25C20058 */ addiu $v0, $t6, 0x58
/* C9278 80132B78 ADE20000 */ sw $v0, 0x0($t7)
/* C927C 80132B7C 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster)
/* C9280 80132B80 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0)
/* C9284 80132B84 000318C0 */ sll $v1, $v1, 3
/* C9288 80132B88 00621821 */ addu $v1, $v1, $v0
/* C928C 80132B8C 8C630004 */ lw $v1, 0x4($v1)
/* C9290 80132B90 25C20060 */ addiu $v0, $t6, 0x60
/* C9294 80132B94 ADE20000 */ sw $v0, 0x0($t7)
/* C9298 80132B98 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* C929C 80132B9C ADC50030 */ sw $a1, 0x30($t6)
/* C92A0 80132BA0 ADC40034 */ sw $a0, 0x34($t6)
/* C92A4 80132BA4 ADD00038 */ sw $s0, 0x38($t6)
/* C92A8 80132BA8 ADC0003C */ sw $zero, 0x3C($t6)
/* C92AC 80132BAC ADC20040 */ sw $v0, 0x40($t6)
/* C92B0 80132BB0 ADC80044 */ sw $t0, 0x44($t6)
/* C92B4 80132BB4 ADD10048 */ sw $s1, 0x48($t6)
/* C92B8 80132BB8 ADC0004C */ sw $zero, 0x4C($t6)
/* C92BC 80132BBC ADCA0050 */ sw $t2, 0x50($t6)
/* C92C0 80132BC0 ADC90054 */ sw $t1, 0x54($t6)
/* C92C4 80132BC4 ADC70058 */ sw $a3, 0x58($t6)
/* C92C8 80132BC8 ADC6005C */ sw $a2, 0x5C($t6)
/* C92CC 80132BCC ADC3002C */ sw $v1, 0x2C($t6)
.L80132BD0:
/* C92D0 80132BD0 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* C92D4 80132BD4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* C92D8 80132BD8 8C620000 */ lw $v0, 0x0($v1)
/* C92DC 80132BDC 0040202D */ daddu $a0, $v0, $zero
/* C92E0 80132BE0 24420008 */ addiu $v0, $v0, 0x8
/* C92E4 80132BE4 AC620000 */ sw $v0, 0x0($v1)
/* C92E8 80132BE8 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* C92EC 80132BEC AC820000 */ sw $v0, 0x0($a0)
/* C92F0 80132BF0 3C028015 */ lui $v0, %hi(D_8014C6A0)
/* C92F4 80132BF4 2442C6A0 */ addiu $v0, $v0, %lo(D_8014C6A0)
/* C92F8 80132BF8 AC820004 */ sw $v0, 0x4($a0)
.L80132BFC:
/* C92FC 80132BFC 3C03D838 */ lui $v1, (0xD8380002 >> 16)
/* C9300 80132C00 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* C9304 80132C04 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* C9308 80132C08 8C820000 */ lw $v0, 0x0($a0)
/* C930C 80132C0C 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF)
/* C9310 80132C10 0040282D */ daddu $a1, $v0, $zero
/* C9314 80132C14 24420008 */ addiu $v0, $v0, 0x8
/* C9318 80132C18 AC820000 */ sw $v0, 0x0($a0)
/* C931C 80132C1C ACA30000 */ sw $v1, 0x0($a1)
/* C9320 80132C20 24030040 */ addiu $v1, $zero, 0x40
/* C9324 80132C24 ACA30004 */ sw $v1, 0x4($a1)
/* C9328 80132C28 24430008 */ addiu $v1, $v0, 0x8
/* C932C 80132C2C AC830000 */ sw $v1, 0x0($a0)
/* C9330 80132C30 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* C9334 80132C34 AC430000 */ sw $v1, 0x0($v0)
/* C9338 80132C38 AC400004 */ sw $zero, 0x4($v0)
/* C933C 80132C3C 86630018 */ lh $v1, 0x18($s3)
/* C9340 80132C40 24020157 */ addiu $v0, $zero, 0x157
/* C9344 80132C44 14620003 */ bne $v1, $v0, .L80132C54
/* C9348 80132C48 00000000 */ nop
/* C934C 80132C4C 0C04C2C3 */ jal draw_coin_sparkles
/* C9350 80132C50 0260202D */ daddu $a0, $s3, $zero
.L80132C54:
/* C9354 80132C54 8FBF013C */ lw $ra, 0x13C($sp)
/* C9358 80132C58 8FB60138 */ lw $s6, 0x138($sp)
/* C935C 80132C5C 8FB50134 */ lw $s5, 0x134($sp)
/* C9360 80132C60 8FB40130 */ lw $s4, 0x130($sp)
/* C9364 80132C64 8FB3012C */ lw $s3, 0x12C($sp)
/* C9368 80132C68 8FB20128 */ lw $s2, 0x128($sp)
/* C936C 80132C6C 8FB10124 */ lw $s1, 0x124($sp)
/* C9370 80132C70 8FB00120 */ lw $s0, 0x120($sp)
/* C9374 80132C74 D7B40140 */ ldc1 $f20, 0x140($sp)
/* C9378 80132C78 03E00008 */ jr $ra
/* C937C 80132C7C 27BD0148 */ addiu $sp, $sp, 0x148
### DECOMPILED C INSTRUCTIONS:
void appendGfx_item_entity(void* data) {
ItemEntity* item = (ItemEntity*)data;
Mtx mtxTransform;
Matrix4f mtxTranslate, mtxRotY, mtxScale;
s32 alpha = 255;
s32 yOffset;
f32 rot;
if (item->flags & (ITEM_ENTITY_FLAG_HIDING | ITEM_ENTITY_FLAG_TRANSPARENT)) {
if (item->flags & ITEM_ENTITY_FLAG_TRANSPARENT) {
alpha = 255;
alpha = (item->alpha * alpha) / 255;
}
if (item->flags & ITEM_ENTITY_FLAG_HIDING) {
u8 r, g, b, a;
get_background_color_blend(&r, &g, &b, &a);
alpha = (alpha * (255 - a)) / 255;
}
}
if (!(item->flags & ITEM_ENTITY_FLAG_40000)) {
yOffset = -2;
} else {
yOffset = -3;
}
if (item->itemID == ITEM_COIN || item->itemID == ITEM_STAR_POINT || item->itemID == ITEM_HEART) {
item->scale = 1.0f;
}
rot = clamp_angle(180.0f - gCameras[gCurrentCamID].currentYaw);
guTranslateF(mtxTranslate, item->position.x, item->position.y + yOffset, item->position.z);
guRotateF(mtxRotY, rot, 0.0f, 1.0f, 0.0f);
if (item->flags & ITEM_ENTITY_RESIZABLE) {
guScaleF(mtxScale, item->scale, item->scale, item->scale);
guMtxCatF(mtxRotY, mtxScale, mtxRotY);
}
guMtxCatF(mtxRotY, mtxTranslate, mtxTranslate);
guMtxF2L(mtxTranslate, &mtxTransform);
gDisplayContext->matrixStack[gMatrixListPos] = mtxTransform;
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (gSpriteShadingProfile->flags != 0) {
gSPDisplayList(gMainGfxPos++, D_8014BBD8);
} else {
gSPDisplayList(gMainGfxPos++, D_8014B870);
}
gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH | G_LIGHTING);
gSPDisplayList(gMainGfxPos++, D_8014C620);
if (item->flags & (ITEM_ENTITY_FLAG_HIDING | ITEM_ENTITY_FLAG_TRANSPARENT)) {
if (gSpriteShadingProfile->flags != 0) {
gDPSetRenderMode(gMainGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | G_RM_PASS,
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL |
GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
} else {
gDPSetRenderMode(gMainGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL |
GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA),
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL |
GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
gDPSetCombineLERP(gMainGfxPos++, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, alpha);
}
}
if (!(item->flags & ITEM_ENTITY_FLAG_40000)) {
gDPLoadTLUT_pal16(gMainGfxPos++, 0, gHudElementCacheTablePalette[item->lookupPaletteIndex].data);
if (gSpriteShadingProfile->flags != 0) {
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR |
G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPLoadSync(gMainGfxPos++);
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
gDPPipeSync(gMainGfxPos++);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8,
G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, 1, 0x0400, 0x0400, 0x045C, 0x045C);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1,
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 0x00FC, 0);
if (item->flags & (ITEM_ENTITY_FLAG_HIDING | ITEM_ENTITY_FLAG_TRANSPARENT)) {
func_801491E4(mtxTranslate, 0, 0, 24, 24, alpha);
} else {
func_801491E4(mtxTranslate, 0, 0, 24, 24, 255);
}
} else {
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0,
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPLoadSync(gMainGfxPos++);
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
gDPPipeSync(gMainGfxPos++);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0,
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x045C, 0x045C);
}
gSPDisplayList(gMainGfxPos++, D_8014C678);
} else {
gDPLoadTLUT_pal16(gMainGfxPos++, 0, gHudElementCacheTablePalette[item->lookupPaletteIndex].data);
if (gSpriteShadingProfile->flags != 0) {
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0,
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPLoadSync(gMainGfxPos++);
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
gDPPipeSync(gMainGfxPos++);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP,
8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, 1, 0x0400, 0x0400, 0x047C, 0x047C);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1,
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 0x00FC, 0);
if (item->flags & (ITEM_ENTITY_FLAG_HIDING | ITEM_ENTITY_FLAG_TRANSPARENT)) {
func_801491E4(mtxTranslate, 0, 0, 32, 32, alpha);
} else {
func_801491E4(mtxTranslate, 0, 0, 32, 32, 255);
}
} else {
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0,
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPLoadSync(gMainGfxPos++);
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
gDPPipeSync(gMainGfxPos++);
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0,
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x047C, 0x047C);
}
gSPDisplayList(gMainGfxPos++, D_8014C6A0);
}
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMainGfxPos++);
if (item->itemID == ITEM_COIN) {
draw_coin_sparkles(item);
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel draw_entity_model_E
/* B8988 80122288 27BDFF08 */ addiu $sp, $sp, -0xF8
/* B898C 8012228C 2402F7FF */ addiu $v0, $zero, -0x801
/* B8990 80122290 00822024 */ and $a0, $a0, $v0
/* B8994 80122294 3C028015 */ lui $v0, %hi(gCurrentEntityModelList)
/* B8998 80122298 8C424370 */ lw $v0, %lo(gCurrentEntityModelList)($v0)
/* B899C 8012229C 00042080 */ sll $a0, $a0, 2
/* B89A0 801222A0 AFBF00F4 */ sw $ra, 0xF4($sp)
/* B89A4 801222A4 AFB200F0 */ sw $s2, 0xF0($sp)
/* B89A8 801222A8 AFB100EC */ sw $s1, 0xEC($sp)
/* B89AC 801222AC AFB000E8 */ sw $s0, 0xE8($sp)
/* B89B0 801222B0 00822021 */ addu $a0, $a0, $v0
/* B89B4 801222B4 8C920000 */ lw $s2, 0x0($a0)
/* B89B8 801222B8 124002AA */ beqz $s2, .L80122D64
/* B89BC 801222BC 00000000 */ nop
/* B89C0 801222C0 8E430000 */ lw $v1, 0x0($s2)
/* B89C4 801222C4 106002A7 */ beqz $v1, .L80122D64
/* B89C8 801222C8 30620100 */ andi $v0, $v1, 0x100
/* B89CC 801222CC 144002A5 */ bnez $v0, .L80122D64
/* B89D0 801222D0 30620020 */ andi $v0, $v1, 0x20
/* B89D4 801222D4 144002A3 */ bnez $v0, .L80122D64
/* B89D8 801222D8 30620040 */ andi $v0, $v1, 0x40
/* B89DC 801222DC 144002A1 */ bnez $v0, .L80122D64
/* B89E0 801222E0 30620008 */ andi $v0, $v1, 0x8
/* B89E4 801222E4 1040029F */ beqz $v0, .L80122D64
/* B89E8 801222E8 26420018 */ addiu $v0, $s2, 0x18
/* B89EC 801222EC 24A30040 */ addiu $v1, $a1, 0x40
.L801222F0:
/* B89F0 801222F0 8CAE0000 */ lw $t6, 0x0($a1)
/* B89F4 801222F4 8CAF0004 */ lw $t7, 0x4($a1)
/* B89F8 801222F8 8CB80008 */ lw $t8, 0x8($a1)
/* B89FC 801222FC 8CB9000C */ lw $t9, 0xC($a1)
/* B8A00 80122300 AC4E0000 */ sw $t6, 0x0($v0)
/* B8A04 80122304 AC4F0004 */ sw $t7, 0x4($v0)
/* B8A08 80122308 AC580008 */ sw $t8, 0x8($v0)
/* B8A0C 8012230C AC59000C */ sw $t9, 0xC($v0)
/* B8A10 80122310 24A50010 */ addiu $a1, $a1, 0x10
/* B8A14 80122314 14A3FFF6 */ bne $a1, $v1, .L801222F0
/* B8A18 80122318 24420010 */ addiu $v0, $v0, 0x10
/* B8A1C 8012231C 3C020001 */ lui $v0, (0x11630 >> 16)
/* B8A20 80122320 34421630 */ ori $v0, $v0, (0x11630 & 0xFFFF)
/* B8A24 80122324 26450018 */ addiu $a1, $s2, 0x18
/* B8A28 80122328 3C038007 */ lui $v1, %hi(gMatrixListPos)
/* B8A2C 8012232C 946341F0 */ lhu $v1, %lo(gMatrixListPos)($v1)
/* B8A30 80122330 3C04800A */ lui $a0, %hi(gDisplayContext)
/* B8A34 80122334 8C84A674 */ lw $a0, %lo(gDisplayContext)($a0)
/* B8A38 80122338 26460058 */ addiu $a2, $s2, 0x58
/* B8A3C 8012233C AE40005C */ sw $zero, 0x5C($s2)
/* B8A40 80122340 00031980 */ sll $v1, $v1, 6
/* B8A44 80122344 00832021 */ addu $a0, $a0, $v1
/* B8A48 80122348 00822021 */ addu $a0, $a0, $v0
.L8012234C:
/* B8A4C 8012234C 8CAE0000 */ lw $t6, 0x0($a1)
/* B8A50 80122350 8CAF0004 */ lw $t7, 0x4($a1)
/* B8A54 80122354 8CB80008 */ lw $t8, 0x8($a1)
/* B8A58 80122358 8CB9000C */ lw $t9, 0xC($a1)
/* B8A5C 8012235C AC8E0000 */ sw $t6, 0x0($a0)
/* B8A60 80122360 AC8F0004 */ sw $t7, 0x4($a0)
/* B8A64 80122364 AC980008 */ sw $t8, 0x8($a0)
/* B8A68 80122368 AC99000C */ sw $t9, 0xC($a0)
/* B8A6C 8012236C 24A50010 */ addiu $a1, $a1, 0x10
/* B8A70 80122370 14A6FFF6 */ bne $a1, $a2, .L8012234C
/* B8A74 80122374 24840010 */ addiu $a0, $a0, 0x10
/* B8A78 80122378 3C02DA38 */ lui $v0, (0xDA380002 >> 16)
/* B8A7C 8012237C 34420002 */ ori $v0, $v0, (0xDA380002 & 0xFFFF)
/* B8A80 80122380 3C070001 */ lui $a3, (0x11630 >> 16)
/* B8A84 80122384 3C0D800A */ lui $t5, %hi(gMainGfxPos)
/* B8A88 80122388 25ADA66C */ addiu $t5, $t5, %lo(gMainGfxPos)
/* B8A8C 8012238C 34E71630 */ ori $a3, $a3, (0x11630 & 0xFFFF)
/* B8A90 80122390 3C068007 */ lui $a2, %hi(gMatrixListPos)
/* B8A94 80122394 24C641F0 */ addiu $a2, $a2, %lo(gMatrixListPos)
/* B8A98 80122398 8DAC0000 */ lw $t4, 0x0($t5)
/* B8A9C 8012239C 94C40000 */ lhu $a0, 0x0($a2)
/* B8AA0 801223A0 0180282D */ daddu $a1, $t4, $zero
/* B8AA4 801223A4 258C0008 */ addiu $t4, $t4, 0x8
/* B8AA8 801223A8 ADAC0000 */ sw $t4, 0x0($t5)
/* B8AAC 801223AC ACA20000 */ sw $v0, 0x0($a1)
/* B8AB0 801223B0 3082FFFF */ andi $v0, $a0, 0xFFFF
/* B8AB4 801223B4 00021180 */ sll $v0, $v0, 6
/* B8AB8 801223B8 3C03800A */ lui $v1, %hi(gDisplayContext)
/* B8ABC 801223BC 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* B8AC0 801223C0 00471021 */ addu $v0, $v0, $a3
/* B8AC4 801223C4 00621821 */ addu $v1, $v1, $v0
/* B8AC8 801223C8 ACA30004 */ sw $v1, 0x4($a1)
/* B8ACC 801223CC 8E450000 */ lw $a1, 0x0($s2)
/* B8AD0 801223D0 24840001 */ addiu $a0, $a0, 0x1
/* B8AD4 801223D4 30A20400 */ andi $v0, $a1, 0x400
/* B8AD8 801223D8 144001F6 */ bnez $v0, .L80122BB4
/* B8ADC 801223DC A4C40000 */ sh $a0, 0x0($a2)
/* B8AE0 801223E0 3C028015 */ lui $v0, %hi(entity_fog_enabled)
/* B8AE4 801223E4 8C424378 */ lw $v0, %lo(entity_fog_enabled)($v0)
/* B8AE8 801223E8 10400003 */ beqz $v0, .L801223F8
/* B8AEC 801223EC 0000182D */ daddu $v1, $zero, $zero
/* B8AF0 801223F0 30A20800 */ andi $v0, $a1, 0x800
/* B8AF4 801223F4 2C430001 */ sltiu $v1, $v0, 0x1
.L801223F8:
/* B8AF8 801223F8 10600005 */ beqz $v1, .L80122410
/* B8AFC 801223FC 24020001 */ addiu $v0, $zero, 0x1
/* B8B00 80122400 106200C3 */ beq $v1, $v0, .L80122710
/* B8B04 80122404 3C02D9FD */ lui $v0, (0xD9FDFFFF >> 16)
/* B8B08 80122408 08048A61 */ j .L80122984
/* B8B0C 8012240C 00000000 */ nop
.L80122410:
/* B8B10 80122410 92420004 */ lbu $v0, 0x4($s2)
/* B8B14 80122414 2442FFFF */ addiu $v0, $v0, -0x1
/* B8B18 80122418 00021600 */ sll $v0, $v0, 24
/* B8B1C 8012241C 00021E03 */ sra $v1, $v0, 24
/* B8B20 80122420 2C62002D */ sltiu $v0, $v1, 0x2D
/* B8B24 80122424 10400156 */ beqz $v0, .L80122980
/* B8B28 80122428 00031080 */ sll $v0, $v1, 2
/* B8B2C 8012242C 3C018015 */ lui $at, %hi(jtbl_80150220)
/* B8B30 80122430 00220821 */ addu $at, $at, $v0
/* B8B34 80122434 8C220220 */ lw $v0, %lo(jtbl_80150220)($at)
/* B8B38 80122438 00400008 */ jr $v0
/* B8B3C 8012243C 00000000 */ nop
glabel .L80122440
/* B8B40 80122440 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8B44 80122444 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8B48 80122448 8C620000 */ lw $v0, 0x0($v1)
/* B8B4C 8012244C 0040202D */ daddu $a0, $v0, $zero
/* B8B50 80122450 24420008 */ addiu $v0, $v0, 0x8
/* B8B54 80122454 AC620000 */ sw $v0, 0x0($v1)
/* B8B58 80122458 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8B5C 8012245C AC820000 */ sw $v0, 0x0($a0)
/* B8B60 80122460 3C028015 */ lui $v0, %hi(D_8014B7F8)
/* B8B64 80122464 2442B7F8 */ addiu $v0, $v0, %lo(D_8014B7F8)
/* B8B68 80122468 08048A60 */ j .L80122980
/* B8B6C 8012246C AC820004 */ sw $v0, 0x4($a0)
glabel .L80122470
/* B8B70 80122470 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8B74 80122474 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8B78 80122478 8C620000 */ lw $v0, 0x0($v1)
/* B8B7C 8012247C 0040202D */ daddu $a0, $v0, $zero
/* B8B80 80122480 24420008 */ addiu $v0, $v0, 0x8
/* B8B84 80122484 AC620000 */ sw $v0, 0x0($v1)
/* B8B88 80122488 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8B8C 8012248C AC820000 */ sw $v0, 0x0($a0)
/* B8B90 80122490 3C028015 */ lui $v0, %hi(D_8014B820)
/* B8B94 80122494 2442B820 */ addiu $v0, $v0, %lo(D_8014B820)
/* B8B98 80122498 08048A60 */ j .L80122980
/* B8B9C 8012249C AC820004 */ sw $v0, 0x4($a0)
glabel .L801224A0
/* B8BA0 801224A0 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8BA4 801224A4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8BA8 801224A8 8C620000 */ lw $v0, 0x0($v1)
/* B8BAC 801224AC 0040202D */ daddu $a0, $v0, $zero
/* B8BB0 801224B0 24420008 */ addiu $v0, $v0, 0x8
/* B8BB4 801224B4 AC620000 */ sw $v0, 0x0($v1)
/* B8BB8 801224B8 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8BBC 801224BC AC820000 */ sw $v0, 0x0($a0)
/* B8BC0 801224C0 3C028015 */ lui $v0, %hi(D_8014B848)
/* B8BC4 801224C4 2442B848 */ addiu $v0, $v0, %lo(D_8014B848)
/* B8BC8 801224C8 08048A60 */ j .L80122980
/* B8BCC 801224CC AC820004 */ sw $v0, 0x4($a0)
glabel .L801224D0
/* B8BD0 801224D0 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8BD4 801224D4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8BD8 801224D8 8C620000 */ lw $v0, 0x0($v1)
/* B8BDC 801224DC 0040202D */ daddu $a0, $v0, $zero
/* B8BE0 801224E0 24420008 */ addiu $v0, $v0, 0x8
/* B8BE4 801224E4 AC620000 */ sw $v0, 0x0($v1)
/* B8BE8 801224E8 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8BEC 801224EC AC820000 */ sw $v0, 0x0($a0)
/* B8BF0 801224F0 3C028015 */ lui $v0, %hi(D_8014B870)
/* B8BF4 801224F4 2442B870 */ addiu $v0, $v0, %lo(D_8014B870)
/* B8BF8 801224F8 08048A60 */ j .L80122980
/* B8BFC 801224FC AC820004 */ sw $v0, 0x4($a0)
glabel .L80122500
/* B8C00 80122500 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8C04 80122504 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8C08 80122508 8C620000 */ lw $v0, 0x0($v1)
/* B8C0C 8012250C 0040202D */ daddu $a0, $v0, $zero
/* B8C10 80122510 24420008 */ addiu $v0, $v0, 0x8
/* B8C14 80122514 AC620000 */ sw $v0, 0x0($v1)
/* B8C18 80122518 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8C1C 8012251C AC820000 */ sw $v0, 0x0($a0)
/* B8C20 80122520 3C028015 */ lui $v0, %hi(D_8014B898)
/* B8C24 80122524 2442B898 */ addiu $v0, $v0, %lo(D_8014B898)
/* B8C28 80122528 08048A60 */ j .L80122980
/* B8C2C 8012252C AC820004 */ sw $v0, 0x4($a0)
glabel .L80122530
/* B8C30 80122530 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8C34 80122534 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8C38 80122538 8C620000 */ lw $v0, 0x0($v1)
/* B8C3C 8012253C 0040202D */ daddu $a0, $v0, $zero
/* B8C40 80122540 24420008 */ addiu $v0, $v0, 0x8
/* B8C44 80122544 AC620000 */ sw $v0, 0x0($v1)
/* B8C48 80122548 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8C4C 8012254C AC820000 */ sw $v0, 0x0($a0)
/* B8C50 80122550 3C028015 */ lui $v0, %hi(D_8014B9B0)
/* B8C54 80122554 2442B9B0 */ addiu $v0, $v0, %lo(D_8014B9B0)
/* B8C58 80122558 08048A60 */ j .L80122980
/* B8C5C 8012255C AC820004 */ sw $v0, 0x4($a0)
glabel .L80122560
/* B8C60 80122560 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8C64 80122564 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8C68 80122568 8C620000 */ lw $v0, 0x0($v1)
/* B8C6C 8012256C 0040202D */ daddu $a0, $v0, $zero
/* B8C70 80122570 24420008 */ addiu $v0, $v0, 0x8
/* B8C74 80122574 AC620000 */ sw $v0, 0x0($v1)
/* B8C78 80122578 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8C7C 8012257C AC820000 */ sw $v0, 0x0($a0)
/* B8C80 80122580 3C028015 */ lui $v0, %hi(D_8014B8C0)
/* B8C84 80122584 2442B8C0 */ addiu $v0, $v0, %lo(D_8014B8C0)
/* B8C88 80122588 08048A60 */ j .L80122980
/* B8C8C 8012258C AC820004 */ sw $v0, 0x4($a0)
glabel .L80122590
/* B8C90 80122590 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8C94 80122594 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8C98 80122598 8C620000 */ lw $v0, 0x0($v1)
/* B8C9C 8012259C 0040202D */ daddu $a0, $v0, $zero
/* B8CA0 801225A0 24420008 */ addiu $v0, $v0, 0x8
/* B8CA4 801225A4 AC620000 */ sw $v0, 0x0($v1)
/* B8CA8 801225A8 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8CAC 801225AC AC820000 */ sw $v0, 0x0($a0)
/* B8CB0 801225B0 3C028015 */ lui $v0, %hi(D_8014B9D8)
/* B8CB4 801225B4 2442B9D8 */ addiu $v0, $v0, %lo(D_8014B9D8)
/* B8CB8 801225B8 08048A60 */ j .L80122980
/* B8CBC 801225BC AC820004 */ sw $v0, 0x4($a0)
glabel .L801225C0
/* B8CC0 801225C0 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8CC4 801225C4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8CC8 801225C8 8C620000 */ lw $v0, 0x0($v1)
/* B8CCC 801225CC 0040202D */ daddu $a0, $v0, $zero
/* B8CD0 801225D0 24420008 */ addiu $v0, $v0, 0x8
/* B8CD4 801225D4 AC620000 */ sw $v0, 0x0($v1)
/* B8CD8 801225D8 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8CDC 801225DC AC820000 */ sw $v0, 0x0($a0)
/* B8CE0 801225E0 3C028015 */ lui $v0, %hi(D_8014B8E8)
/* B8CE4 801225E4 2442B8E8 */ addiu $v0, $v0, %lo(D_8014B8E8)
/* B8CE8 801225E8 08048A60 */ j .L80122980
/* B8CEC 801225EC AC820004 */ sw $v0, 0x4($a0)
glabel .L801225F0
/* B8CF0 801225F0 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8CF4 801225F4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8CF8 801225F8 8C620000 */ lw $v0, 0x0($v1)
/* B8CFC 801225FC 0040202D */ daddu $a0, $v0, $zero
/* B8D00 80122600 24420008 */ addiu $v0, $v0, 0x8
/* B8D04 80122604 AC620000 */ sw $v0, 0x0($v1)
/* B8D08 80122608 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8D0C 8012260C AC820000 */ sw $v0, 0x0($a0)
/* B8D10 80122610 3C028015 */ lui $v0, %hi(D_8014BA00)
/* B8D14 80122614 2442BA00 */ addiu $v0, $v0, %lo(D_8014BA00)
/* B8D18 80122618 08048A60 */ j .L80122980
/* B8D1C 8012261C AC820004 */ sw $v0, 0x4($a0)
glabel .L80122620
/* B8D20 80122620 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8D24 80122624 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8D28 80122628 8C620000 */ lw $v0, 0x0($v1)
/* B8D2C 8012262C 0040202D */ daddu $a0, $v0, $zero
/* B8D30 80122630 24420008 */ addiu $v0, $v0, 0x8
/* B8D34 80122634 AC620000 */ sw $v0, 0x0($v1)
/* B8D38 80122638 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8D3C 8012263C AC820000 */ sw $v0, 0x0($a0)
/* B8D40 80122640 3C028015 */ lui $v0, %hi(D_8014B988)
/* B8D44 80122644 2442B988 */ addiu $v0, $v0, %lo(D_8014B988)
/* B8D48 80122648 08048A60 */ j .L80122980
/* B8D4C 8012264C AC820004 */ sw $v0, 0x4($a0)
glabel .L80122650
/* B8D50 80122650 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8D54 80122654 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8D58 80122658 8C620000 */ lw $v0, 0x0($v1)
/* B8D5C 8012265C 0040202D */ daddu $a0, $v0, $zero
/* B8D60 80122660 24420008 */ addiu $v0, $v0, 0x8
/* B8D64 80122664 AC620000 */ sw $v0, 0x0($v1)
/* B8D68 80122668 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8D6C 8012266C AC820000 */ sw $v0, 0x0($a0)
/* B8D70 80122670 3C028015 */ lui $v0, %hi(D_8014BA48)
/* B8D74 80122674 2442BA48 */ addiu $v0, $v0, %lo(D_8014BA48)
/* B8D78 80122678 08048A60 */ j .L80122980
/* B8D7C 8012267C AC820004 */ sw $v0, 0x4($a0)
glabel .L80122680
/* B8D80 80122680 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8D84 80122684 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8D88 80122688 8C620000 */ lw $v0, 0x0($v1)
/* B8D8C 8012268C 0040202D */ daddu $a0, $v0, $zero
/* B8D90 80122690 24420008 */ addiu $v0, $v0, 0x8
/* B8D94 80122694 AC620000 */ sw $v0, 0x0($v1)
/* B8D98 80122698 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8D9C 8012269C AC820000 */ sw $v0, 0x0($a0)
/* B8DA0 801226A0 3C028015 */ lui $v0, %hi(D_8014BA70)
/* B8DA4 801226A4 2442BA70 */ addiu $v0, $v0, %lo(D_8014BA70)
/* B8DA8 801226A8 08048A60 */ j .L80122980
/* B8DAC 801226AC AC820004 */ sw $v0, 0x4($a0)
glabel .L801226B0
/* B8DB0 801226B0 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8DB4 801226B4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8DB8 801226B8 8C620000 */ lw $v0, 0x0($v1)
/* B8DBC 801226BC 0040202D */ daddu $a0, $v0, $zero
/* B8DC0 801226C0 24420008 */ addiu $v0, $v0, 0x8
/* B8DC4 801226C4 AC620000 */ sw $v0, 0x0($v1)
/* B8DC8 801226C8 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8DCC 801226CC AC820000 */ sw $v0, 0x0($a0)
/* B8DD0 801226D0 3C028015 */ lui $v0, %hi(D_8014BA98)
/* B8DD4 801226D4 2442BA98 */ addiu $v0, $v0, %lo(D_8014BA98)
/* B8DD8 801226D8 08048A60 */ j .L80122980
/* B8DDC 801226DC AC820004 */ sw $v0, 0x4($a0)
glabel .L801226E0
/* B8DE0 801226E0 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8DE4 801226E4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8DE8 801226E8 8C620000 */ lw $v0, 0x0($v1)
/* B8DEC 801226EC 0040202D */ daddu $a0, $v0, $zero
/* B8DF0 801226F0 24420008 */ addiu $v0, $v0, 0x8
/* B8DF4 801226F4 AC620000 */ sw $v0, 0x0($v1)
/* B8DF8 801226F8 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8DFC 801226FC AC820000 */ sw $v0, 0x0($a0)
/* B8E00 80122700 3C028015 */ lui $v0, %hi(D_8014BAE8)
/* B8E04 80122704 2442BAE8 */ addiu $v0, $v0, %lo(D_8014BAE8)
/* B8E08 80122708 08048A60 */ j .L80122980
/* B8E0C 8012270C AC820004 */ sw $v0, 0x4($a0)
.L80122710:
/* B8E10 80122710 92420004 */ lbu $v0, 0x4($s2)
/* B8E14 80122714 2442FFFF */ addiu $v0, $v0, -0x1
/* B8E18 80122718 00021600 */ sll $v0, $v0, 24
/* B8E1C 8012271C 00021E03 */ sra $v1, $v0, 24
/* B8E20 80122720 2C620026 */ sltiu $v0, $v1, 0x26
/* B8E24 80122724 10400059 */ beqz $v0, .L8012288C
/* B8E28 80122728 00031080 */ sll $v0, $v1, 2
/* B8E2C 8012272C 3C018015 */ lui $at, %hi(jtbl_801502D8)
/* B8E30 80122730 00220821 */ addu $at, $at, $v0
/* B8E34 80122734 8C2202D8 */ lw $v0, %lo(jtbl_801502D8)($at)
/* B8E38 80122738 00400008 */ jr $v0
/* B8E3C 8012273C 00000000 */ nop
glabel .L80122740
/* B8E40 80122740 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8E44 80122744 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8E48 80122748 8C620000 */ lw $v0, 0x0($v1)
/* B8E4C 8012274C 0040202D */ daddu $a0, $v0, $zero
/* B8E50 80122750 24420008 */ addiu $v0, $v0, 0x8
/* B8E54 80122754 AC620000 */ sw $v0, 0x0($v1)
/* B8E58 80122758 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8E5C 8012275C AC820000 */ sw $v0, 0x0($a0)
/* B8E60 80122760 3C028015 */ lui $v0, %hi(D_8014BE78)
/* B8E64 80122764 2442BE78 */ addiu $v0, $v0, %lo(D_8014BE78)
/* B8E68 80122768 08048A23 */ j .L8012288C
/* B8E6C 8012276C AC820004 */ sw $v0, 0x4($a0)
glabel .L80122770
/* B8E70 80122770 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8E74 80122774 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8E78 80122778 8C620000 */ lw $v0, 0x0($v1)
/* B8E7C 8012277C 0040202D */ daddu $a0, $v0, $zero
/* B8E80 80122780 24420008 */ addiu $v0, $v0, 0x8
/* B8E84 80122784 AC620000 */ sw $v0, 0x0($v1)
/* B8E88 80122788 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8E8C 8012278C AC820000 */ sw $v0, 0x0($a0)
/* B8E90 80122790 3C028015 */ lui $v0, %hi(D_8014BEA0)
/* B8E94 80122794 2442BEA0 */ addiu $v0, $v0, %lo(D_8014BEA0)
/* B8E98 80122798 08048A23 */ j .L8012288C
/* B8E9C 8012279C AC820004 */ sw $v0, 0x4($a0)
glabel .L801227A0
/* B8EA0 801227A0 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8EA4 801227A4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8EA8 801227A8 8C620000 */ lw $v0, 0x0($v1)
/* B8EAC 801227AC 0040202D */ daddu $a0, $v0, $zero
/* B8EB0 801227B0 24420008 */ addiu $v0, $v0, 0x8
/* B8EB4 801227B4 AC620000 */ sw $v0, 0x0($v1)
/* B8EB8 801227B8 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8EBC 801227BC AC820000 */ sw $v0, 0x0($a0)
/* B8EC0 801227C0 3C028015 */ lui $v0, %hi(D_8014BEC8)
/* B8EC4 801227C4 2442BEC8 */ addiu $v0, $v0, %lo(D_8014BEC8)
/* B8EC8 801227C8 08048A23 */ j .L8012288C
/* B8ECC 801227CC AC820004 */ sw $v0, 0x4($a0)
glabel .L801227D0
/* B8ED0 801227D0 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8ED4 801227D4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8ED8 801227D8 8C620000 */ lw $v0, 0x0($v1)
/* B8EDC 801227DC 0040202D */ daddu $a0, $v0, $zero
/* B8EE0 801227E0 24420008 */ addiu $v0, $v0, 0x8
/* B8EE4 801227E4 AC620000 */ sw $v0, 0x0($v1)
/* B8EE8 801227E8 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8EEC 801227EC AC820000 */ sw $v0, 0x0($a0)
/* B8EF0 801227F0 3C028015 */ lui $v0, %hi(D_8014BEF0)
/* B8EF4 801227F4 2442BEF0 */ addiu $v0, $v0, %lo(D_8014BEF0)
/* B8EF8 801227F8 08048A23 */ j .L8012288C
/* B8EFC 801227FC AC820004 */ sw $v0, 0x4($a0)
glabel .L80122800
/* B8F00 80122800 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8F04 80122804 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8F08 80122808 8C620000 */ lw $v0, 0x0($v1)
/* B8F0C 8012280C 0040202D */ daddu $a0, $v0, $zero
/* B8F10 80122810 24420008 */ addiu $v0, $v0, 0x8
/* B8F14 80122814 AC620000 */ sw $v0, 0x0($v1)
/* B8F18 80122818 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8F1C 8012281C AC820000 */ sw $v0, 0x0($a0)
/* B8F20 80122820 3C028015 */ lui $v0, %hi(D_8014BF18)
/* B8F24 80122824 2442BF18 */ addiu $v0, $v0, %lo(D_8014BF18)
/* B8F28 80122828 08048A23 */ j .L8012288C
/* B8F2C 8012282C AC820004 */ sw $v0, 0x4($a0)
glabel .L80122830
/* B8F30 80122830 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8F34 80122834 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8F38 80122838 8C620000 */ lw $v0, 0x0($v1)
/* B8F3C 8012283C 0040202D */ daddu $a0, $v0, $zero
/* B8F40 80122840 24420008 */ addiu $v0, $v0, 0x8
/* B8F44 80122844 AC620000 */ sw $v0, 0x0($v1)
/* B8F48 80122848 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8F4C 8012284C AC820000 */ sw $v0, 0x0($a0)
/* B8F50 80122850 3C028015 */ lui $v0, %hi(D_8014BF40)
/* B8F54 80122854 2442BF40 */ addiu $v0, $v0, %lo(D_8014BF40)
/* B8F58 80122858 08048A23 */ j .L8012288C
/* B8F5C 8012285C AC820004 */ sw $v0, 0x4($a0)
glabel .L80122860
/* B8F60 80122860 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* B8F64 80122864 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* B8F68 80122868 8C620000 */ lw $v0, 0x0($v1)
/* B8F6C 8012286C 0040202D */ daddu $a0, $v0, $zero
/* B8F70 80122870 24420008 */ addiu $v0, $v0, 0x8
/* B8F74 80122874 AC620000 */ sw $v0, 0x0($v1)
/* B8F78 80122878 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B8F7C 8012287C AC820000 */ sw $v0, 0x0($a0)
/* B8F80 80122880 3C028015 */ lui $v0, %hi(D_8014BF68)
/* B8F84 80122884 2442BF68 */ addiu $v0, $v0, %lo(D_8014BF68)
/* B8F88 80122888 AC820004 */ sw $v0, 0x4($a0)
glabel .L8012288C
/* B8F8C 8012288C 3C070001 */ lui $a3, (0x1F400 >> 16)
/* B8F90 80122890 3C028015 */ lui $v0, %hi(entity_fog_dist_max)
/* B8F94 80122894 8C424390 */ lw $v0, %lo(entity_fog_dist_max)($v0)
/* B8F98 80122898 3C038015 */ lui $v1, %hi(entity_fog_dist_min)
/* B8F9C 8012289C 8C63438C */ lw $v1, %lo(entity_fog_dist_min)($v1)
/* B8FA0 801228A0 34E7F400 */ ori $a3, $a3, (0x1F400 & 0xFFFF)
/* B8FA4 801228A4 00431023 */ subu $v0, $v0, $v1
/* B8FA8 801228A8 14400002 */ bnez $v0, .L801228B4
/* B8FAC 801228AC 00E2001A */ div $zero, $a3, $v0
/* B8FB0 801228B0 0007000D */ break 7
.L801228B4:
/* B8FB4 801228B4 2401FFFF */ addiu $at, $zero, -0x1
/* B8FB8 801228B8 14410004 */ bne $v0, $at, .L801228CC
/* B8FBC 801228BC 3C018000 */ lui $at, (0x80000000 >> 16)
/* B8FC0 801228C0 14E10002 */ bne $a3, $at, .L801228CC
/* B8FC4 801228C4 00000000 */ nop
/* B8FC8 801228C8 0006000D */ break 6
.L801228CC:
/* B8FCC 801228CC 00003812 */ mflo $a3
/* B8FD0 801228D0 240501F4 */ addiu $a1, $zero, 0x1F4
/* B8FD4 801228D4 00A32823 */ subu $a1, $a1, $v1
/* B8FD8 801228D8 00052A00 */ sll $a1, $a1, 8
/* B8FDC 801228DC 14400002 */ bnez $v0, .L801228E8
/* B8FE0 801228E0 00A2001A */ div $zero, $a1, $v0
/* B8FE4 801228E4 0007000D */ break 7
.L801228E8:
/* B8FE8 801228E8 2401FFFF */ addiu $at, $zero, -0x1
/* B8FEC 801228EC 14410004 */ bne $v0, $at, .L80122900
/* B8FF0 801228F0 3C018000 */ lui $at, (0x80000000 >> 16)
/* B8FF4 801228F4 14A10002 */ bne $a1, $at, .L80122900
/* B8FF8 801228F8 00000000 */ nop
/* B8FFC 801228FC 0006000D */ break 6
.L80122900:
/* B9000 80122900 00002812 */ mflo $a1
/* B9004 80122904 3C08800A */ lui $t0, %hi(gMainGfxPos)
/* B9008 80122908 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos)
/* B900C 8012290C 8D060000 */ lw $a2, 0x0($t0)
/* B9010 80122910 00C0482D */ daddu $t1, $a2, $zero
/* B9014 80122914 24C60008 */ addiu $a2, $a2, 0x8
/* B9018 80122918 3C02F800 */ lui $v0, (0xF8000000 >> 16)
/* B901C 8012291C AD060000 */ sw $a2, 0x0($t0)
/* B9020 80122920 AD220000 */ sw $v0, 0x0($t1)
/* B9024 80122924 3C028015 */ lui $v0, %hi(D_8015437F)
/* B9028 80122928 9042437F */ lbu $v0, %lo(D_8015437F)($v0)
/* B902C 8012292C 3C038015 */ lui $v1, %hi(D_80154383)
/* B9030 80122930 90634383 */ lbu $v1, %lo(D_80154383)($v1)
/* B9034 80122934 3C048015 */ lui $a0, %hi(D_80154387)
/* B9038 80122938 90844387 */ lbu $a0, %lo(D_80154387)($a0)
/* B903C 8012293C 00021600 */ sll $v0, $v0, 24
/* B9040 80122940 00031C00 */ sll $v1, $v1, 16
/* B9044 80122944 00431025 */ or $v0, $v0, $v1
/* B9048 80122948 00042200 */ sll $a0, $a0, 8
/* B904C 8012294C 3C038015 */ lui $v1, %hi(D_8015438B)
/* B9050 80122950 9063438B */ lbu $v1, %lo(D_8015438B)($v1)
/* B9054 80122954 00441025 */ or $v0, $v0, $a0
/* B9058 80122958 00431025 */ or $v0, $v0, $v1
/* B905C 8012295C AD220004 */ sw $v0, 0x4($t1)
/* B9060 80122960 24C20008 */ addiu $v0, $a2, 0x8
/* B9064 80122964 AD020000 */ sw $v0, 0x0($t0)
/* B9068 80122968 3C02DB08 */ lui $v0, (0xDB080000 >> 16)
/* B906C 8012296C ACC20000 */ sw $v0, 0x0($a2)
/* B9070 80122970 00073C00 */ sll $a3, $a3, 16
/* B9074 80122974 30A5FFFF */ andi $a1, $a1, 0xFFFF
/* B9078 80122978 00E53825 */ or $a3, $a3, $a1
/* B907C 8012297C ACC70004 */ sw $a3, 0x4($a2)
glabel .L80122980
/* B9080 80122980 3C02D9FD */ lui $v0, (0xD9FDFFFF >> 16)
.L80122984:
/* B9084 80122984 3C06800A */ lui $a2, %hi(gMainGfxPos)
/* B9088 80122988 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos)
/* B908C 8012298C 3442FFFF */ ori $v0, $v0, (0xD9FDFFFF & 0xFFFF)
/* B9090 80122990 8CC50000 */ lw $a1, 0x0($a2)
/* B9094 80122994 3C048015 */ lui $a0, %hi(entity_fog_enabled)
/* B9098 80122998 8C844378 */ lw $a0, %lo(entity_fog_enabled)($a0)
/* B909C 8012299C 00A0182D */ daddu $v1, $a1, $zero
/* B90A0 801229A0 24A50008 */ addiu $a1, $a1, 0x8
/* B90A4 801229A4 ACC50000 */ sw $a1, 0x0($a2)
/* B90A8 801229A8 AC620000 */ sw $v0, 0x0($v1)
/* B90AC 801229AC 10800005 */ beqz $a0, .L801229C4
/* B90B0 801229B0 AC600004 */ sw $zero, 0x4($v1)
/* B90B4 801229B4 8E420000 */ lw $v0, 0x0($s2)
/* B90B8 801229B8 30420800 */ andi $v0, $v0, 0x800
/* B90BC 801229BC 1040000A */ beqz $v0, .L801229E8
/* B90C0 801229C0 3C02FC12 */ lui $v0, (0xFC121E04 >> 16)
.L801229C4:
/* B90C4 801229C4 3C04FC12 */ lui $a0, (0xFC121824 >> 16)
/* B90C8 801229C8 34841824 */ ori $a0, $a0, (0xFC121824 & 0xFFFF)
/* B90CC 801229CC 3C03FF33 */ lui $v1, (0xFF33FFFF >> 16)
/* B90D0 801229D0 3463FFFF */ ori $v1, $v1, (0xFF33FFFF & 0xFFFF)
/* B90D4 801229D4 24A20008 */ addiu $v0, $a1, 0x8
/* B90D8 801229D8 ACC20000 */ sw $v0, 0x0($a2)
/* B90DC 801229DC ACA40000 */ sw $a0, 0x0($a1)
/* B90E0 801229E0 08048A80 */ j .L80122A00
/* B90E4 801229E4 ACA30004 */ sw $v1, 0x4($a1)
.L801229E8:
/* B90E8 801229E8 34421E04 */ ori $v0, $v0, (0xFC121E04 & 0xFFFF)
/* B90EC 801229EC 24A30008 */ addiu $v1, $a1, 0x8
/* B90F0 801229F0 ACC30000 */ sw $v1, 0x0($a2)
/* B90F4 801229F4 ACA20000 */ sw $v0, 0x0($a1)
/* B90F8 801229F8 2402F3F8 */ addiu $v0, $zero, -0xC08
/* B90FC 801229FC ACA20004 */ sw $v0, 0x4($a1)
.L80122A00:
/* B9100 80122A00 8E42005C */ lw $v0, 0x5C($s2)
/* B9104 80122A04 10400012 */ beqz $v0, .L80122A50
/* B9108 80122A08 3C07D838 */ lui $a3, (0xD8380002 >> 16)
/* B910C 80122A0C 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* B9110 80122A10 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* B9114 80122A14 8C830000 */ lw $v1, 0x0($a0)
/* B9118 80122A18 3C028015 */ lui $v0, %hi(D_80154374)
/* B911C 80122A1C 8C424374 */ lw $v0, %lo(D_80154374)($v0)
/* B9120 80122A20 0060282D */ daddu $a1, $v1, $zero
/* B9124 80122A24 24630008 */ addiu $v1, $v1, 0x8
/* B9128 80122A28 00021080 */ sll $v0, $v0, 2
/* B912C 80122A2C 3042FFFF */ andi $v0, $v0, 0xFFFF
/* B9130 80122A30 AC830000 */ sw $v1, 0x0($a0)
/* B9134 80122A34 3C03DB06 */ lui $v1, (0xDB060000 >> 16)
/* B9138 80122A38 00431025 */ or $v0, $v0, $v1
/* B913C 80122A3C ACA20000 */ sw $v0, 0x0($a1)
/* B9140 80122A40 8E42005C */ lw $v0, 0x5C($s2)
/* B9144 80122A44 3C038000 */ lui $v1, (0x80000000 >> 16)
/* B9148 80122A48 00431021 */ addu $v0, $v0, $v1
/* B914C 80122A4C ACA20004 */ sw $v0, 0x4($a1)
.L80122A50:
/* B9150 80122A50 3C05800A */ lui $a1, %hi(gMainGfxPos)
/* B9154 80122A54 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos)
/* B9158 80122A58 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF)
/* B915C 80122A5C 8CA20000 */ lw $v0, 0x0($a1)
/* B9160 80122A60 3C03DE00 */ lui $v1, (0xDE000000 >> 16)
/* B9164 80122A64 0040302D */ daddu $a2, $v0, $zero
/* B9168 80122A68 24420008 */ addiu $v0, $v0, 0x8
/* B916C 80122A6C ACA20000 */ sw $v0, 0x0($a1)
/* B9170 80122A70 ACC30000 */ sw $v1, 0x0($a2)
/* B9174 80122A74 8E440014 */ lw $a0, 0x14($s2)
/* B9178 80122A78 24430008 */ addiu $v1, $v0, 0x8
/* B917C 80122A7C ACA30000 */ sw $v1, 0x0($a1)
/* B9180 80122A80 24030040 */ addiu $v1, $zero, 0x40
/* B9184 80122A84 ACC40004 */ sw $a0, 0x4($a2)
/* B9188 80122A88 AC430004 */ sw $v1, 0x4($v0)
/* B918C 80122A8C 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* B9190 80122A90 AC470000 */ sw $a3, 0x0($v0)
/* B9194 80122A94 AC430008 */ sw $v1, 0x8($v0)
/* B9198 80122A98 AC40000C */ sw $zero, 0xC($v0)
/* B919C 80122A9C 8E430000 */ lw $v1, 0x0($s2)
/* B91A0 80122AA0 24420010 */ addiu $v0, $v0, 0x10
/* B91A4 80122AA4 30630200 */ andi $v1, $v1, 0x200
/* B91A8 80122AA8 106000AE */ beqz $v1, .L80122D64
/* B91AC 80122AAC ACA20000 */ sw $v0, 0x0($a1)
/* B91B0 80122AB0 27A40010 */ addiu $a0, $sp, 0x10
/* B91B4 80122AB4 26510018 */ addiu $s1, $s2, 0x18
/* B91B8 80122AB8 0C019D60 */ jal guMtxL2F
/* B91BC 80122ABC 0220282D */ daddu $a1, $s1, $zero
/* B91C0 80122AC0 27B00050 */ addiu $s0, $sp, 0x50
/* B91C4 80122AC4 0C048450 */ jal make_entity_model_mtx_flipZ
/* B91C8 80122AC8 0200202D */ daddu $a0, $s0, $zero
/* B91CC 80122ACC 27A40010 */ addiu $a0, $sp, 0x10
/* B91D0 80122AD0 0200282D */ daddu $a1, $s0, $zero
/* B91D4 80122AD4 0C019D80 */ jal guMtxCatF
/* B91D8 80122AD8 0080302D */ daddu $a2, $a0, $zero
/* B91DC 80122ADC 27A40010 */ addiu $a0, $sp, 0x10
/* B91E0 80122AE0 0C019D40 */ jal guMtxF2L
/* B91E4 80122AE4 0220282D */ daddu $a1, $s1, $zero
/* B91E8 80122AE8 3C040001 */ lui $a0, (0x11630 >> 16)
/* B91EC 80122AEC 34841630 */ ori $a0, $a0, (0x11630 & 0xFFFF)
/* B91F0 80122AF0 26450058 */ addiu $a1, $s2, 0x58
/* B91F4 80122AF4 3C028007 */ lui $v0, %hi(gMatrixListPos)
/* B91F8 80122AF8 944241F0 */ lhu $v0, %lo(gMatrixListPos)($v0)
/* B91FC 80122AFC 3C03800A */ lui $v1, %hi(gDisplayContext)
/* B9200 80122B00 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* B9204 80122B04 00021180 */ sll $v0, $v0, 6
/* B9208 80122B08 00621821 */ addu $v1, $v1, $v0
/* B920C 80122B0C 00641821 */ addu $v1, $v1, $a0
.L80122B10:
/* B9210 80122B10 8E2E0000 */ lw $t6, 0x0($s1)
/* B9214 80122B14 8E2F0004 */ lw $t7, 0x4($s1)
/* B9218 80122B18 8E380008 */ lw $t8, 0x8($s1)
/* B921C 80122B1C 8E39000C */ lw $t9, 0xC($s1)
/* B9220 80122B20 AC6E0000 */ sw $t6, 0x0($v1)
/* B9224 80122B24 AC6F0004 */ sw $t7, 0x4($v1)
/* B9228 80122B28 AC780008 */ sw $t8, 0x8($v1)
/* B922C 80122B2C AC79000C */ sw $t9, 0xC($v1)
/* B9230 80122B30 26310010 */ addiu $s1, $s1, 0x10
/* B9234 80122B34 1625FFF6 */ bne $s1, $a1, .L80122B10
/* B9238 80122B38 24630010 */ addiu $v1, $v1, 0x10
/* B923C 80122B3C 3C03DA38 */ lui $v1, (0xDA380002 >> 16)
/* B9240 80122B40 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF)
/* B9244 80122B44 3C080001 */ lui $t0, (0x11630 >> 16)
/* B9248 80122B48 3C06800A */ lui $a2, %hi(gMainGfxPos)
/* B924C 80122B4C 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos)
/* B9250 80122B50 35081630 */ ori $t0, $t0, (0x11630 & 0xFFFF)
/* B9254 80122B54 3C058007 */ lui $a1, %hi(gMatrixListPos)
/* B9258 80122B58 24A541F0 */ addiu $a1, $a1, %lo(gMatrixListPos)
/* B925C 80122B5C 8CC40000 */ lw $a0, 0x0($a2)
/* B9260 80122B60 94A20000 */ lhu $v0, 0x0($a1)
/* B9264 80122B64 0080382D */ daddu $a3, $a0, $zero
/* B9268 80122B68 24840008 */ addiu $a0, $a0, 0x8
/* B926C 80122B6C ACC40000 */ sw $a0, 0x0($a2)
/* B9270 80122B70 ACE30000 */ sw $v1, 0x0($a3)
/* B9274 80122B74 24430001 */ addiu $v1, $v0, 0x1
/* B9278 80122B78 3042FFFF */ andi $v0, $v0, 0xFFFF
/* B927C 80122B7C 00021180 */ sll $v0, $v0, 6
/* B9280 80122B80 A4A30000 */ sh $v1, 0x0($a1)
/* B9284 80122B84 3C03800A */ lui $v1, %hi(gDisplayContext)
/* B9288 80122B88 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* B928C 80122B8C 00481021 */ addu $v0, $v0, $t0
/* B9290 80122B90 00621821 */ addu $v1, $v1, $v0
/* B9294 80122B94 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* B9298 80122B98 ACE30004 */ sw $v1, 0x4($a3)
/* B929C 80122B9C AC820000 */ sw $v0, 0x0($a0)
/* B92A0 80122BA0 8E430014 */ lw $v1, 0x14($s2)
/* B92A4 80122BA4 24820008 */ addiu $v0, $a0, 0x8
/* B92A8 80122BA8 ACC20000 */ sw $v0, 0x0($a2)
/* B92AC 80122BAC 08048B49 */ j .L80122D24
/* B92B0 80122BB0 AC830004 */ sw $v1, 0x4($a0)
.L80122BB4:
/* B92B4 80122BB4 3C03D9C0 */ lui $v1, (0xD9C0F9FA >> 16)
/* B92B8 80122BB8 3463F9FA */ ori $v1, $v1, (0xD9C0F9FA & 0xFFFF)
/* B92BC 80122BBC 3C05D9FF */ lui $a1, (0xD9FFFFFF >> 16)
/* B92C0 80122BC0 34A5FFFF */ ori $a1, $a1, (0xD9FFFFFF & 0xFFFF)
/* B92C4 80122BC4 3C040022 */ lui $a0, (0x220005 >> 16)
/* B92C8 80122BC8 34840005 */ ori $a0, $a0, (0x220005 & 0xFFFF)
/* B92CC 80122BCC 3C06DC08 */ lui $a2, (0xDC08060A >> 16)
/* B92D0 80122BD0 34C6060A */ ori $a2, $a2, (0xDC08060A & 0xFFFF)
/* B92D4 80122BD4 3C07DC08 */ lui $a3, (0xDC08090A >> 16)
/* B92D8 80122BD8 34E7090A */ ori $a3, $a3, (0xDC08090A & 0xFFFF)
/* B92DC 80122BDC 3C08D700 */ lui $t0, (0xD7000002 >> 16)
/* B92E0 80122BE0 35080002 */ ori $t0, $t0, (0xD7000002 & 0xFFFF)
/* B92E4 80122BE4 3C0AE200 */ lui $t2, (0xE2001E01 >> 16)
/* B92E8 80122BE8 354A1E01 */ ori $t2, $t2, (0xE2001E01 & 0xFFFF)
/* B92EC 80122BEC 3C0BE300 */ lui $t3, (0xE3000A11 >> 16)
/* B92F0 80122BF0 356B0A11 */ ori $t3, $t3, (0xE3000A11 & 0xFFFF)
/* B92F4 80122BF4 3C090008 */ lui $t1, (0x82CF0 >> 16)
/* B92F8 80122BF8 35292CF0 */ ori $t1, $t1, (0x82CF0 & 0xFFFF)
/* B92FC 80122BFC 25820008 */ addiu $v0, $t4, 0x8
/* B9300 80122C00 ADA20000 */ sw $v0, 0x0($t5)
/* B9304 80122C04 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* B9308 80122C08 AD820000 */ sw $v0, 0x0($t4)
/* B930C 80122C0C 25820010 */ addiu $v0, $t4, 0x10
/* B9310 80122C10 AD800004 */ sw $zero, 0x4($t4)
/* B9314 80122C14 ADA20000 */ sw $v0, 0x0($t5)
/* B9318 80122C18 25820018 */ addiu $v0, $t4, 0x18
/* B931C 80122C1C AD830008 */ sw $v1, 0x8($t4)
/* B9320 80122C20 AD80000C */ sw $zero, 0xC($t4)
/* B9324 80122C24 ADA20000 */ sw $v0, 0x0($t5)
/* B9328 80122C28 25820020 */ addiu $v0, $t4, 0x20
/* B932C 80122C2C AD850010 */ sw $a1, 0x10($t4)
/* B9330 80122C30 AD840014 */ sw $a0, 0x14($t4)
/* B9334 80122C34 ADA20000 */ sw $v0, 0x0($t5)
/* B9338 80122C38 3C02DB02 */ lui $v0, (0xDB020000 >> 16)
/* B933C 80122C3C AD820018 */ sw $v0, 0x18($t4)
/* B9340 80122C40 24020018 */ addiu $v0, $zero, 0x18
/* B9344 80122C44 AD82001C */ sw $v0, 0x1C($t4)
/* B9348 80122C48 25820028 */ addiu $v0, $t4, 0x28
/* B934C 80122C4C ADA20000 */ sw $v0, 0x0($t5)
/* B9350 80122C50 3C028015 */ lui $v0, %hi(D_8014C270)
/* B9354 80122C54 2442C270 */ addiu $v0, $v0, %lo(D_8014C270)
/* B9358 80122C58 AD820024 */ sw $v0, 0x24($t4)
/* B935C 80122C5C 2442FFF8 */ addiu $v0, $v0, -0x8
/* B9360 80122C60 AD82002C */ sw $v0, 0x2C($t4)
/* B9364 80122C64 2402FFFF */ addiu $v0, $zero, -0x1
/* B9368 80122C68 AD860020 */ sw $a2, 0x20($t4)
/* B936C 80122C6C AD870028 */ sw $a3, 0x28($t4)
/* B9370 80122C70 AD880030 */ sw $t0, 0x30($t4)
/* B9374 80122C74 AD820034 */ sw $v0, 0x34($t4)
/* B9378 80122C78 AD8A0038 */ sw $t2, 0x38($t4)
/* B937C 80122C7C AD80003C */ sw $zero, 0x3C($t4)
/* B9380 80122C80 AD8B0040 */ sw $t3, 0x40($t4)
/* B9384 80122C84 AD890044 */ sw $t1, 0x44($t4)
/* B9388 80122C88 8E460014 */ lw $a2, 0x14($s2)
/* B938C 80122C8C 25820030 */ addiu $v0, $t4, 0x30
/* B9390 80122C90 ADA20000 */ sw $v0, 0x0($t5)
/* B9394 80122C94 25820038 */ addiu $v0, $t4, 0x38
/* B9398 80122C98 8CC30000 */ lw $v1, 0x0($a2)
/* B939C 80122C9C 27B000A8 */ addiu $s0, $sp, 0xA8
/* B93A0 80122CA0 ADA20000 */ sw $v0, 0x0($t5)
/* B93A4 80122CA4 AFA30090 */ sw $v1, 0x90($sp)
/* B93A8 80122CA8 8CC30004 */ lw $v1, 0x4($a2)
/* B93AC 80122CAC 25820040 */ addiu $v0, $t4, 0x40
/* B93B0 80122CB0 ADA20000 */ sw $v0, 0x0($t5)
/* B93B4 80122CB4 AFA30094 */ sw $v1, 0x94($sp)
/* B93B8 80122CB8 94C3000A */ lhu $v1, 0xA($a2)
/* B93BC 80122CBC 25820048 */ addiu $v0, $t4, 0x48
/* B93C0 80122CC0 ADA20000 */ sw $v0, 0x0($t5)
/* B93C4 80122CC4 A7A30098 */ sh $v1, 0x98($sp)
/* B93C8 80122CC8 94C2000E */ lhu $v0, 0xE($a2)
/* B93CC 80122CCC 0200202D */ daddu $a0, $s0, $zero
/* B93D0 80122CD0 A7A2009A */ sh $v0, 0x9A($sp)
/* B93D4 80122CD4 8CC20008 */ lw $v0, 0x8($a2)
/* B93D8 80122CD8 26450018 */ addiu $a1, $s2, 0x18
/* B93DC 80122CDC 00021023 */ negu $v0, $v0
/* B93E0 80122CE0 00021FC2 */ srl $v1, $v0, 31
/* B93E4 80122CE4 00431021 */ addu $v0, $v0, $v1
/* B93E8 80122CE8 00021043 */ sra $v0, $v0, 1
/* B93EC 80122CEC A7A2009C */ sh $v0, 0x9C($sp)
/* B93F0 80122CF0 8CC2000C */ lw $v0, 0xC($a2)
/* B93F4 80122CF4 240300FF */ addiu $v1, $zero, 0xFF
/* B93F8 80122CF8 A3A300A0 */ sb $v1, 0xA0($sp)
/* B93FC 80122CFC 00021FC2 */ srl $v1, $v0, 31
/* B9400 80122D00 00431021 */ addu $v0, $v0, $v1
/* B9404 80122D04 00021043 */ sra $v0, $v0, 1
/* B9408 80122D08 0C019D60 */ jal guMtxL2F
/* B940C 80122D0C A7A2009E */ sh $v0, 0x9E($sp)
/* B9410 80122D10 0000202D */ daddu $a0, $zero, $zero
/* B9414 80122D14 27A50090 */ addiu $a1, $sp, 0x90
/* B9418 80122D18 0080302D */ daddu $a2, $a0, $zero
/* B941C 80122D1C 0C04EBDC */ jal imgfx_appendGfx_component
/* B9420 80122D20 0200382D */ daddu $a3, $s0, $zero
.L80122D24:
/* B9424 80122D24 3C03D838 */ lui $v1, (0xD8380002 >> 16)
/* B9428 80122D28 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* B942C 80122D2C 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* B9430 80122D30 8C820000 */ lw $v0, 0x0($a0)
/* B9434 80122D34 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF)
/* B9438 80122D38 0040282D */ daddu $a1, $v0, $zero
/* B943C 80122D3C 24420008 */ addiu $v0, $v0, 0x8
/* B9440 80122D40 AC820000 */ sw $v0, 0x0($a0)
/* B9444 80122D44 ACA30000 */ sw $v1, 0x0($a1)
/* B9448 80122D48 24030040 */ addiu $v1, $zero, 0x40
/* B944C 80122D4C ACA30004 */ sw $v1, 0x4($a1)
/* B9450 80122D50 24430008 */ addiu $v1, $v0, 0x8
/* B9454 80122D54 AC830000 */ sw $v1, 0x0($a0)
/* B9458 80122D58 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* B945C 80122D5C AC430000 */ sw $v1, 0x0($v0)
/* B9460 80122D60 AC400004 */ sw $zero, 0x4($v0)
.L80122D64:
/* B9464 80122D64 8FBF00F4 */ lw $ra, 0xF4($sp)
/* B9468 80122D68 8FB200F0 */ lw $s2, 0xF0($sp)
/* B946C 80122D6C 8FB100EC */ lw $s1, 0xEC($sp)
/* B9470 80122D70 8FB000E8 */ lw $s0, 0xE8($sp)
/* B9474 80122D74 03E00008 */ jr $ra
/* B9478 80122D78 27BD00F8 */ addiu $sp, $sp, 0xF8
### DECOMPILED C INSTRUCTIONS:
void draw_entity_model_E(s32 modelIdx, Mtx* transformMtx) {
EntityModel* model = (*gCurrentEntityModelList)[modelIdx & ~0x800];
Matrix4f mtx;
Matrix4f mtx2;
ImgFXTexture ifxImg;
Matrix4f imgfxMtx;
if (model == NULL) {
return;
}
if (model->flags == 0) {
return;
}
if (model->flags & ENTITY_MODEL_FLAG_100) {
return;
}
if (model->flags & ENTITY_MODEL_FLAG_HIDDEN) {
return;
}
if (model->flags & ENTITY_MODEL_FLAG_40) {
return;
}
if (!(model->flags & ENTITY_MODEL_FLAG_CAM3)) {
return;
}
model->transform = *transformMtx;
model->vertexArray = NULL;
gDisplayContext->matrixStack[gMatrixListPos] = model->transform;
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (!(model->flags & ENTITY_MODEL_FLAG_USE_IMAGE)) {
s32 cond = FALSE;
if (entity_fog_enabled && !(model->flags & ENTITY_MODEL_FLAG_FOG_DISABLED)) {
cond = TRUE;
}
switch (cond) {
case FALSE:
switch (model->renderMode) {
case RENDER_MODE_SURFACE_OPA:
gSPDisplayList(gMainGfxPos++, D_8014B7F8);
break;
case RENDER_MODE_DECAL_OPA:
gSPDisplayList(gMainGfxPos++, D_8014B820);
break;
case RENDER_MODE_INTERSECTING_OPA:
gSPDisplayList(gMainGfxPos++, D_8014B848);
break;
case RENDER_MODE_ALPHATEST:
gSPDisplayList(gMainGfxPos++, D_8014B870);
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
case RENDER_MODE_SURFACE_XLU_LAYER2:
case RENDER_MODE_SURFACE_XLU_LAYER3:
gSPDisplayList(gMainGfxPos++, D_8014B898);
break;
case RENDER_MODE_SURFACE_XLU_NO_AA:
gSPDisplayList(gMainGfxPos++, D_8014B9B0);
break;
case RENDER_MODE_DECAL_XLU:
case RENDER_MODE_1E:
gSPDisplayList(gMainGfxPos++, D_8014B8C0);
break;
case RENDER_MODE_DECAL_XLU_NOAA:
case RENDER_MODE_SHADOW:
gSPDisplayList(gMainGfxPos++, D_8014B9D8);
break;
case RENDER_MODE_INTERSECTING_XLU:
gSPDisplayList(gMainGfxPos++, D_8014B8E8);
break;
case RENDER_MODE_28:
gSPDisplayList(gMainGfxPos++, D_8014BA00);
break;
case RENDER_MODE_ALPHATEST_ONESIDED:
gSPDisplayList(gMainGfxPos++, D_8014B988);
break;
case RENDER_MODE_SURFACE_OPA_NO_ZB:
case RENDER_MODE_2A:
gSPDisplayList(gMainGfxPos++, D_8014BA48);
break;
case RENDER_MODE_ALPHATEST_NO_ZB:
case RENDER_MODE_2B:
gSPDisplayList(gMainGfxPos++, D_8014BA70);
break;
case RENDER_MODE_SURFACE_XLU_NO_ZB:
case RENDER_MODE_2C:
gSPDisplayList(gMainGfxPos++, D_8014BA98);
break;
case RENDER_MODE_2D:
gSPDisplayList(gMainGfxPos++, D_8014BAE8);
break;
}
break;
case TRUE:
switch (model->renderMode) {
case RENDER_MODE_SURFACE_OPA:
gSPDisplayList(gMainGfxPos++, D_8014BE78);
break;
case RENDER_MODE_DECAL_OPA:
gSPDisplayList(gMainGfxPos++, D_8014BEA0);
break;
case RENDER_MODE_INTERSECTING_OPA:
gSPDisplayList(gMainGfxPos++, D_8014BEC8);
break;
case RENDER_MODE_ALPHATEST:
gSPDisplayList(gMainGfxPos++, D_8014BEF0);
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
gSPDisplayList(gMainGfxPos++, D_8014BF18);
break;
case RENDER_MODE_DECAL_XLU:
gSPDisplayList(gMainGfxPos++, D_8014BF40);
break;
case RENDER_MODE_INTERSECTING_XLU:
gSPDisplayList(gMainGfxPos++, D_8014BF68);
break;
}
gDPSetFogColor(gMainGfxPos++, entity_fog_red, entity_fog_green, entity_fog_blue, entity_fog_alpha);
gSPFogPosition(gMainGfxPos++, entity_fog_dist_min, entity_fog_dist_max);
break;
}
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
if (!entity_fog_enabled || (model->flags & ENTITY_MODEL_FLAG_FOG_DISABLED)) {
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
} else {
gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, 0, TEXEL0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED);
}
if (model->vertexArray != NULL) {
gSPSegment(gMainGfxPos++, D_80154374, VIRTUAL_TO_PHYSICAL(model->vertexArray));
}
gSPDisplayList(gMainGfxPos++, model->gfx.displayList);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMainGfxPos++);
if (!(model->flags & ENTITY_MODEL_FLAG_REFLECT)) {
return;
}
guMtxL2F(mtx, &model->transform);
make_entity_model_mtx_flipZ(mtx2);
guMtxCatF(mtx, mtx2, mtx);
guMtxF2L(mtx, &model->transform);
gDisplayContext->matrixStack[gMatrixListPos] = model->transform;
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, model->gfx.displayList);
} else {
SpriteRasterInfo* imageData;
gDPPipeSync(gMainGfxPos++);
gSPClearGeometryMode(gMainGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
gSPSetGeometryMode(gMainGfxPos++, G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
gSPSetLights1(gMainGfxPos++, D_8014C268);
gSPTexture(gMainGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE);
gSPSetOtherMode(gMainGfxPos++, G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 18, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_PERSP | G_CYC_1CYCLE);
imageData = model->gfx.imageData;
ifxImg.raster = imageData->raster;
ifxImg.palette = imageData->defaultPal;
ifxImg.width = imageData->width;
ifxImg.height = imageData->height;
ifxImg.xOffset = -imageData->width / 2;
ifxImg.yOffset = imageData->height / 2;
ifxImg.alpha = 255;
guMtxL2F(imgfxMtx, &model->transform);
imgfx_appendGfx_component(0, &ifxImg, 0, imgfxMtx);
}
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMainGfxPos++);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel imgfx_mesh_anim_update
/* D2AF0 8013C3F0 27BDFFC0 */ addiu $sp, $sp, -0x40
/* D2AF4 8013C3F4 AFB20020 */ sw $s2, 0x20($sp)
/* D2AF8 8013C3F8 0080902D */ daddu $s2, $a0, $zero
/* D2AFC 8013C3FC AFB70034 */ sw $s7, 0x34($sp)
/* D2B00 8013C400 0000B82D */ daddu $s7, $zero, $zero
/* D2B04 8013C404 AFBF003C */ sw $ra, 0x3C($sp)
/* D2B08 8013C408 AFBE0038 */ sw $fp, 0x38($sp)
/* D2B0C 8013C40C AFB60030 */ sw $s6, 0x30($sp)
/* D2B10 8013C410 AFB5002C */ sw $s5, 0x2C($sp)
/* D2B14 8013C414 AFB40028 */ sw $s4, 0x28($sp)
/* D2B18 8013C418 AFB30024 */ sw $s3, 0x24($sp)
/* D2B1C 8013C41C AFB1001C */ sw $s1, 0x1C($sp)
/* D2B20 8013C420 AFB00018 */ sw $s0, 0x18($sp)
/* D2B24 8013C424 C640003C */ lwc1 $f0, 0x3C($s2)
/* D2B28 8013C428 8E540020 */ lw $s4, 0x20($s2)
/* D2B2C 8013C42C 4600028D */ trunc.w.s $f10, $f0
/* D2B30 8013C430 44165000 */ mfc1 $s6, $f10
/* D2B34 8013C434 8E4D0024 */ lw $t5, 0x24($s2)
/* D2B38 8013C438 0C04F088 */ jal imgfx_load_anim
/* D2B3C 8013C43C AFAD0014 */ sw $t5, 0x14($sp)
/* D2B40 8013C440 0040982D */ daddu $s3, $v0, $zero
/* D2B44 8013C444 126002CC */ beqz $s3, .L8013CF78
/* D2B48 8013C448 00000000 */ nop
/* D2B4C 8013C44C 8E430014 */ lw $v1, 0x14($s2)
/* D2B50 8013C450 30620200 */ andi $v0, $v1, 0x200
/* D2B54 8013C454 1040000C */ beqz $v0, .L8013C488
/* D2B58 8013C458 2402FDFF */ addiu $v0, $zero, -0x201
/* D2B5C 8013C45C 00621024 */ and $v0, $v1, $v0
/* D2B60 8013C460 AE420014 */ sw $v0, 0x14($s2)
/* D2B64 8013C464 30620100 */ andi $v0, $v1, 0x100
/* D2B68 8013C468 10400007 */ beqz $v0, .L8013C488
/* D2B6C 8013C46C 00000000 */ nop
/* D2B70 8013C470 9662000C */ lhu $v0, 0xC($s3)
/* D2B74 8013C474 2442FFFF */ addiu $v0, $v0, -0x1
/* D2B78 8013C478 44820000 */ mtc1 $v0, $f0
/* D2B7C 8013C47C 00000000 */ nop
/* D2B80 8013C480 46800020 */ cvt.s.w $f0, $f0
/* D2B84 8013C484 E6400040 */ swc1 $f0, 0x40($s2)
.L8013C488:
/* D2B88 8013C488 C6400040 */ lwc1 $f0, 0x40($s2)
/* D2B8C 8013C48C 8E430014 */ lw $v1, 0x14($s2)
/* D2B90 8013C490 4600028D */ trunc.w.s $f10, $f0
/* D2B94 8013C494 44115000 */ mfc1 $s1, $f10
/* D2B98 8013C498 06810002 */ bgez $s4, .L8013C4A4
/* D2B9C 8013C49C 0280682D */ daddu $t5, $s4, $zero
/* D2BA0 8013C4A0 000D6823 */ negu $t5, $t5
.L8013C4A4:
/* D2BA4 8013C4A4 30624000 */ andi $v0, $v1, 0x4000
/* D2BA8 8013C4A8 10400003 */ beqz $v0, .L8013C4B8
/* D2BAC 8013C4AC AFAD0010 */ sw $t5, 0x10($sp)
/* D2BB0 8013C4B0 0804F13F */ j .L8013C4FC
/* D2BB4 8013C4B4 0220802D */ daddu $s0, $s1, $zero
.L8013C4B8:
/* D2BB8 8013C4B8 30620100 */ andi $v0, $v1, 0x100
/* D2BBC 8013C4BC 10400008 */ beqz $v0, .L8013C4E0
/* D2BC0 8013C4C0 2630FFFF */ addiu $s0, $s1, -0x1
/* D2BC4 8013C4C4 0601000D */ bgez $s0, .L8013C4FC
/* D2BC8 8013C4C8 30620080 */ andi $v0, $v1, 0x80
/* D2BCC 8013C4CC 1040000B */ beqz $v0, .L8013C4FC
/* D2BD0 8013C4D0 0220802D */ daddu $s0, $s1, $zero
/* D2BD4 8013C4D4 9662000C */ lhu $v0, 0xC($s3)
/* D2BD8 8013C4D8 0804F13F */ j .L8013C4FC
/* D2BDC 8013C4DC 2450FFFF */ addiu $s0, $v0, -0x1
.L8013C4E0:
/* D2BE0 8013C4E0 9662000C */ lhu $v0, 0xC($s3)
/* D2BE4 8013C4E4 26300001 */ addiu $s0, $s1, 0x1
/* D2BE8 8013C4E8 16020004 */ bne $s0, $v0, .L8013C4FC
/* D2BEC 8013C4EC 30620080 */ andi $v0, $v1, 0x80
/* D2BF0 8013C4F0 10400002 */ beqz $v0, .L8013C4FC
/* D2BF4 8013C4F4 0220802D */ daddu $s0, $s1, $zero
/* D2BF8 8013C4F8 0000802D */ daddu $s0, $zero, $zero
.L8013C4FC:
/* D2BFC 8013C4FC 96620008 */ lhu $v0, 0x8($s3)
/* D2C00 8013C500 00022040 */ sll $a0, $v0, 1
/* D2C04 8013C504 00822021 */ addu $a0, $a0, $v0
/* D2C08 8013C508 0C00AB39 */ jal heap_malloc
/* D2C0C 8013C50C 00042080 */ sll $a0, $a0, 2
/* D2C10 8013C510 0040F02D */ daddu $fp, $v0, $zero
/* D2C14 8013C514 96670008 */ lhu $a3, 0x8($s3)
/* D2C18 8013C518 03C0302D */ daddu $a2, $fp, $zero
/* D2C1C 8013C51C 02270018 */ mult $s1, $a3
/* D2C20 8013C520 3C150025 */ lui $s5, %hi(D_24B7F0)
/* D2C24 8013C524 26B5B7F0 */ addiu $s5, $s5, %lo(D_24B7F0)
/* D2C28 8013C528 00072840 */ sll $a1, $a3, 1
/* D2C2C 8013C52C 00A72821 */ addu $a1, $a1, $a3
/* D2C30 8013C530 00052880 */ sll $a1, $a1, 2
/* D2C34 8013C534 00001812 */ mflo $v1
/* D2C38 8013C538 00031040 */ sll $v0, $v1, 1
/* D2C3C 8013C53C 00431021 */ addu $v0, $v0, $v1
/* D2C40 8013C540 00021080 */ sll $v0, $v0, 2
/* D2C44 8013C544 8E630000 */ lw $v1, 0x0($s3)
/* D2C48 8013C548 00551021 */ addu $v0, $v0, $s5
/* D2C4C 8013C54C 00622021 */ addu $a0, $v1, $v0
/* D2C50 8013C550 0C00A5CF */ jal dma_copy
/* D2C54 8013C554 00852821 */ addu $a1, $a0, $a1
/* D2C58 8013C558 2A820002 */ slti $v0, $s4, 0x2
/* D2C5C 8013C55C 14400017 */ bnez $v0, .L8013C5BC
/* D2C60 8013C560 0000502D */ daddu $t2, $zero, $zero
/* D2C64 8013C564 96620008 */ lhu $v0, 0x8($s3)
/* D2C68 8013C568 00022040 */ sll $a0, $v0, 1
/* D2C6C 8013C56C 00822021 */ addu $a0, $a0, $v0
/* D2C70 8013C570 0C00AB39 */ jal heap_malloc
/* D2C74 8013C574 00042080 */ sll $a0, $a0, 2
/* D2C78 8013C578 96670008 */ lhu $a3, 0x8($s3)
/* D2C7C 8013C57C 0040B82D */ daddu $s7, $v0, $zero
/* D2C80 8013C580 02070018 */ mult $s0, $a3
/* D2C84 8013C584 02E0302D */ daddu $a2, $s7, $zero
/* D2C88 8013C588 00072840 */ sll $a1, $a3, 1
/* D2C8C 8013C58C 00A72821 */ addu $a1, $a1, $a3
/* D2C90 8013C590 00052880 */ sll $a1, $a1, 2
/* D2C94 8013C594 00001812 */ mflo $v1
/* D2C98 8013C598 00031040 */ sll $v0, $v1, 1
/* D2C9C 8013C59C 00431021 */ addu $v0, $v0, $v1
/* D2CA0 8013C5A0 00021080 */ sll $v0, $v0, 2
/* D2CA4 8013C5A4 8E630000 */ lw $v1, 0x0($s3)
/* D2CA8 8013C5A8 00551021 */ addu $v0, $v0, $s5
/* D2CAC 8013C5AC 00622021 */ addu $a0, $v1, $v0
/* D2CB0 8013C5B0 0C00A5CF */ jal dma_copy
/* D2CB4 8013C5B4 00852821 */ addu $a1, $a0, $a1
/* D2CB8 8013C5B8 0000502D */ daddu $t2, $zero, $zero
.L8013C5BC:
/* D2CBC 8013C5BC 44960000 */ mtc1 $s6, $f0
/* D2CC0 8013C5C0 00000000 */ nop
/* D2CC4 8013C5C4 46800020 */ cvt.s.w $f0, $f0
/* D2CC8 8013C5C8 44941000 */ mtc1 $s4, $f2
/* D2CCC 8013C5CC 00000000 */ nop
/* D2CD0 8013C5D0 468010A0 */ cvt.s.w $f2, $f2
/* D2CD4 8013C5D4 96620008 */ lhu $v0, 0x8($s3)
/* D2CD8 8013C5D8 104001EE */ beqz $v0, .L8013CD94
/* D2CDC 8013C5DC 46020103 */ div.s $f4, $f0, $f2
/* D2CE0 8013C5E0 3C098007 */ lui $t1, %hi(gCurrentDisplayContextIndex)
/* D2CE4 8013C5E4 252941F4 */ addiu $t1, $t1, %lo(gCurrentDisplayContextIndex)
/* D2CE8 8013C5E8 3C0B8015 */ lui $t3, %hi(ImgFXCurrentTexturePtr)
/* D2CEC 8013C5EC 256BEE10 */ addiu $t3, $t3, %lo(ImgFXCurrentTexturePtr)
/* D2CF0 8013C5F0 3C0C8000 */ lui $t4, (0x80000000 >> 16)
/* D2CF4 8013C5F4 03C0302D */ daddu $a2, $fp, $zero
/* D2CF8 8013C5F8 0140382D */ daddu $a3, $t2, $zero
/* D2CFC 8013C5FC 02E0402D */ daddu $t0, $s7, $zero
/* D2D00 8013C600 3C018015 */ lui $at, %hi(D_801510E8)
/* D2D04 8013C604 D42610E8 */ ldc1 $f6, %lo(D_801510E8)($at)
/* D2D08 8013C608 3C0141E0 */ lui $at, (0x41E00000 >> 16)
/* D2D0C 8013C60C 44814800 */ mtc1 $at, $f9
/* D2D10 8013C610 44804000 */ mtc1 $zero, $f8
.L8013C614:
/* D2D14 8013C614 92430001 */ lbu $v1, 0x1($s2)
/* D2D18 8013C618 24020002 */ addiu $v0, $zero, 0x2
/* D2D1C 8013C61C 14620256 */ bne $v1, $v0, .L8013CF78
/* D2D20 8013C620 0282102A */ slt $v0, $s4, $v0
/* D2D24 8013C624 14400108 */ bnez $v0, .L8013CA48
/* D2D28 8013C628 00000000 */ nop
/* D2D2C 8013C62C 9662000E */ lhu $v0, 0xE($s3)
/* D2D30 8013C630 30420001 */ andi $v0, $v0, 0x1
/* D2D34 8013C634 10400039 */ beqz $v0, .L8013C71C
/* D2D38 8013C638 00000000 */ nop
/* D2D3C 8013C63C 84C30000 */ lh $v1, 0x0($a2)
/* D2D40 8013C640 85020000 */ lh $v0, 0x0($t0)
/* D2D44 8013C644 8D240000 */ lw $a0, 0x0($t1)
/* D2D48 8013C648 00431023 */ subu $v0, $v0, $v1
/* D2D4C 8013C64C 44821000 */ mtc1 $v0, $f2
/* D2D50 8013C650 00000000 */ nop
/* D2D54 8013C654 468010A0 */ cvt.s.w $f2, $f2
/* D2D58 8013C658 46041082 */ mul.s $f2, $f2, $f4
/* D2D5C 8013C65C 00000000 */ nop
/* D2D60 8013C660 00042080 */ sll $a0, $a0, 2
/* D2D64 8013C664 02442021 */ addu $a0, $s2, $a0
/* D2D68 8013C668 44830000 */ mtc1 $v1, $f0
/* D2D6C 8013C66C 00000000 */ nop
/* D2D70 8013C670 46800020 */ cvt.s.w $f0, $f0
/* D2D74 8013C674 8C820068 */ lw $v0, 0x68($a0)
/* D2D78 8013C678 46020000 */ add.s $f0, $f0, $f2
/* D2D7C 8013C67C 00E21021 */ addu $v0, $a3, $v0
/* D2D80 8013C680 4600028D */ trunc.w.s $f10, $f0
/* D2D84 8013C684 44035000 */ mfc1 $v1, $f10
/* D2D88 8013C688 00000000 */ nop
/* D2D8C 8013C68C A4430000 */ sh $v1, 0x0($v0)
/* D2D90 8013C690 84C30002 */ lh $v1, 0x2($a2)
/* D2D94 8013C694 85020002 */ lh $v0, 0x2($t0)
/* D2D98 8013C698 00431023 */ subu $v0, $v0, $v1
/* D2D9C 8013C69C 44820000 */ mtc1 $v0, $f0
/* D2DA0 8013C6A0 00000000 */ nop
/* D2DA4 8013C6A4 46800020 */ cvt.s.w $f0, $f0
/* D2DA8 8013C6A8 46040002 */ mul.s $f0, $f0, $f4
/* D2DAC 8013C6AC 00000000 */ nop
/* D2DB0 8013C6B0 44831000 */ mtc1 $v1, $f2
/* D2DB4 8013C6B4 00000000 */ nop
/* D2DB8 8013C6B8 468010A0 */ cvt.s.w $f2, $f2
/* D2DBC 8013C6BC 8C820068 */ lw $v0, 0x68($a0)
/* D2DC0 8013C6C0 46001080 */ add.s $f2, $f2, $f0
/* D2DC4 8013C6C4 00E21021 */ addu $v0, $a3, $v0
/* D2DC8 8013C6C8 4600128D */ trunc.w.s $f10, $f2
/* D2DCC 8013C6CC 44035000 */ mfc1 $v1, $f10
/* D2DD0 8013C6D0 00000000 */ nop
/* D2DD4 8013C6D4 A4430002 */ sh $v1, 0x2($v0)
/* D2DD8 8013C6D8 84C30004 */ lh $v1, 0x4($a2)
/* D2DDC 8013C6DC 85020004 */ lh $v0, 0x4($t0)
/* D2DE0 8013C6E0 00431023 */ subu $v0, $v0, $v1
/* D2DE4 8013C6E4 44820000 */ mtc1 $v0, $f0
/* D2DE8 8013C6E8 00000000 */ nop
/* D2DEC 8013C6EC 46800020 */ cvt.s.w $f0, $f0
/* D2DF0 8013C6F0 46040002 */ mul.s $f0, $f0, $f4
/* D2DF4 8013C6F4 00000000 */ nop
/* D2DF8 8013C6F8 44831000 */ mtc1 $v1, $f2
/* D2DFC 8013C6FC 00000000 */ nop
/* D2E00 8013C700 468010A0 */ cvt.s.w $f2, $f2
/* D2E04 8013C704 8C820068 */ lw $v0, 0x68($a0)
/* D2E08 8013C708 46001080 */ add.s $f2, $f2, $f0
/* D2E0C 8013C70C 4600128D */ trunc.w.s $f10, $f2
/* D2E10 8013C710 44035000 */ mfc1 $v1, $f10
/* D2E14 8013C714 0804F233 */ j .L8013C8CC
/* D2E18 8013C718 00E21021 */ addu $v0, $a3, $v0
.L8013C71C:
/* D2E1C 8013C71C 84C30000 */ lh $v1, 0x0($a2)
/* D2E20 8013C720 85020000 */ lh $v0, 0x0($t0)
/* D2E24 8013C724 00431023 */ subu $v0, $v0, $v1
/* D2E28 8013C728 44821000 */ mtc1 $v0, $f2
/* D2E2C 8013C72C 00000000 */ nop
/* D2E30 8013C730 468010A0 */ cvt.s.w $f2, $f2
/* D2E34 8013C734 46041082 */ mul.s $f2, $f2, $f4
/* D2E38 8013C738 00000000 */ nop
/* D2E3C 8013C73C 44830000 */ mtc1 $v1, $f0
/* D2E40 8013C740 00000000 */ nop
/* D2E44 8013C744 46800020 */ cvt.s.w $f0, $f0
/* D2E48 8013C748 46020000 */ add.s $f0, $f0, $f2
/* D2E4C 8013C74C 4600028D */ trunc.w.s $f10, $f0
/* D2E50 8013C750 44025000 */ mfc1 $v0, $f10
/* D2E54 8013C754 00000000 */ nop
/* D2E58 8013C758 00021400 */ sll $v0, $v0, 16
/* D2E5C 8013C75C 00021403 */ sra $v0, $v0, 16
/* D2E60 8013C760 44821000 */ mtc1 $v0, $f2
/* D2E64 8013C764 00000000 */ nop
/* D2E68 8013C768 468010A1 */ cvt.d.w $f2, $f2
/* D2E6C 8013C76C 46261082 */ mul.d $f2, $f2, $f6
/* D2E70 8013C770 00000000 */ nop
/* D2E74 8013C774 8D650000 */ lw $a1, 0x0($t3)
/* D2E78 8013C778 94A20008 */ lhu $v0, 0x8($a1)
/* D2E7C 8013C77C 44820000 */ mtc1 $v0, $f0
/* D2E80 8013C780 00000000 */ nop
/* D2E84 8013C784 46800021 */ cvt.d.w $f0, $f0
/* D2E88 8013C788 46201082 */ mul.d $f2, $f2, $f0
/* D2E8C 8013C78C 00000000 */ nop
/* D2E90 8013C790 8D240000 */ lw $a0, 0x0($t1)
/* D2E94 8013C794 00042080 */ sll $a0, $a0, 2
/* D2E98 8013C798 02442021 */ addu $a0, $s2, $a0
/* D2E9C 8013C79C 8C820068 */ lw $v0, 0x68($a0)
/* D2EA0 8013C7A0 00E21021 */ addu $v0, $a3, $v0
/* D2EA4 8013C7A4 4620128D */ trunc.w.d $f10, $f2
/* D2EA8 8013C7A8 44035000 */ mfc1 $v1, $f10
/* D2EAC 8013C7AC 00000000 */ nop
/* D2EB0 8013C7B0 A4430000 */ sh $v1, 0x0($v0)
/* D2EB4 8013C7B4 84C30002 */ lh $v1, 0x2($a2)
/* D2EB8 8013C7B8 85020002 */ lh $v0, 0x2($t0)
/* D2EBC 8013C7BC 00431023 */ subu $v0, $v0, $v1
/* D2EC0 8013C7C0 44821000 */ mtc1 $v0, $f2
/* D2EC4 8013C7C4 00000000 */ nop
/* D2EC8 8013C7C8 468010A0 */ cvt.s.w $f2, $f2
/* D2ECC 8013C7CC 46041082 */ mul.s $f2, $f2, $f4
/* D2ED0 8013C7D0 00000000 */ nop
/* D2ED4 8013C7D4 44830000 */ mtc1 $v1, $f0
/* D2ED8 8013C7D8 00000000 */ nop
/* D2EDC 8013C7DC 46800020 */ cvt.s.w $f0, $f0
/* D2EE0 8013C7E0 46020000 */ add.s $f0, $f0, $f2
/* D2EE4 8013C7E4 4600028D */ trunc.w.s $f10, $f0
/* D2EE8 8013C7E8 44025000 */ mfc1 $v0, $f10
/* D2EEC 8013C7EC 00000000 */ nop
/* D2EF0 8013C7F0 00021400 */ sll $v0, $v0, 16
/* D2EF4 8013C7F4 00021403 */ sra $v0, $v0, 16
/* D2EF8 8013C7F8 44821000 */ mtc1 $v0, $f2
/* D2EFC 8013C7FC 00000000 */ nop
/* D2F00 8013C800 468010A1 */ cvt.d.w $f2, $f2
/* D2F04 8013C804 46261082 */ mul.d $f2, $f2, $f6
/* D2F08 8013C808 00000000 */ nop
/* D2F0C 8013C80C 94A2000A */ lhu $v0, 0xA($a1)
/* D2F10 8013C810 44820000 */ mtc1 $v0, $f0
/* D2F14 8013C814 00000000 */ nop
/* D2F18 8013C818 46800021 */ cvt.d.w $f0, $f0
/* D2F1C 8013C81C 46201082 */ mul.d $f2, $f2, $f0
/* D2F20 8013C820 00000000 */ nop
/* D2F24 8013C824 8C820068 */ lw $v0, 0x68($a0)
/* D2F28 8013C828 00E21021 */ addu $v0, $a3, $v0
/* D2F2C 8013C82C 4620128D */ trunc.w.d $f10, $f2
/* D2F30 8013C830 44035000 */ mfc1 $v1, $f10
/* D2F34 8013C834 00000000 */ nop
/* D2F38 8013C838 A4430002 */ sh $v1, 0x2($v0)
/* D2F3C 8013C83C 84C30004 */ lh $v1, 0x4($a2)
/* D2F40 8013C840 85020004 */ lh $v0, 0x4($t0)
/* D2F44 8013C844 00431023 */ subu $v0, $v0, $v1
/* D2F48 8013C848 44821000 */ mtc1 $v0, $f2
/* D2F4C 8013C84C 00000000 */ nop
/* D2F50 8013C850 468010A0 */ cvt.s.w $f2, $f2
/* D2F54 8013C854 46041082 */ mul.s $f2, $f2, $f4
/* D2F58 8013C858 00000000 */ nop
/* D2F5C 8013C85C 44830000 */ mtc1 $v1, $f0
/* D2F60 8013C860 00000000 */ nop
/* D2F64 8013C864 46800020 */ cvt.s.w $f0, $f0
/* D2F68 8013C868 46020000 */ add.s $f0, $f0, $f2
/* D2F6C 8013C86C 4600028D */ trunc.w.s $f10, $f0
/* D2F70 8013C870 44025000 */ mfc1 $v0, $f10
/* D2F74 8013C874 00000000 */ nop
/* D2F78 8013C878 00021400 */ sll $v0, $v0, 16
/* D2F7C 8013C87C 00021403 */ sra $v0, $v0, 16
/* D2F80 8013C880 44821000 */ mtc1 $v0, $f2
/* D2F84 8013C884 00000000 */ nop
/* D2F88 8013C888 468010A1 */ cvt.d.w $f2, $f2
/* D2F8C 8013C88C 46261082 */ mul.d $f2, $f2, $f6
/* D2F90 8013C890 00000000 */ nop
/* D2F94 8013C894 94A3000A */ lhu $v1, 0xA($a1)
/* D2F98 8013C898 94A20008 */ lhu $v0, 0x8($a1)
/* D2F9C 8013C89C 00431021 */ addu $v0, $v0, $v1
/* D2FA0 8013C8A0 00021043 */ sra $v0, $v0, 1
/* D2FA4 8013C8A4 44820000 */ mtc1 $v0, $f0
/* D2FA8 8013C8A8 00000000 */ nop
/* D2FAC 8013C8AC 46800021 */ cvt.d.w $f0, $f0
/* D2FB0 8013C8B0 46201082 */ mul.d $f2, $f2, $f0
/* D2FB4 8013C8B4 00000000 */ nop
/* D2FB8 8013C8B8 8C820068 */ lw $v0, 0x68($a0)
/* D2FBC 8013C8BC 00E21021 */ addu $v0, $a3, $v0
/* D2FC0 8013C8C0 4620128D */ trunc.w.d $f10, $f2
/* D2FC4 8013C8C4 44035000 */ mfc1 $v1, $f10
/* D2FC8 8013C8C8 00000000 */ nop
.L8013C8CC:
/* D2FCC 8013C8CC A4430004 */ sh $v1, 0x4($v0)
/* D2FD0 8013C8D0 8E420014 */ lw $v0, 0x14($s2)
/* D2FD4 8013C8D4 3042A000 */ andi $v0, $v0, 0xA000
/* D2FD8 8013C8D8 10400040 */ beqz $v0, .L8013C9DC
/* D2FDC 8013C8DC 00000000 */ nop
/* D2FE0 8013C8E0 80C30008 */ lb $v1, 0x8($a2)
/* D2FE4 8013C8E4 81020008 */ lb $v0, 0x8($t0)
/* D2FE8 8013C8E8 00431023 */ subu $v0, $v0, $v1
/* D2FEC 8013C8EC 44821000 */ mtc1 $v0, $f2
/* D2FF0 8013C8F0 00000000 */ nop
/* D2FF4 8013C8F4 468010A0 */ cvt.s.w $f2, $f2
/* D2FF8 8013C8F8 46041082 */ mul.s $f2, $f2, $f4
/* D2FFC 8013C8FC 00000000 */ nop
/* D3000 8013C900 8D220000 */ lw $v0, 0x0($t1)
/* D3004 8013C904 44830000 */ mtc1 $v1, $f0
/* D3008 8013C908 00000000 */ nop
/* D300C 8013C90C 46800020 */ cvt.s.w $f0, $f0
/* D3010 8013C910 00021080 */ sll $v0, $v0, 2
/* D3014 8013C914 02421021 */ addu $v0, $s2, $v0
/* D3018 8013C918 8C420068 */ lw $v0, 0x68($v0)
/* D301C 8013C91C 46020000 */ add.s $f0, $f0, $f2
/* D3020 8013C920 00E21021 */ addu $v0, $a3, $v0
/* D3024 8013C924 4600028D */ trunc.w.s $f10, $f0
/* D3028 8013C928 44035000 */ mfc1 $v1, $f10
/* D302C 8013C92C 00000000 */ nop
/* D3030 8013C930 A043000C */ sb $v1, 0xC($v0)
/* D3034 8013C934 80C30009 */ lb $v1, 0x9($a2)
/* D3038 8013C938 81020009 */ lb $v0, 0x9($t0)
/* D303C 8013C93C 00431023 */ subu $v0, $v0, $v1
/* D3040 8013C940 44821000 */ mtc1 $v0, $f2
/* D3044 8013C944 00000000 */ nop
/* D3048 8013C948 468010A0 */ cvt.s.w $f2, $f2
/* D304C 8013C94C 46041082 */ mul.s $f2, $f2, $f4
/* D3050 8013C950 00000000 */ nop
/* D3054 8013C954 8D220000 */ lw $v0, 0x0($t1)
/* D3058 8013C958 44830000 */ mtc1 $v1, $f0
/* D305C 8013C95C 00000000 */ nop
/* D3060 8013C960 46800020 */ cvt.s.w $f0, $f0
/* D3064 8013C964 00021080 */ sll $v0, $v0, 2
/* D3068 8013C968 02421021 */ addu $v0, $s2, $v0
/* D306C 8013C96C 8C420068 */ lw $v0, 0x68($v0)
/* D3070 8013C970 46020000 */ add.s $f0, $f0, $f2
/* D3074 8013C974 00E21021 */ addu $v0, $a3, $v0
/* D3078 8013C978 4600028D */ trunc.w.s $f10, $f0
/* D307C 8013C97C 44035000 */ mfc1 $v1, $f10
/* D3080 8013C980 00000000 */ nop
/* D3084 8013C984 A043000D */ sb $v1, 0xD($v0)
/* D3088 8013C988 80C3000A */ lb $v1, 0xA($a2)
/* D308C 8013C98C 8102000A */ lb $v0, 0xA($t0)
/* D3090 8013C990 00431023 */ subu $v0, $v0, $v1
/* D3094 8013C994 44821000 */ mtc1 $v0, $f2
/* D3098 8013C998 00000000 */ nop
/* D309C 8013C99C 468010A0 */ cvt.s.w $f2, $f2
/* D30A0 8013C9A0 46041082 */ mul.s $f2, $f2, $f4
/* D30A4 8013C9A4 00000000 */ nop
/* D30A8 8013C9A8 8D220000 */ lw $v0, 0x0($t1)
/* D30AC 8013C9AC 44830000 */ mtc1 $v1, $f0
/* D30B0 8013C9B0 00000000 */ nop
/* D30B4 8013C9B4 46800020 */ cvt.s.w $f0, $f0
/* D30B8 8013C9B8 00021080 */ sll $v0, $v0, 2
/* D30BC 8013C9BC 02421021 */ addu $v0, $s2, $v0
/* D30C0 8013C9C0 8C420068 */ lw $v0, 0x68($v0)
/* D30C4 8013C9C4 46020000 */ add.s $f0, $f0, $f2
/* D30C8 8013C9C8 00E21021 */ addu $v0, $a3, $v0
/* D30CC 8013C9CC 4600028D */ trunc.w.s $f10, $f0
/* D30D0 8013C9D0 44035000 */ mfc1 $v1, $f10
/* D30D4 8013C9D4 0804F321 */ j .L8013CC84
/* D30D8 8013C9D8 A043000E */ sb $v1, 0xE($v0)
.L8013C9DC:
/* D30DC 8013C9DC 90C30006 */ lbu $v1, 0x6($a2)
/* D30E0 8013C9E0 90C20007 */ lbu $v0, 0x7($a2)
/* D30E4 8013C9E4 3C018015 */ lui $at, %hi(D_801510F0)
/* D30E8 8013C9E8 D42210F0 */ ldc1 $f2, %lo(D_801510F0)($at)
/* D30EC 8013C9EC 00621821 */ addu $v1, $v1, $v0
/* D30F0 8013C9F0 44830000 */ mtc1 $v1, $f0
/* D30F4 8013C9F4 00000000 */ nop
/* D30F8 8013C9F8 46800021 */ cvt.d.w $f0, $f0
/* D30FC 8013C9FC 46220002 */ mul.d $f0, $f0, $f2
/* D3100 8013CA00 00000000 */ nop
/* D3104 8013CA04 8D220000 */ lw $v0, 0x0($t1)
/* D3108 8013CA08 00021080 */ sll $v0, $v0, 2
/* D310C 8013CA0C 02421021 */ addu $v0, $s2, $v0
/* D3110 8013CA10 8C420068 */ lw $v0, 0x68($v0)
/* D3114 8013CA14 3C01406E */ lui $at, (0x406E0000 >> 16)
/* D3118 8013CA18 44811800 */ mtc1 $at, $f3
/* D311C 8013CA1C 44801000 */ mtc1 $zero, $f2
/* D3120 8013CA20 00E21021 */ addu $v0, $a3, $v0
/* D3124 8013CA24 2445000C */ addiu $a1, $v0, 0xC
/* D3128 8013CA28 46201001 */ sub.d $f0, $f2, $f0
/* D312C 8013CA2C 2444000D */ addiu $a0, $v0, 0xD
/* D3130 8013CA30 4620403E */ c.le.d $f8, $f0
/* D3134 8013CA34 00000000 */ nop
/* D3138 8013CA38 45000086 */ bc1f .L8013CC54
/* D313C 8013CA3C 2442000E */ addiu $v0, $v0, 0xE
/* D3140 8013CA40 0804F31A */ j .L8013CC68
/* D3144 8013CA44 46280001 */ sub.d $f0, $f0, $f8
.L8013CA48:
/* D3148 8013CA48 9662000E */ lhu $v0, 0xE($s3)
/* D314C 8013CA4C 30420001 */ andi $v0, $v0, 0x1
/* D3150 8013CA50 10400010 */ beqz $v0, .L8013CA94
/* D3154 8013CA54 00000000 */ nop
/* D3158 8013CA58 8D230000 */ lw $v1, 0x0($t1)
/* D315C 8013CA5C 00031880 */ sll $v1, $v1, 2
/* D3160 8013CA60 02431821 */ addu $v1, $s2, $v1
/* D3164 8013CA64 8C620068 */ lw $v0, 0x68($v1)
/* D3168 8013CA68 94C40000 */ lhu $a0, 0x0($a2)
/* D316C 8013CA6C 00E21021 */ addu $v0, $a3, $v0
/* D3170 8013CA70 A4440000 */ sh $a0, 0x0($v0)
/* D3174 8013CA74 8C620068 */ lw $v0, 0x68($v1)
/* D3178 8013CA78 94C40002 */ lhu $a0, 0x2($a2)
/* D317C 8013CA7C 00E21021 */ addu $v0, $a3, $v0
/* D3180 8013CA80 A4440002 */ sh $a0, 0x2($v0)
/* D3184 8013CA84 8C620068 */ lw $v0, 0x68($v1)
/* D3188 8013CA88 94C30004 */ lhu $v1, 0x4($a2)
/* D318C 8013CA8C 0804F2E1 */ j .L8013CB84
/* D3190 8013CA90 00E21021 */ addu $v0, $a3, $v0
.L8013CA94:
/* D3194 8013CA94 84C20000 */ lh $v0, 0x0($a2)
/* D3198 8013CA98 44821000 */ mtc1 $v0, $f2
/* D319C 8013CA9C 00000000 */ nop
/* D31A0 8013CAA0 468010A1 */ cvt.d.w $f2, $f2
/* D31A4 8013CAA4 46261082 */ mul.d $f2, $f2, $f6
/* D31A8 8013CAA8 00000000 */ nop
/* D31AC 8013CAAC 8D650000 */ lw $a1, 0x0($t3)
/* D31B0 8013CAB0 94A20008 */ lhu $v0, 0x8($a1)
/* D31B4 8013CAB4 44820000 */ mtc1 $v0, $f0
/* D31B8 8013CAB8 00000000 */ nop
/* D31BC 8013CABC 46800021 */ cvt.d.w $f0, $f0
/* D31C0 8013CAC0 46201082 */ mul.d $f2, $f2, $f0
/* D31C4 8013CAC4 00000000 */ nop
/* D31C8 8013CAC8 8D240000 */ lw $a0, 0x0($t1)
/* D31CC 8013CACC 00042080 */ sll $a0, $a0, 2
/* D31D0 8013CAD0 02442021 */ addu $a0, $s2, $a0
/* D31D4 8013CAD4 8C820068 */ lw $v0, 0x68($a0)
/* D31D8 8013CAD8 00E21021 */ addu $v0, $a3, $v0
/* D31DC 8013CADC 4620128D */ trunc.w.d $f10, $f2
/* D31E0 8013CAE0 44035000 */ mfc1 $v1, $f10
/* D31E4 8013CAE4 00000000 */ nop
/* D31E8 8013CAE8 A4430000 */ sh $v1, 0x0($v0)
/* D31EC 8013CAEC 84C20002 */ lh $v0, 0x2($a2)
/* D31F0 8013CAF0 44821000 */ mtc1 $v0, $f2
/* D31F4 8013CAF4 00000000 */ nop
/* D31F8 8013CAF8 468010A1 */ cvt.d.w $f2, $f2
/* D31FC 8013CAFC 46261082 */ mul.d $f2, $f2, $f6
/* D3200 8013CB00 00000000 */ nop
/* D3204 8013CB04 94A2000A */ lhu $v0, 0xA($a1)
/* D3208 8013CB08 44820000 */ mtc1 $v0, $f0
/* D320C 8013CB0C 00000000 */ nop
/* D3210 8013CB10 46800021 */ cvt.d.w $f0, $f0
/* D3214 8013CB14 46201082 */ mul.d $f2, $f2, $f0
/* D3218 8013CB18 00000000 */ nop
/* D321C 8013CB1C 8C820068 */ lw $v0, 0x68($a0)
/* D3220 8013CB20 00E21021 */ addu $v0, $a3, $v0
/* D3224 8013CB24 4620128D */ trunc.w.d $f10, $f2
/* D3228 8013CB28 44035000 */ mfc1 $v1, $f10
/* D322C 8013CB2C 00000000 */ nop
/* D3230 8013CB30 A4430002 */ sh $v1, 0x2($v0)
/* D3234 8013CB34 84C20004 */ lh $v0, 0x4($a2)
/* D3238 8013CB38 44821000 */ mtc1 $v0, $f2
/* D323C 8013CB3C 00000000 */ nop
/* D3240 8013CB40 468010A1 */ cvt.d.w $f2, $f2
/* D3244 8013CB44 46261082 */ mul.d $f2, $f2, $f6
/* D3248 8013CB48 00000000 */ nop
/* D324C 8013CB4C 94A3000A */ lhu $v1, 0xA($a1)
/* D3250 8013CB50 94A20008 */ lhu $v0, 0x8($a1)
/* D3254 8013CB54 00431021 */ addu $v0, $v0, $v1
/* D3258 8013CB58 00021043 */ sra $v0, $v0, 1
/* D325C 8013CB5C 44820000 */ mtc1 $v0, $f0
/* D3260 8013CB60 00000000 */ nop
/* D3264 8013CB64 46800021 */ cvt.d.w $f0, $f0
/* D3268 8013CB68 46201082 */ mul.d $f2, $f2, $f0
/* D326C 8013CB6C 00000000 */ nop
/* D3270 8013CB70 8C820068 */ lw $v0, 0x68($a0)
/* D3274 8013CB74 00E21021 */ addu $v0, $a3, $v0
/* D3278 8013CB78 4620128D */ trunc.w.d $f10, $f2
/* D327C 8013CB7C 44035000 */ mfc1 $v1, $f10
/* D3280 8013CB80 00000000 */ nop
.L8013CB84:
/* D3284 8013CB84 A4430004 */ sh $v1, 0x4($v0)
/* D3288 8013CB88 8E420014 */ lw $v0, 0x14($s2)
/* D328C 8013CB8C 3042A000 */ andi $v0, $v0, 0xA000
/* D3290 8013CB90 10400017 */ beqz $v0, .L8013CBF0
/* D3294 8013CB94 00000000 */ nop
/* D3298 8013CB98 8D220000 */ lw $v0, 0x0($t1)
/* D329C 8013CB9C 00021080 */ sll $v0, $v0, 2
/* D32A0 8013CBA0 02421021 */ addu $v0, $s2, $v0
/* D32A4 8013CBA4 8C420068 */ lw $v0, 0x68($v0)
/* D32A8 8013CBA8 90C30008 */ lbu $v1, 0x8($a2)
/* D32AC 8013CBAC 00E21021 */ addu $v0, $a3, $v0
/* D32B0 8013CBB0 A043000C */ sb $v1, 0xC($v0)
/* D32B4 8013CBB4 8D220000 */ lw $v0, 0x0($t1)
/* D32B8 8013CBB8 00021080 */ sll $v0, $v0, 2
/* D32BC 8013CBBC 02421021 */ addu $v0, $s2, $v0
/* D32C0 8013CBC0 8C420068 */ lw $v0, 0x68($v0)
/* D32C4 8013CBC4 90C30009 */ lbu $v1, 0x9($a2)
/* D32C8 8013CBC8 00E21021 */ addu $v0, $a3, $v0
/* D32CC 8013CBCC A043000D */ sb $v1, 0xD($v0)
/* D32D0 8013CBD0 8D220000 */ lw $v0, 0x0($t1)
/* D32D4 8013CBD4 00021080 */ sll $v0, $v0, 2
/* D32D8 8013CBD8 02421021 */ addu $v0, $s2, $v0
/* D32DC 8013CBDC 8C420068 */ lw $v0, 0x68($v0)
/* D32E0 8013CBE0 90C3000A */ lbu $v1, 0xA($a2)
/* D32E4 8013CBE4 00E21021 */ addu $v0, $a3, $v0
/* D32E8 8013CBE8 0804F321 */ j .L8013CC84
/* D32EC 8013CBEC A043000E */ sb $v1, 0xE($v0)
.L8013CBF0:
/* D32F0 8013CBF0 90C30006 */ lbu $v1, 0x6($a2)
/* D32F4 8013CBF4 90C20007 */ lbu $v0, 0x7($a2)
/* D32F8 8013CBF8 3C018015 */ lui $at, %hi(D_801510F8)
/* D32FC 8013CBFC D42210F8 */ ldc1 $f2, %lo(D_801510F8)($at)
/* D3300 8013CC00 00621821 */ addu $v1, $v1, $v0
/* D3304 8013CC04 44830000 */ mtc1 $v1, $f0
/* D3308 8013CC08 00000000 */ nop
/* D330C 8013CC0C 46800021 */ cvt.d.w $f0, $f0
/* D3310 8013CC10 46220002 */ mul.d $f0, $f0, $f2
/* D3314 8013CC14 00000000 */ nop
/* D3318 8013CC18 8D220000 */ lw $v0, 0x0($t1)
/* D331C 8013CC1C 00021080 */ sll $v0, $v0, 2
/* D3320 8013CC20 02421021 */ addu $v0, $s2, $v0
/* D3324 8013CC24 8C420068 */ lw $v0, 0x68($v0)
/* D3328 8013CC28 3C01406E */ lui $at, (0x406E0000 >> 16)
/* D332C 8013CC2C 44811800 */ mtc1 $at, $f3
/* D3330 8013CC30 44801000 */ mtc1 $zero, $f2
/* D3334 8013CC34 00E21021 */ addu $v0, $a3, $v0
/* D3338 8013CC38 2445000C */ addiu $a1, $v0, 0xC
/* D333C 8013CC3C 46201001 */ sub.d $f0, $f2, $f0
/* D3340 8013CC40 2444000D */ addiu $a0, $v0, 0xD
/* D3344 8013CC44 4620403E */ c.le.d $f8, $f0
/* D3348 8013CC48 00000000 */ nop
/* D334C 8013CC4C 45010005 */ bc1t .L8013CC64
/* D3350 8013CC50 2442000E */ addiu $v0, $v0, 0xE
.L8013CC54:
/* D3354 8013CC54 4620028D */ trunc.w.d $f10, $f0
/* D3358 8013CC58 44035000 */ mfc1 $v1, $f10
/* D335C 8013CC5C 0804F31F */ j .L8013CC7C
/* D3360 8013CC60 A0430000 */ sb $v1, 0x0($v0)
.L8013CC64:
/* D3364 8013CC64 46280001 */ sub.d $f0, $f0, $f8
.L8013CC68:
/* D3368 8013CC68 4620028D */ trunc.w.d $f10, $f0
/* D336C 8013CC6C 44035000 */ mfc1 $v1, $f10
/* D3370 8013CC70 00000000 */ nop
/* D3374 8013CC74 006C1825 */ or $v1, $v1, $t4
/* D3378 8013CC78 A0430000 */ sb $v1, 0x0($v0)
.L8013CC7C:
/* D337C 8013CC7C A0830000 */ sb $v1, 0x0($a0)
/* D3380 8013CC80 A0A30000 */ sb $v1, 0x0($a1)
.L8013CC84:
/* D3384 8013CC84 9662000E */ lhu $v0, 0xE($s3)
/* D3388 8013CC88 30420001 */ andi $v0, $v0, 0x1
/* D338C 8013CC8C 1040000E */ beqz $v0, .L8013CCC8
/* D3390 8013CC90 00000000 */ nop
/* D3394 8013CC94 8D240000 */ lw $a0, 0x0($t1)
/* D3398 8013CC98 90C20006 */ lbu $v0, 0x6($a2)
/* D339C 8013CC9C 00042080 */ sll $a0, $a0, 2
/* D33A0 8013CCA0 02442021 */ addu $a0, $s2, $a0
/* D33A4 8013CCA4 24420100 */ addiu $v0, $v0, 0x100
/* D33A8 8013CCA8 8C830068 */ lw $v1, 0x68($a0)
/* D33AC 8013CCAC 00021140 */ sll $v0, $v0, 5
/* D33B0 8013CCB0 00E31821 */ addu $v1, $a3, $v1
/* D33B4 8013CCB4 A4620008 */ sh $v0, 0x8($v1)
/* D33B8 8013CCB8 8C830068 */ lw $v1, 0x68($a0)
/* D33BC 8013CCBC 90C20007 */ lbu $v0, 0x7($a2)
/* D33C0 8013CCC0 0804F35B */ j .L8013CD6C
/* D33C4 8013CCC4 00E31821 */ addu $v1, $a3, $v1
.L8013CCC8:
/* D33C8 8013CCC8 90C20006 */ lbu $v0, 0x6($a2)
/* D33CC 8013CCCC 44821000 */ mtc1 $v0, $f2
/* D33D0 8013CCD0 00000000 */ nop
/* D33D4 8013CCD4 468010A1 */ cvt.d.w $f2, $f2
/* D33D8 8013CCD8 46261082 */ mul.d $f2, $f2, $f6
/* D33DC 8013CCDC 00000000 */ nop
/* D33E0 8013CCE0 8D650000 */ lw $a1, 0x0($t3)
/* D33E4 8013CCE4 94A20008 */ lhu $v0, 0x8($a1)
/* D33E8 8013CCE8 44820000 */ mtc1 $v0, $f0
/* D33EC 8013CCEC 00000000 */ nop
/* D33F0 8013CCF0 46800021 */ cvt.d.w $f0, $f0
/* D33F4 8013CCF4 46201082 */ mul.d $f2, $f2, $f0
/* D33F8 8013CCF8 00000000 */ nop
/* D33FC 8013CCFC 8D240000 */ lw $a0, 0x0($t1)
/* D3400 8013CD00 00042080 */ sll $a0, $a0, 2
/* D3404 8013CD04 02442021 */ addu $a0, $s2, $a0
/* D3408 8013CD08 8C830068 */ lw $v1, 0x68($a0)
/* D340C 8013CD0C 00E31821 */ addu $v1, $a3, $v1
/* D3410 8013CD10 4620128D */ trunc.w.d $f10, $f2
/* D3414 8013CD14 44025000 */ mfc1 $v0, $f10
/* D3418 8013CD18 00000000 */ nop
/* D341C 8013CD1C 24420100 */ addiu $v0, $v0, 0x100
/* D3420 8013CD20 00021140 */ sll $v0, $v0, 5
/* D3424 8013CD24 A4620008 */ sh $v0, 0x8($v1)
/* D3428 8013CD28 90C20007 */ lbu $v0, 0x7($a2)
/* D342C 8013CD2C 44821000 */ mtc1 $v0, $f2
/* D3430 8013CD30 00000000 */ nop
/* D3434 8013CD34 468010A1 */ cvt.d.w $f2, $f2
/* D3438 8013CD38 46261082 */ mul.d $f2, $f2, $f6
/* D343C 8013CD3C 00000000 */ nop
/* D3440 8013CD40 94A2000A */ lhu $v0, 0xA($a1)
/* D3444 8013CD44 44820000 */ mtc1 $v0, $f0
/* D3448 8013CD48 00000000 */ nop
/* D344C 8013CD4C 46800021 */ cvt.d.w $f0, $f0
/* D3450 8013CD50 46201082 */ mul.d $f2, $f2, $f0
/* D3454 8013CD54 00000000 */ nop
/* D3458 8013CD58 8C830068 */ lw $v1, 0x68($a0)
/* D345C 8013CD5C 00E31821 */ addu $v1, $a3, $v1
/* D3460 8013CD60 4620128D */ trunc.w.d $f10, $f2
/* D3464 8013CD64 44025000 */ mfc1 $v0, $f10
/* D3468 8013CD68 00000000 */ nop
.L8013CD6C:
/* D346C 8013CD6C 24420100 */ addiu $v0, $v0, 0x100
/* D3470 8013CD70 00021140 */ sll $v0, $v0, 5
/* D3474 8013CD74 A462000A */ sh $v0, 0xA($v1)
/* D3478 8013CD78 24C6000C */ addiu $a2, $a2, 0xC
/* D347C 8013CD7C 24E70010 */ addiu $a3, $a3, 0x10
/* D3480 8013CD80 96620008 */ lhu $v0, 0x8($s3)
/* D3484 8013CD84 254A0001 */ addiu $t2, $t2, 0x1
/* D3488 8013CD88 0142102A */ slt $v0, $t2, $v0
/* D348C 8013CD8C 1440FE21 */ bnez $v0, .L8013C614
/* D3490 8013CD90 2508000C */ addiu $t0, $t0, 0xC
.L8013CD94:
/* D3494 8013CD94 A6400008 */ sh $zero, 0x8($s2)
/* D3498 8013CD98 96620008 */ lhu $v0, 0x8($s3)
/* D349C 8013CD9C 03C0202D */ daddu $a0, $fp, $zero
/* D34A0 8013CDA0 2442FFFF */ addiu $v0, $v0, -0x1
/* D34A4 8013CDA4 0C00AB4B */ jal heap_free
/* D34A8 8013CDA8 A642000A */ sh $v0, 0xA($s2)
/* D34AC 8013CDAC 12E00003 */ beqz $s7, .L8013CDBC
/* D34B0 8013CDB0 00000000 */ nop
/* D34B4 8013CDB4 0C00AB4B */ jal heap_free
/* D34B8 8013CDB8 02E0202D */ daddu $a0, $s7, $zero
.L8013CDBC:
/* D34BC 8013CDBC 8FAD0014 */ lw $t5, 0x14($sp)
/* D34C0 8013CDC0 11A0006D */ beqz $t5, .L8013CF78
/* D34C4 8013CDC4 00000000 */ nop
/* D34C8 8013CDC8 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* D34CC 8013CDCC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* D34D0 8013CDD0 94420134 */ lhu $v0, 0x134($v0)
/* D34D4 8013CDD4 15A00002 */ bnez $t5, .L8013CDE0
/* D34D8 8013CDD8 004D001A */ div $zero, $v0, $t5
/* D34DC 8013CDDC 0007000D */ break 7
.L8013CDE0:
/* D34E0 8013CDE0 2401FFFF */ addiu $at, $zero, -0x1
/* D34E4 8013CDE4 15A10004 */ bne $t5, $at, .L8013CDF8
/* D34E8 8013CDE8 3C018000 */ lui $at, (0x80000000 >> 16)
/* D34EC 8013CDEC 14410002 */ bne $v0, $at, .L8013CDF8
/* D34F0 8013CDF0 00000000 */ nop
/* D34F4 8013CDF4 0006000D */ break 6
.L8013CDF8:
/* D34F8 8013CDF8 00001810 */ mfhi $v1
/* D34FC 8013CDFC 1460005E */ bnez $v1, .L8013CF78
/* D3500 8013CE00 00000000 */ nop
/* D3504 8013CE04 1A800027 */ blez $s4, .L8013CEA4
/* D3508 8013CE08 00000000 */ nop
/* D350C 8013CE0C 26D60001 */ addiu $s6, $s6, 0x1
/* D3510 8013CE10 02D4102A */ slt $v0, $s6, $s4
/* D3514 8013CE14 14400050 */ bnez $v0, .L8013CF58
/* D3518 8013CE18 00000000 */ nop
/* D351C 8013CE1C 8E430014 */ lw $v1, 0x14($s2)
/* D3520 8013CE20 30620100 */ andi $v0, $v1, 0x100
/* D3524 8013CE24 5040000E */ beql $v0, $zero, .L8013CE60
/* D3528 8013CE28 26310001 */ addiu $s1, $s1, 0x1
/* D352C 8013CE2C 2631FFFF */ addiu $s1, $s1, -0x1
/* D3530 8013CE30 06230049 */ bgezl $s1, .L8013CF58
/* D3534 8013CE34 0000B02D */ daddu $s6, $zero, $zero
/* D3538 8013CE38 30620080 */ andi $v0, $v1, 0x80
/* D353C 8013CE3C 10400004 */ beqz $v0, .L8013CE50
/* D3540 8013CE40 30620800 */ andi $v0, $v1, 0x800
/* D3544 8013CE44 9662000C */ lhu $v0, 0xC($s3)
/* D3548 8013CE48 0804F3A7 */ j .L8013CE9C
/* D354C 8013CE4C 2451FFFF */ addiu $s1, $v0, -0x1
.L8013CE50:
/* D3550 8013CE50 10400010 */ beqz $v0, .L8013CE94
/* D3554 8013CE54 34624000 */ ori $v0, $v1, 0x4000
/* D3558 8013CE58 0804F3A6 */ j .L8013CE98
/* D355C 8013CE5C 0000882D */ daddu $s1, $zero, $zero
.L8013CE60:
/* D3560 8013CE60 9662000C */ lhu $v0, 0xC($s3)
/* D3564 8013CE64 0222102A */ slt $v0, $s1, $v0
/* D3568 8013CE68 1440003B */ bnez $v0, .L8013CF58
/* D356C 8013CE6C 0000B02D */ daddu $s6, $zero, $zero
/* D3570 8013CE70 30620080 */ andi $v0, $v1, 0x80
/* D3574 8013CE74 10400003 */ beqz $v0, .L8013CE84
/* D3578 8013CE78 30620800 */ andi $v0, $v1, 0x800
/* D357C 8013CE7C 0804F3D6 */ j .L8013CF58
/* D3580 8013CE80 0000882D */ daddu $s1, $zero, $zero
.L8013CE84:
/* D3584 8013CE84 10400003 */ beqz $v0, .L8013CE94
/* D3588 8013CE88 34624000 */ ori $v0, $v1, 0x4000
/* D358C 8013CE8C 0804F3A6 */ j .L8013CE98
/* D3590 8013CE90 2631FFFF */ addiu $s1, $s1, -0x1
.L8013CE94:
/* D3594 8013CE94 34621000 */ ori $v0, $v1, 0x1000
.L8013CE98:
/* D3598 8013CE98 AE420014 */ sw $v0, 0x14($s2)
.L8013CE9C:
/* D359C 8013CE9C 0804F3D6 */ j .L8013CF58
/* D35A0 8013CEA0 0000B02D */ daddu $s6, $zero, $zero
.L8013CEA4:
/* D35A4 8013CEA4 0681002C */ bgez $s4, .L8013CF58
/* D35A8 8013CEA8 00000000 */ nop
/* D35AC 8013CEAC 8E440014 */ lw $a0, 0x14($s2)
/* D35B0 8013CEB0 30820100 */ andi $v0, $a0, 0x100
/* D35B4 8013CEB4 1040000E */ beqz $v0, .L8013CEF0
/* D35B8 8013CEB8 00000000 */ nop
/* D35BC 8013CEBC 8FAD0010 */ lw $t5, 0x10($sp)
/* D35C0 8013CEC0 022D8823 */ subu $s1, $s1, $t5
/* D35C4 8013CEC4 06210024 */ bgez $s1, .L8013CF58
/* D35C8 8013CEC8 30820080 */ andi $v0, $a0, 0x80
/* D35CC 8013CECC 10400004 */ beqz $v0, .L8013CEE0
/* D35D0 8013CED0 30820800 */ andi $v0, $a0, 0x800
/* D35D4 8013CED4 9662000C */ lhu $v0, 0xC($s3)
/* D35D8 8013CED8 0804F3D6 */ j .L8013CF58
/* D35DC 8013CEDC 02228821 */ addu $s1, $s1, $v0
.L8013CEE0:
/* D35E0 8013CEE0 1040001B */ beqz $v0, .L8013CF50
/* D35E4 8013CEE4 34824000 */ ori $v0, $a0, 0x4000
/* D35E8 8013CEE8 0804F3D5 */ j .L8013CF54
/* D35EC 8013CEEC 0000882D */ daddu $s1, $zero, $zero
.L8013CEF0:
/* D35F0 8013CEF0 8FAD0010 */ lw $t5, 0x10($sp)
/* D35F4 8013CEF4 9663000C */ lhu $v1, 0xC($s3)
/* D35F8 8013CEF8 022D8821 */ addu $s1, $s1, $t5
/* D35FC 8013CEFC 0223102A */ slt $v0, $s1, $v1
/* D3600 8013CF00 14400015 */ bnez $v0, .L8013CF58
/* D3604 8013CF04 30820080 */ andi $v0, $a0, 0x80
/* D3608 8013CF08 1040000D */ beqz $v0, .L8013CF40
/* D360C 8013CF0C 30820800 */ andi $v0, $a0, 0x800
/* D3610 8013CF10 14600002 */ bnez $v1, .L8013CF1C
/* D3614 8013CF14 0223001A */ div $zero, $s1, $v1
/* D3618 8013CF18 0007000D */ break 7
.L8013CF1C:
/* D361C 8013CF1C 2401FFFF */ addiu $at, $zero, -0x1
/* D3620 8013CF20 14610004 */ bne $v1, $at, .L8013CF34
/* D3624 8013CF24 3C018000 */ lui $at, (0x80000000 >> 16)
/* D3628 8013CF28 16210002 */ bne $s1, $at, .L8013CF34
/* D362C 8013CF2C 00000000 */ nop
/* D3630 8013CF30 0006000D */ break 6
.L8013CF34:
/* D3634 8013CF34 00008810 */ mfhi $s1
/* D3638 8013CF38 0804F3D6 */ j .L8013CF58
/* D363C 8013CF3C 00000000 */ nop
.L8013CF40:
/* D3640 8013CF40 10400003 */ beqz $v0, .L8013CF50
/* D3644 8013CF44 34824000 */ ori $v0, $a0, 0x4000
/* D3648 8013CF48 0804F3D5 */ j .L8013CF54
/* D364C 8013CF4C 2471FFFF */ addiu $s1, $v1, -0x1
.L8013CF50:
/* D3650 8013CF50 34821000 */ ori $v0, $a0, 0x1000
.L8013CF54:
/* D3654 8013CF54 AE420014 */ sw $v0, 0x14($s2)
.L8013CF58:
/* D3658 8013CF58 44960000 */ mtc1 $s6, $f0
/* D365C 8013CF5C 00000000 */ nop
/* D3660 8013CF60 46800020 */ cvt.s.w $f0, $f0
/* D3664 8013CF64 E640003C */ swc1 $f0, 0x3C($s2)
/* D3668 8013CF68 44910000 */ mtc1 $s1, $f0
/* D366C 8013CF6C 00000000 */ nop
/* D3670 8013CF70 46800020 */ cvt.s.w $f0, $f0
/* D3674 8013CF74 E6400040 */ swc1 $f0, 0x40($s2)
.L8013CF78:
/* D3678 8013CF78 8FBF003C */ lw $ra, 0x3C($sp)
/* D367C 8013CF7C 8FBE0038 */ lw $fp, 0x38($sp)
/* D3680 8013CF80 8FB70034 */ lw $s7, 0x34($sp)
/* D3684 8013CF84 8FB60030 */ lw $s6, 0x30($sp)
/* D3688 8013CF88 8FB5002C */ lw $s5, 0x2C($sp)
/* D368C 8013CF8C 8FB40028 */ lw $s4, 0x28($sp)
/* D3690 8013CF90 8FB30024 */ lw $s3, 0x24($sp)
/* D3694 8013CF94 8FB20020 */ lw $s2, 0x20($sp)
glabel func_8013CF98
/* D3698 8013CF98 8FB1001C */ lw $s1, 0x1C($sp)
/* D369C 8013CF9C 8FB00018 */ lw $s0, 0x18($sp)
/* D36A0 8013CFA0 03E00008 */ jr $ra
/* D36A4 8013CFA4 27BD0040 */ addiu $sp, $sp, 0x40
### DECOMPILED C INSTRUCTIONS:
void imgfx_mesh_anim_update(ImgFXState* state) {
s32 absKeyframeInterval;
s32 nextKeyIdx;
s32 curKeyIdx;
ImgFXVtx* curKeyframe = NULL;
ImgFXVtx* nextKeyframe = NULL;
s32 keyframeInterval = state->ints.anim.interval;
s32 animStep = state->ints.anim.step;
s32 curSubframe = state->floats.anim.curFrame;
ImgFXAnimHeader* header = imgfx_load_anim(state);
u8* romStart;
f32 lerpAlpha;
s32 i;
if (header == NULL) {
return;
}
if (state->flags & IMGFX_FLAG_200) {
state->flags &= ~IMGFX_FLAG_200;
if (state->flags & IMGFX_FLAG_REVERSE_ANIM) {
state->floats.anim.curIdx = header->keyframesCount - 1;
}
}
curKeyIdx = state->floats.anim.curIdx;
absKeyframeInterval = abs(keyframeInterval);
if (state->flags & IMGFX_FLAG_4000) {
nextKeyIdx = curKeyIdx;
} else {
if (state->flags & IMGFX_FLAG_REVERSE_ANIM) {
nextKeyIdx = curKeyIdx - 1;
if (nextKeyIdx < 0) {
nextKeyIdx = curKeyIdx;
if (state->flags & IMGFX_FLAG_LOOP_ANIM) {
nextKeyIdx = header->keyframesCount - 1;
}
}
} else {
nextKeyIdx = curKeyIdx + 1;
if (nextKeyIdx == header->keyframesCount) {
nextKeyIdx = curKeyIdx;
if (state->flags & IMGFX_FLAG_LOOP_ANIM) {
nextKeyIdx = 0;
}
}
}
}
// find the current + next keyframe vertex data
curKeyframe = heap_malloc(header->vtxCount * sizeof(ImgFXVtx));
romStart = (u8*)((s32)imgfx_data_ROM_START + (s32) header->keyframesOffset + curKeyIdx * header->vtxCount * sizeof(ImgFXVtx));
dma_copy(romStart, romStart + header->vtxCount * sizeof(ImgFXVtx), curKeyframe);
if (keyframeInterval > 1) {
nextKeyframe = heap_malloc(header->vtxCount * sizeof(*nextKeyframe));
romStart = (u8*)((s32)imgfx_data_ROM_START + (s32) header->keyframesOffset + nextKeyIdx * header->vtxCount * sizeof(ImgFXVtx));
dma_copy(romStart, romStart + header->vtxCount * sizeof(ImgFXVtx), nextKeyframe);
}
lerpAlpha = (f32) curSubframe / (f32) keyframeInterval;
for (i = 0; i < header->vtxCount; i++) {
if (state->meshType != IMGFX_MESH_ANIMATED) {
return;
}
if (keyframeInterval > 1) {
// get vertex position, interpolated between keyframes
if (header->flags & IMGFX_ANIM_FLAG_ABSOLUTE_COORDS) {
state->vtxBufs[gCurrentDisplayContextIndex][i].v.ob[0] = (s16)(curKeyframe[i].ob[0] + (nextKeyframe[i].ob[0] - curKeyframe[i].ob[0]) * lerpAlpha);
state->vtxBufs[gCurrentDisplayContextIndex][i].v.ob[1] = (s16)(curKeyframe[i].ob[1] + (nextKeyframe[i].ob[1] - curKeyframe[i].ob[1]) * lerpAlpha);
state->vtxBufs[gCurrentDisplayContextIndex][i].v.ob[2] = (s16)(curKeyframe[i].ob[2] + (nextKeyframe[i].ob[2] - curKeyframe[i].ob[2]) * lerpAlpha);
} else {
state->vtxBufs[gCurrentDisplayContextIndex][i].v.ob[0] = (s16)(curKeyframe[i].ob[0] + (nextKeyframe[i].ob[0] - curKeyframe[i].ob[0]) * lerpAlpha) * 0.01 * ImgFXCurrentTexturePtr->tex.width;
state->vtxBufs[gCurrentDisplayContextIndex][i].v.ob[1] = (s16)(curKeyframe[i].ob[1] + (nextKeyframe[i].ob[1] - curKeyframe[i].ob[1]) * lerpAlpha) * 0.01 * ImgFXCurrentTexturePtr->tex.height;
state->vtxBufs[gCurrentDisplayContextIndex][i].v.ob[2] = (s16)(curKeyframe[i].ob[2] + (nextKeyframe[i].ob[2] - curKeyframe[i].ob[2]) * lerpAlpha) * 0.01 * ((ImgFXCurrentTexturePtr->tex.width + ImgFXCurrentTexturePtr->tex.height) / 2);
}
// get vertex color
if (state->flags & (IMGFX_FLAG_2000 | IMGFX_FLAG_8000)) {
state->vtxBufs[gCurrentDisplayContextIndex][i].v.cn[0] = (s16)(curKeyframe[i].cn[0] + (nextKeyframe[i].cn[0] - curKeyframe[i].cn[0]) * lerpAlpha);
state->vtxBufs[gCurrentDisplayContextIndex][i].v.cn[1] = (s16)(curKeyframe[i].cn[1] + (nextKeyframe[i].cn[1] - curKeyframe[i].cn[1]) * lerpAlpha);
state->vtxBufs[gCurrentDisplayContextIndex][i].v.cn[2] = (s16)(curKeyframe[i].cn[2] + (nextKeyframe[i].cn[2] - curKeyframe[i].cn[2]) * lerpAlpha);
} else {
state->vtxBufs[gCurrentDisplayContextIndex][i].v.cn[0] =
state->vtxBufs[gCurrentDisplayContextIndex][i].v.cn[1] =
state->vtxBufs[gCurrentDisplayContextIndex][i].v.cn[2] = 240.0 - (curKeyframe[i].tc[0] + curKeyframe[i].tc[1]) * 1.2;
}
} else {
// get vertex position
if (header->flags & IMGFX_ANIM_FLAG_ABSOLUTE_COORDS) {
state->vtxBufs[gCurrentDisplayContextIndex][i].v.ob[0] = curKeyframe[i].ob[0];
state->vtxBufs[gCurrentDisplayContextIndex][i].v.ob[1] = curKeyframe[i].ob[1];
state->vtxBufs[gCurrentDisplayContextIndex][i].v.ob[2] = curKeyframe[i].ob[2];
} else {
state->vtxBufs[gCurrentDisplayContextIndex][i].v.ob[0] = curKeyframe[i].ob[0] * 0.01 * ImgFXCurrentTexturePtr->tex.width;
state->vtxBufs[gCurrentDisplayContextIndex][i].v.ob[1] = curKeyframe[i].ob[1] * 0.01 * ImgFXCurrentTexturePtr->tex.height;
state->vtxBufs[gCurrentDisplayContextIndex][i].v.ob[2] = curKeyframe[i].ob[2] * 0.01 * ((ImgFXCurrentTexturePtr->tex.width + ImgFXCurrentTexturePtr->tex.height) / 2);
}
// get vertex color
if (state->flags & (IMGFX_FLAG_2000 | IMGFX_FLAG_8000)) {
state->vtxBufs[gCurrentDisplayContextIndex][i].v.cn[0] = curKeyframe[i].cn[0];
state->vtxBufs[gCurrentDisplayContextIndex][i].v.cn[1] = curKeyframe[i].cn[1];
state->vtxBufs[gCurrentDisplayContextIndex][i].v.cn[2] = curKeyframe[i].cn[2];
} else {
state->vtxBufs[gCurrentDisplayContextIndex][i].v.cn[0] =
state->vtxBufs[gCurrentDisplayContextIndex][i].v.cn[1] =
state->vtxBufs[gCurrentDisplayContextIndex][i].v.cn[2] = 240.0 - (curKeyframe[i].tc[0] + curKeyframe[i].tc[1]) * 1.2;
}
}
// get vertex tex coords
if (header->flags & IMGFX_ANIM_FLAG_ABSOLUTE_COORDS) {
state->vtxBufs[gCurrentDisplayContextIndex][i].v.tc[0] = (curKeyframe[i].tc[0] + 256) * 32;
state->vtxBufs[gCurrentDisplayContextIndex][i].v.tc[1] = (curKeyframe[i].tc[1] + 256) * 32;
} else {
state->vtxBufs[gCurrentDisplayContextIndex][i].v.tc[0] = ((s32)(curKeyframe[i].tc[0] * 0.01 * ImgFXCurrentTexturePtr->tex.width) + 256) * 32;
state->vtxBufs[gCurrentDisplayContextIndex][i].v.tc[1] = ((s32)(curKeyframe[i].tc[1] * 0.01 * ImgFXCurrentTexturePtr->tex.height) + 256) * 32;
}
}
state->firstVtxIdx = 0;
state->lastVtxIdx = header->vtxCount - 1;
heap_free(curKeyframe);
if (nextKeyframe != NULL) {
heap_free(nextKeyframe);
}
if (animStep == 0 || gGameStatusPtr->frameCounter % animStep != 0) {
return;
}
if (keyframeInterval > 0) {
curSubframe++;
if (curSubframe >= keyframeInterval) {
if (state->flags & IMGFX_FLAG_REVERSE_ANIM) {
curKeyIdx--;
if (curKeyIdx < 0) {
if (state->flags & IMGFX_FLAG_LOOP_ANIM) {
curKeyIdx = header->keyframesCount - 1;
} else {
if (state->flags & IMGFX_FLAG_800) {
curKeyIdx = 0;
state->flags |= IMGFX_FLAG_4000;
} else {
state->flags |= IMGFX_FLAG_ANIM_DONE;
}
}
}
} else {
curKeyIdx++;
if (curKeyIdx >= header->keyframesCount) {
if (state->flags & IMGFX_FLAG_LOOP_ANIM) {
curKeyIdx = 0;
} else {
if (state->flags & IMGFX_FLAG_800) {
curKeyIdx--;
state->flags |= IMGFX_FLAG_4000;
} else {
state->flags |= IMGFX_FLAG_ANIM_DONE;
}
}
}
}
curSubframe = 0;
}
} else if (keyframeInterval < 0) {
if (state->flags & IMGFX_FLAG_REVERSE_ANIM) {
curKeyIdx -= absKeyframeInterval;
if (curKeyIdx < 0) {
if (state->flags & IMGFX_FLAG_LOOP_ANIM) {
curKeyIdx += header->keyframesCount;
} else {
if (state->flags & IMGFX_FLAG_800) {
curKeyIdx = 0;
state->flags |= IMGFX_FLAG_4000;
} else {
state->flags |= IMGFX_FLAG_ANIM_DONE;
}
}
}
} else {
curKeyIdx += absKeyframeInterval;
if (curKeyIdx >= header->keyframesCount) {
if (state->flags & IMGFX_FLAG_LOOP_ANIM) {
curKeyIdx %= header->keyframesCount;
} else {
if (state->flags & IMGFX_FLAG_800) {
curKeyIdx = header->keyframesCount - 1;
state->flags |= IMGFX_FLAG_4000;
} else {
state->flags |= IMGFX_FLAG_ANIM_DONE;
}
}
}
}
}
state->floats.anim.curFrame = curSubframe;
state->floats.anim.curIdx = curKeyIdx;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel imgfx_appendGfx_mesh_basic
/* D36A8 8013CFA8 27BDFFA8 */ addiu $sp, $sp, -0x58
/* D36AC 8013CFAC AFB10034 */ sw $s1, 0x34($sp)
/* D36B0 8013CFB0 0080882D */ daddu $s1, $a0, $zero
/* D36B4 8013CFB4 AFBF0054 */ sw $ra, 0x54($sp)
/* D36B8 8013CFB8 AFBE0050 */ sw $fp, 0x50($sp)
/* D36BC 8013CFBC AFB7004C */ sw $s7, 0x4C($sp)
/* D36C0 8013CFC0 AFB60048 */ sw $s6, 0x48($sp)
/* D36C4 8013CFC4 AFB50044 */ sw $s5, 0x44($sp)
/* D36C8 8013CFC8 AFB40040 */ sw $s4, 0x40($sp)
/* D36CC 8013CFCC AFB3003C */ sw $s3, 0x3C($sp)
/* D36D0 8013CFD0 AFB20038 */ sw $s2, 0x38($sp)
/* D36D4 8013CFD4 AFB00030 */ sw $s0, 0x30($sp)
/* D36D8 8013CFD8 AFA5005C */ sw $a1, 0x5C($sp)
/* D36DC 8013CFDC 8E220014 */ lw $v0, 0x14($s1)
/* D36E0 8013CFE0 30420020 */ andi $v0, $v0, 0x20
/* D36E4 8013CFE4 14400030 */ bnez $v0, .L8013D0A8
/* D36E8 8013CFE8 3C03E300 */ lui $v1, (0xE3001001 >> 16)
/* D36EC 8013CFEC 34631001 */ ori $v1, $v1, (0xE3001001 & 0xFFFF)
/* D36F0 8013CFF0 3C06F500 */ lui $a2, (0xF5000100 >> 16)
/* D36F4 8013CFF4 34C60100 */ ori $a2, $a2, (0xF5000100 & 0xFFFF)
/* D36F8 8013CFF8 3C070703 */ lui $a3, (0x703C000 >> 16)
/* D36FC 8013CFFC 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* D3700 8013D000 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* D3704 8013D004 8C820000 */ lw $v0, 0x0($a0)
/* D3708 8013D008 34E7C000 */ ori $a3, $a3, (0x703C000 & 0xFFFF)
/* D370C 8013D00C 0040282D */ daddu $a1, $v0, $zero
/* D3710 8013D010 24420008 */ addiu $v0, $v0, 0x8
/* D3714 8013D014 AC820000 */ sw $v0, 0x0($a0)
/* D3718 8013D018 ACA30000 */ sw $v1, 0x0($a1)
/* D371C 8013D01C 34038000 */ ori $v1, $zero, 0x8000
/* D3720 8013D020 ACA30004 */ sw $v1, 0x4($a1)
/* D3724 8013D024 24430008 */ addiu $v1, $v0, 0x8
/* D3728 8013D028 AC830000 */ sw $v1, 0x0($a0)
/* D372C 8013D02C 3C058015 */ lui $a1, %hi(ImgFXCurrentTexturePtr)
/* D3730 8013D030 8CA5EE10 */ lw $a1, %lo(ImgFXCurrentTexturePtr)($a1)
/* D3734 8013D034 3C03FD10 */ lui $v1, (0xFD100000 >> 16)
/* D3738 8013D038 AC430000 */ sw $v1, 0x0($v0)
/* D373C 8013D03C 24430010 */ addiu $v1, $v0, 0x10
/* D3740 8013D040 AC830000 */ sw $v1, 0x0($a0)
/* D3744 8013D044 8CA50004 */ lw $a1, 0x4($a1)
/* D3748 8013D048 3C03E800 */ lui $v1, (0xE8000000 >> 16)
/* D374C 8013D04C AC430008 */ sw $v1, 0x8($v0)
/* D3750 8013D050 24430018 */ addiu $v1, $v0, 0x18
/* D3754 8013D054 AC40000C */ sw $zero, 0xC($v0)
/* D3758 8013D058 AC830000 */ sw $v1, 0x0($a0)
/* D375C 8013D05C 3C030700 */ lui $v1, (0x7000000 >> 16)
/* D3760 8013D060 AC430014 */ sw $v1, 0x14($v0)
/* D3764 8013D064 24430020 */ addiu $v1, $v0, 0x20
/* D3768 8013D068 AC460010 */ sw $a2, 0x10($v0)
/* D376C 8013D06C AC830000 */ sw $v1, 0x0($a0)
/* D3770 8013D070 3C03E600 */ lui $v1, (0xE6000000 >> 16)
/* D3774 8013D074 AC430018 */ sw $v1, 0x18($v0)
/* D3778 8013D078 24430028 */ addiu $v1, $v0, 0x28
/* D377C 8013D07C AC40001C */ sw $zero, 0x1C($v0)
/* D3780 8013D080 AC830000 */ sw $v1, 0x0($a0)
/* D3784 8013D084 3C03F000 */ lui $v1, (0xF0000000 >> 16)
/* D3788 8013D088 AC430020 */ sw $v1, 0x20($v0)
/* D378C 8013D08C 24430030 */ addiu $v1, $v0, 0x30
/* D3790 8013D090 AC470024 */ sw $a3, 0x24($v0)
/* D3794 8013D094 AC830000 */ sw $v1, 0x0($a0)
/* D3798 8013D098 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* D379C 8013D09C AC430028 */ sw $v1, 0x28($v0)
/* D37A0 8013D0A0 AC40002C */ sw $zero, 0x2C($v0)
/* D37A4 8013D0A4 AC450004 */ sw $a1, 0x4($v0)
.L8013D0A8:
/* D37A8 8013D0A8 96350008 */ lhu $s5, 0x8($s1)
/* D37AC 8013D0AC 3C180018 */ lui $t8, (0x180000 >> 16)
/* D37B0 8013D0B0 24160002 */ addiu $s6, $zero, 0x2
/* D37B4 8013D0B4 3C10800A */ lui $s0, %hi(gMainGfxPos)
/* D37B8 8013D0B8 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos)
/* D37BC 8013D0BC 3C1EE700 */ lui $fp, (0xE7000000 >> 16)
/* D37C0 8013D0C0 3C19800B */ lui $t9, %hi(gCameras)
/* D37C4 8013D0C4 27391D80 */ addiu $t9, $t9, %lo(gCameras)
/* D37C8 8013D0C8 3C13DC08 */ lui $s3, (0xDC080008 >> 16)
/* D37CC 8013D0CC 36730008 */ ori $s3, $s3, (0xDC080008 & 0xFFFF)
/* D37D0 8013D0D0 3C178015 */ lui $s7, %hi(D_8014EE50)
/* D37D4 8013D0D4 26F7EE50 */ addiu $s7, $s7, %lo(D_8014EE50)
/* D37D8 8013D0D8 3C14E200 */ lui $s4, (0xE200001C >> 16)
/* D37DC 8013D0DC 3694001C */ ori $s4, $s4, (0xE200001C & 0xFFFF)
/* D37E0 8013D0E0 00159100 */ sll $s2, $s5, 4
.L8013D0E4:
/* D37E4 8013D0E4 3C048015 */ lui $a0, %hi(imgfx_vtxBuf)
/* D37E8 8013D0E8 8C846950 */ lw $a0, %lo(imgfx_vtxBuf)($a0)
/* D37EC 8013D0EC 02442021 */ addu $a0, $s2, $a0
/* D37F0 8013D0F0 94820008 */ lhu $v0, 0x8($a0)
/* D37F4 8013D0F4 9483000A */ lhu $v1, 0xA($a0)
/* D37F8 8013D0F8 00021400 */ sll $v0, $v0, 16
/* D37FC 8013D0FC 00021543 */ sra $v0, $v0, 21
/* D3800 8013D100 244CFF00 */ addiu $t4, $v0, -0x100
/* D3804 8013D104 00031C00 */ sll $v1, $v1, 16
/* D3808 8013D108 00031D43 */ sra $v1, $v1, 21
/* D380C 8013D10C 246FFF00 */ addiu $t7, $v1, -0x100
/* D3810 8013D110 94820038 */ lhu $v0, 0x38($a0)
/* D3814 8013D114 9483003A */ lhu $v1, 0x3A($a0)
/* D3818 8013D118 8E240014 */ lw $a0, 0x14($s1)
/* D381C 8013D11C 00021400 */ sll $v0, $v0, 16
/* D3820 8013D120 00021543 */ sra $v0, $v0, 21
/* D3824 8013D124 244DFF00 */ addiu $t5, $v0, -0x100
/* D3828 8013D128 00031C00 */ sll $v1, $v1, 16
/* D382C 8013D12C 00031D43 */ sra $v1, $v1, 21
/* D3830 8013D130 30820020 */ andi $v0, $a0, 0x20
/* D3834 8013D134 14400200 */ bnez $v0, .L8013D938
/* D3838 8013D138 246EFF00 */ addiu $t6, $v1, -0x100
/* D383C 8013D13C 3C028015 */ lui $v0, %hi(gSpriteShadingProfile)
/* D3840 8013D140 8C421328 */ lw $v0, %lo(gSpriteShadingProfile)($v0)
/* D3844 8013D144 94420000 */ lhu $v0, 0x0($v0)
/* D3848 8013D148 30420001 */ andi $v0, $v0, 0x1
/* D384C 8013D14C 104000FE */ beqz $v0, .L8013D548
/* D3850 8013D150 3C06070A */ lui $a2, (0x70A0280 >> 16)
/* D3854 8013D154 92220000 */ lbu $v0, 0x0($s1)
/* D3858 8013D158 104000FB */ beqz $v0, .L8013D548
/* D385C 8013D15C 00981024 */ and $v0, $a0, $t8
/* D3860 8013D160 104000FA */ beqz $v0, .L8013D54C
/* D3864 8013D164 34C60280 */ ori $a2, $a2, (0x70A0280 & 0xFFFF)
/* D3868 8013D168 92230002 */ lbu $v1, 0x2($s1)
/* D386C 8013D16C 10600008 */ beqz $v1, .L8013D190
/* D3870 8013D170 3C07070A */ lui $a3, (0x70A0280 >> 16)
/* D3874 8013D174 10760006 */ beq $v1, $s6, .L8013D190
/* D3878 8013D178 2402000F */ addiu $v0, $zero, 0xF
/* D387C 8013D17C 10620004 */ beq $v1, $v0, .L8013D190
/* D3880 8013D180 24020007 */ addiu $v0, $zero, 0x7
/* D3884 8013D184 146200F0 */ bne $v1, $v0, .L8013D548
/* D3888 8013D188 3C06070A */ lui $a2, (0x70A0280 >> 16)
/* D388C 8013D18C 3C07070A */ lui $a3, (0x70A0280 >> 16)
.L8013D190:
/* D3890 8013D190 34E70280 */ ori $a3, $a3, (0x70A0280 & 0xFFFF)
/* D3894 8013D194 3C08010A */ lui $t0, (0x10A0280 >> 16)
/* D3898 8013D198 35080280 */ ori $t0, $t0, (0x10A0280 & 0xFFFF)
/* D389C 8013D19C 3C0A001A */ lui $t2, (0x1A0280 >> 16)
/* D38A0 8013D1A0 354A0280 */ ori $t2, $t2, (0x1A0280 & 0xFFFF)
/* D38A4 8013D1A4 3C09F510 */ lui $t1, (0xF5100900 >> 16)
/* D38A8 8013D1A8 35290900 */ ori $t1, $t1, (0xF5100900 & 0xFFFF)
/* D38AC 8013D1AC 3C0B020F */ lui $t3, (0x20FC000 >> 16)
/* D38B0 8013D1B0 356BC000 */ ori $t3, $t3, (0x20FC000 & 0xFFFF)
/* D38B4 8013D1B4 AFAA0028 */ sw $t2, 0x28($sp)
/* D38B8 8013D1B8 8E050000 */ lw $a1, 0x0($s0)
/* D38BC 8013D1BC 3C0AF200 */ lui $t2, (0xF2000000 >> 16)
/* D38C0 8013D1C0 00A0302D */ daddu $a2, $a1, $zero
/* D38C4 8013D1C4 24A50008 */ addiu $a1, $a1, 0x8
/* D38C8 8013D1C8 24A20008 */ addiu $v0, $a1, 0x8
/* D38CC 8013D1CC AE050000 */ sw $a1, 0x0($s0)
/* D38D0 8013D1D0 AE020000 */ sw $v0, 0x0($s0)
/* D38D4 8013D1D4 24A20010 */ addiu $v0, $a1, 0x10
/* D38D8 8013D1D8 AE020000 */ sw $v0, 0x0($s0)
/* D38DC 8013D1DC 24A20018 */ addiu $v0, $a1, 0x18
/* D38E0 8013D1E0 AE020000 */ sw $v0, 0x0($s0)
/* D38E4 8013D1E4 24A20020 */ addiu $v0, $a1, 0x20
/* D38E8 8013D1E8 AE020000 */ sw $v0, 0x0($s0)
/* D38EC 8013D1EC 24A20028 */ addiu $v0, $a1, 0x28
/* D38F0 8013D1F0 AE020000 */ sw $v0, 0x0($s0)
/* D38F4 8013D1F4 24A20030 */ addiu $v0, $a1, 0x30
/* D38F8 8013D1F8 AE020000 */ sw $v0, 0x0($s0)
/* D38FC 8013D1FC 3C048015 */ lui $a0, %hi(ImgFXCurrentTexturePtr)
/* D3900 8013D200 8C84EE10 */ lw $a0, %lo(ImgFXCurrentTexturePtr)($a0)
/* D3904 8013D204 24A20038 */ addiu $v0, $a1, 0x38
/* D3908 8013D208 AE020000 */ sw $v0, 0x0($s0)
/* D390C 8013D20C 94820008 */ lhu $v0, 0x8($a0)
/* D3910 8013D210 24A30040 */ addiu $v1, $a1, 0x40
/* D3914 8013D214 AE030000 */ sw $v1, 0x0($s0)
/* D3918 8013D218 3C03FD48 */ lui $v1, (0xFD480000 >> 16)
/* D391C 8013D21C 00021042 */ srl $v0, $v0, 1
/* D3920 8013D220 2442FFFF */ addiu $v0, $v0, -0x1
/* D3924 8013D224 30420FFF */ andi $v0, $v0, 0xFFF
/* D3928 8013D228 00431025 */ or $v0, $v0, $v1
/* D392C 8013D22C ACC20000 */ sw $v0, 0x0($a2)
/* D3930 8013D230 8C830000 */ lw $v1, 0x0($a0)
/* D3934 8013D234 24A20048 */ addiu $v0, $a1, 0x48
/* D3938 8013D238 AE020000 */ sw $v0, 0x0($s0)
/* D393C 8013D23C 3C02F548 */ lui $v0, (0xF5480000 >> 16)
/* D3940 8013D240 3C04F400 */ lui $a0, (0xF4000000 >> 16)
/* D3944 8013D244 ACC30004 */ sw $v1, 0x4($a2)
/* D3948 8013D248 01AC3023 */ subu $a2, $t5, $t4
/* D394C 8013D24C 00063043 */ sra $a2, $a2, 1
/* D3950 8013D250 24C60007 */ addiu $a2, $a2, 0x7
/* D3954 8013D254 000630C3 */ sra $a2, $a2, 3
/* D3958 8013D258 30C601FF */ andi $a2, $a2, 0x1FF
/* D395C 8013D25C 00063240 */ sll $a2, $a2, 9
/* D3960 8013D260 00C21025 */ or $v0, $a2, $v0
/* D3964 8013D264 ACA20000 */ sw $v0, 0x0($a1)
/* D3968 8013D268 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* D396C 8013D26C 000C1840 */ sll $v1, $t4, 1
/* D3970 8013D270 30630FFF */ andi $v1, $v1, 0xFFF
/* D3974 8013D274 00031B00 */ sll $v1, $v1, 12
/* D3978 8013D278 ACA20008 */ sw $v0, 0x8($a1)
/* D397C 8013D27C 000F1080 */ sll $v0, $t7, 2
/* D3980 8013D280 30420FFF */ andi $v0, $v0, 0xFFF
/* D3984 8013D284 00441025 */ or $v0, $v0, $a0
/* D3988 8013D288 00621825 */ or $v1, $v1, $v0
/* D398C 8013D28C ACA30010 */ sw $v1, 0x10($a1)
/* D3990 8013D290 25A3FFFF */ addiu $v1, $t5, -0x1
/* D3994 8013D294 00031840 */ sll $v1, $v1, 1
/* D3998 8013D298 30630FFF */ andi $v1, $v1, 0xFFF
/* D399C 8013D29C 00031B00 */ sll $v1, $v1, 12
/* D39A0 8013D2A0 25C2FFFF */ addiu $v0, $t6, -0x1
/* D39A4 8013D2A4 00021080 */ sll $v0, $v0, 2
/* D39A8 8013D2A8 30420FFF */ andi $v0, $v0, 0xFFF
/* D39AC 8013D2AC 3C040700 */ lui $a0, (0x7000000 >> 16)
/* D39B0 8013D2B0 00441025 */ or $v0, $v0, $a0
/* D39B4 8013D2B4 00621825 */ or $v1, $v1, $v0
/* D39B8 8013D2B8 3C02F540 */ lui $v0, (0xF5400000 >> 16)
/* D39BC 8013D2BC 00C23025 */ or $a2, $a2, $v0
/* D39C0 8013D2C0 ACA30014 */ sw $v1, 0x14($a1)
/* D39C4 8013D2C4 25830100 */ addiu $v1, $t4, 0x100
/* D39C8 8013D2C8 00031880 */ sll $v1, $v1, 2
/* D39CC 8013D2CC 30630FFF */ andi $v1, $v1, 0xFFF
/* D39D0 8013D2D0 00031B00 */ sll $v1, $v1, 12
/* D39D4 8013D2D4 25E20100 */ addiu $v0, $t7, 0x100
/* D39D8 8013D2D8 00021080 */ sll $v0, $v0, 2
/* D39DC 8013D2DC 30420FFF */ andi $v0, $v0, 0xFFF
/* D39E0 8013D2E0 004A1025 */ or $v0, $v0, $t2
/* D39E4 8013D2E4 00621825 */ or $v1, $v1, $v0
/* D39E8 8013D2E8 ACA30028 */ sw $v1, 0x28($a1)
/* D39EC 8013D2EC 25A300FF */ addiu $v1, $t5, 0xFF
/* D39F0 8013D2F0 00031880 */ sll $v1, $v1, 2
/* D39F4 8013D2F4 30630FFF */ andi $v1, $v1, 0xFFF
/* D39F8 8013D2F8 00031B00 */ sll $v1, $v1, 12
/* D39FC 8013D2FC 25C200FF */ addiu $v0, $t6, 0xFF
/* D3A00 8013D300 00021080 */ sll $v0, $v0, 2
/* D3A04 8013D304 30420FFF */ andi $v0, $v0, 0xFFF
/* D3A08 8013D308 3C040100 */ lui $a0, (0x1000000 >> 16)
/* D3A0C 8013D30C 00441025 */ or $v0, $v0, $a0
/* D3A10 8013D310 00621825 */ or $v1, $v1, $v0
/* D3A14 8013D314 ACA70004 */ sw $a3, 0x4($a1)
/* D3A18 8013D318 ACA0000C */ sw $zero, 0xC($a1)
/* D3A1C 8013D31C ACBE0018 */ sw $fp, 0x18($a1)
/* D3A20 8013D320 ACA0001C */ sw $zero, 0x1C($a1)
/* D3A24 8013D324 ACA60020 */ sw $a2, 0x20($a1)
/* D3A28 8013D328 ACA80024 */ sw $t0, 0x24($a1)
/* D3A2C 8013D32C ACA3002C */ sw $v1, 0x2C($a1)
/* D3A30 8013D330 ACA60030 */ sw $a2, 0x30($a1)
/* D3A34 8013D334 8FAA0028 */ lw $t2, 0x28($sp)
/* D3A38 8013D338 3C020200 */ lui $v0, (0x2000000 >> 16)
/* D3A3C 8013D33C ACAA0034 */ sw $t2, 0x34($a1)
/* D3A40 8013D340 3C0AF200 */ lui $t2, (0xF2000000 >> 16)
/* D3A44 8013D344 ACA90038 */ sw $t1, 0x38($a1)
/* D3A48 8013D348 ACA2003C */ sw $v0, 0x3C($a1)
/* D3A4C 8013D34C ACAA0040 */ sw $t2, 0x40($a1)
/* D3A50 8013D350 ACAB0044 */ sw $t3, 0x44($a1)
/* D3A54 8013D354 92230002 */ lbu $v1, 0x2($s1)
/* D3A58 8013D358 10760008 */ beq $v1, $s6, .L8013D37C
/* D3A5C 8013D35C 240800FF */ addiu $t0, $zero, 0xFF
/* D3A60 8013D360 28620003 */ slti $v0, $v1, 0x3
/* D3A64 8013D364 14400008 */ bnez $v0, .L8013D388
/* D3A68 8013D368 24020007 */ addiu $v0, $zero, 0x7
/* D3A6C 8013D36C 10620005 */ beq $v1, $v0, .L8013D384
/* D3A70 8013D370 2402000F */ addiu $v0, $zero, 0xF
/* D3A74 8013D374 14620004 */ bne $v1, $v0, .L8013D388
/* D3A78 8013D378 00000000 */ nop
.L8013D37C:
/* D3A7C 8013D37C 0804F4E2 */ j .L8013D388
/* D3A80 8013D380 8E280038 */ lw $t0, 0x38($s1)
.L8013D384:
/* D3A84 8013D384 2408FFFF */ addiu $t0, $zero, -0x1
.L8013D388:
/* D3A88 8013D388 3C028015 */ lui $v0, %hi(gSpriteShadingProfile)
/* D3A8C 8013D38C 8C421328 */ lw $v0, %lo(gSpriteShadingProfile)($v0)
/* D3A90 8013D390 94420000 */ lhu $v0, 0x0($v0)
/* D3A94 8013D394 30420002 */ andi $v0, $v0, 0x2
/* D3A98 8013D398 1040005E */ beqz $v0, .L8013D514
/* D3A9C 8013D39C 0180282D */ daddu $a1, $t4, $zero
/* D3AA0 8013D3A0 3C028015 */ lui $v0, %hi(ImgFXInstances)
/* D3AA4 8013D3A4 8C426954 */ lw $v0, %lo(ImgFXInstances)($v0)
/* D3AA8 8013D3A8 90420000 */ lbu $v0, 0x0($v0)
/* D3AAC 8013D3AC 1040005A */ beqz $v0, .L8013D518
/* D3AB0 8013D3B0 01E0302D */ daddu $a2, $t7, $zero
/* D3AB4 8013D3B4 8E220014 */ lw $v0, 0x14($s1)
/* D3AB8 8013D3B8 00581024 */ and $v0, $v0, $t8
/* D3ABC 8013D3BC 50400057 */ beql $v0, $zero, .L8013D51C
/* D3AC0 8013D3C0 AFAE0010 */ sw $t6, 0x10($sp)
/* D3AC4 8013D3C4 3C03800A */ lui $v1, %hi(gCurrentCamID)
/* D3AC8 8013D3C8 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1)
/* D3ACC 8013D3CC 00031080 */ sll $v0, $v1, 2
/* D3AD0 8013D3D0 00431021 */ addu $v0, $v0, $v1
/* D3AD4 8013D3D4 00021080 */ sll $v0, $v0, 2
/* D3AD8 8013D3D8 00431023 */ subu $v0, $v0, $v1
/* D3ADC 8013D3DC 000218C0 */ sll $v1, $v0, 3
/* D3AE0 8013D3E0 00431021 */ addu $v0, $v0, $v1
/* D3AE4 8013D3E4 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* D3AE8 8013D3E8 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* D3AEC 8013D3EC 000210C0 */ sll $v0, $v0, 3
/* D3AF0 8013D3F0 80630070 */ lb $v1, 0x70($v1)
/* D3AF4 8013D3F4 14760008 */ bne $v1, $s6, .L8013D418
/* D3AF8 8013D3F8 00592021 */ addu $a0, $v0, $t9
/* D3AFC 8013D3FC 8E020000 */ lw $v0, 0x0($s0)
/* D3B00 8013D400 0040182D */ daddu $v1, $v0, $zero
/* D3B04 8013D404 24420008 */ addiu $v0, $v0, 0x8
/* D3B08 8013D408 AE020000 */ sw $v0, 0x0($s0)
/* D3B0C 8013D40C AC730000 */ sw $s3, 0x0($v1)
/* D3B10 8013D410 0804F50D */ j .L8013D434
/* D3B14 8013D414 AC770004 */ sw $s7, 0x4($v1)
.L8013D418:
/* D3B18 8013D418 8E020000 */ lw $v0, 0x0($s0)
/* D3B1C 8013D41C 0040182D */ daddu $v1, $v0, $zero
/* D3B20 8013D420 24420008 */ addiu $v0, $v0, 0x8
/* D3B24 8013D424 AE020000 */ sw $v0, 0x0($s0)
/* D3B28 8013D428 248200B0 */ addiu $v0, $a0, 0xB0
/* D3B2C 8013D42C AC730000 */ sw $s3, 0x0($v1)
/* D3B30 8013D430 AC620004 */ sw $v0, 0x4($v1)
.L8013D434:
/* D3B34 8013D434 8E050000 */ lw $a1, 0x0($s0)
/* D3B38 8013D438 00A0202D */ daddu $a0, $a1, $zero
/* D3B3C 8013D43C 24A50008 */ addiu $a1, $a1, 0x8
/* D3B40 8013D440 AE050000 */ sw $a1, 0x0($s0)
/* D3B44 8013D444 AC940000 */ sw $s4, 0x0($a0)
/* D3B48 8013D448 8E220078 */ lw $v0, 0x78($s1)
/* D3B4C 8013D44C 3C030C08 */ lui $v1, (0xC080000 >> 16)
/* D3B50 8013D450 00431025 */ or $v0, $v0, $v1
/* D3B54 8013D454 AC820004 */ sw $v0, 0x4($a0)
/* D3B58 8013D458 2402FFFF */ addiu $v0, $zero, -0x1
/* D3B5C 8013D45C 15020009 */ bne $t0, $v0, .L8013D484
/* D3B60 8013D460 3C03FCFF */ lui $v1, (0xFCFFD5FF >> 16)
/* D3B64 8013D464 3C02FCFF */ lui $v0, (0xFCFFC5FF >> 16)
/* D3B68 8013D468 3442C5FF */ ori $v0, $v0, (0xFCFFC5FF & 0xFFFF)
/* D3B6C 8013D46C 24A30008 */ addiu $v1, $a1, 0x8
/* D3B70 8013D470 AE030000 */ sw $v1, 0x0($s0)
/* D3B74 8013D474 ACA20000 */ sw $v0, 0x0($a1)
/* D3B78 8013D478 2402FFF8 */ addiu $v0, $zero, -0x8
/* D3B7C 8013D47C 0804F52D */ j .L8013D4B4
/* D3B80 8013D480 ACA20004 */ sw $v0, 0x4($a1)
.L8013D484:
/* D3B84 8013D484 3463D5FF */ ori $v1, $v1, (0xFCFFD5FF & 0xFFFF)
/* D3B88 8013D488 24A20008 */ addiu $v0, $a1, 0x8
/* D3B8C 8013D48C AE020000 */ sw $v0, 0x0($s0)
/* D3B90 8013D490 3C02FB00 */ lui $v0, (0xFB000000 >> 16)
/* D3B94 8013D494 ACA20000 */ sw $v0, 0x0($a1)
/* D3B98 8013D498 310200FF */ andi $v0, $t0, 0xFF
/* D3B9C 8013D49C ACA20004 */ sw $v0, 0x4($a1)
/* D3BA0 8013D4A0 24A20010 */ addiu $v0, $a1, 0x10
/* D3BA4 8013D4A4 AE020000 */ sw $v0, 0x0($s0)
/* D3BA8 8013D4A8 2402FFF8 */ addiu $v0, $zero, -0x8
/* D3BAC 8013D4AC ACA30008 */ sw $v1, 0x8($a1)
/* D3BB0 8013D4B0 ACA2000C */ sw $v0, 0xC($a1)
.L8013D4B4:
/* D3BB4 8013D4B4 3C050100 */ lui $a1, (0x1004008 >> 16)
/* D3BB8 8013D4B8 34A54008 */ ori $a1, $a1, (0x1004008 & 0xFFFF)
/* D3BBC 8013D4BC 3C070600 */ lui $a3, (0x6000402 >> 16)
/* D3BC0 8013D4C0 34E70402 */ ori $a3, $a3, (0x6000402 & 0xFFFF)
/* D3BC4 8013D4C4 3C060002 */ lui $a2, (0x20406 >> 16)
/* D3BC8 8013D4C8 34C60406 */ ori $a2, $a2, (0x20406 & 0xFFFF)
/* D3BCC 8013D4CC 8E030000 */ lw $v1, 0x0($s0)
/* D3BD0 8013D4D0 3C028015 */ lui $v0, %hi(imgfx_vtxBuf)
/* D3BD4 8013D4D4 8C426950 */ lw $v0, %lo(imgfx_vtxBuf)($v0)
/* D3BD8 8013D4D8 0060202D */ daddu $a0, $v1, $zero
/* D3BDC 8013D4DC 24630008 */ addiu $v1, $v1, 0x8
/* D3BE0 8013D4E0 00521021 */ addu $v0, $v0, $s2
/* D3BE4 8013D4E4 AE030000 */ sw $v1, 0x0($s0)
/* D3BE8 8013D4E8 AC820004 */ sw $v0, 0x4($a0)
/* D3BEC 8013D4EC 24620008 */ addiu $v0, $v1, 0x8
/* D3BF0 8013D4F0 AC850000 */ sw $a1, 0x0($a0)
/* D3BF4 8013D4F4 AE020000 */ sw $v0, 0x0($s0)
/* D3BF8 8013D4F8 24620010 */ addiu $v0, $v1, 0x10
/* D3BFC 8013D4FC AC670000 */ sw $a3, 0x0($v1)
/* D3C00 8013D500 AC660004 */ sw $a2, 0x4($v1)
/* D3C04 8013D504 AE020000 */ sw $v0, 0x0($s0)
/* D3C08 8013D508 AC7E0008 */ sw $fp, 0x8($v1)
/* D3C0C 8013D50C AC60000C */ sw $zero, 0xC($v1)
/* D3C10 8013D510 0180282D */ daddu $a1, $t4, $zero
.L8013D514:
/* D3C14 8013D514 01E0302D */ daddu $a2, $t7, $zero
.L8013D518:
/* D3C18 8013D518 AFAE0010 */ sw $t6, 0x10($sp)
.L8013D51C:
/* D3C1C 8013D51C AFA80014 */ sw $t0, 0x14($sp)
/* D3C20 8013D520 8E220078 */ lw $v0, 0x78($s1)
/* D3C24 8013D524 8FA4005C */ lw $a0, 0x5C($sp)
/* D3C28 8013D528 01A0382D */ daddu $a3, $t5, $zero
/* D3C2C 8013D52C AFB80020 */ sw $t8, 0x20($sp)
/* D3C30 8013D530 AFB90024 */ sw $t9, 0x24($sp)
/* D3C34 8013D534 0C052071 */ jal create_shading_palette
/* D3C38 8013D538 AFA20018 */ sw $v0, 0x18($sp)
/* D3C3C 8013D53C 8FB80020 */ lw $t8, 0x20($sp)
/* D3C40 8013D540 0804F64E */ j .L8013D938
/* D3C44 8013D544 8FB90024 */ lw $t9, 0x24($sp)
.L8013D548:
/* D3C48 8013D548 34C60280 */ ori $a2, $a2, (0x70A0280 & 0xFFFF)
.L8013D54C:
/* D3C4C 8013D54C 3C07000A */ lui $a3, (0xA0280 >> 16)
/* D3C50 8013D550 34E70280 */ ori $a3, $a3, (0xA0280 & 0xFFFF)
/* D3C54 8013D554 8E080000 */ lw $t0, 0x0($s0)
/* D3C58 8013D558 3C0AF200 */ lui $t2, (0xF2000000 >> 16)
/* D3C5C 8013D55C 0100282D */ daddu $a1, $t0, $zero
/* D3C60 8013D560 25080008 */ addiu $t0, $t0, 0x8
/* D3C64 8013D564 25020008 */ addiu $v0, $t0, 0x8
/* D3C68 8013D568 AE080000 */ sw $t0, 0x0($s0)
/* D3C6C 8013D56C AE020000 */ sw $v0, 0x0($s0)
/* D3C70 8013D570 25020010 */ addiu $v0, $t0, 0x10
/* D3C74 8013D574 AE020000 */ sw $v0, 0x0($s0)
/* D3C78 8013D578 3C048015 */ lui $a0, %hi(ImgFXCurrentTexturePtr)
/* D3C7C 8013D57C 8C84EE10 */ lw $a0, %lo(ImgFXCurrentTexturePtr)($a0)
/* D3C80 8013D580 25020018 */ addiu $v0, $t0, 0x18
/* D3C84 8013D584 AE020000 */ sw $v0, 0x0($s0)
/* D3C88 8013D588 94820008 */ lhu $v0, 0x8($a0)
/* D3C8C 8013D58C 25030020 */ addiu $v1, $t0, 0x20
/* D3C90 8013D590 AE030000 */ sw $v1, 0x0($s0)
/* D3C94 8013D594 3C03FD48 */ lui $v1, (0xFD480000 >> 16)
/* D3C98 8013D598 00021042 */ srl $v0, $v0, 1
/* D3C9C 8013D59C 2442FFFF */ addiu $v0, $v0, -0x1
/* D3CA0 8013D5A0 30420FFF */ andi $v0, $v0, 0xFFF
/* D3CA4 8013D5A4 00431025 */ or $v0, $v0, $v1
/* D3CA8 8013D5A8 ACA20000 */ sw $v0, 0x0($a1)
/* D3CAC 8013D5AC 8C830000 */ lw $v1, 0x0($a0)
/* D3CB0 8013D5B0 25020028 */ addiu $v0, $t0, 0x28
/* D3CB4 8013D5B4 AE020000 */ sw $v0, 0x0($s0)
/* D3CB8 8013D5B8 3C02F548 */ lui $v0, (0xF5480000 >> 16)
/* D3CBC 8013D5BC 3C04F400 */ lui $a0, (0xF4000000 >> 16)
/* D3CC0 8013D5C0 ACA30004 */ sw $v1, 0x4($a1)
/* D3CC4 8013D5C4 01AC2823 */ subu $a1, $t5, $t4
/* D3CC8 8013D5C8 00052843 */ sra $a1, $a1, 1
/* D3CCC 8013D5CC 24A50007 */ addiu $a1, $a1, 0x7
/* D3CD0 8013D5D0 000528C3 */ sra $a1, $a1, 3
/* D3CD4 8013D5D4 30A501FF */ andi $a1, $a1, 0x1FF
/* D3CD8 8013D5D8 00052A40 */ sll $a1, $a1, 9
/* D3CDC 8013D5DC 00A21025 */ or $v0, $a1, $v0
/* D3CE0 8013D5E0 AD020000 */ sw $v0, 0x0($t0)
/* D3CE4 8013D5E4 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* D3CE8 8013D5E8 000C1840 */ sll $v1, $t4, 1
/* D3CEC 8013D5EC 30630FFF */ andi $v1, $v1, 0xFFF
/* D3CF0 8013D5F0 00031B00 */ sll $v1, $v1, 12
/* D3CF4 8013D5F4 AD020008 */ sw $v0, 0x8($t0)
/* D3CF8 8013D5F8 000F1080 */ sll $v0, $t7, 2
/* D3CFC 8013D5FC 30420FFF */ andi $v0, $v0, 0xFFF
/* D3D00 8013D600 00441025 */ or $v0, $v0, $a0
/* D3D04 8013D604 00621825 */ or $v1, $v1, $v0
/* D3D08 8013D608 AD030010 */ sw $v1, 0x10($t0)
/* D3D0C 8013D60C 25A3FFFF */ addiu $v1, $t5, -0x1
/* D3D10 8013D610 00031840 */ sll $v1, $v1, 1
/* D3D14 8013D614 30630FFF */ andi $v1, $v1, 0xFFF
/* D3D18 8013D618 00031B00 */ sll $v1, $v1, 12
/* D3D1C 8013D61C 25C2FFFF */ addiu $v0, $t6, -0x1
/* D3D20 8013D620 00021080 */ sll $v0, $v0, 2
/* D3D24 8013D624 30420FFF */ andi $v0, $v0, 0xFFF
/* D3D28 8013D628 3C040700 */ lui $a0, (0x7000000 >> 16)
/* D3D2C 8013D62C 00441025 */ or $v0, $v0, $a0
/* D3D30 8013D630 00621825 */ or $v1, $v1, $v0
/* D3D34 8013D634 3C02F540 */ lui $v0, (0xF5400000 >> 16)
/* D3D38 8013D638 00A22825 */ or $a1, $a1, $v0
/* D3D3C 8013D63C AD030014 */ sw $v1, 0x14($t0)
/* D3D40 8013D640 25830100 */ addiu $v1, $t4, 0x100
/* D3D44 8013D644 00031880 */ sll $v1, $v1, 2
/* D3D48 8013D648 30630FFF */ andi $v1, $v1, 0xFFF
/* D3D4C 8013D64C 00031B00 */ sll $v1, $v1, 12
/* D3D50 8013D650 25E20100 */ addiu $v0, $t7, 0x100
/* D3D54 8013D654 00021080 */ sll $v0, $v0, 2
/* D3D58 8013D658 30420FFF */ andi $v0, $v0, 0xFFF
/* D3D5C 8013D65C 004A1025 */ or $v0, $v0, $t2
/* D3D60 8013D660 00621825 */ or $v1, $v1, $v0
/* D3D64 8013D664 AD030028 */ sw $v1, 0x28($t0)
/* D3D68 8013D668 25A300FF */ addiu $v1, $t5, 0xFF
/* D3D6C 8013D66C 00031880 */ sll $v1, $v1, 2
/* D3D70 8013D670 30630FFF */ andi $v1, $v1, 0xFFF
/* D3D74 8013D674 00031B00 */ sll $v1, $v1, 12
/* D3D78 8013D678 25C200FF */ addiu $v0, $t6, 0xFF
/* D3D7C 8013D67C 00021080 */ sll $v0, $v0, 2
/* D3D80 8013D680 30420FFF */ andi $v0, $v0, 0xFFF
/* D3D84 8013D684 3C048015 */ lui $a0, %hi(gSpriteShadingProfile)
/* D3D88 8013D688 8C841328 */ lw $a0, %lo(gSpriteShadingProfile)($a0)
/* D3D8C 8013D68C 00621825 */ or $v1, $v1, $v0
/* D3D90 8013D690 AD060004 */ sw $a2, 0x4($t0)
/* D3D94 8013D694 AD00000C */ sw $zero, 0xC($t0)
/* D3D98 8013D698 AD1E0018 */ sw $fp, 0x18($t0)
/* D3D9C 8013D69C AD00001C */ sw $zero, 0x1C($t0)
/* D3DA0 8013D6A0 AD050020 */ sw $a1, 0x20($t0)
/* D3DA4 8013D6A4 AD070024 */ sw $a3, 0x24($t0)
/* D3DA8 8013D6A8 AD03002C */ sw $v1, 0x2C($t0)
/* D3DAC 8013D6AC 94830000 */ lhu $v1, 0x0($a0)
/* D3DB0 8013D6B0 25020030 */ addiu $v0, $t0, 0x30
/* D3DB4 8013D6B4 30630002 */ andi $v1, $v1, 0x2
/* D3DB8 8013D6B8 106000D8 */ beqz $v1, .L8013DA1C
/* D3DBC 8013D6BC AE020000 */ sw $v0, 0x0($s0)
/* D3DC0 8013D6C0 92220000 */ lbu $v0, 0x0($s1)
/* D3DC4 8013D6C4 1040009C */ beqz $v0, .L8013D938
/* D3DC8 8013D6C8 00000000 */ nop
/* D3DCC 8013D6CC 8E220014 */ lw $v0, 0x14($s1)
/* D3DD0 8013D6D0 00581024 */ and $v0, $v0, $t8
/* D3DD4 8013D6D4 10400098 */ beqz $v0, .L8013D938
/* D3DD8 8013D6D8 240900FF */ addiu $t1, $zero, 0xFF
/* D3DDC 8013D6DC 3C03800A */ lui $v1, %hi(gCurrentCamID)
/* D3DE0 8013D6E0 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1)
/* D3DE4 8013D6E4 00031080 */ sll $v0, $v1, 2
/* D3DE8 8013D6E8 00431021 */ addu $v0, $v0, $v1
/* D3DEC 8013D6EC 00021080 */ sll $v0, $v0, 2
/* D3DF0 8013D6F0 00431023 */ subu $v0, $v0, $v1
/* D3DF4 8013D6F4 000218C0 */ sll $v1, $v0, 3
/* D3DF8 8013D6F8 00431021 */ addu $v0, $v0, $v1
/* D3DFC 8013D6FC 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* D3E00 8013D700 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* D3E04 8013D704 000210C0 */ sll $v0, $v0, 3
/* D3E08 8013D708 80630070 */ lb $v1, 0x70($v1)
/* D3E0C 8013D70C 14760006 */ bne $v1, $s6, .L8013D728
/* D3E10 8013D710 00592021 */ addu $a0, $v0, $t9
/* D3E14 8013D714 25020038 */ addiu $v0, $t0, 0x38
/* D3E18 8013D718 AE020000 */ sw $v0, 0x0($s0)
/* D3E1C 8013D71C AD130030 */ sw $s3, 0x30($t0)
/* D3E20 8013D720 0804F5CF */ j .L8013D73C
/* D3E24 8013D724 AD170034 */ sw $s7, 0x34($t0)
.L8013D728:
/* D3E28 8013D728 25020038 */ addiu $v0, $t0, 0x38
/* D3E2C 8013D72C AE020000 */ sw $v0, 0x0($s0)
/* D3E30 8013D730 248200B0 */ addiu $v0, $a0, 0xB0
/* D3E34 8013D734 AD130030 */ sw $s3, 0x30($t0)
/* D3E38 8013D738 AD020034 */ sw $v0, 0x34($t0)
.L8013D73C:
/* D3E3C 8013D73C 240200FF */ addiu $v0, $zero, 0xFF
/* D3E40 8013D740 55220005 */ bnel $t1, $v0, .L8013D758
/* D3E44 8013D744 3C020050 */ lui $v0, (0x504A50 >> 16)
/* D3E48 8013D748 3C020055 */ lui $v0, (0x554A50 >> 16)
/* D3E4C 8013D74C 8E030000 */ lw $v1, 0x0($s0)
/* D3E50 8013D750 0804F5D8 */ j .L8013D760
/* D3E54 8013D754 34423078 */ ori $v0, $v0, (0x553078 & 0xFFFF)
.L8013D758:
/* D3E58 8013D758 8E030000 */ lw $v1, 0x0($s0)
/* D3E5C 8013D75C 34424A50 */ ori $v0, $v0, (0x554A50 & 0xFFFF)
.L8013D760:
/* D3E60 8013D760 0060202D */ daddu $a0, $v1, $zero
/* D3E64 8013D764 24630008 */ addiu $v1, $v1, 0x8
/* D3E68 8013D768 AE030000 */ sw $v1, 0x0($s0)
/* D3E6C 8013D76C AC940000 */ sw $s4, 0x0($a0)
/* D3E70 8013D770 AC820004 */ sw $v0, 0x4($a0)
/* D3E74 8013D774 92230002 */ lbu $v1, 0x2($s1)
/* D3E78 8013D778 1076000F */ beq $v1, $s6, .L8013D7B8
/* D3E7C 8013D77C 28620003 */ slti $v0, $v1, 0x3
/* D3E80 8013D780 10400005 */ beqz $v0, .L8013D798
/* D3E84 8013D784 24020007 */ addiu $v0, $zero, 0x7
/* D3E88 8013D788 10600009 */ beqz $v1, .L8013D7B0
/* D3E8C 8013D78C 2402FFFF */ addiu $v0, $zero, -0x1
/* D3E90 8013D790 0804F5F3 */ j .L8013D7CC
/* D3E94 8013D794 00000000 */ nop
.L8013D798:
/* D3E98 8013D798 1062000A */ beq $v1, $v0, .L8013D7C4
/* D3E9C 8013D79C 2402000F */ addiu $v0, $zero, 0xF
/* D3EA0 8013D7A0 10620005 */ beq $v1, $v0, .L8013D7B8
/* D3EA4 8013D7A4 2402FFFF */ addiu $v0, $zero, -0x1
/* D3EA8 8013D7A8 0804F5F3 */ j .L8013D7CC
/* D3EAC 8013D7AC 00000000 */ nop
.L8013D7B0:
/* D3EB0 8013D7B0 0804F5F2 */ j .L8013D7C8
/* D3EB4 8013D7B4 240900FF */ addiu $t1, $zero, 0xFF
.L8013D7B8:
/* D3EB8 8013D7B8 8E290038 */ lw $t1, 0x38($s1)
/* D3EBC 8013D7BC 0804F5F3 */ j .L8013D7CC
/* D3EC0 8013D7C0 2402FFFF */ addiu $v0, $zero, -0x1
.L8013D7C4:
/* D3EC4 8013D7C4 2409FFFF */ addiu $t1, $zero, -0x1
.L8013D7C8:
/* D3EC8 8013D7C8 2402FFFF */ addiu $v0, $zero, -0x1
.L8013D7CC:
/* D3ECC 8013D7CC 1522000C */ bne $t1, $v0, .L8013D800
/* D3ED0 8013D7D0 3C06FCFF */ lui $a2, (0xFCFFD3FF >> 16)
/* D3ED4 8013D7D4 3C05FCFF */ lui $a1, (0xFCFFC3FF >> 16)
/* D3ED8 8013D7D8 34A5C3FF */ ori $a1, $a1, (0xFCFFC3FF & 0xFFFF)
/* D3EDC 8013D7DC 3C04FF87 */ lui $a0, (0xFF87FFFF >> 16)
/* D3EE0 8013D7E0 8E020000 */ lw $v0, 0x0($s0)
/* D3EE4 8013D7E4 3484FFFF */ ori $a0, $a0, (0xFF87FFFF & 0xFFFF)
/* D3EE8 8013D7E8 0040182D */ daddu $v1, $v0, $zero
/* D3EEC 8013D7EC 24420008 */ addiu $v0, $v0, 0x8
/* D3EF0 8013D7F0 AE020000 */ sw $v0, 0x0($s0)
/* D3EF4 8013D7F4 AC650000 */ sw $a1, 0x0($v1)
/* D3EF8 8013D7F8 0804F60F */ j .L8013D83C
/* D3EFC 8013D7FC AC640004 */ sw $a0, 0x4($v1)
.L8013D800:
/* D3F00 8013D800 34C6D3FF */ ori $a2, $a2, (0xFCFFD3FF & 0xFFFF)
/* D3F04 8013D804 3C05FFA7 */ lui $a1, (0xFFA7FFFF >> 16)
/* D3F08 8013D808 34A5FFFF */ ori $a1, $a1, (0xFFA7FFFF & 0xFFFF)
/* D3F0C 8013D80C 8E030000 */ lw $v1, 0x0($s0)
/* D3F10 8013D810 3C02FB00 */ lui $v0, (0xFB000000 >> 16)
/* D3F14 8013D814 0060202D */ daddu $a0, $v1, $zero
/* D3F18 8013D818 24630008 */ addiu $v1, $v1, 0x8
/* D3F1C 8013D81C AE030000 */ sw $v1, 0x0($s0)
/* D3F20 8013D820 AC820000 */ sw $v0, 0x0($a0)
/* D3F24 8013D824 312200FF */ andi $v0, $t1, 0xFF
/* D3F28 8013D828 AC820004 */ sw $v0, 0x4($a0)
/* D3F2C 8013D82C 24620008 */ addiu $v0, $v1, 0x8
/* D3F30 8013D830 AE020000 */ sw $v0, 0x0($s0)
/* D3F34 8013D834 AC660000 */ sw $a2, 0x0($v1)
/* D3F38 8013D838 AC650004 */ sw $a1, 0x4($v1)
.L8013D83C:
/* D3F3C 8013D83C 3C040100 */ lui $a0, (0x1004008 >> 16)
/* D3F40 8013D840 34844008 */ ori $a0, $a0, (0x1004008 & 0xFFFF)
/* D3F44 8013D844 3C060600 */ lui $a2, (0x6000402 >> 16)
/* D3F48 8013D848 34C60402 */ ori $a2, $a2, (0x6000402 & 0xFFFF)
/* D3F4C 8013D84C 3C050002 */ lui $a1, (0x20406 >> 16)
/* D3F50 8013D850 34A50406 */ ori $a1, $a1, (0x20406 & 0xFFFF)
/* D3F54 8013D854 8E070000 */ lw $a3, 0x0($s0)
/* D3F58 8013D858 3C028015 */ lui $v0, %hi(imgfx_vtxBuf)
/* D3F5C 8013D85C 8C426950 */ lw $v0, %lo(imgfx_vtxBuf)($v0)
/* D3F60 8013D860 00E0182D */ daddu $v1, $a3, $zero
/* D3F64 8013D864 24E70008 */ addiu $a3, $a3, 0x8
/* D3F68 8013D868 00521021 */ addu $v0, $v0, $s2
/* D3F6C 8013D86C AE070000 */ sw $a3, 0x0($s0)
/* D3F70 8013D870 AC620004 */ sw $v0, 0x4($v1)
/* D3F74 8013D874 24E20008 */ addiu $v0, $a3, 0x8
/* D3F78 8013D878 AC640000 */ sw $a0, 0x0($v1)
/* D3F7C 8013D87C AE020000 */ sw $v0, 0x0($s0)
/* D3F80 8013D880 24E20010 */ addiu $v0, $a3, 0x10
/* D3F84 8013D884 ACE60000 */ sw $a2, 0x0($a3)
/* D3F88 8013D888 ACE50004 */ sw $a1, 0x4($a3)
/* D3F8C 8013D88C AE020000 */ sw $v0, 0x0($s0)
/* D3F90 8013D890 240200FF */ addiu $v0, $zero, 0xFF
/* D3F94 8013D894 ACFE0008 */ sw $fp, 0x8($a3)
/* D3F98 8013D898 15220004 */ bne $t1, $v0, .L8013D8AC
/* D3F9C 8013D89C ACE0000C */ sw $zero, 0xC($a3)
/* D3FA0 8013D8A0 3C030055 */ lui $v1, (0x553078 >> 16)
/* D3FA4 8013D8A4 0804F62D */ j .L8013D8B4
/* D3FA8 8013D8A8 34633078 */ ori $v1, $v1, (0x553078 & 0xFFFF)
.L8013D8AC:
/* D3FAC 8013D8AC 3C030050 */ lui $v1, (0x504A50 >> 16)
/* D3FB0 8013D8B0 34634A50 */ ori $v1, $v1, (0x504A50 & 0xFFFF)
.L8013D8B4:
/* D3FB4 8013D8B4 24E20018 */ addiu $v0, $a3, 0x18
/* D3FB8 8013D8B8 AE020000 */ sw $v0, 0x0($s0)
/* D3FBC 8013D8BC ACF40010 */ sw $s4, 0x10($a3)
/* D3FC0 8013D8C0 ACE30014 */ sw $v1, 0x14($a3)
/* D3FC4 8013D8C4 3C056464 */ lui $a1, (0x646464FF >> 16)
/* D3FC8 8013D8C8 34A564FF */ ori $a1, $a1, (0x646464FF & 0xFFFF)
/* D3FCC 8013D8CC 3C07FC40 */ lui $a3, (0xFC40FE81 >> 16)
/* D3FD0 8013D8D0 34E7FE81 */ ori $a3, $a3, (0xFC40FE81 & 0xFFFF)
/* D3FD4 8013D8D4 3C0655FC */ lui $a2, (0x55FCF279 >> 16)
/* D3FD8 8013D8D8 34C6F279 */ ori $a2, $a2, (0x55FCF279 & 0xFFFF)
/* D3FDC 8013D8DC 3C08E300 */ lui $t0, (0xE3001801 >> 16)
/* D3FE0 8013D8E0 35081801 */ ori $t0, $t0, (0xE3001801 & 0xFFFF)
/* D3FE4 8013D8E4 8E030000 */ lw $v1, 0x0($s0)
/* D3FE8 8013D8E8 3C02FB00 */ lui $v0, (0xFB000000 >> 16)
/* D3FEC 8013D8EC 0060202D */ daddu $a0, $v1, $zero
/* D3FF0 8013D8F0 24630008 */ addiu $v1, $v1, 0x8
/* D3FF4 8013D8F4 AE030000 */ sw $v1, 0x0($s0)
/* D3FF8 8013D8F8 AC820000 */ sw $v0, 0x0($a0)
/* D3FFC 8013D8FC 24620008 */ addiu $v0, $v1, 0x8
/* D4000 8013D900 AC850004 */ sw $a1, 0x4($a0)
/* D4004 8013D904 AE020000 */ sw $v0, 0x0($s0)
/* D4008 8013D908 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* D400C 8013D90C AC620000 */ sw $v0, 0x0($v1)
/* D4010 8013D910 312200FF */ andi $v0, $t1, 0xFF
/* D4014 8013D914 AC620004 */ sw $v0, 0x4($v1)
/* D4018 8013D918 24620010 */ addiu $v0, $v1, 0x10
/* D401C 8013D91C AE020000 */ sw $v0, 0x0($s0)
/* D4020 8013D920 24620018 */ addiu $v0, $v1, 0x18
/* D4024 8013D924 AC670008 */ sw $a3, 0x8($v1)
/* D4028 8013D928 AC66000C */ sw $a2, 0xC($v1)
/* D402C 8013D92C AE020000 */ sw $v0, 0x0($s0)
/* D4030 8013D930 AC680010 */ sw $t0, 0x10($v1)
/* D4034 8013D934 AC600014 */ sw $zero, 0x14($v1)
.L8013D938:
/* D4038 8013D938 3C028015 */ lui $v0, %hi(gSpriteShadingProfile)
/* D403C 8013D93C 8C421328 */ lw $v0, %lo(gSpriteShadingProfile)($v0)
/* D4040 8013D940 94420000 */ lhu $v0, 0x0($v0)
/* D4044 8013D944 30420002 */ andi $v0, $v0, 0x2
/* D4048 8013D948 10400035 */ beqz $v0, .L8013DA20
/* D404C 8013D94C 3C050100 */ lui $a1, (0x1004008 >> 16)
/* D4050 8013D950 3C028015 */ lui $v0, %hi(ImgFXInstances)
/* D4054 8013D954 8C426954 */ lw $v0, %lo(ImgFXInstances)($v0)
/* D4058 8013D958 90420000 */ lbu $v0, 0x0($v0)
/* D405C 8013D95C 10400031 */ beqz $v0, .L8013DA24
/* D4060 8013D960 34A54008 */ ori $a1, $a1, (0x1004008 & 0xFFFF)
/* D4064 8013D964 8E220014 */ lw $v0, 0x14($s1)
/* D4068 8013D968 00581024 */ and $v0, $v0, $t8
/* D406C 8013D96C 1040002C */ beqz $v0, .L8013DA20
/* D4070 8013D970 3C050100 */ lui $a1, (0x1004008 >> 16)
/* D4074 8013D974 3C03800A */ lui $v1, %hi(gCurrentCamID)
/* D4078 8013D978 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1)
/* D407C 8013D97C 3C058007 */ lui $a1, %hi(gGameStatusPtr)
/* D4080 8013D980 8CA5419C */ lw $a1, %lo(gGameStatusPtr)($a1)
/* D4084 8013D984 00031080 */ sll $v0, $v1, 2
/* D4088 8013D988 00431021 */ addu $v0, $v0, $v1
/* D408C 8013D98C 00021080 */ sll $v0, $v0, 2
/* D4090 8013D990 00431023 */ subu $v0, $v0, $v1
/* D4094 8013D994 000218C0 */ sll $v1, $v0, 3
/* D4098 8013D998 00431021 */ addu $v0, $v0, $v1
/* D409C 8013D99C 000210C0 */ sll $v0, $v0, 3
/* D40A0 8013D9A0 80A30070 */ lb $v1, 0x70($a1)
/* D40A4 8013D9A4 14760016 */ bne $v1, $s6, .L8013DA00
/* D40A8 8013D9A8 00592021 */ addu $a0, $v0, $t9
/* D40AC 8013D9AC 8E020000 */ lw $v0, 0x0($s0)
/* D40B0 8013D9B0 3C048015 */ lui $a0, %hi(D_8014EE40)
/* D40B4 8013D9B4 2484EE40 */ addiu $a0, $a0, %lo(D_8014EE40)
/* D40B8 8013D9B8 0040182D */ daddu $v1, $v0, $zero
/* D40BC 8013D9BC 24420008 */ addiu $v0, $v0, 0x8
/* D40C0 8013D9C0 AE020000 */ sw $v0, 0x0($s0)
/* D40C4 8013D9C4 AC730000 */ sw $s3, 0x0($v1)
/* D40C8 8013D9C8 AC640004 */ sw $a0, 0x4($v1)
/* D40CC 8013D9CC 90A20082 */ lbu $v0, 0x82($a1)
/* D40D0 8013D9D0 94830008 */ lhu $v1, 0x8($a0)
/* D40D4 8013D9D4 00021600 */ sll $v0, $v0, 24
/* D40D8 8013D9D8 00021603 */ sra $v0, $v0, 24
/* D40DC 8013D9DC 00621821 */ addu $v1, $v1, $v0
/* D40E0 8013D9E0 A6E30008 */ sh $v1, 0x8($s7)
/* D40E4 8013D9E4 90A20083 */ lbu $v0, 0x83($a1)
/* D40E8 8013D9E8 9483000A */ lhu $v1, 0xA($a0)
/* D40EC 8013D9EC 00021600 */ sll $v0, $v0, 24
/* D40F0 8013D9F0 00021603 */ sra $v0, $v0, 24
/* D40F4 8013D9F4 00621821 */ addu $v1, $v1, $v0
/* D40F8 8013D9F8 0804F687 */ j .L8013DA1C
/* D40FC 8013D9FC A6E3000A */ sh $v1, 0xA($s7)
.L8013DA00:
/* D4100 8013DA00 8E020000 */ lw $v0, 0x0($s0)
/* D4104 8013DA04 0040182D */ daddu $v1, $v0, $zero
/* D4108 8013DA08 24420008 */ addiu $v0, $v0, 0x8
/* D410C 8013DA0C AE020000 */ sw $v0, 0x0($s0)
/* D4110 8013DA10 248200A0 */ addiu $v0, $a0, 0xA0
/* D4114 8013DA14 AC730000 */ sw $s3, 0x0($v1)
/* D4118 8013DA18 AC620004 */ sw $v0, 0x4($v1)
.L8013DA1C:
/* D411C 8013DA1C 3C050100 */ lui $a1, (0x1004008 >> 16)
.L8013DA20:
/* D4120 8013DA20 34A54008 */ ori $a1, $a1, (0x1004008 & 0xFFFF)
.L8013DA24:
/* D4124 8013DA24 3C070600 */ lui $a3, (0x6000402 >> 16)
/* D4128 8013DA28 34E70402 */ ori $a3, $a3, (0x6000402 & 0xFFFF)
/* D412C 8013DA2C 3C060002 */ lui $a2, (0x20406 >> 16)
/* D4130 8013DA30 34C60406 */ ori $a2, $a2, (0x20406 & 0xFFFF)
/* D4134 8013DA34 8E030000 */ lw $v1, 0x0($s0)
/* D4138 8013DA38 3C028015 */ lui $v0, %hi(imgfx_vtxBuf)
/* D413C 8013DA3C 8C426950 */ lw $v0, %lo(imgfx_vtxBuf)($v0)
/* D4140 8013DA40 0060202D */ daddu $a0, $v1, $zero
/* D4144 8013DA44 24630008 */ addiu $v1, $v1, 0x8
/* D4148 8013DA48 00521021 */ addu $v0, $v0, $s2
/* D414C 8013DA4C AE030000 */ sw $v1, 0x0($s0)
/* D4150 8013DA50 AC820004 */ sw $v0, 0x4($a0)
/* D4154 8013DA54 24620008 */ addiu $v0, $v1, 0x8
/* D4158 8013DA58 AC850000 */ sw $a1, 0x0($a0)
/* D415C 8013DA5C AE020000 */ sw $v0, 0x0($s0)
/* D4160 8013DA60 AC670000 */ sw $a3, 0x0($v1)
/* D4164 8013DA64 AC660004 */ sw $a2, 0x4($v1)
/* D4168 8013DA68 9623000A */ lhu $v1, 0xA($s1)
/* D416C 8013DA6C 26A20003 */ addiu $v0, $s5, 0x3
/* D4170 8013DA70 0043102A */ slt $v0, $v0, $v1
/* D4174 8013DA74 10400003 */ beqz $v0, .L8013DA84
/* D4178 8013DA78 26520020 */ addiu $s2, $s2, 0x20
/* D417C 8013DA7C 0804F439 */ j .L8013D0E4
/* D4180 8013DA80 26B50002 */ addiu $s5, $s5, 0x2
.L8013DA84:
/* D4184 8013DA84 8FBF0054 */ lw $ra, 0x54($sp)
/* D4188 8013DA88 8FBE0050 */ lw $fp, 0x50($sp)
/* D418C 8013DA8C 8FB7004C */ lw $s7, 0x4C($sp)
/* D4190 8013DA90 8FB60048 */ lw $s6, 0x48($sp)
/* D4194 8013DA94 8FB50044 */ lw $s5, 0x44($sp)
/* D4198 8013DA98 8FB40040 */ lw $s4, 0x40($sp)
/* D419C 8013DA9C 8FB3003C */ lw $s3, 0x3C($sp)
/* D41A0 8013DAA0 8FB20038 */ lw $s2, 0x38($sp)
/* D41A4 8013DAA4 8FB10034 */ lw $s1, 0x34($sp)
/* D41A8 8013DAA8 8FB00030 */ lw $s0, 0x30($sp)
/* D41AC 8013DAAC 03E00008 */ jr $ra
/* D41B0 8013DAB0 27BD0058 */ addiu $sp, $sp, 0x58
### DECOMPILED C INSTRUCTIONS:
void imgfx_appendGfx_mesh_basic(ImgFXState* state, Matrix4f mtx) {
s32 i;
if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) {
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
gDPLoadTLUT_pal16(gMainGfxPos++, 0, ImgFXCurrentTexturePtr->tex.palette);
}
i = state->firstVtxIdx;
while (TRUE) {
Camera* cam;
s32 uls = (imgfx_vtxBuf[i + 0].v.tc[0] >> 0x5) - 256;
s32 ult = (imgfx_vtxBuf[i + 0].v.tc[1] >> 0x5) - 256;
s32 lrs = (imgfx_vtxBuf[i + 3].v.tc[0] >> 0x5) - 256;
s32 lrt = (imgfx_vtxBuf[i + 3].v.tc[1] >> 0x5) - 256;
s32 someFlags = IMGFX_FLAG_100000 | IMGFX_FLAG_80000;
s32 alpha;
s32 alpha2;
if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) {
if ((gSpriteShadingProfile->flags & 1)
&& (state->arrayIdx != 0)
&& (state->flags & someFlags)
&& ( state->renderType == IMGFX_RENDER_DEFAULT
|| state->renderType == IMGFX_RENDER_MULTIPLY_ALPHA
|| state->renderType == IMGFX_RENDER_OVERLAY_RGBA
|| state->renderType == IMGFX_RENDER_MULTIPLY_SHADE_ALPHA)
) {
gDPScrollMultiTile2_4b(gMainGfxPos++,
ImgFXCurrentTexturePtr->tex.raster, G_IM_FMT_CI,
ImgFXCurrentTexturePtr->tex.width, ImgFXCurrentTexturePtr->tex.height, // img size
uls, ult, // top left
lrs - 1, lrt - 1, // bottom right
0, // palette
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, // clamp wrap mirror
8, 8, // mask
G_TX_NOLOD, G_TX_NOLOD, // shift,
0x100, 0x100); // scroll
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x100, 2, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 252, 0);
alpha = 255;
switch (state->renderType) {
case IMGFX_RENDER_DEFAULT:
break;
case IMGFX_RENDER_MULTIPLY_ALPHA:
case IMGFX_RENDER_OVERLAY_RGBA:
alpha = state->ints.color.a;
break;
case IMGFX_RENDER_MULTIPLY_SHADE_ALPHA:
alpha = -1;
break;
}
if ((gSpriteShadingProfile->flags & 2) && ((*ImgFXInstances)[0].arrayIdx != 0) && (state->flags & someFlags)) {
cam = &gCameras[gCurrentCamID];
if (gGameStatusPtr->isBattle == 2) {
gSPViewport(gMainGfxPos++, &D_8014EE50);
} else {
gSPViewport(gMainGfxPos++, &cam->vpAlt);
}
gDPSetRenderMode(gMainGfxPos++, G_RM_PASS, state->otherModeL);
if (alpha == -1) {
gDPSetCombineMode(gMainGfxPos++, PM_CC_0D, PM_CC_0C);
} else {
gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, alpha);
gDPSetCombineMode(gMainGfxPos++, PM_CC_0B, PM_CC_0C);
}
gSPVertex(gMainGfxPos++, &imgfx_vtxBuf[i], 4, 0);
gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
gDPPipeSync(gMainGfxPos++);
}
create_shading_palette(mtx, uls, ult, lrs, lrt, alpha, state->otherModeL);
} else {
gDPScrollTextureTile_4b(gMainGfxPos++,
ImgFXCurrentTexturePtr->tex.raster, G_IM_FMT_CI,
ImgFXCurrentTexturePtr->tex.width, ImgFXCurrentTexturePtr->tex.height, // img size
uls, ult, // top left
lrs - 1, lrt - 1, // bottom right
0, // palette
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, // clamp wrap mirror
8, 8, // mask
G_TX_NOLOD, G_TX_NOLOD, // shift,
0x100, 0x100); // scroll
if ((gSpriteShadingProfile->flags & 2) && state->arrayIdx != 0 && (state->flags & someFlags)) {
alpha2 = 255;
cam = &gCameras[gCurrentCamID];
if (gGameStatusPtr->isBattle == 2) {
gSPViewport(gMainGfxPos++, &D_8014EE50);
} else {
gSPViewport(gMainGfxPos++, &cam->vpAlt);
}
if (alpha2 == 255) {
gDPSetRenderMode(gMainGfxPos++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
} else {
gDPSetRenderMode(gMainGfxPos++, G_RM_ZB_XLU_SURF, G_RM_ZB_XLU_SURF2);
}
switch (state->renderType) {
case IMGFX_RENDER_DEFAULT:
alpha2 = 255;
break;
case IMGFX_RENDER_MULTIPLY_ALPHA:
case IMGFX_RENDER_OVERLAY_RGBA:
alpha2 = state->ints.color.a;
break;
case IMGFX_RENDER_MULTIPLY_SHADE_ALPHA:
alpha2 = -1;
break;
}
if (alpha2 == -1) {
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 0, SHADE, 0, TEXEL0, 0, 0, 0, 0, 0, SHADE, 0, TEXEL0, 0);
} else {
gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, alpha2);
gDPSetCombineMode(gMainGfxPos++, PM_CC_0A, PM_CC_0A);
}
gSPVertex(gMainGfxPos++, &imgfx_vtxBuf[i], 4, 0);
gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
gDPPipeSync(gMainGfxPos++);
if (alpha2 == 255) {
gDPSetRenderMode(gMainGfxPos++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
} else {
gDPSetRenderMode(gMainGfxPos++, G_RM_ZB_XLU_SURF, G_RM_ZB_XLU_SURF2);
}
gDPSetEnvColor(gMainGfxPos++, 100, 100, 100, 255);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, alpha2);
gDPSetCombineLERP(gMainGfxPos++, SHADE, ENVIRONMENT, TEXEL0, TEXEL0, 0, 0, 0, TEXEL0, SHADE, ENVIRONMENT, TEXEL0, TEXEL0, 0, 0, 0, TEXEL0);
gDPSetColorDither(gMainGfxPos++, G_CD_MAGICSQ);
}
}
}
if ((gSpriteShadingProfile->flags & 2) && (*ImgFXInstances)[0].arrayIdx != 0 && (state->flags & someFlags)) {
cam = &gCameras[gCurrentCamID];
if (gGameStatusPtr->isBattle == 2) {
gSPViewport(gMainGfxPos++, &D_8014EE40);
D_8014EE50.vp.vtrans[0] = D_8014EE40.vp.vtrans[0] + gGameStatusPtr->unk_82;
D_8014EE50.vp.vtrans[1] = D_8014EE40.vp.vtrans[1] + gGameStatusPtr->unk_83;
} else {
gSPViewport(gMainGfxPos++, &cam->vp);
}
}
gSPVertex(gMainGfxPos++, &imgfx_vtxBuf[i], 4, 0);
gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
if (i + 3 >= state->lastVtxIdx) {
break;
}
i += 2;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel _update_message
/* B9F98 80123898 27BDFFE0 */ addiu $sp, $sp, -0x20
/* B9F9C 8012389C AFB00010 */ sw $s0, 0x10($sp)
/* B9FA0 801238A0 0080802D */ daddu $s0, $a0, $zero
/* B9FA4 801238A4 AFBF0018 */ sw $ra, 0x18($sp)
/* B9FA8 801238A8 AFB10014 */ sw $s1, 0x14($sp)
/* B9FAC 801238AC 96020452 */ lhu $v0, 0x452($s0)
/* B9FB0 801238B0 24420001 */ addiu $v0, $v0, 0x1
/* B9FB4 801238B4 A6020452 */ sh $v0, 0x452($s0)
/* B9FB8 801238B8 3042FFFF */ andi $v0, $v0, 0xFFFF
/* B9FBC 801238BC 2C420E10 */ sltiu $v0, $v0, 0xE10
/* B9FC0 801238C0 50400001 */ beql $v0, $zero, .L801238C8
/* B9FC4 801238C4 A6000452 */ sh $zero, 0x452($s0)
.L801238C8:
/* B9FC8 801238C8 8602050A */ lh $v0, 0x50A($s0)
/* B9FCC 801238CC 3C014064 */ lui $at, (0x40640000 >> 16)
/* B9FD0 801238D0 44811800 */ mtc1 $at, $f3
/* B9FD4 801238D4 44801000 */ mtc1 $zero, $f2
/* B9FD8 801238D8 44820000 */ mtc1 $v0, $f0
/* B9FDC 801238DC 00000000 */ nop
/* B9FE0 801238E0 46800020 */ cvt.s.w $f0, $f0
/* B9FE4 801238E4 46000021 */ cvt.d.s $f0, $f0
/* B9FE8 801238E8 46220001 */ sub.d $f0, $f0, $f2
/* B9FEC 801238EC 3C018015 */ lui $at, %hi(D_80150370)
/* B9FF0 801238F0 D4220370 */ ldc1 $f2, %lo(D_80150370)($at)
/* B9FF4 801238F4 3C014050 */ lui $at, (0x40500000 >> 16)
/* B9FF8 801238F8 44812800 */ mtc1 $at, $f5
/* B9FFC 801238FC 44802000 */ mtc1 $zero, $f4
/* BA000 80123900 46220003 */ div.d $f0, $f0, $f2
/* BA004 80123904 46240000 */ add.d $f0, $f0, $f4
/* BA008 80123908 46200120 */ cvt.s.d $f4, $f0
/* BA00C 8012390C 3C014014 */ lui $at, (0x40140000 >> 16)
/* BA010 80123910 44810800 */ mtc1 $at, $f1
/* BA014 80123914 44800000 */ mtc1 $zero, $f0
/* BA018 80123918 460020A1 */ cvt.d.s $f2, $f4
/* BA01C 8012391C 4620103C */ c.lt.d $f2, $f0
/* BA020 80123920 00000000 */ nop
/* BA024 80123924 45000005 */ bc1f .L8012393C
/* BA028 80123928 00000000 */ nop
/* BA02C 8012392C 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* BA030 80123930 44812000 */ mtc1 $at, $f4
/* BA034 80123934 08048E57 */ j .L8012395C
/* BA038 80123938 00000000 */ nop
.L8012393C:
/* BA03C 8012393C 3C018015 */ lui $at, %hi(D_80150378)
/* BA040 80123940 D4200378 */ ldc1 $f0, %lo(D_80150378)($at)
/* BA044 80123944 4622003C */ c.lt.d $f0, $f2
/* BA048 80123948 00000000 */ nop
/* BA04C 8012394C 45000003 */ bc1f .L8012395C
/* BA050 80123950 00000000 */ nop
/* BA054 80123954 3C0142F4 */ lui $at, (0x42F40000 >> 16)
/* BA058 80123958 44812000 */ mtc1 $at, $f4
.L8012395C:
/* BA05C 8012395C 3C014F00 */ lui $at, (0x4F000000 >> 16)
/* BA060 80123960 44810000 */ mtc1 $at, $f0
/* BA064 80123964 00000000 */ nop
/* BA068 80123968 4604003E */ c.le.s $f0, $f4
/* BA06C 8012396C 00000000 */ nop
/* BA070 80123970 45010005 */ bc1t .L80123988
/* BA074 80123974 2604051A */ addiu $a0, $s0, 0x51A
/* BA078 80123978 4600218D */ trunc.w.s $f6, $f4
/* BA07C 8012397C 44033000 */ mfc1 $v1, $f6
/* BA080 80123980 08048E69 */ j .L801239A4
/* BA084 80123984 A0830000 */ sb $v1, 0x0($a0)
.L80123988:
/* BA088 80123988 46002001 */ sub.s $f0, $f4, $f0
/* BA08C 8012398C 3C028000 */ lui $v0, (0x80000000 >> 16)
/* BA090 80123990 4600018D */ trunc.w.s $f6, $f0
/* BA094 80123994 44033000 */ mfc1 $v1, $f6
/* BA098 80123998 00000000 */ nop
/* BA09C 8012399C 00621825 */ or $v1, $v1, $v0
/* BA0A0 801239A0 A0830000 */ sb $v1, 0x0($a0)
.L801239A4:
/* BA0A4 801239A4 8E0604FC */ lw $a2, 0x4FC($s0)
/* BA0A8 801239A8 30C20040 */ andi $v0, $a2, 0x40
/* BA0AC 801239AC 144001F1 */ bnez $v0, .L80124174
/* BA0B0 801239B0 0000882D */ daddu $s1, $zero, $zero
/* BA0B4 801239B4 30C20030 */ andi $v0, $a2, 0x30
/* BA0B8 801239B8 144000F3 */ bnez $v0, .L80123D88
/* BA0BC 801239BC 30C20020 */ andi $v0, $a2, 0x20
/* BA0C0 801239C0 920304F8 */ lbu $v1, 0x4F8($s0)
/* BA0C4 801239C4 24020007 */ addiu $v0, $zero, 0x7
/* BA0C8 801239C8 1062008D */ beq $v1, $v0, .L80123C00
/* BA0CC 801239CC 34078000 */ ori $a3, $zero, 0x8000
/* BA0D0 801239D0 28620008 */ slti $v0, $v1, 0x8
/* BA0D4 801239D4 10400005 */ beqz $v0, .L801239EC
/* BA0D8 801239D8 24020005 */ addiu $v0, $zero, 0x5
/* BA0DC 801239DC 1062000A */ beq $v1, $v0, .L80123A08
/* BA0E0 801239E0 3C020008 */ lui $v0, (0x80000 >> 16)
/* BA0E4 801239E4 08048F72 */ j .L80123DC8
/* BA0E8 801239E8 00000000 */ nop
.L801239EC:
/* BA0EC 801239EC 24020008 */ addiu $v0, $zero, 0x8
/* BA0F0 801239F0 106200D9 */ beq $v1, $v0, .L80123D58
/* BA0F4 801239F4 2402000C */ addiu $v0, $zero, 0xC
/* BA0F8 801239F8 1062004F */ beq $v1, $v0, .L80123B38
/* BA0FC 801239FC 00000000 */ nop
/* BA100 80123A00 08048F72 */ j .L80123DC8
/* BA104 80123A04 00000000 */ nop
.L80123A08:
/* BA108 80123A08 00C21024 */ and $v0, $a2, $v0
/* BA10C 80123A0C 54400001 */ bnel $v0, $zero, .L80123A14
/* BA110 80123A10 34078004 */ ori $a3, $zero, 0x8004
.L80123A14:
/* BA114 80123A14 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* BA118 80123A18 2463419C */ addiu $v1, $v1, %lo(gGameStatusPtr)
/* BA11C 80123A1C 8C640000 */ lw $a0, 0x0($v1)
/* BA120 80123A20 8C850010 */ lw $a1, 0x10($a0)
/* BA124 80123A24 00E51024 */ and $v0, $a3, $a1
/* BA128 80123A28 14400005 */ bnez $v0, .L80123A40
/* BA12C 80123A2C 00000000 */ nop
/* BA130 80123A30 8C820000 */ lw $v0, 0x0($a0)
/* BA134 80123A34 30424000 */ andi $v0, $v0, 0x4000
/* BA138 80123A38 1040002F */ beqz $v0, .L80123AF8
/* BA13C 80123A3C 30A22000 */ andi $v0, $a1, 0x2000
.L80123A40:
/* BA140 80123A40 8E0404FC */ lw $a0, 0x4FC($s0)
/* BA144 80123A44 24020004 */ addiu $v0, $zero, 0x4
/* BA148 80123A48 A20204F8 */ sb $v0, 0x4F8($s0)
/* BA14C 80123A4C A600000E */ sh $zero, 0xE($s0)
/* BA150 80123A50 8C630000 */ lw $v1, 0x0($v1)
/* BA154 80123A54 34820004 */ ori $v0, $a0, 0x4
/* BA158 80123A58 AE0204FC */ sw $v0, 0x4FC($s0)
/* BA15C 80123A5C 8C620010 */ lw $v0, 0x10($v1)
/* BA160 80123A60 30428004 */ andi $v0, $v0, 0x8004
/* BA164 80123A64 10400003 */ beqz $v0, .L80123A74
/* BA168 80123A68 00000000 */ nop
/* BA16C 80123A6C 08048EB7 */ j .L80123ADC
/* BA170 80123A70 24110001 */ addiu $s1, $zero, 0x1
.L80123A74:
/* BA174 80123A74 9603000C */ lhu $v1, 0xC($s0)
/* BA178 80123A78 8E020000 */ lw $v0, 0x0($s0)
/* BA17C 80123A7C 00431021 */ addu $v0, $v0, $v1
/* BA180 80123A80 90430000 */ lbu $v1, 0x0($v0)
/* BA184 80123A84 240200FD */ addiu $v0, $zero, 0xFD
/* BA188 80123A88 1062000F */ beq $v1, $v0, .L80123AC8
/* BA18C 80123A8C 34820104 */ ori $v0, $a0, 0x104
/* BA190 80123A90 92030455 */ lbu $v1, 0x455($s0)
/* BA194 80123A94 14600008 */ bnez $v1, .L80123AB8
/* BA198 80123A98 AE0204FC */ sw $v0, 0x4FC($s0)
/* BA19C 80123A9C 9603000C */ lhu $v1, 0xC($s0)
/* BA1A0 80123AA0 8E020000 */ lw $v0, 0x0($s0)
/* BA1A4 80123AA4 00431021 */ addu $v0, $v0, $v1
/* BA1A8 80123AA8 90430000 */ lbu $v1, 0x0($v0)
/* BA1AC 80123AAC 240200C3 */ addiu $v0, $zero, 0xC3
/* BA1B0 80123AB0 5062000B */ beql $v1, $v0, .L80123AE0
/* BA1B4 80123AB4 240400CC */ addiu $a0, $zero, 0xCC
.L80123AB8:
/* BA1B8 80123AB8 34820184 */ ori $v0, $a0, 0x184
/* BA1BC 80123ABC AE0204FC */ sw $v0, 0x4FC($s0)
/* BA1C0 80123AC0 08048EB8 */ j .L80123AE0
/* BA1C4 80123AC4 240400CC */ addiu $a0, $zero, 0xCC
.L80123AC8:
/* BA1C8 80123AC8 92020508 */ lbu $v0, 0x508($s0)
/* BA1CC 80123ACC 2442FFFF */ addiu $v0, $v0, -0x1
/* BA1D0 80123AD0 2C420004 */ sltiu $v0, $v0, 0x4
/* BA1D4 80123AD4 104000BC */ beqz $v0, .L80123DC8
/* BA1D8 80123AD8 00000000 */ nop
.L80123ADC:
/* BA1DC 80123ADC 240400C9 */ addiu $a0, $zero, 0xC9
.L80123AE0:
/* BA1E0 80123AE0 0000282D */ daddu $a1, $zero, $zero
/* BA1E4 80123AE4 00A0302D */ daddu $a2, $a1, $zero
/* BA1E8 80123AE8 0C0526AE */ jal sfx_play_sound_with_params
/* BA1EC 80123AEC 00A0382D */ daddu $a3, $a1, $zero
/* BA1F0 80123AF0 08048F72 */ j .L80123DC8
/* BA1F4 80123AF4 00000000 */ nop
.L80123AF8:
/* BA1F8 80123AF8 104000B3 */ beqz $v0, .L80123DC8
/* BA1FC 80123AFC 3C020004 */ lui $v0, (0x40000 >> 16)
/* BA200 80123B00 00C21024 */ and $v0, $a2, $v0
/* BA204 80123B04 144000B0 */ bnez $v0, .L80123DC8
/* BA208 80123B08 00000000 */ nop
/* BA20C 80123B0C 92020486 */ lbu $v0, 0x486($s0)
/* BA210 80123B10 104000AD */ beqz $v0, .L80123DC8
/* BA214 80123B14 240400CD */ addiu $a0, $zero, 0xCD
/* BA218 80123B18 0000282D */ daddu $a1, $zero, $zero
/* BA21C 80123B1C 00A0302D */ daddu $a2, $a1, $zero
/* BA220 80123B20 92020486 */ lbu $v0, 0x486($s0)
/* BA224 80123B24 2403000B */ addiu $v1, $zero, 0xB
/* BA228 80123B28 A20304F8 */ sb $v1, 0x4F8($s0)
/* BA22C 80123B2C A60004CC */ sh $zero, 0x4CC($s0)
/* BA230 80123B30 08048EF2 */ j .L80123BC8
/* BA234 80123B34 2442FFFF */ addiu $v0, $v0, -0x1
.L80123B38:
/* BA238 80123B38 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* BA23C 80123B3C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* BA240 80123B40 8C430010 */ lw $v1, 0x10($v0)
/* BA244 80123B44 30624000 */ andi $v0, $v1, 0x4000
/* BA248 80123B48 10400008 */ beqz $v0, .L80123B6C
/* BA24C 80123B4C 240400CC */ addiu $a0, $zero, 0xCC
/* BA250 80123B50 0000282D */ daddu $a1, $zero, $zero
/* BA254 80123B54 00A0302D */ daddu $a2, $a1, $zero
/* BA258 80123B58 92020486 */ lbu $v0, 0x486($s0)
/* BA25C 80123B5C 2403000B */ addiu $v1, $zero, 0xB
/* BA260 80123B60 A20304F8 */ sb $v1, 0x4F8($s0)
/* BA264 80123B64 08048EF2 */ j .L80123BC8
/* BA268 80123B68 A60004CC */ sh $zero, 0x4CC($s0)
.L80123B6C:
/* BA26C 80123B6C 30622000 */ andi $v0, $v1, 0x2000
/* BA270 80123B70 1040000C */ beqz $v0, .L80123BA4
/* BA274 80123B74 30628000 */ andi $v0, $v1, 0x8000
/* BA278 80123B78 92020487 */ lbu $v0, 0x487($s0)
/* BA27C 80123B7C 10400092 */ beqz $v0, .L80123DC8
/* BA280 80123B80 240400CD */ addiu $a0, $zero, 0xCD
/* BA284 80123B84 0000282D */ daddu $a1, $zero, $zero
/* BA288 80123B88 00A0302D */ daddu $a2, $a1, $zero
/* BA28C 80123B8C 92020487 */ lbu $v0, 0x487($s0)
/* BA290 80123B90 2403000B */ addiu $v1, $zero, 0xB
/* BA294 80123B94 A20304F8 */ sb $v1, 0x4F8($s0)
/* BA298 80123B98 A60004CC */ sh $zero, 0x4CC($s0)
/* BA29C 80123B9C 08048EF2 */ j .L80123BC8
/* BA2A0 80123BA0 2442FFFF */ addiu $v0, $v0, -0x1
.L80123BA4:
/* BA2A4 80123BA4 10400088 */ beqz $v0, .L80123DC8
/* BA2A8 80123BA8 240400CE */ addiu $a0, $zero, 0xCE
/* BA2AC 80123BAC 0000282D */ daddu $a1, $zero, $zero
/* BA2B0 80123BB0 00A0302D */ daddu $a2, $a1, $zero
/* BA2B4 80123BB4 92020487 */ lbu $v0, 0x487($s0)
/* BA2B8 80123BB8 2403000B */ addiu $v1, $zero, 0xB
/* BA2BC 80123BBC A20304F8 */ sb $v1, 0x4F8($s0)
/* BA2C0 80123BC0 A60004CC */ sh $zero, 0x4CC($s0)
/* BA2C4 80123BC4 24420001 */ addiu $v0, $v0, 0x1
.L80123BC8:
/* BA2C8 80123BC8 A2020487 */ sb $v0, 0x487($s0)
/* BA2CC 80123BCC 304200FF */ andi $v0, $v0, 0xFF
/* BA2D0 80123BD0 00021040 */ sll $v0, $v0, 1
/* BA2D4 80123BD4 02021021 */ addu $v0, $s0, $v0
/* BA2D8 80123BD8 94430488 */ lhu $v1, 0x488($v0)
/* BA2DC 80123BDC 8E020460 */ lw $v0, 0x460($s0)
/* BA2E0 80123BE0 00A0382D */ daddu $a3, $a1, $zero
/* BA2E4 80123BE4 00431023 */ subu $v0, $v0, $v1
/* BA2E8 80123BE8 04420001 */ bltzl $v0, .L80123BF0
/* BA2EC 80123BEC 00021023 */ negu $v0, $v0
.L80123BF0:
/* BA2F0 80123BF0 0C0526AE */ jal sfx_play_sound_with_params
/* BA2F4 80123BF4 A60204C8 */ sh $v0, 0x4C8($s0)
/* BA2F8 80123BF8 08048F72 */ j .L80123DC8
/* BA2FC 80123BFC 00000000 */ nop
.L80123C00:
/* BA300 80123C00 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* BA304 80123C04 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* BA308 80123C08 8C440010 */ lw $a0, 0x10($v0)
/* BA30C 80123C0C 30828000 */ andi $v0, $a0, 0x8000
/* BA310 80123C10 1040000E */ beqz $v0, .L80123C4C
/* BA314 80123C14 0000282D */ daddu $a1, $zero, $zero
/* BA318 80123C18 240400C9 */ addiu $a0, $zero, 0xC9
/* BA31C 80123C1C 00A0302D */ daddu $a2, $a1, $zero
/* BA320 80123C20 00A0382D */ daddu $a3, $a1, $zero
/* BA324 80123C24 24020001 */ addiu $v0, $zero, 0x1
/* BA328 80123C28 A20204E9 */ sb $v0, 0x4E9($s0)
/* BA32C 80123C2C 24020004 */ addiu $v0, $zero, 0x4
/* BA330 80123C30 A20204F8 */ sb $v0, 0x4F8($s0)
/* BA334 80123C34 8E0204FC */ lw $v0, 0x4FC($s0)
/* BA338 80123C38 3C030002 */ lui $v1, (0x20000 >> 16)
/* BA33C 80123C3C A20004ED */ sb $zero, 0x4ED($s0)
/* BA340 80123C40 00431025 */ or $v0, $v0, $v1
/* BA344 80123C44 08048F50 */ j .L80123D40
/* BA348 80123C48 AE0204FC */ sw $v0, 0x4FC($s0)
.L80123C4C:
/* BA34C 80123C4C 920504EA */ lbu $a1, 0x4EA($s0)
/* BA350 80123C50 240200FF */ addiu $v0, $zero, 0xFF
/* BA354 80123C54 30A300FF */ andi $v1, $a1, 0xFF
/* BA358 80123C58 10620019 */ beq $v1, $v0, .L80123CC0
/* BA35C 80123C5C 30824000 */ andi $v0, $a0, 0x4000
/* BA360 80123C60 10400017 */ beqz $v0, .L80123CC0
/* BA364 80123C64 00000000 */ nop
/* BA368 80123C68 920204CE */ lbu $v0, 0x4CE($s0)
/* BA36C 80123C6C 0062102B */ sltu $v0, $v1, $v0
/* BA370 80123C70 54400003 */ bnel $v0, $zero, .L80123C80
/* BA374 80123C74 A20504EE */ sb $a1, 0x4EE($s0)
/* BA378 80123C78 920204E8 */ lbu $v0, 0x4E8($s0)
/* BA37C 80123C7C A20204EE */ sb $v0, 0x4EE($s0)
.L80123C80:
/* BA380 80123C80 240400CA */ addiu $a0, $zero, 0xCA
/* BA384 80123C84 0000282D */ daddu $a1, $zero, $zero
/* BA388 80123C88 00A0302D */ daddu $a2, $a1, $zero
/* BA38C 80123C8C 920304EA */ lbu $v1, 0x4EA($s0)
/* BA390 80123C90 24020001 */ addiu $v0, $zero, 0x1
/* BA394 80123C94 A20204E9 */ sb $v0, 0x4E9($s0)
/* BA398 80123C98 24020004 */ addiu $v0, $zero, 0x4
/* BA39C 80123C9C A20204F8 */ sb $v0, 0x4F8($s0)
/* BA3A0 80123CA0 8E0204FC */ lw $v0, 0x4FC($s0)
/* BA3A4 80123CA4 00A0382D */ daddu $a3, $a1, $zero
/* BA3A8 80123CA8 A20004ED */ sb $zero, 0x4ED($s0)
/* BA3AC 80123CAC A20304E8 */ sb $v1, 0x4E8($s0)
/* BA3B0 80123CB0 3C030002 */ lui $v1, (0x20000 >> 16)
/* BA3B4 80123CB4 00431025 */ or $v0, $v0, $v1
/* BA3B8 80123CB8 08048F50 */ j .L80123D40
/* BA3BC 80123CBC AE0204FC */ sw $v0, 0x4FC($s0)
.L80123CC0:
/* BA3C0 80123CC0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* BA3C4 80123CC4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* BA3C8 80123CC8 8C430020 */ lw $v1, 0x20($v0)
/* BA3CC 80123CCC 3C020002 */ lui $v0, (0x20000 >> 16)
/* BA3D0 80123CD0 00621024 */ and $v0, $v1, $v0
/* BA3D4 80123CD4 1040000B */ beqz $v0, .L80123D04
/* BA3D8 80123CD8 3C020001 */ lui $v0, (0x10000 >> 16)
/* BA3DC 80123CDC 920204CE */ lbu $v0, 0x4CE($s0)
/* BA3E0 80123CE0 920304E8 */ lbu $v1, 0x4E8($s0)
/* BA3E4 80123CE4 2442FFFF */ addiu $v0, $v0, -0x1
/* BA3E8 80123CE8 10620017 */ beq $v1, $v0, .L80123D48
/* BA3EC 80123CEC 240400C7 */ addiu $a0, $zero, 0xC7
/* BA3F0 80123CF0 0000282D */ daddu $a1, $zero, $zero
/* BA3F4 80123CF4 00A0302D */ daddu $a2, $a1, $zero
/* BA3F8 80123CF8 00A0382D */ daddu $a3, $a1, $zero
/* BA3FC 80123CFC 08048F4B */ j .L80123D2C
/* BA400 80123D00 24620001 */ addiu $v0, $v1, 0x1
.L80123D04:
/* BA404 80123D04 00621024 */ and $v0, $v1, $v0
/* BA408 80123D08 1040000F */ beqz $v0, .L80123D48
/* BA40C 80123D0C 00000000 */ nop
/* BA410 80123D10 920204E8 */ lbu $v0, 0x4E8($s0)
/* BA414 80123D14 1040000C */ beqz $v0, .L80123D48
/* BA418 80123D18 240400C7 */ addiu $a0, $zero, 0xC7
/* BA41C 80123D1C 0000282D */ daddu $a1, $zero, $zero
/* BA420 80123D20 00A0302D */ daddu $a2, $a1, $zero
/* BA424 80123D24 00A0382D */ daddu $a3, $a1, $zero
/* BA428 80123D28 2442FFFF */ addiu $v0, $v0, -0x1
.L80123D2C:
/* BA42C 80123D2C A20204EC */ sb $v0, 0x4EC($s0)
/* BA430 80123D30 24020008 */ addiu $v0, $zero, 0x8
/* BA434 80123D34 A20204F8 */ sb $v0, 0x4F8($s0)
/* BA438 80123D38 24020001 */ addiu $v0, $zero, 0x1
/* BA43C 80123D3C A20204ED */ sb $v0, 0x4ED($s0)
.L80123D40:
/* BA440 80123D40 0C0526AE */ jal sfx_play_sound_with_params
/* BA444 80123D44 00000000 */ nop
.L80123D48:
/* BA448 80123D48 920304F8 */ lbu $v1, 0x4F8($s0)
/* BA44C 80123D4C 24020008 */ addiu $v0, $zero, 0x8
/* BA450 80123D50 1462001D */ bne $v1, $v0, .L80123DC8
/* BA454 80123D54 00000000 */ nop
.L80123D58:
/* BA458 80123D58 920204ED */ lbu $v0, 0x4ED($s0)
/* BA45C 80123D5C 24420001 */ addiu $v0, $v0, 0x1
/* BA460 80123D60 A20204ED */ sb $v0, 0x4ED($s0)
/* BA464 80123D64 304200FF */ andi $v0, $v0, 0xFF
/* BA468 80123D68 2C420005 */ sltiu $v0, $v0, 0x5
/* BA46C 80123D6C 14400016 */ bnez $v0, .L80123DC8
/* BA470 80123D70 24020007 */ addiu $v0, $zero, 0x7
/* BA474 80123D74 920304EC */ lbu $v1, 0x4EC($s0)
/* BA478 80123D78 A20204F8 */ sb $v0, 0x4F8($s0)
/* BA47C 80123D7C A20304E8 */ sb $v1, 0x4E8($s0)
/* BA480 80123D80 08048F72 */ j .L80123DC8
/* BA484 80123D84 A20304EE */ sb $v1, 0x4EE($s0)
.L80123D88:
/* BA488 80123D88 1440000F */ bnez $v0, .L80123DC8
/* BA48C 80123D8C 24020005 */ addiu $v0, $zero, 0x5
/* BA490 80123D90 920304F8 */ lbu $v1, 0x4F8($s0)
/* BA494 80123D94 1462000C */ bne $v1, $v0, .L80123DC8
/* BA498 80123D98 00000000 */ nop
/* BA49C 80123D9C 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* BA4A0 80123DA0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* BA4A4 80123DA4 8C420010 */ lw $v0, 0x10($v0)
/* BA4A8 80123DA8 30428000 */ andi $v0, $v0, 0x8000
/* BA4AC 80123DAC 10400006 */ beqz $v0, .L80123DC8
/* BA4B0 80123DB0 24020004 */ addiu $v0, $zero, 0x4
/* BA4B4 80123DB4 8E0304FC */ lw $v1, 0x4FC($s0)
/* BA4B8 80123DB8 A20204F8 */ sb $v0, 0x4F8($s0)
/* BA4BC 80123DBC A600000E */ sh $zero, 0xE($s0)
/* BA4C0 80123DC0 34630004 */ ori $v1, $v1, 0x4
/* BA4C4 80123DC4 AE0304FC */ sw $v1, 0x4FC($s0)
.L80123DC8:
/* BA4C8 80123DC8 8E0304FC */ lw $v1, 0x4FC($s0)
/* BA4CC 80123DCC 30620004 */ andi $v0, $v1, 0x4
/* BA4D0 80123DD0 1040000B */ beqz $v0, .L80123E00
/* BA4D4 80123DD4 0000282D */ daddu $a1, $zero, $zero
/* BA4D8 80123DD8 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* BA4DC 80123DDC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* BA4E0 80123DE0 8C420000 */ lw $v0, 0x0($v0)
/* BA4E4 80123DE4 30428000 */ andi $v0, $v0, 0x8000
/* BA4E8 80123DE8 14400006 */ bnez $v0, .L80123E04
/* BA4EC 80123DEC 0200202D */ daddu $a0, $s0, $zero
/* BA4F0 80123DF0 2402FFFB */ addiu $v0, $zero, -0x5
/* BA4F4 80123DF4 00621024 */ and $v0, $v1, $v0
/* BA4F8 80123DF8 AE0204FC */ sw $v0, 0x4FC($s0)
/* BA4FC 80123DFC 0000282D */ daddu $a1, $zero, $zero
.L80123E00:
/* BA500 80123E00 0200202D */ daddu $a0, $s0, $zero
.L80123E04:
/* BA504 80123E04 84820474 */ lh $v0, 0x474($a0)
/* BA508 80123E08 94830474 */ lhu $v1, 0x474($a0)
/* BA50C 80123E0C 18400003 */ blez $v0, .L80123E1C
/* BA510 80123E10 24A50001 */ addiu $a1, $a1, 0x1
/* BA514 80123E14 2462FFFF */ addiu $v0, $v1, -0x1
/* BA518 80123E18 A4820474 */ sh $v0, 0x474($a0)
.L80123E1C:
/* BA51C 80123E1C 28A20004 */ slti $v0, $a1, 0x4
/* BA520 80123E20 1440FFF8 */ bnez $v0, .L80123E04
/* BA524 80123E24 24840002 */ addiu $a0, $a0, 0x2
/* BA528 80123E28 920204F8 */ lbu $v0, 0x4F8($s0)
/* BA52C 80123E2C 2443FFFF */ addiu $v1, $v0, -0x1
/* BA530 80123E30 2C62000E */ sltiu $v0, $v1, 0xE
/* BA534 80123E34 104000CF */ beqz $v0, .L80124174
/* BA538 80123E38 00031080 */ sll $v0, $v1, 2
/* BA53C 80123E3C 3C018015 */ lui $at, %hi(jtbl_80150380)
/* BA540 80123E40 00220821 */ addu $at, $at, $v0
/* BA544 80123E44 8C220380 */ lw $v0, %lo(jtbl_80150380)($at)
/* BA548 80123E48 00400008 */ jr $v0
/* BA54C 80123E4C 00000000 */ nop
glabel .L80123E50
/* BA550 80123E50 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* BA554 80123E54 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* BA558 80123E58 8C430010 */ lw $v1, 0x10($v0)
/* BA55C 80123E5C 8C420000 */ lw $v0, 0x0($v0)
/* BA560 80123E60 30638000 */ andi $v1, $v1, 0x8000
/* BA564 80123E64 30424000 */ andi $v0, $v0, 0x4000
/* BA568 80123E68 00621825 */ or $v1, $v1, $v0
/* BA56C 80123E6C 1060000B */ beqz $v1, .L80123E9C
/* BA570 80123E70 24020001 */ addiu $v0, $zero, 0x1
/* BA574 80123E74 8E0304FC */ lw $v1, 0x4FC($s0)
/* BA578 80123E78 30620030 */ andi $v0, $v1, 0x30
/* BA57C 80123E7C 14400007 */ bnez $v0, .L80123E9C
/* BA580 80123E80 24020001 */ addiu $v0, $zero, 0x1
/* BA584 80123E84 322200FF */ andi $v0, $s1, 0xFF
/* BA588 80123E88 14400004 */ bnez $v0, .L80123E9C
/* BA58C 80123E8C 24020001 */ addiu $v0, $zero, 0x1
/* BA590 80123E90 34620100 */ ori $v0, $v1, 0x100
/* BA594 80123E94 AE0204FC */ sw $v0, 0x4FC($s0)
glabel .L80123E98
/* BA598 80123E98 24020001 */ addiu $v0, $zero, 0x1
.L80123E9C:
/* BA59C 80123E9C 920304F8 */ lbu $v1, 0x4F8($s0)
/* BA5A0 80123EA0 9205045F */ lbu $a1, 0x45F($s0)
/* BA5A4 80123EA4 14620003 */ bne $v1, $v0, .L80123EB4
/* BA5A8 80123EA8 24020004 */ addiu $v0, $zero, 0x4
/* BA5AC 80123EAC 08048FBE */ j .L80123EF8
/* BA5B0 80123EB0 A20204F8 */ sb $v0, 0x4F8($s0)
.L80123EB4:
/* BA5B4 80123EB4 8E0304FC */ lw $v1, 0x4FC($s0)
/* BA5B8 80123EB8 30620100 */ andi $v0, $v1, 0x100
/* BA5BC 80123EBC 10400003 */ beqz $v0, .L80123ECC
/* BA5C0 80123EC0 30620004 */ andi $v0, $v1, 0x4
/* BA5C4 80123EC4 08048FBE */ j .L80123EF8
/* BA5C8 80123EC8 2405000C */ addiu $a1, $zero, 0xC
.L80123ECC:
/* BA5CC 80123ECC 1440000B */ bnez $v0, .L80123EFC
/* BA5D0 80123ED0 30620030 */ andi $v0, $v1, 0x30
/* BA5D4 80123ED4 14400009 */ bnez $v0, .L80123EFC
/* BA5D8 80123ED8 00000000 */ nop
/* BA5DC 80123EDC 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* BA5E0 80123EE0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* BA5E4 80123EE4 8C420000 */ lw $v0, 0x0($v0)
/* BA5E8 80123EE8 30428000 */ andi $v0, $v0, 0x8000
/* BA5EC 80123EEC 10400003 */ beqz $v0, .L80123EFC
/* BA5F0 80123EF0 00000000 */ nop
/* BA5F4 80123EF4 24050006 */ addiu $a1, $zero, 0x6
.L80123EF8:
/* BA5F8 80123EF8 A600000E */ sh $zero, 0xE($s0)
.L80123EFC:
/* BA5FC 80123EFC 9602000E */ lhu $v0, 0xE($s0)
/* BA600 80123F00 10400005 */ beqz $v0, .L80123F18
/* BA604 80123F04 2442FFFF */ addiu $v0, $v0, -0x1
/* BA608 80123F08 A602000E */ sh $v0, 0xE($s0)
/* BA60C 80123F0C 3042FFFF */ andi $v0, $v0, 0xFFFF
/* BA610 80123F10 14400098 */ bnez $v0, .L80124174
/* BA614 80123F14 00000000 */ nop
.L80123F18:
/* BA618 80123F18 0200202D */ daddu $a0, $s0, $zero
/* BA61C 80123F1C 0C04915C */ jal msg_copy_to_print_buffer
/* BA620 80123F20 0000302D */ daddu $a2, $zero, $zero
/* BA624 80123F24 0804905D */ j .L80124174
/* BA628 80123F28 00000000 */ nop
glabel .L80123F2C
/* BA62C 80123F2C 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* BA630 80123F30 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* BA634 80123F34 8C420010 */ lw $v0, 0x10($v0)
/* BA638 80123F38 3042C000 */ andi $v0, $v0, 0xC000
/* BA63C 80123F3C 10400006 */ beqz $v0, .L80123F58
/* BA640 80123F40 00000000 */ nop
/* BA644 80123F44 8E0304FC */ lw $v1, 0x4FC($s0)
/* BA648 80123F48 30620030 */ andi $v0, $v1, 0x30
/* BA64C 80123F4C 14400002 */ bnez $v0, .L80123F58
/* BA650 80123F50 34620100 */ ori $v0, $v1, 0x100
/* BA654 80123F54 AE0204FC */ sw $v0, 0x4FC($s0)
.L80123F58:
/* BA658 80123F58 92030464 */ lbu $v1, 0x464($s0)
/* BA65C 80123F5C 8E020460 */ lw $v0, 0x460($s0)
/* BA660 80123F60 8E0404FC */ lw $a0, 0x4FC($s0)
/* BA664 80123F64 00431821 */ addu $v1, $v0, $v1
/* BA668 80123F68 30820100 */ andi $v0, $a0, 0x100
/* BA66C 80123F6C 1440000A */ bnez $v0, .L80123F98
/* BA670 80123F70 AE030460 */ sw $v1, 0x460($s0)
/* BA674 80123F74 30820014 */ andi $v0, $a0, 0x14
/* BA678 80123F78 14400009 */ bnez $v0, .L80123FA0
/* BA67C 80123F7C 00000000 */ nop
/* BA680 80123F80 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* BA684 80123F84 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* BA688 80123F88 8C420000 */ lw $v0, 0x0($v0)
/* BA68C 80123F8C 30428000 */ andi $v0, $v0, 0x8000
/* BA690 80123F90 10400003 */ beqz $v0, .L80123FA0
/* BA694 80123F94 00000000 */ nop
.L80123F98:
/* BA698 80123F98 24620006 */ addiu $v0, $v1, 0x6
/* BA69C 80123F9C AE020460 */ sw $v0, 0x460($s0)
.L80123FA0:
/* BA6A0 80123FA0 96030466 */ lhu $v1, 0x466($s0)
/* BA6A4 80123FA4 8E020460 */ lw $v0, 0x460($s0)
/* BA6A8 80123FA8 0043102A */ slt $v0, $v0, $v1
/* BA6AC 80123FAC 14400071 */ bnez $v0, .L80124174
/* BA6B0 80123FB0 24020004 */ addiu $v0, $zero, 0x4
/* BA6B4 80123FB4 A20204F8 */ sb $v0, 0x4F8($s0)
/* BA6B8 80123FB8 8E0204FC */ lw $v0, 0x4FC($s0)
/* BA6BC 80123FBC AE030460 */ sw $v1, 0x460($s0)
/* BA6C0 80123FC0 92030508 */ lbu $v1, 0x508($s0)
/* BA6C4 80123FC4 34420004 */ ori $v0, $v0, 0x4
/* BA6C8 80123FC8 2463FFF9 */ addiu $v1, $v1, -0x7
/* BA6CC 80123FCC 2C630002 */ sltiu $v1, $v1, 0x2
/* BA6D0 80123FD0 14600008 */ bnez $v1, .L80123FF4
/* BA6D4 80123FD4 AE0204FC */ sw $v0, 0x4FC($s0)
/* BA6D8 80123FD8 9603000C */ lhu $v1, 0xC($s0)
/* BA6DC 80123FDC 8E020000 */ lw $v0, 0x0($s0)
/* BA6E0 80123FE0 00431021 */ addu $v0, $v0, $v1
/* BA6E4 80123FE4 90430000 */ lbu $v1, 0x0($v0)
/* BA6E8 80123FE8 240200F1 */ addiu $v0, $zero, 0xF1
/* BA6EC 80123FEC 14620003 */ bne $v1, $v0, .L80123FFC
/* BA6F0 80123FF0 24020005 */ addiu $v0, $zero, 0x5
.L80123FF4:
/* BA6F4 80123FF4 08049000 */ j .L80124000
/* BA6F8 80123FF8 A600000E */ sh $zero, 0xE($s0)
.L80123FFC:
/* BA6FC 80123FFC A602000E */ sh $v0, 0xE($s0)
.L80124000:
/* BA700 80124000 92020486 */ lbu $v0, 0x486($s0)
/* BA704 80124004 96030462 */ lhu $v1, 0x462($s0)
/* BA708 80124008 00021040 */ sll $v0, $v0, 1
/* BA70C 8012400C 02021021 */ addu $v0, $s0, $v0
/* BA710 80124010 0804905D */ j .L80124174
/* BA714 80124014 A4430488 */ sh $v1, 0x488($v0)
glabel .L80124018
/* BA718 80124018 960204CC */ lhu $v0, 0x4CC($s0)
/* BA71C 8012401C 92030487 */ lbu $v1, 0x487($s0)
/* BA720 80124020 24420001 */ addiu $v0, $v0, 0x1
/* BA724 80124024 00031840 */ sll $v1, $v1, 1
/* BA728 80124028 02031821 */ addu $v1, $s0, $v1
/* BA72C 8012402C A60204CC */ sh $v0, 0x4CC($s0)
/* BA730 80124030 94620488 */ lhu $v0, 0x488($v1)
/* BA734 80124034 8E030460 */ lw $v1, 0x460($s0)
/* BA738 80124038 00621823 */ subu $v1, $v1, $v0
/* BA73C 8012403C 960204C8 */ lhu $v0, 0x4C8($s0)
/* BA740 80124040 04620001 */ bltzl $v1, .L80124048
/* BA744 80124044 00031823 */ negu $v1, $v1
.L80124048:
/* BA748 80124048 2C420011 */ sltiu $v0, $v0, 0x11
/* BA74C 8012404C 10400008 */ beqz $v0, .L80124070
/* BA750 80124050 24040002 */ addiu $a0, $zero, 0x2
/* BA754 80124054 00031400 */ sll $v0, $v1, 16
/* BA758 80124058 00021C03 */ sra $v1, $v0, 16
/* BA75C 8012405C 2862000F */ slti $v0, $v1, 0xF
/* BA760 80124060 10400018 */ beqz $v0, .L801240C4
/* BA764 80124064 28620009 */ slti $v0, $v1, 0x9
/* BA768 80124068 08049033 */ j .L801240CC
/* BA76C 8012406C 00000000 */ nop
.L80124070:
/* BA770 80124070 00031400 */ sll $v0, $v1, 16
/* BA774 80124074 00021C03 */ sra $v1, $v0, 16
/* BA778 80124078 28620061 */ slti $v0, $v1, 0x61
/* BA77C 8012407C 14400003 */ bnez $v0, .L8012408C
/* BA780 80124080 28620031 */ slti $v0, $v1, 0x31
/* BA784 80124084 08049035 */ j .L801240D4
/* BA788 80124088 2404000A */ addiu $a0, $zero, 0xA
.L8012408C:
/* BA78C 8012408C 14400003 */ bnez $v0, .L8012409C
/* BA790 80124090 28620018 */ slti $v0, $v1, 0x18
/* BA794 80124094 08049035 */ j .L801240D4
/* BA798 80124098 24040009 */ addiu $a0, $zero, 0x9
.L8012409C:
/* BA79C 8012409C 14400003 */ bnez $v0, .L801240AC
/* BA7A0 801240A0 28620010 */ slti $v0, $v1, 0x10
/* BA7A4 801240A4 08049035 */ j .L801240D4
/* BA7A8 801240A8 24040007 */ addiu $a0, $zero, 0x7
.L801240AC:
/* BA7AC 801240AC 14400003 */ bnez $v0, .L801240BC
/* BA7B0 801240B0 28620008 */ slti $v0, $v1, 0x8
/* BA7B4 801240B4 08049035 */ j .L801240D4
/* BA7B8 801240B8 24040005 */ addiu $a0, $zero, 0x5
.L801240BC:
/* BA7BC 801240BC 14400003 */ bnez $v0, .L801240CC
/* BA7C0 801240C0 28620005 */ slti $v0, $v1, 0x5
.L801240C4:
/* BA7C4 801240C4 08049035 */ j .L801240D4
/* BA7C8 801240C8 24040004 */ addiu $a0, $zero, 0x4
.L801240CC:
/* BA7CC 801240CC 50400001 */ beql $v0, $zero, .L801240D4
/* BA7D0 801240D0 24040003 */ addiu $a0, $zero, 0x3
.L801240D4:
/* BA7D4 801240D4 92020487 */ lbu $v0, 0x487($s0)
/* BA7D8 801240D8 8E030460 */ lw $v1, 0x460($s0)
/* BA7DC 801240DC A60404CA */ sh $a0, 0x4CA($s0)
/* BA7E0 801240E0 00021040 */ sll $v0, $v0, 1
/* BA7E4 801240E4 02021021 */ addu $v0, $s0, $v0
/* BA7E8 801240E8 94420488 */ lhu $v0, 0x488($v0)
/* BA7EC 801240EC 0043102A */ slt $v0, $v0, $v1
/* BA7F0 801240F0 5040000E */ beql $v0, $zero, .L8012412C
/* BA7F4 801240F4 00831821 */ addu $v1, $a0, $v1
/* BA7F8 801240F8 92020487 */ lbu $v0, 0x487($s0)
/* BA7FC 801240FC 00641823 */ subu $v1, $v1, $a0
/* BA800 80124100 AE030460 */ sw $v1, 0x460($s0)
/* BA804 80124104 00021040 */ sll $v0, $v0, 1
/* BA808 80124108 02021021 */ addu $v0, $s0, $v0
/* BA80C 8012410C 94420488 */ lhu $v0, 0x488($v0)
/* BA810 80124110 0043182A */ slt $v1, $v0, $v1
/* BA814 80124114 14600017 */ bnez $v1, .L80124174
/* BA818 80124118 00000000 */ nop
/* BA81C 8012411C AE020460 */ sw $v0, 0x460($s0)
/* BA820 80124120 2402000C */ addiu $v0, $zero, 0xC
/* BA824 80124124 0804905D */ j .L80124174
/* BA828 80124128 A20204F8 */ sb $v0, 0x4F8($s0)
.L8012412C:
/* BA82C 8012412C 92020487 */ lbu $v0, 0x487($s0)
/* BA830 80124130 AE030460 */ sw $v1, 0x460($s0)
/* BA834 80124134 00021040 */ sll $v0, $v0, 1
/* BA838 80124138 02021021 */ addu $v0, $s0, $v0
/* BA83C 8012413C 94420488 */ lhu $v0, 0x488($v0)
/* BA840 80124140 0062182A */ slt $v1, $v1, $v0
/* BA844 80124144 1460000B */ bnez $v1, .L80124174
/* BA848 80124148 00000000 */ nop
/* BA84C 8012414C 92040487 */ lbu $a0, 0x487($s0)
/* BA850 80124150 92030486 */ lbu $v1, 0x486($s0)
/* BA854 80124154 AE020460 */ sw $v0, 0x460($s0)
/* BA858 80124158 2402000C */ addiu $v0, $zero, 0xC
/* BA85C 8012415C 14830005 */ bne $a0, $v1, .L80124174
/* BA860 80124160 A20204F8 */ sb $v0, 0x4F8($s0)
/* BA864 80124164 24020005 */ addiu $v0, $zero, 0x5
/* BA868 80124168 A20204F8 */ sb $v0, 0x4F8($s0)
/* BA86C 8012416C A200047C */ sb $zero, 0x47C($s0)
/* BA870 80124170 A600047E */ sh $zero, 0x47E($s0)
glabel .L80124174
/* BA874 80124174 8E0204FC */ lw $v0, 0x4FC($s0)
/* BA878 80124178 30420001 */ andi $v0, $v0, 0x1
/* BA87C 8012417C 1040001B */ beqz $v0, .L801241EC
/* BA880 80124180 00000000 */ nop
/* BA884 80124184 8E040544 */ lw $a0, 0x544($s0)
/* BA888 80124188 A20004F8 */ sb $zero, 0x4F8($s0)
/* BA88C 8012418C 10800003 */ beqz $a0, .L8012419C
/* BA890 80124190 AE0004FC */ sw $zero, 0x4FC($s0)
/* BA894 80124194 0C00AB1E */ jal general_heap_free
/* BA898 80124198 00000000 */ nop
.L8012419C:
/* BA89C 8012419C 8E040548 */ lw $a0, 0x548($s0)
/* BA8A0 801241A0 10800003 */ beqz $a0, .L801241B0
/* BA8A4 801241A4 00000000 */ nop
/* BA8A8 801241A8 0C00AB1E */ jal general_heap_free
/* BA8AC 801241AC 00000000 */ nop
.L801241B0:
/* BA8B0 801241B0 8E04054C */ lw $a0, 0x54C($s0)
/* BA8B4 801241B4 10800003 */ beqz $a0, .L801241C4
/* BA8B8 801241B8 00000000 */ nop
/* BA8BC 801241BC 0C00AB1E */ jal general_heap_free
/* BA8C0 801241C0 00000000 */ nop
.L801241C4:
/* BA8C4 801241C4 8E040550 */ lw $a0, 0x550($s0)
/* BA8C8 801241C8 10800003 */ beqz $a0, .L801241D8
/* BA8CC 801241CC 00000000 */ nop
/* BA8D0 801241D0 0C00AB1E */ jal general_heap_free
/* BA8D4 801241D4 00000000 */ nop
.L801241D8:
/* BA8D8 801241D8 8E030504 */ lw $v1, 0x504($s0)
/* BA8DC 801241DC 10600003 */ beqz $v1, .L801241EC
/* BA8E0 801241E0 24020001 */ addiu $v0, $zero, 0x1
/* BA8E4 801241E4 AC620000 */ sw $v0, 0x0($v1)
/* BA8E8 801241E8 AE000504 */ sw $zero, 0x504($s0)
.L801241EC:
/* BA8EC 801241EC 920204F8 */ lbu $v0, 0x4F8($s0)
/* BA8F0 801241F0 8FBF0018 */ lw $ra, 0x18($sp)
/* BA8F4 801241F4 8FB10014 */ lw $s1, 0x14($sp)
/* BA8F8 801241F8 8FB00010 */ lw $s0, 0x10($sp)
/* BA8FC 801241FC 03E00008 */ jr $ra
/* BA900 80124200 27BD0020 */ addiu $sp, $sp, 0x20
### DECOMPILED C INSTRUCTIONS:
s32 _update_message(MessagePrintState* printer) {
f32 speechPan;
u8 cond;
s32 buttons;
s16 endPosDist;
s16 lineIncAmt;
s32 charsToPrint;
s32 i;
printer->effectFrameCounter++;
if (printer->effectFrameCounter >= 3600) {
printer->effectFrameCounter = 0;
}
speechPan = (((f32)printer->initOpenPos.x - (SCREEN_WIDTH / 2.0)) / 3.8) + 64.0;
if (speechPan < 5.0) {
speechPan = 5.0f;
} else if (speechPan > 122.0) {
speechPan = 122.0f;
}
printer->speechPan = speechPan;
cond = FALSE;
if (!(printer->stateFlags & MSG_STATE_FLAG_40)) {
if (!(printer->stateFlags & (MSG_STATE_FLAG_20 | MSG_STATE_FLAG_10))) {
s32 buttons = BUTTON_A;
switch (printer->windowState) {
case MSG_WINDOW_STATE_WAITING:
if (printer->stateFlags & MSG_STATE_FLAG_80000) {
buttons = BUTTON_A | BUTTON_C_DOWN;
}
if ((buttons & gGameStatusPtr->pressedButtons[0]) || (gGameStatusPtr->currentButtons[0] & BUTTON_B)) {
printer->windowState = MSG_WINDOW_STATE_PRINTING;
printer->currentPrintDelay = 0;
printer->stateFlags |= MSG_STATE_FLAG_4;
if (gGameStatusPtr->pressedButtons[0] & (BUTTON_A | BUTTON_C_DOWN)) {
cond = TRUE;
sfx_play_sound_with_params(SOUND_MENU_NEXT, 0, 0, 0);
} else if (printer->srcBuffer[printer->srcBufferPos] != MSG_CHAR_READ_END) {
printer->stateFlags |= MSG_STATE_FLAG_PRINT_QUICKLY | MSG_STATE_FLAG_4;
if (printer->fontVariant != 0 || printer->srcBuffer[printer->srcBufferPos] != MSG_CHAR_UNK_C3) {
printer->stateFlags |= MSG_STATE_FLAG_PRINT_QUICKLY | MSG_STATE_FLAG_80 | MSG_STATE_FLAG_4;
}
sfx_play_sound_with_params(SOUND_CC, 0, 0, 0);
} else if (printer->style == MSG_STYLE_RIGHT ||
printer->style == MSG_STYLE_LEFT ||
printer->style == MSG_STYLE_CENTER ||
printer->style == MSG_STYLE_TATTLE)
{
sfx_play_sound_with_params(SOUND_MENU_NEXT, 0, 0, 0);
}
} else if ((gGameStatusPtr->pressedButtons[0] & BUTTON_Z) &&
!(printer->stateFlags & MSG_STATE_FLAG_40000) &&
(printer->currentLine != 0))
{
printer->windowState = MSG_WINDOW_STATE_B;
printer->unk_4CC = 0;
printer->unkArraySize = printer->currentLine - 1;
printer->unk_4C8 = abs(printer->curLinePos - printer->lineEndPos[printer->unkArraySize]);
sfx_play_sound_with_params(SOUND_CD, 0, 0, 0);
}
break;
case MSG_WINDOW_STATE_C:
if (gGameStatusPtr->pressedButtons[0] & BUTTON_B) {
printer->windowState = MSG_WINDOW_STATE_B;
printer->unk_4CC = 0;
printer->unkArraySize = printer->currentLine;
printer->unk_4C8 = abs(printer->curLinePos - printer->lineEndPos[printer->unkArraySize]);
sfx_play_sound_with_params(SOUND_CC, 0, 0, 0);
} else if (gGameStatusPtr->pressedButtons[0] & BUTTON_Z) {
if (printer->unkArraySize > 0) {
printer->windowState = MSG_WINDOW_STATE_B;
printer->unk_4CC = 0;
printer->unkArraySize--;
printer->unk_4C8 = abs(printer->curLinePos - printer->lineEndPos[printer->unkArraySize]);
sfx_play_sound_with_params(SOUND_CD, 0, 0, 0);
}
} else {
if (gGameStatusPtr->pressedButtons[0] & BUTTON_A) {
printer->windowState = MSG_WINDOW_STATE_B;
printer->unk_4CC = 0;
printer->unkArraySize++;
printer->unk_4C8 = abs(printer->curLinePos - printer->lineEndPos[printer->unkArraySize]);
sfx_play_sound_with_params(SOUND_CE, 0, 0, 0);
}
}
break;
case MSG_WINDOW_STATE_WAITING_FOR_CHOICE:
if (gGameStatusPtr->pressedButtons[0] & BUTTON_A) {
printer->madeChoice = 1;
printer->windowState = MSG_WINDOW_STATE_PRINTING;
printer->scrollingTime = 0;
printer->stateFlags |= MSG_STATE_FLAG_20000;
sfx_play_sound_with_params(SOUND_MENU_NEXT, 0, 0, 0);
} else if (printer->cancelOption != 0xFF && (gGameStatusPtr->pressedButtons[0] & BUTTON_B)) {
if (printer->cancelOption >= printer->maxOption) {
printer->selectedOption = printer->currentOption;
} else {
printer->selectedOption = printer->cancelOption;
}
printer->madeChoice = 1;
printer->windowState = MSG_WINDOW_STATE_PRINTING;
printer->scrollingTime = 0;
printer->currentOption = printer->cancelOption;
printer->stateFlags |= MSG_STATE_FLAG_20000;
sfx_play_sound_with_params(SOUND_MENU_BACK, 0, 0, 0);
} else if (gGameStatusPtr->heldButtons[0] & BUTTON_STICK_DOWN) {
if (printer->currentOption != printer->maxOption - 1) {
printer->targetOption = printer->currentOption + 1;
printer->windowState = MSG_WINDOW_STATE_SCROLLING_BACK;
printer->scrollingTime = 1;
sfx_play_sound_with_params(SOUND_MENU_CHANGE_SELECTION, 0, 0, 0);
}
} else if (gGameStatusPtr->heldButtons[0] & BUTTON_STICK_UP) {
if (printer->currentOption != 0) {
printer->targetOption = printer->currentOption - 1;
printer->windowState = MSG_WINDOW_STATE_SCROLLING_BACK;
printer->scrollingTime = 1;
sfx_play_sound_with_params(SOUND_MENU_CHANGE_SELECTION, 0, 0, 0);
}
}
if (printer->windowState != MSG_WINDOW_STATE_SCROLLING_BACK) {
break;
}
case MSG_WINDOW_STATE_SCROLLING_BACK:
printer->scrollingTime++;
if (printer->scrollingTime >= 5) {
printer->windowState = MSG_WINDOW_STATE_WAITING_FOR_CHOICE;
printer->currentOption = printer->targetOption;
printer->selectedOption = printer->currentOption;
}
break;
}
} else if (!(printer->stateFlags & MSG_STATE_FLAG_20) &&
printer->windowState == MSG_WINDOW_STATE_WAITING &&
(gGameStatusPtr->pressedButtons[0] & BUTTON_A))
{
printer->windowState = MSG_WINDOW_STATE_PRINTING;
printer->currentPrintDelay = 0;
printer->stateFlags |= MSG_STATE_FLAG_4;
}
if (printer->stateFlags & MSG_STATE_FLAG_4 && !(gGameStatusPtr->currentButtons[0] & BUTTON_A)) {
printer->stateFlags &= ~MSG_STATE_FLAG_4;
}
for (i = 0; i < ARRAY_COUNT(printer->animTimers); i++) {
if (printer->animTimers[i] > 0) {
printer->animTimers[i]--;
}
}
switch (printer->windowState) {
case MSG_WINDOW_STATE_PRINTING:
if ((gGameStatusPtr->pressedButtons[0] & BUTTON_A) | (gGameStatusPtr->currentButtons[0] & BUTTON_B)) {
if (!(printer->stateFlags & (MSG_STATE_FLAG_20 | MSG_STATE_FLAG_10)) && !cond) {
printer->stateFlags |= MSG_STATE_FLAG_PRINT_QUICKLY;
}
}
// fallthrough
case MSG_WINDOW_STATE_INIT:
charsToPrint = printer->charsPerChunk;
if (printer->windowState == MSG_WINDOW_STATE_INIT) {
printer->windowState = MSG_WINDOW_STATE_PRINTING;
printer->currentPrintDelay = 0;
} else if (printer->stateFlags & MSG_STATE_FLAG_PRINT_QUICKLY) {
charsToPrint = 12;
printer->currentPrintDelay = 0;
} else if (!(printer->stateFlags & MSG_STATE_FLAG_4)) {
if (!(printer->stateFlags & (MSG_STATE_FLAG_20 | MSG_STATE_FLAG_10)) &&
(gGameStatusPtr->currentButtons[0] & BUTTON_A))
{
charsToPrint = 6;
printer->currentPrintDelay = 0;
}
}
if ((printer->currentPrintDelay == 0) || --printer->currentPrintDelay == 0) {
msg_copy_to_print_buffer(printer, charsToPrint, 0);
}
break;
case MSG_WINDOW_STATE_SCROLLING:
if (gGameStatusPtr->pressedButtons[0] & (BUTTON_A | BUTTON_B)) {
if (!(printer->stateFlags & (MSG_STATE_FLAG_20 | MSG_STATE_FLAG_10))) {
printer->stateFlags |= MSG_STATE_FLAG_PRINT_QUICKLY;
}
}
printer->curLinePos += printer->unk_464;
if ((printer->stateFlags & MSG_STATE_FLAG_PRINT_QUICKLY) ||
(!(printer->stateFlags & (MSG_STATE_FLAG_10 | MSG_STATE_FLAG_4)) &&
(gGameStatusPtr->currentButtons[0] & BUTTON_A)))
{
printer->curLinePos += 6;
}
if (printer->curLinePos >= printer->nextLinePos) {
printer->windowState = MSG_WINDOW_STATE_PRINTING;
printer->curLinePos = printer->nextLinePos;
printer->stateFlags |= MSG_STATE_FLAG_4;
if (printer->style == MSG_STYLE_SIGN ||
printer->style == MSG_STYLE_LAMPPOST ||
printer->srcBuffer[printer->srcBufferPos] == MSG_CHAR_READ_WAIT)
{
printer->currentPrintDelay = 0;
} else {
printer->currentPrintDelay = 5;
}
printer->lineEndPos[printer->currentLine] = printer->curLinePos;
}
break;
case MSG_WINDOW_STATE_B:
printer->unk_4CC += 1;
endPosDist = abs(printer->curLinePos - printer->lineEndPos[printer->unkArraySize]);
lineIncAmt = 2;
if (printer->unk_4C8 <= 16) {
if (endPosDist >= 15) {
lineIncAmt = 4;
} else if (endPosDist >= 9) {
lineIncAmt = 3;
}
} else if (endPosDist > 96) {
lineIncAmt = 10;
} else if (endPosDist > 48) {
lineIncAmt = 9;
} else if (endPosDist >= 24) {
lineIncAmt = 7;
} else if (endPosDist >= 16) {
lineIncAmt = 5;
} else if (endPosDist >= 8) {
lineIncAmt = 4;
} else if (endPosDist > 4) {
lineIncAmt = 3;
}
printer->unk_4CA = lineIncAmt;
if (printer->lineEndPos[printer->unkArraySize] < printer->curLinePos) {
printer->curLinePos -= printer->unk_4CA;
if (printer->lineEndPos[printer->unkArraySize] >= printer->curLinePos) {
printer->curLinePos = printer->lineEndPos[printer->unkArraySize];
printer->windowState = MSG_WINDOW_STATE_C;
}
} else {
printer->curLinePos += printer->unk_4CA;
if (printer->curLinePos >= printer->lineEndPos[printer->unkArraySize]) {
printer->curLinePos = printer->lineEndPos[printer->unkArraySize];
printer->windowState = MSG_WINDOW_STATE_C;
if (printer->unkArraySize == printer->currentLine) {
printer->windowState = MSG_WINDOW_STATE_WAITING;
printer->rewindArrowAnimState = REWIND_ARROW_STATE_INIT;
printer->rewindArrowCounter = 0;
}
}
}
break;
case MSG_WINDOW_STATE_OPENING:
case MSG_WINDOW_STATE_CLOSING:
case MSG_WINDOW_STATE_WAITING:
case MSG_WINDOW_STATE_WAITING_FOR_CHOICE:
case MSG_WINDOW_STATE_SCROLLING_BACK:
case MSG_WINDOW_STATE_VIEWING_PREV:
case MSG_WINDOW_STATE_A:
case MSG_WINDOW_STATE_C:
case MSG_WINDOW_STATE_D:
case MSG_WINDOW_STATE_E:
break;
}
}
if (printer->stateFlags & MSG_STATE_FLAG_1) {
printer->windowState = MSG_WINDOW_STATE_DONE;
printer->stateFlags = 0;
if (printer->letterBackgroundImg != NULL) {
general_heap_free(printer->letterBackgroundImg);
}
if (printer->letterBackgroundPal != NULL) {
general_heap_free(printer->letterBackgroundPal);
}
if (printer->letterContentImg != NULL) {
general_heap_free(printer->letterContentImg);
}
if (printer->letterContentPal != NULL) {
general_heap_free(printer->letterContentPal);
}
if (printer->closedWritebackBool != NULL) {
*printer->closedWritebackBool = TRUE;
printer->closedWritebackBool = NULL;
}
}
return printer->windowState;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel spawn_drops
/* 23680 80048280 27BDFF68 */ addiu $sp, $sp, -0x98
/* 23684 80048284 AFA40098 */ sw $a0, 0x98($sp)
/* 23688 80048288 8FA80098 */ lw $t0, 0x98($sp)
/* 2368C 8004828C AFBF0064 */ sw $ra, 0x64($sp)
/* 23690 80048290 AFBE0060 */ sw $fp, 0x60($sp)
/* 23694 80048294 AFB7005C */ sw $s7, 0x5C($sp)
/* 23698 80048298 AFB60058 */ sw $s6, 0x58($sp)
/* 2369C 8004829C AFB50054 */ sw $s5, 0x54($sp)
/* 236A0 800482A0 AFB40050 */ sw $s4, 0x50($sp)
/* 236A4 800482A4 AFB3004C */ sw $s3, 0x4C($sp)
/* 236A8 800482A8 AFB20048 */ sw $s2, 0x48($sp)
/* 236AC 800482AC AFB10044 */ sw $s1, 0x44($sp)
/* 236B0 800482B0 AFB00040 */ sw $s0, 0x40($sp)
/* 236B4 800482B4 F7BE0090 */ sdc1 $f30, 0x90($sp)
/* 236B8 800482B8 F7BC0088 */ sdc1 $f28, 0x88($sp)
/* 236BC 800482BC F7BA0080 */ sdc1 $f26, 0x80($sp)
/* 236C0 800482C0 F7B80078 */ sdc1 $f24, 0x78($sp)
/* 236C4 800482C4 F7B60070 */ sdc1 $f22, 0x70($sp)
/* 236C8 800482C8 F7B40068 */ sdc1 $f20, 0x68($sp)
/* 236CC 800482CC AFA0002C */ sw $zero, 0x2C($sp)
/* 236D0 800482D0 84840008 */ lh $a0, 0x8($a0)
/* 236D4 800482D4 8D0800D4 */ lw $t0, 0xD4($t0)
/* 236D8 800482D8 0000902D */ daddu $s2, $zero, $zero
/* 236DC 800482DC 0C00EABB */ jal get_npc_unsafe
/* 236E0 800482E0 AFA80020 */ sw $t0, 0x20($sp)
/* 236E4 800482E4 0040802D */ daddu $s0, $v0, $zero
/* 236E8 800482E8 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 236EC 800482EC 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 236F0 800482F0 3C04800B */ lui $a0, %hi(gCameras)
/* 236F4 800482F4 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* 236F8 800482F8 00031080 */ sll $v0, $v1, 2
/* 236FC 800482FC 00431021 */ addu $v0, $v0, $v1
/* 23700 80048300 00021080 */ sll $v0, $v0, 2
/* 23704 80048304 00431023 */ subu $v0, $v0, $v1
/* 23708 80048308 000218C0 */ sll $v1, $v0, 3
/* 2370C 8004830C 00431021 */ addu $v0, $v0, $v1
/* 23710 80048310 000210C0 */ sll $v0, $v0, 3
/* 23714 80048314 00448821 */ addu $s1, $v0, $a0
.L80048318:
/* 23718 80048318 0C044181 */ jal get_shadow_by_index
/* 2371C 8004831C 0240202D */ daddu $a0, $s2, $zero
/* 23720 80048320 14400004 */ bnez $v0, .L80048334
/* 23724 80048324 26520001 */ addiu $s2, $s2, 0x1
/* 23728 80048328 8FA8002C */ lw $t0, 0x2C($sp)
/* 2372C 8004832C 25080001 */ addiu $t0, $t0, 0x1
/* 23730 80048330 AFA8002C */ sw $t0, 0x2C($sp)
.L80048334:
/* 23734 80048334 2A42003C */ slti $v0, $s2, 0x3C
/* 23738 80048338 1440FFF7 */ bnez $v0, .L80048318
/* 2373C 8004833C 0000F02D */ daddu $fp, $zero, $zero
/* 23740 80048340 C620006C */ lwc1 $f0, 0x6C($s1)
/* 23744 80048344 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 23748 80048348 44816000 */ mtc1 $at, $f12
/* 2374C 8004834C 3C038015 */ lui $v1, %hi(gLastRenderTaskCount)
/* 23750 80048350 8C63B7F0 */ lw $v1, %lo(gLastRenderTaskCount)($v1)
/* 23754 80048354 240200F6 */ addiu $v0, $zero, 0xF6
/* 23758 80048358 AFA00024 */ sw $zero, 0x24($sp)
/* 2375C 8004835C 460C0300 */ add.s $f12, $f0, $f12
/* 23760 80048360 00431023 */ subu $v0, $v0, $v1
/* 23764 80048364 0C00A6C9 */ jal clamp_angle
/* 23768 80048368 AFA20028 */ sw $v0, 0x28($sp)
/* 2376C 8004836C 4600010D */ trunc.w.s $f4, $f0
/* 23770 80048370 44162000 */ mfc1 $s6, $f4
/* 23774 80048374 960200A8 */ lhu $v0, 0xA8($s0)
/* 23778 80048378 8FA80020 */ lw $t0, 0x20($sp)
/* 2377C 8004837C C602003C */ lwc1 $f2, 0x3C($s0)
/* 23780 80048380 00021400 */ sll $v0, $v0, 16
/* 23784 80048384 00021C03 */ sra $v1, $v0, 16
/* 23788 80048388 000217C2 */ srl $v0, $v0, 31
/* 2378C 8004838C 00621821 */ addu $v1, $v1, $v0
/* 23790 80048390 00031843 */ sra $v1, $v1, 1
/* 23794 80048394 44830000 */ mtc1 $v1, $f0
/* 23798 80048398 00000000 */ nop
/* 2379C 8004839C 46800020 */ cvt.s.w $f0, $f0
/* 237A0 800483A0 46001080 */ add.s $f2, $f2, $f0
/* 237A4 800483A4 91110001 */ lbu $s1, 0x1($t0)
/* 237A8 800483A8 03C0B82D */ daddu $s7, $fp, $zero
/* 237AC 800483AC E7A20038 */ swc1 $f2, 0x38($sp)
/* 237B0 800483B0 C6040038 */ lwc1 $f4, 0x38($s0)
/* 237B4 800483B4 E7A40034 */ swc1 $f4, 0x34($sp)
/* 237B8 800483B8 C61E0040 */ lwc1 $f30, 0x40($s0)
/* 237BC 800483BC 0C00A67F */ jal rand_int
/* 237C0 800483C0 24040064 */ addiu $a0, $zero, 0x64
/* 237C4 800483C4 0051102A */ slt $v0, $v0, $s1
/* 237C8 800483C8 10400061 */ beqz $v0, .L80048550
/* 237CC 800483CC 03C0902D */ daddu $s2, $fp, $zero
/* 237D0 800483D0 03C0202D */ daddu $a0, $fp, $zero
/* 237D4 800483D4 24050002 */ addiu $a1, $zero, 0x2
/* 237D8 800483D8 8FA30020 */ lw $v1, 0x20($sp)
.L800483DC:
/* 237DC 800483DC 84620002 */ lh $v0, 0x2($v1)
/* 237E0 800483E0 10400009 */ beqz $v0, .L80048408
/* 237E4 800483E4 24630006 */ addiu $v1, $v1, 0x6
/* 237E8 800483E8 8FA80020 */ lw $t0, 0x20($sp)
/* 237EC 800483EC 26520001 */ addiu $s2, $s2, 0x1
/* 237F0 800483F0 01051021 */ addu $v0, $t0, $a1
/* 237F4 800483F4 84420002 */ lh $v0, 0x2($v0)
/* 237F8 800483F8 00822021 */ addu $a0, $a0, $v0
/* 237FC 800483FC 2A420008 */ slti $v0, $s2, 0x8
/* 23800 80048400 1440FFF6 */ bnez $v0, .L800483DC
/* 23804 80048404 24A50006 */ addiu $a1, $a1, 0x6
.L80048408:
/* 23808 80048408 0C00A67F */ jal rand_int
/* 2380C 8004840C 0000A82D */ daddu $s5, $zero, $zero
/* 23810 80048410 0040882D */ daddu $s1, $v0, $zero
/* 23814 80048414 02A0902D */ daddu $s2, $s5, $zero
/* 23818 80048418 24140004 */ addiu $s4, $zero, 0x4
/* 2381C 8004841C 8FB00020 */ lw $s0, 0x20($sp)
/* 23820 80048420 24130002 */ addiu $s3, $zero, 0x2
/* 23824 80048424 AFA00030 */ sw $zero, 0x30($sp)
.L80048428:
/* 23828 80048428 86020002 */ lh $v0, 0x2($s0)
/* 2382C 8004842C 10400017 */ beqz $v0, .L8004848C
/* 23830 80048430 00000000 */ nop
/* 23834 80048434 8FA80020 */ lw $t0, 0x20($sp)
/* 23838 80048438 01131021 */ addu $v0, $t0, $s3
/* 2383C 8004843C 01141821 */ addu $v1, $t0, $s4
/* 23840 80048440 84420002 */ lh $v0, 0x2($v0)
/* 23844 80048444 84640002 */ lh $a0, 0x2($v1)
/* 23848 80048448 18800005 */ blez $a0, .L80048460
/* 2384C 8004844C 02A2A821 */ addu $s5, $s5, $v0
/* 23850 80048450 0C05152F */ jal get_global_flag
/* 23854 80048454 24840714 */ addiu $a0, $a0, 0x714
/* 23858 80048458 54400007 */ bnel $v0, $zero, .L80048478
/* 2385C 8004845C 26940006 */ addiu $s4, $s4, 0x6
.L80048460:
/* 23860 80048460 02B1102A */ slt $v0, $s5, $s1
/* 23864 80048464 54400004 */ bnel $v0, $zero, .L80048478
/* 23868 80048468 26940006 */ addiu $s4, $s4, 0x6
/* 2386C 8004846C 86100002 */ lh $s0, 0x2($s0)
/* 23870 80048470 08012123 */ j .L8004848C
/* 23874 80048474 AFB00030 */ sw $s0, 0x30($sp)
.L80048478:
/* 23878 80048478 26730006 */ addiu $s3, $s3, 0x6
/* 2387C 8004847C 26520001 */ addiu $s2, $s2, 0x1
/* 23880 80048480 2A420008 */ slti $v0, $s2, 0x8
/* 23884 80048484 1440FFE8 */ bnez $v0, .L80048428
/* 23888 80048488 26100006 */ addiu $s0, $s0, 0x6
.L8004848C:
/* 2388C 8004848C 8FA80098 */ lw $t0, 0x98($sp)
/* 23890 80048490 8FA80030 */ lw $t0, 0x30($sp)
/* 23894 80048494 1100002E */ beqz $t0, .L80048550
/* 23898 80048498 24020004 */ addiu $v0, $zero, 0x4
/* 2389C 8004849C 0100202D */ daddu $a0, $t0, $zero
/* 238A0 800484A0 00171840 */ sll $v1, $s7, 1
/* 238A4 800484A4 00771821 */ addu $v1, $v1, $s7
/* 238A8 800484A8 AFA20010 */ sw $v0, 0x10($sp)
/* 238AC 800484AC 00431004 */ sllv $v0, $v1, $v0
/* 238B0 800484B0 00431023 */ subu $v0, $v0, $v1
/* 238B4 800484B4 000210C0 */ sll $v0, $v0, 3
/* 238B8 800484B8 8FA50034 */ lw $a1, 0x34($sp)
/* 238BC 800484BC 8FA60038 */ lw $a2, 0x38($sp)
/* 238C0 800484C0 4407F000 */ mfc1 $a3, $f30
/* 238C4 800484C4 8FA80024 */ lw $t0, 0x24($sp)
/* 238C8 800484C8 02C21021 */ addu $v0, $s6, $v0
/* 238CC 800484CC AFA20018 */ sw $v0, 0x18($sp)
/* 238D0 800484D0 AFA0001C */ sw $zero, 0x1C($sp)
/* 238D4 800484D4 0C04C4FD */ jal make_item_entity
/* 238D8 800484D8 AFA80014 */ sw $t0, 0x14($sp)
/* 238DC 800484DC 44960000 */ mtc1 $s6, $f0
/* 238E0 800484E0 00000000 */ nop
/* 238E4 800484E4 46800021 */ cvt.d.w $f0, $f0
/* 238E8 800484E8 27DE0001 */ addiu $fp, $fp, 0x1
/* 238EC 800484EC 2BC2000C */ slti $v0, $fp, 0xC
/* 238F0 800484F0 3C01403E */ lui $at, (0x403E0000 >> 16)
/* 238F4 800484F4 44811800 */ mtc1 $at, $f3
/* 238F8 800484F8 44801000 */ mtc1 $zero, $f2
/* 238FC 800484FC 8FA80024 */ lw $t0, 0x24($sp)
/* 23900 80048500 46220000 */ add.d $f0, $f0, $f2
/* 23904 80048504 25080002 */ addiu $t0, $t0, 0x2
/* 23908 80048508 AFA80024 */ sw $t0, 0x24($sp)
/* 2390C 8004850C 4620010D */ trunc.w.d $f4, $f0
/* 23910 80048510 44162000 */ mfc1 $s6, $f4
/* 23914 80048514 14400004 */ bnez $v0, .L80048528
/* 23918 80048518 00121040 */ sll $v0, $s2, 1
/* 2391C 8004851C 26F70001 */ addiu $s7, $s7, 0x1
/* 23920 80048520 0017B0C0 */ sll $s6, $s7, 3
/* 23924 80048524 0000F02D */ daddu $fp, $zero, $zero
.L80048528:
/* 23928 80048528 00521021 */ addu $v0, $v0, $s2
/* 2392C 8004852C 24420002 */ addiu $v0, $v0, 0x2
/* 23930 80048530 8FA80020 */ lw $t0, 0x20($sp)
/* 23934 80048534 00021040 */ sll $v0, $v0, 1
/* 23938 80048538 01021021 */ addu $v0, $t0, $v0
/* 2393C 8004853C 84440002 */ lh $a0, 0x2($v0)
/* 23940 80048540 04800003 */ bltz $a0, .L80048550
/* 23944 80048544 00000000 */ nop
/* 23948 80048548 0C051514 */ jal set_global_flag
/* 2394C 8004854C 24840715 */ addiu $a0, $a0, 0x715
.L80048550:
/* 23950 80048550 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x13)
/* 23954 80048554 80420F23 */ lb $v0, %lo(gCurrentEncounter + 0x13)($v0)
/* 23958 80048558 10400026 */ beqz $v0, .L800485F4
/* 2395C 8004855C 24040093 */ addiu $a0, $zero, 0x93
/* 23960 80048560 24020004 */ addiu $v0, $zero, 0x4
/* 23964 80048564 00171840 */ sll $v1, $s7, 1
/* 23968 80048568 00771821 */ addu $v1, $v1, $s7
/* 2396C 8004856C AFA20010 */ sw $v0, 0x10($sp)
/* 23970 80048570 00431004 */ sllv $v0, $v1, $v0
/* 23974 80048574 00431023 */ subu $v0, $v0, $v1
/* 23978 80048578 000210C0 */ sll $v0, $v0, 3
/* 2397C 8004857C 8FA50034 */ lw $a1, 0x34($sp)
/* 23980 80048580 8FA60038 */ lw $a2, 0x38($sp)
/* 23984 80048584 4407F000 */ mfc1 $a3, $f30
/* 23988 80048588 8FA80024 */ lw $t0, 0x24($sp)
/* 2398C 8004858C 02C21021 */ addu $v0, $s6, $v0
/* 23990 80048590 3C01800B */ lui $at, %hi(gCurrentEncounter + 0x13)
/* 23994 80048594 A0200F23 */ sb $zero, %lo(gCurrentEncounter + 0x13)($at)
/* 23998 80048598 AFA20018 */ sw $v0, 0x18($sp)
/* 2399C 8004859C AFA0001C */ sw $zero, 0x1C($sp)
/* 239A0 800485A0 0C04C4FD */ jal make_item_entity
/* 239A4 800485A4 AFA80014 */ sw $t0, 0x14($sp)
/* 239A8 800485A8 44960000 */ mtc1 $s6, $f0
/* 239AC 800485AC 00000000 */ nop
/* 239B0 800485B0 46800021 */ cvt.d.w $f0, $f0
/* 239B4 800485B4 27DE0001 */ addiu $fp, $fp, 0x1
/* 239B8 800485B8 2BC2000C */ slti $v0, $fp, 0xC
/* 239BC 800485BC 3C01403E */ lui $at, (0x403E0000 >> 16)
/* 239C0 800485C0 44811800 */ mtc1 $at, $f3
/* 239C4 800485C4 44801000 */ mtc1 $zero, $f2
/* 239C8 800485C8 8FA80024 */ lw $t0, 0x24($sp)
/* 239CC 800485CC 46220000 */ add.d $f0, $f0, $f2
/* 239D0 800485D0 25080002 */ addiu $t0, $t0, 0x2
/* 239D4 800485D4 AFA80024 */ sw $t0, 0x24($sp)
/* 239D8 800485D8 4620010D */ trunc.w.d $f4, $f0
/* 239DC 800485DC 44162000 */ mfc1 $s6, $f4
/* 239E0 800485E0 14400005 */ bnez $v0, .L800485F8
/* 239E4 800485E4 0000882D */ daddu $s1, $zero, $zero
/* 239E8 800485E8 26F70001 */ addiu $s7, $s7, 0x1
/* 239EC 800485EC 0017B0C0 */ sll $s6, $s7, 3
/* 239F0 800485F0 0000F02D */ daddu $fp, $zero, $zero
.L800485F4:
/* 239F4 800485F4 0000882D */ daddu $s1, $zero, $zero
.L800485F8:
/* 239F8 800485F8 0220902D */ daddu $s2, $s1, $zero
/* 239FC 800485FC 24150006 */ addiu $s5, $zero, 0x6
/* 23A00 80048600 24140004 */ addiu $s4, $zero, 0x4
/* 23A04 80048604 8FB00020 */ lw $s0, 0x20($sp)
/* 23A08 80048608 3C0146FF */ lui $at, (0x46FFFE00 >> 16)
/* 23A0C 8004860C 3421FE00 */ ori $at, $at, (0x46FFFE00 & 0xFFFF)
/* 23A10 80048610 4481D000 */ mtc1 $at, $f26
/* 23A14 80048614 3C0142C8 */ lui $at, (0x42C80000 >> 16)
/* 23A18 80048618 4481E000 */ mtc1 $at, $f28
/* 23A1C 8004861C 3C028011 */ lui $v0, %hi(gPlayerData + 0x2)
/* 23A20 80048620 8042F292 */ lb $v0, %lo(gPlayerData + 0x2)($v0)
/* 23A24 80048624 3C038011 */ lui $v1, %hi(gPlayerData + 0x3)
/* 23A28 80048628 8063F293 */ lb $v1, %lo(gPlayerData + 0x3)($v1)
/* 23A2C 8004862C 24130002 */ addiu $s3, $zero, 0x2
/* 23A30 80048630 AFA00030 */ sw $zero, 0x30($sp)
/* 23A34 80048634 44821000 */ mtc1 $v0, $f2
/* 23A38 80048638 00000000 */ nop
/* 23A3C 8004863C 468010A0 */ cvt.s.w $f2, $f2
/* 23A40 80048640 44830000 */ mtc1 $v1, $f0
/* 23A44 80048644 00000000 */ nop
/* 23A48 80048648 46800020 */ cvt.s.w $f0, $f0
/* 23A4C 8004864C 46001603 */ div.s $f24, $f2, $f0
.L80048650:
/* 23A50 80048650 8FA80020 */ lw $t0, 0x20($sp)
/* 23A54 80048654 86030032 */ lh $v1, 0x32($s0)
/* 23A58 80048658 01131021 */ addu $v0, $t0, $s3
/* 23A5C 8004865C 4483B000 */ mtc1 $v1, $f22
/* 23A60 80048660 00000000 */ nop
/* 23A64 80048664 4680B5A0 */ cvt.s.w $f22, $f22
/* 23A68 80048668 461AB583 */ div.s $f22, $f22, $f26
/* 23A6C 8004866C 84420032 */ lh $v0, 0x32($v0)
/* 23A70 80048670 4616C03E */ c.le.s $f24, $f22
/* 23A74 80048674 4482A000 */ mtc1 $v0, $f20
/* 23A78 80048678 00000000 */ nop
/* 23A7C 8004867C 4680A520 */ cvt.s.w $f20, $f20
/* 23A80 80048680 45000034 */ bc1f .L80048754
/* 23A84 80048684 461AA503 */ div.s $f20, $f20, $f26
/* 23A88 80048688 0C00A67F */ jal rand_int
/* 23A8C 8004868C 24040064 */ addiu $a0, $zero, 0x64
/* 23A90 80048690 461CA082 */ mul.s $f2, $f20, $f28
/* 23A94 80048694 00000000 */ nop
/* 23A98 80048698 44820000 */ mtc1 $v0, $f0
/* 23A9C 8004869C 00000000 */ nop
/* 23AA0 800486A0 46800020 */ cvt.s.w $f0, $f0
/* 23AA4 800486A4 4602003E */ c.le.s $f0, $f2
/* 23AA8 800486A8 00000000 */ nop
/* 23AAC 800486AC 4502002A */ bc1fl .L80048758
/* 23AB0 800486B0 26B50008 */ addiu $s5, $s5, 0x8
/* 23AB4 800486B4 0000802D */ daddu $s0, $zero, $zero
/* 23AB8 800486B8 8FA80020 */ lw $t0, 0x20($sp)
/* 23ABC 800486BC 44900000 */ mtc1 $s0, $f0
/* 23AC0 800486C0 00000000 */ nop
/* 23AC4 800486C4 46800020 */ cvt.s.w $f0, $f0
/* 23AC8 800486C8 01141021 */ addu $v0, $t0, $s4
/* 23ACC 800486CC 01151821 */ addu $v1, $t0, $s5
/* 23AD0 800486D0 84420032 */ lh $v0, 0x32($v0)
/* 23AD4 800486D4 84630032 */ lh $v1, 0x32($v1)
/* 23AD8 800486D8 4482B000 */ mtc1 $v0, $f22
/* 23ADC 800486DC 00000000 */ nop
/* 23AE0 800486E0 4680B5A0 */ cvt.s.w $f22, $f22
/* 23AE4 800486E4 4483A000 */ mtc1 $v1, $f20
/* 23AE8 800486E8 00000000 */ nop
/* 23AEC 800486EC 4680A520 */ cvt.s.w $f20, $f20
/* 23AF0 800486F0 4616003C */ c.lt.s $f0, $f22
/* 23AF4 800486F4 00000000 */ nop
/* 23AF8 800486F8 4500001D */ bc1f .L80048770
/* 23AFC 800486FC 461AA503 */ div.s $f20, $f20, $f26
.L80048700:
/* 23B00 80048700 0C00A67F */ jal rand_int
/* 23B04 80048704 24040064 */ addiu $a0, $zero, 0x64
/* 23B08 80048708 461CA082 */ mul.s $f2, $f20, $f28
/* 23B0C 8004870C 00000000 */ nop
/* 23B10 80048710 44820000 */ mtc1 $v0, $f0
/* 23B14 80048714 00000000 */ nop
/* 23B18 80048718 46800020 */ cvt.s.w $f0, $f0
/* 23B1C 8004871C 4602003E */ c.le.s $f0, $f2
/* 23B20 80048720 00000000 */ nop
/* 23B24 80048724 45030001 */ bc1tl .L8004872C
/* 23B28 80048728 26310001 */ addiu $s1, $s1, 0x1
.L8004872C:
/* 23B2C 8004872C 26100001 */ addiu $s0, $s0, 0x1
/* 23B30 80048730 44900000 */ mtc1 $s0, $f0
/* 23B34 80048734 00000000 */ nop
/* 23B38 80048738 46800020 */ cvt.s.w $f0, $f0
/* 23B3C 8004873C 4616003C */ c.lt.s $f0, $f22
/* 23B40 80048740 00000000 */ nop
/* 23B44 80048744 4500000A */ bc1f .L80048770
/* 23B48 80048748 00000000 */ nop
/* 23B4C 8004874C 080121C0 */ j .L80048700
/* 23B50 80048750 00000000 */ nop
.L80048754:
/* 23B54 80048754 26B50008 */ addiu $s5, $s5, 0x8
.L80048758:
/* 23B58 80048758 26940008 */ addiu $s4, $s4, 0x8
/* 23B5C 8004875C 26730008 */ addiu $s3, $s3, 0x8
/* 23B60 80048760 26520001 */ addiu $s2, $s2, 0x1
/* 23B64 80048764 2A420008 */ slti $v0, $s2, 0x8
/* 23B68 80048768 1440FFB9 */ bnez $v0, .L80048650
/* 23B6C 8004876C 26100008 */ addiu $s0, $s0, 0x8
.L80048770:
/* 23B70 80048770 0C03A752 */ jal is_ability_active
/* 23B74 80048774 2404002B */ addiu $a0, $zero, 0x2B
/* 23B78 80048778 10400005 */ beqz $v0, .L80048790
/* 23B7C 8004877C 00000000 */ nop
/* 23B80 80048780 0C00A67F */ jal rand_int
/* 23B84 80048784 24040002 */ addiu $a0, $zero, 0x2
/* 23B88 80048788 26230001 */ addiu $v1, $s1, 0x1
/* 23B8C 8004878C 00628821 */ addu $s1, $v1, $v0
.L80048790:
/* 23B90 80048790 8FA80098 */ lw $t0, 0x98($sp)
/* 23B94 80048794 8D020000 */ lw $v0, 0x0($t0)
/* 23B98 80048798 3C030080 */ lui $v1, (0x800000 >> 16)
/* 23B9C 8004879C 00431024 */ and $v0, $v0, $v1
/* 23BA0 800487A0 54400001 */ bnel $v0, $zero, .L800487A8
/* 23BA4 800487A4 0000882D */ daddu $s1, $zero, $zero
.L800487A8:
/* 23BA8 800487A8 12200002 */ beqz $s1, .L800487B4
/* 23BAC 800487AC 24080156 */ addiu $t0, $zero, 0x156
/* 23BB0 800487B0 AFA80030 */ sw $t0, 0x30($sp)
.L800487B4:
/* 23BB4 800487B4 8FA80028 */ lw $t0, 0x28($sp)
/* 23BB8 800487B8 00111040 */ sll $v0, $s1, 1
/* 23BBC 800487BC 0102102A */ slt $v0, $t0, $v0
/* 23BC0 800487C0 10400004 */ beqz $v0, .L800487D4
/* 23BC4 800487C4 000817C2 */ srl $v0, $t0, 31
/* 23BC8 800487C8 01021021 */ addu $v0, $t0, $v0
/* 23BCC 800487CC 00028843 */ sra $s1, $v0, 1
/* 23BD0 800487D0 8FA80028 */ lw $t0, 0x28($sp)
.L800487D4:
/* 23BD4 800487D4 00111040 */ sll $v0, $s1, 1
/* 23BD8 800487D8 01024023 */ subu $t0, $t0, $v0
/* 23BDC 800487DC AFA80028 */ sw $t0, 0x28($sp)
/* 23BE0 800487E0 8FA8002C */ lw $t0, 0x2C($sp)
/* 23BE4 800487E4 0111102A */ slt $v0, $t0, $s1
/* 23BE8 800487E8 54400002 */ bnel $v0, $zero, .L800487F4
/* 23BEC 800487EC 0100882D */ daddu $s1, $t0, $zero
/* 23BF0 800487F0 8FA8002C */ lw $t0, 0x2C($sp)
.L800487F4:
/* 23BF4 800487F4 0000902D */ daddu $s2, $zero, $zero
/* 23BF8 800487F8 01114023 */ subu $t0, $t0, $s1
/* 23BFC 800487FC 1A200029 */ blez $s1, .L800488A4
/* 23C00 80048800 AFA8002C */ sw $t0, 0x2C($sp)
/* 23C04 80048804 24130004 */ addiu $s3, $zero, 0x4
/* 23C08 80048808 3C01403E */ lui $at, (0x403E0000 >> 16)
/* 23C0C 8004880C 4481A800 */ mtc1 $at, $f21
/* 23C10 80048810 4480A000 */ mtc1 $zero, $f20
/* 23C14 80048814 00171840 */ sll $v1, $s7, 1
/* 23C18 80048818 00771821 */ addu $v1, $v1, $s7
/* 23C1C 8004881C 02631004 */ sllv $v0, $v1, $s3
/* 23C20 80048820 00431023 */ subu $v0, $v0, $v1
/* 23C24 80048824 000280C0 */ sll $s0, $v0, 3
.L80048828:
/* 23C28 80048828 8FA50034 */ lw $a1, 0x34($sp)
/* 23C2C 8004882C 8FA60038 */ lw $a2, 0x38($sp)
/* 23C30 80048830 4407F000 */ mfc1 $a3, $f30
/* 23C34 80048834 8FA40030 */ lw $a0, 0x30($sp)
/* 23C38 80048838 8FA80024 */ lw $t0, 0x24($sp)
/* 23C3C 8004883C 02D01021 */ addu $v0, $s6, $s0
/* 23C40 80048840 AFB30010 */ sw $s3, 0x10($sp)
/* 23C44 80048844 AFA20018 */ sw $v0, 0x18($sp)
/* 23C48 80048848 AFA0001C */ sw $zero, 0x1C($sp)
/* 23C4C 8004884C 0C04C4FD */ jal make_item_entity
/* 23C50 80048850 AFA80014 */ sw $t0, 0x14($sp)
/* 23C54 80048854 44960000 */ mtc1 $s6, $f0
/* 23C58 80048858 00000000 */ nop
/* 23C5C 8004885C 46800021 */ cvt.d.w $f0, $f0
/* 23C60 80048860 27DE0001 */ addiu $fp, $fp, 0x1
/* 23C64 80048864 2BC2000C */ slti $v0, $fp, 0xC
/* 23C68 80048868 8FA80024 */ lw $t0, 0x24($sp)
/* 23C6C 8004886C 46340000 */ add.d $f0, $f0, $f20
/* 23C70 80048870 25080002 */ addiu $t0, $t0, 0x2
/* 23C74 80048874 AFA80024 */ sw $t0, 0x24($sp)
/* 23C78 80048878 4620010D */ trunc.w.d $f4, $f0
/* 23C7C 8004887C 44162000 */ mfc1 $s6, $f4
/* 23C80 80048880 14400005 */ bnez $v0, .L80048898
/* 23C84 80048884 26520001 */ addiu $s2, $s2, 0x1
/* 23C88 80048888 0000F02D */ daddu $fp, $zero, $zero
/* 23C8C 8004888C 26100168 */ addiu $s0, $s0, 0x168
/* 23C90 80048890 26F70001 */ addiu $s7, $s7, 0x1
/* 23C94 80048894 0017B0C0 */ sll $s6, $s7, 3
.L80048898:
/* 23C98 80048898 0251102A */ slt $v0, $s2, $s1
/* 23C9C 8004889C 1440FFE2 */ bnez $v0, .L80048828
/* 23CA0 800488A0 00000000 */ nop
.L800488A4:
/* 23CA4 800488A4 0000882D */ daddu $s1, $zero, $zero
/* 23CA8 800488A8 0220902D */ daddu $s2, $s1, $zero
/* 23CAC 800488AC 24150006 */ addiu $s5, $zero, 0x6
/* 23CB0 800488B0 24140004 */ addiu $s4, $zero, 0x4
/* 23CB4 800488B4 8FB00020 */ lw $s0, 0x20($sp)
/* 23CB8 800488B8 3C0146FF */ lui $at, (0x46FFFE00 >> 16)
/* 23CBC 800488BC 3421FE00 */ ori $at, $at, (0x46FFFE00 & 0xFFFF)
/* 23CC0 800488C0 4481D000 */ mtc1 $at, $f26
/* 23CC4 800488C4 3C0142C8 */ lui $at, (0x42C80000 >> 16)
/* 23CC8 800488C8 4481E000 */ mtc1 $at, $f28
/* 23CCC 800488CC 3C028011 */ lui $v0, %hi(gPlayerData + 0x5)
/* 23CD0 800488D0 8042F295 */ lb $v0, %lo(gPlayerData + 0x5)($v0)
/* 23CD4 800488D4 3C038011 */ lui $v1, %hi(gPlayerData + 0x6)
/* 23CD8 800488D8 8063F296 */ lb $v1, %lo(gPlayerData + 0x6)($v1)
/* 23CDC 800488DC 24130002 */ addiu $s3, $zero, 0x2
/* 23CE0 800488E0 AFA00030 */ sw $zero, 0x30($sp)
/* 23CE4 800488E4 44821000 */ mtc1 $v0, $f2
/* 23CE8 800488E8 00000000 */ nop
/* 23CEC 800488EC 468010A0 */ cvt.s.w $f2, $f2
/* 23CF0 800488F0 44830000 */ mtc1 $v1, $f0
/* 23CF4 800488F4 00000000 */ nop
/* 23CF8 800488F8 46800020 */ cvt.s.w $f0, $f0
/* 23CFC 800488FC 46001603 */ div.s $f24, $f2, $f0
.L80048900:
/* 23D00 80048900 8FA80020 */ lw $t0, 0x20($sp)
/* 23D04 80048904 86030072 */ lh $v1, 0x72($s0)
/* 23D08 80048908 01131021 */ addu $v0, $t0, $s3
/* 23D0C 8004890C 4483B000 */ mtc1 $v1, $f22
/* 23D10 80048910 00000000 */ nop
/* 23D14 80048914 4680B5A0 */ cvt.s.w $f22, $f22
/* 23D18 80048918 461AB583 */ div.s $f22, $f22, $f26
/* 23D1C 8004891C 84420072 */ lh $v0, 0x72($v0)
/* 23D20 80048920 4616C03E */ c.le.s $f24, $f22
/* 23D24 80048924 4482A000 */ mtc1 $v0, $f20
/* 23D28 80048928 00000000 */ nop
/* 23D2C 8004892C 4680A520 */ cvt.s.w $f20, $f20
/* 23D30 80048930 45000034 */ bc1f .L80048A04
/* 23D34 80048934 461AA503 */ div.s $f20, $f20, $f26
/* 23D38 80048938 0C00A67F */ jal rand_int
/* 23D3C 8004893C 24040064 */ addiu $a0, $zero, 0x64
/* 23D40 80048940 461CA082 */ mul.s $f2, $f20, $f28
/* 23D44 80048944 00000000 */ nop
/* 23D48 80048948 44820000 */ mtc1 $v0, $f0
/* 23D4C 8004894C 00000000 */ nop
/* 23D50 80048950 46800020 */ cvt.s.w $f0, $f0
/* 23D54 80048954 4602003E */ c.le.s $f0, $f2
/* 23D58 80048958 00000000 */ nop
/* 23D5C 8004895C 4502002A */ bc1fl .L80048A08
/* 23D60 80048960 26B50008 */ addiu $s5, $s5, 0x8
/* 23D64 80048964 0000802D */ daddu $s0, $zero, $zero
/* 23D68 80048968 8FA80020 */ lw $t0, 0x20($sp)
/* 23D6C 8004896C 44900000 */ mtc1 $s0, $f0
/* 23D70 80048970 00000000 */ nop
/* 23D74 80048974 46800020 */ cvt.s.w $f0, $f0
/* 23D78 80048978 01141021 */ addu $v0, $t0, $s4
/* 23D7C 8004897C 01151821 */ addu $v1, $t0, $s5
/* 23D80 80048980 84420072 */ lh $v0, 0x72($v0)
/* 23D84 80048984 84630072 */ lh $v1, 0x72($v1)
/* 23D88 80048988 4482B000 */ mtc1 $v0, $f22
/* 23D8C 8004898C 00000000 */ nop
/* 23D90 80048990 4680B5A0 */ cvt.s.w $f22, $f22
/* 23D94 80048994 4483A000 */ mtc1 $v1, $f20
/* 23D98 80048998 00000000 */ nop
/* 23D9C 8004899C 4680A520 */ cvt.s.w $f20, $f20
/* 23DA0 800489A0 4616003C */ c.lt.s $f0, $f22
/* 23DA4 800489A4 00000000 */ nop
/* 23DA8 800489A8 4500001D */ bc1f .L80048A20
/* 23DAC 800489AC 461AA503 */ div.s $f20, $f20, $f26
.L800489B0:
/* 23DB0 800489B0 0C00A67F */ jal rand_int
/* 23DB4 800489B4 24040064 */ addiu $a0, $zero, 0x64
/* 23DB8 800489B8 461CA082 */ mul.s $f2, $f20, $f28
/* 23DBC 800489BC 00000000 */ nop
/* 23DC0 800489C0 44820000 */ mtc1 $v0, $f0
/* 23DC4 800489C4 00000000 */ nop
/* 23DC8 800489C8 46800020 */ cvt.s.w $f0, $f0
/* 23DCC 800489CC 4602003E */ c.le.s $f0, $f2
/* 23DD0 800489D0 00000000 */ nop
/* 23DD4 800489D4 45030001 */ bc1tl .L800489DC
/* 23DD8 800489D8 26310001 */ addiu $s1, $s1, 0x1
.L800489DC:
/* 23DDC 800489DC 26100001 */ addiu $s0, $s0, 0x1
/* 23DE0 800489E0 44900000 */ mtc1 $s0, $f0
/* 23DE4 800489E4 00000000 */ nop
/* 23DE8 800489E8 46800020 */ cvt.s.w $f0, $f0
/* 23DEC 800489EC 4616003C */ c.lt.s $f0, $f22
/* 23DF0 800489F0 00000000 */ nop
/* 23DF4 800489F4 4500000A */ bc1f .L80048A20
/* 23DF8 800489F8 00000000 */ nop
/* 23DFC 800489FC 0801226C */ j .L800489B0
/* 23E00 80048A00 00000000 */ nop
.L80048A04:
/* 23E04 80048A04 26B50008 */ addiu $s5, $s5, 0x8
.L80048A08:
/* 23E08 80048A08 26940008 */ addiu $s4, $s4, 0x8
/* 23E0C 80048A0C 26730008 */ addiu $s3, $s3, 0x8
/* 23E10 80048A10 26520001 */ addiu $s2, $s2, 0x1
/* 23E14 80048A14 2A420008 */ slti $v0, $s2, 0x8
/* 23E18 80048A18 1440FFB9 */ bnez $v0, .L80048900
/* 23E1C 80048A1C 26100008 */ addiu $s0, $s0, 0x8
.L80048A20:
/* 23E20 80048A20 0C03A752 */ jal is_ability_active
/* 23E24 80048A24 2404002C */ addiu $a0, $zero, 0x2C
/* 23E28 80048A28 10400005 */ beqz $v0, .L80048A40
/* 23E2C 80048A2C 00000000 */ nop
/* 23E30 80048A30 0C00A67F */ jal rand_int
/* 23E34 80048A34 24040002 */ addiu $a0, $zero, 0x2
/* 23E38 80048A38 26230001 */ addiu $v1, $s1, 0x1
/* 23E3C 80048A3C 00628821 */ addu $s1, $v1, $v0
.L80048A40:
/* 23E40 80048A40 8FA80098 */ lw $t0, 0x98($sp)
/* 23E44 80048A44 8D020000 */ lw $v0, 0x0($t0)
/* 23E48 80048A48 3C030080 */ lui $v1, (0x800000 >> 16)
/* 23E4C 80048A4C 00431024 */ and $v0, $v0, $v1
/* 23E50 80048A50 54400001 */ bnel $v0, $zero, .L80048A58
/* 23E54 80048A54 0000882D */ daddu $s1, $zero, $zero
.L80048A58:
/* 23E58 80048A58 12200002 */ beqz $s1, .L80048A64
/* 23E5C 80048A5C 2408015B */ addiu $t0, $zero, 0x15B
/* 23E60 80048A60 AFA80030 */ sw $t0, 0x30($sp)
.L80048A64:
/* 23E64 80048A64 8FA80028 */ lw $t0, 0x28($sp)
/* 23E68 80048A68 00111040 */ sll $v0, $s1, 1
/* 23E6C 80048A6C 0102102A */ slt $v0, $t0, $v0
/* 23E70 80048A70 10400004 */ beqz $v0, .L80048A84
/* 23E74 80048A74 000817C2 */ srl $v0, $t0, 31
/* 23E78 80048A78 01021021 */ addu $v0, $t0, $v0
/* 23E7C 80048A7C 00028843 */ sra $s1, $v0, 1
/* 23E80 80048A80 8FA80028 */ lw $t0, 0x28($sp)
.L80048A84:
/* 23E84 80048A84 00111040 */ sll $v0, $s1, 1
/* 23E88 80048A88 01024023 */ subu $t0, $t0, $v0
/* 23E8C 80048A8C AFA80028 */ sw $t0, 0x28($sp)
/* 23E90 80048A90 8FA8002C */ lw $t0, 0x2C($sp)
/* 23E94 80048A94 0111102A */ slt $v0, $t0, $s1
/* 23E98 80048A98 54400002 */ bnel $v0, $zero, .L80048AA4
/* 23E9C 80048A9C 0100882D */ daddu $s1, $t0, $zero
/* 23EA0 80048AA0 8FA8002C */ lw $t0, 0x2C($sp)
.L80048AA4:
/* 23EA4 80048AA4 0000902D */ daddu $s2, $zero, $zero
/* 23EA8 80048AA8 01114023 */ subu $t0, $t0, $s1
/* 23EAC 80048AAC 1A200029 */ blez $s1, .L80048B54
/* 23EB0 80048AB0 AFA8002C */ sw $t0, 0x2C($sp)
/* 23EB4 80048AB4 24130004 */ addiu $s3, $zero, 0x4
/* 23EB8 80048AB8 3C01403E */ lui $at, (0x403E0000 >> 16)
/* 23EBC 80048ABC 4481A800 */ mtc1 $at, $f21
/* 23EC0 80048AC0 4480A000 */ mtc1 $zero, $f20
/* 23EC4 80048AC4 00171840 */ sll $v1, $s7, 1
/* 23EC8 80048AC8 00771821 */ addu $v1, $v1, $s7
/* 23ECC 80048ACC 02631004 */ sllv $v0, $v1, $s3
/* 23ED0 80048AD0 00431023 */ subu $v0, $v0, $v1
/* 23ED4 80048AD4 000280C0 */ sll $s0, $v0, 3
.L80048AD8:
/* 23ED8 80048AD8 8FA50034 */ lw $a1, 0x34($sp)
/* 23EDC 80048ADC 8FA60038 */ lw $a2, 0x38($sp)
/* 23EE0 80048AE0 4407F000 */ mfc1 $a3, $f30
/* 23EE4 80048AE4 8FA40030 */ lw $a0, 0x30($sp)
/* 23EE8 80048AE8 8FA80024 */ lw $t0, 0x24($sp)
/* 23EEC 80048AEC 02D01021 */ addu $v0, $s6, $s0
/* 23EF0 80048AF0 AFB30010 */ sw $s3, 0x10($sp)
/* 23EF4 80048AF4 AFA20018 */ sw $v0, 0x18($sp)
/* 23EF8 80048AF8 AFA0001C */ sw $zero, 0x1C($sp)
/* 23EFC 80048AFC 0C04C4FD */ jal make_item_entity
/* 23F00 80048B00 AFA80014 */ sw $t0, 0x14($sp)
/* 23F04 80048B04 44960000 */ mtc1 $s6, $f0
/* 23F08 80048B08 00000000 */ nop
/* 23F0C 80048B0C 46800021 */ cvt.d.w $f0, $f0
/* 23F10 80048B10 27DE0001 */ addiu $fp, $fp, 0x1
/* 23F14 80048B14 2BC2000C */ slti $v0, $fp, 0xC
/* 23F18 80048B18 8FA80024 */ lw $t0, 0x24($sp)
/* 23F1C 80048B1C 46340000 */ add.d $f0, $f0, $f20
/* 23F20 80048B20 25080002 */ addiu $t0, $t0, 0x2
/* 23F24 80048B24 AFA80024 */ sw $t0, 0x24($sp)
/* 23F28 80048B28 4620010D */ trunc.w.d $f4, $f0
/* 23F2C 80048B2C 44162000 */ mfc1 $s6, $f4
/* 23F30 80048B30 14400005 */ bnez $v0, .L80048B48
/* 23F34 80048B34 26520001 */ addiu $s2, $s2, 0x1
/* 23F38 80048B38 0000F02D */ daddu $fp, $zero, $zero
/* 23F3C 80048B3C 26100168 */ addiu $s0, $s0, 0x168
/* 23F40 80048B40 26F70001 */ addiu $s7, $s7, 0x1
/* 23F44 80048B44 0017B0C0 */ sll $s6, $s7, 3
.L80048B48:
/* 23F48 80048B48 0251102A */ slt $v0, $s2, $s1
/* 23F4C 80048B4C 1440FFE2 */ bnez $v0, .L80048AD8
/* 23F50 80048B50 00000000 */ nop
.L80048B54:
/* 23F54 80048B54 24080157 */ addiu $t0, $zero, 0x157
/* 23F58 80048B58 AFA80030 */ sw $t0, 0x30($sp)
/* 23F5C 80048B5C 8FA80020 */ lw $t0, 0x20($sp)
/* 23F60 80048B60 851000B2 */ lh $s0, 0xB2($t0)
/* 23F64 80048B64 850400B4 */ lh $a0, 0xB4($t0)
/* 23F68 80048B68 0090102A */ slt $v0, $a0, $s0
/* 23F6C 80048B6C 10400003 */ beqz $v0, .L80048B7C
/* 23F70 80048B70 0200882D */ daddu $s1, $s0, $zero
/* 23F74 80048B74 0080802D */ daddu $s0, $a0, $zero
/* 23F78 80048B78 0220202D */ daddu $a0, $s1, $zero
.L80048B7C:
/* 23F7C 80048B7C 06010003 */ bgez $s0, .L80048B8C
/* 23F80 80048B80 00908823 */ subu $s1, $a0, $s0
/* 23F84 80048B84 080122E5 */ j .L80048B94
/* 23F88 80048B88 00902023 */ subu $a0, $a0, $s0
.L80048B8C:
/* 23F8C 80048B8C 12200005 */ beqz $s1, .L80048BA4
/* 23F90 80048B90 0220202D */ daddu $a0, $s1, $zero
.L80048B94:
/* 23F94 80048B94 0C00A67F */ jal rand_int
/* 23F98 80048B98 00000000 */ nop
/* 23F9C 80048B9C 080122EA */ j .L80048BA8
/* 23FA0 80048BA0 00508821 */ addu $s1, $v0, $s0
.L80048BA4:
/* 23FA4 80048BA4 0200882D */ daddu $s1, $s0, $zero
.L80048BA8:
/* 23FA8 80048BA8 06220001 */ bltzl $s1, .L80048BB0
/* 23FAC 80048BAC 0000882D */ daddu $s1, $zero, $zero
.L80048BB0:
/* 23FB0 80048BB0 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0xE)
/* 23FB4 80048BB4 84420F1E */ lh $v0, %lo(gCurrentEncounter + 0xE)($v0)
/* 23FB8 80048BB8 24040019 */ addiu $a0, $zero, 0x19
/* 23FBC 80048BBC 0C03A752 */ jal is_ability_active
/* 23FC0 80048BC0 02228821 */ addu $s1, $s1, $v0
/* 23FC4 80048BC4 10400007 */ beqz $v0, .L80048BE4
/* 23FC8 80048BC8 00000000 */ nop
/* 23FCC 80048BCC 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0xC)
/* 23FD0 80048BD0 90420F1C */ lbu $v0, %lo(gCurrentEncounter + 0xC)($v0)
/* 23FD4 80048BD4 3C01800B */ lui $at, %hi(gCurrentEncounter + 0xC)
/* 23FD8 80048BD8 A0200F1C */ sb $zero, %lo(gCurrentEncounter + 0xC)($at)
/* 23FDC 80048BDC 00021042 */ srl $v0, $v0, 1
/* 23FE0 80048BE0 02228821 */ addu $s1, $s1, $v0
.L80048BE4:
/* 23FE4 80048BE4 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0xB)
/* 23FE8 80048BE8 80420F1B */ lb $v0, %lo(gCurrentEncounter + 0xB)($v0)
/* 23FEC 80048BEC 10400004 */ beqz $v0, .L80048C00
/* 23FF0 80048BF0 00111040 */ sll $v0, $s1, 1
/* 23FF4 80048BF4 3C01800B */ lui $at, %hi(gCurrentEncounter + 0xB)
/* 23FF8 80048BF8 A0200F1B */ sb $zero, %lo(gCurrentEncounter + 0xB)($at)
/* 23FFC 80048BFC 02228821 */ addu $s1, $s1, $v0
.L80048C00:
/* 24000 80048C00 0C03A752 */ jal is_ability_active
/* 24004 80048C04 24040010 */ addiu $a0, $zero, 0x10
/* 24008 80048C08 54400001 */ bnel $v0, $zero, .L80048C10
/* 2400C 80048C0C 00118840 */ sll $s1, $s1, 1
.L80048C10:
/* 24010 80048C10 2A220015 */ slti $v0, $s1, 0x15
/* 24014 80048C14 50400001 */ beql $v0, $zero, .L80048C1C
/* 24018 80048C18 24110014 */ addiu $s1, $zero, 0x14
.L80048C1C:
/* 2401C 80048C1C 8FA80098 */ lw $t0, 0x98($sp)
/* 24020 80048C20 8D020000 */ lw $v0, 0x0($t0)
/* 24024 80048C24 3C030080 */ lui $v1, (0x800000 >> 16)
/* 24028 80048C28 00431024 */ and $v0, $v0, $v1
/* 2402C 80048C2C 54400001 */ bnel $v0, $zero, .L80048C34
/* 24030 80048C30 0000882D */ daddu $s1, $zero, $zero
.L80048C34:
/* 24034 80048C34 8FA80028 */ lw $t0, 0x28($sp)
/* 24038 80048C38 00111040 */ sll $v0, $s1, 1
/* 2403C 80048C3C 0102102A */ slt $v0, $t0, $v0
/* 24040 80048C40 10400003 */ beqz $v0, .L80048C50
/* 24044 80048C44 000817C2 */ srl $v0, $t0, 31
/* 24048 80048C48 01021021 */ addu $v0, $t0, $v0
/* 2404C 80048C4C 00028843 */ sra $s1, $v0, 1
.L80048C50:
/* 24050 80048C50 8FA8002C */ lw $t0, 0x2C($sp)
/* 24054 80048C54 0111102A */ slt $v0, $t0, $s1
/* 24058 80048C58 54400001 */ bnel $v0, $zero, .L80048C60
/* 2405C 80048C5C 0100882D */ daddu $s1, $t0, $zero
.L80048C60:
/* 24060 80048C60 1A200029 */ blez $s1, .L80048D08
/* 24064 80048C64 0000902D */ daddu $s2, $zero, $zero
/* 24068 80048C68 24130004 */ addiu $s3, $zero, 0x4
/* 2406C 80048C6C 3C01403E */ lui $at, (0x403E0000 >> 16)
/* 24070 80048C70 4481A800 */ mtc1 $at, $f21
/* 24074 80048C74 4480A000 */ mtc1 $zero, $f20
/* 24078 80048C78 00171840 */ sll $v1, $s7, 1
/* 2407C 80048C7C 00771821 */ addu $v1, $v1, $s7
/* 24080 80048C80 02631004 */ sllv $v0, $v1, $s3
/* 24084 80048C84 00431023 */ subu $v0, $v0, $v1
/* 24088 80048C88 000280C0 */ sll $s0, $v0, 3
.L80048C8C:
/* 2408C 80048C8C 8FA50034 */ lw $a1, 0x34($sp)
/* 24090 80048C90 8FA60038 */ lw $a2, 0x38($sp)
/* 24094 80048C94 4407F000 */ mfc1 $a3, $f30
/* 24098 80048C98 8FA40030 */ lw $a0, 0x30($sp)
/* 2409C 80048C9C 8FA80024 */ lw $t0, 0x24($sp)
/* 240A0 80048CA0 02D01021 */ addu $v0, $s6, $s0
/* 240A4 80048CA4 AFB30010 */ sw $s3, 0x10($sp)
/* 240A8 80048CA8 AFA20018 */ sw $v0, 0x18($sp)
/* 240AC 80048CAC AFA0001C */ sw $zero, 0x1C($sp)
/* 240B0 80048CB0 0C04C4FD */ jal make_item_entity
/* 240B4 80048CB4 AFA80014 */ sw $t0, 0x14($sp)
/* 240B8 80048CB8 44960000 */ mtc1 $s6, $f0
/* 240BC 80048CBC 00000000 */ nop
/* 240C0 80048CC0 46800021 */ cvt.d.w $f0, $f0
/* 240C4 80048CC4 27DE0001 */ addiu $fp, $fp, 0x1
/* 240C8 80048CC8 2BC2000C */ slti $v0, $fp, 0xC
/* 240CC 80048CCC 8FA80024 */ lw $t0, 0x24($sp)
/* 240D0 80048CD0 46340000 */ add.d $f0, $f0, $f20
/* 240D4 80048CD4 25080002 */ addiu $t0, $t0, 0x2
/* 240D8 80048CD8 AFA80024 */ sw $t0, 0x24($sp)
/* 240DC 80048CDC 4620010D */ trunc.w.d $f4, $f0
/* 240E0 80048CE0 44162000 */ mfc1 $s6, $f4
/* 240E4 80048CE4 14400005 */ bnez $v0, .L80048CFC
/* 240E8 80048CE8 26520001 */ addiu $s2, $s2, 0x1
/* 240EC 80048CEC 0000F02D */ daddu $fp, $zero, $zero
/* 240F0 80048CF0 26100168 */ addiu $s0, $s0, 0x168
/* 240F4 80048CF4 26F70001 */ addiu $s7, $s7, 0x1
/* 240F8 80048CF8 0017B0C0 */ sll $s6, $s7, 3
.L80048CFC:
/* 240FC 80048CFC 0251102A */ slt $v0, $s2, $s1
/* 24100 80048D00 1440FFE2 */ bnez $v0, .L80048C8C
/* 24104 80048D04 00000000 */ nop
.L80048D08:
/* 24108 80048D08 8FBF0064 */ lw $ra, 0x64($sp)
/* 2410C 80048D0C 8FBE0060 */ lw $fp, 0x60($sp)
/* 24110 80048D10 8FB7005C */ lw $s7, 0x5C($sp)
/* 24114 80048D14 8FB60058 */ lw $s6, 0x58($sp)
/* 24118 80048D18 8FB50054 */ lw $s5, 0x54($sp)
/* 2411C 80048D1C 8FB40050 */ lw $s4, 0x50($sp)
/* 24120 80048D20 8FB3004C */ lw $s3, 0x4C($sp)
/* 24124 80048D24 8FB20048 */ lw $s2, 0x48($sp)
/* 24128 80048D28 8FB10044 */ lw $s1, 0x44($sp)
/* 2412C 80048D2C 8FB00040 */ lw $s0, 0x40($sp)
/* 24130 80048D30 D7BE0090 */ ldc1 $f30, 0x90($sp)
/* 24134 80048D34 D7BC0088 */ ldc1 $f28, 0x88($sp)
/* 24138 80048D38 D7BA0080 */ ldc1 $f26, 0x80($sp)
/* 2413C 80048D3C D7B80078 */ ldc1 $f24, 0x78($sp)
/* 24140 80048D40 D7B60070 */ ldc1 $f22, 0x70($sp)
/* 24144 80048D44 D7B40068 */ ldc1 $f20, 0x68($sp)
/* 24148 80048D48 03E00008 */ jr $ra
/* 2414C 80048D4C 27BD0098 */ addiu $sp, $sp, 0x98
### DECOMPILED C INSTRUCTIONS:
void spawn_drops(Enemy* enemy) {
PlayerData* playerData = &gPlayerData;
EncounterStatus* encounter = &gCurrentEncounter;
EnemyDropsFlat* drops = (EnemyDropsFlat*) enemy->drops; // TODO: unify EnemyDrops / EnemyDropsFlat
Npc* npc = get_npc_unsafe(enemy->npcID);
Camera* camera = &gCameras[gCurrentCameraID];
s32 pickupDelay;
s32 availableRenderTasks;
s32 availableShadows;
s32 itemToDrop;
f32 x, y, z;
f32 threshold;
f32 chance;
f32 attempts;
f32 fraction;
s32 maxCoinBonus;
s32 minCoinBonus;
s32 tempMax;
s32 spawnCounter;
s32 dropCount;
s32 totalWeight;
s32 angle;
s32 angleMult;
s32 i, j;
s32 flags;
availableShadows = 0;
for (i = 0; i < MAX_SHADOWS; i++) {
if (get_shadow_by_index(i) == NULL) {
availableShadows++;
}
}
spawnCounter = 0;
availableRenderTasks = 256 - 10 - gLastRenderTaskCount;
angle = clamp_angle(camera->currentYaw + 90.0f);
x = npc->pos.x;
y = npc->pos.y + (npc->collisionHeight / 2);
z = npc->pos.z;
angleMult = 0;
pickupDelay = 0;
dropCount = drops->itemDropChance;
if (drops->itemDropChance > rand_int(100)) {
tempMax = 0;
for (i = 0; i < 8; i++) {
if (drops->itemDrops[3 * i] != 0) {
tempMax += drops->itemDrops[3 * i + 1];
} else {
break;
}
}
totalWeight = 0;
dropCount = rand_int(tempMax);
itemToDrop = ITEM_NONE;
for (i = 0; i < 8; i++) {
if (drops->itemDrops[3 * i] == 0) {
break;
}
totalWeight += drops->itemDrops[3 * i + 1];
if (drops->itemDrops[3 * i + 2] > 0) {
if (get_global_flag(EVT_INDEX_OF_GAME_FLAG(GF_Unused_NPC_6C) + drops->itemDrops[3 * i + 2])) {
continue;
}
}
if (totalWeight >= dropCount) {
itemToDrop = drops->itemDrops[3 * i];
do { } while (0); // TODO required to match
break;
}
}
// TODO this bullshit is required to match
flags = enemy->flags;
if (flags) {
flags = 0;
}
if (itemToDrop != ITEM_NONE) {
make_item_entity(itemToDrop, x, y, z, ITEM_SPAWN_MODE_BATTLE_REWARD, pickupDelay, angle + angleMult * 360, 0);
spawnCounter++;
pickupDelay += 2;
angle += 30.0;
if (spawnCounter >= 12) {
angleMult++;
angle = angleMult * 8;
spawnCounter = 0;
}
if (drops->itemDrops[3 * i + 2] >= 0) {
set_global_flag(EVT_INDEX_OF_GAME_FLAG(GF_SpawnedItemDrop_00) + drops->itemDrops[3 * i + 2]);
}
}
}
if (encounter->dropWhackaBump) {
encounter->dropWhackaBump = FALSE;
make_item_entity(ITEM_WHACKAS_BUMP, x, y, z, ITEM_SPAWN_MODE_BATTLE_REWARD, pickupDelay, angle + angleMult * 360, 0);
spawnCounter++;
pickupDelay += 2;
angle += 30.0;
if (spawnCounter >= 12) {
angleMult++;
angle = angleMult * 8;
spawnCounter = 0;
}
}
dropCount = 0;
itemToDrop = ITEM_NONE;
fraction = playerData->curHP / (f32) playerData->curMaxHP;
for (i = 0; i < 8; i++) {
attempts = drops->heartDrops[4 * i];
threshold = drops->heartDrops[4 * i + 1];
attempts /= 32767.0f;
threshold /= 32767.0f;
if (fraction <= attempts && rand_int(100) <= threshold * 100.0f) {
attempts = drops->heartDrops[4 * i + 2];
chance = drops->heartDrops[4 * i + 3];
chance /= 32767.0f;
for (j = 0; j < attempts; j++) {
if (rand_int(100) <= chance * 100.0f) {
dropCount++;
}
}
break;
}
}
if (is_ability_active(ABILITY_HEART_FINDER) != 0) {
dropCount += 1 + rand_int(2);
}
if (enemy->flags & ENEMY_FLAG_NO_DROPS) {
dropCount = 0;
}
if (dropCount != 0) {
itemToDrop = ITEM_HEART;
}
if (dropCount * 2 > availableRenderTasks) {
dropCount = availableRenderTasks / 2;
}
availableRenderTasks -= 2 * dropCount;
if (dropCount > availableShadows) {
dropCount = availableShadows;
}
availableShadows -= dropCount;
for (i = 0; i < dropCount; i++) {
make_item_entity(itemToDrop, x, y, z, ITEM_SPAWN_MODE_BATTLE_REWARD, pickupDelay, angle + (angleMult * 360), 0);
spawnCounter++;
pickupDelay += 2;
angle += 30.0;
if (spawnCounter >= 12) {
spawnCounter = 0;
angleMult++;
angle = angleMult * 8;
}
}
dropCount = 0;
itemToDrop = ITEM_NONE;
fraction = playerData->curFP / (f32) playerData->curMaxFP;
for (i = 0; i < 8; i++) {
attempts = drops->flowerDrops[4 * i + 0];
threshold = drops->flowerDrops[4 * i + 1];
attempts /= 32767.0f;
threshold /= 32767.0f;
if (fraction <= attempts && rand_int(100) <= threshold * 100.0f) {
attempts = drops->flowerDrops[4 * i + 2];
chance = drops->flowerDrops[4 * i + 3];
chance /= 32767.0f;
for (j = 0; j < attempts; j++) {
if (rand_int(100) <= chance * 100.0f) {
dropCount++;
}
}
break;
}
}
if (is_ability_active(ABILITY_FLOWER_FINDER) != 0) {
dropCount += 1 + rand_int(2);
}
if (enemy->flags & ENEMY_FLAG_NO_DROPS) {
dropCount = 0;
}
if (dropCount != 0) {
itemToDrop = ITEM_FLOWER_POINT;
}
if (dropCount * 2 > availableRenderTasks) {
dropCount = availableRenderTasks / 2;
}
availableRenderTasks -= 2 * dropCount;
if (dropCount > availableShadows) {
dropCount = availableShadows;
}
availableShadows -= dropCount;
for (i = 0; i < dropCount; i++) {
make_item_entity(itemToDrop, x, y, z, ITEM_SPAWN_MODE_BATTLE_REWARD, pickupDelay, angle + (angleMult * 360), 0);
spawnCounter++;
pickupDelay += 2;
angle += 30.0;
if (spawnCounter >= 12) {
spawnCounter = 0;
angleMult++;
angle = angleMult * 8;
}
}
itemToDrop = ITEM_COIN;
do {} while (0);
minCoinBonus = drops->minCoinBonus;
tempMax = drops->maxCoinBonus;
if (drops->maxCoinBonus < drops->minCoinBonus) {
dropCount = minCoinBonus;
minCoinBonus = tempMax;
tempMax = dropCount;
}
if (minCoinBonus < 0) {
dropCount = rand_int(tempMax - minCoinBonus) + minCoinBonus;
} else {
dropCount = tempMax - minCoinBonus;
if (dropCount != 0) {
dropCount = rand_int(dropCount) + minCoinBonus;
} else {
dropCount = minCoinBonus;
}
}
if (dropCount < 0) {
dropCount = 0;
}
dropCount = dropCount + encounter->coinsEarned;
if (is_ability_active(ABILITY_PAY_OFF) != 0) {
dropCount += encounter->damageTaken / 2;
encounter->damageTaken = 0;
}
if (encounter->hasMerleeCoinBonus) {
encounter->hasMerleeCoinBonus = FALSE;
dropCount *= 3;
}
if (is_ability_active(ABILITY_MONEY_MONEY) != 0) {
dropCount *= 2;
}
if (dropCount > 20) {
dropCount = 20;
}
if (enemy->flags & ENEMY_FLAG_NO_DROPS) {
dropCount = 0;
}
if (dropCount * 2 > availableRenderTasks) {
dropCount = availableRenderTasks / 2;
}
availableRenderTasks -= 2 * dropCount;
if (dropCount > availableShadows) {
dropCount = availableShadows;
}
for (i = 0; i < dropCount; i++) {
make_item_entity(itemToDrop, x, y, z, ITEM_SPAWN_MODE_BATTLE_REWARD, pickupDelay, angle + (angleMult * 360), 0);
spawnCounter++;
pickupDelay += 2;
angle = angle + 30.0;
if (spawnCounter >= 12) {
spawnCounter = 0;
angleMult++;
angle = angleMult * 8;
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel ShowShopOwnerDialog
/* 7E1A50 80280BD0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 7E1A54 80280BD4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 7E1A58 80280BD8 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 7E1A5C 80280BDC AFB10014 */ sw $s1, 0x14($sp)
/* 7E1A60 80280BE0 AFB20018 */ sw $s2, 0x18($sp)
/* 7E1A64 80280BE4 3C128011 */ lui $s2, %hi(gPlayerData)
/* 7E1A68 80280BE8 2652F290 */ addiu $s2, $s2, %lo(gPlayerData)
/* 7E1A6C 80280BEC AFBF0020 */ sw $ra, 0x20($sp)
/* 7E1A70 80280BF0 AFB3001C */ sw $s3, 0x1C($sp)
/* 7E1A74 80280BF4 AFB00010 */ sw $s0, 0x10($sp)
/* 7E1A78 80280BF8 8C500144 */ lw $s0, 0x144($v0)
/* 7E1A7C 80280BFC 10A00006 */ beqz $a1, .L80280C18
/* 7E1A80 80280C00 0080882D */ daddu $s1, $a0, $zero
/* 7E1A84 80280C04 0C0A0000 */ jal shop_owner_begin_speech
/* 7E1A88 80280C08 24040004 */ addiu $a0, $zero, 0x4
/* 7E1A8C 80280C0C AE220074 */ sw $v0, 0x74($s1)
/* 7E1A90 80280C10 24020004 */ addiu $v0, $zero, 0x4
/* 7E1A94 80280C14 AE220070 */ sw $v0, 0x70($s1)
.L80280C18:
/* 7E1A98 80280C18 8E230070 */ lw $v1, 0x70($s1)
/* 7E1A9C 80280C1C 24130020 */ addiu $s3, $zero, 0x20
/* 7E1AA0 80280C20 10730117 */ beq $v1, $s3, .L80281080
/* 7E1AA4 80280C24 28620021 */ slti $v0, $v1, 0x21
/* 7E1AA8 80280C28 10400027 */ beqz $v0, .L80280CC8
/* 7E1AAC 80280C2C 24020007 */ addiu $v0, $zero, 0x7
/* 7E1AB0 80280C30 1062018C */ beq $v1, $v0, .L80281264
/* 7E1AB4 80280C34 28620008 */ slti $v0, $v1, 0x8
/* 7E1AB8 80280C38 10400011 */ beqz $v0, .L80280C80
/* 7E1ABC 80280C3C 24020003 */ addiu $v0, $zero, 0x3
/* 7E1AC0 80280C40 106200D9 */ beq $v1, $v0, .L80280FA8
/* 7E1AC4 80280C44 28620004 */ slti $v0, $v1, 0x4
/* 7E1AC8 80280C48 10400007 */ beqz $v0, .L80280C68
/* 7E1ACC 80280C4C 24020004 */ addiu $v0, $zero, 0x4
/* 7E1AD0 80280C50 106001DC */ beqz $v1, .L802813C4
/* 7E1AD4 80280C54 24020002 */ addiu $v0, $zero, 0x2
/* 7E1AD8 80280C58 106200AF */ beq $v1, $v0, .L80280F18
/* 7E1ADC 80280C5C 0000102D */ daddu $v0, $zero, $zero
/* 7E1AE0 80280C60 080A0506 */ j .L80281418
/* 7E1AE4 80280C64 00000000 */ nop
.L80280C68:
/* 7E1AE8 80280C68 1062003F */ beq $v1, $v0, .L80280D68
/* 7E1AEC 80280C6C 24020005 */ addiu $v0, $zero, 0x5
/* 7E1AF0 80280C70 1062012B */ beq $v1, $v0, .L80281120
/* 7E1AF4 80280C74 0000102D */ daddu $v0, $zero, $zero
/* 7E1AF8 80280C78 080A0506 */ j .L80281418
/* 7E1AFC 80280C7C 00000000 */ nop
.L80280C80:
/* 7E1B00 80280C80 2402000C */ addiu $v0, $zero, 0xC
/* 7E1B04 80280C84 10620108 */ beq $v1, $v0, .L802810A8
/* 7E1B08 80280C88 2862000D */ slti $v0, $v1, 0xD
/* 7E1B0C 80280C8C 10400007 */ beqz $v0, .L80280CAC
/* 7E1B10 80280C90 24020009 */ addiu $v0, $zero, 0x9
/* 7E1B14 80280C94 106201CB */ beq $v1, $v0, .L802813C4
/* 7E1B18 80280C98 2402000A */ addiu $v0, $zero, 0xA
/* 7E1B1C 80280C9C 106201D1 */ beq $v1, $v0, .L802813E4
/* 7E1B20 80280CA0 0000102D */ daddu $v0, $zero, $zero
/* 7E1B24 80280CA4 080A0506 */ j .L80281418
/* 7E1B28 80280CA8 00000000 */ nop
.L80280CAC:
/* 7E1B2C 80280CAC 24020015 */ addiu $v0, $zero, 0x15
/* 7E1B30 80280CB0 106200A0 */ beq $v1, $v0, .L80280F34
/* 7E1B34 80280CB4 2402001F */ addiu $v0, $zero, 0x1F
/* 7E1B38 80280CB8 106200C5 */ beq $v1, $v0, .L80280FD0
/* 7E1B3C 80280CBC 0000102D */ daddu $v0, $zero, $zero
/* 7E1B40 80280CC0 080A0506 */ j .L80281418
/* 7E1B44 80280CC4 00000000 */ nop
.L80280CC8:
/* 7E1B48 80280CC8 24020047 */ addiu $v0, $zero, 0x47
/* 7E1B4C 80280CCC 1062016F */ beq $v1, $v0, .L8028128C
/* 7E1B50 80280CD0 28620048 */ slti $v0, $v1, 0x48
/* 7E1B54 80280CD4 10400012 */ beqz $v0, D_80280D20
/* 7E1B58 80280CD8 24020033 */ addiu $v0, $zero, 0x33
/* 7E1B5C 80280CDC 10620117 */ beq $v1, $v0, .L8028113C
BattleCam_IsFrozen:
/* 7E1B60 80280CE0 28620034 */ slti $v0, $v1, 0x34
BattleCam_CurrentPresetID:
/* 7E1B64 80280CE4 10400007 */ beqz $v0, D_80280D04
CamPreset_B:
/* 7E1B68 80280CE8 24020029 */ addiu $v0, $zero, 0x29
/* 7E1B6C 80280CEC 10620027 */ beq $v1, $v0, .L80280D8C
/* 7E1B70 80280CF0 2402002A */ addiu $v0, $zero, 0x2A
/* 7E1B74 80280CF4 106201B3 */ beq $v1, $v0, .L802813C4
/* 7E1B78 80280CF8 0000102D */ daddu $v0, $zero, $zero
/* 7E1B7C 80280CFC 080A0506 */ j .L80281418
/* 7E1B80 80280D00 00000000 */ nop
D_80280D04:
/* 7E1B84 80280D04 24020034 */ addiu $v0, $zero, 0x34
/* 7E1B88 80280D08 10620133 */ beq $v1, $v0, .L802811D8
/* 7E1B8C 80280D0C 24020035 */ addiu $v0, $zero, 0x35
/* 7E1B90 80280D10 1062013B */ beq $v1, $v0, .L80281200
/* 7E1B94 80280D14 0000102D */ daddu $v0, $zero, $zero
/* 7E1B98 80280D18 080A0506 */ j .L80281418
/* 7E1B9C 80280D1C 00000000 */ nop
D_80280D20:
/* 7E1BA0 80280D20 240200C9 */ addiu $v0, $zero, 0xC9
/* 7E1BA4 80280D24 10620072 */ beq $v1, $v0, .L80280EF0
/* 7E1BA8 80280D28 286200CA */ slti $v0, $v1, 0xCA
/* 7E1BAC 80280D2C 10400007 */ beqz $v0, .L80280D4C
/* 7E1BB0 80280D30 24020048 */ addiu $v0, $zero, 0x48
/* 7E1BB4 80280D34 1062017E */ beq $v1, $v0, .L80281330
/* 7E1BB8 80280D38 24020049 */ addiu $v0, $zero, 0x49
CamPreset_G:
/* 7E1BBC 80280D3C 1062018C */ beq $v1, $v0, .L80281370
/* 7E1BC0 80280D40 0000102D */ daddu $v0, $zero, $zero
/* 7E1BC4 80280D44 080A0506 */ j .L80281418
/* 7E1BC8 80280D48 00000000 */ nop
.L80280D4C:
/* 7E1BCC 80280D4C 240201F5 */ addiu $v0, $zero, 0x1F5
/* 7E1BD0 80280D50 106200EA */ beq $v1, $v0, .L802810FC
/* 7E1BD4 80280D54 240202BD */ addiu $v0, $zero, 0x2BD
CamPreset_I:
/* 7E1BD8 80280D58 10620138 */ beq $v1, $v0, .L8028123C
/* 7E1BDC 80280D5C 0000102D */ daddu $v0, $zero, $zero
/* 7E1BE0 80280D60 080A0506 */ j .L80281418
/* 7E1BE4 80280D64 00000000 */ nop
.L80280D68:
/* 7E1BE8 80280D68 0C0B1059 */ jal does_script_exist
/* 7E1BEC 80280D6C 8E240074 */ lw $a0, 0x74($s1)
/* 7E1BF0 80280D70 144001A9 */ bnez $v0, .L80281418
CamPreset_H:
/* 7E1BF4 80280D74 0000102D */ daddu $v0, $zero, $zero
/* 7E1BF8 80280D78 3C04001E */ lui $a0, (0x1E0003 >> 16)
/* 7E1BFC 80280D7C 34840003 */ ori $a0, $a0, (0x1E0003 & 0xFFFF)
/* 7E1C00 80280D80 26250078 */ addiu $a1, $s1, 0x78
/* 7E1C04 80280D84 080A04D5 */ j .L80281354
/* 7E1C08 80280D88 24020029 */ addiu $v0, $zero, 0x29
.L80280D8C:
/* 7E1C0C 80280D8C 8E240078 */ lw $a0, 0x78($s1)
CamPreset_N:
/* 7E1C10 80280D90 24020001 */ addiu $v0, $zero, 0x1
/* 7E1C14 80280D94 148201A0 */ bne $a0, $v0, .L80281418
/* 7E1C18 80280D98 0000102D */ daddu $v0, $zero, $zero
/* 7E1C1C 80280D9C 3C028028 */ lui $v0, %hi(D_80286538)
/* 7E1C20 80280DA0 8C426538 */ lw $v0, %lo(D_80286538)($v0)
/* 7E1C24 80280DA4 904304E8 */ lbu $v1, 0x4E8($v0)
/* 7E1C28 80280DA8 10640012 */ beq $v1, $a0, .L80280DF4
EVS_BattleCam_Default:
/* 7E1C2C 80280DAC 28620002 */ slti $v0, $v1, 0x2
/* 7E1C30 80280DB0 10400005 */ beqz $v0, D_80280DC8
/* 7E1C34 80280DB4 24020002 */ addiu $v0, $zero, 0x2
/* 7E1C38 80280DB8 10600009 */ beqz $v1, .L80280DE0
/* 7E1C3C 80280DBC 00000000 */ nop
/* 7E1C40 80280DC0 080A03B6 */ j .L80280ED8
/* 7E1C44 80280DC4 00000000 */ nop
D_80280DC8:
/* 7E1C48 80280DC8 10620018 */ beq $v1, $v0, .L80280E2C
/* 7E1C4C 80280DCC 24020003 */ addiu $v0, $zero, 0x3
/* 7E1C50 80280DD0 1062002D */ beq $v1, $v0, .L80280E88
/* 7E1C54 80280DD4 00000000 */ nop
/* 7E1C58 80280DD8 080A03B6 */ j .L80280ED8
/* 7E1C5C 80280DDC 00000000 */ nop
.L80280DE0:
/* 7E1C60 80280DE0 0C0A005F */ jal shop_owner_continue_speech
CamPreset_E:
/* 7E1C64 80280DE4 24040005 */ addiu $a0, $zero, 0x5
/* 7E1C68 80280DE8 AE220074 */ sw $v0, 0x74($s1)
/* 7E1C6C 80280DEC 080A0505 */ j .L80281414
/* 7E1C70 80280DF0 AE200070 */ sw $zero, 0x70($s1)
.L80280DF4:
/* 7E1C74 80280DF4 0C039D7B */ jal get_item_count
/* 7E1C78 80280DF8 00000000 */ nop
/* 7E1C7C 80280DFC 14400005 */ bnez $v0, .L80280E14
CamPreset_J:
/* 7E1C80 80280E00 00000000 */ nop
/* 7E1C84 80280E04 0C0A005F */ jal shop_owner_continue_speech
/* 7E1C88 80280E08 24040006 */ addiu $a0, $zero, 0x6
/* 7E1C8C 80280E0C 080A04EE */ j .L802813B8
/* 7E1C90 80280E10 AE220074 */ sw $v0, 0x74($s1)
.L80280E14:
/* 7E1C94 80280E14 0C0A005F */ jal shop_owner_continue_speech
/* 7E1C98 80280E18 24040007 */ addiu $a0, $zero, 0x7
CamPreset_K:
/* 7E1C9C 80280E1C AE220074 */ sw $v0, 0x74($s1)
/* 7E1CA0 80280E20 240200C9 */ addiu $v0, $zero, 0xC9
/* 7E1CA4 80280E24 080A0505 */ j .L80281414
/* 7E1CA8 80280E28 AE220070 */ sw $v0, 0x70($s1)
.L80280E2C:
/* 7E1CAC 80280E2C 0C039D7B */ jal get_item_count
/* 7E1CB0 80280E30 00000000 */ nop
/* 7E1CB4 80280E34 14400005 */ bnez $v0, .L80280E4C
CamPreset_L:
/* 7E1CB8 80280E38 00000000 */ nop
/* 7E1CBC 80280E3C 0C0A005F */ jal shop_owner_continue_speech
/* 7E1CC0 80280E40 2404000C */ addiu $a0, $zero, 0xC
/* 7E1CC4 80280E44 080A04EE */ j .L802813B8
/* 7E1CC8 80280E48 AE220074 */ sw $v0, 0x74($s1)
.L80280E4C:
/* 7E1CCC 80280E4C 0C039E12 */ jal get_stored_empty_count
/* 7E1CD0 80280E50 00000000 */ nop
CamPreset_A:
/* 7E1CD4 80280E54 14400005 */ bnez $v0, .L80280E6C
/* 7E1CD8 80280E58 00000000 */ nop
/* 7E1CDC 80280E5C 0C0A005F */ jal shop_owner_continue_speech
/* 7E1CE0 80280E60 2404000D */ addiu $a0, $zero, 0xD
/* 7E1CE4 80280E64 080A04EE */ j .L802813B8
/* 7E1CE8 80280E68 AE220074 */ sw $v0, 0x74($s1)
.L80280E6C:
/* 7E1CEC 80280E6C 0C039E12 */ jal get_stored_empty_count
/* 7E1CF0 80280E70 00000000 */ nop
/* 7E1CF4 80280E74 2404000E */ addiu $a0, $zero, 0xE
/* 7E1CF8 80280E78 0C0A0082 */ jal shop_owner_continue_speech_with_quantity
/* 7E1CFC 80280E7C 0040282D */ daddu $a1, $v0, $zero
/* 7E1D00 80280E80 080A048C */ j .L80281230
/* 7E1D04 80280E84 AE220074 */ sw $v0, 0x74($s1)
.L80280E88:
/* 7E1D08 80280E88 0C039E05 */ jal get_stored_count
/* 7E1D0C 80280E8C 00000000 */ nop
/* 7E1D10 80280E90 14400005 */ bnez $v0, .L80280EA8
/* 7E1D14 80280E94 00000000 */ nop
/* 7E1D18 80280E98 0C0A005F */ jal shop_owner_continue_speech
/* 7E1D1C 80280E9C 24040011 */ addiu $a0, $zero, 0x11
/* 7E1D20 80280EA0 080A04EE */ j .L802813B8
/* 7E1D24 80280EA4 AE220074 */ sw $v0, 0x74($s1)
.L80280EA8:
/* 7E1D28 80280EA8 0C039D88 */ jal get_item_empty_count
/* 7E1D2C 80280EAC 00000000 */ nop
/* 7E1D30 80280EB0 14400005 */ bnez $v0, .L80280EC8
/* 7E1D34 80280EB4 00000000 */ nop
EVS_OnBattleInit:
/* 7E1D38 80280EB8 0C0A005F */ jal shop_owner_continue_speech
/* 7E1D3C 80280EBC 24040012 */ addiu $a0, $zero, 0x12
/* 7E1D40 80280EC0 080A04EE */ j .L802813B8
/* 7E1D44 80280EC4 AE220074 */ sw $v0, 0x74($s1)
.L80280EC8:
/* 7E1D48 80280EC8 0C0A005F */ jal shop_owner_continue_speech
/* 7E1D4C 80280ECC 24040013 */ addiu $a0, $zero, 0x13
/* 7E1D50 80280ED0 080A04E8 */ j .L802813A0
/* 7E1D54 80280ED4 AE220074 */ sw $v0, 0x74($s1)
.L80280ED8:
/* 7E1D58 80280ED8 0C0A00D7 */ jal shop_owner_end_speech
/* 7E1D5C 80280EDC 00000000 */ nop
/* 7E1D60 80280EE0 AE220074 */ sw $v0, 0x74($s1)
/* 7E1D64 80280EE4 2402002A */ addiu $v0, $zero, 0x2A
/* 7E1D68 80280EE8 080A0505 */ j .L80281414
/* 7E1D6C 80280EEC AE220070 */ sw $v0, 0x70($s1)
.L80280EF0:
/* 7E1D70 80280EF0 8E240074 */ lw $a0, 0x74($s1)
/* 7E1D74 80280EF4 0C0B1059 */ jal does_script_exist
/* 7E1D78 80280EF8 00000000 */ nop
/* 7E1D7C 80280EFC 14400146 */ bnez $v0, .L80281418
/* 7E1D80 80280F00 0000102D */ daddu $v0, $zero, $zero
/* 7E1D84 80280F04 0C0A0255 */ jal shop_open_item_select_popup
/* 7E1D88 80280F08 0000202D */ daddu $a0, $zero, $zero
/* 7E1D8C 80280F0C 24020002 */ addiu $v0, $zero, 0x2
/* 7E1D90 80280F10 080A0505 */ j .L80281414
/* 7E1D94 80280F14 AE220070 */ sw $v0, 0x70($s1)
.L80280F18:
/* 7E1D98 80280F18 0C0A02B1 */ jal shop_update_item_select_popup
/* 7E1D9C 80280F1C 2604000C */ addiu $a0, $s0, 0xC
/* 7E1DA0 80280F20 24030001 */ addiu $v1, $zero, 0x1
/* 7E1DA4 80280F24 1443013C */ bne $v0, $v1, .L80281418
/* 7E1DA8 80280F28 0000102D */ daddu $v0, $zero, $zero
/* 7E1DAC 80280F2C 080A049F */ j .L8028127C
/* 7E1DB0 80280F30 24020015 */ addiu $v0, $zero, 0x15
.L80280F34:
/* 7E1DB4 80280F34 8E220074 */ lw $v0, 0x74($s1)
/* 7E1DB8 80280F38 1C4000D7 */ bgtz $v0, .L80281298
/* 7E1DBC 80280F3C 2442FFFF */ addiu $v0, $v0, -0x1
/* 7E1DC0 80280F40 0C0A02D1 */ jal shop_close_item_select_popup
/* 7E1DC4 80280F44 00000000 */ nop
/* 7E1DC8 80280F48 8E02000C */ lw $v0, 0xC($s0)
/* 7E1DCC 80280F4C 04400012 */ bltz $v0, .L80280F98
/* 7E1DD0 80280F50 00021040 */ sll $v0, $v0, 1
/* 7E1DD4 80280F54 00521021 */ addu $v0, $v0, $s2
/* 7E1DD8 80280F58 844401B4 */ lh $a0, 0x1B4($v0)
/* 7E1DDC 80280F5C 3C028008 */ lui $v0, %hi(gItemTable)
/* 7E1DE0 80280F60 244278E0 */ addiu $v0, $v0, %lo(gItemTable)
/* 7E1DE4 80280F64 00048140 */ sll $s0, $a0, 5
/* 7E1DE8 80280F68 0C0A02DE */ jal shop_get_sell_price
/* 7E1DEC 80280F6C 02028021 */ addu $s0, $s0, $v0
/* 7E1DF0 80280F70 24040008 */ addiu $a0, $zero, 0x8
/* 7E1DF4 80280F74 0040302D */ daddu $a2, $v0, $zero
/* 7E1DF8 80280F78 8E050000 */ lw $a1, 0x0($s0)
/* 7E1DFC 80280F7C 0C0A0022 */ jal shop_owner_buy_dialog
/* 7E1E00 80280F80 2407FFFF */ addiu $a3, $zero, -0x1
/* 7E1E04 80280F84 0C03A546 */ jal show_coin_counter
/* 7E1E08 80280F88 AE220074 */ sw $v0, 0x74($s1)
/* 7E1E0C 80280F8C 24020003 */ addiu $v0, $zero, 0x3
/* 7E1E10 80280F90 080A0505 */ j .L80281414
/* 7E1E14 80280F94 AE220070 */ sw $v0, 0x70($s1)
.L80280F98:
/* 7E1E18 80280F98 0C0A0000 */ jal shop_owner_begin_speech
/* 7E1E1C 80280F9C 24040016 */ addiu $a0, $zero, 0x16
/* 7E1E20 80280FA0 080A04EE */ j .L802813B8
/* 7E1E24 80280FA4 AE220074 */ sw $v0, 0x74($s1)
.L80280FA8:
/* 7E1E28 80280FA8 8E240074 */ lw $a0, 0x74($s1)
/* 7E1E2C 80280FAC 0C0B1059 */ jal does_script_exist
/* 7E1E30 80280FB0 00000000 */ nop
/* 7E1E34 80280FB4 14400118 */ bnez $v0, .L80281418
/* 7E1E38 80280FB8 0000102D */ daddu $v0, $zero, $zero
/* 7E1E3C 80280FBC 3C04001E */ lui $a0, (0x1E0002 >> 16)
D_80280FC0:
/* 7E1E40 80280FC0 34840002 */ ori $a0, $a0, (0x1E0002 & 0xFFFF)
/* 7E1E44 80280FC4 26250078 */ addiu $a1, $s1, 0x78
/* 7E1E48 80280FC8 080A04D5 */ j .L80281354
/* 7E1E4C 80280FCC 2402001F */ addiu $v0, $zero, 0x1F
.L80280FD0:
/* 7E1E50 80280FD0 8E230078 */ lw $v1, 0x78($s1)
/* 7E1E54 80280FD4 24020001 */ addiu $v0, $zero, 0x1
/* 7E1E58 80280FD8 1462010F */ bne $v1, $v0, .L80281418
/* 7E1E5C 80280FDC 0000102D */ daddu $v0, $zero, $zero
/* 7E1E60 80280FE0 3C028028 */ lui $v0, %hi(D_80286538)
/* 7E1E64 80280FE4 8C426538 */ lw $v0, %lo(D_80286538)($v0)
/* 7E1E68 80280FE8 904204E8 */ lbu $v0, 0x4E8($v0)
/* 7E1E6C 80280FEC 1440001D */ bnez $v0, .L80281064
/* 7E1E70 80280FF0 00000000 */ nop
/* 7E1E74 80280FF4 8E02000C */ lw $v0, 0xC($s0)
/* 7E1E78 80280FF8 00021040 */ sll $v0, $v0, 1
/* 7E1E7C 80280FFC 00521021 */ addu $v0, $v0, $s2
/* 7E1E80 80281000 0C0A02DE */ jal shop_get_sell_price
/* 7E1E84 80281004 844401B4 */ lh $a0, 0x1B4($v0)
/* 7E1E88 80281008 0C03A830 */ jal add_coins
/* 7E1E8C 8028100C 0040202D */ daddu $a0, $v0, $zero
/* 7E1E90 80281010 8E02000C */ lw $v0, 0xC($s0)
/* 7E1E94 80281014 00021040 */ sll $v0, $v0, 1
/* 7E1E98 80281018 00521021 */ addu $v0, $v0, $s2
/* 7E1E9C 8028101C 0C039D7B */ jal get_item_count
/* 7E1EA0 80281020 A44001B4 */ sh $zero, 0x1B4($v0)
/* 7E1EA4 80281024 14400009 */ bnez $v0, .L8028104C
/* 7E1EA8 80281028 00000000 */ nop
/* 7E1EAC 8028102C 0C0A00B4 */ jal shop_owner_reset_speech
/* 7E1EB0 80281030 2404000B */ addiu $a0, $zero, 0xB
/* 7E1EB4 80281034 AE220074 */ sw $v0, 0x74($s1)
/* 7E1EB8 80281038 24020009 */ addiu $v0, $zero, 0x9
/* 7E1EBC 8028103C 0C03A5A6 */ jal hide_coin_counter
/* 7E1EC0 80281040 AE220070 */ sw $v0, 0x70($s1)
/* 7E1EC4 80281044 080A0506 */ j .L80281418
/* 7E1EC8 80281048 0000102D */ daddu $v0, $zero, $zero
.L8028104C:
/* 7E1ECC 8028104C 0C0A00B4 */ jal shop_owner_reset_speech
/* 7E1ED0 80281050 2404000A */ addiu $a0, $zero, 0xA
/* 7E1ED4 80281054 AE220074 */ sw $v0, 0x74($s1)
/* 7E1ED8 80281058 24020020 */ addiu $v0, $zero, 0x20
/* 7E1EDC 8028105C 080A0505 */ j .L80281414
/* 7E1EE0 80281060 AE220070 */ sw $v0, 0x70($s1)
.L80281064:
/* 7E1EE4 80281064 0C0A00B4 */ jal shop_owner_reset_speech
/* 7E1EE8 80281068 24040009 */ addiu $a0, $zero, 0x9
/* 7E1EEC 8028106C AE220074 */ sw $v0, 0x74($s1)
/* 7E1EF0 80281070 0C03A5A6 */ jal hide_coin_counter
/* 7E1EF4 80281074 AE330070 */ sw $s3, 0x70($s1)
/* 7E1EF8 80281078 080A0506 */ j .L80281418
/* 7E1EFC 8028107C 0000102D */ daddu $v0, $zero, $zero
.L80281080:
/* 7E1F00 80281080 8E240074 */ lw $a0, 0x74($s1)
/* 7E1F04 80281084 0C0B1059 */ jal does_script_exist
/* 7E1F08 80281088 00000000 */ nop
/* 7E1F0C 8028108C 144000E2 */ bnez $v0, .L80281418
/* 7E1F10 80281090 0000102D */ daddu $v0, $zero, $zero
/* 7E1F14 80281094 3C04001E */ lui $a0, (0x1E0004 >> 16)
/* 7E1F18 80281098 34840004 */ ori $a0, $a0, (0x1E0004 & 0xFFFF)
/* 7E1F1C 8028109C 26250078 */ addiu $a1, $s1, 0x78
/* 7E1F20 802810A0 080A04D5 */ j .L80281354
/* 7E1F24 802810A4 2402000C */ addiu $v0, $zero, 0xC
.L802810A8:
/* 7E1F28 802810A8 8E230078 */ lw $v1, 0x78($s1)
/* 7E1F2C 802810AC 24020001 */ addiu $v0, $zero, 0x1
/* 7E1F30 802810B0 146200D9 */ bne $v1, $v0, .L80281418
/* 7E1F34 802810B4 0000102D */ daddu $v0, $zero, $zero
/* 7E1F38 802810B8 3C028028 */ lui $v0, %hi(D_80286538)
/* 7E1F3C 802810BC 8C426538 */ lw $v0, %lo(D_80286538)($v0)
/* 7E1F40 802810C0 904204E8 */ lbu $v0, 0x4E8($v0)
/* 7E1F44 802810C4 14400009 */ bnez $v0, .L802810EC
/* 7E1F48 802810C8 00000000 */ nop
/* 7E1F4C 802810CC 0C0A00D7 */ jal shop_owner_end_speech
/* 7E1F50 802810D0 00000000 */ nop
/* 7E1F54 802810D4 AE220074 */ sw $v0, 0x74($s1)
/* 7E1F58 802810D8 240200C9 */ addiu $v0, $zero, 0xC9
/* 7E1F5C 802810DC 0C03A5B2 */ jal hide_coin_counter_immediately
/* 7E1F60 802810E0 AE220070 */ sw $v0, 0x70($s1)
/* 7E1F64 802810E4 080A0506 */ j .L80281418
/* 7E1F68 802810E8 0000102D */ daddu $v0, $zero, $zero
.L802810EC:
/* 7E1F6C 802810EC 0C03A5B2 */ jal hide_coin_counter_immediately
/* 7E1F70 802810F0 00000000 */ nop
/* 7E1F74 802810F4 080A04EB */ j .L802813AC
/* 7E1F78 802810F8 00000000 */ nop
.L802810FC:
/* 7E1F7C 802810FC 0C0B1059 */ jal does_script_exist
/* 7E1F80 80281100 8E240074 */ lw $a0, 0x74($s1)
bActorNames:
/* 7E1F84 80281104 144000C4 */ bnez $v0, .L80281418
/* 7E1F88 80281108 0000102D */ daddu $v0, $zero, $zero
/* 7E1F8C 8028110C 0C0A0255 */ jal shop_open_item_select_popup
/* 7E1F90 80281110 24040001 */ addiu $a0, $zero, 0x1
/* 7E1F94 80281114 24020005 */ addiu $v0, $zero, 0x5
/* 7E1F98 80281118 080A0505 */ j .L80281414
/* 7E1F9C 8028111C AE220070 */ sw $v0, 0x70($s1)
.L80281120:
/* 7E1FA0 80281120 0C0A02B1 */ jal shop_update_item_select_popup
/* 7E1FA4 80281124 2604000C */ addiu $a0, $s0, 0xC
/* 7E1FA8 80281128 24030001 */ addiu $v1, $zero, 0x1
/* 7E1FAC 8028112C 144300BA */ bne $v0, $v1, .L80281418
/* 7E1FB0 80281130 0000102D */ daddu $v0, $zero, $zero
/* 7E1FB4 80281134 080A049F */ j .L8028127C
/* 7E1FB8 80281138 24020033 */ addiu $v0, $zero, 0x33
.L8028113C:
/* 7E1FBC 8028113C 8E220074 */ lw $v0, 0x74($s1)
/* 7E1FC0 80281140 1C400055 */ bgtz $v0, .L80281298
/* 7E1FC4 80281144 2442FFFF */ addiu $v0, $v0, -0x1
/* 7E1FC8 80281148 0C0A02D1 */ jal shop_close_item_select_popup
/* 7E1FCC 8028114C 00000000 */ nop
/* 7E1FD0 80281150 8E02000C */ lw $v0, 0xC($s0)
/* 7E1FD4 80281154 0440001C */ bltz $v0, .L802811C8
/* 7E1FD8 80281158 00021040 */ sll $v0, $v0, 1
/* 7E1FDC 8028115C 00521021 */ addu $v0, $v0, $s2
/* 7E1FE0 80281160 0C039DF1 */ jal store_item
/* 7E1FE4 80281164 844401B4 */ lh $a0, 0x1B4($v0)
/* 7E1FE8 80281168 04400005 */ bltz $v0, .L80281180
/* 7E1FEC 8028116C 00000000 */ nop
/* 7E1FF0 80281170 8E02000C */ lw $v0, 0xC($s0)
/* 7E1FF4 80281174 00021040 */ sll $v0, $v0, 1
/* 7E1FF8 80281178 00521021 */ addu $v0, $v0, $s2
/* 7E1FFC 8028117C A44001B4 */ sh $zero, 0x1B4($v0)
.L80281180:
/* 7E2000 80281180 0C039D7B */ jal get_item_count
/* 7E2004 80281184 00000000 */ nop
/* 7E2008 80281188 10400005 */ beqz $v0, .L802811A0
/* 7E200C 8028118C 00000000 */ nop
/* 7E2010 80281190 0C039E12 */ jal get_stored_empty_count
/* 7E2014 80281194 00000000 */ nop
/* 7E2018 80281198 14400005 */ bnez $v0, .L802811B0
/* 7E201C 8028119C 00000000 */ nop
.L802811A0:
/* 7E2020 802811A0 0C0A0000 */ jal shop_owner_begin_speech
/* 7E2024 802811A4 2404000F */ addiu $a0, $zero, 0xF
/* 7E2028 802811A8 080A04EE */ j .L802813B8
/* 7E202C 802811AC AE220074 */ sw $v0, 0x74($s1)
.L802811B0:
/* 7E2030 802811B0 0C0A0000 */ jal shop_owner_begin_speech
/* 7E2034 802811B4 24040010 */ addiu $a0, $zero, 0x10
/* 7E2038 802811B8 AE220074 */ sw $v0, 0x74($s1)
/* 7E203C 802811BC 24020034 */ addiu $v0, $zero, 0x34
/* 7E2040 802811C0 080A0505 */ j .L80281414
/* 7E2044 802811C4 AE220070 */ sw $v0, 0x70($s1)
.L802811C8:
/* 7E2048 802811C8 0C0A0000 */ jal shop_owner_begin_speech
/* 7E204C 802811CC 24040016 */ addiu $a0, $zero, 0x16
/* 7E2050 802811D0 080A04EE */ j .L802813B8
/* 7E2054 802811D4 AE220074 */ sw $v0, 0x74($s1)
.L802811D8:
/* 7E2058 802811D8 8E240074 */ lw $a0, 0x74($s1)
/* 7E205C 802811DC 0C0B1059 */ jal does_script_exist
/* 7E2060 802811E0 00000000 */ nop
/* 7E2064 802811E4 1440008C */ bnez $v0, .L80281418
/* 7E2068 802811E8 0000102D */ daddu $v0, $zero, $zero
/* 7E206C 802811EC 3C04001E */ lui $a0, (0x1E0005 >> 16)
/* 7E2070 802811F0 34840005 */ ori $a0, $a0, (0x1E0005 & 0xFFFF)
/* 7E2074 802811F4 26250078 */ addiu $a1, $s1, 0x78
/* 7E2078 802811F8 080A04D5 */ j .L80281354
/* 7E207C 802811FC 24020035 */ addiu $v0, $zero, 0x35
.L80281200:
/* 7E2080 80281200 8E230078 */ lw $v1, 0x78($s1)
/* 7E2084 80281204 24020001 */ addiu $v0, $zero, 0x1
/* 7E2088 80281208 14620083 */ bne $v1, $v0, .L80281418
/* 7E208C 8028120C 0000102D */ daddu $v0, $zero, $zero
/* 7E2090 80281210 3C028028 */ lui $v0, %hi(D_80286538)
/* 7E2094 80281214 8C426538 */ lw $v0, %lo(D_80286538)($v0)
/* 7E2098 80281218 904204E8 */ lbu $v0, 0x4E8($v0)
/* 7E209C 8028121C 14400063 */ bnez $v0, .L802813AC
/* 7E20A0 80281220 00000000 */ nop
/* 7E20A4 80281224 0C0A00D7 */ jal shop_owner_end_speech
/* 7E20A8 80281228 00000000 */ nop
/* 7E20AC 8028122C AE220074 */ sw $v0, 0x74($s1)
.L80281230:
/* 7E20B0 80281230 240201F5 */ addiu $v0, $zero, 0x1F5
/* 7E20B4 80281234 080A0505 */ j .L80281414
/* 7E20B8 80281238 AE220070 */ sw $v0, 0x70($s1)
.L8028123C:
/* 7E20BC 8028123C 8E240074 */ lw $a0, 0x74($s1)
/* 7E20C0 80281240 0C0B1059 */ jal does_script_exist
/* 7E20C4 80281244 00000000 */ nop
/* 7E20C8 80281248 14400073 */ bnez $v0, .L80281418
/* 7E20CC 8028124C 0000102D */ daddu $v0, $zero, $zero
/* 7E20D0 80281250 0C0A0255 */ jal shop_open_item_select_popup
/* 7E20D4 80281254 24040002 */ addiu $a0, $zero, 0x2
/* 7E20D8 80281258 24020007 */ addiu $v0, $zero, 0x7
/* 7E20DC 8028125C 080A0505 */ j .L80281414
/* 7E20E0 80281260 AE220070 */ sw $v0, 0x70($s1)
.L80281264:
/* 7E20E4 80281264 0C0A02B1 */ jal shop_update_item_select_popup
/* 7E20E8 80281268 2604000C */ addiu $a0, $s0, 0xC
/* 7E20EC 8028126C 24030001 */ addiu $v1, $zero, 0x1
/* 7E20F0 80281270 14430069 */ bne $v0, $v1, .L80281418
/* 7E20F4 80281274 0000102D */ daddu $v0, $zero, $zero
/* 7E20F8 80281278 24020047 */ addiu $v0, $zero, 0x47
.L8028127C:
/* 7E20FC 8028127C AE220070 */ sw $v0, 0x70($s1)
/* 7E2100 80281280 2402000F */ addiu $v0, $zero, 0xF
/* 7E2104 80281284 080A0505 */ j .L80281414
/* 7E2108 80281288 AE220074 */ sw $v0, 0x74($s1)
.L8028128C:
/* 7E210C 8028128C 8E220074 */ lw $v0, 0x74($s1)
/* 7E2110 80281290 18400003 */ blez $v0, .L802812A0
/* 7E2114 80281294 2442FFFF */ addiu $v0, $v0, -0x1
.L80281298:
/* 7E2118 80281298 080A0505 */ j .L80281414
/* 7E211C 8028129C AE220074 */ sw $v0, 0x74($s1)
.L802812A0:
/* 7E2120 802812A0 0C0A02D1 */ jal shop_close_item_select_popup
/* 7E2124 802812A4 00000000 */ nop
/* 7E2128 802812A8 8E02000C */ lw $v0, 0xC($s0)
/* 7E212C 802812AC 0440001C */ bltz $v0, .L80281320
/* 7E2130 802812B0 00021040 */ sll $v0, $v0, 1
/* 7E2134 802812B4 00521021 */ addu $v0, $v0, $s2
/* 7E2138 802812B8 0C039D5D */ jal add_item
/* 7E213C 802812BC 844401C8 */ lh $a0, 0x1C8($v0)
/* 7E2140 802812C0 04400005 */ bltz $v0, .L802812D8
/* 7E2144 802812C4 00000000 */ nop
/* 7E2148 802812C8 8E02000C */ lw $v0, 0xC($s0)
/* 7E214C 802812CC 00021040 */ sll $v0, $v0, 1
/* 7E2150 802812D0 00521021 */ addu $v0, $v0, $s2
/* 7E2154 802812D4 A44001C8 */ sh $zero, 0x1C8($v0)
.L802812D8:
/* 7E2158 802812D8 0C039D88 */ jal get_item_empty_count
/* 7E215C 802812DC 00000000 */ nop
/* 7E2160 802812E0 10400005 */ beqz $v0, .L802812F8
/* 7E2164 802812E4 00000000 */ nop
/* 7E2168 802812E8 0C039E05 */ jal get_stored_count
/* 7E216C 802812EC 00000000 */ nop
/* 7E2170 802812F0 14400005 */ bnez $v0, .L80281308
/* 7E2174 802812F4 00000000 */ nop
.L802812F8:
/* 7E2178 802812F8 0C0A0000 */ jal shop_owner_begin_speech
/* 7E217C 802812FC 24040014 */ addiu $a0, $zero, 0x14
/* 7E2180 80281300 080A04EE */ j .L802813B8
/* 7E2184 80281304 AE220074 */ sw $v0, 0x74($s1)
.L80281308:
/* 7E2188 80281308 0C0A0000 */ jal shop_owner_begin_speech
/* 7E218C 8028130C 24040015 */ addiu $a0, $zero, 0x15
/* 7E2190 80281310 AE220074 */ sw $v0, 0x74($s1)
/* 7E2194 80281314 24020048 */ addiu $v0, $zero, 0x48
/* 7E2198 80281318 080A0505 */ j .L80281414
/* 7E219C 8028131C AE220070 */ sw $v0, 0x70($s1)
.L80281320:
/* 7E21A0 80281320 0C0A0000 */ jal shop_owner_begin_speech
/* 7E21A4 80281324 24040016 */ addiu $a0, $zero, 0x16
/* 7E21A8 80281328 080A04EE */ j .L802813B8
/* 7E21AC 8028132C AE220074 */ sw $v0, 0x74($s1)
.L80281330:
/* 7E21B0 80281330 8E240074 */ lw $a0, 0x74($s1)
/* 7E21B4 80281334 0C0B1059 */ jal does_script_exist
/* 7E21B8 80281338 00000000 */ nop
/* 7E21BC 8028133C 14400036 */ bnez $v0, .L80281418
/* 7E21C0 80281340 0000102D */ daddu $v0, $zero, $zero
/* 7E21C4 80281344 3C04001E */ lui $a0, (0x1E0005 >> 16)
/* 7E21C8 80281348 34840005 */ ori $a0, $a0, (0x1E0005 & 0xFFFF)
/* 7E21CC 8028134C 26250078 */ addiu $a1, $s1, 0x78
/* 7E21D0 80281350 24020049 */ addiu $v0, $zero, 0x49
.L80281354:
/* 7E21D4 80281354 AE220070 */ sw $v0, 0x70($s1)
/* 7E21D8 80281358 0C049640 */ jal msg_get_printer_for_msg
/* 7E21DC 8028135C AE200078 */ sw $zero, 0x78($s1)
/* 7E21E0 80281360 3C018028 */ lui $at, %hi(D_80286538)
/* 7E21E4 80281364 AC226538 */ sw $v0, %lo(D_80286538)($at)
/* 7E21E8 80281368 080A0506 */ j .L80281418
/* 7E21EC 8028136C 0000102D */ daddu $v0, $zero, $zero
.L80281370:
/* 7E21F0 80281370 8E230078 */ lw $v1, 0x78($s1)
/* 7E21F4 80281374 24020001 */ addiu $v0, $zero, 0x1
/* 7E21F8 80281378 14620027 */ bne $v1, $v0, .L80281418
/* 7E21FC 8028137C 0000102D */ daddu $v0, $zero, $zero
/* 7E2200 80281380 3C028028 */ lui $v0, %hi(D_80286538)
/* 7E2204 80281384 8C426538 */ lw $v0, %lo(D_80286538)($v0)
/* 7E2208 80281388 904204E8 */ lbu $v0, 0x4E8($v0)
/* 7E220C 8028138C 14400007 */ bnez $v0, .L802813AC
/* 7E2210 80281390 00000000 */ nop
/* 7E2214 80281394 0C0A00D7 */ jal shop_owner_end_speech
/* 7E2218 80281398 00000000 */ nop
/* 7E221C 8028139C AE220074 */ sw $v0, 0x74($s1)
.L802813A0:
/* 7E2220 802813A0 240202BD */ addiu $v0, $zero, 0x2BD
/* 7E2224 802813A4 080A0505 */ j .L80281414
/* 7E2228 802813A8 AE220070 */ sw $v0, 0x70($s1)
.L802813AC:
/* 7E222C 802813AC 0C0A00B4 */ jal shop_owner_reset_speech
/* 7E2230 802813B0 24040016 */ addiu $a0, $zero, 0x16
/* 7E2234 802813B4 AE220074 */ sw $v0, 0x74($s1)
.L802813B8:
/* 7E2238 802813B8 24020009 */ addiu $v0, $zero, 0x9
/* 7E223C 802813BC 080A0505 */ j .L80281414
/* 7E2240 802813C0 AE220070 */ sw $v0, 0x70($s1)
.L802813C4:
/* 7E2244 802813C4 8E240074 */ lw $a0, 0x74($s1)
/* 7E2248 802813C8 0C0B1059 */ jal does_script_exist
/* 7E224C 802813CC 00000000 */ nop
/* 7E2250 802813D0 14400011 */ bnez $v0, .L80281418
/* 7E2254 802813D4 0000102D */ daddu $v0, $zero, $zero
/* 7E2258 802813D8 2402000A */ addiu $v0, $zero, 0xA
/* 7E225C 802813DC 080A0505 */ j .L80281414
/* 7E2260 802813E0 AE220070 */ sw $v0, 0x70($s1)
.L802813E4:
/* 7E2264 802813E4 8E020010 */ lw $v0, 0x10($s0)
/* 7E2268 802813E8 10400006 */ beqz $v0, .L80281404
/* 7E226C 802813EC 00000000 */ nop
/* 7E2270 802813F0 8C440014 */ lw $a0, 0x14($v0)
/* 7E2274 802813F4 10800003 */ beqz $a0, .L80281404
/* 7E2278 802813F8 24050001 */ addiu $a1, $zero, 0x1
/* 7E227C 802813FC 0C0B0CF8 */ jal start_script
/* 7E2280 80281400 0000302D */ daddu $a2, $zero, $zero
.L80281404:
/* 7E2284 80281404 0C03A5E3 */ jal open_status_bar_short
/* 7E2288 80281408 00000000 */ nop
/* 7E228C 8028140C 080A0506 */ j .L80281418
/* 7E2290 80281410 24020001 */ addiu $v0, $zero, 0x1
.L80281414:
/* 7E2294 80281414 0000102D */ daddu $v0, $zero, $zero
.L80281418:
/* 7E2298 80281418 8FBF0020 */ lw $ra, 0x20($sp)
/* 7E229C 8028141C 8FB3001C */ lw $s3, 0x1C($sp)
/* 7E22A0 80281420 8FB20018 */ lw $s2, 0x18($sp)
/* 7E22A4 80281424 8FB10014 */ lw $s1, 0x14($sp)
/* 7E22A8 80281428 8FB00010 */ lw $s0, 0x10($sp)
/* 7E22AC 8028142C 03E00008 */ jr $ra
/* 7E22B0 80281430 27BD0028 */ addiu $sp, $sp, 0x28
### DECOMPILED C INSTRUCTIONS:
API_CALLABLE(ShowShopOwnerDialog) {
GameStatus* gameStatus = gGameStatusPtr;
PlayerData* playerData = &gPlayerData;
Shop* shop = gameStatus->mapShop;
static MessagePrintState* D_80286538;
enum {
DIALOG_STATE_DONE_INSTRUCTIONS = 0,
DIALOG_STATE_AWAIT_GREETING = 4,
DIALOG_STATE_AWAIT_MAIN_MENU = 41,
DIALOG_STATE_CLOSED_MAIN_MENU = 42,
DIALOG_STATE_CLOSED_SUBMENU = 9,
DIALOG_STATE_DONE = 10,
// selling
DIALOG_STATE_INIT_SELL_CHOICE = 201,
DIALOG_STATE_AWAIT_SELL_CHOICE = 2,
DIALOG_STATE_INIT_SELL_CONFIRM = 21,
DIALOG_STATE_AWAIT_SELL_CONFIRM = 3,
DIALOG_STATE_HANDLE_SELL_CHOICE = 31,
DIALOG_STATE_INIT_SELL_MORE_CHOICE = 32,
DIALOG_STATE_AWAIT_SELL_MORE_CHOICE = 12,
// checking
DIALOG_STATE_INIT_CHECK_CHOICE = 501,
DIALOG_STATE_AWAIT_CHECK_CHOICE = 5,
DIALOG_STATE_HANDLE_CHECK_CHOICE = 51,
DIALOG_STATE_INIT_CHECK_MORE_CHOICE = 52,
DIALOG_STATE_AWAIT_CHECK_MORE_CHOICE = 53,
// claiming
DIALOG_STATE_INIT_CLAIM_CHOICE = 701,
DIALOG_STATE_AWAIT_CLAIM_CHOICE = 7,
DIALOG_STATE_HANDLE_CLAIM_CHOICE = 71,
DIALOG_STATE_INIT_CLAIM_MORE_CHOICE = 72,
DIALOG_STATE_AWAIT_CLAIM_MORE_CHOICE = 73,
};
if (isInitialCall) {
script->functionTemp[1] = shop_owner_begin_speech(SHOP_MSG_GREETING);
script->functionTemp[0] = DIALOG_STATE_AWAIT_GREETING;
}
switch (script->functionTemp[0]) {
case DIALOG_STATE_AWAIT_GREETING:
if (!does_script_exist(script->functionTemp[1])) {
script->functionTemp[0] = DIALOG_STATE_AWAIT_MAIN_MENU;
script->functionTemp[2] = 0;
D_80286538 = msg_get_printer_for_msg(MSG_Choice_0003, &script->functionTemp[2]);
}
break;
case DIALOG_STATE_AWAIT_MAIN_MENU:
if (script->functionTemp[2] == 1) {
switch (D_80286538->currentOption) {
case 0:
script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_INSTRUCTIONS);
script->functionTemp[0] = DIALOG_STATE_DONE_INSTRUCTIONS;
break;
case 1:
if (get_item_count() == 0) {
script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_NOTHING_TO_SELL);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
} else {
script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_SELL_WHICH);
script->functionTemp[0] = DIALOG_STATE_INIT_SELL_CHOICE;
}
break;
case 2:
if (get_item_count() == 0) {
script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_NOTHING_TO_CHECK);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
break;
}
if (get_stored_empty_count() == 0) {
script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_NO_CHECK_ROOM);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
break;
}
script->functionTemp[1] = shop_owner_continue_speech_with_quantity(SHOP_MSG_CHECK_WHICH, get_stored_empty_count());
script->functionTemp[0] = DIALOG_STATE_INIT_CHECK_CHOICE;
break;
case 3:
if (get_stored_count() == 0) {
script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_NOTHING_TO_CLAIM);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
break;
}
if (get_item_empty_count() == 0) {
script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_NO_CLAIM_ROOM);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
break;
}
script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_CLAIM_WHICH);
script->functionTemp[0] = DIALOG_STATE_INIT_CLAIM_CHOICE;
break;
default:
script->functionTemp[1] = shop_owner_end_speech();
script->functionTemp[0] = DIALOG_STATE_CLOSED_MAIN_MENU;
break;
}
}
break;
case DIALOG_STATE_INIT_SELL_CHOICE:
if (!does_script_exist(script->functionTemp[1])) {
shop_open_item_select_popup(0);
script->functionTemp[0] = DIALOG_STATE_AWAIT_SELL_CHOICE;
}
break;
case DIALOG_STATE_AWAIT_SELL_CHOICE:
if (shop_update_item_select_popup(&shop->selectedStoreItemSlot) == 1) {
script->functionTemp[0] = DIALOG_STATE_INIT_SELL_CONFIRM;
script->functionTemp[1] = 15;
}
break;
case DIALOG_STATE_INIT_SELL_CONFIRM:
if (script->functionTemp[1] > 0) {
script->functionTemp[1]--;
break;
}
shop_close_item_select_popup();
if (shop->selectedStoreItemSlot >= 0) {
ItemData* itemData = &gItemTable[playerData->invItems[shop->selectedStoreItemSlot]];
script->functionTemp[1] = shop_owner_buy_dialog(SHOP_MSG_SELL_CONFIRM, itemData->nameMsg, shop_get_sell_price(playerData->invItems[shop->selectedStoreItemSlot]), -1);
show_coin_counter();
script->functionTemp[0] = DIALOG_STATE_AWAIT_SELL_CONFIRM;
} else {
script->functionTemp[1] = shop_owner_begin_speech(SHOP_MSG_FAREWELL);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
}
break;
case DIALOG_STATE_AWAIT_SELL_CONFIRM:
if (!does_script_exist(script->functionTemp[1])) {
script->functionTemp[0] = DIALOG_STATE_HANDLE_SELL_CHOICE;
script->functionTemp[2] = 0;
D_80286538 = msg_get_printer_for_msg(MSG_Choice_0002, &script->functionTemp[2]);
}
break;
case DIALOG_STATE_HANDLE_SELL_CHOICE:
if (script->functionTemp[2] == 1) {
if (D_80286538->currentOption == 0) {
add_coins(shop_get_sell_price(playerData->invItems[shop->selectedStoreItemSlot]));
playerData->invItems[shop->selectedStoreItemSlot] = 0;
if (get_item_count() == 0) {
script->functionTemp[1] = shop_owner_reset_speech(SHOP_MSG_SELL_THANKS);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
hide_coin_counter();
} else {
script->functionTemp[1] = shop_owner_reset_speech(SHOP_MSG_SELL_MORE);
script->functionTemp[0] = DIALOG_STATE_INIT_SELL_MORE_CHOICE;
}
} else {
script->functionTemp[1] = shop_owner_reset_speech(SHOP_MSG_SELL_CANCEL);
script->functionTemp[0] = DIALOG_STATE_INIT_SELL_MORE_CHOICE;
hide_coin_counter();
}
}
break;
case DIALOG_STATE_INIT_SELL_MORE_CHOICE:
if (!does_script_exist(script->functionTemp[1])) {
script->functionTemp[0] = DIALOG_STATE_AWAIT_SELL_MORE_CHOICE;
script->functionTemp[2] = 0;
D_80286538 = msg_get_printer_for_msg(MSG_Choice_0004, &script->functionTemp[2]);
}
break;
case DIALOG_STATE_AWAIT_SELL_MORE_CHOICE:
if (script->functionTemp[2] == 1) {
if (D_80286538->currentOption == 0) {
script->functionTemp[1] = shop_owner_end_speech();
script->functionTemp[0] = DIALOG_STATE_INIT_SELL_CHOICE;
hide_coin_counter_immediately();
} else {
hide_coin_counter_immediately();
script->functionTemp[1] = shop_owner_reset_speech(22);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
}
}
break;
case DIALOG_STATE_INIT_CHECK_CHOICE:
if (does_script_exist(script->functionTemp[1]) == 0) {
shop_open_item_select_popup(1);
script->functionTemp[0] = DIALOG_STATE_AWAIT_CHECK_CHOICE;
}
break;
case DIALOG_STATE_AWAIT_CHECK_CHOICE:
if (shop_update_item_select_popup(&shop->selectedStoreItemSlot) == 1) {
script->functionTemp[0] = DIALOG_STATE_HANDLE_CHECK_CHOICE;
script->functionTemp[1] = 15;
}
break;
case DIALOG_STATE_HANDLE_CHECK_CHOICE:
if (script->functionTemp[1] > 0) {
script->functionTemp[1]--;
break;
}
shop_close_item_select_popup();
if (shop->selectedStoreItemSlot >= 0) {
if (store_item(playerData->invItems[shop->selectedStoreItemSlot]) >= 0) {
playerData->invItems[shop->selectedStoreItemSlot] = 0;
}
if ((get_item_count() == 0) || (get_stored_empty_count() == 0)) {
script->functionTemp[1] = shop_owner_begin_speech(SHOP_MSG_CHECK_ACCEPTED);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
} else {
script->functionTemp[1] = shop_owner_begin_speech(SHOP_MSG_CHECK_MORE);
script->functionTemp[0] = DIALOG_STATE_INIT_CHECK_MORE_CHOICE;
}
} else {
script->functionTemp[1] = shop_owner_begin_speech(SHOP_MSG_FAREWELL);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
}
break;
case DIALOG_STATE_INIT_CHECK_MORE_CHOICE:
if (!does_script_exist(script->functionTemp[1])) {
script->functionTemp[0] = DIALOG_STATE_AWAIT_CHECK_MORE_CHOICE;
script->functionTemp[2] = 0;
D_80286538 = msg_get_printer_for_msg(MSG_Choice_0005, &script->functionTemp[2]);
}
break;
case DIALOG_STATE_AWAIT_CHECK_MORE_CHOICE:
if (script->functionTemp[2] == 1) {
if (D_80286538->currentOption == 0) {
script->functionTemp[1] = shop_owner_end_speech();
script->functionTemp[0] = DIALOG_STATE_INIT_CHECK_CHOICE;
} else {
script->functionTemp[1] = shop_owner_reset_speech(SHOP_MSG_FAREWELL);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
}
}
break;
case DIALOG_STATE_INIT_CLAIM_CHOICE:
if (!does_script_exist(script->functionTemp[1])) {
shop_open_item_select_popup(2);
script->functionTemp[0] = DIALOG_STATE_AWAIT_CLAIM_CHOICE;
}
break;
case DIALOG_STATE_AWAIT_CLAIM_CHOICE:
if (shop_update_item_select_popup(&shop->selectedStoreItemSlot) == 1) {
script->functionTemp[0] = DIALOG_STATE_HANDLE_CLAIM_CHOICE;
script->functionTemp[1] = 15;
}
break;
case DIALOG_STATE_HANDLE_CLAIM_CHOICE:
if (script->functionTemp[1] > 0) {
script->functionTemp[1]--;
break;
}
shop_close_item_select_popup();
if (shop->selectedStoreItemSlot >= 0) {
if (add_item(playerData->storedItems[shop->selectedStoreItemSlot]) >= 0) {
playerData->storedItems[shop->selectedStoreItemSlot] = 0;
}
if (get_item_empty_count() == 0 || get_stored_count() == 0) {
script->functionTemp[1] = shop_owner_begin_speech(SHOP_MSG_CLAIM_ACCEPTED);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
} else {
script->functionTemp[1] = shop_owner_begin_speech(SHOP_MSG_CLAIM_MORE);
script->functionTemp[0] = DIALOG_STATE_INIT_CLAIM_MORE_CHOICE;
}
} else {
script->functionTemp[1] = shop_owner_begin_speech(SHOP_MSG_FAREWELL);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
}
break;
case DIALOG_STATE_INIT_CLAIM_MORE_CHOICE:
if (!does_script_exist(script->functionTemp[1])) {
script->functionTemp[0] = DIALOG_STATE_AWAIT_CLAIM_MORE_CHOICE;
script->functionTemp[2] = 0;
D_80286538 = msg_get_printer_for_msg(MSG_Choice_0005, &script->functionTemp[2]);
}
break;
case DIALOG_STATE_AWAIT_CLAIM_MORE_CHOICE:
if (script->functionTemp[2] == 1) {
if (D_80286538->currentOption == 0) {
script->functionTemp[1] = shop_owner_end_speech();
script->functionTemp[0] = DIALOG_STATE_INIT_CLAIM_CHOICE;
} else {
script->functionTemp[1] = shop_owner_reset_speech(SHOP_MSG_FAREWELL);
script->functionTemp[0] = DIALOG_STATE_CLOSED_SUBMENU;
}
}
break;
case DIALOG_STATE_DONE_INSTRUCTIONS:
case DIALOG_STATE_CLOSED_SUBMENU:
case DIALOG_STATE_CLOSED_MAIN_MENU:
if (!does_script_exist(script->functionTemp[1])) {
script->functionTemp[0] = DIALOG_STATE_DONE;
}
break;
case DIALOG_STATE_DONE:
if (shop->owner != NULL) {
if (shop->owner->onTalkEvt != 0) {
start_script(shop->owner->onTalkEvt, EVT_PRIORITY_1, 0);
}
}
open_status_bar_short();
return ApiStatus_DONE1;
}
return ApiStatus_BLOCK;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_80249804
/* 1780E4 80249804 27BDFF88 */ addiu $sp, $sp, -0x78
/* 1780E8 80249808 AFB1003C */ sw $s1, 0x3C($sp)
.L8024980C:
/* 1780EC 8024980C 00A0882D */ daddu $s1, $a1, $zero
/* 1780F0 80249810 AFB00038 */ sw $s0, 0x38($sp)
/* 1780F4 80249814 3C10800B */ lui $s0, %hi(gCameras + 0x558)
/* 1780F8 80249818 261022D8 */ addiu $s0, $s0, %lo(gCameras + 0x558)
D_8024981C:
/* 1780FC 8024981C 3C02802A */ lui $v0, %hi(BattleCam_TargetActor)
/* 178100 80249820 9442F27C */ lhu $v0, %lo(BattleCam_TargetActor)($v0)
/* 178104 80249824 3C04800E */ lui $a0, %hi(gBattleStatus)
glabel func_80249828
/* 178108 80249828 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 17810C 8024982C AFBF0040 */ sw $ra, 0x40($sp)
/* 178110 80249830 F7BE0070 */ sdc1 $f30, 0x70($sp)
/* 178114 80249834 F7BC0068 */ sdc1 $f28, 0x68($sp)
/* 178118 80249838 F7BA0060 */ sdc1 $f26, 0x60($sp)
/* 17811C 8024983C F7B80058 */ sdc1 $f24, 0x58($sp)
/* 178120 80249840 F7B60050 */ sdc1 $f22, 0x50($sp)
/* 178124 80249844 F7B40048 */ sdc1 $f20, 0x48($sp)
/* 178128 80249848 30430700 */ andi $v1, $v0, 0x700
/* 17812C 8024984C 304500FF */ andi $a1, $v0, 0xFF
.L80249850:
/* 178130 80249850 24020100 */ addiu $v0, $zero, 0x100
D_80249854:
/* 178134 80249854 10620065 */ beq $v1, $v0, .L802499EC
/* 178138 80249858 28620101 */ slti $v0, $v1, 0x101
/* 17813C 8024985C 10400005 */ beqz $v0, .L80249874
/* 178140 80249860 24020200 */ addiu $v0, $zero, 0x200
/* 178144 80249864 10600007 */ beqz $v1, .L80249884
.L80249868:
/* 178148 80249868 0000102D */ daddu $v0, $zero, $zero
/* 17814C 8024986C 0809287A */ j .L8024A1E8
dgb_01_img2_gfx:
/* 178150 80249870 00000000 */ nop
.L80249874:
/* 178154 80249874 106200B8 */ beq $v1, $v0, .L80249B58
/* 178158 80249878 0000102D */ daddu $v0, $zero, $zero
D_8024987C:
/* 17815C 8024987C 0809287A */ j .L8024A1E8
/* 178160 80249880 00000000 */ nop
.L80249884:
/* 178164 80249884 8C8400D8 */ lw $a0, 0xD8($a0)
/* 178168 80249888 10800257 */ beqz $a0, .L8024A1E8
/* 17816C 8024988C 00000000 */ nop
/* 178170 80249890 C4980144 */ lwc1 $f24, 0x144($a0)
/* 178174 80249894 90830191 */ lbu $v1, 0x191($a0)
glabel func_80249898
/* 178178 80249898 C490014C */ lwc1 $f16, 0x14C($a0)
/* 17817C 8024989C 00031042 */ srl $v0, $v1, 1
/* 178180 802498A0 44820000 */ mtc1 $v0, $f0
/* 178184 802498A4 00000000 */ nop
D_802498A8:
/* 178188 802498A8 46800020 */ cvt.s.w $f0, $f0
/* 17818C 802498AC E7B00018 */ swc1 $f16, 0x18($sp)
/* 178190 802498B0 C4820148 */ lwc1 $f2, 0x148($a0)
/* 178194 802498B4 00031082 */ srl $v0, $v1, 2
/* 178198 802498B8 46001080 */ add.s $f2, $f2, $f0
.L802498BC:
/* 17819C 802498BC 44820000 */ mtc1 $v0, $f0
/* 1781A0 802498C0 00000000 */ nop
D_802498C4:
/* 1781A4 802498C4 46800020 */ cvt.s.w $f0, $f0
/* 1781A8 802498C8 90820190 */ lbu $v0, 0x190($a0)
/* 1781AC 802498CC 46001500 */ add.s $f20, $f2, $f0
D_802498D0:
/* 1781B0 802498D0 4483D000 */ mtc1 $v1, $f26
D_802498D4:
/* 1781B4 802498D4 00000000 */ nop
D_802498D8:
/* 1781B8 802498D8 4680D6A0 */ cvt.s.w $f26, $f26
D_802498DC:
/* 1781BC 802498DC 4482B000 */ mtc1 $v0, $f22
D_802498E0:
/* 1781C0 802498E0 00000000 */ nop
D_802498E4:
/* 1781C4 802498E4 4680B5A0 */ cvt.s.w $f22, $f22
D_802498E8:
/* 1781C8 802498E8 4616D000 */ add.s $f0, $f26, $f22
D_802498EC:
/* 1781CC 802498EC 3C013F00 */ lui $at, (0x3F000000 >> 16)
dgb_01_img3_png:
/* 1781D0 802498F0 4481E000 */ mtc1 $at, $f28
D_802498F4:
/* 1781D4 802498F4 00000000 */ nop
D_802498F8:
/* 1781D8 802498F8 461C0002 */ mul.s $f0, $f0, $f28
D_802498FC:
/* 1781DC 802498FC 00000000 */ nop
D_80249900:
/* 1781E0 80249900 84840428 */ lh $a0, 0x428($a0)
D_80249904:
/* 1781E4 80249904 0C09A75B */ jal get_actor
D_80249908:
/* 1781E8 80249908 E7A0002C */ swc1 $f0, 0x2C($sp)
D_8024990C:
/* 1781EC 8024990C 0040202D */ daddu $a0, $v0, $zero
D_80249910:
/* 1781F0 80249910 10800235 */ beqz $a0, .L8024A1E8
D_80249914:
/* 1781F4 80249914 0000102D */ daddu $v0, $zero, $zero
/* 1781F8 80249918 90830191 */ lbu $v1, 0x191($a0)
/* 1781FC 8024991C C4820148 */ lwc1 $f2, 0x148($a0)
.L80249920:
/* 178200 80249920 00031042 */ srl $v0, $v1, 1
/* 178204 80249924 44820000 */ mtc1 $v0, $f0
/* 178208 80249928 00000000 */ nop
/* 17820C 8024992C 46800020 */ cvt.s.w $f0, $f0
glabel func_80249930
/* 178210 80249930 46001080 */ add.s $f2, $f2, $f0
D_80249934:
/* 178214 80249934 00031082 */ srl $v0, $v1, 2
.L80249938:
/* 178218 80249938 44820000 */ mtc1 $v0, $f0
/* 17821C 8024993C 00000000 */ nop
.L80249940:
/* 178220 80249940 46800020 */ cvt.s.w $f0, $f0
/* 178224 80249944 46001080 */ add.s $f2, $f2, $f0
.L80249948:
/* 178228 80249948 E7A20024 */ swc1 $f2, 0x24($sp)
.L8024994C:
/* 17822C 8024994C C4920144 */ lwc1 $f18, 0x144($a0)
.L80249950:
/* 178230 80249950 E7B20020 */ swc1 $f18, 0x20($sp)
.L80249954:
/* 178234 80249954 C490014C */ lwc1 $f16, 0x14C($a0)
glabel func_80249958
/* 178238 80249958 E7B00028 */ swc1 $f16, 0x28($sp)
D_8024995C:
/* 17823C 8024995C 90820190 */ lbu $v0, 0x190($a0)
D_80249960:
/* 178240 80249960 46189001 */ sub.s $f0, $f18, $f24
/* 178244 80249964 00621821 */ addu $v1, $v1, $v0
glabel func_80249968
/* 178248 80249968 00031843 */ sra $v1, $v1, 1
/* 17824C 8024996C 461C0002 */ mul.s $f0, $f0, $f28
glabel func_80249970
/* 178250 80249970 00000000 */ nop
/* 178254 80249974 44839000 */ mtc1 $v1, $f18
/* 178258 80249978 00000000 */ nop
glabel func_8024997C
/* 17825C 8024997C 468094A0 */ cvt.s.w $f18, $f18
D_80249980:
/* 178260 80249980 3C03802A */ lui $v1, %hi(BattleCam_ModeY)
D_80249984:
/* 178264 80249984 8063F2A2 */ lb $v1, %lo(BattleCam_ModeY)($v1)
D_80249988:
/* 178268 80249988 E7B20030 */ swc1 $f18, 0x30($sp)
/* 17826C 8024998C 0460000B */ bltz $v1, .L802499BC
/* 178270 80249990 4600C780 */ add.s $f30, $f24, $f0
/* 178274 80249994 506000C6 */ beql $v1, $zero, .L80249CB0
/* 178278 80249998 4600A706 */ mov.s $f28, $f20
/* 17827C 8024999C 4602A001 */ sub.s $f0, $f20, $f2
/* 178280 802499A0 461C0082 */ mul.s $f2, $f0, $f28
/* 178284 802499A4 00000000 */ nop
D_802499A8:
/* 178288 802499A8 C7B00024 */ lwc1 $f16, 0x24($sp)
/* 17828C 802499AC 3C0140C0 */ lui $at, (0x40C00000 >> 16)
/* 178290 802499B0 44812000 */ mtc1 $at, $f4
/* 178294 802499B4 08092725 */ j .L80249C94
/* 178298 802499B8 46028080 */ add.s $f2, $f16, $f2
.L802499BC:
/* 17829C 802499BC 2402FFFF */ addiu $v0, $zero, -0x1
/* 1782A0 802499C0 106200BA */ beq $v1, $v0, .L80249CAC
/* 1782A4 802499C4 00000000 */ nop
/* 1782A8 802499C8 C7B20024 */ lwc1 $f18, 0x24($sp)
.L802499CC:
/* 1782AC 802499CC 46149001 */ sub.s $f0, $f18, $f20
/* 1782B0 802499D0 3C013E80 */ lui $at, (0x3E800000 >> 16)
/* 1782B4 802499D4 44811000 */ mtc1 $at, $f2
/* 1782B8 802499D8 00000000 */ nop
/* 1782BC 802499DC 46020002 */ mul.s $f0, $f0, $f2
/* 1782C0 802499E0 00000000 */ nop
/* 1782C4 802499E4 0809272C */ j .L80249CB0
/* 1782C8 802499E8 4600A700 */ add.s $f28, $f20, $f0
.L802499EC:
/* 1782CC 802499EC 8C8400DC */ lw $a0, 0xDC($a0)
/* 1782D0 802499F0 108001FD */ beqz $a0, .L8024A1E8
/* 1782D4 802499F4 0000102D */ daddu $v0, $zero, $zero
/* 1782D8 802499F8 C4980144 */ lwc1 $f24, 0x144($a0)
D_802499FC:
/* 1782DC 802499FC 90830191 */ lbu $v1, 0x191($a0)
/* 1782E0 80249A00 C490014C */ lwc1 $f16, 0x14C($a0)
/* 1782E4 80249A04 00031042 */ srl $v0, $v1, 1
.L80249A08:
/* 1782E8 80249A08 44820000 */ mtc1 $v0, $f0
/* 1782EC 80249A0C 00000000 */ nop
/* 1782F0 80249A10 46800020 */ cvt.s.w $f0, $f0
/* 1782F4 80249A14 E7B00018 */ swc1 $f16, 0x18($sp)
/* 1782F8 80249A18 C4820148 */ lwc1 $f2, 0x148($a0)
/* 1782FC 80249A1C 00031082 */ srl $v0, $v1, 2
.L80249A20:
/* 178300 80249A20 46001080 */ add.s $f2, $f2, $f0
/* 178304 80249A24 44820000 */ mtc1 $v0, $f0
/* 178308 80249A28 00000000 */ nop
/* 17830C 80249A2C 46800020 */ cvt.s.w $f0, $f0
/* 178310 80249A30 90820190 */ lbu $v0, 0x190($a0)
/* 178314 80249A34 46001500 */ add.s $f20, $f2, $f0
/* 178318 80249A38 4483D000 */ mtc1 $v1, $f26
.L80249A3C:
/* 17831C 80249A3C 00000000 */ nop
/* 178320 80249A40 4680D6A0 */ cvt.s.w $f26, $f26
/* 178324 80249A44 4482B000 */ mtc1 $v0, $f22
D_80249A48:
/* 178328 80249A48 00000000 */ nop
D_80249A4C:
/* 17832C 80249A4C 4680B5A0 */ cvt.s.w $f22, $f22
.L80249A50:
/* 178330 80249A50 4616D000 */ add.s $f0, $f26, $f22
.L80249A54:
/* 178334 80249A54 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 178338 80249A58 4481E000 */ mtc1 $at, $f28
D_80249A5C:
/* 17833C 80249A5C 00000000 */ nop
/* 178340 80249A60 461C0002 */ mul.s $f0, $f0, $f28
/* 178344 80249A64 00000000 */ nop
/* 178348 80249A68 84840428 */ lh $a0, 0x428($a0)
D_80249A6C:
/* 17834C 80249A6C 0C09A75B */ jal get_actor
D_80249A70:
/* 178350 80249A70 E7A0002C */ swc1 $f0, 0x2C($sp)
D_80249A74:
/* 178354 80249A74 0040202D */ daddu $a0, $v0, $zero
D_80249A78:
/* 178358 80249A78 108001DB */ beqz $a0, .L8024A1E8
D_80249A7C:
/* 17835C 80249A7C 0000102D */ daddu $v0, $zero, $zero
D_80249A80:
/* 178360 80249A80 90830191 */ lbu $v1, 0x191($a0)
D_80249A84:
/* 178364 80249A84 C4820148 */ lwc1 $f2, 0x148($a0)
D_80249A88:
/* 178368 80249A88 00031042 */ srl $v0, $v1, 1
D_80249A8C:
/* 17836C 80249A8C 44820000 */ mtc1 $v0, $f0
D_80249A90:
/* 178370 80249A90 00000000 */ nop
D_80249A94:
/* 178374 80249A94 46800020 */ cvt.s.w $f0, $f0
D_80249A98:
/* 178378 80249A98 46001080 */ add.s $f2, $f2, $f0
D_80249A9C:
/* 17837C 80249A9C 00031082 */ srl $v0, $v1, 2
D_80249AA0:
/* 178380 80249AA0 44820000 */ mtc1 $v0, $f0
D_80249AA4:
/* 178384 80249AA4 00000000 */ nop
/* 178388 80249AA8 46800020 */ cvt.s.w $f0, $f0
/* 17838C 80249AAC 46001080 */ add.s $f2, $f2, $f0
/* 178390 80249AB0 E7A20024 */ swc1 $f2, 0x24($sp)
/* 178394 80249AB4 C4920144 */ lwc1 $f18, 0x144($a0)
glabel func_80249AB8
/* 178398 80249AB8 E7B20020 */ swc1 $f18, 0x20($sp)
D_80249ABC:
/* 17839C 80249ABC C490014C */ lwc1 $f16, 0x14C($a0)
/* 1783A0 80249AC0 46189001 */ sub.s $f0, $f18, $f24
.L80249AC4:
/* 1783A4 80249AC4 E7B00028 */ swc1 $f16, 0x28($sp)
/* 1783A8 80249AC8 90820190 */ lbu $v0, 0x190($a0)
.L80249ACC:
/* 1783AC 80249ACC 00621821 */ addu $v1, $v1, $v0
/* 1783B0 80249AD0 461C0002 */ mul.s $f0, $f0, $f28
/* 1783B4 80249AD4 00000000 */ nop
/* 1783B8 80249AD8 00031843 */ sra $v1, $v1, 1
/* 1783BC 80249ADC 3C02802A */ lui $v0, %hi(BattleCam_ModeY)
D_80249AE0:
/* 1783C0 80249AE0 8042F2A2 */ lb $v0, %lo(BattleCam_ModeY)($v0)
/* 1783C4 80249AE4 44839000 */ mtc1 $v1, $f18
/* 1783C8 80249AE8 00000000 */ nop
/* 1783CC 80249AEC 468094A0 */ cvt.s.w $f18, $f18
/* 1783D0 80249AF0 E7B20030 */ swc1 $f18, 0x30($sp)
.L80249AF4:
/* 1783D4 80249AF4 0440000D */ bltz $v0, .L80249B2C
/* 1783D8 80249AF8 4600C780 */ add.s $f30, $f24, $f0
/* 1783DC 80249AFC 5040000C */ beql $v0, $zero, .L80249B30
.L80249B00:
/* 1783E0 80249B00 4600A706 */ mov.s $f28, $f20
/* 1783E4 80249B04 4602A001 */ sub.s $f0, $f20, $f2
/* 1783E8 80249B08 461C0082 */ mul.s $f2, $f0, $f28
/* 1783EC 80249B0C 00000000 */ nop
D_80249B10:
/* 1783F0 80249B10 C7B00024 */ lwc1 $f16, 0x24($sp)
.L80249B14:
/* 1783F4 80249B14 3C0140C0 */ lui $at, (0x40C00000 >> 16)
/* 1783F8 80249B18 44812000 */ mtc1 $at, $f4
/* 1783FC 80249B1C 46028080 */ add.s $f2, $f16, $f2
/* 178400 80249B20 46040003 */ div.s $f0, $f0, $f4
/* 178404 80249B24 080926CC */ j .L80249B30
/* 178408 80249B28 46001700 */ add.s $f28, $f2, $f0
.L80249B2C:
/* 17840C 80249B2C C7BC0024 */ lwc1 $f28, 0x24($sp)
.L80249B30:
/* 178410 80249B30 C7B20028 */ lwc1 $f18, 0x28($sp)
D_80249B34:
/* 178414 80249B34 C7B00018 */ lwc1 $f16, 0x18($sp)
.L80249B38:
/* 178418 80249B38 46109001 */ sub.s $f0, $f18, $f16
/* 17841C 80249B3C 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 178420 80249B40 44811000 */ mtc1 $at, $f2
/* 178424 80249B44 00000000 */ nop
.L80249B48:
/* 178428 80249B48 46020002 */ mul.s $f0, $f0, $f2
/* 17842C 80249B4C 00000000 */ nop
/* 178430 80249B50 08092735 */ j .L80249CD4
/* 178434 80249B54 46008000 */ add.s $f0, $f16, $f0
.L80249B58:
/* 178438 80249B58 00051080 */ sll $v0, $a1, 2
/* 17843C 80249B5C 00441021 */ addu $v0, $v0, $a0
/* 178440 80249B60 8C4400E0 */ lw $a0, 0xE0($v0)
/* 178444 80249B64 108001A0 */ beqz $a0, .L8024A1E8
/* 178448 80249B68 0000102D */ daddu $v0, $zero, $zero
/* 17844C 80249B6C C4980144 */ lwc1 $f24, 0x144($a0)
/* 178450 80249B70 90830191 */ lbu $v1, 0x191($a0)
/* 178454 80249B74 C492014C */ lwc1 $f18, 0x14C($a0)
/* 178458 80249B78 00031042 */ srl $v0, $v1, 1
/* 17845C 80249B7C 44820000 */ mtc1 $v0, $f0
D_80249B80:
/* 178460 80249B80 00000000 */ nop
D_80249B84:
/* 178464 80249B84 46800020 */ cvt.s.w $f0, $f0
D_80249B88:
/* 178468 80249B88 E7B20018 */ swc1 $f18, 0x18($sp)
D_80249B8C:
/* 17846C 80249B8C C4820148 */ lwc1 $f2, 0x148($a0)
D_80249B90:
/* 178470 80249B90 00031082 */ srl $v0, $v1, 2
D_80249B94:
/* 178474 80249B94 46001080 */ add.s $f2, $f2, $f0
D_80249B98:
/* 178478 80249B98 44820000 */ mtc1 $v0, $f0
D_80249B9C:
/* 17847C 80249B9C 00000000 */ nop
D_80249BA0:
/* 178480 80249BA0 46800020 */ cvt.s.w $f0, $f0
D_80249BA4:
/* 178484 80249BA4 90820190 */ lbu $v0, 0x190($a0)
D_80249BA8:
/* 178488 80249BA8 46001500 */ add.s $f20, $f2, $f0
D_80249BAC:
/* 17848C 80249BAC 4483D000 */ mtc1 $v1, $f26
D_80249BB0:
/* 178490 80249BB0 00000000 */ nop
/* 178494 80249BB4 4680D6A0 */ cvt.s.w $f26, $f26
D_80249BB8:
/* 178498 80249BB8 4482B000 */ mtc1 $v0, $f22
D_80249BBC:
/* 17849C 80249BBC 00000000 */ nop
/* 1784A0 80249BC0 4680B5A0 */ cvt.s.w $f22, $f22
/* 1784A4 80249BC4 4616D000 */ add.s $f0, $f26, $f22
/* 1784A8 80249BC8 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 1784AC 80249BCC 4481E000 */ mtc1 $at, $f28
/* 1784B0 80249BD0 00000000 */ nop
/* 1784B4 80249BD4 461C0002 */ mul.s $f0, $f0, $f28
/* 1784B8 80249BD8 00000000 */ nop
D_80249BDC:
/* 1784BC 80249BDC 84840428 */ lh $a0, 0x428($a0)
/* 1784C0 80249BE0 0C09A75B */ jal get_actor
/* 1784C4 80249BE4 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 1784C8 80249BE8 0040202D */ daddu $a0, $v0, $zero
.L80249BEC:
/* 1784CC 80249BEC 1080017E */ beqz $a0, .L8024A1E8
/* 1784D0 80249BF0 0000102D */ daddu $v0, $zero, $zero
/* 1784D4 80249BF4 90830191 */ lbu $v1, 0x191($a0)
/* 1784D8 80249BF8 C4820148 */ lwc1 $f2, 0x148($a0)
D_80249BFC:
/* 1784DC 80249BFC 00031042 */ srl $v0, $v1, 1
/* 1784E0 80249C00 44820000 */ mtc1 $v0, $f0
/* 1784E4 80249C04 00000000 */ nop
/* 1784E8 80249C08 46800020 */ cvt.s.w $f0, $f0
/* 1784EC 80249C0C 46001080 */ add.s $f2, $f2, $f0
/* 1784F0 80249C10 00031082 */ srl $v0, $v1, 2
/* 1784F4 80249C14 44820000 */ mtc1 $v0, $f0
/* 1784F8 80249C18 00000000 */ nop
D_80249C1C:
/* 1784FC 80249C1C 46800020 */ cvt.s.w $f0, $f0
/* 178500 80249C20 46001080 */ add.s $f2, $f2, $f0
/* 178504 80249C24 E7A20024 */ swc1 $f2, 0x24($sp)
/* 178508 80249C28 C4900144 */ lwc1 $f16, 0x144($a0)
/* 17850C 80249C2C E7B00020 */ swc1 $f16, 0x20($sp)
/* 178510 80249C30 C492014C */ lwc1 $f18, 0x14C($a0)
/* 178514 80249C34 E7B20028 */ swc1 $f18, 0x28($sp)
/* 178518 80249C38 90820190 */ lbu $v0, 0x190($a0)
D_80249C3C:
/* 17851C 80249C3C 46188001 */ sub.s $f0, $f16, $f24
.L80249C40:
/* 178520 80249C40 00621821 */ addu $v1, $v1, $v0
/* 178524 80249C44 00031843 */ sra $v1, $v1, 1
/* 178528 80249C48 461C0002 */ mul.s $f0, $f0, $f28
/* 17852C 80249C4C 00000000 */ nop
/* 178530 80249C50 44838000 */ mtc1 $v1, $f16
/* 178534 80249C54 00000000 */ nop
/* 178538 80249C58 46808420 */ cvt.s.w $f16, $f16
D_80249C5C:
/* 17853C 80249C5C 3C03802A */ lui $v1, %hi(BattleCam_ModeY)
/* 178540 80249C60 8063F2A2 */ lb $v1, %lo(BattleCam_ModeY)($v1)
/* 178544 80249C64 E7B00030 */ swc1 $f16, 0x30($sp)
/* 178548 80249C68 0460000D */ bltz $v1, .L80249CA0
/* 17854C 80249C6C 4600C780 */ add.s $f30, $f24, $f0
/* 178550 80249C70 5060000F */ beql $v1, $zero, .L80249CB0
/* 178554 80249C74 4600A706 */ mov.s $f28, $f20
/* 178558 80249C78 4602A001 */ sub.s $f0, $f20, $f2
D_80249C7C:
/* 17855C 80249C7C 461C0082 */ mul.s $f2, $f0, $f28
/* 178560 80249C80 00000000 */ nop
/* 178564 80249C84 C7B20024 */ lwc1 $f18, 0x24($sp)
/* 178568 80249C88 3C0140C0 */ lui $at, (0x40C00000 >> 16)
/* 17856C 80249C8C 44812000 */ mtc1 $at, $f4
D_80249C90:
/* 178570 80249C90 46029080 */ add.s $f2, $f18, $f2
.L80249C94:
/* 178574 80249C94 46040003 */ div.s $f0, $f0, $f4
/* 178578 80249C98 0809272C */ j .L80249CB0
/* 17857C 80249C9C 46001700 */ add.s $f28, $f2, $f0
.L80249CA0:
/* 178580 80249CA0 2402FFFF */ addiu $v0, $zero, -0x1
D_80249CA4:
/* 178584 80249CA4 14620002 */ bne $v1, $v0, .L80249CB0
/* 178588 80249CA8 4600A706 */ mov.s $f28, $f20
.L80249CAC:
/* 17858C 80249CAC C7BC0024 */ lwc1 $f28, 0x24($sp)
.L80249CB0:
/* 178590 80249CB0 C7B00028 */ lwc1 $f16, 0x28($sp)
/* 178594 80249CB4 C7B20018 */ lwc1 $f18, 0x18($sp)
D_80249CB8:
/* 178598 80249CB8 46128001 */ sub.s $f0, $f16, $f18
/* 17859C 80249CBC 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 1785A0 80249CC0 44811000 */ mtc1 $at, $f2
/* 1785A4 80249CC4 00000000 */ nop
/* 1785A8 80249CC8 46020002 */ mul.s $f0, $f0, $f2
D_80249CCC:
/* 1785AC 80249CCC 00000000 */ nop
/* 1785B0 80249CD0 46009000 */ add.s $f0, $f18, $f0
.L80249CD4:
/* 1785B4 80249CD4 E7A0001C */ swc1 $f0, 0x1C($sp)
/* 1785B8 80249CD8 3C02802A */ lui $v0, %hi(D_8029F2A6)
/* 1785BC 80249CDC 8042F2A6 */ lb $v0, %lo(D_8029F2A6)($v0)
D_80249CE0:
/* 1785C0 80249CE0 10400029 */ beqz $v0, .L80249D88
/* 1785C4 80249CE4 00000000 */ nop
/* 1785C8 80249CE8 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength)
/* 1785CC 80249CEC C422F28C */ lwc1 $f2, %lo(BattleCam_InitialBoomLength)($at)
dgb_01_img3_gfx:
/* 1785D0 80249CF0 3C0143FA */ lui $at, (0x43FA0000 >> 16)
D_80249CF4:
/* 1785D4 80249CF4 44810000 */ mtc1 $at, $f0
/* 1785D8 80249CF8 00000000 */ nop
/* 1785DC 80249CFC 46020001 */ sub.s $f0, $f0, $f2
/* 1785E0 80249D00 3C01802A */ lui $at, %hi(D_8029CC08)
.L80249D04:
/* 1785E4 80249D04 D422CC08 */ ldc1 $f2, %lo(D_8029CC08)($at)
/* 1785E8 80249D08 46000021 */ cvt.d.s $f0, $f0
/* 1785EC 80249D0C 46220002 */ mul.d $f0, $f0, $f2
/* 1785F0 80249D10 00000000 */ nop
D_80249D14:
/* 1785F4 80249D14 3C01403E */ lui $at, (0x403E0000 >> 16)
/* 1785F8 80249D18 44811800 */ mtc1 $at, $f3
/* 1785FC 80249D1C 44801000 */ mtc1 $zero, $f2
/* 178600 80249D20 00000000 */ nop
/* 178604 80249D24 46220000 */ add.d $f0, $f0, $f2
.L80249D28:
/* 178608 80249D28 46200120 */ cvt.s.d $f4, $f0
/* 17860C 80249D2C 46002007 */ neg.s $f0, $f4
D_80249D30:
/* 178610 80249D30 4600F03C */ c.lt.s $f30, $f0
D_80249D34:
/* 178614 80249D34 00000000 */ nop
D_80249D38:
/* 178618 80249D38 45000008 */ bc1f D_80249D5C
/* 17861C 80249D3C 00000000 */ nop
jtbl_80249D40:
/* 178620 80249D40 461E0001 */ sub.s $f0, $f0, $f30
/* 178624 80249D44 3C013F00 */ lui $at, (0x3F000000 >> 16)
D_80249D48:
/* 178628 80249D48 44811000 */ mtc1 $at, $f2
/* 17862C 80249D4C 00000000 */ nop
/* 178630 80249D50 46020002 */ mul.s $f0, $f0, $f2
/* 178634 80249D54 00000000 */ nop
/* 178638 80249D58 4600F780 */ add.s $f30, $f30, $f0
D_80249D5C:
/* 17863C 80249D5C 461E203C */ c.lt.s $f4, $f30
end_00_D_80249D60_E00760:
/* 178640 80249D60 00000000 */ nop
/* 178644 80249D64 45000008 */ bc1f .L80249D88
/* 178648 80249D68 00000000 */ nop
/* 17864C 80249D6C 461E2001 */ sub.s $f0, $f4, $f30
dgb_01_img4_png:
/* 178650 80249D70 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 178654 80249D74 44811000 */ mtc1 $at, $f2
/* 178658 80249D78 00000000 */ nop
/* 17865C 80249D7C 46020002 */ mul.s $f0, $f0, $f2
/* 178660 80249D80 00000000 */ nop
/* 178664 80249D84 4600F780 */ add.s $f30, $f30, $f0
.L80249D88:
/* 178668 80249D88 12200055 */ beqz $s1, .L80249EE0
/* 17866C 80249D8C 00000000 */ nop
/* 178670 80249D90 3C0141C0 */ lui $at, (0x41C00000 >> 16)
/* 178674 80249D94 44810000 */ mtc1 $at, $f0
/* 178678 80249D98 00000000 */ nop
/* 17867C 80249D9C 4600B581 */ sub.s $f22, $f22, $f0
/* 178680 80249DA0 4600D681 */ sub.s $f26, $f26, $f0
.L80249DA4:
/* 178684 80249DA4 44800000 */ mtc1 $zero, $f0
/* 178688 80249DA8 00000000 */ nop
D_80249DAC:
/* 17868C 80249DAC 4600B03C */ c.lt.s $f22, $f0
/* 178690 80249DB0 00000000 */ nop
/* 178694 80249DB4 45030001 */ bc1tl .L80249DBC
/* 178698 80249DB8 46000586 */ mov.s $f22, $f0
.L80249DBC:
/* 17869C 80249DBC 4600D03C */ c.lt.s $f26, $f0
/* 1786A0 80249DC0 00000000 */ nop
/* 1786A4 80249DC4 45030001 */ bc1tl D_80249DCC
/* 1786A8 80249DC8 46000686 */ mov.s $f26, $f0
D_80249DCC:
/* 1786AC 80249DCC 3C03802A */ lui $v1, %hi(BattleCam_BoomLength)
D_80249DD0:
/* 1786B0 80249DD0 2463F280 */ addiu $v1, $v1, %lo(BattleCam_BoomLength)
/* 1786B4 80249DD4 84620000 */ lh $v0, 0x0($v1)
/* 1786B8 80249DD8 461AB080 */ add.s $f2, $f22, $f26
/* 1786BC 80249DDC 44820000 */ mtc1 $v0, $f0
/* 1786C0 80249DE0 00000000 */ nop
/* 1786C4 80249DE4 46800020 */ cvt.s.w $f0, $f0
/* 1786C8 80249DE8 46020000 */ add.s $f0, $f0, $f2
/* 1786CC 80249DEC 3C02802A */ lui $v0, %hi(BattleCam_SetImmediately)
/* 1786D0 80249DF0 8042F2A4 */ lb $v0, %lo(BattleCam_SetImmediately)($v0)
/* 1786D4 80249DF4 4600040D */ trunc.w.s $f16, $f0
/* 1786D8 80249DF8 44048000 */ mfc1 $a0, $f16
/* 1786DC 80249DFC 10400010 */ beqz $v0, .L80249E40
/* 1786E0 80249E00 A4640000 */ sh $a0, 0x0($v1)
/* 1786E4 80249E04 E61E0054 */ swc1 $f30, 0x54($s0)
/* 1786E8 80249E08 E61C0058 */ swc1 $f28, 0x58($s0)
.L80249E0C:
/* 1786EC 80249E0C C7B0001C */ lwc1 $f16, 0x1C($sp)
/* 1786F0 80249E10 3C02802A */ lui $v0, %hi(BattleCam_BoomZOffset)
.L80249E14:
/* 1786F4 80249E14 8442F286 */ lh $v0, %lo(BattleCam_BoomZOffset)($v0)
/* 1786F8 80249E18 3C03802A */ lui $v1, %hi(BattleCam_BoomYaw)
/* 1786FC 80249E1C 9463F282 */ lhu $v1, %lo(BattleCam_BoomYaw)($v1)
D_80249E20:
/* 178700 80249E20 A604001E */ sh $a0, 0x1E($s0)
/* 178704 80249E24 3C04802A */ lui $a0, %hi(BattleCam_BoomPitch)
/* 178708 80249E28 9484F284 */ lhu $a0, %lo(BattleCam_BoomPitch)($a0)
/* 17870C 80249E2C 00021200 */ sll $v0, $v0, 8
/* 178710 80249E30 E610005C */ swc1 $f16, 0x5C($s0)
/* 178714 80249E34 A6020026 */ sh $v0, 0x26($s0)
/* 178718 80249E38 A6030024 */ sh $v1, 0x24($s0)
/* 17871C 80249E3C A6040022 */ sh $a0, 0x22($s0)
.L80249E40:
/* 178720 80249E40 8602001E */ lh $v0, 0x1E($s0)
/* 178724 80249E44 86040026 */ lh $a0, 0x26($s0)
/* 178728 80249E48 86030024 */ lh $v1, 0x24($s0)
/* 17872C 80249E4C 44820000 */ mtc1 $v0, $f0
/* 178730 80249E50 00000000 */ nop
/* 178734 80249E54 46800020 */ cvt.s.w $f0, $f0
/* 178738 80249E58 86020022 */ lh $v0, 0x22($s0)
.L80249E5C:
/* 17873C 80249E5C 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength)
/* 178740 80249E60 E420F28C */ swc1 $f0, %lo(BattleCam_InitialBoomLength)($at)
/* 178744 80249E64 44820000 */ mtc1 $v0, $f0
/* 178748 80249E68 00000000 */ nop
/* 17874C 80249E6C 46800020 */ cvt.s.w $f0, $f0
D_80249E70:
/* 178750 80249E70 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch)
/* 178754 80249E74 E420F294 */ swc1 $f0, %lo(BattleCam_InitialBoomPitch)($at)
/* 178758 80249E78 44830000 */ mtc1 $v1, $f0
/* 17875C 80249E7C 00000000 */ nop
/* 178760 80249E80 46800020 */ cvt.s.w $f0, $f0
/* 178764 80249E84 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw)
/* 178768 80249E88 E420F290 */ swc1 $f0, %lo(BattleCam_InitialBoomYaw)($at)
/* 17876C 80249E8C 04820001 */ bltzl $a0, .L80249E94
/* 178770 80249E90 248400FF */ addiu $a0, $a0, 0xFF
.L80249E94:
/* 178774 80249E94 00041203 */ sra $v0, $a0, 8
/* 178778 80249E98 C6020054 */ lwc1 $f2, 0x54($s0)
/* 17877C 80249E9C C6040058 */ lwc1 $f4, 0x58($s0)
.L80249EA0:
/* 178780 80249EA0 C606005C */ lwc1 $f6, 0x5C($s0)
/* 178784 80249EA4 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeLeft)
/* 178788 80249EA8 9463F29E */ lhu $v1, %lo(BattleCam_MoveTimeLeft)($v1)
/* 17878C 80249EAC 44820000 */ mtc1 $v0, $f0
/* 178790 80249EB0 00000000 */ nop
/* 178794 80249EB4 46800020 */ cvt.s.w $f0, $f0
/* 178798 80249EB8 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset)
/* 17879C 80249EBC E420F298 */ swc1 $f0, %lo(BattleCam_InitialBoomZOffset)($at)
/* 1787A0 80249EC0 3C01802A */ lui $at, %hi(BattleCam_InitialPosX)
/* 1787A4 80249EC4 E422F2A8 */ swc1 $f2, %lo(BattleCam_InitialPosX)($at)
/* 1787A8 80249EC8 3C01802A */ lui $at, %hi(BattleCam_InitialPosY)
/* 1787AC 80249ECC E424F2AC */ swc1 $f4, %lo(BattleCam_InitialPosY)($at)
/* 1787B0 80249ED0 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ)
/* 1787B4 80249ED4 E426F2B0 */ swc1 $f6, %lo(BattleCam_InitialPosZ)($at)
/* 1787B8 80249ED8 3C01802A */ lui $at, %hi(BattleCam_MoveTimeTotal)
/* 1787BC 80249EDC A423F2A0 */ sh $v1, %lo(BattleCam_MoveTimeTotal)($at)
.L80249EE0:
/* 1787C0 80249EE0 3C02802A */ lui $v0, %hi(BattleCam_UseLinearInterp)
.L80249EE4:
/* 1787C4 80249EE4 8042F2A5 */ lb $v0, %lo(BattleCam_UseLinearInterp)($v0)
/* 1787C8 80249EE8 14400027 */ bnez $v0, .L80249F88
/* 1787CC 80249EEC 00000000 */ nop
/* 1787D0 80249EF0 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft)
/* 1787D4 80249EF4 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0)
/* 1787D8 80249EF8 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal)
D_80249EFC:
/* 1787DC 80249EFC 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 1787E0 80249F00 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1787E4 80249F04 4481C000 */ mtc1 $at, $f24
/* 1787E8 80249F08 4482D000 */ mtc1 $v0, $f26
/* 1787EC 80249F0C 00000000 */ nop
/* 1787F0 80249F10 4680D6A0 */ cvt.s.w $f26, $f26
/* 1787F4 80249F14 44830000 */ mtc1 $v1, $f0
/* 1787F8 80249F18 00000000 */ nop
/* 1787FC 80249F1C 46800020 */ cvt.s.w $f0, $f0
/* 178800 80249F20 4600D683 */ div.s $f26, $f26, $f0
/* 178804 80249F24 461AC301 */ sub.s $f12, $f24, $f26
/* 178808 80249F28 3C014049 */ lui $at, (0x40490FD0 >> 16)
/* 17880C 80249F2C 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF)
/* 178810 80249F30 4481B000 */ mtc1 $at, $f22
/* 178814 80249F34 00000000 */ nop
/* 178818 80249F38 46166302 */ mul.s $f12, $f12, $f22
/* 17881C 80249F3C 00000000 */ nop
.L80249F40:
/* 178820 80249F40 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 178824 80249F44 4481A000 */ mtc1 $at, $f20
.L80249F48:
/* 178828 80249F48 00000000 */ nop
/* 17882C 80249F4C 46146302 */ mul.s $f12, $f12, $f20
/* 178830 80249F50 0C00A85B */ jal sin_rad
/* 178834 80249F54 00000000 */ nop
/* 178838 80249F58 46160002 */ mul.s $f0, $f0, $f22
/* 17883C 80249F5C 00000000 */ nop
.L80249F60:
/* 178840 80249F60 46140302 */ mul.s $f12, $f0, $f20
/* 178844 80249F64 0C00A85B */ jal sin_rad
/* 178848 80249F68 00000000 */ nop
/* 17884C 80249F6C 46160002 */ mul.s $f0, $f0, $f22
/* 178850 80249F70 00000000 */ nop
/* 178854 80249F74 46140302 */ mul.s $f12, $f0, $f20
.L80249F78:
/* 178858 80249F78 0C00A85B */ jal sin_rad
/* 17885C 80249F7C 00000000 */ nop
/* 178860 80249F80 080927ED */ j .L80249FB4
/* 178864 80249F84 4600C681 */ sub.s $f26, $f24, $f0
.L80249F88:
/* 178868 80249F88 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft)
/* 17886C 80249F8C 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0)
.L80249F90:
/* 178870 80249F90 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal)
/* 178874 80249F94 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 178878 80249F98 4482D000 */ mtc1 $v0, $f26
/* 17887C 80249F9C 00000000 */ nop
/* 178880 80249FA0 4680D6A0 */ cvt.s.w $f26, $f26
/* 178884 80249FA4 44830000 */ mtc1 $v1, $f0
/* 178888 80249FA8 00000000 */ nop
/* 17888C 80249FAC 46800020 */ cvt.s.w $f0, $f0
/* 178890 80249FB0 4600D683 */ div.s $f26, $f26, $f0
.L80249FB4:
/* 178894 80249FB4 3C01802A */ lui $at, %hi(BattleCam_InitialPosX)
/* 178898 80249FB8 C426F2A8 */ lwc1 $f6, %lo(BattleCam_InitialPosX)($at)
/* 17889C 80249FBC 461A3182 */ mul.s $f6, $f6, $f26
/* 1788A0 80249FC0 00000000 */ nop
/* 1788A4 80249FC4 3C01802A */ lui $at, %hi(BattleCam_InitialPosY)
/* 1788A8 80249FC8 C428F2AC */ lwc1 $f8, %lo(BattleCam_InitialPosY)($at)
/* 1788AC 80249FCC 461A4202 */ mul.s $f8, $f8, $f26
/* 1788B0 80249FD0 00000000 */ nop
/* 1788B4 80249FD4 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ)
/* 1788B8 80249FD8 C424F2B0 */ lwc1 $f4, %lo(BattleCam_InitialPosZ)($at)
/* 1788BC 80249FDC 461A2102 */ mul.s $f4, $f4, $f26
/* 1788C0 80249FE0 00000000 */ nop
D_80249FE4:
/* 1788C4 80249FE4 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset)
/* 1788C8 80249FE8 C422F298 */ lwc1 $f2, %lo(BattleCam_InitialBoomZOffset)($at)
/* 1788CC 80249FEC 461A1082 */ mul.s $f2, $f2, $f26
/* 1788D0 80249FF0 00000000 */ nop
/* 1788D4 80249FF4 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1788D8 80249FF8 4481B000 */ mtc1 $at, $f22
.L80249FFC:
/* 1788DC 80249FFC 00000000 */ nop
/* 1788E0 8024A000 461AB581 */ sub.s $f22, $f22, $f26
.L8024A004:
/* 1788E4 8024A004 4616F302 */ mul.s $f12, $f30, $f22
/* 1788E8 8024A008 00000000 */ nop
/* 1788EC 8024A00C 4616E382 */ mul.s $f14, $f28, $f22
/* 1788F0 8024A010 00000000 */ nop
/* 1788F4 8024A014 3C02802A */ lui $v0, %hi(BattleCam_BoomZOffset)
/* 1788F8 8024A018 8442F286 */ lh $v0, %lo(BattleCam_BoomZOffset)($v0)
/* 1788FC 8024A01C 44820000 */ mtc1 $v0, $f0
/* 178900 8024A020 00000000 */ nop
/* 178904 8024A024 46800020 */ cvt.s.w $f0, $f0
/* 178908 8024A028 46160002 */ mul.s $f0, $f0, $f22
.L8024A02C:
/* 17890C 8024A02C 00000000 */ nop
/* 178910 8024A030 C7B2001C */ lwc1 $f18, 0x1C($sp)
/* 178914 8024A034 46169282 */ mul.s $f10, $f18, $f22
.L8024A038:
/* 178918 8024A038 00000000 */ nop
/* 17891C 8024A03C 46001080 */ add.s $f2, $f2, $f0
/* 178920 8024A040 C6180054 */ lwc1 $f24, 0x54($s0)
/* 178924 8024A044 C6140058 */ lwc1 $f20, 0x58($s0)
/* 178928 8024A048 460C3180 */ add.s $f6, $f6, $f12
/* 17892C 8024A04C C610005C */ lwc1 $f16, 0x5C($s0)
/* 178930 8024A050 4406F000 */ mfc1 $a2, $f30
/* 178934 8024A054 460A2100 */ add.s $f4, $f4, $f10
/* 178938 8024A058 44079000 */ mfc1 $a3, $f18
/* 17893C 8024A05C 3C014380 */ lui $at, (0x43800000 >> 16)
/* 178940 8024A060 44810000 */ mtc1 $at, $f0
/* 178944 8024A064 460E4200 */ add.s $f8, $f8, $f14
/* 178948 8024A068 E7B00018 */ swc1 $f16, 0x18($sp)
/* 17894C 8024A06C E6060054 */ swc1 $f6, 0x54($s0)
/* 178950 8024A070 46001082 */ mul.s $f2, $f2, $f0
D_8024A074:
/* 178954 8024A074 00000000 */ nop
/* 178958 8024A078 46003306 */ mov.s $f12, $f6
/* 17895C 8024A07C E604005C */ swc1 $f4, 0x5C($s0)
/* 178960 8024A080 46002386 */ mov.s $f14, $f4
/* 178964 8024A084 E6080058 */ swc1 $f8, 0x58($s0)
/* 178968 8024A088 4600148D */ trunc.w.s $f18, $f2
/* 17896C 8024A08C 44029000 */ mfc1 $v0, $f18
/* 178970 8024A090 0C00A7B5 */ jal dist2D
/* 178974 8024A094 A6020026 */ sh $v0, 0x26($s0)
D_8024A098:
/* 178978 8024A098 4600A386 */ mov.s $f14, $f20
/* 17897C 8024A09C 8FA60018 */ lw $a2, 0x18($sp)
/* 178980 8024A0A0 C7B0002C */ lwc1 $f16, 0x2C($sp)
/* 178984 8024A0A4 8FA70020 */ lw $a3, 0x20($sp)
/* 178988 8024A0A8 C7B20030 */ lwc1 $f18, 0x30($sp)
/* 17898C 8024A0AC 46100500 */ add.s $f20, $f0, $f16
/* 178990 8024A0B0 3C014280 */ lui $at, (0x42800000 >> 16)
/* 178994 8024A0B4 44810000 */ mtc1 $at, $f0
/* 178998 8024A0B8 C7B00024 */ lwc1 $f16, 0x24($sp)
/* 17899C 8024A0BC 4612A500 */ add.s $f20, $f20, $f18
D_8024A0C0:
/* 1789A0 8024A0C0 C7B20028 */ lwc1 $f18, 0x28($sp)
/* 1789A4 8024A0C4 4600C306 */ mov.s $f12, $f24
/* 1789A8 8024A0C8 E7B00010 */ swc1 $f16, 0x10($sp)
D_8024A0CC:
/* 1789AC 8024A0CC E7B20014 */ swc1 $f18, 0x14($sp)
/* 1789B0 8024A0D0 0C00A7CB */ jal dist3D
/* 1789B4 8024A0D4 4600A501 */ sub.s $f20, $f20, $f0
/* 1789B8 8024A0D8 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 1789BC 8024A0DC 44811000 */ mtc1 $at, $f2
/* 1789C0 8024A0E0 00000000 */ nop
/* 1789C4 8024A0E4 46020002 */ mul.s $f0, $f0, $f2
/* 1789C8 8024A0E8 00000000 */ nop
/* 1789CC 8024A0EC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength)
D_8024A0F0:
/* 1789D0 8024A0F0 C42AF28C */ lwc1 $f10, %lo(BattleCam_InitialBoomLength)($at)
D_8024A0F4:
/* 1789D4 8024A0F4 461A5282 */ mul.s $f10, $f10, $f26
/* 1789D8 8024A0F8 00000000 */ nop
/* 1789DC 8024A0FC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw)
/* 1789E0 8024A100 C428F290 */ lwc1 $f8, %lo(BattleCam_InitialBoomYaw)($at)
/* 1789E4 8024A104 461A4202 */ mul.s $f8, $f8, $f26
/* 1789E8 8024A108 00000000 */ nop
/* 1789EC 8024A10C 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch)
/* 1789F0 8024A110 C424F294 */ lwc1 $f4, %lo(BattleCam_InitialBoomPitch)($at)
D_8024A114:
/* 1789F4 8024A114 3C02802A */ lui $v0, %hi(BattleCam_BoomLength)
/* 1789F8 8024A118 8442F280 */ lh $v0, %lo(BattleCam_BoomLength)($v0)
/* 1789FC 8024A11C 461A2102 */ mul.s $f4, $f4, $f26
/* 178A00 8024A120 00000000 */ nop
/* 178A04 8024A124 44821000 */ mtc1 $v0, $f2
/* 178A08 8024A128 00000000 */ nop
/* 178A0C 8024A12C 468010A0 */ cvt.s.w $f2, $f2
D_8024A130:
/* 178A10 8024A130 3C02802A */ lui $v0, %hi(BattleCam_BoomYaw)
D_8024A134:
/* 178A14 8024A134 8442F282 */ lh $v0, %lo(BattleCam_BoomYaw)($v0)
/* 178A18 8024A138 44823000 */ mtc1 $v0, $f6
/* 178A1C 8024A13C 00000000 */ nop
/* 178A20 8024A140 468031A0 */ cvt.s.w $f6, $f6
/* 178A24 8024A144 46163182 */ mul.s $f6, $f6, $f22
/* 178A28 8024A148 00000000 */ nop
/* 178A2C 8024A14C 46141080 */ add.s $f2, $f2, $f20
/* 178A30 8024A150 3C02802A */ lui $v0, %hi(BattleCam_BoomPitch)
/* 178A34 8024A154 8442F284 */ lh $v0, %lo(BattleCam_BoomPitch)($v0)
D_8024A158:
/* 178A38 8024A158 46001080 */ add.s $f2, $f2, $f0
/* 178A3C 8024A15C 44820000 */ mtc1 $v0, $f0
.L8024A160:
/* 178A40 8024A160 00000000 */ nop
/* 178A44 8024A164 46800020 */ cvt.s.w $f0, $f0
/* 178A48 8024A168 46160002 */ mul.s $f0, $f0, $f22
/* 178A4C 8024A16C 00000000 */ nop
dgb_01_img4_gfx:
/* 178A50 8024A170 46161082 */ mul.s $f2, $f2, $f22
/* 178A54 8024A174 00000000 */ nop
/* 178A58 8024A178 46064200 */ add.s $f8, $f8, $f6
/* 178A5C 8024A17C 3C04802A */ lui $a0, %hi(BattleCam_MoveTimeLeft)
D_8024A180:
/* 178A60 8024A180 2484F29E */ addiu $a0, $a0, %lo(BattleCam_MoveTimeLeft)
/* 178A64 8024A184 46002100 */ add.s $f4, $f4, $f0
/* 178A68 8024A188 4600440D */ trunc.w.s $f16, $f8
D_8024A18C:
/* 178A6C 8024A18C 44028000 */ mfc1 $v0, $f16
D_8024A190:
/* 178A70 8024A190 00000000 */ nop
/* 178A74 8024A194 A6020024 */ sh $v0, 0x24($s0)
/* 178A78 8024A198 46025280 */ add.s $f10, $f10, $f2
/* 178A7C 8024A19C 4600240D */ trunc.w.s $f16, $f4
/* 178A80 8024A1A0 44028000 */ mfc1 $v0, $f16
/* 178A84 8024A1A4 00000000 */ nop
/* 178A88 8024A1A8 A6020022 */ sh $v0, 0x22($s0)
.L8024A1AC:
/* 178A8C 8024A1AC 4600540D */ trunc.w.s $f16, $f10
/* 178A90 8024A1B0 44028000 */ mfc1 $v0, $f16
D_8024A1B4:
/* 178A94 8024A1B4 00000000 */ nop
/* 178A98 8024A1B8 A602001E */ sh $v0, 0x1E($s0)
/* 178A9C 8024A1BC 84820000 */ lh $v0, 0x0($a0)
.L8024A1C0:
/* 178AA0 8024A1C0 94830000 */ lhu $v1, 0x0($a0)
/* 178AA4 8024A1C4 14400006 */ bnez $v0, .L8024A1E0
/* 178AA8 8024A1C8 2462FFFF */ addiu $v0, $v1, -0x1
/* 178AAC 8024A1CC 24020001 */ addiu $v0, $zero, 0x1
/* 178AB0 8024A1D0 3C01802A */ lui $at, %hi(BattleCam_DoneMoving)
/* 178AB4 8024A1D4 A022F29C */ sb $v0, %lo(BattleCam_DoneMoving)($at)
D_8024A1D8:
/* 178AB8 8024A1D8 0809287A */ j .L8024A1E8
/* 178ABC 8024A1DC 0000102D */ daddu $v0, $zero, $zero
.L8024A1E0:
/* 178AC0 8024A1E0 A4820000 */ sh $v0, 0x0($a0)
/* 178AC4 8024A1E4 0000102D */ daddu $v0, $zero, $zero
.L8024A1E8:
/* 178AC8 8024A1E8 8FBF0040 */ lw $ra, 0x40($sp)
/* 178ACC 8024A1EC 8FB1003C */ lw $s1, 0x3C($sp)
dgb_01_img5_png:
/* 178AD0 8024A1F0 8FB00038 */ lw $s0, 0x38($sp)
/* 178AD4 8024A1F4 D7BE0070 */ ldc1 $f30, 0x70($sp)
.L8024A1F8:
/* 178AD8 8024A1F8 D7BC0068 */ ldc1 $f28, 0x68($sp)
.L8024A1FC:
/* 178ADC 8024A1FC D7BA0060 */ ldc1 $f26, 0x60($sp)
D_8024A200:
/* 178AE0 8024A200 D7B80058 */ ldc1 $f24, 0x58($sp)
/* 178AE4 8024A204 D7B60050 */ ldc1 $f22, 0x50($sp)
/* 178AE8 8024A208 D7B40048 */ ldc1 $f20, 0x48($sp)
/* 178AEC 8024A20C 03E00008 */ jr $ra
D_8024A210:
/* 178AF0 8024A210 27BD0078 */ addiu $sp, $sp, 0x78
### DECOMPILED C INSTRUCTIONS:
s32 CamPresetUpdate_M(Evt* script, s32 isInitialCall) {
Actor* actor;
Actor* targetActor;
Camera* camera = &gCameras[CAM_BATTLE];
BattleStatus* battleStatus = &gBattleStatus;
f32 x, y, z;
f32 middlePosX, middlePosY, middlePosZ;
f32 targetX, targetY, targetZ;
f32 sizeX, sizeY;
f32 averageSize, targetAverageSize;
f32 alpha;
f32 distToTarget;
f32 boomLength;
f32 extraLength;
f32 dist;
s32 actorClass = BattleCam_TargetActor & ACTOR_CLASS_MASK;
s32 actorID = BattleCam_TargetActor & 0xFF;
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
actor = battleStatus->playerActor;
if (actor == NULL) {
return ApiStatus_BLOCK;
}
x = actor->currentPos.x;
y = actor->currentPos.y + actor->size.y / 2 + actor->size.y / 4;
z = actor->currentPos.z;
sizeY = actor->size.y;
sizeX = actor->size.x;
averageSize = (sizeY + sizeX) / 2;
targetActor = get_actor(actor->targetActorID);
if (targetActor == NULL) {
return ApiStatus_BLOCK;
}
targetX = targetActor->currentPos.x;
targetY = targetActor->currentPos.y + targetActor->size.y / 2 + targetActor->size.y / 4;
targetZ = targetActor->currentPos.z;
targetAverageSize = (targetActor->size.y + targetActor->size.x) / 2;
middlePosX = x + (targetX - x) / 2;
if (BattleCam_ModeY > BTL_CAM_MODEY_MINUS_1) {
if (BattleCam_ModeY != BTL_CAM_MODEY_0) {
middlePosY = targetY + (y - targetY) * 0.5f + (y - targetY) / 6.0f;
} else {
middlePosY = y;
}
} else {
if (BattleCam_ModeY != BTL_CAM_MODEY_MINUS_1) {
middlePosY = y + (targetY - y) / 4;
} else {
middlePosY = targetY;
}
}
middlePosZ = z + (targetZ - z) / 2;
break;
case ACTOR_CLASS_PARTNER:
actor = battleStatus->partnerActor;
if (actor == NULL) {
return ApiStatus_BLOCK;
}
x = actor->currentPos.x;
y = actor->currentPos.y + actor->size.y / 2 + actor->size.y / 4;
z = actor->currentPos.z;
sizeY = actor->size.y;
sizeX = actor->size.x;
averageSize = (sizeY + sizeX) / 2;
targetActor = get_actor(actor->targetActorID);
if (targetActor == NULL) {
return ApiStatus_BLOCK;
}
targetX = targetActor->currentPos.x;
targetY = targetActor->currentPos.y + targetActor->size.y / 2 + targetActor->size.y / 4;
targetZ = targetActor->currentPos.z;
targetAverageSize = (targetActor->size.y + targetActor->size.x) /2;
middlePosX = x + (targetX - x) / 2;
if (BattleCam_ModeY > BTL_CAM_MODEY_MINUS_1) {
if (BattleCam_ModeY != BTL_CAM_MODEY_0) {
middlePosY = targetY + (y - targetY) * 0.5f + (y - targetY) / 6.0f;
} else {
middlePosY = y;
}
} else {
middlePosY = targetY;
}
middlePosZ = z + (targetZ - z) / 2;
break;
case ACTOR_CLASS_ENEMY:
actor = battleStatus->enemyActors[actorID];
if (actor == NULL) {
return ApiStatus_BLOCK;
}
x = actor->currentPos.x;
y = actor->currentPos.y + actor->size.y / 2 + actor->size.y / 4;
z = actor->currentPos.z;
sizeY = actor->size.y;
sizeX = actor->size.x;
averageSize = (sizeY + sizeX) * 0.5f;
targetActor = get_actor(actor->targetActorID);
if (targetActor == NULL) {
return ApiStatus_BLOCK;
}
targetX = targetActor->currentPos.x;
targetY = targetActor->currentPos.y + targetActor->size.y / 2 + targetActor->size.y / 4;
targetZ = targetActor->currentPos.z;
targetAverageSize = (targetActor->size.y + targetActor->size.x) / 2;
middlePosX = x + (targetX - x) / 2;
if (BattleCam_ModeY > BTL_CAM_MODEY_MINUS_1) {
if (BattleCam_ModeY != BTL_CAM_MODEY_0) {
middlePosY = targetY + (y - targetY) * 0.5f + (y - targetY) / 6.0f;
} else {
middlePosY = y;
}
} else {
if (BattleCam_ModeY == BTL_CAM_MODEY_MINUS_1) {
middlePosY = targetY;
} else {
middlePosY = y;
}
}
middlePosZ = z + (targetZ - z) / 2;
break;
default:
return ApiStatus_BLOCK;
}
if (D_8029F2A6) {
f32 upperBound = (500.0f - BattleCam_InitialBoomLength) * 0.4 + 30.0;
f32 lowerBound = -upperBound;
if (middlePosX < lowerBound) {
middlePosX += (lowerBound - middlePosX) / 2;
}
if (middlePosX > upperBound) {
middlePosX += (upperBound - middlePosX) / 2;
}
}
if (isInitialCall) {
sizeX -= 24.0f;
sizeY -= 24.0f;
if (sizeX < 0.0f) {
sizeX = 0.0f;
}
if (sizeY < 0.0f) {
sizeY = 0.0f;
}
BattleCam_BoomLength += sizeX + sizeY;
if (BattleCam_SetImmediately) {
camera->lookAt_obj_target.x = middlePosX;
camera->lookAt_obj_target.y = middlePosY;
camera->lookAt_obj_target.z = middlePosZ;
camera->auxBoomLength = BattleCam_BoomLength;
camera->auxBoomZOffset = BattleCam_BoomZOffset * 256;
camera->auxBoomYaw = BattleCam_BoomYaw;
camera->auxBoomPitch = BattleCam_BoomPitch;
}
BattleCam_InitialBoomLength = camera->auxBoomLength;
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
BattleCam_InitialPosX = camera->lookAt_obj_target.x;
BattleCam_InitialPosY = camera->lookAt_obj_target.y;
BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
}
if (!BattleCam_UseLinearInterp) {
alpha = BattleCam_MoveTimeLeft;
alpha /= BattleCam_MoveTimeTotal;
alpha = 1.0f - sin_rad(sin_rad(sin_rad((1.0f - alpha) * PI_S / 2) * PI_S / 2) * PI_S / 2);
} else {
alpha = BattleCam_MoveTimeLeft;
alpha /= BattleCam_MoveTimeTotal;
}
x = camera->lookAt_obj_target.x;
y = camera->lookAt_obj_target.y;
z = camera->lookAt_obj_target.z;
camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, middlePosX, alpha);
camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, middlePosY, alpha);
camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, middlePosZ, alpha);
camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
dist = dist2D(camera->lookAt_obj_target.x, camera->lookAt_obj_target.z, middlePosX, middlePosZ);
extraLength = dist + averageSize + targetAverageSize - 64.0f;
distToTarget = dist3D(x, y, z, targetX, targetY, targetZ);
boomLength = BattleCam_BoomLength + extraLength + distToTarget * 0.5f;
camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, boomLength, alpha);
camera->auxBoomYaw = LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
camera->auxBoomPitch = LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);
if (BattleCam_MoveTimeLeft == 0) {
BattleCam_DoneMoving = TRUE;
} else {
BattleCam_MoveTimeLeft--;
}
return ApiStatus_BLOCK;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_80248DE4
/* 1776C4 80248DE4 27BDFF88 */ addiu $sp, $sp, -0x78
/* 1776C8 80248DE8 AFB1003C */ sw $s1, 0x3C($sp)
.L80248DEC:
/* 1776CC 80248DEC 00A0882D */ daddu $s1, $a1, $zero
/* 1776D0 80248DF0 AFB00038 */ sw $s0, 0x38($sp)
/* 1776D4 80248DF4 3C10800B */ lui $s0, %hi(gCameras + 0x558)
.L80248DF8:
/* 1776D8 80248DF8 261022D8 */ addiu $s0, $s0, %lo(gCameras + 0x558)
/* 1776DC 80248DFC 3C02802A */ lui $v0, %hi(BattleCam_TargetActor)
.L80248E00:
/* 1776E0 80248E00 9442F27C */ lhu $v0, %lo(BattleCam_TargetActor)($v0)
/* 1776E4 80248E04 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 1776E8 80248E08 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 1776EC 80248E0C AFBF0040 */ sw $ra, 0x40($sp)
/* 1776F0 80248E10 F7BE0070 */ sdc1 $f30, 0x70($sp)
/* 1776F4 80248E14 F7BC0068 */ sdc1 $f28, 0x68($sp)
.L80248E18:
/* 1776F8 80248E18 F7BA0060 */ sdc1 $f26, 0x60($sp)
/* 1776FC 80248E1C F7B80058 */ sdc1 $f24, 0x58($sp)
/* 177700 80248E20 F7B60050 */ sdc1 $f22, 0x50($sp)
/* 177704 80248E24 F7B40048 */ sdc1 $f20, 0x48($sp)
/* 177708 80248E28 30430700 */ andi $v1, $v0, 0x700
/* 17770C 80248E2C 304500FF */ andi $a1, $v0, 0xFF
D_80248E30:
/* 177710 80248E30 24020100 */ addiu $v0, $zero, 0x100
glabel .L80248E34
/* 177714 80248E34 10620065 */ beq $v1, $v0, .L80248FCC
/* 177718 80248E38 28620101 */ slti $v0, $v1, 0x101
/* 17771C 80248E3C 10400005 */ beqz $v0, .L80248E54
.L80248E40:
/* 177720 80248E40 24020200 */ addiu $v0, $zero, 0x200
/* 177724 80248E44 10600007 */ beqz $v1, .L80248E64
/* 177728 80248E48 0000102D */ daddu $v0, $zero, $zero
/* 17772C 80248E4C 080925F6 */ j .L802497D8
/* 177730 80248E50 00000000 */ nop
.L80248E54:
/* 177734 80248E54 106200B8 */ beq $v1, $v0, .L80249138
.L80248E58:
/* 177738 80248E58 0000102D */ daddu $v0, $zero, $zero
/* 17773C 80248E5C 080925F6 */ j .L802497D8
/* 177740 80248E60 00000000 */ nop
glabel .L80248E64
/* 177744 80248E64 8C8400D8 */ lw $a0, 0xD8($a0)
/* 177748 80248E68 1080025B */ beqz $a0, .L802497D8
/* 17774C 80248E6C 00000000 */ nop
/* 177750 80248E70 C4980144 */ lwc1 $f24, 0x144($a0)
/* 177754 80248E74 90830191 */ lbu $v1, 0x191($a0)
/* 177758 80248E78 C490014C */ lwc1 $f16, 0x14C($a0)
.L80248E7C:
/* 17775C 80248E7C 00031042 */ srl $v0, $v1, 1
/* 177760 80248E80 44820000 */ mtc1 $v0, $f0
/* 177764 80248E84 00000000 */ nop
/* 177768 80248E88 46800020 */ cvt.s.w $f0, $f0
/* 17776C 80248E8C E7B00018 */ swc1 $f16, 0x18($sp)
glabel .L80248E90
/* 177770 80248E90 C4820148 */ lwc1 $f2, 0x148($a0)
/* 177774 80248E94 00031082 */ srl $v0, $v1, 2
/* 177778 80248E98 46001080 */ add.s $f2, $f2, $f0
/* 17777C 80248E9C 44820000 */ mtc1 $v0, $f0
/* 177780 80248EA0 00000000 */ nop
/* 177784 80248EA4 46800020 */ cvt.s.w $f0, $f0
/* 177788 80248EA8 90820190 */ lbu $v0, 0x190($a0)
/* 17778C 80248EAC 46001500 */ add.s $f20, $f2, $f0
/* 177790 80248EB0 4483D000 */ mtc1 $v1, $f26
.L80248EB4:
/* 177794 80248EB4 00000000 */ nop
/* 177798 80248EB8 4680D6A0 */ cvt.s.w $f26, $f26
D_80248EBC:
/* 17779C 80248EBC 4482B000 */ mtc1 $v0, $f22
/* 1777A0 80248EC0 00000000 */ nop
/* 1777A4 80248EC4 4680B5A0 */ cvt.s.w $f22, $f22
/* 1777A8 80248EC8 4616D000 */ add.s $f0, $f26, $f22
/* 1777AC 80248ECC 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 1777B0 80248ED0 4481E000 */ mtc1 $at, $f28
glabel .L80248ED4
/* 1777B4 80248ED4 00000000 */ nop
/* 1777B8 80248ED8 461C0002 */ mul.s $f0, $f0, $f28
.L80248EDC:
/* 1777BC 80248EDC 00000000 */ nop
/* 1777C0 80248EE0 84840428 */ lh $a0, 0x428($a0)
/* 1777C4 80248EE4 0C09A75B */ jal get_actor
.L80248EE8:
/* 1777C8 80248EE8 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 1777CC 80248EEC 0040202D */ daddu $a0, $v0, $zero
/* 1777D0 80248EF0 10800239 */ beqz $a0, .L802497D8
/* 1777D4 80248EF4 0000102D */ daddu $v0, $zero, $zero
/* 1777D8 80248EF8 90830191 */ lbu $v1, 0x191($a0)
/* 1777DC 80248EFC C4820148 */ lwc1 $f2, 0x148($a0)
/* 1777E0 80248F00 00031042 */ srl $v0, $v1, 1
/* 1777E4 80248F04 44820000 */ mtc1 $v0, $f0
.L80248F08:
/* 1777E8 80248F08 00000000 */ nop
/* 1777EC 80248F0C 46800020 */ cvt.s.w $f0, $f0
/* 1777F0 80248F10 46001080 */ add.s $f2, $f2, $f0
/* 1777F4 80248F14 00031082 */ srl $v0, $v1, 2
D_80248F18:
/* 1777F8 80248F18 44820000 */ mtc1 $v0, $f0
/* 1777FC 80248F1C 00000000 */ nop
D_80248F20:
/* 177800 80248F20 46800020 */ cvt.s.w $f0, $f0
/* 177804 80248F24 46001080 */ add.s $f2, $f2, $f0
D_80248F28:
/* 177808 80248F28 E7A20024 */ swc1 $f2, 0x24($sp)
/* 17780C 80248F2C C4920144 */ lwc1 $f18, 0x144($a0)
/* 177810 80248F30 E7B20020 */ swc1 $f18, 0x20($sp)
/* 177814 80248F34 C490014C */ lwc1 $f16, 0x14C($a0)
/* 177818 80248F38 E7B00028 */ swc1 $f16, 0x28($sp)
/* 17781C 80248F3C 90820190 */ lbu $v0, 0x190($a0)
/* 177820 80248F40 46189001 */ sub.s $f0, $f18, $f24
/* 177824 80248F44 00621821 */ addu $v1, $v1, $v0
D_80248F48:
/* 177828 80248F48 00031843 */ sra $v1, $v1, 1
/* 17782C 80248F4C 461C0002 */ mul.s $f0, $f0, $f28
/* 177830 80248F50 00000000 */ nop
.L80248F54:
/* 177834 80248F54 44839000 */ mtc1 $v1, $f18
/* 177838 80248F58 00000000 */ nop
/* 17783C 80248F5C 468094A0 */ cvt.s.w $f18, $f18
D_80248F60:
/* 177840 80248F60 3C03802A */ lui $v1, %hi(BattleCam_ModeY)
/* 177844 80248F64 8063F2A2 */ lb $v1, %lo(BattleCam_ModeY)($v1)
/* 177848 80248F68 E7B20030 */ swc1 $f18, 0x30($sp)
/* 17784C 80248F6C 0460000B */ bltz $v1, .L80248F9C
D_80248F70:
/* 177850 80248F70 4600C780 */ add.s $f30, $f24, $f0
/* 177854 80248F74 506000C6 */ beql $v1, $zero, .L80249290
/* 177858 80248F78 4600A706 */ mov.s $f28, $f20
.L80248F7C:
/* 17785C 80248F7C 4602A001 */ sub.s $f0, $f20, $f2
.L80248F80:
/* 177860 80248F80 461C0082 */ mul.s $f2, $f0, $f28
.L80248F84:
/* 177864 80248F84 00000000 */ nop
/* 177868 80248F88 C7B00024 */ lwc1 $f16, 0x24($sp)
/* 17786C 80248F8C 3C0140C0 */ lui $at, (0x40C00000 >> 16)
D_80248F90:
/* 177870 80248F90 44812000 */ mtc1 $at, $f4
/* 177874 80248F94 0809249D */ j .L80249274
/* 177878 80248F98 46028080 */ add.s $f2, $f16, $f2
.L80248F9C:
/* 17787C 80248F9C 2402FFFF */ addiu $v0, $zero, -0x1
/* 177880 80248FA0 106200BA */ beq $v1, $v0, .L8024928C
/* 177884 80248FA4 00000000 */ nop
/* 177888 80248FA8 C7B20024 */ lwc1 $f18, 0x24($sp)
/* 17788C 80248FAC 46149001 */ sub.s $f0, $f18, $f20
/* 177890 80248FB0 3C013E80 */ lui $at, (0x3E800000 >> 16)
/* 177894 80248FB4 44811000 */ mtc1 $at, $f2
/* 177898 80248FB8 00000000 */ nop
/* 17789C 80248FBC 46020002 */ mul.s $f0, $f0, $f2
glabel func_80248FC0
/* 1778A0 80248FC0 00000000 */ nop
/* 1778A4 80248FC4 080924A4 */ j .L80249290
/* 1778A8 80248FC8 4600A700 */ add.s $f28, $f20, $f0
.L80248FCC:
/* 1778AC 80248FCC 8C8400DC */ lw $a0, 0xDC($a0)
.L80248FD0:
/* 1778B0 80248FD0 10800201 */ beqz $a0, .L802497D8
/* 1778B4 80248FD4 0000102D */ daddu $v0, $zero, $zero
/* 1778B8 80248FD8 C4980144 */ lwc1 $f24, 0x144($a0)
/* 1778BC 80248FDC 90830191 */ lbu $v1, 0x191($a0)
/* 1778C0 80248FE0 C490014C */ lwc1 $f16, 0x14C($a0)
/* 1778C4 80248FE4 00031042 */ srl $v0, $v1, 1
/* 1778C8 80248FE8 44820000 */ mtc1 $v0, $f0
/* 1778CC 80248FEC 00000000 */ nop
dgb_01_img1_gfx:
/* 1778D0 80248FF0 46800020 */ cvt.s.w $f0, $f0
/* 1778D4 80248FF4 E7B00018 */ swc1 $f16, 0x18($sp)
/* 1778D8 80248FF8 C4820148 */ lwc1 $f2, 0x148($a0)
/* 1778DC 80248FFC 00031082 */ srl $v0, $v1, 2
/* 1778E0 80249000 46001080 */ add.s $f2, $f2, $f0
.L80249004:
/* 1778E4 80249004 44820000 */ mtc1 $v0, $f0
.L80249008:
/* 1778E8 80249008 00000000 */ nop
/* 1778EC 8024900C 46800020 */ cvt.s.w $f0, $f0
/* 1778F0 80249010 90820190 */ lbu $v0, 0x190($a0)
/* 1778F4 80249014 46001500 */ add.s $f20, $f2, $f0
/* 1778F8 80249018 4483D000 */ mtc1 $v1, $f26
.L8024901C:
/* 1778FC 8024901C 00000000 */ nop
/* 177900 80249020 4680D6A0 */ cvt.s.w $f26, $f26
/* 177904 80249024 4482B000 */ mtc1 $v0, $f22
/* 177908 80249028 00000000 */ nop
.L8024902C:
/* 17790C 8024902C 4680B5A0 */ cvt.s.w $f22, $f22
/* 177910 80249030 4616D000 */ add.s $f0, $f26, $f22
glabel .L80249034
/* 177914 80249034 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 177918 80249038 4481E000 */ mtc1 $at, $f28
D_8024903C:
/* 17791C 8024903C 00000000 */ nop
/* 177920 80249040 461C0002 */ mul.s $f0, $f0, $f28
/* 177924 80249044 00000000 */ nop
/* 177928 80249048 84840428 */ lh $a0, 0x428($a0)
/* 17792C 8024904C 0C09A75B */ jal get_actor
/* 177930 80249050 E7A0002C */ swc1 $f0, 0x2C($sp)
/* 177934 80249054 0040202D */ daddu $a0, $v0, $zero
/* 177938 80249058 108001DF */ beqz $a0, .L802497D8
/* 17793C 8024905C 0000102D */ daddu $v0, $zero, $zero
/* 177940 80249060 90830191 */ lbu $v1, 0x191($a0)
.L80249064:
/* 177944 80249064 C4820148 */ lwc1 $f2, 0x148($a0)
/* 177948 80249068 00031042 */ srl $v0, $v1, 1
D_8024906C:
/* 17794C 8024906C 44820000 */ mtc1 $v0, $f0
dgb_01_img2_png:
/* 177950 80249070 00000000 */ nop
/* 177954 80249074 46800020 */ cvt.s.w $f0, $f0
/* 177958 80249078 46001080 */ add.s $f2, $f2, $f0
/* 17795C 8024907C 00031082 */ srl $v0, $v1, 2
/* 177960 80249080 44820000 */ mtc1 $v0, $f0
/* 177964 80249084 00000000 */ nop
/* 177968 80249088 46800020 */ cvt.s.w $f0, $f0
.L8024908C:
/* 17796C 8024908C 46001080 */ add.s $f2, $f2, $f0
/* 177970 80249090 E7A20024 */ swc1 $f2, 0x24($sp)
/* 177974 80249094 C4920144 */ lwc1 $f18, 0x144($a0)
.L80249098:
/* 177978 80249098 E7B20020 */ swc1 $f18, 0x20($sp)
D_8024909C:
/* 17797C 8024909C C490014C */ lwc1 $f16, 0x14C($a0)
/* 177980 802490A0 46189001 */ sub.s $f0, $f18, $f24
/* 177984 802490A4 E7B00028 */ swc1 $f16, 0x28($sp)
glabel func_802490A8
/* 177988 802490A8 90820190 */ lbu $v0, 0x190($a0)
/* 17798C 802490AC 00621821 */ addu $v1, $v1, $v0
/* 177990 802490B0 461C0002 */ mul.s $f0, $f0, $f28
/* 177994 802490B4 00000000 */ nop
/* 177998 802490B8 00031843 */ sra $v1, $v1, 1
/* 17799C 802490BC 3C02802A */ lui $v0, %hi(BattleCam_ModeY)
/* 1779A0 802490C0 8042F2A2 */ lb $v0, %lo(BattleCam_ModeY)($v0)
/* 1779A4 802490C4 44839000 */ mtc1 $v1, $f18
/* 1779A8 802490C8 00000000 */ nop
/* 1779AC 802490CC 468094A0 */ cvt.s.w $f18, $f18
/* 1779B0 802490D0 E7B20030 */ swc1 $f18, 0x30($sp)
/* 1779B4 802490D4 0440000D */ bltz $v0, .L8024910C
/* 1779B8 802490D8 4600C780 */ add.s $f30, $f24, $f0
/* 1779BC 802490DC 5040000C */ beql $v0, $zero, .L80249110
/* 1779C0 802490E0 4600A706 */ mov.s $f28, $f20
/* 1779C4 802490E4 4602A001 */ sub.s $f0, $f20, $f2
/* 1779C8 802490E8 461C0082 */ mul.s $f2, $f0, $f28
/* 1779CC 802490EC 00000000 */ nop
/* 1779D0 802490F0 C7B00024 */ lwc1 $f16, 0x24($sp)
/* 1779D4 802490F4 3C0140C0 */ lui $at, (0x40C00000 >> 16)
.L802490F8:
/* 1779D8 802490F8 44812000 */ mtc1 $at, $f4
/* 1779DC 802490FC 46028080 */ add.s $f2, $f16, $f2
/* 1779E0 80249100 46040003 */ div.s $f0, $f0, $f4
/* 1779E4 80249104 08092444 */ j .L80249110
/* 1779E8 80249108 46001700 */ add.s $f28, $f2, $f0
.L8024910C:
/* 1779EC 8024910C C7BC0024 */ lwc1 $f28, 0x24($sp)
.L80249110:
/* 1779F0 80249110 C7B20028 */ lwc1 $f18, 0x28($sp)
/* 1779F4 80249114 C7B00018 */ lwc1 $f16, 0x18($sp)
/* 1779F8 80249118 46109001 */ sub.s $f0, $f18, $f16
/* 1779FC 8024911C 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 177A00 80249120 44811000 */ mtc1 $at, $f2
/* 177A04 80249124 00000000 */ nop
flo_00_pad_9128:
/* 177A08 80249128 46020002 */ mul.s $f0, $f0, $f2
/* 177A0C 8024912C 00000000 */ nop
D_80249130:
/* 177A10 80249130 080924AD */ j .L802492B4
/* 177A14 80249134 46008000 */ add.s $f0, $f16, $f0
.L80249138:
/* 177A18 80249138 00051080 */ sll $v0, $a1, 2
/* 177A1C 8024913C 00441021 */ addu $v0, $v0, $a0
.L80249140:
/* 177A20 80249140 8C4400E0 */ lw $a0, 0xE0($v0)
/* 177A24 80249144 108001A4 */ beqz $a0, .L802497D8
/* 177A28 80249148 0000102D */ daddu $v0, $zero, $zero
/* 177A2C 8024914C C4980144 */ lwc1 $f24, 0x144($a0)
/* 177A30 80249150 90830191 */ lbu $v1, 0x191($a0)
/* 177A34 80249154 C492014C */ lwc1 $f18, 0x14C($a0)
D_80249158:
/* 177A38 80249158 00031042 */ srl $v0, $v1, 1
/* 177A3C 8024915C 44820000 */ mtc1 $v0, $f0
/* 177A40 80249160 00000000 */ nop
/* 177A44 80249164 46800020 */ cvt.s.w $f0, $f0
D_80249168:
/* 177A48 80249168 E7B20018 */ swc1 $f18, 0x18($sp)
/* 177A4C 8024916C C4820148 */ lwc1 $f2, 0x148($a0)
/* 177A50 80249170 00031082 */ srl $v0, $v1, 2
/* 177A54 80249174 46001080 */ add.s $f2, $f2, $f0
/* 177A58 80249178 44820000 */ mtc1 $v0, $f0
.L8024917C:
/* 177A5C 8024917C 00000000 */ nop
/* 177A60 80249180 46800020 */ cvt.s.w $f0, $f0
.L80249184:
/* 177A64 80249184 90820190 */ lbu $v0, 0x190($a0)
/* 177A68 80249188 46001500 */ add.s $f20, $f2, $f0
D_8024918C:
/* 177A6C 8024918C 4483D000 */ mtc1 $v1, $f26
.L80249190:
/* 177A70 80249190 00000000 */ nop
/* 177A74 80249194 4680D6A0 */ cvt.s.w $f26, $f26
/* 177A78 80249198 4482B000 */ mtc1 $v0, $f22
D_8024919C:
/* 177A7C 8024919C 00000000 */ nop
.L802491A0:
/* 177A80 802491A0 4680B5A0 */ cvt.s.w $f22, $f22
/* 177A84 802491A4 4616D000 */ add.s $f0, $f26, $f22
/* 177A88 802491A8 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 177A8C 802491AC 4481E000 */ mtc1 $at, $f28
D_802491B0:
/* 177A90 802491B0 00000000 */ nop
.L802491B4:
/* 177A94 802491B4 461C0002 */ mul.s $f0, $f0, $f28
D_802491B8:
/* 177A98 802491B8 00000000 */ nop
/* 177A9C 802491BC 84840428 */ lh $a0, 0x428($a0)
D_802491C0:
/* 177AA0 802491C0 0C09A75B */ jal get_actor
/* 177AA4 802491C4 E7A0002C */ swc1 $f0, 0x2C($sp)
D_802491C8:
/* 177AA8 802491C8 0040202D */ daddu $a0, $v0, $zero
.L802491CC:
/* 177AAC 802491CC 10800182 */ beqz $a0, .L802497D8
D_802491D0:
/* 177AB0 802491D0 0000102D */ daddu $v0, $zero, $zero
/* 177AB4 802491D4 90830191 */ lbu $v1, 0x191($a0)
D_802491D8:
/* 177AB8 802491D8 C4820148 */ lwc1 $f2, 0x148($a0)
/* 177ABC 802491DC 00031042 */ srl $v0, $v1, 1
D_802491E0:
/* 177AC0 802491E0 44820000 */ mtc1 $v0, $f0
.L802491E4:
/* 177AC4 802491E4 00000000 */ nop
/* 177AC8 802491E8 46800020 */ cvt.s.w $f0, $f0
/* 177ACC 802491EC 46001080 */ add.s $f2, $f2, $f0
D_802491F0_EC2040:
/* 177AD0 802491F0 00031082 */ srl $v0, $v1, 2
/* 177AD4 802491F4 44820000 */ mtc1 $v0, $f0
D_802491F8_EC2048:
/* 177AD8 802491F8 00000000 */ nop
.L802491FC:
/* 177ADC 802491FC 46800020 */ cvt.s.w $f0, $f0
jtbl_80249200:
/* 177AE0 80249200 46001080 */ add.s $f2, $f2, $f0
/* 177AE4 80249204 E7A20024 */ swc1 $f2, 0x24($sp)
/* 177AE8 80249208 C4900144 */ lwc1 $f16, 0x144($a0)
.L8024920C:
/* 177AEC 8024920C E7B00020 */ swc1 $f16, 0x20($sp)
.L80249210:
/* 177AF0 80249210 C492014C */ lwc1 $f18, 0x14C($a0)
/* 177AF4 80249214 E7B20028 */ swc1 $f18, 0x28($sp)
/* 177AF8 80249218 90820190 */ lbu $v0, 0x190($a0)
.L8024921C:
/* 177AFC 8024921C 46188001 */ sub.s $f0, $f16, $f24
/* 177B00 80249220 00621821 */ addu $v1, $v1, $v0
/* 177B04 80249224 00031843 */ sra $v1, $v1, 1
/* 177B08 80249228 461C0002 */ mul.s $f0, $f0, $f28
/* 177B0C 8024922C 00000000 */ nop
/* 177B10 80249230 44838000 */ mtc1 $v1, $f16
.L80249234:
/* 177B14 80249234 00000000 */ nop
/* 177B18 80249238 46808420 */ cvt.s.w $f16, $f16
.L8024923C:
/* 177B1C 8024923C 3C03802A */ lui $v1, %hi(BattleCam_ModeY)
/* 177B20 80249240 8063F2A2 */ lb $v1, %lo(BattleCam_ModeY)($v1)
/* 177B24 80249244 E7B00030 */ swc1 $f16, 0x30($sp)
/* 177B28 80249248 0460000D */ bltz $v1, .L80249280
/* 177B2C 8024924C 4600C780 */ add.s $f30, $f24, $f0
/* 177B30 80249250 5060000F */ beql $v1, $zero, .L80249290
/* 177B34 80249254 4600A706 */ mov.s $f28, $f20
D_80249258:
/* 177B38 80249258 4602A001 */ sub.s $f0, $f20, $f2
/* 177B3C 8024925C 461C0082 */ mul.s $f2, $f0, $f28
/* 177B40 80249260 00000000 */ nop
/* 177B44 80249264 C7B20024 */ lwc1 $f18, 0x24($sp)
/* 177B48 80249268 3C0140C0 */ lui $at, (0x40C00000 >> 16)
/* 177B4C 8024926C 44812000 */ mtc1 $at, $f4
/* 177B50 80249270 46029080 */ add.s $f2, $f18, $f2
.L80249274:
/* 177B54 80249274 46040003 */ div.s $f0, $f0, $f4
/* 177B58 80249278 080924A4 */ j .L80249290
/* 177B5C 8024927C 46001700 */ add.s $f28, $f2, $f0
.L80249280:
/* 177B60 80249280 2402FFFF */ addiu $v0, $zero, -0x1
.L80249284:
/* 177B64 80249284 14620002 */ bne $v1, $v0, .L80249290
/* 177B68 80249288 4600A706 */ mov.s $f28, $f20
.L8024928C:
/* 177B6C 8024928C C7BC0024 */ lwc1 $f28, 0x24($sp)
.L80249290:
/* 177B70 80249290 C7B00028 */ lwc1 $f16, 0x28($sp)
/* 177B74 80249294 C7B20018 */ lwc1 $f18, 0x18($sp)
/* 177B78 80249298 46128001 */ sub.s $f0, $f16, $f18
/* 177B7C 8024929C 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 177B80 802492A0 44811000 */ mtc1 $at, $f2
/* 177B84 802492A4 00000000 */ nop
/* 177B88 802492A8 46020002 */ mul.s $f0, $f0, $f2
.L802492AC:
/* 177B8C 802492AC 00000000 */ nop
/* 177B90 802492B0 46009000 */ add.s $f0, $f18, $f0
.L802492B4:
/* 177B94 802492B4 E7A0001C */ swc1 $f0, 0x1C($sp)
.L802492B8:
/* 177B98 802492B8 3C02802A */ lui $v0, %hi(D_8029F2A6)
/* 177B9C 802492BC 8042F2A6 */ lb $v0, %lo(D_8029F2A6)($v0)
/* 177BA0 802492C0 10400029 */ beqz $v0, D_80249368
/* 177BA4 802492C4 00000000 */ nop
/* 177BA8 802492C8 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength)
/* 177BAC 802492CC C422F28C */ lwc1 $f2, %lo(BattleCam_InitialBoomLength)($at)
/* 177BB0 802492D0 3C0143FA */ lui $at, (0x43FA0000 >> 16)
/* 177BB4 802492D4 44810000 */ mtc1 $at, $f0
.L802492D8:
/* 177BB8 802492D8 00000000 */ nop
/* 177BBC 802492DC 46020001 */ sub.s $f0, $f0, $f2
.L802492E0:
/* 177BC0 802492E0 3C01802A */ lui $at, %hi(D_8029CC00)
.L802492E4:
/* 177BC4 802492E4 D422CC00 */ ldc1 $f2, %lo(D_8029CC00)($at)
/* 177BC8 802492E8 46000021 */ cvt.d.s $f0, $f0
/* 177BCC 802492EC 46220002 */ mul.d $f0, $f0, $f2
/* 177BD0 802492F0 00000000 */ nop
/* 177BD4 802492F4 3C01403E */ lui $at, (0x403E0000 >> 16)
/* 177BD8 802492F8 44811800 */ mtc1 $at, $f3
/* 177BDC 802492FC 44801000 */ mtc1 $zero, $f2
/* 177BE0 80249300 00000000 */ nop
/* 177BE4 80249304 46220000 */ add.d $f0, $f0, $f2
/* 177BE8 80249308 46200120 */ cvt.s.d $f4, $f0
/* 177BEC 8024930C 46002007 */ neg.s $f0, $f4
.L80249310:
/* 177BF0 80249310 4600F03C */ c.lt.s $f30, $f0
/* 177BF4 80249314 00000000 */ nop
/* 177BF8 80249318 45000008 */ bc1f .L8024933C
/* 177BFC 8024931C 00000000 */ nop
/* 177C00 80249320 461E0001 */ sub.s $f0, $f0, $f30
glabel func_80249324
/* 177C04 80249324 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 177C08 80249328 44811000 */ mtc1 $at, $f2
glabel func_8024932C
/* 177C0C 8024932C 00000000 */ nop
/* 177C10 80249330 46020002 */ mul.s $f0, $f0, $f2
/* 177C14 80249334 00000000 */ nop
/* 177C18 80249338 4600F780 */ add.s $f30, $f30, $f0
.L8024933C:
/* 177C1C 8024933C 461E203C */ c.lt.s $f4, $f30
/* 177C20 80249340 00000000 */ nop
/* 177C24 80249344 45000008 */ bc1f D_80249368
.L80249348:
/* 177C28 80249348 00000000 */ nop
/* 177C2C 8024934C 461E2001 */ sub.s $f0, $f4, $f30
/* 177C30 80249350 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 177C34 80249354 44811000 */ mtc1 $at, $f2
/* 177C38 80249358 00000000 */ nop
/* 177C3C 8024935C 46020002 */ mul.s $f0, $f0, $f2
D_80249360:
/* 177C40 80249360 00000000 */ nop
/* 177C44 80249364 4600F780 */ add.s $f30, $f30, $f0
D_80249368:
/* 177C48 80249368 12200055 */ beqz $s1, .L802494C0
/* 177C4C 8024936C 00000000 */ nop
D_80249370:
/* 177C50 80249370 3C0141C0 */ lui $at, (0x41C00000 >> 16)
/* 177C54 80249374 44810000 */ mtc1 $at, $f0
D_80249378:
/* 177C58 80249378 00000000 */ nop
/* 177C5C 8024937C 4600B581 */ sub.s $f22, $f22, $f0
glabel func_80249380
/* 177C60 80249380 4600D681 */ sub.s $f26, $f26, $f0
/* 177C64 80249384 44800000 */ mtc1 $zero, $f0
/* 177C68 80249388 00000000 */ nop
/* 177C6C 8024938C 4600B03C */ c.lt.s $f22, $f0
/* 177C70 80249390 00000000 */ nop
/* 177C74 80249394 45030001 */ bc1tl .L8024939C
/* 177C78 80249398 46000586 */ mov.s $f22, $f0
.L8024939C:
/* 177C7C 8024939C 4600D03C */ c.lt.s $f26, $f0
end_01_D_802493A0_E0E700:
/* 177C80 802493A0 00000000 */ nop
/* 177C84 802493A4 45030001 */ bc1tl .L802493AC
/* 177C88 802493A8 46000686 */ mov.s $f26, $f0
.L802493AC:
/* 177C8C 802493AC 3C03802A */ lui $v1, %hi(BattleCam_BoomLength)
/* 177C90 802493B0 2463F280 */ addiu $v1, $v1, %lo(BattleCam_BoomLength)
/* 177C94 802493B4 84620000 */ lh $v0, 0x0($v1)
/* 177C98 802493B8 461AB080 */ add.s $f2, $f22, $f26
/* 177C9C 802493BC 44820000 */ mtc1 $v0, $f0
/* 177CA0 802493C0 00000000 */ nop
/* 177CA4 802493C4 46800020 */ cvt.s.w $f0, $f0
/* 177CA8 802493C8 46020000 */ add.s $f0, $f0, $f2
/* 177CAC 802493CC 3C02802A */ lui $v0, %hi(BattleCam_SetImmediately)
/* 177CB0 802493D0 8042F2A4 */ lb $v0, %lo(BattleCam_SetImmediately)($v0)
.L802493D4:
/* 177CB4 802493D4 4600040D */ trunc.w.s $f16, $f0
/* 177CB8 802493D8 44048000 */ mfc1 $a0, $f16
.L802493DC:
/* 177CBC 802493DC 10400010 */ beqz $v0, jtbl_80249420
jtbl_802493E0:
/* 177CC0 802493E0 A4640000 */ sh $a0, 0x0($v1)
/* 177CC4 802493E4 E61E0054 */ swc1 $f30, 0x54($s0)
/* 177CC8 802493E8 E61C0058 */ swc1 $f28, 0x58($s0)
/* 177CCC 802493EC C7B0001C */ lwc1 $f16, 0x1C($sp)
/* 177CD0 802493F0 3C02802A */ lui $v0, %hi(BattleCam_BoomZOffset)
/* 177CD4 802493F4 8442F286 */ lh $v0, %lo(BattleCam_BoomZOffset)($v0)
/* 177CD8 802493F8 3C03802A */ lui $v1, %hi(BattleCam_BoomYaw)
/* 177CDC 802493FC 9463F282 */ lhu $v1, %lo(BattleCam_BoomYaw)($v1)
/* 177CE0 80249400 A604001E */ sh $a0, 0x1E($s0)
/* 177CE4 80249404 3C04802A */ lui $a0, %hi(BattleCam_BoomPitch)
/* 177CE8 80249408 9484F284 */ lhu $a0, %lo(BattleCam_BoomPitch)($a0)
/* 177CEC 8024940C 00021200 */ sll $v0, $v0, 8
/* 177CF0 80249410 E610005C */ swc1 $f16, 0x5C($s0)
/* 177CF4 80249414 A6020026 */ sh $v0, 0x26($s0)
/* 177CF8 80249418 A6030024 */ sh $v1, 0x24($s0)
.L8024941C:
/* 177CFC 8024941C A6040022 */ sh $a0, 0x22($s0)
jtbl_80249420:
/* 177D00 80249420 8602001E */ lh $v0, 0x1E($s0)
/* 177D04 80249424 86040026 */ lh $a0, 0x26($s0)
/* 177D08 80249428 86030024 */ lh $v1, 0x24($s0)
/* 177D0C 8024942C 44820000 */ mtc1 $v0, $f0
/* 177D10 80249430 00000000 */ nop
/* 177D14 80249434 46800020 */ cvt.s.w $f0, $f0
/* 177D18 80249438 86020022 */ lh $v0, 0x22($s0)
/* 177D1C 8024943C 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength)
end_01_CreditsData:
/* 177D20 80249440 E420F28C */ swc1 $f0, %lo(BattleCam_InitialBoomLength)($at)
/* 177D24 80249444 44820000 */ mtc1 $v0, $f0
/* 177D28 80249448 00000000 */ nop
/* 177D2C 8024944C 46800020 */ cvt.s.w $f0, $f0
/* 177D30 80249450 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch)
/* 177D34 80249454 E420F294 */ swc1 $f0, %lo(BattleCam_InitialBoomPitch)($at)
/* 177D38 80249458 44830000 */ mtc1 $v1, $f0
/* 177D3C 8024945C 00000000 */ nop
/* 177D40 80249460 46800020 */ cvt.s.w $f0, $f0
/* 177D44 80249464 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw)
/* 177D48 80249468 E420F290 */ swc1 $f0, %lo(BattleCam_InitialBoomYaw)($at)
/* 177D4C 8024946C 04820001 */ bltzl $a0, .L80249474
/* 177D50 80249470 248400FF */ addiu $a0, $a0, 0xFF
.L80249474:
/* 177D54 80249474 00041203 */ sra $v0, $a0, 8
/* 177D58 80249478 C6020054 */ lwc1 $f2, 0x54($s0)
/* 177D5C 8024947C C6040058 */ lwc1 $f4, 0x58($s0)
/* 177D60 80249480 C606005C */ lwc1 $f6, 0x5C($s0)
D_80249484:
/* 177D64 80249484 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeLeft)
/* 177D68 80249488 9463F29E */ lhu $v1, %lo(BattleCam_MoveTimeLeft)($v1)
.L8024948C:
/* 177D6C 8024948C 44820000 */ mtc1 $v0, $f0
/* 177D70 80249490 00000000 */ nop
/* 177D74 80249494 46800020 */ cvt.s.w $f0, $f0
/* 177D78 80249498 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset)
/* 177D7C 8024949C E420F298 */ swc1 $f0, %lo(BattleCam_InitialBoomZOffset)($at)
/* 177D80 802494A0 3C01802A */ lui $at, %hi(BattleCam_InitialPosX)
/* 177D84 802494A4 E422F2A8 */ swc1 $f2, %lo(BattleCam_InitialPosX)($at)
.L802494A8:
/* 177D88 802494A8 3C01802A */ lui $at, %hi(BattleCam_InitialPosY)
.L802494AC:
/* 177D8C 802494AC E424F2AC */ swc1 $f4, %lo(BattleCam_InitialPosY)($at)
/* 177D90 802494B0 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ)
/* 177D94 802494B4 E426F2B0 */ swc1 $f6, %lo(BattleCam_InitialPosZ)($at)
/* 177D98 802494B8 3C01802A */ lui $at, %hi(BattleCam_MoveTimeTotal)
/* 177D9C 802494BC A423F2A0 */ sh $v1, %lo(BattleCam_MoveTimeTotal)($at)
.L802494C0:
/* 177DA0 802494C0 3C02802A */ lui $v0, %hi(BattleCam_UseLinearInterp)
/* 177DA4 802494C4 8042F2A5 */ lb $v0, %lo(BattleCam_UseLinearInterp)($v0)
/* 177DA8 802494C8 14400027 */ bnez $v0, .L80249568
/* 177DAC 802494CC 00000000 */ nop
/* 177DB0 802494D0 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft)
/* 177DB4 802494D4 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0)
/* 177DB8 802494D8 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal)
/* 177DBC 802494DC 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 177DC0 802494E0 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 177DC4 802494E4 4481C000 */ mtc1 $at, $f24
/* 177DC8 802494E8 4482D000 */ mtc1 $v0, $f26
/* 177DCC 802494EC 00000000 */ nop
.L802494F0:
/* 177DD0 802494F0 4680D6A0 */ cvt.s.w $f26, $f26
/* 177DD4 802494F4 44830000 */ mtc1 $v1, $f0
/* 177DD8 802494F8 00000000 */ nop
D_802494FC:
/* 177DDC 802494FC 46800020 */ cvt.s.w $f0, $f0
/* 177DE0 80249500 4600D683 */ div.s $f26, $f26, $f0
/* 177DE4 80249504 461AC301 */ sub.s $f12, $f24, $f26
/* 177DE8 80249508 3C014049 */ lui $at, (0x40490FD0 >> 16)
.L8024950C:
/* 177DEC 8024950C 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF)
/* 177DF0 80249510 4481B000 */ mtc1 $at, $f22
/* 177DF4 80249514 00000000 */ nop
/* 177DF8 80249518 46166302 */ mul.s $f12, $f12, $f22
/* 177DFC 8024951C 00000000 */ nop
/* 177E00 80249520 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 177E04 80249524 4481A000 */ mtc1 $at, $f20
.L80249528:
/* 177E08 80249528 00000000 */ nop
/* 177E0C 8024952C 46146302 */ mul.s $f12, $f12, $f20
/* 177E10 80249530 0C00A85B */ jal sin_rad
/* 177E14 80249534 00000000 */ nop
/* 177E18 80249538 46160002 */ mul.s $f0, $f0, $f22
/* 177E1C 8024953C 00000000 */ nop
/* 177E20 80249540 46140302 */ mul.s $f12, $f0, $f20
D_80249544:
/* 177E24 80249544 0C00A85B */ jal sin_rad
/* 177E28 80249548 00000000 */ nop
/* 177E2C 8024954C 46160002 */ mul.s $f0, $f0, $f22
/* 177E30 80249550 00000000 */ nop
/* 177E34 80249554 46140302 */ mul.s $f12, $f0, $f20
/* 177E38 80249558 0C00A85B */ jal sin_rad
.L8024955C:
/* 177E3C 8024955C 00000000 */ nop
/* 177E40 80249560 08092565 */ j .L80249594
/* 177E44 80249564 4600C681 */ sub.s $f26, $f24, $f0
.L80249568:
/* 177E48 80249568 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft)
.L8024956C:
/* 177E4C 8024956C 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0)
D_80249570:
/* 177E50 80249570 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal)
/* 177E54 80249574 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 177E58 80249578 4482D000 */ mtc1 $v0, $f26
/* 177E5C 8024957C 00000000 */ nop
.L80249580:
/* 177E60 80249580 4680D6A0 */ cvt.s.w $f26, $f26
/* 177E64 80249584 44830000 */ mtc1 $v1, $f0
/* 177E68 80249588 00000000 */ nop
/* 177E6C 8024958C 46800020 */ cvt.s.w $f0, $f0
.L80249590:
/* 177E70 80249590 4600D683 */ div.s $f26, $f26, $f0
.L80249594:
/* 177E74 80249594 3C01802A */ lui $at, %hi(BattleCam_InitialPosX)
.L80249598:
/* 177E78 80249598 C426F2A8 */ lwc1 $f6, %lo(BattleCam_InitialPosX)($at)
/* 177E7C 8024959C 461A3182 */ mul.s $f6, $f6, $f26
/* 177E80 802495A0 00000000 */ nop
/* 177E84 802495A4 3C01802A */ lui $at, %hi(BattleCam_InitialPosY)
.L802495A8:
/* 177E88 802495A8 C428F2AC */ lwc1 $f8, %lo(BattleCam_InitialPosY)($at)
D_802495AC:
/* 177E8C 802495AC 461A4202 */ mul.s $f8, $f8, $f26
/* 177E90 802495B0 00000000 */ nop
/* 177E94 802495B4 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ)
.L802495B8:
/* 177E98 802495B8 C424F2B0 */ lwc1 $f4, %lo(BattleCam_InitialPosZ)($at)
/* 177E9C 802495BC 461A2102 */ mul.s $f4, $f4, $f26
/* 177EA0 802495C0 00000000 */ nop
/* 177EA4 802495C4 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset)
/* 177EA8 802495C8 C422F298 */ lwc1 $f2, %lo(BattleCam_InitialBoomZOffset)($at)
/* 177EAC 802495CC 461A1082 */ mul.s $f2, $f2, $f26
/* 177EB0 802495D0 00000000 */ nop
/* 177EB4 802495D4 3C013F80 */ lui $at, (0x3F800000 >> 16)
.L802495D8:
/* 177EB8 802495D8 4481B000 */ mtc1 $at, $f22
D_802495DC:
/* 177EBC 802495DC 00000000 */ nop
D_802495E0:
/* 177EC0 802495E0 461AB581 */ sub.s $f22, $f22, $f26
/* 177EC4 802495E4 4616F302 */ mul.s $f12, $f30, $f22
/* 177EC8 802495E8 00000000 */ nop
/* 177ECC 802495EC 4616E382 */ mul.s $f14, $f28, $f22
/* 177ED0 802495F0 00000000 */ nop
.L802495F4:
/* 177ED4 802495F4 3C02802A */ lui $v0, %hi(BattleCam_BoomZOffset)
/* 177ED8 802495F8 8442F286 */ lh $v0, %lo(BattleCam_BoomZOffset)($v0)
/* 177EDC 802495FC 44820000 */ mtc1 $v0, $f0
/* 177EE0 80249600 00000000 */ nop
.L80249604:
/* 177EE4 80249604 46800020 */ cvt.s.w $f0, $f0
/* 177EE8 80249608 46160002 */ mul.s $f0, $f0, $f22
.L8024960C:
/* 177EEC 8024960C 00000000 */ nop
/* 177EF0 80249610 C7B2001C */ lwc1 $f18, 0x1C($sp)
/* 177EF4 80249614 46169282 */ mul.s $f10, $f18, $f22
.L80249618:
/* 177EF8 80249618 00000000 */ nop
glabel func_8024961C
/* 177EFC 8024961C 46001080 */ add.s $f2, $f2, $f0
/* 177F00 80249620 C6180054 */ lwc1 $f24, 0x54($s0)
/* 177F04 80249624 C6140058 */ lwc1 $f20, 0x58($s0)
/* 177F08 80249628 460C3180 */ add.s $f6, $f6, $f12
/* 177F0C 8024962C C610005C */ lwc1 $f16, 0x5C($s0)
/* 177F10 80249630 4406F000 */ mfc1 $a2, $f30
/* 177F14 80249634 460A2100 */ add.s $f4, $f4, $f10
/* 177F18 80249638 44079000 */ mfc1 $a3, $f18
D_8024963C:
/* 177F1C 8024963C 3C014380 */ lui $at, (0x43800000 >> 16)
/* 177F20 80249640 44810000 */ mtc1 $at, $f0
/* 177F24 80249644 460E4200 */ add.s $f8, $f8, $f14
/* 177F28 80249648 E7B00018 */ swc1 $f16, 0x18($sp)
/* 177F2C 8024964C E6060054 */ swc1 $f6, 0x54($s0)
/* 177F30 80249650 46001082 */ mul.s $f2, $f2, $f0
/* 177F34 80249654 00000000 */ nop
/* 177F38 80249658 46003306 */ mov.s $f12, $f6
/* 177F3C 8024965C E604005C */ swc1 $f4, 0x5C($s0)
.L80249660:
/* 177F40 80249660 46002386 */ mov.s $f14, $f4
/* 177F44 80249664 E6080058 */ swc1 $f8, 0x58($s0)
/* 177F48 80249668 4600148D */ trunc.w.s $f18, $f2
/* 177F4C 8024966C 44029000 */ mfc1 $v0, $f18
/* 177F50 80249670 0C00A7B5 */ jal dist2D
/* 177F54 80249674 A6020026 */ sh $v0, 0x26($s0)
.L80249678:
/* 177F58 80249678 4600C306 */ mov.s $f12, $f24
/* 177F5C 8024967C C7B0002C */ lwc1 $f16, 0x2C($sp)
/* 177F60 80249680 C7B20030 */ lwc1 $f18, 0x30($sp)
/* 177F64 80249684 4600A386 */ mov.s $f14, $f20
/* 177F68 80249688 46128080 */ add.s $f2, $f16, $f18
/* 177F6C 8024968C 3C013E00 */ lui $at, (0x3E000000 >> 16)
/* 177F70 80249690 44812000 */ mtc1 $at, $f4
D_80249694:
/* 177F74 80249694 8FA60018 */ lw $a2, 0x18($sp)
/* 177F78 80249698 46041082 */ mul.s $f2, $f2, $f4
/* 177F7C 8024969C 00000000 */ nop
.L802496A0:
/* 177F80 802496A0 8FA70020 */ lw $a3, 0x20($sp)
/* 177F84 802496A4 C7B00024 */ lwc1 $f16, 0x24($sp)
.L802496A8:
/* 177F88 802496A8 C7B20028 */ lwc1 $f18, 0x28($sp)
/* 177F8C 802496AC 3C014280 */ lui $at, (0x42800000 >> 16)
.L802496B0:
/* 177F90 802496B0 44812000 */ mtc1 $at, $f4
/* 177F94 802496B4 46020500 */ add.s $f20, $f0, $f2
/* 177F98 802496B8 E7B00010 */ swc1 $f16, 0x10($sp)
/* 177F9C 802496BC E7B20014 */ swc1 $f18, 0x14($sp)
/* 177FA0 802496C0 0C00A7CB */ jal dist3D
/* 177FA4 802496C4 4604A501 */ sub.s $f20, $f20, $f4
/* 177FA8 802496C8 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 177FAC 802496CC 44811000 */ mtc1 $at, $f2
/* 177FB0 802496D0 00000000 */ nop
.L802496D4:
/* 177FB4 802496D4 46020002 */ mul.s $f0, $f0, $f2
/* 177FB8 802496D8 00000000 */ nop
/* 177FBC 802496DC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength)
/* 177FC0 802496E0 C42AF28C */ lwc1 $f10, %lo(BattleCam_InitialBoomLength)($at)
/* 177FC4 802496E4 461A5282 */ mul.s $f10, $f10, $f26
/* 177FC8 802496E8 00000000 */ nop
/* 177FCC 802496EC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw)
D_802496F0:
/* 177FD0 802496F0 C428F290 */ lwc1 $f8, %lo(BattleCam_InitialBoomYaw)($at)
D_802496F4:
/* 177FD4 802496F4 461A4202 */ mul.s $f8, $f8, $f26
.L802496F8:
/* 177FD8 802496F8 00000000 */ nop
.L802496FC:
/* 177FDC 802496FC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch)
/* 177FE0 80249700 C424F294 */ lwc1 $f4, %lo(BattleCam_InitialBoomPitch)($at)
/* 177FE4 80249704 3C02802A */ lui $v0, %hi(BattleCam_BoomLength)
/* 177FE8 80249708 8442F280 */ lh $v0, %lo(BattleCam_BoomLength)($v0)
/* 177FEC 8024970C 461A2102 */ mul.s $f4, $f4, $f26
/* 177FF0 80249710 00000000 */ nop
/* 177FF4 80249714 44821000 */ mtc1 $v0, $f2
/* 177FF8 80249718 00000000 */ nop
/* 177FFC 8024971C 468010A0 */ cvt.s.w $f2, $f2
/* 178000 80249720 3C02802A */ lui $v0, %hi(BattleCam_BoomYaw)
/* 178004 80249724 8442F282 */ lh $v0, %lo(BattleCam_BoomYaw)($v0)
/* 178008 80249728 44823000 */ mtc1 $v0, $f6
/* 17800C 8024972C 00000000 */ nop
/* 178010 80249730 468031A0 */ cvt.s.w $f6, $f6
/* 178014 80249734 46163182 */ mul.s $f6, $f6, $f22
/* 178018 80249738 00000000 */ nop
/* 17801C 8024973C 46141080 */ add.s $f2, $f2, $f20
/* 178020 80249740 3C02802A */ lui $v0, %hi(BattleCam_BoomPitch)
/* 178024 80249744 8442F284 */ lh $v0, %lo(BattleCam_BoomPitch)($v0)
/* 178028 80249748 46001080 */ add.s $f2, $f2, $f0
/* 17802C 8024974C 44820000 */ mtc1 $v0, $f0
D_80249750:
/* 178030 80249750 00000000 */ nop
/* 178034 80249754 46800020 */ cvt.s.w $f0, $f0
glabel func_80249758
/* 178038 80249758 46160002 */ mul.s $f0, $f0, $f22
/* 17803C 8024975C 00000000 */ nop
/* 178040 80249760 46161082 */ mul.s $f2, $f2, $f22
/* 178044 80249764 00000000 */ nop
/* 178048 80249768 46064200 */ add.s $f8, $f8, $f6
/* 17804C 8024976C 3C04802A */ lui $a0, %hi(BattleCam_MoveTimeLeft)
/* 178050 80249770 2484F29E */ addiu $a0, $a0, %lo(BattleCam_MoveTimeLeft)
.L80249774:
/* 178054 80249774 46002100 */ add.s $f4, $f4, $f0
/* 178058 80249778 4600440D */ trunc.w.s $f16, $f8
/* 17805C 8024977C 44028000 */ mfc1 $v0, $f16
/* 178060 80249780 00000000 */ nop
/* 178064 80249784 A6020024 */ sh $v0, 0x24($s0)
/* 178068 80249788 46025280 */ add.s $f10, $f10, $f2
/* 17806C 8024978C 4600240D */ trunc.w.s $f16, $f4
/* 178070 80249790 44028000 */ mfc1 $v0, $f16
/* 178074 80249794 00000000 */ nop
/* 178078 80249798 A6020022 */ sh $v0, 0x22($s0)
/* 17807C 8024979C 4600540D */ trunc.w.s $f16, $f10
/* 178080 802497A0 44028000 */ mfc1 $v0, $f16
/* 178084 802497A4 00000000 */ nop
/* 178088 802497A8 A602001E */ sh $v0, 0x1E($s0)
.L802497AC:
/* 17808C 802497AC 84820000 */ lh $v0, 0x0($a0)
glabel func_802497B0
/* 178090 802497B0 94830000 */ lhu $v1, 0x0($a0)
/* 178094 802497B4 14400006 */ bnez $v0, func_802497D0
/* 178098 802497B8 2462FFFF */ addiu $v0, $v1, -0x1
/* 17809C 802497BC 24020001 */ addiu $v0, $zero, 0x1
/* 1780A0 802497C0 3C01802A */ lui $at, %hi(BattleCam_DoneMoving)
/* 1780A4 802497C4 A022F29C */ sb $v0, %lo(BattleCam_DoneMoving)($at)
.L802497C8:
/* 1780A8 802497C8 080925F6 */ j .L802497D8
/* 1780AC 802497CC 0000102D */ daddu $v0, $zero, $zero
glabel func_802497D0
/* 1780B0 802497D0 A4820000 */ sh $v0, 0x0($a0)
/* 1780B4 802497D4 0000102D */ daddu $v0, $zero, $zero
.L802497D8:
/* 1780B8 802497D8 8FBF0040 */ lw $ra, 0x40($sp)
/* 1780BC 802497DC 8FB1003C */ lw $s1, 0x3C($sp)
/* 1780C0 802497E0 8FB00038 */ lw $s0, 0x38($sp)
/* 1780C4 802497E4 D7BE0070 */ ldc1 $f30, 0x70($sp)
/* 1780C8 802497E8 D7BC0068 */ ldc1 $f28, 0x68($sp)
/* 1780CC 802497EC D7BA0060 */ ldc1 $f26, 0x60($sp)
/* 1780D0 802497F0 D7B80058 */ ldc1 $f24, 0x58($sp)
.L802497F4:
/* 1780D4 802497F4 D7B60050 */ ldc1 $f22, 0x50($sp)
/* 1780D8 802497F8 D7B40048 */ ldc1 $f20, 0x48($sp)
/* 1780DC 802497FC 03E00008 */ jr $ra
/* 1780E0 80249800 27BD0078 */ addiu $sp, $sp, 0x78
### DECOMPILED C INSTRUCTIONS:
s32 CamPresetUpdate_F(Evt* script, s32 isInitialCall) {
Actor* actor;
Actor* targetActor;
Camera* camera = &gCameras[CAM_BATTLE];
BattleStatus* battleStatus = &gBattleStatus;
f32 x, y, z;
f32 middlePosX, middlePosY, middlePosZ;
f32 targetX, targetY, targetZ;
f32 sizeX, sizeY;
f32 averageSize, targetAverageSize;
f32 alpha;
f32 distToTarget;
f32 adjustedSize;
f32 boomLength;
f32 extraLength;
f32 dist;
s32 actorClass = BattleCam_TargetActor & ACTOR_CLASS_MASK;
s32 actorID = BattleCam_TargetActor & 0xFF;
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
actor = battleStatus->playerActor;
if (actor == NULL) {
return ApiStatus_BLOCK;
}
x = actor->currentPos.x;
y = actor->currentPos.y + actor->size.y / 2 + actor->size.y / 4;
z = actor->currentPos.z;
sizeY = actor->size.y;
sizeX = actor->size.x;
averageSize = (sizeY + sizeX) / 2;
targetActor = get_actor(actor->targetActorID);
if (targetActor == NULL) {
return ApiStatus_BLOCK;
}
targetX = targetActor->currentPos.x;
targetY = targetActor->currentPos.y + targetActor->size.y / 2 + targetActor->size.y / 4;
targetZ = targetActor->currentPos.z;
targetAverageSize = (targetActor->size.y + targetActor->size.x) / 2;
middlePosX = x + (targetX - x) / 2;
if (BattleCam_ModeY > BTL_CAM_MODEY_MINUS_1) {
if (BattleCam_ModeY != BTL_CAM_MODEY_0) {
middlePosY = targetY + (y - targetY) * 0.5f + (y - targetY) / 6.0f;
} else {
middlePosY = y;
}
} else {
if (BattleCam_ModeY != BTL_CAM_MODEY_MINUS_1) {
middlePosY = y + (targetY - y) / 4;
} else {
middlePosY = targetY;
}
}
middlePosZ = z + (targetZ - z) / 2;
break;
case ACTOR_CLASS_PARTNER:
actor = battleStatus->partnerActor;
if (actor == NULL) {
return ApiStatus_BLOCK;
}
x = actor->currentPos.x;
y = actor->currentPos.y + actor->size.y / 2 + actor->size.y / 4;
z = actor->currentPos.z;
sizeY = actor->size.y;
sizeX = actor->size.x;
averageSize = (sizeY + sizeX) / 2;
targetActor = get_actor(actor->targetActorID);
if (targetActor == NULL) {
return ApiStatus_BLOCK;
}
targetX = targetActor->currentPos.x;
targetY = targetActor->currentPos.y + targetActor->size.y / 2 + targetActor->size.y / 4;
targetZ = targetActor->currentPos.z;
targetAverageSize = (targetActor->size.y + targetActor->size.x) /2;
middlePosX = x + (targetX - x) / 2;
if (BattleCam_ModeY > BTL_CAM_MODEY_MINUS_1) {
if (BattleCam_ModeY != BTL_CAM_MODEY_0) {
middlePosY = targetY + (y - targetY) * 0.5f + (y - targetY) / 6.0f;
} else {
middlePosY = y;
}
} else {
middlePosY = targetY;
}
middlePosZ = z + (targetZ - z) / 2;
break;
case ACTOR_CLASS_ENEMY:
actor = battleStatus->enemyActors[actorID];
if (actor == NULL) {
return ApiStatus_BLOCK;
}
x = actor->currentPos.x;
y = actor->currentPos.y + actor->size.y / 2 + actor->size.y / 4;
z = actor->currentPos.z;
sizeY = actor->size.y;
sizeX = actor->size.x;
averageSize = (sizeY + sizeX) * 0.5f;
targetActor = get_actor(actor->targetActorID);
if (targetActor == NULL) {
return ApiStatus_BLOCK;
}
targetX = targetActor->currentPos.x;
targetY = targetActor->currentPos.y + targetActor->size.y / 2 + targetActor->size.y / 4;
targetZ = targetActor->currentPos.z;
targetAverageSize = (targetActor->size.y + targetActor->size.x) / 2;
middlePosX = x + (targetX - x) / 2;
if (BattleCam_ModeY > BTL_CAM_MODEY_MINUS_1) {
if (BattleCam_ModeY != BTL_CAM_MODEY_0) {
middlePosY = targetY + (y - targetY) * 0.5f + (y - targetY) / 6.0f;
} else {
middlePosY = y;
}
} else {
if (BattleCam_ModeY == BTL_CAM_MODEY_MINUS_1) {
middlePosY = targetY;
} else {
middlePosY = y;
}
}
middlePosZ = z + (targetZ - z) / 2;
break;
default:
return ApiStatus_BLOCK;
}
if (D_8029F2A6) {
f32 upperBound = (500.0f - BattleCam_InitialBoomLength) * 0.4 + 30.0;
f32 lowerBound = -upperBound;
if (middlePosX < lowerBound) {
middlePosX += (lowerBound - middlePosX) / 2;
}
if (middlePosX > upperBound) {
middlePosX += (upperBound - middlePosX) / 2;
}
}
if (isInitialCall) {
sizeX -= 24.0f;
sizeY -= 24.0f;
if (sizeX < 0.0f) {
sizeX = 0.0f;
}
if (sizeY < 0.0f) {
sizeY = 0.0f;
}
BattleCam_BoomLength += sizeX + sizeY;
if (BattleCam_SetImmediately) {
camera->lookAt_obj_target.x = middlePosX;
camera->lookAt_obj_target.y = middlePosY;
camera->lookAt_obj_target.z = middlePosZ;
camera->auxBoomLength = BattleCam_BoomLength;
camera->auxBoomZOffset = BattleCam_BoomZOffset * 256;
camera->auxBoomYaw = BattleCam_BoomYaw;
camera->auxBoomPitch = BattleCam_BoomPitch;
}
BattleCam_InitialBoomLength = camera->auxBoomLength;
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
BattleCam_InitialPosX = camera->lookAt_obj_target.x;
BattleCam_InitialPosY = camera->lookAt_obj_target.y;
BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
}
if (!BattleCam_UseLinearInterp) {
alpha = BattleCam_MoveTimeLeft;
alpha /= BattleCam_MoveTimeTotal;
alpha = 1.0f - sin_rad(sin_rad(sin_rad((1.0f - alpha) * PI_S / 2) * PI_S / 2) * PI_S / 2);
} else {
alpha = BattleCam_MoveTimeLeft;
alpha /= BattleCam_MoveTimeTotal;
}
x = camera->lookAt_obj_target.x;
y = camera->lookAt_obj_target.y;
z = camera->lookAt_obj_target.z;
camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, middlePosX, alpha);
camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, middlePosY, alpha);
camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, middlePosZ, alpha);
camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
dist = dist2D(camera->lookAt_obj_target.x, camera->lookAt_obj_target.z, middlePosX, middlePosZ);
adjustedSize = (averageSize + targetAverageSize) / 8;
extraLength = dist + adjustedSize - 64.0f;
distToTarget = dist3D(x, y, z, targetX, targetY, targetZ);
boomLength = BattleCam_BoomLength + extraLength + distToTarget * 0.5f;
camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, boomLength, alpha);
camera->auxBoomYaw = LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
camera->auxBoomPitch = LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);
if (BattleCam_MoveTimeLeft == 0) {
BattleCam_DoneMoving = TRUE;
} else {
BattleCam_MoveTimeLeft--;
}
return ApiStatus_BLOCK;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_8024AEF8
/* 13E238 8024AEF8 27BDFE78 */ addiu $sp, $sp, -0x188
/* 13E23C 8024AEFC 3C08DC08 */ lui $t0, (0xDC080008 >> 16)
/* 13E240 8024AF00 35080008 */ ori $t0, $t0, (0xDC080008 & 0xFFFF)
/* 13E244 8024AF04 27A40050 */ addiu $a0, $sp, 0x50
/* 13E248 8024AF08 AFB30144 */ sw $s3, 0x144($sp)
/* 13E24C 8024AF0C 3C130001 */ lui $s3, (0x11630 >> 16)
/* 13E250 8024AF10 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF)
/* 13E254 8024AF14 AFB1013C */ sw $s1, 0x13C($sp)
/* 13E258 8024AF18 3C11800A */ lui $s1, %hi(gMainGfxPos)
/* 13E25C 8024AF1C 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos)
/* 13E260 8024AF20 AFBF015C */ sw $ra, 0x15C($sp)
/* 13E264 8024AF24 AFBE0158 */ sw $fp, 0x158($sp)
/* 13E268 8024AF28 AFB70154 */ sw $s7, 0x154($sp)
/* 13E26C 8024AF2C AFB60150 */ sw $s6, 0x150($sp)
/* 13E270 8024AF30 AFB5014C */ sw $s5, 0x14C($sp)
/* 13E274 8024AF34 AFB40148 */ sw $s4, 0x148($sp)
/* 13E278 8024AF38 AFB20140 */ sw $s2, 0x140($sp)
/* 13E27C 8024AF3C AFB00138 */ sw $s0, 0x138($sp)
/* 13E280 8024AF40 F7BC0180 */ sdc1 $f28, 0x180($sp)
/* 13E284 8024AF44 F7BA0178 */ sdc1 $f26, 0x178($sp)
/* 13E288 8024AF48 F7B80170 */ sdc1 $f24, 0x170($sp)
/* 13E28C 8024AF4C F7B60168 */ sdc1 $f22, 0x168($sp)
/* 13E290 8024AF50 F7B40160 */ sdc1 $f20, 0x160($sp)
/* 13E294 8024AF54 AFA5018C */ sw $a1, 0x18C($sp)
/* 13E298 8024AF58 AFA60190 */ sw $a2, 0x190($sp)
/* 13E29C 8024AF5C AFA70194 */ sw $a3, 0x194($sp)
/* 13E2A0 8024AF60 8E220000 */ lw $v0, 0x0($s1)
/* 13E2A4 8024AF64 3C0643A0 */ lui $a2, (0x43A00000 >> 16)
/* 13E2A8 8024AF68 4480A000 */ mtc1 $zero, $f20
/* 13E2AC 8024AF6C 3C074370 */ lui $a3, (0x43700000 >> 16)
/* 13E2B0 8024AF70 3C01C2C8 */ lui $at, (0xC2C80000 >> 16)
/* 13E2B4 8024AF74 44810000 */ mtc1 $at, $f0
/* 13E2B8 8024AF78 3C0142C8 */ lui $at, (0x42C80000 >> 16)
/* 13E2BC 8024AF7C 44811000 */ mtc1 $at, $f2
/* 13E2C0 8024AF80 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 13E2C4 8024AF84 44812000 */ mtc1 $at, $f4
/* 13E2C8 8024AF88 0040182D */ daddu $v1, $v0, $zero
/* 13E2CC 8024AF8C 4405A000 */ mfc1 $a1, $f20
/* 13E2D0 8024AF90 24420008 */ addiu $v0, $v0, 0x8
/* 13E2D4 8024AF94 AE220000 */ sw $v0, 0x0($s1)
/* 13E2D8 8024AF98 3C028025 */ lui $v0, %hi(D_8024F620)
/* 13E2DC 8024AF9C 2442F620 */ addiu $v0, $v0, %lo(D_8024F620)
/* 13E2E0 8024AFA0 AC680000 */ sw $t0, 0x0($v1)
/* 13E2E4 8024AFA4 AC620004 */ sw $v0, 0x4($v1)
/* 13E2E8 8024AFA8 E7B40010 */ swc1 $f20, 0x10($sp)
/* 13E2EC 8024AFAC E7A00014 */ swc1 $f0, 0x14($sp)
/* 13E2F0 8024AFB0 E7A20018 */ swc1 $f2, 0x18($sp)
.L8024AFB4:
/* 13E2F4 8024AFB4 0C018E44 */ jal guOrthoF
/* 13E2F8 8024AFB8 E7A4001C */ swc1 $f4, 0x1C($sp)
.L8024AFBC:
/* 13E2FC 8024AFBC 27A40050 */ addiu $a0, $sp, 0x50
/* 13E300 8024AFC0 3C108007 */ lui $s0, %hi(gMatrixListPos)
/* 13E304 8024AFC4 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos)
/* 13E308 8024AFC8 3C12800A */ lui $s2, %hi(gDisplayContext)
/* 13E30C 8024AFCC 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext)
/* 13E310 8024AFD0 96050000 */ lhu $a1, 0x0($s0)
/* 13E314 8024AFD4 8E420000 */ lw $v0, 0x0($s2)
/* 13E318 8024AFD8 00052980 */ sll $a1, $a1, 6
/* 13E31C 8024AFDC 00B32821 */ addu $a1, $a1, $s3
/* 13E320 8024AFE0 0C019D40 */ jal guMtxF2L
glabel func_8024AFE4
/* 13E324 8024AFE4 00452821 */ addu $a1, $v0, $a1
/* 13E328 8024AFE8 3C09DA38 */ lui $t1, (0xDA380007 >> 16)
/* 13E32C 8024AFEC 35290007 */ ori $t1, $t1, (0xDA380007 & 0xFFFF)
/* 13E330 8024AFF0 27A40050 */ addiu $a0, $sp, 0x50
/* 13E334 8024AFF4 8E230000 */ lw $v1, 0x0($s1)
/* 13E338 8024AFF8 4405A000 */ mfc1 $a1, $f20
/* 13E33C 8024AFFC 4406A000 */ mfc1 $a2, $f20
/* 13E340 8024B000 4407A000 */ mfc1 $a3, $f20
/* 13E344 8024B004 96020000 */ lhu $v0, 0x0($s0)
/* 13E348 8024B008 0060402D */ daddu $t0, $v1, $zero
/* 13E34C 8024B00C 24630008 */ addiu $v1, $v1, 0x8
/* 13E350 8024B010 AE230000 */ sw $v1, 0x0($s1)
/* 13E354 8024B014 24430001 */ addiu $v1, $v0, 0x1
/* 13E358 8024B018 3042FFFF */ andi $v0, $v0, 0xFFFF
/* 13E35C 8024B01C 00021180 */ sll $v0, $v0, 6
/* 13E360 8024B020 AD090000 */ sw $t1, 0x0($t0)
/* 13E364 8024B024 A6030000 */ sh $v1, 0x0($s0)
/* 13E368 8024B028 8E430000 */ lw $v1, 0x0($s2)
/* 13E36C 8024B02C 00531021 */ addu $v0, $v0, $s3
/* 13E370 8024B030 00621821 */ addu $v1, $v1, $v0
/* 13E374 8024B034 0C019E40 */ jal guTranslateF
/* 13E378 8024B038 AD030004 */ sw $v1, 0x4($t0)
/* 13E37C 8024B03C 27A40050 */ addiu $a0, $sp, 0x50
/* 13E380 8024B040 96050000 */ lhu $a1, 0x0($s0)
/* 13E384 8024B044 8E420000 */ lw $v0, 0x0($s2)
/* 13E388 8024B048 00052980 */ sll $a1, $a1, 6
.L8024B04C:
/* 13E38C 8024B04C 00B32821 */ addu $a1, $a1, $s3
/* 13E390 8024B050 0C019D40 */ jal guMtxF2L
/* 13E394 8024B054 00452821 */ addu $a1, $v0, $a1
/* 13E398 8024B058 3C04DA38 */ lui $a0, (0xDA380002 >> 16)
.L8024B05C:
/* 13E39C 8024B05C 34840002 */ ori $a0, $a0, (0xDA380002 & 0xFFFF)
/* 13E3A0 8024B060 3C068027 */ lui $a2, %hi(gPausePartnersNumPartners)
/* 13E3A4 8024B064 24C606B0 */ addiu $a2, $a2, %lo(gPausePartnersNumPartners)
/* 13E3A8 8024B068 8E230000 */ lw $v1, 0x0($s1)
/* 13E3AC 8024B06C 96020000 */ lhu $v0, 0x0($s0)
/* 13E3B0 8024B070 0060282D */ daddu $a1, $v1, $zero
/* 13E3B4 8024B074 24630008 */ addiu $v1, $v1, 0x8
/* 13E3B8 8024B078 AE230000 */ sw $v1, 0x0($s1)
/* 13E3BC 8024B07C 24430001 */ addiu $v1, $v0, 0x1
/* 13E3C0 8024B080 3042FFFF */ andi $v0, $v0, 0xFFFF
/* 13E3C4 8024B084 00021180 */ sll $v0, $v0, 6
/* 13E3C8 8024B088 ACA40000 */ sw $a0, 0x0($a1)
/* 13E3CC 8024B08C A6030000 */ sh $v1, 0x0($s0)
/* 13E3D0 8024B090 8E430000 */ lw $v1, 0x0($s2)
/* 13E3D4 8024B094 00531021 */ addu $v0, $v0, $s3
/* 13E3D8 8024B098 00621821 */ addu $v1, $v1, $v0
/* 13E3DC 8024B09C ACA30004 */ sw $v1, 0x4($a1)
D_8024B0A0:
/* 13E3E0 8024B0A0 8CC20000 */ lw $v0, 0x0($a2)
/* 13E3E4 8024B0A4 18400042 */ blez $v0, .L8024B1B0
/* 13E3E8 8024B0A8 0000802D */ daddu $s0, $zero, $zero
/* 13E3EC 8024B0AC 3C0141A0 */ lui $at, (0x41A00000 >> 16)
/* 13E3F0 8024B0B0 4481B000 */ mtc1 $at, $f22
/* 13E3F4 8024B0B4 27B200D0 */ addiu $s2, $sp, 0xD0
/* 13E3F8 8024B0B8 0200982D */ daddu $s3, $s0, $zero
.L8024B0BC:
/* 13E3FC 8024B0BC 8CC20000 */ lw $v0, 0x0($a2)
/* 13E400 8024B0C0 14400002 */ bnez $v0, .L8024B0CC
/* 13E404 8024B0C4 0262001A */ div $zero, $s3, $v0
.L8024B0C8:
/* 13E408 8024B0C8 0007000D */ break 7
.L8024B0CC:
/* 13E40C 8024B0CC 2401FFFF */ addiu $at, $zero, -0x1
/* 13E410 8024B0D0 14410004 */ bne $v0, $at, .L8024B0E4
.L8024B0D4:
/* 13E414 8024B0D4 3C018000 */ lui $at, (0x80000000 >> 16)
/* 13E418 8024B0D8 16610002 */ bne $s3, $at, .L8024B0E4
/* 13E41C 8024B0DC 00000000 */ nop
.L8024B0E0:
/* 13E420 8024B0E0 0006000D */ break 6
.L8024B0E4:
/* 13E424 8024B0E4 00001012 */ mflo $v0
/* 13E428 8024B0E8 3C018027 */ lui $at, %hi(gPausePartnersRotAngle)
/* 13E42C 8024B0EC C42006A8 */ lwc1 $f0, %lo(gPausePartnersRotAngle)($at)
/* 13E430 8024B0F0 44826000 */ mtc1 $v0, $f12
/* 13E434 8024B0F4 00000000 */ nop
/* 13E438 8024B0F8 46806320 */ cvt.s.w $f12, $f12
/* 13E43C 8024B0FC 0C00A8D4 */ jal cos_deg
/* 13E440 8024B100 46006301 */ sub.s $f12, $f12, $f0
/* 13E444 8024B104 46160002 */ mul.s $f0, $f0, $f22
/* 13E448 8024B108 00000000 */ nop
/* 13E44C 8024B10C 0000882D */ daddu $s1, $zero, $zero
/* 13E450 8024B110 1A00000B */ blez $s0, .L8024B140
D_8024B114:
/* 13E454 8024B114 46140080 */ add.s $f2, $f0, $f20
/* 13E458 8024B118 0240182D */ daddu $v1, $s2, $zero
.L8024B11C:
/* 13E45C 8024B11C C4600000 */ lwc1 $f0, 0x0($v1)
/* 13E460 8024B120 4600103C */ c.lt.s $f2, $f0
/* 13E464 8024B124 00000000 */ nop
.L8024B128:
/* 13E468 8024B128 45010005 */ bc1t .L8024B140
/* 13E46C 8024B12C 00000000 */ nop
/* 13E470 8024B130 26310001 */ addiu $s1, $s1, 0x1
/* 13E474 8024B134 0230102A */ slt $v0, $s1, $s0
/* 13E478 8024B138 1440FFF8 */ bnez $v0, .L8024B11C
/* 13E47C 8024B13C 24630008 */ addiu $v1, $v1, 0x8
.L8024B140:
/* 13E480 8024B140 3C028027 */ lui $v0, %hi(gPausePartnersNumPartners)
/* 13E484 8024B144 8C4206B0 */ lw $v0, %lo(gPausePartnersNumPartners)($v0)
/* 13E488 8024B148 2444FFFF */ addiu $a0, $v0, -0x1
/* 13E48C 8024B14C 0224102A */ slt $v0, $s1, $a0
/* 13E490 8024B150 1040000C */ beqz $v0, .L8024B184
/* 13E494 8024B154 000418C0 */ sll $v1, $a0, 3
.L8024B158:
/* 13E498 8024B158 02431821 */ addu $v1, $s2, $v1
/* 13E49C 8024B15C 2484FFFF */ addiu $a0, $a0, -0x1
/* 13E4A0 8024B160 000410C0 */ sll $v0, $a0, 3
/* 13E4A4 8024B164 02421021 */ addu $v0, $s2, $v0
/* 13E4A8 8024B168 8C4C0000 */ lw $t4, 0x0($v0)
/* 13E4AC 8024B16C 8C4D0004 */ lw $t5, 0x4($v0)
/* 13E4B0 8024B170 AC6C0000 */ sw $t4, 0x0($v1)
/* 13E4B4 8024B174 AC6D0004 */ sw $t5, 0x4($v1)
/* 13E4B8 8024B178 0224102A */ slt $v0, $s1, $a0
.L8024B17C:
/* 13E4BC 8024B17C 1440FFF6 */ bnez $v0, .L8024B158
/* 13E4C0 8024B180 000418C0 */ sll $v1, $a0, 3
.L8024B184:
/* 13E4C4 8024B184 3C068027 */ lui $a2, %hi(gPausePartnersNumPartners)
/* 13E4C8 8024B188 24C606B0 */ addiu $a2, $a2, %lo(gPausePartnersNumPartners)
D_8024B18C:
/* 13E4CC 8024B18C 001110C0 */ sll $v0, $s1, 3
/* 13E4D0 8024B190 02421021 */ addu $v0, $s2, $v0
D_8024B194:
/* 13E4D4 8024B194 AC500004 */ sw $s0, 0x4($v0)
/* 13E4D8 8024B198 E4420000 */ swc1 $f2, 0x0($v0)
/* 13E4DC 8024B19C 8CC20000 */ lw $v0, 0x0($a2)
/* 13E4E0 8024B1A0 26100001 */ addiu $s0, $s0, 0x1
/* 13E4E4 8024B1A4 0202102A */ slt $v0, $s0, $v0
/* 13E4E8 8024B1A8 1440FFC4 */ bnez $v0, .L8024B0BC
/* 13E4EC 8024B1AC 26730168 */ addiu $s3, $s3, 0x168
.L8024B1B0:
/* 13E4F0 8024B1B0 3C048027 */ lui $a0, %hi(gPausePartnersNumPartners)
/* 13E4F4 8024B1B4 248406B0 */ addiu $a0, $a0, %lo(gPausePartnersNumPartners)
/* 13E4F8 8024B1B8 8C820000 */ lw $v0, 0x0($a0)
/* 13E4FC 8024B1BC 184000A8 */ blez $v0, .L8024B460
/* 13E500 8024B1C0 0000882D */ daddu $s1, $zero, $zero
/* 13E504 8024B1C4 27B20090 */ addiu $s2, $sp, 0x90
/* 13E508 8024B1C8 3C138027 */ lui $s3, %hi(gPausePartnersSpriteIDs)
/* 13E50C 8024B1CC 26730660 */ addiu $s3, $s3, %lo(gPausePartnersSpriteIDs)
.L8024B1D0:
/* 13E510 8024B1D0 4480D000 */ mtc1 $zero, $f26
/* 13E514 8024B1D4 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 13E518 8024B1D8 4481E000 */ mtc1 $at, $f28
/* 13E51C 8024B1DC 001118C0 */ sll $v1, $s1, 3
.L8024B1E0:
/* 13E520 8024B1E0 27A200D0 */ addiu $v0, $sp, 0xD0
/* 13E524 8024B1E4 00431021 */ addu $v0, $v0, $v1
/* 13E528 8024B1E8 8C500004 */ lw $s0, 0x4($v0)
/* 13E52C 8024B1EC 8C840000 */ lw $a0, 0x0($a0)
/* 13E530 8024B1F0 00101840 */ sll $v1, $s0, 1
/* 13E534 8024B1F4 00701821 */ addu $v1, $v1, $s0
/* 13E538 8024B1F8 00031100 */ sll $v0, $v1, 4
/* 13E53C 8024B1FC 00431023 */ subu $v0, $v0, $v1
D_8024B200:
/* 13E540 8024B200 000210C0 */ sll $v0, $v0, 3
/* 13E544 8024B204 14800002 */ bnez $a0, .L8024B210
/* 13E548 8024B208 0044001A */ div $zero, $v0, $a0
D_8024B20C:
/* 13E54C 8024B20C 0007000D */ break 7
.L8024B210:
/* 13E550 8024B210 2401FFFF */ addiu $at, $zero, -0x1
/* 13E554 8024B214 14810004 */ bne $a0, $at, .L8024B228
/* 13E558 8024B218 3C018000 */ lui $at, (0x80000000 >> 16)
/* 13E55C 8024B21C 14410002 */ bne $v0, $at, .L8024B228
/* 13E560 8024B220 00000000 */ nop
/* 13E564 8024B224 0006000D */ break 6
.L8024B228:
/* 13E568 8024B228 00001012 */ mflo $v0
/* 13E56C 8024B22C 3C018027 */ lui $at, %hi(gPausePartnersRotAngle)
/* 13E570 8024B230 C42006A8 */ lwc1 $f0, %lo(gPausePartnersRotAngle)($at)
/* 13E574 8024B234 4482A000 */ mtc1 $v0, $f20
/* 13E578 8024B238 00000000 */ nop
/* 13E57C 8024B23C 4680A520 */ cvt.s.w $f20, $f20
/* 13E580 8024B240 00041040 */ sll $v0, $a0, 1
/* 13E584 8024B244 00441021 */ addu $v0, $v0, $a0
/* 13E588 8024B248 4600A501 */ sub.s $f20, $f20, $f0
/* 13E58C 8024B24C 24420011 */ addiu $v0, $v0, 0x11
/* 13E590 8024B250 4482B000 */ mtc1 $v0, $f22
.L8024B254:
/* 13E594 8024B254 00000000 */ nop
D_8024B258:
/* 13E598 8024B258 4680B5A0 */ cvt.s.w $f22, $f22
/* 13E59C 8024B25C 0C00A8BB */ jal sin_deg
/* 13E5A0 8024B260 4600A306 */ mov.s $f12, $f20
/* 13E5A4 8024B264 4600B582 */ mul.s $f22, $f22, $f0
/* 13E5A8 8024B268 00000000 */ nop
/* 13E5AC 8024B26C 3C014228 */ lui $at, (0x42280000 >> 16)
/* 13E5B0 8024B270 44810000 */ mtc1 $at, $f0
/* 13E5B4 8024B274 4600A306 */ mov.s $f12, $f20
/* 13E5B8 8024B278 0C00A8D4 */ jal cos_deg
/* 13E5BC 8024B27C 4600B580 */ add.s $f22, $f22, $f0
.L8024B280:
/* 13E5C0 8024B280 3C0141F0 */ lui $at, (0x41F00000 >> 16)
D_8024B284:
/* 13E5C4 8024B284 44811000 */ mtc1 $at, $f2
/* 13E5C8 8024B288 00000000 */ nop
/* 13E5CC 8024B28C 46020002 */ mul.s $f0, $f0, $f2
/* 13E5D0 8024B290 00000000 */ nop
/* 13E5D4 8024B294 4600A306 */ mov.s $f12, $f20
/* 13E5D8 8024B298 0C00A8D4 */ jal cos_deg
/* 13E5DC 8024B29C 46001601 */ sub.s $f24, $f2, $f0
/* 13E5E0 8024B2A0 3C0141A0 */ lui $at, (0x41A00000 >> 16)
/* 13E5E4 8024B2A4 44811000 */ mtc1 $at, $f2
/* 13E5E8 8024B2A8 00000000 */ nop
/* 13E5EC 8024B2AC 46020002 */ mul.s $f0, $f0, $f2
D_8024B2B0:
/* 13E5F0 8024B2B0 00000000 */ nop
/* 13E5F4 8024B2B4 8FAC018C */ lw $t4, 0x18C($sp)
/* 13E5F8 8024B2B8 25820016 */ addiu $v0, $t4, 0x16
/* 13E5FC 8024B2BC 44821000 */ mtc1 $v0, $f2
/* 13E600 8024B2C0 00000000 */ nop
/* 13E604 8024B2C4 468010A0 */ cvt.s.w $f2, $f2
/* 13E608 8024B2C8 46161080 */ add.s $f2, $f2, $f22
/* 13E60C 8024B2CC 44051000 */ mfc1 $a1, $f2
/* 13E610 8024B2D0 3C014270 */ lui $at, (0x42700000 >> 16)
/* 13E614 8024B2D4 44811000 */ mtc1 $at, $f2
/* 13E618 8024B2D8 27A40050 */ addiu $a0, $sp, 0x50
.L8024B2DC:
/* 13E61C 8024B2DC 4602C080 */ add.s $f2, $f24, $f2
/* 13E620 8024B2E0 8FAD0190 */ lw $t5, 0x190($sp)
/* 13E624 8024B2E4 3C01403E */ lui $at, (0x403E0000 >> 16)
/* 13E628 8024B2E8 4481A800 */ mtc1 $at, $f21
/* 13E62C 8024B2EC 4480A000 */ mtc1 $zero, $f20
/* 13E630 8024B2F0 461A0000 */ add.s $f0, $f0, $f26
/* 13E634 8024B2F4 25A20051 */ addiu $v0, $t5, 0x51
/* 13E638 8024B2F8 44822000 */ mtc1 $v0, $f4
/* 13E63C 8024B2FC 00000000 */ nop
/* 13E640 8024B300 46802120 */ cvt.s.w $f4, $f4
/* 13E644 8024B304 4600C287 */ neg.s $f10, $f24
D_8024B308:
/* 13E648 8024B308 460010A1 */ cvt.d.s $f2, $f2
/* 13E64C 8024B30C 46002100 */ add.s $f4, $f4, $f0
/* 13E650 8024B310 3C013FE0 */ lui $at, (0x3FE00000 >> 16)
/* 13E654 8024B314 44810800 */ mtc1 $at, $f1
/* 13E658 8024B318 44800000 */ mtc1 $zero, $f0
/* 13E65C 8024B31C 4622A503 */ div.d $f20, $f20, $f2
/* 13E660 8024B320 4620A500 */ add.d $f20, $f20, $f0
/* 13E664 8024B324 44075000 */ mfc1 $a3, $f10
.L8024B328:
/* 13E668 8024B328 44062000 */ mfc1 $a2, $f4
/* 13E66C 8024B32C 0C019E40 */ jal guTranslateF
/* 13E670 8024B330 4620A520 */ cvt.s.d $f20, $f20
D_8024B334:
/* 13E674 8024B334 3C054334 */ lui $a1, (0x43340000 >> 16)
/* 13E678 8024B338 4406D000 */ mfc1 $a2, $f26
/* 13E67C 8024B33C 4407D000 */ mfc1 $a3, $f26
/* 13E680 8024B340 0240202D */ daddu $a0, $s2, $zero
/* 13E684 8024B344 0C019EC8 */ jal guRotateF
/* 13E688 8024B348 E7BC0010 */ swc1 $f28, 0x10($sp)
/* 13E68C 8024B34C 0240202D */ daddu $a0, $s2, $zero
/* 13E690 8024B350 27A50050 */ addiu $a1, $sp, 0x50
/* 13E694 8024B354 0C019D80 */ jal guMtxCatF
/* 13E698 8024B358 00A0302D */ daddu $a2, $a1, $zero
/* 13E69C 8024B35C 0240202D */ daddu $a0, $s2, $zero
D_8024B360:
/* 13E6A0 8024B360 4405A000 */ mfc1 $a1, $f20
/* 13E6A4 8024B364 4407E000 */ mfc1 $a3, $f28
/* 13E6A8 8024B368 0C019DF0 */ jal guScaleF
/* 13E6AC 8024B36C 00A0302D */ daddu $a2, $a1, $zero
/* 13E6B0 8024B370 0240202D */ daddu $a0, $s2, $zero
/* 13E6B4 8024B374 27A50050 */ addiu $a1, $sp, 0x50
/* 13E6B8 8024B378 0C019D80 */ jal guMtxCatF
/* 13E6BC 8024B37C 00A0302D */ daddu $a2, $a1, $zero
/* 13E6C0 8024B380 3C014100 */ lui $at, (0x41000000 >> 16)
/* 13E6C4 8024B384 44810000 */ mtc1 $at, $f0
D_8024B388:
/* 13E6C8 8024B388 00000000 */ nop
D_8024B38C:
/* 13E6CC 8024B38C 4618003C */ c.lt.s $f0, $f24
/* 13E6D0 8024B390 00000000 */ nop
/* 13E6D4 8024B394 45010011 */ bc1t .L8024B3DC
D_8024B398:
/* 13E6D8 8024B398 240600A0 */ addiu $a2, $zero, 0xA0
/* 13E6DC 8024B39C 3C0142BE */ lui $at, (0x42BE0000 >> 16)
/* 13E6E0 8024B3A0 44811000 */ mtc1 $at, $f2
/* 13E6E4 8024B3A4 00000000 */ nop
/* 13E6E8 8024B3A8 4602C082 */ mul.s $f2, $f24, $f2
/* 13E6EC 8024B3AC 00000000 */ nop
/* 13E6F0 8024B3B0 3C013E00 */ lui $at, (0x3E000000 >> 16)
/* 13E6F4 8024B3B4 44810000 */ mtc1 $at, $f0
D_8024B3B8:
/* 13E6F8 8024B3B8 00000000 */ nop
/* 13E6FC 8024B3BC 46001082 */ mul.s $f2, $f2, $f0
/* 13E700 8024B3C0 00000000 */ nop
/* 13E704 8024B3C4 3C01437F */ lui $at, (0x437F0000 >> 16)
/* 13E708 8024B3C8 44810000 */ mtc1 $at, $f0
/* 13E70C 8024B3CC 00000000 */ nop
.L8024B3D0:
/* 13E710 8024B3D0 46020001 */ sub.s $f0, $f0, $f2
/* 13E714 8024B3D4 4600028D */ trunc.w.s $f10, $f0
/* 13E718 8024B3D8 44065000 */ mfc1 $a2, $f10
.L8024B3DC:
/* 13E71C 8024B3DC 24050006 */ addiu $a1, $zero, 0x6
/* 13E720 8024B3E0 3C028027 */ lui $v0, %hi(gPausePartnersPartnerIdx)
D_8024B3E4:
/* 13E724 8024B3E4 24420680 */ addiu $v0, $v0, %lo(gPausePartnersPartnerIdx)
/* 13E728 8024B3E8 00108080 */ sll $s0, $s0, 2
/* 13E72C 8024B3EC 02028021 */ addu $s0, $s0, $v0
/* 13E730 8024B3F0 8E030000 */ lw $v1, 0x0($s0)
/* 13E734 8024B3F4 240200FF */ addiu $v0, $zero, 0xFF
/* 13E738 8024B3F8 AFA20014 */ sw $v0, 0x14($sp)
.L8024B3FC:
/* 13E73C 8024B3FC 24020040 */ addiu $v0, $zero, 0x40
D_8024B400:
/* 13E740 8024B400 AFA60010 */ sw $a2, 0x10($sp)
/* 13E744 8024B404 AFA20018 */ sw $v0, 0x18($sp)
/* 13E748 8024B408 00031880 */ sll $v1, $v1, 2
/* 13E74C 8024B40C 00731821 */ addu $v1, $v1, $s3
D_8024B410:
/* 13E750 8024B410 8C640000 */ lw $a0, 0x0($v1)
/* 13E754 8024B414 0C0B7A25 */ jal set_npc_imgfx_all
/* 13E758 8024B418 00C0382D */ daddu $a3, $a2, $zero
/* 13E75C 8024B41C 0000282D */ daddu $a1, $zero, $zero
/* 13E760 8024B420 00A0302D */ daddu $a2, $a1, $zero
/* 13E764 8024B424 8E030000 */ lw $v1, 0x0($s0)
/* 13E768 8024B428 27A20050 */ addiu $v0, $sp, 0x50
/* 13E76C 8024B42C AFA20010 */ sw $v0, 0x10($sp)
/* 13E770 8024B430 00031880 */ sll $v1, $v1, 2
/* 13E774 8024B434 00731821 */ addu $v1, $v1, $s3
/* 13E778 8024B438 8C640000 */ lw $a0, 0x0($v1)
D_8024B43C:
/* 13E77C 8024B43C 0C0B78F6 */ jal spr_draw_npc_sprite
/* 13E780 8024B440 00A0382D */ daddu $a3, $a1, $zero
/* 13E784 8024B444 3C048027 */ lui $a0, %hi(gPausePartnersNumPartners)
/* 13E788 8024B448 248406B0 */ addiu $a0, $a0, %lo(gPausePartnersNumPartners)
/* 13E78C 8024B44C 8C820000 */ lw $v0, 0x0($a0)
/* 13E790 8024B450 26310001 */ addiu $s1, $s1, 0x1
/* 13E794 8024B454 0222102A */ slt $v0, $s1, $v0
/* 13E798 8024B458 1440FF61 */ bnez $v0, .L8024B1E0
/* 13E79C 8024B45C 001118C0 */ sll $v1, $s1, 3
.L8024B460:
/* 13E7A0 8024B460 3C05D838 */ lui $a1, (0xD8380002 >> 16)
D_8024B464:
/* 13E7A4 8024B464 3C03800A */ lui $v1, %hi(gMainGfxPos)
D_8024B468:
/* 13E7A8 8024B468 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* 13E7AC 8024B46C 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF)
/* 13E7B0 8024B470 8C620000 */ lw $v0, 0x0($v1)
/* 13E7B4 8024B474 3C128027 */ lui $s2, %hi(gPauseMenuCurrentTab)
/* 13E7B8 8024B478 265200D4 */ addiu $s2, $s2, %lo(gPauseMenuCurrentTab)
D_8024B47C:
/* 13E7BC 8024B47C 0040202D */ daddu $a0, $v0, $zero
/* 13E7C0 8024B480 24420008 */ addiu $v0, $v0, 0x8
/* 13E7C4 8024B484 AC620000 */ sw $v0, 0x0($v1)
/* 13E7C8 8024B488 24020040 */ addiu $v0, $zero, 0x40
/* 13E7CC 8024B48C AC850000 */ sw $a1, 0x0($a0)
/* 13E7D0 8024B490 AC820004 */ sw $v0, 0x4($a0)
D_8024B494:
/* 13E7D4 8024B494 82500000 */ lb $s0, 0x0($s2)
/* 13E7D8 8024B498 24020004 */ addiu $v0, $zero, 0x4
/* 13E7DC 8024B49C 16020014 */ bne $s0, $v0, .L8024B4F0
D_8024B4A0:
/* 13E7E0 8024B4A0 00000000 */ nop
/* 13E7E4 8024B4A4 3C118027 */ lui $s1, %hi(gPausePartnersLevel)
/* 13E7E8 8024B4A8 263106AC */ addiu $s1, $s1, %lo(gPausePartnersLevel)
/* 13E7EC 8024B4AC 8E220000 */ lw $v0, 0x0($s1)
/* 13E7F0 8024B4B0 14400006 */ bnez $v0, .L8024B4CC
/* 13E7F4 8024B4B4 24040022 */ addiu $a0, $zero, 0x22
/* 13E7F8 8024B4B8 8FAD018C */ lw $t5, 0x18C($sp)
/* 13E7FC 8024B4BC 8FAF0190 */ lw $t7, 0x190($sp)
D_8024B4C0:
/* 13E800 8024B4C0 25A5002A */ addiu $a1, $t5, 0x2A
/* 13E804 8024B4C4 0C090B41 */ jal func_80242D04
/* 13E808 8024B4C8 25E60058 */ addiu $a2, $t7, 0x58
.L8024B4CC:
/* 13E80C 8024B4CC 82420000 */ lb $v0, 0x0($s2)
/* 13E810 8024B4D0 14500007 */ bne $v0, $s0, .L8024B4F0
/* 13E814 8024B4D4 00000000 */ nop
/* 13E818 8024B4D8 8E220000 */ lw $v0, 0x0($s1)
/* 13E81C 8024B4DC 14400004 */ bnez $v0, .L8024B4F0
/* 13E820 8024B4E0 24040008 */ addiu $a0, $zero, 0x8
/* 13E824 8024B4E4 24050012 */ addiu $a1, $zero, 0x12
/* 13E828 8024B4E8 0C093BA5 */ jal func_8024EE94
D_8024B4EC:
/* 13E82C 8024B4EC 2406009E */ addiu $a2, $zero, 0x9E
.L8024B4F0:
/* 13E830 8024B4F0 8FB8018C */ lw $t8, 0x18C($sp)
/* 13E834 8024B4F4 8FAC0190 */ lw $t4, 0x190($sp)
/* 13E838 8024B4F8 27050082 */ addiu $a1, $t8, 0x82
D_8024B4FC:
/* 13E83C 8024B4FC 25890018 */ addiu $t1, $t4, 0x18
/* 13E840 8024B500 270A0118 */ addiu $t2, $t8, 0x118
/* 13E844 8024B504 1CA00002 */ bgtz $a1, .L8024B510
/* 13E848 8024B508 258B0081 */ addiu $t3, $t4, 0x81
/* 13E84C 8024B50C 24050001 */ addiu $a1, $zero, 0x1
.L8024B510:
/* 13E850 8024B510 59200001 */ blezl $t1, .L8024B518
/* 13E854 8024B514 24090001 */ addiu $t1, $zero, 0x1
.L8024B518:
/* 13E858 8024B518 19400193 */ blez $t2, .L8024BB68
/* 13E85C 8024B51C 00000000 */ nop
/* 13E860 8024B520 19600191 */ blez $t3, .L8024BB68
/* 13E864 8024B524 28A2013F */ slti $v0, $a1, 0x13F
/* 13E868 8024B528 1040018F */ beqz $v0, .L8024BB68
/* 13E86C 8024B52C 292200EF */ slti $v0, $t1, 0xEF
D_8024B530:
/* 13E870 8024B530 1040018D */ beqz $v0, .L8024BB68
/* 13E874 8024B534 2942013F */ slti $v0, $t2, 0x13F
/* 13E878 8024B538 50400001 */ beql $v0, $zero, .L8024B540
/* 13E87C 8024B53C 240A013F */ addiu $t2, $zero, 0x13F
.L8024B540:
/* 13E880 8024B540 296200EF */ slti $v0, $t3, 0xEF
/* 13E884 8024B544 50400001 */ beql $v0, $zero, .L8024B54C
/* 13E888 8024B548 240B00EF */ addiu $t3, $zero, 0xEF
.L8024B54C:
/* 13E88C 8024B54C 3C018027 */ lui $at, %hi(gPausePartnersRotAngle)
D_8024B550:
/* 13E890 8024B550 C42006A8 */ lwc1 $f0, %lo(gPausePartnersRotAngle)($at)
/* 13E894 8024B554 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 13E898 8024B558 44812000 */ mtc1 $at, $f4
/* 13E89C 8024B55C 00000000 */ nop
/* 13E8A0 8024B560 46040000 */ add.s $f0, $f0, $f4
/* 13E8A4 8024B564 3C01466A */ lui $at, (0x466A6000 >> 16)
/* 13E8A8 8024B568 34216000 */ ori $at, $at, (0x466A6000 & 0xFFFF)
/* 13E8AC 8024B56C 44811000 */ mtc1 $at, $f2
/* 13E8B0 8024B570 00000000 */ nop
/* 13E8B4 8024B574 46020002 */ mul.s $f0, $f0, $f2
/* 13E8B8 8024B578 00000000 */ nop
/* 13E8BC 8024B57C 3C038027 */ lui $v1, %hi(gPausePartnersNumPartners)
/* 13E8C0 8024B580 8C6306B0 */ lw $v1, %lo(gPausePartnersNumPartners)($v1)
/* 13E8C4 8024B584 44831000 */ mtc1 $v1, $f2
/* 13E8C8 8024B588 00000000 */ nop
/* 13E8CC 8024B58C 468010A0 */ cvt.s.w $f2, $f2
D_8024B590:
/* 13E8D0 8024B590 46020002 */ mul.s $f0, $f0, $f2
/* 13E8D4 8024B594 00000000 */ nop
/* 13E8D8 8024B598 3C0245E7 */ lui $v0, (0x45E7B273 >> 16)
/* 13E8DC 8024B59C 3442B273 */ ori $v0, $v0, (0x45E7B273 & 0xFFFF)
D_8024B5A0:
/* 13E8E0 8024B5A0 46040003 */ div.s $f0, $f0, $f4
/* 13E8E4 8024B5A4 4600028D */ trunc.w.s $f10, $f0
/* 13E8E8 8024B5A8 44075000 */ mfc1 $a3, $f10
/* 13E8EC 8024B5AC 00000000 */ nop
D_8024B5B0:
/* 13E8F0 8024B5B0 00E20018 */ mult $a3, $v0
D_8024B5B4:
/* 13E8F4 8024B5B4 000717C3 */ sra $v0, $a3, 31
/* 13E8F8 8024B5B8 00004010 */ mfhi $t0
/* 13E8FC 8024B5BC 00083303 */ sra $a2, $t0, 12
/* 13E900 8024B5C0 00C23023 */ subu $a2, $a2, $v0
/* 13E904 8024B5C4 14600002 */ bnez $v1, .L8024B5D0
/* 13E908 8024B5C8 00C3001A */ div $zero, $a2, $v1
.L8024B5CC:
/* 13E90C 8024B5CC 0007000D */ break 7
.L8024B5D0:
/* 13E910 8024B5D0 2401FFFF */ addiu $at, $zero, -0x1
.L8024B5D4:
/* 13E914 8024B5D4 14610004 */ bne $v1, $at, .L8024B5E8
/* 13E918 8024B5D8 3C018000 */ lui $at, (0x80000000 >> 16)
/* 13E91C 8024B5DC 14C10002 */ bne $a2, $at, .L8024B5E8
/* 13E920 8024B5E0 00000000 */ nop
D_8024B5E4:
/* 13E924 8024B5E4 0006000D */ break 6
.L8024B5E8:
/* 13E928 8024B5E8 00002010 */ mfhi $a0
/* 13E92C 8024B5EC 3C014080 */ lui $at, (0x40800000 >> 16)
/* 13E930 8024B5F0 44814000 */ mtc1 $at, $f8
/* 13E934 8024B5F4 448B3000 */ mtc1 $t3, $f6
/* 13E938 8024B5F8 00000000 */ nop
glabel func_8024B5FC
/* 13E93C 8024B5FC 468031A0 */ cvt.s.w $f6, $f6
D_8024B600:
/* 13E940 8024B600 46083182 */ mul.s $f6, $f6, $f8
/* 13E944 8024B604 00000000 */ nop
/* 13E948 8024B608 3C19E700 */ lui $t9, (0xE7000000 >> 16)
/* 13E94C 8024B60C 3C1E8025 */ lui $fp, %hi(D_8024F73C)
/* 13E950 8024B610 27DEF73C */ addiu $fp, $fp, %lo(D_8024F73C)
D_8024B614:
/* 13E954 8024B614 44851000 */ mtc1 $a1, $f2
/* 13E958 8024B618 00000000 */ nop
/* 13E95C 8024B61C 468010A0 */ cvt.s.w $f2, $f2
/* 13E960 8024B620 3C05ED00 */ lui $a1, (0xED000000 >> 16)
/* 13E964 8024B624 46081082 */ mul.s $f2, $f2, $f8
/* 13E968 8024B628 00000000 */ nop
/* 13E96C 8024B62C 3C0CF548 */ lui $t4, (0xF5482600 >> 16)
/* 13E970 8024B630 358C2600 */ ori $t4, $t4, (0xF5482600 & 0xFFFF)
/* 13E974 8024B634 44890000 */ mtc1 $t1, $f0
/* 13E978 8024B638 00000000 */ nop
/* 13E97C 8024B63C 46800020 */ cvt.s.w $f0, $f0
/* 13E980 8024B640 448A2000 */ mtc1 $t2, $f4
/* 13E984 8024B644 00000000 */ nop
/* 13E988 8024B648 46802120 */ cvt.s.w $f4, $f4
/* 13E98C 8024B64C 46080002 */ mul.s $f0, $f0, $f8
/* 13E990 8024B650 00000000 */ nop
/* 13E994 8024B654 AFAC0110 */ sw $t4, 0x110($sp)
/* 13E998 8024B658 3C02800A */ lui $v0, %hi(gMainGfxPos)
/* 13E99C 8024B65C 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos)
/* 13E9A0 8024B660 0040882D */ daddu $s1, $v0, $zero
D_8024B664:
/* 13E9A4 8024B664 8E220000 */ lw $v0, 0x0($s1)
/* 13E9A8 8024B668 46082102 */ mul.s $f4, $f4, $f8
/* 13E9AC 8024B66C 00000000 */ nop
/* 13E9B0 8024B670 AFA00114 */ sw $zero, 0x114($sp)
/* 13E9B4 8024B674 0040402D */ daddu $t0, $v0, $zero
/* 13E9B8 8024B678 24420008 */ addiu $v0, $v0, 0x8
/* 13E9BC 8024B67C AE220000 */ sw $v0, 0x0($s1)
/* 13E9C0 8024B680 4600128D */ trunc.w.s $f10, $f2
/* 13E9C4 8024B684 44025000 */ mfc1 $v0, $f10
/* 13E9C8 8024B688 00000000 */ nop
/* 13E9CC 8024B68C 30420FFF */ andi $v0, $v0, 0xFFF
/* 13E9D0 8024B690 00021300 */ sll $v0, $v0, 12
/* 13E9D4 8024B694 4600028D */ trunc.w.s $f10, $f0
/* 13E9D8 8024B698 44035000 */ mfc1 $v1, $f10
.L8024B69C:
/* 13E9DC 8024B69C 00000000 */ nop
/* 13E9E0 8024B6A0 30630FFF */ andi $v1, $v1, 0xFFF
/* 13E9E4 8024B6A4 00651825 */ or $v1, $v1, $a1
/* 13E9E8 8024B6A8 00431025 */ or $v0, $v0, $v1
/* 13E9EC 8024B6AC AD020000 */ sw $v0, 0x0($t0)
D_8024B6B0:
/* 13E9F0 8024B6B0 00061140 */ sll $v0, $a2, 5
D_8024B6B4:
/* 13E9F4 8024B6B4 00461023 */ subu $v0, $v0, $a2
/* 13E9F8 8024B6B8 00021080 */ sll $v0, $v0, 2
/* 13E9FC 8024B6BC 00461021 */ addu $v0, $v0, $a2
/* 13EA00 8024B6C0 00021900 */ sll $v1, $v0, 4
/* 13EA04 8024B6C4 00621823 */ subu $v1, $v1, $v0
/* 13EA08 8024B6C8 000318C0 */ sll $v1, $v1, 3
/* 13EA0C 8024B6CC 0067B823 */ subu $s7, $v1, $a3
D_8024B6D0:
/* 13EA10 8024B6D0 44971000 */ mtc1 $s7, $f2
/* 13EA14 8024B6D4 00000000 */ nop
/* 13EA18 8024B6D8 468010A1 */ cvt.d.w $f2, $f2
/* 13EA1C 8024B6DC 3C018027 */ lui $at, %hi(D_80270040)
/* 13EA20 8024B6E0 D4200040 */ ldc1 $f0, %lo(D_80270040)($at)
/* 13EA24 8024B6E4 4600228D */ trunc.w.s $f10, $f4
.L8024B6E8:
/* 13EA28 8024B6E8 44025000 */ mfc1 $v0, $f10
/* 13EA2C 8024B6EC 46201082 */ mul.d $f2, $f2, $f0
dgb_01_img7_gfx:
/* 13EA30 8024B6F0 00000000 */ nop
/* 13EA34 8024B6F4 30420FFF */ andi $v0, $v0, 0xFFF
/* 13EA38 8024B6F8 00021300 */ sll $v0, $v0, 12
/* 13EA3C 8024B6FC 4600328D */ trunc.w.s $f10, $f6
/* 13EA40 8024B700 44035000 */ mfc1 $v1, $f10
/* 13EA44 8024B704 00000000 */ nop
D_8024B708:
/* 13EA48 8024B708 30630FFF */ andi $v1, $v1, 0xFFF
/* 13EA4C 8024B70C 00431025 */ or $v0, $v0, $v1
/* 13EA50 8024B710 AD020004 */ sw $v0, 0x4($t0)
/* 13EA54 8024B714 4620128D */ trunc.w.d $f10, $f2
/* 13EA58 8024B718 44175000 */ mfc1 $s7, $f10
/* 13EA5C 8024B71C 0C092B78 */ jal func_8024ADE0
/* 13EA60 8024B720 AFB90120 */ sw $t9, 0x120($sp)
/* 13EA64 8024B724 8FB90120 */ lw $t9, 0x120($sp)
.L8024B728:
/* 13EA68 8024B728 3C05F500 */ lui $a1, (0xF5000100 >> 16)
/* 13EA6C 8024B72C 34A50100 */ ori $a1, $a1, (0xF5000100 & 0xFFFF)
D_8024B730:
/* 13EA70 8024B730 3C06073F */ lui $a2, (0x73FC000 >> 16)
/* 13EA74 8024B734 34C6C000 */ ori $a2, $a2, (0x73FC000 & 0xFFFF)
D_8024B738:
/* 13EA78 8024B738 0000802D */ daddu $s0, $zero, $zero
D_8024B73C:
/* 13EA7C 8024B73C 26E20082 */ addiu $v0, $s7, 0x82
D_8024B740:
/* 13EA80 8024B740 2413000C */ addiu $s3, $zero, 0xC
/* 13EA84 8024B744 0200B02D */ daddu $s6, $s0, $zero
D_8024B748:
/* 13EA88 8024B748 24150018 */ addiu $s5, $zero, 0x18
D_8024B74C:
/* 13EA8C 8024B74C 8FAD018C */ lw $t5, 0x18C($sp)
/* 13EA90 8024B750 0200A02D */ daddu $s4, $s0, $zero
/* 13EA94 8024B754 01A21021 */ addu $v0, $t5, $v0
/* 13EA98 8024B758 AFA20128 */ sw $v0, 0x128($sp)
/* 13EA9C 8024B75C 26E20118 */ addiu $v0, $s7, 0x118
D_8024B760:
/* 13EAA0 8024B760 01A21021 */ addu $v0, $t5, $v0
/* 13EAA4 8024B764 AFA20124 */ sw $v0, 0x124($sp)
/* 13EAA8 8024B768 8E230000 */ lw $v1, 0x0($s1)
/* 13EAAC 8024B76C 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
D_8024B770_C08FF0:
/* 13EAB0 8024B770 0060202D */ daddu $a0, $v1, $zero
/* 13EAB4 8024B774 24630008 */ addiu $v1, $v1, 0x8
/* 13EAB8 8024B778 AE230000 */ sw $v1, 0x0($s1)
/* 13EABC 8024B77C AC820000 */ sw $v0, 0x0($a0)
/* 13EAC0 8024B780 3C028025 */ lui $v0, %hi(D_8024F750)
/* 13EAC4 8024B784 2442F750 */ addiu $v0, $v0, %lo(D_8024F750)
/* 13EAC8 8024B788 AC820004 */ sw $v0, 0x4($a0)
/* 13EACC 8024B78C 24620008 */ addiu $v0, $v1, 0x8
.L8024B790:
/* 13EAD0 8024B790 AE220000 */ sw $v0, 0x0($s1)
/* 13EAD4 8024B794 3C02FD10 */ lui $v0, (0xFD100000 >> 16)
/* 13EAD8 8024B798 AC620000 */ sw $v0, 0x0($v1)
/* 13EADC 8024B79C 24620010 */ addiu $v0, $v1, 0x10
/* 13EAE0 8024B7A0 AE220000 */ sw $v0, 0x0($s1)
/* 13EAE4 8024B7A4 8FAF0114 */ lw $t7, 0x114($sp)
/* 13EAE8 8024B7A8 0200902D */ daddu $s2, $s0, $zero
/* 13EAEC 8024B7AC 3C048025 */ lui $a0, %hi(D_8024F744)
D_8024B7B0:
/* 13EAF0 8024B7B0 008F2021 */ addu $a0, $a0, $t7
/* 13EAF4 8024B7B4 8C84F744 */ lw $a0, %lo(D_8024F744)($a0)
/* 13EAF8 8024B7B8 3C02E800 */ lui $v0, (0xE8000000 >> 16)
.L8024B7BC:
/* 13EAFC 8024B7BC AC620008 */ sw $v0, 0x8($v1)
/* 13EB00 8024B7C0 00751021 */ addu $v0, $v1, $s5
/* 13EB04 8024B7C4 AC60000C */ sw $zero, 0xC($v1)
D_8024B7C8:
/* 13EB08 8024B7C8 AE220000 */ sw $v0, 0x0($s1)
D_8024B7CC:
/* 13EB0C 8024B7CC 3C020700 */ lui $v0, (0x7000000 >> 16)
D_8024B7D0:
/* 13EB10 8024B7D0 AC620014 */ sw $v0, 0x14($v1)
D_8024B7D4:
/* 13EB14 8024B7D4 24620020 */ addiu $v0, $v1, 0x20
D_8024B7D8:
/* 13EB18 8024B7D8 3C18E600 */ lui $t8, (0xE6000000 >> 16)
/* 13EB1C 8024B7DC AC650010 */ sw $a1, 0x10($v1)
/* 13EB20 8024B7E0 AE220000 */ sw $v0, 0x0($s1)
/* 13EB24 8024B7E4 24620028 */ addiu $v0, $v1, 0x28
D_8024B7E8:
/* 13EB28 8024B7E8 AC780018 */ sw $t8, 0x18($v1)
/* 13EB2C 8024B7EC AC60001C */ sw $zero, 0x1C($v1)
D_8024B7F0:
/* 13EB30 8024B7F0 AE220000 */ sw $v0, 0x0($s1)
/* 13EB34 8024B7F4 3C02F000 */ lui $v0, (0xF0000000 >> 16)
/* 13EB38 8024B7F8 AC620020 */ sw $v0, 0x20($v1)
/* 13EB3C 8024B7FC 24620030 */ addiu $v0, $v1, 0x30
/* 13EB40 8024B800 AC660024 */ sw $a2, 0x24($v1)
/* 13EB44 8024B804 AE220000 */ sw $v0, 0x0($s1)
D_8024B808:
/* 13EB48 8024B808 AC790028 */ sw $t9, 0x28($v1)
/* 13EB4C 8024B80C AC60002C */ sw $zero, 0x2C($v1)
/* 13EB50 8024B810 AC640004 */ sw $a0, 0x4($v1)
.L8024B814:
/* 13EB54 8024B814 2A62006A */ slti $v0, $s3, 0x6A
/* 13EB58 8024B818 14400003 */ bnez $v0, .L8024B828
D_8024B81C:
/* 13EB5C 8024B81C 240E000C */ addiu $t6, $zero, 0xC
/* 13EB60 8024B820 2402006A */ addiu $v0, $zero, 0x6A
/* 13EB64 8024B824 00527023 */ subu $t6, $v0, $s2
.L8024B828:
/* 13EB68 8024B828 3C02FD48 */ lui $v0, (0xFD480095 >> 16)
/* 13EB6C 8024B82C 34420095 */ ori $v0, $v0, (0xFD480095 & 0xFFFF)
D_8024B830:
/* 13EB70 8024B830 3C0B0708 */ lui $t3, (0x7080200 >> 16)
/* 13EB74 8024B834 356B0200 */ ori $t3, $t3, (0x7080200 & 0xFFFF)
/* 13EB78 8024B838 3C0A0725 */ lui $t2, (0x7254000 >> 16)
/* 13EB7C 8024B83C 354A4000 */ ori $t2, $t2, (0x7254000 & 0xFFFF)
/* 13EB80 8024B840 3C0C0008 */ lui $t4, (0x80200 >> 16)
D_8024B844:
/* 13EB84 8024B844 358C0200 */ ori $t4, $t4, (0x80200 & 0xFFFF)
D_8024B848:
/* 13EB88 8024B848 8FAF0128 */ lw $t7, 0x128($sp)
/* 13EB8C 8024B84C 8FB80190 */ lw $t8, 0x190($sp)
D_8024B850:
/* 13EB90 8024B850 3C0D0025 */ lui $t5, (0x254000 >> 16)
/* 13EB94 8024B854 AFAC012C */ sw $t4, 0x12C($sp)
/* 13EB98 8024B858 8FAC0124 */ lw $t4, 0x124($sp)
D_8024B85C:
/* 13EB9C 8024B85C 35AD4000 */ ori $t5, $t5, (0x254000 & 0xFFFF)
/* 13EBA0 8024B860 AFAD0130 */ sw $t5, 0x130($sp)
/* 13EBA4 8024B864 8E280000 */ lw $t0, 0x0($s1)
D_8024B868:
/* 13EBA8 8024B868 000F2080 */ sll $a0, $t7, 2
/* 13EBAC 8024B86C 03153821 */ addu $a3, $t8, $s5
D_8024B870:
/* 13EBB0 8024B870 00072880 */ sll $a1, $a3, 2
/* 13EBB4 8024B874 000C3080 */ sll $a2, $t4, 2
/* 13EBB8 8024B878 00EE3821 */ addu $a3, $a3, $t6
D_8024B87C:
/* 13EBBC 8024B87C 00073880 */ sll $a3, $a3, 2
/* 13EBC0 8024B880 0100482D */ daddu $t1, $t0, $zero
/* 13EBC4 8024B884 25080008 */ addiu $t0, $t0, 0x8
D_8024B888:
/* 13EBC8 8024B888 AE280000 */ sw $t0, 0x0($s1)
D_8024B88C:
/* 13EBCC 8024B88C AD220000 */ sw $v0, 0x0($t1)
D_8024B890:
/* 13EBD0 8024B890 25020008 */ addiu $v0, $t0, 0x8
D_8024B894:
/* 13EBD4 8024B894 AE220000 */ sw $v0, 0x0($s1)
D_8024B898:
/* 13EBD8 8024B898 25020010 */ addiu $v0, $t0, 0x10
D_8024B89C:
/* 13EBDC 8024B89C AE220000 */ sw $v0, 0x0($s1)
D_8024B8A0:
/* 13EBE0 8024B8A0 25020018 */ addiu $v0, $t0, 0x18
/* 13EBE4 8024B8A4 AE220000 */ sw $v0, 0x0($s1)
/* 13EBE8 8024B8A8 25020020 */ addiu $v0, $t0, 0x20
/* 13EBEC 8024B8AC AE220000 */ sw $v0, 0x0($s1)
D_8024B8B0:
/* 13EBF0 8024B8B0 25020028 */ addiu $v0, $t0, 0x28
D_8024B8B4:
/* 13EBF4 8024B8B4 AE220000 */ sw $v0, 0x0($s1)
/* 13EBF8 8024B8B8 8FC30000 */ lw $v1, 0x0($fp)
/* 13EBFC 8024B8BC 25020030 */ addiu $v0, $t0, 0x30
D_8024B8C0:
/* 13EC00 8024B8C0 AE220000 */ sw $v0, 0x0($s1)
/* 13EC04 8024B8C4 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* 13EC08 8024B8C8 AD230004 */ sw $v1, 0x4($t1)
/* 13EC0C 8024B8CC 3C0FE600 */ lui $t7, (0xE6000000 >> 16)
D_8024B8D0:
/* 13EC10 8024B8D0 32890FFF */ andi $t1, $s4, 0xFFF
D_8024B8D4:
/* 13EC14 8024B8D4 01221025 */ or $v0, $t1, $v0
D_8024B8D8:
/* 13EC18 8024B8D8 024E1821 */ addu $v1, $s2, $t6
/* 13EC1C 8024B8DC 2463FFFF */ addiu $v1, $v1, -0x1
D_8024B8E0:
/* 13EC20 8024B8E0 00031880 */ sll $v1, $v1, 2
/* 13EC24 8024B8E4 30630FFF */ andi $v1, $v1, 0xFFF
/* 13EC28 8024B8E8 8FAD0110 */ lw $t5, 0x110($sp)
/* 13EC2C 8024B8EC 006A5025 */ or $t2, $v1, $t2
D_8024B8F0:
/* 13EC30 8024B8F0 AD020010 */ sw $v0, 0x10($t0)
D_8024B8F4:
/* 13EC34 8024B8F4 3C02F200 */ lui $v0, (0xF2000000 >> 16)
D_8024B8F8_C09178:
/* 13EC38 8024B8F8 AD0B0004 */ sw $t3, 0x4($t0)
/* 13EC3C 8024B8FC AD0F0008 */ sw $t7, 0x8($t0)
/* 13EC40 8024B900 AD00000C */ sw $zero, 0xC($t0)
/* 13EC44 8024B904 AD0A0014 */ sw $t2, 0x14($t0)
/* 13EC48 8024B908 AD190018 */ sw $t9, 0x18($t0)
/* 13EC4C 8024B90C AD00001C */ sw $zero, 0x1C($t0)
D_8024B910:
/* 13EC50 8024B910 AD0D0000 */ sw $t5, 0x0($t0)
/* 13EC54 8024B914 AD0D0020 */ sw $t5, 0x20($t0)
/* 13EC58 8024B918 8FB8012C */ lw $t8, 0x12C($sp)
/* 13EC5C 8024B91C 01224825 */ or $t1, $t1, $v0
D_8024B920:
/* 13EC60 8024B920 AD180024 */ sw $t8, 0x24($t0)
/* 13EC64 8024B924 AD090028 */ sw $t1, 0x28($t0)
D_8024B928:
/* 13EC68 8024B928 8FAC0130 */ lw $t4, 0x130($sp)
/* 13EC6C 8024B92C 24020400 */ addiu $v0, $zero, 0x400
/* 13EC70 8024B930 006C1825 */ or $v1, $v1, $t4
/* 13EC74 8024B934 AD03002C */ sw $v1, 0x2C($t0)
/* 13EC78 8024B938 AFA00010 */ sw $zero, 0x10($sp)
D_8024B93C:
/* 13EC7C 8024B93C AFA00014 */ sw $zero, 0x14($sp)
D_8024B940:
/* 13EC80 8024B940 AFB60018 */ sw $s6, 0x18($sp)
/* 13EC84 8024B944 AFA2001C */ sw $v0, 0x1C($sp)
/* 13EC88 8024B948 AFA20020 */ sw $v0, 0x20($sp)
D_8024B94C:
/* 13EC8C 8024B94C 0C091216 */ jal func_80244858
D_8024B950:
/* 13EC90 8024B950 AFB90120 */ sw $t9, 0x120($sp)
/* 13EC94 8024B954 8E220000 */ lw $v0, 0x0($s1)
/* 13EC98 8024B958 0040182D */ daddu $v1, $v0, $zero
/* 13EC9C 8024B95C 24420008 */ addiu $v0, $v0, 0x8
/* 13ECA0 8024B960 AE220000 */ sw $v0, 0x0($s1)
D_8024B964:
/* 13ECA4 8024B964 8FB90120 */ lw $t9, 0x120($sp)
/* 13ECA8 8024B968 2A620069 */ slti $v0, $s3, 0x69
/* 13ECAC 8024B96C AC600004 */ sw $zero, 0x4($v1)
.L8024B970:
/* 13ECB0 8024B970 10400009 */ beqz $v0, .L8024B998
.L8024B974:
/* 13ECB4 8024B974 AC790000 */ sw $t9, 0x0($v1)
D_8024B978:
/* 13ECB8 8024B978 2673000C */ addiu $s3, $s3, 0xC
/* 13ECBC 8024B97C 26D60180 */ addiu $s6, $s6, 0x180
/* 13ECC0 8024B980 26B5000C */ addiu $s5, $s5, 0xC
/* 13ECC4 8024B984 26940030 */ addiu $s4, $s4, 0x30
/* 13ECC8 8024B988 26100001 */ addiu $s0, $s0, 0x1
/* 13ECCC 8024B98C 2A020014 */ slti $v0, $s0, 0x14
### DECOMPILED C INSTRUCTIONS:
void pause_partners_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
Matrix4f matrix;
Matrix4f matrix2;
PartnerPosition partnerPositions[8];
s32 i, j, k, index;
s32 x1, y1, x2, y2;
f32 currentPos, angle, scale;
f32 offsetX, offsetY, offsetZ;
s32 color;
s8 currentTab;
s32 portraitScrollPos;
s32 portraitScrollIndex;
s32 tileHeight;
s32 portraitOffsetX;
s32 portraitIndex;
gSPViewport(gMainGfxPos++, &gPausePartnersViewport);
guOrthoF(matrix, 0.0f, 320.0f, 240.0f, 0.0f, -100.0f, 100.0f, 1.0f);
guMtxF2L(matrix, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guTranslateF(matrix, 0.0f, 0.0f, 0.0f);
guMtxF2L(matrix, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
for (i = 0; i < gPausePartnersNumPartners; i++) {
currentPos = cos_deg(i * 360 / gPausePartnersNumPartners - gPausePartnersRotAngle) * 20.0f + 0.0f;
for (j = 0; j < i; j++) {
if (currentPos < partnerPositions[j].pos) {
break;
}
}
for (k = gPausePartnersNumPartners - 1; k > j; k--) {
partnerPositions[k] = partnerPositions[k-1];
}
partnerPositions[j].index = i;
partnerPositions[j].pos = currentPos;
}
for (j = 0; j < gPausePartnersNumPartners; j++) {
portraitIndex = gPausePartnersNumPartners;
index = partnerPositions[j].index;
angle = index * 360 / gPausePartnersNumPartners - gPausePartnersRotAngle;
offsetX = gPausePartnersNumPartners * 3 + 17;
offsetX *= sin_deg(angle);
offsetX += 42.0f;
offsetZ = 30.0f - cos_deg(angle) * 30.0f;
offsetY = cos_deg(angle) * 20.0f + 0.0f;
scale = 30.0 / (offsetZ + 60.0f) + 0.5;
guTranslateF(matrix, baseX + 22 + offsetX, baseY + 81 + offsetY, -offsetZ);
guRotateF(matrix2, 180.0f, 0.0f, 0.0f, 1.0f);
guMtxCatF(matrix2, matrix, matrix);
guScaleF(matrix2, scale, scale, 1.0f);
guMtxCatF(matrix2, matrix, matrix);
if (offsetZ > 8.0f) {
color = 160;
} else {
color = 255.0f - offsetZ * 95.0f * 0.125f;
}
set_npc_imgfx_all(gPausePartnersSpriteIDs[gPausePartnersPartnerIdx[index]], IMGFX_SET_COLOR, color, color, color, 255, 64);
spr_draw_npc_sprite(gPausePartnersSpriteIDs[gPausePartnersPartnerIdx[index]], 0, 0, NULL, matrix);
}
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
currentTab = gPauseMenuCurrentTab;
if (currentTab == 4) {
if (gPausePartnersLevel == 0) {
pause_set_cursor_pos(WINDOW_ID_PAUSE_PARTNERS, baseX + 42, baseY + 88);
}
if (gPauseMenuCurrentTab == currentTab && gPausePartnersLevel == 0) {
pause_draw_menu_label(PAUSE_LBL_ABILITIES, 18, 158);
}
}
x1 = baseX + 130;
y1 = baseY + 24;
x2 = baseX + 280;
y2 = baseY + 129;
if (x1 <= 0) {
x1 = 1;
}
if (y1 <= 0) {
y1 = 1;
}
if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) {
return;
}
if (x2 >= SCREEN_WIDTH - 1) {
x2 = SCREEN_WIDTH - 1;
}
if (y2 >= SCREEN_HEIGHT - 1) {
y2 = SCREEN_HEIGHT - 1;
}
portraitScrollPos = (gPausePartnersRotAngle + 360.0f) * 15000.0f * gPausePartnersNumPartners / 360.0f;
portraitScrollIndex = portraitScrollPos / 15000;
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
portraitOffsetX = (portraitScrollIndex * 15000 - portraitScrollPos);
portraitOffsetX *= 0.01;
portraitIndex = portraitScrollIndex;
pause_partners_load_portrait(portraitIndex % gPausePartnersNumPartners);
for (i = 0; i < 2; portraitOffsetX += 150, i++) {
gSPDisplayList(gMainGfxPos++, &gPausePartnersDL);
gDPLoadTLUT_pal256(gMainGfxPos++, gPausePartnersPaletteBuffers[i]);
for (index = 0; index < 20; index++) {
if (12 * index + 12 <= 105) {
tileHeight = 12;
} else {
tileHeight = 106 - 12 * index;
}
gDPLoadTextureTile(gMainGfxPos++, gPausePartnersImageBuffers[i], G_IM_FMT_CI, G_IM_SIZ_8b, 150, 0,
0, 12 * index, 149, 12 * index + tileHeight - 1, 0,
G_TX_CLAMP, G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
pause_draw_rect((baseX + 130 + portraitOffsetX) * 4, (baseY + 24 + 12 * index) * 4, (baseX + 280 + portraitOffsetX) * 4, (baseY + 24 + 12 * index + tileHeight) * 4, 0, 0,
12 * index * 32, 0x400, 0x400);
gDPPipeSync(gMainGfxPos++);
if (12 * index + 12 >= 105) {
break;
}
}
}
{
s32 x1, y1, x2, y2;
x1 = baseX + 122;
y1 = baseY + 16;
x2 = baseX + 288;
y2 = baseY + 137;
if (x1 <= 0) {
x1 = 1;
}
if (y1 <= 0) {
y1 = 1;
}
if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) {
return;
}
if (x2 >= SCREEN_WIDTH - 1) {
x2 = SCREEN_WIDTH - 1;
}
if (y2 >= SCREEN_HEIGHT - 1) {
y2 = SCREEN_HEIGHT - 1;
}
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
}
draw_box(0, &gPauseWS_21, baseX + 122, baseY + 16, 0, 166, 121, opacity, darkening, 1.0f, 1.0f, 0, 0, 0, 0, 0, 0, width, height, 0);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel gfx_draw_background
/* 3210 80027E10 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 3214 80027E14 3C040050 */ lui $a0, (0x5003C0 >> 16)
/* 3218 80027E18 3C0C800A */ lui $t4, %hi(gMainGfxPos)
/* 321C 80027E1C 258CA66C */ addiu $t4, $t4, %lo(gMainGfxPos)
/* 3220 80027E20 348403C0 */ ori $a0, $a0, (0x5003C0 & 0xFFFF)
/* 3224 80027E24 3C02ED00 */ lui $v0, (0xED000000 >> 16)
/* 3228 80027E28 AFBF0044 */ sw $ra, 0x44($sp)
/* 322C 80027E2C AFBE0040 */ sw $fp, 0x40($sp)
/* 3230 80027E30 AFB7003C */ sw $s7, 0x3C($sp)
/* 3234 80027E34 AFB60038 */ sw $s6, 0x38($sp)
/* 3238 80027E38 AFB50034 */ sw $s5, 0x34($sp)
/* 323C 80027E3C AFB40030 */ sw $s4, 0x30($sp)
/* 3240 80027E40 AFB3002C */ sw $s3, 0x2C($sp)
/* 3244 80027E44 AFB20028 */ sw $s2, 0x28($sp)
/* 3248 80027E48 AFB10024 */ sw $s1, 0x24($sp)
/* 324C 80027E4C AFB00020 */ sw $s0, 0x20($sp)
/* 3250 80027E50 8D8B0000 */ lw $t3, 0x0($t4)
/* 3254 80027E54 3C108007 */ lui $s0, %hi(gGameStatusPtr)
/* 3258 80027E58 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr)
/* 325C 80027E5C 0160182D */ daddu $v1, $t3, $zero
/* 3260 80027E60 256B0008 */ addiu $t3, $t3, 0x8
/* 3264 80027E64 AD8B0000 */ sw $t3, 0x0($t4)
/* 3268 80027E68 AC640004 */ sw $a0, 0x4($v1)
/* 326C 80027E6C 3C04800B */ lui $a0, %hi(gCameras)
/* 3270 80027E70 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* 3274 80027E74 AC620000 */ sw $v0, 0x0($v1)
/* 3278 80027E78 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 327C 80027E7C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 3280 80027E80 8E0D0000 */ lw $t5, 0x0($s0)
/* 3284 80027E84 00031080 */ sll $v0, $v1, 2
/* 3288 80027E88 00431021 */ addu $v0, $v0, $v1
/* 328C 80027E8C 00021080 */ sll $v0, $v0, 2
/* 3290 80027E90 00431023 */ subu $v0, $v0, $v1
/* 3294 80027E94 000218C0 */ sll $v1, $v0, 3
/* 3298 80027E98 00431021 */ addu $v0, $v0, $v1
/* 329C 80027E9C 000210C0 */ sll $v0, $v0, 3
/* 32A0 80027EA0 00449821 */ addu $s3, $v0, $a0
/* 32A4 80027EA4 95A30148 */ lhu $v1, 0x148($t5)
/* 32A8 80027EA8 24020020 */ addiu $v0, $zero, 0x20
/* 32AC 80027EAC 306300F0 */ andi $v1, $v1, 0xF0
/* 32B0 80027EB0 1062004E */ beq $v1, $v0, .L80027FEC
/* 32B4 80027EB4 28620021 */ slti $v0, $v1, 0x21
/* 32B8 80027EB8 10400005 */ beqz $v0, .L80027ED0
/* 32BC 80027EBC 24020010 */ addiu $v0, $zero, 0x10
/* 32C0 80027EC0 10620008 */ beq $v1, $v0, .L80027EE4
/* 32C4 80027EC4 3C03FF10 */ lui $v1, (0xFF10013F >> 16)
/* 32C8 80027EC8 0800A0CB */ j .L8002832C
/* 32CC 80027ECC 00000000 */ nop
.L80027ED0:
/* 32D0 80027ED0 24020030 */ addiu $v0, $zero, 0x30
/* 32D4 80027ED4 10620053 */ beq $v1, $v0, .L80028024
/* 32D8 80027ED8 00000000 */ nop
/* 32DC 80027EDC 0800A0CB */ j .L8002832C
/* 32E0 80027EE0 00000000 */ nop
.L80027EE4:
/* 32E4 80027EE4 3463013F */ ori $v1, $v1, (0xFF10013F & 0xFFFF)
/* 32E8 80027EE8 3C06E300 */ lui $a2, (0xE3000A01 >> 16)
/* 32EC 80027EEC 34C60A01 */ ori $a2, $a2, (0xE3000A01 & 0xFFFF)
/* 32F0 80027EF0 3C078080 */ lui $a3, (0x808080FF >> 16)
/* 32F4 80027EF4 34E780FF */ ori $a3, $a3, (0x808080FF & 0xFFFF)
/* 32F8 80027EF8 3C05E200 */ lui $a1, (0xE2001D00 >> 16)
/* 32FC 80027EFC 34A51D00 */ ori $a1, $a1, (0xE2001D00 & 0xFFFF)
/* 3300 80027F00 3C0AE200 */ lui $t2, (0xE200001C >> 16)
/* 3304 80027F04 354A001C */ ori $t2, $t2, (0xE200001C & 0xFFFF)
/* 3308 80027F08 3C090FA5 */ lui $t1, (0xFA54040 >> 16)
/* 330C 80027F0C 35294040 */ ori $t1, $t1, (0xFA54040 & 0xFFFF)
/* 3310 80027F10 3C08F650 */ lui $t0, (0xF65003C0 >> 16)
/* 3314 80027F14 350803C0 */ ori $t0, $t0, (0xF65003C0 & 0xFFFF)
/* 3318 80027F18 25620008 */ addiu $v0, $t3, 0x8
/* 331C 80027F1C 3C04E700 */ lui $a0, (0xE7000000 >> 16)
/* 3320 80027F20 AD820000 */ sw $v0, 0x0($t4)
/* 3324 80027F24 25620010 */ addiu $v0, $t3, 0x10
/* 3328 80027F28 AD640000 */ sw $a0, 0x0($t3)
/* 332C 80027F2C AD600004 */ sw $zero, 0x4($t3)
/* 3330 80027F30 AD820000 */ sw $v0, 0x0($t4)
/* 3334 80027F34 25620018 */ addiu $v0, $t3, 0x18
/* 3338 80027F38 AD630008 */ sw $v1, 0x8($t3)
/* 333C 80027F3C AD820000 */ sw $v0, 0x0($t4)
/* 3340 80027F40 25620020 */ addiu $v0, $t3, 0x20
/* 3344 80027F44 AD820000 */ sw $v0, 0x0($t4)
/* 3348 80027F48 25620028 */ addiu $v0, $t3, 0x28
/* 334C 80027F4C AD820000 */ sw $v0, 0x0($t4)
/* 3350 80027F50 25620030 */ addiu $v0, $t3, 0x30
/* 3354 80027F54 AD820000 */ sw $v0, 0x0($t4)
/* 3358 80027F58 25620038 */ addiu $v0, $t3, 0x38
/* 335C 80027F5C AD820000 */ sw $v0, 0x0($t4)
/* 3360 80027F60 3C03800A */ lui $v1, %hi(nuGfxCfb)
/* 3364 80027F64 8C63A658 */ lw $v1, %lo(nuGfxCfb)($v1)
/* 3368 80027F68 25620040 */ addiu $v0, $t3, 0x40
/* 336C 80027F6C AD820000 */ sw $v0, 0x0($t4)
/* 3370 80027F70 8C630004 */ lw $v1, 0x4($v1)
/* 3374 80027F74 25620048 */ addiu $v0, $t3, 0x48
/* 3378 80027F78 AD820000 */ sw $v0, 0x0($t4)
/* 337C 80027F7C 3C02F900 */ lui $v0, (0xF9000000 >> 16)
/* 3380 80027F80 AD620018 */ sw $v0, 0x18($t3)
/* 3384 80027F84 3C02EE00 */ lui $v0, (0xEE000000 >> 16)
/* 3388 80027F88 AD620020 */ sw $v0, 0x20($t3)
/* 338C 80027F8C 2402FFFF */ addiu $v0, $zero, -0x1
/* 3390 80027F90 AD620024 */ sw $v0, 0x24($t3)
/* 3394 80027F94 24020004 */ addiu $v0, $zero, 0x4
/* 3398 80027F98 AD660010 */ sw $a2, 0x10($t3)
/* 339C 80027F9C AD600014 */ sw $zero, 0x14($t3)
/* 33A0 80027FA0 AD67001C */ sw $a3, 0x1C($t3)
/* 33A4 80027FA4 AD650028 */ sw $a1, 0x28($t3)
/* 33A8 80027FA8 AD62002C */ sw $v0, 0x2C($t3)
/* 33AC 80027FAC AD6A0030 */ sw $t2, 0x30($t3)
/* 33B0 80027FB0 AD690034 */ sw $t1, 0x34($t3)
/* 33B4 80027FB4 AD680038 */ sw $t0, 0x38($t3)
/* 33B8 80027FB8 AD60003C */ sw $zero, 0x3C($t3)
/* 33BC 80027FBC AD640040 */ sw $a0, 0x40($t3)
/* 33C0 80027FC0 AD600044 */ sw $zero, 0x44($t3)
/* 33C4 80027FC4 AD650048 */ sw $a1, 0x48($t3)
/* 33C8 80027FC8 AD60004C */ sw $zero, 0x4C($t3)
/* 33CC 80027FCC AD63000C */ sw $v1, 0xC($t3)
/* 33D0 80027FD0 95A20148 */ lhu $v0, 0x148($t5)
/* 33D4 80027FD4 25630050 */ addiu $v1, $t3, 0x50
/* 33D8 80027FD8 AD830000 */ sw $v1, 0x0($t4)
/* 33DC 80027FDC 3042FF0F */ andi $v0, $v0, 0xFF0F
/* 33E0 80027FE0 34420020 */ ori $v0, $v0, 0x20
/* 33E4 80027FE4 0800A1E4 */ j .L80028790
/* 33E8 80027FE8 A5A20148 */ sh $v0, 0x148($t5)
.L80027FEC:
/* 33EC 80027FEC 3C02800A */ lui $v0, %hi(nuGfxCfb)
/* 33F0 80027FF0 8C42A658 */ lw $v0, %lo(nuGfxCfb)($v0)
/* 33F4 80027FF4 3C06800A */ lui $a2, %hi(nuGfxZBuffer)
/* 33F8 80027FF8 8CC6A5DC */ lw $a2, %lo(nuGfxZBuffer)($a2)
/* 33FC 80027FFC 8C440000 */ lw $a0, 0x0($v0)
/* 3400 80028000 0C009E6D */ jal gfx_transfer_frame_to_depth
/* 3404 80028004 8C450004 */ lw $a1, 0x4($v0)
/* 3408 80028008 8E030000 */ lw $v1, 0x0($s0)
/* 340C 8002800C 94620148 */ lhu $v0, 0x148($v1)
/* 3410 80028010 3C018007 */ lui $at, %hi(gPauseBackgroundFade)
/* 3414 80028014 AC2041F8 */ sw $zero, %lo(gPauseBackgroundFade)($at)
/* 3418 80028018 3042FF0F */ andi $v0, $v0, 0xFF0F
/* 341C 8002801C 34420030 */ ori $v0, $v0, 0x30
/* 3420 80028020 A4620148 */ sh $v0, 0x148($v1)
.L80028024:
/* 3424 80028024 3C168007 */ lui $s6, %hi(gPauseBackgroundFade)
/* 3428 80028028 26D641F8 */ addiu $s6, $s6, %lo(gPauseBackgroundFade)
/* 342C 8002802C 8EC20000 */ lw $v0, 0x0($s6)
/* 3430 80028030 24420010 */ addiu $v0, $v0, 0x10
/* 3434 80028034 AEC20000 */ sw $v0, 0x0($s6)
/* 3438 80028038 28420081 */ slti $v0, $v0, 0x81
/* 343C 8002803C 14400003 */ bnez $v0, .L8002804C
/* 3440 80028040 3C060050 */ lui $a2, (0x5003C0 >> 16)
/* 3444 80028044 24020080 */ addiu $v0, $zero, 0x80
/* 3448 80028048 AEC20000 */ sw $v0, 0x0($s6)
.L8002804C:
/* 344C 8002804C 34C603C0 */ ori $a2, $a2, (0x5003C0 & 0xFFFF)
/* 3450 80028050 3C05E300 */ lui $a1, (0xE3000A01 >> 16)
/* 3454 80028054 34A50A01 */ ori $a1, $a1, (0xE3000A01 & 0xFFFF)
/* 3458 80028058 3C07E200 */ lui $a3, (0xE200001C >> 16)
/* 345C 8002805C 34E7001C */ ori $a3, $a3, (0xE200001C & 0xFFFF)
/* 3460 80028060 3C08FF10 */ lui $t0, (0xFF10013F >> 16)
/* 3464 80028064 3508013F */ ori $t0, $t0, (0xFF10013F & 0xFFFF)
/* 3468 80028068 3C090001 */ lui $t1, (0x10001 >> 16)
/* 346C 8002806C 35290001 */ ori $t1, $t1, (0x10001 & 0xFFFF)
/* 3470 80028070 3C0AF64F */ lui $t2, (0xF64FC3BC >> 16)
/* 3474 80028074 354AC3BC */ ori $t2, $t2, (0xF64FC3BC & 0xFFFF)
/* 3478 80028078 3C0BE300 */ lui $t3, (0xE3000C00 >> 16)
/* 347C 8002807C 356B0C00 */ ori $t3, $t3, (0xE3000C00 & 0xFFFF)
/* 3480 80028080 3C0CE300 */ lui $t4, (0xE3001001 >> 16)
/* 3484 80028084 358C1001 */ ori $t4, $t4, (0xE3001001 & 0xFFFF)
/* 3488 80028088 3C0D0F0A */ lui $t5, (0xF0A4000 >> 16)
/* 348C 8002808C 35AD4000 */ ori $t5, $t5, (0xF0A4000 & 0xFFFF)
/* 3490 80028090 3C0FFC35 */ lui $t7, (0xFC357E6A >> 16)
/* 3494 80028094 35EF7E6A */ ori $t7, $t7, (0xFC357E6A & 0xFFFF)
/* 3498 80028098 3C0E12FC */ lui $t6, (0x12FCFCBE >> 16)
/* 349C 8002809C 35CEFCBE */ ori $t6, $t6, (0x12FCFCBE & 0xFFFF)
/* 34A0 800280A0 3C112828 */ lui $s1, (0x28282800 >> 16)
/* 34A4 800280A4 36312800 */ ori $s1, $s1, (0x28282800 & 0xFFFF)
/* 34A8 800280A8 3C10E300 */ lui $s0, (0xE3001201 >> 16)
/* 34AC 800280AC 36101201 */ ori $s0, $s0, (0xE3001201 & 0xFFFF)
/* 34B0 800280B0 0000C82D */ daddu $t9, $zero, $zero
/* 34B4 800280B4 3C02800A */ lui $v0, %hi(gMainGfxPos)
/* 34B8 800280B8 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos)
/* 34BC 800280BC 0040902D */ daddu $s2, $v0, $zero
/* 34C0 800280C0 AFAE0018 */ sw $t6, 0x18($sp)
/* 34C4 800280C4 3C0EFD10 */ lui $t6, (0xFD10013F >> 16)
/* 34C8 800280C8 35CE013F */ ori $t6, $t6, (0xFD10013F & 0xFFFF)
/* 34CC 800280CC 3C15F510 */ lui $s5, (0xF510A000 >> 16)
/* 34D0 800280D0 36B5A000 */ ori $s5, $s5, (0xF510A000 & 0xFFFF)
/* 34D4 800280D4 AFAE0010 */ sw $t6, 0x10($sp)
/* 34D8 800280D8 3C0E074F */ lui $t6, (0x74FC014 >> 16)
/* 34DC 800280DC 35CEC014 */ ori $t6, $t6, (0x74FC014 & 0xFFFF)
/* 34E0 800280E0 3C17E700 */ lui $s7, (0xE7000000 >> 16)
/* 34E4 800280E4 3C1E004F */ lui $fp, (0x4FC014 >> 16)
/* 34E8 800280E8 37DEC014 */ ori $fp, $fp, (0x4FC014 & 0xFFFF)
/* 34EC 800280EC 0320C02D */ daddu $t8, $t9, $zero
/* 34F0 800280F0 24140018 */ addiu $s4, $zero, 0x18
/* 34F4 800280F4 0320982D */ daddu $s3, $t9, $zero
/* 34F8 800280F8 AFAE0014 */ sw $t6, 0x14($sp)
/* 34FC 800280FC 8E420000 */ lw $v0, 0x0($s2)
/* 3500 80028100 02E0182D */ daddu $v1, $s7, $zero
/* 3504 80028104 0040202D */ daddu $a0, $v0, $zero
/* 3508 80028108 24420008 */ addiu $v0, $v0, 0x8
/* 350C 8002810C AE420000 */ sw $v0, 0x0($s2)
/* 3510 80028110 AC830000 */ sw $v1, 0x0($a0)
/* 3514 80028114 24430008 */ addiu $v1, $v0, 0x8
/* 3518 80028118 AC800004 */ sw $zero, 0x4($a0)
/* 351C 8002811C AE430000 */ sw $v1, 0x0($s2)
/* 3520 80028120 3C03ED00 */ lui $v1, (0xED000000 >> 16)
/* 3524 80028124 AC430000 */ sw $v1, 0x0($v0)
/* 3528 80028128 24430010 */ addiu $v1, $v0, 0x10
/* 352C 8002812C AC460004 */ sw $a2, 0x4($v0)
/* 3530 80028130 AE430000 */ sw $v1, 0x0($s2)
/* 3534 80028134 3C030030 */ lui $v1, (0x300000 >> 16)
/* 3538 80028138 AC43000C */ sw $v1, 0xC($v0)
/* 353C 8002813C 00541821 */ addu $v1, $v0, $s4
/* 3540 80028140 AC450008 */ sw $a1, 0x8($v0)
/* 3544 80028144 AE430000 */ sw $v1, 0x0($s2)
/* 3548 80028148 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr)
/* 354C 8002814C 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0)
/* 3550 80028150 24430020 */ addiu $v1, $v0, 0x20
/* 3554 80028154 AC470010 */ sw $a3, 0x10($v0)
/* 3558 80028158 AC400014 */ sw $zero, 0x14($v0)
/* 355C 8002815C AE430000 */ sw $v1, 0x0($s2)
/* 3560 80028160 24430028 */ addiu $v1, $v0, 0x28
/* 3564 80028164 AC480018 */ sw $t0, 0x18($v0)
/* 3568 80028168 AC44001C */ sw $a0, 0x1C($v0)
/* 356C 8002816C AE430000 */ sw $v1, 0x0($s2)
/* 3570 80028170 3C03F700 */ lui $v1, (0xF7000000 >> 16)
/* 3574 80028174 AC430020 */ sw $v1, 0x20($v0)
/* 3578 80028178 24430030 */ addiu $v1, $v0, 0x30
/* 357C 8002817C AC490024 */ sw $t1, 0x24($v0)
/* 3580 80028180 AE430000 */ sw $v1, 0x0($s2)
/* 3584 80028184 24430038 */ addiu $v1, $v0, 0x38
/* 3588 80028188 AC4A0028 */ sw $t2, 0x28($v0)
/* 358C 8002818C AC40002C */ sw $zero, 0x2C($v0)
/* 3590 80028190 AE430000 */ sw $v1, 0x0($s2)
/* 3594 80028194 24430040 */ addiu $v1, $v0, 0x40
/* 3598 80028198 AC450030 */ sw $a1, 0x30($v0)
/* 359C 8002819C AC400034 */ sw $zero, 0x34($v0)
/* 35A0 800281A0 AE430000 */ sw $v1, 0x0($s2)
/* 35A4 800281A4 24430048 */ addiu $v1, $v0, 0x48
/* 35A8 800281A8 AC4B0038 */ sw $t3, 0x38($v0)
/* 35AC 800281AC AC40003C */ sw $zero, 0x3C($v0)
/* 35B0 800281B0 AE430000 */ sw $v1, 0x0($s2)
/* 35B4 800281B4 24430050 */ addiu $v1, $v0, 0x50
/* 35B8 800281B8 AC4C0040 */ sw $t4, 0x40($v0)
/* 35BC 800281BC AC400044 */ sw $zero, 0x44($v0)
/* 35C0 800281C0 AE430000 */ sw $v1, 0x0($s2)
/* 35C4 800281C4 24430058 */ addiu $v1, $v0, 0x58
/* 35C8 800281C8 AC470048 */ sw $a3, 0x48($v0)
/* 35CC 800281CC AC4D004C */ sw $t5, 0x4C($v0)
/* 35D0 800281D0 AE430000 */ sw $v1, 0x0($s2)
/* 35D4 800281D4 AC4F0050 */ sw $t7, 0x50($v0)
/* 35D8 800281D8 8FAE0018 */ lw $t6, 0x18($sp)
/* 35DC 800281DC 24430060 */ addiu $v1, $v0, 0x60
/* 35E0 800281E0 AC4E0054 */ sw $t6, 0x54($v0)
/* 35E4 800281E4 AE430000 */ sw $v1, 0x0($s2)
/* 35E8 800281E8 3C03FA00 */ lui $v1, (0xFA000000 >> 16)
/* 35EC 800281EC AC430058 */ sw $v1, 0x58($v0)
/* 35F0 800281F0 92C40003 */ lbu $a0, 0x3($s6)
/* 35F4 800281F4 24430068 */ addiu $v1, $v0, 0x68
/* 35F8 800281F8 AE430000 */ sw $v1, 0x0($s2)
/* 35FC 800281FC AC500060 */ sw $s0, 0x60($v0)
/* 3600 80028200 AC400064 */ sw $zero, 0x64($v0)
/* 3604 80028204 00912025 */ or $a0, $a0, $s1
/* 3608 80028208 AC44005C */ sw $a0, 0x5C($v0)
.L8002820C:
/* 360C 8002820C 3C070400 */ lui $a3, (0x4000400 >> 16)
/* 3610 80028210 34E70400 */ ori $a3, $a3, (0x4000400 & 0xFFFF)
/* 3614 80028214 33060FFF */ andi $a2, $t8, 0xFFF
/* 3618 80028218 27180018 */ addiu $t8, $t8, 0x18
/* 361C 8002821C 32850FFF */ andi $a1, $s4, 0xFFF
/* 3620 80028220 26940018 */ addiu $s4, $s4, 0x18
/* 3624 80028224 27390001 */ addiu $t9, $t9, 0x1
/* 3628 80028228 8E430000 */ lw $v1, 0x0($s2)
/* 362C 8002822C 3C02800A */ lui $v0, %hi(nuGfxZBuffer)
/* 3630 80028230 8C42A5DC */ lw $v0, %lo(nuGfxZBuffer)($v0)
/* 3634 80028234 0060202D */ daddu $a0, $v1, $zero
/* 3638 80028238 24630008 */ addiu $v1, $v1, 0x8
/* 363C 8002823C 00531021 */ addu $v0, $v0, $s3
/* 3640 80028240 AE430000 */ sw $v1, 0x0($s2)
/* 3644 80028244 8FAE0010 */ lw $t6, 0x10($sp)
/* 3648 80028248 26730F00 */ addiu $s3, $s3, 0xF00
/* 364C 8002824C AC820004 */ sw $v0, 0x4($a0)
/* 3650 80028250 24620008 */ addiu $v0, $v1, 0x8
/* 3654 80028254 AC8E0000 */ sw $t6, 0x0($a0)
/* 3658 80028258 3C0E0700 */ lui $t6, (0x7000000 >> 16)
/* 365C 8002825C AE420000 */ sw $v0, 0x0($s2)
/* 3660 80028260 24620010 */ addiu $v0, $v1, 0x10
/* 3664 80028264 AC6E0004 */ sw $t6, 0x4($v1)
/* 3668 80028268 3C0EE600 */ lui $t6, (0xE6000000 >> 16)
/* 366C 8002826C AC750000 */ sw $s5, 0x0($v1)
/* 3670 80028270 AE420000 */ sw $v0, 0x0($s2)
/* 3674 80028274 24620018 */ addiu $v0, $v1, 0x18
/* 3678 80028278 AC6E0008 */ sw $t6, 0x8($v1)
/* 367C 8002827C 3C0EF400 */ lui $t6, (0xF4000000 >> 16)
/* 3680 80028280 AC60000C */ sw $zero, 0xC($v1)
/* 3684 80028284 AE420000 */ sw $v0, 0x0($s2)
/* 3688 80028288 AC6E0010 */ sw $t6, 0x10($v1)
/* 368C 8002828C 8FAE0014 */ lw $t6, 0x14($sp)
/* 3690 80028290 24620020 */ addiu $v0, $v1, 0x20
/* 3694 80028294 AC6E0014 */ sw $t6, 0x14($v1)
/* 3698 80028298 AE420000 */ sw $v0, 0x0($s2)
/* 369C 8002829C 24620028 */ addiu $v0, $v1, 0x28
/* 36A0 800282A0 AC770018 */ sw $s7, 0x18($v1)
/* 36A4 800282A4 AC60001C */ sw $zero, 0x1C($v1)
/* 36A8 800282A8 AE420000 */ sw $v0, 0x0($s2)
/* 36AC 800282AC 24620030 */ addiu $v0, $v1, 0x30
/* 36B0 800282B0 3C0EF200 */ lui $t6, (0xF2000000 >> 16)
/* 36B4 800282B4 AC750020 */ sw $s5, 0x20($v1)
/* 36B8 800282B8 AC600024 */ sw $zero, 0x24($v1)
/* 36BC 800282BC AE420000 */ sw $v0, 0x0($s2)
/* 36C0 800282C0 24620038 */ addiu $v0, $v1, 0x38
/* 36C4 800282C4 AC6E0028 */ sw $t6, 0x28($v1)
/* 36C8 800282C8 3C0EE450 */ lui $t6, (0xE4500000 >> 16)
/* 36CC 800282CC 00AE2825 */ or $a1, $a1, $t6
/* 36D0 800282D0 AC7E002C */ sw $fp, 0x2C($v1)
/* 36D4 800282D4 AE420000 */ sw $v0, 0x0($s2)
/* 36D8 800282D8 24620040 */ addiu $v0, $v1, 0x40
/* 36DC 800282DC AC650030 */ sw $a1, 0x30($v1)
/* 36E0 800282E0 AC660034 */ sw $a2, 0x34($v1)
/* 36E4 800282E4 AE420000 */ sw $v0, 0x0($s2)
/* 36E8 800282E8 3C02E100 */ lui $v0, (0xE1000000 >> 16)
/* 36EC 800282EC AC620038 */ sw $v0, 0x38($v1)
/* 36F0 800282F0 3C02FFE0 */ lui $v0, (0xFFE00000 >> 16)
/* 36F4 800282F4 AC62003C */ sw $v0, 0x3C($v1)
/* 36F8 800282F8 24620048 */ addiu $v0, $v1, 0x48
/* 36FC 800282FC AE420000 */ sw $v0, 0x0($s2)
/* 3700 80028300 3C02F100 */ lui $v0, (0xF1000000 >> 16)
/* 3704 80028304 AC620040 */ sw $v0, 0x40($v1)
/* 3708 80028308 24620050 */ addiu $v0, $v1, 0x50
/* 370C 8002830C AC670044 */ sw $a3, 0x44($v1)
/* 3710 80028310 AE420000 */ sw $v0, 0x0($s2)
/* 3714 80028314 2B220028 */ slti $v0, $t9, 0x28
/* 3718 80028318 AC770048 */ sw $s7, 0x48($v1)
/* 371C 8002831C 1440FFBB */ bnez $v0, .L8002820C
/* 3720 80028320 AC60004C */ sw $zero, 0x4C($v1)
/* 3724 80028324 0800A1E4 */ j .L80028790
/* 3728 80028328 00000000 */ nop
.L8002832C:
/* 372C 8002832C 3C02800A */ lui $v0, %hi(gOverrideFlags)
/* 3730 80028330 8C42A650 */ lw $v0, %lo(gOverrideFlags)($v0)
/* 3734 80028334 30420008 */ andi $v0, $v0, 0x8
/* 3738 80028338 1040000E */ beqz $v0, .L80028374
/* 373C 8002833C 3C05FF10 */ lui $a1, (0xFF10013F >> 16)
/* 3740 80028340 34A5013F */ ori $a1, $a1, (0xFF10013F & 0xFFFF)
/* 3744 80028344 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* 3748 80028348 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* 374C 8002834C 8C620000 */ lw $v0, 0x0($v1)
/* 3750 80028350 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr)
/* 3754 80028354 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0)
/* 3758 80028358 0040802D */ daddu $s0, $v0, $zero
/* 375C 8002835C 24420008 */ addiu $v0, $v0, 0x8
/* 3760 80028360 AC620000 */ sw $v0, 0x0($v1)
/* 3764 80028364 0C0187A4 */ jal osVirtualToPhysical
/* 3768 80028368 AE050000 */ sw $a1, 0x0($s0)
/* 376C 8002836C 0800A1ED */ j .L800287B4
/* 3770 80028370 AE020004 */ sw $v0, 0x4($s0)
.L80028374:
/* 3774 80028374 3C06E300 */ lui $a2, (0xE3000A01 >> 16)
/* 3778 80028378 34C60A01 */ ori $a2, $a2, (0xE3000A01 & 0xFFFF)
/* 377C 8002837C 3C07E200 */ lui $a3, (0xE200001C >> 16)
/* 3780 80028380 34E7001C */ ori $a3, $a3, (0xE200001C & 0xFFFF)
/* 3784 80028384 3C08FF10 */ lui $t0, (0xFF10013F >> 16)
/* 3788 80028388 3508013F */ ori $t0, $t0, (0xFF10013F & 0xFFFF)
/* 378C 8002838C 3C09FFFC */ lui $t1, (0xFFFCFFFC >> 16)
/* 3790 80028390 3529FFFC */ ori $t1, $t1, (0xFFFCFFFC & 0xFFFF)
/* 3794 80028394 3C0AF64F */ lui $t2, (0xF64FC3BC >> 16)
/* 3798 80028398 354AC3BC */ ori $t2, $t2, (0xF64FC3BC & 0xFFFF)
/* 379C 8002839C 3C11800A */ lui $s1, %hi(gMainGfxPos)
/* 37A0 800283A0 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos)
/* 37A4 800283A4 3C02FE00 */ lui $v0, (0xFE000000 >> 16)
/* 37A8 800283A8 8E300000 */ lw $s0, 0x0($s1)
/* 37AC 800283AC 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr)
/* 37B0 800283B0 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0)
/* 37B4 800283B4 0200282D */ daddu $a1, $s0, $zero
/* 37B8 800283B8 26100008 */ addiu $s0, $s0, 0x8
/* 37BC 800283BC AE300000 */ sw $s0, 0x0($s1)
/* 37C0 800283C0 3C03800A */ lui $v1, %hi(nuGfxZBuffer)
/* 37C4 800283C4 8C63A5DC */ lw $v1, %lo(nuGfxZBuffer)($v1)
/* 37C8 800283C8 3C12F700 */ lui $s2, (0xF7000000 >> 16)
/* 37CC 800283CC ACA20000 */ sw $v0, 0x0($a1)
/* 37D0 800283D0 3C028000 */ lui $v0, (0x80000000 >> 16)
/* 37D4 800283D4 00621821 */ addu $v1, $v1, $v0
/* 37D8 800283D8 26020008 */ addiu $v0, $s0, 0x8
/* 37DC 800283DC ACA30004 */ sw $v1, 0x4($a1)
/* 37E0 800283E0 AE220000 */ sw $v0, 0x0($s1)
/* 37E4 800283E4 3C020030 */ lui $v0, (0x300000 >> 16)
/* 37E8 800283E8 AE020004 */ sw $v0, 0x4($s0)
/* 37EC 800283EC 26020010 */ addiu $v0, $s0, 0x10
/* 37F0 800283F0 AE060000 */ sw $a2, 0x0($s0)
/* 37F4 800283F4 AE220000 */ sw $v0, 0x0($s1)
/* 37F8 800283F8 26020018 */ addiu $v0, $s0, 0x18
/* 37FC 800283FC AE070008 */ sw $a3, 0x8($s0)
/* 3800 80028400 AE00000C */ sw $zero, 0xC($s0)
/* 3804 80028404 AE220000 */ sw $v0, 0x0($s1)
/* 3808 80028408 26020020 */ addiu $v0, $s0, 0x20
/* 380C 8002840C AE080010 */ sw $t0, 0x10($s0)
/* 3810 80028410 AE030014 */ sw $v1, 0x14($s0)
/* 3814 80028414 AE220000 */ sw $v0, 0x0($s1)
/* 3818 80028418 26020028 */ addiu $v0, $s0, 0x28
/* 381C 8002841C AE120018 */ sw $s2, 0x18($s0)
/* 3820 80028420 AE09001C */ sw $t1, 0x1C($s0)
/* 3824 80028424 AE220000 */ sw $v0, 0x0($s1)
/* 3828 80028428 26020030 */ addiu $v0, $s0, 0x30
/* 382C 8002842C AE0A0020 */ sw $t2, 0x20($s0)
/* 3830 80028430 AE000024 */ sw $zero, 0x24($s0)
/* 3834 80028434 AE220000 */ sw $v0, 0x0($s1)
/* 3838 80028438 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* 383C 8002843C AE020028 */ sw $v0, 0x28($s0)
/* 3840 80028440 26020038 */ addiu $v0, $s0, 0x38
/* 3844 80028444 AE00002C */ sw $zero, 0x2C($s0)
/* 3848 80028448 AE220000 */ sw $v0, 0x0($s1)
/* 384C 8002844C 0C0187A4 */ jal osVirtualToPhysical
/* 3850 80028450 AE080030 */ sw $t0, 0x30($s0)
/* 3854 80028454 8E230000 */ lw $v1, 0x0($s1)
/* 3858 80028458 AE020034 */ sw $v0, 0x34($s0)
/* 385C 8002845C 0060282D */ daddu $a1, $v1, $zero
/* 3860 80028460 ACB20000 */ sw $s2, 0x0($a1)
/* 3864 80028464 8664002C */ lh $a0, 0x2C($s3)
/* 3868 80028468 24630008 */ addiu $v1, $v1, 0x8
/* 386C 8002846C AE230000 */ sw $v1, 0x0($s1)
/* 3870 80028470 8663002E */ lh $v1, 0x2E($s3)
/* 3874 80028474 96620030 */ lhu $v0, 0x30($s3)
/* 3878 80028478 00042200 */ sll $a0, $a0, 8
/* 387C 8002847C 3084F800 */ andi $a0, $a0, 0xF800
/* 3880 80028480 000318C0 */ sll $v1, $v1, 3
/* 3884 80028484 306307C0 */ andi $v1, $v1, 0x7C0
/* 3888 80028488 00832025 */ or $a0, $a0, $v1
/* 388C 8002848C 00021082 */ srl $v0, $v0, 2
/* 3890 80028490 3042003E */ andi $v0, $v0, 0x3E
/* 3894 80028494 00822025 */ or $a0, $a0, $v0
/* 3898 80028498 34820001 */ ori $v0, $a0, 0x1
/* 389C 8002849C 00021400 */ sll $v0, $v0, 16
/* 38A0 800284A0 34420001 */ ori $v0, $v0, 0x1
/* 38A4 800284A4 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* 38A8 800284A8 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* 38AC 800284AC 00441025 */ or $v0, $v0, $a0
/* 38B0 800284B0 ACA20004 */ sw $v0, 0x4($a1)
/* 38B4 800284B4 8470014A */ lh $s0, 0x14A($v1)
/* 38B8 800284B8 8462014E */ lh $v0, 0x14E($v1)
/* 38BC 800284BC 8471014C */ lh $s1, 0x14C($v1)
/* 38C0 800284C0 0202A021 */ addu $s4, $s0, $v0
/* 38C4 800284C4 84620150 */ lh $v0, 0x150($v1)
/* 38C8 800284C8 8663000E */ lh $v1, 0xE($s3)
/* 38CC 800284CC 02229021 */ addu $s2, $s1, $v0
/* 38D0 800284D0 0203102A */ slt $v0, $s0, $v1
/* 38D4 800284D4 54400001 */ bnel $v0, $zero, .L800284DC
/* 38D8 800284D8 0060802D */ daddu $s0, $v1, $zero
.L800284DC:
/* 38DC 800284DC 86640010 */ lh $a0, 0x10($s3)
/* 38E0 800284E0 0224102A */ slt $v0, $s1, $a0
/* 38E4 800284E4 54400001 */ bnel $v0, $zero, .L800284EC
/* 38E8 800284E8 0080882D */ daddu $s1, $a0, $zero
.L800284EC:
/* 38EC 800284EC 8662000A */ lh $v0, 0xA($s3)
/* 38F0 800284F0 00621821 */ addu $v1, $v1, $v0
/* 38F4 800284F4 0074102A */ slt $v0, $v1, $s4
/* 38F8 800284F8 54400001 */ bnel $v0, $zero, .L80028500
/* 38FC 800284FC 0060A02D */ daddu $s4, $v1, $zero
.L80028500:
/* 3900 80028500 8662000C */ lh $v0, 0xC($s3)
/* 3904 80028504 00821821 */ addu $v1, $a0, $v0
/* 3908 80028508 0072102A */ slt $v0, $v1, $s2
/* 390C 8002850C 54400001 */ bnel $v0, $zero, .L80028514
/* 3910 80028510 0060902D */ daddu $s2, $v1, $zero
.L80028514:
/* 3914 80028514 06020001 */ bltzl $s0, .L8002851C
/* 3918 80028518 0000802D */ daddu $s0, $zero, $zero
.L8002851C:
/* 391C 8002851C 06220001 */ bltzl $s1, .L80028524
/* 3920 80028520 0000882D */ daddu $s1, $zero, $zero
.L80028524:
/* 3924 80028524 5A800001 */ blezl $s4, .L8002852C
/* 3928 80028528 24140001 */ addiu $s4, $zero, 0x1
.L8002852C:
/* 392C 8002852C 5A400001 */ blezl $s2, .L80028534
/* 3930 80028530 24120001 */ addiu $s2, $zero, 0x1
.L80028534:
/* 3934 80028534 2A020140 */ slti $v0, $s0, 0x140
/* 3938 80028538 50400001 */ beql $v0, $zero, .L80028540
/* 393C 8002853C 2410013F */ addiu $s0, $zero, 0x13F
.L80028540:
/* 3940 80028540 2A2200F0 */ slti $v0, $s1, 0xF0
/* 3944 80028544 50400001 */ beql $v0, $zero, .L8002854C
/* 3948 80028548 241100EF */ addiu $s1, $zero, 0xEF
.L8002854C:
/* 394C 8002854C 2A820141 */ slti $v0, $s4, 0x141
/* 3950 80028550 50400001 */ beql $v0, $zero, .L80028558
/* 3954 80028554 24140140 */ addiu $s4, $zero, 0x140
.L80028558:
/* 3958 80028558 2A4200F1 */ slti $v0, $s2, 0xF1
/* 395C 8002855C 50400001 */ beql $v0, $zero, .L80028564
/* 3960 80028560 241200F0 */ addiu $s2, $zero, 0xF0
.L80028564:
/* 3964 80028564 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 3968 80028568 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 396C 8002856C 94420148 */ lhu $v0, 0x148($v0)
/* 3970 80028570 30420001 */ andi $v0, $v0, 0x1
/* 3974 80028574 14400017 */ bnez $v0, .L800285D4
/* 3978 80028578 3C04F600 */ lui $a0, (0xF6000000 >> 16)
/* 397C 8002857C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* 3980 80028580 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* 3984 80028584 8C620000 */ lw $v0, 0x0($v1)
/* 3988 80028588 0040282D */ daddu $a1, $v0, $zero
/* 398C 8002858C 24420008 */ addiu $v0, $v0, 0x8
/* 3990 80028590 AC620000 */ sw $v0, 0x0($v1)
/* 3994 80028594 2683FFFF */ addiu $v1, $s4, -0x1
/* 3998 80028598 306303FF */ andi $v1, $v1, 0x3FF
/* 399C 8002859C 00031B80 */ sll $v1, $v1, 14
/* 39A0 800285A0 2642FFFF */ addiu $v0, $s2, -0x1
/* 39A4 800285A4 304203FF */ andi $v0, $v0, 0x3FF
/* 39A8 800285A8 00021080 */ sll $v0, $v0, 2
/* 39AC 800285AC 00441025 */ or $v0, $v0, $a0
/* 39B0 800285B0 00621825 */ or $v1, $v1, $v0
/* 39B4 800285B4 ACA30000 */ sw $v1, 0x0($a1)
/* 39B8 800285B8 320303FF */ andi $v1, $s0, 0x3FF
/* 39BC 800285BC 00031B80 */ sll $v1, $v1, 14
/* 39C0 800285C0 322203FF */ andi $v0, $s1, 0x3FF
/* 39C4 800285C4 00021080 */ sll $v0, $v0, 2
/* 39C8 800285C8 00621825 */ or $v1, $v1, $v0
/* 39CC 800285CC 0800A177 */ j .L800285DC
/* 39D0 800285D0 ACA30004 */ sw $v1, 0x4($a1)
.L800285D4:
/* 39D4 800285D4 0C0517B0 */ jal appendGfx_background_texture
/* 39D8 800285D8 00000000 */ nop
.L800285DC:
/* 39DC 800285DC 3C04E300 */ lui $a0, (0xE3000A01 >> 16)
/* 39E0 800285E0 34840A01 */ ori $a0, $a0, (0xE3000A01 & 0xFFFF)
/* 39E4 800285E4 3C05E200 */ lui $a1, (0xE200001C >> 16)
/* 39E8 800285E8 34A5001C */ ori $a1, $a1, (0xE200001C & 0xFFFF)
/* 39EC 800285EC 3C060001 */ lui $a2, (0x10001 >> 16)
/* 39F0 800285F0 3C08800A */ lui $t0, %hi(gMainGfxPos)
/* 39F4 800285F4 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos)
/* 39F8 800285F8 34C60001 */ ori $a2, $a2, (0x10001 & 0xFFFF)
/* 39FC 800285FC 8D070000 */ lw $a3, 0x0($t0)
/* 3A00 80028600 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* 3A04 80028604 00E0102D */ daddu $v0, $a3, $zero
/* 3A08 80028608 24E70008 */ addiu $a3, $a3, 0x8
/* 3A0C 8002860C AD070000 */ sw $a3, 0x0($t0)
/* 3A10 80028610 AC430000 */ sw $v1, 0x0($v0)
/* 3A14 80028614 AC400004 */ sw $zero, 0x4($v0)
/* 3A18 80028618 24E20008 */ addiu $v0, $a3, 0x8
/* 3A1C 8002861C AD020000 */ sw $v0, 0x0($t0)
/* 3A20 80028620 3C020030 */ lui $v0, (0x300000 >> 16)
/* 3A24 80028624 ACE20004 */ sw $v0, 0x4($a3)
/* 3A28 80028628 24E20010 */ addiu $v0, $a3, 0x10
/* 3A2C 8002862C ACE40000 */ sw $a0, 0x0($a3)
/* 3A30 80028630 AD020000 */ sw $v0, 0x0($t0)
/* 3A34 80028634 24E20018 */ addiu $v0, $a3, 0x18
/* 3A38 80028638 ACE50008 */ sw $a1, 0x8($a3)
/* 3A3C 8002863C ACE0000C */ sw $zero, 0xC($a3)
/* 3A40 80028640 AD020000 */ sw $v0, 0x0($t0)
/* 3A44 80028644 3C02F700 */ lui $v0, (0xF7000000 >> 16)
/* 3A48 80028648 ACE20010 */ sw $v0, 0x10($a3)
/* 3A4C 8002864C 24E20020 */ addiu $v0, $a3, 0x20
/* 3A50 80028650 ACE60014 */ sw $a2, 0x14($a3)
/* 3A54 80028654 AD020000 */ sw $v0, 0x0($t0)
/* 3A58 80028658 ACE30018 */ sw $v1, 0x18($a3)
/* 3A5C 8002865C 1A20000F */ blez $s1, .L8002869C
/* 3A60 80028660 ACE0001C */ sw $zero, 0x1C($a3)
/* 3A64 80028664 3C03F64F */ lui $v1, (0xF64FC000 >> 16)
/* 3A68 80028668 3463C000 */ ori $v1, $v1, (0xF64FC000 & 0xFFFF)
/* 3A6C 8002866C 24E20028 */ addiu $v0, $a3, 0x28
/* 3A70 80028670 AD020000 */ sw $v0, 0x0($t0)
/* 3A74 80028674 2622FFFF */ addiu $v0, $s1, -0x1
/* 3A78 80028678 304203FF */ andi $v0, $v0, 0x3FF
/* 3A7C 8002867C 00021080 */ sll $v0, $v0, 2
/* 3A80 80028680 00431025 */ or $v0, $v0, $v1
/* 3A84 80028684 ACE20020 */ sw $v0, 0x20($a3)
/* 3A88 80028688 24E20030 */ addiu $v0, $a3, 0x30
/* 3A8C 8002868C ACE00024 */ sw $zero, 0x24($a3)
/* 3A90 80028690 AD020000 */ sw $v0, 0x0($t0)
/* 3A94 80028694 ACE00028 */ sw $zero, 0x28($a3)
/* 3A98 80028698 ACE0002C */ sw $zero, 0x2C($a3)
.L8002869C:
/* 3A9C 8002869C 1A000015 */ blez $s0, .L800286F4
/* 3AA0 800286A0 2603FFFF */ addiu $v1, $s0, -0x1
/* 3AA4 800286A4 306303FF */ andi $v1, $v1, 0x3FF
/* 3AA8 800286A8 00031B80 */ sll $v1, $v1, 14
/* 3AAC 800286AC 2642FFFF */ addiu $v0, $s2, -0x1
/* 3AB0 800286B0 304203FF */ andi $v0, $v0, 0x3FF
/* 3AB4 800286B4 00021080 */ sll $v0, $v0, 2
/* 3AB8 800286B8 3C04F600 */ lui $a0, (0xF6000000 >> 16)
/* 3ABC 800286BC 00441025 */ or $v0, $v0, $a0
/* 3AC0 800286C0 00621825 */ or $v1, $v1, $v0
/* 3AC4 800286C4 322203FF */ andi $v0, $s1, 0x3FF
/* 3AC8 800286C8 8D050000 */ lw $a1, 0x0($t0)
/* 3ACC 800286CC 00021080 */ sll $v0, $v0, 2
/* 3AD0 800286D0 00A0302D */ daddu $a2, $a1, $zero
/* 3AD4 800286D4 24A50008 */ addiu $a1, $a1, 0x8
/* 3AD8 800286D8 AD050000 */ sw $a1, 0x0($t0)
/* 3ADC 800286DC ACC20004 */ sw $v0, 0x4($a2)
/* 3AE0 800286E0 24A20008 */ addiu $v0, $a1, 0x8
/* 3AE4 800286E4 ACC30000 */ sw $v1, 0x0($a2)
/* 3AE8 800286E8 AD020000 */ sw $v0, 0x0($t0)
/* 3AEC 800286EC ACA00000 */ sw $zero, 0x0($a1)
/* 3AF0 800286F0 ACA00004 */ sw $zero, 0x4($a1)
.L800286F4:
/* 3AF4 800286F4 2A820140 */ slti $v0, $s4, 0x140
/* 3AF8 800286F8 10400015 */ beqz $v0, .L80028750
/* 3AFC 800286FC 3C03F64F */ lui $v1, (0xF64FC000 >> 16)
/* 3B00 80028700 3463C000 */ ori $v1, $v1, (0xF64FC000 & 0xFFFF)
/* 3B04 80028704 2642FFFF */ addiu $v0, $s2, -0x1
/* 3B08 80028708 304203FF */ andi $v0, $v0, 0x3FF
/* 3B0C 8002870C 00021080 */ sll $v0, $v0, 2
/* 3B10 80028710 00431025 */ or $v0, $v0, $v1
/* 3B14 80028714 328303FF */ andi $v1, $s4, 0x3FF
/* 3B18 80028718 8D040000 */ lw $a0, 0x0($t0)
/* 3B1C 8002871C 00031B80 */ sll $v1, $v1, 14
/* 3B20 80028720 0080282D */ daddu $a1, $a0, $zero
/* 3B24 80028724 24840008 */ addiu $a0, $a0, 0x8
/* 3B28 80028728 AD040000 */ sw $a0, 0x0($t0)
/* 3B2C 8002872C ACA20000 */ sw $v0, 0x0($a1)
/* 3B30 80028730 322203FF */ andi $v0, $s1, 0x3FF
/* 3B34 80028734 00021080 */ sll $v0, $v0, 2
/* 3B38 80028738 00621825 */ or $v1, $v1, $v0
/* 3B3C 8002873C 24820008 */ addiu $v0, $a0, 0x8
/* 3B40 80028740 ACA30004 */ sw $v1, 0x4($a1)
/* 3B44 80028744 AD020000 */ sw $v0, 0x0($t0)
/* 3B48 80028748 AC800000 */ sw $zero, 0x0($a0)
/* 3B4C 8002874C AC800004 */ sw $zero, 0x4($a0)
.L80028750:
/* 3B50 80028750 2A4200F0 */ slti $v0, $s2, 0xF0
/* 3B54 80028754 1040000E */ beqz $v0, .L80028790
/* 3B58 80028758 3C02F64F */ lui $v0, (0xF64FC3BC >> 16)
/* 3B5C 8002875C 8D030000 */ lw $v1, 0x0($t0)
/* 3B60 80028760 3442C3BC */ ori $v0, $v0, (0xF64FC3BC & 0xFFFF)
/* 3B64 80028764 0060202D */ daddu $a0, $v1, $zero
/* 3B68 80028768 24630008 */ addiu $v1, $v1, 0x8
/* 3B6C 8002876C AD030000 */ sw $v1, 0x0($t0)
/* 3B70 80028770 AC820000 */ sw $v0, 0x0($a0)
/* 3B74 80028774 324203FF */ andi $v0, $s2, 0x3FF
/* 3B78 80028778 00021080 */ sll $v0, $v0, 2
/* 3B7C 8002877C AC820004 */ sw $v0, 0x4($a0)
/* 3B80 80028780 24620008 */ addiu $v0, $v1, 0x8
/* 3B84 80028784 AD020000 */ sw $v0, 0x0($t0)
/* 3B88 80028788 AC600000 */ sw $zero, 0x0($v1)
/* 3B8C 8002878C AC600004 */ sw $zero, 0x4($v1)
.L80028790:
/* 3B90 80028790 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* 3B94 80028794 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* 3B98 80028798 8C620000 */ lw $v0, 0x0($v1)
/* 3B9C 8002879C 0040202D */ daddu $a0, $v0, $zero
/* 3BA0 800287A0 24420008 */ addiu $v0, $v0, 0x8
/* 3BA4 800287A4 AC620000 */ sw $v0, 0x0($v1)
/* 3BA8 800287A8 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* 3BAC 800287AC AC820000 */ sw $v0, 0x0($a0)
/* 3BB0 800287B0 AC800004 */ sw $zero, 0x4($a0)
.L800287B4:
/* 3BB4 800287B4 8FBF0044 */ lw $ra, 0x44($sp)
/* 3BB8 800287B8 8FBE0040 */ lw $fp, 0x40($sp)
/* 3BBC 800287BC 8FB7003C */ lw $s7, 0x3C($sp)
/* 3BC0 800287C0 8FB60038 */ lw $s6, 0x38($sp)
/* 3BC4 800287C4 8FB50034 */ lw $s5, 0x34($sp)
/* 3BC8 800287C8 8FB40030 */ lw $s4, 0x30($sp)
/* 3BCC 800287CC 8FB3002C */ lw $s3, 0x2C($sp)
/* 3BD0 800287D0 8FB20028 */ lw $s2, 0x28($sp)
/* 3BD4 800287D4 8FB10024 */ lw $s1, 0x24($sp)
/* 3BD8 800287D8 8FB00020 */ lw $s0, 0x20($sp)
/* 3BDC 800287DC 03E00008 */ jr $ra
/* 3BE0 800287E0 27BD0048 */ addiu $sp, $sp, 0x48
/* 3BE4 800287E4 00000000 */ nop
/* 3BE8 800287E8 00000000 */ nop
/* 3BEC 800287EC 00000000 */ nop
### DECOMPILED C INSTRUCTIONS:
void gfx_draw_background(void) {
Camera* camera;
s32 bgFlags;
s32 backgroundMinX;
s32 backgroundMaxX;
s32 backgroundMinY;
s32 backgroundMaxY;
s32 viewportStartX;
s32 i;
s32 a = SCREEN_COPY_TILE_HEIGHT << 2;
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
camera = &gCameras[gCurrentCameraID];
bgFlags = gGameStatusPtr->backgroundFlags & BACKGROUND_RENDER_STATE_MASK;
switch (bgFlags) {
case BACKGROUND_RENDER_STATE_1:
// Save coverage to nunGfxCfb[1] using the VISCVG render mode
gDPPipeSync(gMainGfxPos++);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxCfb[1]);
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
gDPSetBlendColor(gMainGfxPos++, 0x80, 0x80, 0x80, 0xFF);
gDPSetPrimDepth(gMainGfxPos++, 0xFFFF, 0xFFFF);
gDPSetDepthSource(gMainGfxPos++, G_ZS_PRIM);
gDPSetRenderMode(gMainGfxPos++, G_RM_VISCVG, G_RM_VISCVG2);
gDPFillRectangle(gMainGfxPos++, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
gDPPipeSync(gMainGfxPos++);
gDPSetDepthSource(gMainGfxPos++, G_ZS_PIXEL);
gGameStatusPtr->backgroundFlags &= ~BACKGROUND_RENDER_STATE_MASK;
gGameStatusPtr->backgroundFlags |= BACKGROUND_RENDER_STATE_2;
break;
case BACKGROUND_RENDER_STATE_2:
// Save the framebuffer into the depth buffer and run a filter on it based on the saved coverage values
gfx_transfer_frame_to_depth(nuGfxCfb[0], nuGfxCfb[1], nuGfxZBuffer); // applies filters to the framebuffer
gPauseBackgroundFade = 0;
gGameStatusPtr->backgroundFlags &= ~BACKGROUND_RENDER_STATE_MASK;
gGameStatusPtr->backgroundFlags |= BACKGROUND_RENDER_STATE_3;
// fallthrough
case BACKGROUND_RENDER_STATE_3:
// Draw the saved framebuffer to the background, fading in at a rate of 16 opacity per frame until reaching 128 opacity
gPauseBackgroundFade += 16;
if (gPauseBackgroundFade > 128) {
gPauseBackgroundFade = 128;
}
gDPPipeSync(gMainGfxPos++);
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxCfb_ptr);
gDPSetFillColor(gMainGfxPos++, PACK_FILL_COLOR(0, 0, 0, 1));
gDPFillRectangle(gMainGfxPos++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
// @bug In 1-cycle mode, the two combiner cycles should be identical. Using Texel1 here in the second cycle,
// which is the actual cycle of the combiner used on hardware in 1-cycle mode, actually samples the next
// pixel's texel value instead of the current pixel's. This results in a one-pixel offset.
gDPSetCombineLERP(gMainGfxPos++, PRIMITIVE, TEXEL0, PRIMITIVE_ALPHA, TEXEL0, 0, 0, 0, 1, PRIMITIVE, TEXEL1, PRIMITIVE_ALPHA, TEXEL1, 0, 0, 0, 1);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 40, 40, 40, gPauseBackgroundFade);
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
for (i = 0; i < 40; i++) {
gDPLoadTextureTile(gMainGfxPos++, nuGfxZBuffer + (i * SCREEN_WIDTH * SCREEN_COPY_TILE_HEIGHT), G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH,
SCREEN_HEIGHT, 0, 0, SCREEN_WIDTH - 1, SCREEN_COPY_TILE_HEIGHT - 1, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
// @bug Due to the previous issue with the incorrect second cycle combiner, the devs added a 1-pixel offset to texture coordinates
// in this texrect to compensate for the combiner error.
gSPTextureRectangle(gMainGfxPos++,
// ulx, uly, lrx, lry
0 << 2, i * a, SCREEN_WIDTH << 2, a + (i * (SCREEN_COPY_TILE_HEIGHT << 2)),
// tile
G_TX_RENDERTILE,
// s, t, dsdx, dtdy
-1 << 5, 0 << 5, 1 << 10, 1 << 10);
gDPPipeSync(gMainGfxPos++);
}
break;
default:
// Draw the scene's background as normal
if (gOverrideFlags & GLOBAL_OVERRIDES_8) {
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
return;
}
gDPSetDepthImage(gMainGfxPos++, OS_K0_TO_PHYSICAL(nuGfxZBuffer));
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, OS_K0_TO_PHYSICAL(nuGfxZBuffer));
gDPSetFillColor(gMainGfxPos++, PACK_FILL_DEPTH(G_MAXFBZ, 0));
gDPFillRectangle(gMainGfxPos++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
gDPPipeSync(gMainGfxPos++);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
gDPSetFillColor(gMainGfxPos++, PACK_FILL_COLOR(camera->bgColor[0], camera->bgColor[1], camera->bgColor[2], 1));
backgroundMinX = gGameStatusPtr->backgroundMinX;
backgroundMaxX = backgroundMinX + gGameStatusPtr->backgroundMaxX;
backgroundMinY = gGameStatusPtr->backgroundMinY;
backgroundMaxY = backgroundMinY + gGameStatusPtr->backgroundMaxY;
viewportStartX = camera->viewportStartX;
if (backgroundMinX < viewportStartX) {
backgroundMinX = viewportStartX;
}
if (backgroundMinY < camera->viewportStartY) {
backgroundMinY = camera->viewportStartY;
}
if (backgroundMaxX > viewportStartX + camera->viewportW) {
backgroundMaxX = viewportStartX + camera->viewportW;
}
if (backgroundMaxY > camera->viewportStartY + camera->viewportH) {
backgroundMaxY = camera->viewportStartY + camera->viewportH;
}
if (backgroundMinX < 0) {
backgroundMinX = 0;
}
if (backgroundMinY < 0) {
backgroundMinY = 0;
}
if (backgroundMaxX < 1) {
backgroundMaxX = 1;
}
if (backgroundMaxY < 1) {
backgroundMaxY = 1;
}
if (backgroundMinX > SCREEN_WIDTH - 1) {
backgroundMinX = SCREEN_WIDTH - 1;
}
if (backgroundMinY > SCREEN_HEIGHT - 1) {
backgroundMinY = SCREEN_HEIGHT - 1;
}
if (backgroundMaxX > SCREEN_WIDTH) {
backgroundMaxX = SCREEN_WIDTH;
}
if (backgroundMaxY > SCREEN_HEIGHT) {
backgroundMaxY = SCREEN_HEIGHT;
}
if (!(gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_TEXTURE)) {
gDPFillRectangle(gMainGfxPos++, backgroundMinX, backgroundMinY, backgroundMaxX - 1, backgroundMaxY - 1);
} else {
appendGfx_background_texture();
}
gDPPipeSync(gMainGfxPos++);
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
gDPSetFillColor(gMainGfxPos++, PACK_FILL_COLOR(0, 0, 0, 1));
gDPPipeSync(gMainGfxPos++);
if (backgroundMinY > 0) {
gDPFillRectangle(gMainGfxPos++, 0, 0, SCREEN_WIDTH - 1, backgroundMinY - 1);
gDPNoOp(gMainGfxPos++);
}
if (backgroundMinX > 0) {
gDPFillRectangle(gMainGfxPos++, 0, backgroundMinY, backgroundMinX - 1, backgroundMaxY - 1);
gDPNoOp(gMainGfxPos++);
}
if (backgroundMaxX < SCREEN_WIDTH) {
gDPFillRectangle(gMainGfxPos++, backgroundMaxX, backgroundMinY, SCREEN_WIDTH - 1, backgroundMaxY - 1);
gDPNoOp(gMainGfxPos++);
}
if (backgroundMaxY < SCREEN_HEIGHT) {
gDPFillRectangle(gMainGfxPos++, 0, backgroundMaxY, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
gDPNoOp(gMainGfxPos++);
}
break;
}
gDPPipeSync(gMainGfxPos++);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel create_actor
/* 193C84 802653A4 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 193C88 802653A8 AFB30024 */ sw $s3, 0x24($sp)
/* 193C8C 802653AC 0080982D */ daddu $s3, $a0, $zero
/* 193C90 802653B0 3C02EFE8 */ lui $v0, (0xEFE82080 >> 16)
/* 193C94 802653B4 34422080 */ ori $v0, $v0, (0xEFE82080 & 0xFFFF)
/* 193C98 802653B8 AFBF0034 */ sw $ra, 0x34($sp)
/* 193C9C 802653BC AFB60030 */ sw $s6, 0x30($sp)
/* 193CA0 802653C0 AFB5002C */ sw $s5, 0x2C($sp)
/* 193CA4 802653C4 AFB40028 */ sw $s4, 0x28($sp)
/* 193CA8 802653C8 AFB20020 */ sw $s2, 0x20($sp)
/* 193CAC 802653CC AFB1001C */ sw $s1, 0x1C($sp)
/* 193CB0 802653D0 AFB00018 */ sw $s0, 0x18($sp)
/* 193CB4 802653D4 F7B80048 */ sdc1 $f24, 0x48($sp)
/* 193CB8 802653D8 F7B60040 */ sdc1 $f22, 0x40($sp)
/* 193CBC 802653DC F7B40038 */ sdc1 $f20, 0x38($sp)
/* 193CC0 802653E0 8E640004 */ lw $a0, 0x4($s3)
/* 193CC4 802653E4 3C12800E */ lui $s2, %hi(gBattleStatus)
/* 193CC8 802653E8 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus)
/* 193CCC 802653EC 0082102A */ slt $v0, $a0, $v0
/* 193CD0 802653F0 14400014 */ bnez $v0, .L80265444
/* 193CD4 802653F4 0000802D */ daddu $s0, $zero, $zero
/* 193CD8 802653F8 3C038028 */ lui $v1, %hi(btl_actorHomePositions)
/* 193CDC 802653FC 24633524 */ addiu $v1, $v1, %lo(btl_actorHomePositions)
/* 193CE0 80265400 00041040 */ sll $v0, $a0, 1
/* 193CE4 80265404 00441021 */ addu $v0, $v0, $a0
/* 193CE8 80265408 00021040 */ sll $v0, $v0, 1
/* 193CEC 8026540C 00431021 */ addu $v0, $v0, $v1
/* 193CF0 80265410 84430000 */ lh $v1, 0x0($v0)
/* 193CF4 80265414 4483C000 */ mtc1 $v1, $f24
/* 193CF8 80265418 00000000 */ nop
/* 193CFC 8026541C 4680C620 */ cvt.s.w $f24, $f24
/* 193D00 80265420 84430002 */ lh $v1, 0x2($v0)
/* 193D04 80265424 84420004 */ lh $v0, 0x4($v0)
/* 193D08 80265428 4483A000 */ mtc1 $v1, $f20
/* 193D0C 8026542C 00000000 */ nop
/* 193D10 80265430 4680A520 */ cvt.s.w $f20, $f20
/* 193D14 80265434 4482B000 */ mtc1 $v0, $f22
/* 193D18 80265438 00000000 */ nop
/* 193D1C 8026543C 08099517 */ j .L8026545C
/* 193D20 80265440 4680B5A0 */ cvt.s.w $f22, $f22
.L80265444:
/* 193D24 80265444 C4980000 */ lwc1 $f24, 0x0($a0)
/* 193D28 80265448 4680C620 */ cvt.s.w $f24, $f24
/* 193D2C 8026544C C4940004 */ lwc1 $f20, 0x4($a0)
/* 193D30 80265450 4680A520 */ cvt.s.w $f20, $f20
/* 193D34 80265454 C4960008 */ lwc1 $f22, 0x8($a0)
/* 193D38 80265458 4680B5A0 */ cvt.s.w $f22, $f22
.L8026545C:
/* 193D3C 8026545C 8E740000 */ lw $s4, 0x0($s3)
/* 193D40 80265460 0240182D */ daddu $v1, $s2, $zero
/* 193D44 80265464 86960008 */ lh $s6, 0x8($s4)
.L80265468:
/* 193D48 80265468 8C6200E0 */ lw $v0, 0xE0($v1)
/* 193D4C 8026546C 10400005 */ beqz $v0, .L80265484
/* 193D50 80265470 00000000 */ nop
/* 193D54 80265474 26100001 */ addiu $s0, $s0, 0x1
/* 193D58 80265478 2A020018 */ slti $v0, $s0, 0x18
/* 193D5C 8026547C 1440FFFA */ bnez $v0, .L80265468
/* 193D60 80265480 24630004 */ addiu $v1, $v1, 0x4
.L80265484:
/* 193D64 80265484 0C00AB39 */ jal heap_malloc
/* 193D68 80265488 24040444 */ addiu $a0, $zero, 0x444
/* 193D6C 8026548C 00101880 */ sll $v1, $s0, 2
/* 193D70 80265490 02431821 */ addu $v1, $s2, $v1
/* 193D74 80265494 0040882D */ daddu $s1, $v0, $zero
/* 193D78 80265498 16200003 */ bnez $s1, .L802654A8
/* 193D7C 8026549C AC6200E0 */ sw $v0, 0xE0($v1)
.L802654A0:
/* 193D80 802654A0 08099528 */ j .L802654A0
/* 193D84 802654A4 00000000 */ nop
.L802654A8:
/* 193D88 802654A8 92430093 */ lbu $v1, 0x93($s2)
/* 193D8C 802654AC 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 193D90 802654B0 44810000 */ mtc1 $at, $f0
/* 193D94 802654B4 24620001 */ addiu $v0, $v1, 0x1
/* 193D98 802654B8 A2420093 */ sb $v0, 0x93($s2)
/* 193D9C 802654BC A2230134 */ sb $v1, 0x134($s1)
/* 193DA0 802654C0 A2200135 */ sb $zero, 0x135($s1)
/* 193DA4 802654C4 AE340008 */ sw $s4, 0x8($s1)
/* 193DA8 802654C8 92820005 */ lbu $v0, 0x5($s4)
/* 193DAC 802654CC A2220136 */ sb $v0, 0x136($s1)
/* 193DB0 802654D0 8E820000 */ lw $v0, 0x0($s4)
/* 193DB4 802654D4 E6380144 */ swc1 $f24, 0x144($s1)
/* 193DB8 802654D8 E6380138 */ swc1 $f24, 0x138($s1)
/* 193DBC 802654DC E6340148 */ swc1 $f20, 0x148($s1)
/* 193DC0 802654E0 E634013C */ swc1 $f20, 0x13C($s1)
/* 193DC4 802654E4 E636014C */ swc1 $f22, 0x14C($s1)
/* 193DC8 802654E8 E6360140 */ swc1 $f22, 0x140($s1)
/* 193DCC 802654EC A6200150 */ sh $zero, 0x150($s1)
/* 193DD0 802654F0 A6200152 */ sh $zero, 0x152($s1)
/* 193DD4 802654F4 A6200154 */ sh $zero, 0x154($s1)
/* 193DD8 802654F8 AE220000 */ sw $v0, 0x0($s1)
/* 193DDC 802654FC 92820007 */ lbu $v0, 0x7($s4)
/* 193DE0 80265500 A23601F3 */ sb $s6, 0x1F3($s1)
/* 193DE4 80265504 AE2001C0 */ sw $zero, 0x1C0($s1)
/* 193DE8 80265508 A22201B8 */ sb $v0, 0x1B8($s1)
/* 193DEC 8026550C A22201B9 */ sb $v0, 0x1B9($s1)
/* 193DF0 80265510 8E820010 */ lw $v0, 0x10($s4)
/* 193DF4 80265514 AE2001C8 */ sw $zero, 0x1C8($s1)
/* 193DF8 80265518 AE2001CC */ sw $zero, 0x1CC($s1)
/* 193DFC 8026551C AE2001D0 */ sw $zero, 0x1D0($s1)
/* 193E00 80265520 AE2001D4 */ sw $zero, 0x1D4($s1)
/* 193E04 80265524 AE2001D8 */ sw $zero, 0x1D8($s1)
/* 193E08 80265528 AE2201C4 */ sw $v0, 0x1C4($s1)
/* 193E0C 8026552C 9262000B */ lbu $v0, 0xB($s3)
/* 193E10 80265530 A23001F2 */ sb $s0, 0x1F2($s1)
/* 193E14 80265534 A22201F1 */ sb $v0, 0x1F1($s1)
/* 193E18 80265538 AE20018C */ sw $zero, 0x18C($s1)
/* 193E1C 8026553C AE20015C */ sw $zero, 0x15C($s1)
/* 193E20 80265540 AE200160 */ sw $zero, 0x160($s1)
/* 193E24 80265544 AE200164 */ sw $zero, 0x164($s1)
/* 193E28 80265548 A6200168 */ sh $zero, 0x168($s1)
/* 193E2C 8026554C A620016A */ sh $zero, 0x16A($s1)
/* 193E30 80265550 A620016C */ sh $zero, 0x16C($s1)
/* 193E34 80265554 E6200170 */ swc1 $f0, 0x170($s1)
/* 193E38 80265558 E6200174 */ swc1 $f0, 0x174($s1)
/* 193E3C 8026555C E6200178 */ swc1 $f0, 0x178($s1)
/* 193E40 80265560 E620017C */ swc1 $f0, 0x17C($s1)
/* 193E44 80265564 E6200180 */ swc1 $f0, 0x180($s1)
/* 193E48 80265568 E6200184 */ swc1 $f0, 0x184($s1)
/* 193E4C 8026556C A220019A */ sb $zero, 0x19A($s1)
/* 193E50 80265570 A2200207 */ sb $zero, 0x207($s1)
/* 193E54 80265574 92820020 */ lbu $v0, 0x20($s4)
/* 193E58 80265578 A2220190 */ sb $v0, 0x190($s1)
/* 193E5C 8026557C 92820021 */ lbu $v0, 0x21($s4)
/* 193E60 80265580 E6200188 */ swc1 $f0, 0x188($s1)
/* 193E64 80265584 A2200194 */ sb $zero, 0x194($s1)
/* 193E68 80265588 A2200195 */ sb $zero, 0x195($s1)
/* 193E6C 8026558C A2200196 */ sb $zero, 0x196($s1)
/* 193E70 80265590 A2200197 */ sb $zero, 0x197($s1)
/* 193E74 80265594 A2200198 */ sb $zero, 0x198($s1)
/* 193E78 80265598 A2200199 */ sb $zero, 0x199($s1)
/* 193E7C 8026559C A2200206 */ sb $zero, 0x206($s1)
/* 193E80 802655A0 AE200200 */ sw $zero, 0x200($s1)
/* 193E84 802655A4 A2200204 */ sb $zero, 0x204($s1)
/* 193E88 802655A8 A2200205 */ sb $zero, 0x205($s1)
/* 193E8C 802655AC A2220191 */ sb $v0, 0x191($s1)
/* 193E90 802655B0 82820022 */ lb $v0, 0x22($s4)
/* 193E94 802655B4 4600C006 */ mov.s $f0, $f24
/* 193E98 802655B8 44821000 */ mtc1 $v0, $f2
/* 193E9C 802655BC 00000000 */ nop
/* 193EA0 802655C0 468010A0 */ cvt.s.w $f2, $f2
/* 193EA4 802655C4 46020000 */ add.s $f0, $f0, $f2
/* 193EA8 802655C8 4600010D */ trunc.w.s $f4, $f0
/* 193EAC 802655CC 44022000 */ mfc1 $v0, $f4
/* 193EB0 802655D0 00000000 */ nop
/* 193EB4 802655D4 A6220156 */ sh $v0, 0x156($s1)
/* 193EB8 802655D8 82820023 */ lb $v0, 0x23($s4)
/* 193EBC 802655DC 4600A006 */ mov.s $f0, $f20
/* 193EC0 802655E0 44821000 */ mtc1 $v0, $f2
/* 193EC4 802655E4 00000000 */ nop
/* 193EC8 802655E8 468010A0 */ cvt.s.w $f2, $f2
/* 193ECC 802655EC 46020000 */ add.s $f0, $f0, $f2
/* 193ED0 802655F0 4600010D */ trunc.w.s $f4, $f0
/* 193ED4 802655F4 44022000 */ mfc1 $v0, $f4
/* 193ED8 802655F8 00000000 */ nop
/* 193EDC 802655FC A6220158 */ sh $v0, 0x158($s1)
/* 193EE0 80265600 4600B006 */ mov.s $f0, $f22
/* 193EE4 80265604 8E220000 */ lw $v0, 0x0($s1)
/* 193EE8 80265608 4600010D */ trunc.w.s $f4, $f0
/* 193EEC 8026560C 44032000 */ mfc1 $v1, $f4
/* 193EF0 80265610 30420800 */ andi $v0, $v0, 0x800
/* 193EF4 80265614 10400010 */ beqz $v0, .L80265658
/* 193EF8 80265618 A623015A */ sh $v1, 0x15A($s1)
/* 193EFC 8026561C 92220191 */ lbu $v0, 0x191($s1)
/* 193F00 80265620 4600A006 */ mov.s $f0, $f20
/* 193F04 80265624 44821000 */ mtc1 $v0, $f2
/* 193F08 80265628 00000000 */ nop
/* 193F0C 8026562C 468010A0 */ cvt.s.w $f2, $f2
/* 193F10 80265630 82820023 */ lb $v0, 0x23($s4)
/* 193F14 80265634 46020001 */ sub.s $f0, $f0, $f2
/* 193F18 80265638 44821000 */ mtc1 $v0, $f2
/* 193F1C 8026563C 00000000 */ nop
/* 193F20 80265640 468010A0 */ cvt.s.w $f2, $f2
/* 193F24 80265644 46020001 */ sub.s $f0, $f0, $f2
/* 193F28 80265648 4600010D */ trunc.w.s $f4, $f0
/* 193F2C 8026564C 44022000 */ mfc1 $v0, $f4
/* 193F30 80265650 00000000 */ nop
/* 193F34 80265654 A6220158 */ sh $v0, 0x158($s1)
.L80265658:
/* 193F38 80265658 8E820014 */ lw $v0, 0x14($s4)
/* 193F3C 8026565C 92230136 */ lbu $v1, 0x136($s1)
/* 193F40 80265660 A2200210 */ sb $zero, 0x210($s1)
/* 193F44 80265664 A2200211 */ sb $zero, 0x211($s1)
/* 193F48 80265668 A2200212 */ sb $zero, 0x212($s1)
/* 193F4C 8026566C A2200213 */ sb $zero, 0x213($s1)
/* 193F50 80265670 A2200214 */ sb $zero, 0x214($s1)
/* 193F54 80265674 A2200215 */ sb $zero, 0x215($s1)
/* 193F58 80265678 A2200216 */ sb $zero, 0x216($s1)
/* 193F5C 8026567C A2200217 */ sb $zero, 0x217($s1)
/* 193F60 80265680 A2200218 */ sb $zero, 0x218($s1)
/* 193F64 80265684 A2200219 */ sb $zero, 0x219($s1)
/* 193F68 80265688 A2200220 */ sb $zero, 0x220($s1)
/* 193F6C 8026568C A620021E */ sh $zero, 0x21E($s1)
/* 193F70 80265690 A220021D */ sb $zero, 0x21D($s1)
/* 193F74 80265694 A2200221 */ sb $zero, 0x221($s1)
/* 193F78 80265698 A2200222 */ sb $zero, 0x222($s1)
/* 193F7C 8026569C A2200223 */ sb $zero, 0x223($s1)
/* 193F80 802656A0 A2200224 */ sb $zero, 0x224($s1)
/* 193F84 802656A4 A220021C */ sb $zero, 0x21C($s1)
/* 193F88 802656A8 AE22020C */ sw $v0, 0x20C($s1)
/* 193F8C 802656AC 000310C0 */ sll $v0, $v1, 3
/* 193F90 802656B0 00431023 */ subu $v0, $v0, $v1
/* 193F94 802656B4 00021080 */ sll $v0, $v0, 2
/* 193F98 802656B8 3C018028 */ lui $at, %hi(bActorSoundTable)
/* 193F9C 802656BC 00220821 */ addu $at, $at, $v0
/* 193FA0 802656C0 8C221468 */ lw $v0, %lo(bActorSoundTable)($at)
/* 193FA4 802656C4 AE22019C */ sw $v0, 0x19C($s1)
/* 193FA8 802656C8 000310C0 */ sll $v0, $v1, 3
/* 193FAC 802656CC 00431023 */ subu $v0, $v0, $v1
/* 193FB0 802656D0 00021080 */ sll $v0, $v0, 2
/* 193FB4 802656D4 3C018028 */ lui $at, %hi(bActorSoundTable + 0x4)
/* 193FB8 802656D8 00220821 */ addu $at, $at, $v0
/* 193FBC 802656DC 8C22146C */ lw $v0, %lo(bActorSoundTable + 0x4)($at)
/* 193FC0 802656E0 AE2201A0 */ sw $v0, 0x1A0($s1)
/* 193FC4 802656E4 000310C0 */ sll $v0, $v1, 3
/* 193FC8 802656E8 00431023 */ subu $v0, $v0, $v1
/* 193FCC 802656EC 00021080 */ sll $v0, $v0, 2
/* 193FD0 802656F0 3C018028 */ lui $at, %hi(bActorSoundTable + 0x8)
/* 193FD4 802656F4 00220821 */ addu $at, $at, $v0
/* 193FD8 802656F8 8C221470 */ lw $v0, %lo(bActorSoundTable + 0x8)($at)
/* 193FDC 802656FC AE2201A4 */ sw $v0, 0x1A4($s1)
/* 193FE0 80265700 000310C0 */ sll $v0, $v1, 3
/* 193FE4 80265704 00431023 */ subu $v0, $v0, $v1
/* 193FE8 80265708 00021080 */ sll $v0, $v0, 2
/* 193FEC 8026570C 3C018028 */ lui $at, %hi(bActorSoundTable + 0xC)
/* 193FF0 80265710 00220821 */ addu $at, $at, $v0
/* 193FF4 80265714 8C221474 */ lw $v0, %lo(bActorSoundTable + 0xC)($at)
/* 193FF8 80265718 AE2201A8 */ sw $v0, 0x1A8($s1)
/* 193FFC 8026571C 000310C0 */ sll $v0, $v1, 3
/* 194000 80265720 00431023 */ subu $v0, $v0, $v1
/* 194004 80265724 00021080 */ sll $v0, $v0, 2
/* 194008 80265728 3C018028 */ lui $at, %hi(bActorSoundTable + 0x10)
/* 19400C 8026572C 00220821 */ addu $at, $at, $v0
/* 194010 80265730 8C221478 */ lw $v0, %lo(bActorSoundTable + 0x10)($at)
/* 194014 80265734 AE2201AC */ sw $v0, 0x1AC($s1)
/* 194018 80265738 000310C0 */ sll $v0, $v1, 3
/* 19401C 8026573C 00431023 */ subu $v0, $v0, $v1
/* 194020 80265740 00021080 */ sll $v0, $v0, 2
/* 194024 80265744 3C018028 */ lui $at, %hi(bActorSoundTable + 0x14)
/* 194028 80265748 00220821 */ addu $at, $at, $v0
/* 19402C 8026574C 8C22147C */ lw $v0, %lo(bActorSoundTable + 0x14)($at)
/* 194030 80265750 AE2201B0 */ sw $v0, 0x1B0($s1)
/* 194034 80265754 000310C0 */ sll $v0, $v1, 3
/* 194038 80265758 00431023 */ subu $v0, $v0, $v1
/* 19403C 8026575C 00021080 */ sll $v0, $v0, 2
/* 194040 80265760 3C018028 */ lui $at, %hi(bActorSoundTable + 0x18)
/* 194044 80265764 00220821 */ addu $at, $at, $v0
/* 194048 80265768 94221480 */ lhu $v0, %lo(bActorSoundTable + 0x18)($at)
/* 19404C 8026576C 24100001 */ addiu $s0, $zero, 0x1
/* 194050 80265770 A62201B4 */ sh $v0, 0x1B4($s1)
/* 194054 80265774 000310C0 */ sll $v0, $v1, 3
/* 194058 80265778 00431023 */ subu $v0, $v0, $v1
/* 19405C 8026577C 00021080 */ sll $v0, $v0, 2
/* 194060 80265780 3C018028 */ lui $at, %hi(bActorSoundTable + 0x1A)
/* 194064 80265784 00220821 */ addu $at, $at, $v0
/* 194068 80265788 94221482 */ lhu $v0, %lo(bActorSoundTable + 0x1A)($at)
/* 19406C 8026578C 26230004 */ addiu $v1, $s1, 0x4
/* 194070 80265790 A62201B6 */ sh $v0, 0x1B6($s1)
.L80265794:
/* 194074 80265794 AC600438 */ sw $zero, 0x438($v1)
/* 194078 80265798 2610FFFF */ addiu $s0, $s0, -0x1
/* 19407C 8026579C 0601FFFD */ bgez $s0, .L80265794
/* 194080 802657A0 2463FFFC */ addiu $v1, $v1, -0x4
/* 194084 802657A4 8E62000C */ lw $v0, 0xC($s3)
/* 194088 802657A8 AE220088 */ sw $v0, 0x88($s1)
/* 19408C 802657AC 8E620010 */ lw $v0, 0x10($s3)
/* 194090 802657B0 AE22008C */ sw $v0, 0x8C($s1)
/* 194094 802657B4 8E620014 */ lw $v0, 0x14($s3)
/* 194098 802657B8 240400C4 */ addiu $a0, $zero, 0xC4
/* 19409C 802657BC AE220090 */ sw $v0, 0x90($s1)
/* 1940A0 802657C0 8E630018 */ lw $v1, 0x18($s3)
/* 1940A4 802657C4 2402000D */ addiu $v0, $zero, 0xD
/* 1940A8 802657C8 A6220434 */ sh $v0, 0x434($s1)
/* 1940AC 802657CC A2200208 */ sb $zero, 0x208($s1)
/* 1940B0 802657D0 0C00AB39 */ jal heap_malloc
/* 1940B4 802657D4 AE230094 */ sw $v1, 0x94($s1)
/* 1940B8 802657D8 0040802D */ daddu $s0, $v0, $zero
/* 1940BC 802657DC 16000003 */ bnez $s0, .L802657EC
/* 1940C0 802657E0 AE3001F4 */ sw $s0, 0x1F4($s1)
.L802657E4:
/* 1940C4 802657E4 080995F9 */ j .L802657E4
/* 1940C8 802657E8 00000000 */ nop
.L802657EC:
/* 1940CC 802657EC 1AC00106 */ blez $s6, .L80265C08
/* 1940D0 802657F0 0000982D */ daddu $s3, $zero, $zero
/* 1940D4 802657F4 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1940D8 802657F8 4481A000 */ mtc1 $at, $f20
/* 1940DC 802657FC 3C128028 */ lui $s2, %hi(bActorSoundTable)
/* 1940E0 80265800 26521468 */ addiu $s2, $s2, %lo(bActorSoundTable)
/* 1940E4 80265804 0260A82D */ daddu $s5, $s3, $zero
.L80265808:
/* 1940E8 80265808 8E82000C */ lw $v0, 0xC($s4)
/* 1940EC 8026580C AE0000C0 */ sw $zero, 0xC0($s0)
/* 1940F0 80265810 00551821 */ addu $v1, $v0, $s5
/* 1940F4 80265814 AE030008 */ sw $v1, 0x8($s0)
/* 1940F8 80265818 8C620000 */ lw $v0, 0x0($v1)
/* 1940FC 8026581C AE000004 */ sw $zero, 0x4($s0)
/* 194100 80265820 34420004 */ ori $v0, $v0, 0x4
/* 194104 80265824 AE020000 */ sw $v0, 0x0($s0)
/* 194108 80265828 90620005 */ lbu $v0, 0x5($v1)
/* 19410C 8026582C 00021600 */ sll $v0, $v0, 24
/* 194110 80265830 00021603 */ sra $v0, $v0, 24
/* 194114 80265834 A6020014 */ sh $v0, 0x14($s0)
/* 194118 80265838 00021400 */ sll $v0, $v0, 16
/* 19411C 8026583C 00021403 */ sra $v0, $v0, 16
/* 194120 80265840 44820000 */ mtc1 $v0, $f0
/* 194124 80265844 00000000 */ nop
/* 194128 80265848 46800020 */ cvt.s.w $f0, $f0
/* 19412C 8026584C E6000020 */ swc1 $f0, 0x20($s0)
/* 194130 80265850 90620006 */ lbu $v0, 0x6($v1)
/* 194134 80265854 00021600 */ sll $v0, $v0, 24
/* 194138 80265858 00021603 */ sra $v0, $v0, 24
/* 19413C 8026585C A6020016 */ sh $v0, 0x16($s0)
/* 194140 80265860 00021400 */ sll $v0, $v0, 16
/* 194144 80265864 00021403 */ sra $v0, $v0, 16
/* 194148 80265868 44820000 */ mtc1 $v0, $f0
/* 19414C 8026586C 00000000 */ nop
/* 194150 80265870 46800020 */ cvt.s.w $f0, $f0
/* 194154 80265874 E6000024 */ swc1 $f0, 0x24($s0)
/* 194158 80265878 90620007 */ lbu $v0, 0x7($v1)
/* 19415C 8026587C A600001A */ sh $zero, 0x1A($s0)
/* 194160 80265880 A600001C */ sh $zero, 0x1C($s0)
/* 194164 80265884 A600001E */ sh $zero, 0x1E($s0)
/* 194168 80265888 00021600 */ sll $v0, $v0, 24
/* 19416C 8026588C 00021603 */ sra $v0, $v0, 24
/* 194170 80265890 A6020018 */ sh $v0, 0x18($s0)
/* 194174 80265894 00021400 */ sll $v0, $v0, 16
/* 194178 80265898 00021403 */ sra $v0, $v0, 16
/* 19417C 8026589C 44820000 */ mtc1 $v0, $f0
/* 194180 802658A0 00000000 */ nop
/* 194184 802658A4 46800020 */ cvt.s.w $f0, $f0
/* 194188 802658A8 E6000028 */ swc1 $f0, 0x28($s0)
/* 19418C 802658AC C6200144 */ lwc1 $f0, 0x144($s1)
/* 194190 802658B0 E600002C */ swc1 $f0, 0x2C($s0)
/* 194194 802658B4 C6200148 */ lwc1 $f0, 0x148($s1)
/* 194198 802658B8 E6000030 */ swc1 $f0, 0x30($s0)
/* 19419C 802658BC C620014C */ lwc1 $f0, 0x14C($s1)
/* 1941A0 802658C0 E6000034 */ swc1 $f0, 0x34($s0)
/* 1941A4 802658C4 C6200144 */ lwc1 $f0, 0x144($s1)
/* 1941A8 802658C8 E6000058 */ swc1 $f0, 0x58($s0)
/* 1941AC 802658CC C6200148 */ lwc1 $f0, 0x148($s1)
/* 1941B0 802658D0 E600005C */ swc1 $f0, 0x5C($s0)
/* 1941B4 802658D4 C620014C */ lwc1 $f0, 0x14C($s1)
/* 1941B8 802658D8 E6000060 */ swc1 $f0, 0x60($s0)
/* 1941BC 802658DC 8C620010 */ lw $v0, 0x10($v1)
/* 1941C0 802658E0 AE020078 */ sw $v0, 0x78($s0)
/* 1941C4 802658E4 8C62000C */ lw $v0, 0xC($v1)
/* 1941C8 802658E8 AE020094 */ sw $v0, 0x94($s0)
/* 1941CC 802658EC 8C620014 */ lw $v0, 0x14($v1)
/* 1941D0 802658F0 AE02007C */ sw $v0, 0x7C($s0)
/* 1941D4 802658F4 8C620018 */ lw $v0, 0x18($v1)
/* 1941D8 802658F8 AE020080 */ sw $v0, 0x80($s0)
/* 1941DC 802658FC 9462000A */ lhu $v0, 0xA($v1)
/* 1941E0 80265900 A6020098 */ sh $v0, 0x98($s0)
/* 1941E4 80265904 00021400 */ sll $v0, $v0, 16
/* 1941E8 80265908 00021403 */ sra $v0, $v0, 16
/* 1941EC 8026590C 284200FF */ slti $v0, $v0, 0xFF
/* 1941F0 80265910 10400002 */ beqz $v0, .L8026591C
/* 1941F4 80265914 24020022 */ addiu $v0, $zero, 0x22
/* 1941F8 80265918 A6220434 */ sh $v0, 0x434($s1)
.L8026591C:
/* 1941FC 8026591C 92220191 */ lbu $v0, 0x191($s1)
/* 194200 80265920 A2020073 */ sb $v0, 0x73($s0)
/* 194204 80265924 92220190 */ lbu $v0, 0x190($s1)
/* 194208 80265928 AE000064 */ sw $zero, 0x64($s0)
/* 19420C 8026592C A2020072 */ sb $v0, 0x72($s0)
/* 194210 80265930 90620008 */ lbu $v0, 0x8($v1)
/* 194214 80265934 00021600 */ sll $v0, $v0, 24
/* 194218 80265938 00021603 */ sra $v0, $v0, 24
/* 19421C 8026593C A602006C */ sh $v0, 0x6C($s0)
/* 194220 80265940 90620009 */ lbu $v0, 0x9($v1)
/* 194224 80265944 A6000070 */ sh $zero, 0x70($s0)
/* 194228 80265948 00021600 */ sll $v0, $v0, 24
/* 19422C 8026594C 00021603 */ sra $v0, $v0, 24
/* 194230 80265950 A602006E */ sh $v0, 0x6E($s0)
/* 194234 80265954 9062001C */ lbu $v0, 0x1C($v1)
/* 194238 80265958 A2020075 */ sb $v0, 0x75($s0)
/* 19423C 8026595C 9063001D */ lbu $v1, 0x1D($v1)
/* 194240 80265960 24020001 */ addiu $v0, $zero, 0x1
/* 194244 80265964 AE000038 */ sw $zero, 0x38($s0)
/* 194248 80265968 AE00003C */ sw $zero, 0x3C($s0)
/* 19424C 8026596C AE000040 */ sw $zero, 0x40($s0)
/* 194250 80265970 A6000044 */ sh $zero, 0x44($s0)
/* 194254 80265974 A6000046 */ sh $zero, 0x46($s0)
/* 194258 80265978 A6000048 */ sh $zero, 0x48($s0)
/* 19425C 8026597C E614004C */ swc1 $f20, 0x4C($s0)
/* 194260 80265980 E6140050 */ swc1 $f20, 0x50($s0)
/* 194264 80265984 E6140054 */ swc1 $f20, 0x54($s0)
/* 194268 80265988 A2020074 */ sb $v0, 0x74($s0)
/* 19426C 8026598C A6000068 */ sh $zero, 0x68($s0)
/* 194270 80265990 A600006A */ sh $zero, 0x6A($s0)
/* 194274 80265994 A2030076 */ sb $v1, 0x76($s0)
/* 194278 80265998 92230136 */ lbu $v1, 0x136($s1)
/* 19427C 8026599C 000310C0 */ sll $v0, $v1, 3
/* 194280 802659A0 00431023 */ subu $v0, $v0, $v1
/* 194284 802659A4 00021080 */ sll $v0, $v0, 2
/* 194288 802659A8 00521021 */ addu $v0, $v0, $s2
/* 19428C 802659AC 8C420000 */ lw $v0, 0x0($v0)
/* 194290 802659B0 AE0200A4 */ sw $v0, 0xA4($s0)
/* 194294 802659B4 92230136 */ lbu $v1, 0x136($s1)
/* 194298 802659B8 000310C0 */ sll $v0, $v1, 3
/* 19429C 802659BC 00431023 */ subu $v0, $v0, $v1
/* 1942A0 802659C0 00021080 */ sll $v0, $v0, 2
/* 1942A4 802659C4 00521021 */ addu $v0, $v0, $s2
/* 1942A8 802659C8 8C420004 */ lw $v0, 0x4($v0)
/* 1942AC 802659CC AE0200A8 */ sw $v0, 0xA8($s0)
/* 1942B0 802659D0 92230136 */ lbu $v1, 0x136($s1)
/* 1942B4 802659D4 000310C0 */ sll $v0, $v1, 3
/* 1942B8 802659D8 00431023 */ subu $v0, $v0, $v1
/* 1942BC 802659DC 00021080 */ sll $v0, $v0, 2
/* 1942C0 802659E0 00521021 */ addu $v0, $v0, $s2
/* 1942C4 802659E4 8C420008 */ lw $v0, 0x8($v0)
/* 1942C8 802659E8 AE0200AC */ sw $v0, 0xAC($s0)
/* 1942CC 802659EC 92230136 */ lbu $v1, 0x136($s1)
/* 1942D0 802659F0 000310C0 */ sll $v0, $v1, 3
/* 1942D4 802659F4 00431023 */ subu $v0, $v0, $v1
/* 1942D8 802659F8 00021080 */ sll $v0, $v0, 2
/* 1942DC 802659FC 00521021 */ addu $v0, $v0, $s2
/* 1942E0 80265A00 8C42000C */ lw $v0, 0xC($v0)
/* 1942E4 80265A04 AE0200B0 */ sw $v0, 0xB0($s0)
/* 1942E8 80265A08 92230136 */ lbu $v1, 0x136($s1)
/* 1942EC 80265A0C 000310C0 */ sll $v0, $v1, 3
/* 1942F0 80265A10 00431023 */ subu $v0, $v0, $v1
/* 1942F4 80265A14 00021080 */ sll $v0, $v0, 2
/* 1942F8 80265A18 00521021 */ addu $v0, $v0, $s2
/* 1942FC 80265A1C 8C420010 */ lw $v0, 0x10($v0)
/* 194300 80265A20 AE0200B4 */ sw $v0, 0xB4($s0)
/* 194304 80265A24 92230136 */ lbu $v1, 0x136($s1)
/* 194308 80265A28 000310C0 */ sll $v0, $v1, 3
/* 19430C 80265A2C 00431023 */ subu $v0, $v0, $v1
/* 194310 80265A30 00021080 */ sll $v0, $v0, 2
/* 194314 80265A34 00521021 */ addu $v0, $v0, $s2
/* 194318 80265A38 8C420014 */ lw $v0, 0x14($v0)
/* 19431C 80265A3C AE0200B8 */ sw $v0, 0xB8($s0)
/* 194320 80265A40 92230136 */ lbu $v1, 0x136($s1)
/* 194324 80265A44 000310C0 */ sll $v0, $v1, 3
/* 194328 80265A48 00431023 */ subu $v0, $v0, $v1
/* 19432C 80265A4C 00021080 */ sll $v0, $v0, 2
/* 194330 80265A50 00521021 */ addu $v0, $v0, $s2
/* 194334 80265A54 94420018 */ lhu $v0, 0x18($v0)
/* 194338 80265A58 A60200BC */ sh $v0, 0xBC($s0)
/* 19433C 80265A5C 92230136 */ lbu $v1, 0x136($s1)
/* 194340 80265A60 000310C0 */ sll $v0, $v1, 3
/* 194344 80265A64 00431023 */ subu $v0, $v0, $v1
/* 194348 80265A68 00021080 */ sll $v0, $v0, 2
/* 19434C 80265A6C 00521021 */ addu $v0, $v0, $s2
/* 194350 80265A70 9442001A */ lhu $v0, 0x1A($v0)
/* 194354 80265A74 8E030094 */ lw $v1, 0x94($s0)
/* 194358 80265A78 10600034 */ beqz $v1, .L80265B4C
/* 19435C 80265A7C A60200BE */ sh $v0, 0xBE($s0)
/* 194360 80265A80 8E020000 */ lw $v0, 0x0($s0)
/* 194364 80265A84 30420002 */ andi $v0, $v0, 0x2
/* 194368 80265A88 14400030 */ bnez $v0, .L80265B4C
/* 19436C 80265A8C 00000000 */ nop
/* 194370 80265A90 0C00AB39 */ jal heap_malloc
/* 194374 80265A94 240408E8 */ addiu $a0, $zero, 0x8E8
/* 194378 80265A98 0040202D */ daddu $a0, $v0, $zero
/* 19437C 80265A9C 14800003 */ bnez $a0, .L80265AAC
/* 194380 80265AA0 AE0200C0 */ sw $v0, 0xC0($s0)
.L80265AA4:
/* 194384 80265AA4 080996A9 */ j .L80265AA4
/* 194388 80265AA8 00000000 */ nop
.L80265AAC:
/* 19438C 80265AAC 0000282D */ daddu $a1, $zero, $zero
/* 194390 80265AB0 0080182D */ daddu $v1, $a0, $zero
/* 194394 80265AB4 A08006C0 */ sb $zero, 0x6C0($a0)
/* 194398 80265AB8 A0800750 */ sb $zero, 0x750($a0)
/* 19439C 80265ABC A0800764 */ sb $zero, 0x764($a0)
/* 1943A0 80265AC0 A0800768 */ sb $zero, 0x768($a0)
/* 1943A4 80265AC4 A08007D8 */ sb $zero, 0x7D8($a0)
/* 1943A8 80265AC8 A08007D9 */ sb $zero, 0x7D9($a0)
.L80265ACC:
/* 1943AC 80265ACC C6200144 */ lwc1 $f0, 0x144($s1)
/* 1943B0 80265AD0 4600010D */ trunc.w.s $f4, $f0
/* 1943B4 80265AD4 44022000 */ mfc1 $v0, $f4
/* 1943B8 80265AD8 00000000 */ nop
/* 1943BC 80265ADC A46207FC */ sh $v0, 0x7FC($v1)
/* 1943C0 80265AE0 C6200148 */ lwc1 $f0, 0x148($s1)
/* 1943C4 80265AE4 4600010D */ trunc.w.s $f4, $f0
/* 1943C8 80265AE8 44022000 */ mfc1 $v0, $f4
/* 1943CC 80265AEC 00000000 */ nop
/* 1943D0 80265AF0 A462081C */ sh $v0, 0x81C($v1)
/* 1943D4 80265AF4 C620014C */ lwc1 $f0, 0x14C($s1)
/* 1943D8 80265AF8 24A50001 */ addiu $a1, $a1, 0x1
/* 1943DC 80265AFC 4600010D */ trunc.w.s $f4, $f0
/* 1943E0 80265B00 44022000 */ mfc1 $v0, $f4
/* 1943E4 80265B04 00000000 */ nop
/* 1943E8 80265B08 A462083C */ sh $v0, 0x83C($v1)
/* 1943EC 80265B0C 28A20010 */ slti $v0, $a1, 0x10
/* 1943F0 80265B10 1440FFEE */ bnez $v0, .L80265ACC
/* 1943F4 80265B14 24630002 */ addiu $v1, $v1, 0x2
/* 1943F8 80265B18 0000282D */ daddu $a1, $zero, $zero
/* 1943FC 80265B1C 0080182D */ daddu $v1, $a0, $zero
/* 194400 80265B20 24020003 */ addiu $v0, $zero, 0x3
/* 194404 80265B24 A08207DA */ sb $v0, 0x7DA($a0)
/* 194408 80265B28 A08007DB */ sb $zero, 0x7DB($a0)
/* 19440C 80265B2C A08008AC */ sb $zero, 0x8AC($a0)
.L80265B30:
/* 194410 80265B30 AC6008B0 */ sw $zero, 0x8B0($v1)
/* 194414 80265B34 00851021 */ addu $v0, $a0, $a1
/* 194418 80265B38 24A50001 */ addiu $a1, $a1, 0x1
/* 19441C 80265B3C A04008B8 */ sb $zero, 0x8B8($v0)
/* 194420 80265B40 28A20002 */ slti $v0, $a1, 0x2
/* 194424 80265B44 1440FFFA */ bnez $v0, .L80265B30
/* 194428 80265B48 24630004 */ addiu $v1, $v1, 0x4
.L80265B4C:
/* 19442C 80265B4C 8E020000 */ lw $v0, 0x0($s0)
/* 194430 80265B50 04400007 */ bltz $v0, .L80265B70
/* 194434 80265B54 00000000 */ nop
/* 194438 80265B58 0C00AB39 */ jal heap_malloc
/* 19443C 80265B5C 2404008C */ addiu $a0, $zero, 0x8C
/* 194440 80265B60 14400003 */ bnez $v0, .L80265B70
/* 194444 80265B64 AE020010 */ sw $v0, 0x10($s0)
.L80265B68:
/* 194448 80265B68 080996DA */ j .L80265B68
/* 19444C 80265B6C 00000000 */ nop
.L80265B70:
/* 194450 80265B70 8E220000 */ lw $v0, 0x0($s1)
/* 194454 80265B74 30424000 */ andi $v0, $v0, 0x4000
/* 194458 80265B78 10400004 */ beqz $v0, .L80265B8C
/* 19445C 80265B7C 00000000 */ nop
/* 194460 80265B80 8E020000 */ lw $v0, 0x0($s0)
/* 194464 80265B84 34424000 */ ori $v0, $v0, 0x4000
/* 194468 80265B88 AE020000 */ sw $v0, 0x0($s0)
.L80265B8C:
/* 19446C 80265B8C 8E040094 */ lw $a0, 0x94($s0)
/* 194470 80265B90 2402FFFF */ addiu $v0, $zero, -0x1
/* 194474 80265B94 E6140090 */ swc1 $f20, 0x90($s0)
/* 194478 80265B98 AE000088 */ sw $zero, 0x88($s0)
/* 19447C 80265B9C 1080000A */ beqz $a0, .L80265BC8
/* 194480 80265BA0 AE020084 */ sw $v0, 0x84($s0)
/* 194484 80265BA4 0C09973A */ jal get_npc_anim_for_status
/* 194488 80265BA8 24050001 */ addiu $a1, $zero, 0x1
/* 19448C 80265BAC 3C037FFF */ lui $v1, (0x7FFFFFFF >> 16)
/* 194490 80265BB0 3463FFFF */ ori $v1, $v1, (0x7FFFFFFF & 0xFFFF)
/* 194494 80265BB4 00432024 */ and $a0, $v0, $v1
/* 194498 80265BB8 0000282D */ daddu $a1, $zero, $zero
/* 19449C 80265BBC 0C0B783B */ jal spr_load_npc_sprite
/* 1944A0 80265BC0 AE040088 */ sw $a0, 0x88($s0)
/* 1944A4 80265BC4 AE020084 */ sw $v0, 0x84($s0)
.L80265BC8:
/* 1944A8 80265BC8 26620001 */ addiu $v0, $s3, 0x1
/* 1944AC 80265BCC 0056102A */ slt $v0, $v0, $s6
/* 1944B0 80265BD0 50400009 */ beql $v0, $zero, .L80265BF8
/* 1944B4 80265BD4 AE00000C */ sw $zero, 0xC($s0)
/* 1944B8 80265BD8 0C00AB39 */ jal heap_malloc
/* 1944BC 80265BDC 240400C4 */ addiu $a0, $zero, 0xC4
/* 1944C0 80265BE0 AE02000C */ sw $v0, 0xC($s0)
/* 1944C4 80265BE4 0040802D */ daddu $s0, $v0, $zero
/* 1944C8 80265BE8 56000003 */ bnel $s0, $zero, .L80265BF8
/* 1944CC 80265BEC AE00000C */ sw $zero, 0xC($s0)
.L80265BF0:
/* 1944D0 80265BF0 080996FC */ j .L80265BF0
/* 1944D4 80265BF4 00000000 */ nop
.L80265BF8:
/* 1944D8 80265BF8 26730001 */ addiu $s3, $s3, 0x1
/* 1944DC 80265BFC 0276102A */ slt $v0, $s3, $s6
/* 1944E0 80265C00 1440FF01 */ bnez $v0, .L80265808
/* 1944E4 80265C04 26B50024 */ addiu $s5, $s5, 0x24
.L80265C08:
/* 1944E8 80265C08 2405000A */ addiu $a1, $zero, 0xA
/* 1944EC 80265C0C 0000302D */ daddu $a2, $zero, $zero
/* 1944F0 80265C10 8E2401C4 */ lw $a0, 0x1C4($s1)
/* 1944F4 80265C14 922201F2 */ lbu $v0, 0x1F2($s1)
/* 1944F8 80265C18 24030019 */ addiu $v1, $zero, 0x19
/* 1944FC 80265C1C A22301BC */ sb $v1, 0x1BC($s1)
/* 194500 80265C20 00021600 */ sll $v0, $v0, 24
/* 194504 80265C24 00021603 */ sra $v0, $v0, 24
/* 194508 80265C28 34420200 */ ori $v0, $v0, 0x200
/* 19450C 80265C2C 0C0B0CF8 */ jal start_script
/* 194510 80265C30 A6220192 */ sh $v0, 0x192($s1)
/* 194514 80265C34 822301F2 */ lb $v1, 0x1F2($s1)
/* 194518 80265C38 8C440144 */ lw $a0, 0x144($v0)
/* 19451C 80265C3C 34630200 */ ori $v1, $v1, 0x200
/* 194520 80265C40 AE2401E4 */ sw $a0, 0x1E4($s1)
/* 194524 80265C44 AC430148 */ sw $v1, 0x148($v0)
/* 194528 80265C48 8E250144 */ lw $a1, 0x144($s1)
/* 19452C 80265C4C 8E260148 */ lw $a2, 0x148($s1)
/* 194530 80265C50 8E27014C */ lw $a3, 0x14C($s1)
/* 194534 80265C54 0C044898 */ jal create_shadow_type
/* 194538 80265C58 0000202D */ daddu $a0, $zero, $zero
/* 19453C 80265C5C 3C05C30E */ lui $a1, (0xC30E0000 >> 16)
/* 194540 80265C60 3C064208 */ lui $a2, (0x42080000 >> 16)
/* 194544 80265C64 3C073F80 */ lui $a3, (0x3F800000 >> 16)
/* 194548 80265C68 0000202D */ daddu $a0, $zero, $zero
/* 19454C 80265C6C AE22042C */ sw $v0, 0x42C($s1)
/* 194550 80265C70 92220190 */ lbu $v0, 0x190($s1)
/* 194554 80265C74 3C014038 */ lui $at, (0x40380000 >> 16)
/* 194558 80265C78 44811800 */ mtc1 $at, $f3
/* 19455C 80265C7C 44801000 */ mtc1 $zero, $f2
/* 194560 80265C80 44820000 */ mtc1 $v0, $f0
/* 194564 80265C84 00000000 */ nop
/* 194568 80265C88 46800021 */ cvt.d.w $f0, $f0
/* 19456C 80265C8C 46220003 */ div.d $f0, $f0, $f2
/* 194570 80265C90 46200020 */ cvt.s.d $f0, $f0
/* 194574 80265C94 E6200430 */ swc1 $f0, 0x430($s1)
/* 194578 80265C98 0C01C43C */ jal fx_disable_x
/* 19457C 80265C9C AFA00010 */ sw $zero, 0x10($sp)
/* 194580 80265CA0 AE220440 */ sw $v0, 0x440($s1)
/* 194584 80265CA4 0C011D82 */ jal create_status_icon_set
/* 194588 80265CA8 AE200228 */ sw $zero, 0x228($s1)
/* 19458C 80265CAC A6220436 */ sh $v0, 0x436($s1)
/* 194590 80265CB0 0220102D */ daddu $v0, $s1, $zero
/* 194594 80265CB4 8FBF0034 */ lw $ra, 0x34($sp)
/* 194598 80265CB8 8FB60030 */ lw $s6, 0x30($sp)
/* 19459C 80265CBC 8FB5002C */ lw $s5, 0x2C($sp)
/* 1945A0 80265CC0 8FB40028 */ lw $s4, 0x28($sp)
/* 1945A4 80265CC4 8FB30024 */ lw $s3, 0x24($sp)
/* 1945A8 80265CC8 8FB20020 */ lw $s2, 0x20($sp)
/* 1945AC 80265CCC 8FB1001C */ lw $s1, 0x1C($sp)
/* 1945B0 80265CD0 8FB00018 */ lw $s0, 0x18($sp)
/* 1945B4 80265CD4 D7B80048 */ ldc1 $f24, 0x48($sp)
/* 1945B8 80265CD8 D7B60040 */ ldc1 $f22, 0x40($sp)
/* 1945BC 80265CDC D7B40038 */ ldc1 $f20, 0x38($sp)
/* 1945C0 80265CE0 03E00008 */ jr $ra
/* 1945C4 80265CE4 27BD0050 */ addiu $sp, $sp, 0x50
### DECOMPILED C INSTRUCTIONS:
Actor* create_actor(Formation formation) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* actor;
ActorBlueprint* formationActor;
ActorPart* part;
ActorPartBlueprint* partBP;
Evt* takeTurnScript;
s32 partCount;
f32 x, y, z;
DecorationTable* decorationTable;
s32 i, j, k;
if (formation->home.index >= EVT_LIMIT) {
x = btl_actorHomePositions[formation->home.index].x;
y = btl_actorHomePositions[formation->home.index].y;
z = btl_actorHomePositions[formation->home.index].z;
} else {
x = formation->home.vec->x;
y = formation->home.vec->y;
z = formation->home.vec->z;
}
formationActor = formation->actor;
partCount = formationActor->partCount;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
if (battleStatus->enemyActors[i] == NULL) {
break;
}
}
actor = battleStatus->enemyActors[i] = heap_malloc(sizeof(*actor));
ASSERT(actor != NULL);
actor->unk_134 = battleStatus->unk_93++;
actor->footStepCounter = 0;
actor->actorBlueprint = formationActor;
actor->actorType = formationActor->type;
actor->flags = formationActor->flags;
actor->homePos.x = actor->currentPos.x = x;
actor->homePos.y = actor->currentPos.y = y;
actor->homePos.z = actor->currentPos.z = z;
actor->headOffset.x = 0;
actor->headOffset.y = 0;
actor->headOffset.z = 0;
actor->maxHP = actor->currentHP = formationActor->maxHP;
actor->numParts = partCount;
actor->idleSource = NULL;
actor->takeTurnSource = formationActor->initScript;
actor->handleEventSource = NULL;
actor->handlePhaseSource = NULL;
actor->idleScript = NULL;
actor->takeTurnScript = NULL;
actor->handleEventScript = NULL;
actor->turnPriority = formation->priority;
actor->enemyIndex = i;
actor->yaw = 0.0f;
actor->rotation.x = 0.0f;
actor->rotation.y = 0.0f;
actor->rotation.z = 0.0f;
actor->rotationPivotOffset.x = 0;
actor->rotationPivotOffset.y = 0;
actor->rotationPivotOffset.z = 0;
actor->scale.x = 1.0f;
actor->scale.y = 1.0f;
actor->scale.z = 1.0f;
actor->scaleModifier.x = 1.0f;
actor->scaleModifier.y = 1.0f;
actor->scaleModifier.z = 1.0f;
actor->verticalRenderOffset = 0;
actor->extraCoinBonus = 0;
actor->size.x = formationActor->size.x;
actor->size.y = formationActor->size.y;
actor->scalingFactor = 1.0f;
actor->statusIconOffset.x = 0;
actor->statusIconOffset.y = 0;
actor->statusTextOffset.x = 0;
actor->statusTextOffset.y = 0;
actor->healthBarOffset.x = 0;
actor->healthBarOffset.y = 0;
actor->healthBarHideTime = 0;
actor->attackResultEffect = NULL;
actor->actionRatingCombo = 0;
actor->actionRatingTime = 0;
actor->healthBarPos.x = actor->currentPos.x + formationActor->healthBarOffset.x;
actor->healthBarPos.y = actor->currentPos.y + formationActor->healthBarOffset.y;
actor->healthBarPos.z = actor->currentPos.z;
if (actor->flags & ACTOR_FLAG_UPSIDE_DOWN) {
actor->healthBarPos.y = actor->currentPos.y - actor->size.y - formationActor->healthBarOffset.y;
}
actor->statusTable = formationActor->statusTable;
actor->debuff = 0;
actor->debuffDuration = 0;
actor->staticStatus = 0;
actor->staticDuration = 0;
actor->stoneStatus = 0;
actor->stoneDuration = 0;
actor->koStatus = 0;
actor->koDuration = 0;
actor->transparentStatus = 0;
actor->transparentDuration = 0;
actor->isGlowing = 0;
actor->unk_21E = 0;
actor->disableDismissTimer = 0;
actor->attackBoost = 0;
actor->defenseBoost = 0;
actor->chillOutAmount = 0;
actor->chillOutTurns = 0;
actor->statusAfflicted = 0;
actor->actorTypeData1[0] = bActorSoundTable[actor->actorType].walk[0];
actor->actorTypeData1[1] = bActorSoundTable[actor->actorType].walk[1];
actor->actorTypeData1[2] = bActorSoundTable[actor->actorType].fly[0];
actor->actorTypeData1[3] = bActorSoundTable[actor->actorType].fly[1];
actor->actorTypeData1[4] = bActorSoundTable[actor->actorType].jump;
actor->actorTypeData1[5] = bActorSoundTable[actor->actorType].hurt;
actor->actorTypeData1b[0] = bActorSoundTable[actor->actorType].delay[0];
actor->actorTypeData1b[1] = bActorSoundTable[actor->actorType].delay[1];
for (i = 0; i < ARRAY_COUNT(actor->loopingSoundID); i++) {
actor->loopingSoundID[i] = 0;
}
actor->state.varTable[0] = formation->var0;
actor->state.varTable[1] = formation->var1;
actor->state.varTable[2] = formation->var2;
actor->state.varTable[3] = formation->var3;
actor->renderMode = RENDER_MODE_ALPHATEST;
actor->instigatorValue = 0;
part = heap_malloc(sizeof(*part));
actor->partsTable = part;
ASSERT(part != NULL);
for (j = 0; j < partCount; j++) {
ActorPartBlueprint* actorPartBP = &formationActor->partsData[j];
part->decorationTable = NULL;
part->staticData = actorPartBP;
part->flags = actorPartBP->flags | ACTOR_PART_FLAG_4;
part->targetFlags = 0;
part->partOffsetFloat.x = part->partOffset.x = actorPartBP->posOffset.x;
part->partOffsetFloat.y = part->partOffset.y = actorPartBP->posOffset.y;
part->partOffsetFloat.z = part->partOffset.z = actorPartBP->posOffset.z;
part->visualOffset.x = 0;
part->visualOffset.y = 0;
part->visualOffset.z = 0;
part->absolutePosition.x = actor->currentPos.x;
part->absolutePosition.y = actor->currentPos.y;
part->absolutePosition.z = actor->currentPos.z;
part->currentPos.x = actor->currentPos.x;
part->currentPos.y = actor->currentPos.y;
part->currentPos.z = actor->currentPos.z;
part->defenseTable = actorPartBP->defenseTable;
part->idleAnimations = actorPartBP->idleAnimations;
part->eventFlags = actorPartBP->eventFlags;
part->elementalImmunities = actorPartBP->elementImmunityFlags;
part->opacity = actorPartBP->opacity;
if (part->opacity < 255) {
actor->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3;
}
part->size.y = actor->size.y;
part->size.x = actor->size.x;
part->yaw = 0.0f;
part->targetOffset.x = actorPartBP->targetOffset.x;
part->targetOffset.y = actorPartBP->targetOffset.y;
part->unk_70 = 0;
part->projectileTargetOffset.x = actorPartBP->projectileTargetOffset.x;
part->projectileTargetOffset.y = actorPartBP->projectileTargetOffset.y;
part->rotation.x = 0.0f;
part->rotation.y = 0.0f;
part->rotation.z = 0.0f;
part->rotationPivotOffset.x = 0;
part->rotationPivotOffset.y = 0;
part->rotationPivotOffset.z = 0;
part->scale.x = 1.0f;
part->scale.y = 1.0f;
part->scale.z = 1.0f;
part->verticalStretch = 1;
part->palAnimPosOffset[0] = 0;
part->palAnimPosOffset[1] = 0;
part->partTypeData[0] = bActorSoundTable[actor->actorType].walk[0];
part->partTypeData[1] = bActorSoundTable[actor->actorType].walk[1];
part->partTypeData[2] = bActorSoundTable[actor->actorType].fly[0];
part->partTypeData[3] = bActorSoundTable[actor->actorType].fly[1];
part->partTypeData[4] = bActorSoundTable[actor->actorType].jump;
part->partTypeData[5] = bActorSoundTable[actor->actorType].hurt;
part->actorTypeData2b[0] = bActorSoundTable[actor->actorType].delay[0];
part->actorTypeData2b[1] = bActorSoundTable[actor->actorType].delay[1];
if (part->idleAnimations != NULL && !(part->flags & ACTOR_PART_FLAG_2)) {
part->decorationTable = heap_malloc(sizeof(*decorationTable));
decorationTable = part->decorationTable;
ASSERT(decorationTable != NULL);
decorationTable->paletteAdjustment = PAL_ADJUST_NONE;
decorationTable->unk_750 = 0;
decorationTable->unk_764 = 0;
decorationTable->unk_768 = 0;
decorationTable->unk_7D8 = 0;
decorationTable->unk_7D9 = 0;
for (k = 0; k < ARRAY_COUNT(decorationTable->posX); k++) {
decorationTable->posX[k] = actor->currentPos.x;
decorationTable->posY[k] = actor->currentPos.y;
decorationTable->posZ[k] = actor->currentPos.z;
}
decorationTable->unk_7DA = 3;
decorationTable->unk_7DB = 0;
decorationTable->effectType = 0;
for (k = 0; k < ARRAY_COUNT(decorationTable->effect); k++) {
decorationTable->effect[k] = NULL;
decorationTable->type[k] = 0;
}
}
if (part->flags >= 0) {
part->movement = heap_malloc(sizeof(*part->movement));
ASSERT(part->movement != NULL);
}
if (actor->flags & ACTOR_FLAG_TARGET_ONLY) {
part->flags |= ACTOR_PART_FLAG_4000;
}
part->animationRate = 1.0f;
part->currentAnimation = 0;
part->spriteInstanceID = -1;
if (part->idleAnimations != NULL) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, 1) & ~SPRITE_ID_TAIL_ALLOCATE;
part->spriteInstanceID = spr_load_npc_sprite(part->currentAnimation, NULL);
}
if (j + 1 >= partCount) {
part->nextPart = NULL;
continue;
}
part->nextPart = heap_malloc(sizeof(*part->nextPart));
part = part->nextPart;
if (part == NULL) {
PANIC();
}
part->nextPart = NULL;
}
actor->healthFraction = 25;
actor->actorID = actor->enemyIndex | ACTOR_CLASS_ENEMY;
takeTurnScript = start_script(actor->takeTurnSource, EVT_PRIORITY_A, 0);
actor->takeTurnScriptID = takeTurnScript->id;
takeTurnScript->owner1.enemyID = actor->enemyIndex | ACTOR_CLASS_ENEMY;
actor->shadow.id = create_shadow_type(0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
actor->shadowScale = actor->size.x / 24.0;
actor->disableEffect = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0);
actor->icePillarEffect = NULL;
actor->hudElementDataIndex = create_status_icon_set();
return actor;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_80249970
/* 13CCB0 80249970 27BDFF58 */ addiu $sp, $sp, -0xA8
/* 13CCB4 80249974 3C038027 */ lui $v1, %hi(gPauseItemsCurrentPage)
/* 13CCB8 80249978 8C6304C8 */ lw $v1, %lo(gPauseItemsCurrentPage)($v1)
glabel func_8024997C
/* 13CCBC 8024997C 240A0001 */ addiu $t2, $zero, 0x1
D_80249980:
/* 13CCC0 80249980 AFA500AC */ sw $a1, 0xAC($sp)
D_80249984:
/* 13CCC4 80249984 AFAA0060 */ sw $t2, 0x60($sp)
D_80249988:
/* 13CCC8 80249988 8FAA00AC */ lw $t2, 0xAC($sp)
/* 13CCCC 8024998C AFA600B0 */ sw $a2, 0xB0($sp)
/* 13CCD0 80249990 AFA700B4 */ sw $a3, 0xB4($sp)
/* 13CCD4 80249994 8FA700B0 */ lw $a3, 0xB0($sp)
/* 13CCD8 80249998 240B000A */ addiu $t3, $zero, 0xA
/* 13CCDC 8024999C AFAB0064 */ sw $t3, 0x64($sp)
/* 13CCE0 802499A0 8FAB00B4 */ lw $t3, 0xB4($sp)
/* 13CCE4 802499A4 AFBF00A4 */ sw $ra, 0xA4($sp)
D_802499A8:
/* 13CCE8 802499A8 AFBE00A0 */ sw $fp, 0xA0($sp)
/* 13CCEC 802499AC AFB7009C */ sw $s7, 0x9C($sp)
/* 13CCF0 802499B0 AFB60098 */ sw $s6, 0x98($sp)
/* 13CCF4 802499B4 AFB50094 */ sw $s5, 0x94($sp)
/* 13CCF8 802499B8 AFB40090 */ sw $s4, 0x90($sp)
.L802499BC:
/* 13CCFC 802499BC AFB3008C */ sw $s3, 0x8C($sp)
/* 13CD00 802499C0 AFB20088 */ sw $s2, 0x88($sp)
/* 13CD04 802499C4 AFB10084 */ sw $s1, 0x84($sp)
/* 13CD08 802499C8 AFB00080 */ sw $s0, 0x80($sp)
.L802499CC:
/* 13CD0C 802499CC 25460044 */ addiu $a2, $t2, 0x44
/* 13CD10 802499D0 00031040 */ sll $v0, $v1, 1
/* 13CD14 802499D4 00431021 */ addu $v0, $v0, $v1
/* 13CD18 802499D8 00021080 */ sll $v0, $v0, 2
/* 13CD1C 802499DC 3C088027 */ lui $t0, %hi(D_802704D2)
/* 13CD20 802499E0 01024021 */ addu $t0, $t0, $v0
/* 13CD24 802499E4 910804D2 */ lbu $t0, %lo(D_802704D2)($t0)
/* 13CD28 802499E8 8FAA00B8 */ lw $t2, 0xB8($sp)
.L802499EC:
/* 13CD2C 802499EC 2562FFBC */ addiu $v0, $t3, -0x44
/* 13CD30 802499F0 AFA20014 */ sw $v0, 0x14($sp)
/* 13CD34 802499F4 240200FF */ addiu $v0, $zero, 0xFF
/* 13CD38 802499F8 AFA00010 */ sw $zero, 0x10($sp)
D_802499FC:
/* 13CD3C 802499FC AFA2001C */ sw $v0, 0x1C($sp)
/* 13CD40 80249A00 AFA00020 */ sw $zero, 0x20($sp)
/* 13CD44 80249A04 AFA00024 */ sw $zero, 0x24($sp)
.L80249A08:
/* 13CD48 80249A08 AFA00028 */ sw $zero, 0x28($sp)
/* 13CD4C 80249A0C AFA0002C */ sw $zero, 0x2C($sp)
/* 13CD50 80249A10 AFA00030 */ sw $zero, 0x30($sp)
/* 13CD54 80249A14 AFA00034 */ sw $zero, 0x34($sp)
/* 13CD58 80249A18 AFA00038 */ sw $zero, 0x38($sp)
/* 13CD5C 80249A1C AFA0003C */ sw $zero, 0x3C($sp)
.L80249A20:
/* 13CD60 80249A20 AFAA0018 */ sw $t2, 0x18($sp)
/* 13CD64 80249A24 AFA00040 */ sw $zero, 0x40($sp)
/* 13CD68 80249A28 3C038027 */ lui $v1, %hi(gPauseItemsSelectedIndex)
/* 13CD6C 80249A2C 8C6305C0 */ lw $v1, %lo(gPauseItemsSelectedIndex)($v1)
/* 13CD70 80249A30 15000002 */ bnez $t0, .L80249A3C
/* 13CD74 80249A34 0068001A */ div $zero, $v1, $t0
/* 13CD78 80249A38 0007000D */ break 7
.L80249A3C:
/* 13CD7C 80249A3C 2401FFFF */ addiu $at, $zero, -0x1
/* 13CD80 80249A40 15010004 */ bne $t0, $at, .L80249A54
/* 13CD84 80249A44 3C018000 */ lui $at, (0x80000000 >> 16)
D_80249A48:
/* 13CD88 80249A48 14610002 */ bne $v1, $at, .L80249A54
D_80249A4C:
/* 13CD8C 80249A4C 00000000 */ nop
.L80249A50:
/* 13CD90 80249A50 0006000D */ break 6
.L80249A54:
/* 13CD94 80249A54 00005012 */ mflo $t2
/* 13CD98 80249A58 00005810 */ mfhi $t3
D_80249A5C:
/* 13CD9C 80249A5C 24040004 */ addiu $a0, $zero, 0x4
/* 13CDA0 80249A60 3C058027 */ lui $a1, %hi(gPauseWS_18)
/* 13CDA4 80249A64 24A5FCF0 */ addiu $a1, $a1, %lo(gPauseWS_18)
/* 13CDA8 80249A68 24020140 */ addiu $v0, $zero, 0x140
D_80249A6C:
/* 13CDAC 80249A6C AFA20044 */ sw $v0, 0x44($sp)
D_80249A70:
/* 13CDB0 80249A70 240200F0 */ addiu $v0, $zero, 0xF0
D_80249A74:
/* 13CDB4 80249A74 AFA20048 */ sw $v0, 0x48($sp)
D_80249A78:
/* 13CDB8 80249A78 AFA0004C */ sw $zero, 0x4C($sp)
D_80249A7C:
/* 13CDBC 80249A7C AFAA005C */ sw $t2, 0x5C($sp)
D_80249A80:
/* 13CDC0 80249A80 0C03D4B8 */ jal draw_box
D_80249A84:
/* 13CDC4 80249A84 AFAB0058 */ sw $t3, 0x58($sp)
D_80249A88:
/* 13CDC8 80249A88 3C108027 */ lui $s0, %hi(gPauseItemsPages)
D_80249A8C:
/* 13CDCC 80249A8C 261004D0 */ addiu $s0, $s0, %lo(gPauseItemsPages)
D_80249A90:
/* 13CDD0 80249A90 8FAB00B0 */ lw $t3, 0xB0($sp)
D_80249A94:
/* 13CDD4 80249A94 8FAA00AC */ lw $t2, 0xAC($sp)
D_80249A98:
/* 13CDD8 80249A98 25660007 */ addiu $a2, $t3, 0x7
D_80249A9C:
/* 13CDDC 80249A9C 8FAB00B4 */ lw $t3, 0xB4($sp)
D_80249AA0:
/* 13CDE0 80249AA0 25440001 */ addiu $a0, $t2, 0x1
D_80249AA4:
/* 13CDE4 80249AA4 014B1021 */ addu $v0, $t2, $t3
/* 13CDE8 80249AA8 8FAA00B0 */ lw $t2, 0xB0($sp)
/* 13CDEC 80249AAC 8FAB00B8 */ lw $t3, 0xB8($sp)
/* 13CDF0 80249AB0 2447FFFF */ addiu $a3, $v0, -0x1
/* 13CDF4 80249AB4 014B1021 */ addu $v0, $t2, $t3
glabel func_80249AB8
/* 13CDF8 80249AB8 1C800002 */ bgtz $a0, .L80249AC4
D_80249ABC:
/* 13CDFC 80249ABC 2448FFF9 */ addiu $t0, $v0, -0x7
/* 13CE00 80249AC0 24040001 */ addiu $a0, $zero, 0x1
.L80249AC4:
/* 13CE04 80249AC4 58C00001 */ blezl $a2, .L80249ACC
/* 13CE08 80249AC8 24060001 */ addiu $a2, $zero, 0x1
.L80249ACC:
/* 13CE0C 80249ACC 18E00277 */ blez $a3, .L8024A4AC
/* 13CE10 80249AD0 00000000 */ nop
/* 13CE14 80249AD4 19000275 */ blez $t0, .L8024A4AC
/* 13CE18 80249AD8 2882013F */ slti $v0, $a0, 0x13F
/* 13CE1C 80249ADC 10400273 */ beqz $v0, .L8024A4AC
D_80249AE0:
/* 13CE20 80249AE0 28C200EF */ slti $v0, $a2, 0xEF
/* 13CE24 80249AE4 10400271 */ beqz $v0, .L8024A4AC
/* 13CE28 80249AE8 28E2013F */ slti $v0, $a3, 0x13F
/* 13CE2C 80249AEC 50400001 */ beql $v0, $zero, .L80249AF4
/* 13CE30 80249AF0 2407013F */ addiu $a3, $zero, 0x13F
.L80249AF4:
/* 13CE34 80249AF4 290200EF */ slti $v0, $t0, 0xEF
/* 13CE38 80249AF8 50400001 */ beql $v0, $zero, .L80249B00
/* 13CE3C 80249AFC 240800EF */ addiu $t0, $zero, 0xEF
.L80249B00:
/* 13CE40 80249B00 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* 13CE44 80249B04 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* 13CE48 80249B08 44841000 */ mtc1 $a0, $f2
/* 13CE4C 80249B0C 00000000 */ nop
D_80249B10:
/* 13CE50 80249B10 468010A0 */ cvt.s.w $f2, $f2
.L80249B14:
/* 13CE54 80249B14 44860000 */ mtc1 $a2, $f0
/* 13CE58 80249B18 00000000 */ nop
/* 13CE5C 80249B1C 46800020 */ cvt.s.w $f0, $f0
/* 13CE60 80249B20 8FAA00AC */ lw $t2, 0xAC($sp)
/* 13CE64 80249B24 8FAB00B0 */ lw $t3, 0xB0($sp)
/* 13CE68 80249B28 3C014080 */ lui $at, (0x40800000 >> 16)
.L80249B2C:
/* 13CE6C 80249B2C 44812000 */ mtc1 $at, $f4
.L80249B30:
/* 13CE70 80249B30 3C04ED00 */ lui $a0, (0xED000000 >> 16)
D_80249B34:
/* 13CE74 80249B34 AFA00054 */ sw $zero, 0x54($sp)
.L80249B38:
/* 13CE78 80249B38 AFA00050 */ sw $zero, 0x50($sp)
/* 13CE7C 80249B3C 254A0077 */ addiu $t2, $t2, 0x77
/* 13CE80 80249B40 46041082 */ mul.s $f2, $f2, $f4
/* 13CE84 80249B44 00000000 */ nop
.L80249B48:
/* 13CE88 80249B48 256B0011 */ addiu $t3, $t3, 0x11
/* 13CE8C 80249B4C AFAA006C */ sw $t2, 0x6C($sp)
/* 13CE90 80249B50 AFAB0070 */ sw $t3, 0x70($sp)
/* 13CE94 80249B54 8C620000 */ lw $v0, 0x0($v1)
.L80249B58:
/* 13CE98 80249B58 46040002 */ mul.s $f0, $f0, $f4
/* 13CE9C 80249B5C 00000000 */ nop
/* 13CEA0 80249B60 0040282D */ daddu $a1, $v0, $zero
/* 13CEA4 80249B64 24420008 */ addiu $v0, $v0, 0x8
/* 13CEA8 80249B68 AC620000 */ sw $v0, 0x0($v1)
/* 13CEAC 80249B6C 4600118D */ trunc.w.s $f6, $f2
/* 13CEB0 80249B70 44023000 */ mfc1 $v0, $f6
/* 13CEB4 80249B74 00000000 */ nop
/* 13CEB8 80249B78 30420FFF */ andi $v0, $v0, 0xFFF
/* 13CEBC 80249B7C 00021300 */ sll $v0, $v0, 12
D_80249B80:
/* 13CEC0 80249B80 4600018D */ trunc.w.s $f6, $f0
D_80249B84:
/* 13CEC4 80249B84 44033000 */ mfc1 $v1, $f6
D_80249B88:
/* 13CEC8 80249B88 44871000 */ mtc1 $a3, $f2
D_80249B8C:
/* 13CECC 80249B8C 00000000 */ nop
D_80249B90:
/* 13CED0 80249B90 468010A0 */ cvt.s.w $f2, $f2
D_80249B94:
/* 13CED4 80249B94 46041082 */ mul.s $f2, $f2, $f4
D_80249B98:
/* 13CED8 80249B98 00000000 */ nop
D_80249B9C:
/* 13CEDC 80249B9C 30630FFF */ andi $v1, $v1, 0xFFF
D_80249BA0:
/* 13CEE0 80249BA0 00641825 */ or $v1, $v1, $a0
D_80249BA4:
/* 13CEE4 80249BA4 00431025 */ or $v0, $v0, $v1
D_80249BA8:
/* 13CEE8 80249BA8 44880000 */ mtc1 $t0, $f0
D_80249BAC:
/* 13CEEC 80249BAC 00000000 */ nop
D_80249BB0:
/* 13CEF0 80249BB0 46800020 */ cvt.s.w $f0, $f0
/* 13CEF4 80249BB4 46040002 */ mul.s $f0, $f0, $f4
D_80249BB8:
/* 13CEF8 80249BB8 00000000 */ nop
D_80249BBC:
/* 13CEFC 80249BBC ACA20000 */ sw $v0, 0x0($a1)
/* 13CF00 80249BC0 4600118D */ trunc.w.s $f6, $f2
/* 13CF04 80249BC4 44023000 */ mfc1 $v0, $f6
/* 13CF08 80249BC8 00000000 */ nop
/* 13CF0C 80249BCC 30420FFF */ andi $v0, $v0, 0xFFF
/* 13CF10 80249BD0 00021300 */ sll $v0, $v0, 12
/* 13CF14 80249BD4 4600018D */ trunc.w.s $f6, $f0
/* 13CF18 80249BD8 44033000 */ mfc1 $v1, $f6
D_80249BDC:
/* 13CF1C 80249BDC 00000000 */ nop
/* 13CF20 80249BE0 30630FFF */ andi $v1, $v1, 0xFFF
/* 13CF24 80249BE4 00431025 */ or $v0, $v0, $v1
/* 13CF28 80249BE8 ACA20004 */ sw $v0, 0x4($a1)
.L80249BEC:
/* 13CF2C 80249BEC 0000F02D */ daddu $fp, $zero, $zero
/* 13CF30 80249BF0 3C0B8027 */ lui $t3, %hi(gPauseItemsPages)
/* 13CF34 80249BF4 256B04D0 */ addiu $t3, $t3, %lo(gPauseItemsPages)
/* 13CF38 80249BF8 AFAB007C */ sw $t3, 0x7C($sp)
D_80249BFC:
/* 13CF3C 80249BFC 8FAA007C */ lw $t2, 0x7C($sp)
/* 13CF40 80249C00 91420000 */ lbu $v0, 0x0($t2)
/* 13CF44 80249C04 104000E2 */ beqz $v0, .L80249F90
/* 13CF48 80249C08 00000000 */ nop
/* 13CF4C 80249C0C 03C0202D */ daddu $a0, $fp, $zero
/* 13CF50 80249C10 0C09260A */ jal func_80249828
/* 13CF54 80249C14 0000282D */ daddu $a1, $zero, $zero
/* 13CF58 80249C18 8FAB007C */ lw $t3, 0x7C($sp)
D_80249C1C:
/* 13CF5C 80249C1C 8D620008 */ lw $v0, 0x8($t3)
/* 13CF60 80249C20 184000D5 */ blez $v0, .L80249F78
/* 13CF64 80249C24 0000902D */ daddu $s2, $zero, $zero
/* 13CF68 80249C28 8FAA0054 */ lw $t2, 0x54($sp)
/* 13CF6C 80249C2C 3C0B8027 */ lui $t3, %hi(gPauseItemsIconIDs)
/* 13CF70 80249C30 256B05E8 */ addiu $t3, $t3, %lo(gPauseItemsIconIDs)
/* 13CF74 80249C34 000A1080 */ sll $v0, $t2, 2
/* 13CF78 80249C38 004B5821 */ addu $t3, $v0, $t3
D_80249C3C:
/* 13CF7C 80249C3C AFAB0078 */ sw $t3, 0x78($sp)
.L80249C40:
/* 13CF80 80249C40 8FAA007C */ lw $t2, 0x7C($sp)
/* 13CF84 80249C44 3C0B8027 */ lui $t3, %hi(gPauseItemsItemIDs)
/* 13CF88 80249C48 256B0400 */ addiu $t3, $t3, %lo(gPauseItemsItemIDs)
/* 13CF8C 80249C4C 8D420004 */ lw $v0, 0x4($t2)
/* 13CF90 80249C50 24037FFF */ addiu $v1, $zero, 0x7FFF
/* 13CF94 80249C54 00521021 */ addu $v0, $v0, $s2
/* 13CF98 80249C58 00021040 */ sll $v0, $v0, 1
D_80249C5C:
/* 13CF9C 80249C5C 004B1021 */ addu $v0, $v0, $t3
/* 13CFA0 80249C60 84500000 */ lh $s0, 0x0($v0)
/* 13CFA4 80249C64 94560000 */ lhu $s6, 0x0($v0)
/* 13CFA8 80249C68 120300BD */ beq $s0, $v1, .L80249F60
/* 13CFAC 80249C6C 0000982D */ daddu $s3, $zero, $zero
/* 13CFB0 80249C70 03C0202D */ daddu $a0, $fp, $zero
/* 13CFB4 80249C74 0C0925F4 */ jal func_802497D0
/* 13CFB8 80249C78 0240282D */ daddu $a1, $s2, $zero
D_80249C7C:
/* 13CFBC 80249C7C 03C0202D */ daddu $a0, $fp, $zero
/* 13CFC0 80249C80 0240282D */ daddu $a1, $s2, $zero
/* 13CFC4 80249C84 0C09260A */ jal func_80249828
/* 13CFC8 80249C88 AFA20068 */ sw $v0, 0x68($sp)
/* 13CFCC 80249C8C 0040B82D */ daddu $s7, $v0, $zero
D_80249C90:
/* 13CFD0 80249C90 3A027FFE */ xori $v0, $s0, 0x7FFE
.L80249C94:
/* 13CFD4 80249C94 3C038027 */ lui $v1, %hi(gPauseMenuCurrentTab)
/* 13CFD8 80249C98 806300D4 */ lb $v1, %lo(gPauseMenuCurrentTab)($v1)
/* 13CFDC 80249C9C 2C420001 */ sltiu $v0, $v0, 0x1
.L80249CA0:
/* 13CFE0 80249CA0 AFA20074 */ sw $v0, 0x74($sp)
D_80249CA4:
/* 13CFE4 80249CA4 24020003 */ addiu $v0, $zero, 0x3
/* 13CFE8 80249CA8 14620012 */ bne $v1, $v0, D_80249CF4
.L80249CAC:
/* 13CFEC 80249CAC 0000A02D */ daddu $s4, $zero, $zero
.L80249CB0:
/* 13CFF0 80249CB0 3C028027 */ lui $v0, %hi(gPauseItemsLevel)
/* 13CFF4 80249CB4 8C4205E0 */ lw $v0, %lo(gPauseItemsLevel)($v0)
D_80249CB8:
/* 13CFF8 80249CB8 240A0001 */ addiu $t2, $zero, 0x1
/* 13CFFC 80249CBC 144A000D */ bne $v0, $t2, D_80249CF4
/* 13D000 80249CC0 03C0202D */ daddu $a0, $fp, $zero
/* 13D004 80249CC4 0C092626 */ jal func_80249898
/* 13D008 80249CC8 0240282D */ daddu $a1, $s2, $zero
D_80249CCC:
/* 13D00C 80249CCC 8FAB0058 */ lw $t3, 0x58($sp)
/* 13D010 80249CD0 144B0008 */ bne $v0, $t3, D_80249CF4
.L80249CD4:
/* 13D014 80249CD4 0000A02D */ daddu $s4, $zero, $zero
/* 13D018 80249CD8 03C0202D */ daddu $a0, $fp, $zero
/* 13D01C 80249CDC 0C092638 */ jal D_802498E0
D_80249CE0:
/* 13D020 80249CE0 0240282D */ daddu $a1, $s2, $zero
/* 13D024 80249CE4 8FAA005C */ lw $t2, 0x5C($sp)
/* 13D028 80249CE8 004A1026 */ xor $v0, $v0, $t2
/* 13D02C 80249CEC 2C530001 */ sltiu $s3, $v0, 0x1
dgb_01_img3_gfx:
/* 13D030 80249CF0 0000A02D */ daddu $s4, $zero, $zero
D_80249CF4:
/* 13D034 80249CF4 12600003 */ beqz $s3, .L80249D04
/* 13D038 80249CF8 0280A82D */ daddu $s5, $s4, $zero
/* 13D03C 80249CFC 2414FFFF */ addiu $s4, $zero, -0x1
/* 13D040 80249D00 0280A82D */ daddu $s5, $s4, $zero
.L80249D04:
/* 13D044 80249D04 8FAB0050 */ lw $t3, 0x50($sp)
/* 13D048 80249D08 15600007 */ bnez $t3, .L80249D28
/* 13D04C 80249D0C 240A0001 */ addiu $t2, $zero, 0x1
/* 13D050 80249D10 240B000A */ addiu $t3, $zero, 0xA
D_80249D14:
/* 13D054 80249D14 AFAA0060 */ sw $t2, 0x60($sp)
/* 13D058 80249D18 12600003 */ beqz $s3, .L80249D28
/* 13D05C 80249D1C AFAB0064 */ sw $t3, 0x64($sp)
/* 13D060 80249D20 240A0009 */ addiu $t2, $zero, 0x9
/* 13D064 80249D24 AFAA0060 */ sw $t2, 0x60($sp)
.L80249D28:
/* 13D068 80249D28 0C09264C */ jal func_80249930
/* 13D06C 80249D2C 02E0202D */ daddu $a0, $s7, $zero
D_80249D30:
/* 13D070 80249D30 1040008B */ beqz $v0, .L80249F60
D_80249D34:
/* 13D074 80249D34 00000000 */ nop
D_80249D38:
/* 13D078 80249D38 8FAB0050 */ lw $t3, 0x50($sp)
/* 13D07C 80249D3C 15600035 */ bnez $t3, .L80249E14
jtbl_80249D40:
/* 13D080 80249D40 00000000 */ nop
/* 13D084 80249D44 8FAA0074 */ lw $t2, 0x74($sp)
D_80249D48:
/* 13D088 80249D48 11400016 */ beqz $t2, .L80249DA4
/* 13D08C 80249D4C 00161400 */ sll $v0, $s6, 16
/* 13D090 80249D50 0C093BA0 */ jal func_8024EE80
/* 13D094 80249D54 2404004E */ addiu $a0, $zero, 0x4E
/* 13D098 80249D58 8FA40068 */ lw $a0, 0x68($sp)
D_80249D5C:
/* 13D09C 80249D5C 0C09265A */ jal func_80249968
end_00_D_80249D60_E00760:
/* 13D0A0 80249D60 0040882D */ daddu $s1, $v0, $zero
/* 13D0A4 80249D64 8FAB006C */ lw $t3, 0x6C($sp)
/* 13D0A8 80249D68 02E0202D */ daddu $a0, $s7, $zero
/* 13D0AC 80249D6C 01628021 */ addu $s0, $t3, $v0
dgb_01_img4_png:
/* 13D0B0 80249D70 0C092656 */ jal func_80249958
/* 13D0B4 80249D74 02148021 */ addu $s0, $s0, $s4
/* 13D0B8 80249D78 0220202D */ daddu $a0, $s1, $zero
/* 13D0BC 80249D7C 0200282D */ daddu $a1, $s0, $zero
/* 13D0C0 80249D80 240700FF */ addiu $a3, $zero, 0xFF
/* 13D0C4 80249D84 8FAA0070 */ lw $t2, 0x70($sp)
.L80249D88:
/* 13D0C8 80249D88 8FAB0064 */ lw $t3, 0x64($sp)
/* 13D0CC 80249D8C 01421021 */ addu $v0, $t2, $v0
/* 13D0D0 80249D90 8FAA0060 */ lw $t2, 0x60($sp)
/* 13D0D4 80249D94 00553021 */ addu $a2, $v0, $s5
/* 13D0D8 80249D98 AFAB0010 */ sw $t3, 0x10($sp)
/* 13D0DC 80249D9C 08092783 */ j .L80249E0C
/* 13D0E0 80249DA0 AFAA0014 */ sw $t2, 0x14($sp)
.L80249DA4:
/* 13D0E4 80249DA4 000212C3 */ sra $v0, $v0, 11
/* 13D0E8 80249DA8 3C0B8008 */ lui $t3, %hi(gItemTable)
D_80249DAC:
/* 13D0EC 80249DAC 256B78E0 */ addiu $t3, $t3, %lo(gItemTable)
/* 13D0F0 80249DB0 004B8821 */ addu $s1, $v0, $t3
/* 13D0F4 80249DB4 8E220000 */ lw $v0, 0x0($s1)
/* 13D0F8 80249DB8 10400016 */ beqz $v0, .L80249E14
.L80249DBC:
/* 13D0FC 80249DBC 00000000 */ nop
/* 13D100 80249DC0 18400014 */ blez $v0, .L80249E14
/* 13D104 80249DC4 00000000 */ nop
/* 13D108 80249DC8 0C09265A */ jal func_80249968
D_80249DCC:
/* 13D10C 80249DCC 8FA40068 */ lw $a0, 0x68($sp)
D_80249DD0:
/* 13D110 80249DD0 8FAA006C */ lw $t2, 0x6C($sp)
/* 13D114 80249DD4 02E0202D */ daddu $a0, $s7, $zero
/* 13D118 80249DD8 01428021 */ addu $s0, $t2, $v0
/* 13D11C 80249DDC 0C092656 */ jal func_80249958
/* 13D120 80249DE0 02148021 */ addu $s0, $s0, $s4
/* 13D124 80249DE4 0200282D */ daddu $a1, $s0, $zero
/* 13D128 80249DE8 8FAB0070 */ lw $t3, 0x70($sp)
/* 13D12C 80249DEC 8FAA0064 */ lw $t2, 0x64($sp)
/* 13D130 80249DF0 01621021 */ addu $v0, $t3, $v0
/* 13D134 80249DF4 8FAB0060 */ lw $t3, 0x60($sp)
/* 13D138 80249DF8 240700FF */ addiu $a3, $zero, 0xFF
/* 13D13C 80249DFC AFAA0010 */ sw $t2, 0x10($sp)
/* 13D140 80249E00 AFAB0014 */ sw $t3, 0x14($sp)
/* 13D144 80249E04 8E240000 */ lw $a0, 0x0($s1)
/* 13D148 80249E08 00553021 */ addu $a2, $v0, $s5
.L80249E0C:
/* 13D14C 80249E0C 0C04993B */ jal draw_msg
/* 13D150 80249E10 00000000 */ nop
.L80249E14:
/* 13D154 80249E14 8FAA0050 */ lw $t2, 0x50($sp)
/* 13D158 80249E18 240B0001 */ addiu $t3, $zero, 0x1
/* 13D15C 80249E1C 154B0050 */ bne $t2, $t3, .L80249F60
D_80249E20:
/* 13D160 80249E20 3C052000 */ lui $a1, (0x20000000 >> 16)
/* 13D164 80249E24 8FAA0078 */ lw $t2, 0x78($sp)
/* 13D168 80249E28 8D510000 */ lw $s1, 0x0($t2)
/* 13D16C 80249E2C 0C05128B */ jal hud_element_clear_flags
/* 13D170 80249E30 0220202D */ daddu $a0, $s1, $zero
/* 13D174 80249E34 0220202D */ daddu $a0, $s1, $zero
/* 13D178 80249E38 0C051280 */ jal hud_element_set_flags
/* 13D17C 80249E3C 34058000 */ ori $a1, $zero, 0x8000
.L80249E40:
/* 13D180 80249E40 8FAB0074 */ lw $t3, 0x74($sp)
/* 13D184 80249E44 11600005 */ beqz $t3, .L80249E5C
/* 13D188 80249E48 00000000 */ nop
/* 13D18C 80249E4C 3C118027 */ lui $s1, %hi(D_80270634)
/* 13D190 80249E50 8E310634 */ lw $s1, %lo(D_80270634)($s1)
/* 13D194 80249E54 080927B9 */ j .L80249EE4
/* 13D198 80249E58 00000000 */ nop
.L80249E5C:
/* 13D19C 80249E5C 12600010 */ beqz $s3, .L80249EA0
/* 13D1A0 80249E60 0220202D */ daddu $a0, $s1, $zero
/* 13D1A4 80249E64 0C051280 */ jal hud_element_set_flags
/* 13D1A8 80249E68 3C052000 */ lui $a1, (0x20000000 >> 16)
/* 13D1AC 80249E6C 00161400 */ sll $v0, $s6, 16
D_80249E70:
/* 13D1B0 80249E70 000212C3 */ sra $v0, $v0, 11
/* 13D1B4 80249E74 3C0A8008 */ lui $t2, %hi(gItemTable)
/* 13D1B8 80249E78 254A78E0 */ addiu $t2, $t2, %lo(gItemTable)
/* 13D1BC 80249E7C 004A1021 */ addu $v0, $v0, $t2
/* 13D1C0 80249E80 84420004 */ lh $v0, 0x4($v0)
/* 13D1C4 80249E84 3C0B8009 */ lui $t3, %hi(gItemHudScripts)
/* 13D1C8 80249E88 256BA680 */ addiu $t3, $t3, %lo(gItemHudScripts)
/* 13D1CC 80249E8C 000210C0 */ sll $v0, $v0, 3
/* 13D1D0 80249E90 004B1021 */ addu $v0, $v0, $t3
.L80249E94:
/* 13D1D4 80249E94 8C420000 */ lw $v0, 0x0($v0)
/* 13D1D8 80249E98 3C018027 */ lui $at, %hi(gPauseCurrentDescIconScript)
/* 13D1DC 80249E9C AC2200CC */ sw $v0, %lo(gPauseCurrentDescIconScript)($at)
.L80249EA0:
/* 13D1E0 80249EA0 00161400 */ sll $v0, $s6, 16
/* 13D1E4 80249EA4 000212C3 */ sra $v0, $v0, 11
/* 13D1E8 80249EA8 3C0A8008 */ lui $t2, %hi(gItemTable)
/* 13D1EC 80249EAC 254A78E0 */ addiu $t2, $t2, %lo(gItemTable)
/* 13D1F0 80249EB0 004A1021 */ addu $v0, $v0, $t2
/* 13D1F4 80249EB4 84420004 */ lh $v0, 0x4($v0)
/* 13D1F8 80249EB8 3C0B8009 */ lui $t3, %hi(gItemHudScripts)
/* 13D1FC 80249EBC 256BA680 */ addiu $t3, $t3, %lo(gItemHudScripts)
/* 13D200 80249EC0 000210C0 */ sll $v0, $v0, 3
/* 13D204 80249EC4 004B1021 */ addu $v0, $v0, $t3
/* 13D208 80249EC8 8C450000 */ lw $a1, 0x0($v0)
/* 13D20C 80249ECC 0C0511FF */ jal hud_element_set_script
/* 13D210 80249ED0 0220202D */ daddu $a0, $s1, $zero
/* 13D214 80249ED4 3C053F2B */ lui $a1, (0x3F2BBA99 >> 16)
/* 13D218 80249ED8 34A5BA99 */ ori $a1, $a1, (0x3F2BBA99 & 0xFFFF)
/* 13D21C 80249EDC 0C051308 */ jal hud_element_set_scale
.L80249EE0:
/* 13D220 80249EE0 0220202D */ daddu $a0, $s1, $zero
.L80249EE4:
/* 13D224 80249EE4 8FA40068 */ lw $a0, 0x68($sp)
/* 13D228 80249EE8 0C09265A */ jal func_80249968
/* 13D22C 80249EEC 00000000 */ nop
/* 13D230 80249EF0 02E0202D */ daddu $a0, $s7, $zero
/* 13D234 80249EF4 8FAA00AC */ lw $t2, 0xAC($sp)
/* 13D238 80249EF8 24500069 */ addiu $s0, $v0, 0x69
D_80249EFC:
/* 13D23C 80249EFC 01508021 */ addu $s0, $t2, $s0
/* 13D240 80249F00 0C092656 */ jal func_80249958
/* 13D244 80249F04 02148021 */ addu $s0, $s0, $s4
/* 13D248 80249F08 0220202D */ daddu $a0, $s1, $zero
/* 13D24C 80249F0C 0200282D */ daddu $a1, $s0, $zero
/* 13D250 80249F10 8FAB00B0 */ lw $t3, 0xB0($sp)
/* 13D254 80249F14 24420017 */ addiu $v0, $v0, 0x17
/* 13D258 80249F18 01621021 */ addu $v0, $t3, $v0
/* 13D25C 80249F1C 0C051261 */ jal hud_element_set_render_pos
/* 13D260 80249F20 00553021 */ addu $a2, $v0, $s5
/* 13D264 80249F24 8FAA0054 */ lw $t2, 0x54($sp)
/* 13D268 80249F28 15400005 */ bnez $t2, .L80249F40
/* 13D26C 80249F2C 00000000 */ nop
/* 13D270 80249F30 0C0511F8 */ jal hud_element_draw_without_clipping
/* 13D274 80249F34 0220202D */ daddu $a0, $s1, $zero
/* 13D278 80249F38 080927D2 */ j .L80249F48
/* 13D27C 80249F3C 00000000 */ nop
.L80249F40:
/* 13D280 80249F40 0C0511F1 */ jal hud_element_draw_next
/* 13D284 80249F44 0220202D */ daddu $a0, $s1, $zero
.L80249F48:
/* 13D288 80249F48 8FAB0078 */ lw $t3, 0x78($sp)
/* 13D28C 80249F4C 8FAA0054 */ lw $t2, 0x54($sp)
/* 13D290 80249F50 256B0004 */ addiu $t3, $t3, 0x4
/* 13D294 80249F54 254A0001 */ addiu $t2, $t2, 0x1
/* 13D298 80249F58 AFAB0078 */ sw $t3, 0x78($sp)
/* 13D29C 80249F5C AFAA0054 */ sw $t2, 0x54($sp)
.L80249F60:
/* 13D2A0 80249F60 8FAB007C */ lw $t3, 0x7C($sp)
/* 13D2A4 80249F64 8D620008 */ lw $v0, 0x8($t3)
/* 13D2A8 80249F68 26520001 */ addiu $s2, $s2, 0x1
/* 13D2AC 80249F6C 0242102A */ slt $v0, $s2, $v0
/* 13D2B0 80249F70 1440FF33 */ bnez $v0, .L80249C40
/* 13D2B4 80249F74 00000000 */ nop
.L80249F78:
/* 13D2B8 80249F78 27DE0001 */ addiu $fp, $fp, 0x1
/* 13D2BC 80249F7C 8FAA007C */ lw $t2, 0x7C($sp)
/* 13D2C0 80249F80 2BC20014 */ slti $v0, $fp, 0x14
/* 13D2C4 80249F84 254A000C */ addiu $t2, $t2, 0xC
.L80249F88:
/* 13D2C8 80249F88 1440FF1C */ bnez $v0, D_80249BFC
/* 13D2CC 80249F8C AFAA007C */ sw $t2, 0x7C($sp)
.L80249F90:
/* 13D2D0 80249F90 8FAB0050 */ lw $t3, 0x50($sp)
/* 13D2D4 80249F94 256B0001 */ addiu $t3, $t3, 0x1
/* 13D2D8 80249F98 29620003 */ slti $v0, $t3, 0x3
/* 13D2DC 80249F9C 1440FF13 */ bnez $v0, .L80249BEC
/* 13D2E0 80249FA0 AFAB0050 */ sw $t3, 0x50($sp)
/* 13D2E4 80249FA4 3C09800A */ lui $t1, %hi(gMainGfxPos)
/* 13D2E8 80249FA8 2529A66C */ addiu $t1, $t1, %lo(gMainGfxPos)
/* 13D2EC 80249FAC 8FAA00AC */ lw $t2, 0xAC($sp)
/* 13D2F0 80249FB0 8FAB00B0 */ lw $t3, 0xB0($sp)
.L80249FB4:
/* 13D2F4 80249FB4 8D250000 */ lw $a1, 0x0($t1)
/* 13D2F8 80249FB8 25440001 */ addiu $a0, $t2, 0x1
/* 13D2FC 80249FBC 25660001 */ addiu $a2, $t3, 0x1
/* 13D300 80249FC0 00A0182D */ daddu $v1, $a1, $zero
/* 13D304 80249FC4 8FAB00B4 */ lw $t3, 0xB4($sp)
/* 13D308 80249FC8 24A50008 */ addiu $a1, $a1, 0x8
/* 13D30C 80249FCC 014B1021 */ addu $v0, $t2, $t3
/* 13D310 80249FD0 8FAA00B0 */ lw $t2, 0xB0($sp)
/* 13D314 80249FD4 8FAB00B8 */ lw $t3, 0xB8($sp)
/* 13D318 80249FD8 2447FFFF */ addiu $a3, $v0, -0x1
/* 13D31C 80249FDC 014B1021 */ addu $v0, $t2, $t3
/* 13D320 80249FE0 2448FFFF */ addiu $t0, $v0, -0x1
D_80249FE4:
/* 13D324 80249FE4 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* 13D328 80249FE8 AD250000 */ sw $a1, 0x0($t1)
/* 13D32C 80249FEC AC620000 */ sw $v0, 0x0($v1)
/* 13D330 80249FF0 1C800002 */ bgtz $a0, .L80249FFC
/* 13D334 80249FF4 AC600004 */ sw $zero, 0x4($v1)
/* 13D338 80249FF8 24040001 */ addiu $a0, $zero, 0x1
.L80249FFC:
/* 13D33C 80249FFC 58C00001 */ blezl $a2, .L8024A004
/* 13D340 8024A000 24060001 */ addiu $a2, $zero, 0x1
.L8024A004:
/* 13D344 8024A004 18E00129 */ blez $a3, .L8024A4AC
/* 13D348 8024A008 00000000 */ nop
/* 13D34C 8024A00C 19000127 */ blez $t0, .L8024A4AC
/* 13D350 8024A010 2882013F */ slti $v0, $a0, 0x13F
/* 13D354 8024A014 10400125 */ beqz $v0, .L8024A4AC
/* 13D358 8024A018 28C200EF */ slti $v0, $a2, 0xEF
/* 13D35C 8024A01C 10400123 */ beqz $v0, .L8024A4AC
/* 13D360 8024A020 28E2013F */ slti $v0, $a3, 0x13F
/* 13D364 8024A024 50400001 */ beql $v0, $zero, .L8024A02C
/* 13D368 8024A028 2407013F */ addiu $a3, $zero, 0x13F
.L8024A02C:
/* 13D36C 8024A02C 290200EF */ slti $v0, $t0, 0xEF
/* 13D370 8024A030 50400001 */ beql $v0, $zero, .L8024A038
/* 13D374 8024A034 240800EF */ addiu $t0, $zero, 0xEF
.L8024A038:
/* 13D378 8024A038 3C014080 */ lui $at, (0x40800000 >> 16)
/* 13D37C 8024A03C 44812000 */ mtc1 $at, $f4
/* 13D380 8024A040 44840000 */ mtc1 $a0, $f0
/* 13D384 8024A044 00000000 */ nop
/* 13D388 8024A048 46800020 */ cvt.s.w $f0, $f0
/* 13D38C 8024A04C 46040002 */ mul.s $f0, $f0, $f4
/* 13D390 8024A050 00000000 */ nop
/* 13D394 8024A054 24A20008 */ addiu $v0, $a1, 0x8
/* 13D398 8024A058 44861000 */ mtc1 $a2, $f2
/* 13D39C 8024A05C 00000000 */ nop
/* 13D3A0 8024A060 468010A0 */ cvt.s.w $f2, $f2
/* 13D3A4 8024A064 3C04ED00 */ lui $a0, (0xED000000 >> 16)
/* 13D3A8 8024A068 46041082 */ mul.s $f2, $f2, $f4
/* 13D3AC 8024A06C 00000000 */ nop
/* 13D3B0 8024A070 AD220000 */ sw $v0, 0x0($t1)
D_8024A074:
/* 13D3B4 8024A074 4600018D */ trunc.w.s $f6, $f0
/* 13D3B8 8024A078 44023000 */ mfc1 $v0, $f6
/* 13D3BC 8024A07C 00000000 */ nop
/* 13D3C0 8024A080 30420FFF */ andi $v0, $v0, 0xFFF
/* 13D3C4 8024A084 00021300 */ sll $v0, $v0, 12
/* 13D3C8 8024A088 4600118D */ trunc.w.s $f6, $f2
/* 13D3CC 8024A08C 44033000 */ mfc1 $v1, $f6
/* 13D3D0 8024A090 44871000 */ mtc1 $a3, $f2
/* 13D3D4 8024A094 00000000 */ nop
D_8024A098:
/* 13D3D8 8024A098 468010A0 */ cvt.s.w $f2, $f2
/* 13D3DC 8024A09C 46041082 */ mul.s $f2, $f2, $f4
/* 13D3E0 8024A0A0 00000000 */ nop
/* 13D3E4 8024A0A4 30630FFF */ andi $v1, $v1, 0xFFF
/* 13D3E8 8024A0A8 00641825 */ or $v1, $v1, $a0
/* 13D3EC 8024A0AC 00431025 */ or $v0, $v0, $v1
/* 13D3F0 8024A0B0 44880000 */ mtc1 $t0, $f0
/* 13D3F4 8024A0B4 00000000 */ nop
/* 13D3F8 8024A0B8 46800020 */ cvt.s.w $f0, $f0
/* 13D3FC 8024A0BC 46040002 */ mul.s $f0, $f0, $f4
D_8024A0C0:
/* 13D400 8024A0C0 00000000 */ nop
/* 13D404 8024A0C4 ACA20000 */ sw $v0, 0x0($a1)
/* 13D408 8024A0C8 4600118D */ trunc.w.s $f6, $f2
D_8024A0CC:
/* 13D40C 8024A0CC 44023000 */ mfc1 $v0, $f6
/* 13D410 8024A0D0 00000000 */ nop
/* 13D414 8024A0D4 30420FFF */ andi $v0, $v0, 0xFFF
/* 13D418 8024A0D8 00021300 */ sll $v0, $v0, 12
/* 13D41C 8024A0DC 4600018D */ trunc.w.s $f6, $f0
/* 13D420 8024A0E0 44033000 */ mfc1 $v1, $f6
/* 13D424 8024A0E4 00000000 */ nop
/* 13D428 8024A0E8 30630FFF */ andi $v1, $v1, 0xFFF
/* 13D42C 8024A0EC 00431025 */ or $v0, $v0, $v1
D_8024A0F0:
/* 13D430 8024A0F0 3C038027 */ lui $v1, %hi(gPauseMenuCurrentTab)
D_8024A0F4:
/* 13D434 8024A0F4 806300D4 */ lb $v1, %lo(gPauseMenuCurrentTab)($v1)
/* 13D438 8024A0F8 ACA20004 */ sw $v0, 0x4($a1)
/* 13D43C 8024A0FC 24020003 */ addiu $v0, $zero, 0x3
/* 13D440 8024A100 1462002A */ bne $v1, $v0, .L8024A1AC
/* 13D444 8024A104 24020001 */ addiu $v0, $zero, 0x1
/* 13D448 8024A108 3C038027 */ lui $v1, %hi(gPauseItemsLevel)
/* 13D44C 8024A10C 8C6305E0 */ lw $v1, %lo(gPauseItemsLevel)($v1)
/* 13D450 8024A110 14620026 */ bne $v1, $v0, .L8024A1AC
D_8024A114:
/* 13D454 8024A114 00000000 */ nop
/* 13D458 8024A118 3C118027 */ lui $s1, %hi(gPauseItemsCurrentPage)
/* 13D45C 8024A11C 263104C8 */ addiu $s1, $s1, %lo(gPauseItemsCurrentPage)
/* 13D460 8024A120 8E220000 */ lw $v0, 0x0($s1)
/* 13D464 8024A124 1840000E */ blez $v0, .L8024A160
/* 13D468 8024A128 24420001 */ addiu $v0, $v0, 0x1
/* 13D46C 8024A12C 3C108027 */ lui $s0, %hi(gPauseItemsIconIDs)
D_8024A130:
/* 13D470 8024A130 261005E8 */ addiu $s0, $s0, %lo(gPauseItemsIconIDs)
D_8024A134:
/* 13D474 8024A134 8FAB00AC */ lw $t3, 0xAC($sp)
/* 13D478 8024A138 8E040040 */ lw $a0, 0x40($s0)
/* 13D47C 8024A13C 8FAA00B0 */ lw $t2, 0xB0($sp)
/* 13D480 8024A140 25650116 */ addiu $a1, $t3, 0x116
/* 13D484 8024A144 0C051261 */ jal hud_element_set_render_pos
/* 13D488 8024A148 2546000E */ addiu $a2, $t2, 0xE
/* 13D48C 8024A14C 8E040040 */ lw $a0, 0x40($s0)
/* 13D490 8024A150 0C0511F8 */ jal hud_element_draw_without_clipping
/* 13D494 8024A154 00000000 */ nop
D_8024A158:
/* 13D498 8024A158 8E220000 */ lw $v0, 0x0($s1)
/* 13D49C 8024A15C 24420001 */ addiu $v0, $v0, 0x1
.L8024A160:
/* 13D4A0 8024A160 00021840 */ sll $v1, $v0, 1
/* 13D4A4 8024A164 00621821 */ addu $v1, $v1, $v0
/* 13D4A8 8024A168 00031880 */ sll $v1, $v1, 2
/* 13D4AC 8024A16C 3C028027 */ lui $v0, %hi(gPauseItemsPages)
dgb_01_img4_gfx:
/* 13D4B0 8024A170 00431021 */ addu $v0, $v0, $v1
/* 13D4B4 8024A174 904204D0 */ lbu $v0, %lo(gPauseItemsPages)($v0)
/* 13D4B8 8024A178 1040000C */ beqz $v0, .L8024A1AC
/* 13D4BC 8024A17C 00000000 */ nop
D_8024A180:
/* 13D4C0 8024A180 3C108027 */ lui $s0, %hi(gPauseItemsIconIDs)
/* 13D4C4 8024A184 261005E8 */ addiu $s0, $s0, %lo(gPauseItemsIconIDs)
/* 13D4C8 8024A188 8FAB00AC */ lw $t3, 0xAC($sp)
D_8024A18C:
/* 13D4CC 8024A18C 8E040044 */ lw $a0, 0x44($s0)
D_8024A190:
/* 13D4D0 8024A190 8FAA00B0 */ lw $t2, 0xB0($sp)
/* 13D4D4 8024A194 25650116 */ addiu $a1, $t3, 0x116
/* 13D4D8 8024A198 0C051261 */ jal hud_element_set_render_pos
/* 13D4DC 8024A19C 25460092 */ addiu $a2, $t2, 0x92
/* 13D4E0 8024A1A0 8E040044 */ lw $a0, 0x44($s0)
/* 13D4E4 8024A1A4 0C0511F8 */ jal hud_element_draw_without_clipping
/* 13D4E8 8024A1A8 00000000 */ nop
.L8024A1AC:
/* 13D4EC 8024A1AC 3C038027 */ lui $v1, %hi(gPauseItemsCurrentTab)
/* 13D4F0 8024A1B0 8C6305E4 */ lw $v1, %lo(gPauseItemsCurrentTab)($v1)
D_8024A1B4:
/* 13D4F4 8024A1B4 8FA600AC */ lw $a2, 0xAC($sp)
/* 13D4F8 8024A1B8 50600001 */ beql $v1, $zero, .L8024A1C0
/* 13D4FC 8024A1BC 24C60009 */ addiu $a2, $a2, 0x9
.L8024A1C0:
/* 13D500 8024A1C0 8FAB00B0 */ lw $t3, 0xB0($sp)
/* 13D504 8024A1C4 2402005B */ addiu $v0, $zero, 0x5B
/* 13D508 8024A1C8 AFA20014 */ sw $v0, 0x14($sp)
/* 13D50C 8024A1CC 24020022 */ addiu $v0, $zero, 0x22
/* 13D510 8024A1D0 AFA20018 */ sw $v0, 0x18($sp)
/* 13D514 8024A1D4 240200FF */ addiu $v0, $zero, 0xFF
D_8024A1D8:
/* 13D518 8024A1D8 AFA2001C */ sw $v0, 0x1C($sp)
/* 13D51C 8024A1DC 24020001 */ addiu $v0, $zero, 0x1
.L8024A1E0:
/* 13D520 8024A1E0 AFA00010 */ sw $zero, 0x10($sp)
/* 13D524 8024A1E4 14620004 */ bne $v1, $v0, .L8024A1F8
.L8024A1E8:
/* 13D528 8024A1E8 25670007 */ addiu $a3, $t3, 0x7
/* 13D52C 8024A1EC 24020080 */ addiu $v0, $zero, 0x80
dgb_01_img5_png:
/* 13D530 8024A1F0 0809287F */ j .L8024A1FC
/* 13D534 8024A1F4 AFA20020 */ sw $v0, 0x20($sp)
.L8024A1F8:
/* 13D538 8024A1F8 AFA00020 */ sw $zero, 0x20($sp)
.L8024A1FC:
/* 13D53C 8024A1FC 24040004 */ addiu $a0, $zero, 0x4
D_8024A200:
/* 13D540 8024A200 3C058027 */ lui $a1, %hi(gPauseWS_17)
/* 13D544 8024A204 24A5FCB8 */ addiu $a1, $a1, %lo(gPauseWS_17)
/* 13D548 8024A208 24020140 */ addiu $v0, $zero, 0x140
/* 13D54C 8024A20C AFA20044 */ sw $v0, 0x44($sp)
D_8024A210:
/* 13D550 8024A210 240200F0 */ addiu $v0, $zero, 0xF0
glabel func_8024A214
/* 13D554 8024A214 AFA00024 */ sw $zero, 0x24($sp)
/* 13D558 8024A218 AFA00028 */ sw $zero, 0x28($sp)
/* 13D55C 8024A21C AFA0002C */ sw $zero, 0x2C($sp)
/* 13D560 8024A220 AFA00030 */ sw $zero, 0x30($sp)
/* 13D564 8024A224 AFA00034 */ sw $zero, 0x34($sp)
/* 13D568 8024A228 AFA00038 */ sw $zero, 0x38($sp)
/* 13D56C 8024A22C AFA0003C */ sw $zero, 0x3C($sp)
/* 13D570 8024A230 AFA00040 */ sw $zero, 0x40($sp)
/* 13D574 8024A234 AFA20048 */ sw $v0, 0x48($sp)
/* 13D578 8024A238 0C03D4B8 */ jal draw_box
/* 13D57C 8024A23C AFA0004C */ sw $zero, 0x4C($sp)
/* 13D580 8024A240 0C093BA0 */ jal func_8024EE80
/* 13D584 8024A244 2404004F */ addiu $a0, $zero, 0x4F
/* 13D588 8024A248 3C118027 */ lui $s1, %hi(gPauseItemsCurrentTab)
/* 13D58C 8024A24C 263105E4 */ addiu $s1, $s1, %lo(gPauseItemsCurrentTab)
/* 13D590 8024A250 8FAA00AC */ lw $t2, 0xAC($sp)
/* 13D594 8024A254 8E230000 */ lw $v1, 0x0($s1)
/* 13D598 8024A258 14600002 */ bnez $v1, .L8024A264
/* 13D59C 8024A25C 2545000C */ addiu $a1, $t2, 0xC
/* 13D5A0 8024A260 25450015 */ addiu $a1, $t2, 0x15
.L8024A264:
/* 13D5A4 8024A264 240700FF */ addiu $a3, $zero, 0xFF
/* 13D5A8 8024A268 8FAB00B0 */ lw $t3, 0xB0($sp)
/* 13D5AC 8024A26C 24100001 */ addiu $s0, $zero, 0x1
/* 13D5B0 8024A270 14700002 */ bne $v1, $s0, .L8024A27C
/* 13D5B4 8024A274 25660011 */ addiu $a2, $t3, 0x11
/* 13D5B8 8024A278 240700BF */ addiu $a3, $zero, 0xBF
.L8024A27C:
/* 13D5BC 8024A27C 0040202D */ daddu $a0, $v0, $zero
/* 13D5C0 8024A280 AFA00010 */ sw $zero, 0x10($sp)
/* 13D5C4 8024A284 0C04993B */ jal draw_msg
.L8024A288:
/* 13D5C8 8024A288 AFB00014 */ sw $s0, 0x14($sp)
/* 13D5CC 8024A28C 8E230000 */ lw $v1, 0x0($s1)
### DECOMPILED C INSTRUCTIONS:
void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
s32 i, pageIndex, itemIndex;
s32 totalItemIndex;
s32 currentItemRow;
s32 currentItemColumn;
s32 style;
s32 palette;
s32 posX, posY;
s32 sp6C;
s32 sp70;
s32 isNone;
s32* sp78;
PauseItemPage* page;
s32 x1, y1, x2, y2;
s16 itemID;
s32 isSelected, itemOffsetX, itemOffsetY;
s32* iconIDs;
s32 itemIcon;
s32 msg, msgX, msgY, opacity1;
s32 selectedPosX, selectedPosY;
s32 cursorOffsetX, cursorOffsetY;
style = DRAW_MSG_STYLE_MENU;
palette = MSG_PAL_STANDARD;
currentItemColumn = gPauseItemsSelectedIndex / gPauseItemsPages[gPauseItemsCurrentPage].numCols;
currentItemRow = gPauseItemsSelectedIndex % gPauseItemsPages[gPauseItemsCurrentPage].numCols;
draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_18, baseX + 68, baseY, 0, width - 68, height, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
x1 = baseX + 1;
y1 = baseY + 7;
x2 = baseX + width - 1;
y2 = baseY + height - 7;
if (x1 <= 0) {
x1 = 1;
}
if (y1 <= 0) {
y1 = 1;
}
if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) {
return;
}
if (x2 >= SCREEN_WIDTH - 1) {
x2 = SCREEN_WIDTH - 1;
}
if (y2 >= SCREEN_HEIGHT - 1) {
y2 = SCREEN_HEIGHT - 1;
}
totalItemIndex = 0;
sp6C = baseX + 119;
sp70 = baseY + 17;
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
for (i = 0; i < 3; i++) {
for (pageIndex = 0; pageIndex < 20; pageIndex++) {
iconIDs = gPauseItemsIconIDs;
page = &gPauseItemsPages[pageIndex];
if (!page->enabled) {
break;
}
pause_items_get_pos_y(pageIndex, 0);
for (itemIndex = 0; itemIndex < page->count; itemIndex++) {
itemID = gPauseItemsItemIDs[page->startIndex + itemIndex];
isSelected = FALSE;
if (itemID == ITEM_INVALID) {
continue;
}
posX = pause_items_get_pos_x(pageIndex, itemIndex);
posY = pause_items_get_pos_y(pageIndex, itemIndex);
isNone = itemID == ITEM_NONE_STANDIN;
if (gPauseMenuCurrentTab == 3 &&
gPauseItemsLevel == 1 &&
pause_items_get_column(pageIndex, itemIndex) == currentItemRow &&
pause_items_get_row(pageIndex, itemIndex) == currentItemColumn) {
isSelected = TRUE;
}
itemOffsetX = 0;
itemOffsetY = 0;
if (isSelected) {
itemOffsetX = -1;
itemOffsetY = -1;
}
if (i == 0) {
style = DRAW_MSG_STYLE_MENU;
palette = MSG_PAL_STANDARD;
if (isSelected) {
style = DRAW_MSG_STYLE_MENU | DRAW_MSG_STYLE_DROP_SHADOW;
}
}
if (!pause_items_is_visible(posY)) {
continue;
}
if (i == 0) {
if (isNone) {
draw_msg(pause_get_menu_msg(PAUSE_MSG_BAGDE_DESC_NONE), sp6C + pause_items_scroll_offset_x(posX) + itemOffsetX,
sp70 + pause_items_scroll_offset_y(posY) + itemOffsetY, 255, palette, style);
} else {
if (gItemTable[itemID].nameMsg) {
if (gItemTable[itemID].nameMsg > 0) {
draw_msg(gItemTable[itemID].nameMsg, sp6C + pause_items_scroll_offset_x(posX) + itemOffsetX,
sp70 + pause_items_scroll_offset_y(posY) + itemOffsetY, 255, palette, style);
}
}
}
}
if (i == 1) {
itemIcon = iconIDs[totalItemIndex];
hud_element_clear_flags(itemIcon, HUD_ELEMENT_FLAG_DROP_SHADOW);
hud_element_set_flags(itemIcon, HUD_ELEMENT_FLAG_FILTER_TEX);
if (isNone) {
itemIcon = gPauseItemsIconIDs[19];
} else {
if (isSelected) {
hud_element_set_flags(itemIcon, HUD_ELEMENT_FLAG_DROP_SHADOW);
gPauseCurrentDescIconScript = gItemHudScripts[gItemTable[itemID].hudElemID].enabled;
}
hud_element_set_script(itemIcon, gItemHudScripts[gItemTable[itemID].hudElemID].enabled);
hud_element_set_scale(itemIcon, 0.670816f);
}
hud_element_set_render_pos(itemIcon, baseX + 105 + pause_items_scroll_offset_x(posX) + itemOffsetX,
baseY + 23 + pause_items_scroll_offset_y(posY) + itemOffsetY);
if (totalItemIndex == 0) {
hud_element_draw_without_clipping(itemIcon);
} else {
hud_element_draw_next(itemIcon);
}
totalItemIndex++;
}
}
}
}
x1 = baseX + 1;
y1 = baseY + 1;
x2 = baseX + width - 1;
y2 = baseY + height - 1;
gDPPipeSync(gMainGfxPos++);
if (x1 <= 0) {
x1 = 1;
}
if (y1 <= 0) {
y1 = 1;
}
if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) {
return;
}
if (x2 >= SCREEN_WIDTH - 1) {
x2 = SCREEN_WIDTH - 1;
}
if (y2 >= SCREEN_HEIGHT - 1) {
y2 = SCREEN_HEIGHT - 1;
}
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
if (gPauseMenuCurrentTab == 3 && gPauseItemsLevel == 1) {
if (gPauseItemsCurrentPage > 0) {
hud_element_set_render_pos(gPauseItemsIconIDs[16], baseX + 278, baseY + 14);
hud_element_draw_without_clipping(gPauseItemsIconIDs[16]);
}
if (gPauseItemsPages [gPauseItemsCurrentPage + 1].enabled) {
hud_element_set_render_pos(gPauseItemsIconIDs[17], baseX + 278, baseY + 146);
hud_element_draw_without_clipping(gPauseItemsIconIDs[17]);
}
}
draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_17, gPauseItemsCurrentTab == 0 ? baseX + 9 : baseX, baseY + 7, 0,
91, 34, 255, gPauseItemsCurrentTab == 1 ? 128 : 0, 0, 0,
0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
msg = pause_get_menu_msg(PAUSE_MSG_KEY_ITEMS);
msgX = baseX + 12;
if (gPauseItemsCurrentTab == 0) {
msgX = baseX + 21;
}
opacity1 = 255;
msgY = baseY + 17;
if (gPauseItemsCurrentTab == 1) {
opacity1 = 191;
}
draw_msg(msg, msgX, msgY, opacity1, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU);
draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_17, gPauseItemsCurrentTab == 1 ? baseX + 9 : baseX, baseY + 39, 0,
91, 34, 255, gPauseItemsCurrentTab == 0 ? 128 : 0, 0, 0,
0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
msg = pause_get_menu_msg(PAUSE_MSG_CONSUMABLES);
msgX = baseX + 25;
if (gPauseItemsCurrentTab == 1) {
msgX = baseX + 34;
}
opacity1 = 255;
msgY = baseY + 49;
if (gPauseItemsCurrentTab == 0) {
opacity1 = 191;
}
draw_msg(msg, msgX, msgY, opacity1, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU);
if (gPauseMenuCurrentTab == 3) {
if (gPauseItemsLevel == 0) {
pause_set_cursor_pos(WINDOW_ID_PAUSE_ITEMS, baseX + 12, baseY + 26 + gPauseItemsCurrentTab * 32);
} else {
selectedPosX = pause_items_get_pos_x(gPauseItemsCurrentPage, gPauseItemsSelectedIndex - gPauseItemsPages[gPauseItemsCurrentPage].listStart * gPauseItemsPages[gPauseItemsCurrentPage].numCols);
selectedPosY = pause_items_get_pos_y(gPauseItemsCurrentPage, gPauseItemsSelectedIndex - gPauseItemsPages[gPauseItemsCurrentPage].listStart * gPauseItemsPages[gPauseItemsCurrentPage].numCols);
cursorOffsetX = pause_items_scroll_offset_x(selectedPosX);
cursorOffsetY = pause_items_scroll_offset_y(selectedPosY);
if (cursorOffsetY < 0) {
cursorOffsetY = 0;
} else if (cursorOffsetY > 112) {
cursorOffsetY = 112;
}
if (gPauseItemsCurrentScrollPos != gPauseItemsTargetScrollPos) {
pause_set_cursor_pos_immediate(WINDOW_ID_PAUSE_ITEMS, baseX + 85 + cursorOffsetX, baseY + 23 + cursorOffsetY);
} else {
pause_set_cursor_pos(WINDOW_ID_PAUSE_ITEMS, baseX + 85 + cursorOffsetX, baseY + 23 + cursorOffsetY);
}
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel render_hud_element
/* D92FC 80142BFC 27BDFCF8 */ addiu $sp, $sp, -0x308
/* D9300 80142C00 AFB702E4 */ sw $s7, 0x2E4($sp)
/* D9304 80142C04 0080B82D */ daddu $s7, $a0, $zero
/* D9308 80142C08 AFBF02EC */ sw $ra, 0x2EC($sp)
/* D930C 80142C0C AFBE02E8 */ sw $fp, 0x2E8($sp)
/* D9310 80142C10 AFB602E0 */ sw $s6, 0x2E0($sp)
/* D9314 80142C14 AFB502DC */ sw $s5, 0x2DC($sp)
/* D9318 80142C18 AFB402D8 */ sw $s4, 0x2D8($sp)
/* D931C 80142C1C AFB302D4 */ sw $s3, 0x2D4($sp)
/* D9320 80142C20 AFB202D0 */ sw $s2, 0x2D0($sp)
/* D9324 80142C24 AFB102CC */ sw $s1, 0x2CC($sp)
/* D9328 80142C28 AFB002C8 */ sw $s0, 0x2C8($sp)
/* D932C 80142C2C F7B80300 */ sdc1 $f24, 0x300($sp)
/* D9330 80142C30 F7B602F8 */ sdc1 $f22, 0x2F8($sp)
/* D9334 80142C34 F7B402F0 */ sdc1 $f20, 0x2F0($sp)
/* D9338 80142C38 8EE20000 */ lw $v0, 0x0($s7)
/* D933C 80142C3C 30428000 */ andi $v0, $v0, 0x8000
/* D9340 80142C40 1040000C */ beqz $v0, .L80142C74
/* D9344 80142C44 3C05E300 */ lui $a1, (0xE3001201 >> 16)
/* D9348 80142C48 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* D934C 80142C4C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* D9350 80142C50 8C620000 */ lw $v0, 0x0($v1)
/* D9354 80142C54 34A51201 */ ori $a1, $a1, (0xE3001201 & 0xFFFF)
/* D9358 80142C58 0040202D */ daddu $a0, $v0, $zero
/* D935C 80142C5C 24420008 */ addiu $v0, $v0, 0x8
/* D9360 80142C60 AC620000 */ sw $v0, 0x0($v1)
/* D9364 80142C64 24023000 */ addiu $v0, $zero, 0x3000
/* D9368 80142C68 AC850000 */ sw $a1, 0x0($a0)
/* D936C 80142C6C 08050B26 */ j .L80142C98
/* D9370 80142C70 AC820004 */ sw $v0, 0x4($a0)
.L80142C74:
/* D9374 80142C74 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* D9378 80142C78 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* D937C 80142C7C 8C820000 */ lw $v0, 0x0($a0)
/* D9380 80142C80 34A51201 */ ori $a1, $a1, (0xE3001201 & 0xFFFF)
/* D9384 80142C84 0040182D */ daddu $v1, $v0, $zero
/* D9388 80142C88 24420008 */ addiu $v0, $v0, 0x8
/* D938C 80142C8C AC820000 */ sw $v0, 0x0($a0)
/* D9390 80142C90 AC650000 */ sw $a1, 0x0($v1)
/* D9394 80142C94 AC600004 */ sw $zero, 0x4($v1)
.L80142C98:
/* D9398 80142C98 8EE30000 */ lw $v1, 0x0($s7)
/* D939C 80142C9C 30620100 */ andi $v0, $v1, 0x100
/* D93A0 80142CA0 14400005 */ bnez $v0, .L80142CB8
/* D93A4 80142CA4 3C020010 */ lui $v0, (0x100000 >> 16)
/* D93A8 80142CA8 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* D93AC 80142CAC 4481A000 */ mtc1 $at, $f20
/* D93B0 80142CB0 08050B51 */ j .L80142D44
/* D93B4 80142CB4 4600A606 */ mov.s $f24, $f20
.L80142CB8:
/* D93B8 80142CB8 00621024 */ and $v0, $v1, $v0
/* D93BC 80142CBC 14400011 */ bnez $v0, .L80142D04
/* D93C0 80142CC0 00000000 */ nop
/* D93C4 80142CC4 82E30046 */ lb $v1, 0x46($s7)
/* D93C8 80142CC8 3C048015 */ lui $a0, %hi(gHudElementSizes)
/* D93CC 80142CCC 2484EFCC */ addiu $a0, $a0, %lo(gHudElementSizes)
/* D93D0 80142CD0 00031040 */ sll $v0, $v1, 1
/* D93D4 80142CD4 00431021 */ addu $v0, $v0, $v1
/* D93D8 80142CD8 00021040 */ sll $v0, $v0, 1
/* D93DC 80142CDC 00441021 */ addu $v0, $v0, $a0
/* D93E0 80142CE0 84430000 */ lh $v1, 0x0($v0)
/* D93E4 80142CE4 84420002 */ lh $v0, 0x2($v0)
/* D93E8 80142CE8 4483C000 */ mtc1 $v1, $f24
/* D93EC 80142CEC 00000000 */ nop
/* D93F0 80142CF0 4680C620 */ cvt.s.w $f24, $f24
/* D93F4 80142CF4 4482A000 */ mtc1 $v0, $f20
/* D93F8 80142CF8 00000000 */ nop
/* D93FC 80142CFC 08050B49 */ j .L80142D24
/* D9400 80142D00 4680A520 */ cvt.s.w $f20, $f20
.L80142D04:
/* D9404 80142D04 92E2004E */ lbu $v0, 0x4E($s7)
/* D9408 80142D08 92E3004F */ lbu $v1, 0x4F($s7)
/* D940C 80142D0C 4482C000 */ mtc1 $v0, $f24
/* D9410 80142D10 00000000 */ nop
/* D9414 80142D14 4680C620 */ cvt.s.w $f24, $f24
/* D9418 80142D18 4483A000 */ mtc1 $v1, $f20
/* D941C 80142D1C 00000000 */ nop
/* D9420 80142D20 4680A520 */ cvt.s.w $f20, $f20
.L80142D24:
/* D9424 80142D24 C6E00028 */ lwc1 $f0, 0x28($s7)
/* D9428 80142D28 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* D942C 80142D2C 44811000 */ mtc1 $at, $f2
/* D9430 80142D30 4600C603 */ div.s $f24, $f24, $f0
/* D9434 80142D34 C6E0002C */ lwc1 $f0, 0x2C($s7)
/* D9438 80142D38 46181603 */ div.s $f24, $f2, $f24
/* D943C 80142D3C 4600A503 */ div.s $f20, $f20, $f0
/* D9440 80142D40 46141503 */ div.s $f20, $f2, $f20
.L80142D44:
/* D9444 80142D44 8EE20000 */ lw $v0, 0x0($s7)
/* D9448 80142D48 3C030010 */ lui $v1, (0x100000 >> 16)
/* D944C 80142D4C 00431024 */ and $v0, $v0, $v1
/* D9450 80142D50 1440000C */ bnez $v0, .L80142D84
/* D9454 80142D54 00000000 */ nop
/* D9458 80142D58 82E20046 */ lb $v0, 0x46($s7)
/* D945C 80142D5C 3C048015 */ lui $a0, %hi(gHudElementSizes)
/* D9460 80142D60 2484EFCC */ addiu $a0, $a0, %lo(gHudElementSizes)
/* D9464 80142D64 00021840 */ sll $v1, $v0, 1
/* D9468 80142D68 00621821 */ addu $v1, $v1, $v0
/* D946C 80142D6C 00031840 */ sll $v1, $v1, 1
/* D9470 80142D70 00641821 */ addu $v1, $v1, $a0
/* D9474 80142D74 84760000 */ lh $s6, 0x0($v1)
/* D9478 80142D78 84630002 */ lh $v1, 0x2($v1)
/* D947C 80142D7C 08050B64 */ j .L80142D90
/* D9480 80142D80 AFA302B8 */ sw $v1, 0x2B8($sp)
.L80142D84:
/* D9484 80142D84 92F6004E */ lbu $s6, 0x4E($s7)
/* D9488 80142D88 92ED004F */ lbu $t5, 0x4F($s7)
/* D948C 80142D8C AFAD02B8 */ sw $t5, 0x2B8($sp)
.L80142D90:
/* D9490 80142D90 4480B000 */ mtc1 $zero, $f22
/* D9494 80142D94 27AE01E0 */ addiu $t6, $sp, 0x1E0
/* D9498 80142D98 AFAE02BC */ sw $t6, 0x2BC($sp)
/* D949C 80142D9C 8EFE001C */ lw $fp, 0x1C($s7)
/* D94A0 80142DA0 4407B000 */ mfc1 $a3, $f22
/* D94A4 80142DA4 87C30028 */ lh $v1, 0x28($fp)
/* D94A8 80142DA8 87C2002A */ lh $v0, 0x2A($fp)
/* D94AC 80142DAC 44833000 */ mtc1 $v1, $f6
/* D94B0 80142DB0 00000000 */ nop
/* D94B4 80142DB4 468031A0 */ cvt.s.w $f6, $f6
/* D94B8 80142DB8 00021023 */ negu $v0, $v0
/* D94BC 80142DBC 44053000 */ mfc1 $a1, $f6
/* D94C0 80142DC0 44823000 */ mtc1 $v0, $f6
/* D94C4 80142DC4 00000000 */ nop
/* D94C8 80142DC8 468031A0 */ cvt.s.w $f6, $f6
/* D94CC 80142DCC 44063000 */ mfc1 $a2, $f6
/* D94D0 80142DD0 0C019E40 */ jal guTranslateF
/* D94D4 80142DD4 01C0202D */ daddu $a0, $t6, $zero
/* D94D8 80142DD8 27AD0220 */ addiu $t5, $sp, 0x220
/* D94DC 80142DDC AFAD02C0 */ sw $t5, 0x2C0($sp)
/* D94E0 80142DE0 87C20028 */ lh $v0, 0x28($fp)
/* D94E4 80142DE4 4407B000 */ mfc1 $a3, $f22
/* D94E8 80142DE8 87C3002A */ lh $v1, 0x2A($fp)
/* D94EC 80142DEC 00021023 */ negu $v0, $v0
/* D94F0 80142DF0 44823000 */ mtc1 $v0, $f6
/* D94F4 80142DF4 00000000 */ nop
/* D94F8 80142DF8 468031A0 */ cvt.s.w $f6, $f6
/* D94FC 80142DFC 44053000 */ mfc1 $a1, $f6
/* D9500 80142E00 44833000 */ mtc1 $v1, $f6
/* D9504 80142E04 00000000 */ nop
/* D9508 80142E08 468031A0 */ cvt.s.w $f6, $f6
/* D950C 80142E0C 44063000 */ mfc1 $a2, $f6
/* D9510 80142E10 0C019E40 */ jal guTranslateF
/* D9514 80142E14 01A0202D */ daddu $a0, $t5, $zero
/* D9518 80142E18 86E2003C */ lh $v0, 0x3C($s7)
/* D951C 80142E1C 82E30040 */ lb $v1, 0x40($s7)
/* D9520 80142E20 82E40042 */ lb $a0, 0x42($s7)
/* D9524 80142E24 C7C00004 */ lwc1 $f0, 0x4($fp)
/* D9528 80142E28 3C014024 */ lui $at, (0x40240000 >> 16)
/* D952C 80142E2C 44812800 */ mtc1 $at, $f5
/* D9530 80142E30 44802000 */ mtc1 $zero, $f4
/* D9534 80142E34 00431021 */ addu $v0, $v0, $v1
/* D9538 80142E38 00441021 */ addu $v0, $v0, $a0
/* D953C 80142E3C 44821000 */ mtc1 $v0, $f2
/* D9540 80142E40 00000000 */ nop
/* D9544 80142E44 468010A0 */ cvt.s.w $f2, $f2
/* D9548 80142E48 46001080 */ add.s $f2, $f2, $f0
/* D954C 80142E4C 86E2003E */ lh $v0, 0x3E($s7)
/* D9550 80142E50 82E30041 */ lb $v1, 0x41($s7)
/* D9554 80142E54 82E40043 */ lb $a0, 0x43($s7)
/* D9558 80142E58 C7C00008 */ lwc1 $f0, 0x8($fp)
/* D955C 80142E5C 00021023 */ negu $v0, $v0
/* D9560 80142E60 00431023 */ subu $v0, $v0, $v1
/* D9564 80142E64 00441021 */ addu $v0, $v0, $a0
/* D9568 80142E68 44051000 */ mfc1 $a1, $f2
/* D956C 80142E6C 44821000 */ mtc1 $v0, $f2
/* D9570 80142E70 00000000 */ nop
/* D9574 80142E74 468010A0 */ cvt.s.w $f2, $f2
/* D9578 80142E78 82E20044 */ lb $v0, 0x44($s7)
/* D957C 80142E7C 46001080 */ add.s $f2, $f2, $f0
/* D9580 80142E80 44820000 */ mtc1 $v0, $f0
/* D9584 80142E84 00000000 */ nop
/* D9588 80142E88 46800021 */ cvt.d.w $f0, $f0
/* D958C 80142E8C 46240003 */ div.d $f0, $f0, $f4
/* D9590 80142E90 44061000 */ mfc1 $a2, $f2
/* D9594 80142E94 C7C2000C */ lwc1 $f2, 0xC($fp)
/* D9598 80142E98 46200007 */ neg.d $f0, $f0
/* D959C 80142E9C 460010A1 */ cvt.d.s $f2, $f2
/* D95A0 80142EA0 46220000 */ add.d $f0, $f0, $f2
/* D95A4 80142EA4 27B401A0 */ addiu $s4, $sp, 0x1A0
/* D95A8 80142EA8 46200020 */ cvt.s.d $f0, $f0
/* D95AC 80142EAC 44070000 */ mfc1 $a3, $f0
/* D95B0 80142EB0 0C019E40 */ jal guTranslateF
/* D95B4 80142EB4 0280202D */ daddu $a0, $s4, $zero
/* D95B8 80142EB8 C6E20030 */ lwc1 $f2, 0x30($s7)
/* D95BC 80142EBC 46181102 */ mul.s $f4, $f2, $f24
/* D95C0 80142EC0 00000000 */ nop
/* D95C4 80142EC4 46141082 */ mul.s $f2, $f2, $f20
/* D95C8 80142EC8 00000000 */ nop
/* D95CC 80142ECC C7C0001C */ lwc1 $f0, 0x1C($fp)
/* D95D0 80142ED0 46002102 */ mul.s $f4, $f4, $f0
/* D95D4 80142ED4 00000000 */ nop
/* D95D8 80142ED8 C7C00020 */ lwc1 $f0, 0x20($fp)
/* D95DC 80142EDC 3C150001 */ lui $s5, (0x11630 >> 16)
/* D95E0 80142EE0 46001082 */ mul.s $f2, $f2, $f0
/* D95E4 80142EE4 00000000 */ nop
/* D95E8 80142EE8 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF)
/* D95EC 80142EEC 27B30260 */ addiu $s3, $sp, 0x260
/* D95F0 80142EF0 8FC70024 */ lw $a3, 0x24($fp)
/* D95F4 80142EF4 44052000 */ mfc1 $a1, $f4
/* D95F8 80142EF8 44061000 */ mfc1 $a2, $f2
/* D95FC 80142EFC 0C019DF0 */ jal guScaleF
/* D9600 80142F00 0260202D */ daddu $a0, $s3, $zero
/* D9604 80142F04 27B20120 */ addiu $s2, $sp, 0x120
/* D9608 80142F08 E7B60010 */ swc1 $f22, 0x10($sp)
/* D960C 80142F0C 8FC50014 */ lw $a1, 0x14($fp)
/* D9610 80142F10 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* D9614 80142F14 4481A000 */ mtc1 $at, $f20
/* D9618 80142F18 4406B000 */ mfc1 $a2, $f22
/* D961C 80142F1C 4407A000 */ mfc1 $a3, $f20
/* D9620 80142F20 0C019EC8 */ jal guRotateF
/* D9624 80142F24 0240202D */ daddu $a0, $s2, $zero
/* D9628 80142F28 27B10160 */ addiu $s1, $sp, 0x160
/* D962C 80142F2C E7B40010 */ swc1 $f20, 0x10($sp)
/* D9630 80142F30 8FC50018 */ lw $a1, 0x18($fp)
/* D9634 80142F34 4406B000 */ mfc1 $a2, $f22
/* D9638 80142F38 4407B000 */ mfc1 $a3, $f22
/* D963C 80142F3C 0C019EC8 */ jal guRotateF
/* D9640 80142F40 0220202D */ daddu $a0, $s1, $zero
/* D9644 80142F44 27B000E0 */ addiu $s0, $sp, 0xE0
/* D9648 80142F48 E7B60010 */ swc1 $f22, 0x10($sp)
/* D964C 80142F4C 8FC50010 */ lw $a1, 0x10($fp)
/* D9650 80142F50 4406A000 */ mfc1 $a2, $f20
/* D9654 80142F54 4407B000 */ mfc1 $a3, $f22
/* D9658 80142F58 0C019EC8 */ jal guRotateF
/* D965C 80142F5C 0200202D */ daddu $a0, $s0, $zero
/* D9660 80142F60 0220202D */ daddu $a0, $s1, $zero
/* D9664 80142F64 0200282D */ daddu $a1, $s0, $zero
/* D9668 80142F68 0C019D80 */ jal guMtxCatF
/* D966C 80142F6C 27A60020 */ addiu $a2, $sp, 0x20
/* D9670 80142F70 27A40020 */ addiu $a0, $sp, 0x20
/* D9674 80142F74 0240282D */ daddu $a1, $s2, $zero
/* D9678 80142F78 27B000A0 */ addiu $s0, $sp, 0xA0
/* D967C 80142F7C 0C019D80 */ jal guMtxCatF
/* D9680 80142F80 0200302D */ daddu $a2, $s0, $zero
/* D9684 80142F84 0260202D */ daddu $a0, $s3, $zero
/* D9688 80142F88 8FA502BC */ lw $a1, 0x2BC($sp)
/* D968C 80142F8C 0C019D80 */ jal guMtxCatF
/* D9690 80142F90 27A60020 */ addiu $a2, $sp, 0x20
/* D9694 80142F94 27A40020 */ addiu $a0, $sp, 0x20
/* D9698 80142F98 0200282D */ daddu $a1, $s0, $zero
/* D969C 80142F9C 27B00060 */ addiu $s0, $sp, 0x60
/* D96A0 80142FA0 0C019D80 */ jal guMtxCatF
/* D96A4 80142FA4 0200302D */ daddu $a2, $s0, $zero
/* D96A8 80142FA8 0200202D */ daddu $a0, $s0, $zero
/* D96AC 80142FAC 8FA502C0 */ lw $a1, 0x2C0($sp)
/* D96B0 80142FB0 0C019D80 */ jal guMtxCatF
/* D96B4 80142FB4 27A60020 */ addiu $a2, $sp, 0x20
/* D96B8 80142FB8 27A40020 */ addiu $a0, $sp, 0x20
/* D96BC 80142FBC 0280282D */ daddu $a1, $s4, $zero
/* D96C0 80142FC0 0C019D80 */ jal guMtxCatF
/* D96C4 80142FC4 0200302D */ daddu $a2, $s0, $zero
/* D96C8 80142FC8 0200202D */ daddu $a0, $s0, $zero
/* D96CC 80142FCC 3C108007 */ lui $s0, %hi(gMatrixListPos)
/* D96D0 80142FD0 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos)
/* D96D4 80142FD4 3C11800A */ lui $s1, %hi(gDisplayContext)
/* D96D8 80142FD8 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext)
/* D96DC 80142FDC 96050000 */ lhu $a1, 0x0($s0)
/* D96E0 80142FE0 8E220000 */ lw $v0, 0x0($s1)
/* D96E4 80142FE4 00052980 */ sll $a1, $a1, 6
/* D96E8 80142FE8 00B52821 */ addu $a1, $a1, $s5
/* D96EC 80142FEC 0C019D40 */ jal guMtxF2L
/* D96F0 80142FF0 00452821 */ addu $a1, $v0, $a1
/* D96F4 80142FF4 3C06DA38 */ lui $a2, (0xDA380002 >> 16)
/* D96F8 80142FF8 34C60002 */ ori $a2, $a2, (0xDA380002 & 0xFFFF)
/* D96FC 80142FFC 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* D9700 80143000 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* D9704 80143004 0000382D */ daddu $a3, $zero, $zero
/* D9708 80143008 8C620000 */ lw $v0, 0x0($v1)
/* D970C 8014300C 96040000 */ lhu $a0, 0x0($s0)
/* D9710 80143010 0040282D */ daddu $a1, $v0, $zero
/* D9714 80143014 24420008 */ addiu $v0, $v0, 0x8
/* D9718 80143018 AC620000 */ sw $v0, 0x0($v1)
/* D971C 8014301C 3082FFFF */ andi $v0, $a0, 0xFFFF
/* D9720 80143020 00021180 */ sll $v0, $v0, 6
/* D9724 80143024 ACA60000 */ sw $a2, 0x0($a1)
/* D9728 80143028 8E230000 */ lw $v1, 0x0($s1)
/* D972C 8014302C 00551021 */ addu $v0, $v0, $s5
/* D9730 80143030 00621821 */ addu $v1, $v1, $v0
/* D9734 80143034 3C028000 */ lui $v0, (0x80000000 >> 16)
/* D9738 80143038 00621821 */ addu $v1, $v1, $v0
/* D973C 8014303C ACA30004 */ sw $v1, 0x4($a1)
/* D9740 80143040 8EE30000 */ lw $v1, 0x0($s7)
/* D9744 80143044 24840001 */ addiu $a0, $a0, 0x1
/* D9748 80143048 A6040000 */ sh $a0, 0x0($s0)
/* D974C 8014304C 30624000 */ andi $v0, $v1, 0x4000
/* D9750 80143050 00E2202B */ sltu $a0, $a3, $v0
/* D9754 80143054 3C020008 */ lui $v0, (0x80000 >> 16)
/* D9758 80143058 00621824 */ and $v1, $v1, $v0
/* D975C 8014305C 24020001 */ addiu $v0, $zero, 0x1
/* D9760 80143060 14820002 */ bne $a0, $v0, .L8014306C
/* D9764 80143064 00E3182B */ sltu $v1, $a3, $v1
/* D9768 80143068 0062382B */ sltu $a3, $v1, $v0
.L8014306C:
/* D976C 8014306C 54800004 */ bnel $a0, $zero, .L80143080
/* D9770 80143070 24020001 */ addiu $v0, $zero, 0x1
/* D9774 80143074 50620001 */ beql $v1, $v0, .L8014307C
/* D9778 80143078 24070002 */ addiu $a3, $zero, 0x2
.L8014307C:
/* D977C 8014307C 24020001 */ addiu $v0, $zero, 0x1
.L80143080:
/* D9780 80143080 14820004 */ bne $a0, $v0, .L80143094
/* D9784 80143084 24020001 */ addiu $v0, $zero, 0x1
/* D9788 80143088 50640002 */ beql $v1, $a0, .L80143094
/* D978C 8014308C 24070002 */ addiu $a3, $zero, 0x2
/* D9790 80143090 24020001 */ addiu $v0, $zero, 0x1
.L80143094:
/* D9794 80143094 10E20005 */ beq $a3, $v0, .L801430AC
/* D9798 80143098 24020002 */ addiu $v0, $zero, 0x2
/* D979C 8014309C 10E20052 */ beq $a3, $v0, .L801431E8
/* D97A0 801430A0 3C03D838 */ lui $v1, (0xD8380002 >> 16)
/* D97A4 801430A4 08050D8F */ j .L8014363C
/* D97A8 801430A8 00000000 */ nop
.L801430AC:
/* D97AC 801430AC 8EE30000 */ lw $v1, 0x0($s7)
/* D97B0 801430B0 3C020002 */ lui $v0, (0x20000 >> 16)
/* D97B4 801430B4 00621024 */ and $v0, $v1, $v0
/* D97B8 801430B8 10400013 */ beqz $v0, .L80143108
/* D97BC 801430BC 30620020 */ andi $v0, $v1, 0x20
/* D97C0 801430C0 1040000A */ beqz $v0, .L801430EC
/* D97C4 801430C4 0000202D */ daddu $a0, $zero, $zero
/* D97C8 801430C8 24050007 */ addiu $a1, $zero, 0x7
/* D97CC 801430CC 240600FF */ addiu $a2, $zero, 0xFF
/* D97D0 801430D0 00C0102D */ daddu $v0, $a2, $zero
/* D97D4 801430D4 AFA20010 */ sw $v0, 0x10($sp)
/* D97D8 801430D8 92E2004A */ lbu $v0, 0x4A($s7)
/* D97DC 801430DC 00C0382D */ daddu $a3, $a2, $zero
/* D97E0 801430E0 AFA00018 */ sw $zero, 0x18($sp)
/* D97E4 801430E4 08050C54 */ j .L80143150
/* D97E8 801430E8 AFA20014 */ sw $v0, 0x14($sp)
.L801430EC:
/* D97EC 801430EC 0080282D */ daddu $a1, $a0, $zero
/* D97F0 801430F0 0080302D */ daddu $a2, $a0, $zero
/* D97F4 801430F4 0080382D */ daddu $a3, $a0, $zero
/* D97F8 801430F8 AFA00010 */ sw $zero, 0x10($sp)
/* D97FC 801430FC AFA00014 */ sw $zero, 0x14($sp)
/* D9800 80143100 08050C54 */ j .L80143150
/* D9804 80143104 AFA00018 */ sw $zero, 0x18($sp)
.L80143108:
/* D9808 80143108 1040000A */ beqz $v0, .L80143134
/* D980C 8014310C 24050007 */ addiu $a1, $zero, 0x7
/* D9810 80143110 240200FF */ addiu $v0, $zero, 0xFF
/* D9814 80143114 AFA20010 */ sw $v0, 0x10($sp)
/* D9818 80143118 92E2004A */ lbu $v0, 0x4A($s7)
/* D981C 8014311C 240600FF */ addiu $a2, $zero, 0xFF
/* D9820 80143120 AFA00018 */ sw $zero, 0x18($sp)
/* D9824 80143124 AFA20014 */ sw $v0, 0x14($sp)
/* D9828 80143128 8FC40000 */ lw $a0, 0x0($fp)
/* D982C 8014312C 08050C54 */ j .L80143150
/* D9830 80143130 00C0382D */ daddu $a3, $a2, $zero
.L80143134:
/* D9834 80143134 0000282D */ daddu $a1, $zero, $zero
/* D9838 80143138 00A0302D */ daddu $a2, $a1, $zero
/* D983C 8014313C AFA00010 */ sw $zero, 0x10($sp)
/* D9840 80143140 AFA00014 */ sw $zero, 0x14($sp)
/* D9844 80143144 AFA00018 */ sw $zero, 0x18($sp)
/* D9848 80143148 8FC40000 */ lw $a0, 0x0($fp)
/* D984C 8014314C 00A0382D */ daddu $a3, $a1, $zero
.L80143150:
/* D9850 80143150 0C04EAA7 */ jal imgfx_update
/* D9854 80143154 00000000 */ nop
/* D9858 80143158 8EE20010 */ lw $v0, 0x10($s7)
/* D985C 8014315C 8FAE02B8 */ lw $t6, 0x2B8($sp)
/* D9860 80143160 AFA202A0 */ sw $v0, 0x2A0($sp)
/* D9864 80143164 00161023 */ negu $v0, $s6
/* D9868 80143168 00021FC2 */ srl $v1, $v0, 31
/* D986C 8014316C 00431021 */ addu $v0, $v0, $v1
/* D9870 80143170 8EE40014 */ lw $a0, 0x14($s7)
/* D9874 80143174 00021043 */ sra $v0, $v0, 1
/* D9878 80143178 A7A202AC */ sh $v0, 0x2AC($sp)
/* D987C 8014317C 000E17C2 */ srl $v0, $t6, 31
/* D9880 80143180 01C21021 */ addu $v0, $t6, $v0
/* D9884 80143184 97AD02BA */ lhu $t5, 0x2BA($sp)
/* D9888 80143188 00021043 */ sra $v0, $v0, 1
/* D988C 8014318C A7A202AE */ sh $v0, 0x2AE($sp)
/* D9890 80143190 240200FF */ addiu $v0, $zero, 0xFF
/* D9894 80143194 A7B602A8 */ sh $s6, 0x2A8($sp)
/* D9898 80143198 A3A202B0 */ sb $v0, 0x2B0($sp)
/* D989C 8014319C A7AD02AA */ sh $t5, 0x2AA($sp)
/* D98A0 801431A0 AFA402A4 */ sw $a0, 0x2A4($sp)
/* D98A4 801431A4 8EE30000 */ lw $v1, 0x0($s7)
/* D98A8 801431A8 3C020002 */ lui $v0, (0x20000 >> 16)
/* D98AC 801431AC 00621024 */ and $v0, $v1, $v0
/* D98B0 801431B0 10400006 */ beqz $v0, .L801431CC
/* D98B4 801431B4 3C020080 */ lui $v0, (0x800000 >> 16)
/* D98B8 801431B8 00621024 */ and $v0, $v1, $v0
/* D98BC 801431BC 14400004 */ bnez $v0, .L801431D0
/* D98C0 801431C0 0000202D */ daddu $a0, $zero, $zero
/* D98C4 801431C4 08050C75 */ j .L801431D4
/* D98C8 801431C8 27A502A0 */ addiu $a1, $sp, 0x2A0
.L801431CC:
/* D98CC 801431CC 8FC40000 */ lw $a0, 0x0($fp)
.L801431D0:
/* D98D0 801431D0 27A502A0 */ addiu $a1, $sp, 0x2A0
.L801431D4:
/* D98D4 801431D4 24060040 */ addiu $a2, $zero, 0x40
/* D98D8 801431D8 0C04EBDC */ jal imgfx_appendGfx_component
/* D98DC 801431DC 27A70060 */ addiu $a3, $sp, 0x60
/* D98E0 801431E0 08050D8F */ j .L8014363C
/* D98E4 801431E4 3C03D838 */ lui $v1, (0xD8380002 >> 16)
.L801431E8:
/* D98E8 801431E8 3C0AFC11 */ lui $t2, (0xFC11B223 >> 16)
/* D98EC 801431EC 354AB223 */ ori $t2, $t2, (0xFC11B223 & 0xFFFF)
/* D98F0 801431F0 3C09FF67 */ lui $t1, (0xFF67FFFF >> 16)
/* D98F4 801431F4 3529FFFF */ ori $t1, $t1, (0xFF67FFFF & 0xFFFF)
/* D98F8 801431F8 3C078016 */ lui $a3, %hi(D_80159180)
/* D98FC 801431FC 24E79180 */ addiu $a3, $a3, %lo(D_80159180)
/* D9900 80143200 3C0C800A */ lui $t4, %hi(gMainGfxPos)
/* D9904 80143204 258CA66C */ addiu $t4, $t4, %lo(gMainGfxPos)
/* D9908 80143208 3C068015 */ lui $a2, %hi(D_8014F0C8)
/* D990C 8014320C 24C6F0C8 */ addiu $a2, $a2, %lo(D_8014F0C8)
/* D9910 80143210 8CE50000 */ lw $a1, 0x0($a3)
/* D9914 80143214 8D8B0000 */ lw $t3, 0x0($t4)
/* D9918 80143218 8CE20000 */ lw $v0, 0x0($a3)
/* D991C 8014321C 8CE30000 */ lw $v1, 0x0($a3)
/* D9920 80143220 00052980 */ sll $a1, $a1, 6
/* D9924 80143224 24A50030 */ addiu $a1, $a1, 0x30
/* D9928 80143228 03C52821 */ addu $a1, $fp, $a1
/* D992C 8014322C 00021180 */ sll $v0, $v0, 6
/* D9930 80143230 03C21021 */ addu $v0, $fp, $v0
/* D9934 80143234 00031980 */ sll $v1, $v1, 6
/* D9938 80143238 03C31821 */ addu $v1, $fp, $v1
/* D993C 8014323C 0160402D */ daddu $t0, $t3, $zero
/* D9940 80143240 8CCF0000 */ lw $t7, 0x0($a2)
/* D9944 80143244 8CD80004 */ lw $t8, 0x4($a2)
/* D9948 80143248 8CCD0008 */ lw $t5, 0x8($a2)
/* D994C 8014324C 8CCE000C */ lw $t6, 0xC($a2)
/* D9950 80143250 AC4F0030 */ sw $t7, 0x30($v0)
/* D9954 80143254 AC580034 */ sw $t8, 0x34($v0)
/* D9958 80143258 AC4D0038 */ sw $t5, 0x38($v0)
/* D995C 8014325C AC4E003C */ sw $t6, 0x3C($v0)
/* D9960 80143260 8CE40000 */ lw $a0, 0x0($a3)
/* D9964 80143264 256B0008 */ addiu $t3, $t3, 0x8
/* D9968 80143268 8CCF0010 */ lw $t7, 0x10($a2)
/* D996C 8014326C 8CD80014 */ lw $t8, 0x14($a2)
/* D9970 80143270 8CCD0018 */ lw $t5, 0x18($a2)
/* D9974 80143274 8CCE001C */ lw $t6, 0x1C($a2)
/* D9978 80143278 AC6F0040 */ sw $t7, 0x40($v1)
/* D997C 8014327C AC780044 */ sw $t8, 0x44($v1)
/* D9980 80143280 AC6D0048 */ sw $t5, 0x48($v1)
/* D9984 80143284 AC6E004C */ sw $t6, 0x4C($v1)
/* D9988 80143288 8CE20000 */ lw $v0, 0x0($a3)
/* D998C 8014328C 00042180 */ sll $a0, $a0, 6
/* D9990 80143290 03C42021 */ addu $a0, $fp, $a0
/* D9994 80143294 00021180 */ sll $v0, $v0, 6
/* D9998 80143298 03C21021 */ addu $v0, $fp, $v0
/* D999C 8014329C 8CCF0020 */ lw $t7, 0x20($a2)
/* D99A0 801432A0 8CD80024 */ lw $t8, 0x24($a2)
/* D99A4 801432A4 8CCD0028 */ lw $t5, 0x28($a2)
/* D99A8 801432A8 8CCE002C */ lw $t6, 0x2C($a2)
/* D99AC 801432AC AC8F0050 */ sw $t7, 0x50($a0)
/* D99B0 801432B0 AC980054 */ sw $t8, 0x54($a0)
/* D99B4 801432B4 AC8D0058 */ sw $t5, 0x58($a0)
/* D99B8 801432B8 AC8E005C */ sw $t6, 0x5C($a0)
/* D99BC 801432BC 8CCF0030 */ lw $t7, 0x30($a2)
/* D99C0 801432C0 8CD80034 */ lw $t8, 0x34($a2)
/* D99C4 801432C4 8CCD0038 */ lw $t5, 0x38($a2)
/* D99C8 801432C8 8CCE003C */ lw $t6, 0x3C($a2)
/* D99CC 801432CC AC4F0060 */ sw $t7, 0x60($v0)
/* D99D0 801432D0 AC580064 */ sw $t8, 0x64($v0)
/* D99D4 801432D4 AC4D0068 */ sw $t5, 0x68($v0)
/* D99D8 801432D8 AC4E006C */ sw $t6, 0x6C($v0)
/* D99DC 801432DC 00163023 */ negu $a2, $s6
/* D99E0 801432E0 000617C2 */ srl $v0, $a2, 31
/* D99E4 801432E4 00C23021 */ addu $a2, $a2, $v0
/* D99E8 801432E8 00063043 */ sra $a2, $a2, 1
/* D99EC 801432EC A4A60000 */ sh $a2, 0x0($a1)
/* D99F0 801432F0 8FAF02B8 */ lw $t7, 0x2B8($sp)
/* D99F4 801432F4 00A0202D */ daddu $a0, $a1, $zero
/* D99F8 801432F8 A4A00004 */ sh $zero, 0x4($a1)
/* D99FC 801432FC A4A00008 */ sh $zero, 0x8($a1)
/* D9A00 80143300 000F1823 */ negu $v1, $t7
/* D9A04 80143304 000317C2 */ srl $v0, $v1, 31
/* D9A08 80143308 00621821 */ addu $v1, $v1, $v0
/* D9A0C 8014330C 00031843 */ sra $v1, $v1, 1
/* D9A10 80143310 000F3940 */ sll $a3, $t7, 5
/* D9A14 80143314 A4A30002 */ sh $v1, 0x2($a1)
/* D9A18 80143318 A4A7000A */ sh $a3, 0xA($a1)
/* D9A1C 8014331C 24A50010 */ addiu $a1, $a1, 0x10
/* D9A20 80143320 001617C2 */ srl $v0, $s6, 31
/* D9A24 80143324 02C21021 */ addu $v0, $s6, $v0
/* D9A28 80143328 00021043 */ sra $v0, $v0, 1
/* D9A2C 8014332C 2442FFFF */ addiu $v0, $v0, -0x1
/* D9A30 80143330 A4A30002 */ sh $v1, 0x2($a1)
/* D9A34 80143334 00161940 */ sll $v1, $s6, 5
/* D9A38 80143338 A4A20000 */ sh $v0, 0x0($a1)
/* D9A3C 8014333C A4A00004 */ sh $zero, 0x4($a1)
/* D9A40 80143340 A4A30008 */ sh $v1, 0x8($a1)
/* D9A44 80143344 A4A7000A */ sh $a3, 0xA($a1)
/* D9A48 80143348 A4820020 */ sh $v0, 0x20($a0)
/* D9A4C 8014334C 000F17C2 */ srl $v0, $t7, 31
/* D9A50 80143350 01E21021 */ addu $v0, $t7, $v0
/* D9A54 80143354 00021043 */ sra $v0, $v0, 1
/* D9A58 80143358 2442FFFF */ addiu $v0, $v0, -0x1
/* D9A5C 8014335C A4820022 */ sh $v0, 0x22($a0)
/* D9A60 80143360 A4820032 */ sh $v0, 0x32($a0)
/* D9A64 80143364 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* D9A68 80143368 A4800024 */ sh $zero, 0x24($a0)
/* D9A6C 8014336C A4830028 */ sh $v1, 0x28($a0)
/* D9A70 80143370 A480002A */ sh $zero, 0x2A($a0)
/* D9A74 80143374 A4860030 */ sh $a2, 0x30($a0)
/* D9A78 80143378 A4800034 */ sh $zero, 0x34($a0)
/* D9A7C 8014337C A4800038 */ sh $zero, 0x38($a0)
/* D9A80 80143380 A480003A */ sh $zero, 0x3A($a0)
/* D9A84 80143384 AD8B0000 */ sw $t3, 0x0($t4)
/* D9A88 80143388 AD020000 */ sw $v0, 0x0($t0)
/* D9A8C 8014338C 25620008 */ addiu $v0, $t3, 0x8
/* D9A90 80143390 AD000004 */ sw $zero, 0x4($t0)
/* D9A94 80143394 AD820000 */ sw $v0, 0x0($t4)
/* D9A98 80143398 25620010 */ addiu $v0, $t3, 0x10
/* D9A9C 8014339C AD6A0000 */ sw $t2, 0x0($t3)
/* D9AA0 801433A0 AD690004 */ sw $t1, 0x4($t3)
/* D9AA4 801433A4 AD820000 */ sw $v0, 0x0($t4)
/* D9AA8 801433A8 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* D9AAC 801433AC AD620008 */ sw $v0, 0x8($t3)
/* D9AB0 801433B0 92E2004B */ lbu $v0, 0x4B($s7)
/* D9AB4 801433B4 92E3004C */ lbu $v1, 0x4C($s7)
/* D9AB8 801433B8 92E4004D */ lbu $a0, 0x4D($s7)
/* D9ABC 801433BC 00021600 */ sll $v0, $v0, 24
/* D9AC0 801433C0 00031C00 */ sll $v1, $v1, 16
/* D9AC4 801433C4 00431025 */ or $v0, $v0, $v1
/* D9AC8 801433C8 00042200 */ sll $a0, $a0, 8
/* D9ACC 801433CC 92E3004A */ lbu $v1, 0x4A($s7)
/* D9AD0 801433D0 00441025 */ or $v0, $v0, $a0
/* D9AD4 801433D4 00431025 */ or $v0, $v0, $v1
/* D9AD8 801433D8 AD62000C */ sw $v0, 0xC($t3)
/* D9ADC 801433DC 8EE30000 */ lw $v1, 0x0($s7)
/* D9AE0 801433E0 30620020 */ andi $v0, $v1, 0x20
/* D9AE4 801433E4 1440000C */ bnez $v0, .L80143418
/* D9AE8 801433E8 3C020080 */ lui $v0, (0x800000 >> 16)
/* D9AEC 801433EC 00621024 */ and $v0, $v1, $v0
/* D9AF0 801433F0 14400005 */ bnez $v0, .L80143408
/* D9AF4 801433F4 3C04E200 */ lui $a0, (0xE200001C >> 16)
/* D9AF8 801433F8 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF)
/* D9AFC 801433FC 3C030F0A */ lui $v1, (0xF0A7008 >> 16)
/* D9B00 80143400 08050D10 */ j .L80143440
/* D9B04 80143404 34637008 */ ori $v1, $v1, (0xF0A7008 & 0xFFFF)
.L80143408:
/* D9B08 80143408 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF)
/* D9B0C 8014340C 3C030055 */ lui $v1, (0x553048 >> 16)
/* D9B10 80143410 08050D10 */ j .L80143440
/* D9B14 80143414 34633048 */ ori $v1, $v1, (0x553048 & 0xFFFF)
.L80143418:
/* D9B18 80143418 00621024 */ and $v0, $v1, $v0
/* D9B1C 8014341C 14400005 */ bnez $v0, .L80143434
/* D9B20 80143420 3C04E200 */ lui $a0, (0xE200001C >> 16)
/* D9B24 80143424 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF)
/* D9B28 80143428 3C030050 */ lui $v1, (0x504340 >> 16)
/* D9B2C 8014342C 08050D10 */ j .L80143440
/* D9B30 80143430 34634340 */ ori $v1, $v1, (0x504340 & 0xFFFF)
.L80143434:
/* D9B34 80143434 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF)
/* D9B38 80143438 3C030050 */ lui $v1, (0x504348 >> 16)
/* D9B3C 8014343C 34634348 */ ori $v1, $v1, (0x504348 & 0xFFFF)
.L80143440:
/* D9B40 80143440 25620018 */ addiu $v0, $t3, 0x18
/* D9B44 80143444 AD820000 */ sw $v0, 0x0($t4)
/* D9B48 80143448 AD640010 */ sw $a0, 0x10($t3)
/* D9B4C 8014344C AD630014 */ sw $v1, 0x14($t3)
/* D9B50 80143450 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* D9B54 80143454 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* D9B58 80143458 02C0382D */ daddu $a3, $s6, $zero
/* D9B5C 8014345C 3C02FD70 */ lui $v0, (0xFD700000 >> 16)
/* D9B60 80143460 8C660000 */ lw $a2, 0x0($v1)
/* D9B64 80143464 3C080700 */ lui $t0, (0x7000000 >> 16)
/* D9B68 80143468 00C0282D */ daddu $a1, $a2, $zero
/* D9B6C 8014346C 24C60008 */ addiu $a2, $a2, 0x8
/* D9B70 80143470 AC660000 */ sw $a2, 0x0($v1)
/* D9B74 80143474 ACA20000 */ sw $v0, 0x0($a1)
/* D9B78 80143478 24C20008 */ addiu $v0, $a2, 0x8
/* D9B7C 8014347C AC620000 */ sw $v0, 0x0($v1)
/* D9B80 80143480 24C20010 */ addiu $v0, $a2, 0x10
/* D9B84 80143484 AC620000 */ sw $v0, 0x0($v1)
/* D9B88 80143488 8EE40010 */ lw $a0, 0x10($s7)
/* D9B8C 8014348C 24C20018 */ addiu $v0, $a2, 0x18
/* D9B90 80143490 AC620000 */ sw $v0, 0x0($v1)
/* D9B94 80143494 3C02F570 */ lui $v0, (0xF5700000 >> 16)
/* D9B98 80143498 ACA40004 */ sw $a0, 0x4($a1)
/* D9B9C 8014349C ACC20000 */ sw $v0, 0x0($a2)
/* D9BA0 801434A0 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* D9BA4 801434A4 ACC20008 */ sw $v0, 0x8($a2)
/* D9BA8 801434A8 3C02F300 */ lui $v0, (0xF3000000 >> 16)
/* D9BAC 801434AC ACC80004 */ sw $t0, 0x4($a2)
/* D9BB0 801434B0 ACC0000C */ sw $zero, 0xC($a2)
/* D9BB4 801434B4 06C10002 */ bgez $s6, .L801434C0
/* D9BB8 801434B8 ACC20010 */ sw $v0, 0x10($a2)
/* D9BBC 801434BC 26C70007 */ addiu $a3, $s6, 0x7
.L801434C0:
/* D9BC0 801434C0 000728C3 */ sra $a1, $a3, 3
/* D9BC4 801434C4 18A00002 */ blez $a1, .L801434D0
/* D9BC8 801434C8 24030800 */ addiu $v1, $zero, 0x800
/* D9BCC 801434CC 24A307FF */ addiu $v1, $a1, 0x7FF
.L801434D0:
/* D9BD0 801434D0 8FAD02B8 */ lw $t5, 0x2B8($sp)
/* D9BD4 801434D4 02CD0018 */ mult $s6, $t5
/* D9BD8 801434D8 00007012 */ mflo $t6
/* D9BDC 801434DC 25C20001 */ addiu $v0, $t6, 0x1
/* D9BE0 801434E0 00021043 */ sra $v0, $v0, 1
/* D9BE4 801434E4 2444FFFF */ addiu $a0, $v0, -0x1
/* D9BE8 801434E8 28820800 */ slti $v0, $a0, 0x800
/* D9BEC 801434EC 50400001 */ beql $v0, $zero, .L801434F4
/* D9BF0 801434F0 240407FF */ addiu $a0, $zero, 0x7FF
.L801434F4:
/* D9BF4 801434F4 30820FFF */ andi $v0, $a0, 0xFFF
/* D9BF8 801434F8 00021300 */ sll $v0, $v0, 12
/* D9BFC 801434FC 18A0000D */ blez $a1, .L80143534
/* D9C00 80143500 00482025 */ or $a0, $v0, $t0
/* D9C04 80143504 14A00002 */ bnez $a1, .L80143510
/* D9C08 80143508 0065001A */ div $zero, $v1, $a1
/* D9C0C 8014350C 0007000D */ break 7
.L80143510:
/* D9C10 80143510 2401FFFF */ addiu $at, $zero, -0x1
/* D9C14 80143514 14A10004 */ bne $a1, $at, .L80143528
/* D9C18 80143518 3C018000 */ lui $at, (0x80000000 >> 16)
/* D9C1C 8014351C 14610002 */ bne $v1, $at, .L80143528
/* D9C20 80143520 00000000 */ nop
/* D9C24 80143524 0006000D */ break 6
.L80143528:
/* D9C28 80143528 00001012 */ mflo $v0
/* D9C2C 8014352C 08050D4E */ j .L80143538
/* D9C30 80143530 30420FFF */ andi $v0, $v0, 0xFFF
.L80143534:
/* D9C34 80143534 30620FFF */ andi $v0, $v1, 0xFFF
.L80143538:
/* D9C38 80143538 00821025 */ or $v0, $a0, $v0
/* D9C3C 8014353C ACC20014 */ sw $v0, 0x14($a2)
/* D9C40 80143540 3C06E300 */ lui $a2, (0xE3001001 >> 16)
/* D9C44 80143544 34C61001 */ ori $a2, $a2, (0xE3001001 & 0xFFFF)
/* D9C48 80143548 3C070100 */ lui $a3, (0x1004008 >> 16)
/* D9C4C 8014354C 34E74008 */ ori $a3, $a3, (0x1004008 & 0xFFFF)
/* D9C50 80143550 3C080500 */ lui $t0, (0x5000204 >> 16)
/* D9C54 80143554 35080204 */ ori $t0, $t0, (0x5000204 & 0xFFFF)
/* D9C58 80143558 3C090500 */ lui $t1, (0x5000406 >> 16)
/* D9C5C 8014355C 3C05800A */ lui $a1, %hi(gMainGfxPos)
/* D9C60 80143560 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos)
/* D9C64 80143564 35290406 */ ori $t1, $t1, (0x5000406 & 0xFFFF)
/* D9C68 80143568 8CA40000 */ lw $a0, 0x0($a1)
/* D9C6C 8014356C 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* D9C70 80143570 0080182D */ daddu $v1, $a0, $zero
/* D9C74 80143574 24840008 */ addiu $a0, $a0, 0x8
/* D9C78 80143578 ACA40000 */ sw $a0, 0x0($a1)
/* D9C7C 8014357C AC620000 */ sw $v0, 0x0($v1)
/* D9C80 80143580 24820008 */ addiu $v0, $a0, 0x8
/* D9C84 80143584 AC600004 */ sw $zero, 0x4($v1)
/* D9C88 80143588 ACA20000 */ sw $v0, 0x0($a1)
/* D9C8C 8014358C 26C20007 */ addiu $v0, $s6, 0x7
/* D9C90 80143590 000210C3 */ sra $v0, $v0, 3
/* D9C94 80143594 304201FF */ andi $v0, $v0, 0x1FF
/* D9C98 80143598 00021240 */ sll $v0, $v0, 9
/* D9C9C 8014359C 3C03F568 */ lui $v1, (0xF5680000 >> 16)
/* D9CA0 801435A0 00431025 */ or $v0, $v0, $v1
/* D9CA4 801435A4 AC820000 */ sw $v0, 0x0($a0)
/* D9CA8 801435A8 24820010 */ addiu $v0, $a0, 0x10
/* D9CAC 801435AC AC800004 */ sw $zero, 0x4($a0)
/* D9CB0 801435B0 ACA20000 */ sw $v0, 0x0($a1)
/* D9CB4 801435B4 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* D9CB8 801435B8 26C3FFFF */ addiu $v1, $s6, -0x1
/* D9CBC 801435BC 00031880 */ sll $v1, $v1, 2
/* D9CC0 801435C0 30630FFF */ andi $v1, $v1, 0xFFF
/* D9CC4 801435C4 AC820008 */ sw $v0, 0x8($a0)
/* D9CC8 801435C8 8FAD02B8 */ lw $t5, 0x2B8($sp)
/* D9CCC 801435CC 00031B00 */ sll $v1, $v1, 12
/* D9CD0 801435D0 25A2FFFF */ addiu $v0, $t5, -0x1
/* D9CD4 801435D4 00021080 */ sll $v0, $v0, 2
/* D9CD8 801435D8 30420FFF */ andi $v0, $v0, 0xFFF
/* D9CDC 801435DC 00621825 */ or $v1, $v1, $v0
/* D9CE0 801435E0 24820018 */ addiu $v0, $a0, 0x18
/* D9CE4 801435E4 AC83000C */ sw $v1, 0xC($a0)
/* D9CE8 801435E8 ACA20000 */ sw $v0, 0x0($a1)
/* D9CEC 801435EC 3C028016 */ lui $v0, %hi(D_80159180)
/* D9CF0 801435F0 8C429180 */ lw $v0, %lo(D_80159180)($v0)
/* D9CF4 801435F4 24830020 */ addiu $v1, $a0, 0x20
/* D9CF8 801435F8 AC860010 */ sw $a2, 0x10($a0)
/* D9CFC 801435FC AC800014 */ sw $zero, 0x14($a0)
/* D9D00 80143600 ACA30000 */ sw $v1, 0x0($a1)
/* D9D04 80143604 AC870018 */ sw $a3, 0x18($a0)
/* D9D08 80143608 00021180 */ sll $v0, $v0, 6
/* D9D0C 8014360C 24420030 */ addiu $v0, $v0, 0x30
/* D9D10 80143610 03C21021 */ addu $v0, $fp, $v0
/* D9D14 80143614 AC82001C */ sw $v0, 0x1C($a0)
/* D9D18 80143618 24820028 */ addiu $v0, $a0, 0x28
/* D9D1C 8014361C ACA20000 */ sw $v0, 0x0($a1)
/* D9D20 80143620 24820030 */ addiu $v0, $a0, 0x30
/* D9D24 80143624 AC880020 */ sw $t0, 0x20($a0)
/* D9D28 80143628 AC800024 */ sw $zero, 0x24($a0)
/* D9D2C 8014362C ACA20000 */ sw $v0, 0x0($a1)
/* D9D30 80143630 AC890028 */ sw $t1, 0x28($a0)
/* D9D34 80143634 AC80002C */ sw $zero, 0x2C($a0)
/* D9D38 80143638 3C03D838 */ lui $v1, (0xD8380002 >> 16)
.L8014363C:
/* D9D3C 8014363C 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* D9D40 80143640 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* D9D44 80143644 8C820000 */ lw $v0, 0x0($a0)
/* D9D48 80143648 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF)
/* D9D4C 8014364C 0040282D */ daddu $a1, $v0, $zero
/* D9D50 80143650 24420008 */ addiu $v0, $v0, 0x8
/* D9D54 80143654 AC820000 */ sw $v0, 0x0($a0)
/* D9D58 80143658 ACA30000 */ sw $v1, 0x0($a1)
/* D9D5C 8014365C 24030040 */ addiu $v1, $zero, 0x40
/* D9D60 80143660 ACA30004 */ sw $v1, 0x4($a1)
/* D9D64 80143664 24430008 */ addiu $v1, $v0, 0x8
/* D9D68 80143668 AC830000 */ sw $v1, 0x0($a0)
/* D9D6C 8014366C 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* D9D70 80143670 AC430000 */ sw $v1, 0x0($v0)
/* D9D74 80143674 AC400004 */ sw $zero, 0x4($v0)
/* D9D78 80143678 8FBF02EC */ lw $ra, 0x2EC($sp)
/* D9D7C 8014367C 8FBE02E8 */ lw $fp, 0x2E8($sp)
/* D9D80 80143680 8FB702E4 */ lw $s7, 0x2E4($sp)
/* D9D84 80143684 8FB602E0 */ lw $s6, 0x2E0($sp)
/* D9D88 80143688 8FB502DC */ lw $s5, 0x2DC($sp)
/* D9D8C 8014368C 8FB402D8 */ lw $s4, 0x2D8($sp)
/* D9D90 80143690 8FB302D4 */ lw $s3, 0x2D4($sp)
/* D9D94 80143694 8FB202D0 */ lw $s2, 0x2D0($sp)
/* D9D98 80143698 8FB102CC */ lw $s1, 0x2CC($sp)
/* D9D9C 8014369C 8FB002C8 */ lw $s0, 0x2C8($sp)
/* D9DA0 801436A0 D7B80300 */ ldc1 $f24, 0x300($sp)
/* D9DA4 801436A4 D7B602F8 */ ldc1 $f22, 0x2F8($sp)
/* D9DA8 801436A8 D7B402F0 */ ldc1 $f20, 0x2F0($sp)
/* D9DAC 801436AC 03E00008 */ jr $ra
/* D9DB0 801436B0 27BD0308 */ addiu $sp, $sp, 0x308
### DECOMPILED C INSTRUCTIONS:
void render_hud_elements_backUI(void) {
s32 i, count, j;
s32 sortedElements[ARRAY_COUNT(*gHudElements)];
s32 el1, el2;
s32 texSizeX, texSizeY;
s32 drawSizeX, drawSizeY, offsetX, offsetY;
HudElement* hudElement;
D_80159180++;
if (D_80159180 > 2) {
D_80159180 = 0;
}
gSPDisplayList(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(gHudElementsDLBackUI));
count = 0;
for (i = 0; i < ARRAY_COUNT(*gHudElements); i++) {
hudElement = (*gHudElements)[i];
if (hudElement != NULL) {
s32 flags = hudElement->flags;
if (flags && !(flags & HUD_ELEMENT_FLAG_DISABLED)) {
if (!(flags & (HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_TRANSFORM | HUD_ELEMENT_FLAG_200000 | HUD_ELEMENT_FLAG_10000000 | HUD_ELEMENT_FLAG_40000000))) {
if (!(flags & HUD_ELEMENT_FLAG_FRONTUI) && hudElement->drawSizePreset >= 0) {
sortedElements[count++] = i;
}
}
}
}
}
for (i = 0; i < count - 1; i++) {
for (j = i + 1; j < count; j++) {
el1 = sortedElements[i];
el2 = sortedElements[j];
if ((*gHudElements)[el1]->worldPosOffset.z < (*gHudElements)[el2]->worldPosOffset.z) {
sortedElements[i] = el2;
sortedElements[j] = el1;
}
}
}
for (i = 0; i < count; i++) {
hudElement = (*gHudElements)[sortedElements[i]];
if (hudElement->readPos == NULL) {
break;
}
if (!(hudElement->flags & HUD_ELEMENT_FLAG_FIXEDSCALE)) {
if (!(hudElement->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) {
texSizeX = gHudElementSizes[hudElement->tileSizePreset].width;
texSizeY = gHudElementSizes[hudElement->tileSizePreset].height;
} else {
texSizeX = hudElement->customImageSize.x;
texSizeY = hudElement->customImageSize.y;
}
if (!(hudElement->flags & HUD_ELEMENT_FLAG_SCALED)) {
if (!(hudElement->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) {
drawSizeX = gHudElementSizes[hudElement->drawSizePreset].width;
drawSizeY = gHudElementSizes[hudElement->drawSizePreset].height;
offsetX = -drawSizeX / 2;
offsetY = -drawSizeY / 2;
} else {
// TODO find better match
do {
drawSizeX = hudElement->customDrawSize.x;
drawSizeY = hudElement->customDrawSize.y;
offsetX = -drawSizeX / 2;
} while (0);
offsetY = -drawSizeY / 2;
}
} else {
drawSizeX = hudElement->sizeX;
drawSizeY = hudElement->sizeY;
offsetX = -drawSizeX / 2;
offsetY = -drawSizeY / 2;
}
if (!(hudElement->flags & HUD_ELEMENT_FLAG_REPEATED)) {
if (hudElement->flags & HUD_ELEMENT_FLAG_DROP_SHADOW) {
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, TRUE);
}
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, FALSE);
} else {
if (hudElement->flags & HUD_ELEMENT_FLAG_DROP_SHADOW) {
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
}
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
}
} else {
f32 xScaled, yScaled;
if (!(hudElement->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) {
texSizeX = gHudElementSizes[hudElement->tileSizePreset].width;
texSizeY = gHudElementSizes[hudElement->tileSizePreset].height;
} else {
texSizeX = hudElement->customImageSize.x;
texSizeY = hudElement->customImageSize.y;
}
drawSizeX = hudElement->unkImgScale[0];
drawSizeY = hudElement->unkImgScale[1];
offsetX = -hudElement->unkImgScale[0] / 2;
offsetY = -hudElement->unkImgScale[1] / 2;
xScaled = (f32) drawSizeX / (f32) texSizeX;
yScaled = (f32) drawSizeY / (f32) texSizeY;
xScaled = 1.0f / xScaled;
yScaled = 1.0f / yScaled;
hudElement->widthScale = X10(xScaled);
hudElement->heightScale = X10(yScaled);
if (hudElement->flags & HUD_ELEMENT_FLAG_DROP_SHADOW) {
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
}
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel parasol_get_npc
/* E27F40 802B6000 27BDFFB0 */ addiu $sp, $sp, -0x50
/* E27F44 802B6004 AFB00030 */ sw $s0, 0x30($sp)
/* E27F48 802B6008 3C108011 */ lui $s0, %hi(gPlayerStatus)
/* E27F4C 802B600C 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus)
/* E27F50 802B6010 AFBF003C */ sw $ra, 0x3C($sp)
/* E27F54 802B6014 AFB20038 */ sw $s2, 0x38($sp)
.L802B6018:
/* E27F58 802B6018 AFB10034 */ sw $s1, 0x34($sp)
/* E27F5C 802B601C F7B60048 */ sdc1 $f22, 0x48($sp)
/* E27F60 802B6020 F7B40040 */ sdc1 $f20, 0x40($sp)
/* E27F64 802B6024 8E040000 */ lw $a0, 0x0($s0)
/* E27F68 802B6028 0481002F */ bgez $a0, .L802B60E8
/* E27F6C 802B602C 3C027FFF */ lui $v0, (0x7FFFFFFF >> 16)
/* E27F70 802B6030 3442FFFF */ ori $v0, $v0, (0x7FFFFFFF & 0xFFFF)
/* E27F74 802B6034 3C030080 */ lui $v1, (0x800008 >> 16)
/* E27F78 802B6038 34630008 */ ori $v1, $v1, (0x800008 & 0xFFFF)
/* E27F7C 802B603C 00821024 */ and $v0, $a0, $v0
.L802B6040:
/* E27F80 802B6040 00431025 */ or $v0, $v0, $v1
.L802B6044:
/* E27F84 802B6044 8E030004 */ lw $v1, 0x4($s0)
glabel action_hammer_play_hit_fx
/* E27F88 802B6048 AE020000 */ sw $v0, 0x0($s0)
.L802B604C:
/* E27F8C 802B604C 34420800 */ ori $v0, $v0, 0x800
.L802B6050:
/* E27F90 802B6050 AE020000 */ sw $v0, 0x0($s0)
/* E27F94 802B6054 34630004 */ ori $v1, $v1, 0x4
.L802B6058:
/* E27F98 802B6058 AE030004 */ sw $v1, 0x4($s0)
/* E27F9C 802B605C 820300BF */ lb $v1, 0xBF($s0)
glabel action_update_sliding
/* E27FA0 802B6060 24020001 */ addiu $v0, $zero, 0x1
/* E27FA4 802B6064 54620005 */ bnel $v1, $v0, .L802B607C
.L802B6068:
/* E27FA8 802B6068 A20000B6 */ sb $zero, 0xB6($s0)
/* E27FAC 802B606C 24020014 */ addiu $v0, $zero, 0x14
/* E27FB0 802B6070 A20200B6 */ sb $v0, 0xB6($s0)
.L802B6074:
/* E27FB4 802B6074 24020002 */ addiu $v0, $zero, 0x2
/* E27FB8 802B6078 A6020008 */ sh $v0, 0x8($s0)
glabel .L802B607C
/* E27FBC 802B607C C600002C */ lwc1 $f0, 0x2C($s0)
.L802B6080:
/* E27FC0 802B6080 3C03800B */ lui $v1, %hi(gCameras)
/* E27FC4 802B6084 24631D80 */ addiu $v1, $v1, %lo(gCameras)
/* E27FC8 802B6088 AE000054 */ sw $zero, 0x54($s0)
.L802B608C:
/* E27FCC 802B608C 94620002 */ lhu $v0, 0x2($v1)
.L802B6090:
/* E27FD0 802B6090 3C01802B */ lui $at, %hi(D_802B68B0)
.L802B6094:
/* E27FD4 802B6094 AC2068B0 */ sw $zero, %lo(D_802B68B0)($at)
/* E27FD8 802B6098 3C01802B */ lui $at, %hi(D_802B68BC)
glabel action_update_state_23
/* E27FDC 802B609C E42068BC */ swc1 $f0, %lo(D_802B68BC)($at)
/* E27FE0 802B60A0 3C0142B4 */ lui $at, (0x42B40000 >> 16)
glabel action_update_use_spinning_flower
/* E27FE4 802B60A4 44810000 */ mtc1 $at, $f0
.L802B60A8:
/* E27FE8 802B60A8 34420003 */ ori $v0, $v0, 0x3
.L802B60AC:
/* E27FEC 802B60AC A4620002 */ sh $v0, 0x2($v1)
/* E27FF0 802B60B0 3C01802B */ lui $at, %hi(D_802B68B4)
glabel action_update_jump
/* E27FF4 802B60B4 E42068B4 */ swc1 $f0, %lo(D_802B68B4)($at)
/* E27FF8 802B60B8 0C03A8CD */ jal subtract_hp
/* E27FFC 802B60BC 24040001 */ addiu $a0, $zero, 0x1
/* E28000 802B60C0 0C03A5D8 */ jal open_status_bar_long
/* E28004 802B60C4 00000000 */ nop
.L802B60C8:
/* E28008 802B60C8 240400E8 */ addiu $a0, $zero, 0xE8
/* E2800C 802B60CC 3C03800A */ lui $v1, %hi(gOverrideFlags)
glabel .L802B60D0
/* E28010 802B60D0 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags)
.L802B60D4:
/* E28014 802B60D4 8C620000 */ lw $v0, 0x0($v1)
/* E28018 802B60D8 0000282D */ daddu $a1, $zero, $zero
/* E2801C 802B60DC 34420040 */ ori $v0, $v0, 0x40
/* E28020 802B60E0 0C052736 */ jal sfx_play_sound_at_player
/* E28024 802B60E4 AC620000 */ sw $v0, 0x0($v1)
.L802B60E8:
/* E28028 802B60E8 820300B6 */ lb $v1, 0xB6($s0)
.L802B60EC:
/* E2802C 802B60EC 2C620016 */ sltiu $v0, $v1, 0x16
.L802B60F0:
/* E28030 802B60F0 104001C5 */ beqz $v0, .L802B6808
glabel .L802B60F4
/* E28034 802B60F4 00031080 */ sll $v0, $v1, 2
/* E28038 802B60F8 3C01802B */ lui $at, %hi(jtbl_802B6850)
/* E2803C 802B60FC 00220821 */ addu $at, $at, $v0
.L802B6100:
/* E28040 802B6100 8C226850 */ lw $v0, %lo(jtbl_802B6850)($at)
.L802B6104:
/* E28044 802B6104 00400008 */ jr $v0
.L802B6108:
/* E28048 802B6108 00000000 */ nop
glabel .L802B610C
/* E2804C 802B610C 96020008 */ lhu $v0, 0x8($s0)
.L802B6110:
/* E28050 802B6110 2403FFFF */ addiu $v1, $zero, -0x1
/* E28054 802B6114 2442FFFF */ addiu $v0, $v0, -0x1
.L802B6118:
/* E28058 802B6118 A6020008 */ sh $v0, 0x8($s0)
/* E2805C 802B611C 00021400 */ sll $v0, $v0, 16
glabel action_update_parasol
/* E28060 802B6120 00021403 */ sra $v0, $v0, 16
.L802B6124:
/* E28064 802B6124 504301B8 */ beql $v0, $v1, .L802B6808
.L802B6128:
/* E28068 802B6128 A20000B6 */ sb $zero, 0xB6($s0)
/* E2806C 802B612C 080ADA02 */ j .L802B6808
/* E28070 802B6130 00000000 */ nop
glabel .L802B6134
/* E28074 802B6134 96020008 */ lhu $v0, 0x8($s0)
/* E28078 802B6138 2403FFFF */ addiu $v1, $zero, -0x1
.L802B613C:
/* E2807C 802B613C 2442FFFF */ addiu $v0, $v0, -0x1
.L802B6140:
/* E28080 802B6140 A6020008 */ sh $v0, 0x8($s0)
.L802B6144:
/* E28084 802B6144 00021400 */ sll $v0, $v0, 16
/* E28088 802B6148 00021403 */ sra $v0, $v0, 16
.L802B614C:
/* E2808C 802B614C 50430001 */ beql $v0, $v1, .L802B6154
.L802B6150:
/* E28090 802B6150 A20000B6 */ sb $zero, 0xB6($s0)
.L802B6154:
/* E28094 802B6154 C600002C */ lwc1 $f0, 0x2C($s0)
.L802B6158:
/* E28098 802B6158 3C014080 */ lui $at, (0x40800000 >> 16)
.L802B615C:
/* E2809C 802B615C 44811000 */ mtc1 $at, $f2
/* E280A0 802B6160 00000000 */ nop
.L802B6164:
/* E280A4 802B6164 46020001 */ sub.s $f0, $f0, $f2
.L802B6168:
/* E280A8 802B6168 080ADA02 */ j .L802B6808
/* E280AC 802B616C E600002C */ swc1 $f0, 0x2C($s0)
glabel .L802B6170
/* E280B0 802B6170 820200BF */ lb $v0, 0xBF($s0)
glabel .L802B6174
/* E280B4 802B6174 24110001 */ addiu $s1, $zero, 0x1
/* E280B8 802B6178 1451000C */ bne $v0, $s1, .L802B61AC
.L802B617C:
/* E280BC 802B617C 3C040008 */ lui $a0, (0x80002 >> 16)
.L802B6180:
/* E280C0 802B6180 0000202D */ daddu $a0, $zero, $zero
glabel .L802B6184
/* E280C4 802B6184 8E050028 */ lw $a1, 0x28($s0)
.L802B6188:
/* E280C8 802B6188 8E06002C */ lw $a2, 0x2C($s0)
.L802B618C:
/* E280CC 802B618C 8E070030 */ lw $a3, 0x30($s0)
.L802B6190:
/* E280D0 802B6190 3C013F80 */ lui $at, (0x3F800000 >> 16)
.L802B6194:
/* E280D4 802B6194 44810000 */ mtc1 $at, $f0
glabel func_802B6198
/* E280D8 802B6198 24020028 */ addiu $v0, $zero, 0x28
/* E280DC 802B619C AFA20014 */ sw $v0, 0x14($sp)
.L802B61A0:
/* E280E0 802B61A0 0C01C1CC */ jal fx_smoke_burst
.L802B61A4:
/* E280E4 802B61A4 E7A00010 */ swc1 $f0, 0x10($sp)
.L802B61A8:
/* E280E8 802B61A8 3C040008 */ lui $a0, (0x80002 >> 16)
.L802B61AC:
/* E280EC 802B61AC 0C037FDE */ jal suggest_player_anim_always_forward
.L802B61B0:
/* E280F0 802B61B0 34840002 */ ori $a0, $a0, (0x80002 & 0xFFFF)
.L802B61B4:
/* E280F4 802B61B4 3C0141A0 */ lui $at, (0x41A00000 >> 16)
/* E280F8 802B61B8 44810000 */ mtc1 $at, $f0
/* E280FC 802B61BC 3C01437A */ lui $at, (0x437A0000 >> 16)
glabel func_802B61C0
/* E28100 802B61C0 44811000 */ mtc1 $at, $f2
/* E28104 802B61C4 3C01802B */ lui $at, %hi(D_802B68BC)
.L802B61C8:
/* E28108 802B61C8 C42468BC */ lwc1 $f4, %lo(D_802B68BC)($at)
.L802B61CC:
/* E2810C 802B61CC C6060028 */ lwc1 $f6, 0x28($s0)
/* E28110 802B61D0 C6080030 */ lwc1 $f8, 0x30($s0)
.L802B61D4:
/* E28114 802B61D4 C60A002C */ lwc1 $f10, 0x2C($s0)
.L802B61D8:
/* E28118 802B61D8 8E030000 */ lw $v1, 0x0($s0)
.L802B61DC:
/* E2811C 802B61DC 24020002 */ addiu $v0, $zero, 0x2
/* E28120 802B61E0 AE000074 */ sw $zero, 0x74($s0)
glabel func_802B61E4
/* E28124 802B61E4 A60000C0 */ sh $zero, 0xC0($s0)
.L802B61E8:
/* E28128 802B61E8 A60000C2 */ sh $zero, 0xC2($s0)
.L802B61EC:
/* E2812C 802B61EC A20200B6 */ sb $v0, 0xB6($s0)
.L802B61F0:
/* E28130 802B61F0 A6110008 */ sh $s1, 0x8($s0)
.L802B61F4:
/* E28134 802B61F4 34630002 */ ori $v1, $v1, 0x2
.L802B61F8:
/* E28138 802B61F8 E6000070 */ swc1 $f0, 0x70($s0)
.L802B61FC:
/* E2813C 802B61FC E6020078 */ swc1 $f2, 0x78($s0)
.L802B6200:
/* E28140 802B6200 E604007C */ swc1 $f4, 0x7C($s0)
.L802B6204:
/* E28144 802B6204 E606003C */ swc1 $f6, 0x3C($s0)
glabel .L802B6208
/* E28148 802B6208 E6080040 */ swc1 $f8, 0x40($s0)
/* E2814C 802B620C E60A004C */ swc1 $f10, 0x4C($s0)
.L802B6210:
/* E28150 802B6210 080ADA02 */ j .L802B6808
.L802B6214:
/* E28154 802B6214 AE030000 */ sw $v1, 0x0($s0)
glabel .L802B6218
/* E28158 802B6218 96020008 */ lhu $v0, 0x8($s0)
/* E2815C 802B621C 2442FFFF */ addiu $v0, $v0, -0x1
.L802B6220:
/* E28160 802B6220 A6020008 */ sh $v0, 0x8($s0)
.L802B6224:
/* E28164 802B6224 00021400 */ sll $v0, $v0, 16
glabel .L802B6228
/* E28168 802B6228 1C400177 */ bgtz $v0, .L802B6808
.L802B622C:
/* E2816C 802B622C 00000000 */ nop
glabel action_update_step_up_peach
/* E28170 802B6230 920200B6 */ lbu $v0, 0xB6($s0)
/* E28174 802B6234 080AD9ED */ j .L802B67B4
glabel .L802B6238
/* E28178 802B6238 24420001 */ addiu $v0, $v0, 0x1
glabel .L802B623C
/* E2817C 802B623C 820300BF */ lb $v1, 0xBF($s0)
glabel .L802B6240
/* E28180 802B6240 24020001 */ addiu $v0, $zero, 0x1
glabel .L802B6244
/* E28184 802B6244 1462000F */ bne $v1, $v0, .L802B6284
glabel .L802B6248
/* E28188 802B6248 00000000 */ nop
/* E2818C 802B624C 960200C0 */ lhu $v0, 0xC0($s0)
glabel .L802B6250
/* E28190 802B6250 30420001 */ andi $v0, $v0, 0x1
.L802B6254:
/* E28194 802B6254 1440000B */ bnez $v0, .L802B6284
glabel .L802B6258
/* E28198 802B6258 0000202D */ daddu $a0, $zero, $zero
.L802B625C:
/* E2819C 802B625C 8E050028 */ lw $a1, 0x28($s0)
/* E281A0 802B6260 8E06002C */ lw $a2, 0x2C($s0)
/* E281A4 802B6264 8E070030 */ lw $a3, 0x30($s0)
.L802B6268:
/* E281A8 802B6268 3C013F33 */ lui $at, (0x3F333333 >> 16)
.L802B626C:
/* E281AC 802B626C 34213333 */ ori $at, $at, (0x3F333333 & 0xFFFF)
/* E281B0 802B6270 44810000 */ mtc1 $at, $f0
.L802B6274:
/* E281B4 802B6274 24020012 */ addiu $v0, $zero, 0x12
glabel .L802B6278
/* E281B8 802B6278 AFA20014 */ sw $v0, 0x14($sp)
/* E281BC 802B627C 0C01C1CC */ jal fx_smoke_burst
.L802B6280:
/* E281C0 802B6280 E7A00010 */ swc1 $f0, 0x10($sp)
.L802B6284:
/* E281C4 802B6284 C600007C */ lwc1 $f0, 0x7C($s0)
glabel action_update_run
/* E281C8 802B6288 C6020078 */ lwc1 $f2, 0x78($s0)
/* E281CC 802B628C 46020080 */ add.s $f2, $f0, $f2
.L802B6290:
/* E281D0 802B6290 C600002C */ lwc1 $f0, 0x2C($s0)
glabel func_802B6294
/* E281D4 802B6294 4602003C */ c.lt.s $f0, $f2
glabel .L802B6298
/* E281D8 802B6298 00000000 */ nop
/* E281DC 802B629C 45000034 */ bc1f .L802B6370
/* E281E0 802B62A0 27A50018 */ addiu $a1, $sp, 0x18
glabel func_802B62A4
/* E281E4 802B62A4 3C12802B */ lui $s2, %hi(D_802B68B4)
.L802B62A8:
/* E281E8 802B62A8 265268B4 */ addiu $s2, $s2, %lo(D_802B68B4)
/* E281EC 802B62AC C64C0000 */ lwc1 $f12, 0x0($s2)
jtbl_802B62B0:
/* E281F0 802B62B0 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
.L802B62B4:
/* E281F4 802B62B4 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
glabel .L802B62B8
/* E281F8 802B62B8 4481B000 */ mtc1 $at, $f22
/* E281FC 802B62BC 00000000 */ nop
/* E28200 802B62C0 46166302 */ mul.s $f12, $f12, $f22
/* E28204 802B62C4 00000000 */ nop
.L802B62C8:
/* E28208 802B62C8 3C0143B4 */ lui $at, (0x43B40000 >> 16)
glabel action_update_peach_land
/* E2820C 802B62CC 4481A000 */ mtc1 $at, $f20
Munchlesia_LaunchVelocity:
/* E28210 802B62D0 27A6001C */ addiu $a2, $sp, 0x1C
Munchlesia_LateralVelocity:
/* E28214 802B62D4 0C00A82D */ jal sin_cos_rad
Munchlesia_LaunchAccel:
/* E28218 802B62D8 46146303 */ div.s $f12, $f12, $f20
Munchlesia_LaunchYaw:
/* E2821C 802B62DC C64C0000 */ lwc1 $f12, 0x0($s2)
D_802B62E0:
/* E28220 802B62E0 46166302 */ mul.s $f12, $f12, $f22
.L802B62E4:
/* E28224 802B62E4 00000000 */ nop
/* E28228 802B62E8 0C00A85B */ jal sin_rad
/* E2822C 802B62EC 46146303 */ div.s $f12, $f12, $f20
/* E28230 802B62F0 3C014180 */ lui $at, (0x41800000 >> 16)
/* E28234 802B62F4 44811000 */ mtc1 $at, $f2
glabel func_802B62F8
/* E28238 802B62F8 00000000 */ nop
.L802B62FC:
/* E2823C 802B62FC 46020002 */ mul.s $f0, $f0, $f2
D_802B6300:
/* E28240 802B6300 00000000 */ nop
/* E28244 802B6304 3C01BF80 */ lui $at, (0xBF800000 >> 16)
.L802B6308:
/* E28248 802B6308 44811000 */ mtc1 $at, $f2
.L802B630C:
/* E2824C 802B630C 3C11802B */ lui $s1, %hi(D_802B68B0)
.L802B6310:
/* E28250 802B6310 263168B0 */ addiu $s1, $s1, %lo(D_802B68B0)
/* E28254 802B6314 4602003C */ c.lt.s $f0, $f2
/* E28258 802B6318 00000000 */ nop
glabel .L802B631C
/* E2825C 802B631C 45000002 */ bc1f .L802B6328
.L802B6320:
/* E28260 802B6320 E6200000 */ swc1 $f0, 0x0($s1)
glabel .L802B6324
/* E28264 802B6324 E6220000 */ swc1 $f2, 0x0($s1)
.L802B6328:
/* E28268 802B6328 C604002C */ lwc1 $f4, 0x2C($s0)
glabel .L802B632C
/* E2826C 802B632C C6200000 */ lwc1 $f0, 0x0($s1)
.L802B6330:
/* E28270 802B6330 C6420000 */ lwc1 $f2, 0x0($s2)
/* E28274 802B6334 46002100 */ add.s $f4, $f4, $f0
.L802B6338:
/* E28278 802B6338 3C014040 */ lui $at, (0x40400000 >> 16)
/* E2827C 802B633C 44810000 */ mtc1 $at, $f0
.L802B6340:
/* E28280 802B6340 00000000 */ nop
/* E28284 802B6344 46001080 */ add.s $f2, $f2, $f0
glabel func_802B6348
/* E28288 802B6348 3C014334 */ lui $at, (0x43340000 >> 16)
/* E2828C 802B634C 44810000 */ mtc1 $at, $f0
PlayerTweesterPhysicsPtr:
/* E28290 802B6350 E604002C */ swc1 $f4, 0x2C($s0)
glabel .L802B6354
/* E28294 802B6354 4602003C */ c.lt.s $f0, $f2
/* E28298 802B6358 00000000 */ nop
.L802B635C:
/* E2829C 802B635C 4500012A */ bc1f .L802B6808
D_802B6360:
/* E282A0 802B6360 E6420000 */ swc1 $f2, 0x0($s2)
.L802B6364:
/* E282A4 802B6364 920200B6 */ lbu $v0, 0xB6($s0)
/* E282A8 802B6368 080AD9EC */ j .L802B67B0
.L802B636C:
/* E282AC 802B636C E6400000 */ swc1 $f0, 0x0($s2)
glabel .L802B6370
/* E282B0 802B6370 920200B6 */ lbu $v0, 0xB6($s0)
.L802B6374:
/* E282B4 802B6374 080AD9EC */ j .L802B67B0
/* E282B8 802B6378 E602002C */ swc1 $f2, 0x2C($s0)
glabel .L802B637C
/* E282BC 802B637C 820300BF */ lb $v1, 0xBF($s0)
/* E282C0 802B6380 24020001 */ addiu $v0, $zero, 0x1
/* E282C4 802B6384 14620011 */ bne $v1, $v0, .L802B63CC
/* E282C8 802B6388 27A40020 */ addiu $a0, $sp, 0x20
/* E282CC 802B638C 960200C0 */ lhu $v0, 0xC0($s0)
/* E282D0 802B6390 30420001 */ andi $v0, $v0, 0x1
glabel .L802B6394
/* E282D4 802B6394 1440000E */ bnez $v0, .L802B63D0
.L802B6398:
/* E282D8 802B6398 27A50024 */ addiu $a1, $sp, 0x24
.L802B639C:
/* E282DC 802B639C 0000202D */ daddu $a0, $zero, $zero
/* E282E0 802B63A0 8E050028 */ lw $a1, 0x28($s0)
/* E282E4 802B63A4 8E06002C */ lw $a2, 0x2C($s0)
.L802B63A8:
/* E282E8 802B63A8 8E070030 */ lw $a3, 0x30($s0)
.L802B63AC:
/* E282EC 802B63AC 3C013F33 */ lui $at, (0x3F333333 >> 16)
glabel .L802B63B0
/* E282F0 802B63B0 34213333 */ ori $at, $at, (0x3F333333 & 0xFFFF)
/* E282F4 802B63B4 44810000 */ mtc1 $at, $f0
/* E282F8 802B63B8 24020012 */ addiu $v0, $zero, 0x12
/* E282FC 802B63BC AFA20014 */ sw $v0, 0x14($sp)
.L802B63C0:
/* E28300 802B63C0 0C01C1CC */ jal fx_smoke_burst
.L802B63C4:
/* E28304 802B63C4 E7A00010 */ swc1 $f0, 0x10($sp)
.L802B63C8:
/* E28308 802B63C8 27A40020 */ addiu $a0, $sp, 0x20
.L802B63CC:
/* E2830C 802B63CC 27A50024 */ addiu $a1, $sp, 0x24
.L802B63D0:
/* E28310 802B63D0 0C0B27F5 */ jal get_lava_reset_pos
glabel action_update_first_strike
/* E28314 802B63D4 27A60028 */ addiu $a2, $sp, 0x28
.L802B63D8:
/* E28318 802B63D8 14400005 */ bnez $v0, .L802B63F0
glabel .L802B63DC
/* E2831C 802B63DC 00000000 */ nop
.L802B63E0:
/* E28320 802B63E0 C6000028 */ lwc1 $f0, 0x28($s0)
.L802B63E4:
/* E28324 802B63E4 C6020030 */ lwc1 $f2, 0x30($s0)
/* E28328 802B63E8 E7A00020 */ swc1 $f0, 0x20($sp)
/* E2832C 802B63EC E7A20028 */ swc1 $f2, 0x28($sp)
.L802B63F0:
/* E28330 802B63F0 C7A00020 */ lwc1 $f0, 0x20($sp)
.L802B63F4:
/* E28334 802B63F4 C602002C */ lwc1 $f2, 0x2C($s0)
/* E28338 802B63F8 3C013DEA */ lui $at, (0x3DEA161E >> 16)
/* E2833C 802B63FC 3421161E */ ori $at, $at, (0x3DEA161E & 0xFFFF)
.L802B6400:
/* E28340 802B6400 44812000 */ mtc1 $at, $f4
/* E28344 802B6404 3C01BE92 */ lui $at, (0xBE92FEC5 >> 16)
/* E28348 802B6408 3421FEC5 */ ori $at, $at, (0xBE92FEC5 & 0xFFFF)
.L802B640C:
/* E2834C 802B640C 44813000 */ mtc1 $at, $f6
/* E28350 802B6410 3C01BE3A */ lui $at, (0xBE3AACDA >> 16)
.L802B6414:
/* E28354 802B6414 3421ACDA */ ori $at, $at, (0xBE3AACDA & 0xFFFF)
.L802B6418:
/* E28358 802B6418 44814000 */ mtc1 $at, $f8
/* E2835C 802B641C 3C013C3C */ lui $at, (0x3C3CBE62 >> 16)
.L802B6420:
/* E28360 802B6420 3421BE62 */ ori $at, $at, (0x3C3CBE62 & 0xFFFF)
.L802B6424:
/* E28364 802B6424 44815000 */ mtc1 $at, $f10
.L802B6428:
/* E28368 802B6428 920300B6 */ lbu $v1, 0xB6($s0)
.L802B642C:
/* E2836C 802B642C 4600040D */ trunc.w.s $f16, $f0
D_802B6430:
/* E28370 802B6430 44028000 */ mfc1 $v0, $f16
/* E28374 802B6434 00000000 */ nop
/* E28378 802B6438 A6020016 */ sh $v0, 0x16($s0)
/* E2837C 802B643C C7A00028 */ lwc1 $f0, 0x28($sp)
/* E28380 802B6440 24630001 */ addiu $v1, $v1, 0x1
/* E28384 802B6444 E6020050 */ swc1 $f2, 0x50($s0)
.L802B6448:
/* E28388 802B6448 E6040070 */ swc1 $f4, 0x70($s0)
glabel action_update_peach_step_down_land
/* E2838C 802B644C E6060074 */ swc1 $f6, 0x74($s0)
.L802B6450:
/* E28390 802B6450 E6080078 */ swc1 $f8, 0x78($s0)
.L802B6454:
/* E28394 802B6454 E60A007C */ swc1 $f10, 0x7C($s0)
/* E28398 802B6458 A20300B6 */ sb $v1, 0xB6($s0)
/* E2839C 802B645C 4600040D */ trunc.w.s $f16, $f0
.L802B6460:
/* E283A0 802B6460 44028000 */ mfc1 $v0, $f16
.L802B6464:
/* E283A4 802B6464 080ADA02 */ j .L802B6808
/* E283A8 802B6468 A602001A */ sh $v0, 0x1A($s0)
glabel .L802B646C
/* E283AC 802B646C C60C0028 */ lwc1 $f12, 0x28($s0)
/* E283B0 802B6470 C60E0030 */ lwc1 $f14, 0x30($s0)
/* E283B4 802B6474 86020016 */ lh $v0, 0x16($s0)
glabel action_update_raise_arms
/* E283B8 802B6478 8603001A */ lh $v1, 0x1A($s0)
glabel action_update_peach_falling
/* E283BC 802B647C 44828000 */ mtc1 $v0, $f16
/* E283C0 802B6480 00000000 */ nop
/* E283C4 802B6484 46808420 */ cvt.s.w $f16, $f16
/* E283C8 802B6488 44068000 */ mfc1 $a2, $f16
.L802B648C:
/* E283CC 802B648C 44838000 */ mtc1 $v1, $f16
.L802B6490:
/* E283D0 802B6490 00000000 */ nop
.L802B6494:
/* E283D4 802B6494 46808420 */ cvt.s.w $f16, $f16
/* E283D8 802B6498 44078000 */ mfc1 $a3, $f16
/* E283DC 802B649C 0C00A720 */ jal atan2
.L802B64A0:
/* E283E0 802B64A0 00000000 */ nop
/* E283E4 802B64A4 86020016 */ lh $v0, 0x16($s0)
glabel .L802B64A8
/* E283E8 802B64A8 8603001A */ lh $v1, 0x1A($s0)
.L802B64AC:
/* E283EC 802B64AC 3C01802B */ lui $at, %hi(.L802B68B8)
/* E283F0 802B64B0 E42068B8 */ swc1 $f0, %lo(.L802B68B8)($at)
.L802B64B4:
/* E283F4 802B64B4 44826000 */ mtc1 $v0, $f12
/* E283F8 802B64B8 00000000 */ nop
/* E283FC 802B64BC 46806320 */ cvt.s.w $f12, $f12
/* E28400 802B64C0 44837000 */ mtc1 $v1, $f14
.L802B64C4:
/* E28404 802B64C4 00000000 */ nop
/* E28408 802B64C8 0C038022 */ jal get_xz_dist_to_player
.L802B64CC:
/* E2840C 802B64CC 468073A0 */ cvt.s.w $f14, $f14
.L802B64D0:
/* E28410 802B64D0 3C014190 */ lui $at, (0x41900000 >> 16)
.L802B64D4:
/* E28414 802B64D4 44811000 */ mtc1 $at, $f2
.L802B64D8:
/* E28418 802B64D8 920200B6 */ lbu $v0, 0xB6($s0)
glabel .L802B64DC
/* E2841C 802B64DC 46020003 */ div.s $f0, $f0, $f2
glabel .L802B64E0
/* E28420 802B64E0 24420001 */ addiu $v0, $v0, 0x1
/* E28424 802B64E4 E6000054 */ swc1 $f0, 0x54($s0)
/* E28428 802B64E8 080ADA02 */ j .L802B6808
.L802B64EC:
/* E2842C 802B64EC A20200B6 */ sb $v0, 0xB6($s0)
glabel .L802B64F0
/* E28430 802B64F0 C60C0028 */ lwc1 $f12, 0x28($s0)
/* E28434 802B64F4 C60E0030 */ lwc1 $f14, 0x30($s0)
.L802B64F8:
/* E28438 802B64F8 86020016 */ lh $v0, 0x16($s0)
/* E2843C 802B64FC 8603001A */ lh $v1, 0x1A($s0)
/* E28440 802B6500 44828000 */ mtc1 $v0, $f16
/* E28444 802B6504 00000000 */ nop
glabel action_update_pushing_block
/* E28448 802B6508 46808420 */ cvt.s.w $f16, $f16
.L802B650C:
/* E2844C 802B650C 44068000 */ mfc1 $a2, $f16
glabel .L802B6510
/* E28450 802B6510 44838000 */ mtc1 $v1, $f16
/* E28454 802B6514 00000000 */ nop
/* E28458 802B6518 46808420 */ cvt.s.w $f16, $f16
.L802B651C:
/* E2845C 802B651C 44078000 */ mfc1 $a3, $f16
.L802B6520:
/* E28460 802B6520 0C00A720 */ jal atan2
.L802B6524:
/* E28464 802B6524 00000000 */ nop
/* E28468 802B6528 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* E2846C 802B652C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
.L802B6530:
/* E28470 802B6530 44811000 */ mtc1 $at, $f2
.L802B6534:
/* E28474 802B6534 00000000 */ nop
/* E28478 802B6538 46020082 */ mul.s $f2, $f0, $f2
/* E2847C 802B653C 00000000 */ nop
/* E28480 802B6540 3C0143B4 */ lui $at, (0x43B40000 >> 16)
glabel .L802B6544
/* E28484 802B6544 44812000 */ mtc1 $at, $f4
glabel .L802B6548
/* E28488 802B6548 3C01802B */ lui $at, %hi(.L802B68B8)
/* E2848C 802B654C E42068B8 */ swc1 $f0, %lo(.L802B68B8)($at)
glabel func_802B6550
/* E28490 802B6550 46041503 */ div.s $f20, $f2, $f4
.L802B6554:
/* E28494 802B6554 0C00A85B */ jal sin_rad
/* E28498 802B6558 4600A306 */ mov.s $f12, $f20
/* E2849C 802B655C C6020054 */ lwc1 $f2, 0x54($s0)
/* E284A0 802B6560 46001102 */ mul.s $f4, $f2, $f0
/* E284A4 802B6564 00000000 */ nop
glabel .L802B6568
/* E284A8 802B6568 C6000028 */ lwc1 $f0, 0x28($s0)
.L802B656C:
/* E284AC 802B656C 44801000 */ mtc1 $zero, $f2
.L802B6570:
/* E284B0 802B6570 46040000 */ add.s $f0, $f0, $f4
.L802B6574:
/* E284B4 802B6574 AFA0002C */ sw $zero, 0x2C($sp)
/* E284B8 802B6578 4604103E */ c.le.s $f2, $f4
/* E284BC 802B657C 00000000 */ nop
.L802B6580:
/* E284C0 802B6580 45000008 */ bc1f .L802B65A4
/* E284C4 802B6584 E6000028 */ swc1 $f0, 0x28($s0)
/* E284C8 802B6588 86020016 */ lh $v0, 0x16($s0)
glabel .L802B658C
/* E284CC 802B658C 44821000 */ mtc1 $v0, $f2
.L802B6590:
/* E284D0 802B6590 00000000 */ nop
glabel .L802B6594
/* E284D4 802B6594 468010A0 */ cvt.s.w $f2, $f2
.L802B6598:
/* E284D8 802B6598 4600103E */ c.le.s $f2, $f0
.L802B659C:
/* E284DC 802B659C 080AD970 */ j .L802B65C0
/* E284E0 802B65A0 00000000 */ nop
glabel .L802B65A4
/* E284E4 802B65A4 86020016 */ lh $v0, 0x16($s0)
.L802B65A8:
/* E284E8 802B65A8 C6000028 */ lwc1 $f0, 0x28($s0)
/* E284EC 802B65AC 44821000 */ mtc1 $v0, $f2
/* E284F0 802B65B0 00000000 */ nop
glabel .L802B65B4
/* E284F4 802B65B4 468010A0 */ cvt.s.w $f2, $f2
.L802B65B8:
/* E284F8 802B65B8 4602003E */ c.le.s $f0, $f2
/* E284FC 802B65BC 00000000 */ nop
glabel .L802B65C0
/* E28500 802B65C0 45000003 */ bc1f .L802B65D0
/* E28504 802B65C4 24020001 */ addiu $v0, $zero, 0x1
/* E28508 802B65C8 E6020028 */ swc1 $f2, 0x28($s0)
glabel .L802B65CC
/* E2850C 802B65CC AFA2002C */ sw $v0, 0x2C($sp)
.L802B65D0:
/* E28510 802B65D0 0C00A874 */ jal cos_rad
/* E28514 802B65D4 4600A306 */ mov.s $f12, $f20
/* E28518 802B65D8 C6020054 */ lwc1 $f2, 0x54($s0)
.L802B65DC:
/* E2851C 802B65DC 46001102 */ mul.s $f4, $f2, $f0
.L802B65E0:
/* E28520 802B65E0 00000000 */ nop
.L802B65E4:
/* E28524 802B65E4 C6000030 */ lwc1 $f0, 0x30($s0)
glabel action_update_walk_peach
/* E28528 802B65E8 46040081 */ sub.s $f2, $f0, $f4
.L802B65EC:
/* E2852C 802B65EC 44800000 */ mtc1 $zero, $f0
.L802B65F0:
/* E28530 802B65F0 00000000 */ nop
/* E28534 802B65F4 4604003E */ c.le.s $f0, $f4
glabel func_802B65F8_E26D08
/* E28538 802B65F8 00000000 */ nop
/* E2853C 802B65FC 45000008 */ bc1f .L802B6620
/* E28540 802B6600 E6020030 */ swc1 $f2, 0x30($s0)
.L802B6604:
/* E28544 802B6604 8602001A */ lh $v0, 0x1A($s0)
/* E28548 802B6608 44820000 */ mtc1 $v0, $f0
glabel .L802B660C
/* E2854C 802B660C 00000000 */ nop
/* E28550 802B6610 46800020 */ cvt.s.w $f0, $f0
/* E28554 802B6614 4600103E */ c.le.s $f2, $f0
/* E28558 802B6618 080AD98E */ j action_update_talk
glabel .L802B661C
/* E2855C 802B661C 00000000 */ nop
.L802B6620:
/* E28560 802B6620 8602001A */ lh $v0, 0x1A($s0)
/* E28564 802B6624 44820000 */ mtc1 $v0, $f0
.L802B6628:
/* E28568 802B6628 00000000 */ nop
/* E2856C 802B662C 46800020 */ cvt.s.w $f0, $f0
.L802B6630:
/* E28570 802B6630 4602003E */ c.le.s $f0, $f2
glabel .L802B6634
/* E28574 802B6634 00000000 */ nop
glabel action_update_talk
/* E28578 802B6638 45000005 */ bc1f .L802B6650
/* E2857C 802B663C 00000000 */ nop
/* E28580 802B6640 8FA2002C */ lw $v0, 0x2C($sp)
glabel .L802B6644
/* E28584 802B6644 E6000030 */ swc1 $f0, 0x30($s0)
glabel func_802B6648_E27428
/* E28588 802B6648 24420001 */ addiu $v0, $v0, 0x1
.L802B664C:
/* E2858C 802B664C AFA2002C */ sw $v0, 0x2C($sp)
.L802B6650:
/* E28590 802B6650 8FA3002C */ lw $v1, 0x2C($sp)
glabel .L802B6654
/* E28594 802B6654 24020002 */ addiu $v0, $zero, 0x2
/* E28598 802B6658 1462006B */ bne $v1, $v0, .L802B6808
/* E2859C 802B665C 00000000 */ nop
glabel .L802B6660
/* E285A0 802B6660 920200B6 */ lbu $v0, 0xB6($s0)
/* E285A4 802B6664 080AD9ED */ j .L802B67B4
/* E285A8 802B6668 24420001 */ addiu $v0, $v0, 0x1
glabel .L802B666C
/* E285AC 802B666C 820300BF */ lb $v1, 0xBF($s0)
glabel .L802B6670
/* E285B0 802B6670 24020001 */ addiu $v0, $zero, 0x1
glabel .L802B6674
/* E285B4 802B6674 1462000F */ bne $v1, $v0, .L802B66B4
.L802B6678:
/* E285B8 802B6678 00000000 */ nop
/* E285BC 802B667C 960200C0 */ lhu $v0, 0xC0($s0)
glabel .L802B6680
/* E285C0 802B6680 30420001 */ andi $v0, $v0, 0x1
/* E285C4 802B6684 1440000B */ bnez $v0, .L802B66B4
/* E285C8 802B6688 0000202D */ daddu $a0, $zero, $zero
glabel func_802B668C
/* E285CC 802B668C 8E050028 */ lw $a1, 0x28($s0)
jtbl_802B6690:
/* E285D0 802B6690 8E06002C */ lw $a2, 0x2C($s0)
/* E285D4 802B6694 8E070030 */ lw $a3, 0x30($s0)
.L802B6698:
/* E285D8 802B6698 3C013F33 */ lui $at, (0x3F333333 >> 16)
/* E285DC 802B669C 34213333 */ ori $at, $at, (0x3F333333 & 0xFFFF)
/* E285E0 802B66A0 44810000 */ mtc1 $at, $f0
.L802B66A4:
/* E285E4 802B66A4 24020012 */ addiu $v0, $zero, 0x12
glabel func_802B66A8
/* E285E8 802B66A8 AFA20014 */ sw $v0, 0x14($sp)
/* E285EC 802B66AC 0C01C1CC */ jal fx_smoke_burst
.L802B66B0:
/* E285F0 802B66B0 E7A00010 */ swc1 $f0, 0x10($sp)
.L802B66B4:
/* E285F4 802B66B4 0C038D36 */ jal func_800E34D8
/* E285F8 802B66B8 00000000 */ nop
glabel .L802B66BC
/* E285FC 802B66BC 46000306 */ mov.s $f12, $f0
glabel .L802B66C0
/* E28600 802B66C0 0C038D45 */ jal player_check_collision_below
/* E28604 802B66C4 27A5002C */ addiu $a1, $sp, 0x2C
/* E28608 802B66C8 8FA2002C */ lw $v0, 0x2C($sp)
/* E2860C 802B66CC 0440004E */ bltz $v0, .L802B6808
/* E28610 802B66D0 E600002C */ swc1 $f0, 0x2C($s0)
/* E28614 802B66D4 0000202D */ daddu $a0, $zero, $zero
/* E28618 802B66D8 24050002 */ addiu $a1, $zero, 0x2
.L802B66DC:
/* E2861C 802B66DC 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16)
.L802B66E0:
/* E28620 802B66E0 34E7CCCD */ ori $a3, $a3, (0x3F4CCCCD & 0xFFFF)
/* E28624 802B66E4 0C0B2D72 */ jal exec_ShakeCamX
/* E28628 802B66E8 24060001 */ addiu $a2, $zero, 0x1
/* E2862C 802B66EC 24040100 */ addiu $a0, $zero, 0x100
.L802B66F0:
/* E28630 802B66F0 0C00A3C2 */ jal start_rumble
.L802B66F4:
/* E28634 802B66F4 24050032 */ addiu $a1, $zero, 0x32
/* E28638 802B66F8 0C03954C */ jal phys_adjust_cam_on_landing
/* E2863C 802B66FC 00000000 */ nop
/* E28640 802B6700 240403FB */ addiu $a0, $zero, 0x3FB
/* E28644 802B6704 3C03800B */ lui $v1, %hi(gCameras)
.L802B6708:
/* E28648 802B6708 24631D80 */ addiu $v1, $v1, %lo(gCameras)
/* E2864C 802B670C 94620002 */ lhu $v0, 0x2($v1)
.L802B6710:
/* E28650 802B6710 0000282D */ daddu $a1, $zero, $zero
/* E28654 802B6714 3042FFFD */ andi $v0, $v0, 0xFFFD
D_802B6718_E274F8:
/* E28658 802B6718 0C052736 */ jal sfx_play_sound_at_player
.L802B671C:
/* E2865C 802B671C A4620002 */ sh $v0, 0x2($v1)
D_802B6720_E27500:
/* E28660 802B6720 3C040008 */ lui $a0, (0x8001A >> 16)
/* E28664 802B6724 0C037FDE */ jal suggest_player_anim_always_forward
D_802B6728_E27508:
/* E28668 802B6728 3484001A */ ori $a0, $a0, (0x8001A & 0xFFFF)
.L802B672C:
/* E2866C 802B672C 8E020000 */ lw $v0, 0x0($s0)
D_802B6730:
/* E28670 802B6730 3C0140C0 */ lui $at, (0x40C00000 >> 16)
/* E28674 802B6734 44811000 */ mtc1 $at, $f2
glabel func_802B6738
/* E28678 802B6738 C600002C */ lwc1 $f0, 0x2C($s0)
/* E2867C 802B673C 2403F7FF */ addiu $v1, $zero, -0x801
.L802B6740:
/* E28680 802B6740 A20000BF */ sb $zero, 0xBF($s0)
.L802B6744:
/* E28684 802B6744 00431024 */ and $v0, $v0, $v1
/* E28688 802B6748 2403FFF7 */ addiu $v1, $zero, -0x9
.L802B674C:
/* E2868C 802B674C 00431024 */ and $v0, $v0, $v1
.L802B6750:
/* E28690 802B6750 AE020000 */ sw $v0, 0x0($s0)
/* E28694 802B6754 920200B6 */ lbu $v0, 0xB6($s0)
.L802B6758:
/* E28698 802B6758 46020000 */ add.s $f0, $f0, $f2
/* E2869C 802B675C E6020070 */ swc1 $f2, 0x70($s0)
D_802B6760_E29190:
/* E286A0 802B6760 24420001 */ addiu $v0, $v0, 0x1
.L802B6764:
/* E286A4 802B6764 A20200B6 */ sb $v0, 0xB6($s0)
D_802B6768_E29198:
/* E286A8 802B6768 080ADA02 */ j .L802B6808
/* E286AC 802B676C E600002C */ swc1 $f0, 0x2C($s0)
D_802B6770_E27C80:
/* E286B0 802B6770 C60C0070 */ lwc1 $f12, 0x70($s0)
/* E286B4 802B6774 3C013FF0 */ lui $at, (0x3FF00000 >> 16)
.L802B6778:
/* E286B8 802B6778 44810800 */ mtc1 $at, $f1
.L802B677C:
/* E286BC 802B677C 44800000 */ mtc1 $zero, $f0
D_802B6780:
/* E286C0 802B6780 46006321 */ cvt.d.s $f12, $f12
D_802B6784:
/* E286C4 802B6784 46206301 */ sub.d $f12, $f12, $f0
glabel D_802B6788
/* E286C8 802B6788 27A5002C */ addiu $a1, $sp, 0x2C
.L802B678C:
/* E286CC 802B678C 46206320 */ cvt.s.d $f12, $f12
D_802B6790:
/* E286D0 802B6790 0C038D45 */ jal player_check_collision_below
D_802B6794:
/* E286D4 802B6794 E60C0070 */ swc1 $f12, 0x70($s0)
D_802B6798:
/* E286D8 802B6798 8FA2002C */ lw $v0, 0x2C($sp)
D_802B679C:
/* E286DC 802B679C 0440001A */ bltz $v0, .L802B6808
/* E286E0 802B67A0 E600002C */ swc1 $f0, 0x2C($s0)
.L802B67A4:
/* E286E4 802B67A4 920200B6 */ lbu $v0, 0xB6($s0)
/* E286E8 802B67A8 2403000A */ addiu $v1, $zero, 0xA
/* E286EC 802B67AC A6030008 */ sh $v1, 0x8($s0)
.L802B67B0:
/* E286F0 802B67B0 24420001 */ addiu $v0, $v0, 0x1
.L802B67B4:
/* E286F4 802B67B4 080ADA02 */ j .L802B6808
/* E286F8 802B67B8 A20200B6 */ sb $v0, 0xB6($s0)
glabel .L802B67BC
/* E286FC 802B67BC 96020008 */ lhu $v0, 0x8($s0)
.L802B67C0:
/* E28700 802B67C0 2442FFFF */ addiu $v0, $v0, -0x1
.L802B67C4:
/* E28704 802B67C4 A6020008 */ sh $v0, 0x8($s0)
/* E28708 802B67C8 00021400 */ sll $v0, $v0, 16
/* E2870C 802B67CC 1C40000E */ bgtz $v0, .L802B6808
/* E28710 802B67D0 00000000 */ nop
/* E28714 802B67D4 0C039769 */ jal set_action_state
.L802B67D8:
/* E28718 802B67D8 2404000A */ addiu $a0, $zero, 0xA
/* E2871C 802B67DC 3C03FF7F */ lui $v1, (0xFF7FFFFF >> 16)
/* E28720 802B67E0 3463FFFF */ ori $v1, $v1, (0xFF7FFFFF & 0xFFFF)
.L802B67E4:
/* E28724 802B67E4 8E020000 */ lw $v0, 0x0($s0)
.L802B67E8:
/* E28728 802B67E8 3C04800A */ lui $a0, %hi(gOverrideFlags)
.L802B67EC:
/* E2872C 802B67EC 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags)
/* E28730 802B67F0 00431024 */ and $v0, $v0, $v1
.L802B67F4:
/* E28734 802B67F4 AE020000 */ sw $v0, 0x0($s0)
glabel .L802B67F8
/* E28738 802B67F8 8C820000 */ lw $v0, 0x0($a0)
/* E2873C 802B67FC 2403FFBF */ addiu $v1, $zero, -0x41
.L802B6800:
/* E28740 802B6800 00431024 */ and $v0, $v0, $v1
.L802B6804:
/* E28744 802B6804 AC820000 */ sw $v0, 0x0($a0)
glabel .L802B6808
/* E28748 802B6808 820200B6 */ lb $v0, 0xB6($s0)
.L802B680C:
/* E2874C 802B680C 28420007 */ slti $v0, $v0, 0x7
.L802B6810:
/* E28750 802B6810 10400004 */ beqz $v0, .L802B6824
.L802B6814:
/* E28754 802B6814 00000000 */ nop
/* E28758 802B6818 960200C0 */ lhu $v0, 0xC0($s0)
.L802B681C:
/* E2875C 802B681C 24420001 */ addiu $v0, $v0, 0x1
glabel func_802B6820_E256F0
/* E28760 802B6820 A60200C0 */ sh $v0, 0xC0($s0)
.L802B6824:
/* E28764 802B6824 8FBF003C */ lw $ra, 0x3C($sp)
.L802B6828:
/* E28768 802B6828 8FB20038 */ lw $s2, 0x38($sp)
glabel .L802B682C
/* E2876C 802B682C 8FB10034 */ lw $s1, 0x34($sp)
/* E28770 802B6830 8FB00030 */ lw $s0, 0x30($sp)
/* E28774 802B6834 D7B60048 */ ldc1 $f22, 0x48($sp)
/* E28778 802B6838 D7B40040 */ ldc1 $f20, 0x40($sp)
/* E2877C 802B683C 03E00008 */ jr $ra
/* E28780 802B6840 27BD0050 */ addiu $sp, $sp, 0x50
/* E28784 802B6844 00000000 */ nop
/* E28788 802B6848 00000000 */ nop
/* E2878C 802B684C 00000000 */ nop
### DECOMPILED C INSTRUCTIONS:
void action_update_hit_lava(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
f32 resetPosX, resetPosY, resetPosZ;
f32 returnRadians;
f32 dx, dy;
f32 componentSpeed;
s32 completeAxes; // number of axes along which the 'return motion' is complete
static f32 LaunchVelocity;
static f32 LaunchInterpPhase; // used to interp launch velocity
static f32 ReturnAngle;
static f32 InitialPosY;
if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
playerStatus->flags &= ~PS_FLAG_ACTION_STATE_CHANGED;
playerStatus->flags |= (PS_FLAG_SCRIPTED_FALL | PS_FLAG_FLYING);
playerStatus->animFlags |= PA_FLAG_INTERRUPT_USE_PARTNER;
playerStatus->flags |= PS_FLAG_HIT_FIRE;
if (playerStatus->hazardType == HAZARD_TYPE_LAVA) {
playerStatus->actionSubstate = SUBSTATE_DELAY_INIT_SINK;
playerStatus->currentStateTime = 2;
} else {
playerStatus->actionSubstate = SUBSTATE_INIT;
}
InitialPosY = playerStatus->position.y;
playerStatus->currentSpeed = 0.0f;
LaunchVelocity = 0.0f;
gCameras[CAM_DEFAULT].moveFlags |= (CAMERA_MOVE_IGNORE_PLAYER_Y | CAMERA_MOVE_FLAG_2);
LaunchInterpPhase = 90.0f;
subtract_hp(1);
open_status_bar_long();
gOverrideFlags |= GLOBAL_OVERRIDES_40;
sfx_play_sound_at_player(SOUND_E8, SOUND_SPACE_MODE_0);
}
switch (playerStatus->actionSubstate) {
case SUBSTATE_DELAY_INIT:
if (--playerStatus->currentStateTime == -1) {
playerStatus->actionSubstate = SUBSTATE_INIT;
}
break;
case SUBSTATE_DELAY_INIT_SINK:
if (--playerStatus->currentStateTime == -1) {
playerStatus->actionSubstate = SUBSTATE_INIT;
}
playerStatus->position.y -= 4.0f;
break;
case SUBSTATE_INIT:
if (playerStatus->hazardType == HAZARD_TYPE_LAVA) {
fx_smoke_burst(0, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z, 1.0f, 40);
}
suggest_player_anim_always_forward(ANIM_MarioW2_TouchedLava);
playerStatus->gravityIntegrator[1] = 0.0f;
playerStatus->timeInAir = 0;
playerStatus->peakJumpTime = 0;
playerStatus->actionSubstate = SUBSTATE_LAUNCH;
playerStatus->currentStateTime = 1;
playerStatus->gravityIntegrator[0] = 20.0f;
playerStatus->gravityIntegrator[2] = 250.0f;
playerStatus->gravityIntegrator[3] = InitialPosY;
playerStatus->jumpFromPos.x = playerStatus->position.x;
playerStatus->jumpFromPos.z = playerStatus->position.z;
playerStatus->jumpFromHeight = playerStatus->position.y;
playerStatus->flags |= PS_FLAG_JUMPING;
break;
case SUBSTATE_DELAY_LAUNCH:
if (--playerStatus->currentStateTime <= 0) {
playerStatus->actionSubstate++;
}
break;
case SUBSTATE_LAUNCH:
if (playerStatus->hazardType == HAZARD_TYPE_LAVA && (playerStatus->timeInAir % 2) == 0) {
fx_smoke_burst(0, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z, 0.7f, 18);
}
if (playerStatus->position.y < playerStatus->gravityIntegrator[3] + playerStatus->gravityIntegrator[2]) {
sin_cos_rad(DEG_TO_RAD(LaunchInterpPhase), &dx, &dy);
LaunchVelocity = sin_rad(DEG_TO_RAD(LaunchInterpPhase)) * 16.0f;
if (LaunchVelocity < -1.0f) {
LaunchVelocity = -1.0f;
}
playerStatus->position.y += LaunchVelocity;
LaunchInterpPhase += 3.0f;
if (LaunchInterpPhase > 180.0f) {
LaunchInterpPhase = 180.0f;
playerStatus->actionSubstate++;
}
} else {
playerStatus->position.y = playerStatus->gravityIntegrator[3] + playerStatus->gravityIntegrator[2];
playerStatus->actionSubstate++;
}
break;
case SUBSTATE_END_LAUNCH:
if (playerStatus->hazardType == HAZARD_TYPE_LAVA && (playerStatus->timeInAir % 2) == 0) {
fx_smoke_burst(0, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z, 0.7f, 18);
}
if (get_lava_reset_pos(&resetPosX, &resetPosY, &resetPosZ) == 0) {
resetPosX = playerStatus->position.x;
resetPosZ = playerStatus->position.z;
}
playerStatus->lastGoodPosition.x = resetPosX;
playerStatus->lastGoodPosition.z = resetPosZ;
playerStatus->jumpApexHeight = playerStatus->position.y;
LOAD_INTEGRATOR_FALL(playerStatus->gravityIntegrator);
playerStatus->actionSubstate++;
break;
case SUBSTATE_RETURN_INIT:
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;
playerStatus->actionSubstate++;
break;
case SUBSTATE_RETURN_MOTION:
ReturnAngle = atan2(playerStatus->position.x, playerStatus->position.z, playerStatus->lastGoodPosition.x, playerStatus->lastGoodPosition.z);
returnRadians = DEG_TO_RAD(ReturnAngle);
// update motion along x axis
componentSpeed = playerStatus->currentSpeed * sin_rad(returnRadians);
playerStatus->position.x += componentSpeed;
completeAxes = 0;
if (componentSpeed >= 0.0f) {
if (playerStatus->lastGoodPosition.x <= playerStatus->position.x) {
playerStatus->position.x = playerStatus->lastGoodPosition.x;
completeAxes++;
}
} else {
if (playerStatus->position.x <= playerStatus->lastGoodPosition.x) {
playerStatus->position.x = playerStatus->lastGoodPosition.x;
completeAxes++;
}
}
// update motion along z axis
componentSpeed = playerStatus->currentSpeed * cos_rad(returnRadians);
playerStatus->position.z -= componentSpeed;
if (componentSpeed >= 0.0f) {
if (playerStatus->position.z <= playerStatus->lastGoodPosition.z) {
playerStatus->position.z = playerStatus->lastGoodPosition.z;
completeAxes++;
}
} else {
if (playerStatus->lastGoodPosition.z <= playerStatus->position.z) {
playerStatus->position.z = playerStatus->lastGoodPosition.z;
completeAxes++;
}
}
// if both axes are done, continue to next substate
if (completeAxes == 2) {
playerStatus->actionSubstate++;
}
break;
case SUBSTATE_HOVER:
if (playerStatus->hazardType == HAZARD_TYPE_LAVA && (playerStatus->timeInAir % 2) == 0) {
fx_smoke_burst(0, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z, 0.7f, 18);
}
playerStatus->position.y = player_check_collision_below(player_fall_distance(), &completeAxes);
if (completeAxes >= 0) {
exec_ShakeCamX(0, 2, 1, 0.8f);
start_rumble(256, 50);
phys_adjust_cam_on_landing();
gCameras[CAM_DEFAULT].moveFlags &= ~CAMERA_MOVE_FLAG_2;
sfx_play_sound_at_player(SOUND_3FB, SOUND_SPACE_MODE_0);
suggest_player_anim_always_forward(ANIM_MarioW2_Thrown);
playerStatus->flags &= ~PS_FLAG_HIT_FIRE;
playerStatus->flags &= ~PS_FLAG_FLYING;
playerStatus->hazardType = HAZARD_TYPE_NONE;
playerStatus->gravityIntegrator[0] = 6.0f;
playerStatus->position.y += 6.0f;
playerStatus->actionSubstate++;
}
break;
case SUBSTATE_BOUNCE:
playerStatus->gravityIntegrator[0] -= 1.0;
playerStatus->position.y = player_check_collision_below(playerStatus->gravityIntegrator[0], &completeAxes);
if (completeAxes >= 0) {
playerStatus->currentStateTime = 10;
playerStatus->actionSubstate++;
}
break;
case SUBSTATE_DELAY_DONE:
if (--playerStatus->currentStateTime <= 0) {
set_action_state(ACTION_STATE_LAND);
playerStatus->flags &= ~PS_FLAG_SCRIPTED_FALL;
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
}
break;
}
if (playerStatus->actionSubstate < SUBSTATE_BOUNCE) {
playerStatus->timeInAir++;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel whirlwind_appendGfx
/* 3D2F38 E00CE478 27BDFEE0 */ addiu $sp, $sp, -0x120
/* 3D2F3C E00CE47C 0080502D */ daddu $t2, $a0, $zero
/* 3D2F40 E00CE480 3C0BDB06 */ lui $t3, (0xDB060024 >> 16)
/* 3D2F44 E00CE484 356B0024 */ ori $t3, $t3, (0xDB060024 & 0xFFFF)
/* 3D2F48 E00CE488 27A40020 */ addiu $a0, $sp, 0x20
/* 3D2F4C E00CE48C AFB300D4 */ sw $s3, 0xD4($sp)
/* 3D2F50 E00CE490 3C130001 */ lui $s3, (0x11630 >> 16)
/* 3D2F54 E00CE494 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF)
/* 3D2F58 E00CE498 AFB400D8 */ sw $s4, 0xD8($sp)
/* 3D2F5C E00CE49C 0000A02D */ daddu $s4, $zero, $zero
/* 3D2F60 E00CE4A0 AFBE00E8 */ sw $fp, 0xE8($sp)
/* 3D2F64 E00CE4A4 241E0400 */ addiu $fp, $zero, 0x400
/* 3D2F68 E00CE4A8 AFB700E4 */ sw $s7, 0xE4($sp)
/* 3D2F6C E00CE4AC 24170100 */ addiu $s7, $zero, 0x100
/* 3D2F70 E00CE4B0 AFB500DC */ sw $s5, 0xDC($sp)
/* 3D2F74 E00CE4B4 0280A82D */ daddu $s5, $s4, $zero
/* 3D2F78 E00CE4B8 AFB100CC */ sw $s1, 0xCC($sp)
/* 3D2F7C E00CE4BC 3C11800A */ lui $s1, %hi(gMainGfxPos)
/* 3D2F80 E00CE4C0 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos)
/* 3D2F84 E00CE4C4 AFBF00EC */ sw $ra, 0xEC($sp)
/* 3D2F88 E00CE4C8 AFB600E0 */ sw $s6, 0xE0($sp)
/* 3D2F8C E00CE4CC AFB200D0 */ sw $s2, 0xD0($sp)
/* 3D2F90 E00CE4D0 AFB000C8 */ sw $s0, 0xC8($sp)
/* 3D2F94 E00CE4D4 F7BE0118 */ sdc1 $f30, 0x118($sp)
/* 3D2F98 E00CE4D8 F7BC0110 */ sdc1 $f28, 0x110($sp)
/* 3D2F9C E00CE4DC F7BA0108 */ sdc1 $f26, 0x108($sp)
/* 3D2FA0 E00CE4E0 F7B80100 */ sdc1 $f24, 0x100($sp)
/* 3D2FA4 E00CE4E4 F7B600F8 */ sdc1 $f22, 0xF8($sp)
/* 3D2FA8 E00CE4E8 F7B400F0 */ sdc1 $f20, 0xF0($sp)
/* 3D2FAC E00CE4EC 8E230000 */ lw $v1, 0x0($s1)
/* 3D2FB0 E00CE4F0 44800000 */ mtc1 $zero, $f0
/* 3D2FB4 E00CE4F4 3C0142C8 */ lui $at, (0x42C80000 >> 16)
/* 3D2FB8 E00CE4F8 4481B000 */ mtc1 $at, $f22
/* 3D2FBC E00CE4FC 8D56000C */ lw $s6, 0xC($t2)
/* 3D2FC0 E00CE500 3C014080 */ lui $at, (0x40800000 >> 16)
/* 3D2FC4 E00CE504 44812000 */ mtc1 $at, $f4
/* 3D2FC8 E00CE508 0060402D */ daddu $t0, $v1, $zero
/* 3D2FCC E00CE50C 44050000 */ mfc1 $a1, $f0
/* 3D2FD0 E00CE510 24630008 */ addiu $v1, $v1, 0x8
/* 3D2FD4 E00CE514 AE230000 */ sw $v1, 0x0($s1)
/* 3D2FD8 E00CE518 8ECC0010 */ lw $t4, 0x10($s6)
/* 3D2FDC E00CE51C 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* 3D2FE0 E00CE520 AFAC00A0 */ sw $t4, 0xA0($sp)
/* 3D2FE4 E00CE524 8EC90024 */ lw $t1, 0x24($s6)
/* 3D2FE8 E00CE528 C6C60034 */ lwc1 $f6, 0x34($s6)
/* 3D2FEC E00CE52C 00A0302D */ daddu $a2, $a1, $zero
/* 3D2FF0 E00CE530 E7A600B8 */ swc1 $f6, 0xB8($sp)
/* 3D2FF4 E00CE534 C6C0013C */ lwc1 $f0, 0x13C($s6)
/* 3D2FF8 E00CE538 C6C20140 */ lwc1 $f2, 0x140($s6)
/* 3D2FFC E00CE53C AD020000 */ sw $v0, 0x0($t0)
/* 3D3000 E00CE540 24620008 */ addiu $v0, $v1, 0x8
/* 3D3004 E00CE544 AD000004 */ sw $zero, 0x4($t0)
/* 3D3008 E00CE548 3C088000 */ lui $t0, (0x80000000 >> 16)
/* 3D300C E00CE54C AE220000 */ sw $v0, 0x0($s1)
/* 3D3010 E00CE550 46040002 */ mul.s $f0, $f0, $f4
/* 3D3014 E00CE554 00000000 */ nop
/* 3D3018 E00CE558 AC6B0000 */ sw $t3, 0x0($v1)
/* 3D301C E00CE55C 8D420010 */ lw $v0, 0x10($t2)
/* 3D3020 E00CE560 00094843 */ sra $t1, $t1, 1
/* 3D3024 E00CE564 8C42001C */ lw $v0, 0x1C($v0)
/* 3D3028 E00CE568 46041082 */ mul.s $f2, $f2, $f4
/* 3D302C E00CE56C 00000000 */ nop
/* 3D3030 E00CE570 00481021 */ addu $v0, $v0, $t0
/* 3D3034 E00CE574 AC620004 */ sw $v0, 0x4($v1)
/* 3D3038 E00CE578 AFA900A4 */ sw $t1, 0xA4($sp)
/* 3D303C E00CE57C 4600018D */ trunc.w.s $f6, $f0
/* 3D3040 E00CE580 E7A600B0 */ swc1 $f6, 0xB0($sp)
/* 3D3044 E00CE584 4600118D */ trunc.w.s $f6, $f2
/* 3D3048 E00CE588 E7A600B4 */ swc1 $f6, 0xB4($sp)
/* 3D304C E00CE58C 0C080108 */ jal shim_guTranslateF
/* 3D3050 E00CE590 00A0382D */ daddu $a3, $a1, $zero
/* 3D3054 E00CE594 27A40020 */ addiu $a0, $sp, 0x20
/* 3D3058 E00CE598 3C108007 */ lui $s0, %hi(gMatrixListPos)
/* 3D305C E00CE59C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos)
/* 3D3060 E00CE5A0 3C12800A */ lui $s2, %hi(gDisplayContext)
/* 3D3064 E00CE5A4 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext)
/* 3D3068 E00CE5A8 96050000 */ lhu $a1, 0x0($s0)
/* 3D306C E00CE5AC 8E420000 */ lw $v0, 0x0($s2)
/* 3D3070 E00CE5B0 00052980 */ sll $a1, $a1, 6
/* 3D3074 E00CE5B4 00B32821 */ addu $a1, $a1, $s3
/* 3D3078 E00CE5B8 0C080118 */ jal shim_guMtxF2L
/* 3D307C E00CE5BC 00452821 */ addu $a1, $v0, $a1
/* 3D3080 E00CE5C0 3C03DA38 */ lui $v1, (0xDA380002 >> 16)
/* 3D3084 E00CE5C4 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3D3088 E00CE5C8 8E240000 */ lw $a0, 0x0($s1)
/* 3D308C E00CE5CC 96020000 */ lhu $v0, 0x0($s0)
/* 3D3090 E00CE5D0 0080282D */ daddu $a1, $a0, $zero
/* 3D3094 E00CE5D4 24840008 */ addiu $a0, $a0, 0x8
/* 3D3098 E00CE5D8 248C0010 */ addiu $t4, $a0, 0x10
/* 3D309C E00CE5DC AFAC00AC */ sw $t4, 0xAC($sp)
/* 3D30A0 E00CE5E0 AE240000 */ sw $a0, 0x0($s1)
/* 3D30A4 E00CE5E4 ACA30000 */ sw $v1, 0x0($a1)
/* 3D30A8 E00CE5E8 24430001 */ addiu $v1, $v0, 0x1
/* 3D30AC E00CE5EC 3042FFFF */ andi $v0, $v0, 0xFFFF
/* 3D30B0 E00CE5F0 00021180 */ sll $v0, $v0, 6
/* 3D30B4 E00CE5F4 A6030000 */ sh $v1, 0x0($s0)
/* 3D30B8 E00CE5F8 8E430000 */ lw $v1, 0x0($s2)
/* 3D30BC E00CE5FC 00531021 */ addu $v0, $v0, $s3
/* 3D30C0 E00CE600 00621821 */ addu $v1, $v1, $v0
/* 3D30C4 E00CE604 24820008 */ addiu $v0, $a0, 0x8
/* 3D30C8 E00CE608 ACA30004 */ sw $v1, 0x4($a1)
/* 3D30CC E00CE60C AE220000 */ sw $v0, 0x0($s1)
/* 3D30D0 E00CE610 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* 3D30D4 E00CE614 AC820000 */ sw $v0, 0x0($a0)
/* 3D30D8 E00CE618 3C020900 */ lui $v0, %hi(D_09000400_415460)
/* 3D30DC E00CE61C 24420400 */ addiu $v0, $v0, %lo(D_09000400_415460)
/* 3D30E0 E00CE620 AC820004 */ sw $v0, 0x4($a0)
/* 3D30E4 E00CE624 3C02DE01 */ lui $v0, (0xDE010000 >> 16)
/* 3D30E8 E00CE628 AC820008 */ sw $v0, 0x8($a0)
/* 3D30EC E00CE62C 24820210 */ addiu $v0, $a0, 0x210
/* 3D30F0 E00CE630 AC82000C */ sw $v0, 0xC($a0)
/* 3D30F4 E00CE634 AE220000 */ sw $v0, 0x0($s1)
/* 3D30F8 E00CE638 00141100 */ sll $v0, $s4, 4
.LE00CE63C:
/* 3D30FC E00CE63C 4495A000 */ mtc1 $s5, $f20
/* 3D3100 E00CE640 00000000 */ nop
/* 3D3104 E00CE644 4680A520 */ cvt.s.w $f20, $f20
/* 3D3108 E00CE648 8FAC00AC */ lw $t4, 0xAC($sp)
/* 3D310C E00CE64C 4600A306 */ mov.s $f12, $f20
/* 3D3110 E00CE650 0C080144 */ jal shim_cos_deg
/* 3D3114 E00CE654 01828021 */ addu $s0, $t4, $v0
/* 3D3118 E00CE658 46160002 */ mul.s $f0, $f0, $f22
/* 3D311C E00CE65C 00000000 */ nop
/* 3D3120 E00CE660 4600A306 */ mov.s $f12, $f20
/* 3D3124 E00CE664 26B50018 */ addiu $s5, $s5, 0x18
/* 3D3128 E00CE668 A6000002 */ sh $zero, 0x2($s0)
/* 3D312C E00CE66C 4600018D */ trunc.w.s $f6, $f0
/* 3D3130 E00CE670 44023000 */ mfc1 $v0, $f6
/* 3D3134 E00CE674 0C080140 */ jal shim_sin_deg
/* 3D3138 E00CE678 A6020000 */ sh $v0, 0x0($s0)
/* 3D313C E00CE67C 46160002 */ mul.s $f0, $f0, $f22
/* 3D3140 E00CE680 00000000 */ nop
/* 3D3144 E00CE684 4600A306 */ mov.s $f12, $f20
/* 3D3148 E00CE688 001411C0 */ sll $v0, $s4, 7
/* 3D314C E00CE68C A6020008 */ sh $v0, 0x8($s0)
/* 3D3150 E00CE690 A600000A */ sh $zero, 0xA($s0)
/* 3D3154 E00CE694 4600018D */ trunc.w.s $f6, $f0
/* 3D3158 E00CE698 44023000 */ mfc1 $v0, $f6
/* 3D315C E00CE69C 0C080144 */ jal shim_cos_deg
/* 3D3160 E00CE6A0 A6020004 */ sh $v0, 0x4($s0)
/* 3D3164 E00CE6A4 46160002 */ mul.s $f0, $f0, $f22
/* 3D3168 E00CE6A8 00000000 */ nop
/* 3D316C E00CE6AC 8FAC00AC */ lw $t4, 0xAC($sp)
/* 3D3170 E00CE6B0 4600A306 */ mov.s $f12, $f20
/* 3D3174 E00CE6B4 01978021 */ addu $s0, $t4, $s7
/* 3D3178 E00CE6B8 26F70010 */ addiu $s7, $s7, 0x10
/* 3D317C E00CE6BC A6000002 */ sh $zero, 0x2($s0)
/* 3D3180 E00CE6C0 4600018D */ trunc.w.s $f6, $f0
/* 3D3184 E00CE6C4 44023000 */ mfc1 $v0, $f6
/* 3D3188 E00CE6C8 0C080140 */ jal shim_sin_deg
/* 3D318C E00CE6CC A6020000 */ sh $v0, 0x0($s0)
/* 3D3190 E00CE6D0 46160002 */ mul.s $f0, $f0, $f22
/* 3D3194 E00CE6D4 00000000 */ nop
/* 3D3198 E00CE6D8 00141240 */ sll $v0, $s4, 9
/* 3D319C E00CE6DC 26940001 */ addiu $s4, $s4, 0x1
/* 3D31A0 E00CE6E0 A6020008 */ sh $v0, 0x8($s0)
/* 3D31A4 E00CE6E4 A61E000A */ sh $fp, 0xA($s0)
/* 3D31A8 E00CE6E8 4600018D */ trunc.w.s $f6, $f0
/* 3D31AC E00CE6EC 44023000 */ mfc1 $v0, $f6
/* 3D31B0 E00CE6F0 00000000 */ nop
/* 3D31B4 E00CE6F4 A6020004 */ sh $v0, 0x4($s0)
/* 3D31B8 E00CE6F8 2A820010 */ slti $v0, $s4, 0x10
/* 3D31BC E00CE6FC 1440FFCF */ bnez $v0, .LE00CE63C
/* 3D31C0 E00CE700 00141100 */ sll $v0, $s4, 4
/* 3D31C4 E00CE704 3C02800A */ lui $v0, %hi(gMainGfxPos)
/* 3D31C8 E00CE708 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos)
/* 3D31CC E00CE70C 0040402D */ daddu $t0, $v0, $zero
/* 3D31D0 E00CE710 8D030000 */ lw $v1, 0x0($t0)
/* 3D31D4 E00CE714 0000A02D */ daddu $s4, $zero, $zero
/* 3D31D8 E00CE718 24620008 */ addiu $v0, $v1, 0x8
/* 3D31DC E00CE71C AFA200A8 */ sw $v0, 0xA8($sp)
/* 3D31E0 E00CE720 3C02DE01 */ lui $v0, (0xDE010000 >> 16)
/* 3D31E4 E00CE724 AC620000 */ sw $v0, 0x0($v1)
/* 3D31E8 E00CE728 24620088 */ addiu $v0, $v1, 0x88
/* 3D31EC E00CE72C AC620004 */ sw $v0, 0x4($v1)
/* 3D31F0 E00CE730 8FAC00A8 */ lw $t4, 0xA8($sp)
/* 3D31F4 E00CE734 3C090600 */ lui $t1, (0x6000000 >> 16)
/* 3D31F8 E00CE738 AD0C0000 */ sw $t4, 0x0($t0)
.LE00CE73C:
/* 3D31FC E00CE73C 26830010 */ addiu $v1, $s4, 0x10
/* 3D3200 E00CE740 26840001 */ addiu $a0, $s4, 0x1
/* 3D3204 E00CE744 00143040 */ sll $a2, $s4, 1
/* 3D3208 E00CE748 26850011 */ addiu $a1, $s4, 0x11
/* 3D320C E00CE74C 0080A02D */ daddu $s4, $a0, $zero
/* 3D3210 E00CE750 00031840 */ sll $v1, $v1, 1
/* 3D3214 E00CE754 306300FF */ andi $v1, $v1, 0xFF
/* 3D3218 E00CE758 00031C00 */ sll $v1, $v1, 16
/* 3D321C E00CE75C 00142040 */ sll $a0, $s4, 1
/* 3D3220 E00CE760 308400FF */ andi $a0, $a0, 0xFF
/* 3D3224 E00CE764 30C600FF */ andi $a2, $a2, 0xFF
/* 3D3228 E00CE768 00052A40 */ sll $a1, $a1, 9
/* 3D322C E00CE76C 8D020000 */ lw $v0, 0x0($t0)
/* 3D3230 E00CE770 30A5FE00 */ andi $a1, $a1, 0xFE00
/* 3D3234 E00CE774 0040382D */ daddu $a3, $v0, $zero
/* 3D3238 E00CE778 24420008 */ addiu $v0, $v0, 0x8
/* 3D323C E00CE77C AD020000 */ sw $v0, 0x0($t0)
/* 3D3240 E00CE780 00041200 */ sll $v0, $a0, 8
/* 3D3244 E00CE784 00621025 */ or $v0, $v1, $v0
/* 3D3248 E00CE788 00461025 */ or $v0, $v0, $a2
/* 3D324C E00CE78C 00491025 */ or $v0, $v0, $t1
/* 3D3250 E00CE790 00651825 */ or $v1, $v1, $a1
/* 3D3254 E00CE794 00641825 */ or $v1, $v1, $a0
/* 3D3258 E00CE798 ACE20000 */ sw $v0, 0x0($a3)
/* 3D325C E00CE79C 2A82000F */ slti $v0, $s4, 0xF
/* 3D3260 E00CE7A0 1440FFE6 */ bnez $v0, .LE00CE73C
/* 3D3264 E00CE7A4 ACE30004 */ sw $v1, 0x4($a3)
/* 3D3268 E00CE7A8 27A40020 */ addiu $a0, $sp, 0x20
/* 3D326C E00CE7AC 3C100001 */ lui $s0, (0x11630 >> 16)
/* 3D3270 E00CE7B0 36101630 */ ori $s0, $s0, (0x11630 & 0xFFFF)
/* 3D3274 E00CE7B4 0000A02D */ daddu $s4, $zero, $zero
/* 3D3278 E00CE7B8 27B30060 */ addiu $s3, $sp, 0x60
/* 3D327C E00CE7BC 3C028007 */ lui $v0, %hi(gMatrixListPos)
/* 3D3280 E00CE7C0 244241F0 */ addiu $v0, $v0, %lo(gMatrixListPos)
/* 3D3284 E00CE7C4 0040B82D */ daddu $s7, $v0, $zero
/* 3D3288 E00CE7C8 3C1E0001 */ lui $fp, (0x11630 >> 16)
/* 3D328C E00CE7CC 3C02800A */ lui $v0, %hi(gMainGfxPos)
/* 3D3290 E00CE7D0 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos)
/* 3D3294 E00CE7D4 0040A82D */ daddu $s5, $v0, $zero
/* 3D3298 E00CE7D8 3C0CD838 */ lui $t4, (0xD8380002 >> 16)
/* 3D329C E00CE7DC 358C0002 */ ori $t4, $t4, (0xD8380002 & 0xFFFF)
/* 3D32A0 E00CE7E0 AFAC00C4 */ sw $t4, 0xC4($sp)
/* 3D32A4 E00CE7E4 8EA20000 */ lw $v0, 0x0($s5)
/* 3D32A8 E00CE7E8 4480F000 */ mtc1 $zero, $f30
/* 3D32AC E00CE7EC 3C013DCC */ lui $at, (0x3DCCCCCD >> 16)
/* 3D32B0 E00CE7F0 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF)
/* 3D32B4 E00CE7F4 44810000 */ mtc1 $at, $f0
/* 3D32B8 E00CE7F8 0040182D */ daddu $v1, $v0, $zero
/* 3D32BC E00CE7FC 44050000 */ mfc1 $a1, $f0
/* 3D32C0 E00CE800 24420008 */ addiu $v0, $v0, 0x8
/* 3D32C4 E00CE804 AEA20000 */ sw $v0, 0x0($s5)
/* 3D32C8 E00CE808 3C02DF00 */ lui $v0, (0xDF000000 >> 16)
/* 3D32CC E00CE80C AC620000 */ sw $v0, 0x0($v1)
/* 3D32D0 E00CE810 AC600004 */ sw $zero, 0x4($v1)
/* 3D32D4 E00CE814 00A0302D */ daddu $a2, $a1, $zero
/* 3D32D8 E00CE818 0C080110 */ jal shim_guScaleF
/* 3D32DC E00CE81C 00A0382D */ daddu $a3, $a1, $zero
/* 3D32E0 E00CE820 27A40020 */ addiu $a0, $sp, 0x20
/* 3D32E4 E00CE824 96E50000 */ lhu $a1, 0x0($s7)
/* 3D32E8 E00CE828 3C02800A */ lui $v0, %hi(gDisplayContext)
/* 3D32EC E00CE82C 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0)
/* 3D32F0 E00CE830 00052980 */ sll $a1, $a1, 6
/* 3D32F4 E00CE834 00B02821 */ addu $a1, $a1, $s0
/* 3D32F8 E00CE838 0C080118 */ jal shim_guMtxF2L
/* 3D32FC E00CE83C 00452821 */ addu $a1, $v0, $a1
/* 3D3300 E00CE840 8EA20000 */ lw $v0, 0x0($s5)
/* 3D3304 E00CE844 3C014120 */ lui $at, (0x41200000 >> 16)
/* 3D3308 E00CE848 4481D000 */ mtc1 $at, $f26
/* 3D330C E00CE84C 0040202D */ daddu $a0, $v0, $zero
/* 3D3310 E00CE850 24420008 */ addiu $v0, $v0, 0x8
/* 3D3314 E00CE854 AFA200C0 */ sw $v0, 0xC0($sp)
/* 3D3318 E00CE858 8FAC00C0 */ lw $t4, 0xC0($sp)
/* 3D331C E00CE85C 24420008 */ addiu $v0, $v0, 0x8
/* 3D3320 E00CE860 AFA200BC */ sw $v0, 0xBC($sp)
/* 3D3324 E00CE864 AEAC0000 */ sw $t4, 0x0($s5)
/* 3D3328 E00CE868 96E20000 */ lhu $v0, 0x0($s7)
/* 3D332C E00CE86C 3C03DA38 */ lui $v1, (0xDA380000 >> 16)
/* 3D3330 E00CE870 AC830000 */ sw $v1, 0x0($a0)
/* 3D3334 E00CE874 24430001 */ addiu $v1, $v0, 0x1
/* 3D3338 E00CE878 3042FFFF */ andi $v0, $v0, 0xFFFF
/* 3D333C E00CE87C 00021180 */ sll $v0, $v0, 6
/* 3D3340 E00CE880 A6E30000 */ sh $v1, 0x0($s7)
/* 3D3344 E00CE884 3C03800A */ lui $v1, %hi(gDisplayContext)
/* 3D3348 E00CE888 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* 3D334C E00CE88C 00501021 */ addu $v0, $v0, $s0
/* 3D3350 E00CE890 00621821 */ addu $v1, $v1, $v0
/* 3D3354 E00CE894 AC830004 */ sw $v1, 0x4($a0)
/* 3D3358 E00CE898 8FAC00BC */ lw $t4, 0xBC($sp)
/* 3D335C E00CE89C 37DE1630 */ ori $fp, $fp, (0x11630 & 0xFFFF)
/* 3D3360 E00CE8A0 AEAC0000 */ sw $t4, 0x0($s5)
.LE00CE8A4:
/* 3D3364 E00CE8A4 00141080 */ sll $v0, $s4, 2
/* 3D3368 E00CE8A8 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 3D336C E00CE8AC 44813000 */ mtc1 $at, $f6
/* 3D3370 E00CE8B0 02C29021 */ addu $s2, $s6, $v0
/* 3D3374 E00CE8B4 E7A60010 */ swc1 $f6, 0x10($sp)
/* 3D3378 E00CE8B8 C6400038 */ lwc1 $f0, 0x38($s2)
/* 3D337C E00CE8BC 461A0002 */ mul.s $f0, $f0, $f26
/* 3D3380 E00CE8C0 00000000 */ nop
/* 3D3384 E00CE8C4 E7A00014 */ swc1 $f0, 0x14($sp)
/* 3D3388 E00CE8C8 C6400058 */ lwc1 $f0, 0x58($s2)
/* 3D338C E00CE8CC 461A0002 */ mul.s $f0, $f0, $f26
/* 3D3390 E00CE8D0 00000000 */ nop
/* 3D3394 E00CE8D4 E7A00018 */ swc1 $f0, 0x18($sp)
/* 3D3398 E00CE8D8 C6400078 */ lwc1 $f0, 0x78($s2)
/* 3D339C E00CE8DC 461A0002 */ mul.s $f0, $f0, $f26
/* 3D33A0 E00CE8E0 00000000 */ nop
/* 3D33A4 E00CE8E4 4405F000 */ mfc1 $a1, $f30
/* 3D33A8 E00CE8E8 4406F000 */ mfc1 $a2, $f30
/* 3D33AC E00CE8EC E7A0001C */ swc1 $f0, 0x1C($sp)
/* 3D33B0 E00CE8F0 8E470118 */ lw $a3, 0x118($s2)
/* 3D33B4 E00CE8F4 0C080180 */ jal shim_guPositionF
/* 3D33B8 E00CE8F8 27A40020 */ addiu $a0, $sp, 0x20
/* 3D33BC E00CE8FC 02940018 */ mult $s4, $s4
/* 3D33C0 E00CE900 00006012 */ mflo $t4
/* 3D33C4 E00CE904 C6C00138 */ lwc1 $f0, 0x138($s6)
/* 3D33C8 E00CE908 448CE000 */ mtc1 $t4, $f28
/* 3D33CC E00CE90C 00000000 */ nop
/* 3D33D0 E00CE910 4680E720 */ cvt.s.w $f28, $f28
/* 3D33D4 E00CE914 461C0000 */ add.s $f0, $f0, $f28
/* 3D33D8 E00CE918 3C06BCF5 */ lui $a2, (0xBCF5C28F >> 16)
/* 3D33DC E00CE91C 34C6C28F */ ori $a2, $a2, (0xBCF5C28F & 0xFFFF)
/* 3D33E0 E00CE920 3C073F80 */ lui $a3, (0x3F800000 >> 16)
/* 3D33E4 E00CE924 44050000 */ mfc1 $a1, $f0
/* 3D33E8 E00CE928 3C013DCC */ lui $at, (0x3DCCCCCD >> 16)
/* 3D33EC E00CE92C 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF)
/* 3D33F0 E00CE930 44810000 */ mtc1 $at, $f0
/* 3D33F4 E00CE934 0260202D */ daddu $a0, $s3, $zero
/* 3D33F8 E00CE938 0C080104 */ jal shim_guRotateF
/* 3D33FC E00CE93C E7A00010 */ swc1 $f0, 0x10($sp)
/* 3D3400 E00CE940 0260202D */ daddu $a0, $s3, $zero
/* 3D3404 E00CE944 27A50020 */ addiu $a1, $sp, 0x20
/* 3D3408 E00CE948 0C080114 */ jal shim_guMtxCatF
/* 3D340C E00CE94C 00A0302D */ daddu $a2, $a1, $zero
/* 3D3410 E00CE950 C6400098 */ lwc1 $f0, 0x98($s2)
/* 3D3414 E00CE954 8FAC00A0 */ lw $t4, 0xA0($sp)
/* 3D3418 E00CE958 C7A600B8 */ lwc1 $f6, 0xB8($sp)
/* 3D341C E00CE95C 29820010 */ slti $v0, $t4, 0x10
/* 3D3420 E00CE960 46060102 */ mul.s $f4, $f0, $f6
/* 3D3424 E00CE964 00000000 */ nop
/* 3D3428 E00CE968 1040000C */ beqz $v0, .LE00CE99C
/* 3D342C E00CE96C 2402007F */ addiu $v0, $zero, 0x7F
/* 3D3430 E00CE970 8FAC00A4 */ lw $t4, 0xA4($sp)
/* 3D3434 E00CE974 3C013CA3 */ lui $at, (0x3CA3D70A >> 16)
/* 3D3438 E00CE978 3421D70A */ ori $at, $at, (0x3CA3D70A & 0xFFFF)
/* 3D343C E00CE97C 44811000 */ mtc1 $at, $f2
/* 3D3440 E00CE980 004C1023 */ subu $v0, $v0, $t4
/* 3D3444 E00CE984 44820000 */ mtc1 $v0, $f0
/* 3D3448 E00CE988 00000000 */ nop
/* 3D344C E00CE98C 46800020 */ cvt.s.w $f0, $f0
/* 3D3450 E00CE990 46020002 */ mul.s $f0, $f0, $f2
/* 3D3454 E00CE994 00000000 */ nop
/* 3D3458 E00CE998 46002100 */ add.s $f4, $f4, $f0
.LE00CE99C:
/* 3D345C E00CE99C 0260202D */ daddu $a0, $s3, $zero
/* 3D3460 E00CE9A0 44052000 */ mfc1 $a1, $f4
/* 3D3464 E00CE9A4 8FA600B8 */ lw $a2, 0xB8($sp)
/* 3D3468 E00CE9A8 0C080110 */ jal shim_guScaleF
/* 3D346C E00CE9AC 00A0382D */ daddu $a3, $a1, $zero
/* 3D3470 E00CE9B0 0260202D */ daddu $a0, $s3, $zero
/* 3D3474 E00CE9B4 27A50020 */ addiu $a1, $sp, 0x20
/* 3D3478 E00CE9B8 0C080114 */ jal shim_guMtxCatF
/* 3D347C E00CE9BC 00A0302D */ daddu $a2, $a1, $zero
/* 3D3480 E00CE9C0 C65400F8 */ lwc1 $f20, 0xF8($s2)
/* 3D3484 E00CE9C4 461AA502 */ mul.s $f20, $f20, $f26
/* 3D3488 E00CE9C8 00000000 */ nop
/* 3D348C E00CE9CC C65600B8 */ lwc1 $f22, 0xB8($s2)
/* 3D3490 E00CE9D0 0C080140 */ jal shim_sin_deg
/* 3D3494 E00CE9D4 4600B306 */ mov.s $f12, $f22
/* 3D3498 E00CE9D8 4600A602 */ mul.s $f24, $f20, $f0
/* 3D349C E00CE9DC 00000000 */ nop
/* 3D34A0 E00CE9E0 0C080144 */ jal shim_cos_deg
/* 3D34A4 E00CE9E4 4600B306 */ mov.s $f12, $f22
/* 3D34A8 E00CE9E8 4600A502 */ mul.s $f20, $f20, $f0
/* 3D34AC E00CE9EC 00000000 */ nop
/* 3D34B0 E00CE9F0 4406F000 */ mfc1 $a2, $f30
/* 3D34B4 E00CE9F4 4407A000 */ mfc1 $a3, $f20
/* 3D34B8 E00CE9F8 4405C000 */ mfc1 $a1, $f24
/* 3D34BC E00CE9FC 0C080108 */ jal shim_guTranslateF
/* 3D34C0 E00CEA00 0260202D */ daddu $a0, $s3, $zero
/* 3D34C4 E00CEA04 0260202D */ daddu $a0, $s3, $zero
/* 3D34C8 E00CEA08 27A50020 */ addiu $a1, $sp, 0x20
/* 3D34CC E00CEA0C 0C080114 */ jal shim_guMtxCatF
/* 3D34D0 E00CEA10 00A0302D */ daddu $a2, $a1, $zero
/* 3D34D4 E00CEA14 27A40020 */ addiu $a0, $sp, 0x20
/* 3D34D8 E00CEA18 96E50000 */ lhu $a1, 0x0($s7)
/* 3D34DC E00CEA1C 3C02800A */ lui $v0, %hi(gDisplayContext)
/* 3D34E0 E00CEA20 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0)
/* 3D34E4 E00CEA24 00052980 */ sll $a1, $a1, 6
/* 3D34E8 E00CEA28 00BE2821 */ addu $a1, $a1, $fp
/* 3D34EC E00CEA2C 0C080118 */ jal shim_guMtxF2L
/* 3D34F0 E00CEA30 00452821 */ addu $a1, $v0, $a1
/* 3D34F4 E00CEA34 3C050101 */ lui $a1, (0x1010020 >> 16)
/* 3D34F8 E00CEA38 34A50020 */ ori $a1, $a1, (0x1010020 & 0xFFFF)
/* 3D34FC E00CEA3C 8EA80000 */ lw $t0, 0x0($s5)
/* 3D3500 E00CEA40 96E70000 */ lhu $a3, 0x0($s7)
/* 3D3504 E00CEA44 3C03800A */ lui $v1, %hi(gDisplayContext)
/* 3D3508 E00CEA48 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* 3D350C E00CEA4C 0100202D */ daddu $a0, $t0, $zero
/* 3D3510 E00CEA50 25080008 */ addiu $t0, $t0, 0x8
/* 3D3514 E00CEA54 3C0CDA38 */ lui $t4, (0xDA380000 >> 16)
/* 3D3518 E00CEA58 30E2FFFF */ andi $v0, $a3, 0xFFFF
/* 3D351C E00CEA5C 00021180 */ sll $v0, $v0, 6
/* 3D3520 E00CEA60 005E1021 */ addu $v0, $v0, $fp
/* 3D3524 E00CEA64 00621821 */ addu $v1, $v1, $v0
/* 3D3528 E00CEA68 AC8C0000 */ sw $t4, 0x0($a0)
/* 3D352C E00CEA6C AC830004 */ sw $v1, 0x4($a0)
/* 3D3530 E00CEA70 AD050000 */ sw $a1, 0x0($t0)
/* 3D3534 E00CEA74 8FAC00AC */ lw $t4, 0xAC($sp)
/* 3D3538 E00CEA78 26910001 */ addiu $s1, $s4, 0x1
/* 3D353C E00CEA7C AD0C0004 */ sw $t4, 0x4($t0)
/* 3D3540 E00CEA80 8FAC00C4 */ lw $t4, 0xC4($sp)
/* 3D3544 E00CEA84 00118080 */ sll $s0, $s1, 2
/* 3D3548 E00CEA88 AD0C0008 */ sw $t4, 0x8($t0)
/* 3D354C E00CEA8C 240C0040 */ addiu $t4, $zero, 0x40
/* 3D3550 E00CEA90 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 3D3554 E00CEA94 44813000 */ mtc1 $at, $f6
/* 3D3558 E00CEA98 02D08021 */ addu $s0, $s6, $s0
/* 3D355C E00CEA9C AD0C000C */ sw $t4, 0xC($t0)
/* 3D3560 E00CEAA0 E7A60010 */ swc1 $f6, 0x10($sp)
/* 3D3564 E00CEAA4 C6000038 */ lwc1 $f0, 0x38($s0)
/* 3D3568 E00CEAA8 461A0002 */ mul.s $f0, $f0, $f26
/* 3D356C E00CEAAC 00000000 */ nop
/* 3D3570 E00CEAB0 E7A00014 */ swc1 $f0, 0x14($sp)
/* 3D3574 E00CEAB4 C6000058 */ lwc1 $f0, 0x58($s0)
/* 3D3578 E00CEAB8 461A0002 */ mul.s $f0, $f0, $f26
/* 3D357C E00CEABC 00000000 */ nop
/* 3D3580 E00CEAC0 4406F000 */ mfc1 $a2, $f30
/* 3D3584 E00CEAC4 27A40020 */ addiu $a0, $sp, 0x20
/* 3D3588 E00CEAC8 24E70001 */ addiu $a3, $a3, 0x1
/* 3D358C E00CEACC E7A00018 */ swc1 $f0, 0x18($sp)
/* 3D3590 E00CEAD0 C6000078 */ lwc1 $f0, 0x78($s0)
/* 3D3594 E00CEAD4 4405F000 */ mfc1 $a1, $f30
/* 3D3598 E00CEAD8 461A0002 */ mul.s $f0, $f0, $f26
/* 3D359C E00CEADC 00000000 */ nop
/* 3D35A0 E00CEAE0 25020008 */ addiu $v0, $t0, 0x8
/* 3D35A4 E00CEAE4 AEA80000 */ sw $t0, 0x0($s5)
/* 3D35A8 E00CEAE8 A6E70000 */ sh $a3, 0x0($s7)
/* 3D35AC E00CEAEC AEA20000 */ sw $v0, 0x0($s5)
/* 3D35B0 E00CEAF0 E7A0001C */ swc1 $f0, 0x1C($sp)
/* 3D35B4 E00CEAF4 8E070118 */ lw $a3, 0x118($s0)
/* 3D35B8 E00CEAF8 25080010 */ addiu $t0, $t0, 0x10
/* 3D35BC E00CEAFC 0C080180 */ jal shim_guPositionF
/* 3D35C0 E00CEB00 AEA80000 */ sw $t0, 0x0($s5)
/* 3D35C4 E00CEB04 C6C00138 */ lwc1 $f0, 0x138($s6)
/* 3D35C8 E00CEB08 461C0000 */ add.s $f0, $f0, $f28
/* 3D35CC E00CEB0C 3C063CF5 */ lui $a2, (0x3CF5C28F >> 16)
/* 3D35D0 E00CEB10 34C6C28F */ ori $a2, $a2, (0x3CF5C28F & 0xFFFF)
/* 3D35D4 E00CEB14 3C073F80 */ lui $a3, (0x3F800000 >> 16)
/* 3D35D8 E00CEB18 44050000 */ mfc1 $a1, $f0
/* 3D35DC E00CEB1C 0260202D */ daddu $a0, $s3, $zero
/* 3D35E0 E00CEB20 0C080104 */ jal shim_guRotateF
/* 3D35E4 E00CEB24 E7BE0010 */ swc1 $f30, 0x10($sp)
/* 3D35E8 E00CEB28 0260202D */ daddu $a0, $s3, $zero
/* 3D35EC E00CEB2C 27A50020 */ addiu $a1, $sp, 0x20
/* 3D35F0 E00CEB30 0C080114 */ jal shim_guMtxCatF
/* 3D35F4 E00CEB34 00A0302D */ daddu $a2, $a1, $zero
/* 3D35F8 E00CEB38 C6000098 */ lwc1 $f0, 0x98($s0)
/* 3D35FC E00CEB3C C7A600B8 */ lwc1 $f6, 0xB8($sp)
/* 3D3600 E00CEB40 46060002 */ mul.s $f0, $f0, $f6
/* 3D3604 E00CEB44 00000000 */ nop
/* 3D3608 E00CEB48 0260202D */ daddu $a0, $s3, $zero
/* 3D360C E00CEB4C 44050000 */ mfc1 $a1, $f0
/* 3D3610 E00CEB50 44063000 */ mfc1 $a2, $f6
/* 3D3614 E00CEB54 0C080110 */ jal shim_guScaleF
/* 3D3618 E00CEB58 00A0382D */ daddu $a3, $a1, $zero
/* 3D361C E00CEB5C 0260202D */ daddu $a0, $s3, $zero
/* 3D3620 E00CEB60 27A50020 */ addiu $a1, $sp, 0x20
/* 3D3624 E00CEB64 0C080114 */ jal shim_guMtxCatF
/* 3D3628 E00CEB68 00A0302D */ daddu $a2, $a1, $zero
/* 3D362C E00CEB6C C65400F8 */ lwc1 $f20, 0xF8($s2)
/* 3D3630 E00CEB70 461AA502 */ mul.s $f20, $f20, $f26
/* 3D3634 E00CEB74 00000000 */ nop
/* 3D3638 E00CEB78 0C080140 */ jal shim_sin_deg
/* 3D363C E00CEB7C C64C00B8 */ lwc1 $f12, 0xB8($s2)
/* 3D3640 E00CEB80 4600A582 */ mul.s $f22, $f20, $f0
/* 3D3644 E00CEB84 00000000 */ nop
/* 3D3648 E00CEB88 0C080144 */ jal shim_cos_deg
/* 3D364C E00CEB8C C64C00B8 */ lwc1 $f12, 0xB8($s2)
/* 3D3650 E00CEB90 4600A502 */ mul.s $f20, $f20, $f0
/* 3D3654 E00CEB94 00000000 */ nop
/* 3D3658 E00CEB98 4406F000 */ mfc1 $a2, $f30
/* 3D365C E00CEB9C 4407A000 */ mfc1 $a3, $f20
/* 3D3660 E00CEBA0 4405B000 */ mfc1 $a1, $f22
/* 3D3664 E00CEBA4 0C080108 */ jal shim_guTranslateF
/* 3D3668 E00CEBA8 0260202D */ daddu $a0, $s3, $zero
/* 3D366C E00CEBAC 0260202D */ daddu $a0, $s3, $zero
/* 3D3670 E00CEBB0 27A50020 */ addiu $a1, $sp, 0x20
/* 3D3674 E00CEBB4 0C080114 */ jal shim_guMtxCatF
/* 3D3678 E00CEBB8 00A0302D */ daddu $a2, $a1, $zero
/* 3D367C E00CEBBC 27A40020 */ addiu $a0, $sp, 0x20
/* 3D3680 E00CEBC0 96E50000 */ lhu $a1, 0x0($s7)
/* 3D3684 E00CEBC4 3C02800A */ lui $v0, %hi(gDisplayContext)
/* 3D3688 E00CEBC8 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0)
/* 3D368C E00CEBCC 00052980 */ sll $a1, $a1, 6
/* 3D3690 E00CEBD0 00BE2821 */ addu $a1, $a1, $fp
/* 3D3694 E00CEBD4 0C080118 */ jal shim_guMtxF2L
/* 3D3698 E00CEBD8 00452821 */ addu $a1, $v0, $a1
/* 3D369C E00CEBDC 3C080101 */ lui $t0, (0x1010040 >> 16)
/* 3D36A0 E00CEBE0 35080040 */ ori $t0, $t0, (0x1010040 & 0xFFFF)
/* 3D36A4 E00CEBE4 3C090100 */ lui $t1, (0x100007C >> 16)
/* 3D36A8 E00CEBE8 3529007C */ ori $t1, $t1, (0x100007C & 0xFFFF)
/* 3D36AC E00CEBEC 00142900 */ sll $a1, $s4, 4
/* 3D36B0 E00CEBF0 8EA40000 */ lw $a0, 0x0($s5)
/* 3D36B4 E00CEBF4 96E30000 */ lhu $v1, 0x0($s7)
/* 3D36B8 E00CEBF8 0080382D */ daddu $a3, $a0, $zero
/* 3D36BC E00CEBFC 24840008 */ addiu $a0, $a0, 0x8
/* 3D36C0 E00CEC00 3C0CDA38 */ lui $t4, (0xDA380000 >> 16)
/* 3D36C4 E00CEC04 24620001 */ addiu $v0, $v1, 0x1
/* 3D36C8 E00CEC08 3063FFFF */ andi $v1, $v1, 0xFFFF
/* 3D36CC E00CEC0C 00031980 */ sll $v1, $v1, 6
/* 3D36D0 E00CEC10 AEA40000 */ sw $a0, 0x0($s5)
/* 3D36D4 E00CEC14 ACEC0000 */ sw $t4, 0x0($a3)
/* 3D36D8 E00CEC18 A6E20000 */ sh $v0, 0x0($s7)
/* 3D36DC E00CEC1C 3C02800A */ lui $v0, %hi(gDisplayContext)
/* 3D36E0 E00CEC20 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0)
/* 3D36E4 E00CEC24 007E1821 */ addu $v1, $v1, $fp
/* 3D36E8 E00CEC28 00431021 */ addu $v0, $v0, $v1
/* 3D36EC E00CEC2C ACE20004 */ sw $v0, 0x4($a3)
/* 3D36F0 E00CEC30 24820008 */ addiu $v0, $a0, 0x8
/* 3D36F4 E00CEC34 AEA20000 */ sw $v0, 0x0($s5)
/* 3D36F8 E00CEC38 AC880000 */ sw $t0, 0x0($a0)
/* 3D36FC E00CEC3C 8FAC00AC */ lw $t4, 0xAC($sp)
/* 3D3700 E00CEC40 001430C0 */ sll $a2, $s4, 3
/* 3D3704 E00CEC44 25820100 */ addiu $v0, $t4, 0x100
/* 3D3708 E00CEC48 AC820004 */ sw $v0, 0x4($a0)
/* 3D370C E00CEC4C 24820010 */ addiu $v0, $a0, 0x10
/* 3D3710 E00CEC50 AEA20000 */ sw $v0, 0x0($s5)
/* 3D3714 E00CEC54 8FAC00C4 */ lw $t4, 0xC4($sp)
/* 3D3718 E00CEC58 24820018 */ addiu $v0, $a0, 0x18
/* 3D371C E00CEC5C AC8C0008 */ sw $t4, 0x8($a0)
/* 3D3720 E00CEC60 240C0040 */ addiu $t4, $zero, 0x40
/* 3D3724 E00CEC64 AC8C000C */ sw $t4, 0xC($a0)
/* 3D3728 E00CEC68 AEA20000 */ sw $v0, 0x0($s5)
/* 3D372C E00CEC6C 8FAC00B0 */ lw $t4, 0xB0($sp)
/* 3D3730 E00CEC70 0220A02D */ daddu $s4, $s1, $zero
/* 3D3734 E00CEC74 01852821 */ addu $a1, $t4, $a1
/* 3D3738 E00CEC78 30A20FFF */ andi $v0, $a1, 0xFFF
/* 3D373C E00CEC7C 00021300 */ sll $v0, $v0, 12
/* 3D3740 E00CEC80 3C0CF200 */ lui $t4, (0xF2000000 >> 16)
/* 3D3744 E00CEC84 004C1025 */ or $v0, $v0, $t4
/* 3D3748 E00CEC88 24A5003F */ addiu $a1, $a1, 0x3F
/* 3D374C E00CEC8C 00052880 */ sll $a1, $a1, 2
/* 3D3750 E00CEC90 30A50FFF */ andi $a1, $a1, 0xFFF
/* 3D3754 E00CEC94 00052B00 */ sll $a1, $a1, 12
/* 3D3758 E00CEC98 34A5007C */ ori $a1, $a1, 0x7C
/* 3D375C E00CEC9C AC820010 */ sw $v0, 0x10($a0)
/* 3D3760 E00CECA0 24820020 */ addiu $v0, $a0, 0x20
/* 3D3764 E00CECA4 AC850014 */ sw $a1, 0x14($a0)
/* 3D3768 E00CECA8 AEA20000 */ sw $v0, 0x0($s5)
/* 3D376C E00CECAC 8FAC00B4 */ lw $t4, 0xB4($sp)
/* 3D3770 E00CECB0 3C0ADE00 */ lui $t2, (0xDE000000 >> 16)
/* 3D3774 E00CECB4 01863021 */ addu $a2, $t4, $a2
/* 3D3778 E00CECB8 30C20FFF */ andi $v0, $a2, 0xFFF
/* 3D377C E00CECBC 00021300 */ sll $v0, $v0, 12
/* 3D3780 E00CECC0 3C0CF200 */ lui $t4, (0xF2000000 >> 16)
/* 3D3784 E00CECC4 004C1025 */ or $v0, $v0, $t4
/* 3D3788 E00CECC8 24C6003F */ addiu $a2, $a2, 0x3F
/* 3D378C E00CECCC 00063080 */ sll $a2, $a2, 2
/* 3D3790 E00CECD0 30C60FFF */ andi $a2, $a2, 0xFFF
/* 3D3794 E00CECD4 00063300 */ sll $a2, $a2, 12
/* 3D3798 E00CECD8 00C93025 */ or $a2, $a2, $t1
/* 3D379C E00CECDC AC820018 */ sw $v0, 0x18($a0)
/* 3D37A0 E00CECE0 24820028 */ addiu $v0, $a0, 0x28
/* 3D37A4 E00CECE4 AC86001C */ sw $a2, 0x1C($a0)
/* 3D37A8 E00CECE8 AEA20000 */ sw $v0, 0x0($s5)
/* 3D37AC E00CECEC AC8A0020 */ sw $t2, 0x20($a0)
/* 3D37B0 E00CECF0 8FAC00A8 */ lw $t4, 0xA8($sp)
/* 3D37B4 E00CECF4 2A820007 */ slti $v0, $s4, 0x7
/* 3D37B8 E00CECF8 1440FEEA */ bnez $v0, .LE00CE8A4
/* 3D37BC E00CECFC AC8C0024 */ sw $t4, 0x24($a0)
/* 3D37C0 E00CED00 3C05D9FF */ lui $a1, (0xD9FFF9FF >> 16)
/* 3D37C4 E00CED04 34A5F9FF */ ori $a1, $a1, (0xD9FFF9FF & 0xFFFF)
/* 3D37C8 E00CED08 3C09D838 */ lui $t1, (0xD8380002 >> 16)
/* 3D37CC E00CED0C 3C07800A */ lui $a3, %hi(gMainGfxPos)
/* 3D37D0 E00CED10 24E7A66C */ addiu $a3, $a3, %lo(gMainGfxPos)
/* 3D37D4 E00CED14 35290002 */ ori $t1, $t1, (0xD8380002 & 0xFFFF)
/* 3D37D8 E00CED18 8CE40000 */ lw $a0, 0x0($a3)
/* 3D37DC E00CED1C 3C02DF00 */ lui $v0, (0xDF000000 >> 16)
/* 3D37E0 E00CED20 0080182D */ daddu $v1, $a0, $zero
/* 3D37E4 E00CED24 24840008 */ addiu $a0, $a0, 0x8
/* 3D37E8 E00CED28 ACE40000 */ sw $a0, 0x0($a3)
/* 3D37EC E00CED2C AC620000 */ sw $v0, 0x0($v1)
/* 3D37F0 E00CED30 AC600004 */ sw $zero, 0x4($v1)
/* 3D37F4 E00CED34 8FAC00C0 */ lw $t4, 0xC0($sp)
/* 3D37F8 E00CED38 3C02DE01 */ lui $v0, (0xDE010000 >> 16)
/* 3D37FC E00CED3C AD820000 */ sw $v0, 0x0($t4)
/* 3D3800 E00CED40 24820008 */ addiu $v0, $a0, 0x8
/* 3D3804 E00CED44 AD840004 */ sw $a0, 0x4($t4)
/* 3D3808 E00CED48 ACE20000 */ sw $v0, 0x0($a3)
/* 3D380C E00CED4C 24820010 */ addiu $v0, $a0, 0x10
/* 3D3810 E00CED50 AC850000 */ sw $a1, 0x0($a0)
/* 3D3814 E00CED54 AC800004 */ sw $zero, 0x4($a0)
/* 3D3818 E00CED58 ACE20000 */ sw $v0, 0x0($a3)
/* 3D381C E00CED5C 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* 3D3820 E00CED60 AC820008 */ sw $v0, 0x8($a0)
/* 3D3824 E00CED64 92C2001B */ lbu $v0, 0x1B($s6)
/* 3D3828 E00CED68 92C5001F */ lbu $a1, 0x1F($s6)
/* 3D382C E00CED6C 92C60023 */ lbu $a2, 0x23($s6)
/* 3D3830 E00CED70 24830018 */ addiu $v1, $a0, 0x18
/* 3D3834 E00CED74 ACE30000 */ sw $v1, 0x0($a3)
/* 3D3838 E00CED78 3C03FB00 */ lui $v1, (0xFB000000 >> 16)
/* 3D383C E00CED7C AC830010 */ sw $v1, 0x10($a0)
/* 3D3840 E00CED80 8FAC00A4 */ lw $t4, 0xA4($sp)
/* 3D3844 E00CED84 00021600 */ sll $v0, $v0, 24
/* 3D3848 E00CED88 00052C00 */ sll $a1, $a1, 16
/* 3D384C E00CED8C 00451025 */ or $v0, $v0, $a1
/* 3D3850 E00CED90 00063200 */ sll $a2, $a2, 8
/* 3D3854 E00CED94 00461025 */ or $v0, $v0, $a2
/* 3D3858 E00CED98 318300FF */ andi $v1, $t4, 0xFF
/* 3D385C E00CED9C 00431025 */ or $v0, $v0, $v1
/* 3D3860 E00CEDA0 AC82000C */ sw $v0, 0xC($a0)
/* 3D3864 E00CEDA4 92C3002B */ lbu $v1, 0x2B($s6)
/* 3D3868 E00CEDA8 92C6002F */ lbu $a2, 0x2F($s6)
/* 3D386C E00CEDAC 92C80033 */ lbu $t0, 0x33($s6)
/* 3D3870 E00CEDB0 24820020 */ addiu $v0, $a0, 0x20
/* 3D3874 E00CEDB4 ACE20000 */ sw $v0, 0x0($a3)
/* 3D3878 E00CEDB8 24820028 */ addiu $v0, $a0, 0x28
/* 3D387C E00CEDBC AC8A0018 */ sw $t2, 0x18($a0)
/* 3D3880 E00CEDC0 8FAC00BC */ lw $t4, 0xBC($sp)
/* 3D3884 E00CEDC4 24050040 */ addiu $a1, $zero, 0x40
/* 3D3888 E00CEDC8 AC8C001C */ sw $t4, 0x1C($a0)
/* 3D388C E00CEDCC ACE20000 */ sw $v0, 0x0($a3)
/* 3D3890 E00CEDD0 24820030 */ addiu $v0, $a0, 0x30
/* 3D3894 E00CEDD4 00031E00 */ sll $v1, $v1, 24
/* 3D3898 E00CEDD8 00063400 */ sll $a2, $a2, 16
/* 3D389C E00CEDDC 00661825 */ or $v1, $v1, $a2
/* 3D38A0 E00CEDE0 00084200 */ sll $t0, $t0, 8
/* 3D38A4 E00CEDE4 00681825 */ or $v1, $v1, $t0
/* 3D38A8 E00CEDE8 34630020 */ ori $v1, $v1, 0x20
/* 3D38AC E00CEDEC AC890020 */ sw $t1, 0x20($a0)
/* 3D38B0 E00CEDF0 AC850024 */ sw $a1, 0x24($a0)
/* 3D38B4 E00CEDF4 ACE20000 */ sw $v0, 0x0($a3)
/* 3D38B8 E00CEDF8 AC890028 */ sw $t1, 0x28($a0)
/* 3D38BC E00CEDFC AC85002C */ sw $a1, 0x2C($a0)
/* 3D38C0 E00CEE00 AC830014 */ sw $v1, 0x14($a0)
/* 3D38C4 E00CEE04 8FBF00EC */ lw $ra, 0xEC($sp)
/* 3D38C8 E00CEE08 8FBE00E8 */ lw $fp, 0xE8($sp)
/* 3D38CC E00CEE0C 8FB700E4 */ lw $s7, 0xE4($sp)
/* 3D38D0 E00CEE10 8FB600E0 */ lw $s6, 0xE0($sp)
/* 3D38D4 E00CEE14 8FB500DC */ lw $s5, 0xDC($sp)
/* 3D38D8 E00CEE18 8FB400D8 */ lw $s4, 0xD8($sp)
/* 3D38DC E00CEE1C 8FB300D4 */ lw $s3, 0xD4($sp)
/* 3D38E0 E00CEE20 8FB200D0 */ lw $s2, 0xD0($sp)
/* 3D38E4 E00CEE24 8FB100CC */ lw $s1, 0xCC($sp)
/* 3D38E8 E00CEE28 8FB000C8 */ lw $s0, 0xC8($sp)
/* 3D38EC E00CEE2C D7BE0118 */ ldc1 $f30, 0x118($sp)
/* 3D38F0 E00CEE30 D7BC0110 */ ldc1 $f28, 0x110($sp)
/* 3D38F4 E00CEE34 D7BA0108 */ ldc1 $f26, 0x108($sp)
/* 3D38F8 E00CEE38 D7B80100 */ ldc1 $f24, 0x100($sp)
/* 3D38FC E00CEE3C D7B600F8 */ ldc1 $f22, 0xF8($sp)
/* 3D3900 E00CEE40 D7B400F0 */ ldc1 $f20, 0xF0($sp)
/* 3D3904 E00CEE44 03E00008 */ jr $ra
/* 3D3908 E00CEE48 27BD0120 */ addiu $sp, $sp, 0x120
/* 3D390C E00CEE4C 00000000 */ nop
### DECOMPILED C INSTRUCTIONS:
void whirlwind_appendGfx(void* effect) {
Matrix4f sp20;
Matrix4f sp60;
s32 spA0;
s32 primAlpha;
Gfx* triangleDisplayList;
Vtx* vertexBuffer;
s32 spB0;
s32 spB4;
f32 spB8;
Gfx* whirlwindMainDisplayList;
Gfx* savedPos;
f32 temp_f20_2;
f32 temp_f20_3;
f32 var_f4;
f32 f22;
s32 i;
EffectInstance* eff = (EffectInstance*)effect;
WhirlwindFXData* data = eff->data.whirlwind;
spA0 = data->unk_10;
primAlpha = data->primAlpha >> 1;
spB8 = data->unk_34;
spB0 = data->unk_13C * 4.0f;
spB4 = data->unk_140 * 4.0f;
gDPPipeSync(gMainGfxPos++);
gSPSegment(gMainGfxPos++, 0x09, OS_K0_TO_PHYSICAL(eff->graphics->data));
shim_guTranslateF(sp20, 0.0f, 0.0f, 0.0f);
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_09000400_3D3D30);
// Reserve 0x208 bytes (65 commands) for a vertex buffer (2x16 Vtx + space for the current command)
gSPBranchList(gMainGfxPos, &gMainGfxPos[65]);
vertexBuffer = (Vtx*)(gMainGfxPos + 1);
// set the current position we're writing gfx commands to past the vertex buffer
gMainGfxPos = &gMainGfxPos[65];
// fill the vertex buffer; 2 sets of 16 verticies
for (i = 0; i <= (360 / 24); i++) {
Vtx* vtx = &vertexBuffer[i];
vtx->v.ob[0] = shim_cos_deg(i * (360 / 15)) * 100.0f;
vtx->v.ob[1] = 0;
vtx->v.ob[2] = shim_sin_deg(i * (360 / 15)) * 100.0f;
vtx->v.tc[0] = i * 128;
vtx->v.tc[1] = 0;
vtx = &vertexBuffer[i + (360 / 24 + 1)];
vtx->v.ob[0] = shim_cos_deg(i * (360 / 15)) * 100.0f;
vtx->v.ob[1] = 0;
vtx->v.ob[2] = shim_sin_deg(i * (360 / 15)) * 100.0f;
vtx->v.tc[0] = i * 512;
vtx->v.tc[1] = 1024;
}
// Reserve 0x88 bytes (17 commands, including this one) for a separate dynamically generated display list
gSPBranchList(gMainGfxPos, &gMainGfxPos[17]);
// Get a reference to the dynamically generated display list
triangleDisplayList = ++gMainGfxPos;
// Generate display list
for (i = 0; i < 15; i++) {
gSP2Triangles(gMainGfxPos++, i + 0x10, i + 1, i, 0, i + 0x10, i + 0x11, i + 1, 0);
}
// This marks the end of our dynamically generated display list, return control back to the main display list
gSPEndDisplayList(gMainGfxPos++);
shim_guScaleF(sp20, 0.1f, 0.1f, 0.1f);
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
// Save position to later insert a branch around the commands that follow this
savedPos = gMainGfxPos++;
// Save position of main display list
whirlwindMainDisplayList = gMainGfxPos;
// Generate main display list
for(i = 0; i < (MAX_WHIRLWIND_SEGMENTS - 1); i++) {
shim_guPositionF(sp20, 0.0f, 0.0f, data->unk_118[i], 1.0f, data->unk_38[i] * 10.0f, data->unk_58[i] * 10.0f, data->unk_78[i] * 10.0f);
shim_guRotateF(sp60, data->unk_138 + i * i, -0.03f, 1.0f, 0.1f);
shim_guMtxCatF(sp60, sp20, sp20);
var_f4 = data->unk_98[i] * spB8;
if (spA0 < 0x10) {
var_f4 += (127 - primAlpha) * 0.02f;
}
shim_guScaleF(sp60, var_f4, spB8, var_f4);
shim_guMtxCatF(sp60, sp20, sp20);
temp_f20_2 = data->unk_F8[i] * 10.0f;
f22 = data->unk_B8[i];
shim_guTranslateF(sp60, temp_f20_2 * shim_sin_deg(f22), 0.0f, temp_f20_2 * shim_cos_deg(f22));
shim_guMtxCatF(sp60, sp20, sp20);
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPVertex(gMainGfxPos++, vertexBuffer, 16, 0);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
shim_guPositionF(sp20, 0.0f, 0.0f, data->unk_118[i + 1], 1.0f, data->unk_38[i + 1] * 10.0f, data->unk_58[i + 1] * 10.0f, data->unk_78[i + 1] * 10.0f);
shim_guRotateF(sp60, data->unk_138 + i * i, 0.03f, 1.0f, 0.0f);
shim_guMtxCatF(sp60, sp20, sp20);
shim_guScaleF(sp60, data->unk_98[i + 1] * spB8, spB8, data->unk_98[i + 1] * spB8);
shim_guMtxCatF(sp60, sp20, sp20);
temp_f20_3 = data->unk_F8[i] * 10.0f;
shim_guTranslateF(sp60, temp_f20_3 * shim_sin_deg(data->unk_B8[i]), 0.0f, temp_f20_3 * shim_cos_deg(data->unk_B8[i]));
shim_guMtxCatF(sp60, sp20, sp20);
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPVertex(gMainGfxPos++, &vertexBuffer[16], 16, 16);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, spB0 + i * 16, 0, (spB0 + i * 16 + 63) << 2, 31 << 2);
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE + 1, spB4 + i * 8, 0, (spB4 + i * 8 + 63) << 2, 31 << 2);
// Call the display list to create triangles from the verticies
gSPDisplayList(gMainGfxPos++, triangleDisplayList);
}
gSPEndDisplayList(gMainGfxPos++);
// Now that the length of our display list is known, insert a branch at the previously saved location
gSPBranchList(savedPos, gMainGfxPos);
gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH);
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primR, data->primG, data->primB, primAlpha);
gDPSetEnvColor(gMainGfxPos++, data->envR, data->envG, data->envB, 32);
// Call the main display list
gSPDisplayList(gMainGfxPos++, whirlwindMainDisplayList);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel load_partner_actor
/* 193454 80264B74 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 193458 80264B78 AFB30024 */ sw $s3, 0x24($sp)
/* 19345C 80264B7C 3C138011 */ lui $s3, %hi(gPlayerData)
/* 193460 80264B80 2673F290 */ addiu $s3, $s3, %lo(gPlayerData)
/* 193464 80264B84 AFBF0034 */ sw $ra, 0x34($sp)
/* 193468 80264B88 AFB60030 */ sw $s6, 0x30($sp)
/* 19346C 80264B8C AFB5002C */ sw $s5, 0x2C($sp)
/* 193470 80264B90 AFB40028 */ sw $s4, 0x28($sp)
/* 193474 80264B94 AFB20020 */ sw $s2, 0x20($sp)
/* 193478 80264B98 AFB1001C */ sw $s1, 0x1C($sp)
/* 19347C 80264B9C AFB00018 */ sw $s0, 0x18($sp)
/* 193480 80264BA0 F7B80048 */ sdc1 $f24, 0x48($sp)
/* 193484 80264BA4 F7B60040 */ sdc1 $f22, 0x40($sp)
/* 193488 80264BA8 F7B40038 */ sdc1 $f20, 0x38($sp)
/* 19348C 80264BAC 82640012 */ lb $a0, 0x12($s3)
/* 193490 80264BB0 3C12800E */ lui $s2, %hi(gBattleStatus)
/* 193494 80264BB4 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus)
/* 193498 80264BB8 108001ED */ beqz $a0, .L80265370
/* 19349C 80264BBC AE4000DC */ sw $zero, 0xDC($s2)
/* 1934A0 80264BC0 3C038028 */ lui $v1, %hi(D_80283F10)
/* 1934A4 80264BC4 24633F10 */ addiu $v1, $v1, %lo(D_80283F10)
/* 1934A8 80264BC8 00041080 */ sll $v0, $a0, 2
/* 1934AC 80264BCC 00441021 */ addu $v0, $v0, $a0
/* 1934B0 80264BD0 00021080 */ sll $v0, $v0, 2
/* 1934B4 80264BD4 00438021 */ addu $s0, $v0, $v1
/* 1934B8 80264BD8 8E14000C */ lw $s4, 0xC($s0)
/* 1934BC 80264BDC 16800003 */ bnez $s4, .L80264BEC
/* 1934C0 80264BE0 00000000 */ nop
.L80264BE4:
/* 1934C4 80264BE4 080992F9 */ j .L80264BE4
/* 1934C8 80264BE8 00000000 */ nop
.L80264BEC:
/* 1934CC 80264BEC 8E040000 */ lw $a0, 0x0($s0)
/* 1934D0 80264BF0 8E060004 */ lw $a2, 0x4($s0)
/* 1934D4 80264BF4 8E050008 */ lw $a1, 0x8($s0)
/* 1934D8 80264BF8 0C017D24 */ jal nuPiReadRom
/* 1934DC 80264BFC 00C43023 */ subu $a2, $a2, $a0
/* 1934E0 80264C00 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 1934E4 80264C04 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 1934E8 80264C08 8C820004 */ lw $v0, 0x4($a0)
/* 1934EC 80264C0C 30420040 */ andi $v0, $v0, 0x40
/* 1934F0 80264C10 14400007 */ bnez $v0, .L80264C30
/* 1934F4 80264C14 00000000 */ nop
/* 1934F8 80264C18 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 1934FC 80264C1C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 193500 80264C20 904200AA */ lbu $v0, 0xAA($v0)
/* 193504 80264C24 30420002 */ andi $v0, $v0, 0x2
/* 193508 80264C28 1040000B */ beqz $v0, .L80264C58
/* 19350C 80264C2C 00000000 */ nop
.L80264C30:
/* 193510 80264C30 C6180010 */ lwc1 $f24, 0x10($s0)
/* 193514 80264C34 4680C620 */ cvt.s.w $f24, $f24
/* 193518 80264C38 3C030010 */ lui $v1, (0x100000 >> 16)
/* 19351C 80264C3C 3C01C2BE */ lui $at, (0xC2BE0000 >> 16)
/* 193520 80264C40 4481A000 */ mtc1 $at, $f20
/* 193524 80264C44 8C820000 */ lw $v0, 0x0($a0)
/* 193528 80264C48 4480B000 */ mtc1 $zero, $f22
/* 19352C 80264C4C 00431025 */ or $v0, $v0, $v1
/* 193530 80264C50 0809931C */ j .L80264C70
/* 193534 80264C54 AC820000 */ sw $v0, 0x0($a0)
.L80264C58:
/* 193538 80264C58 C6180010 */ lwc1 $f24, 0x10($s0)
/* 19353C 80264C5C 4680C620 */ cvt.s.w $f24, $f24
/* 193540 80264C60 3C01C302 */ lui $at, (0xC3020000 >> 16)
/* 193544 80264C64 4481A000 */ mtc1 $at, $f20
/* 193548 80264C68 3C01C120 */ lui $at, (0xC1200000 >> 16)
/* 19354C 80264C6C 4481B000 */ mtc1 $at, $f22
.L80264C70:
/* 193550 80264C70 86960008 */ lh $s6, 0x8($s4)
/* 193554 80264C74 0C00AB39 */ jal heap_malloc
/* 193558 80264C78 24040444 */ addiu $a0, $zero, 0x444
/* 19355C 80264C7C 0040882D */ daddu $s1, $v0, $zero
/* 193560 80264C80 16200003 */ bnez $s1, .L80264C90
/* 193564 80264C84 AE4200DC */ sw $v0, 0xDC($s2)
.L80264C88:
/* 193568 80264C88 08099322 */ j .L80264C88
/* 19356C 80264C8C 00000000 */ nop
.L80264C90:
/* 193570 80264C90 82620012 */ lb $v0, 0x12($s3)
/* 193574 80264C94 000210C0 */ sll $v0, $v0, 3
/* 193578 80264C98 02621021 */ addu $v0, $s3, $v0
/* 19357C 80264C9C 90420015 */ lbu $v0, 0x15($v0)
/* 193580 80264CA0 A2820006 */ sb $v0, 0x6($s4)
/* 193584 80264CA4 92430093 */ lbu $v1, 0x93($s2)
/* 193588 80264CA8 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 19358C 80264CAC 44811000 */ mtc1 $at, $f2
/* 193590 80264CB0 24620001 */ addiu $v0, $v1, 0x1
/* 193594 80264CB4 A2420093 */ sb $v0, 0x93($s2)
/* 193598 80264CB8 A2230134 */ sb $v1, 0x134($s1)
/* 19359C 80264CBC A2200135 */ sb $zero, 0x135($s1)
/* 1935A0 80264CC0 AE340008 */ sw $s4, 0x8($s1)
/* 1935A4 80264CC4 92820005 */ lbu $v0, 0x5($s4)
/* 1935A8 80264CC8 A2220136 */ sb $v0, 0x136($s1)
/* 1935AC 80264CCC 8E820000 */ lw $v0, 0x0($s4)
/* 1935B0 80264CD0 E6340144 */ swc1 $f20, 0x144($s1)
/* 1935B4 80264CD4 E6340138 */ swc1 $f20, 0x138($s1)
/* 1935B8 80264CD8 E6380148 */ swc1 $f24, 0x148($s1)
/* 1935BC 80264CDC E638013C */ swc1 $f24, 0x13C($s1)
/* 1935C0 80264CE0 E636014C */ swc1 $f22, 0x14C($s1)
/* 1935C4 80264CE4 E6360140 */ swc1 $f22, 0x140($s1)
/* 1935C8 80264CE8 A6200150 */ sh $zero, 0x150($s1)
/* 1935CC 80264CEC A6200152 */ sh $zero, 0x152($s1)
/* 1935D0 80264CF0 A6200154 */ sh $zero, 0x154($s1)
/* 1935D4 80264CF4 AE220000 */ sw $v0, 0x0($s1)
/* 1935D8 80264CF8 92820007 */ lbu $v0, 0x7($s4)
/* 1935DC 80264CFC A23601F3 */ sb $s6, 0x1F3($s1)
/* 1935E0 80264D00 AE2001C0 */ sw $zero, 0x1C0($s1)
/* 1935E4 80264D04 A22201B8 */ sb $v0, 0x1B8($s1)
/* 1935E8 80264D08 8E820010 */ lw $v0, 0x10($s4)
/* 1935EC 80264D0C AE2001C8 */ sw $zero, 0x1C8($s1)
/* 1935F0 80264D10 AE2001CC */ sw $zero, 0x1CC($s1)
/* 1935F4 80264D14 AE2001D0 */ sw $zero, 0x1D0($s1)
/* 1935F8 80264D18 AE2001D4 */ sw $zero, 0x1D4($s1)
/* 1935FC 80264D1C AE2001D8 */ sw $zero, 0x1D8($s1)
/* 193600 80264D20 AE2001DC */ sw $zero, 0x1DC($s1)
/* 193604 80264D24 AE2201C4 */ sw $v0, 0x1C4($s1)
/* 193608 80264D28 A22001F1 */ sb $zero, 0x1F1($s1)
/* 19360C 80264D2C 4600A006 */ mov.s $f0, $f20
/* 193610 80264D30 A22001F2 */ sb $zero, 0x1F2($s1)
/* 193614 80264D34 AE20018C */ sw $zero, 0x18C($s1)
/* 193618 80264D38 AE20015C */ sw $zero, 0x15C($s1)
/* 19361C 80264D3C AE200160 */ sw $zero, 0x160($s1)
/* 193620 80264D40 AE200164 */ sw $zero, 0x164($s1)
/* 193624 80264D44 A6200168 */ sh $zero, 0x168($s1)
/* 193628 80264D48 A620016A */ sh $zero, 0x16A($s1)
/* 19362C 80264D4C A620016C */ sh $zero, 0x16C($s1)
/* 193630 80264D50 E6220170 */ swc1 $f2, 0x170($s1)
/* 193634 80264D54 E6220174 */ swc1 $f2, 0x174($s1)
/* 193638 80264D58 E6220178 */ swc1 $f2, 0x178($s1)
/* 19363C 80264D5C E622017C */ swc1 $f2, 0x17C($s1)
/* 193640 80264D60 E6220180 */ swc1 $f2, 0x180($s1)
/* 193644 80264D64 E6220184 */ swc1 $f2, 0x184($s1)
/* 193648 80264D68 A220019A */ sb $zero, 0x19A($s1)
/* 19364C 80264D6C 92820020 */ lbu $v0, 0x20($s4)
/* 193650 80264D70 4600B106 */ mov.s $f4, $f22
/* 193654 80264D74 A2220190 */ sb $v0, 0x190($s1)
/* 193658 80264D78 4600018D */ trunc.w.s $f6, $f0
/* 19365C 80264D7C 44023000 */ mfc1 $v0, $f6
/* 193660 80264D80 92830021 */ lbu $v1, 0x21($s4)
/* 193664 80264D84 4600C006 */ mov.s $f0, $f24
/* 193668 80264D88 A6220156 */ sh $v0, 0x156($s1)
/* 19366C 80264D8C 4600018D */ trunc.w.s $f6, $f0
/* 193670 80264D90 44023000 */ mfc1 $v0, $f6
/* 193674 80264D94 00000000 */ nop
/* 193678 80264D98 A6220158 */ sh $v0, 0x158($s1)
/* 19367C 80264D9C 4600218D */ trunc.w.s $f6, $f4
/* 193680 80264DA0 44023000 */ mfc1 $v0, $f6
/* 193684 80264DA4 00000000 */ nop
/* 193688 80264DA8 A622015A */ sh $v0, 0x15A($s1)
/* 19368C 80264DAC 2402000D */ addiu $v0, $zero, 0xD
/* 193690 80264DB0 E6220188 */ swc1 $f2, 0x188($s1)
/* 193694 80264DB4 AE200200 */ sw $zero, 0x200($s1)
/* 193698 80264DB8 A2200204 */ sb $zero, 0x204($s1)
/* 19369C 80264DBC A2200205 */ sb $zero, 0x205($s1)
/* 1936A0 80264DC0 A2200194 */ sb $zero, 0x194($s1)
/* 1936A4 80264DC4 A2200195 */ sb $zero, 0x195($s1)
/* 1936A8 80264DC8 A2200196 */ sb $zero, 0x196($s1)
/* 1936AC 80264DCC A2200197 */ sb $zero, 0x197($s1)
/* 1936B0 80264DD0 A2230191 */ sb $v1, 0x191($s1)
/* 1936B4 80264DD4 A6220434 */ sh $v0, 0x434($s1)
/* 1936B8 80264DD8 24020100 */ addiu $v0, $zero, 0x100
/* 1936BC 80264DDC A6220192 */ sh $v0, 0x192($s1)
/* 1936C0 80264DE0 8E820014 */ lw $v0, 0x14($s4)
/* 1936C4 80264DE4 92230136 */ lbu $v1, 0x136($s1)
/* 1936C8 80264DE8 A2200210 */ sb $zero, 0x210($s1)
/* 1936CC 80264DEC A2200211 */ sb $zero, 0x211($s1)
/* 1936D0 80264DF0 A2200212 */ sb $zero, 0x212($s1)
/* 1936D4 80264DF4 A2200213 */ sb $zero, 0x213($s1)
/* 1936D8 80264DF8 A2200214 */ sb $zero, 0x214($s1)
/* 1936DC 80264DFC A2200215 */ sb $zero, 0x215($s1)
/* 1936E0 80264E00 A2200216 */ sb $zero, 0x216($s1)
/* 1936E4 80264E04 A2200217 */ sb $zero, 0x217($s1)
/* 1936E8 80264E08 A2200218 */ sb $zero, 0x218($s1)
/* 1936EC 80264E0C A2200219 */ sb $zero, 0x219($s1)
/* 1936F0 80264E10 A2200220 */ sb $zero, 0x220($s1)
/* 1936F4 80264E14 A620021E */ sh $zero, 0x21E($s1)
/* 1936F8 80264E18 A220021D */ sb $zero, 0x21D($s1)
/* 1936FC 80264E1C A2200221 */ sb $zero, 0x221($s1)
/* 193700 80264E20 A2200222 */ sb $zero, 0x222($s1)
/* 193704 80264E24 A2200223 */ sb $zero, 0x223($s1)
/* 193708 80264E28 A2200224 */ sb $zero, 0x224($s1)
/* 19370C 80264E2C A220021C */ sb $zero, 0x21C($s1)
/* 193710 80264E30 AE22020C */ sw $v0, 0x20C($s1)
/* 193714 80264E34 000310C0 */ sll $v0, $v1, 3
/* 193718 80264E38 00431023 */ subu $v0, $v0, $v1
/* 19371C 80264E3C 00021080 */ sll $v0, $v0, 2
/* 193720 80264E40 3C018028 */ lui $at, %hi(bActorSoundTable)
/* 193724 80264E44 00220821 */ addu $at, $at, $v0
/* 193728 80264E48 8C221468 */ lw $v0, %lo(bActorSoundTable)($at)
/* 19372C 80264E4C AE22019C */ sw $v0, 0x19C($s1)
/* 193730 80264E50 000310C0 */ sll $v0, $v1, 3
/* 193734 80264E54 00431023 */ subu $v0, $v0, $v1
/* 193738 80264E58 00021080 */ sll $v0, $v0, 2
/* 19373C 80264E5C 3C018028 */ lui $at, %hi(bActorSoundTable + 0x4)
/* 193740 80264E60 00220821 */ addu $at, $at, $v0
/* 193744 80264E64 8C22146C */ lw $v0, %lo(bActorSoundTable + 0x4)($at)
/* 193748 80264E68 AE2201A0 */ sw $v0, 0x1A0($s1)
/* 19374C 80264E6C 000310C0 */ sll $v0, $v1, 3
/* 193750 80264E70 00431023 */ subu $v0, $v0, $v1
/* 193754 80264E74 00021080 */ sll $v0, $v0, 2
/* 193758 80264E78 3C018028 */ lui $at, %hi(bActorSoundTable + 0x8)
/* 19375C 80264E7C 00220821 */ addu $at, $at, $v0
/* 193760 80264E80 8C221470 */ lw $v0, %lo(bActorSoundTable + 0x8)($at)
/* 193764 80264E84 AE2201A4 */ sw $v0, 0x1A4($s1)
/* 193768 80264E88 000310C0 */ sll $v0, $v1, 3
/* 19376C 80264E8C 00431023 */ subu $v0, $v0, $v1
/* 193770 80264E90 00021080 */ sll $v0, $v0, 2
/* 193774 80264E94 3C018028 */ lui $at, %hi(bActorSoundTable + 0xC)
/* 193778 80264E98 00220821 */ addu $at, $at, $v0
/* 19377C 80264E9C 8C221474 */ lw $v0, %lo(bActorSoundTable + 0xC)($at)
/* 193780 80264EA0 AE2201A8 */ sw $v0, 0x1A8($s1)
/* 193784 80264EA4 000310C0 */ sll $v0, $v1, 3
/* 193788 80264EA8 00431023 */ subu $v0, $v0, $v1
/* 19378C 80264EAC 00021080 */ sll $v0, $v0, 2
/* 193790 80264EB0 3C018028 */ lui $at, %hi(bActorSoundTable + 0x10)
/* 193794 80264EB4 00220821 */ addu $at, $at, $v0
/* 193798 80264EB8 8C221478 */ lw $v0, %lo(bActorSoundTable + 0x10)($at)
/* 19379C 80264EBC AE2201AC */ sw $v0, 0x1AC($s1)
/* 1937A0 80264EC0 000310C0 */ sll $v0, $v1, 3
/* 1937A4 80264EC4 00431023 */ subu $v0, $v0, $v1
/* 1937A8 80264EC8 00021080 */ sll $v0, $v0, 2
/* 1937AC 80264ECC 3C018028 */ lui $at, %hi(bActorSoundTable + 0x14)
/* 1937B0 80264ED0 00220821 */ addu $at, $at, $v0
/* 1937B4 80264ED4 8C22147C */ lw $v0, %lo(bActorSoundTable + 0x14)($at)
/* 1937B8 80264ED8 AE2201B0 */ sw $v0, 0x1B0($s1)
/* 1937BC 80264EDC 000310C0 */ sll $v0, $v1, 3
/* 1937C0 80264EE0 00431023 */ subu $v0, $v0, $v1
/* 1937C4 80264EE4 00021080 */ sll $v0, $v0, 2
/* 1937C8 80264EE8 3C018028 */ lui $at, %hi(bActorSoundTable + 0x18)
/* 1937CC 80264EEC 00220821 */ addu $at, $at, $v0
/* 1937D0 80264EF0 94221480 */ lhu $v0, %lo(bActorSoundTable + 0x18)($at)
/* 1937D4 80264EF4 24040001 */ addiu $a0, $zero, 0x1
/* 1937D8 80264EF8 A62201B4 */ sh $v0, 0x1B4($s1)
/* 1937DC 80264EFC 000310C0 */ sll $v0, $v1, 3
/* 1937E0 80264F00 00431023 */ subu $v0, $v0, $v1
/* 1937E4 80264F04 00021080 */ sll $v0, $v0, 2
/* 1937E8 80264F08 3C018028 */ lui $at, %hi(bActorSoundTable + 0x1A)
/* 1937EC 80264F0C 00220821 */ addu $at, $at, $v0
/* 1937F0 80264F10 94221482 */ lhu $v0, %lo(bActorSoundTable + 0x1A)($at)
/* 1937F4 80264F14 26230004 */ addiu $v1, $s1, 0x4
/* 1937F8 80264F18 A62201B6 */ sh $v0, 0x1B6($s1)
.L80264F1C:
/* 1937FC 80264F1C AC600438 */ sw $zero, 0x438($v1)
/* 193800 80264F20 2484FFFF */ addiu $a0, $a0, -0x1
/* 193804 80264F24 0481FFFD */ bgez $a0, .L80264F1C
/* 193808 80264F28 2463FFFC */ addiu $v1, $v1, -0x4
/* 19380C 80264F2C 0C00AB39 */ jal heap_malloc
/* 193810 80264F30 240400C4 */ addiu $a0, $zero, 0xC4
/* 193814 80264F34 0040802D */ daddu $s0, $v0, $zero
/* 193818 80264F38 16000003 */ bnez $s0, .L80264F48
/* 19381C 80264F3C AE3001F4 */ sw $s0, 0x1F4($s1)
.L80264F40:
/* 193820 80264F40 080993D0 */ j .L80264F40
/* 193824 80264F44 00000000 */ nop
.L80264F48:
/* 193828 80264F48 1AC000E7 */ blez $s6, .L802652E8
/* 19382C 80264F4C 0000982D */ daddu $s3, $zero, $zero
/* 193830 80264F50 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 193834 80264F54 4481A000 */ mtc1 $at, $f20
/* 193838 80264F58 3C128028 */ lui $s2, %hi(bActorSoundTable)
/* 19383C 80264F5C 26521468 */ addiu $s2, $s2, %lo(bActorSoundTable)
/* 193840 80264F60 0260A82D */ daddu $s5, $s3, $zero
.L80264F64:
/* 193844 80264F64 8E83000C */ lw $v1, 0xC($s4)
/* 193848 80264F68 AE0000C0 */ sw $zero, 0xC0($s0)
/* 19384C 80264F6C 00751821 */ addu $v1, $v1, $s5
/* 193850 80264F70 AE030008 */ sw $v1, 0x8($s0)
/* 193854 80264F74 8C620000 */ lw $v0, 0x0($v1)
/* 193858 80264F78 AE000004 */ sw $zero, 0x4($s0)
/* 19385C 80264F7C 34420004 */ ori $v0, $v0, 0x4
/* 193860 80264F80 AE020000 */ sw $v0, 0x0($s0)
/* 193864 80264F84 90620005 */ lbu $v0, 0x5($v1)
/* 193868 80264F88 00021600 */ sll $v0, $v0, 24
/* 19386C 80264F8C 00021603 */ sra $v0, $v0, 24
/* 193870 80264F90 A6020014 */ sh $v0, 0x14($s0)
/* 193874 80264F94 00021400 */ sll $v0, $v0, 16
/* 193878 80264F98 00021403 */ sra $v0, $v0, 16
/* 19387C 80264F9C 44820000 */ mtc1 $v0, $f0
/* 193880 80264FA0 00000000 */ nop
/* 193884 80264FA4 46800020 */ cvt.s.w $f0, $f0
/* 193888 80264FA8 E6000020 */ swc1 $f0, 0x20($s0)
/* 19388C 80264FAC 90620006 */ lbu $v0, 0x6($v1)
/* 193890 80264FB0 00021600 */ sll $v0, $v0, 24
/* 193894 80264FB4 00021603 */ sra $v0, $v0, 24
/* 193898 80264FB8 A6020016 */ sh $v0, 0x16($s0)
/* 19389C 80264FBC 00021400 */ sll $v0, $v0, 16
/* 1938A0 80264FC0 00021403 */ sra $v0, $v0, 16
/* 1938A4 80264FC4 44820000 */ mtc1 $v0, $f0
/* 1938A8 80264FC8 00000000 */ nop
/* 1938AC 80264FCC 46800020 */ cvt.s.w $f0, $f0
/* 1938B0 80264FD0 E6000024 */ swc1 $f0, 0x24($s0)
/* 1938B4 80264FD4 90620007 */ lbu $v0, 0x7($v1)
/* 1938B8 80264FD8 A600001A */ sh $zero, 0x1A($s0)
/* 1938BC 80264FDC A600001C */ sh $zero, 0x1C($s0)
/* 1938C0 80264FE0 A600001E */ sh $zero, 0x1E($s0)
/* 1938C4 80264FE4 AE00002C */ sw $zero, 0x2C($s0)
/* 1938C8 80264FE8 AE000030 */ sw $zero, 0x30($s0)
/* 1938CC 80264FEC AE000034 */ sw $zero, 0x34($s0)
/* 1938D0 80264FF0 00021600 */ sll $v0, $v0, 24
/* 1938D4 80264FF4 00021603 */ sra $v0, $v0, 24
/* 1938D8 80264FF8 A6020018 */ sh $v0, 0x18($s0)
/* 1938DC 80264FFC 00021400 */ sll $v0, $v0, 16
/* 1938E0 80265000 00021403 */ sra $v0, $v0, 16
/* 1938E4 80265004 44820000 */ mtc1 $v0, $f0
/* 1938E8 80265008 00000000 */ nop
/* 1938EC 8026500C 46800020 */ cvt.s.w $f0, $f0
/* 1938F0 80265010 E6000028 */ swc1 $f0, 0x28($s0)
/* 1938F4 80265014 8C620010 */ lw $v0, 0x10($v1)
/* 1938F8 80265018 AE020078 */ sw $v0, 0x78($s0)
/* 1938FC 8026501C 8C62000C */ lw $v0, 0xC($v1)
/* 193900 80265020 AE020094 */ sw $v0, 0x94($s0)
/* 193904 80265024 8C620014 */ lw $v0, 0x14($v1)
/* 193908 80265028 AE02007C */ sw $v0, 0x7C($s0)
/* 19390C 8026502C 8C620018 */ lw $v0, 0x18($v1)
/* 193910 80265030 AE020080 */ sw $v0, 0x80($s0)
/* 193914 80265034 9462000A */ lhu $v0, 0xA($v1)
/* 193918 80265038 A6020098 */ sh $v0, 0x98($s0)
/* 19391C 8026503C 92220191 */ lbu $v0, 0x191($s1)
/* 193920 80265040 A2020073 */ sb $v0, 0x73($s0)
/* 193924 80265044 92220190 */ lbu $v0, 0x190($s1)
/* 193928 80265048 A2020072 */ sb $v0, 0x72($s0)
/* 19392C 8026504C AE000064 */ sw $zero, 0x64($s0)
/* 193930 80265050 90620008 */ lbu $v0, 0x8($v1)
/* 193934 80265054 00021600 */ sll $v0, $v0, 24
/* 193938 80265058 00021603 */ sra $v0, $v0, 24
/* 19393C 8026505C A602006C */ sh $v0, 0x6C($s0)
/* 193940 80265060 90630009 */ lbu $v1, 0x9($v1)
/* 193944 80265064 24020001 */ addiu $v0, $zero, 0x1
/* 193948 80265068 A6000070 */ sh $zero, 0x70($s0)
/* 19394C 8026506C A6000044 */ sh $zero, 0x44($s0)
/* 193950 80265070 A6000046 */ sh $zero, 0x46($s0)
/* 193954 80265074 A6000048 */ sh $zero, 0x48($s0)
/* 193958 80265078 AE000038 */ sw $zero, 0x38($s0)
/* 19395C 8026507C AE00003C */ sw $zero, 0x3C($s0)
/* 193960 80265080 AE000040 */ sw $zero, 0x40($s0)
/* 193964 80265084 E614004C */ swc1 $f20, 0x4C($s0)
/* 193968 80265088 E6140050 */ swc1 $f20, 0x50($s0)
/* 19396C 8026508C E6140054 */ swc1 $f20, 0x54($s0)
/* 193970 80265090 A2020074 */ sb $v0, 0x74($s0)
/* 193974 80265094 A6000068 */ sh $zero, 0x68($s0)
/* 193978 80265098 A600006A */ sh $zero, 0x6A($s0)
/* 19397C 8026509C 00031E00 */ sll $v1, $v1, 24
/* 193980 802650A0 00031E03 */ sra $v1, $v1, 24
/* 193984 802650A4 A603006E */ sh $v1, 0x6E($s0)
/* 193988 802650A8 92230136 */ lbu $v1, 0x136($s1)
/* 19398C 802650AC 000310C0 */ sll $v0, $v1, 3
/* 193990 802650B0 00431023 */ subu $v0, $v0, $v1
/* 193994 802650B4 00021080 */ sll $v0, $v0, 2
/* 193998 802650B8 00521021 */ addu $v0, $v0, $s2
/* 19399C 802650BC 8C420000 */ lw $v0, 0x0($v0)
/* 1939A0 802650C0 AE0200A4 */ sw $v0, 0xA4($s0)
/* 1939A4 802650C4 92230136 */ lbu $v1, 0x136($s1)
/* 1939A8 802650C8 000310C0 */ sll $v0, $v1, 3
/* 1939AC 802650CC 00431023 */ subu $v0, $v0, $v1
/* 1939B0 802650D0 00021080 */ sll $v0, $v0, 2
/* 1939B4 802650D4 00521021 */ addu $v0, $v0, $s2
/* 1939B8 802650D8 8C420004 */ lw $v0, 0x4($v0)
/* 1939BC 802650DC AE0200A8 */ sw $v0, 0xA8($s0)
/* 1939C0 802650E0 92230136 */ lbu $v1, 0x136($s1)
/* 1939C4 802650E4 000310C0 */ sll $v0, $v1, 3
/* 1939C8 802650E8 00431023 */ subu $v0, $v0, $v1
/* 1939CC 802650EC 00021080 */ sll $v0, $v0, 2
/* 1939D0 802650F0 00521021 */ addu $v0, $v0, $s2
/* 1939D4 802650F4 8C420008 */ lw $v0, 0x8($v0)
/* 1939D8 802650F8 AE0200AC */ sw $v0, 0xAC($s0)
/* 1939DC 802650FC 92230136 */ lbu $v1, 0x136($s1)
/* 1939E0 80265100 000310C0 */ sll $v0, $v1, 3
/* 1939E4 80265104 00431023 */ subu $v0, $v0, $v1
/* 1939E8 80265108 00021080 */ sll $v0, $v0, 2
/* 1939EC 8026510C 00521021 */ addu $v0, $v0, $s2
/* 1939F0 80265110 8C42000C */ lw $v0, 0xC($v0)
/* 1939F4 80265114 AE0200B0 */ sw $v0, 0xB0($s0)
/* 1939F8 80265118 92230136 */ lbu $v1, 0x136($s1)
/* 1939FC 8026511C 000310C0 */ sll $v0, $v1, 3
/* 193A00 80265120 00431023 */ subu $v0, $v0, $v1
/* 193A04 80265124 00021080 */ sll $v0, $v0, 2
/* 193A08 80265128 00521021 */ addu $v0, $v0, $s2
/* 193A0C 8026512C 8C420010 */ lw $v0, 0x10($v0)
/* 193A10 80265130 AE0200B4 */ sw $v0, 0xB4($s0)
/* 193A14 80265134 92230136 */ lbu $v1, 0x136($s1)
/* 193A18 80265138 000310C0 */ sll $v0, $v1, 3
/* 193A1C 8026513C 00431023 */ subu $v0, $v0, $v1
/* 193A20 80265140 00021080 */ sll $v0, $v0, 2
/* 193A24 80265144 00521021 */ addu $v0, $v0, $s2
/* 193A28 80265148 8C420014 */ lw $v0, 0x14($v0)
/* 193A2C 8026514C AE0200B8 */ sw $v0, 0xB8($s0)
/* 193A30 80265150 92230136 */ lbu $v1, 0x136($s1)
/* 193A34 80265154 000310C0 */ sll $v0, $v1, 3
/* 193A38 80265158 00431023 */ subu $v0, $v0, $v1
/* 193A3C 8026515C 00021080 */ sll $v0, $v0, 2
/* 193A40 80265160 00521021 */ addu $v0, $v0, $s2
/* 193A44 80265164 94420018 */ lhu $v0, 0x18($v0)
/* 193A48 80265168 A60200BC */ sh $v0, 0xBC($s0)
/* 193A4C 8026516C 92230136 */ lbu $v1, 0x136($s1)
/* 193A50 80265170 000310C0 */ sll $v0, $v1, 3
/* 193A54 80265174 00431023 */ subu $v0, $v0, $v1
/* 193A58 80265178 00021080 */ sll $v0, $v0, 2
/* 193A5C 8026517C 00521021 */ addu $v0, $v0, $s2
/* 193A60 80265180 9442001A */ lhu $v0, 0x1A($v0)
/* 193A64 80265184 8E030094 */ lw $v1, 0x94($s0)
/* 193A68 80265188 10600030 */ beqz $v1, .L8026524C
/* 193A6C 8026518C A60200BE */ sh $v0, 0xBE($s0)
/* 193A70 80265190 0C00AB39 */ jal heap_malloc
/* 193A74 80265194 240408E8 */ addiu $a0, $zero, 0x8E8
/* 193A78 80265198 0040202D */ daddu $a0, $v0, $zero
/* 193A7C 8026519C 14800003 */ bnez $a0, .L802651AC
/* 193A80 802651A0 AE0200C0 */ sw $v0, 0xC0($s0)
.L802651A4:
/* 193A84 802651A4 08099469 */ j .L802651A4
/* 193A88 802651A8 00000000 */ nop
.L802651AC:
/* 193A8C 802651AC 0000282D */ daddu $a1, $zero, $zero
/* 193A90 802651B0 0080182D */ daddu $v1, $a0, $zero
/* 193A94 802651B4 A08006C0 */ sb $zero, 0x6C0($a0)
/* 193A98 802651B8 A0800750 */ sb $zero, 0x750($a0)
/* 193A9C 802651BC A0800764 */ sb $zero, 0x764($a0)
/* 193AA0 802651C0 A0800768 */ sb $zero, 0x768($a0)
/* 193AA4 802651C4 A08007D8 */ sb $zero, 0x7D8($a0)
/* 193AA8 802651C8 A08007D9 */ sb $zero, 0x7D9($a0)
.L802651CC:
/* 193AAC 802651CC C6200144 */ lwc1 $f0, 0x144($s1)
/* 193AB0 802651D0 4600018D */ trunc.w.s $f6, $f0
/* 193AB4 802651D4 44023000 */ mfc1 $v0, $f6
/* 193AB8 802651D8 00000000 */ nop
/* 193ABC 802651DC A46207FC */ sh $v0, 0x7FC($v1)
/* 193AC0 802651E0 C6200148 */ lwc1 $f0, 0x148($s1)
/* 193AC4 802651E4 4600018D */ trunc.w.s $f6, $f0
/* 193AC8 802651E8 44023000 */ mfc1 $v0, $f6
/* 193ACC 802651EC 00000000 */ nop
/* 193AD0 802651F0 A462081C */ sh $v0, 0x81C($v1)
/* 193AD4 802651F4 C620014C */ lwc1 $f0, 0x14C($s1)
/* 193AD8 802651F8 24A50001 */ addiu $a1, $a1, 0x1
/* 193ADC 802651FC 4600018D */ trunc.w.s $f6, $f0
/* 193AE0 80265200 44023000 */ mfc1 $v0, $f6
/* 193AE4 80265204 00000000 */ nop
/* 193AE8 80265208 A462083C */ sh $v0, 0x83C($v1)
/* 193AEC 8026520C 28A20010 */ slti $v0, $a1, 0x10
/* 193AF0 80265210 1440FFEE */ bnez $v0, .L802651CC
/* 193AF4 80265214 24630002 */ addiu $v1, $v1, 0x2
/* 193AF8 80265218 0000282D */ daddu $a1, $zero, $zero
/* 193AFC 8026521C 0080182D */ daddu $v1, $a0, $zero
/* 193B00 80265220 24020003 */ addiu $v0, $zero, 0x3
/* 193B04 80265224 A08207DA */ sb $v0, 0x7DA($a0)
/* 193B08 80265228 A08007DB */ sb $zero, 0x7DB($a0)
/* 193B0C 8026522C A08008AC */ sb $zero, 0x8AC($a0)
.L80265230:
/* 193B10 80265230 AC6008B0 */ sw $zero, 0x8B0($v1)
/* 193B14 80265234 00851021 */ addu $v0, $a0, $a1
/* 193B18 80265238 24A50001 */ addiu $a1, $a1, 0x1
/* 193B1C 8026523C A04008B8 */ sb $zero, 0x8B8($v0)
/* 193B20 80265240 28A20002 */ slti $v0, $a1, 0x2
/* 193B24 80265244 1440FFFA */ bnez $v0, .L80265230
/* 193B28 80265248 24630004 */ addiu $v1, $v1, 0x4
.L8026524C:
/* 193B2C 8026524C 8E020000 */ lw $v0, 0x0($s0)
/* 193B30 80265250 04400007 */ bltz $v0, .L80265270
/* 193B34 80265254 00000000 */ nop
/* 193B38 80265258 0C00AB39 */ jal heap_malloc
/* 193B3C 8026525C 2404008C */ addiu $a0, $zero, 0x8C
/* 193B40 80265260 14400003 */ bnez $v0, .L80265270
/* 193B44 80265264 AE020010 */ sw $v0, 0x10($s0)
.L80265268:
/* 193B48 80265268 0809949A */ j .L80265268
/* 193B4C 8026526C 00000000 */ nop
.L80265270:
/* 193B50 80265270 8E040094 */ lw $a0, 0x94($s0)
/* 193B54 80265274 2402FFFF */ addiu $v0, $zero, -0x1
/* 193B58 80265278 E6140090 */ swc1 $f20, 0x90($s0)
/* 193B5C 8026527C AE000088 */ sw $zero, 0x88($s0)
/* 193B60 80265280 10800009 */ beqz $a0, .L802652A8
/* 193B64 80265284 AE020084 */ sw $v0, 0x84($s0)
/* 193B68 80265288 0C09973A */ jal get_npc_anim_for_status
/* 193B6C 8026528C 24050001 */ addiu $a1, $zero, 0x1
/* 193B70 80265290 3C048000 */ lui $a0, (0x80000000 >> 16)
/* 193B74 80265294 00442025 */ or $a0, $v0, $a0
/* 193B78 80265298 0000282D */ daddu $a1, $zero, $zero
/* 193B7C 8026529C 0C0B783B */ jal spr_load_npc_sprite
/* 193B80 802652A0 AE020088 */ sw $v0, 0x88($s0)
/* 193B84 802652A4 AE020084 */ sw $v0, 0x84($s0)
.L802652A8:
/* 193B88 802652A8 26620001 */ addiu $v0, $s3, 0x1
/* 193B8C 802652AC 0056102A */ slt $v0, $v0, $s6
/* 193B90 802652B0 50400009 */ beql $v0, $zero, .L802652D8
/* 193B94 802652B4 AE00000C */ sw $zero, 0xC($s0)
/* 193B98 802652B8 0C00AB39 */ jal heap_malloc
/* 193B9C 802652BC 240400C4 */ addiu $a0, $zero, 0xC4
/* 193BA0 802652C0 AE02000C */ sw $v0, 0xC($s0)
/* 193BA4 802652C4 0040802D */ daddu $s0, $v0, $zero
/* 193BA8 802652C8 56000003 */ bnel $s0, $zero, .L802652D8
/* 193BAC 802652CC AE00000C */ sw $zero, 0xC($s0)
.L802652D0:
/* 193BB0 802652D0 080994B4 */ j .L802652D0
/* 193BB4 802652D4 00000000 */ nop
.L802652D8:
/* 193BB8 802652D8 26730001 */ addiu $s3, $s3, 0x1
/* 193BBC 802652DC 0276102A */ slt $v0, $s3, $s6
/* 193BC0 802652E0 1440FF20 */ bnez $v0, .L80264F64
/* 193BC4 802652E4 26B50024 */ addiu $s5, $s5, 0x24
.L802652E8:
/* 193BC8 802652E8 8E250144 */ lw $a1, 0x144($s1)
/* 193BCC 802652EC 8E260148 */ lw $a2, 0x148($s1)
/* 193BD0 802652F0 8E27014C */ lw $a3, 0x14C($s1)
/* 193BD4 802652F4 0C044898 */ jal create_shadow_type
/* 193BD8 802652F8 0000202D */ daddu $a0, $zero, $zero
/* 193BDC 802652FC AE22042C */ sw $v0, 0x42C($s1)
/* 193BE0 80265300 92220190 */ lbu $v0, 0x190($s1)
/* 193BE4 80265304 3C014038 */ lui $at, (0x40380000 >> 16)
/* 193BE8 80265308 44811800 */ mtc1 $at, $f3
/* 193BEC 8026530C 44801000 */ mtc1 $zero, $f2
/* 193BF0 80265310 44820000 */ mtc1 $v0, $f0
/* 193BF4 80265314 00000000 */ nop
/* 193BF8 80265318 46800021 */ cvt.d.w $f0, $f0
/* 193BFC 8026531C 46220003 */ div.d $f0, $f0, $f2
/* 193C00 80265320 46200020 */ cvt.s.d $f0, $f0
/* 193C04 80265324 0C011D82 */ jal create_status_icon_set
/* 193C08 80265328 E6200430 */ swc1 $f0, 0x430($s1)
/* 193C0C 8026532C 3C05C30E */ lui $a1, (0xC30E0000 >> 16)
/* 193C10 80265330 3C064208 */ lui $a2, (0x42080000 >> 16)
/* 193C14 80265334 3C073F80 */ lui $a3, (0x3F800000 >> 16)
/* 193C18 80265338 0000202D */ daddu $a0, $zero, $zero
/* 193C1C 8026533C A6220436 */ sh $v0, 0x436($s1)
/* 193C20 80265340 0C01C43C */ jal fx_disable_x
/* 193C24 80265344 AFA00010 */ sw $zero, 0x10($sp)
/* 193C28 80265348 2405000A */ addiu $a1, $zero, 0xA
/* 193C2C 8026534C 8E2401C4 */ lw $a0, 0x1C4($s1)
/* 193C30 80265350 0000302D */ daddu $a2, $zero, $zero
/* 193C34 80265354 AE220440 */ sw $v0, 0x440($s1)
/* 193C38 80265358 0C0B0CF8 */ jal start_script
/* 193C3C 8026535C AE200228 */ sw $zero, 0x228($s1)
/* 193C40 80265360 8C430144 */ lw $v1, 0x144($v0)
/* 193C44 80265364 AE2301E4 */ sw $v1, 0x1E4($s1)
/* 193C48 80265368 24030100 */ addiu $v1, $zero, 0x100
/* 193C4C 8026536C AC430148 */ sw $v1, 0x148($v0)
.L80265370:
/* 193C50 80265370 8FBF0034 */ lw $ra, 0x34($sp)
/* 193C54 80265374 8FB60030 */ lw $s6, 0x30($sp)
/* 193C58 80265378 8FB5002C */ lw $s5, 0x2C($sp)
/* 193C5C 8026537C 8FB40028 */ lw $s4, 0x28($sp)
/* 193C60 80265380 8FB30024 */ lw $s3, 0x24($sp)
/* 193C64 80265384 8FB20020 */ lw $s2, 0x20($sp)
/* 193C68 80265388 8FB1001C */ lw $s1, 0x1C($sp)
/* 193C6C 8026538C 8FB00018 */ lw $s0, 0x18($sp)
/* 193C70 80265390 D7B80048 */ ldc1 $f24, 0x48($sp)
/* 193C74 80265394 D7B60040 */ ldc1 $f22, 0x40($sp)
/* 193C78 80265398 D7B40038 */ ldc1 $f20, 0x38($sp)
/* 193C7C 8026539C 03E00008 */ jr $ra
/* 193C80 802653A0 27BD0050 */ addiu $sp, $sp, 0x50
### DECOMPILED C INSTRUCTIONS:
void load_partner_actor(void) {
PlayerData* playerData = &gPlayerData;
BattleStatus* battleStatus = &gBattleStatus;
Actor* partnerActor;
ActorBlueprint* actorBP;
Evt* takeTurnScript;
s32 partCount;
s32 currentPartner;
PartnerDMAData* partnerData;
f32 x;
f32 y;
f32 z;
ActorPart* part;
s32 i;
s32 i2;
currentPartner = playerData->currentPartner;
battleStatus->partnerActor = NULL;
if (currentPartner != PARTNER_NONE) {
partnerData = &bPartnerDmaTable[currentPartner];
actorBP = partnerData->ActorBlueprint;
ASSERT(actorBP != NULL);
nuPiReadRom(partnerData->dmaStart, partnerData->dmaDest, partnerData->dmaEnd - partnerData->dmaStart);
if ((gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) || (gGameStatusPtr->demoFlags & 2)) {
x = -95.0f;
y = partnerData->y;
z = 0.0f;
gBattleStatus.flags1 |= BS_FLAGS1_PLAYER_IN_BACK;
} else {
x = -130.0f;
y = partnerData->y;
z = -10.0f;
}
partCount = actorBP->partCount;
battleStatus->partnerActor = heap_malloc(sizeof(*partnerActor));
partnerActor = battleStatus->partnerActor;
ASSERT(partnerActor != NULL);
actorBP->level = playerData->partners[playerData->currentPartner].level;
partnerActor->unk_134 = battleStatus->unk_93++;
partnerActor->footStepCounter = 0;
partnerActor->actorBlueprint = actorBP;
partnerActor->actorType = actorBP->type;
partnerActor->flags = actorBP->flags;
partnerActor->homePos.x = partnerActor->currentPos.x = x;
partnerActor->homePos.y = partnerActor->currentPos.y = y;
partnerActor->homePos.z = partnerActor->currentPos.z = z;
partnerActor->headOffset.x = 0;
partnerActor->headOffset.y = 0;
partnerActor->headOffset.z = 0;
partnerActor->currentHP = actorBP->maxHP;
partnerActor->numParts = partCount;
partnerActor->idleSource = NULL;
partnerActor->takeTurnSource = actorBP->initScript;
partnerActor->handleEventSource = NULL;
partnerActor->handlePhaseSource = NULL;
partnerActor->idleScript = NULL;
partnerActor->takeTurnScript = NULL;
partnerActor->handleEventScript = NULL;
partnerActor->handlePhaseScript = NULL;
partnerActor->turnPriority = 0;
partnerActor->enemyIndex = 0;
partnerActor->yaw = 0.0f;
partnerActor->rotation.x = 0.0f;
partnerActor->rotation.y = 0.0f;
partnerActor->rotation.z = 0.0f;
partnerActor->rotationPivotOffset.x = 0;
partnerActor->rotationPivotOffset.y = 0;
partnerActor->rotationPivotOffset.z = 0;
partnerActor->scale.x = 1.0f;
partnerActor->scale.y = 1.0f;
partnerActor->scale.z = 1.0f;
partnerActor->scaleModifier.x = 1.0f;
partnerActor->scaleModifier.y = 1.0f;
partnerActor->scaleModifier.z = 1.0f;
partnerActor->verticalRenderOffset = 0;
partnerActor->size.x = actorBP->size.x;
partnerActor->size.y = actorBP->size.y;
partnerActor->healthBarPos.x = partnerActor->homePos.x;
partnerActor->healthBarPos.y = partnerActor->homePos.y;
partnerActor->healthBarPos.z = partnerActor->homePos.z;
partnerActor->scalingFactor = 1.0f;
partnerActor->attackResultEffect = NULL;
partnerActor->actionRatingCombo = 0;
partnerActor->actionRatingTime = 0;
partnerActor->statusIconOffset.x = 0;
partnerActor->statusIconOffset.y = 0;
partnerActor->statusTextOffset.x = 0;
partnerActor->statusTextOffset.y = 0;
partnerActor->renderMode = RENDER_MODE_ALPHATEST;
partnerActor->actorID = ACTOR_PARTNER;
partnerActor->statusTable = actorBP->statusTable;
partnerActor->debuff = 0;
partnerActor->debuffDuration = 0;
partnerActor->staticStatus = 0;
partnerActor->staticDuration = 0;
partnerActor->stoneStatus = 0;
partnerActor->stoneDuration = 0;
partnerActor->koStatus = 0;
partnerActor->koDuration = 0;
partnerActor->transparentStatus = 0;
partnerActor->transparentDuration = 0;
partnerActor->isGlowing = 0;
partnerActor->unk_21E = 0;
partnerActor->disableDismissTimer = 0;
partnerActor->attackBoost = 0;
partnerActor->defenseBoost = 0;
partnerActor->chillOutAmount = 0;
partnerActor->chillOutTurns = 0;
partnerActor->statusAfflicted = 0;
partnerActor->actorTypeData1[0] = bActorSoundTable[partnerActor->actorType].walk[0];
partnerActor->actorTypeData1[1] = bActorSoundTable[partnerActor->actorType].walk[1];
partnerActor->actorTypeData1[2] = bActorSoundTable[partnerActor->actorType].fly[0];
partnerActor->actorTypeData1[3] = bActorSoundTable[partnerActor->actorType].fly[1];
partnerActor->actorTypeData1[4] = bActorSoundTable[partnerActor->actorType].jump;
partnerActor->actorTypeData1[5] = bActorSoundTable[partnerActor->actorType].hurt;
partnerActor->actorTypeData1b[0] = bActorSoundTable[partnerActor->actorType].delay[0];
partnerActor->actorTypeData1b[1] = bActorSoundTable[partnerActor->actorType].delay[1];
for (i2 = 0; i2 < ARRAY_COUNT(partnerActor->loopingSoundID); i2++) {
partnerActor->loopingSoundID[i2] = 0;
}
part = heap_malloc(sizeof(*part));
partnerActor->partsTable = part;
ASSERT(part != NULL);
for (i = 0; i < partCount; i++) {
ActorPartBlueprint* ActorPartBlueprint = &actorBP->partsData[i];
part->decorationTable = NULL;
part->staticData = ActorPartBlueprint;
part->flags = ActorPartBlueprint->flags | ACTOR_PART_FLAG_4;
part->targetFlags = 0;
part->partOffsetFloat.x = part->partOffset.x = ActorPartBlueprint->posOffset.x;
part->partOffsetFloat.y = part->partOffset.y = ActorPartBlueprint->posOffset.y;
part->partOffsetFloat.z = part->partOffset.z = ActorPartBlueprint->posOffset.z;
part->visualOffset.x = 0;
part->visualOffset.y = 0;
part->visualOffset.z = 0;
part->absolutePosition.x = 0.0f;
part->absolutePosition.y = 0.0f;
part->absolutePosition.z = 0.0f;
part->defenseTable = ActorPartBlueprint->defenseTable;
part->idleAnimations = ActorPartBlueprint->idleAnimations;
part->eventFlags = ActorPartBlueprint->eventFlags;
part->elementalImmunities = ActorPartBlueprint->elementImmunityFlags;
part->opacity = ActorPartBlueprint->opacity;
part->size.y = partnerActor->size.y;
part->size.x = partnerActor->size.x;
part->yaw = 0.0f;
part->targetOffset.x = ActorPartBlueprint->targetOffset.x;
part->targetOffset.y = ActorPartBlueprint->targetOffset.y;
part->unk_70 = 0;
part->rotationPivotOffset.x = 0;
part->rotationPivotOffset.y = 0;
part->rotationPivotOffset.z = 0;
part->rotation.x = 0.0f;
part->rotation.y = 0.0f;
part->rotation.z = 0.0f;
part->scale.x = 1.0f;
part->scale.y = 1.0f;
part->scale.z = 1.0f;
part->verticalStretch = 1;
part->palAnimPosOffset[0] = 0;
part->palAnimPosOffset[1] = 0;
part->partTypeData[0] = bActorSoundTable[partnerActor->actorType].walk[0];
part->partTypeData[1] = bActorSoundTable[partnerActor->actorType].walk[1];
part->partTypeData[2] = bActorSoundTable[partnerActor->actorType].fly[0];
part->partTypeData[3] = bActorSoundTable[partnerActor->actorType].fly[1];
part->partTypeData[4] = bActorSoundTable[partnerActor->actorType].jump;
part->partTypeData[5] = bActorSoundTable[partnerActor->actorType].hurt;
part->actorTypeData2b[0] = bActorSoundTable[partnerActor->actorType].delay[0];
part->actorTypeData2b[1] = bActorSoundTable[partnerActor->actorType].delay[1];
if (part->idleAnimations != NULL) {
DecorationTable* decorationTable;
s32 j;
part->decorationTable = heap_malloc(sizeof(*decorationTable));
decorationTable = part->decorationTable;
ASSERT(decorationTable != NULL);
decorationTable->paletteAdjustment = PAL_ADJUST_NONE;
decorationTable->unk_750 = 0;
decorationTable->unk_764 = 0;
decorationTable->unk_768 = 0;
decorationTable->unk_7D8 = 0;
decorationTable->unk_7D9 = 0;
for (j = 0; j < ARRAY_COUNT(decorationTable->posX); j++) {
decorationTable->posX[j] = partnerActor->currentPos.x;
decorationTable->posY[j] = partnerActor->currentPos.y;
decorationTable->posZ[j] = partnerActor->currentPos.z;
}
decorationTable->unk_7DA = 3;
decorationTable->unk_7DB = 0;
decorationTable->effectType = 0;
for (j = 0; j < ARRAY_COUNT(decorationTable->effect); j++) {
decorationTable->effect[j] = NULL;
decorationTable->type[j] = 0;
}
}
if (part->flags >= 0) {
part->movement = heap_malloc(sizeof(*part->movement));
ASSERT(part->movement != NULL);
}
part->animationRate = 1.0f;
part->currentAnimation = 0;
part->spriteInstanceID = -1;
if (part->idleAnimations != NULL) {
part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, 1);
part->spriteInstanceID = spr_load_npc_sprite(part->currentAnimation | SPRITE_ID_TAIL_ALLOCATE, NULL);
}
if (i + 1 >= partCount) {
part->nextPart = NULL;
continue;
}
part->nextPart = heap_malloc(sizeof(*part->nextPart));
part = part->nextPart;
if (part == NULL) {
PANIC();
}
part->nextPart = NULL;
}
partnerActor->shadow.id = create_shadow_type(0, partnerActor->currentPos.x, partnerActor->currentPos.y, partnerActor->currentPos.z);
partnerActor->shadowScale = partnerActor->size.x / 24.0;
partnerActor->hudElementDataIndex = create_status_icon_set();
partnerActor->disableEffect = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0);
partnerActor->icePillarEffect = NULL;
takeTurnScript = start_script(partnerActor->takeTurnSource, EVT_PRIORITY_A, 0);
partnerActor->takeTurnScriptID = takeTurnScript->id;
takeTurnScript->owner1.actorID = ACTOR_PARTNER;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel radiating_energy_orb_appendGfx
/* 3A0344 E009E424 27BDFED0 */ addiu $sp, $sp, -0x130
/* 3A0348 E009E428 AFBF0104 */ sw $ra, 0x104($sp)
/* 3A034C E009E42C AFBE0100 */ sw $fp, 0x100($sp)
/* 3A0350 E009E430 AFB700FC */ sw $s7, 0xFC($sp)
/* 3A0354 E009E434 AFB600F8 */ sw $s6, 0xF8($sp)
/* 3A0358 E009E438 AFB500F4 */ sw $s5, 0xF4($sp)
/* 3A035C E009E43C AFB400F0 */ sw $s4, 0xF0($sp)
/* 3A0360 E009E440 AFB300EC */ sw $s3, 0xEC($sp)
/* 3A0364 E009E444 AFB200E8 */ sw $s2, 0xE8($sp)
/* 3A0368 E009E448 AFB100E4 */ sw $s1, 0xE4($sp)
/* 3A036C E009E44C AFB000E0 */ sw $s0, 0xE0($sp)
/* 3A0370 E009E450 F7BC0128 */ sdc1 $f28, 0x128($sp)
/* 3A0374 E009E454 F7BA0120 */ sdc1 $f26, 0x120($sp)
/* 3A0378 E009E458 F7B80118 */ sdc1 $f24, 0x118($sp)
/* 3A037C E009E45C F7B60110 */ sdc1 $f22, 0x110($sp)
/* 3A0380 E009E460 F7B40108 */ sdc1 $f20, 0x108($sp)
/* 3A0384 E009E464 AFA40130 */ sw $a0, 0x130($sp)
/* 3A0388 E009E468 8C94000C */ lw $s4, 0xC($a0)
/* 3A038C E009E46C 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 3A0390 E009E470 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 3A0394 E009E474 3C04800B */ lui $a0, %hi(gCameras)
/* 3A0398 E009E478 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* 3A039C E009E47C 00031080 */ sll $v0, $v1, 2
/* 3A03A0 E009E480 00431021 */ addu $v0, $v0, $v1
/* 3A03A4 E009E484 00021080 */ sll $v0, $v0, 2
/* 3A03A8 E009E488 00431023 */ subu $v0, $v0, $v1
/* 3A03AC E009E48C 000218C0 */ sll $v1, $v0, 3
/* 3A03B0 E009E490 00431021 */ addu $v0, $v0, $v1
/* 3A03B4 E009E494 8E8D0014 */ lw $t5, 0x14($s4)
/* 3A03B8 E009E498 000210C0 */ sll $v0, $v0, 3
/* 3A03BC E009E49C AFAD00DC */ sw $t5, 0xDC($sp)
/* 3A03C0 E009E4A0 8E8D001C */ lw $t5, 0x1C($s4)
/* 3A03C4 E009E4A4 0044B021 */ addu $s6, $v0, $a0
/* 3A03C8 E009E4A8 31B20001 */ andi $s2, $t5, 0x1
/* 3A03CC E009E4AC 12400009 */ beqz $s2, .LE009E4D4
/* 3A03D0 E009E4B0 AFAD00D8 */ sw $t5, 0xD8($sp)
/* 3A03D4 E009E4B4 3C01E00A */ lui $at, (0xE00A0000 >> 16)
/* 3A03D8 E009E4B8 D422EE20 */ ldc1 $f2, -0x11E0($at)
/* 3A03DC E009E4BC C7A000DC */ lwc1 $f0, 0xDC($sp)
/* 3A03E0 E009E4C0 46800021 */ cvt.d.w $f0, $f0
/* 3A03E4 E009E4C4 46220002 */ mul.d $f0, $f0, $f2
/* 3A03E8 E009E4C8 00000000 */ nop
/* 3A03EC E009E4CC 4620010D */ trunc.w.d $f4, $f0
/* 3A03F0 E009E4D0 E7A400DC */ swc1 $f4, 0xDC($sp)
.LE009E4D4:
/* 3A03F4 E009E4D4 3C06DB06 */ lui $a2, (0xDB060024 >> 16)
/* 3A03F8 E009E4D8 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF)
/* 3A03FC E009E4DC 27A40018 */ addiu $a0, $sp, 0x18
/* 3A0400 E009E4E0 3C100001 */ lui $s0, (0x11630 >> 16)
/* 3A0404 E009E4E4 3C11800A */ lui $s1, %hi(gMainGfxPos)
/* 3A0408 E009E4E8 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos)
/* 3A040C E009E4EC 8E250000 */ lw $a1, 0x0($s1)
/* 3A0410 E009E4F0 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* 3A0414 E009E4F4 00A0182D */ daddu $v1, $a1, $zero
/* 3A0418 E009E4F8 24A50008 */ addiu $a1, $a1, 0x8
/* 3A041C E009E4FC AE250000 */ sw $a1, 0x0($s1)
/* 3A0420 E009E500 AC620000 */ sw $v0, 0x0($v1)
/* 3A0424 E009E504 AC600004 */ sw $zero, 0x4($v1)
/* 3A0428 E009E508 ACA60000 */ sw $a2, 0x0($a1)
/* 3A042C E009E50C 8FAD0130 */ lw $t5, 0x130($sp)
/* 3A0430 E009E510 36101630 */ ori $s0, $s0, (0x11630 & 0xFFFF)
/* 3A0434 E009E514 8DA30010 */ lw $v1, 0x10($t5)
/* 3A0438 E009E518 24A20008 */ addiu $v0, $a1, 0x8
/* 3A043C E009E51C AE220000 */ sw $v0, 0x0($s1)
/* 3A0440 E009E520 8C62001C */ lw $v0, 0x1C($v1)
/* 3A0444 E009E524 3C038000 */ lui $v1, (0x80000000 >> 16)
/* 3A0448 E009E528 00431021 */ addu $v0, $v0, $v1
/* 3A044C E009E52C ACA20004 */ sw $v0, 0x4($a1)
/* 3A0450 E009E530 8E850008 */ lw $a1, 0x8($s4)
/* 3A0454 E009E534 8E86000C */ lw $a2, 0xC($s4)
/* 3A0458 E009E538 8E870010 */ lw $a3, 0x10($s4)
/* 3A045C E009E53C 0C080108 */ jal shim_guTranslateF
/* 3A0460 E009E540 24170001 */ addiu $s7, $zero, 0x1
/* 3A0464 E009E544 27A40018 */ addiu $a0, $sp, 0x18
/* 3A0468 E009E548 3C138007 */ lui $s3, %hi(gMatrixListPos)
/* 3A046C E009E54C 267341F0 */ addiu $s3, $s3, %lo(gMatrixListPos)
/* 3A0470 E009E550 3C15800A */ lui $s5, %hi(gDisplayContext)
/* 3A0474 E009E554 26B5A674 */ addiu $s5, $s5, %lo(gDisplayContext)
/* 3A0478 E009E558 96650000 */ lhu $a1, 0x0($s3)
/* 3A047C E009E55C 8EA20000 */ lw $v0, 0x0($s5)
/* 3A0480 E009E560 00052980 */ sll $a1, $a1, 6
/* 3A0484 E009E564 00B02821 */ addu $a1, $a1, $s0
/* 3A0488 E009E568 0C080118 */ jal shim_guMtxF2L
/* 3A048C E009E56C 00452821 */ addu $a1, $v0, $a1
/* 3A0490 E009E570 3C03DA38 */ lui $v1, (0xDA380002 >> 16)
/* 3A0494 E009E574 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3A0498 E009E578 3C0ADA38 */ lui $t2, (0xDA380000 >> 16)
/* 3A049C E009E57C 01575025 */ or $t2, $t2, $s7
/* 3A04A0 E009E580 3C0BFF40 */ lui $t3, (0xFF404000 >> 16)
/* 3A04A4 E009E584 356B4000 */ ori $t3, $t3, (0xFF404000 & 0xFFFF)
/* 3A04A8 E009E588 27A40018 */ addiu $a0, $sp, 0x18
/* 3A04AC E009E58C 02F21004 */ sllv $v0, $s2, $s7
/* 3A04B0 E009E590 8FAD00D8 */ lw $t5, 0xD8($sp)
/* 3A04B4 E009E594 4480A000 */ mtc1 $zero, $f20
/* 3A04B8 E009E598 8E280000 */ lw $t0, 0x0($s1)
/* 3A04BC E009E59C 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 3A04C0 E009E5A0 4481C000 */ mtc1 $at, $f24
/* 3A04C4 E009E5A4 004D1021 */ addu $v0, $v0, $t5
/* 3A04C8 E009E5A8 44822000 */ mtc1 $v0, $f4
/* 3A04CC E009E5AC 00000000 */ nop
/* 3A04D0 E009E5B0 46802120 */ cvt.s.w $f4, $f4
/* 3A04D4 E009E5B4 0100482D */ daddu $t1, $t0, $zero
/* 3A04D8 E009E5B8 44052000 */ mfc1 $a1, $f4
/* 3A04DC E009E5BC 4406A000 */ mfc1 $a2, $f20
/* 3A04E0 E009E5C0 96620000 */ lhu $v0, 0x0($s3)
/* 3A04E4 E009E5C4 25080008 */ addiu $t0, $t0, 0x8
/* 3A04E8 E009E5C8 AE280000 */ sw $t0, 0x0($s1)
/* 3A04EC E009E5CC AD230000 */ sw $v1, 0x0($t1)
/* 3A04F0 E009E5D0 00571821 */ addu $v1, $v0, $s7
/* 3A04F4 E009E5D4 3042FFFF */ andi $v0, $v0, 0xFFFF
/* 3A04F8 E009E5D8 00021180 */ sll $v0, $v0, 6
/* 3A04FC E009E5DC A6630000 */ sh $v1, 0x0($s3)
/* 3A0500 E009E5E0 8EA30000 */ lw $v1, 0x0($s5)
/* 3A0504 E009E5E4 00501021 */ addu $v0, $v0, $s0
/* 3A0508 E009E5E8 00621821 */ addu $v1, $v1, $v0
/* 3A050C E009E5EC 25020008 */ addiu $v0, $t0, 0x8
/* 3A0510 E009E5F0 AD230004 */ sw $v1, 0x4($t1)
/* 3A0514 E009E5F4 AE220000 */ sw $v0, 0x0($s1)
/* 3A0518 E009E5F8 25020010 */ addiu $v0, $t0, 0x10
/* 3A051C E009E5FC AD0A0000 */ sw $t2, 0x0($t0)
/* 3A0520 E009E600 AE220000 */ sw $v0, 0x0($s1)
/* 3A0524 E009E604 8EC30204 */ lw $v1, 0x204($s6)
/* 3A0528 E009E608 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* 3A052C E009E60C AD020008 */ sw $v0, 0x8($t0)
/* 3A0530 E009E610 8FAD00DC */ lw $t5, 0xDC($sp)
/* 3A0534 E009E614 4407A000 */ mfc1 $a3, $f20
/* 3A0538 E009E618 31A200FF */ andi $v0, $t5, 0xFF
/* 3A053C E009E61C 004B1025 */ or $v0, $v0, $t3
/* 3A0540 E009E620 AD02000C */ sw $v0, 0xC($t0)
/* 3A0544 E009E624 AD030004 */ sw $v1, 0x4($t0)
/* 3A0548 E009E628 0C080104 */ jal shim_guRotateF
/* 3A054C E009E62C E7B80010 */ swc1 $f24, 0x10($sp)
/* 3A0550 E009E630 27A40018 */ addiu $a0, $sp, 0x18
/* 3A0554 E009E634 96650000 */ lhu $a1, 0x0($s3)
/* 3A0558 E009E638 8EA20000 */ lw $v0, 0x0($s5)
/* 3A055C E009E63C 00052980 */ sll $a1, $a1, 6
/* 3A0560 E009E640 00B02821 */ addu $a1, $a1, $s0
/* 3A0564 E009E644 0C080118 */ jal shim_guMtxF2L
/* 3A0568 E009E648 00452821 */ addu $a1, $v0, $a1
/* 3A056C E009E64C 3C06D838 */ lui $a2, (0xD8380002 >> 16)
/* 3A0570 E009E650 8E240000 */ lw $a0, 0x0($s1)
/* 3A0574 E009E654 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF)
/* 3A0578 E009E658 0080282D */ daddu $a1, $a0, $zero
/* 3A057C E009E65C 24840008 */ addiu $a0, $a0, 0x8
/* 3A0580 E009E660 AE240000 */ sw $a0, 0x0($s1)
/* 3A0584 E009E664 96620000 */ lhu $v0, 0x0($s3)
/* 3A0588 E009E668 3C03DA38 */ lui $v1, (0xDA380000 >> 16)
/* 3A058C E009E66C ACA30000 */ sw $v1, 0x0($a1)
/* 3A0590 E009E670 00571821 */ addu $v1, $v0, $s7
/* 3A0594 E009E674 3042FFFF */ andi $v0, $v0, 0xFFFF
/* 3A0598 E009E678 00021180 */ sll $v0, $v0, 6
/* 3A059C E009E67C A6630000 */ sh $v1, 0x0($s3)
/* 3A05A0 E009E680 8EA30000 */ lw $v1, 0x0($s5)
/* 3A05A4 E009E684 00501021 */ addu $v0, $v0, $s0
/* 3A05A8 E009E688 00621821 */ addu $v1, $v1, $v0
/* 3A05AC E009E68C 24820008 */ addiu $v0, $a0, 0x8
/* 3A05B0 E009E690 ACA30004 */ sw $v1, 0x4($a1)
/* 3A05B4 E009E694 3C03DE00 */ lui $v1, (0xDE000000 >> 16)
/* 3A05B8 E009E698 AE220000 */ sw $v0, 0x0($s1)
/* 3A05BC E009E69C 3C020900 */ lui $v0, %hi(D_090012A8_40E538)
/* 3A05C0 E009E6A0 244212A8 */ addiu $v0, $v0, %lo(D_090012A8_40E538)
/* 3A05C4 E009E6A4 AC820004 */ sw $v0, 0x4($a0)
/* 3A05C8 E009E6A8 24820010 */ addiu $v0, $a0, 0x10
/* 3A05CC E009E6AC AC830000 */ sw $v1, 0x0($a0)
/* 3A05D0 E009E6B0 AE220000 */ sw $v0, 0x0($s1)
/* 3A05D4 E009E6B4 3C020900 */ lui $v0, %hi(D_09001510_40E7A0)
/* 3A05D8 E009E6B8 24421510 */ addiu $v0, $v0, %lo(D_09001510_40E7A0)
/* 3A05DC E009E6BC AC82000C */ sw $v0, 0xC($a0)
/* 3A05E0 E009E6C0 24820018 */ addiu $v0, $a0, 0x18
/* 3A05E4 E009E6C4 AC830008 */ sw $v1, 0x8($a0)
/* 3A05E8 E009E6C8 AE220000 */ sw $v0, 0x0($s1)
/* 3A05EC E009E6CC 24020040 */ addiu $v0, $zero, 0x40
/* 3A05F0 E009E6D0 AC820014 */ sw $v0, 0x14($a0)
/* 3A05F4 E009E6D4 3C020900 */ lui $v0, %hi(D_09001200_40E490)
/* 3A05F8 E009E6D8 24421200 */ addiu $v0, $v0, %lo(D_09001200_40E490)
/* 3A05FC E009E6DC AC860010 */ sw $a2, 0x10($a0)
/* 3A0600 E009E6E0 AC830018 */ sw $v1, 0x18($a0)
/* 3A0604 E009E6E4 AC82001C */ sw $v0, 0x1C($a0)
/* 3A0608 E009E6E8 8FAD0130 */ lw $t5, 0x130($sp)
/* 3A060C E009E6EC 26940034 */ addiu $s4, $s4, 0x34
/* 3A0610 E009E6F0 8DA20008 */ lw $v0, 0x8($t5)
/* 3A0614 E009E6F4 24840020 */ addiu $a0, $a0, 0x20
/* 3A0618 E009E6F8 02E2102A */ slt $v0, $s7, $v0
/* 3A061C E009E6FC 104001A0 */ beqz $v0, .LE009ED80
/* 3A0620 E009E700 AE240000 */ sw $a0, 0x0($s1)
/* 3A0624 E009E704 4600A586 */ mov.s $f22, $f20
/* 3A0628 E009E708 0220902D */ daddu $s2, $s1, $zero
/* 3A062C E009E70C 27B00058 */ addiu $s0, $sp, 0x58
/* 3A0630 E009E710 02A0B02D */ daddu $s6, $s5, $zero
/* 3A0634 E009E714 0260A82D */ daddu $s5, $s3, $zero
/* 3A0638 E009E718 3C130001 */ lui $s3, (0x11630 >> 16)
/* 3A063C E009E71C 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF)
/* 3A0640 E009E720 3C1ED838 */ lui $fp, (0xD8380002 >> 16)
/* 3A0644 E009E724 37DE0002 */ ori $fp, $fp, (0xD8380002 & 0xFFFF)
/* 3A0648 E009E728 2691002C */ addiu $s1, $s4, 0x2C
/* 3A064C E009E72C 2414000A */ addiu $s4, $zero, 0xA
/* 3A0650 E009E730 3C014270 */ lui $at, (0x42700000 >> 16)
/* 3A0654 E009E734 4481E000 */ mtc1 $at, $f28
/* 3A0658 E009E738 3C014000 */ lui $at, (0x40000000 >> 16)
/* 3A065C E009E73C 4481D800 */ mtc1 $at, $f27
/* 3A0660 E009E740 4480D000 */ mtc1 $zero, $f26
.LE009E744:
/* 3A0664 E009E744 C634FFFC */ lwc1 $f20, -0x4($s1)
/* 3A0668 E009E748 4616A032 */ c.eq.s $f20, $f22
/* 3A066C E009E74C 00000000 */ nop
/* 3A0670 E009E750 45030185 */ bc1tl .LE009ED68
/* 3A0674 E009E754 2694000A */ addiu $s4, $s4, 0xA
/* 3A0678 E009E758 3C0AFCFF */ lui $t2, (0xFCFF97FF >> 16)
/* 3A067C E009E75C 354A97FF */ ori $t2, $t2, (0xFCFF97FF & 0xFFFF)
/* 3A0680 E009E760 3C09FF2D */ lui $t1, (0xFF2DFEFF >> 16)
/* 3A0684 E009E764 3529FEFF */ ori $t1, $t1, (0xFF2DFEFF & 0xFFFF)
/* 3A0688 E009E768 8E480000 */ lw $t0, 0x0($s2)
/* 3A068C E009E76C 27A40018 */ addiu $a0, $sp, 0x18
/* 3A0690 E009E770 0100282D */ daddu $a1, $t0, $zero
/* 3A0694 E009E774 3C0DFA00 */ lui $t5, (0xFA000000 >> 16)
/* 3A0698 E009E778 ACAD0000 */ sw $t5, 0x0($a1)
/* 3A069C E009E77C 8E22FFE8 */ lw $v0, -0x18($s1)
/* 3A06A0 E009E780 8FAD00DC */ lw $t5, 0xDC($sp)
/* 3A06A4 E009E784 2403FF00 */ addiu $v1, $zero, -0x100
/* 3A06A8 E009E788 004D0018 */ mult $v0, $t5
/* 3A06AC E009E78C 4406B000 */ mfc1 $a2, $f22
/* 3A06B0 E009E790 4407B000 */ mfc1 $a3, $f22
/* 3A06B4 E009E794 25080008 */ addiu $t0, $t0, 0x8
/* 3A06B8 E009E798 AE480000 */ sw $t0, 0x0($s2)
/* 3A06BC E009E79C 00001012 */ mflo $v0
/* 3A06C0 E009E7A0 00021203 */ sra $v0, $v0, 8
/* 3A06C4 E009E7A4 00431025 */ or $v0, $v0, $v1
/* 3A06C8 E009E7A8 ACA20004 */ sw $v0, 0x4($a1)
/* 3A06CC E009E7AC AD0A0000 */ sw $t2, 0x0($t0)
/* 3A06D0 E009E7B0 AD090004 */ sw $t1, 0x4($t0)
/* 3A06D4 E009E7B4 E7B80010 */ swc1 $f24, 0x10($sp)
/* 3A06D8 E009E7B8 8E25FFF4 */ lw $a1, -0xC($s1)
/* 3A06DC E009E7BC 25080008 */ addiu $t0, $t0, 0x8
/* 3A06E0 E009E7C0 0C080104 */ jal shim_guRotateF
/* 3A06E4 E009E7C4 AE480000 */ sw $t0, 0x0($s2)
/* 3A06E8 E009E7C8 8E250000 */ lw $a1, 0x0($s1)
/* 3A06EC E009E7CC 4406B000 */ mfc1 $a2, $f22
/* 3A06F0 E009E7D0 4407B000 */ mfc1 $a3, $f22
/* 3A06F4 E009E7D4 0C080108 */ jal shim_guTranslateF
/* 3A06F8 E009E7D8 0200202D */ daddu $a0, $s0, $zero
/* 3A06FC E009E7DC 0200202D */ daddu $a0, $s0, $zero
/* 3A0700 E009E7E0 27A50018 */ addiu $a1, $sp, 0x18
/* 3A0704 E009E7E4 0C080114 */ jal shim_guMtxCatF
/* 3A0708 E009E7E8 00A0302D */ daddu $a2, $a1, $zero
/* 3A070C E009E7EC 4405A000 */ mfc1 $a1, $f20
/* 3A0710 E009E7F0 4406A000 */ mfc1 $a2, $f20
/* 3A0714 E009E7F4 4407A000 */ mfc1 $a3, $f20
/* 3A0718 E009E7F8 0C080110 */ jal shim_guScaleF
/* 3A071C E009E7FC 0200202D */ daddu $a0, $s0, $zero
/* 3A0720 E009E800 0200202D */ daddu $a0, $s0, $zero
/* 3A0724 E009E804 27A50018 */ addiu $a1, $sp, 0x18
/* 3A0728 E009E808 0C080114 */ jal shim_guMtxCatF
/* 3A072C E009E80C 00A0302D */ daddu $a2, $a1, $zero
/* 3A0730 E009E810 27A40018 */ addiu $a0, $sp, 0x18
/* 3A0734 E009E814 96A50000 */ lhu $a1, 0x0($s5)
/* 3A0738 E009E818 8EC20000 */ lw $v0, 0x0($s6)
/* 3A073C E009E81C 00052980 */ sll $a1, $a1, 6
/* 3A0740 E009E820 00B32821 */ addu $a1, $a1, $s3
/* 3A0744 E009E824 0C080118 */ jal shim_guMtxF2L
/* 3A0748 E009E828 00452821 */ addu $a1, $v0, $a1
/* 3A074C E009E82C 27A40018 */ addiu $a0, $sp, 0x18
/* 3A0750 E009E830 8E480000 */ lw $t0, 0x0($s2)
/* 3A0754 E009E834 4406B000 */ mfc1 $a2, $f22
/* 3A0758 E009E838 4407B000 */ mfc1 $a3, $f22
/* 3A075C E009E83C 96A30000 */ lhu $v1, 0x0($s5)
/* 3A0760 E009E840 0100282D */ daddu $a1, $t0, $zero
/* 3A0764 E009E844 25080008 */ addiu $t0, $t0, 0x8
/* 3A0768 E009E848 3C0DDA38 */ lui $t5, (0xDA380000 >> 16)
/* 3A076C E009E84C 24620001 */ addiu $v0, $v1, 0x1
/* 3A0770 E009E850 3063FFFF */ andi $v1, $v1, 0xFFFF
/* 3A0774 E009E854 00031980 */ sll $v1, $v1, 6
/* 3A0778 E009E858 AE480000 */ sw $t0, 0x0($s2)
/* 3A077C E009E85C ACAD0000 */ sw $t5, 0x0($a1)
/* 3A0780 E009E860 A6A20000 */ sh $v0, 0x0($s5)
/* 3A0784 E009E864 8EC20000 */ lw $v0, 0x0($s6)
/* 3A0788 E009E868 00731821 */ addu $v1, $v1, $s3
/* 3A078C E009E86C 00431021 */ addu $v0, $v0, $v1
/* 3A0790 E009E870 ACA20004 */ sw $v0, 0x4($a1)
/* 3A0794 E009E874 3C0DDE00 */ lui $t5, (0xDE000000 >> 16)
/* 3A0798 E009E878 25020008 */ addiu $v0, $t0, 0x8
/* 3A079C E009E87C AD0D0000 */ sw $t5, 0x0($t0)
/* 3A07A0 E009E880 3C03E00A */ lui $v1, (0xE00A0000 >> 16)
/* 3A07A4 E009E884 8C63EDFC */ lw $v1, -0x1204($v1)
/* 3A07A8 E009E888 240D0040 */ addiu $t5, $zero, 0x40
/* 3A07AC E009E88C AE420000 */ sw $v0, 0x0($s2)
/* 3A07B0 E009E890 AD1E0008 */ sw $fp, 0x8($t0)
/* 3A07B4 E009E894 AD0D000C */ sw $t5, 0xC($t0)
/* 3A07B8 E009E898 AD030004 */ sw $v1, 0x4($t0)
/* 3A07BC E009E89C E7B80010 */ swc1 $f24, 0x10($sp)
/* 3A07C0 E009E8A0 8E25FFF4 */ lw $a1, -0xC($s1)
/* 3A07C4 E009E8A4 25080010 */ addiu $t0, $t0, 0x10
/* 3A07C8 E009E8A8 0C080104 */ jal shim_guRotateF
/* 3A07CC E009E8AC AE480000 */ sw $t0, 0x0($s2)
/* 3A07D0 E009E8B0 C6220000 */ lwc1 $f2, 0x0($s1)
/* 3A07D4 E009E8B4 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 3A07D8 E009E8B8 44810000 */ mtc1 $at, $f0
/* 3A07DC E009E8BC 00000000 */ nop
/* 3A07E0 E009E8C0 46001080 */ add.s $f2, $f2, $f0
/* 3A07E4 E009E8C4 4406B000 */ mfc1 $a2, $f22
/* 3A07E8 E009E8C8 4407B000 */ mfc1 $a3, $f22
/* 3A07EC E009E8CC 44051000 */ mfc1 $a1, $f2
/* 3A07F0 E009E8D0 0C080108 */ jal shim_guTranslateF
/* 3A07F4 E009E8D4 0200202D */ daddu $a0, $s0, $zero
/* 3A07F8 E009E8D8 0200202D */ daddu $a0, $s0, $zero
/* 3A07FC E009E8DC 27A50018 */ addiu $a1, $sp, 0x18
/* 3A0800 E009E8E0 0C080114 */ jal shim_guMtxCatF
/* 3A0804 E009E8E4 00A0302D */ daddu $a2, $a1, $zero
/* 3A0808 E009E8E8 3C01E00A */ lui $at, (0xE00A0000 >> 16)
/* 3A080C E009E8EC D420EE28 */ ldc1 $f0, -0x11D8($at)
/* 3A0810 E009E8F0 4600A0A1 */ cvt.d.s $f2, $f20
/* 3A0814 E009E8F4 46220001 */ sub.d $f0, $f0, $f2
/* 3A0818 E009E8F8 46200020 */ cvt.s.d $f0, $f0
/* 3A081C E009E8FC 44050000 */ mfc1 $a1, $f0
/* 3A0820 E009E900 0200202D */ daddu $a0, $s0, $zero
/* 3A0824 E009E904 00A0302D */ daddu $a2, $a1, $zero
/* 3A0828 E009E908 0C080110 */ jal shim_guScaleF
/* 3A082C E009E90C 00A0382D */ daddu $a3, $a1, $zero
/* 3A0830 E009E910 0200202D */ daddu $a0, $s0, $zero
/* 3A0834 E009E914 27A50018 */ addiu $a1, $sp, 0x18
/* 3A0838 E009E918 0C080114 */ jal shim_guMtxCatF
/* 3A083C E009E91C 00A0302D */ daddu $a2, $a1, $zero
/* 3A0840 E009E920 27A40018 */ addiu $a0, $sp, 0x18
/* 3A0844 E009E924 96A50000 */ lhu $a1, 0x0($s5)
/* 3A0848 E009E928 8EC20000 */ lw $v0, 0x0($s6)
/* 3A084C E009E92C 00052980 */ sll $a1, $a1, 6
/* 3A0850 E009E930 00B32821 */ addu $a1, $a1, $s3
/* 3A0854 E009E934 0C080118 */ jal shim_guMtxF2L
/* 3A0858 E009E938 00452821 */ addu $a1, $v0, $a1
/* 3A085C E009E93C 3C0CFF00 */ lui $t4, (0xFF00FF00 >> 16)
/* 3A0860 E009E940 358CFF00 */ ori $t4, $t4, (0xFF00FF00 & 0xFFFF)
/* 3A0864 E009E944 3C0BFF80 */ lui $t3, (0xFF80FF00 >> 16)
/* 3A0868 E009E948 356BFF00 */ ori $t3, $t3, (0xFF80FF00 & 0xFFFF)
/* 3A086C E009E94C 3C0AFC50 */ lui $t2, (0xFC5096A1 >> 16)
/* 3A0870 E009E950 354A96A1 */ ori $t2, $t2, (0xFC5096A1 & 0xFFFF)
/* 3A0874 E009E954 3C09332D */ lui $t1, (0x332DFEFF >> 16)
/* 3A0878 E009E958 3529FEFF */ ori $t1, $t1, (0x332DFEFF & 0xFFFF)
/* 3A087C E009E95C 27A40018 */ addiu $a0, $sp, 0x18
/* 3A0880 E009E960 8E480000 */ lw $t0, 0x0($s2)
/* 3A0884 E009E964 96A30000 */ lhu $v1, 0x0($s5)
/* 3A0888 E009E968 3C014160 */ lui $at, (0x41600000 >> 16)
/* 3A088C E009E96C 44810000 */ mtc1 $at, $f0
/* 3A0890 E009E970 0100282D */ daddu $a1, $t0, $zero
/* 3A0894 E009E974 25080008 */ addiu $t0, $t0, 0x8
/* 3A0898 E009E978 3C0DDA38 */ lui $t5, (0xDA380000 >> 16)
/* 3A089C E009E97C 24620001 */ addiu $v0, $v1, 0x1
/* 3A08A0 E009E980 3063FFFF */ andi $v1, $v1, 0xFFFF
/* 3A08A4 E009E984 00031980 */ sll $v1, $v1, 6
/* 3A08A8 E009E988 AE480000 */ sw $t0, 0x0($s2)
/* 3A08AC E009E98C ACAD0000 */ sw $t5, 0x0($a1)
/* 3A08B0 E009E990 A6A20000 */ sh $v0, 0x0($s5)
/* 3A08B4 E009E994 8EC20000 */ lw $v0, 0x0($s6)
/* 3A08B8 E009E998 00731821 */ addu $v1, $v1, $s3
/* 3A08BC E009E99C 00431021 */ addu $v0, $v0, $v1
/* 3A08C0 E009E9A0 ACA20004 */ sw $v0, 0x4($a1)
/* 3A08C4 E009E9A4 25020008 */ addiu $v0, $t0, 0x8
/* 3A08C8 E009E9A8 3C0DDE00 */ lui $t5, (0xDE000000 >> 16)
/* 3A08CC E009E9AC AE420000 */ sw $v0, 0x0($s2)
/* 3A08D0 E009E9B0 25020010 */ addiu $v0, $t0, 0x10
/* 3A08D4 E009E9B4 AD0D0000 */ sw $t5, 0x0($t0)
/* 3A08D8 E009E9B8 3C03E00A */ lui $v1, (0xE00A0000 >> 16)
/* 3A08DC E009E9BC 8C63EDF8 */ lw $v1, -0x1208($v1)
/* 3A08E0 E009E9C0 240D0040 */ addiu $t5, $zero, 0x40
/* 3A08E4 E009E9C4 AE420000 */ sw $v0, 0x0($s2)
/* 3A08E8 E009E9C8 25020018 */ addiu $v0, $t0, 0x18
/* 3A08EC E009E9CC AD0D000C */ sw $t5, 0xC($t0)
/* 3A08F0 E009E9D0 3C0DFA00 */ lui $t5, (0xFA000000 >> 16)
/* 3A08F4 E009E9D4 AD1E0008 */ sw $fp, 0x8($t0)
/* 3A08F8 E009E9D8 AE420000 */ sw $v0, 0x0($s2)
/* 3A08FC E009E9DC AD0D0010 */ sw $t5, 0x10($t0)
/* 3A0900 E009E9E0 AD030004 */ sw $v1, 0x4($t0)
/* 3A0904 E009E9E4 8E22FFE8 */ lw $v0, -0x18($s1)
/* 3A0908 E009E9E8 8FAD00DC */ lw $t5, 0xDC($sp)
/* 3A090C E009E9EC 3C03FB00 */ lui $v1, (0xFB000000 >> 16)
/* 3A0910 E009E9F0 004D0018 */ mult $v0, $t5
/* 3A0914 E009E9F4 AD030018 */ sw $v1, 0x18($t0)
/* 3A0918 E009E9F8 AD0B001C */ sw $t3, 0x1C($t0)
/* 3A091C E009E9FC AD0A0020 */ sw $t2, 0x20($t0)
/* 3A0920 E009EA00 AD090024 */ sw $t1, 0x24($t0)
/* 3A0924 E009EA04 00001012 */ mflo $v0
/* 3A0928 E009EA08 00021243 */ sra $v0, $v0, 9
/* 3A092C E009EA0C 304200FF */ andi $v0, $v0, 0xFF
/* 3A0930 E009EA10 004C1025 */ or $v0, $v0, $t4
/* 3A0934 E009EA14 AD020014 */ sw $v0, 0x14($t0)
/* 3A0938 E009EA18 C622FFF4 */ lwc1 $f2, -0xC($s1)
/* 3A093C E009EA1C 4406B000 */ mfc1 $a2, $f22
/* 3A0940 E009EA20 46001080 */ add.s $f2, $f2, $f0
/* 3A0944 E009EA24 4407B000 */ mfc1 $a3, $f22
/* 3A0948 E009EA28 25020020 */ addiu $v0, $t0, 0x20
/* 3A094C E009EA2C 44051000 */ mfc1 $a1, $f2
/* 3A0950 E009EA30 25080028 */ addiu $t0, $t0, 0x28
/* 3A0954 E009EA34 AE420000 */ sw $v0, 0x0($s2)
/* 3A0958 E009EA38 AE480000 */ sw $t0, 0x0($s2)
/* 3A095C E009EA3C 0C080104 */ jal shim_guRotateF
/* 3A0960 E009EA40 E7B80010 */ swc1 $f24, 0x10($sp)
/* 3A0964 E009EA44 3C02B60B */ lui $v0, (0xB60B60B7 >> 16)
/* 3A0968 E009EA48 344260B7 */ ori $v0, $v0, (0xB60B60B7 & 0xFFFF)
/* 3A096C E009EA4C 02820018 */ mult $s4, $v0
/* 3A0970 E009EA50 00141FC3 */ sra $v1, $s4, 31
/* 3A0974 E009EA54 4406B000 */ mfc1 $a2, $f22
/* 3A0978 E009EA58 4407C000 */ mfc1 $a3, $f24
/* 3A097C E009EA5C 8FAD00D8 */ lw $t5, 0xD8($sp)
/* 3A0980 E009EA60 00001010 */ mfhi $v0
/* 3A0984 E009EA64 00541021 */ addu $v0, $v0, $s4
/* 3A0988 E009EA68 00021143 */ sra $v0, $v0, 5
/* 3A098C E009EA6C 00431023 */ subu $v0, $v0, $v1
/* 3A0990 E009EA70 00021840 */ sll $v1, $v0, 1
/* 3A0994 E009EA74 00621821 */ addu $v1, $v1, $v0
/* 3A0998 E009EA78 00031100 */ sll $v0, $v1, 4
/* 3A099C E009EA7C 00431023 */ subu $v0, $v0, $v1
/* 3A09A0 E009EA80 02821023 */ subu $v0, $s4, $v0
/* 3A09A4 E009EA84 004D1021 */ addu $v0, $v0, $t5
/* 3A09A8 E009EA88 44822000 */ mtc1 $v0, $f4
/* 3A09AC E009EA8C 00000000 */ nop
/* 3A09B0 E009EA90 46802120 */ cvt.s.w $f4, $f4
/* 3A09B4 E009EA94 44052000 */ mfc1 $a1, $f4
/* 3A09B8 E009EA98 0200202D */ daddu $a0, $s0, $zero
/* 3A09BC E009EA9C 0C080104 */ jal shim_guRotateF
/* 3A09C0 E009EAA0 E7B60010 */ swc1 $f22, 0x10($sp)
/* 3A09C4 E009EAA4 0200202D */ daddu $a0, $s0, $zero
/* 3A09C8 E009EAA8 27A50018 */ addiu $a1, $sp, 0x18
/* 3A09CC E009EAAC 0C080114 */ jal shim_guMtxCatF
/* 3A09D0 E009EAB0 00A0302D */ daddu $a2, $a1, $zero
/* 3A09D4 E009EAB4 3C0541A0 */ lui $a1, (0x41A00000 >> 16)
/* 3A09D8 E009EAB8 4406B000 */ mfc1 $a2, $f22
/* 3A09DC E009EABC 4407B000 */ mfc1 $a3, $f22
/* 3A09E0 E009EAC0 0C080108 */ jal shim_guTranslateF
/* 3A09E4 E009EAC4 0200202D */ daddu $a0, $s0, $zero
/* 3A09E8 E009EAC8 0200202D */ daddu $a0, $s0, $zero
/* 3A09EC E009EACC 27A50018 */ addiu $a1, $sp, 0x18
/* 3A09F0 E009EAD0 0C080114 */ jal shim_guMtxCatF
/* 3A09F4 E009EAD4 00A0302D */ daddu $a2, $a1, $zero
/* 3A09F8 E009EAD8 C6200000 */ lwc1 $f0, 0x0($s1)
/* 3A09FC E009EADC 461C0001 */ sub.s $f0, $f0, $f28
/* 3A0A00 E009EAE0 3C01E00A */ lui $at, (0xE00A0000 >> 16)
/* 3A0A04 E009EAE4 D422EE30 */ ldc1 $f2, -0x11D0($at)
/* 3A0A08 E009EAE8 46000021 */ cvt.d.s $f0, $f0
/* 3A0A0C E009EAEC 46220002 */ mul.d $f0, $f0, $f2
/* 3A0A10 E009EAF0 00000000 */ nop
/* 3A0A14 E009EAF4 3C013FF0 */ lui $at, (0x3FF00000 >> 16)
/* 3A0A18 E009EAF8 44811800 */ mtc1 $at, $f3
/* 3A0A1C E009EAFC 44801000 */ mtc1 $zero, $f2
/* 3A0A20 E009EB00 00000000 */ nop
/* 3A0A24 E009EB04 46220080 */ add.d $f2, $f0, $f2
/* 3A0A28 E009EB08 4620D001 */ sub.d $f0, $f26, $f0
/* 3A0A2C E009EB0C 4407C000 */ mfc1 $a3, $f24
/* 3A0A30 E009EB10 462010A0 */ cvt.s.d $f2, $f2
/* 3A0A34 E009EB14 46200020 */ cvt.s.d $f0, $f0
/* 3A0A38 E009EB18 44051000 */ mfc1 $a1, $f2
/* 3A0A3C E009EB1C 44060000 */ mfc1 $a2, $f0
/* 3A0A40 E009EB20 0C080110 */ jal shim_guScaleF
/* 3A0A44 E009EB24 0200202D */ daddu $a0, $s0, $zero
/* 3A0A48 E009EB28 0200202D */ daddu $a0, $s0, $zero
/* 3A0A4C E009EB2C 27A50018 */ addiu $a1, $sp, 0x18
/* 3A0A50 E009EB30 0C080114 */ jal shim_guMtxCatF
/* 3A0A54 E009EB34 00A0302D */ daddu $a2, $a1, $zero
/* 3A0A58 E009EB38 27A40018 */ addiu $a0, $sp, 0x18
/* 3A0A5C E009EB3C 96A50000 */ lhu $a1, 0x0($s5)
/* 3A0A60 E009EB40 8EC20000 */ lw $v0, 0x0($s6)
/* 3A0A64 E009EB44 00052980 */ sll $a1, $a1, 6
/* 3A0A68 E009EB48 00B32821 */ addu $a1, $a1, $s3
/* 3A0A6C E009EB4C 0C080118 */ jal shim_guMtxF2L
/* 3A0A70 E009EB50 00452821 */ addu $a1, $v0, $a1
/* 3A0A74 E009EB54 3C09FF40 */ lui $t1, (0xFF404000 >> 16)
/* 3A0A78 E009EB58 8E480000 */ lw $t0, 0x0($s2)
/* 3A0A7C E009EB5C 4406B000 */ mfc1 $a2, $f22
/* 3A0A80 E009EB60 96A50000 */ lhu $a1, 0x0($s5)
/* 3A0A84 E009EB64 0100202D */ daddu $a0, $t0, $zero
/* 3A0A88 E009EB68 25080008 */ addiu $t0, $t0, 0x8
/* 3A0A8C E009EB6C 3C0DDA38 */ lui $t5, (0xDA380000 >> 16)
/* 3A0A90 E009EB70 30A2FFFF */ andi $v0, $a1, 0xFFFF
/* 3A0A94 E009EB74 00021180 */ sll $v0, $v0, 6
/* 3A0A98 E009EB78 AC8D0000 */ sw $t5, 0x0($a0)
/* 3A0A9C E009EB7C 8EC30000 */ lw $v1, 0x0($s6)
/* 3A0AA0 E009EB80 00531021 */ addu $v0, $v0, $s3
/* 3A0AA4 E009EB84 00621821 */ addu $v1, $v1, $v0
/* 3A0AA8 E009EB88 AC830004 */ sw $v1, 0x4($a0)
/* 3A0AAC E009EB8C 3C0DDE00 */ lui $t5, (0xDE000000 >> 16)
/* 3A0AB0 E009EB90 AD0D0000 */ sw $t5, 0x0($t0)
/* 3A0AB4 E009EB94 3C02E00A */ lui $v0, (0xE00A0000 >> 16)
/* 3A0AB8 E009EB98 8C42EDF4 */ lw $v0, -0x120C($v0)
/* 3A0ABC E009EB9C 240D0040 */ addiu $t5, $zero, 0x40
/* 3A0AC0 E009EBA0 AD0D000C */ sw $t5, 0xC($t0)
/* 3A0AC4 E009EBA4 3C0DFA00 */ lui $t5, (0xFA000000 >> 16)
/* 3A0AC8 E009EBA8 AD1E0008 */ sw $fp, 0x8($t0)
/* 3A0ACC E009EBAC AD0D0010 */ sw $t5, 0x10($t0)
/* 3A0AD0 E009EBB0 AD020004 */ sw $v0, 0x4($t0)
/* 3A0AD4 E009EBB4 8E22FFE8 */ lw $v0, -0x18($s1)
/* 3A0AD8 E009EBB8 35294000 */ ori $t1, $t1, (0xFF404000 & 0xFFFF)
/* 3A0ADC E009EBBC AE480000 */ sw $t0, 0x0($s2)
/* 3A0AE0 E009EBC0 8FAD00DC */ lw $t5, 0xDC($sp)
/* 3A0AE4 E009EBC4 3C014208 */ lui $at, (0x42080000 >> 16)
/* 3A0AE8 E009EBC8 44810000 */ mtc1 $at, $f0
/* 3A0AEC E009EBCC 004D0018 */ mult $v0, $t5
/* 3A0AF0 E009EBD0 24A50001 */ addiu $a1, $a1, 0x1
/* 3A0AF4 E009EBD4 A6A50000 */ sh $a1, 0x0($s5)
/* 3A0AF8 E009EBD8 25020008 */ addiu $v0, $t0, 0x8
/* 3A0AFC E009EBDC AE420000 */ sw $v0, 0x0($s2)
/* 3A0B00 E009EBE0 00001812 */ mflo $v1
/* 3A0B04 E009EBE4 00031203 */ sra $v0, $v1, 8
/* 3A0B08 E009EBE8 304200FF */ andi $v0, $v0, 0xFF
/* 3A0B0C E009EBEC 00491025 */ or $v0, $v0, $t1
/* 3A0B10 E009EBF0 AD020014 */ sw $v0, 0x14($t0)
/* 3A0B14 E009EBF4 C622FFF4 */ lwc1 $f2, -0xC($s1)
/* 3A0B18 E009EBF8 25020010 */ addiu $v0, $t0, 0x10
/* 3A0B1C E009EBFC 46001080 */ add.s $f2, $f2, $f0
/* 3A0B20 E009EC00 AE420000 */ sw $v0, 0x0($s2)
/* 3A0B24 E009EC04 C7A000D8 */ lwc1 $f0, 0xD8($sp)
/* 3A0B28 E009EC08 46800020 */ cvt.s.w $f0, $f0
/* 3A0B2C E009EC0C 46001080 */ add.s $f2, $f2, $f0
/* 3A0B30 E009EC10 4407B000 */ mfc1 $a3, $f22
/* 3A0B34 E009EC14 27A40018 */ addiu $a0, $sp, 0x18
/* 3A0B38 E009EC18 44051000 */ mfc1 $a1, $f2
/* 3A0B3C E009EC1C 25080018 */ addiu $t0, $t0, 0x18
/* 3A0B40 E009EC20 AE480000 */ sw $t0, 0x0($s2)
/* 3A0B44 E009EC24 0C080104 */ jal shim_guRotateF
/* 3A0B48 E009EC28 E7B80010 */ swc1 $f24, 0x10($sp)
/* 3A0B4C E009EC2C 001710C0 */ sll $v0, $s7, 3
/* 3A0B50 E009EC30 00571021 */ addu $v0, $v0, $s7
/* 3A0B54 E009EC34 00021080 */ sll $v0, $v0, 2
/* 3A0B58 E009EC38 00571023 */ subu $v0, $v0, $s7
/* 3A0B5C E009EC3C 44822000 */ mtc1 $v0, $f4
/* 3A0B60 E009EC40 00000000 */ nop
/* 3A0B64 E009EC44 46802120 */ cvt.s.w $f4, $f4
/* 3A0B68 E009EC48 4406B000 */ mfc1 $a2, $f22
/* 3A0B6C E009EC4C 4407C000 */ mfc1 $a3, $f24
/* 3A0B70 E009EC50 44052000 */ mfc1 $a1, $f4
/* 3A0B74 E009EC54 0200202D */ daddu $a0, $s0, $zero
/* 3A0B78 E009EC58 0C080104 */ jal shim_guRotateF
/* 3A0B7C E009EC5C E7B60010 */ swc1 $f22, 0x10($sp)
/* 3A0B80 E009EC60 0200202D */ daddu $a0, $s0, $zero
/* 3A0B84 E009EC64 27A50018 */ addiu $a1, $sp, 0x18
/* 3A0B88 E009EC68 0C080114 */ jal shim_guMtxCatF
/* 3A0B8C E009EC6C 00A0302D */ daddu $a2, $a1, $zero
/* 3A0B90 E009EC70 3C054170 */ lui $a1, (0x41700000 >> 16)
/* 3A0B94 E009EC74 4406B000 */ mfc1 $a2, $f22
/* 3A0B98 E009EC78 4407B000 */ mfc1 $a3, $f22
/* 3A0B9C E009EC7C 0C080108 */ jal shim_guTranslateF
/* 3A0BA0 E009EC80 0200202D */ daddu $a0, $s0, $zero
/* 3A0BA4 E009EC84 0200202D */ daddu $a0, $s0, $zero
/* 3A0BA8 E009EC88 27A50018 */ addiu $a1, $sp, 0x18
/* 3A0BAC E009EC8C 0C080114 */ jal shim_guMtxCatF
/* 3A0BB0 E009EC90 00A0302D */ daddu $a2, $a1, $zero
/* 3A0BB4 E009EC94 C6200000 */ lwc1 $f0, 0x0($s1)
/* 3A0BB8 E009EC98 461C0001 */ sub.s $f0, $f0, $f28
/* 3A0BBC E009EC9C 3C01E00A */ lui $at, (0xE00A0000 >> 16)
/* 3A0BC0 E009ECA0 D422EE38 */ ldc1 $f2, -0x11C8($at)
/* 3A0BC4 E009ECA4 46000021 */ cvt.d.s $f0, $f0
/* 3A0BC8 E009ECA8 46220002 */ mul.d $f0, $f0, $f2
/* 3A0BCC E009ECAC 00000000 */ nop
/* 3A0BD0 E009ECB0 463A0000 */ add.d $f0, $f0, $f26
/* 3A0BD4 E009ECB4 4406C000 */ mfc1 $a2, $f24
/* 3A0BD8 E009ECB8 4407C000 */ mfc1 $a3, $f24
/* 3A0BDC E009ECBC 46200020 */ cvt.s.d $f0, $f0
/* 3A0BE0 E009ECC0 44050000 */ mfc1 $a1, $f0
/* 3A0BE4 E009ECC4 0C080110 */ jal shim_guScaleF
/* 3A0BE8 E009ECC8 0200202D */ daddu $a0, $s0, $zero
/* 3A0BEC E009ECCC 0200202D */ daddu $a0, $s0, $zero
/* 3A0BF0 E009ECD0 27A50018 */ addiu $a1, $sp, 0x18
/* 3A0BF4 E009ECD4 0C080114 */ jal shim_guMtxCatF
/* 3A0BF8 E009ECD8 00A0302D */ daddu $a2, $a1, $zero
/* 3A0BFC E009ECDC 27A40018 */ addiu $a0, $sp, 0x18
/* 3A0C00 E009ECE0 96A50000 */ lhu $a1, 0x0($s5)
/* 3A0C04 E009ECE4 8EC20000 */ lw $v0, 0x0($s6)
/* 3A0C08 E009ECE8 00052980 */ sll $a1, $a1, 6
/* 3A0C0C E009ECEC 00B32821 */ addu $a1, $a1, $s3
/* 3A0C10 E009ECF0 0C080118 */ jal shim_guMtxF2L
/* 3A0C14 E009ECF4 00452821 */ addu $a1, $v0, $a1
/* 3A0C18 E009ECF8 8E440000 */ lw $a0, 0x0($s2)
/* 3A0C1C E009ECFC 96A30000 */ lhu $v1, 0x0($s5)
/* 3A0C20 E009ED00 0080282D */ daddu $a1, $a0, $zero
/* 3A0C24 E009ED04 24840008 */ addiu $a0, $a0, 0x8
/* 3A0C28 E009ED08 3C0DDA38 */ lui $t5, (0xDA380000 >> 16)
/* 3A0C2C E009ED0C 24620001 */ addiu $v0, $v1, 0x1
/* 3A0C30 E009ED10 3063FFFF */ andi $v1, $v1, 0xFFFF
/* 3A0C34 E009ED14 00031980 */ sll $v1, $v1, 6
/* 3A0C38 E009ED18 AE440000 */ sw $a0, 0x0($s2)
/* 3A0C3C E009ED1C ACAD0000 */ sw $t5, 0x0($a1)
/* 3A0C40 E009ED20 A6A20000 */ sh $v0, 0x0($s5)
/* 3A0C44 E009ED24 8EC20000 */ lw $v0, 0x0($s6)
/* 3A0C48 E009ED28 00731821 */ addu $v1, $v1, $s3
/* 3A0C4C E009ED2C 00431021 */ addu $v0, $v0, $v1
/* 3A0C50 E009ED30 ACA20004 */ sw $v0, 0x4($a1)
/* 3A0C54 E009ED34 24820008 */ addiu $v0, $a0, 0x8
/* 3A0C58 E009ED38 3C0DDE00 */ lui $t5, (0xDE000000 >> 16)
/* 3A0C5C E009ED3C AE420000 */ sw $v0, 0x0($s2)
/* 3A0C60 E009ED40 24820010 */ addiu $v0, $a0, 0x10
/* 3A0C64 E009ED44 AC8D0000 */ sw $t5, 0x0($a0)
/* 3A0C68 E009ED48 3C03E00A */ lui $v1, (0xE00A0000 >> 16)
/* 3A0C6C E009ED4C 8C63EDF0 */ lw $v1, -0x1210($v1)
/* 3A0C70 E009ED50 240D0040 */ addiu $t5, $zero, 0x40
/* 3A0C74 E009ED54 AE420000 */ sw $v0, 0x0($s2)
/* 3A0C78 E009ED58 AC9E0008 */ sw $fp, 0x8($a0)
/* 3A0C7C E009ED5C AC8D000C */ sw $t5, 0xC($a0)
/* 3A0C80 E009ED60 AC830004 */ sw $v1, 0x4($a0)
/* 3A0C84 E009ED64 2694000A */ addiu $s4, $s4, 0xA
.LE009ED68:
/* 3A0C88 E009ED68 8FAD0130 */ lw $t5, 0x130($sp)
/* 3A0C8C E009ED6C 26F70001 */ addiu $s7, $s7, 0x1
/* 3A0C90 E009ED70 8DA20008 */ lw $v0, 0x8($t5)
/* 3A0C94 E009ED74 02E2102A */ slt $v0, $s7, $v0
/* 3A0C98 E009ED78 1440FE72 */ bnez $v0, .LE009E744
/* 3A0C9C E009ED7C 26310034 */ addiu $s1, $s1, 0x34
.LE009ED80:
/* 3A0CA0 E009ED80 3C05D838 */ lui $a1, (0xD8380002 >> 16)
/* 3A0CA4 E009ED84 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* 3A0CA8 E009ED88 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* 3A0CAC E009ED8C 8C620000 */ lw $v0, 0x0($v1)
/* 3A0CB0 E009ED90 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF)
/* 3A0CB4 E009ED94 0040202D */ daddu $a0, $v0, $zero
/* 3A0CB8 E009ED98 24420008 */ addiu $v0, $v0, 0x8
/* 3A0CBC E009ED9C AC620000 */ sw $v0, 0x0($v1)
/* 3A0CC0 E009EDA0 24020040 */ addiu $v0, $zero, 0x40
/* 3A0CC4 E009EDA4 AC850000 */ sw $a1, 0x0($a0)
/* 3A0CC8 E009EDA8 AC820004 */ sw $v0, 0x4($a0)
/* 3A0CCC E009EDAC 8FBF0104 */ lw $ra, 0x104($sp)
/* 3A0CD0 E009EDB0 8FBE0100 */ lw $fp, 0x100($sp)
/* 3A0CD4 E009EDB4 8FB700FC */ lw $s7, 0xFC($sp)
/* 3A0CD8 E009EDB8 8FB600F8 */ lw $s6, 0xF8($sp)
/* 3A0CDC E009EDBC 8FB500F4 */ lw $s5, 0xF4($sp)
/* 3A0CE0 E009EDC0 8FB400F0 */ lw $s4, 0xF0($sp)
/* 3A0CE4 E009EDC4 8FB300EC */ lw $s3, 0xEC($sp)
/* 3A0CE8 E009EDC8 8FB200E8 */ lw $s2, 0xE8($sp)
/* 3A0CEC E009EDCC 8FB100E4 */ lw $s1, 0xE4($sp)
/* 3A0CF0 E009EDD0 8FB000E0 */ lw $s0, 0xE0($sp)
/* 3A0CF4 E009EDD4 D7BC0128 */ ldc1 $f28, 0x128($sp)
/* 3A0CF8 E009EDD8 D7BA0120 */ ldc1 $f26, 0x120($sp)
/* 3A0CFC E009EDDC D7B80118 */ ldc1 $f24, 0x118($sp)
/* 3A0D00 E009EDE0 D7B60110 */ ldc1 $f22, 0x110($sp)
/* 3A0D04 E009EDE4 D7B40108 */ ldc1 $f20, 0x108($sp)
/* 3A0D08 E009EDE8 03E00008 */ jr $ra
/* 3A0D0C E009EDEC 27BD0130 */ addiu $sp, $sp, 0x130
### DECOMPILED C INSTRUCTIONS:
void radiating_energy_orb_appendGfx(void* effect) {
RadiatingEnergyOrbFXData* part = ((EffectInstance*)effect)->data.radiatingEnergyOrb;
Camera* camera = &gCameras[gCurrentCameraID];
s32 unk_1C = part->unk_1C;
s32 unk_14 = part->unk_14;
s32 temp_s2 = unk_1C & 1;
Matrix4f sp18;
Matrix4f sp58;
Matrix4f unused;
s32 i;
if (temp_s2) {
unk_14 *= 0.95;
}
gDPPipeSync(gMainGfxPos++);
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
shim_guTranslateF(sp18, part->unk_08, part->unk_0C, part->unk_10);
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, 255, 64, 64, unk_14);
shim_guRotateF(sp18, temp_s2 * 2 + unk_1C, 0.0f, 0.0f, 1.0f);
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_090012A8_3A2008);
gSPDisplayList(gMainGfxPos++, D_09001510_3A2270);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_09001200_3A1F60);
part++;
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
f32 scale = part->unk_28;
if (scale != 0.0f) {
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, (part->unk_14 * unk_14) >> 8);
gDPSetCombineMode(gMainGfxPos++, PM_CC_07, PM_CC_07);
shim_guRotateF(sp18, part->unk_20, 0.0f, 0.0f, 1.0f);
shim_guTranslateF(sp58, part->unk_2C, 0.0f, 0.0f);
shim_guMtxCatF(sp58, sp18, sp18);
shim_guScaleF(sp58, scale, scale, scale);
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_E009EDFC[0]);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
shim_guRotateF(sp18, part->unk_20, 0.0f, 0.0f, 1.0f);
shim_guTranslateF(sp58, part->unk_2C + 5.0f, 0.0f, 0.0f);
shim_guMtxCatF(sp58, sp18, sp18);
shim_guScaleF(sp58, 2.3 - scale, 2.3 - scale, 2.3 - scale);
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_E009EDF8[0]);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 0, 255, (part->unk_14 * unk_14) >> 9);
gDPSetEnvColor(gMainGfxPos++, 255, 128, 255, 0);
gDPSetCombineLERP(gMainGfxPos++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
shim_guRotateF(sp18, part->unk_20 + 14.0f, 0.0f, 0.0f, 1.0f);
shim_guRotateF(sp58, (i * 10) % 45 + unk_1C, 0.0f, 1.0f, 0.0f);
shim_guMtxCatF(sp58, sp18, sp18);
shim_guTranslateF(sp58, 20.0f, 0.0f, 0.0f);
shim_guMtxCatF(sp58, sp18, sp18);
shim_guScaleF(sp58, (part->unk_2C - 60.0f) * 0.05 + 1.0, 2.0 - (part->unk_2C - 60.0f) * 0.05, 1.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_E009EDF4[0]);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 64, 64, (part->unk_14 * unk_14) >> 8);
shim_guRotateF(sp18, part->unk_20 + 34.0f + unk_1C, 0.0f, 0.0f, 1.0f);
shim_guRotateF(sp58, i * 35, 0.0f, 1.0f, 0.0f);
shim_guMtxCatF(sp58, sp18, sp18);
shim_guTranslateF(sp58, 15.0f, 0.0f, 0.0f);
shim_guMtxCatF(sp58, sp18, sp18);
shim_guScaleF(sp58, (part->unk_2C - 60.0f) * 0.1 + 2.0, 1.0f, 1.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_E009EDF0[0]);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}
}
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_802A4A54_7AC3F4
/* 4197E4 802A4A54 3C02802B */ lui $v0, %hi(BattleSubmenuStratsState)
/* 4197E8 802A4A58 9042D604 */ lbu $v0, %lo(BattleSubmenuStratsState)($v0)
/* 4197EC 802A4A5C 27BDFFC0 */ addiu $sp, $sp, -0x40
/* 4197F0 802A4A60 AFB20030 */ sw $s2, 0x30($sp)
/* 4197F4 802A4A64 3C12800E */ lui $s2, %hi(gBattleStatus)
/* 4197F8 802A4A68 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus)
/* 4197FC 802A4A6C AFBF0038 */ sw $ra, 0x38($sp)
/* 419800 802A4A70 AFB30034 */ sw $s3, 0x34($sp)
/* 419804 802A4A74 AFB1002C */ sw $s1, 0x2C($sp)
/* 419808 802A4A78 24420002 */ addiu $v0, $v0, 0x2
/* 41980C 802A4A7C 00021600 */ sll $v0, $v0, 24
/* 419810 802A4A80 00021E03 */ sra $v1, $v0, 24
/* 419814 802A4A84 2C62002D */ sltiu $v0, $v1, 0x2D
/* 419818 802A4A88 104001F9 */ beqz $v0, .L802A5270_7ACC10
/* 41981C 802A4A8C AFB00028 */ sw $s0, 0x28($sp)
/* 419820 802A4A90 00031080 */ sll $v0, $v1, 2
/* 419824 802A4A94 3C01802B */ lui $at, %hi(jtbl_802AB9F0_7B3390)
/* 419828 802A4A98 00220821 */ addu $at, $at, $v0
/* 41982C 802A4A9C 8C22B9F0 */ lw $v0, %lo(jtbl_802AB9F0_7B3390)($at)
/* 419830 802A4AA0 00400008 */ jr $v0
/* 419834 802A4AA4 00000000 */ nop
glabel .L802A4AA8_7AC448
/* 419838 802A4AA8 3C05802B */ lui $a1, %hi(D_802AD608)
/* 41983C 802A4AAC 80A5D608 */ lb $a1, %lo(D_802AD608)($a1)
/* 419840 802A4AB0 3C04802B */ lui $a0, %hi(D_802AD605)
/* 419844 802A4AB4 8084D605 */ lb $a0, %lo(D_802AD605)($a0)
/* 419848 802A4AB8 24020014 */ addiu $v0, $zero, 0x14
/* 41984C 802A4ABC 3C01802B */ lui $at, %hi(D_802AD63C)
/* 419850 802A4AC0 A422D63C */ sh $v0, %lo(D_802AD63C)($at)
/* 419854 802A4AC4 24020044 */ addiu $v0, $zero, 0x44
/* 419858 802A4AC8 3C01802B */ lui $at, %hi(D_802AD63E)
/* 41985C 802A4ACC A422D63E */ sh $v0, %lo(D_802AD63E)($at)
/* 419860 802A4AD0 00051823 */ negu $v1, $a1
/* 419864 802A4AD4 00031040 */ sll $v0, $v1, 1
/* 419868 802A4AD8 00431021 */ addu $v0, $v0, $v1
/* 41986C 802A4ADC 00021080 */ sll $v0, $v0, 2
/* 419870 802A4AE0 00431021 */ addu $v0, $v0, $v1
/* 419874 802A4AE4 00852023 */ subu $a0, $a0, $a1
/* 419878 802A4AE8 3C01802B */ lui $at, %hi(D_802AD60C)
/* 41987C 802A4AEC A422D60C */ sh $v0, %lo(D_802AD60C)($at)
/* 419880 802A4AF0 00041040 */ sll $v0, $a0, 1
/* 419884 802A4AF4 00441021 */ addu $v0, $v0, $a0
/* 419888 802A4AF8 00021080 */ sll $v0, $v0, 2
/* 41988C 802A4AFC 3C03802B */ lui $v1, %hi(D_802AD66C)
/* 419890 802A4B00 8C63D66C */ lw $v1, %lo(D_802AD66C)($v1)
/* 419894 802A4B04 00441021 */ addu $v0, $v0, $a0
/* 419898 802A4B08 3C01802B */ lui $at, %hi(D_802AD60E)
/* 41989C 802A4B0C A422D60E */ sh $v0, %lo(D_802AD60E)($at)
/* 4198A0 802A4B10 18600017 */ blez $v1, .L802A4B70_7AC510
/* 4198A4 802A4B14 0000882D */ daddu $s1, $zero, $zero
/* 4198A8 802A4B18 3C13802B */ lui $s3, %hi(D_802AD628)
/* 4198AC 802A4B1C 2673D628 */ addiu $s3, $s3, %lo(D_802AD628)
/* 4198B0 802A4B20 3C10802B */ lui $s0, %hi(D_802AD640)
/* 4198B4 802A4B24 2610D640 */ addiu $s0, $s0, %lo(D_802AD640)
.L802A4B28_7AC4C8:
/* 4198B8 802A4B28 8E040000 */ lw $a0, 0x0($s0)
/* 4198BC 802A4B2C 26100004 */ addiu $s0, $s0, 0x4
/* 4198C0 802A4B30 0C050529 */ jal hud_element_create
/* 4198C4 802A4B34 26310001 */ addiu $s1, $s1, 0x1
/* 4198C8 802A4B38 0040902D */ daddu $s2, $v0, $zero
/* 4198CC 802A4B3C 3C053EE6 */ lui $a1, (0x3EE66666 >> 16)
/* 4198D0 802A4B40 34A56666 */ ori $a1, $a1, (0x3EE66666 & 0xFFFF)
/* 4198D4 802A4B44 0240202D */ daddu $a0, $s2, $zero
/* 4198D8 802A4B48 0C051308 */ jal hud_element_set_scale
/* 4198DC 802A4B4C AE720000 */ sw $s2, 0x0($s3)
/* 4198E0 802A4B50 0240202D */ daddu $a0, $s2, $zero
/* 4198E4 802A4B54 0C051280 */ jal hud_element_set_flags
/* 4198E8 802A4B58 34058080 */ ori $a1, $zero, 0x8080
/* 4198EC 802A4B5C 3C02802B */ lui $v0, %hi(D_802AD66C)
/* 4198F0 802A4B60 8C42D66C */ lw $v0, %lo(D_802AD66C)($v0)
/* 4198F4 802A4B64 0222102A */ slt $v0, $s1, $v0
/* 4198F8 802A4B68 1440FFEF */ bnez $v0, .L802A4B28_7AC4C8
/* 4198FC 802A4B6C 26730004 */ addiu $s3, $s3, 0x4
.L802A4B70_7AC510:
/* 419900 802A4B70 3C048010 */ lui $a0, %hi(HES_AnimatedHandPointer)
/* 419904 802A4B74 24844A28 */ addiu $a0, $a0, %lo(HES_AnimatedHandPointer)
/* 419908 802A4B78 0C050529 */ jal hud_element_create
/* 41990C 802A4B7C 00000000 */ nop
/* 419910 802A4B80 0040902D */ daddu $s2, $v0, $zero
/* 419914 802A4B84 0240202D */ daddu $a0, $s2, $zero
/* 419918 802A4B88 3C052000 */ lui $a1, (0x20000080 >> 16)
/* 41991C 802A4B8C 3C01802B */ lui $at, %hi(D_802AD618)
/* 419920 802A4B90 AC32D618 */ sw $s2, %lo(D_802AD618)($at)
/* 419924 802A4B94 0C051280 */ jal hud_element_set_flags
/* 419928 802A4B98 34A50080 */ ori $a1, $a1, (0x20000080 & 0xFFFF)
/* 41992C 802A4B9C 3C10802B */ lui $s0, %hi(D_802AD63C)
/* 419930 802A4BA0 2610D63C */ addiu $s0, $s0, %lo(D_802AD63C)
/* 419934 802A4BA4 3C11802B */ lui $s1, %hi(D_802AD63E)
/* 419938 802A4BA8 2631D63E */ addiu $s1, $s1, %lo(D_802AD63E)
/* 41993C 802A4BAC 86050000 */ lh $a1, 0x0($s0)
/* 419940 802A4BB0 86260000 */ lh $a2, 0x0($s1)
/* 419944 802A4BB4 0C051261 */ jal hud_element_set_render_pos
/* 419948 802A4BB8 0240202D */ daddu $a0, $s2, $zero
/* 41994C 802A4BBC 3C048010 */ lui $a0, %hi(HES_GreenArrowUp)
/* 419950 802A4BC0 248477E4 */ addiu $a0, $a0, %lo(HES_GreenArrowUp)
/* 419954 802A4BC4 0C050529 */ jal hud_element_create
/* 419958 802A4BC8 00000000 */ nop
/* 41995C 802A4BCC 0040902D */ daddu $s2, $v0, $zero
/* 419960 802A4BD0 0240202D */ daddu $a0, $s2, $zero
/* 419964 802A4BD4 3C052000 */ lui $a1, (0x20000080 >> 16)
/* 419968 802A4BD8 3C01802B */ lui $at, %hi(GreenArrowUpID)
/* 41996C 802A4BDC AC32D61C */ sw $s2, %lo(GreenArrowUpID)($at)
/* 419970 802A4BE0 0C051280 */ jal hud_element_set_flags
/* 419974 802A4BE4 34A50080 */ ori $a1, $a1, (0x20000080 & 0xFFFF)
/* 419978 802A4BE8 0240202D */ daddu $a0, $s2, $zero
/* 41997C 802A4BEC 86050000 */ lh $a1, 0x0($s0)
/* 419980 802A4BF0 86260000 */ lh $a2, 0x0($s1)
/* 419984 802A4BF4 24A50027 */ addiu $a1, $a1, 0x27
/* 419988 802A4BF8 0C051261 */ jal hud_element_set_render_pos
/* 41998C 802A4BFC 24C6FFF9 */ addiu $a2, $a2, -0x7
/* 419990 802A4C00 3C048010 */ lui $a0, %hi(HES_GreenArrowDown)
/* 419994 802A4C04 24847798 */ addiu $a0, $a0, %lo(HES_GreenArrowDown)
/* 419998 802A4C08 0C050529 */ jal hud_element_create
/* 41999C 802A4C0C 00000000 */ nop
/* 4199A0 802A4C10 0040902D */ daddu $s2, $v0, $zero
/* 4199A4 802A4C14 0240202D */ daddu $a0, $s2, $zero
/* 4199A8 802A4C18 3C052000 */ lui $a1, (0x20000080 >> 16)
/* 4199AC 802A4C1C 3C01802B */ lui $at, %hi(GreenArrowDownID)
/* 4199B0 802A4C20 AC32D620 */ sw $s2, %lo(GreenArrowDownID)($at)
/* 4199B4 802A4C24 0C051280 */ jal hud_element_set_flags
/* 4199B8 802A4C28 34A50080 */ ori $a1, $a1, (0x20000080 & 0xFFFF)
/* 4199BC 802A4C2C 0240202D */ daddu $a0, $s2, $zero
/* 4199C0 802A4C30 86050000 */ lh $a1, 0x0($s0)
/* 4199C4 802A4C34 86260000 */ lh $a2, 0x0($s1)
/* 4199C8 802A4C38 24A50027 */ addiu $a1, $a1, 0x27
/* 4199CC 802A4C3C 0C051261 */ jal hud_element_set_render_pos
/* 4199D0 802A4C40 24C6004E */ addiu $a2, $a2, 0x4E
/* 4199D4 802A4C44 24040006 */ addiu $a0, $zero, 0x6
/* 4199D8 802A4C48 24070090 */ addiu $a3, $zero, 0x90
/* 4199DC 802A4C4C 86130000 */ lh $s3, 0x0($s0)
/* 4199E0 802A4C50 2402000A */ addiu $v0, $zero, 0xA
/* 4199E4 802A4C54 3C01802B */ lui $at, %hi(D_802AD614)
/* 4199E8 802A4C58 A022D614 */ sb $v0, %lo(D_802AD614)($at)
/* 4199EC 802A4C5C 3C02802A */ lui $v0, %hi(func_802A5290_7ACC30)
/* 4199F0 802A4C60 24425290 */ addiu $v0, $v0, %lo(func_802A5290_7ACC30)
/* 4199F4 802A4C64 2412FFFF */ addiu $s2, $zero, -0x1
/* 4199F8 802A4C68 AFA00014 */ sw $zero, 0x14($sp)
/* 4199FC 802A4C6C AFA20018 */ sw $v0, 0x18($sp)
/* 419A00 802A4C70 AFA0001C */ sw $zero, 0x1C($sp)
/* 419A04 802A4C74 AFB20020 */ sw $s2, 0x20($sp)
/* 419A08 802A4C78 86300000 */ lh $s0, 0x0($s1)
/* 419A0C 802A4C7C 3C03802B */ lui $v1, %hi(D_802AD60A)
/* 419A10 802A4C80 8063D60A */ lb $v1, %lo(D_802AD60A)($v1)
/* 419A14 802A4C84 0260282D */ daddu $a1, $s3, $zero
/* 419A18 802A4C88 0200302D */ daddu $a2, $s0, $zero
/* 419A1C 802A4C8C 00031040 */ sll $v0, $v1, 1
/* 419A20 802A4C90 00431021 */ addu $v0, $v0, $v1
/* 419A24 802A4C94 00021080 */ sll $v0, $v0, 2
/* 419A28 802A4C98 00431021 */ addu $v0, $v0, $v1
/* 419A2C 802A4C9C 2442001A */ addiu $v0, $v0, 0x1A
/* 419A30 802A4CA0 0C051F32 */ jal set_window_properties
/* 419A34 802A4CA4 AFA20010 */ sw $v0, 0x10($sp)
/* 419A38 802A4CA8 24040007 */ addiu $a0, $zero, 0x7
/* 419A3C 802A4CAC 26650012 */ addiu $a1, $s3, 0x12
/* 419A40 802A4CB0 2606FFFA */ addiu $a2, $s0, -0x6
/* 419A44 802A4CB4 2407006C */ addiu $a3, $zero, 0x6C
/* 419A48 802A4CB8 24020010 */ addiu $v0, $zero, 0x10
/* 419A4C 802A4CBC 24100001 */ addiu $s0, $zero, 0x1
/* 419A50 802A4CC0 AFA20010 */ sw $v0, 0x10($sp)
/* 419A54 802A4CC4 3C02802A */ lui $v0, %hi(func_802A56F8_7AD098)
/* 419A58 802A4CC8 244256F8 */ addiu $v0, $v0, %lo(func_802A56F8_7AD098)
/* 419A5C 802A4CCC AFB00014 */ sw $s0, 0x14($sp)
/* 419A60 802A4CD0 AFA20018 */ sw $v0, 0x18($sp)
/* 419A64 802A4CD4 AFA0001C */ sw $zero, 0x1C($sp)
/* 419A68 802A4CD8 0C051F32 */ jal set_window_properties
/* 419A6C 802A4CDC AFB20020 */ sw $s2, 0x20($sp)
/* 419A70 802A4CE0 24130014 */ addiu $s3, $zero, 0x14
/* 419A74 802A4CE4 24040008 */ addiu $a0, $zero, 0x8
/* 419A78 802A4CE8 0260282D */ daddu $a1, $s3, $zero
/* 419A7C 802A4CEC 240600BA */ addiu $a2, $zero, 0xBA
/* 419A80 802A4CF0 24070118 */ addiu $a3, $zero, 0x118
/* 419A84 802A4CF4 24020020 */ addiu $v0, $zero, 0x20
/* 419A88 802A4CF8 AFA20010 */ sw $v0, 0x10($sp)
/* 419A8C 802A4CFC 3C02802A */ lui $v0, %hi(func_802A5738_7AD0D8)
/* 419A90 802A4D00 24425738 */ addiu $v0, $v0, %lo(func_802A5738_7AD0D8)
/* 419A94 802A4D04 AFB30014 */ sw $s3, 0x14($sp)
/* 419A98 802A4D08 AFA20018 */ sw $v0, 0x18($sp)
/* 419A9C 802A4D0C AFA0001C */ sw $zero, 0x1C($sp)
/* 419AA0 802A4D10 0C051F32 */ jal set_window_properties
/* 419AA4 802A4D14 AFB20020 */ sw $s2, 0x20($sp)
/* 419AA8 802A4D18 24040006 */ addiu $a0, $zero, 0x6
/* 419AAC 802A4D1C 0C051F9F */ jal set_window_update
/* 419AB0 802A4D20 0200282D */ daddu $a1, $s0, $zero
/* 419AB4 802A4D24 24040007 */ addiu $a0, $zero, 0x7
/* 419AB8 802A4D28 0C051F9F */ jal set_window_update
/* 419ABC 802A4D2C 0200282D */ daddu $a1, $s0, $zero
/* 419AC0 802A4D30 24040008 */ addiu $a0, $zero, 0x8
/* 419AC4 802A4D34 0C051F9F */ jal set_window_update
/* 419AC8 802A4D38 0200282D */ daddu $a1, $s0, $zero
/* 419ACC 802A4D3C 3C01802B */ lui $at, %hi(BattleSubmenuStratsState)
/* 419AD0 802A4D40 A030D604 */ sb $s0, %lo(BattleSubmenuStratsState)($at)
/* 419AD4 802A4D44 080A949D */ j .L802A5274_7ACC14
/* 419AD8 802A4D48 0000102D */ daddu $v0, $zero, $zero
glabel .L802A4D4C_7AC6EC
/* 419ADC 802A4D4C 3C02802B */ lui $v0, %hi(D_802AD607)
/* 419AE0 802A4D50 8042D607 */ lb $v0, %lo(D_802AD607)($v0)
/* 419AE4 802A4D54 14400147 */ bnez $v0, .L802A5274_7ACC14
/* 419AE8 802A4D58 0000102D */ daddu $v0, $zero, $zero
/* 419AEC 802A4D5C 3C04802B */ lui $a0, %hi(D_802AD605)
/* 419AF0 802A4D60 2484D605 */ addiu $a0, $a0, %lo(D_802AD605)
/* 419AF4 802A4D64 3C050001 */ lui $a1, (0x10000 >> 16)
/* 419AF8 802A4D68 8E420218 */ lw $v0, 0x218($s2)
/* 419AFC 802A4D6C 90830000 */ lbu $v1, 0x0($a0)
/* 419B00 802A4D70 00451024 */ and $v0, $v0, $a1
/* 419B04 802A4D74 3C01802B */ lui $at, %hi(D_802AD606)
/* 419B08 802A4D78 A023D606 */ sb $v1, %lo(D_802AD606)($at)
/* 419B0C 802A4D7C 10400008 */ beqz $v0, .L802A4DA0_7AC740
/* 419B10 802A4D80 00031600 */ sll $v0, $v1, 24
/* 419B14 802A4D84 1C400005 */ bgtz $v0, .L802A4D9C_7AC73C
/* 419B18 802A4D88 2462FFFF */ addiu $v0, $v1, -0x1
/* 419B1C 802A4D8C 8E420214 */ lw $v0, 0x214($s2)
/* 419B20 802A4D90 00451024 */ and $v0, $v0, $a1
/* 419B24 802A4D94 10400002 */ beqz $v0, .L802A4DA0_7AC740
/* 419B28 802A4D98 2462FFFF */ addiu $v0, $v1, -0x1
.L802A4D9C_7AC73C:
/* 419B2C 802A4D9C A0820000 */ sb $v0, 0x0($a0)
.L802A4DA0_7AC740:
/* 419B30 802A4DA0 8E420218 */ lw $v0, 0x218($s2)
/* 419B34 802A4DA4 3C060002 */ lui $a2, (0x20000 >> 16)
/* 419B38 802A4DA8 00461024 */ and $v0, $v0, $a2
/* 419B3C 802A4DAC 10400010 */ beqz $v0, .L802A4DF0_7AC790
/* 419B40 802A4DB0 00000000 */ nop
/* 419B44 802A4DB4 3C05802B */ lui $a1, %hi(D_802AD605)
/* 419B48 802A4DB8 24A5D605 */ addiu $a1, $a1, %lo(D_802AD605)
/* 419B4C 802A4DBC 3C02802B */ lui $v0, %hi(D_802AD66C)
/* 419B50 802A4DC0 8C42D66C */ lw $v0, %lo(D_802AD66C)($v0)
/* 419B54 802A4DC4 80A30000 */ lb $v1, 0x0($a1)
/* 419B58 802A4DC8 90A40000 */ lbu $a0, 0x0($a1)
/* 419B5C 802A4DCC 2442FFFF */ addiu $v0, $v0, -0x1
/* 419B60 802A4DD0 0062182A */ slt $v1, $v1, $v0
/* 419B64 802A4DD4 14600005 */ bnez $v1, .L802A4DEC_7AC78C
/* 419B68 802A4DD8 24820001 */ addiu $v0, $a0, 0x1
/* 419B6C 802A4DDC 8E420214 */ lw $v0, 0x214($s2)
/* 419B70 802A4DE0 00461024 */ and $v0, $v0, $a2
/* 419B74 802A4DE4 10400002 */ beqz $v0, .L802A4DF0_7AC790
/* 419B78 802A4DE8 24820001 */ addiu $v0, $a0, 0x1
.L802A4DEC_7AC78C:
/* 419B7C 802A4DEC A0A20000 */ sb $v0, 0x0($a1)
.L802A4DF0_7AC790:
/* 419B80 802A4DF0 3C10802B */ lui $s0, %hi(D_802AD605)
/* 419B84 802A4DF4 2610D605 */ addiu $s0, $s0, %lo(D_802AD605)
/* 419B88 802A4DF8 82020000 */ lb $v0, 0x0($s0)
/* 419B8C 802A4DFC 04410005 */ bgez $v0, .L802A4E14_7AC7B4
/* 419B90 802A4E00 00000000 */ nop
/* 419B94 802A4E04 3C02802B */ lui $v0, %hi(D_802AD66F)
/* 419B98 802A4E08 9042D66F */ lbu $v0, %lo(D_802AD66F)($v0)
/* 419B9C 802A4E0C 2442FFFF */ addiu $v0, $v0, -0x1
/* 419BA0 802A4E10 A2020000 */ sb $v0, 0x0($s0)
.L802A4E14_7AC7B4:
/* 419BA4 802A4E14 3C11802B */ lui $s1, %hi(D_802AD66C)
/* 419BA8 802A4E18 2631D66C */ addiu $s1, $s1, %lo(D_802AD66C)
/* 419BAC 802A4E1C 8E220000 */ lw $v0, 0x0($s1)
/* 419BB0 802A4E20 82030000 */ lb $v1, 0x0($s0)
/* 419BB4 802A4E24 2442FFFF */ addiu $v0, $v0, -0x1
/* 419BB8 802A4E28 0043102A */ slt $v0, $v0, $v1
/* 419BBC 802A4E2C 54400001 */ bnel $v0, $zero, .L802A4E34_7AC7D4
/* 419BC0 802A4E30 A2000000 */ sb $zero, 0x0($s0)
.L802A4E34_7AC7D4:
/* 419BC4 802A4E34 3C03802B */ lui $v1, %hi(D_802AD606)
/* 419BC8 802A4E38 8063D606 */ lb $v1, %lo(D_802AD606)($v1)
/* 419BCC 802A4E3C 82020000 */ lb $v0, 0x0($s0)
/* 419BD0 802A4E40 10620009 */ beq $v1, $v0, .L802A4E68_7AC808
/* 419BD4 802A4E44 00031080 */ sll $v0, $v1, 2
/* 419BD8 802A4E48 3C04802B */ lui $a0, %hi(D_802AD628)
/* 419BDC 802A4E4C 00822021 */ addu $a0, $a0, $v0
/* 419BE0 802A4E50 8C84D628 */ lw $a0, %lo(D_802AD628)($a0)
/* 419BE4 802A4E54 3C053EE6 */ lui $a1, (0x3EE66666 >> 16)
/* 419BE8 802A4E58 0C051308 */ jal hud_element_set_scale
/* 419BEC 802A4E5C 34A56666 */ ori $a1, $a1, (0x3EE66666 & 0xFFFF)
/* 419BF0 802A4E60 0C05272D */ jal sfx_play_sound
/* 419BF4 802A4E64 240400C7 */ addiu $a0, $zero, 0xC7
.L802A4E68_7AC808:
/* 419BF8 802A4E68 3C04802B */ lui $a0, %hi(D_802AD608)
/* 419BFC 802A4E6C 2484D608 */ addiu $a0, $a0, %lo(D_802AD608)
/* 419C00 802A4E70 82050000 */ lb $a1, 0x0($s0)
/* 419C04 802A4E74 80820000 */ lb $v0, 0x0($a0)
/* 419C08 802A4E78 92030000 */ lbu $v1, 0x0($s0)
/* 419C0C 802A4E7C 00A2102A */ slt $v0, $a1, $v0
/* 419C10 802A4E80 54400001 */ bnel $v0, $zero, .L802A4E88_7AC828
/* 419C14 802A4E84 A0830000 */ sb $v1, 0x0($a0)
.L802A4E88_7AC828:
/* 419C18 802A4E88 3C06802B */ lui $a2, %hi(D_802AD609)
/* 419C1C 802A4E8C 24C6D609 */ addiu $a2, $a2, %lo(D_802AD609)
/* 419C20 802A4E90 80C20000 */ lb $v0, 0x0($a2)
/* 419C24 802A4E94 00A2102A */ slt $v0, $a1, $v0
/* 419C28 802A4E98 14400006 */ bnez $v0, .L802A4EB4_7AC854
/* 419C2C 802A4E9C 00000000 */ nop
/* 419C30 802A4EA0 3C02802B */ lui $v0, %hi(D_802AD60A)
/* 419C34 802A4EA4 9042D60A */ lbu $v0, %lo(D_802AD60A)($v0)
/* 419C38 802A4EA8 2442FFFF */ addiu $v0, $v0, -0x1
/* 419C3C 802A4EAC 00621023 */ subu $v0, $v1, $v0
/* 419C40 802A4EB0 A0820000 */ sb $v0, 0x0($a0)
.L802A4EB4_7AC854:
/* 419C44 802A4EB4 90820000 */ lbu $v0, 0x0($a0)
/* 419C48 802A4EB8 24420006 */ addiu $v0, $v0, 0x6
/* 419C4C 802A4EBC A0C20000 */ sb $v0, 0x0($a2)
/* 419C50 802A4EC0 00021600 */ sll $v0, $v0, 24
/* 419C54 802A4EC4 8E230000 */ lw $v1, 0x0($s1)
/* 419C58 802A4EC8 00021603 */ sra $v0, $v0, 24
/* 419C5C 802A4ECC 0062182A */ slt $v1, $v1, $v0
/* 419C60 802A4ED0 10600003 */ beqz $v1, .L802A4EE0_7AC880
/* 419C64 802A4ED4 00000000 */ nop
/* 419C68 802A4ED8 92220003 */ lbu $v0, 0x3($s1)
/* 419C6C 802A4EDC A0C20000 */ sb $v0, 0x0($a2)
.L802A4EE0_7AC880:
/* 419C70 802A4EE0 8E430214 */ lw $v1, 0x214($s2)
/* 419C74 802A4EE4 30628000 */ andi $v0, $v1, 0x8000
/* 419C78 802A4EE8 10400019 */ beqz $v0, .L802A4F50_7AC8F0
/* 419C7C 802A4EEC 00051080 */ sll $v0, $a1, 2
/* 419C80 802A4EF0 3C03802B */ lui $v1, %hi(D_802AD690)
/* 419C84 802A4EF4 00621821 */ addu $v1, $v1, $v0
/* 419C88 802A4EF8 8C63D690 */ lw $v1, %lo(D_802AD690)($v1)
/* 419C8C 802A4EFC 24020001 */ addiu $v0, $zero, 0x1
/* 419C90 802A4F00 14620005 */ bne $v1, $v0, .L802A4F18_7AC8B8
/* 419C94 802A4F04 00000000 */ nop
/* 419C98 802A4F08 0C05272D */ jal sfx_play_sound
/* 419C9C 802A4F0C 240400C9 */ addiu $a0, $zero, 0xC9
/* 419CA0 802A4F10 080A949A */ j .L802A5268_7ACC08
/* 419CA4 802A4F14 2402FFFF */ addiu $v0, $zero, -0x1
.L802A4F18_7AC8B8:
/* 419CA8 802A4F18 0C05272D */ jal sfx_play_sound
/* 419CAC 802A4F1C 2404021D */ addiu $a0, $zero, 0x21D
/* 419CB0 802A4F20 82020000 */ lb $v0, 0x0($s0)
/* 419CB4 802A4F24 00021080 */ sll $v0, $v0, 2
/* 419CB8 802A4F28 3C03802B */ lui $v1, %hi(D_802AD6AA)
/* 419CBC 802A4F2C 00621821 */ addu $v1, $v1, $v0
/* 419CC0 802A4F30 9463D6AA */ lhu $v1, %lo(D_802AD6AA)($v1)
/* 419CC4 802A4F34 24020028 */ addiu $v0, $zero, 0x28
/* 419CC8 802A4F38 3C01802B */ lui $at, %hi(BattleSubmenuStratsState)
/* 419CCC 802A4F3C A022D604 */ sb $v0, %lo(BattleSubmenuStratsState)($at)
/* 419CD0 802A4F40 3C01802B */ lui $at, %hi(D_802AD610)
/* 419CD4 802A4F44 A423D610 */ sh $v1, %lo(D_802AD610)($at)
/* 419CD8 802A4F48 080A949D */ j .L802A5274_7ACC14
/* 419CDC 802A4F4C 0000102D */ daddu $v0, $zero, $zero
.L802A4F50_7AC8F0:
/* 419CE0 802A4F50 30624000 */ andi $v0, $v1, 0x4000
/* 419CE4 802A4F54 104000C7 */ beqz $v0, .L802A5274_7ACC14
/* 419CE8 802A4F58 0000102D */ daddu $v0, $zero, $zero
/* 419CEC 802A4F5C 0C05272D */ jal sfx_play_sound
/* 419CF0 802A4F60 240400CA */ addiu $a0, $zero, 0xCA
/* 419CF4 802A4F64 0C0A91CB */ jal func_802A472C_7AC0CC
/* 419CF8 802A4F68 00000000 */ nop
/* 419CFC 802A4F6C 080A949A */ j .L802A5268_7ACC08
/* 419D00 802A4F70 2402FFFE */ addiu $v0, $zero, -0x2
glabel .L802A4F74_7AC914
/* 419D04 802A4F74 3C02802B */ lui $v0, %hi(D_802AD66C)
/* 419D08 802A4F78 8C42D66C */ lw $v0, %lo(D_802AD66C)($v0)
/* 419D0C 802A4F7C 1840000F */ blez $v0, .L802A4FBC_7AC95C
/* 419D10 802A4F80 0000882D */ daddu $s1, $zero, $zero
/* 419D14 802A4F84 3C10802B */ lui $s0, %hi(D_802AD628)
/* 419D18 802A4F88 2610D628 */ addiu $s0, $s0, %lo(D_802AD628)
/* 419D1C 802A4F8C 240500A0 */ addiu $a1, $zero, 0xA0
.L802A4F90_7AC930:
/* 419D20 802A4F90 00A0302D */ daddu $a2, $a1, $zero
/* 419D24 802A4F94 00A0382D */ daddu $a3, $a1, $zero
/* 419D28 802A4F98 8E040000 */ lw $a0, 0x0($s0)
/* 419D2C 802A4F9C 0C0513BF */ jal hud_element_set_tint
/* 419D30 802A4FA0 26100004 */ addiu $s0, $s0, 0x4
/* 419D34 802A4FA4 3C02802B */ lui $v0, %hi(D_802AD66C)
/* 419D38 802A4FA8 8C42D66C */ lw $v0, %lo(D_802AD66C)($v0)
/* 419D3C 802A4FAC 26310001 */ addiu $s1, $s1, 0x1
/* 419D40 802A4FB0 0222102A */ slt $v0, $s1, $v0
/* 419D44 802A4FB4 1440FFF6 */ bnez $v0, .L802A4F90_7AC930
/* 419D48 802A4FB8 240500A0 */ addiu $a1, $zero, 0xA0
.L802A4FBC_7AC95C:
/* 419D4C 802A4FBC 240500A0 */ addiu $a1, $zero, 0xA0
/* 419D50 802A4FC0 00A0302D */ daddu $a2, $a1, $zero
/* 419D54 802A4FC4 3C10802B */ lui $s0, %hi(D_802AD618)
/* 419D58 802A4FC8 2610D618 */ addiu $s0, $s0, %lo(D_802AD618)
/* 419D5C 802A4FCC 8E040000 */ lw $a0, 0x0($s0)
/* 419D60 802A4FD0 0C0513BF */ jal hud_element_set_tint
/* 419D64 802A4FD4 00A0382D */ daddu $a3, $a1, $zero
/* 419D68 802A4FD8 240500A0 */ addiu $a1, $zero, 0xA0
/* 419D6C 802A4FDC 00A0302D */ daddu $a2, $a1, $zero
/* 419D70 802A4FE0 3C04802B */ lui $a0, %hi(GreenArrowUpID)
/* 419D74 802A4FE4 8C84D61C */ lw $a0, %lo(GreenArrowUpID)($a0)
/* 419D78 802A4FE8 0C0513BF */ jal hud_element_set_tint
/* 419D7C 802A4FEC 00A0382D */ daddu $a3, $a1, $zero
/* 419D80 802A4FF0 240500A0 */ addiu $a1, $zero, 0xA0
/* 419D84 802A4FF4 00A0302D */ daddu $a2, $a1, $zero
/* 419D88 802A4FF8 3C04802B */ lui $a0, %hi(GreenArrowDownID)
/* 419D8C 802A4FFC 8C84D620 */ lw $a0, %lo(GreenArrowDownID)($a0)
/* 419D90 802A5000 0C0513BF */ jal hud_element_set_tint
/* 419D94 802A5004 00A0382D */ daddu $a3, $a1, $zero
/* 419D98 802A5008 8E040000 */ lw $a0, 0x0($s0)
/* 419D9C 802A500C 3C058010 */ lui $a1, %hi(HES_HandPointer)
/* 419DA0 802A5010 24A54A00 */ addiu $a1, $a1, %lo(HES_HandPointer)
/* 419DA4 802A5014 0C0511FF */ jal hud_element_set_script
/* 419DA8 802A5018 00000000 */ nop
/* 419DAC 802A501C 24040006 */ addiu $a0, $zero, 0x6
/* 419DB0 802A5020 2402000D */ addiu $v0, $zero, 0xD
/* 419DB4 802A5024 3C01802B */ lui $at, %hi(D_802AD614)
/* 419DB8 802A5028 A022D614 */ sb $v0, %lo(D_802AD614)($at)
/* 419DBC 802A502C 0C051F9F */ jal set_window_update
/* 419DC0 802A5030 24050004 */ addiu $a1, $zero, 0x4
/* 419DC4 802A5034 24040007 */ addiu $a0, $zero, 0x7
/* 419DC8 802A5038 0C051F9F */ jal set_window_update
/* 419DCC 802A503C 24050004 */ addiu $a1, $zero, 0x4
/* 419DD0 802A5040 24040008 */ addiu $a0, $zero, 0x8
/* 419DD4 802A5044 0C051F9F */ jal set_window_update
/* 419DD8 802A5048 24050002 */ addiu $a1, $zero, 0x2
/* 419DDC 802A504C 080A9424 */ j .L802A5090_7ACA30
/* 419DE0 802A5050 00000000 */ nop
glabel .L802A5054_7AC9F4
/* 419DE4 802A5054 080A949D */ j .L802A5274_7ACC14
/* 419DE8 802A5058 240200FF */ addiu $v0, $zero, 0xFF
glabel .L802A505C_7AC9FC
/* 419DEC 802A505C 24040006 */ addiu $a0, $zero, 0x6
/* 419DF0 802A5060 0C051F9F */ jal set_window_update
/* 419DF4 802A5064 24050002 */ addiu $a1, $zero, 0x2
/* 419DF8 802A5068 24040007 */ addiu $a0, $zero, 0x7
/* 419DFC 802A506C 0C051F9F */ jal set_window_update
/* 419E00 802A5070 24050002 */ addiu $a1, $zero, 0x2
/* 419E04 802A5074 24040008 */ addiu $a0, $zero, 0x8
/* 419E08 802A5078 0C051F9F */ jal set_window_update
/* 419E0C 802A507C 24050002 */ addiu $a1, $zero, 0x2
/* 419E10 802A5080 3C02802B */ lui $v0, %hi(D_802AD605)
/* 419E14 802A5084 8042D605 */ lb $v0, %lo(D_802AD605)($v0)
/* 419E18 802A5088 080A9434 */ j .L802A50D0_7ACA70
/* 419E1C 802A508C 2403000B */ addiu $v1, $zero, 0xB
glabel .L802A5090_7ACA30
/* 419E20 802A5090 3C02802B */ lui $v0, %hi(D_802AD605)
/* 419E24 802A5094 8042D605 */ lb $v0, %lo(D_802AD605)($v0)
/* 419E28 802A5098 080A949D */ j .L802A5274_7ACC14
/* 419E2C 802A509C 24420001 */ addiu $v0, $v0, 0x1
glabel .L802A50A0_7ACA40
/* 419E30 802A50A0 24040006 */ addiu $a0, $zero, 0x6
/* 419E34 802A50A4 0C051F9F */ jal set_window_update
/* 419E38 802A50A8 24050001 */ addiu $a1, $zero, 0x1
/* 419E3C 802A50AC 24040007 */ addiu $a0, $zero, 0x7
/* 419E40 802A50B0 0C051F9F */ jal set_window_update
/* 419E44 802A50B4 24050001 */ addiu $a1, $zero, 0x1
/* 419E48 802A50B8 24040008 */ addiu $a0, $zero, 0x8
/* 419E4C 802A50BC 0C051F9F */ jal set_window_update
/* 419E50 802A50C0 24050001 */ addiu $a1, $zero, 0x1
/* 419E54 802A50C4 3C02802B */ lui $v0, %hi(D_802AD605)
/* 419E58 802A50C8 8042D605 */ lb $v0, %lo(D_802AD605)($v0)
/* 419E5C 802A50CC 24030001 */ addiu $v1, $zero, 0x1
.L802A50D0_7ACA70:
/* 419E60 802A50D0 3C01802B */ lui $at, %hi(BattleSubmenuStratsState)
/* 419E64 802A50D4 A023D604 */ sb $v1, %lo(BattleSubmenuStratsState)($at)
/* 419E68 802A50D8 080A949D */ j .L802A5274_7ACC14
/* 419E6C 802A50DC 24420001 */ addiu $v0, $v0, 0x1
glabel .L802A50E0_7ACA80
/* 419E70 802A50E0 24040006 */ addiu $a0, $zero, 0x6
/* 419E74 802A50E4 0C051F9F */ jal set_window_update
/* 419E78 802A50E8 24050001 */ addiu $a1, $zero, 0x1
/* 419E7C 802A50EC 24040007 */ addiu $a0, $zero, 0x7
/* 419E80 802A50F0 0C051F9F */ jal set_window_update
/* 419E84 802A50F4 24050001 */ addiu $a1, $zero, 0x1
/* 419E88 802A50F8 24040008 */ addiu $a0, $zero, 0x8
/* 419E8C 802A50FC 0C051F9F */ jal set_window_update
/* 419E90 802A5100 24050001 */ addiu $a1, $zero, 0x1
/* 419E94 802A5104 080A949A */ j .L802A5268_7ACC08
/* 419E98 802A5108 2402FFFF */ addiu $v0, $zero, -0x1
glabel .L802A510C_7ACAAC
/* 419E9C 802A510C 2402FFFF */ addiu $v0, $zero, -0x1
/* 419EA0 802A5110 0040182D */ daddu $v1, $v0, $zero
/* 419EA4 802A5114 3C01802B */ lui $at, %hi(D_802AD6D4)
/* 419EA8 802A5118 AC23D6D4 */ sw $v1, %lo(D_802AD6D4)($at)
/* 419EAC 802A511C 24030029 */ addiu $v1, $zero, 0x29
/* 419EB0 802A5120 3C01802B */ lui $at, %hi(BattleSubmenuStratsState)
/* 419EB4 802A5124 A023D604 */ sb $v1, %lo(BattleSubmenuStratsState)($at)
/* 419EB8 802A5128 080A949D */ j .L802A5274_7ACC14
/* 419EBC 802A512C 00000000 */ nop
glabel .L802A5130_7ACAD0
/* 419EC0 802A5130 24040006 */ addiu $a0, $zero, 0x6
/* 419EC4 802A5134 0C051F9F */ jal set_window_update
/* 419EC8 802A5138 24050002 */ addiu $a1, $zero, 0x2
/* 419ECC 802A513C 24040007 */ addiu $a0, $zero, 0x7
/* 419ED0 802A5140 0C051F9F */ jal set_window_update
/* 419ED4 802A5144 24050002 */ addiu $a1, $zero, 0x2
/* 419ED8 802A5148 24040008 */ addiu $a0, $zero, 0x8
/* 419EDC 802A514C 0C051F9F */ jal set_window_update
/* 419EE0 802A5150 24050002 */ addiu $a1, $zero, 0x2
/* 419EE4 802A5154 3C03802B */ lui $v1, %hi(D_802AD610)
/* 419EE8 802A5158 8463D610 */ lh $v1, %lo(D_802AD610)($v1)
/* 419EEC 802A515C 14600003 */ bnez $v1, .L802A516C_7ACB0C
/* 419EF0 802A5160 3C04001D */ lui $a0, (0x1D00CC >> 16)
/* 419EF4 802A5164 080A945C */ j .L802A5170_7ACB10
/* 419EF8 802A5168 348400CB */ ori $a0, $a0, (0x1D00CB & 0xFFFF)
.L802A516C_7ACB0C:
/* 419EFC 802A516C 348400CC */ ori $a0, $a0, (0x1D00CC & 0xFFFF)
.L802A5170_7ACB10:
/* 419F00 802A5170 0C04991D */ jal get_msg_width
/* 419F04 802A5174 0000282D */ daddu $a1, $zero, $zero
/* 419F08 802A5178 24040009 */ addiu $a0, $zero, 0x9
/* 419F0C 802A517C 24470017 */ addiu $a3, $v0, 0x17
/* 419F10 802A5180 00072FC2 */ srl $a1, $a3, 31
/* 419F14 802A5184 00E52821 */ addu $a1, $a3, $a1
/* 419F18 802A5188 00052843 */ sra $a1, $a1, 1
/* 419F1C 802A518C 240200A0 */ addiu $v0, $zero, 0xA0
/* 419F20 802A5190 00452823 */ subu $a1, $v0, $a1
/* 419F24 802A5194 24060050 */ addiu $a2, $zero, 0x50
/* 419F28 802A5198 2402001C */ addiu $v0, $zero, 0x1C
/* 419F2C 802A519C AFA20010 */ sw $v0, 0x10($sp)
/* 419F30 802A51A0 24020014 */ addiu $v0, $zero, 0x14
/* 419F34 802A51A4 AFA20014 */ sw $v0, 0x14($sp)
/* 419F38 802A51A8 3C02802A */ lui $v0, %hi(func_802A57C8_7AD168)
/* 419F3C 802A51AC 244257C8 */ addiu $v0, $v0, %lo(func_802A57C8_7AD168)
/* 419F40 802A51B0 AFA20018 */ sw $v0, 0x18($sp)
/* 419F44 802A51B4 2402FFFF */ addiu $v0, $zero, -0x1
/* 419F48 802A51B8 AFA0001C */ sw $zero, 0x1C($sp)
/* 419F4C 802A51BC 0C051F32 */ jal set_window_properties
/* 419F50 802A51C0 AFA20020 */ sw $v0, 0x20($sp)
/* 419F54 802A51C4 24040009 */ addiu $a0, $zero, 0x9
/* 419F58 802A51C8 0C051F9F */ jal set_window_update
/* 419F5C 802A51CC 24050001 */ addiu $a1, $zero, 0x1
/* 419F60 802A51D0 2403003C */ addiu $v1, $zero, 0x3C
/* 419F64 802A51D4 3C01802B */ lui $at, %hi(D_802AD612)
/* 419F68 802A51D8 A423D612 */ sh $v1, %lo(D_802AD612)($at)
/* 419F6C 802A51DC 2403002A */ addiu $v1, $zero, 0x2A
/* 419F70 802A51E0 3C01802B */ lui $at, %hi(BattleSubmenuStratsState)
/* 419F74 802A51E4 A023D604 */ sb $v1, %lo(BattleSubmenuStratsState)($at)
/* 419F78 802A51E8 080A949D */ j .L802A5274_7ACC14
/* 419F7C 802A51EC 2402FFFF */ addiu $v0, $zero, -0x1
glabel .L802A51F0_7ACB90
/* 419F80 802A51F0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 419F84 802A51F4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 419F88 802A51F8 8C420010 */ lw $v0, 0x10($v0)
/* 419F8C 802A51FC 3042C000 */ andi $v0, $v0, 0xC000
/* 419F90 802A5200 10400003 */ beqz $v0, .L802A5210_7ACBB0
/* 419F94 802A5204 00000000 */ nop
/* 419F98 802A5208 3C01802B */ lui $at, %hi(D_802AD612)
/* 419F9C 802A520C A420D612 */ sh $zero, %lo(D_802AD612)($at)
.L802A5210_7ACBB0:
/* 419FA0 802A5210 3C04802B */ lui $a0, %hi(D_802AD612)
/* 419FA4 802A5214 2484D612 */ addiu $a0, $a0, %lo(D_802AD612)
/* 419FA8 802A5218 84820000 */ lh $v0, 0x0($a0)
/* 419FAC 802A521C 94830000 */ lhu $v1, 0x0($a0)
/* 419FB0 802A5220 10400004 */ beqz $v0, .L802A5234_7ACBD4
/* 419FB4 802A5224 2462FFFF */ addiu $v0, $v1, -0x1
/* 419FB8 802A5228 A4820000 */ sh $v0, 0x0($a0)
/* 419FBC 802A522C 080A949D */ j .L802A5274_7ACC14
/* 419FC0 802A5230 2402FFFF */ addiu $v0, $zero, -0x1
.L802A5234_7ACBD4:
/* 419FC4 802A5234 24040009 */ addiu $a0, $zero, 0x9
/* 419FC8 802A5238 0C051F9F */ jal set_window_update
/* 419FCC 802A523C 24050002 */ addiu $a1, $zero, 0x2
/* 419FD0 802A5240 24040006 */ addiu $a0, $zero, 0x6
/* 419FD4 802A5244 0C051F9F */ jal set_window_update
/* 419FD8 802A5248 24050001 */ addiu $a1, $zero, 0x1
/* 419FDC 802A524C 24040007 */ addiu $a0, $zero, 0x7
/* 419FE0 802A5250 0C051F9F */ jal set_window_update
/* 419FE4 802A5254 24050001 */ addiu $a1, $zero, 0x1
/* 419FE8 802A5258 24040008 */ addiu $a0, $zero, 0x8
/* 419FEC 802A525C 0C051F9F */ jal set_window_update
/* 419FF0 802A5260 24050001 */ addiu $a1, $zero, 0x1
/* 419FF4 802A5264 24020001 */ addiu $v0, $zero, 0x1
.L802A5268_7ACC08:
/* 419FF8 802A5268 3C01802B */ lui $at, %hi(BattleSubmenuStratsState)
/* 419FFC 802A526C A022D604 */ sb $v0, %lo(BattleSubmenuStratsState)($at)
glabel .L802A5270_7ACC10
/* 41A000 802A5270 0000102D */ daddu $v0, $zero, $zero
.L802A5274_7ACC14:
/* 41A004 802A5274 8FBF0038 */ lw $ra, 0x38($sp)
/* 41A008 802A5278 8FB30034 */ lw $s3, 0x34($sp)
/* 41A00C 802A527C 8FB20030 */ lw $s2, 0x30($sp)
/* 41A010 802A5280 8FB1002C */ lw $s1, 0x2C($sp)
/* 41A014 802A5284 8FB00028 */ lw $s0, 0x28($sp)
/* 41A018 802A5288 03E00008 */ jr $ra
/* 41A01C 802A528C 27BD0040 */ addiu $sp, $sp, 0x40
### DECOMPILED C INSTRUCTIONS:
s32 func_802A4A54(void) {
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
s32 x, y;
s32 width;
s32 msgID;
s32 i;
switch (BattleSubmenuStratsState) {
case 0:
D_802AD63C = 20;
D_802AD63E = 68;
D_802AD60C = -D_802AD608 * 13;
D_802AD60E = (D_802AD605 - D_802AD608) * 13;
for (i = 0; i < D_802AD66C; i++) {
D_802AD628[i] = id = hud_element_create(D_802AD640[i]);
hud_element_set_scale(id, 0.45f);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
}
D_802AD618 = id = hud_element_create(&HES_AnimatedHandPointer);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, D_802AD63C, D_802AD63E);
GreenArrowUpID = id = hud_element_create(&HES_GreenArrowUp);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, D_802AD63C + 39, D_802AD63E - 7);
GreenArrowDownID = id = hud_element_create(&HES_GreenArrowDown);
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
hud_element_set_render_pos(id, D_802AD63C + 39, D_802AD63E + 78);
D_802AD614 = MSG_PAL_STANDARD;
x = D_802AD63C;
y = D_802AD63E;
set_window_properties(WINDOW_ID_6, x, y, 144, (D_802AD60A * 13) + 26, 0, func_802A5290, NULL, -1);
set_window_properties(WINDOW_ID_7, x + 18, y - 6, 108, 16, 1, func_802A56F8, NULL, -1);
x = 20;
y = 186;
set_window_properties(WINDOW_ID_8, x, y, 280, 32, WINDOW_PRIORITY_20, func_802A5738, NULL, -1);
set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
BattleSubmenuStratsState = 1;
break;
case 1:
if (D_802AD607 == 0) {
D_802AD606 = D_802AD605;
if (battleStatus->currentButtonsHeld & BUTTON_STICK_UP) {
if (D_802AD605 > 0) {
D_802AD605--;
} else if (battleStatus->currentButtonsPressed & BUTTON_STICK_UP) {
D_802AD605--;
}
}
if (battleStatus->currentButtonsHeld & BUTTON_STICK_DOWN) {
if (D_802AD605 < D_802AD66C - 1) {
D_802AD605++;
} else if (battleStatus->currentButtonsPressed & BUTTON_STICK_DOWN) {
D_802AD605++;
}
}
if (D_802AD605 < 0) {
D_802AD605 = D_802AD66C - 1;
}
if (D_802AD66C - 1 < D_802AD605) {
D_802AD605 = 0;
}
if (D_802AD606 != D_802AD605) {
hud_element_set_scale(D_802AD628[D_802AD606], 0.45f);
sfx_play_sound(SOUND_MENU_CHANGE_SELECTION);
}
if (D_802AD605 < D_802AD608) {
D_802AD608 = D_802AD605;
}
if (D_802AD605 >= D_802AD609) {
D_802AD608 = D_802AD605 + 1 - D_802AD60A;
}
D_802AD609 = D_802AD608 + 6;
if (D_802AD609 > D_802AD66C) {
D_802AD609 = D_802AD66C;
}
if (battleStatus->currentButtonsPressed & BUTTON_A) {
if (D_802AD690[D_802AD605] == 1) {
sfx_play_sound(SOUND_MENU_NEXT);
BattleSubmenuStratsState = -1;
} else {
sfx_play_sound(SOUND_MENU_ERROR);
BattleSubmenuStratsState = 40;
D_802AD610 = D_802AD6A8[D_802AD605];
}
break;
}
if (battleStatus->currentButtonsPressed & BUTTON_B) {
sfx_play_sound(SOUND_MENU_BACK);
func_802A472C();
BattleSubmenuStratsState = -2;
}
}
break;
case -1:
for (i = 0; i < D_802AD66C; i++) {
hud_element_set_tint(D_802AD628[i], 160, 160, 160);
}
hud_element_set_tint(D_802AD618, 160, 160, 160);
hud_element_set_tint(GreenArrowUpID, 160, 160, 160);
hud_element_set_tint(GreenArrowDownID, 160, 160, 160);
hud_element_set_script(D_802AD618, &HES_HandPointer);
D_802AD614 = MSG_PAL_0D;
set_window_update(WINDOW_ID_6, WINDOW_UPDATE_DARKENED);
set_window_update(WINDOW_ID_7, WINDOW_UPDATE_DARKENED);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
return D_802AD605 + 1;
case -2:
return 255;
case 10:
set_window_update(WINDOW_ID_6, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_7, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
BattleSubmenuStratsState = 11;
return D_802AD605 + 1;
case 11:
return D_802AD605 + 1;
case 20:
set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
BattleSubmenuStratsState = 1;
return D_802AD605 + 1;
case 30:
set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
BattleSubmenuStratsState = -1;
break;
case 40:
D_802AD6D4 = -1;
BattleSubmenuStratsState = 41;
return -1;
case 41:
set_window_update(WINDOW_ID_6, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_7, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
switch (D_802AD610) {
case 0:
msgID = MSG_Menus_Battle_CantSwitch2;
break;
case 1:
msgID = MSG_Menus_Battle_CantRunAway;
break;
default:
msgID = MSG_Menus_Battle_CantRunAway;
break;
}
width = get_msg_width(msgID, 0) + 23;
set_window_properties(WINDOW_ID_BATTLE_POPUP, (SCREEN_WIDTH / 2) - (width / 2), 80, width, 28, 20, func_802A57C8, NULL, -1);
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
D_802AD612 = 60;
BattleSubmenuStratsState = 42;
return -1;
case 42:
if (gGameStatusPtr->pressedButtons[0] & (BUTTON_A | BUTTON_B)) {
D_802AD612 = 0;
}
if (D_802AD612 != 0) {
D_802AD612--;
return -1;
}
set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE);
set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
BattleSubmenuStratsState = 1;
break;
}
return 0;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel D_802A1C54_7A95F4
/* 4169E4 802A1C54 3C02802B */ lui $v0, %hi(BattleMenuState)
/* 4169E8 802A1C58 9042D000 */ lbu $v0, %lo(BattleMenuState)($v0)
/* 4169EC 802A1C5C 27BDFF88 */ addiu $sp, $sp, -0x78
D_802A1C60_7A9600:
/* 4169F0 802A1C60 AFBF0054 */ sw $ra, 0x54($sp)
/* 4169F4 802A1C64 AFBE0050 */ sw $fp, 0x50($sp)
/* 4169F8 802A1C68 AFB7004C */ sw $s7, 0x4C($sp)
/* 4169FC 802A1C6C AFB60048 */ sw $s6, 0x48($sp)
/* 416A00 802A1C70 AFB50044 */ sw $s5, 0x44($sp)
D_802A1C74_7A9614:
/* 416A04 802A1C74 AFB40040 */ sw $s4, 0x40($sp)
/* 416A08 802A1C78 AFB3003C */ sw $s3, 0x3C($sp)
/* 416A0C 802A1C7C AFB20038 */ sw $s2, 0x38($sp)
/* 416A10 802A1C80 AFB10034 */ sw $s1, 0x34($sp)
/* 416A14 802A1C84 AFB00030 */ sw $s0, 0x30($sp)
D_802A1C88_7A9628:
/* 416A18 802A1C88 F7BA0070 */ sdc1 $f26, 0x70($sp)
/* 416A1C 802A1C8C F7B80068 */ sdc1 $f24, 0x68($sp)
D_802A1C90_7A9630:
/* 416A20 802A1C90 F7B60060 */ sdc1 $f22, 0x60($sp)
/* 416A24 802A1C94 F7B40058 */ sdc1 $f20, 0x58($sp)
/* 416A28 802A1C98 24420001 */ addiu $v0, $v0, 0x1
/* 416A2C 802A1C9C 00021600 */ sll $v0, $v0, 24
D_802A1CA0_7A9640:
/* 416A30 802A1CA0 00021E03 */ sra $v1, $v0, 24
/* 416A34 802A1CA4 2C620020 */ sltiu $v0, $v1, 0x20
/* 416A38 802A1CA8 10400266 */ beqz $v0, .L802A2644_7A9FE4
/* 416A3C 802A1CAC 00031080 */ sll $v0, $v1, 2
/* 416A40 802A1CB0 3C01802B */ lui $at, %hi(jtbl_802AB770_7B3110)
/* 416A44 802A1CB4 00220821 */ addu $at, $at, $v0
/* 416A48 802A1CB8 8C22B770 */ lw $v0, %lo(jtbl_802AB770_7B3110)($at)
/* 416A4C 802A1CBC 00400008 */ jr $v0
D_802A1CC0_7A9660:
/* 416A50 802A1CC0 00000000 */ nop
/* 416A54 802A1CC4 0C051086 */ jal func_80144218
/* 416A58 802A1CC8 2404FFFF */ addiu $a0, $zero, -0x1
.L802A1CCC_7A966C:
/* 416A5C 802A1CCC 3C128080 */ lui $s2, (0x80808081 >> 16)
D_802A1CD0_7A9670:
/* 416A60 802A1CD0 44800000 */ mtc1 $zero, $f0
D_802A1CD4_7A9674:
/* 416A64 802A1CD4 3C13802B */ lui $s3, %hi(D_802AD048)
/* 416A68 802A1CD8 8E73D048 */ lw $s3, %lo(D_802AD048)($s3)
/* 416A6C 802A1CDC 44050000 */ mfc1 $a1, $f0
D_802A1CE0_7A9680:
/* 416A70 802A1CE0 0260202D */ daddu $a0, $s3, $zero
.L802A1CE4_7A9684:
/* 416A74 802A1CE4 00A0302D */ daddu $a2, $a1, $zero
/* 416A78 802A1CE8 0C051489 */ jal hud_element_set_transform_rotation
/* 416A7C 802A1CEC 00A0382D */ daddu $a3, $a1, $zero
D_802A1CF0_7A9690:
/* 416A80 802A1CF0 3C11802B */ lui $s1, %hi(D_802AD006)
.L802A1CF4_7A9694:
/* 416A84 802A1CF4 2631D006 */ addiu $s1, $s1, %lo(D_802AD006)
/* 416A88 802A1CF8 86220000 */ lh $v0, 0x0($s1)
/* 416A8C 802A1CFC 36528081 */ ori $s2, $s2, (0x80808081 & 0xFFFF)
/* 416A90 802A1D00 000229C0 */ sll $a1, $v0, 7
/* 416A94 802A1D04 00A22823 */ subu $a1, $a1, $v0
/* 416A98 802A1D08 00052840 */ sll $a1, $a1, 1
/* 416A9C 802A1D0C 00B20018 */ mult $a1, $s2
D_802A1D10_7A96B0:
/* 416AA0 802A1D10 0260202D */ daddu $a0, $s3, $zero
/* 416AA4 802A1D14 00004010 */ mfhi $t0
/* 416AA8 802A1D18 01051021 */ addu $v0, $t0, $a1
/* 416AAC 802A1D1C 000211C3 */ sra $v0, $v0, 7
/* 416AB0 802A1D20 00052FC3 */ sra $a1, $a1, 31
/* 416AB4 802A1D24 0C0513AC */ jal hud_element_set_alpha
/* 416AB8 802A1D28 00452823 */ subu $a1, $v0, $a1
/* 416ABC 802A1D2C 0260202D */ daddu $a0, $s3, $zero
D_802A1D30_7A96D0:
/* 416AC0 802A1D30 3C10802B */ lui $s0, %hi(D_802AD00A)
/* 416AC4 802A1D34 2610D00A */ addiu $s0, $s0, %lo(D_802AD00A)
/* 416AC8 802A1D38 86060000 */ lh $a2, 0x0($s0)
/* 416ACC 802A1D3C 24050F64 */ addiu $a1, $zero, 0xF64
/* 416AD0 802A1D40 00A62823 */ subu $a1, $a1, $a2
/* 416AD4 802A1D44 0C051261 */ jal hud_element_set_render_pos
/* 416AD8 802A1D48 24C600D4 */ addiu $a2, $a2, 0xD4
D_802A1D4C_7A96EC:
/* 416ADC 802A1D4C 0C05108E */ jal func_80144238
D_802A1D50_7A96F0:
/* 416AE0 802A1D50 0260202D */ daddu $a0, $s3, $zero
/* 416AE4 802A1D54 86220000 */ lh $v0, 0x0($s1)
/* 416AE8 802A1D58 000229C0 */ sll $a1, $v0, 7
/* 416AEC 802A1D5C 00A22823 */ subu $a1, $a1, $v0
D_802A1D60_7A9700:
/* 416AF0 802A1D60 00052840 */ sll $a1, $a1, 1
/* 416AF4 802A1D64 00B20018 */ mult $a1, $s2
/* 416AF8 802A1D68 3C13802B */ lui $s3, %hi(D_802AD044)
/* 416AFC 802A1D6C 8E73D044 */ lw $s3, %lo(D_802AD044)($s3)
D_802A1D70_7A9710:
/* 416B00 802A1D70 0260202D */ daddu $a0, $s3, $zero
/* 416B04 802A1D74 00004010 */ mfhi $t0
/* 416B08 802A1D78 01051021 */ addu $v0, $t0, $a1
/* 416B0C 802A1D7C 000211C3 */ sra $v0, $v0, 7
D_802A1D80_7A9720:
/* 416B10 802A1D80 00052FC3 */ sra $a1, $a1, 31
/* 416B14 802A1D84 0C0513AC */ jal hud_element_set_alpha
D_802A1D88_7A9728:
/* 416B18 802A1D88 00452823 */ subu $a1, $v0, $a1
/* 416B1C 802A1D8C 0260202D */ daddu $a0, $s3, $zero
/* 416B20 802A1D90 86060000 */ lh $a2, 0x0($s0)
/* 416B24 802A1D94 24050028 */ addiu $a1, $zero, 0x28
/* 416B28 802A1D98 00A62823 */ subu $a1, $a1, $a2
/* 416B2C 802A1D9C 0C051261 */ jal hud_element_set_render_pos
D_802A1DA0_7A9740:
/* 416B30 802A1DA0 24C600D4 */ addiu $a2, $a2, 0xD4
/* 416B34 802A1DA4 0C05108E */ jal func_80144238
/* 416B38 802A1DA8 0260202D */ daddu $a0, $s3, $zero
/* 416B3C 802A1DAC 080A8991 */ j .L802A2644_7A9FE4
/* 416B40 802A1DB0 00000000 */ nop
glabel .L802A1DB4_7A9754
/* 416B44 802A1DB4 3C03802B */ lui $v1, %hi(D_802AD006)
/* 416B48 802A1DB8 8463D006 */ lh $v1, %lo(D_802AD006)($v1)
/* 416B4C 802A1DBC 3C02802B */ lui $v0, %hi(BattleMenuAlpha)
/* 416B50 802A1DC0 8442D008 */ lh $v0, %lo(BattleMenuAlpha)($v0)
/* 416B54 802A1DC4 00620018 */ mult $v1, $v0
/* 416B58 802A1DC8 00001812 */ mflo $v1
/* 416B5C 802A1DCC 3C028080 */ lui $v0, (0x80808081 >> 16)
.L802A1DD0_7A9770:
/* 416B60 802A1DD0 34428081 */ ori $v0, $v0, (0x80808081 & 0xFFFF)
/* 416B64 802A1DD4 00620018 */ mult $v1, $v0
D_802A1DD8_7A9778:
/* 416B68 802A1DD8 2404FFFF */ addiu $a0, $zero, -0x1
/* 416B6C 802A1DDC 00001010 */ mfhi $v0
/* 416B70 802A1DE0 00431021 */ addu $v0, $v0, $v1
.L802A1DE4_7A9784:
/* 416B74 802A1DE4 000211C3 */ sra $v0, $v0, 7
/* 416B78 802A1DE8 00031FC3 */ sra $v1, $v1, 31
/* 416B7C 802A1DEC 0C051086 */ jal func_80144218
/* 416B80 802A1DF0 0043A823 */ subu $s5, $v0, $v1
/* 416B84 802A1DF4 3C03802B */ lui $v1, %hi(BattleMenu_CurPos)
/* 416B88 802A1DF8 8063D002 */ lb $v1, %lo(BattleMenu_CurPos)($v1)
/* 416B8C 802A1DFC 3C02802B */ lui $v0, %hi(D_802AD100)
D_802A1E00_7A97A0:
/* 416B90 802A1E00 8C42D100 */ lw $v0, %lo(D_802AD100)($v0)
/* 416B94 802A1E04 00431023 */ subu $v0, $v0, $v1
D_802A1E08_7A97A8:
/* 416B98 802A1E08 000218C0 */ sll $v1, $v0, 3
/* 416B9C 802A1E0C 00621823 */ subu $v1, $v1, $v0
/* 416BA0 802A1E10 00031880 */ sll $v1, $v1, 2
/* 416BA4 802A1E14 3C02802B */ lui $v0, %hi(BattleMenu_WheelAngle)
/* 416BA8 802A1E18 2442D06C */ addiu $v0, $v0, %lo(BattleMenu_WheelAngle)
D_802A1E1C_7A97BC:
/* 416BAC 802A1E1C C4420000 */ lwc1 $f2, 0x0($v0)
D_802A1E20_7A97C0:
/* 416BB0 802A1E20 4483C000 */ mtc1 $v1, $f24
/* 416BB4 802A1E24 00000000 */ nop
/* 416BB8 802A1E28 4680C620 */ cvt.s.w $f24, $f24
/* 416BBC 802A1E2C 4602C03C */ c.lt.s $f24, $f2
/* 416BC0 802A1E30 00000000 */ nop
glabel .L802A1E34_7A97D4
/* 416BC4 802A1E34 45000007 */ bc1f .L802A1E54_7A97F4
/* 416BC8 802A1E38 0000B82D */ daddu $s7, $zero, $zero
D_802A1E3C_7A97DC:
/* 416BCC 802A1E3C 3C01802B */ lui $at, %hi(D_802AD070)
/* 416BD0 802A1E40 C420D070 */ lwc1 $f0, %lo(D_802AD070)($at)
/* 416BD4 802A1E44 46001001 */ sub.s $f0, $f2, $f0
/* 416BD8 802A1E48 4618003C */ c.lt.s $f0, $f24
/* 416BDC 802A1E4C 080A879F */ j .L802A1E7C_7A981C
/* 416BE0 802A1E50 E4400000 */ swc1 $f0, 0x0($v0)
.L802A1E54_7A97F4:
/* 416BE4 802A1E54 4618103C */ c.lt.s $f2, $f24
/* 416BE8 802A1E58 00000000 */ nop
D_802A1E5C_7A97FC:
/* 416BEC 802A1E5C 4502000B */ bc1fl .L802A1E8C_7A982C
/* 416BF0 802A1E60 24170001 */ addiu $s7, $zero, 0x1
/* 416BF4 802A1E64 3C01802B */ lui $at, %hi(D_802AD070)
/* 416BF8 802A1E68 C420D070 */ lwc1 $f0, %lo(D_802AD070)($at)
D_802A1E6C_7A980C:
/* 416BFC 802A1E6C 46001000 */ add.s $f0, $f2, $f0
D_802A1E70_7A9810:
/* 416C00 802A1E70 E4400000 */ swc1 $f0, 0x0($v0)
/* 416C04 802A1E74 4600C03C */ c.lt.s $f24, $f0
/* 416C08 802A1E78 00000000 */ nop
.L802A1E7C_7A981C:
/* 416C0C 802A1E7C 45000003 */ bc1f .L802A1E8C_7A982C
D_802A1E80_7A9820:
/* 416C10 802A1E80 00000000 */ nop
/* 416C14 802A1E84 E4580000 */ swc1 $f24, 0x0($v0)
/* 416C18 802A1E88 24170001 */ addiu $s7, $zero, 0x1
.L802A1E8C_7A982C:
/* 416C1C 802A1E8C 16E00010 */ bnez $s7, .L802A1ED0_7A9870
/* 416C20 802A1E90 00000000 */ nop
D_802A1E94_7A9834:
/* 416C24 802A1E94 3C02802B */ lui $v0, %hi(D_802AD070)
/* 416C28 802A1E98 2442D070 */ addiu $v0, $v0, %lo(D_802AD070)
/* 416C2C 802A1E9C C4400000 */ lwc1 $f0, 0x0($v0)
.L802A1EA0_7A9840:
/* 416C30 802A1EA0 3C013FF0 */ lui $at, (0x3FF00000 >> 16)
/* 416C34 802A1EA4 44811800 */ mtc1 $at, $f3
/* 416C38 802A1EA8 44801000 */ mtc1 $zero, $f2
/* 416C3C 802A1EAC 46000021 */ cvt.d.s $f0, $f0
D_802A1EB0_7A9850:
/* 416C40 802A1EB0 46220080 */ add.d $f2, $f0, $f2
D_802A1EB4_7A9854:
/* 416C44 802A1EB4 46220002 */ mul.d $f0, $f0, $f2
/* 416C48 802A1EB8 00000000 */ nop
/* 416C4C 802A1EBC 46220002 */ mul.d $f0, $f0, $f2
/* 416C50 802A1EC0 00000000 */ nop
/* 416C54 802A1EC4 46200020 */ cvt.s.d $f0, $f0
/* 416C58 802A1EC8 080A87BB */ j D_802A1EEC_7A988C
/* 416C5C 802A1ECC E4400000 */ swc1 $f0, 0x0($v0)
.L802A1ED0_7A9870:
/* 416C60 802A1ED0 3C013E99 */ lui $at, (0x3E99999A >> 16)
/* 416C64 802A1ED4 3421999A */ ori $at, $at, (0x3E99999A & 0xFFFF)
/* 416C68 802A1ED8 44810000 */ mtc1 $at, $f0
/* 416C6C 802A1EDC 3C01802B */ lui $at, %hi(D_802AD004)
D_802A1EE0_7A9880:
/* 416C70 802A1EE0 A020D004 */ sb $zero, %lo(D_802AD004)($at)
/* 416C74 802A1EE4 3C01802B */ lui $at, %hi(D_802AD070)
/* 416C78 802A1EE8 E420D070 */ swc1 $f0, %lo(D_802AD070)($at)
D_802A1EEC_7A988C:
/* 416C7C 802A1EEC 3C02802B */ lui $v0, %hi(BattleMenu_NumOptions)
/* 416C80 802A1EF0 8C42D0AC */ lw $v0, %lo(BattleMenu_NumOptions)($v0)
/* 416C84 802A1EF4 3C01802B */ lui $at, %hi(BattleMenu_WheelAngle)
/* 416C88 802A1EF8 C438D06C */ lwc1 $f24, %lo(BattleMenu_WheelAngle)($at)
/* 416C8C 802A1EFC 1840008A */ blez $v0, .L802A2128_7A9AC8
/* 416C90 802A1F00 0000A02D */ daddu $s4, $zero, $zero
/* 416C94 802A1F04 3C118080 */ lui $s1, (0x80808081 >> 16)
/* 416C98 802A1F08 36318081 */ ori $s1, $s1, (0x80808081 & 0xFFFF)
glabel .L802A1F0C_7A98AC
/* 416C9C 802A1F0C 00151080 */ sll $v0, $s5, 2
D_802A1F10_7A98B0:
/* 416CA0 802A1F10 00551021 */ addu $v0, $v0, $s5
/* 416CA4 802A1F14 00021900 */ sll $v1, $v0, 4
/* 416CA8 802A1F18 00621823 */ subu $v1, $v1, $v0
/* 416CAC 802A1F1C 00031840 */ sll $v1, $v1, 1
/* 416CB0 802A1F20 00710018 */ mult $v1, $s1
/* 416CB4 802A1F24 4480A000 */ mtc1 $zero, $f20
/* 416CB8 802A1F28 0003B7C3 */ sra $s6, $v1, 31
/* 416CBC 802A1F2C 00151040 */ sll $v0, $s5, 1
D_802A1F30_7A98D0:
/* 416CC0 802A1F30 00558021 */ addu $s0, $v0, $s5
/* 416CC4 802A1F34 00004010 */ mfhi $t0
/* 416CC8 802A1F38 01031821 */ addu $v1, $t0, $v1
/* 416CCC 802A1F3C 000391C3 */ sra $s2, $v1, 7
.L802A1F40_7A98E0:
/* 416CD0 802A1F40 27A40020 */ addiu $a0, $sp, 0x20
/* 416CD4 802A1F44 3C0642AE */ lui $a2, (0x42AE0000 >> 16)
/* 416CD8 802A1F48 4407C000 */ mfc1 $a3, $f24
/* 416CDC 802A1F4C 27A50024 */ addiu $a1, $sp, 0x24
/* 416CE0 802A1F50 E7B40020 */ swc1 $f20, 0x20($sp)
/* 416CE4 802A1F54 0C00A7E7 */ jal add_vec2D_polar
/* 416CE8 802A1F58 E7B40024 */ swc1 $f20, 0x24($sp)
D_802A1F5C_7A98FC:
/* 416CEC 802A1F5C 00141080 */ sll $v0, $s4, 2
/* 416CF0 802A1F60 C7A00020 */ lwc1 $f0, 0x20($sp)
/* 416CF4 802A1F64 3C01802B */ lui $at, %hi(BattleMenu_BasePosX)
/* 416CF8 802A1F68 C422D060 */ lwc1 $f2, %lo(BattleMenu_BasePosX)($at)
D_802A1F6C_7A990C:
/* 416CFC 802A1F6C 468010A0 */ cvt.s.w $f2, $f2
/* 416D00 802A1F70 46001080 */ add.s $f2, $f2, $f0
/* 416D04 802A1F74 C7A40024 */ lwc1 $f4, 0x24($sp)
/* 416D08 802A1F78 3C01802B */ lui $at, %hi(BattleMenu_BasePosY)
/* 416D0C 802A1F7C C420D064 */ lwc1 $f0, %lo(BattleMenu_BasePosY)($at)
/* 416D10 802A1F80 46800020 */ cvt.s.w $f0, $f0
/* 416D14 802A1F84 46040000 */ add.s $f0, $f0, $f4
/* 416D18 802A1F88 3C13802B */ lui $s3, %hi(D_802AD028)
/* 416D1C 802A1F8C 02629821 */ addu $s3, $s3, $v0
/* 416D20 802A1F90 8E73D028 */ lw $s3, %lo(D_802AD028)($s3)
/* 416D24 802A1F94 4407A000 */ mfc1 $a3, $f20
/* 416D28 802A1F98 46000187 */ neg.s $f6, $f0
/* 416D2C 802A1F9C 44051000 */ mfc1 $a1, $f2
/* 416D30 802A1FA0 44063000 */ mfc1 $a2, $f6
/* 416D34 802A1FA4 0260202D */ daddu $a0, $s3, $zero
/* 416D38 802A1FA8 E7A00024 */ swc1 $f0, 0x24($sp)
/* 416D3C 802A1FAC 0C051461 */ jal hud_element_set_transform_pos
/* 416D40 802A1FB0 AFA50020 */ sw $a1, 0x20($sp)
.L802A1FB4_7A9954:
/* 416D44 802A1FB4 0260202D */ daddu $a0, $s3, $zero
.L802A1FB8_7A9958:
/* 416D48 802A1FB8 0000282D */ daddu $a1, $zero, $zero
/* 416D4C 802A1FBC 0C051261 */ jal hud_element_set_render_pos
/* 416D50 802A1FC0 00A0302D */ daddu $a2, $a1, $zero
/* 416D54 802A1FC4 0260202D */ daddu $a0, $s3, $zero
glabel .L802A1FC8_7A9968
/* 416D58 802A1FC8 0C0513AC */ jal hud_element_set_alpha
D_802A1FCC_7A996C:
/* 416D5C 802A1FCC 02562823 */ subu $a1, $s2, $s6
/* 416D60 802A1FD0 3C014260 */ lui $at, (0x42600000 >> 16)
/* 416D64 802A1FD4 44810000 */ mtc1 $at, $f0
/* 416D68 802A1FD8 00000000 */ nop
/* 416D6C 802A1FDC 4600C032 */ c.eq.s $f24, $f0
D_802A1FE0_7A9980:
/* 416D70 802A1FE0 3C053F80 */ lui $a1, (0x3F800000 >> 16)
/* 416D74 802A1FE4 45000005 */ bc1f D_802A1FFC_7A999C
glabel .L802A1FE8_7A9988
/* 416D78 802A1FE8 24020001 */ addiu $v0, $zero, 0x1
D_802A1FEC_7A998C:
/* 416D7C 802A1FEC 16E20003 */ bne $s7, $v0, D_802A1FFC_7A999C
/* 416D80 802A1FF0 00000000 */ nop
/* 416D84 802A1FF4 3C053FCC */ lui $a1, (0x3FCCCCCD >> 16)
/* 416D88 802A1FF8 34A5CCCD */ ori $a1, $a1, (0x3FCCCCCD & 0xFFFF)
D_802A1FFC_7A999C:
/* 416D8C 802A1FFC 0C051308 */ jal hud_element_set_scale
D_802A2000_7A99A0:
/* 416D90 802A2000 0260202D */ daddu $a0, $s3, $zero
/* 416D94 802A2004 0C05108E */ jal func_80144238
/* 416D98 802A2008 0260202D */ daddu $a0, $s3, $zero
D_802A200C_7A99AC:
/* 416D9C 802A200C 3C02802B */ lui $v0, %hi(BattleMenu_HomePos)
/* 416DA0 802A2010 8042D06B */ lb $v0, %lo(BattleMenu_HomePos)($v0)
/* 416DA4 802A2014 3C03802B */ lui $v1, %hi(BattleMenu_CurPos)
D_802A2018_7A99B8:
/* 416DA8 802A2018 8063D002 */ lb $v1, %lo(BattleMenu_CurPos)($v1)
/* 416DAC 802A201C 00431021 */ addu $v0, $v0, $v1
D_802A2020_7A99C0:
/* 416DB0 802A2020 5682003A */ bnel $s4, $v0, .L802A210C_7A9AAC
/* 416DB4 802A2024 26940001 */ addiu $s4, $s4, 0x1
/* 416DB8 802A2028 27A40020 */ addiu $a0, $sp, 0x20
D_802A202C_7A99CC:
/* 416DBC 802A202C 3C0642AE */ lui $a2, (0x42AE0000 >> 16)
/* 416DC0 802A2030 3C074260 */ lui $a3, (0x42600000 >> 16)
/* 416DC4 802A2034 27A50024 */ addiu $a1, $sp, 0x24
/* 416DC8 802A2038 AFA00020 */ sw $zero, 0x20($sp)
D_802A203C_7A99DC:
/* 416DCC 802A203C 0C00A7E7 */ jal add_vec2D_polar
glabel .L802A2040_7A99E0
/* 416DD0 802A2040 AFA00024 */ sw $zero, 0x24($sp)
/* 416DD4 802A2044 C7A00020 */ lwc1 $f0, 0x20($sp)
/* 416DD8 802A2048 3C01802B */ lui $at, %hi(BattleMenu_BasePosX)
.L802A204C_7A99EC:
/* 416DDC 802A204C C422D060 */ lwc1 $f2, %lo(BattleMenu_BasePosX)($at)
/* 416DE0 802A2050 468010A0 */ cvt.s.w $f2, $f2
.L802A2054_7A99F4:
/* 416DE4 802A2054 46001080 */ add.s $f2, $f2, $f0
/* 416DE8 802A2058 C7A40024 */ lwc1 $f4, 0x24($sp)
/* 416DEC 802A205C 3C01802B */ lui $at, %hi(BattleMenu_BasePosY)
/* 416DF0 802A2060 C420D064 */ lwc1 $f0, %lo(BattleMenu_BasePosY)($at)
/* 416DF4 802A2064 46800020 */ cvt.s.w $f0, $f0
/* 416DF8 802A2068 46040000 */ add.s $f0, $f0, $f4
/* 416DFC 802A206C 0000382D */ daddu $a3, $zero, $zero
/* 416E00 802A2070 3C13802B */ lui $s3, %hi(D_802AD040)
/* 416E04 802A2074 8E73D040 */ lw $s3, %lo(D_802AD040)($s3)
/* 416E08 802A2078 46000187 */ neg.s $f6, $f0
D_802A207C_7A9A1C:
/* 416E0C 802A207C 44051000 */ mfc1 $a1, $f2
glabel .L802A2080_7A9A20
/* 416E10 802A2080 44063000 */ mfc1 $a2, $f6
/* 416E14 802A2084 0260202D */ daddu $a0, $s3, $zero
/* 416E18 802A2088 E7A00024 */ swc1 $f0, 0x24($sp)
/* 416E1C 802A208C 0C051461 */ jal hud_element_set_transform_pos
D_802A2090_7A9A30:
/* 416E20 802A2090 AFA50020 */ sw $a1, 0x20($sp)
/* 416E24 802A2094 0260202D */ daddu $a0, $s3, $zero
/* 416E28 802A2098 0000282D */ daddu $a1, $zero, $zero
/* 416E2C 802A209C 0C051261 */ jal hud_element_set_render_pos
/* 416E30 802A20A0 00A0302D */ daddu $a2, $a1, $zero
/* 416E34 802A20A4 00102900 */ sll $a1, $s0, 4
/* 416E38 802A20A8 00B02823 */ subu $a1, $a1, $s0
/* 416E3C 802A20AC 00052880 */ sll $a1, $a1, 2
/* 416E40 802A20B0 00B10018 */ mult $a1, $s1
.L802A20B4_7A9A54:
/* 416E44 802A20B4 0260202D */ daddu $a0, $s3, $zero
/* 416E48 802A20B8 00004010 */ mfhi $t0
/* 416E4C 802A20BC 01051021 */ addu $v0, $t0, $a1
.L802A20C0_7A9A60:
/* 416E50 802A20C0 000211C3 */ sra $v0, $v0, 7
/* 416E54 802A20C4 00052FC3 */ sra $a1, $a1, 31
.L802A20C8_7A9A68:
/* 416E58 802A20C8 0C0513AC */ jal hud_element_set_alpha
D_802A20CC_7A9A6C:
/* 416E5C 802A20CC 00452823 */ subu $a1, $v0, $a1
D_802A20D0_7A9A70:
/* 416E60 802A20D0 3C053F99 */ lui $a1, (0x3F99999A >> 16)
/* 416E64 802A20D4 34A5999A */ ori $a1, $a1, (0x3F99999A & 0xFFFF)
/* 416E68 802A20D8 0C051308 */ jal hud_element_set_scale
/* 416E6C 802A20DC 0260202D */ daddu $a0, $s3, $zero
/* 416E70 802A20E0 16E00005 */ bnez $s7, .L802A20F8_7A9A98
/* 416E74 802A20E4 0260202D */ daddu $a0, $s3, $zero
/* 416E78 802A20E8 0C051280 */ jal hud_element_set_flags
/* 416E7C 802A20EC 24050002 */ addiu $a1, $zero, 0x2
/* 416E80 802A20F0 080A8840 */ j .L802A2100_7A9AA0
D_802A20F4_7A9A94:
/* 416E84 802A20F4 00000000 */ nop
.L802A20F8_7A9A98:
/* 416E88 802A20F8 0C05128B */ jal hud_element_clear_flags
D_802A20FC_7A9A9C:
/* 416E8C 802A20FC 24050002 */ addiu $a1, $zero, 0x2
.L802A2100_7A9AA0:
/* 416E90 802A2100 0C05108E */ jal func_80144238
.L802A2104_7A9AA4:
/* 416E94 802A2104 0260202D */ daddu $a0, $s3, $zero
/* 416E98 802A2108 26940001 */ addiu $s4, $s4, 0x1
.L802A210C_7A9AAC:
/* 416E9C 802A210C 3C02802B */ lui $v0, %hi(BattleMenu_NumOptions)
D_802A2110_7A9AB0:
/* 416EA0 802A2110 8C42D0AC */ lw $v0, %lo(BattleMenu_NumOptions)($v0)
/* 416EA4 802A2114 3C0141E0 */ lui $at, (0x41E00000 >> 16)
.L802A2118_7A9AB8:
/* 416EA8 802A2118 44810000 */ mtc1 $at, $f0
/* 416EAC 802A211C 0282102A */ slt $v0, $s4, $v0
D_802A2120_7A9AC0:
/* 416EB0 802A2120 1440FF87 */ bnez $v0, .L802A1F40_7A98E0
/* 416EB4 802A2124 4600C600 */ add.s $f24, $f24, $f0
.L802A2128_7A9AC8:
/* 416EB8 802A2128 3C11802B */ lui $s1, %hi(D_802AD100)
/* 416EBC 802A212C 2631D100 */ addiu $s1, $s1, %lo(D_802AD100)
D_802A2130_7A9AD0:
/* 416EC0 802A2130 3C10802B */ lui $s0, %hi(BattleMenu_CurPos)
/* 416EC4 802A2134 2610D002 */ addiu $s0, $s0, %lo(BattleMenu_CurPos)
/* 416EC8 802A2138 82030000 */ lb $v1, 0x0($s0)
.L802A213C_7A9ADC:
/* 416ECC 802A213C 8E220000 */ lw $v0, 0x0($s1)
/* 416ED0 802A2140 3C01802B */ lui $at, %hi(BattleMenu_WheelAngle)
/* 416ED4 802A2144 C420D06C */ lwc1 $f0, %lo(BattleMenu_WheelAngle)($at)
/* 416ED8 802A2148 00431023 */ subu $v0, $v0, $v1
/* 416EDC 802A214C 000218C0 */ sll $v1, $v0, 3
D_802A2150_7A9AF0:
/* 416EE0 802A2150 00621823 */ subu $v1, $v1, $v0
/* 416EE4 802A2154 00031880 */ sll $v1, $v1, 2
D_802A2158_7A9AF8:
/* 416EE8 802A2158 4483C000 */ mtc1 $v1, $f24
/* 416EEC 802A215C 00000000 */ nop
/* 416EF0 802A2160 4680C620 */ cvt.s.w $f24, $f24
/* 416EF4 802A2164 46180001 */ sub.s $f0, $f0, $f24
/* 416EF8 802A2168 3C01802B */ lui $at, %hi(D_802AB7F0_7B3190)
/* 416EFC 802A216C D43AB7F0 */ ldc1 $f26, %lo(D_802AB7F0_7B3190)($at)
D_802A2170_7A9B10:
/* 416F00 802A2170 46000021 */ cvt.d.s $f0, $f0
/* 416F04 802A2174 463A0002 */ mul.d $f0, $f0, $f26
/* 416F08 802A2178 00000000 */ nop
/* 416F0C 802A217C 3C01802B */ lui $at, %hi(D_802AB7F8_7B3198)
.L802A2180_7A9B20:
/* 416F10 802A2180 D424B7F8 */ ldc1 $f4, %lo(D_802AB7F8_7B3198)($at)
D_802A2184_7A9B24:
/* 416F14 802A2184 46200020 */ cvt.s.d $f0, $f0
D_802A2188_7A9B28:
/* 416F18 802A2188 46000005 */ abs.s $f0, $f0
/* 416F1C 802A218C 46000021 */ cvt.d.s $f0, $f0
D_802A2190_7A9B30:
/* 416F20 802A2190 46240001 */ sub.d $f0, $f0, $f4
/* 416F24 802A2194 3C01802B */ lui $at, %hi(D_802AB800_7B31A0)
D_802A2198_7A9B38:
/* 416F28 802A2198 D422B800 */ ldc1 $f2, %lo(D_802AB800_7B31A0)($at)
glabel .L802A219C_7A9B3C
/* 416F2C 802A219C 46200020 */ cvt.s.d $f0, $f0
D_802A21A0_7A9B40:
/* 416F30 802A21A0 46000005 */ abs.s $f0, $f0
/* 416F34 802A21A4 46000021 */ cvt.d.s $f0, $f0
/* 416F38 802A21A8 46240003 */ div.d $f0, $f0, $f4
/* 416F3C 802A21AC 46220000 */ add.d $f0, $f0, $f2
/* 416F40 802A21B0 12E00003 */ beqz $s7, .L802A21C0_7A9B60
/* 416F44 802A21B4 46200620 */ cvt.s.d $f24, $f0
/* 416F48 802A21B8 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 416F4C 802A21BC 4481C000 */ mtc1 $at, $f24
.L802A21C0_7A9B60:
/* 416F50 802A21C0 0000282D */ daddu $a1, $zero, $zero
.L802A21C4_7A9B64:
/* 416F54 802A21C4 00A0302D */ daddu $a2, $a1, $zero
/* 416F58 802A21C8 3C1E8080 */ lui $fp, (0x80808081 >> 16)
/* 416F5C 802A21CC 37DE8081 */ ori $fp, $fp, (0x80808081 & 0xFFFF)
/* 416F60 802A21D0 3C13802B */ lui $s3, %hi(D_802AD04C)
D_802A21D4_7A9B74:
/* 416F64 802A21D4 8E73D04C */ lw $s3, %lo(D_802AD04C)($s3)
D_802A21D8_7A9B78:
/* 416F68 802A21D8 4480A000 */ mtc1 $zero, $f20
/* 416F6C 802A21DC 0C05149D */ jal hud_element_set_transform_rotation_pivot
/* 416F70 802A21E0 0260202D */ daddu $a0, $s3, $zero
.L802A21E4_7A9B84:
/* 416F74 802A21E4 4405A000 */ mfc1 $a1, $f20
/* 416F78 802A21E8 4406A000 */ mfc1 $a2, $f20
/* 416F7C 802A21EC 3C07C22C */ lui $a3, (0xC22C0000 >> 16)
D_802A21F0_7A9B90:
/* 416F80 802A21F0 0C051489 */ jal hud_element_set_transform_rotation
/* 416F84 802A21F4 0260202D */ daddu $a0, $s3, $zero
glabel .L802A21F8_7A9B98
/* 416F88 802A21F8 4405C000 */ mfc1 $a1, $f24
/* 416F8C 802A21FC 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 416F90 802A2200 4481B000 */ mtc1 $at, $f22
/* 416F94 802A2204 0C051308 */ jal hud_element_set_scale
/* 416F98 802A2208 0260202D */ daddu $a0, $s3, $zero
/* 416F9C 802A220C 4405B000 */ mfc1 $a1, $f22
/* 416FA0 802A2210 3C063FE6 */ lui $a2, (0x3FE66666 >> 16)
/* 416FA4 802A2214 34C66666 */ ori $a2, $a2, (0x3FE66666 & 0xFFFF)
/* 416FA8 802A2218 4407B000 */ mfc1 $a3, $f22
/* 416FAC 802A221C 0C051475 */ jal hud_element_set_transform_scale
/* 416FB0 802A2220 0260202D */ daddu $a0, $s3, $zero
/* 416FB4 802A2224 00151040 */ sll $v0, $s5, 1
/* 416FB8 802A2228 0055B021 */ addu $s6, $v0, $s5
D_802A222C_7A9BCC:
/* 416FBC 802A222C 001628C0 */ sll $a1, $s6, 3
D_802A2230_7A9BD0:
/* 416FC0 802A2230 00B52821 */ addu $a1, $a1, $s5
/* 416FC4 802A2234 000528C0 */ sll $a1, $a1, 3
/* 416FC8 802A2238 00BE0018 */ mult $a1, $fp
.L802A223C_7A9BDC:
/* 416FCC 802A223C 0260202D */ daddu $a0, $s3, $zero
/* 416FD0 802A2240 00004010 */ mfhi $t0
/* 416FD4 802A2244 01051021 */ addu $v0, $t0, $a1
/* 416FD8 802A2248 000211C3 */ sra $v0, $v0, 7
/* 416FDC 802A224C 00052FC3 */ sra $a1, $a1, 31
.L802A2250_7A9BF0:
/* 416FE0 802A2250 0C0513AC */ jal hud_element_set_alpha
/* 416FE4 802A2254 00452823 */ subu $a1, $v0, $a1
/* 416FE8 802A2258 0260202D */ daddu $a0, $s3, $zero
/* 416FEC 802A225C 2405004F */ addiu $a1, $zero, 0x4F
D_802A2260_7A9C00:
/* 416FF0 802A2260 0C051261 */ jal hud_element_set_render_pos
/* 416FF4 802A2264 240600B0 */ addiu $a2, $zero, 0xB0
/* 416FF8 802A2268 0C05108E */ jal func_80144238
/* 416FFC 802A226C 0260202D */ daddu $a0, $s3, $zero
/* 417000 802A2270 82030000 */ lb $v1, 0x0($s0)
/* 417004 802A2274 8E220000 */ lw $v0, 0x0($s1)
/* 417008 802A2278 3C01802B */ lui $at, %hi(BattleMenu_WheelAngle)
D_802A227C_7A9C1C:
/* 41700C 802A227C C420D06C */ lwc1 $f0, %lo(BattleMenu_WheelAngle)($at)
D_802A2280_7A9C20:
/* 417010 802A2280 00431023 */ subu $v0, $v0, $v1
/* 417014 802A2284 000218C0 */ sll $v1, $v0, 3
/* 417018 802A2288 00621823 */ subu $v1, $v1, $v0
/* 41701C 802A228C 00031880 */ sll $v1, $v1, 2
/* 417020 802A2290 4483C000 */ mtc1 $v1, $f24
/* 417024 802A2294 00000000 */ nop
/* 417028 802A2298 4680C620 */ cvt.s.w $f24, $f24
D_802A229C_7A9C3C:
/* 41702C 802A229C 46180001 */ sub.s $f0, $f0, $f24
/* 417030 802A22A0 46000021 */ cvt.d.s $f0, $f0
/* 417034 802A22A4 463A0002 */ mul.d $f0, $f0, $f26
/* 417038 802A22A8 00000000 */ nop
D_802A22AC_7A9C4C:
/* 41703C 802A22AC 4405A000 */ mfc1 $a1, $f20
.L802A22B0_7A9C50:
/* 417040 802A22B0 3C13802B */ lui $s3, %hi(D_802AD048)
/* 417044 802A22B4 8E73D048 */ lw $s3, %lo(D_802AD048)($s3)
/* 417048 802A22B8 00A0302D */ daddu $a2, $a1, $zero
D_802A22BC_7A9C5C:
/* 41704C 802A22BC 46200620 */ cvt.s.d $f24, $f0
/* 417050 802A22C0 4600C607 */ neg.s $f24, $f24
.L802A22C4_7A9C64:
/* 417054 802A22C4 4407C000 */ mfc1 $a3, $f24
/* 417058 802A22C8 0C051489 */ jal hud_element_set_transform_rotation
/* 41705C 802A22CC 0260202D */ daddu $a0, $s3, $zero
/* 417060 802A22D0 0260202D */ daddu $a0, $s3, $zero
/* 417064 802A22D4 24050012 */ addiu $a1, $zero, 0x12
/* 417068 802A22D8 0C05149D */ jal hud_element_set_transform_rotation_pivot
/* 41706C 802A22DC 2406FFEC */ addiu $a2, $zero, -0x14
/* 417070 802A22E0 3C053F73 */ lui $a1, (0x3F733333 >> 16)
/* 417074 802A22E4 34A53333 */ ori $a1, $a1, (0x3F733333 & 0xFFFF)
/* 417078 802A22E8 0C051308 */ jal hud_element_set_scale
/* 41707C 802A22EC 0260202D */ daddu $a0, $s3, $zero
/* 417080 802A22F0 001511C0 */ sll $v0, $s5, 7
/* 417084 802A22F4 00551023 */ subu $v0, $v0, $s5
/* 417088 802A22F8 00021040 */ sll $v0, $v0, 1
/* 41708C 802A22FC 005E0018 */ mult $v0, $fp
/* 417090 802A2300 0000A02D */ daddu $s4, $zero, $zero
/* 417094 802A2304 0260202D */ daddu $a0, $s3, $zero
/* 417098 802A2308 00004010 */ mfhi $t0
/* 41709C 802A230C 01028021 */ addu $s0, $t0, $v0
/* 4170A0 802A2310 001081C3 */ sra $s0, $s0, 7
/* 4170A4 802A2314 000217C3 */ sra $v0, $v0, 31
/* 4170A8 802A2318 02028023 */ subu $s0, $s0, $v0
/* 4170AC 802A231C 0C0513AC */ jal hud_element_set_alpha
/* 4170B0 802A2320 0200282D */ daddu $a1, $s0, $zero
/* 4170B4 802A2324 0260202D */ daddu $a0, $s3, $zero
/* 4170B8 802A2328 3C11802B */ lui $s1, %hi(D_802AD00A)
/* 4170BC 802A232C 2631D00A */ addiu $s1, $s1, %lo(D_802AD00A)
/* 4170C0 802A2330 86260000 */ lh $a2, 0x0($s1)
/* 4170C4 802A2334 24120028 */ addiu $s2, $zero, 0x28
/* 4170C8 802A2338 02462823 */ subu $a1, $s2, $a2
D_802A233C_7A9CDC:
/* 4170CC 802A233C 0C051261 */ jal hud_element_set_render_pos
/* 4170D0 802A2340 24C600D4 */ addiu $a2, $a2, 0xD4
/* 4170D4 802A2344 0C05108E */ jal func_80144238
/* 4170D8 802A2348 0260202D */ daddu $a0, $s3, $zero
/* 4170DC 802A234C 3C13802B */ lui $s3, %hi(D_802AD044)
/* 4170E0 802A2350 8E73D044 */ lw $s3, %lo(D_802AD044)($s3)
/* 4170E4 802A2354 0200282D */ daddu $a1, $s0, $zero
/* 4170E8 802A2358 0C0513AC */ jal hud_element_set_alpha
/* 4170EC 802A235C 0260202D */ daddu $a0, $s3, $zero
/* 4170F0 802A2360 86260000 */ lh $a2, 0x0($s1)
/* 4170F4 802A2364 0260202D */ daddu $a0, $s3, $zero
/* 4170F8 802A2368 02462823 */ subu $a1, $s2, $a2
/* 4170FC 802A236C 0C051261 */ jal hud_element_set_render_pos
D_802A2370_7A9D10:
/* 417100 802A2370 24C600D4 */ addiu $a2, $a2, 0xD4
/* 417104 802A2374 4405B000 */ mfc1 $a1, $f22
/* 417108 802A2378 0C051308 */ jal hud_element_set_scale
/* 41710C 802A237C 0260202D */ daddu $a0, $s3, $zero
/* 417110 802A2380 0C05108E */ jal func_80144238
D_802A2384_7A9D24:
/* 417114 802A2384 0260202D */ daddu $a0, $s3, $zero
/* 417118 802A2388 3C02802B */ lui $v0, %hi(BattleMenu_NumOptions)
/* 41711C 802A238C 8C42D0AC */ lw $v0, %lo(BattleMenu_NumOptions)($v0)
D_802A2390_7A9D30:
/* 417120 802A2390 3C01802B */ lui $at, %hi(BattleMenu_WheelAngle)
/* 417124 802A2394 C438D06C */ lwc1 $f24, %lo(BattleMenu_WheelAngle)($at)
/* 417128 802A2398 1840004D */ blez $v0, .L802A24D0_7A9E70
/* 41712C 802A239C 00161100 */ sll $v0, $s6, 4
.L802A23A0_7A9D40:
/* 417130 802A23A0 00561023 */ subu $v0, $v0, $s6
/* 417134 802A23A4 00021080 */ sll $v0, $v0, 2
/* 417138 802A23A8 005E0018 */ mult $v0, $fp
D_802A23AC_7A9D4C:
/* 41713C 802A23AC 24160018 */ addiu $s6, $zero, 0x18
/* 417140 802A23B0 000247C3 */ sra $t0, $v0, 31
/* 417144 802A23B4 AFA80028 */ sw $t0, 0x28($sp)
.L802A23B8_7A9D58:
/* 417148 802A23B8 3C12802B */ lui $s2, %hi(D_802AD010)
D_802A23BC_7A9D5C:
/* 41714C 802A23BC 2652D010 */ addiu $s2, $s2, %lo(D_802AD010)
/* 417150 802A23C0 00004010 */ mfhi $t0
.L802A23C4_7A9D64:
/* 417154 802A23C4 01021021 */ addu $v0, $t0, $v0
.L802A23C8_7A9D68:
/* 417158 802A23C8 0002F1C3 */ sra $fp, $v0, 7
.L802A23CC_7A9D6C:
/* 41715C 802A23CC 27A40020 */ addiu $a0, $sp, 0x20
/* 417160 802A23D0 3C0642AE */ lui $a2, (0x42AE0000 >> 16)
D_802A23D4_7A9D74:
/* 417164 802A23D4 4407C000 */ mfc1 $a3, $f24
D_802A23D8_7A9D78:
/* 417168 802A23D8 27A50024 */ addiu $a1, $sp, 0x24
/* 41716C 802A23DC AFA00020 */ sw $zero, 0x20($sp)
/* 417170 802A23E0 0C00A7E7 */ jal add_vec2D_polar
/* 417174 802A23E4 AFA00024 */ sw $zero, 0x24($sp)
D_802A23E8_7A9D88:
/* 417178 802A23E8 0000202D */ daddu $a0, $zero, $zero
.L802A23EC_7A9D8C:
/* 41717C 802A23EC 0080282D */ daddu $a1, $a0, $zero
/* 417180 802A23F0 0080302D */ daddu $a2, $a0, $zero
/* 417184 802A23F4 C7A00020 */ lwc1 $f0, 0x20($sp)
/* 417188 802A23F8 3C01802B */ lui $at, %hi(BattleMenu_BasePosX)
/* 41718C 802A23FC C424D060 */ lwc1 $f4, %lo(BattleMenu_BasePosX)($at)
/* 417190 802A2400 46802120 */ cvt.s.w $f4, $f4
/* 417194 802A2404 46002100 */ add.s $f4, $f4, $f0
/* 417198 802A2408 C7A20024 */ lwc1 $f2, 0x24($sp)
/* 41719C 802A240C 3C01802B */ lui $at, (0x802B0000 >> 16)
### DECOMPILED C INSTRUCTIONS:
void btl_main_menu_draw(void) {
s32 id;
s32 opacity;
f32 theta;
s32 cond;
f32 x, y;
f32 scale;
s32 i;
s32 l, t;
switch (BattleMenuState) {
case BTL_MENU_STATE_UNK_1:
func_80144218(-1);
id = D_802AD048;
hud_element_set_transform_rotation(id, 0.0f, 0.0f, 0.0f);
hud_element_set_alpha(id, (D_802AD006 * 254) / 255);
hud_element_set_render_pos(id, 3940 - D_802AD00A, D_802AD00A + 212);
func_80144238(id);
id = D_802AD044;
hud_element_set_alpha(id, (D_802AD006 * 254) / 255);
hud_element_set_render_pos(id, 40 - D_802AD00A, D_802AD00A + 212);
func_80144238(id);
break;
case BTL_MENU_STATE_OPENED_SUBMENU:
case BTL_MENU_STATE_ACCEPT_INPUT:
case BTL_MENU_STATE_UNK_A:
case BTL_MENU_STATE_UNK_14:
case BTL_MENU_STATE_UNK_1E:
opacity = (D_802AD006 * BattleMenuAlpha) / 255;
func_80144218(-1);
theta = (D_802AD100 - BattleMenu_CurPos) * 28;
cond = FALSE;
if (BattleMenu_WheelAngle > theta) {
BattleMenu_WheelAngle -= D_802AD070;
if (BattleMenu_WheelAngle < theta) {
BattleMenu_WheelAngle = theta;
cond = TRUE;
}
} else if (BattleMenu_WheelAngle < theta) {
BattleMenu_WheelAngle += D_802AD070;
if (BattleMenu_WheelAngle > theta) {
BattleMenu_WheelAngle = theta;
cond = TRUE;
}
} else {
cond = TRUE;
}
if (!cond) {
D_802AD070 = (D_802AD070 * (D_802AD070 + 1.0) * (D_802AD070 + 1.0));
} else {
D_802AD004 = 0;
D_802AD070 = 0.3f;
}
theta = BattleMenu_WheelAngle;
for (i = 0; i < BattleMenu_NumOptions; i++, theta += 28.0f) {
x = 0.0f;
y = 0.0f;
add_vec2D_polar(&x, &y, 87.0f, theta);
id = D_802AD028[i];
x = BattleMenu_BasePosX + x;
y = BattleMenu_BasePosY + y;
hud_element_set_transform_pos(id, x, -y, 0.0f);
hud_element_set_render_pos(id, 0, 0);
hud_element_set_alpha(id, (opacity * 150) / 255);
if (theta == 56.0f && cond == TRUE) {
hud_element_set_scale(id, 1.6f);
} else {
hud_element_set_scale(id, 1.0f);
}
func_80144238(id);
if (i == BattleMenu_HomePos + BattleMenu_CurPos) {
x = 0.0f;
y = 0.0f;
add_vec2D_polar(&x, &y, 87.0f, 56.0f);
x = BattleMenu_BasePosX + x;
y = BattleMenu_BasePosY + y;
id = D_802AD040;
hud_element_set_transform_pos(id, x, -y, 0.0f);
hud_element_set_render_pos(id, 0, 0);
hud_element_set_alpha(id, (opacity * 180) / 255);
hud_element_set_scale(id, 1.2f);
if (!cond) {
hud_element_set_flags(id, HUD_ELEMENT_FLAG_DISABLED);
} else {
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
func_80144238(id);
}
}
theta = (D_802AD100 - BattleMenu_CurPos) * 28;
scale = (fabsf(fabsf((BattleMenu_WheelAngle - theta) * (45.0 / 28.0)) - 22.5) / 22.5) + 0.01;
if (cond) {
scale = 1.0f;
}
id = D_802AD04C;
hud_element_set_transform_rotation_pivot(id, 0, 0);
hud_element_set_transform_rotation(id, 0.0f, 0.0f, -43.0f);
hud_element_set_scale(id, scale);
hud_element_set_transform_scale(id, 1.0f, 1.8f, 1.0f);
hud_element_set_alpha(id, (opacity * 200) / 255);
hud_element_set_render_pos(id, 79, 176);
func_80144238(id);
id = D_802AD048;
theta = (D_802AD100 - BattleMenu_CurPos) * 28;
scale = (BattleMenu_WheelAngle - theta) * (45.0 / 28.0);
hud_element_set_transform_rotation(id, 0.0f, 0.0f, -scale);
hud_element_set_transform_rotation_pivot(id, 18, -20);
hud_element_set_scale(id, 0.95f);
hud_element_set_alpha(id, (opacity * 254) / 255);
hud_element_set_render_pos(id, 40 - D_802AD00A, D_802AD00A + 212);
func_80144238(id);
id = D_802AD044;
hud_element_set_alpha(id, (opacity * 254) / 255);
hud_element_set_render_pos(id, 40 - D_802AD00A, D_802AD00A + 212);
hud_element_set_scale(id, 1.0f);
func_80144238(id);
theta = BattleMenu_WheelAngle;
for (i = 0; i < BattleMenu_NumOptions; i++, theta += 28.0f) {
x = 0.0f;
y = 0.0f;
add_vec2D_polar(&x, &y, 87.0f, theta);
l = x = BattleMenu_BasePosX + x;
t = y = BattleMenu_BasePosY + y;
btl_draw_prim_quad(0, 0, 0, 0, l - 12, t - 12, 24, 24);
id = D_802AD010[i];
hud_element_set_render_pos(id, l, t);
hud_element_set_alpha(id, (opacity * 180) / 255);
if (i == BattleMenu_HomePos + BattleMenu_CurPos) {
hud_element_set_alpha(id, opacity);
}
hud_element_draw_clipped(id);
}
if (cond) {
l = BattleMenu_BasePosX + 20;
t = BattleMenu_BasePosY - 34;
btl_draw_prim_quad(0, 0, 0, 0, l + 26, t, 48, 16);
draw_msg(BattleMenu_TitleMessages[BattleMenu_CurPos + BattleMenu_HomePos], l, t, opacity, MSG_PAL_35, 0);
}
if ((gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE) || (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE)) {
BattleMenu_ShowSwapIcons = FALSE;
}
if (BattleMenu_ShowSwapIcons) {
id = D_802AD05C;
hud_element_set_alpha(id, (opacity * 200) / 255);
hud_element_draw_clipped(id);
id = D_802AD050;
hud_element_set_alpha(id, opacity);
hud_element_draw_clipped(id);
id = D_802AD054;
hud_element_set_alpha(id, opacity);
hud_element_draw_clipped(id);
id = D_802AD058;
hud_element_set_alpha(id, opacity);
hud_element_draw_clipped(id);
}
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_80244008
/* 1728E8 80244008 27BDFFB0 */ addiu $sp, $sp, -0x50
.L8024400C:
/* 1728EC 8024400C AFB30024 */ sw $s3, 0x24($sp)
D_80244010:
/* 1728F0 80244010 3C13800E */ lui $s3, %hi(gBattleStatus)
/* 1728F4 80244014 2673C070 */ addiu $s3, $s3, %lo(gBattleStatus)
D_80244018:
/* 1728F8 80244018 AFB60030 */ sw $s6, 0x30($sp)
D_8024401C:
/* 1728FC 8024401C 3C16800B */ lui $s6, %hi(gCurrentEncounter)
D_80244020:
/* 172900 80244020 26D60F10 */ addiu $s6, $s6, %lo(gCurrentEncounter)
/* 172904 80244024 AFB5002C */ sw $s5, 0x2C($sp)
D_80244028:
/* 172908 80244028 3C158011 */ lui $s5, %hi(gPlayerData)
D_8024402C:
/* 17290C 8024402C 26B5F290 */ addiu $s5, $s5, %lo(gPlayerData)
D_80244030:
/* 172910 80244030 AFB20020 */ sw $s2, 0x20($sp)
.L80244034:
/* 172914 80244034 3C12800E */ lui $s2, %hi(gBattleSubState)
D_80244038:
/* 172918 80244038 2652C4DC */ addiu $s2, $s2, %lo(gBattleSubState)
arn_04_pad_403C:
/* 17291C 8024403C AFBF0034 */ sw $ra, 0x34($sp)
D_80244040:
/* 172920 80244040 AFB40028 */ sw $s4, 0x28($sp)
.L80244044:
/* 172924 80244044 AFB1001C */ sw $s1, 0x1C($sp)
/* 172928 80244048 AFB00018 */ sw $s0, 0x18($sp)
D_8024404C:
/* 17292C 8024404C F7B80048 */ sdc1 $f24, 0x48($sp)
D_80244050:
/* 172930 80244050 F7B60040 */ sdc1 $f22, 0x40($sp)
D_80244054:
/* 172934 80244054 F7B40038 */ sdc1 $f20, 0x38($sp)
D_80244058:
/* 172938 80244058 8E7100D8 */ lw $s1, 0xD8($s3)
/* 17293C 8024405C 8E430000 */ lw $v1, 0x0($s2)
glabel func_80244060
/* 172940 80244060 8E7000DC */ lw $s0, 0xDC($s3)
.L80244064:
/* 172944 80244064 10600005 */ beqz $v1, .L8024407C
.L80244068:
/* 172948 80244068 24020001 */ addiu $v0, $zero, 0x1
flo_10_pad_406C:
/* 17294C 8024406C 10620024 */ beq $v1, $v0, D_80244100
dead_flo_16_SFlyingAI_JumpVels:
/* 172950 80244070 24020005 */ addiu $v0, $zero, 0x5
D_80244074:
/* 172954 80244074 0809104B */ j D_8024412C
glabel func_80244078
/* 172958 80244078 00000000 */ nop
.L8024407C:
/* 17295C 8024407C 3C03F3FF */ lui $v1, (0xF3FFFFFF >> 16)
/* 172960 80244080 8E220000 */ lw $v0, 0x0($s1)
flo_10_pad_4084:
/* 172964 80244084 3463FFFF */ ori $v1, $v1, (0xF3FFFFFF & 0xFFFF)
/* 172968 80244088 00431024 */ and $v0, $v0, $v1
D_8024408C:
/* 17296C 8024408C 12000004 */ beqz $s0, .L802440A0
D_80244090:
/* 172970 80244090 AE220000 */ sw $v0, 0x0($s1)
/* 172974 80244094 8E020000 */ lw $v0, 0x0($s0)
/* 172978 80244098 00431024 */ and $v0, $v0, $v1
/* 17297C 8024409C AE020000 */ sw $v0, 0x0($s0)
.L802440A0:
/* 172980 802440A0 8262009A */ lb $v0, 0x9A($s3)
.L802440A4:
/* 172984 802440A4 14400003 */ bnez $v0, .L802440B4
.L802440A8:
/* 172988 802440A8 A260008C */ sb $zero, 0x8C($s3)
/* 17298C 802440AC 08091046 */ j .L80244118
/* 172990 802440B0 24020005 */ addiu $v0, $zero, 0x5
.L802440B4:
/* 172994 802440B4 18400003 */ blez $v0, .L802440C4
.L802440B8:
/* 172998 802440B8 24020001 */ addiu $v0, $zero, 0x1
D_802440BC:
/* 17299C 802440BC 3C01802A */ lui $at, %hi(D_8029F254)
/* 1729A0 802440C0 AC22F254 */ sw $v0, %lo(D_8029F254)($at)
.L802440C4:
/* 1729A4 802440C4 2405000A */ addiu $a1, $zero, 0xA
D_802440C8:
/* 1729A8 802440C8 2402000C */ addiu $v0, $zero, 0xC
/* 1729AC 802440CC A26201A7 */ sb $v0, 0x1A7($s3)
glabel func_802440D0
/* 1729B0 802440D0 8E0401CC */ lw $a0, 0x1CC($s0)
.L802440D4:
/* 1729B4 802440D4 0C0B0CF8 */ jal start_script
D_802440D8:
/* 1729B8 802440D8 0000302D */ daddu $a2, $zero, $zero
D_802440DC:
/* 1729BC 802440DC 0040202D */ daddu $a0, $v0, $zero
D_802440E0:
/* 1729C0 802440E0 AE0401DC */ sw $a0, 0x1DC($s0)
D_802440E4:
/* 1729C4 802440E4 8C830144 */ lw $v1, 0x144($a0)
glabel func_802440E8
/* 1729C8 802440E8 24020001 */ addiu $v0, $zero, 0x1
D_802440EC:
/* 1729CC 802440EC AE420000 */ sw $v0, 0x0($s2)
D_802440F0:
/* 1729D0 802440F0 24020100 */ addiu $v0, $zero, 0x100
D_802440F4:
/* 1729D4 802440F4 AE0301EC */ sw $v1, 0x1EC($s0)
D_802440F8:
/* 1729D8 802440F8 08091047 */ j D_8024411C
D_802440FC:
/* 1729DC 802440FC AC820148 */ sw $v0, 0x148($a0)
D_80244100:
/* 1729E0 80244100 8E0401EC */ lw $a0, 0x1EC($s0)
D_80244104:
/* 1729E4 80244104 0C0B1059 */ jal does_script_exist
/* 1729E8 80244108 00000000 */ nop
/* 1729EC 8024410C 14400003 */ bnez $v0, D_8024411C
/* 1729F0 80244110 24020005 */ addiu $v0, $zero, 0x5
/* 1729F4 80244114 A260009A */ sb $zero, 0x9A($s3)
.L80244118:
/* 1729F8 80244118 AE420000 */ sw $v0, 0x0($s2)
D_8024411C:
/* 1729FC 8024411C 3C12800E */ lui $s2, %hi(gBattleSubState)
/* 172A00 80244120 2652C4DC */ addiu $s2, $s2, %lo(gBattleSubState)
/* 172A04 80244124 8E430000 */ lw $v1, 0x0($s2)
/* 172A08 80244128 24020005 */ addiu $v0, $zero, 0x5
D_8024412C:
/* 172A0C 8024412C 10620005 */ beq $v1, $v0, D_80244144
D_80244130:
/* 172A10 80244130 2402000A */ addiu $v0, $zero, 0xA
.L80244134:
/* 172A14 80244134 10620040 */ beq $v1, $v0, .L80244238
D_80244138:
/* 172A18 80244138 00000000 */ nop
.L8024413C:
/* 172A1C 8024413C 080910A3 */ j .L8024428C
jtbl_80244140:
/* 172A20 80244140 00000000 */ nop
D_80244144:
/* 172A24 80244144 3C03F3FF */ lui $v1, (0xF3FFFFFF >> 16)
.L80244148:
/* 172A28 80244148 8E220000 */ lw $v0, 0x0($s1)
D_8024414C:
/* 172A2C 8024414C 3463FFFF */ ori $v1, $v1, (0xF3FFFFFF & 0xFFFF)
D_80244150:
/* 172A30 80244150 00431024 */ and $v0, $v0, $v1
dead_kzn_17_varStash:
/* 172A34 80244154 12000004 */ beqz $s0, .L80244168
D_80244158:
/* 172A38 80244158 AE220000 */ sw $v0, 0x0($s1)
/* 172A3C 8024415C 8E020000 */ lw $v0, 0x0($s0)
D_80244160_ED8380:
/* 172A40 80244160 00431024 */ and $v0, $v0, $v1
/* 172A44 80244164 AE020000 */ sw $v0, 0x0($s0)
.L80244168:
/* 172A48 80244168 2402000B */ addiu $v0, $zero, 0xB
.L8024416C:
/* 172A4C 8024416C 3C05800E */ lui $a1, %hi(gBattleStatus)
D_80244170:
/* 172A50 80244170 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus)
D_80244174:
/* 172A54 80244174 2403FFFD */ addiu $v1, $zero, -0x3
.L80244178:
/* 172A58 80244178 2406FFF7 */ addiu $a2, $zero, -0x9
D_8024417C:
/* 172A5C 8024417C AE420000 */ sw $v0, 0x0($s2)
D_80244180:
/* 172A60 80244180 8CA20004 */ lw $v0, 0x4($a1)
D_80244184:
/* 172A64 80244184 2404FFEF */ addiu $a0, $zero, -0x11
D_80244188:
/* 172A68 80244188 00431024 */ and $v0, $v0, $v1
D_8024418C:
/* 172A6C 8024418C 2403FFFB */ addiu $v1, $zero, -0x5
.L80244190:
/* 172A70 80244190 00431024 */ and $v0, $v0, $v1
.L80244194:
/* 172A74 80244194 00461024 */ and $v0, $v0, $a2
/* 172A78 80244198 8CA30000 */ lw $v1, 0x0($a1)
/* 172A7C 8024419C 00441024 */ and $v0, $v0, $a0
D_802441A0:
/* 172A80 802441A0 ACA20004 */ sw $v0, 0x4($a1)
.L802441A4:
/* 172A84 802441A4 00661824 */ and $v1, $v1, $a2
D_802441A8:
/* 172A88 802441A8 ACA30000 */ sw $v1, 0x0($a1)
.L802441AC:
/* 172A8C 802441AC 82220216 */ lb $v0, 0x216($s1)
D_802441B0:
/* 172A90 802441B0 2414000D */ addiu $s4, $zero, 0xD
dro_02_pad_41B4:
/* 172A94 802441B4 14540005 */ bne $v0, $s4, .L802441CC
dead_kzn_17_ItemChoice_HasSelectedItem:
/* 172A98 802441B8 00000000 */ nop
dead_kzn_17_ItemChoice_SelectedItemID:
/* 172A9C 802441BC 0C09C596 */ jal dispatch_event_player
D_802441C0:
/* 172AA0 802441C0 24040034 */ addiu $a0, $zero, 0x34
.L802441C4:
/* 172AA4 802441C4 2402000A */ addiu $v0, $zero, 0xA
D_802441C8:
/* 172AA8 802441C8 AE420000 */ sw $v0, 0x0($s2)
.L802441CC:
/* 172AAC 802441CC 8E220440 */ lw $v0, 0x440($s1)
D_802441D0_ED41C0:
/* 172AB0 802441D0 A2200210 */ sb $zero, 0x210($s1)
D_802441D4:
/* 172AB4 802441D4 A2200212 */ sb $zero, 0x212($s1)
D_802441D8_ED41C8:
/* 172AB8 802441D8 A2200214 */ sb $zero, 0x214($s1)
dead_flo_13_FlyingAI_JumpVels:
/* 172ABC 802441DC A2200218 */ sb $zero, 0x218($s1)
D_802441E0_ED41D0:
/* 172AC0 802441E0 A2200216 */ sb $zero, 0x216($s1)
D_802441E4:
/* 172AC4 802441E4 A2200217 */ sb $zero, 0x217($s1)
D_802441E8:
/* 172AC8 802441E8 8C42000C */ lw $v0, 0xC($v0)
glabel func_802441EC
/* 172ACC 802441EC 12000027 */ beqz $s0, .L8024428C
D_802441F0:
/* 172AD0 802441F0 AC40003C */ sw $zero, 0x3C($v0)
.L802441F4:
/* 172AD4 802441F4 82020216 */ lb $v0, 0x216($s0)
/* 172AD8 802441F8 14540005 */ bne $v0, $s4, D_80244210
D_802441FC:
/* 172ADC 802441FC 00000000 */ nop
.L80244200:
/* 172AE0 80244200 0C09F7A0 */ jal dispatch_event_partner
D_80244204:
/* 172AE4 80244204 24040034 */ addiu $a0, $zero, 0x34
D_80244208:
/* 172AE8 80244208 2402000A */ addiu $v0, $zero, 0xA
/* 172AEC 8024420C AE420000 */ sw $v0, 0x0($s2)
D_80244210:
/* 172AF0 80244210 8E020440 */ lw $v0, 0x440($s0)
.L80244214:
/* 172AF4 80244214 A2000210 */ sb $zero, 0x210($s0)
D_80244218:
/* 172AF8 80244218 A2000212 */ sb $zero, 0x212($s0)
/* 172AFC 8024421C A2000214 */ sb $zero, 0x214($s0)
D_80244220:
/* 172B00 80244220 A2000218 */ sb $zero, 0x218($s0)
glabel func_80244224
/* 172B04 80244224 A2000216 */ sb $zero, 0x216($s0)
.L80244228:
/* 172B08 80244228 A2000217 */ sb $zero, 0x217($s0)
/* 172B0C 8024422C 8C42000C */ lw $v0, 0xC($v0)
/* 172B10 80244230 080910A3 */ j .L8024428C
/* 172B14 80244234 AC40003C */ sw $zero, 0x3C($v0)
.L80244238:
/* 172B18 80244238 8E2201D8 */ lw $v0, 0x1D8($s1)
D_8024423C:
/* 172B1C 8024423C 10400005 */ beqz $v0, .L80244254
D_80244240:
/* 172B20 80244240 00000000 */ nop
/* 172B24 80244244 0C0B1059 */ jal does_script_exist
.L80244248:
/* 172B28 80244248 8E2401E8 */ lw $a0, 0x1E8($s1)
/* 172B2C 8024424C 1440000F */ bnez $v0, .L8024428C
.L80244250:
/* 172B30 80244250 00000000 */ nop
.L80244254:
/* 172B34 80244254 1200000A */ beqz $s0, .L80244280
D_80244258:
/* 172B38 80244258 AE2001D8 */ sw $zero, 0x1D8($s1)
.L8024425C:
/* 172B3C 8024425C 8E0201D8 */ lw $v0, 0x1D8($s0)
/* 172B40 80244260 50400007 */ beql $v0, $zero, .L80244280
.L80244264:
/* 172B44 80244264 AE0001D8 */ sw $zero, 0x1D8($s0)
/* 172B48 80244268 8E0401E8 */ lw $a0, 0x1E8($s0)
/* 172B4C 8024426C 0C0B1059 */ jal does_script_exist
D_80244270:
/* 172B50 80244270 00000000 */ nop
/* 172B54 80244274 14400005 */ bnez $v0, .L8024428C
/* 172B58 80244278 00000000 */ nop
D_8024427C:
/* 172B5C 8024427C AE0001D8 */ sw $zero, 0x1D8($s0)
.L80244280:
/* 172B60 80244280 2402000B */ addiu $v0, $zero, 0xB
D_80244284:
/* 172B64 80244284 3C01800E */ lui $at, %hi(gBattleSubState)
glabel func_80244288
/* 172B68 80244288 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
.L8024428C:
/* 172B6C 8024428C 3C04800E */ lui $a0, %hi(gBattleSubState)
D_80244290:
/* 172B70 80244290 2484C4DC */ addiu $a0, $a0, %lo(gBattleSubState)
/* 172B74 80244294 8C830000 */ lw $v1, 0x0($a0)
/* 172B78 80244298 2402000B */ addiu $v0, $zero, 0xB
/* 172B7C 8024429C 14620017 */ bne $v1, $v0, .L802442FC
glabel func_802442A0
/* 172B80 802442A0 00000000 */ nop
/* 172B84 802442A4 12000006 */ beqz $s0, D_802442C0
/* 172B88 802442A8 3C030010 */ lui $v1, (0x100000 >> 16)
.L802442AC:
/* 172B8C 802442AC 3C02800E */ lui $v0, %hi(gBattleStatus)
D_802442B0:
/* 172B90 802442B0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 172B94 802442B4 00431024 */ and $v0, $v0, $v1
D_802442B8:
/* 172B98 802442B8 14400004 */ bnez $v0, .L802442CC
/* 172B9C 802442BC 2402000C */ addiu $v0, $zero, 0xC
D_802442C0:
/* 172BA0 802442C0 24020002 */ addiu $v0, $zero, 0x2
/* 172BA4 802442C4 080910BF */ j .L802442FC
/* 172BA8 802442C8 AC820000 */ sw $v0, 0x0($a0)
.L802442CC:
/* 172BAC 802442CC C6000144 */ lwc1 $f0, 0x144($s0)
dead_03_D_802442D0:
/* 172BB0 802442D0 C602014C */ lwc1 $f2, 0x14C($s0)
/* 172BB4 802442D4 E600000C */ swc1 $f0, 0xC($s0)
D_802442D8:
/* 172BB8 802442D8 E6020014 */ swc1 $f2, 0x14($s0)
/* 172BBC 802442DC C6200144 */ lwc1 $f0, 0x144($s1)
D_802442E0:
/* 172BC0 802442E0 AC820000 */ sw $v0, 0x0($a0)
D_802442E4:
/* 172BC4 802442E4 E6000018 */ swc1 $f0, 0x18($s0)
jtbl_802442E8:
/* 172BC8 802442E8 C620014C */ lwc1 $f0, 0x14C($s1)
/* 172BCC 802442EC 24020004 */ addiu $v0, $zero, 0x4
D_802442F0:
/* 172BD0 802442F0 A6020070 */ sh $v0, 0x70($s0)
/* 172BD4 802442F4 AE000054 */ sw $zero, 0x54($s0)
.L802442F8:
/* 172BD8 802442F8 E6000020 */ swc1 $f0, 0x20($s0)
.L802442FC:
/* 172BDC 802442FC 3C12800E */ lui $s2, %hi(gBattleSubState)
.L80244300:
/* 172BE0 80244300 2652C4DC */ addiu $s2, $s2, %lo(gBattleSubState)
/* 172BE4 80244304 8E430000 */ lw $v1, 0x0($s2)
glabel func_80244308
/* 172BE8 80244308 2402000C */ addiu $v0, $zero, 0xC
/* 172BEC 8024430C 1462006D */ bne $v1, $v0, D_802444C4
/* 172BF0 80244310 00000000 */ nop
/* 172BF4 80244314 86020070 */ lh $v0, 0x70($s0)
jtbl_80244318:
/* 172BF8 80244318 10400022 */ beqz $v0, .L802443A4
/* 172BFC 8024431C 00000000 */ nop
/* 172C00 80244320 C6000018 */ lwc1 $f0, 0x18($s0)
.L80244324:
/* 172C04 80244324 C6080144 */ lwc1 $f8, 0x144($s0)
D_80244328:
/* 172C08 80244328 C6020020 */ lwc1 $f2, 0x20($s0)
D_8024432C:
/* 172C0C 8024432C 46080001 */ sub.s $f0, $f0, $f8
D_80244330:
/* 172C10 80244330 C604014C */ lwc1 $f4, 0x14C($s0)
/* 172C14 80244334 46041081 */ sub.s $f2, $f2, $f4
D_80244338:
/* 172C18 80244338 44823000 */ mtc1 $v0, $f6
.L8024433C:
/* 172C1C 8024433C 00000000 */ nop
D_80244340:
/* 172C20 80244340 468031A0 */ cvt.s.w $f6, $f6
/* 172C24 80244344 46060003 */ div.s $f0, $f0, $f6
D_80244348:
/* 172C28 80244348 46004200 */ add.s $f8, $f8, $f0
.L8024434C:
/* 172C2C 8024434C 46003006 */ mov.s $f0, $f6
jtbl_80244350:
/* 172C30 80244350 46061083 */ div.s $f2, $f2, $f6
/* 172C34 80244354 C600000C */ lwc1 $f0, 0xC($s0)
D_80244358:
/* 172C38 80244358 46022100 */ add.s $f4, $f4, $f2
/* 172C3C 8024435C E6080144 */ swc1 $f8, 0x144($s0)
D_80244360:
/* 172C40 80244360 E604014C */ swc1 $f4, 0x14C($s0)
/* 172C44 80244364 C6240144 */ lwc1 $f4, 0x144($s1)
/* 172C48 80244368 46040001 */ sub.s $f0, $f0, $f4
/* 172C4C 8024436C 46003086 */ mov.s $f2, $f6
D_80244370:
/* 172C50 80244370 46060003 */ div.s $f0, $f0, $f6
D_80244374:
/* 172C54 80244374 46002100 */ add.s $f4, $f4, $f0
D_80244378:
/* 172C58 80244378 E6240144 */ swc1 $f4, 0x144($s1)
D_8024437C:
/* 172C5C 8024437C C6000014 */ lwc1 $f0, 0x14($s0)
/* 172C60 80244380 C624014C */ lwc1 $f4, 0x14C($s1)
D_80244384:
/* 172C64 80244384 86020070 */ lh $v0, 0x70($s0)
D_80244388:
/* 172C68 80244388 46040001 */ sub.s $f0, $f0, $f4
D_8024438C:
/* 172C6C 8024438C 44821000 */ mtc1 $v0, $f2
D_80244390:
/* 172C70 80244390 00000000 */ nop
/* 172C74 80244394 468010A0 */ cvt.s.w $f2, $f2
/* 172C78 80244398 46020003 */ div.s $f0, $f0, $f2
/* 172C7C 8024439C 46002100 */ add.s $f4, $f4, $f0
/* 172C80 802443A0 E624014C */ swc1 $f4, 0x14C($s1)
.L802443A4:
/* 172C84 802443A4 C60C0054 */ lwc1 $f12, 0x54($s0)
D_802443A8:
/* 172C88 802443A8 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
D_802443AC:
/* 172C8C 802443AC 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 172C90 802443B0 4481B000 */ mtc1 $at, $f22
/* 172C94 802443B4 00000000 */ nop
/* 172C98 802443B8 46166302 */ mul.s $f12, $f12, $f22
/* 172C9C 802443BC 00000000 */ nop
D_802443C0:
/* 172CA0 802443C0 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 172CA4 802443C4 4481C000 */ mtc1 $at, $f24
/* 172CA8 802443C8 3C014180 */ lui $at, (0x41800000 >> 16)
/* 172CAC 802443CC 4481A000 */ mtc1 $at, $f20
D_802443D0:
/* 172CB0 802443D0 0C00A85B */ jal sin_rad
/* 172CB4 802443D4 46186303 */ div.s $f12, $f12, $f24
flo_17_pad_XXX:
/* 172CB8 802443D8 46140002 */ mul.s $f0, $f0, $f20
D_802443DC:
/* 172CBC 802443DC 00000000 */ nop
D_802443E0:
/* 172CC0 802443E0 C602014C */ lwc1 $f2, 0x14C($s0)
D_802443E4:
/* 172CC4 802443E4 46001080 */ add.s $f2, $f2, $f0
/* 172CC8 802443E8 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 172CCC 802443EC 46006307 */ neg.s $f12, $f12
D_802443F0:
/* 172CD0 802443F0 0C00A6C9 */ jal clamp_angle
/* 172CD4 802443F4 E602014C */ swc1 $f2, 0x14C($s0)
D_802443F8:
/* 172CD8 802443F8 C60C0054 */ lwc1 $f12, 0x54($s0)
.L802443FC:
/* 172CDC 802443FC 46166302 */ mul.s $f12, $f12, $f22
D_80244400:
/* 172CE0 80244400 00000000 */ nop
.L80244404:
/* 172CE4 80244404 E600018C */ swc1 $f0, 0x18C($s0)
D_80244408:
/* 172CE8 80244408 0C00A85B */ jal sin_rad
D_8024440C:
/* 172CEC 8024440C 46186303 */ div.s $f12, $f12, $f24
/* 172CF0 80244410 46140002 */ mul.s $f0, $f0, $f20
/* 172CF4 80244414 00000000 */ nop
/* 172CF8 80244418 C622014C */ lwc1 $f2, 0x14C($s1)
/* 172CFC 8024441C 46001081 */ sub.s $f2, $f2, $f0
D_80244420:
/* 172D00 80244420 E622014C */ swc1 $f2, 0x14C($s1)
D_80244424:
/* 172D04 80244424 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 172D08 80244428 0C00A6C9 */ jal clamp_angle
D_8024442C:
/* 172D0C 8024442C 46006307 */ neg.s $f12, $f12
/* 172D10 80244430 E620018C */ swc1 $f0, 0x18C($s1)
D_80244434:
/* 172D14 80244434 C6000054 */ lwc1 $f0, 0x54($s0)
D_80244438:
/* 172D18 80244438 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 172D1C 8024443C 44811000 */ mtc1 $at, $f2
.L80244440:
/* 172D20 80244440 86020070 */ lh $v0, 0x70($s0)
.L80244444:
/* 172D24 80244444 46020000 */ add.s $f0, $f0, $f2
D_80244448:
/* 172D28 80244448 96030070 */ lhu $v1, 0x70($s0)
/* 172D2C 8024444C 10400004 */ beqz $v0, D_80244460
D_80244450:
/* 172D30 80244450 E6000054 */ swc1 $f0, 0x54($s0)
D_80244454:
/* 172D34 80244454 2462FFFF */ addiu $v0, $v1, -0x1
jtbl_80244458:
/* 172D38 80244458 08091131 */ j D_802444C4
D_8024445C:
/* 172D3C 8024445C A6020070 */ sh $v0, 0x70($s0)
D_80244460:
/* 172D40 80244460 C6000018 */ lwc1 $f0, 0x18($s0)
/* 172D44 80244464 C6020020 */ lwc1 $f2, 0x20($s0)
/* 172D48 80244468 C604000C */ lwc1 $f4, 0xC($s0)
/* 172D4C 8024446C E6000144 */ swc1 $f0, 0x144($s0)
/* 172D50 80244470 E602014C */ swc1 $f2, 0x14C($s0)
D_80244474:
/* 172D54 80244474 E6240144 */ swc1 $f4, 0x144($s1)
D_80244478:
/* 172D58 80244478 C6000014 */ lwc1 $f0, 0x14($s0)
/* 172D5C 8024447C 3C05FFEF */ lui $a1, (0xFFEFFFFF >> 16)
D_80244480:
/* 172D60 80244480 E620014C */ swc1 $f0, 0x14C($s1)
/* 172D64 80244484 C6000144 */ lwc1 $f0, 0x144($s0)
jtbl_80244488:
/* 172D68 80244488 C602014C */ lwc1 $f2, 0x14C($s0)
/* 172D6C 8024448C 34A5FFFF */ ori $a1, $a1, (0xFFEFFFFF & 0xFFFF)
D_80244490:
/* 172D70 80244490 E6000138 */ swc1 $f0, 0x138($s0)
dead_03_LetterDelivery_SavedNpcAnim:
/* 172D74 80244494 E6020140 */ swc1 $f2, 0x140($s0)
.L80244498:
/* 172D78 80244498 C6200144 */ lwc1 $f0, 0x144($s1)
.L8024449C:
/* 172D7C 8024449C C622014C */ lwc1 $f2, 0x14C($s1)
D_802444A0:
/* 172D80 802444A0 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 172D84 802444A4 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
D_802444A8:
/* 172D88 802444A8 E6200138 */ swc1 $f0, 0x138($s1)
/* 172D8C 802444AC E6220140 */ swc1 $f2, 0x140($s1)
D_802444B0:
/* 172D90 802444B0 8C820000 */ lw $v0, 0x0($a0)
D_802444B4:
/* 172D94 802444B4 24030002 */ addiu $v1, $zero, 0x2
jtbl_802444B8:
/* 172D98 802444B8 AE430000 */ sw $v1, 0x0($s2)
dead_11_FlyingAI_JumpVels:
/* 172D9C 802444BC 00451024 */ and $v0, $v0, $a1
D_802444C0:
/* 172DA0 802444C0 AC820000 */ sw $v0, 0x0($a0)
D_802444C4:
/* 172DA4 802444C4 3C03800E */ lui $v1, %hi(gBattleSubState)
/* 172DA8 802444C8 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
/* 172DAC 802444CC 24020002 */ addiu $v0, $zero, 0x2
D_802444D0:
/* 172DB0 802444D0 14620026 */ bne $v1, $v0, .L8024456C
D_802444D4:
/* 172DB4 802444D4 00000000 */ nop
D_802444D8:
/* 172DB8 802444D8 0C093903 */ jal func_8024E40C
/* 172DBC 802444DC 0040202D */ daddu $a0, $v0, $zero
/* 172DC0 802444E0 8263008A */ lb $v1, 0x8A($s3)
D_802444E4:
/* 172DC4 802444E4 24020003 */ addiu $v0, $zero, 0x3
glabel func_802444E8
/* 172DC8 802444E8 14620016 */ bne $v1, $v0, .L80244544
/* 172DCC 802444EC 00000000 */ nop
D_802444F0:
/* 172DD0 802444F0 82620078 */ lb $v0, 0x78($s3)
.L802444F4:
/* 172DD4 802444F4 14400007 */ bnez $v0, .L80244514
flo_16_pad_44F8:
/* 172DD8 802444F8 2405000A */ addiu $a1, $zero, 0xA
/* 172DDC 802444FC 92A2028A */ lbu $v0, 0x28A($s5)
D_80244500:
/* 172DE0 80244500 A260008A */ sb $zero, 0x8A($s3)
/* 172DE4 80244504 A6A0028C */ sh $zero, 0x28C($s5)
D_80244508:
/* 172DE8 80244508 24420001 */ addiu $v0, $v0, 0x1
/* 172DEC 8024450C 08091150 */ j .L80244540
/* 172DF0 80244510 A2A2028A */ sb $v0, 0x28A($s5)
.L80244514:
/* 172DF4 80244514 3C048028 */ lui $a0, %hi(EVS_Mario_HandlePhase)
/* 172DF8 80244518 24844EBC */ addiu $a0, $a0, %lo(EVS_Mario_HandlePhase)
D_8024451C:
/* 172DFC 8024451C 0000302D */ daddu $a2, $zero, $zero
D_80244520:
/* 172E00 80244520 24020016 */ addiu $v0, $zero, 0x16
/* 172E04 80244524 0C0B0CF8 */ jal start_script
/* 172E08 80244528 A26201A7 */ sb $v0, 0x1A7($s3)
/* 172E0C 8024452C 0040202D */ daddu $a0, $v0, $zero
/* 172E10 80244530 AE2401D4 */ sw $a0, 0x1D4($s1)
/* 172E14 80244534 8C820144 */ lw $v0, 0x144($a0)
/* 172E18 80244538 AE2201E4 */ sw $v0, 0x1E4($s1)
/* 172E1C 8024453C AC800148 */ sw $zero, 0x148($a0)
.L80244540:
/* 172E20 80244540 24020003 */ addiu $v0, $zero, 0x3
.L80244544:
/* 172E24 80244544 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 172E28 80244548 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
D_8024454C:
/* 172E2C 8024454C 3C01800E */ lui $at, %hi(gBattleSubState)
glabel func_80244550
/* 172E30 80244550 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 172E34 80244554 8C820000 */ lw $v0, 0x0($a0)
/* 172E38 80244558 2403FFFD */ addiu $v1, $zero, -0x3
.L8024455C:
/* 172E3C 8024455C 3C01802A */ lui $at, %hi(D_8029F248)
D_80244560:
/* 172E40 80244560 AC20F248 */ sw $zero, %lo(D_8029F248)($at)
/* 172E44 80244564 00431024 */ and $v0, $v0, $v1
/* 172E48 80244568 AC820000 */ sw $v0, 0x0($a0)
.L8024456C:
/* 172E4C 8024456C 3C12800E */ lui $s2, %hi(gBattleSubState)
/* 172E50 80244570 2652C4DC */ addiu $s2, $s2, %lo(gBattleSubState)
/* 172E54 80244574 8E500000 */ lw $s0, 0x0($s2)
D_80244578:
/* 172E58 80244578 24020003 */ addiu $v0, $zero, 0x3
/* 172E5C 8024457C 16020020 */ bne $s0, $v0, D_80244600
/* 172E60 80244580 00000000 */ nop
/* 172E64 80244584 3C03802A */ lui $v1, %hi(D_8029F248)
/* 172E68 80244588 2463F248 */ addiu $v1, $v1, %lo(D_8029F248)
/* 172E6C 8024458C 8C620000 */ lw $v0, 0x0($v1)
D_80244590:
/* 172E70 80244590 10400003 */ beqz $v0, .L802445A0
/* 172E74 80244594 2442FFFF */ addiu $v0, $v0, -0x1
/* 172E78 80244598 08091180 */ j D_80244600
D_8024459C:
/* 172E7C 8024459C AC620000 */ sw $v0, 0x0($v1)
.L802445A0:
/* 172E80 802445A0 8E2201D4 */ lw $v0, 0x1D4($s1)
D_802445A4:
/* 172E84 802445A4 50400007 */ beql $v0, $zero, .L802445C4
D_802445A8:
/* 172E88 802445A8 AE2001D4 */ sw $zero, 0x1D4($s1)
/* 172E8C 802445AC 8E2401E4 */ lw $a0, 0x1E4($s1)
/* 172E90 802445B0 0C0B1059 */ jal does_script_exist
/* 172E94 802445B4 00000000 */ nop
/* 172E98 802445B8 14400011 */ bnez $v0, D_80244600
/* 172E9C 802445BC 00000000 */ nop
D_802445C0:
/* 172EA0 802445C0 AE2001D4 */ sw $zero, 0x1D4($s1)
.L802445C4:
/* 172EA4 802445C4 8262008A */ lb $v0, 0x8A($s3)
jtbl_802445C8:
/* 172EA8 802445C8 10500003 */ beq $v0, $s0, .L802445D8
/* 172EAC 802445CC 24020004 */ addiu $v0, $zero, 0x4
D_802445D0:
/* 172EB0 802445D0 08091180 */ j D_80244600
D_802445D4:
/* 172EB4 802445D4 AE420000 */ sw $v0, 0x0($s2)
.L802445D8:
/* 172EB8 802445D8 92640078 */ lbu $a0, 0x78($s3)
/* 172EBC 802445DC 24020014 */ addiu $v0, $zero, 0x14
/* 172EC0 802445E0 A262007A */ sb $v0, 0x7A($s3)
.L802445E4:
/* 172EC4 802445E4 92620079 */ lbu $v0, 0x79($s3)
/* 172EC8 802445E8 24030004 */ addiu $v1, $zero, 0x4
.L802445EC:
/* 172ECC 802445EC A260008A */ sb $zero, 0x8A($s3)
D_802445F0:
/* 172ED0 802445F0 AE430000 */ sw $v1, 0x0($s2)
/* 172ED4 802445F4 00822021 */ addu $a0, $a0, $v0
D_802445F8:
/* 172ED8 802445F8 00441021 */ addu $v0, $v0, $a0
D_802445FC:
/* 172EDC 802445FC A2620079 */ sb $v0, 0x79($s3)
D_80244600:
/* 172EE0 80244600 3C03800E */ lui $v1, %hi(gBattleSubState)
D_80244604:
/* 172EE4 80244604 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
/* 172EE8 80244608 24020004 */ addiu $v0, $zero, 0x4
/* 172EEC 8024460C 14620031 */ bne $v1, $v0, .L802446D4
D_80244610:
/* 172EF0 80244610 00000000 */ nop
/* 172EF4 80244614 82620079 */ lb $v0, 0x79($s3)
/* 172EF8 80244618 1C40002E */ bgtz $v0, .L802446D4
.L8024461C:
/* 172EFC 8024461C 3C020100 */ lui $v0, (0x1000000 >> 16)
D_80244620:
/* 172F00 80244620 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 172F04 80244624 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
D_80244628:
/* 172F08 80244628 8C830000 */ lw $v1, 0x0($a0)
D_8024462C_EEABDC:
/* 172F0C 8024462C 00621024 */ and $v0, $v1, $v0
D_80244630_EEABE0:
/* 172F10 80244630 10400004 */ beqz $v0, D_80244644
/* 172F14 80244634 3C02FFFB */ lui $v0, (0xFFFBFFFF >> 16)
jtbl_80244638:
/* 172F18 80244638 3442FFFF */ ori $v0, $v0, (0xFFFBFFFF & 0xFFFF)
/* 172F1C 8024463C 00621024 */ and $v0, $v1, $v0
.L80244640:
/* 172F20 80244640 AC820000 */ sw $v0, 0x0($a0)
D_80244644:
/* 172F24 80244644 96A302A4 */ lhu $v1, 0x2A4($s5)
/* 172F28 80244648 2C62270F */ sltiu $v0, $v1, 0x270F
/* 172F2C 8024464C 10400002 */ beqz $v0, .L80244658
/* 172F30 80244650 24620001 */ addiu $v0, $v1, 0x1
D_80244654:
/* 172F34 80244654 A6A202A4 */ sh $v0, 0x2A4($s5)
.L80244658:
/* 172F38 80244658 8C820000 */ lw $v0, 0x0($a0)
D_8024465C:
/* 172F3C 8024465C 3C030004 */ lui $v1, (0x40000 >> 16)
/* 172F40 80244660 00431024 */ and $v0, $v0, $v1
/* 172F44 80244664 10400003 */ beqz $v0, .L80244674
/* 172F48 80244668 24020003 */ addiu $v0, $zero, 0x3
/* 172F4C 8024466C 0809119E */ j jtbl_80244678
.L80244670:
/* 172F50 80244670 A2C20009 */ sb $v0, 0x9($s6)
.L80244674:
/* 172F54 80244674 A2C00009 */ sb $zero, 0x9($s6)
jtbl_80244678:
/* 172F58 80244678 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 172F5C 8024467C 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
D_80244680:
/* 172F60 80244680 8C820000 */ lw $v0, 0x0($a0)
/* 172F64 80244684 3C030002 */ lui $v1, (0x20000 >> 16)
D_80244688:
/* 172F68 80244688 00431024 */ and $v0, $v0, $v1
D_8024468C:
/* 172F6C 8024468C 1040000E */ beqz $v0, .L802446C8
/* 172F70 80244690 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 172F74 80244694 8C820004 */ lw $v0, 0x4($a0)
D_80244698:
/* 172F78 80244698 00431024 */ and $v0, $v0, $v1
/* 172F7C 8024469C 5440000B */ bnel $v0, $zero, .L802446CC
.L802446A0:
/* 172F80 802446A0 24040020 */ addiu $a0, $zero, 0x20
.L802446A4:
/* 172F84 802446A4 24020008 */ addiu $v0, $zero, 0x8
/* 172F88 802446A8 AFA20010 */ sw $v0, 0x10($sp)
D_802446AC:
/* 172F8C 802446AC 0000202D */ daddu $a0, $zero, $zero
.L802446B0:
/* 172F90 802446B0 2405FFFF */ addiu $a1, $zero, -0x1
/* 172F94 802446B4 0080302D */ daddu $a2, $a0, $zero
/* 172F98 802446B8 0C052A46 */ jal bgm_set_song
D_802446BC:
/* 172F9C 802446BC 240705DC */ addiu $a3, $zero, 0x5DC
D_802446C0:
/* 172FA0 802446C0 080911B3 */ j .L802446CC
/* 172FA4 802446C4 24040020 */ addiu $a0, $zero, 0x20
.L802446C8:
/* 172FA8 802446C8 24040021 */ addiu $a0, $zero, 0x21
.L802446CC:
/* 172FAC 802446CC 0C090464 */ jal func_80241190
/* 172FB0 802446D0 00000000 */ nop
.L802446D4:
/* 172FB4 802446D4 8FBF0034 */ lw $ra, 0x34($sp)
D_802446D8:
/* 172FB8 802446D8 8FB60030 */ lw $s6, 0x30($sp)
/* 172FBC 802446DC 8FB5002C */ lw $s5, 0x2C($sp)
glabel func_802446E0
/* 172FC0 802446E0 8FB40028 */ lw $s4, 0x28($sp)
/* 172FC4 802446E4 8FB30024 */ lw $s3, 0x24($sp)
/* 172FC8 802446E8 8FB20020 */ lw $s2, 0x20($sp)
/* 172FCC 802446EC 8FB1001C */ lw $s1, 0x1C($sp)
/* 172FD0 802446F0 8FB00018 */ lw $s0, 0x18($sp)
/* 172FD4 802446F4 D7B80048 */ ldc1 $f24, 0x48($sp)
/* 172FD8 802446F8 D7B60040 */ ldc1 $f22, 0x40($sp)
/* 172FDC 802446FC D7B40038 */ ldc1 $f20, 0x38($sp)
jtbl_80244700:
/* 172FE0 80244700 03E00008 */ jr $ra
D_80244704:
/* 172FE4 80244704 27BD0050 */ addiu $sp, $sp, 0x50
### DECOMPILED C INSTRUCTIONS:
void btl_state_update_victory(void) {
BattleStatus* battleStatus = &gBattleStatus;
EncounterStatus* currentEncounter = &gCurrentEncounter;
PlayerData* playerData = &gPlayerData;
Actor* player = battleStatus->playerActor;
Actor* partner = battleStatus->partnerActor;
Evt* script;
switch (gBattleSubState) {
case BTL_SUBSTATE_VICTORY_CHECK_OUTTA_SIGHT:
player->flags &= ~(ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000);
if (partner != NULL) {
partner->flags &= ~(ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000);
}
battleStatus->stateFreezeCount = 0;
if (battleStatus->outtaSightActive == 0) {
gBattleSubState = BTL_SUBSTATE_VICTORY_RECOVER_STATUS;
} else {
if (battleStatus->outtaSightActive > 0) {
D_8029F254 = 1;
}
battleStatus->battlePhase = PHASE_ENEMY_BEGIN;
script = start_script(partner->handlePhaseSource, EVT_PRIORITY_A, 0);
partner->handlePhaseScript = script;
partner->handleBatttlePhaseScriptID = script->id;
script->owner1.actorID = ACTOR_PARTNER;
gBattleSubState = BTL_SUBSTATE_VICTORY_AWAIT_OUTTA_SIGHT;
}
break;
case BTL_SUBSTATE_VICTORY_AWAIT_OUTTA_SIGHT:
if (!does_script_exist(partner->handleBatttlePhaseScriptID)) {
battleStatus->outtaSightActive = 0;
gBattleSubState = BTL_SUBSTATE_VICTORY_RECOVER_STATUS;
}
break;
}
switch (gBattleSubState) {
case BTL_SUBSTATE_VICTORY_RECOVER_STATUS:
player->flags &= ~(ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000);
if (partner != NULL) {
partner->flags &= ~(ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000);
}
gBattleSubState = BTL_SUBSTATE_VICTORY_CHECK_SWAP;
gBattleStatus.flags2 &= ~BS_FLAGS2_2;
gBattleStatus.flags2 &= ~BS_FLAGS2_4;
gBattleStatus.flags2 &= ~BS_FLAGS2_8;
gBattleStatus.flags2 &= ~BS_FLAGS2_10;
gBattleStatus.flags1 &= ~BS_FLAGS1_SHOW_PLAYER_DECORATIONS;
if (player->koStatus == STATUS_KEY_DAZE) {
dispatch_event_player(EVENT_RECOVER_FROM_KO);
gBattleSubState = BTL_SUBSTATE_VICTORY_AWAIT_RECOVER_KO;
}
player->debuff = 0;
player->staticStatus = 0;
player->stoneStatus = 0;
player->transparentStatus = 0;
player->koStatus = 0;
player->koDuration = 0;
player->disableEffect->data.disableX->koDuration = 0;
if (partner != NULL) {
if (partner->koStatus == STATUS_KEY_DAZE) {
dispatch_event_partner(EVENT_RECOVER_FROM_KO);
gBattleSubState = BTL_SUBSTATE_VICTORY_AWAIT_RECOVER_KO;
}
partner->debuff = 0;
partner->staticStatus = 0;
partner->stoneStatus = 0;
partner->transparentStatus = 0;
partner->koStatus = 0;
partner->koDuration = 0;
partner->disableEffect->data.disableX->koDuration = 0;
}
break;
case BTL_SUBSTATE_VICTORY_AWAIT_RECOVER_KO:
if (player->handleEventScript != NULL && does_script_exist(player->handleEventScriptID)) {
break;
}
player->handleEventScript = NULL;
if (partner != NULL) {
if (partner->handleEventScript != NULL && does_script_exist(partner->handleEventScriptID)) {
break;
}
partner->handleEventScript = NULL;
}
gBattleSubState = BTL_SUBSTATE_VICTORY_CHECK_SWAP;
break;
}
if (gBattleSubState == BTL_SUBSTATE_VICTORY_CHECK_SWAP) {
if (partner == NULL || !(gBattleStatus.flags1 & BS_FLAGS1_PLAYER_IN_BACK)) {
gBattleSubState = BTL_SUBSTATE_VICTORY_CHECK_MERLEE;
} else {
partner->state.currentPos.x = partner->currentPos.x;
partner->state.currentPos.z = partner->currentPos.z;
partner->state.goalPos.x = player->currentPos.x;
partner->state.goalPos.z = player->currentPos.z;
partner->state.moveTime = 4;
partner->state.angle = 0.0f;
gBattleSubState = BTL_SUBSTATE_VICTORY_AWAIT_SWAP;
}
}
if (gBattleSubState == BTL_SUBSTATE_VICTORY_AWAIT_SWAP) {
if (partner->state.moveTime != 0) {
partner->currentPos.x += (partner->state.goalPos.x - partner->currentPos.x) / partner->state.moveTime;
partner->currentPos.z += (partner->state.goalPos.z - partner->currentPos.z) / partner->state.moveTime;
player->currentPos.x += (partner->state.currentPos.x - player->currentPos.x) / partner->state.moveTime;
player->currentPos.z += (partner->state.currentPos.z - player->currentPos.z) / partner->state.moveTime;
}
partner->currentPos.z += sin_rad(DEG_TO_RAD(partner->state.angle)) * 16.0f;
partner->yaw = clamp_angle(-partner->state.angle);
player->currentPos.z -= sin_rad(DEG_TO_RAD(partner->state.angle)) * 16.0f;
player->yaw = clamp_angle(-partner->state.angle);
partner->state.angle += 90.0f;
if (partner->state.moveTime != 0) {
partner->state.moveTime--;
} else {
partner->currentPos.x = partner->state.goalPos.x;
partner->currentPos.z = partner->state.goalPos.z;
player->currentPos.x = partner->state.currentPos.x;
player->currentPos.z = partner->state.currentPos.z;
partner->homePos.x = partner->currentPos.x;
partner->homePos.z = partner->currentPos.z;
player->homePos.x = player->currentPos.x;
player->homePos.z = player->currentPos.z;
gBattleSubState = BTL_SUBSTATE_VICTORY_CHECK_MERLEE;
gBattleStatus.flags1 &= ~BS_FLAGS1_PLAYER_IN_BACK;
}
}
if (gBattleSubState == BTL_SUBSTATE_VICTORY_CHECK_MERLEE) {
btl_cam_use_preset(BTL_CAM_DEFAULT);
if (battleStatus->nextMerleeSpellType == MERLEE_SPELL_EXP_BOOST) {
if (battleStatus->totalStarPoints == 0) {
battleStatus->nextMerleeSpellType = MERLEE_SPELL_0;
playerData->merleeTurnCount = 0;
playerData->merleeCastsLeft++;
} else {
battleStatus->battlePhase = PHASE_MERLEE_EXP_BONUS;
script = start_script(&EVS_Mario_HandlePhase, EVT_PRIORITY_A, 0);
player->takeTurnScript = script;
player->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PLAYER;
}
}
gBattleSubState = BTL_SUBSTATE_VICTORY_AWAIT_MERLEE;
D_8029F248 = 0;
gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN;
}
if (gBattleSubState == BTL_SUBSTATE_VICTORY_AWAIT_MERLEE) {
if (D_8029F248 != 0) {
D_8029F248--;
} else {
if (player->takeTurnScript == NULL || !does_script_exist(player->takeTurnScriptID)) {
player->takeTurnScript = NULL;
if (battleStatus->nextMerleeSpellType != MERLEE_SPELL_EXP_BOOST) {
gBattleSubState = BTL_SUBSTATE_VICTORY_DONE;
} else {
battleStatus->incrementStarPointDelay = 20;
battleStatus->nextMerleeSpellType = MERLEE_SPELL_0;
gBattleSubState = BTL_SUBSTATE_VICTORY_DONE;
battleStatus->pendingStarPoints = battleStatus->totalStarPoints
+ battleStatus->pendingStarPoints + battleStatus->pendingStarPoints;
}
}
}
}
if (gBattleSubState == BTL_SUBSTATE_VICTORY_DONE) {
if (battleStatus->pendingStarPoints <= 0) {
if (gBattleStatus.flags1 & BS_FLAGS1_STAR_POINTS_DROPPED) {
gBattleStatus.flags1 &= ~BS_FLAGS1_BATTLE_FLED;
}
if (playerData->battlesWon < 9999) {
playerData->battlesWon++;
}
if (gBattleStatus.flags1 & BS_FLAGS1_BATTLE_FLED) {
currentEncounter->battleOutcome = OUTCOME_ENEMY_FLED;
} else {
currentEncounter->battleOutcome = OUTCOME_PLAYER_WON;
}
if (gBattleStatus.flags1 & BS_FLAGS1_DISABLE_CELEBRATION) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_DONT_STOP_MUSIC)) {
bgm_set_song(0, -1, 0, 1500, 8);
}
btl_set_state(BATTLE_STATE_END_BATTLE);
} else {
btl_set_state(BATTLE_STATE_CELEBRATION);
}
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_80274A18
/* 1A32F8 80274A18 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 1A32FC 80274A1C AFB30024 */ sw $s3, 0x24($sp)
/* 1A3300 80274A20 0080982D */ daddu $s3, $a0, $zero
/* 1A3304 80274A24 AFB40028 */ sw $s4, 0x28($sp)
/* 1A3308 80274A28 3C14800E */ lui $s4, %hi(gBattleStatus)
/* 1A330C 80274A2C 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
/* 1A3310 80274A30 AFBF002C */ sw $ra, 0x2C($sp)
/* 1A3314 80274A34 AFB20020 */ sw $s2, 0x20($sp)
/* 1A3318 80274A38 AFB1001C */ sw $s1, 0x1C($sp)
/* 1A331C 80274A3C AFB00018 */ sw $s0, 0x18($sp)
/* 1A3320 80274A40 F7BA0048 */ sdc1 $f26, 0x48($sp)
/* 1A3324 80274A44 F7B80040 */ sdc1 $f24, 0x40($sp)
/* 1A3328 80274A48 F7B60038 */ sdc1 $f22, 0x38($sp)
/* 1A332C 80274A4C F7B40030 */ sdc1 $f20, 0x30($sp)
/* 1A3330 80274A50 8E9200D8 */ lw $s2, 0xD8($s4)
/* 1A3334 80274A54 8E71000C */ lw $s1, 0xC($s3)
/* 1A3338 80274A58 10A00010 */ beqz $a1, .L80274A9C
/* 1A333C 80274A5C 2650000C */ addiu $s0, $s2, 0xC
/* 1A3340 80274A60 8E250000 */ lw $a1, 0x0($s1)
/* 1A3344 80274A64 0C0B1EAF */ jal evt_get_variable
/* 1A3348 80274A68 26310004 */ addiu $s1, $s1, 0x4
/* 1A334C 80274A6C A6420070 */ sh $v0, 0x70($s2)
/* 1A3350 80274A70 8E250000 */ lw $a1, 0x0($s1)
/* 1A3354 80274A74 0C0B1EAF */ jal evt_get_variable
/* 1A3358 80274A78 0260202D */ daddu $a0, $s3, $zero
/* 1A335C 80274A7C A6420072 */ sh $v0, 0x72($s2)
/* 1A3360 80274A80 AE600074 */ sw $zero, 0x74($s3)
/* 1A3364 80274A84 AE600070 */ sw $zero, 0x70($s3)
/* 1A3368 80274A88 86430072 */ lh $v1, 0x72($s2)
/* 1A336C 80274A8C 24020001 */ addiu $v0, $zero, 0x1
/* 1A3370 80274A90 14620002 */ bne $v1, $v0, .L80274A9C
/* 1A3374 80274A94 24020002 */ addiu $v0, $zero, 0x2
/* 1A3378 80274A98 AE620070 */ sw $v0, 0x70($s3)
.L80274A9C:
/* 1A337C 80274A9C 8E620070 */ lw $v0, 0x70($s3)
/* 1A3380 80274AA0 144000FC */ bnez $v0, .L80274E94
/* 1A3384 80274AA4 00000000 */ nop
/* 1A3388 80274AA8 C6400144 */ lwc1 $f0, 0x144($s2)
/* 1A338C 80274AAC C618000C */ lwc1 $f24, 0xC($s0)
/* 1A3390 80274AB0 C61A0014 */ lwc1 $f26, 0x14($s0)
/* 1A3394 80274AB4 E6000000 */ swc1 $f0, 0x0($s0)
/* 1A3398 80274AB8 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A339C 80274ABC 4406C000 */ mfc1 $a2, $f24
/* 1A33A0 80274AC0 4407D000 */ mfc1 $a3, $f26
/* 1A33A4 80274AC4 C6160000 */ lwc1 $f22, 0x0($s0)
/* 1A33A8 80274AC8 E6000004 */ swc1 $f0, 0x4($s0)
/* 1A33AC 80274ACC C654014C */ lwc1 $f20, 0x14C($s2)
/* 1A33B0 80274AD0 4600B306 */ mov.s $f12, $f22
/* 1A33B4 80274AD4 4600A386 */ mov.s $f14, $f20
/* 1A33B8 80274AD8 0C00A720 */ jal atan2
/* 1A33BC 80274ADC E6140008 */ swc1 $f20, 0x8($s0)
/* 1A33C0 80274AE0 4600B306 */ mov.s $f12, $f22
/* 1A33C4 80274AE4 4406C000 */ mfc1 $a2, $f24
/* 1A33C8 80274AE8 4407D000 */ mfc1 $a3, $f26
/* 1A33CC 80274AEC 4600A386 */ mov.s $f14, $f20
/* 1A33D0 80274AF0 0C00A7B5 */ jal dist2D
/* 1A33D4 80274AF4 E6000048 */ swc1 $f0, 0x48($s0)
/* 1A33D8 80274AF8 86020064 */ lh $v0, 0x64($s0)
/* 1A33DC 80274AFC 46000106 */ mov.s $f4, $f0
/* 1A33E0 80274B00 14400012 */ bnez $v0, .L80274B4C
/* 1A33E4 80274B04 E604004C */ swc1 $f4, 0x4C($s0)
/* 1A33E8 80274B08 C6000040 */ lwc1 $f0, 0x40($s0)
/* 1A33EC 80274B0C C6020040 */ lwc1 $f2, 0x40($s0)
/* 1A33F0 80274B10 46002003 */ div.s $f0, $f4, $f0
/* 1A33F4 80274B14 4600028D */ trunc.w.s $f10, $f0
/* 1A33F8 80274B18 44035000 */ mfc1 $v1, $f10
/* 1A33FC 80274B1C 00000000 */ nop
/* 1A3400 80274B20 00031400 */ sll $v0, $v1, 16
/* 1A3404 80274B24 00021403 */ sra $v0, $v0, 16
/* 1A3408 80274B28 44820000 */ mtc1 $v0, $f0
/* 1A340C 80274B2C 00000000 */ nop
/* 1A3410 80274B30 46800020 */ cvt.s.w $f0, $f0
/* 1A3414 80274B34 46020002 */ mul.s $f0, $f0, $f2
/* 1A3418 80274B38 00000000 */ nop
/* 1A341C 80274B3C 46002086 */ mov.s $f2, $f4
/* 1A3420 80274B40 A6030064 */ sh $v1, 0x64($s0)
/* 1A3424 80274B44 0809D2E0 */ j .L80274B80
/* 1A3428 80274B48 46001201 */ sub.s $f8, $f2, $f0
.L80274B4C:
/* 1A342C 80274B4C 44821000 */ mtc1 $v0, $f2
/* 1A3430 80274B50 00000000 */ nop
/* 1A3434 80274B54 468010A0 */ cvt.s.w $f2, $f2
/* 1A3438 80274B58 86020064 */ lh $v0, 0x64($s0)
/* 1A343C 80274B5C 46022083 */ div.s $f2, $f4, $f2
/* 1A3440 80274B60 44820000 */ mtc1 $v0, $f0
/* 1A3444 80274B64 00000000 */ nop
/* 1A3448 80274B68 46800020 */ cvt.s.w $f0, $f0
/* 1A344C 80274B6C 46020002 */ mul.s $f0, $f0, $f2
/* 1A3450 80274B70 00000000 */ nop
/* 1A3454 80274B74 C604004C */ lwc1 $f4, 0x4C($s0)
/* 1A3458 80274B78 E6020040 */ swc1 $f2, 0x40($s0)
/* 1A345C 80274B7C 46002201 */ sub.s $f8, $f4, $f0
.L80274B80:
/* 1A3460 80274B80 86030064 */ lh $v1, 0x64($s0)
/* 1A3464 80274B84 106001BD */ beqz $v1, .L8027527C
/* 1A3468 80274B88 24020002 */ addiu $v0, $zero, 0x2
/* 1A346C 80274B8C 86020064 */ lh $v0, 0x64($s0)
/* 1A3470 80274B90 C602000C */ lwc1 $f2, 0xC($s0)
/* 1A3474 80274B94 3C014049 */ lui $at, (0x40490FD0 >> 16)
/* 1A3478 80274B98 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF)
/* 1A347C 80274B9C 44810000 */ mtc1 $at, $f0
/* 1A3480 80274BA0 C6040000 */ lwc1 $f4, 0x0($s0)
/* 1A3484 80274BA4 44823000 */ mtc1 $v0, $f6
/* 1A3488 80274BA8 00000000 */ nop
/* 1A348C 80274BAC 468031A0 */ cvt.s.w $f6, $f6
/* 1A3490 80274BB0 46060003 */ div.s $f0, $f0, $f6
/* 1A3494 80274BB4 46041081 */ sub.s $f2, $f2, $f4
/* 1A3498 80274BB8 E600003C */ swc1 $f0, 0x3C($s0)
/* 1A349C 80274BBC 44830000 */ mtc1 $v1, $f0
/* 1A34A0 80274BC0 00000000 */ nop
/* 1A34A4 80274BC4 46800020 */ cvt.s.w $f0, $f0
/* 1A34A8 80274BC8 46001083 */ div.s $f2, $f2, $f0
/* 1A34AC 80274BCC C6000010 */ lwc1 $f0, 0x10($s0)
/* 1A34B0 80274BD0 E6020030 */ swc1 $f2, 0x30($s0)
/* 1A34B4 80274BD4 C6020004 */ lwc1 $f2, 0x4($s0)
/* 1A34B8 80274BD8 AE000044 */ sw $zero, 0x44($s0)
/* 1A34BC 80274BDC 46020001 */ sub.s $f0, $f0, $f2
/* 1A34C0 80274BE0 C6040014 */ lwc1 $f4, 0x14($s0)
/* 1A34C4 80274BE4 46003086 */ mov.s $f2, $f6
/* 1A34C8 80274BE8 46020003 */ div.s $f0, $f0, $f2
/* 1A34CC 80274BEC E6000034 */ swc1 $f0, 0x34($s0)
/* 1A34D0 80274BF0 46003006 */ mov.s $f0, $f6
/* 1A34D4 80274BF4 46004003 */ div.s $f0, $f8, $f0
/* 1A34D8 80274BF8 C6020008 */ lwc1 $f2, 0x8($s0)
/* 1A34DC 80274BFC 86020066 */ lh $v0, 0x66($s0)
/* 1A34E0 80274C00 46022101 */ sub.s $f4, $f4, $f2
/* 1A34E4 80274C04 C6020040 */ lwc1 $f2, 0x40($s0)
/* 1A34E8 80274C08 28420003 */ slti $v0, $v0, 0x3
/* 1A34EC 80274C0C 46001080 */ add.s $f2, $f2, $f0
/* 1A34F0 80274C10 46062103 */ div.s $f4, $f4, $f6
/* 1A34F4 80274C14 E6040038 */ swc1 $f4, 0x38($s0)
/* 1A34F8 80274C18 10400045 */ beqz $v0, .L80274D30
/* 1A34FC 80274C1C E6020040 */ swc1 $f2, 0x40($s0)
/* 1A3500 80274C20 86020064 */ lh $v0, 0x64($s0)
/* 1A3504 80274C24 24030168 */ addiu $v1, $zero, 0x168
/* 1A3508 80274C28 14400002 */ bnez $v0, .L80274C34
/* 1A350C 80274C2C 0062001A */ div $zero, $v1, $v0
/* 1A3510 80274C30 0007000D */ break 7
.L80274C34:
/* 1A3514 80274C34 2401FFFF */ addiu $at, $zero, -0x1
/* 1A3518 80274C38 14410004 */ bne $v0, $at, .L80274C4C
/* 1A351C 80274C3C 3C018000 */ lui $at, (0x80000000 >> 16)
/* 1A3520 80274C40 14610002 */ bne $v1, $at, .L80274C4C
/* 1A3524 80274C44 00000000 */ nop
/* 1A3528 80274C48 0006000D */ break 6
.L80274C4C:
/* 1A352C 80274C4C 00001812 */ mflo $v1
/* 1A3530 80274C50 C608004C */ lwc1 $f8, 0x4C($s0)
/* 1A3534 80274C54 3C014034 */ lui $at, (0x40340000 >> 16)
/* 1A3538 80274C58 44811800 */ mtc1 $at, $f3
/* 1A353C 80274C5C 44801000 */ mtc1 $zero, $f2
/* 1A3540 80274C60 46004021 */ cvt.d.s $f0, $f8
/* 1A3544 80274C64 46220001 */ sub.d $f0, $f0, $f2
/* 1A3548 80274C68 3C014018 */ lui $at, (0x40180000 >> 16)
/* 1A354C 80274C6C 44811800 */ mtc1 $at, $f3
/* 1A3550 80274C70 44801000 */ mtc1 $zero, $f2
/* 1A3554 80274C74 46200220 */ cvt.s.d $f8, $f0
/* 1A3558 80274C78 46004021 */ cvt.d.s $f0, $f8
/* 1A355C 80274C7C 46220003 */ div.d $f0, $f0, $f2
/* 1A3560 80274C80 46200220 */ cvt.s.d $f8, $f0
/* 1A3564 80274C84 3C01802A */ lui $at, %hi(D_8029D8A0)
/* 1A3568 80274C88 D422D8A0 */ ldc1 $f2, %lo(D_8029D8A0)($at)
/* 1A356C 80274C8C 46004021 */ cvt.d.s $f0, $f8
/* 1A3570 80274C90 46220000 */ add.d $f0, $f0, $f2
/* 1A3574 80274C94 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1A3578 80274C98 44811000 */ mtc1 $at, $f2
/* 1A357C 80274C9C 46200220 */ cvt.s.d $f8, $f0
/* 1A3580 80274CA0 44830000 */ mtc1 $v1, $f0
/* 1A3584 80274CA4 00000000 */ nop
/* 1A3588 80274CA8 46800020 */ cvt.s.w $f0, $f0
/* 1A358C 80274CAC 86030066 */ lh $v1, 0x66($s0)
/* 1A3590 80274CB0 24020002 */ addiu $v0, $zero, 0x2
/* 1A3594 80274CB4 E6020024 */ swc1 $f2, 0x24($s0)
/* 1A3598 80274CB8 E6080050 */ swc1 $f8, 0x50($s0)
/* 1A359C 80274CBC 14620008 */ bne $v1, $v0, .L80274CE0
/* 1A35A0 80274CC0 E6000028 */ swc1 $f0, 0x28($s0)
/* 1A35A4 80274CC4 3C01802A */ lui $at, %hi(D_8029D8A8)
/* 1A35A8 80274CC8 D422D8A8 */ ldc1 $f2, %lo(D_8029D8A8)($at)
/* 1A35AC 80274CCC 46004021 */ cvt.d.s $f0, $f8
/* 1A35B0 80274CD0 46220002 */ mul.d $f0, $f0, $f2
/* 1A35B4 80274CD4 00000000 */ nop
/* 1A35B8 80274CD8 46200020 */ cvt.s.d $f0, $f0
/* 1A35BC 80274CDC E6000050 */ swc1 $f0, 0x50($s0)
.L80274CE0:
/* 1A35C0 80274CE0 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A35C4 80274CE4 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A35C8 80274CE8 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A35CC 80274CEC 44810000 */ mtc1 $at, $f0
/* 1A35D0 80274CF0 C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A35D4 80274CF4 C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A35D8 80274CF8 AE000018 */ sw $zero, 0x18($s0)
/* 1A35DC 80274CFC 46006302 */ mul.s $f12, $f12, $f0
/* 1A35E0 80274D00 00000000 */ nop
/* 1A35E4 80274D04 AE00001C */ sw $zero, 0x1C($s0)
/* 1A35E8 80274D08 4600A521 */ cvt.d.s $f20, $f20
/* 1A35EC 80274D0C 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A35F0 80274D10 44810000 */ mtc1 $at, $f0
/* 1A35F4 80274D14 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A35F8 80274D18 0C00A85B */ jal sin_rad
/* 1A35FC 80274D1C 46006303 */ div.s $f12, $f12, $f0
/* 1A3600 80274D20 3C01802A */ lui $at, %hi(D_8029D8B0)
/* 1A3604 80274D24 D422D8B0 */ ldc1 $f2, %lo(D_8029D8B0)($at)
/* 1A3608 80274D28 0809D390 */ j .L80274E40
/* 1A360C 80274D2C 46000021 */ cvt.d.s $f0, $f0
.L80274D30:
/* 1A3610 80274D30 86020064 */ lh $v0, 0x64($s0)
/* 1A3614 80274D34 24030168 */ addiu $v1, $zero, 0x168
/* 1A3618 80274D38 14400002 */ bnez $v0, .L80274D44
/* 1A361C 80274D3C 0062001A */ div $zero, $v1, $v0
/* 1A3620 80274D40 0007000D */ break 7
.L80274D44:
/* 1A3624 80274D44 2401FFFF */ addiu $at, $zero, -0x1
/* 1A3628 80274D48 14410004 */ bne $v0, $at, .L80274D5C
/* 1A362C 80274D4C 3C018000 */ lui $at, (0x80000000 >> 16)
/* 1A3630 80274D50 14610002 */ bne $v1, $at, .L80274D5C
/* 1A3634 80274D54 00000000 */ nop
/* 1A3638 80274D58 0006000D */ break 6
.L80274D5C:
/* 1A363C 80274D5C 00001812 */ mflo $v1
/* 1A3640 80274D60 C608004C */ lwc1 $f8, 0x4C($s0)
/* 1A3644 80274D64 3C014034 */ lui $at, (0x40340000 >> 16)
/* 1A3648 80274D68 44811800 */ mtc1 $at, $f3
/* 1A364C 80274D6C 44801000 */ mtc1 $zero, $f2
/* 1A3650 80274D70 46004021 */ cvt.d.s $f0, $f8
/* 1A3654 80274D74 46220001 */ sub.d $f0, $f0, $f2
/* 1A3658 80274D78 3C014018 */ lui $at, (0x40180000 >> 16)
/* 1A365C 80274D7C 44811800 */ mtc1 $at, $f3
/* 1A3660 80274D80 44801000 */ mtc1 $zero, $f2
/* 1A3664 80274D84 46200220 */ cvt.s.d $f8, $f0
/* 1A3668 80274D88 46004021 */ cvt.d.s $f0, $f8
/* 1A366C 80274D8C 46220003 */ div.d $f0, $f0, $f2
/* 1A3670 80274D90 46200220 */ cvt.s.d $f8, $f0
/* 1A3674 80274D94 3C01802A */ lui $at, %hi(D_8029D8B8)
/* 1A3678 80274D98 D422D8B8 */ ldc1 $f2, %lo(D_8029D8B8)($at)
/* 1A367C 80274D9C 46004021 */ cvt.d.s $f0, $f8
/* 1A3680 80274DA0 46220000 */ add.d $f0, $f0, $f2
/* 1A3684 80274DA4 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1A3688 80274DA8 44811000 */ mtc1 $at, $f2
/* 1A368C 80274DAC 46200220 */ cvt.s.d $f8, $f0
/* 1A3690 80274DB0 44830000 */ mtc1 $v1, $f0
/* 1A3694 80274DB4 00000000 */ nop
/* 1A3698 80274DB8 46800020 */ cvt.s.w $f0, $f0
/* 1A369C 80274DBC 86030066 */ lh $v1, 0x66($s0)
/* 1A36A0 80274DC0 24020004 */ addiu $v0, $zero, 0x4
/* 1A36A4 80274DC4 E6020024 */ swc1 $f2, 0x24($s0)
/* 1A36A8 80274DC8 E6080050 */ swc1 $f8, 0x50($s0)
/* 1A36AC 80274DCC 14620009 */ bne $v1, $v0, .L80274DF4
/* 1A36B0 80274DD0 E6000028 */ swc1 $f0, 0x28($s0)
/* 1A36B4 80274DD4 3C013FF4 */ lui $at, (0x3FF40000 >> 16)
/* 1A36B8 80274DD8 44811800 */ mtc1 $at, $f3
/* 1A36BC 80274DDC 44801000 */ mtc1 $zero, $f2
/* 1A36C0 80274DE0 46004021 */ cvt.d.s $f0, $f8
/* 1A36C4 80274DE4 46220002 */ mul.d $f0, $f0, $f2
/* 1A36C8 80274DE8 00000000 */ nop
/* 1A36CC 80274DEC 46200020 */ cvt.s.d $f0, $f0
/* 1A36D0 80274DF0 E6000050 */ swc1 $f0, 0x50($s0)
.L80274DF4:
/* 1A36D4 80274DF4 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A36D8 80274DF8 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A36DC 80274DFC 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A36E0 80274E00 44810000 */ mtc1 $at, $f0
/* 1A36E4 80274E04 C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A36E8 80274E08 C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A36EC 80274E0C AE000018 */ sw $zero, 0x18($s0)
/* 1A36F0 80274E10 46006302 */ mul.s $f12, $f12, $f0
/* 1A36F4 80274E14 00000000 */ nop
/* 1A36F8 80274E18 AE00001C */ sw $zero, 0x1C($s0)
/* 1A36FC 80274E1C 4600A521 */ cvt.d.s $f20, $f20
/* 1A3700 80274E20 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A3704 80274E24 44810000 */ mtc1 $at, $f0
/* 1A3708 80274E28 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A370C 80274E2C 0C00A85B */ jal sin_rad
/* 1A3710 80274E30 46006303 */ div.s $f12, $f12, $f0
/* 1A3714 80274E34 3C01802A */ lui $at, %hi(D_8029D8C0)
/* 1A3718 80274E38 D422D8C0 */ ldc1 $f2, %lo(D_8029D8C0)($at)
/* 1A371C 80274E3C 46000021 */ cvt.d.s $f0, $f0
.L80274E40:
/* 1A3720 80274E40 46220002 */ mul.d $f0, $f0, $f2
/* 1A3724 80274E44 00000000 */ nop
/* 1A3728 80274E48 46360002 */ mul.d $f0, $f0, $f22
/* 1A372C 80274E4C 00000000 */ nop
/* 1A3730 80274E50 46360000 */ add.d $f0, $f0, $f22
/* 1A3734 80274E54 4620A500 */ add.d $f20, $f20, $f0
/* 1A3738 80274E58 4620A520 */ cvt.s.d $f20, $f20
/* 1A373C 80274E5C E6140044 */ swc1 $f20, 0x44($s0)
/* 1A3740 80274E60 0000202D */ daddu $a0, $zero, $zero
/* 1A3744 80274E64 8E060058 */ lw $a2, 0x58($s0)
/* 1A3748 80274E68 0C098F3F */ jal set_animation
/* 1A374C 80274E6C 0080282D */ daddu $a1, $a0, $zero
/* 1A3750 80274E70 C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A3754 80274E74 24040160 */ addiu $a0, $zero, 0x160
/* 1A3758 80274E78 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A375C 80274E7C 8E460144 */ lw $a2, 0x144($s2)
/* 1A3760 80274E80 8E470148 */ lw $a3, 0x148($s2)
/* 1A3764 80274E84 0C052757 */ jal sfx_play_sound_at_position
/* 1A3768 80274E88 0000282D */ daddu $a1, $zero, $zero
/* 1A376C 80274E8C 24020001 */ addiu $v0, $zero, 0x1
/* 1A3770 80274E90 AE620070 */ sw $v0, 0x70($s3)
.L80274E94:
/* 1A3774 80274E94 8E630070 */ lw $v1, 0x70($s3)
/* 1A3778 80274E98 24020002 */ addiu $v0, $zero, 0x2
/* 1A377C 80274E9C 10620089 */ beq $v1, $v0, .L802750C4
/* 1A3780 80274EA0 28620003 */ slti $v0, $v1, 0x3
/* 1A3784 80274EA4 10400005 */ beqz $v0, .L80274EBC
/* 1A3788 80274EA8 24020001 */ addiu $v0, $zero, 0x1
/* 1A378C 80274EAC 10620008 */ beq $v1, $v0, .L80274ED0
/* 1A3790 80274EB0 0000102D */ daddu $v0, $zero, $zero
/* 1A3794 80274EB4 0809D49F */ j .L8027527C
/* 1A3798 80274EB8 00000000 */ nop
.L80274EBC:
/* 1A379C 80274EBC 24020003 */ addiu $v0, $zero, 0x3
/* 1A37A0 80274EC0 106200B2 */ beq $v1, $v0, .L8027518C
/* 1A37A4 80274EC4 0000102D */ daddu $v0, $zero, $zero
/* 1A37A8 80274EC8 0809D49F */ j .L8027527C
/* 1A37AC 80274ECC 00000000 */ nop
.L80274ED0:
/* 1A37B0 80274ED0 C6020044 */ lwc1 $f2, 0x44($s0)
/* 1A37B4 80274ED4 3C013FC9 */ lui $at, (0x3FC90FD0 >> 16)
/* 1A37B8 80274ED8 34210FD0 */ ori $at, $at, (0x3FC90FD0 & 0xFFFF)
/* 1A37BC 80274EDC 44810000 */ mtc1 $at, $f0
/* 1A37C0 80274EE0 00000000 */ nop
/* 1A37C4 80274EE4 4602003C */ c.lt.s $f0, $f2
/* 1A37C8 80274EE8 00000000 */ nop
/* 1A37CC 80274EEC 45000004 */ bc1f .L80274F00
/* 1A37D0 80274EF0 0000202D */ daddu $a0, $zero, $zero
/* 1A37D4 80274EF4 8E06005C */ lw $a2, 0x5C($s0)
/* 1A37D8 80274EF8 0C098F3F */ jal set_animation
/* 1A37DC 80274EFC 0080282D */ daddu $a1, $a0, $zero
.L80274F00:
/* 1A37E0 80274F00 C6060000 */ lwc1 $f6, 0x0($s0)
/* 1A37E4 80274F04 C6000030 */ lwc1 $f0, 0x30($s0)
/* 1A37E8 80274F08 C6040004 */ lwc1 $f4, 0x4($s0)
/* 1A37EC 80274F0C 46003180 */ add.s $f6, $f6, $f0
/* 1A37F0 80274F10 C6000034 */ lwc1 $f0, 0x34($s0)
/* 1A37F4 80274F14 C6020008 */ lwc1 $f2, 0x8($s0)
/* 1A37F8 80274F18 46002100 */ add.s $f4, $f4, $f0
/* 1A37FC 80274F1C C6000038 */ lwc1 $f0, 0x38($s0)
/* 1A3800 80274F20 46001080 */ add.s $f2, $f2, $f0
/* 1A3804 80274F24 E6060000 */ swc1 $f6, 0x0($s0)
/* 1A3808 80274F28 E6040004 */ swc1 $f4, 0x4($s0)
/* 1A380C 80274F2C E6020008 */ swc1 $f2, 0x8($s0)
/* 1A3810 80274F30 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A3814 80274F34 46003086 */ mov.s $f2, $f6
/* 1A3818 80274F38 E6000018 */ swc1 $f0, 0x18($s0)
/* 1A381C 80274F3C E6420144 */ swc1 $f2, 0x144($s2)
/* 1A3820 80274F40 0C00A85B */ jal sin_rad
/* 1A3824 80274F44 C60C0044 */ lwc1 $f12, 0x44($s0)
/* 1A3828 80274F48 C6020050 */ lwc1 $f2, 0x50($s0)
/* 1A382C 80274F4C 46001082 */ mul.s $f2, $f2, $f0
/* 1A3830 80274F50 00000000 */ nop
/* 1A3834 80274F54 C6000004 */ lwc1 $f0, 0x4($s0)
/* 1A3838 80274F58 46020000 */ add.s $f0, $f0, $f2
/* 1A383C 80274F5C E6400148 */ swc1 $f0, 0x148($s2)
/* 1A3840 80274F60 C6000008 */ lwc1 $f0, 0x8($s0)
/* 1A3844 80274F64 E640014C */ swc1 $f0, 0x14C($s2)
/* 1A3848 80274F68 C6020010 */ lwc1 $f2, 0x10($s0)
/* 1A384C 80274F6C C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A3850 80274F70 4602003C */ c.lt.s $f0, $f2
/* 1A3854 80274F74 00000000 */ nop
/* 1A3858 80274F78 45000005 */ bc1f .L80274F90
/* 1A385C 80274F7C 00000000 */ nop
/* 1A3860 80274F80 86020064 */ lh $v0, 0x64($s0)
/* 1A3864 80274F84 28420003 */ slti $v0, $v0, 0x3
/* 1A3868 80274F88 54400001 */ bnel $v0, $zero, .L80274F90
/* 1A386C 80274F8C E6420148 */ swc1 $f2, 0x148($s2)
.L80274F90:
/* 1A3870 80274F90 86020066 */ lh $v0, 0x66($s0)
/* 1A3874 80274F94 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A3878 80274F98 28420003 */ slti $v0, $v0, 0x3
/* 1A387C 80274F9C 10400013 */ beqz $v0, .L80274FEC
/* 1A3880 80274FA0 E600001C */ swc1 $f0, 0x1C($s0)
/* 1A3884 80274FA4 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A3888 80274FA8 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A388C 80274FAC 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A3890 80274FB0 44810000 */ mtc1 $at, $f0
/* 1A3894 80274FB4 C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A3898 80274FB8 46006302 */ mul.s $f12, $f12, $f0
/* 1A389C 80274FBC 00000000 */ nop
/* 1A38A0 80274FC0 C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A38A4 80274FC4 4600A521 */ cvt.d.s $f20, $f20
/* 1A38A8 80274FC8 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A38AC 80274FCC 44810000 */ mtc1 $at, $f0
/* 1A38B0 80274FD0 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A38B4 80274FD4 0C00A85B */ jal sin_rad
/* 1A38B8 80274FD8 46006303 */ div.s $f12, $f12, $f0
/* 1A38BC 80274FDC 3C01802A */ lui $at, %hi(D_8029D8C8)
/* 1A38C0 80274FE0 D422D8C8 */ ldc1 $f2, %lo(D_8029D8C8)($at)
/* 1A38C4 80274FE4 0809D40C */ j .L80275030
/* 1A38C8 80274FE8 46000021 */ cvt.d.s $f0, $f0
.L80274FEC:
/* 1A38CC 80274FEC C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A38D0 80274FF0 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A38D4 80274FF4 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A38D8 80274FF8 44810000 */ mtc1 $at, $f0
/* 1A38DC 80274FFC C6140044 */ lwc1 $f20, 0x44($s0)
/* 1A38E0 80275000 46006302 */ mul.s $f12, $f12, $f0
/* 1A38E4 80275004 00000000 */ nop
/* 1A38E8 80275008 C616003C */ lwc1 $f22, 0x3C($s0)
/* 1A38EC 8027500C 4600A521 */ cvt.d.s $f20, $f20
/* 1A38F0 80275010 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A38F4 80275014 44810000 */ mtc1 $at, $f0
/* 1A38F8 80275018 4600B5A1 */ cvt.d.s $f22, $f22
/* 1A38FC 8027501C 0C00A85B */ jal sin_rad
/* 1A3900 80275020 46006303 */ div.s $f12, $f12, $f0
/* 1A3904 80275024 3C01802A */ lui $at, %hi(D_8029D8D0)
/* 1A3908 80275028 D422D8D0 */ ldc1 $f2, %lo(D_8029D8D0)($at)
/* 1A390C 8027502C 46000021 */ cvt.d.s $f0, $f0
.L80275030:
/* 1A3910 80275030 46220002 */ mul.d $f0, $f0, $f2
/* 1A3914 80275034 00000000 */ nop
/* 1A3918 80275038 46360002 */ mul.d $f0, $f0, $f22
/* 1A391C 8027503C 00000000 */ nop
/* 1A3920 80275040 46360000 */ add.d $f0, $f0, $f22
/* 1A3924 80275044 4620A500 */ add.d $f20, $f20, $f0
/* 1A3928 80275048 4620A520 */ cvt.s.d $f20, $f20
/* 1A392C 8027504C E6140044 */ swc1 $f20, 0x44($s0)
/* 1A3930 80275050 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A3934 80275054 C6000028 */ lwc1 $f0, 0x28($s0)
/* 1A3938 80275058 46006300 */ add.s $f12, $f12, $f0
/* 1A393C 8027505C 0C00A6C9 */ jal clamp_angle
/* 1A3940 80275060 E60C0024 */ swc1 $f12, 0x24($s0)
/* 1A3944 80275064 96020064 */ lhu $v0, 0x64($s0)
/* 1A3948 80275068 E6000024 */ swc1 $f0, 0x24($s0)
/* 1A394C 8027506C 2442FFFF */ addiu $v0, $v0, -0x1
/* 1A3950 80275070 A6020064 */ sh $v0, 0x64($s0)
/* 1A3954 80275074 00021400 */ sll $v0, $v0, 16
/* 1A3958 80275078 14400080 */ bnez $v0, .L8027527C
/* 1A395C 8027507C 0000102D */ daddu $v0, $zero, $zero
/* 1A3960 80275080 C6000010 */ lwc1 $f0, 0x10($s0)
/* 1A3964 80275084 0000202D */ daddu $a0, $zero, $zero
/* 1A3968 80275088 E6400148 */ swc1 $f0, 0x148($s2)
/* 1A396C 8027508C C6000018 */ lwc1 $f0, 0x18($s0)
/* 1A3970 80275090 C602001C */ lwc1 $f2, 0x1C($s0)
/* 1A3974 80275094 8E060060 */ lw $a2, 0x60($s0)
/* 1A3978 80275098 46020001 */ sub.s $f0, $f0, $f2
/* 1A397C 8027509C 3C013FE6 */ lui $at, (0x3FE66666 >> 16)
/* 1A3980 802750A0 34216666 */ ori $at, $at, (0x3FE66666 & 0xFFFF)
/* 1A3984 802750A4 44811000 */ mtc1 $at, $f2
/* 1A3988 802750A8 0080282D */ daddu $a1, $a0, $zero
/* 1A398C 802750AC E602003C */ swc1 $f2, 0x3C($s0)
/* 1A3990 802750B0 46000007 */ neg.s $f0, $f0
/* 1A3994 802750B4 0C098F3F */ jal set_animation
/* 1A3998 802750B8 E6000044 */ swc1 $f0, 0x44($s0)
/* 1A399C 802750BC 0809D49F */ j .L8027527C
/* 1A39A0 802750C0 24020001 */ addiu $v0, $zero, 0x1
.L802750C4:
/* 1A39A4 802750C4 82820083 */ lb $v0, 0x83($s4)
/* 1A39A8 802750C8 10400063 */ beqz $v0, .L80275258
/* 1A39AC 802750CC 24020001 */ addiu $v0, $zero, 0x1
/* 1A39B0 802750D0 A6020064 */ sh $v0, 0x64($s0)
/* 1A39B4 802750D4 86020064 */ lh $v0, 0x64($s0)
/* 1A39B8 802750D8 24030168 */ addiu $v1, $zero, 0x168
/* 1A39BC 802750DC 14400002 */ bnez $v0, .L802750E8
/* 1A39C0 802750E0 0062001A */ div $zero, $v1, $v0
/* 1A39C4 802750E4 0007000D */ break 7
.L802750E8:
/* 1A39C8 802750E8 2401FFFF */ addiu $at, $zero, -0x1
/* 1A39CC 802750EC 14410004 */ bne $v0, $at, .L80275100
/* 1A39D0 802750F0 3C018000 */ lui $at, (0x80000000 >> 16)
/* 1A39D4 802750F4 14610002 */ bne $v1, $at, .L80275100
/* 1A39D8 802750F8 00000000 */ nop
/* 1A39DC 802750FC 0006000D */ break 6
.L80275100:
/* 1A39E0 80275100 00001812 */ mflo $v1
/* 1A39E4 80275104 C6020018 */ lwc1 $f2, 0x18($s0)
/* 1A39E8 80275108 C600001C */ lwc1 $f0, 0x1C($s0)
/* 1A39EC 8027510C 3C013FE6 */ lui $at, (0x3FE66666 >> 16)
/* 1A39F0 80275110 34216666 */ ori $at, $at, (0x3FE66666 & 0xFFFF)
/* 1A39F4 80275114 44814000 */ mtc1 $at, $f8
/* 1A39F8 80275118 C604001C */ lwc1 $f4, 0x1C($s0)
/* 1A39FC 8027511C 46001081 */ sub.s $f2, $f2, $f0
/* 1A3A00 80275120 C6000018 */ lwc1 $f0, 0x18($s0)
/* 1A3A04 80275124 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 1A3A08 80275128 44813000 */ mtc1 $at, $f6
/* 1A3A0C 8027512C 46040001 */ sub.s $f0, $f0, $f4
/* 1A3A10 80275130 E608003C */ swc1 $f8, 0x3C($s0)
/* 1A3A14 80275134 E6060024 */ swc1 $f6, 0x24($s0)
/* 1A3A18 80275138 46001087 */ neg.s $f2, $f2
/* 1A3A1C 8027513C E6020044 */ swc1 $f2, 0x44($s0)
/* 1A3A20 80275140 3C01802A */ lui $at, %hi(D_8029D8D8)
/* 1A3A24 80275144 D422D8D8 */ ldc1 $f2, %lo(D_8029D8D8)($at)
/* 1A3A28 80275148 46000005 */ abs.s $f0, $f0
/* 1A3A2C 8027514C 46000021 */ cvt.d.s $f0, $f0
/* 1A3A30 80275150 46220003 */ div.d $f0, $f0, $f2
/* 1A3A34 80275154 46200020 */ cvt.s.d $f0, $f0
/* 1A3A38 80275158 E6000050 */ swc1 $f0, 0x50($s0)
/* 1A3A3C 8027515C 44830000 */ mtc1 $v1, $f0
/* 1A3A40 80275160 00000000 */ nop
/* 1A3A44 80275164 46800020 */ cvt.s.w $f0, $f0
/* 1A3A48 80275168 E6000028 */ swc1 $f0, 0x28($s0)
/* 1A3A4C 8027516C C6400144 */ lwc1 $f0, 0x144($s2)
/* 1A3A50 80275170 E6000000 */ swc1 $f0, 0x0($s0)
/* 1A3A54 80275174 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1A3A58 80275178 E6000004 */ swc1 $f0, 0x4($s0)
/* 1A3A5C 8027517C C640014C */ lwc1 $f0, 0x14C($s2)
/* 1A3A60 80275180 24020003 */ addiu $v0, $zero, 0x3
/* 1A3A64 80275184 E6000008 */ swc1 $f0, 0x8($s0)
/* 1A3A68 80275188 AE620070 */ sw $v0, 0x70($s3)
.L8027518C:
/* 1A3A6C 8027518C C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A3A70 80275190 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 1A3A74 80275194 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A3A78 80275198 4481B000 */ mtc1 $at, $f22
/* 1A3A7C 8027519C 00000000 */ nop
/* 1A3A80 802751A0 46166302 */ mul.s $f12, $f12, $f22
/* 1A3A84 802751A4 00000000 */ nop
/* 1A3A88 802751A8 C6140000 */ lwc1 $f20, 0x0($s0)
/* 1A3A8C 802751AC 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1A3A90 802751B0 4481C000 */ mtc1 $at, $f24
/* 1A3A94 802751B4 4600A521 */ cvt.d.s $f20, $f20
/* 1A3A98 802751B8 0C00A85B */ jal sin_rad
/* 1A3A9C 802751BC 46186303 */ div.s $f12, $f12, $f24
/* 1A3AA0 802751C0 C6020050 */ lwc1 $f2, 0x50($s0)
/* 1A3AA4 802751C4 46001082 */ mul.s $f2, $f2, $f0
/* 1A3AA8 802751C8 00000000 */ nop
/* 1A3AAC 802751CC C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A3AB0 802751D0 46166302 */ mul.s $f12, $f12, $f22
/* 1A3AB4 802751D4 00000000 */ nop
/* 1A3AB8 802751D8 3C01802A */ lui $at, %hi(D_8029D8E0)
/* 1A3ABC 802751DC D420D8E0 */ ldc1 $f0, %lo(D_8029D8E0)($at)
/* 1A3AC0 802751E0 460010A1 */ cvt.d.s $f2, $f2
/* 1A3AC4 802751E4 46201083 */ div.d $f2, $f2, $f0
/* 1A3AC8 802751E8 4622A500 */ add.d $f20, $f20, $f2
/* 1A3ACC 802751EC 46186303 */ div.s $f12, $f12, $f24
/* 1A3AD0 802751F0 4620A520 */ cvt.s.d $f20, $f20
/* 1A3AD4 802751F4 0C00A85B */ jal sin_rad
/* 1A3AD8 802751F8 E6140000 */ swc1 $f20, 0x0($s0)
/* 1A3ADC 802751FC C6020050 */ lwc1 $f2, 0x50($s0)
/* 1A3AE0 80275200 46001082 */ mul.s $f2, $f2, $f0
/* 1A3AE4 80275204 00000000 */ nop
/* 1A3AE8 80275208 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 1A3AEC 8027520C C6000028 */ lwc1 $f0, 0x28($s0)
/* 1A3AF0 80275210 46006300 */ add.s $f12, $f12, $f0
/* 1A3AF4 80275214 C6000004 */ lwc1 $f0, 0x4($s0)
/* 1A3AF8 80275218 46020001 */ sub.s $f0, $f0, $f2
/* 1A3AFC 8027521C E60C0024 */ swc1 $f12, 0x24($s0)
/* 1A3B00 80275220 0C00A6C9 */ jal clamp_angle
/* 1A3B04 80275224 E6000004 */ swc1 $f0, 0x4($s0)
/* 1A3B08 80275228 C6020000 */ lwc1 $f2, 0x0($s0)
/* 1A3B0C 8027522C E6000024 */ swc1 $f0, 0x24($s0)
/* 1A3B10 80275230 E6420144 */ swc1 $f2, 0x144($s2)
/* 1A3B14 80275234 C6000004 */ lwc1 $f0, 0x4($s0)
/* 1A3B18 80275238 E6400148 */ swc1 $f0, 0x148($s2)
/* 1A3B1C 8027523C C6000008 */ lwc1 $f0, 0x8($s0)
/* 1A3B20 80275240 E640014C */ swc1 $f0, 0x14C($s2)
/* 1A3B24 80275244 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1A3B28 80275248 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1A3B2C 8027524C 30422000 */ andi $v0, $v0, 0x2000
/* 1A3B30 80275250 10400003 */ beqz $v0, .L80275260
/* 1A3B34 80275254 00000000 */ nop
.L80275258:
/* 1A3B38 80275258 0809D49F */ j .L8027527C
/* 1A3B3C 8027525C 24020002 */ addiu $v0, $zero, 0x2
.L80275260:
/* 1A3B40 80275260 96030064 */ lhu $v1, 0x64($s0)
/* 1A3B44 80275264 2463FFFF */ addiu $v1, $v1, -0x1
/* 1A3B48 80275268 A6030064 */ sh $v1, 0x64($s0)
/* 1A3B4C 8027526C 00031C00 */ sll $v1, $v1, 16
/* 1A3B50 80275270 10600002 */ beqz $v1, .L8027527C
/* 1A3B54 80275274 24020001 */ addiu $v0, $zero, 0x1
/* 1A3B58 80275278 0000102D */ daddu $v0, $zero, $zero
.L8027527C:
/* 1A3B5C 8027527C 8FBF002C */ lw $ra, 0x2C($sp)
/* 1A3B60 80275280 8FB40028 */ lw $s4, 0x28($sp)
/* 1A3B64 80275284 8FB30024 */ lw $s3, 0x24($sp)
/* 1A3B68 80275288 8FB20020 */ lw $s2, 0x20($sp)
/* 1A3B6C 8027528C 8FB1001C */ lw $s1, 0x1C($sp)
/* 1A3B70 80275290 8FB00018 */ lw $s0, 0x18($sp)
/* 1A3B74 80275294 D7BA0048 */ ldc1 $f26, 0x48($sp)
/* 1A3B78 80275298 D7B80040 */ ldc1 $f24, 0x40($sp)
/* 1A3B7C 8027529C D7B60038 */ ldc1 $f22, 0x38($sp)
/* 1A3B80 802752A0 D7B40030 */ ldc1 $f20, 0x30($sp)
/* 1A3B84 802752A4 03E00008 */ jr $ra
/* 1A3B88 802752A8 27BD0050 */ addiu $sp, $sp, 0x50
### DECOMPILED C INSTRUCTIONS:
ApiStatus func_80274A18(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
Actor* player = battleStatus->playerActor;
ActorState* playerState = &player->state;
f32 posX, posY, posZ;
f32 goalX, goalZ;
f32 temp;
f64 temp_f20_2;
f64 vel1, vel2;
f64 vel3, vel4;
f64 acc1, acc2;
f64 acc3, acc4;
if (isInitialCall) {
player->state.moveTime = evt_get_variable(script, *args++);
player->state.moveArcAmplitude = evt_get_variable(script, *args++);
script->functionTemp[1] = 0;
script->functionTemp[0] = 0;
if (player->state.moveArcAmplitude == 1) {
script->functionTemp[0] = 2;
}
}
if (script->functionTemp[0] == 0) {
playerState->currentPos.x = player->currentPos.x;
playerState->currentPos.y = player->currentPos.y;
playerState->currentPos.z = player->currentPos.z;
goalX = playerState->goalPos.x;
goalZ = playerState->goalPos.z;
posX = playerState->currentPos.x;
posY = playerState->currentPos.y;
posZ = playerState->currentPos.z;
playerState->angle = atan2(posX, posZ, goalX, goalZ);
playerState->distance = dist2D(posX, posZ, goalX, goalZ);
if (playerState->moveTime == 0) {
playerState->moveTime = playerState->distance / playerState->speed;
temp = playerState->distance - (playerState->moveTime * playerState->speed);
} else {
playerState->speed = playerState->distance / playerState->moveTime;
temp = playerState->distance - (playerState->moveTime * playerState->speed);
}
if (playerState->moveTime == 0) {
return ApiStatus_DONE2;
}
playerState->unk_30.x = (playerState->goalPos.x - playerState->currentPos.x) / playerState->moveTime;
playerState->unk_30.y = (playerState->goalPos.y - playerState->currentPos.y) / playerState->moveTime;
playerState->unk_30.z = (playerState->goalPos.z - playerState->currentPos.z) / playerState->moveTime;
playerState->acceleration = PI_S / playerState->moveTime;
playerState->velocity = 0.0f;
playerState->speed += temp / playerState->moveTime;
if (playerState->moveArcAmplitude < 3) {
temp = playerState->distance;
temp -= 20.0;
temp /= 6.0;
temp += 47.0;
playerState->bounceDivisor = temp;
playerState->unk_24 = 90.0f;
playerState->unk_28 = 360 / playerState->moveTime;
if (playerState->moveArcAmplitude == 2) {
playerState->bounceDivisor = temp * 1.12;
}
playerState->unk_18.x = 0.0f;
playerState->unk_18.y = 0.0f;
vel1 = playerState->velocity;
acc1 = playerState->acceleration;
playerState->velocity = vel1 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.53 * acc1) + acc1);
} else {
temp = playerState->distance;
temp -= 20.0;
temp /= 6.0;
temp += 47.0;
playerState->bounceDivisor = temp;
playerState->unk_24 = 90.0f;
playerState->unk_28 = 360 / playerState->moveTime;
if (playerState->moveArcAmplitude == 4) {
playerState->bounceDivisor = temp * 1.25;
}
playerState->unk_18.x = 0.0f;
playerState->unk_18.y = 0.0f;
vel2 = playerState->velocity;
acc2 = playerState->acceleration;
playerState->velocity = vel2 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.8 * acc2) + acc2);
}
set_animation(0, 0, playerState->animJumpRise);
sfx_play_sound_at_position(SOUND_160, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
script->functionTemp[0] = 1;
}
switch (script->functionTemp[0]) {
case 1:
if (playerState->velocity > PI_S / 2) {
set_animation(ACTOR_PLAYER, 0, playerState->animJumpFall);
}
playerState->currentPos.x += playerState->unk_30.x;
playerState->currentPos.y += playerState->unk_30.y;
playerState->currentPos.z += playerState->unk_30.z;
playerState->unk_18.x = player->currentPos.y;
player->currentPos.x = playerState->currentPos.x;
player->currentPos.y = playerState->currentPos.y + (playerState->bounceDivisor * sin_rad(playerState->velocity));
player->currentPos.z = playerState->currentPos.z;
if (playerState->goalPos.y > player->currentPos.y && playerState->moveTime < 3) {
player->currentPos.y = playerState->goalPos.y;
}
playerState->unk_18.y = player->currentPos.y;
if (playerState->moveArcAmplitude < 3) {
vel3 = playerState->velocity;
acc3 = playerState->acceleration;
playerState->velocity = vel3 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.53 * acc3) + acc3);
} else {
vel4 = playerState->velocity;
acc4 = playerState->acceleration;
playerState->velocity = vel4 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.8 * acc4) + acc4);
}
playerState->unk_24 += playerState->unk_28;
playerState->unk_24 = clamp_angle(playerState->unk_24);
playerState->moveTime--;
if (playerState->moveTime == 0) {
player->currentPos.y = playerState->goalPos.y;
playerState->acceleration = 1.8f;
playerState->velocity = -(playerState->unk_18.x - playerState->unk_18.y);
set_animation(ACTOR_PLAYER, 0, playerState->animJumpLand);
return ApiStatus_DONE1;
}
break;
case 2:
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
return ApiStatus_DONE2;
}
playerState->moveTime = 1;
playerState->acceleration = 1.8f;
playerState->unk_24 = 90.0f;
playerState->velocity = -(playerState->unk_18.x - playerState->unk_18.y);
playerState->bounceDivisor = fabsf(playerState->unk_18.x - playerState->unk_18.y) / 16.5;
playerState->unk_28 = 360 / playerState->moveTime;
playerState->currentPos.x = player->currentPos.x;
playerState->currentPos.y = player->currentPos.y;
playerState->currentPos.z = player->currentPos.z;
script->functionTemp[0] = 3;
// fallthrough
case 3:
temp_f20_2 = playerState->currentPos.x;
playerState->currentPos.x = temp_f20_2 + ((playerState->bounceDivisor * sin_rad(DEG_TO_RAD(playerState->unk_24))) / 33.0);
playerState->currentPos.y -= (playerState->bounceDivisor * sin_rad(DEG_TO_RAD(playerState->unk_24)));
playerState->unk_24 += playerState->unk_28;
playerState->unk_24 = clamp_angle(playerState->unk_24);
player->currentPos.x = playerState->currentPos.x;
player->currentPos.y = playerState->currentPos.y;
player->currentPos.z = playerState->currentPos.z;
if (gBattleStatus.flags1 & BS_FLAGS1_2000) {
return ApiStatus_DONE2;
}
playerState->moveTime--;
if (playerState->moveTime == 0) {
return ApiStatus_DONE1;
}
break;
}
return ApiStatus_BLOCK;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_80246B34
/* 175414 80246B34 3C03800E */ lui $v1, %hi(gBattleSubState)
/* 175418 80246B38 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
/* 17541C 80246B3C 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 175420 80246B40 AFB50024 */ sw $s5, 0x24($sp)
/* 175424 80246B44 3C15800E */ lui $s5, %hi(gBattleStatus)
/* 175428 80246B48 26B5C070 */ addiu $s5, $s5, %lo(gBattleStatus)
/* 17542C 80246B4C AFBF0028 */ sw $ra, 0x28($sp)
/* 175430 80246B50 AFB40020 */ sw $s4, 0x20($sp)
/* 175434 80246B54 AFB3001C */ sw $s3, 0x1C($sp)
/* 175438 80246B58 AFB20018 */ sw $s2, 0x18($sp)
/* 17543C 80246B5C AFB10014 */ sw $s1, 0x14($sp)
D_80246B60:
/* 175440 80246B60 AFB00010 */ sw $s0, 0x10($sp)
/* 175444 80246B64 8EB200D8 */ lw $s2, 0xD8($s5)
/* 175448 80246B68 8EB400DC */ lw $s4, 0xDC($s5)
/* 17544C 80246B6C 2C62000D */ sltiu $v0, $v1, 0xD
/* 175450 80246B70 10400122 */ beqz $v0, .L80246FFC
glabel func_80246B74
/* 175454 80246B74 00031080 */ sll $v0, $v1, 2
/* 175458 80246B78 3C01802A */ lui $at, %hi(jtbl_8029CB30)
/* 17545C 80246B7C 00220821 */ addu $at, $at, $v0
/* 175460 80246B80 8C22CB30 */ lw $v0, %lo(jtbl_8029CB30)($at)
/* 175464 80246B84 00400008 */ jr $v0
.L80246B88:
/* 175468 80246B88 00000000 */ nop
glabel .L80246B8C
/* 17546C 80246B8C 16800005 */ bnez $s4, .L80246BA4
/* 175470 80246B90 2402007F */ addiu $v0, $zero, 0x7F
/* 175474 80246B94 0C090464 */ jal func_80241190
/* 175478 80246B98 24040009 */ addiu $a0, $zero, 0x9
/* 17547C 80246B9C 08091BFF */ j .L80246FFC
D_80246BA0:
/* 175480 80246BA0 00000000 */ nop
.L80246BA4:
/* 175484 80246BA4 3C10800E */ lui $s0, %hi(gBattleStatus)
jtbl_80246BA8:
/* 175488 80246BA8 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 17548C 80246BAC A2A0008C */ sb $zero, 0x8C($s5)
.L80246BB0:
/* 175490 80246BB0 A2A20086 */ sb $v0, 0x86($s5)
/* 175494 80246BB4 A2A20087 */ sb $v0, 0x87($s5)
/* 175498 80246BB8 A2A0019A */ sb $zero, 0x19A($s5)
/* 17549C 80246BBC 8E020000 */ lw $v0, 0x0($s0)
/* 1754A0 80246BC0 2403EFFF */ addiu $v1, $zero, -0x1001
D_80246BC4:
/* 1754A4 80246BC4 00431024 */ and $v0, $v0, $v1
/* 1754A8 80246BC8 2403FFFD */ addiu $v1, $zero, -0x3
/* 1754AC 80246BCC 00431024 */ and $v0, $v0, $v1
D_80246BD0:
/* 1754B0 80246BD0 0C098F18 */ jal reset_actor_turn_info
/* 1754B4 80246BD4 AE020000 */ sw $v0, 0x0($s0)
D_80246BD8:
/* 1754B8 80246BD8 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16)
/* 1754BC 80246BDC 8E820000 */ lw $v0, 0x0($s4)
jtbl_80246BE0:
/* 1754C0 80246BE0 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF)
.L80246BE4:
/* 1754C4 80246BE4 A280021C */ sb $zero, 0x21C($s4)
D_80246BE8:
/* 1754C8 80246BE8 00431024 */ and $v0, $v0, $v1
/* 1754CC 80246BEC AE820000 */ sw $v0, 0x0($s4)
/* 1754D0 80246BF0 8E420000 */ lw $v0, 0x0($s2)
D_80246BF4:
/* 1754D4 80246BF4 0000882D */ daddu $s1, $zero, $zero
/* 1754D8 80246BF8 00431024 */ and $v0, $v0, $v1
/* 1754DC 80246BFC 0C098EF2 */ jal deduct_current_move_fp
/* 1754E0 80246C00 AE420000 */ sw $v0, 0x0($s2)
D_80246C04:
/* 1754E4 80246C04 0C09390F */ jal func_8024E43C
/* 1754E8 80246C08 24040100 */ addiu $a0, $zero, 0x100
/* 1754EC 80246C0C 3C04FFDF */ lui $a0, (0xFFDFFFFF >> 16)
.L80246C10:
/* 1754F0 80246C10 3484FFFF */ ori $a0, $a0, (0xFFDFFFFF & 0xFFFF)
/* 1754F4 80246C14 02A0282D */ daddu $a1, $s5, $zero
/* 1754F8 80246C18 8E020004 */ lw $v0, 0x4($s0)
.L80246C1C:
/* 1754FC 80246C1C 8E030000 */ lw $v1, 0x0($s0)
/* 175500 80246C20 34420010 */ ori $v0, $v0, 0x10
.L80246C24:
/* 175504 80246C24 00641824 */ and $v1, $v1, $a0
/* 175508 80246C28 AE020004 */ sw $v0, 0x4($s0)
/* 17550C 80246C2C AE030000 */ sw $v1, 0x0($s0)
.L80246C30:
/* 175510 80246C30 8CB000E0 */ lw $s0, 0xE0($a1)
/* 175514 80246C34 56000001 */ bnel $s0, $zero, .L80246C3C
/* 175518 80246C38 A200021C */ sb $zero, 0x21C($s0)
.L80246C3C:
/* 17551C 80246C3C 26310001 */ addiu $s1, $s1, 0x1
/* 175520 80246C40 2A220018 */ slti $v0, $s1, 0x18
/* 175524 80246C44 1440FFFA */ bnez $v0, .L80246C30
/* 175528 80246C48 24A50004 */ addiu $a1, $a1, 0x4
/* 17552C 80246C4C 0C093903 */ jal func_8024E40C
/* 175530 80246C50 24040002 */ addiu $a0, $zero, 0x2
/* 175534 80246C54 08091BFD */ j .L80246FF4
/* 175538 80246C58 24020002 */ addiu $v0, $zero, 0x2
glabel .L80246C5C
/* 17553C 80246C5C 0000882D */ daddu $s1, $zero, $zero
D_80246C60:
/* 175540 80246C60 3C05FFF7 */ lui $a1, (0xFFF7FFFF >> 16)
/* 175544 80246C64 34A5FFFF */ ori $a1, $a1, (0xFFF7FFFF & 0xFFFF)
/* 175548 80246C68 3C04F7FF */ lui $a0, (0xF7FFFFFF >> 16)
/* 17554C 80246C6C 3484FFFF */ ori $a0, $a0, (0xF7FFFFFF & 0xFFFF)
/* 175550 80246C70 02A0182D */ daddu $v1, $s5, $zero
.L80246C74:
/* 175554 80246C74 8C7000E0 */ lw $s0, 0xE0($v1)
/* 175558 80246C78 12000005 */ beqz $s0, .L80246C90
.L80246C7C:
/* 17555C 80246C7C 26310001 */ addiu $s1, $s1, 0x1
/* 175560 80246C80 8E020000 */ lw $v0, 0x0($s0)
/* 175564 80246C84 00451024 */ and $v0, $v0, $a1
/* 175568 80246C88 00441024 */ and $v0, $v0, $a0
D_80246C8C:
/* 17556C 80246C8C AE020000 */ sw $v0, 0x0($s0)
.L80246C90:
/* 175570 80246C90 2A220018 */ slti $v0, $s1, 0x18
D_80246C94:
/* 175574 80246C94 1440FFF7 */ bnez $v0, .L80246C74
/* 175578 80246C98 24630004 */ addiu $v1, $v1, 0x4
.L80246C9C:
/* 17557C 80246C9C 0C03A6D5 */ jal increment_status_bar_disabled
/* 175580 80246CA0 00000000 */ nop
/* 175584 80246CA4 3C03800E */ lui $v1, %hi(gBattleStatus)
D_80246CA8:
/* 175588 80246CA8 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 17558C 80246CAC 8C620000 */ lw $v0, 0x0($v1)
D_80246CB0:
/* 175590 80246CB0 34420100 */ ori $v0, $v0, 0x100
.L80246CB4:
/* 175594 80246CB4 0C098F18 */ jal reset_actor_turn_info
jtbl_80246CB8:
/* 175598 80246CB8 AC620000 */ sw $v0, 0x0($v1)
glabel func_80246CBC
/* 17559C 80246CBC 0C099EA7 */ jal reset_all_actor_sounds
/* 1755A0 80246CC0 0280202D */ daddu $a0, $s4, $zero
/* 1755A4 80246CC4 2405000A */ addiu $a1, $zero, 0xA
/* 1755A8 80246CC8 A2A001A7 */ sb $zero, 0x1A7($s5)
/* 1755AC 80246CCC 8E8401C4 */ lw $a0, 0x1C4($s4)
/* 1755B0 80246CD0 0C0B0CF8 */ jal start_script
/* 1755B4 80246CD4 0000302D */ daddu $a2, $zero, $zero
.L80246CD8:
/* 1755B8 80246CD8 AE8201D4 */ sw $v0, 0x1D4($s4)
D_80246CDC:
/* 1755BC 80246CDC 8C440144 */ lw $a0, 0x144($v0)
/* 1755C0 80246CE0 24030003 */ addiu $v1, $zero, 0x3
/* 1755C4 80246CE4 3C01800E */ lui $at, %hi(gBattleSubState)
/* 1755C8 80246CE8 AC23C4DC */ sw $v1, %lo(gBattleSubState)($at)
/* 1755CC 80246CEC 24030100 */ addiu $v1, $zero, 0x100
/* 1755D0 80246CF0 AE8401E4 */ sw $a0, 0x1E4($s4)
/* 1755D4 80246CF4 08091BFF */ j .L80246FFC
jtbl_80246CF8:
/* 1755D8 80246CF8 AC430148 */ sw $v1, 0x148($v0)
glabel .L80246CFC
/* 1755DC 80246CFC 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 1755E0 80246D00 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 1755E4 80246D04 3C030020 */ lui $v1, (0x200000 >> 16)
/* 1755E8 80246D08 00431024 */ and $v0, $v0, $v1
/* 1755EC 80246D0C 1440000A */ bnez $v0, D_80246D38
D_80246D10:
/* 1755F0 80246D10 00000000 */ nop
/* 1755F4 80246D14 8E8201D4 */ lw $v0, 0x1D4($s4)
jtbl_80246D18:
/* 1755F8 80246D18 50400007 */ beql $v0, $zero, D_80246D38
/* 1755FC 80246D1C AE8001D4 */ sw $zero, 0x1D4($s4)
/* 175600 80246D20 8E8401E4 */ lw $a0, 0x1E4($s4)
.L80246D24:
/* 175604 80246D24 0C0B1059 */ jal does_script_exist
/* 175608 80246D28 00000000 */ nop
/* 17560C 80246D2C 144000B3 */ bnez $v0, .L80246FFC
/* 175610 80246D30 00000000 */ nop
/* 175614 80246D34 AE8001D4 */ sw $zero, 0x1D4($s4)
D_80246D38:
/* 175618 80246D38 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 17561C 80246D3C 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
D_80246D40:
/* 175620 80246D40 8C820000 */ lw $v0, 0x0($a0)
.L80246D44:
/* 175624 80246D44 2403FEFF */ addiu $v1, $zero, -0x101
D_80246D48:
/* 175628 80246D48 00431024 */ and $v0, $v0, $v1
/* 17562C 80246D4C AC820000 */ sw $v0, 0x0($a0)
jtbl_80246D50:
/* 175630 80246D50 8E8201D8 */ lw $v0, 0x1D8($s4)
/* 175634 80246D54 50400007 */ beql $v0, $zero, .L80246D74
/* 175638 80246D58 AE8001D8 */ sw $zero, 0x1D8($s4)
/* 17563C 80246D5C 8E8401E8 */ lw $a0, 0x1E8($s4)
/* 175640 80246D60 0C0B1059 */ jal does_script_exist
glabel .L80246D64
/* 175644 80246D64 00000000 */ nop
/* 175648 80246D68 144000A4 */ bnez $v0, .L80246FFC
/* 17564C 80246D6C 00000000 */ nop
D_80246D70:
/* 175650 80246D70 AE8001D8 */ sw $zero, 0x1D8($s4)
.L80246D74:
/* 175654 80246D74 8E4201D8 */ lw $v0, 0x1D8($s2)
D_80246D78:
/* 175658 80246D78 50400007 */ beql $v0, $zero, D_80246D98
/* 17565C 80246D7C AE4001D8 */ sw $zero, 0x1D8($s2)
jtbl_80246D80:
/* 175660 80246D80 8E4401E8 */ lw $a0, 0x1E8($s2)
/* 175664 80246D84 0C0B1059 */ jal does_script_exist
/* 175668 80246D88 00000000 */ nop
/* 17566C 80246D8C 1440009B */ bnez $v0, .L80246FFC
D_80246D90:
/* 175670 80246D90 00000000 */ nop
/* 175674 80246D94 AE4001D8 */ sw $zero, 0x1D8($s2)
D_80246D98:
/* 175678 80246D98 0000982D */ daddu $s3, $zero, $zero
/* 17567C 80246D9C 0260882D */ daddu $s1, $s3, $zero
jtbl_80246DA0:
/* 175680 80246DA0 02A0902D */ daddu $s2, $s5, $zero
.L80246DA4:
/* 175684 80246DA4 8E5000E0 */ lw $s0, 0xE0($s2)
/* 175688 80246DA8 5200000B */ beql $s0, $zero, .L80246DD8
/* 17568C 80246DAC 26310001 */ addiu $s1, $s1, 0x1
/* 175690 80246DB0 8E0201D4 */ lw $v0, 0x1D4($s0)
/* 175694 80246DB4 50400008 */ beql $v0, $zero, .L80246DD8
.L80246DB8:
/* 175698 80246DB8 26310001 */ addiu $s1, $s1, 0x1
/* 17569C 80246DBC 8E0401E4 */ lw $a0, 0x1E4($s0)
/* 1756A0 80246DC0 0C0B1059 */ jal does_script_exist
/* 1756A4 80246DC4 00000000 */ nop
/* 1756A8 80246DC8 50400002 */ beql $v0, $zero, .L80246DD4
/* 1756AC 80246DCC AE0001D4 */ sw $zero, 0x1D4($s0)
/* 1756B0 80246DD0 24130001 */ addiu $s3, $zero, 0x1
.L80246DD4:
/* 1756B4 80246DD4 26310001 */ addiu $s1, $s1, 0x1
.L80246DD8:
/* 1756B8 80246DD8 2A220018 */ slti $v0, $s1, 0x18
/* 1756BC 80246DDC 1440FFF1 */ bnez $v0, .L80246DA4
/* 1756C0 80246DE0 26520004 */ addiu $s2, $s2, 0x4
D_80246DE4:
/* 1756C4 80246DE4 16600085 */ bnez $s3, .L80246FFC
.L80246DE8:
/* 1756C8 80246DE8 0000882D */ daddu $s1, $zero, $zero
.L80246DEC:
/* 1756CC 80246DEC 02A0902D */ daddu $s2, $s5, $zero
.L80246DF0:
/* 1756D0 80246DF0 8E5000E0 */ lw $s0, 0xE0($s2)
/* 1756D4 80246DF4 5200000B */ beql $s0, $zero, func_80246E24
/* 1756D8 80246DF8 26310001 */ addiu $s1, $s1, 0x1
.L80246DFC:
/* 1756DC 80246DFC 8E0201D8 */ lw $v0, 0x1D8($s0)
/* 1756E0 80246E00 50400008 */ beql $v0, $zero, func_80246E24
/* 1756E4 80246E04 26310001 */ addiu $s1, $s1, 0x1
/* 1756E8 80246E08 8E0401E8 */ lw $a0, 0x1E8($s0)
/* 1756EC 80246E0C 0C0B1059 */ jal does_script_exist
/* 1756F0 80246E10 00000000 */ nop
/* 1756F4 80246E14 50400002 */ beql $v0, $zero, D_80246E20
.L80246E18:
/* 1756F8 80246E18 AE0001D8 */ sw $zero, 0x1D8($s0)
/* 1756FC 80246E1C 24130001 */ addiu $s3, $zero, 0x1
D_80246E20:
/* 175700 80246E20 26310001 */ addiu $s1, $s1, 0x1
glabel func_80246E24
/* 175704 80246E24 2A220018 */ slti $v0, $s1, 0x18
D_80246E28:
/* 175708 80246E28 1440FFF1 */ bnez $v0, .L80246DF0
/* 17570C 80246E2C 26520004 */ addiu $s2, $s2, 0x4
D_80246E30:
/* 175710 80246E30 16600072 */ bnez $s3, .L80246FFC
/* 175714 80246E34 0000882D */ daddu $s1, $zero, $zero
/* 175718 80246E38 3C04FFF7 */ lui $a0, (0xFFF7FFFF >> 16)
/* 17571C 80246E3C 3484FFFF */ ori $a0, $a0, (0xFFF7FFFF & 0xFFFF)
D_80246E40:
/* 175720 80246E40 02A0182D */ daddu $v1, $s5, $zero
.L80246E44:
/* 175724 80246E44 8C7000E0 */ lw $s0, 0xE0($v1)
/* 175728 80246E48 12000004 */ beqz $s0, .L80246E5C
/* 17572C 80246E4C 26310001 */ addiu $s1, $s1, 0x1
D_80246E50:
/* 175730 80246E50 8E020000 */ lw $v0, 0x0($s0)
/* 175734 80246E54 00441024 */ and $v0, $v0, $a0
/* 175738 80246E58 AE020000 */ sw $v0, 0x0($s0)
.L80246E5C:
/* 17573C 80246E5C 2A220018 */ slti $v0, $s1, 0x18
/* 175740 80246E60 1440FFF8 */ bnez $v0, .L80246E44
.L80246E64:
/* 175744 80246E64 24630004 */ addiu $v1, $v1, 0x4
/* 175748 80246E68 82A2008C */ lb $v0, 0x8C($s5)
glabel .L80246E6C
/* 17574C 80246E6C 14400063 */ bnez $v0, .L80246FFC
/* 175750 80246E70 00000000 */ nop
/* 175754 80246E74 3C028007 */ lui $v0, %hi(gGameStatusPtr)
.L80246E78:
/* 175758 80246E78 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
D_80246E7C:
/* 17575C 80246E7C 904200AA */ lbu $v0, 0xAA($v0)
/* 175760 80246E80 30420001 */ andi $v0, $v0, 0x1
/* 175764 80246E84 10400005 */ beqz $v0, .L80246E9C
/* 175768 80246E88 00000000 */ nop
D_80246E8C:
/* 17576C 80246E8C 0C090464 */ jal func_80241190
/* 175770 80246E90 24040023 */ addiu $a0, $zero, 0x23
/* 175774 80246E94 08091BFF */ j .L80246FFC
D_80246E98:
/* 175778 80246E98 00000000 */ nop
.L80246E9C:
/* 17577C 80246E9C 0C03A6CC */ jal decrement_status_bar_disabled
/* 175780 80246EA0 00000000 */ nop
/* 175784 80246EA4 3C028011 */ lui $v0, %hi(gPlayerData)
jtbl_80246EA8:
/* 175788 80246EA8 2442F290 */ addiu $v0, $v0, %lo(gPlayerData)
/* 17578C 80246EAC 80430012 */ lb $v1, 0x12($v0)
/* 175790 80246EB0 24020001 */ addiu $v0, $zero, 0x1
/* 175794 80246EB4 1462000E */ bne $v1, $v0, .L80246EF0
/* 175798 80246EB8 24020005 */ addiu $v0, $zero, 0x5
/* 17579C 80246EBC 82A30178 */ lb $v1, 0x178($s5)
/* 1757A0 80246EC0 1462000B */ bne $v1, $v0, .L80246EF0
/* 1757A4 80246EC4 24020087 */ addiu $v0, $zero, 0x87
jtbl_80246EC8:
/* 1757A8 80246EC8 86A3017C */ lh $v1, 0x17C($s5)
.L80246ECC:
/* 1757AC 80246ECC 10620008 */ beq $v1, $v0, .L80246EF0
/* 1757B0 80246ED0 3C04BFFF */ lui $a0, (0xBFFFFFFF >> 16)
D_80246ED4:
/* 1757B4 80246ED4 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1757B8 80246ED8 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
.L80246EDC:
/* 1757BC 80246EDC A2800220 */ sb $zero, 0x220($s4)
/* 1757C0 80246EE0 8C620000 */ lw $v0, 0x0($v1)
/* 1757C4 80246EE4 3484FFFF */ ori $a0, $a0, (0xBFFFFFFF & 0xFFFF)
/* 1757C8 80246EE8 00441024 */ and $v0, $v0, $a0
/* 1757CC 80246EEC AC620000 */ sw $v0, 0x0($v1)
.L80246EF0:
/* 1757D0 80246EF0 0C098D19 */ jal btl_check_player_defeated
/* 1757D4 80246EF4 00000000 */ nop
D_80246EF8:
/* 1757D8 80246EF8 144000BD */ bnez $v0, .L802471F0
/* 1757DC 80246EFC 0000882D */ daddu $s1, $zero, $zero
jtbl_80246F00:
/* 1757E0 80246F00 3C060040 */ lui $a2, (0x400000 >> 16)
/* 1757E4 80246F04 3C050C00 */ lui $a1, (0xC000000 >> 16)
.L80246F08:
/* 1757E8 80246F08 02A0202D */ daddu $a0, $s5, $zero
.L80246F0C:
/* 1757EC 80246F0C 8C9000E0 */ lw $s0, 0xE0($a0)
D_80246F10:
/* 1757F0 80246F10 12000007 */ beqz $s0, .L80246F30
.L80246F14:
/* 1757F4 80246F14 26310001 */ addiu $s1, $s1, 0x1
D_80246F18:
/* 1757F8 80246F18 8E030000 */ lw $v1, 0x0($s0)
D_80246F1C:
/* 1757FC 80246F1C 00661024 */ and $v0, $v1, $a2
jtbl_80246F20:
/* 175800 80246F20 14400003 */ bnez $v0, .L80246F30
/* 175804 80246F24 00000000 */ nop
.L80246F28:
/* 175808 80246F28 00651025 */ or $v0, $v1, $a1
/* 17580C 80246F2C AE020000 */ sw $v0, 0x0($s0)
.L80246F30:
/* 175810 80246F30 2A220018 */ slti $v0, $s1, 0x18
/* 175814 80246F34 1440FFF5 */ bnez $v0, .L80246F0C
/* 175818 80246F38 24840004 */ addiu $a0, $a0, 0x4
/* 17581C 80246F3C 0C099DDF */ jal btl_update_ko_status
/* 175820 80246F40 00000000 */ nop
/* 175824 80246F44 8283021C */ lb $v1, 0x21C($s4)
/* 175828 80246F48 2402000D */ addiu $v0, $zero, 0xD
/* 17582C 80246F4C 14620029 */ bne $v1, $v0, .L80246FF4
/* 175830 80246F50 24020014 */ addiu $v0, $zero, 0x14
/* 175834 80246F54 0C098CFA */ jal func_802633E8
/* 175838 80246F58 00000000 */ nop
/* 17583C 80246F5C 14400025 */ bnez $v0, .L80246FF4
/* 175840 80246F60 24020014 */ addiu $v0, $zero, 0x14
/* 175844 80246F64 0C093903 */ jal func_8024E40C
/* 175848 80246F68 24040036 */ addiu $a0, $zero, 0x36
/* 17584C 80246F6C 24040023 */ addiu $a0, $zero, 0x23
D_80246F70:
/* 175850 80246F70 0C093E58 */ jal func_8024F960
/* 175854 80246F74 2405003C */ addiu $a1, $zero, 0x3C
/* 175858 80246F78 2402000B */ addiu $v0, $zero, 0xB
/* 17585C 80246F7C A280021C */ sb $zero, 0x21C($s4)
.L80246F80:
/* 175860 80246F80 A280021D */ sb $zero, 0x21D($s4)
/* 175864 80246F84 3C01800E */ lui $at, %hi(gBattleSubState)
/* 175868 80246F88 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 17586C 80246F8C 8E820000 */ lw $v0, 0x0($s4)
/* 175870 80246F90 3C030800 */ lui $v1, (0x8000000 >> 16)
glabel func_80246F94
/* 175874 80246F94 00431025 */ or $v0, $v0, $v1
/* 175878 80246F98 08091BFF */ j .L80246FFC
glabel .L80246F9C
/* 17587C 80246F9C AE820000 */ sw $v0, 0x0($s4)
D_80246FA0:
/* 175880 80246FA0 0C093EAD */ jal func_8024FAB4
/* 175884 80246FA4 00000000 */ nop
/* 175888 80246FA8 14400014 */ bnez $v0, .L80246FFC
/* 17588C 80246FAC 00000000 */ nop
.L80246FB0:
/* 175890 80246FB0 0C093903 */ jal func_8024E40C
/* 175894 80246FB4 24040002 */ addiu $a0, $zero, 0x2
/* 175898 80246FB8 0C093936 */ jal D_8024E4D8_C0BD58
/* 17589C 80246FBC 2404000F */ addiu $a0, $zero, 0xF
/* 1758A0 80246FC0 2402000A */ addiu $v0, $zero, 0xA
/* 1758A4 80246FC4 3C01802A */ lui $at, %hi(D_8029F248)
D_80246FC8:
/* 1758A8 80246FC8 AC22F248 */ sw $v0, %lo(D_8029F248)($at)
/* 1758AC 80246FCC 08091BFD */ j .L80246FF4
/* 1758B0 80246FD0 2402000C */ addiu $v0, $zero, 0xC
D_80246FD4:
/* 1758B4 80246FD4 3C03802A */ lui $v1, %hi(D_8029F248)
/* 1758B8 80246FD8 2463F248 */ addiu $v1, $v1, %lo(D_8029F248)
glabel .L80246FDC
/* 1758BC 80246FDC 8C620000 */ lw $v0, 0x0($v1)
glabel func_80246FE0
/* 1758C0 80246FE0 10400003 */ beqz $v0, .L80246FF0
/* 1758C4 80246FE4 2442FFFF */ addiu $v0, $v0, -0x1
/* 1758C8 80246FE8 08091BFF */ j .L80246FFC
/* 1758CC 80246FEC AC620000 */ sw $v0, 0x0($v1)
.L80246FF0:
/* 1758D0 80246FF0 24020014 */ addiu $v0, $zero, 0x14
.L80246FF4:
/* 1758D4 80246FF4 3C01800E */ lui $at, %hi(gBattleSubState)
/* 1758D8 80246FF8 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
glabel .L80246FFC
/* 1758DC 80246FFC 3C10800E */ lui $s0, %hi(gBattleSubState)
.L80247000:
/* 1758E0 80247000 2610C4DC */ addiu $s0, $s0, %lo(gBattleSubState)
/* 1758E4 80247004 8E030000 */ lw $v1, 0x0($s0)
/* 1758E8 80247008 24020015 */ addiu $v0, $zero, 0x15
/* 1758EC 8024700C 10620052 */ beq $v1, $v0, .L80247158
D_80247010:
/* 1758F0 80247010 28620016 */ slti $v0, $v1, 0x16
.L80247014:
/* 1758F4 80247014 10400005 */ beqz $v0, .L8024702C
/* 1758F8 80247018 24020014 */ addiu $v0, $zero, 0x14
/* 1758FC 8024701C 10620008 */ beq $v1, $v0, .L80247040
.L80247020:
/* 175900 80247020 0000982D */ daddu $s3, $zero, $zero
D_80247024:
/* 175904 80247024 08091C6C */ j .L802471B0
/* 175908 80247028 00000000 */ nop
.L8024702C:
/* 17590C 8024702C 24020016 */ addiu $v0, $zero, 0x16
.L80247030:
/* 175910 80247030 10620056 */ beq $v1, $v0, .L8024718C
/* 175914 80247034 00000000 */ nop
/* 175918 80247038 08091C6C */ j .L802471B0
/* 17591C 8024703C 00000000 */ nop
.L80247040:
/* 175920 80247040 0260882D */ daddu $s1, $s3, $zero
/* 175924 80247044 02A0182D */ daddu $v1, $s5, $zero
.L80247048:
/* 175928 80247048 8C7000E0 */ lw $s0, 0xE0($v1)
.L8024704C:
/* 17592C 8024704C 12000004 */ beqz $s0, .L80247060
D_80247050:
/* 175930 80247050 26310001 */ addiu $s1, $s1, 0x1
glabel func_80247054
/* 175934 80247054 8202021C */ lb $v0, 0x21C($s0)
/* 175938 80247058 54400004 */ bnel $v0, $zero, D_8024706C
/* 17593C 8024705C 24130001 */ addiu $s3, $zero, 0x1
.L80247060:
/* 175940 80247060 2A220018 */ slti $v0, $s1, 0x18
/* 175944 80247064 1440FFF8 */ bnez $v0, .L80247048
/* 175948 80247068 24630004 */ addiu $v1, $v1, 0x4
D_8024706C:
/* 17594C 8024706C 16600005 */ bnez $s3, .L80247084
/* 175950 80247070 2402001E */ addiu $v0, $zero, 0x1E
/* 175954 80247074 3C01800E */ lui $at, %hi(gBattleSubState)
/* 175958 80247078 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 17595C 8024707C 08091C6C */ j .L802471B0
.L80247080:
/* 175960 80247080 00000000 */ nop
.L80247084:
/* 175964 80247084 0C093903 */ jal func_8024E40C
/* 175968 80247088 24040003 */ addiu $a0, $zero, 0x3
/* 17596C 8024708C 9202021C */ lbu $v0, 0x21C($s0)
/* 175970 80247090 2442FFFC */ addiu $v0, $v0, -0x4
/* 175974 80247094 00021600 */ sll $v0, $v0, 24
/* 175978 80247098 00021E03 */ sra $v1, $v0, 24
.L8024709C:
/* 17597C 8024709C 2C620008 */ sltiu $v0, $v1, 0x8
/* 175980 802470A0 10400016 */ beqz $v0, .L802470FC
/* 175984 802470A4 00031080 */ sll $v0, $v1, 2
/* 175988 802470A8 3C01802A */ lui $at, %hi(jtbl_8029CB68)
/* 17598C 802470AC 00220821 */ addu $at, $at, $v0
D_802470B0:
/* 175990 802470B0 8C22CB68 */ lw $v0, %lo(jtbl_8029CB68)($at)
/* 175994 802470B4 00400008 */ jr $v0
D_802470B8:
/* 175998 802470B8 00000000 */ nop
D_802470BC:
/* 17599C 802470BC 08091C43 */ j func_8024710C
D_802470C0:
/* 1759A0 802470C0 24100012 */ addiu $s0, $zero, 0x12
glabel .L802470C4
/* 1759A4 802470C4 08091C43 */ j func_8024710C
D_802470C8:
/* 1759A8 802470C8 24100013 */ addiu $s0, $zero, 0x13
glabel .L802470CC
/* 1759AC 802470CC 08091C43 */ j func_8024710C
/* 1759B0 802470D0 24100014 */ addiu $s0, $zero, 0x14
glabel .L802470D4
/* 1759B4 802470D4 08091C43 */ j func_8024710C
/* 1759B8 802470D8 24100015 */ addiu $s0, $zero, 0x15
glabel .L802470DC
/* 1759BC 802470DC 08091C43 */ j func_8024710C
/* 1759C0 802470E0 24100016 */ addiu $s0, $zero, 0x16
glabel .L802470E4
/* 1759C4 802470E4 08091C43 */ j func_8024710C
/* 1759C8 802470E8 24100017 */ addiu $s0, $zero, 0x17
glabel .L802470EC
/* 1759CC 802470EC 08091C43 */ j func_8024710C
/* 1759D0 802470F0 24100018 */ addiu $s0, $zero, 0x18
glabel .L802470F4
/* 1759D4 802470F4 08091C43 */ j func_8024710C
.L802470F8:
/* 1759D8 802470F8 24100019 */ addiu $s0, $zero, 0x19
.L802470FC:
/* 1759DC 802470FC 0000802D */ daddu $s0, $zero, $zero
/* 1759E0 80247100 24020014 */ addiu $v0, $zero, 0x14
/* 1759E4 80247104 3C01800E */ lui $at, %hi(gBattleSubState)
/* 1759E8 80247108 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
glabel func_8024710C
/* 1759EC 8024710C 0C05272D */ jal sfx_play_sound
/* 1759F0 80247110 24042107 */ addiu $a0, $zero, 0x2107
/* 1759F4 80247114 0200202D */ daddu $a0, $s0, $zero
/* 1759F8 80247118 0C093E58 */ jal func_8024F960
/* 1759FC 8024711C 2405003C */ addiu $a1, $zero, 0x3C
D_80247120:
/* 175A00 80247120 0000882D */ daddu $s1, $zero, $zero
/* 175A04 80247124 02A0182D */ daddu $v1, $s5, $zero
.L80247128:
/* 175A08 80247128 8C7000E0 */ lw $s0, 0xE0($v1)
D_8024712C:
/* 175A0C 8024712C 56000001 */ bnel $s0, $zero, .L80247134
.L80247130:
/* 175A10 80247130 A200021C */ sb $zero, 0x21C($s0)
.L80247134:
/* 175A14 80247134 26310001 */ addiu $s1, $s1, 0x1
/* 175A18 80247138 2A220018 */ slti $v0, $s1, 0x18
/* 175A1C 8024713C 1440FFFA */ bnez $v0, .L80247128
/* 175A20 80247140 24630004 */ addiu $v1, $v1, 0x4
/* 175A24 80247144 24020015 */ addiu $v0, $zero, 0x15
.L80247148:
/* 175A28 80247148 3C01800E */ lui $at, %hi(gBattleSubState)
/* 175A2C 8024714C AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 175A30 80247150 08091C6C */ j .L802471B0
D_80247154:
/* 175A34 80247154 00000000 */ nop
.L80247158:
/* 175A38 80247158 0C093EAD */ jal func_8024FAB4
D_8024715C:
/* 175A3C 8024715C 00000000 */ nop
D_80247160:
/* 175A40 80247160 14400013 */ bnez $v0, .L802471B0
.L80247164:
/* 175A44 80247164 00000000 */ nop
glabel func_80247168
/* 175A48 80247168 0C093903 */ jal func_8024E40C
D_8024716C:
/* 175A4C 8024716C 24040002 */ addiu $a0, $zero, 0x2
/* 175A50 80247170 0C093936 */ jal D_8024E4D8_C0BD58
/* 175A54 80247174 2404000F */ addiu $a0, $zero, 0xF
.L80247178:
/* 175A58 80247178 2402000A */ addiu $v0, $zero, 0xA
D_8024717C:
/* 175A5C 8024717C 3C01802A */ lui $at, %hi(D_8029F248)
/* 175A60 80247180 AC22F248 */ sw $v0, %lo(D_8029F248)($at)
D_80247184:
/* 175A64 80247184 08091C6B */ j .L802471AC
/* 175A68 80247188 24020016 */ addiu $v0, $zero, 0x16
.L8024718C:
/* 175A6C 8024718C 3C03802A */ lui $v1, %hi(D_8029F248)
.L80247190:
/* 175A70 80247190 2463F248 */ addiu $v1, $v1, %lo(D_8029F248)
D_80247194:
/* 175A74 80247194 8C620000 */ lw $v0, 0x0($v1)
glabel func_80247198
/* 175A78 80247198 10400003 */ beqz $v0, .L802471A8
/* 175A7C 8024719C 2442FFFF */ addiu $v0, $v0, -0x1
/* 175A80 802471A0 08091C6C */ j .L802471B0
/* 175A84 802471A4 AC620000 */ sw $v0, 0x0($v1)
.L802471A8:
/* 175A88 802471A8 2402001E */ addiu $v0, $zero, 0x1E
.L802471AC:
/* 175A8C 802471AC AE020000 */ sw $v0, 0x0($s0)
.L802471B0:
/* 175A90 802471B0 3C03800E */ lui $v1, %hi(gBattleSubState)
.L802471B4:
/* 175A94 802471B4 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
/* 175A98 802471B8 2402001E */ addiu $v0, $zero, 0x1E
D_802471BC:
/* 175A9C 802471BC 1462000C */ bne $v1, $v0, .L802471F0
/* 175AA0 802471C0 00000000 */ nop
D_802471C4:
/* 175AA4 802471C4 8E8201D4 */ lw $v0, 0x1D4($s4)
/* 175AA8 802471C8 50400007 */ beql $v0, $zero, jtbl_802471E8
D_802471CC:
/* 175AAC 802471CC AE8001D4 */ sw $zero, 0x1D4($s4)
/* 175AB0 802471D0 8E8401E4 */ lw $a0, 0x1E4($s4)
D_802471D4:
/* 175AB4 802471D4 0C0B1059 */ jal does_script_exist
glabel func_802471D8
/* 175AB8 802471D8 00000000 */ nop
/* 175ABC 802471DC 14400004 */ bnez $v0, .L802471F0
D_802471E0:
/* 175AC0 802471E0 00000000 */ nop
D_802471E4:
/* 175AC4 802471E4 AE8001D4 */ sw $zero, 0x1D4($s4)
jtbl_802471E8:
/* 175AC8 802471E8 0C090464 */ jal func_80241190
glabel func_802471EC
/* 175ACC 802471EC 24040017 */ addiu $a0, $zero, 0x17
.L802471F0:
/* 175AD0 802471F0 8FBF0028 */ lw $ra, 0x28($sp)
D_802471F4:
/* 175AD4 802471F4 8FB50024 */ lw $s5, 0x24($sp)
/* 175AD8 802471F8 8FB40020 */ lw $s4, 0x20($sp)
.L802471FC:
/* 175ADC 802471FC 8FB3001C */ lw $s3, 0x1C($sp)
/* 175AE0 80247200 8FB20018 */ lw $s2, 0x18($sp)
/* 175AE4 80247204 8FB10014 */ lw $s1, 0x14($sp)
/* 175AE8 80247208 8FB00010 */ lw $s0, 0x10($sp)
D_8024720C:
/* 175AEC 8024720C 03E00008 */ jr $ra
/* 175AF0 80247210 27BD0030 */ addiu $sp, $sp, 0x30
### DECOMPILED C INSTRUCTIONS:
void btl_state_update_partner_move(void) {
BattleStatus* battleStatus = &gBattleStatus;
PlayerData* playerData = &gPlayerData;
Actor* player = battleStatus->playerActor;
Actor* partner = battleStatus->partnerActor;
Actor* enemyActor;
Evt* script;
s8 switchCondition;
s32 enemyFound;
s32 messageIndex;
s32 i;
switch (gBattleSubState) {
case BTL_SUBSTATE_PARTNER_MOVE_INIT:
if (partner == NULL) {
btl_set_state(BATTLE_STATE_9);
break;
}
battleStatus->stateFreezeCount = 0;
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
battleStatus->currentDamageSource = DMG_SRC_DEFAULT;
gBattleStatus.flags1 &= ~BS_FLAGS1_AUTO_SUCCEED_ACTION;
gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN;
reset_actor_turn_info();
partner->statusAfflicted = 0;
partner->flags &= ~ACTOR_FLAG_8000000;
player->flags &= ~ACTOR_FLAG_8000000;
deduct_current_move_fp();
btl_cam_target_actor(ACTOR_PARTNER);
gBattleStatus.flags2 |= BS_FLAGS2_10;
gBattleStatus.flags1 &= ~BS_FLAGS1_YIELD_TURN;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
enemyActor = battleStatus->enemyActors[i];
if (enemyActor != NULL) {
enemyActor->statusAfflicted = 0;
}
}
btl_cam_use_preset(BTL_CAM_DEFAULT);
gBattleSubState = BTL_SUBSTATE_PARTNER_MOVE_EXECUTE_MOVE;
break;
case BTL_SUBSTATE_PARTNER_MOVE_EXECUTE_MOVE:
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
enemyActor = battleStatus->enemyActors[i];
if (enemyActor != NULL) {
enemyActor->flags &= ~ACTOR_FLAG_HEALTH_BAR_HIDDEN;
enemyActor->flags &= ~ACTOR_FLAG_8000000;
}
}
increment_status_bar_disabled();
gBattleStatus.flags1 |= BS_FLAGS1_100;
reset_actor_turn_info();
reset_all_actor_sounds(partner);
battleStatus->battlePhase = PHASE_EXECUTE_ACTION;
script = start_script(partner->takeTurnSource, EVT_PRIORITY_A, 0);
partner->takeTurnScript = script;
partner->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PARTNER;
gBattleSubState = BTL_SUBSTATE_PARTNER_MOVE_HANDLE_RESULTS;
break;
case BTL_SUBSTATE_PARTNER_MOVE_HANDLE_RESULTS:
if (!(gBattleStatus.flags1 & BS_FLAGS1_YIELD_TURN)) {
if (partner->takeTurnScript != NULL && does_script_exist(partner->takeTurnScriptID)) {
break;
}
partner->takeTurnScript = NULL;
}
gBattleStatus.flags1 &= ~BS_FLAGS1_100;
if (partner->handleEventScript != NULL && does_script_exist(partner->handleEventScriptID)) {
break;
}
partner->handleEventScript = NULL;
if (player->handleEventScript != NULL && does_script_exist(player->handleEventScriptID)) {
break;
}
player->handleEventScript = NULL;
enemyFound = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
enemyActor = battleStatus->enemyActors[i];
if (enemyActor != NULL && enemyActor->takeTurnScript != NULL) {
if (does_script_exist(enemyActor->takeTurnScriptID)) {
enemyFound = TRUE;
} else {
enemyActor->takeTurnScript = NULL;
}
}
}
if (enemyFound) {
break;
}
enemyFound = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
enemyActor = battleStatus->enemyActors[i];
if (enemyActor != NULL && enemyActor->handleEventScript != NULL) {
if (does_script_exist(enemyActor->handleEventScriptID)) {
enemyFound = TRUE;
} else {
enemyActor->handleEventScript = NULL;
}
}
}
if (enemyFound) {
break;
}
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
enemyActor = battleStatus->enemyActors[i];
if (enemyActor != NULL) {
enemyActor->flags &= ~ACTOR_FLAG_HEALTH_BAR_HIDDEN;
}
}
if (battleStatus->stateFreezeCount != 0) {
break;
}
if (gGameStatusPtr->demoFlags & 1) {
btl_set_state(BATTLE_STATE_END_DEMO_BATTLE);
break;
}
decrement_status_bar_disabled();
if (playerData->currentPartner == PARTNER_GOOMBARIO
&& battleStatus->moveCategory == BTL_MENU_TYPE_CHANGE_PARTNER
&& battleStatus->selectedMoveID != MOVE_CHARGE) {
partner->isGlowing = 0;
gBattleStatus.flags1 &= ~BS_FLAGS1_GOOMBARIO_CHARGED;
}
if (btl_check_player_defeated()) {
return;
}
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
enemyActor = battleStatus->enemyActors[i];
if (enemyActor != NULL) {
if (!(enemyActor->flags & ACTOR_FLAG_NO_DMG_APPLY)) {
enemyActor->flags |= (ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000);
}
}
}
btl_update_ko_status();
if (partner->statusAfflicted == STATUS_KEY_DAZE && !btl_are_all_enemies_defeated()) {
btl_cam_use_preset(BTL_CAM_PARTNER_INJURED);
btl_show_battle_message(BTL_MSG_PARTNER_INJURED, 60);
partner->statusAfflicted = 0;
partner->disableDismissTimer = 0;
gBattleSubState = BTL_SUBSTATE_PARTNER_MOVE_AWAIT_PARTNER_STATUS_POPUP;
partner->flags |= ACTOR_FLAG_8000000;
} else {
gBattleSubState = BTL_SUBSTATE_PARTNER_MOVE_CHECK_ENEMY_STATUS;
}
break;
case BTL_SUBSTATE_PARTNER_MOVE_AWAIT_PARTNER_STATUS_POPUP:
if (btl_is_popup_displayed()) {
break;
}
btl_cam_use_preset(BTL_CAM_DEFAULT);
btl_cam_move(15);
D_8029F248 = 10;
gBattleSubState = BTL_SUBSTATE_PARTNER_MOVE_POST_PARTNER_STATUS_POPUP;
break;
case BTL_SUBSTATE_PARTNER_MOVE_POST_PARTNER_STATUS_POPUP:
if (D_8029F248 != 0) {
D_8029F248--;
} else {
gBattleSubState = BTL_SUBSTATE_PARTNER_MOVE_CHECK_ENEMY_STATUS;
}
break;
}
switch (gBattleSubState) {
case BTL_SUBSTATE_PARTNER_MOVE_CHECK_ENEMY_STATUS:
enemyFound = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
enemyActor = battleStatus->enemyActors[i];
if (enemyActor != NULL) {
if (enemyActor->statusAfflicted != 0) {
enemyFound = TRUE;
break;
}
}
}
if (!enemyFound) {
gBattleSubState = BTL_SUBSTATE_PARTNER_MOVE_DONE;
} else {
btl_cam_use_preset(BTL_CAM_PRESET_03);
switchCondition = enemyActor->statusAfflicted - 4;
switch (switchCondition) {
case 0:
messageIndex = BTL_MSG_ENEMY_DAZED;
break;
case 2:
messageIndex = BTL_MSG_ENEMY_ASLEEP;
break;
case 3:
messageIndex = BTL_MSG_ENEMY_FROZEN;
break;
case 5:
messageIndex = BTL_MSG_ENEMY_POISONED;
break;
case 6:
messageIndex = BTL_MSG_ENEMY_SHRUNK;
break;
case 1:
messageIndex = BTL_MSG_ENEMY_PARALYZED;
break;
case 7:
messageIndex = BTL_MSG_ENEMY_ELECTRIFIED;
break;
case 4:
messageIndex = BTL_MSG_ENEMY_CANT_MOVE;
break;
default:
messageIndex = 0;
gBattleSubState = BTL_SUBSTATE_PARTNER_MOVE_CHECK_ENEMY_STATUS;
break;
}
sfx_play_sound(SOUND_2107);
btl_show_battle_message(messageIndex, 60);
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
enemyActor = battleStatus->enemyActors[i];
if (enemyActor != NULL) {
enemyActor->statusAfflicted = 0;
}
}
gBattleSubState = BTL_SUBSTATE_PARTNER_MOVE_AWAIT_ENEMY_STATUS_POPUP;
}
break;
case BTL_SUBSTATE_PARTNER_MOVE_AWAIT_ENEMY_STATUS_POPUP:
if (btl_is_popup_displayed() == FALSE) {
btl_cam_use_preset(BTL_CAM_DEFAULT);
btl_cam_move(15);
D_8029F248 = 10;
gBattleSubState = BTL_SUBSTATE_PARTNER_MOVE_POST_ENEMY_STATUS_POPUP;
}
break;
case BTL_SUBSTATE_PARTNER_MOVE_POST_ENEMY_STATUS_POPUP:
if (D_8029F248 != 0) {
D_8029F248--;
} else {
gBattleSubState = BTL_SUBSTATE_PARTNER_MOVE_DONE;
}
break;
}
if (gBattleSubState == BTL_SUBSTATE_PARTNER_MOVE_DONE) {
if (partner->takeTurnScript != NULL && does_script_exist(partner->takeTurnScriptID)) {
return;
}
partner->takeTurnScript = NULL;
btl_set_state(BATTLE_STATE_END_PARTNER_TURN);
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel evt_execute_next_command
/* EBDB4 802C7404 27BDFFE8 */ addiu $sp, $sp, -0x18
/* EBDB8 802C7408 AFB00010 */ sw $s0, 0x10($sp)
/* EBDBC 802C740C 0080802D */ daddu $s0, $a0, $zero
/* EBDC0 802C7410 AFBF0014 */ sw $ra, 0x14($sp)
.L802C7414:
/* EBDC4 802C7414 92030002 */ lbu $v1, 0x2($s0)
/* EBDC8 802C7418 2C62005F */ sltiu $v0, $v1, 0x5F
/* EBDCC 802C741C 1040018B */ beqz $v0, .L802C7A4C
/* EBDD0 802C7420 24050002 */ addiu $a1, $zero, 0x2
/* EBDD4 802C7424 00A31004 */ sllv $v0, $v1, $a1
/* EBDD8 802C7428 3C01802E */ lui $at, %hi(jtbl_802D9F20)
/* EBDDC 802C742C 00220821 */ addu $at, $at, $v0
/* EBDE0 802C7430 8C229F20 */ lw $v0, %lo(jtbl_802D9F20)($at)
/* EBDE4 802C7434 00400008 */ jr $v0
/* EBDE8 802C7438 00000000 */ nop
glabel .L802C743C
/* EBDEC 802C743C 8E030008 */ lw $v1, 0x8($s0)
/* EBDF0 802C7440 24050003 */ addiu $a1, $zero, 0x3
/* EBDF4 802C7444 0060102D */ daddu $v0, $v1, $zero
/* EBDF8 802C7448 AE020164 */ sw $v0, 0x164($s0)
/* EBDFC 802C744C 90620003 */ lbu $v0, 0x3($v1)
/* EBE00 802C7450 24630004 */ addiu $v1, $v1, 0x4
/* EBE04 802C7454 A2020002 */ sb $v0, 0x2($s0)
/* EBE08 802C7458 8C640000 */ lw $a0, 0x0($v1)
/* EBE0C 802C745C 24630004 */ addiu $v1, $v1, 0x4
/* EBE10 802C7460 AE03000C */ sw $v1, 0xC($s0)
/* EBE14 802C7464 A2000005 */ sb $zero, 0x5($s0)
/* EBE18 802C7468 00041080 */ sll $v0, $a0, 2
/* EBE1C 802C746C 00621821 */ addu $v1, $v1, $v0
/* EBE20 802C7470 A2040001 */ sb $a0, 0x1($s0)
/* EBE24 802C7474 080B1E95 */ j .L802C7A54
/* EBE28 802C7478 AE030008 */ sw $v1, 0x8($s0)
glabel .L802C747C
/* EBE2C 802C747C 0C0B1266 */ jal evt_handle_return
/* EBE30 802C7480 0200202D */ daddu $a0, $s0, $zero
/* EBE34 802C7484 080B1E95 */ j .L802C7A54
/* EBE38 802C7488 0040282D */ daddu $a1, $v0, $zero
glabel .L802C748C
/* EBE3C 802C748C 0C0B126E */ jal evt_handle_label
/* EBE40 802C7490 0200202D */ daddu $a0, $s0, $zero
/* EBE44 802C7494 080B1E95 */ j .L802C7A54
/* EBE48 802C7498 0040282D */ daddu $a1, $v0, $zero
glabel .L802C749C
/* EBE4C 802C749C 0C0B1270 */ jal evt_handle_goto
/* EBE50 802C74A0 0200202D */ daddu $a0, $s0, $zero
/* EBE54 802C74A4 080B1E95 */ j .L802C7A54
/* EBE58 802C74A8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C74AC
/* EBE5C 802C74AC 0C0B1280 */ jal evt_handle_loop
/* EBE60 802C74B0 0200202D */ daddu $a0, $s0, $zero
/* EBE64 802C74B4 080B1E95 */ j .L802C7A54
/* EBE68 802C74B8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C74BC
/* EBE6C 802C74BC 0C0B1292 */ jal evt_handle_end_loop
/* EBE70 802C74C0 0200202D */ daddu $a0, $s0, $zero
/* EBE74 802C74C4 080B1E95 */ j .L802C7A54
/* EBE78 802C74C8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C74CC
/* EBE7C 802C74CC 0C0B12C3 */ jal evt_handle_break_loop
/* EBE80 802C74D0 0200202D */ daddu $a0, $s0, $zero
/* EBE84 802C74D4 080B1E95 */ j .L802C7A54
/* EBE88 802C74D8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C74DC
/* EBE8C 802C74DC 0C0B12D7 */ jal evt_handle_wait
/* EBE90 802C74E0 0200202D */ daddu $a0, $s0, $zero
/* EBE94 802C74E4 080B1E95 */ j .L802C7A54
/* EBE98 802C74E8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C74EC
/* EBE9C 802C74EC 0C0B12EE */ jal evt_handle_wait_seconds
/* EBEA0 802C74F0 0200202D */ daddu $a0, $s0, $zero
/* EBEA4 802C74F4 080B1E95 */ j .L802C7A54
/* EBEA8 802C74F8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C74FC
/* EBEAC 802C74FC 0C0B1310 */ jal evt_handle_if_equal
/* EBEB0 802C7500 0200202D */ daddu $a0, $s0, $zero
/* EBEB4 802C7504 080B1E95 */ j .L802C7A54
/* EBEB8 802C7508 0040282D */ daddu $a1, $v0, $zero
glabel .L802C750C
/* EBEBC 802C750C 0C0B1328 */ jal evt_handle_if_not_equal
/* EBEC0 802C7510 0200202D */ daddu $a0, $s0, $zero
/* EBEC4 802C7514 080B1E95 */ j .L802C7A54
/* EBEC8 802C7518 0040282D */ daddu $a1, $v0, $zero
glabel .L802C751C
/* EBECC 802C751C 0C0B1340 */ jal evt_handle_if_less
/* EBED0 802C7520 0200202D */ daddu $a0, $s0, $zero
/* EBED4 802C7524 080B1E95 */ j .L802C7A54
/* EBED8 802C7528 0040282D */ daddu $a1, $v0, $zero
glabel .L802C752C
/* EBEDC 802C752C 0C0B1359 */ jal evt_handle_if_greater
/* EBEE0 802C7530 0200202D */ daddu $a0, $s0, $zero
/* EBEE4 802C7534 080B1E95 */ j .L802C7A54
/* EBEE8 802C7538 0040282D */ daddu $a1, $v0, $zero
glabel .L802C753C
/* EBEEC 802C753C 0C0B1372 */ jal evt_handle_if_less_equal
/* EBEF0 802C7540 0200202D */ daddu $a0, $s0, $zero
/* EBEF4 802C7544 080B1E95 */ j .L802C7A54
/* EBEF8 802C7548 0040282D */ daddu $a1, $v0, $zero
glabel .L802C754C
/* EBEFC 802C754C 0C0B138B */ jal evt_handle_if_greater_equal
/* EBF00 802C7550 0200202D */ daddu $a0, $s0, $zero
/* EBF04 802C7554 080B1E95 */ j .L802C7A54
/* EBF08 802C7558 0040282D */ daddu $a1, $v0, $zero
glabel .L802C755C
/* EBF0C 802C755C 0C0B13A4 */ jal evt_handle_if_AND
/* EBF10 802C7560 0200202D */ daddu $a0, $s0, $zero
/* EBF14 802C7564 080B1E95 */ j .L802C7A54
/* EBF18 802C7568 0040282D */ daddu $a1, $v0, $zero
glabel .L802C756C
/* EBF1C 802C756C 0C0B13BA */ jal evt_handle_if_not_AND
/* EBF20 802C7570 0200202D */ daddu $a0, $s0, $zero
/* EBF24 802C7574 080B1E95 */ j .L802C7A54
/* EBF28 802C7578 0040282D */ daddu $a1, $v0, $zero
glabel .L802C757C
/* EBF2C 802C757C 0C0B13D0 */ jal evt_handle_else
/* EBF30 802C7580 0200202D */ daddu $a0, $s0, $zero
/* EBF34 802C7584 080B1E95 */ j .L802C7A54
/* EBF38 802C7588 0040282D */ daddu $a1, $v0, $zero
glabel .L802C758C
/* EBF3C 802C758C 0C0B13DB */ jal evt_handle_end_if
/* EBF40 802C7590 0200202D */ daddu $a0, $s0, $zero
/* EBF44 802C7594 080B1E95 */ j .L802C7A54
/* EBF48 802C7598 0040282D */ daddu $a1, $v0, $zero
glabel .L802C759C
/* EBF4C 802C759C 0C0B13DD */ jal evt_handle_switch
/* EBF50 802C75A0 0200202D */ daddu $a0, $s0, $zero
/* EBF54 802C75A4 080B1E95 */ j .L802C7A54
/* EBF58 802C75A8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C75AC
/* EBF5C 802C75AC 0C0B13F9 */ jal evt_handle_switch_const
/* EBF60 802C75B0 0200202D */ daddu $a0, $s0, $zero
/* EBF64 802C75B4 080B1E95 */ j .L802C7A54
/* EBF68 802C75B8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C75BC
/* EBF6C 802C75BC 0C0B140C */ jal evt_handle_case_equal
/* EBF70 802C75C0 0200202D */ daddu $a0, $s0, $zero
/* EBF74 802C75C4 080B1E95 */ j .L802C7A54
/* EBF78 802C75C8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C75CC
/* EBF7C 802C75CC 0C0B142F */ jal evt_handle_case_not_equal
/* EBF80 802C75D0 0200202D */ daddu $a0, $s0, $zero
/* EBF84 802C75D4 080B1E95 */ j .L802C7A54
/* EBF88 802C75D8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C75DC
/* EBF8C 802C75DC 0C0B1452 */ jal evt_handle_case_less
/* EBF90 802C75E0 0200202D */ daddu $a0, $s0, $zero
/* EBF94 802C75E4 080B1E95 */ j .L802C7A54
/* EBF98 802C75E8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C75EC
/* EBF9C 802C75EC 0C0B1476 */ jal evt_handle_case_less_equal
/* EBFA0 802C75F0 0200202D */ daddu $a0, $s0, $zero
/* EBFA4 802C75F4 080B1E95 */ j .L802C7A54
/* EBFA8 802C75F8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C75FC
/* EBFAC 802C75FC 0C0B149A */ jal evt_handle_case_greater
/* EBFB0 802C7600 0200202D */ daddu $a0, $s0, $zero
/* EBFB4 802C7604 080B1E95 */ j .L802C7A54
/* EBFB8 802C7608 0040282D */ daddu $a1, $v0, $zero
glabel .L802C760C
/* EBFBC 802C760C 0C0B14BE */ jal evt_handle_case_greater_equal
/* EBFC0 802C7610 0200202D */ daddu $a0, $s0, $zero
/* EBFC4 802C7614 080B1E95 */ j .L802C7A54
/* EBFC8 802C7618 0040282D */ daddu $a1, $v0, $zero
glabel .L802C761C
/* EBFCC 802C761C 0C0B1511 */ jal evt_handle_case_default
/* EBFD0 802C7620 0200202D */ daddu $a0, $s0, $zero
/* EBFD4 802C7624 080B1E95 */ j .L802C7A54
/* EBFD8 802C7628 0040282D */ daddu $a1, $v0, $zero
glabel .L802C762C
/* EBFDC 802C762C 0C0B15B5 */ jal evt_handle_break_case
/* EBFE0 802C7630 0200202D */ daddu $a0, $s0, $zero
/* EBFE4 802C7634 080B1E95 */ j .L802C7A54
/* EBFE8 802C7638 0040282D */ daddu $a1, $v0, $zero
glabel .L802C763C
/* EBFEC 802C763C 0C0B1546 */ jal evt_handle_case_equal_OR
/* EBFF0 802C7640 0200202D */ daddu $a0, $s0, $zero
/* EBFF4 802C7644 080B1E95 */ j .L802C7A54
/* EBFF8 802C7648 0040282D */ daddu $a1, $v0, $zero
glabel .L802C764C
/* EBFFC 802C764C 0C0B1597 */ jal evt_handle_end_case_group
/* EC000 802C7650 0200202D */ daddu $a0, $s0, $zero
/* EC004 802C7654 080B1E95 */ j .L802C7A54
/* EC008 802C7658 0040282D */ daddu $a1, $v0, $zero
glabel .L802C765C
/* EC00C 802C765C 0C0B156E */ jal evt_handle_case_equal_AND
/* EC010 802C7660 0200202D */ daddu $a0, $s0, $zero
/* EC014 802C7664 080B1E95 */ j .L802C7A54
/* EC018 802C7668 0040282D */ daddu $a1, $v0, $zero
glabel .L802C766C
/* EC01C 802C766C 0C0B1527 */ jal evt_handle_case_AND
/* EC020 802C7670 0200202D */ daddu $a0, $s0, $zero
/* EC024 802C7674 080B1E95 */ j .L802C7A54
/* EC028 802C7678 0040282D */ daddu $a1, $v0, $zero
glabel .L802C767C
/* EC02C 802C767C 0C0B14E2 */ jal evt_handle_case_range
/* EC030 802C7680 0200202D */ daddu $a0, $s0, $zero
/* EC034 802C7684 080B1E95 */ j .L802C7A54
/* EC038 802C7688 0040282D */ daddu $a1, $v0, $zero
glabel .L802C768C
/* EC03C 802C768C 0C0B15C6 */ jal evt_handle_end_switch
/* EC040 802C7690 0200202D */ daddu $a0, $s0, $zero
/* EC044 802C7694 080B1E95 */ j .L802C7A54
/* EC048 802C7698 0040282D */ daddu $a1, $v0, $zero
glabel .L802C769C
/* EC04C 802C769C 0C0B15D1 */ jal evt_handle_set_var
/* EC050 802C76A0 0200202D */ daddu $a0, $s0, $zero
/* EC054 802C76A4 080B1E95 */ j .L802C7A54
/* EC058 802C76A8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C76AC
/* EC05C 802C76AC 0C0B15E4 */ jal evt_handle_set_const
/* EC060 802C76B0 0200202D */ daddu $a0, $s0, $zero
/* EC064 802C76B4 080B1E95 */ j .L802C7A54
/* EC068 802C76B8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C76BC
/* EC06C 802C76BC 0C0B15EE */ jal evt_handle_set_float
/* EC070 802C76C0 0200202D */ daddu $a0, $s0, $zero
/* EC074 802C76C4 080B1E95 */ j .L802C7A54
/* EC078 802C76C8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C76CC
/* EC07C 802C76CC 0C0B1601 */ jal evt_handle_add
/* EC080 802C76D0 0200202D */ daddu $a0, $s0, $zero
/* EC084 802C76D4 080B1E95 */ j .L802C7A54
/* EC088 802C76D8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C76DC
/* EC08C 802C76DC 0C0B161A */ jal evt_handle_subtract
/* EC090 802C76E0 0200202D */ daddu $a0, $s0, $zero
/* EC094 802C76E4 080B1E95 */ j .L802C7A54
/* EC098 802C76E8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C76EC
/* EC09C 802C76EC 0C0B1633 */ jal evt_handle_multiply
/* EC0A0 802C76F0 0200202D */ daddu $a0, $s0, $zero
/* EC0A4 802C76F4 080B1E95 */ j .L802C7A54
/* EC0A8 802C76F8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C76FC
/* EC0AC 802C76FC 0C0B164D */ jal evt_handle_divide
/* EC0B0 802C7700 0200202D */ daddu $a0, $s0, $zero
/* EC0B4 802C7704 080B1E95 */ j .L802C7A54
/* EC0B8 802C7708 0040282D */ daddu $a1, $v0, $zero
glabel .L802C770C
/* EC0BC 802C770C 0C0B166F */ jal evt_handle_mod
/* EC0C0 802C7710 0200202D */ daddu $a0, $s0, $zero
/* EC0C4 802C7714 080B1E95 */ j .L802C7A54
/* EC0C8 802C7718 0040282D */ daddu $a1, $v0, $zero
glabel .L802C771C
/* EC0CC 802C771C 0C0B16A1 */ jal evt_handle_addF
/* EC0D0 802C7720 0200202D */ daddu $a0, $s0, $zero
/* EC0D4 802C7724 080B1E95 */ j .L802C7A54
/* EC0D8 802C7728 0040282D */ daddu $a1, $v0, $zero
glabel .L802C772C
/* EC0DC 802C772C 0C0B16BB */ jal evt_handle_subtractF
/* EC0E0 802C7730 0200202D */ daddu $a0, $s0, $zero
/* EC0E4 802C7734 080B1E95 */ j .L802C7A54
/* EC0E8 802C7738 0040282D */ daddu $a1, $v0, $zero
glabel .L802C773C
/* EC0EC 802C773C 0C0B16D5 */ jal evt_handle_multiplyF
/* EC0F0 802C7740 0200202D */ daddu $a0, $s0, $zero
/* EC0F4 802C7744 080B1E95 */ j .L802C7A54
/* EC0F8 802C7748 0040282D */ daddu $a1, $v0, $zero
glabel .L802C774C
/* EC0FC 802C774C 0C0B16F0 */ jal evt_handle_divideF
/* EC100 802C7750 0200202D */ daddu $a0, $s0, $zero
/* EC104 802C7754 080B1E95 */ j .L802C7A54
/* EC108 802C7758 0040282D */ daddu $a1, $v0, $zero
glabel .L802C775C
/* EC10C 802C775C 0C0B170A */ jal evt_handle_set_int_buffer_ptr
/* EC110 802C7760 0200202D */ daddu $a0, $s0, $zero
/* EC114 802C7764 080B1E95 */ j .L802C7A54
/* EC118 802C7768 0040282D */ daddu $a1, $v0, $zero
glabel .L802C776C
/* EC11C 802C776C 0C0B1724 */ jal evt_handle_get_1_word
/* EC120 802C7770 0200202D */ daddu $a0, $s0, $zero
/* EC124 802C7774 080B1E95 */ j .L802C7A54
/* EC128 802C7778 0040282D */ daddu $a1, $v0, $zero
glabel .L802C777C
/* EC12C 802C777C 0C0B1731 */ jal evt_handle_get_2_word
/* EC130 802C7780 0200202D */ daddu $a0, $s0, $zero
/* EC134 802C7784 080B1E95 */ j .L802C7A54
/* EC138 802C7788 0040282D */ daddu $a1, $v0, $zero
glabel .L802C778C
/* EC13C 802C778C 0C0B174B */ jal evt_handle_get_3_word
/* EC140 802C7790 0200202D */ daddu $a0, $s0, $zero
/* EC144 802C7794 080B1E95 */ j .L802C7A54
/* EC148 802C7798 0040282D */ daddu $a1, $v0, $zero
glabel .L802C779C
/* EC14C 802C779C 0C0B176D */ jal evt_handle_get_4_word
/* EC150 802C77A0 0200202D */ daddu $a0, $s0, $zero
/* EC154 802C77A4 080B1E95 */ j .L802C7A54
/* EC158 802C77A8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C77AC
/* EC15C 802C77AC 0C0B1797 */ jal evt_handle_get_Nth_word
/* EC160 802C77B0 0200202D */ daddu $a0, $s0, $zero
/* EC164 802C77B4 080B1E95 */ j .L802C7A54
/* EC168 802C77B8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C77BC
/* EC16C 802C77BC 0C0B1717 */ jal evt_handle_set_float_buffer_ptr
/* EC170 802C77C0 0200202D */ daddu $a0, $s0, $zero
/* EC174 802C77C4 080B1E95 */ j .L802C7A54
/* EC178 802C77C8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C77CC
/* EC17C 802C77CC 0C0B17AD */ jal evt_handle_get_1_float
/* EC180 802C77D0 0200202D */ daddu $a0, $s0, $zero
/* EC184 802C77D4 080B1E95 */ j .L802C7A54
/* EC188 802C77D8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C77DC
/* EC18C 802C77DC 0C0B17C3 */ jal evt_handle_get_2_float
/* EC190 802C77E0 0200202D */ daddu $a0, $s0, $zero
/* EC194 802C77E4 080B1E95 */ j .L802C7A54
/* EC198 802C77E8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C77EC
/* EC19C 802C77EC 0C0B17E7 */ jal evt_handle_get_3_float
/* EC1A0 802C77F0 0200202D */ daddu $a0, $s0, $zero
/* EC1A4 802C77F4 080B1E95 */ j .L802C7A54
/* EC1A8 802C77F8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C77FC
/* EC1AC 802C77FC 0C0B1817 */ jal evt_handle_get_4_float
/* EC1B0 802C7800 0200202D */ daddu $a0, $s0, $zero
/* EC1B4 802C7804 080B1E95 */ j .L802C7A54
/* EC1B8 802C7808 0040282D */ daddu $a1, $v0, $zero
glabel .L802C780C
/* EC1BC 802C780C 0C0B1853 */ jal evt_handle_get_Nth_float
/* EC1C0 802C7810 0200202D */ daddu $a0, $s0, $zero
/* EC1C4 802C7814 080B1E95 */ j .L802C7A54
/* EC1C8 802C7818 0040282D */ daddu $a1, $v0, $zero
glabel .L802C781C
/* EC1CC 802C781C 0C0B186B */ jal evt_handle_set_array
/* EC1D0 802C7820 0200202D */ daddu $a0, $s0, $zero
/* EC1D4 802C7824 080B1E95 */ j .L802C7A54
/* EC1D8 802C7828 0040282D */ daddu $a1, $v0, $zero
glabel .L802C782C
/* EC1DC 802C782C 0C0B1878 */ jal evt_handle_set_flag_array
/* EC1E0 802C7830 0200202D */ daddu $a0, $s0, $zero
/* EC1E4 802C7834 080B1E95 */ j .L802C7A54
/* EC1E8 802C7838 0040282D */ daddu $a1, $v0, $zero
glabel .L802C783C
/* EC1EC 802C783C 0C0B1885 */ jal evt_handle_allocate_array
/* EC1F0 802C7840 0200202D */ daddu $a0, $s0, $zero
/* EC1F4 802C7844 080B1E95 */ j .L802C7A54
/* EC1F8 802C7848 0040282D */ daddu $a1, $v0, $zero
glabel .L802C784C
/* EC1FC 802C784C 0C0B1A1C */ jal evt_handle_kill
/* EC200 802C7850 0200202D */ daddu $a0, $s0, $zero
/* EC204 802C7854 080B1E95 */ j .L802C7A54
/* EC208 802C7858 0040282D */ daddu $a1, $v0, $zero
glabel .L802C785C
/* EC20C 802C785C 0C0B189C */ jal evt_handle_AND
/* EC210 802C7860 0200202D */ daddu $a0, $s0, $zero
/* EC214 802C7864 080B1E95 */ j .L802C7A54
/* EC218 802C7868 0040282D */ daddu $a1, $v0, $zero
glabel .L802C786C
/* EC21C 802C786C 0C0B18B5 */ jal evt_handle_AND_const
/* EC220 802C7870 0200202D */ daddu $a0, $s0, $zero
/* EC224 802C7874 080B1E95 */ j .L802C7A54
/* EC228 802C7878 0040282D */ daddu $a1, $v0, $zero
glabel .L802C787C
/* EC22C 802C787C 0C0B18CB */ jal evt_handle_OR
/* EC230 802C7880 0200202D */ daddu $a0, $s0, $zero
/* EC234 802C7884 080B1E95 */ j .L802C7A54
/* EC238 802C7888 0040282D */ daddu $a1, $v0, $zero
glabel .L802C788C
/* EC23C 802C788C 0C0B18E4 */ jal evt_handle_OR_const
/* EC240 802C7890 0200202D */ daddu $a0, $s0, $zero
/* EC244 802C7894 080B1E95 */ j .L802C7A54
/* EC248 802C7898 0040282D */ daddu $a1, $v0, $zero
glabel .L802C789C
/* EC24C 802C789C 0C0B18FA */ jal evt_handle_call
/* EC250 802C78A0 0200202D */ daddu $a0, $s0, $zero
/* EC254 802C78A4 080B1E95 */ j .L802C7A54
/* EC258 802C78A8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C78AC
/* EC25C 802C78AC 0C0B191B */ jal evt_handle_exec1
/* EC260 802C78B0 0200202D */ daddu $a0, $s0, $zero
/* EC264 802C78B4 080B1E95 */ j .L802C7A54
/* EC268 802C78B8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C78BC
/* EC26C 802C78BC 0C0B1949 */ jal evt_handle_exec1_get_id
/* EC270 802C78C0 0200202D */ daddu $a0, $s0, $zero
/* EC274 802C78C4 080B1E95 */ j .L802C7A54
/* EC278 802C78C8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C78CC
/* EC27C 802C78CC 0C0B197F */ jal evt_handle_exec_wait
/* EC280 802C78D0 0200202D */ daddu $a0, $s0, $zero
/* EC284 802C78D4 080B1E95 */ j .L802C7A54
/* EC288 802C78D8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C78DC
/* EC28C 802C78DC 0C0B19C5 */ jal evt_handle_bind
/* EC290 802C78E0 0200202D */ daddu $a0, $s0, $zero
/* EC294 802C78E4 080B1E95 */ j .L802C7A54
/* EC298 802C78E8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C78EC
/* EC29C 802C78EC 0C0B1A14 */ jal evt_handle_unbind
/* EC2A0 802C78F0 0200202D */ daddu $a0, $s0, $zero
/* EC2A4 802C78F4 080B1E95 */ j .L802C7A54
/* EC2A8 802C78F8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C78FC
/* EC2AC 802C78FC 0C0B1A27 */ jal evt_handle_set_priority
/* EC2B0 802C7900 0200202D */ daddu $a0, $s0, $zero
/* EC2B4 802C7904 080B1E95 */ j .L802C7A54
/* EC2B8 802C7908 0040282D */ daddu $a1, $v0, $zero
glabel .L802C790C
/* EC2BC 802C790C 0C0B1A36 */ jal evt_handle_set_timescale
/* EC2C0 802C7910 0200202D */ daddu $a0, $s0, $zero
/* EC2C4 802C7914 080B1E95 */ j .L802C7A54
/* EC2C8 802C7918 0040282D */ daddu $a1, $v0, $zero
glabel .L802C791C
/* EC2CC 802C791C 0C0B1A45 */ jal evt_handle_set_group
/* EC2D0 802C7920 0200202D */ daddu $a0, $s0, $zero
/* EC2D4 802C7924 080B1E95 */ j .L802C7A54
/* EC2D8 802C7928 0040282D */ daddu $a1, $v0, $zero
glabel .L802C792C
/* EC2DC 802C792C 0C0B1990 */ jal evt_handle_jump
/* EC2E0 802C7930 0200202D */ daddu $a0, $s0, $zero
/* EC2E4 802C7934 080B1E95 */ j .L802C7A54
/* EC2E8 802C7938 0040282D */ daddu $a1, $v0, $zero
glabel .L802C793C
/* EC2EC 802C793C 0C0B1AD5 */ jal evt_handle_bind_lock
/* EC2F0 802C7940 0200202D */ daddu $a0, $s0, $zero
/* EC2F4 802C7944 080B1E95 */ j .L802C7A54
/* EC2F8 802C7948 0040282D */ daddu $a1, $v0, $zero
glabel .L802C794C
/* EC2FC 802C794C 0C0B1A54 */ jal evt_handle_suspend_all
/* EC300 802C7950 0200202D */ daddu $a0, $s0, $zero
/* EC304 802C7954 080B1E95 */ j .L802C7A54
/* EC308 802C7958 0040282D */ daddu $a1, $v0, $zero
glabel .L802C795C
/* EC30C 802C795C 0C0B1A5F */ jal evt_handle_resume_all
/* EC310 802C7960 0200202D */ daddu $a0, $s0, $zero
/* EC314 802C7964 080B1E95 */ j .L802C7A54
/* EC318 802C7968 0040282D */ daddu $a1, $v0, $zero
glabel .L802C796C
/* EC31C 802C796C 0C0B1A6A */ jal evt_handle_suspend_others
/* EC320 802C7970 0200202D */ daddu $a0, $s0, $zero
/* EC324 802C7974 080B1E95 */ j .L802C7A54
/* EC328 802C7978 0040282D */ daddu $a1, $v0, $zero
glabel .L802C797C
/* EC32C 802C797C 0C0B1A79 */ jal evt_handle_resume_others
/* EC330 802C7980 0200202D */ daddu $a0, $s0, $zero
/* EC334 802C7984 080B1E95 */ j .L802C7A54
/* EC338 802C7988 0040282D */ daddu $a1, $v0, $zero
glabel .L802C798C
/* EC33C 802C798C 0C0B1A88 */ jal evt_handle_suspend
/* EC340 802C7990 0200202D */ daddu $a0, $s0, $zero
/* EC344 802C7994 080B1E95 */ j .L802C7A54
/* EC348 802C7998 0040282D */ daddu $a1, $v0, $zero
glabel .L802C799C
/* EC34C 802C799C 0C0B1A93 */ jal evt_handle_resume
/* EC350 802C79A0 0200202D */ daddu $a0, $s0, $zero
/* EC354 802C79A4 080B1E95 */ j .L802C7A54
/* EC358 802C79A8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C79AC
/* EC35C 802C79AC 0C0B1A9E */ jal evt_handle_does_script_exist
/* EC360 802C79B0 0200202D */ daddu $a0, $s0, $zero
/* EC364 802C79B4 080B1E95 */ j .L802C7A54
/* EC368 802C79B8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C79BC
/* EC36C 802C79BC 0C0B1B1E */ jal evt_handle_thread
/* EC370 802C79C0 0200202D */ daddu $a0, $s0, $zero
/* EC374 802C79C4 080B1E95 */ j .L802C7A54
/* EC378 802C79C8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C79CC
/* EC37C 802C79CC 0C0B1B53 */ jal evt_handle_end_thread
/* EC380 802C79D0 0200202D */ daddu $a0, $s0, $zero
/* EC384 802C79D4 080B1E95 */ j .L802C7A54
/* EC388 802C79D8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C79DC
/* EC38C 802C79DC 0C0B1B5B */ jal evt_handle_child_thread
/* EC390 802C79E0 0200202D */ daddu $a0, $s0, $zero
/* EC394 802C79E4 080B1E95 */ j .L802C7A54
/* EC398 802C79E8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C79EC
/* EC39C 802C79EC 0C0B1B7D */ jal evt_handle_end_child_thread
/* EC3A0 802C79F0 0200202D */ daddu $a0, $s0, $zero
/* EC3A4 802C79F4 080B1E95 */ j .L802C7A54
/* EC3A8 802C79F8 0040282D */ daddu $a1, $v0, $zero
glabel .L802C79FC
/* EC3AC 802C79FC 0C0B1B85 */ jal evt_handle_debug_log
/* EC3B0 802C7A00 0200202D */ daddu $a0, $s0, $zero
/* EC3B4 802C7A04 080B1E95 */ j .L802C7A54
/* EC3B8 802C7A08 0040282D */ daddu $a1, $v0, $zero
glabel .L802C7A0C
/* EC3BC 802C7A0C 0C0B1B87 */ jal evt_handle_print_debug_var
/* EC3C0 802C7A10 0200202D */ daddu $a0, $s0, $zero
/* EC3C4 802C7A14 080B1E95 */ j .L802C7A54
/* EC3C8 802C7A18 0040282D */ daddu $a1, $v0, $zero
glabel .L802C7A1C
/* EC3CC 802C7A1C 0C0B1CE7 */ jal func_802C739C
/* EC3D0 802C7A20 0200202D */ daddu $a0, $s0, $zero
/* EC3D4 802C7A24 080B1E95 */ j .L802C7A54
/* EC3D8 802C7A28 0040282D */ daddu $a1, $v0, $zero
glabel .L802C7A2C
/* EC3DC 802C7A2C 0C0B1CEC */ jal func_802C73B0
/* EC3E0 802C7A30 0200202D */ daddu $a0, $s0, $zero
/* EC3E4 802C7A34 080B1E95 */ j .L802C7A54
/* EC3E8 802C7A38 0040282D */ daddu $a1, $v0, $zero
glabel .L802C7A3C
/* EC3EC 802C7A3C 0C0B1CEE */ jal func_802C73B8
/* EC3F0 802C7A40 0200202D */ daddu $a0, $s0, $zero
/* EC3F4 802C7A44 080B1E95 */ j .L802C7A54
/* EC3F8 802C7A48 0040282D */ daddu $a1, $v0, $zero
.L802C7A4C:
/* EC3FC 802C7A4C 080B1E93 */ j .L802C7A4C
/* EC400 802C7A50 00000000 */ nop
glabel .L802C7A54
/* EC404 802C7A54 24020003 */ addiu $v0, $zero, 0x3
/* EC408 802C7A58 10A2FE6E */ beq $a1, $v0, .L802C7414
/* EC40C 802C7A5C 240200FF */ addiu $v0, $zero, 0xFF
/* EC410 802C7A60 10A20012 */ beq $a1, $v0, .L802C7AAC
/* EC414 802C7A64 2402FFFF */ addiu $v0, $zero, -0x1
/* EC418 802C7A68 04A00010 */ bltz $a1, .L802C7AAC
/* EC41C 802C7A6C 24020001 */ addiu $v0, $zero, 0x1
/* EC420 802C7A70 50A0000E */ beql $a1, $zero, .L802C7AAC
/* EC424 802C7A74 0000102D */ daddu $v0, $zero, $zero
/* EC428 802C7A78 14A20003 */ bne $a1, $v0, .L802C7A88
/* EC42C 802C7A7C 24020002 */ addiu $v0, $zero, 0x2
/* EC430 802C7A80 080B1EAA */ j .L802C7AA8
/* EC434 802C7A84 A2000002 */ sb $zero, 0x2($s0)
.L802C7A88:
/* EC438 802C7A88 14A2FE62 */ bne $a1, $v0, .L802C7414
/* EC43C 802C7A8C 00000000 */ nop
/* EC440 802C7A90 A2000002 */ sb $zero, 0x2($s0)
/* EC444 802C7A94 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* EC448 802C7A98 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* EC44C 802C7A9C 80420078 */ lb $v0, 0x78($v0)
/* EC450 802C7AA0 1445FE5C */ bne $v0, $a1, .L802C7414
/* EC454 802C7AA4 00000000 */ nop
.L802C7AA8:
/* EC458 802C7AA8 0000102D */ daddu $v0, $zero, $zero
.L802C7AAC:
/* EC45C 802C7AAC 8FBF0014 */ lw $ra, 0x14($sp)
/* EC460 802C7AB0 8FB00010 */ lw $s0, 0x10($sp)
/* EC464 802C7AB4 03E00008 */ jr $ra
/* EC468 802C7AB8 27BD0018 */ addiu $sp, $sp, 0x18
### DECOMPILED C INSTRUCTIONS:
s32 evt_execute_next_command(Evt* script) {
while (TRUE) {
s32 status = ApiStatus_DONE2;
s32* lines;
s32 nargs;
switch (script->currentOpcode) {
case EVT_OP_INTERNAL_FETCH:
script->ptrCurrentLine = script->ptrNextLine;
lines = script->ptrNextLine;
script->currentOpcode = *lines++;
nargs = *lines++;
script->ptrReadPos = lines;
script->blocked = FALSE;
script->currentArgc = nargs;
lines = &lines[nargs];
script->ptrNextLine = lines;
status = ApiStatus_REPEAT;
break;
case EVT_OP_RETURN:
status = evt_handle_return(script);
break;
case EVT_OP_LABEL:
status = evt_handle_label(script);
break;
case EVT_OP_GOTO:
status = evt_handle_goto(script);
break;
case EVT_OP_LOOP:
status = evt_handle_loop(script);
break;
case EVT_OP_END_LOOP:
status = evt_handle_end_loop(script);
break;
case EVT_OP_BREAK_LOOP:
status = evt_handle_break_loop(script);
break;
case EVT_OP_WAIT_FRAMES:
status = evt_handle_wait(script);
break;
case EVT_OP_WAIT_SECS:
status = evt_handle_wait_seconds(script);
break;
case EVT_OP_IF_EQ:
status = evt_handle_if_equal(script);
break;
case EVT_OP_IF_NE:
status = evt_handle_if_not_equal(script);
break;
case EVT_OP_IF_LT:
status = evt_handle_if_less(script);
break;
case EVT_OP_IF_GT:
status = evt_handle_if_greater(script);
break;
case EVT_OP_IF_LE:
status = evt_handle_if_less_equal(script);
break;
case EVT_OP_IF_GE:
status = evt_handle_if_greater_equal(script);
break;
case EVT_OP_IF_FLAG:
status = evt_handle_if_AND(script);
break;
case EVT_OP_IF_NOT_FLAG:
status = evt_handle_if_not_AND(script);
break;
case EVT_OP_ELSE:
status = evt_handle_else(script);
break;
case EVT_OP_END_IF:
status = evt_handle_end_if(script);
break;
case EVT_OP_SWITCH:
status = evt_handle_switch(script);
break;
case EVT_OP_SWITCH_CONST:
status = evt_handle_switch_const(script);
break;
case EVT_OP_CASE_EQ:
status = evt_handle_case_equal(script);
break;
case EVT_OP_CASE_NE:
status = evt_handle_case_not_equal(script);
break;
case EVT_OP_CASE_LT:
status = evt_handle_case_less(script);
break;
case EVT_OP_CASE_LE:
status = evt_handle_case_less_equal(script);
break;
case EVT_OP_CASE_GT:
status = evt_handle_case_greater(script);
break;
case EVT_OP_CASE_GE:
status = evt_handle_case_greater_equal(script);
break;
case EVT_OP_CASE_DEFAULT:
status = evt_handle_case_default(script);
break;
case EVT_OP_BREAK_SWITCH:
status = evt_handle_break_case(script);
break;
case EVT_OP_CASE_OR_EQ:
status = evt_handle_case_equal_OR(script);
break;
case EVT_OP_END_CASE_GROUP:
status = evt_handle_end_case_group(script);
break;
case EVT_OP_CASE_AND_EQ:
status = evt_handle_case_equal_AND(script);
break;
case EVT_OP_CASE_FLAG:
status = evt_handle_case_AND(script);
break;
case EVT_OP_CASE_RANGE:
status = evt_handle_case_range(script);
break;
case EVT_OP_END_SWITCH:
status = evt_handle_end_switch(script);
break;
case EVT_OP_SET:
status = evt_handle_set_var(script);
break;
case EVT_OP_SET_CONST:
status = evt_handle_set_const(script);
break;
case EVT_OP_SETF:
status = evt_handle_set_float(script);
break;
case EVT_OP_ADD:
status = evt_handle_add(script);
break;
case EVT_OP_SUB:
status = evt_handle_subtract(script);
break;
case EVT_OP_MUL:
status = evt_handle_multiply(script);
break;
case EVT_OP_DIV:
status = evt_handle_divide(script);
break;
case EVT_OP_MOD:
status = evt_handle_mod(script);
break;
case EVT_OP_ADDF:
status = evt_handle_addF(script);
break;
case EVT_OP_SUBF:
status = evt_handle_subtractF(script);
break;
case EVT_OP_MULF:
status = evt_handle_multiplyF(script);
break;
case EVT_OP_DIVF:
status = evt_handle_divideF(script);
break;
case EVT_OP_USE_BUF:
status = evt_handle_set_int_buffer_ptr(script);
break;
case EVT_OP_BUF_READ1:
status = evt_handle_get_1_word(script);
break;
case EVT_OP_BUF_READ2:
status = evt_handle_get_2_word(script);
break;
case EVT_OP_BUF_READ3:
status = evt_handle_get_3_word(script);
break;
case EVT_OP_BUF_READ4:
status = evt_handle_get_4_word(script);
break;
case EVT_OP_BUF_PEEK:
status = evt_handle_get_Nth_word(script);
break;
case EVT_OP_USE_FBUF:
status = evt_handle_set_float_buffer_ptr(script);
break;
case EVT_OP_FBUF_READ1:
status = evt_handle_get_1_float(script);
break;
case EVT_OP_FBUF_READ2:
status = evt_handle_get_2_float(script);
break;
case EVT_OP_FBUF_READ3:
status = evt_handle_get_3_float(script);
break;
case EVT_OP_FBUF_READ4:
status = evt_handle_get_4_float(script);
break;
case EVT_OP_FBUF_PEEK:
status = evt_handle_get_Nth_float(script);
break;
case EVT_OP_USE_ARRAY:
status = evt_handle_set_array(script);
break;
case EVT_OP_USE_FLAGS:
status = evt_handle_set_flag_array(script);
break;
case EVT_OP_MALLOC_ARRAY:
status = evt_handle_allocate_array(script);
break;
case EVT_OP_KILL_THREAD:
status = evt_handle_kill(script);
break;
case EVT_OP_BITWISE_AND:
status = evt_handle_AND(script);
break;
case EVT_OP_BITWISE_AND_CONST:
status = evt_handle_AND_const(script);
break;
case EVT_OP_BITWISE_OR:
status = evt_handle_OR(script);
break;
case EVT_OP_BITWISE_OR_CONST:
status = evt_handle_OR_const(script);
break;
case EVT_OP_CALL:
status = evt_handle_call(script);
break;
case EVT_OP_EXEC:
status = evt_handle_exec1(script);
break;
case EVT_OP_EXEC_GET_TID:
status = evt_handle_exec1_get_id(script);
break;
case EVT_OP_EXEC_WAIT:
status = evt_handle_exec_wait(script);
break;
case EVT_OP_BIND_TRIGGER:
status = evt_handle_bind(script);
break;
case EVT_OP_UNBIND:
status = evt_handle_unbind(script);
break;
case EVT_OP_SET_PRIORITY:
status = evt_handle_set_priority(script);
break;
case EVT_OP_SET_TIMESCALE:
status = evt_handle_set_timescale(script);
break;
case EVT_OP_SET_GROUP:
status = evt_handle_set_group(script);
break;
case EVT_OP_JUMP:
status = evt_handle_jump(script);
break;
case EVT_OP_BIND_PADLOCK:
status = evt_handle_bind_lock(script);
break;
case EVT_OP_SUSPEND_GROUP:
status = evt_handle_suspend_all(script);
break;
case EVT_OP_RESUME_GROUP:
status = evt_handle_resume_all(script);
break;
case EVT_OP_SUSPEND_OTHERS:
status = evt_handle_suspend_others(script);
break;
case EVT_OP_RESUME_OTHERS:
status = evt_handle_resume_others(script);
break;
case EVT_OP_SUSPEND_THREAD:
status = evt_handle_suspend(script);
break;
case EVT_OP_RESUME_THREAD:
status = evt_handle_resume(script);
break;
case EVT_OP_IS_THREAD_RUNNING:
status = evt_handle_does_script_exist(script);
break;
case EVT_OP_THREAD:
status = evt_handle_thread(script);
break;
case EVT_OP_END_THREAD:
status = evt_handle_end_thread(script);
break;
case EVT_OP_CHILD_THREAD:
status = evt_handle_child_thread(script);
break;
case EVT_OP_END_CHILD_THREAD:
status = evt_handle_end_child_thread(script);
break;
case EVT_OP_DEBUG_LOG:
status = evt_handle_debug_log(script);
break;
case EVT_OP_DEBUG_PRINT_VAR:
status = evt_handle_print_debug_var(script);
break;
case EVT_OP_92:
status = func_802C739C(script);
break;
case EVT_OP_93:
status = func_802C73B0(script);
break;
case EVT_OP_94:
status = func_802C73B8(script);
case EVT_OP_END:
break;
default:
PANIC();
}
if (status == ApiStatus_REPEAT) {
continue;
}
if (status == ApiStatus_FINISH) {
return EVT_CMD_RESULT_YIELD;
}
if (status < 0) {
return EVT_CMD_RESULT_ERROR;
}
// TODO: this may be able to be a switch but I couldn't get it
if (status == ApiStatus_BLOCK) {
// return 0
} else if (status == ApiStatus_DONE1) {
script->currentOpcode = EVT_OP_INTERNAL_FETCH;
// return 0
} else if (status == ApiStatus_DONE2) {
script->currentOpcode = EVT_OP_INTERNAL_FETCH;
if (gGameStatusPtr->disableScripts != status) {
continue;
}
// return 0
} else {
continue;
}
return EVT_CMD_RESULT_CONTINUE;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_802571F0
/* 185AD0 802571F0 27BDFC38 */ addiu $sp, $sp, -0x3C8
/* 185AD4 802571F4 AFB20378 */ sw $s2, 0x378($sp)
/* 185AD8 802571F8 00A0902D */ daddu $s2, $a1, $zero
/* 185ADC 802571FC AFBF0394 */ sw $ra, 0x394($sp)
/* 185AE0 80257200 AFBE0390 */ sw $fp, 0x390($sp)
/* 185AE4 80257204 AFB7038C */ sw $s7, 0x38C($sp)
/* 185AE8 80257208 AFB60388 */ sw $s6, 0x388($sp)
/* 185AEC 8025720C AFB50384 */ sw $s5, 0x384($sp)
/* 185AF0 80257210 AFB40380 */ sw $s4, 0x380($sp)
/* 185AF4 80257214 AFB3037C */ sw $s3, 0x37C($sp)
/* 185AF8 80257218 AFB10374 */ sw $s1, 0x374($sp)
/* 185AFC 8025721C AFB00370 */ sw $s0, 0x370($sp)
/* 185B00 80257220 F7BE03C0 */ sdc1 $f30, 0x3C0($sp)
/* 185B04 80257224 F7BC03B8 */ sdc1 $f28, 0x3B8($sp)
/* 185B08 80257228 F7BA03B0 */ sdc1 $f26, 0x3B0($sp)
/* 185B0C 8025722C F7B803A8 */ sdc1 $f24, 0x3A8($sp)
/* 185B10 80257230 F7B603A0 */ sdc1 $f22, 0x3A0($sp)
/* 185B14 80257234 F7B40398 */ sdc1 $f20, 0x398($sp)
/* 185B18 80257238 AFA403C8 */ sw $a0, 0x3C8($sp)
/* 185B1C 8025723C 86420150 */ lh $v0, 0x150($s2)
/* 185B20 80257240 C6400144 */ lwc1 $f0, 0x144($s2)
/* 185B24 80257244 44821000 */ mtc1 $v0, $f2
/* 185B28 80257248 00000000 */ nop
/* 185B2C 8025724C 468010A0 */ cvt.s.w $f2, $f2
/* 185B30 80257250 46020000 */ add.s $f0, $f0, $f2
/* 185B34 80257254 8E420000 */ lw $v0, 0x0($s2)
/* 185B38 80257258 30420800 */ andi $v0, $v0, 0x800
/* 185B3C 8025725C 14400008 */ bnez $v0, .L80257280
/* 185B40 80257260 E7A00358 */ swc1 $f0, 0x358($sp)
/* 185B44 80257264 86420152 */ lh $v0, 0x152($s2)
/* 185B48 80257268 C6420148 */ lwc1 $f2, 0x148($s2)
/* 185B4C 8025726C 44820000 */ mtc1 $v0, $f0
/* 185B50 80257270 00000000 */ nop
/* 185B54 80257274 46800020 */ cvt.s.w $f0, $f0
/* 185B58 80257278 08095CA6 */ j .L80257298
/* 185B5C 8025727C 46001080 */ add.s $f2, $f2, $f0
.L80257280:
/* 185B60 80257280 86420152 */ lh $v0, 0x152($s2)
/* 185B64 80257284 C6420148 */ lwc1 $f2, 0x148($s2)
/* 185B68 80257288 44820000 */ mtc1 $v0, $f0
/* 185B6C 8025728C 00000000 */ nop
/* 185B70 80257290 46800020 */ cvt.s.w $f0, $f0
/* 185B74 80257294 46001081 */ sub.s $f2, $f2, $f0
.L80257298:
/* 185B78 80257298 E7A2035C */ swc1 $f2, 0x35C($sp)
/* 185B7C 8025729C 86420154 */ lh $v0, 0x154($s2)
/* 185B80 802572A0 C642014C */ lwc1 $f2, 0x14C($s2)
/* 185B84 802572A4 44820000 */ mtc1 $v0, $f0
/* 185B88 802572A8 00000000 */ nop
/* 185B8C 802572AC 46800020 */ cvt.s.w $f0, $f0
/* 185B90 802572B0 46001080 */ add.s $f2, $f2, $f0
/* 185B94 802572B4 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 185B98 802572B8 44810000 */ mtc1 $at, $f0
/* 185B9C 802572BC 8E420000 */ lw $v0, 0x0($s2)
/* 185BA0 802572C0 46001081 */ sub.s $f2, $f2, $f0
/* 185BA4 802572C4 30420800 */ andi $v0, $v0, 0x800
/* 185BA8 802572C8 14400025 */ bnez $v0, .L80257360
/* 185BAC 802572CC E7A20360 */ swc1 $f2, 0x360($sp)
/* 185BB0 802572D0 86420168 */ lh $v0, 0x168($s2)
/* 185BB4 802572D4 C6420188 */ lwc1 $f2, 0x188($s2)
/* 185BB8 802572D8 00021023 */ negu $v0, $v0
/* 185BBC 802572DC 44820000 */ mtc1 $v0, $f0
/* 185BC0 802572E0 00000000 */ nop
/* 185BC4 802572E4 46800020 */ cvt.s.w $f0, $f0
/* 185BC8 802572E8 46020002 */ mul.s $f0, $f0, $f2
/* 185BCC 802572EC 00000000 */ nop
/* 185BD0 802572F0 8642016A */ lh $v0, 0x16A($s2)
/* 185BD4 802572F4 00021023 */ negu $v0, $v0
/* 185BD8 802572F8 44050000 */ mfc1 $a1, $f0
/* 185BDC 802572FC 44820000 */ mtc1 $v0, $f0
D_80257300:
/* 185BE0 80257300 00000000 */ nop
/* 185BE4 80257304 46800020 */ cvt.s.w $f0, $f0
/* 185BE8 80257308 46020002 */ mul.s $f0, $f0, $f2
/* 185BEC 8025730C 00000000 */ nop
/* 185BF0 80257310 8642016C */ lh $v0, 0x16C($s2)
/* 185BF4 80257314 00021023 */ negu $v0, $v0
/* 185BF8 80257318 44060000 */ mfc1 $a2, $f0
/* 185BFC 8025731C 44820000 */ mtc1 $v0, $f0
D_80257320:
/* 185C00 80257320 00000000 */ nop
/* 185C04 80257324 46800020 */ cvt.s.w $f0, $f0
/* 185C08 80257328 46020002 */ mul.s $f0, $f0, $f2
/* 185C0C 8025732C 00000000 */ nop
/* 185C10 80257330 44070000 */ mfc1 $a3, $f0
/* 185C14 80257334 0C019E40 */ jal guTranslateF
/* 185C18 80257338 27A40158 */ addiu $a0, $sp, 0x158
/* 185C1C 8025733C 86420168 */ lh $v0, 0x168($s2)
/* 185C20 80257340 C6420188 */ lwc1 $f2, 0x188($s2)
/* 185C24 80257344 44820000 */ mtc1 $v0, $f0
/* 185C28 80257348 00000000 */ nop
/* 185C2C 8025734C 46800020 */ cvt.s.w $f0, $f0
/* 185C30 80257350 46020002 */ mul.s $f0, $f0, $f2
/* 185C34 80257354 00000000 */ nop
/* 185C38 80257358 08095CFB */ j .L802573EC
/* 185C3C 8025735C 8642016A */ lh $v0, 0x16A($s2)
.L80257360:
/* 185C40 80257360 86420168 */ lh $v0, 0x168($s2)
/* 185C44 80257364 C6420188 */ lwc1 $f2, 0x188($s2)
/* 185C48 80257368 00021023 */ negu $v0, $v0
/* 185C4C 8025736C 44820000 */ mtc1 $v0, $f0
/* 185C50 80257370 00000000 */ nop
/* 185C54 80257374 46800020 */ cvt.s.w $f0, $f0
/* 185C58 80257378 46020002 */ mul.s $f0, $f0, $f2
/* 185C5C 8025737C 00000000 */ nop
/* 185C60 80257380 8642016A */ lh $v0, 0x16A($s2)
/* 185C64 80257384 44050000 */ mfc1 $a1, $f0
/* 185C68 80257388 44820000 */ mtc1 $v0, $f0
/* 185C6C 8025738C 00000000 */ nop
/* 185C70 80257390 46800020 */ cvt.s.w $f0, $f0
/* 185C74 80257394 46020002 */ mul.s $f0, $f0, $f2
/* 185C78 80257398 00000000 */ nop
/* 185C7C 8025739C 8642016C */ lh $v0, 0x16C($s2)
/* 185C80 802573A0 00021023 */ negu $v0, $v0
/* 185C84 802573A4 44060000 */ mfc1 $a2, $f0
/* 185C88 802573A8 44820000 */ mtc1 $v0, $f0
/* 185C8C 802573AC 00000000 */ nop
/* 185C90 802573B0 46800020 */ cvt.s.w $f0, $f0
/* 185C94 802573B4 46020002 */ mul.s $f0, $f0, $f2
/* 185C98 802573B8 00000000 */ nop
/* 185C9C 802573BC 44070000 */ mfc1 $a3, $f0
/* 185CA0 802573C0 0C019E40 */ jal guTranslateF
/* 185CA4 802573C4 27A40158 */ addiu $a0, $sp, 0x158
/* 185CA8 802573C8 86420168 */ lh $v0, 0x168($s2)
/* 185CAC 802573CC C6420188 */ lwc1 $f2, 0x188($s2)
/* 185CB0 802573D0 44820000 */ mtc1 $v0, $f0
/* 185CB4 802573D4 00000000 */ nop
/* 185CB8 802573D8 46800020 */ cvt.s.w $f0, $f0
/* 185CBC 802573DC 46020002 */ mul.s $f0, $f0, $f2
/* 185CC0 802573E0 00000000 */ nop
/* 185CC4 802573E4 8642016A */ lh $v0, 0x16A($s2)
/* 185CC8 802573E8 00021023 */ negu $v0, $v0
.L802573EC:
/* 185CCC 802573EC 44050000 */ mfc1 $a1, $f0
/* 185CD0 802573F0 44820000 */ mtc1 $v0, $f0
/* 185CD4 802573F4 00000000 */ nop
/* 185CD8 802573F8 46800020 */ cvt.s.w $f0, $f0
/* 185CDC 802573FC 46020002 */ mul.s $f0, $f0, $f2
/* 185CE0 80257400 00000000 */ nop
/* 185CE4 80257404 8642016C */ lh $v0, 0x16C($s2)
/* 185CE8 80257408 44060000 */ mfc1 $a2, $f0
/* 185CEC 8025740C 44820000 */ mtc1 $v0, $f0
/* 185CF0 80257410 00000000 */ nop
/* 185CF4 80257414 46800020 */ cvt.s.w $f0, $f0
/* 185CF8 80257418 46020002 */ mul.s $f0, $f0, $f2
/* 185CFC 8025741C 00000000 */ nop
/* 185D00 80257420 44070000 */ mfc1 $a3, $f0
/* 185D04 80257424 0C019E40 */ jal guTranslateF
/* 185D08 80257428 27A40198 */ addiu $a0, $sp, 0x198
/* 185D0C 8025742C 4480B000 */ mtc1 $zero, $f22
/* 185D10 80257430 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 185D14 80257434 4481C000 */ mtc1 $at, $f24
/* 185D18 80257438 E7B60010 */ swc1 $f22, 0x10($sp)
/* 185D1C 8025743C 8E45015C */ lw $a1, 0x15C($s2)
/* 185D20 80257440 4406C000 */ mfc1 $a2, $f24
/* 185D24 80257444 4407B000 */ mfc1 $a3, $f22
/* 185D28 80257448 0C019EC8 */ jal guRotateF
/* 185D2C 8025744C 27A40018 */ addiu $a0, $sp, 0x18
/* 185D30 80257450 27B70058 */ addiu $s7, $sp, 0x58
/* 185D34 80257454 E7B60010 */ swc1 $f22, 0x10($sp)
/* 185D38 80257458 8E450160 */ lw $a1, 0x160($s2)
/* 185D3C 8025745C 4406B000 */ mfc1 $a2, $f22
/* 185D40 80257460 4407C000 */ mfc1 $a3, $f24
/* 185D44 80257464 0C019EC8 */ jal guRotateF
/* 185D48 80257468 02E0202D */ daddu $a0, $s7, $zero
/* 185D4C 8025746C 27B60098 */ addiu $s6, $sp, 0x98
/* 185D50 80257470 E7B80010 */ swc1 $f24, 0x10($sp)
/* 185D54 80257474 8E450164 */ lw $a1, 0x164($s2)
/* 185D58 80257478 4406B000 */ mfc1 $a2, $f22
/* 185D5C 8025747C 4407B000 */ mfc1 $a3, $f22
/* 185D60 80257480 0C019EC8 */ jal guRotateF
/* 185D64 80257484 02C0202D */ daddu $a0, $s6, $zero
/* 185D68 80257488 02E0202D */ daddu $a0, $s7, $zero
/* 185D6C 8025748C 27A50018 */ addiu $a1, $sp, 0x18
/* 185D70 80257490 27B30218 */ addiu $s3, $sp, 0x218
/* 185D74 80257494 0C019D80 */ jal guMtxCatF
/* 185D78 80257498 0260302D */ daddu $a2, $s3, $zero
/* 185D7C 8025749C 0260202D */ daddu $a0, $s3, $zero
/* 185D80 802574A0 02C0282D */ daddu $a1, $s6, $zero
/* 185D84 802574A4 27B500D8 */ addiu $s5, $sp, 0xD8
/* 185D88 802574A8 0C019D80 */ jal guMtxCatF
/* 185D8C 802574AC 02A0302D */ daddu $a2, $s5, $zero
/* 185D90 802574B0 C6440170 */ lwc1 $f4, 0x170($s2)
/* 185D94 802574B4 3C01802A */ lui $at, %hi(D_8029D380)
/* 185D98 802574B8 D434D380 */ ldc1 $f20, %lo(D_8029D380)($at)
/* 185D9C 802574BC 46002121 */ cvt.d.s $f4, $f4
/* 185DA0 802574C0 46342102 */ mul.d $f4, $f4, $f20
/* 185DA4 802574C4 00000000 */ nop
/* 185DA8 802574C8 C6400174 */ lwc1 $f0, 0x174($s2)
/* 185DAC 802574CC 46000021 */ cvt.d.s $f0, $f0
/* 185DB0 802574D0 46340002 */ mul.d $f0, $f0, $f20
/* 185DB4 802574D4 00000000 */ nop
/* 185DB8 802574D8 C6420178 */ lwc1 $f2, 0x178($s2)
/* 185DBC 802574DC 460010A1 */ cvt.d.s $f2, $f2
/* 185DC0 802574E0 46341082 */ mul.d $f2, $f2, $f20
/* 185DC4 802574E4 00000000 */ nop
/* 185DC8 802574E8 C6460188 */ lwc1 $f6, 0x188($s2)
/* 185DCC 802574EC 460031A1 */ cvt.d.s $f6, $f6
/* 185DD0 802574F0 46262102 */ mul.d $f4, $f4, $f6
/* 185DD4 802574F4 00000000 */ nop
/* 185DD8 802574F8 46260002 */ mul.d $f0, $f0, $f6
/* 185DDC 802574FC 00000000 */ nop
/* 185DE0 80257500 27B40118 */ addiu $s4, $sp, 0x118
/* 185DE4 80257504 462010A0 */ cvt.s.d $f2, $f2
/* 185DE8 80257508 44071000 */ mfc1 $a3, $f2
/* 185DEC 8025750C 46202120 */ cvt.s.d $f4, $f4
/* 185DF0 80257510 46200020 */ cvt.s.d $f0, $f0
/* 185DF4 80257514 44052000 */ mfc1 $a1, $f4
/* 185DF8 80257518 44060000 */ mfc1 $a2, $f0
/* 185DFC 8025751C 0C019DF0 */ jal guScaleF
/* 185E00 80257520 0280202D */ daddu $a0, $s4, $zero
/* 185E04 80257524 27A40158 */ addiu $a0, $sp, 0x158
/* 185E08 80257528 0280282D */ daddu $a1, $s4, $zero
/* 185E0C 8025752C 0C019D80 */ jal guMtxCatF
/* 185E10 80257530 0260302D */ daddu $a2, $s3, $zero
/* 185E14 80257534 0260202D */ daddu $a0, $s3, $zero
/* 185E18 80257538 02A0282D */ daddu $a1, $s5, $zero
/* 185E1C 8025753C 27B00258 */ addiu $s0, $sp, 0x258
/* 185E20 80257540 0C019D80 */ jal guMtxCatF
/* 185E24 80257544 0200302D */ daddu $a2, $s0, $zero
/* 185E28 80257548 0200202D */ daddu $a0, $s0, $zero
/* 185E2C 8025754C 27A50198 */ addiu $a1, $sp, 0x198
/* 185E30 80257550 0C019D80 */ jal guMtxCatF
/* 185E34 80257554 27A602D8 */ addiu $a2, $sp, 0x2D8
/* 185E38 80257558 824801F3 */ lb $t0, 0x1F3($s2)
/* 185E3C 8025755C AFA80364 */ sw $t0, 0x364($sp)
/* 185E40 80257560 8E5101F4 */ lw $s1, 0x1F4($s2)
/* 185E44 80257564 1900015E */ blez $t0, .L80257AE0
D_80257568:
/* 185E48 80257568 0000F02D */ daddu $fp, $zero, $zero
/* 185E4C 8025756C 4620A786 */ mov.d $f30, $f20
/* 185E50 80257570 4600B706 */ mov.s $f28, $f22
/* 185E54 80257574 AFB70368 */ sw $s7, 0x368($sp)
/* 185E58 80257578 02C0B82D */ daddu $s7, $s6, $zero
/* 185E5C 8025757C 02A0B02D */ daddu $s6, $s5, $zero
/* 185E60 80257580 0280A82D */ daddu $s5, $s4, $zero
/* 185E64 80257584 0200A02D */ daddu $s4, $s0, $zero
.L80257588:
/* 185E68 80257588 8E220000 */ lw $v0, 0x0($s1)
/* 185E6C 8025758C 3C030010 */ lui $v1, (0x100000 >> 16)
/* 185E70 80257590 00431024 */ and $v0, $v0, $v1
/* 185E74 80257594 14400035 */ bnez $v0, .L8025766C
D_80257598:
/* 185E78 80257598 27A40318 */ addiu $a0, $sp, 0x318
/* 185E7C 8025759C 86220014 */ lh $v0, 0x14($s1)
/* 185E80 802575A0 C7AA0358 */ lwc1 $f10, 0x358($sp)
/* 185E84 802575A4 44820000 */ mtc1 $v0, $f0
D_802575A8:
/* 185E88 802575A8 00000000 */ nop
/* 185E8C 802575AC 46800020 */ cvt.s.w $f0, $f0
/* 185E90 802575B0 8622001A */ lh $v0, 0x1A($s1)
/* 185E94 802575B4 46005000 */ add.s $f0, $f10, $f0
/* 185E98 802575B8 44821000 */ mtc1 $v0, $f2
/* 185E9C 802575BC 00000000 */ nop
/* 185EA0 802575C0 468010A0 */ cvt.s.w $f2, $f2
/* 185EA4 802575C4 8E420000 */ lw $v0, 0x0($s2)
/* 185EA8 802575C8 30420800 */ andi $v0, $v0, 0x800
/* 185EAC 802575CC 1440000D */ bnez $v0, .L80257604
/* 185EB0 802575D0 46020680 */ add.s $f26, $f0, $f2
/* 185EB4 802575D4 86220016 */ lh $v0, 0x16($s1)
/* 185EB8 802575D8 C7AA035C */ lwc1 $f10, 0x35C($sp)
/* 185EBC 802575DC 44821000 */ mtc1 $v0, $f2
/* 185EC0 802575E0 00000000 */ nop
/* 185EC4 802575E4 468010A0 */ cvt.s.w $f2, $f2
/* 185EC8 802575E8 8622001C */ lh $v0, 0x1C($s1)
/* 185ECC 802575EC 46025080 */ add.s $f2, $f10, $f2
/* 185ED0 802575F0 44820000 */ mtc1 $v0, $f0
/* 185ED4 802575F4 00000000 */ nop
D_802575F8:
/* 185ED8 802575F8 46800020 */ cvt.s.w $f0, $f0
/* 185EDC 802575FC 08095D8C */ j .L80257630
/* 185EE0 80257600 46001500 */ add.s $f20, $f2, $f0
.L80257604:
/* 185EE4 80257604 86220016 */ lh $v0, 0x16($s1)
/* 185EE8 80257608 C7AA035C */ lwc1 $f10, 0x35C($sp)
/* 185EEC 8025760C 44821000 */ mtc1 $v0, $f2
/* 185EF0 80257610 00000000 */ nop
/* 185EF4 80257614 468010A0 */ cvt.s.w $f2, $f2
/* 185EF8 80257618 8622001C */ lh $v0, 0x1C($s1)
/* 185EFC 8025761C 46025081 */ sub.s $f2, $f10, $f2
/* 185F00 80257620 44820000 */ mtc1 $v0, $f0
/* 185F04 80257624 00000000 */ nop
/* 185F08 80257628 46800020 */ cvt.s.w $f0, $f0
/* 185F0C 8025762C 46001501 */ sub.s $f20, $f2, $f0
.L80257630:
/* 185F10 80257630 C640018C */ lwc1 $f0, 0x18C($s2)
/* 185F14 80257634 86220018 */ lh $v0, 0x18($s1)
/* 185F18 80257638 C7AA0360 */ lwc1 $f10, 0x360($sp)
/* 185F1C 8025763C 46000586 */ mov.s $f22, $f0
/* 185F20 80257640 44821000 */ mtc1 $v0, $f2
/* 185F24 80257644 00000000 */ nop
/* 185F28 80257648 468010A0 */ cvt.s.w $f2, $f2
/* 185F2C 8025764C 8622001E */ lh $v0, 0x1E($s1)
/* 185F30 80257650 46025080 */ add.s $f2, $f10, $f2
/* 185F34 80257654 E6360064 */ swc1 $f22, 0x64($s1)
/* 185F38 80257658 44820000 */ mtc1 $v0, $f0
/* 185F3C 8025765C 00000000 */ nop
/* 185F40 80257660 46800020 */ cvt.s.w $f0, $f0
/* 185F44 80257664 08095DC1 */ j .L80257704
/* 185F48 80257668 46001600 */ add.s $f24, $f2, $f0
.L8025766C:
/* 185F4C 8025766C C6480170 */ lwc1 $f8, 0x170($s2)
/* 185F50 80257670 46004221 */ cvt.d.s $f8, $f8
/* 185F54 80257674 463E4202 */ mul.d $f8, $f8, $f30
/* 185F58 80257678 00000000 */ nop
/* 185F5C 8025767C C6460174 */ lwc1 $f6, 0x174($s2)
/* 185F60 80257680 460031A1 */ cvt.d.s $f6, $f6
/* 185F64 80257684 463E3182 */ mul.d $f6, $f6, $f30
/* 185F68 80257688 00000000 */ nop
/* 185F6C 8025768C C6420178 */ lwc1 $f2, 0x178($s2)
/* 185F70 80257690 460010A1 */ cvt.d.s $f2, $f2
/* 185F74 80257694 463E1082 */ mul.d $f2, $f2, $f30
/* 185F78 80257698 00000000 */ nop
/* 185F7C 8025769C 8622001A */ lh $v0, 0x1A($s1)
/* 185F80 802576A0 C624002C */ lwc1 $f4, 0x2C($s1)
/* 185F84 802576A4 44820000 */ mtc1 $v0, $f0
/* 185F88 802576A8 00000000 */ nop
/* 185F8C 802576AC 46800020 */ cvt.s.w $f0, $f0
/* 185F90 802576B0 46002680 */ add.s $f26, $f4, $f0
/* 185F94 802576B4 8622001C */ lh $v0, 0x1C($s1)
/* 185F98 802576B8 C6240030 */ lwc1 $f4, 0x30($s1)
/* 185F9C 802576BC 44820000 */ mtc1 $v0, $f0
/* 185FA0 802576C0 00000000 */ nop
/* 185FA4 802576C4 46800020 */ cvt.s.w $f0, $f0
/* 185FA8 802576C8 46002500 */ add.s $f20, $f4, $f0
/* 185FAC 802576CC 8622001E */ lh $v0, 0x1E($s1)
/* 185FB0 802576D0 C6240034 */ lwc1 $f4, 0x34($s1)
/* 185FB4 802576D4 44820000 */ mtc1 $v0, $f0
/* 185FB8 802576D8 00000000 */ nop
/* 185FBC 802576DC 46800020 */ cvt.s.w $f0, $f0
/* 185FC0 802576E0 46204220 */ cvt.s.d $f8, $f8
/* 185FC4 802576E4 462031A0 */ cvt.s.d $f6, $f6
/* 185FC8 802576E8 462010A0 */ cvt.s.d $f2, $f2
D_802576EC:
/* 185FCC 802576EC 44054000 */ mfc1 $a1, $f8
/* 185FD0 802576F0 44063000 */ mfc1 $a2, $f6
/* 185FD4 802576F4 44071000 */ mfc1 $a3, $f2
/* 185FD8 802576F8 0C019DF0 */ jal guScaleF
/* 185FDC 802576FC 46002600 */ add.s $f24, $f4, $f0
/* 185FE0 80257700 C6360064 */ lwc1 $f22, 0x64($s1)
.L80257704:
/* 185FE4 80257704 8E220000 */ lw $v0, 0x0($s1)
/* 185FE8 80257708 30420001 */ andi $v0, $v0, 0x1
/* 185FEC 8025770C 144000EE */ bnez $v0, .L80257AC8
/* 185FF0 80257710 00000000 */ nop
/* 185FF4 80257714 8E220094 */ lw $v0, 0x94($s1)
/* 185FF8 80257718 104000EB */ beqz $v0, .L80257AC8
/* 185FFC 8025771C 00000000 */ nop
/* 186000 80257720 8E420000 */ lw $v0, 0x0($s2)
/* 186004 80257724 30420800 */ andi $v0, $v0, 0x800
/* 186008 80257728 14400025 */ bnez $v0, .L802577C0
/* 18600C 8025772C 00000000 */ nop
/* 186010 80257730 86220044 */ lh $v0, 0x44($s1)
/* 186014 80257734 C6420188 */ lwc1 $f2, 0x188($s2)
/* 186018 80257738 00021023 */ negu $v0, $v0
/* 18601C 8025773C 44820000 */ mtc1 $v0, $f0
/* 186020 80257740 00000000 */ nop
/* 186024 80257744 46800020 */ cvt.s.w $f0, $f0
/* 186028 80257748 46020002 */ mul.s $f0, $f0, $f2
/* 18602C 8025774C 00000000 */ nop
/* 186030 80257750 86220046 */ lh $v0, 0x46($s1)
/* 186034 80257754 00021023 */ negu $v0, $v0
/* 186038 80257758 44050000 */ mfc1 $a1, $f0
/* 18603C 8025775C 44820000 */ mtc1 $v0, $f0
/* 186040 80257760 00000000 */ nop
/* 186044 80257764 46800020 */ cvt.s.w $f0, $f0
/* 186048 80257768 46020002 */ mul.s $f0, $f0, $f2
/* 18604C 8025776C 00000000 */ nop
/* 186050 80257770 86220048 */ lh $v0, 0x48($s1)
/* 186054 80257774 00021023 */ negu $v0, $v0
/* 186058 80257778 44060000 */ mfc1 $a2, $f0
/* 18605C 8025777C 44820000 */ mtc1 $v0, $f0
/* 186060 80257780 00000000 */ nop
/* 186064 80257784 46800020 */ cvt.s.w $f0, $f0
/* 186068 80257788 46020002 */ mul.s $f0, $f0, $f2
/* 18606C 8025778C 00000000 */ nop
/* 186070 80257790 44070000 */ mfc1 $a3, $f0
/* 186074 80257794 0C019E40 */ jal guTranslateF
/* 186078 80257798 27A40158 */ addiu $a0, $sp, 0x158
/* 18607C 8025779C 86220044 */ lh $v0, 0x44($s1)
/* 186080 802577A0 C6420188 */ lwc1 $f2, 0x188($s2)
/* 186084 802577A4 44820000 */ mtc1 $v0, $f0
/* 186088 802577A8 00000000 */ nop
/* 18608C 802577AC 46800020 */ cvt.s.w $f0, $f0
/* 186090 802577B0 46020002 */ mul.s $f0, $f0, $f2
/* 186094 802577B4 00000000 */ nop
/* 186098 802577B8 08095E13 */ j .L8025784C
/* 18609C 802577BC 86220046 */ lh $v0, 0x46($s1)
.L802577C0:
/* 1860A0 802577C0 86220044 */ lh $v0, 0x44($s1)
/* 1860A4 802577C4 C6420188 */ lwc1 $f2, 0x188($s2)
/* 1860A8 802577C8 00021023 */ negu $v0, $v0
/* 1860AC 802577CC 44820000 */ mtc1 $v0, $f0
/* 1860B0 802577D0 00000000 */ nop
/* 1860B4 802577D4 46800020 */ cvt.s.w $f0, $f0
/* 1860B8 802577D8 46020002 */ mul.s $f0, $f0, $f2
/* 1860BC 802577DC 00000000 */ nop
/* 1860C0 802577E0 86220046 */ lh $v0, 0x46($s1)
/* 1860C4 802577E4 44050000 */ mfc1 $a1, $f0
/* 1860C8 802577E8 44820000 */ mtc1 $v0, $f0
/* 1860CC 802577EC 00000000 */ nop
/* 1860D0 802577F0 46800020 */ cvt.s.w $f0, $f0
/* 1860D4 802577F4 46020002 */ mul.s $f0, $f0, $f2
/* 1860D8 802577F8 00000000 */ nop
/* 1860DC 802577FC 86220048 */ lh $v0, 0x48($s1)
/* 1860E0 80257800 00021023 */ negu $v0, $v0
/* 1860E4 80257804 44060000 */ mfc1 $a2, $f0
/* 1860E8 80257808 44820000 */ mtc1 $v0, $f0
/* 1860EC 8025780C 00000000 */ nop
/* 1860F0 80257810 46800020 */ cvt.s.w $f0, $f0
/* 1860F4 80257814 46020002 */ mul.s $f0, $f0, $f2
/* 1860F8 80257818 00000000 */ nop
/* 1860FC 8025781C 44070000 */ mfc1 $a3, $f0
/* 186100 80257820 0C019E40 */ jal guTranslateF
/* 186104 80257824 27A40158 */ addiu $a0, $sp, 0x158
/* 186108 80257828 86220044 */ lh $v0, 0x44($s1)
/* 18610C 8025782C C6420188 */ lwc1 $f2, 0x188($s2)
/* 186110 80257830 44820000 */ mtc1 $v0, $f0
/* 186114 80257834 00000000 */ nop
/* 186118 80257838 46800020 */ cvt.s.w $f0, $f0
/* 18611C 8025783C 46020002 */ mul.s $f0, $f0, $f2
/* 186120 80257840 00000000 */ nop
D_80257844:
/* 186124 80257844 86220046 */ lh $v0, 0x46($s1)
/* 186128 80257848 00021023 */ negu $v0, $v0
.L8025784C:
/* 18612C 8025784C 44050000 */ mfc1 $a1, $f0
/* 186130 80257850 44820000 */ mtc1 $v0, $f0
/* 186134 80257854 00000000 */ nop
/* 186138 80257858 46800020 */ cvt.s.w $f0, $f0
/* 18613C 8025785C 46020002 */ mul.s $f0, $f0, $f2
/* 186140 80257860 00000000 */ nop
/* 186144 80257864 86220048 */ lh $v0, 0x48($s1)
/* 186148 80257868 44060000 */ mfc1 $a2, $f0
/* 18614C 8025786C 44820000 */ mtc1 $v0, $f0
/* 186150 80257870 00000000 */ nop
/* 186154 80257874 46800020 */ cvt.s.w $f0, $f0
/* 186158 80257878 46020002 */ mul.s $f0, $f0, $f2
/* 18615C 8025787C 00000000 */ nop
/* 186160 80257880 44070000 */ mfc1 $a3, $f0
/* 186164 80257884 0C019E40 */ jal guTranslateF
/* 186168 80257888 27A40198 */ addiu $a0, $sp, 0x198
/* 18616C 8025788C 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 186170 80257890 44815000 */ mtc1 $at, $f10
/* 186174 80257894 86220068 */ lh $v0, 0x68($s1)
/* 186178 80257898 460AC281 */ sub.s $f10, $f24, $f10
/* 18617C 8025789C 44820000 */ mtc1 $v0, $f0
/* 186180 802578A0 00000000 */ nop
/* 186184 802578A4 46800020 */ cvt.s.w $f0, $f0
/* 186188 802578A8 4600D680 */ add.s $f26, $f26, $f0
/* 18618C 802578AC 8622006A */ lh $v0, 0x6A($s1)
/* 186190 802578B0 44820000 */ mtc1 $v0, $f0
/* 186194 802578B4 00000000 */ nop
/* 186198 802578B8 46800020 */ cvt.s.w $f0, $f0
/* 18619C 802578BC 4600A500 */ add.s $f20, $f20, $f0
/* 1861A0 802578C0 44075000 */ mfc1 $a3, $f10
/* 1861A4 802578C4 4405D000 */ mfc1 $a1, $f26
/* 1861A8 802578C8 4406A000 */ mfc1 $a2, $f20
/* 1861AC 802578CC 0C019E40 */ jal guTranslateF
/* 1861B0 802578D0 27A401D8 */ addiu $a0, $sp, 0x1D8
/* 1861B4 802578D4 E7BC0010 */ swc1 $f28, 0x10($sp)
/* 1861B8 802578D8 8E250038 */ lw $a1, 0x38($s1)
/* 1861BC 802578DC 3C063F80 */ lui $a2, (0x3F800000 >> 16)
/* 1861C0 802578E0 4407E000 */ mfc1 $a3, $f28
/* 1861C4 802578E4 0C019EC8 */ jal guRotateF
/* 1861C8 802578E8 27A40018 */ addiu $a0, $sp, 0x18
/* 1861CC 802578EC E7BC0010 */ swc1 $f28, 0x10($sp)
/* 1861D0 802578F0 8E25003C */ lw $a1, 0x3C($s1)
/* 1861D4 802578F4 4406E000 */ mfc1 $a2, $f28
/* 1861D8 802578F8 3C073F80 */ lui $a3, (0x3F800000 >> 16)
/* 1861DC 802578FC 0C019EC8 */ jal guRotateF
D_80257900:
/* 1861E0 80257900 8FA40368 */ lw $a0, 0x368($sp)
D_80257904:
/* 1861E4 80257904 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1861E8 80257908 44815000 */ mtc1 $at, $f10
D_8025790C:
/* 1861EC 8025790C 4406E000 */ mfc1 $a2, $f28
/* 1861F0 80257910 4407E000 */ mfc1 $a3, $f28
/* 1861F4 80257914 E7AA0010 */ swc1 $f10, 0x10($sp)
/* 1861F8 80257918 8E250040 */ lw $a1, 0x40($s1)
D_8025791C:
/* 1861FC 8025791C 0C019EC8 */ jal guRotateF
/* 186200 80257920 02E0202D */ daddu $a0, $s7, $zero
/* 186204 80257924 27A50018 */ addiu $a1, $sp, 0x18
/* 186208 80257928 8FA40368 */ lw $a0, 0x368($sp)
D_8025792C:
/* 18620C 8025792C 0C019D80 */ jal guMtxCatF
/* 186210 80257930 0260302D */ daddu $a2, $s3, $zero
D_80257934:
/* 186214 80257934 0260202D */ daddu $a0, $s3, $zero
/* 186218 80257938 02E0282D */ daddu $a1, $s7, $zero
/* 18621C 8025793C 0C019D80 */ jal guMtxCatF
/* 186220 80257940 02C0302D */ daddu $a2, $s6, $zero
/* 186224 80257944 82220074 */ lb $v0, 0x74($s1)
/* 186228 80257948 C6220050 */ lwc1 $f2, 0x50($s1)
/* 18622C 8025794C 44820000 */ mtc1 $v0, $f0
/* 186230 80257950 00000000 */ nop
D_80257954:
/* 186234 80257954 46800020 */ cvt.s.w $f0, $f0
/* 186238 80257958 46001082 */ mul.s $f2, $f2, $f0
/* 18623C 8025795C 00000000 */ nop
/* 186240 80257960 8E25004C */ lw $a1, 0x4C($s1)
D_80257964:
/* 186244 80257964 8E270054 */ lw $a3, 0x54($s1)
/* 186248 80257968 44061000 */ mfc1 $a2, $f2
/* 18624C 8025796C 0C019DF0 */ jal guScaleF
/* 186250 80257970 02A0202D */ daddu $a0, $s5, $zero
D_80257974:
/* 186254 80257974 0C0950A2 */ jal func_80254288
/* 186258 80257978 27A40298 */ addiu $a0, $sp, 0x298
D_8025797C:
/* 18625C 8025797C 02A0202D */ daddu $a0, $s5, $zero
/* 186260 80257980 27A50158 */ addiu $a1, $sp, 0x158
/* 186264 80257984 0C019D80 */ jal guMtxCatF
/* 186268 80257988 0260302D */ daddu $a2, $s3, $zero
D_8025798C:
/* 18626C 8025798C 0260202D */ daddu $a0, $s3, $zero
/* 186270 80257990 02C0282D */ daddu $a1, $s6, $zero
/* 186274 80257994 0C019D80 */ jal guMtxCatF
/* 186278 80257998 0280302D */ daddu $a2, $s4, $zero
D_8025799C:
/* 18627C 8025799C 0280202D */ daddu $a0, $s4, $zero
/* 186280 802579A0 27A50198 */ addiu $a1, $sp, 0x198
D_802579A4:
/* 186284 802579A4 0C019D80 */ jal guMtxCatF
/* 186288 802579A8 0260302D */ daddu $a2, $s3, $zero
D_802579AC:
/* 18628C 802579AC 8E220000 */ lw $v0, 0x0($s1)
/* 186290 802579B0 3C030010 */ lui $v1, (0x100000 >> 16)
/* 186294 802579B4 00431024 */ and $v0, $v0, $v1
/* 186298 802579B8 14400003 */ bnez $v0, .L802579C8
/* 18629C 802579BC 0260202D */ daddu $a0, $s3, $zero
/* 1862A0 802579C0 08095E73 */ j .L802579CC
/* 1862A4 802579C4 27A502D8 */ addiu $a1, $sp, 0x2D8
.L802579C8:
/* 1862A8 802579C8 27A50318 */ addiu $a1, $sp, 0x318
.L802579CC:
/* 1862AC 802579CC 0C019D80 */ jal guMtxCatF
/* 1862B0 802579D0 0280302D */ daddu $a2, $s4, $zero
/* 1862B4 802579D4 0280202D */ daddu $a0, $s4, $zero
/* 1862B8 802579D8 27A501D8 */ addiu $a1, $sp, 0x1D8
/* 1862BC 802579DC 0C019D80 */ jal guMtxCatF
/* 1862C0 802579E0 0260302D */ daddu $a2, $s3, $zero
/* 1862C4 802579E4 0260202D */ daddu $a0, $s3, $zero
D_802579E8:
/* 1862C8 802579E8 27A50298 */ addiu $a1, $sp, 0x298
/* 1862CC 802579EC 0C019D80 */ jal guMtxCatF
/* 1862D0 802579F0 0280302D */ daddu $a2, $s4, $zero
/* 1862D4 802579F4 8FA803C8 */ lw $t0, 0x3C8($sp)
/* 1862D8 802579F8 15000014 */ bnez $t0, .L80257A4C
D_802579FC:
/* 1862DC 802579FC 24040001 */ addiu $a0, $zero, 0x1
/* 1862E0 80257A00 0220282D */ daddu $a1, $s1, $zero
/* 1862E4 80257A04 4600B28D */ trunc.w.s $f10, $f22
/* 1862E8 80257A08 44105000 */ mfc1 $s0, $f10
D_80257A0C:
/* 1862EC 80257A0C 00000000 */ nop
/* 1862F0 80257A10 0200302D */ daddu $a2, $s0, $zero
/* 1862F4 80257A14 0C097210 */ jal func_8025C840
/* 1862F8 80257A18 0080382D */ daddu $a3, $a0, $zero
/* 1862FC 80257A1C 24040001 */ addiu $a0, $zero, 0x1
/* 186300 80257A20 0220282D */ daddu $a1, $s1, $zero
/* 186304 80257A24 0200302D */ daddu $a2, $s0, $zero
/* 186308 80257A28 0C097332 */ jal func_8025CCC8
/* 18630C 80257A2C 0080382D */ daddu $a3, $a0, $zero
/* 186310 80257A30 24020001 */ addiu $v0, $zero, 0x1
/* 186314 80257A34 AFA20010 */ sw $v0, 0x10($sp)
/* 186318 80257A38 0040202D */ daddu $a0, $v0, $zero
/* 18631C 80257A3C 0220282D */ daddu $a1, $s1, $zero
/* 186320 80257A40 0200302D */ daddu $a2, $s0, $zero
/* 186324 80257A44 08095EB0 */ j .L80257AC0
/* 186328 80257A48 0280382D */ daddu $a3, $s4, $zero
.L80257A4C:
/* 18632C 80257A4C 3C014334 */ lui $at, (0x43340000 >> 16)
/* 186330 80257A50 4481A000 */ mtc1 $at, $f20
/* 186334 80257A54 00000000 */ nop
/* 186338 80257A58 4614B500 */ add.s $f20, $f22, $f20
/* 18633C 80257A5C 0C00A6C9 */ jal clamp_angle
/* 186340 80257A60 4600A306 */ mov.s $f12, $f20
/* 186344 80257A64 24040001 */ addiu $a0, $zero, 0x1
/* 186348 80257A68 0220282D */ daddu $a1, $s1, $zero
/* 18634C 80257A6C 4600028D */ trunc.w.s $f10, $f0
/* 186350 80257A70 44065000 */ mfc1 $a2, $f10
/* 186354 80257A74 0C097210 */ jal func_8025C840
/* 186358 80257A78 0080382D */ daddu $a3, $a0, $zero
/* 18635C 80257A7C 0C00A6C9 */ jal clamp_angle
/* 186360 80257A80 4600A306 */ mov.s $f12, $f20
/* 186364 80257A84 24040001 */ addiu $a0, $zero, 0x1
/* 186368 80257A88 0220282D */ daddu $a1, $s1, $zero
/* 18636C 80257A8C 4600028D */ trunc.w.s $f10, $f0
/* 186370 80257A90 44065000 */ mfc1 $a2, $f10
/* 186374 80257A94 0C097332 */ jal func_8025CCC8
/* 186378 80257A98 0080382D */ daddu $a3, $a0, $zero
/* 18637C 80257A9C 0C00A6C9 */ jal clamp_angle
/* 186380 80257AA0 4600A306 */ mov.s $f12, $f20
/* 186384 80257AA4 24040001 */ addiu $a0, $zero, 0x1
/* 186388 80257AA8 0220282D */ daddu $a1, $s1, $zero
/* 18638C 80257AAC 4600028D */ trunc.w.s $f10, $f0
/* 186390 80257AB0 44065000 */ mfc1 $a2, $f10
/* 186394 80257AB4 0280382D */ daddu $a3, $s4, $zero
/* 186398 80257AB8 0080102D */ daddu $v0, $a0, $zero
/* 18639C 80257ABC AFA20010 */ sw $v0, 0x10($sp)
.L80257AC0:
/* 1863A0 80257AC0 0C09647B */ jal func_802591EC
/* 1863A4 80257AC4 00000000 */ nop
.L80257AC8:
/* 1863A8 80257AC8 8E31000C */ lw $s1, 0xC($s1)
/* 1863AC 80257ACC 8FA80364 */ lw $t0, 0x364($sp)
/* 1863B0 80257AD0 27DE0001 */ addiu $fp, $fp, 0x1
/* 1863B4 80257AD4 03C8102A */ slt $v0, $fp, $t0
/* 1863B8 80257AD8 1440FEAB */ bnez $v0, .L80257588
/* 1863BC 80257ADC 00000000 */ nop
.L80257AE0:
/* 1863C0 80257AE0 8FBF0394 */ lw $ra, 0x394($sp)
/* 1863C4 80257AE4 8FBE0390 */ lw $fp, 0x390($sp)
/* 1863C8 80257AE8 8FB7038C */ lw $s7, 0x38C($sp)
/* 1863CC 80257AEC 8FB60388 */ lw $s6, 0x388($sp)
/* 1863D0 80257AF0 8FB50384 */ lw $s5, 0x384($sp)
/* 1863D4 80257AF4 8FB40380 */ lw $s4, 0x380($sp)
/* 1863D8 80257AF8 8FB3037C */ lw $s3, 0x37C($sp)
/* 1863DC 80257AFC 8FB20378 */ lw $s2, 0x378($sp)
D_80257B00:
/* 1863E0 80257B00 8FB10374 */ lw $s1, 0x374($sp)
/* 1863E4 80257B04 8FB00370 */ lw $s0, 0x370($sp)
/* 1863E8 80257B08 D7BE03C0 */ ldc1 $f30, 0x3C0($sp)
/* 1863EC 80257B0C D7BC03B8 */ ldc1 $f28, 0x3B8($sp)
/* 1863F0 80257B10 D7BA03B0 */ ldc1 $f26, 0x3B0($sp)
/* 1863F4 80257B14 D7B803A8 */ ldc1 $f24, 0x3A8($sp)
/* 1863F8 80257B18 D7B603A0 */ ldc1 $f22, 0x3A0($sp)
/* 1863FC 80257B1C D7B40398 */ ldc1 $f20, 0x398($sp)
/* 186400 80257B20 03E00008 */ jr $ra
/* 186404 80257B24 27BD03C8 */ addiu $sp, $sp, 0x3C8
### DECOMPILED C INSTRUCTIONS:
void appendGfx_npc_actor_reflection(s32 flipYaw, Actor* actor) {
Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation, mtxScale;
Matrix4f mtxPivotOn, mtxPivotOff, mtxTranslate;
Matrix4f mtxTemp, mtxTransform, mtxMirror;
Matrix4f mtxActor, mtxPartScale;
ActorPart* part;
f32 actorPosX, actorPosY, actorPosZ;
f32 partPosX, partPosY, partPosZ;
f32 partYaw;
s32 numParts;
s32 i;
actorPosX = actor->currentPos.x + actor->headOffset.x;
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
actorPosY = actor->currentPos.y + actor->headOffset.y;
} else {
actorPosY = actor->currentPos.y - actor->headOffset.y;
}
actorPosZ = actor->currentPos.z + actor->headOffset.z - 5.0f;
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
guTranslateF(mtxPivotOn,
-actor->rotationPivotOffset.x * actor->scalingFactor,
-actor->rotationPivotOffset.y * actor->scalingFactor,
-actor->rotationPivotOffset.z * actor->scalingFactor);
guTranslateF(mtxPivotOff,
actor->rotationPivotOffset.x * actor->scalingFactor,
actor->rotationPivotOffset.y * actor->scalingFactor,
actor->rotationPivotOffset.z * actor->scalingFactor);
} else {
guTranslateF(mtxPivotOn,
-actor->rotationPivotOffset.x * actor->scalingFactor,
actor->rotationPivotOffset.y * actor->scalingFactor,
-actor->rotationPivotOffset.z * actor->scalingFactor);
guTranslateF(mtxPivotOff,
actor->rotationPivotOffset.x * actor->scalingFactor,
-actor->rotationPivotOffset.y * actor->scalingFactor,
actor->rotationPivotOffset.z * actor->scalingFactor);
}
guRotateF(mtxRotX, actor->rotation.x, 1.0f, 0.0f, 0.0f);
guRotateF(mtxRotY, actor->rotation.y, 0.0f, 1.0f, 0.0f);
guRotateF(mtxRotZ, actor->rotation.z, 0.0f, 0.0f, 1.0f);
guMtxCatF(mtxRotY, mtxRotX, mtxTemp);
guMtxCatF(mtxTemp, mtxRotZ, mtxRotation);
guScaleF(mtxScale,
actor->scale.x * SPRITE_WORLD_SCALE_D * actor->scalingFactor,
actor->scale.y * SPRITE_WORLD_SCALE_D * actor->scalingFactor,
actor->scale.z * SPRITE_WORLD_SCALE_D);
guMtxCatF(mtxPivotOn, mtxScale, mtxTemp);
guMtxCatF(mtxTemp, mtxRotation, mtxTransform);
guMtxCatF(mtxTransform, mtxPivotOff, mtxActor);
part = actor->partsTable;
numParts = actor->numParts;
for (i = 0; i < numParts; i++) {
// determine part position
if (!(part->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
partPosX = actorPosX + part->partOffset.x + part->visualOffset.x;
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
partPosY = actorPosY + part->partOffset.y + part->visualOffset.y;
} else {
partPosY = actorPosY - part->partOffset.y - part->visualOffset.y;
}
partPosZ = actorPosZ + part->partOffset.z + part->visualOffset.z;
partYaw = part->yaw = actor->yaw;
} else {
partPosX = part->absolutePosition.x + part->visualOffset.x;
partPosY = part->absolutePosition.y + part->visualOffset.y;
partPosZ = part->absolutePosition.z + part->visualOffset.z;
guScaleF(mtxPartScale,
actor->scale.x * SPRITE_WORLD_SCALE_D,
actor->scale.y * SPRITE_WORLD_SCALE_D,
actor->scale.z * SPRITE_WORLD_SCALE_D);
partYaw = part->yaw;
}
if (part->flags & ACTOR_PART_FLAG_INVISIBLE) {
part = part->nextPart;
continue;
}
if (part->idleAnimations == NULL) {
part = part->nextPart;
continue;
}
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
guTranslateF(mtxPivotOn,
-part->rotationPivotOffset.x * actor->scalingFactor,
-part->rotationPivotOffset.y * actor->scalingFactor,
-part->rotationPivotOffset.z * actor->scalingFactor);
guTranslateF(mtxPivotOff,
part->rotationPivotOffset.x * actor->scalingFactor,
part->rotationPivotOffset.y * actor->scalingFactor,
part->rotationPivotOffset.z * actor->scalingFactor);
} else {
guTranslateF(mtxPivotOn,
-part->rotationPivotOffset.x * actor->scalingFactor,
part->rotationPivotOffset.y * actor->scalingFactor,
-part->rotationPivotOffset.z * actor->scalingFactor);
guTranslateF(mtxPivotOff,
part->rotationPivotOffset.x * actor->scalingFactor,
-part->rotationPivotOffset.y * actor->scalingFactor,
part->rotationPivotOffset.z * actor->scalingFactor);
}
guTranslateF(mtxTranslate,
partPosX + part->palAnimPosOffset[0],
partPosY + part->palAnimPosOffset[1],
partPosZ - 1.0f);
guRotateF(mtxRotX, part->rotation.x, 1.0f, 0.0f, 0.0f);
guRotateF(mtxRotY, part->rotation.y, 0.0f, 1.0f, 0.0f);
guRotateF(mtxRotZ, part->rotation.z, 0.0f, 0.0f, 1.0f);
guMtxCatF(mtxRotY, mtxRotX, mtxTemp);
guMtxCatF(mtxTemp, mtxRotZ, mtxRotation);
guScaleF(mtxScale, part->scale.x, part->scale.y * part->verticalStretch, part->scale.z);
mtx_mirror_y(mtxMirror);
guMtxCatF(mtxScale, mtxPivotOn, mtxTemp);
guMtxCatF(mtxTemp, mtxRotation, mtxTransform);
guMtxCatF(mtxTransform, mtxPivotOff, mtxTemp);
if (!(part->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
guMtxCatF(mtxTemp, mtxActor, mtxTransform);
} else {
guMtxCatF(mtxTemp, mtxPartScale, mtxTransform);
}
guMtxCatF(mtxTransform, mtxTranslate, mtxTemp);
guMtxCatF(mtxTemp, mtxMirror, mtxTransform);
if (flipYaw == 0) {
func_8025C840(1, part, partYaw, 1);
func_8025CCC8(1, part, partYaw, 1);
render_with_adjusted_palettes(SPRITE_MODE_NPC, part, partYaw, mtxTransform, 1);
} else {
func_8025C840(1, part, clamp_angle(partYaw + 180.0f), 1);
func_8025CCC8(1, part, clamp_angle(partYaw + 180.0f), 1);
render_with_adjusted_palettes(SPRITE_MODE_NPC, part, clamp_angle(partYaw + 180.0f), mtxTransform, 1);
}
part = part->nextPart;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_802428C8
/* A2CB08 802428C8 27BDFF98 */ addiu $sp, $sp, -0x68
D_802428CC:
/* A2CB0C 802428CC AFB30024 */ sw $s3, 0x24($sp)
glabel func_802428D0
/* A2CB10 802428D0 0080982D */ daddu $s3, $a0, $zero
D_802428D4:
/* A2CB14 802428D4 AFBF0034 */ sw $ra, 0x34($sp)
glabel func_802428D8
/* A2CB18 802428D8 AFB60030 */ sw $s6, 0x30($sp)
glabel .L802428DC
/* A2CB1C 802428DC AFB5002C */ sw $s5, 0x2C($sp)
mgm_02_BoxModelIDs:
/* A2CB20 802428E0 AFB40028 */ sw $s4, 0x28($sp)
D_802428E4:
/* A2CB24 802428E4 AFB20020 */ sw $s2, 0x20($sp)
D_802428E8:
/* A2CB28 802428E8 AFB1001C */ sw $s1, 0x1C($sp)
.L802428EC:
/* A2CB2C 802428EC AFB00018 */ sw $s0, 0x18($sp)
D_802428F0:
/* A2CB30 802428F0 F7BE0060 */ sdc1 $f30, 0x60($sp)
glabel func_802428F4
/* A2CB34 802428F4 F7BC0058 */ sdc1 $f28, 0x58($sp)
glabel func_802428F8
/* A2CB38 802428F8 F7BA0050 */ sdc1 $f26, 0x50($sp)
.L802428FC:
/* A2CB3C 802428FC F7B80048 */ sdc1 $f24, 0x48($sp)
glabel func_80242900
/* A2CB40 80242900 F7B60040 */ sdc1 $f22, 0x40($sp)
.L80242904:
/* A2CB44 80242904 F7B40038 */ sdc1 $f20, 0x38($sp)
dgb_03_pad_2908:
/* A2CB48 80242908 8E70000C */ lw $s0, 0xC($s3)
D_8024290C:
/* A2CB4C 8024290C 8E050000 */ lw $a1, 0x0($s0)
D_80242910:
/* A2CB50 80242910 0C0B1EAF */ jal evt_get_variable
D_80242914:
/* A2CB54 80242914 26100004 */ addiu $s0, $s0, 0x4
D_80242918:
/* A2CB58 80242918 8E050000 */ lw $a1, 0x0($s0)
D_8024291C:
/* A2CB5C 8024291C 26100004 */ addiu $s0, $s0, 0x4
.L80242920:
/* A2CB60 80242920 0260202D */ daddu $a0, $s3, $zero
glabel func_80242924
/* A2CB64 80242924 0C0B210B */ jal evt_get_float_variable
glabel func_80242928
/* A2CB68 80242928 0040B02D */ daddu $s6, $v0, $zero
D_8024292C:
/* A2CB6C 8024292C 8E050000 */ lw $a1, 0x0($s0)
D_80242930:
/* A2CB70 80242930 0260202D */ daddu $a0, $s3, $zero
D_80242934:
/* A2CB74 80242934 0C0B210B */ jal evt_get_float_variable
.L80242938:
/* A2CB78 80242938 E7A00010 */ swc1 $f0, 0x10($sp)
glabel func_8024293C
/* A2CB7C 8024293C 0260202D */ daddu $a0, $s3, $zero
glabel func_80242940
/* A2CB80 80242940 3C05F4AC */ lui $a1, (0xF4ACD480 >> 16)
.L80242944:
/* A2CB84 80242944 34A5D480 */ ori $a1, $a1, (0xF4ACD480 & 0xFFFF)
glabel func_80242948
/* A2CB88 80242948 0C0B1EAF */ jal evt_get_variable
glabel func_8024294C
/* A2CB8C 8024294C 46000706 */ mov.s $f28, $f0
glabel func_80242950
/* A2CB90 80242950 0040202D */ daddu $a0, $v0, $zero
.L80242954:
/* A2CB94 80242954 26C3FFFF */ addiu $v1, $s6, -0x1
glabel func_80242958
/* A2CB98 80242958 2C620006 */ sltiu $v0, $v1, 0x6
glabel func_8024295C
/* A2CB9C 8024295C 104000CE */ beqz $v0, .L80242C98
/* A2CBA0 80242960 0080882D */ daddu $s1, $a0, $zero
D_80242964:
/* A2CBA4 80242964 00031080 */ sll $v0, $v1, 2
glabel .L80242968
/* A2CBA8 80242968 3C018025 */ lui $at, %hi(jtbl_8024F1F0)
D_8024296C:
/* A2CBAC 8024296C 00220821 */ addu $at, $at, $v0
D_80242970:
/* A2CBB0 80242970 8C22F1F0 */ lw $v0, %lo(jtbl_8024F1F0)($at)
glabel .L80242974
/* A2CBB4 80242974 00400008 */ jr $v0
glabel func_80242978
/* A2CBB8 80242978 00000000 */ nop
glabel .L8024297C
/* A2CBBC 8024297C 3C108025 */ lui $s0, %hi(D_8024F3F8)
glabel func_80242980
/* A2CBC0 80242980 2610F3F8 */ addiu $s0, $s0, %lo(D_8024F3F8)
D_80242984:
/* A2CBC4 80242984 0200902D */ daddu $s2, $s0, $zero
D_80242988:
/* A2CBC8 80242988 2415001E */ addiu $s5, $zero, 0x1E
.L8024298C:
/* A2CBCC 8024298C 8E22000C */ lw $v0, 0xC($s1)
D_80242990:
/* A2CBD0 80242990 8C420014 */ lw $v0, 0x14($v0)
D_80242994:
/* A2CBD4 80242994 3C0142B4 */ lui $at, (0x42B40000 >> 16)
D_80242998:
/* A2CBD8 80242998 4481F000 */ mtc1 $at, $f30
glabel dead_11_SpinyAI_Main
/* A2CBDC 8024299C 00551021 */ addu $v0, $v0, $s5
glabel func_802429A0_EEFAA0
/* A2CBE0 802429A0 44821000 */ mtc1 $v0, $f2
D_802429A4:
/* A2CBE4 802429A4 00000000 */ nop
.L802429A8:
/* A2CBE8 802429A8 468010A1 */ cvt.d.w $f2, $f2
D_802429AC:
/* A2CBEC 802429AC 04410006 */ bgez $v0, func_802429C8
.L802429B0:
/* A2CBF0 802429B0 24140003 */ addiu $s4, $zero, 0x3
/* A2CBF4 802429B4 3C0141F0 */ lui $at, (0x41F00000 >> 16)
D_802429B8:
/* A2CBF8 802429B8 44810800 */ mtc1 $at, $f1
D_802429BC:
/* A2CBFC 802429BC 44800000 */ mtc1 $zero, $f0
glabel func_802429C0_EA32C0
/* A2CC00 802429C0 00000000 */ nop
glabel func_802429C4
/* A2CC04 802429C4 46201080 */ add.d $f2, $f2, $f0
glabel func_802429C8
/* A2CC08 802429C8 3C014080 */ lui $at, (0x40800000 >> 16)
D_802429CC:
/* A2CC0C 802429CC 44810000 */ mtc1 $at, $f0
D_802429D0:
/* A2CC10 802429D0 46201520 */ cvt.s.d $f20, $f2
D_802429D4:
/* A2CC14 802429D4 4600A502 */ mul.s $f20, $f20, $f0
.L802429D8:
/* A2CC18 802429D8 00000000 */ nop
.L802429DC:
/* A2CC1C 802429DC 3C018025 */ lui $at, %hi(D_8024F208)
dead_flo_12_D_802429E0:
/* A2CC20 802429E0 D420F208 */ ldc1 $f0, %lo(D_8024F208)($at)
D_802429E4:
/* A2CC24 802429E4 08090B41 */ j func_80242D04
D_802429E8:
/* A2CC28 802429E8 4600A521 */ cvt.d.s $f20, $f20
glabel func_802429EC
/* A2CC2C 802429EC 3C108025 */ lui $s0, %hi(D_8024F420_C0CCA0)
.L802429F0:
/* A2CC30 802429F0 2610F420 */ addiu $s0, $s0, %lo(D_8024F420_C0CCA0)
glabel func_802429F4
/* A2CC34 802429F4 0200902D */ daddu $s2, $s0, $zero
mgm_02_PanelModelIDs:
/* A2CC38 802429F8 2415001E */ addiu $s5, $zero, 0x1E
D_802429FC:
/* A2CC3C 802429FC 8E22000C */ lw $v0, 0xC($s1)
D_80242A00:
/* A2CC40 80242A00 8C420014 */ lw $v0, 0x14($v0)
glabel func_80242A04
/* A2CC44 80242A04 3C0142B4 */ lui $at, (0x42B40000 >> 16)
glabel func_80242A08
/* A2CC48 80242A08 4481F000 */ mtc1 $at, $f30
/* A2CC4C 80242A0C 00551021 */ addu $v0, $v0, $s5
glabel func_80242A10
/* A2CC50 80242A10 44821000 */ mtc1 $v0, $f2
glabel func_80242A14
/* A2CC54 80242A14 00000000 */ nop
glabel func_80242A18
/* A2CC58 80242A18 468010A1 */ cvt.d.w $f2, $f2
glabel func_80242A1C
/* A2CC5C 80242A1C 04410006 */ bgez $v0, .L80242A38
glabel func_80242A20
/* A2CC60 80242A20 24140003 */ addiu $s4, $zero, 0x3
D_80242A24:
/* A2CC64 80242A24 3C0141F0 */ lui $at, (0x41F00000 >> 16)
.L80242A28:
/* A2CC68 80242A28 44810800 */ mtc1 $at, $f1
D_80242A2C:
/* A2CC6C 80242A2C 44800000 */ mtc1 $zero, $f0
glabel func_80242A30
/* A2CC70 80242A30 00000000 */ nop
glabel func_80242A34
/* A2CC74 80242A34 46201080 */ add.d $f2, $f2, $f0
.L80242A38:
/* A2CC78 80242A38 3C014080 */ lui $at, (0x40800000 >> 16)
read_sign_instructions:
/* A2CC7C 80242A3C 44810000 */ mtc1 $at, $f0
D_80242A40:
/* A2CC80 80242A40 46201520 */ cvt.s.d $f20, $f2
.L80242A44:
/* A2CC84 80242A44 4600A502 */ mul.s $f20, $f20, $f0
.L80242A48:
/* A2CC88 80242A48 00000000 */ nop
glabel func_80242A4C_EA334C
/* A2CC8C 80242A4C 3C018025 */ lui $at, %hi(D_8024F210)
.L80242A50:
/* A2CC90 80242A50 D420F210 */ ldc1 $f0, %lo(D_8024F210)($at)
glabel .L80242A54
/* A2CC94 80242A54 08090B41 */ j func_80242D04
.L80242A58:
/* A2CC98 80242A58 4600A521 */ cvt.d.s $f20, $f20
glabel .L80242A5C
/* A2CC9C 80242A5C 3C108025 */ lui $s0, %hi(D_8024F448)
/* A2CCA0 80242A60 2610F448 */ addiu $s0, $s0, %lo(D_8024F448)
glabel func_80242A64
/* A2CCA4 80242A64 0200902D */ daddu $s2, $s0, $zero
glabel func_80242A68
/* A2CCA8 80242A68 2415001E */ addiu $s5, $zero, 0x1E
glabel func_80242A6C
/* A2CCAC 80242A6C 8E22000C */ lw $v0, 0xC($s1)
.L80242A70:
/* A2CCB0 80242A70 8C420014 */ lw $v0, 0x14($v0)
glabel func_80242A74
/* A2CCB4 80242A74 3C0142B4 */ lui $at, (0x42B40000 >> 16)
D_80242A78:
/* A2CCB8 80242A78 4481F000 */ mtc1 $at, $f30
glabel func_80242A7C
/* A2CCBC 80242A7C 00551021 */ addu $v0, $v0, $s5
glabel func_80242A80
/* A2CCC0 80242A80 44821000 */ mtc1 $v0, $f2
.L80242A84:
/* A2CCC4 80242A84 00000000 */ nop
.L80242A88:
/* A2CCC8 80242A88 468010A1 */ cvt.d.w $f2, $f2
glabel .L80242A8C
/* A2CCCC 80242A8C 04410006 */ bgez $v0, .L80242AA8
glabel func_80242A90
/* A2CCD0 80242A90 24140003 */ addiu $s4, $zero, 0x3
D_80242A94:
/* A2CCD4 80242A94 3C0141F0 */ lui $at, (0x41F00000 >> 16)
.L80242A98:
/* A2CCD8 80242A98 44810800 */ mtc1 $at, $f1
D_80242A9C:
/* A2CCDC 80242A9C 44800000 */ mtc1 $zero, $f0
D_80242AA0:
/* A2CCE0 80242AA0 00000000 */ nop
glabel .L80242AA4
/* A2CCE4 80242AA4 46201080 */ add.d $f2, $f2, $f0
.L80242AA8:
/* A2CCE8 80242AA8 3C014080 */ lui $at, (0x40800000 >> 16)
glabel func_80242AAC
/* A2CCEC 80242AAC 44810000 */ mtc1 $at, $f0
D_80242AB0:
/* A2CCF0 80242AB0 46201520 */ cvt.s.d $f20, $f2
glabel .L80242AB4
/* A2CCF4 80242AB4 4600A502 */ mul.s $f20, $f20, $f0
.L80242AB8:
/* A2CCF8 80242AB8 00000000 */ nop
glabel func_80242ABC
/* A2CCFC 80242ABC 3C018025 */ lui $at, %hi(D_8024F218)
glabel func_80242AC0
/* A2CD00 80242AC0 D420F218 */ ldc1 $f0, %lo(D_8024F218)($at)
D_80242AC4:
/* A2CD04 80242AC4 08090B41 */ j func_80242D04
glabel dgb_15_pad_2AC8
/* A2CD08 80242AC8 4600A521 */ cvt.d.s $f20, $f20
D_80242ACC:
/* A2CD0C 80242ACC 3C108025 */ lui $s0, %hi(D_8024F470)
D_80242AD0:
/* A2CD10 80242AD0 2610F470 */ addiu $s0, $s0, %lo(D_8024F470)
glabel func_80242AD4
/* A2CD14 80242AD4 8E22000C */ lw $v0, 0xC($s1)
glabel func_80242AD8
/* A2CD18 80242AD8 2415001E */ addiu $s5, $zero, 0x1E
glabel func_80242ADC
/* A2CD1C 80242ADC 8C420014 */ lw $v0, 0x14($v0)
/* A2CD20 80242AE0 3C0142B4 */ lui $at, (0x42B40000 >> 16)
.L80242AE4:
/* A2CD24 80242AE4 4481F000 */ mtc1 $at, $f30
glabel dead_kzn_17_LetterDelivery_Init
/* A2CD28 80242AE8 00551021 */ addu $v0, $v0, $s5
.L80242AEC:
/* A2CD2C 80242AEC 44821000 */ mtc1 $v0, $f2
glabel dead_flo_13_SpinyAI_Main
/* A2CD30 80242AF0 00000000 */ nop
.L80242AF4:
/* A2CD34 80242AF4 468010A1 */ cvt.d.w $f2, $f2
D_80242AF8:
/* A2CD38 80242AF8 04410006 */ bgez $v0, .L80242B14
D_80242AFC:
/* A2CD3C 80242AFC 0200902D */ daddu $s2, $s0, $zero
/* A2CD40 80242B00 3C0141F0 */ lui $at, (0x41F00000 >> 16)
glabel func_80242B04
/* A2CD44 80242B04 44810800 */ mtc1 $at, $f1
.L80242B08:
/* A2CD48 80242B08 44800000 */ mtc1 $zero, $f0
D_80242B0C:
/* A2CD4C 80242B0C 00000000 */ nop
glabel func_80242B10
/* A2CD50 80242B10 46201080 */ add.d $f2, $f2, $f0
glabel .L80242B14
/* A2CD54 80242B14 3C014080 */ lui $at, (0x40800000 >> 16)
D_80242B18:
/* A2CD58 80242B18 44810000 */ mtc1 $at, $f0
.L80242B1C:
/* A2CD5C 80242B1C 46201520 */ cvt.s.d $f20, $f2
.L80242B20:
/* A2CD60 80242B20 4600A502 */ mul.s $f20, $f20, $f0
D_80242B24:
/* A2CD64 80242B24 00000000 */ nop
/* A2CD68 80242B28 3C018025 */ lui $at, %hi(D_8024F220)
D_80242B2C:
/* A2CD6C 80242B2C D420F220 */ ldc1 $f0, %lo(D_8024F220)($at)
.L80242B30:
/* A2CD70 80242B30 4600A521 */ cvt.d.s $f20, $f20
glabel .L80242B34
/* A2CD74 80242B34 4620A500 */ add.d $f20, $f20, $f0
.L80242B38:
/* A2CD78 80242B38 4620A520 */ cvt.s.d $f20, $f20
glabel func_80242B3C
/* A2CD7C 80242B3C 0C00A8BB */ jal sin_deg
D_80242B40:
/* A2CD80 80242B40 4600A306 */ mov.s $f12, $f20
glabel .L80242B44
/* A2CD84 80242B44 4600F306 */ mov.s $f12, $f30
.L80242B48:
/* A2CD88 80242B48 3C014248 */ lui $at, (0x42480000 >> 16)
D_80242B4C:
/* A2CD8C 80242B4C 4481B000 */ mtc1 $at, $f22
.L80242B50:
/* A2CD90 80242B50 0C00A8BB */ jal sin_deg
.L80242B54:
/* A2CD94 80242B54 46000606 */ mov.s $f24, $f0
D_80242B58:
/* A2CD98 80242B58 46160002 */ mul.s $f0, $f0, $f22
glabel func_80242B5C
/* A2CD9C 80242B5C 00000000 */ nop
glabel func_80242B60
/* A2CDA0 80242B60 46180002 */ mul.s $f0, $f0, $f24
.L80242B64:
/* A2CDA4 80242B64 00000000 */ nop
glabel func_80242B68
/* A2CDA8 80242B68 8E22000C */ lw $v0, 0xC($s1)
/* A2CDAC 80242B6C C4420004 */ lwc1 $f2, 0x4($v0)
glabel func_80242B70
/* A2CDB0 80242B70 46001680 */ add.s $f26, $f2, $f0
glabel func_80242B74
/* A2CDB4 80242B74 0C00A8D4 */ jal cos_deg
glabel func_80242B78
/* A2CDB8 80242B78 4600A306 */ mov.s $f12, $f20
.L80242B7C:
/* A2CDBC 80242B7C 46160002 */ mul.s $f0, $f0, $f22
.L80242B80:
/* A2CDC0 80242B80 00000000 */ nop
D_80242B84:
/* A2CDC4 80242B84 8E22000C */ lw $v0, 0xC($s1)
D_80242B88:
/* A2CDC8 80242B88 C4420008 */ lwc1 $f2, 0x8($v0)
.L80242B8C:
/* A2CDCC 80242B8C 46001500 */ add.s $f20, $f2, $f0
D_80242B90:
/* A2CDD0 80242B90 0C00A8BB */ jal sin_deg
glabel func_80242B94
/* A2CDD4 80242B94 4600F306 */ mov.s $f12, $f30
D_80242B98:
/* A2CDD8 80242B98 46160002 */ mul.s $f0, $f0, $f22
D_80242B9C:
/* A2CDDC 80242B9C 00000000 */ nop
glabel func_80242BA0
/* A2CDE0 80242BA0 46180002 */ mul.s $f0, $f0, $f24
/* A2CDE4 80242BA4 00000000 */ nop
glabel func_80242BA8
/* A2CDE8 80242BA8 8E22000C */ lw $v0, 0xC($s1)
glabel func_80242BAC
/* A2CDEC 80242BAC C442000C */ lwc1 $f2, 0xC($v0)
D_80242BB0:
/* A2CDF0 80242BB0 08090B60 */ j D_80242D80
/* A2CDF4 80242BB4 24140003 */ addiu $s4, $zero, 0x3
glabel func_80242BB8
/* A2CDF8 80242BB8 3C108025 */ lui $s0, %hi(D_8024F498)
glabel func_80242BBC
/* A2CDFC 80242BBC 2610F498 */ addiu $s0, $s0, %lo(D_8024F498)
glabel func_80242BC0
/* A2CE00 80242BC0 0200902D */ daddu $s2, $s0, $zero
glabel .L80242BC4
/* A2CE04 80242BC4 2415001E */ addiu $s5, $zero, 0x1E
glabel .L80242BC8
/* A2CE08 80242BC8 8E22000C */ lw $v0, 0xC($s1)
.L80242BCC:
/* A2CE0C 80242BCC 8C420014 */ lw $v0, 0x14($v0)
glabel func_80242BD0
/* A2CE10 80242BD0 3C0142B4 */ lui $at, (0x42B40000 >> 16)
.L80242BD4:
/* A2CE14 80242BD4 4481F000 */ mtc1 $at, $f30
glabel dead_kzn_17_LetterDelivery_CalcLetterPos
/* A2CE18 80242BD8 00551021 */ addu $v0, $v0, $s5
.L80242BDC:
/* A2CE1C 80242BDC 44821000 */ mtc1 $v0, $f2
D_80242BE0:
/* A2CE20 80242BE0 00000000 */ nop
.L80242BE4:
/* A2CE24 80242BE4 468010A1 */ cvt.d.w $f2, $f2
.L80242BE8:
/* A2CE28 80242BE8 04410006 */ bgez $v0, .L80242C04
D_80242BEC:
/* A2CE2C 80242BEC 24140003 */ addiu $s4, $zero, 0x3
D_80242BF0:
/* A2CE30 80242BF0 3C0141F0 */ lui $at, (0x41F00000 >> 16)
flo_14_pad_2BF4:
/* A2CE34 80242BF4 44810800 */ mtc1 $at, $f1
D_80242BF8:
/* A2CE38 80242BF8 44800000 */ mtc1 $zero, $f0
.L80242BFC:
/* A2CE3C 80242BFC 00000000 */ nop
D_80242C00:
/* A2CE40 80242C00 46201080 */ add.d $f2, $f2, $f0
.L80242C04:
/* A2CE44 80242C04 3C014080 */ lui $at, (0x40800000 >> 16)
D_80242C08:
/* A2CE48 80242C08 44810000 */ mtc1 $at, $f0
glabel func_80242C0C
/* A2CE4C 80242C0C 46201520 */ cvt.s.d $f20, $f2
/* A2CE50 80242C10 4600A502 */ mul.s $f20, $f20, $f0
glabel func_80242C14
/* A2CE54 80242C14 00000000 */ nop
.L80242C18:
/* A2CE58 80242C18 3C018025 */ lui $at, %hi(D_8024F228)
glabel func_80242C1C
/* A2CE5C 80242C1C D420F228 */ ldc1 $f0, %lo(D_8024F228)($at)
glabel .L80242C20
/* A2CE60 80242C20 08090B41 */ j func_80242D04
glabel func_80242C24
/* A2CE64 80242C24 4600A521 */ cvt.d.s $f20, $f20
glabel .L80242C28
/* A2CE68 80242C28 3C108025 */ lui $s0, %hi(D_8024F4C0_C0CD40)
glabel .L80242C2C
/* A2CE6C 80242C2C 2610F4C0 */ addiu $s0, $s0, %lo(D_8024F4C0_C0CD40)
D_80242C30:
/* A2CE70 80242C30 0200902D */ daddu $s2, $s0, $zero
.L80242C34:
/* A2CE74 80242C34 2415001E */ addiu $s5, $zero, 0x1E
D_80242C38:
/* A2CE78 80242C38 8E22000C */ lw $v0, 0xC($s1)
D_80242C3C:
/* A2CE7C 80242C3C 8C420014 */ lw $v0, 0x14($v0)
D_80242C40:
/* A2CE80 80242C40 3C0142B4 */ lui $at, (0x42B40000 >> 16)
glabel func_80242C44
/* A2CE84 80242C44 4481F000 */ mtc1 $at, $f30
D_80242C48:
/* A2CE88 80242C48 00551021 */ addu $v0, $v0, $s5
.L80242C4C:
/* A2CE8C 80242C4C 44821000 */ mtc1 $v0, $f2
D_80242C50:
/* A2CE90 80242C50 00000000 */ nop
/* A2CE94 80242C54 468010A1 */ cvt.d.w $f2, $f2
D_80242C58:
/* A2CE98 80242C58 04410006 */ bgez $v0, .L80242C74
glabel func_80242C5C
/* A2CE9C 80242C5C 24140003 */ addiu $s4, $zero, 0x3
D_80242C60:
/* A2CEA0 80242C60 3C0141F0 */ lui $at, (0x41F00000 >> 16)
D_80242C64:
/* A2CEA4 80242C64 44810800 */ mtc1 $at, $f1
glabel func_80242C68
/* A2CEA8 80242C68 44800000 */ mtc1 $zero, $f0
D_80242C6C:
/* A2CEAC 80242C6C 00000000 */ nop
D_80242C70:
/* A2CEB0 80242C70 46201080 */ add.d $f2, $f2, $f0
.L80242C74:
/* A2CEB4 80242C74 3C014080 */ lui $at, (0x40800000 >> 16)
glabel func_80242C78
/* A2CEB8 80242C78 44810000 */ mtc1 $at, $f0
/* A2CEBC 80242C7C 46201520 */ cvt.s.d $f20, $f2
.L80242C80:
/* A2CEC0 80242C80 4600A502 */ mul.s $f20, $f20, $f0
glabel func_80242C84
/* A2CEC4 80242C84 00000000 */ nop
.L80242C88:
/* A2CEC8 80242C88 3C018025 */ lui $at, %hi(D_8024F230)
.L80242C8C:
/* A2CECC 80242C8C D420F230 */ ldc1 $f0, %lo(D_8024F230)($at)
.L80242C90:
/* A2CED0 80242C90 08090B41 */ j func_80242D04
glabel func_80242C94
/* A2CED4 80242C94 4600A521 */ cvt.d.s $f20, $f20
.L80242C98:
/* A2CED8 80242C98 3C108025 */ lui $s0, %hi(D_8024F4E8)
/* A2CEDC 80242C9C 2610F4E8 */ addiu $s0, $s0, %lo(D_8024F4E8)
glabel func_80242CA0
/* A2CEE0 80242CA0 0200902D */ daddu $s2, $s0, $zero
/* A2CEE4 80242CA4 2415001E */ addiu $s5, $zero, 0x1E
/* A2CEE8 80242CA8 8C82000C */ lw $v0, 0xC($a0)
.L80242CAC:
/* A2CEEC 80242CAC 8C420014 */ lw $v0, 0x14($v0)
.L80242CB0:
/* A2CEF0 80242CB0 3C0142B4 */ lui $at, (0x42B40000 >> 16)
.L80242CB4:
/* A2CEF4 80242CB4 4481F000 */ mtc1 $at, $f30
.L80242CB8:
/* A2CEF8 80242CB8 00551021 */ addu $v0, $v0, $s5
.L80242CBC:
/* A2CEFC 80242CBC 44821000 */ mtc1 $v0, $f2
.L80242CC0:
/* A2CF00 80242CC0 00000000 */ nop
.L80242CC4:
/* A2CF04 80242CC4 468010A1 */ cvt.d.w $f2, $f2
glabel func_80242CC8
/* A2CF08 80242CC8 04410006 */ bgez $v0, func_80242CE4
.L80242CCC:
/* A2CF0C 80242CCC 24140003 */ addiu $s4, $zero, 0x3
glabel func_80242CD0
/* A2CF10 80242CD0 3C0141F0 */ lui $at, (0x41F00000 >> 16)
.L80242CD4:
/* A2CF14 80242CD4 44810800 */ mtc1 $at, $f1
D_80242CD8:
/* A2CF18 80242CD8 44800000 */ mtc1 $zero, $f0
.L80242CDC:
/* A2CF1C 80242CDC 00000000 */ nop
D_80242CE0:
/* A2CF20 80242CE0 46201080 */ add.d $f2, $f2, $f0
glabel func_80242CE4
/* A2CF24 80242CE4 3C014080 */ lui $at, (0x40800000 >> 16)
D_80242CE8:
/* A2CF28 80242CE8 44810000 */ mtc1 $at, $f0
glabel func_80242CEC
/* A2CF2C 80242CEC 46201520 */ cvt.s.d $f20, $f2
glabel func_80242CF0
/* A2CF30 80242CF0 4600A502 */ mul.s $f20, $f20, $f0
D_80242CF4:
/* A2CF34 80242CF4 00000000 */ nop
glabel func_80242CF8
/* A2CF38 80242CF8 3C018025 */ lui $at, %hi(D_8024F238)
.L80242CFC:
/* A2CF3C 80242CFC D420F238 */ ldc1 $f0, %lo(D_8024F238)($at)
glabel func_80242D00
/* A2CF40 80242D00 4600A521 */ cvt.d.s $f20, $f20
glabel func_80242D04
/* A2CF44 80242D04 4620A500 */ add.d $f20, $f20, $f0
.L80242D08:
/* A2CF48 80242D08 4620A520 */ cvt.s.d $f20, $f20
glabel func_80242D0C
/* A2CF4C 80242D0C 0C00A8BB */ jal sin_deg
/* A2CF50 80242D10 4600A306 */ mov.s $f12, $f20
glabel func_80242D14
/* A2CF54 80242D14 4600F306 */ mov.s $f12, $f30
.L80242D18:
/* A2CF58 80242D18 3C014248 */ lui $at, (0x42480000 >> 16)
glabel func_80242D1C
/* A2CF5C 80242D1C 4481B000 */ mtc1 $at, $f22
glabel func_80242D20
/* A2CF60 80242D20 0C00A8BB */ jal sin_deg
.L80242D24:
/* A2CF64 80242D24 46000606 */ mov.s $f24, $f0
glabel func_80242D28
/* A2CF68 80242D28 46160002 */ mul.s $f0, $f0, $f22
glabel func_80242D2C
/* A2CF6C 80242D2C 00000000 */ nop
.L80242D30:
/* A2CF70 80242D30 46180002 */ mul.s $f0, $f0, $f24
D_80242D34:
/* A2CF74 80242D34 00000000 */ nop
glabel func_80242D38
/* A2CF78 80242D38 8E22000C */ lw $v0, 0xC($s1)
glabel func_80242D3C
/* A2CF7C 80242D3C C4420004 */ lwc1 $f2, 0x4($v0)
D_80242D40:
/* A2CF80 80242D40 46001680 */ add.s $f26, $f2, $f0
.L80242D44:
/* A2CF84 80242D44 0C00A8D4 */ jal cos_deg
glabel func_80242D48
/* A2CF88 80242D48 4600A306 */ mov.s $f12, $f20
glabel func_80242D4C
/* A2CF8C 80242D4C 46160002 */ mul.s $f0, $f0, $f22
D_80242D50:
/* A2CF90 80242D50 00000000 */ nop
glabel .L80242D54
/* A2CF94 80242D54 8E22000C */ lw $v0, 0xC($s1)
glabel func_80242D58
/* A2CF98 80242D58 C4420008 */ lwc1 $f2, 0x8($v0)
.L80242D5C:
/* A2CF9C 80242D5C 46001500 */ add.s $f20, $f2, $f0
D_80242D60:
/* A2CFA0 80242D60 0C00A8BB */ jal sin_deg
glabel func_80242D64
/* A2CFA4 80242D64 4600F306 */ mov.s $f12, $f30
.L80242D68:
/* A2CFA8 80242D68 46160002 */ mul.s $f0, $f0, $f22
.L80242D6C:
/* A2CFAC 80242D6C 00000000 */ nop
D_80242D70:
/* A2CFB0 80242D70 46180002 */ mul.s $f0, $f0, $f24
.L80242D74:
/* A2CFB4 80242D74 00000000 */ nop
.L80242D78:
/* A2CFB8 80242D78 8E22000C */ lw $v0, 0xC($s1)
.L80242D7C:
/* A2CFBC 80242D7C C442000C */ lwc1 $f2, 0xC($v0)
D_80242D80:
/* A2CFC0 80242D80 46001080 */ add.s $f2, $f2, $f0
.L80242D84:
/* A2CFC4 80242D84 E61A0018 */ swc1 $f26, 0x18($s0)
.L80242D88:
/* A2CFC8 80242D88 E614001C */ swc1 $f20, 0x1C($s0)
glabel func_80242D8C
/* A2CFCC 80242D8C E6020020 */ swc1 $f2, 0x20($s0)
glabel func_80242D90
/* A2CFD0 80242D90 0260202D */ daddu $a0, $s3, $zero
glabel func_80242D94
/* A2CFD4 80242D94 3C05FE36 */ lui $a1, (0xFE363C80 >> 16)
glabel func_80242D98
/* A2CFD8 80242D98 0C0B210B */ jal evt_get_float_variable
.L80242D9C:
/* A2CFDC 80242D9C 34A53C80 */ ori $a1, $a1, (0xFE363C80 & 0xFFFF)
.L80242DA0:
/* A2CFE0 80242DA0 0260202D */ daddu $a0, $s3, $zero
.L80242DA4:
/* A2CFE4 80242DA4 3C05FE36 */ lui $a1, (0xFE363C81 >> 16)
glabel dead_kzn_17_LetterDelivery_RestoreNpcAnim
/* A2CFE8 80242DA8 34A53C81 */ ori $a1, $a1, (0xFE363C81 & 0xFFFF)
D_80242DAC:
/* A2CFEC 80242DAC 0C0B210B */ jal evt_get_float_variable
glabel func_80242DB0
/* A2CFF0 80242DB0 E6400000 */ swc1 $f0, 0x0($s2)
.L80242DB4:
/* A2CFF4 80242DB4 0260202D */ daddu $a0, $s3, $zero
glabel func_80242DB8
/* A2CFF8 80242DB8 3C05FE36 */ lui $a1, (0xFE363C82 >> 16)
glabel func_80242DBC
/* A2CFFC 80242DBC 34A53C82 */ ori $a1, $a1, (0xFE363C82 & 0xFFFF)
.L80242DC0:
/* A2D000 80242DC0 0C0B210B */ jal evt_get_float_variable
D_80242DC4:
/* A2D004 80242DC4 E6400004 */ swc1 $f0, 0x4($s2)
D_80242DC8:
/* A2D008 80242DC8 26510018 */ addiu $s1, $s2, 0x18
.L80242DCC:
/* A2D00C 80242DCC E6400008 */ swc1 $f0, 0x8($s2)
.L80242DD0:
/* A2D010 80242DD0 24020002 */ addiu $v0, $zero, 0x2
/* A2D014 80242DD4 12C20028 */ beq $s6, $v0, func_80242E78
glabel func_80242DD8
/* A2D018 80242DD8 2652000C */ addiu $s2, $s2, 0xC
.L80242DDC:
/* A2D01C 80242DDC 0260202D */ daddu $a0, $s3, $zero
glabel func_80242DE0
/* A2D020 80242DE0 3C05FE36 */ lui $a1, (0xFE363C80 >> 16)
glabel func_80242DE4
/* A2D024 80242DE4 0C0B210B */ jal evt_get_float_variable
glabel func_80242DE8
/* A2D028 80242DE8 34A53C80 */ ori $a1, $a1, (0xFE363C80 & 0xFFFF)
glabel func_80242DEC
/* A2D02C 80242DEC 461C0002 */ mul.s $f0, $f0, $f28
glabel func_80242DF0
/* A2D030 80242DF0 00000000 */ nop
.L80242DF4:
/* A2D034 80242DF4 3C013F80 */ lui $at, (0x3F800000 >> 16)
.L80242DF8:
/* A2D038 80242DF8 4481A000 */ mtc1 $at, $f20
.L80242DFC:
/* A2D03C 80242DFC 00000000 */ nop
glabel dead_kzn_17_GetActingPartner
/* A2D040 80242E00 461CA501 */ sub.s $f20, $f20, $f28
.L80242E04:
/* A2D044 80242E04 C6220000 */ lwc1 $f2, 0x0($s1)
.L80242E08:
/* A2D048 80242E08 46141082 */ mul.s $f2, $f2, $f20
glabel func_80242E0C
/* A2D04C 80242E0C 00000000 */ nop
.L80242E10:
/* A2D050 80242E10 0260202D */ daddu $a0, $s3, $zero
glabel func_80242E14
/* A2D054 80242E14 46020000 */ add.s $f0, $f0, $f2
.L80242E18:
/* A2D058 80242E18 3C05FE36 */ lui $a1, (0xFE363C81 >> 16)
.L80242E1C:
/* A2D05C 80242E1C 34A53C81 */ ori $a1, $a1, (0xFE363C81 & 0xFFFF)
glabel func_80242E20
/* A2D060 80242E20 0C0B210B */ jal evt_get_float_variable
.L80242E24:
/* A2D064 80242E24 E6400000 */ swc1 $f0, 0x0($s2)
D_80242E28:
/* A2D068 80242E28 461C0002 */ mul.s $f0, $f0, $f28
glabel dead_kzn_17_UnkFunc46
/* A2D06C 80242E2C 00000000 */ nop
/* A2D070 80242E30 C6220004 */ lwc1 $f2, 0x4($s1)
/* A2D074 80242E34 46141082 */ mul.s $f2, $f2, $f20
.L80242E38:
/* A2D078 80242E38 00000000 */ nop
.L80242E3C:
/* A2D07C 80242E3C 46020000 */ add.s $f0, $f0, $f2
.L80242E40:
/* A2D080 80242E40 C7A40010 */ lwc1 $f4, 0x10($sp)
.L80242E44:
/* A2D084 80242E44 0260202D */ daddu $a0, $s3, $zero
.L80242E48:
/* A2D088 80242E48 46040000 */ add.s $f0, $f0, $f4
.L80242E4C:
/* A2D08C 80242E4C 3C05FE36 */ lui $a1, (0xFE363C82 >> 16)
.L80242E50:
/* A2D090 80242E50 34A53C82 */ ori $a1, $a1, (0xFE363C82 & 0xFFFF)
glabel func_80242E54
/* A2D094 80242E54 0C0B210B */ jal evt_get_float_variable
.L80242E58:
/* A2D098 80242E58 E6400004 */ swc1 $f0, 0x4($s2)
.L80242E5C:
/* A2D09C 80242E5C 461C0002 */ mul.s $f0, $f0, $f28
.L80242E60:
/* A2D0A0 80242E60 00000000 */ nop
.L80242E64:
/* A2D0A4 80242E64 C6220008 */ lwc1 $f2, 0x8($s1)
.L80242E68:
/* A2D0A8 80242E68 46141082 */ mul.s $f2, $f2, $f20
glabel func_80242E6C
/* A2D0AC 80242E6C 00000000 */ nop
glabel func_80242E70
/* A2D0B0 80242E70 08090BC8 */ j func_80242F20
.L80242E74:
/* A2D0B4 80242E74 46020000 */ add.s $f0, $f0, $f2
glabel func_80242E78
/* A2D0B8 80242E78 0260202D */ daddu $a0, $s3, $zero
.L80242E7C:
/* A2D0BC 80242E7C 3C05FE36 */ lui $a1, (0xFE363C80 >> 16)
.L80242E80:
/* A2D0C0 80242E80 0C0B210B */ jal evt_get_float_variable
glabel func_80242E84
/* A2D0C4 80242E84 34A53C80 */ ori $a1, $a1, (0xFE363C80 & 0xFFFF)
D_80242E88:
/* A2D0C8 80242E88 461C0002 */ mul.s $f0, $f0, $f28
glabel func_80242E8C
/* A2D0CC 80242E8C 00000000 */ nop
D_80242E90:
/* A2D0D0 80242E90 3C013F80 */ lui $at, (0x3F800000 >> 16)
glabel .L80242E94
/* A2D0D4 80242E94 4481A000 */ mtc1 $at, $f20
jtbl_80242E98:
/* A2D0D8 80242E98 00000000 */ nop
.L80242E9C:
/* A2D0DC 80242E9C 461CA501 */ sub.s $f20, $f20, $f28
D_80242EA0:
/* A2D0E0 80242EA0 C6220000 */ lwc1 $f2, 0x0($s1)
.L80242EA4:
/* A2D0E4 80242EA4 46141082 */ mul.s $f2, $f2, $f20
flo_08_pad_2EA8:
/* A2D0E8 80242EA8 00000000 */ nop
D_80242EAC:
/* A2D0EC 80242EAC 46020000 */ add.s $f0, $f0, $f2
D_80242EB0:
/* A2D0F0 80242EB0 3C014248 */ lui $at, (0x42480000 >> 16)
glabel func_80242EB4
/* A2D0F4 80242EB4 4481B000 */ mtc1 $at, $f22
glabel func_80242EB8
/* A2D0F8 80242EB8 0260202D */ daddu $a0, $s3, $zero
glabel func_80242EBC
/* A2D0FC 80242EBC 46160001 */ sub.s $f0, $f0, $f22
.L80242EC0:
/* A2D100 80242EC0 3C05FE36 */ lui $a1, (0xFE363C81 >> 16)
glabel func_80242EC4_EA37C4
/* A2D104 80242EC4 34A53C81 */ ori $a1, $a1, (0xFE363C81 & 0xFFFF)
.L80242EC8:
/* A2D108 80242EC8 0C0B210B */ jal evt_get_float_variable
D_80242ECC:
/* A2D10C 80242ECC E6400000 */ swc1 $f0, 0x0($s2)
.L80242ED0:
/* A2D110 80242ED0 461C0002 */ mul.s $f0, $f0, $f28
.L80242ED4:
/* A2D114 80242ED4 00000000 */ nop
.L80242ED8:
/* A2D118 80242ED8 C6220004 */ lwc1 $f2, 0x4($s1)
.L80242EDC:
/* A2D11C 80242EDC 46141082 */ mul.s $f2, $f2, $f20
D_80242EE0:
/* A2D120 80242EE0 00000000 */ nop
.L80242EE4:
/* A2D124 80242EE4 46020000 */ add.s $f0, $f0, $f2
D_80242EE8:
/* A2D128 80242EE8 C7A40010 */ lwc1 $f4, 0x10($sp)
.L80242EEC:
/* A2D12C 80242EEC 0260202D */ daddu $a0, $s3, $zero
D_80242EF0:
/* A2D130 80242EF0 46040000 */ add.s $f0, $f0, $f4
.L80242EF4:
/* A2D134 80242EF4 3C05FE36 */ lui $a1, (0xFE363C82 >> 16)
glabel func_80242EF8
/* A2D138 80242EF8 34A53C82 */ ori $a1, $a1, (0xFE363C82 & 0xFFFF)
.L80242EFC:
/* A2D13C 80242EFC 0C0B210B */ jal evt_get_float_variable
D_80242F00:
/* A2D140 80242F00 E6400004 */ swc1 $f0, 0x4($s2)
/* A2D144 80242F04 461C0002 */ mul.s $f0, $f0, $f28
glabel func_80242F08
/* A2D148 80242F08 00000000 */ nop
.L80242F0C:
/* A2D14C 80242F0C C6220008 */ lwc1 $f2, 0x8($s1)
D_80242F10:
/* A2D150 80242F10 46141082 */ mul.s $f2, $f2, $f20
glabel func_80242F14
/* A2D154 80242F14 00000000 */ nop
.L80242F18:
/* A2D158 80242F18 46020000 */ add.s $f0, $f0, $f2
glabel func_80242F1C
/* A2D15C 80242F1C 46160001 */ sub.s $f0, $f0, $f22
glabel func_80242F20
/* A2D160 80242F20 E6400008 */ swc1 $f0, 0x8($s2)
/* A2D164 80242F24 AE750084 */ sw $s5, 0x84($s3)
D_80242F28:
/* A2D168 80242F28 AE700088 */ sw $s0, 0x88($s3)
.L80242F2C:
/* A2D16C 80242F2C AE74008C */ sw $s4, 0x8C($s3)
D_80242F30:
/* A2D170 80242F30 8FBF0034 */ lw $ra, 0x34($sp)
D_80242F34:
/* A2D174 80242F34 8FB60030 */ lw $s6, 0x30($sp)
D_80242F38:
/* A2D178 80242F38 8FB5002C */ lw $s5, 0x2C($sp)
glabel func_80242F3C
/* A2D17C 80242F3C 8FB40028 */ lw $s4, 0x28($sp)
D_80242F40:
/* A2D180 80242F40 8FB30024 */ lw $s3, 0x24($sp)
glabel func_80242F44
/* A2D184 80242F44 8FB20020 */ lw $s2, 0x20($sp)
.L80242F48:
/* A2D188 80242F48 8FB1001C */ lw $s1, 0x1C($sp)
.L80242F4C:
/* A2D18C 80242F4C 8FB00018 */ lw $s0, 0x18($sp)
D_80242F50:
/* A2D190 80242F50 D7BE0060 */ ldc1 $f30, 0x60($sp)
glabel func_80242F54
/* A2D194 80242F54 D7BC0058 */ ldc1 $f28, 0x58($sp)
D_80242F58:
/* A2D198 80242F58 D7BA0050 */ ldc1 $f26, 0x50($sp)
.L80242F5C:
/* A2D19C 80242F5C D7B80048 */ ldc1 $f24, 0x48($sp)
D_80242F60:
/* A2D1A0 80242F60 D7B60040 */ ldc1 $f22, 0x40($sp)
glabel dead_kzn_17_UnkFunc48
/* A2D1A4 80242F64 D7B40038 */ ldc1 $f20, 0x38($sp)
D_80242F68:
/* A2D1A8 80242F68 24020002 */ addiu $v0, $zero, 0x2
glabel func_80242F6C
/* A2D1AC 80242F6C 03E00008 */ jr $ra
glabel func_80242F70
/* A2D1B0 80242F70 27BD0068 */ addiu $sp, $sp, 0x68
### DECOMPILED C INSTRUCTIONS:
API_CALLABLE(func_802428C8_A2CB08) {
Bytecode* args = script->ptrReadPos;
s32 arg0 = evt_get_variable(script, *args++);
f32 arg1 = evt_get_float_variable(script, *args++);
f32 arg2 = evt_get_float_variable(script, *args++);
EffectInstance* arrayVar0;
f32 xPos, yPos, zPos;
EffectInstance* effect;
UnkHos05Path* path;
Vec3f* point;
Vec3f* endPoint;
s32 numPoints;
s32 pathTime;
s32 i;
arrayVar0 = (EffectInstance*) evt_get_variable(script, ArrayVar(0));
effect = arrayVar0;
// set endPoint
switch (arg0) {
case 1:
path = &N(D_8024F3F8)[0];
i = 1;
point = &path->startPoint;
pathTime = 30;
numPoints = 3;
{
f32 angle = 90.0f;
u32 unk_14 = effect->data.somethingRotating->unk_14 + 30;
f32 angle3 = unk_14 * 4.0f + (f32) i * 51.43;
f32 radius = 50.0f;
f32 temp_f24 = sin_deg(angle3);
xPos = effect->data.somethingRotating->pos.x + sin_deg(angle) * radius * temp_f24 ;
yPos = effect->data.somethingRotating->pos.y + cos_deg(angle3) * radius;
// @bug should be `zPos = effect->data.somethingRotating->pos.z + cos_deg(angle) * radius * temp_f24;`
zPos = effect->data.somethingRotating->pos.z + sin_deg(angle) * radius * temp_f24;
path->endPoint.x = xPos;
path->endPoint.y = yPos;
path->endPoint.z = zPos;
}
break;
case 2:
path = &N(D_8024F3F8)[1];
i = 7;
point = &path->startPoint;
pathTime = 30;
numPoints = 3;
{
f32 angle = 90.0f;
u32 unk_14 = effect->data.somethingRotating->unk_14 + 30;
f32 angle3 = unk_14 * 4.0f + (f32) i * 51.43;
f32 radius = 50.0f;
f32 temp_f24 = sin_deg(angle3);
xPos = effect->data.somethingRotating->pos.x + sin_deg(angle) * radius * temp_f24 ;
yPos = effect->data.somethingRotating->pos.y + cos_deg(angle3) * radius;
zPos = effect->data.somethingRotating->pos.z + sin_deg(angle) * radius * temp_f24;
path->endPoint.x = xPos;
path->endPoint.y = yPos;
path->endPoint.z = zPos;
}
break;
case 3:
path = &N(D_8024F3F8)[2];
i = 3;
point = &path->startPoint;
pathTime = 30;
numPoints = 3;
{
f32 angle = 90.0f;
u32 unk_14 = effect->data.somethingRotating->unk_14 + 30;
f32 angle3 = unk_14 * 4.0f + (f32) i * 51.43;
f32 radius = 50.0f;
f32 temp_f24 = sin_deg(angle3);
xPos = effect->data.somethingRotating->pos.x + sin_deg(angle) * radius * temp_f24 ;
yPos = effect->data.somethingRotating->pos.y + cos_deg(angle3) * radius;
zPos = effect->data.somethingRotating->pos.z + sin_deg(angle) * radius * temp_f24;
path->endPoint.x = xPos;
path->endPoint.y = yPos;
path->endPoint.z = zPos;
}
break;
case 4:
path = &N(D_8024F3F8)[3];
i = 4;
point = &path->startPoint;
pathTime = 30;
{
f32 angle = 90.0f;
u32 unk_14 = effect->data.somethingRotating->unk_14 + 30;
f32 angle3 = unk_14 * 4.0f + (f32) i * 51.43;
f32 radius = 50.0f;
f32 temp_f24 = sin_deg(angle3);
numPoints = 3;
xPos = effect->data.somethingRotating->pos.x + sin_deg(angle) * radius * temp_f24 ;
yPos = effect->data.somethingRotating->pos.y + cos_deg(angle3) * radius;
zPos = effect->data.somethingRotating->pos.z + sin_deg(angle) * radius * temp_f24;
path->endPoint.x = xPos;
path->endPoint.y = yPos;
path->endPoint.z = zPos;
}
break;
case 5:
path = &N(D_8024F3F8)[4];
i = 6;
point = &path->startPoint;
pathTime = 30;
numPoints = 3;
{
f32 angle = 90.0f;
u32 unk_14 = effect->data.somethingRotating->unk_14 + 30;
f32 angle3 = unk_14 * 4.0f + (f32) i * 51.43;
f32 radius = 50.0f;
f32 temp_f24 = sin_deg(angle3);
xPos = effect->data.somethingRotating->pos.x + sin_deg(angle) * radius * temp_f24 ;
yPos = effect->data.somethingRotating->pos.y + cos_deg(angle3) * radius;
zPos = effect->data.somethingRotating->pos.z + sin_deg(angle) * radius * temp_f24;
path->endPoint.x = xPos;
path->endPoint.y = yPos;
path->endPoint.z = zPos;
}
break;
case 6:
path = &N(D_8024F3F8)[5];
i = 2;
point = &path->startPoint;
pathTime = 30;
numPoints = 3;
{
f32 angle = 90.0f;
u32 unk_14 = effect->data.somethingRotating->unk_14 + 30;
f32 angle3 = unk_14 * 4.0f + (f32) i * 51.43;
f32 radius = 50.0f;
f32 temp_f24 = sin_deg(angle3);
xPos = effect->data.somethingRotating->pos.x + sin_deg(angle) * radius * temp_f24 ;
yPos = effect->data.somethingRotating->pos.y + cos_deg(angle3) * radius;
zPos = effect->data.somethingRotating->pos.z + sin_deg(angle) * radius * temp_f24;
path->endPoint.x = xPos;
path->endPoint.y = yPos;
path->endPoint.z = zPos;
}
break;
default:
path = &N(D_8024F3F8)[6];
i = 5;
point = &path->startPoint;
pathTime = 30;
numPoints = 3;
{
f32 angle = 90.0f;
u32 unk_14 = effect->data.somethingRotating->unk_14 + 30;
f32 angle3 = unk_14 * 4.0f + (f32) i * 51.43;
f32 radius = 50.0f;
f32 temp_f24 = sin_deg(angle3);
xPos = effect->data.somethingRotating->pos.x + sin_deg(angle) * radius * temp_f24 ;
yPos = effect->data.somethingRotating->pos.y + cos_deg(angle3) * radius;
zPos = effect->data.somethingRotating->pos.z + sin_deg(angle) * radius * temp_f24;
path->endPoint.x = xPos;
path->endPoint.y = yPos;
path->endPoint.z = zPos;
}
break;
}
// set startPoint
point->x = evt_get_float_variable(script, LVar0);
point->y = evt_get_float_variable(script, LVar1);
point->z = evt_get_float_variable(script, LVar2);
endPoint = &point[2];
point++;
// set midPoint
if (arg0 != 2) {
point->x = (evt_get_float_variable(script, LVar0) * arg2) + (endPoint->x * (1.0f - arg2));
point->y = (evt_get_float_variable(script, LVar1) * arg2) + (endPoint->y * (1.0f - arg2)) + arg1;
point->z = (evt_get_float_variable(script, LVar2) * arg2) + (endPoint->z * (1.0f - arg2));
} else {
point->x = ((evt_get_float_variable(script, LVar0) * arg2) + (endPoint->x * (1.0f - arg2))) - 50.0f;
point->y = (evt_get_float_variable(script, LVar1) * arg2) + (endPoint->y * (1.0f - arg2)) + arg1;
point->z = ((evt_get_float_variable(script, LVar2) * arg2) + (endPoint->z * (1.0f - arg2))) - 50.0f;
}
script->varTable[0] = pathTime;
script->varTablePtr[1] = path;
script->varTable[2] = numPoints;
return ApiStatus_DONE2;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_802A3C98_7AB638
/* 418A28 802A3C98 3C02802B */ lui $v0, %hi(battle_menu_moveState)
/* 418A2C 802A3C9C 9042D108 */ lbu $v0, %lo(battle_menu_moveState)($v0)
/* 418A30 802A3CA0 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 418A34 802A3CA4 AFBF0044 */ sw $ra, 0x44($sp)
/* 418A38 802A3CA8 AFBE0040 */ sw $fp, 0x40($sp)
/* 418A3C 802A3CAC AFB7003C */ sw $s7, 0x3C($sp)
/* 418A40 802A3CB0 AFB60038 */ sw $s6, 0x38($sp)
/* 418A44 802A3CB4 AFB50034 */ sw $s5, 0x34($sp)
/* 418A48 802A3CB8 AFB40030 */ sw $s4, 0x30($sp)
/* 418A4C 802A3CBC AFB3002C */ sw $s3, 0x2C($sp)
/* 418A50 802A3CC0 AFB20028 */ sw $s2, 0x28($sp)
/* 418A54 802A3CC4 AFB10024 */ sw $s1, 0x24($sp)
/* 418A58 802A3CC8 AFB00020 */ sw $s0, 0x20($sp)
/* 418A5C 802A3CCC AFA5004C */ sw $a1, 0x4C($sp)
/* 418A60 802A3CD0 24420001 */ addiu $v0, $v0, 0x1
/* 418A64 802A3CD4 00021600 */ sll $v0, $v0, 24
/* 418A68 802A3CD8 00021E03 */ sra $v1, $v0, 24
/* 418A6C 802A3CDC 2C62002B */ sltiu $v0, $v1, 0x2B
/* 418A70 802A3CE0 104001B2 */ beqz $v0, .L802A43AC_7ABD4C
/* 418A74 802A3CE4 AFA60050 */ sw $a2, 0x50($sp)
/* 418A78 802A3CE8 00031080 */ sll $v0, $v1, 2
/* 418A7C 802A3CEC 3C01802B */ lui $at, %hi(jtbl_802AB8C0_7B3260)
D_802A3CF0_7AB690:
/* 418A80 802A3CF0 00220821 */ addu $at, $at, $v0
/* 418A84 802A3CF4 8C22B8C0 */ lw $v0, %lo(jtbl_802AB8C0_7B3260)($at)
/* 418A88 802A3CF8 00400008 */ jr $v0
/* 418A8C 802A3CFC 00000000 */ nop
glabel .L802A3D00_7AB6A0
/* 418A90 802A3D00 3C03802B */ lui $v1, %hi(battle_menu_moveScrollLine)
/* 418A94 802A3D04 8063D10C */ lb $v1, %lo(battle_menu_moveScrollLine)($v1)
/* 418A98 802A3D08 3C08802B */ lui $t0, %hi(battle_menu_moveScrollOffset)
/* 418A9C 802A3D0C 8508D110 */ lh $t0, %lo(battle_menu_moveScrollOffset)($t0)
/* 418AA0 802A3D10 3C013FE0 */ lui $at, (0x3FE00000 >> 16)
/* 418AA4 802A3D14 44811800 */ mtc1 $at, $f3
/* 418AA8 802A3D18 44801000 */ mtc1 $zero, $f2
D_802A3D1C_7AB6BC:
/* 418AAC 802A3D1C 00031823 */ negu $v1, $v1
/* 418AB0 802A3D20 00031040 */ sll $v0, $v1, 1
/* 418AB4 802A3D24 00431021 */ addu $v0, $v0, $v1
/* 418AB8 802A3D28 00021080 */ sll $v0, $v0, 2
/* 418ABC 802A3D2C 00438821 */ addu $s1, $v0, $v1
/* 418AC0 802A3D30 02281023 */ subu $v0, $s1, $t0
/* 418AC4 802A3D34 44820000 */ mtc1 $v0, $f0
D_802A3D38_7AB6D8:
/* 418AC8 802A3D38 00000000 */ nop
/* 418ACC 802A3D3C 46800021 */ cvt.d.w $f0, $f0
/* 418AD0 802A3D40 46220002 */ mul.d $f0, $f0, $f2
/* 418AD4 802A3D44 00000000 */ nop
/* 418AD8 802A3D48 4620018D */ trunc.w.d $f6, $f0
/* 418ADC 802A3D4C 44023000 */ mfc1 $v0, $f6
/* 418AE0 802A3D50 00000000 */ nop
/* 418AE4 802A3D54 14400002 */ bnez $v0, .L802A3D60_7AB700
/* 418AE8 802A3D58 01024021 */ addu $t0, $t0, $v0
/* 418AEC 802A3D5C 0220402D */ daddu $t0, $s1, $zero
.L802A3D60_7AB700:
/* 418AF0 802A3D60 0000982D */ daddu $s3, $zero, $zero
/* 418AF4 802A3D64 3C06800A */ lui $a2, %hi(gMainGfxPos)
/* 418AF8 802A3D68 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos)
/* 418AFC 802A3D6C 3C05802B */ lui $a1, %hi(battle_menu_moveScrollOffset)
/* 418B00 802A3D70 24A5D110 */ addiu $a1, $a1, %lo(battle_menu_moveScrollOffset)
/* 418B04 802A3D74 8FA9004C */ lw $t1, 0x4C($sp)
/* 418B08 802A3D78 8CC40000 */ lw $a0, 0x0($a2)
/* 418B0C 802A3D7C 3C03802B */ lui $v1, %hi(D_802AD10E)
/* 418B10 802A3D80 8063D10E */ lb $v1, %lo(D_802AD10E)($v1)
/* 418B14 802A3D84 3C014080 */ lui $at, (0x40800000 >> 16)
/* 418B18 802A3D88 44812000 */ mtc1 $at, $f4
/* 418B1C 802A3D8C 25350002 */ addiu $s5, $t1, 0x2
/* 418B20 802A3D90 44951000 */ mtc1 $s5, $f2
/* 418B24 802A3D94 00000000 */ nop
/* 418B28 802A3D98 468010A0 */ cvt.s.w $f2, $f2
/* 418B2C 802A3D9C 00031040 */ sll $v0, $v1, 1
/* 418B30 802A3DA0 00431021 */ addu $v0, $v0, $v1
/* 418B34 802A3DA4 00021080 */ sll $v0, $v0, 2
/* 418B38 802A3DA8 00431021 */ addu $v0, $v0, $v1
/* 418B3C 802A3DAC 24420001 */ addiu $v0, $v0, 0x1
/* 418B40 802A3DB0 0080382D */ daddu $a3, $a0, $zero
/* 418B44 802A3DB4 8FA90050 */ lw $t1, 0x50($sp)
/* 418B48 802A3DB8 46041082 */ mul.s $f2, $f2, $f4
/* 418B4C 802A3DBC 00000000 */ nop
/* 418B50 802A3DC0 25310012 */ addiu $s1, $t1, 0x12
/* 418B54 802A3DC4 8FA9004C */ lw $t1, 0x4C($sp)
/* 418B58 802A3DC8 24840008 */ addiu $a0, $a0, 0x8
/* 418B5C 802A3DCC A4A80000 */ sh $t0, 0x0($a1)
/* 418B60 802A3DD0 02224021 */ addu $t0, $s1, $v0
/* 418B64 802A3DD4 44910000 */ mtc1 $s1, $f0
/* 418B68 802A3DD8 00000000 */ nop
/* 418B6C 802A3DDC 46800020 */ cvt.s.w $f0, $f0
/* 418B70 802A3DE0 46040002 */ mul.s $f0, $f0, $f4
/* 418B74 802A3DE4 00000000 */ nop
/* 418B78 802A3DE8 84A20000 */ lh $v0, 0x0($a1)
/* 418B7C 802A3DEC 2535001F */ addiu $s5, $t1, 0x1F
/* 418B80 802A3DF0 8FA90050 */ lw $t1, 0x50($sp)
/* 418B84 802A3DF4 24420013 */ addiu $v0, $v0, 0x13
/* 418B88 802A3DF8 ACC40000 */ sw $a0, 0x0($a2)
/* 418B8C 802A3DFC 01228821 */ addu $s1, $t1, $v0
/* 418B90 802A3E00 4600118D */ trunc.w.s $f6, $f2
/* 418B94 802A3E04 44033000 */ mfc1 $v1, $f6
/* 418B98 802A3E08 00000000 */ nop
/* 418B9C 802A3E0C 30630FFF */ andi $v1, $v1, 0xFFF
/* 418BA0 802A3E10 00031B00 */ sll $v1, $v1, 12
/* 418BA4 802A3E14 4600018D */ trunc.w.s $f6, $f0
/* 418BA8 802A3E18 44043000 */ mfc1 $a0, $f6
/* 418BAC 802A3E1C 00000000 */ nop
/* 418BB0 802A3E20 30840FFF */ andi $a0, $a0, 0xFFF
/* 418BB4 802A3E24 8FA9004C */ lw $t1, 0x4C($sp)
/* 418BB8 802A3E28 44880000 */ mtc1 $t0, $f0
/* 418BBC 802A3E2C 00000000 */ nop
/* 418BC0 802A3E30 46800020 */ cvt.s.w $f0, $f0
/* 418BC4 802A3E34 25220099 */ addiu $v0, $t1, 0x99
/* 418BC8 802A3E38 44821000 */ mtc1 $v0, $f2
/* 418BCC 802A3E3C 00000000 */ nop
/* 418BD0 802A3E40 468010A0 */ cvt.s.w $f2, $f2
/* 418BD4 802A3E44 46041082 */ mul.s $f2, $f2, $f4
/* 418BD8 802A3E48 00000000 */ nop
/* 418BDC 802A3E4C 3C02ED00 */ lui $v0, (0xED000000 >> 16)
/* 418BE0 802A3E50 00822025 */ or $a0, $a0, $v0
/* 418BE4 802A3E54 00641825 */ or $v1, $v1, $a0
/* 418BE8 802A3E58 3C04802B */ lui $a0, %hi(BattleMenu_Moves_OptionCount)
D_802A3E5C_7AB7FC:
/* 418BEC 802A3E5C 8C84D4A4 */ lw $a0, %lo(BattleMenu_Moves_OptionCount)($a0)
/* 418BF0 802A3E60 46040002 */ mul.s $f0, $f0, $f4
/* 418BF4 802A3E64 00000000 */ nop
/* 418BF8 802A3E68 ACE30000 */ sw $v1, 0x0($a3)
/* 418BFC 802A3E6C 4600118D */ trunc.w.s $f6, $f2
/* 418C00 802A3E70 44023000 */ mfc1 $v0, $f6
/* 418C04 802A3E74 00000000 */ nop
/* 418C08 802A3E78 30420FFF */ andi $v0, $v0, 0xFFF
/* 418C0C 802A3E7C 00021300 */ sll $v0, $v0, 12
/* 418C10 802A3E80 4600018D */ trunc.w.s $f6, $f0
/* 418C14 802A3E84 44033000 */ mfc1 $v1, $f6
D_802A3E88_7AB828:
/* 418C18 802A3E88 00000000 */ nop
/* 418C1C 802A3E8C 30630FFF */ andi $v1, $v1, 0xFFF
D_802A3E90_7AB830:
/* 418C20 802A3E90 00431025 */ or $v0, $v0, $v1
/* 418C24 802A3E94 188000BC */ blez $a0, .L802A4188_7ABB28
/* 418C28 802A3E98 ACE20004 */ sw $v0, 0x4($a3)
/* 418C2C 802A3E9C 3C16802B */ lui $s6, %hi(BattleMenu_Moves_OptionEnabled)
/* 418C30 802A3EA0 26D6D510 */ addiu $s6, $s6, %lo(BattleMenu_Moves_OptionEnabled)
/* 418C34 802A3EA4 3C1E802B */ lui $fp, %hi(battle_menu_moveOptionDisplayCosts)
/* 418C38 802A3EA8 27DED320 */ addiu $fp, $fp, %lo(battle_menu_moveOptionDisplayCosts)
/* 418C3C 802A3EAC 3C14802B */ lui $s4, %hi(BattleMenu_Moves_OptionIndexMap)
/* 418C40 802A3EB0 2694D1F8 */ addiu $s4, $s4, %lo(BattleMenu_Moves_OptionIndexMap)
/* 418C44 802A3EB4 0260B82D */ daddu $s7, $s3, $zero
.L802A3EB8_7AB858:
/* 418C48 802A3EB8 3C03802B */ lui $v1, %hi(battle_menu_moveScrollLine)
/* 418C4C 802A3EBC 8063D10C */ lb $v1, %lo(battle_menu_moveScrollLine)($v1)
/* 418C50 802A3EC0 2462FFFF */ addiu $v0, $v1, -0x1
/* 418C54 802A3EC4 0262102A */ slt $v0, $s3, $v0
/* 418C58 802A3EC8 544000A7 */ bnel $v0, $zero, .L802A4168_7ABB08
/* 418C5C 802A3ECC 2631000D */ addiu $s1, $s1, 0xD
/* 418C60 802A3ED0 3C02802B */ lui $v0, %hi(D_802AD10E)
/* 418C64 802A3ED4 8042D10E */ lb $v0, %lo(D_802AD10E)($v0)
/* 418C68 802A3ED8 00621021 */ addu $v0, $v1, $v0
/* 418C6C 802A3EDC 0053102A */ slt $v0, $v0, $s3
/* 418C70 802A3EE0 544000A1 */ bnel $v0, $zero, .L802A4168_7ABB08
/* 418C74 802A3EE4 2631000D */ addiu $s1, $s1, 0xD
/* 418C78 802A3EE8 8E820000 */ lw $v0, 0x0($s4)
/* 418C7C 802A3EEC 00022080 */ sll $a0, $v0, 2
/* 418C80 802A3EF0 00961021 */ addu $v0, $a0, $s6
/* 418C84 802A3EF4 8C420000 */ lw $v0, 0x0($v0)
/* 418C88 802A3EF8 3C08802B */ lui $t0, %hi(BattleMenu_Moves_TextColor)
/* 418C8C 802A3EFC 8508D114 */ lh $t0, %lo(BattleMenu_Moves_TextColor)($t0)
D_802A3F00_7AB8A0:
/* 418C90 802A3F00 58400001 */ blezl $v0, .L802A3F08_7AB8A8
/* 418C94 802A3F04 2408000B */ addiu $t0, $zero, 0xB
.L802A3F08_7AB8A8:
/* 418C98 802A3F08 3C02802B */ lui $v0, %hi(battle_menu_moveOptionNames)
/* 418C9C 802A3F0C 2442D2C0 */ addiu $v0, $v0, %lo(battle_menu_moveOptionNames)
/* 418CA0 802A3F10 00822021 */ addu $a0, $a0, $v0
/* 418CA4 802A3F14 8C820000 */ lw $v0, 0x0($a0)
/* 418CA8 802A3F18 04400009 */ bltz $v0, .L802A3F40_7AB8E0
/* 418CAC 802A3F1C 02A0282D */ daddu $a1, $s5, $zero
/* 418CB0 802A3F20 3C07802B */ lui $a3, %hi(BattleMenu_Moves_TextAlpha)
/* 418CB4 802A3F24 84E7D116 */ lh $a3, %lo(BattleMenu_Moves_TextAlpha)($a3)
D_802A3F28_7AB8C8:
/* 418CB8 802A3F28 24020001 */ addiu $v0, $zero, 0x1
/* 418CBC 802A3F2C AFA80010 */ sw $t0, 0x10($sp)
/* 418CC0 802A3F30 AFA20014 */ sw $v0, 0x14($sp)
/* 418CC4 802A3F34 8C840000 */ lw $a0, 0x0($a0)
/* 418CC8 802A3F38 0C04993B */ jal draw_msg
/* 418CCC 802A3F3C 0220302D */ daddu $a2, $s1, $zero
.L802A3F40_7AB8E0:
/* 418CD0 802A3F40 8E820000 */ lw $v0, 0x0($s4)
/* 418CD4 802A3F44 00021880 */ sll $v1, $v0, 2
/* 418CD8 802A3F48 3C04802B */ lui $a0, %hi(battle_menu_moveOptionDisplayCostReductions)
/* 418CDC 802A3F4C 00832021 */ addu $a0, $a0, $v1
D_802A3F50_7AB8F0:
/* 418CE0 802A3F50 8C84D380 */ lw $a0, %lo(battle_menu_moveOptionDisplayCostReductions)($a0)
/* 418CE4 802A3F54 007E1021 */ addu $v0, $v1, $fp
D_802A3F58_7AB8F8:
/* 418CE8 802A3F58 8C420000 */ lw $v0, 0x0($v0)
/* 418CEC 802A3F5C 10400003 */ beqz $v0, .L802A3F6C_7AB90C
/* 418CF0 802A3F60 00449023 */ subu $s2, $v0, $a0
/* 418CF4 802A3F64 5A400001 */ blezl $s2, .L802A3F6C_7AB90C
/* 418CF8 802A3F68 24120001 */ addiu $s2, $zero, 0x1
.L802A3F6C_7AB90C:
/* 418CFC 802A3F6C 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 418D00 802A3F70 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 418D04 802A3F74 14400015 */ bnez $v0, .L802A3FCC_7AB96C
/* 418D08 802A3F78 00000000 */ nop
/* 418D0C 802A3F7C 3C02802B */ lui $v0, %hi(battle_menu_moveCursorPos)
/* 418D10 802A3F80 8042D109 */ lb $v0, %lo(battle_menu_moveCursorPos)($v0)
/* 418D14 802A3F84 16620025 */ bne $s3, $v0, .L802A401C_7AB9BC
D_802A3F88_7AB928:
/* 418D18 802A3F88 00131080 */ sll $v0, $s3, 2
/* 418D1C 802A3F8C 12400007 */ beqz $s2, .L802A3FAC_7AB94C
/* 418D20 802A3F90 00000000 */ nop
/* 418D24 802A3F94 8E820000 */ lw $v0, 0x0($s4)
/* 418D28 802A3F98 00021080 */ sll $v0, $v0, 2
/* 418D2C 802A3F9C 00561021 */ addu $v0, $v0, $s6
/* 418D30 802A3FA0 8C420000 */ lw $v0, 0x0($v0)
/* 418D34 802A3FA4 1C400005 */ bgtz $v0, .L802A3FBC_7AB95C
/* 418D38 802A3FA8 00000000 */ nop
.L802A3FAC_7AB94C:
/* 418D3C 802A3FAC 0C03A674 */ jal status_bar_stop_blinking_fp
/* 418D40 802A3FB0 00000000 */ nop
/* 418D44 802A3FB4 080A9007 */ j .L802A401C_7AB9BC
/* 418D48 802A3FB8 00131080 */ sll $v0, $s3, 2
.L802A3FBC_7AB95C:
/* 418D4C 802A3FBC 0C03A663 */ jal status_bar_start_blinking_fp
/* 418D50 802A3FC0 00000000 */ nop
/* 418D54 802A3FC4 080A9007 */ j .L802A401C_7AB9BC
/* 418D58 802A3FC8 00131080 */ sll $v0, $s3, 2
.L802A3FCC_7AB96C:
/* 418D5C 802A3FCC 3C02802B */ lui $v0, %hi(battle_menu_moveCursorPos)
/* 418D60 802A3FD0 8042D109 */ lb $v0, %lo(battle_menu_moveCursorPos)($v0)
/* 418D64 802A3FD4 16620011 */ bne $s3, $v0, .L802A401C_7AB9BC
/* 418D68 802A3FD8 00131080 */ sll $v0, $s3, 2
/* 418D6C 802A3FDC 12400007 */ beqz $s2, .L802A3FFC_7AB99C
D_802A3FE0_7AB980:
/* 418D70 802A3FE0 00000000 */ nop
/* 418D74 802A3FE4 8E820000 */ lw $v0, 0x0($s4)
/* 418D78 802A3FE8 00021880 */ sll $v1, $v0, 2
/* 418D7C 802A3FEC 00761021 */ addu $v0, $v1, $s6
/* 418D80 802A3FF0 8C420000 */ lw $v0, 0x0($v0)
D_802A3FF4_7AB994:
/* 418D84 802A3FF4 1C400005 */ bgtz $v0, .L802A400C_7AB9AC
/* 418D88 802A3FF8 007E1021 */ addu $v0, $v1, $fp
.L802A3FFC_7AB99C:
/* 418D8C 802A3FFC 0C03A6A5 */ jal status_bar_stop_blinking_sp
/* 418D90 802A4000 00000000 */ nop
/* 418D94 802A4004 080A9007 */ j .L802A401C_7AB9BC
/* 418D98 802A4008 00131080 */ sll $v0, $s3, 2
.L802A400C_7AB9AC:
/* 418D9C 802A400C 8C440000 */ lw $a0, 0x0($v0)
/* 418DA0 802A4010 0C03A6AE */ jal status_bar_start_blinking_sp_bars
/* 418DA4 802A4014 00000000 */ nop
D_802A4018_7AB9B8:
/* 418DA8 802A4018 00131080 */ sll $v0, $s3, 2
.L802A401C_7AB9BC:
/* 418DAC 802A401C 3C03802B */ lui $v1, %hi(battle_menu_moveOptionDisplayCostReductionColors)
D_802A4020_7AB9C0:
/* 418DB0 802A4020 00621821 */ addu $v1, $v1, $v0
/* 418DB4 802A4024 8C63D3E0 */ lw $v1, %lo(battle_menu_moveOptionDisplayCostReductionColors)($v1)
/* 418DB8 802A4028 10600005 */ beqz $v1, .L802A4040_7AB9E0
/* 418DBC 802A402C 24020001 */ addiu $v0, $zero, 0x1
/* 418DC0 802A4030 10620005 */ beq $v1, $v0, .L802A4048_7AB9E8
/* 418DC4 802A4034 24080038 */ addiu $t0, $zero, 0x38
/* 418DC8 802A4038 080A9013 */ j .L802A404C_7AB9EC
/* 418DCC 802A403C 00000000 */ nop
.L802A4040_7AB9E0:
/* 418DD0 802A4040 080A9013 */ j .L802A404C_7AB9EC
/* 418DD4 802A4044 2408000A */ addiu $t0, $zero, 0xA
.L802A4048_7AB9E8:
/* 418DD8 802A4048 24080037 */ addiu $t0, $zero, 0x37
.L802A404C_7AB9EC:
/* 418DDC 802A404C 8E820000 */ lw $v0, 0x0($s4)
/* 418DE0 802A4050 00021880 */ sll $v1, $v0, 2
/* 418DE4 802A4054 00761021 */ addu $v0, $v1, $s6
/* 418DE8 802A4058 8C420000 */ lw $v0, 0x0($v0)
/* 418DEC 802A405C 58400001 */ blezl $v0, .L802A4064_7ABA04
/* 418DF0 802A4060 2408000B */ addiu $t0, $zero, 0xB
.L802A4064_7ABA04:
/* 418DF4 802A4064 007E1021 */ addu $v0, $v1, $fp
/* 418DF8 802A4068 8C420000 */ lw $v0, 0x0($v0)
/* 418DFC 802A406C 5040003E */ beql $v0, $zero, .L802A4168_7ABB08
/* 418E00 802A4070 2631000D */ addiu $s1, $s1, 0xD
/* 418E04 802A4074 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 418E08 802A4078 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 418E0C 802A407C 3C10802B */ lui $s0, %hi(BattleMenu_Moves_OptionCostUnitIDs)
/* 418E10 802A4080 02178021 */ addu $s0, $s0, $s7
/* 418E14 802A4084 8E10D190 */ lw $s0, %lo(BattleMenu_Moves_OptionCostUnitIDs)($s0)
/* 418E18 802A4088 14400018 */ bnez $v0, .L802A40EC_7ABA8C
/* 418E1C 802A408C 0240202D */ daddu $a0, $s2, $zero
/* 418E20 802A4090 26A5006C */ addiu $a1, $s5, 0x6C
/* 418E24 802A4094 0220302D */ daddu $a2, $s1, $zero
/* 418E28 802A4098 24070001 */ addiu $a3, $zero, 0x1
/* 418E2C 802A409C 3C03802B */ lui $v1, %hi(BattleMenu_Moves_TextAlpha)
/* 418E30 802A40A0 8463D116 */ lh $v1, %lo(BattleMenu_Moves_TextAlpha)($v1)
/* 418E34 802A40A4 24020003 */ addiu $v0, $zero, 0x3
/* 418E38 802A40A8 AFA80010 */ sw $t0, 0x10($sp)
/* 418E3C 802A40AC AFA20018 */ sw $v0, 0x18($sp)
/* 418E40 802A40B0 0C049DA7 */ jal draw_number
/* 418E44 802A40B4 AFA30014 */ sw $v1, 0x14($sp)
/* 418E48 802A40B8 8E820000 */ lw $v0, 0x0($s4)
/* 418E4C 802A40BC 00021080 */ sll $v0, $v0, 2
/* 418E50 802A40C0 00561021 */ addu $v0, $v0, $s6
/* 418E54 802A40C4 8C420000 */ lw $v0, 0x0($v0)
/* 418E58 802A40C8 5C400006 */ bgtzl $v0, .L802A40E4_7ABA84
/* 418E5C 802A40CC 0200202D */ daddu $a0, $s0, $zero
/* 418E60 802A40D0 3C058010 */ lui $a1, %hi(HES_NotEnoughFP)
/* 418E64 802A40D4 24A576BC */ addiu $a1, $a1, %lo(HES_NotEnoughFP)
/* 418E68 802A40D8 0C0511FF */ jal hud_element_set_script
/* 418E6C 802A40DC 0200202D */ daddu $a0, $s0, $zero
/* 418E70 802A40E0 0200202D */ daddu $a0, $s0, $zero
.L802A40E4_7ABA84:
/* 418E74 802A40E4 080A9051 */ j .L802A4144_7ABAE4
/* 418E78 802A40E8 26A50074 */ addiu $a1, $s5, 0x74
.L802A40EC_7ABA8C:
/* 418E7C 802A40EC 26A5005D */ addiu $a1, $s5, 0x5D
/* 418E80 802A40F0 0220302D */ daddu $a2, $s1, $zero
/* 418E84 802A40F4 24070001 */ addiu $a3, $zero, 0x1
/* 418E88 802A40F8 3C03802B */ lui $v1, %hi(BattleMenu_Moves_TextAlpha)
/* 418E8C 802A40FC 8463D116 */ lh $v1, %lo(BattleMenu_Moves_TextAlpha)($v1)
/* 418E90 802A4100 24020003 */ addiu $v0, $zero, 0x3
/* 418E94 802A4104 AFA80010 */ sw $t0, 0x10($sp)
/* 418E98 802A4108 AFA20018 */ sw $v0, 0x18($sp)
/* 418E9C 802A410C 0C049DA7 */ jal draw_number
/* 418EA0 802A4110 AFA30014 */ sw $v1, 0x14($sp)
/* 418EA4 802A4114 8E820000 */ lw $v0, 0x0($s4)
/* 418EA8 802A4118 00021080 */ sll $v0, $v0, 2
/* 418EAC 802A411C 00561021 */ addu $v0, $v0, $s6
/* 418EB0 802A4120 8C420000 */ lw $v0, 0x0($v0)
/* 418EB4 802A4124 5C400006 */ bgtzl $v0, .L802A4140_7ABAE0
/* 418EB8 802A4128 0200202D */ daddu $a0, $s0, $zero
/* 418EBC 802A412C 3C058010 */ lui $a1, %hi(HES_NotEnoughPOW)
/* 418EC0 802A4130 24A5776C */ addiu $a1, $a1, %lo(HES_NotEnoughPOW)
/* 418EC4 802A4134 0C0511FF */ jal hud_element_set_script
/* 418EC8 802A4138 0200202D */ daddu $a0, $s0, $zero
/* 418ECC 802A413C 0200202D */ daddu $a0, $s0, $zero
.L802A4140_7ABAE0:
/* 418ED0 802A4140 26A50066 */ addiu $a1, $s5, 0x66
.L802A4144_7ABAE4:
/* 418ED4 802A4144 0C051261 */ jal hud_element_set_render_pos
/* 418ED8 802A4148 26260007 */ addiu $a2, $s1, 0x7
/* 418EDC 802A414C 3C05802B */ lui $a1, %hi(BattleMenu_Moves_TextAlpha)
/* 418EE0 802A4150 84A5D116 */ lh $a1, %lo(BattleMenu_Moves_TextAlpha)($a1)
/* 418EE4 802A4154 0C0513AC */ jal hud_element_set_alpha
/* 418EE8 802A4158 0200202D */ daddu $a0, $s0, $zero
/* 418EEC 802A415C 0C0511F8 */ jal hud_element_draw_without_clipping
/* 418EF0 802A4160 0200202D */ daddu $a0, $s0, $zero
D_802A4164_7ABB04:
/* 418EF4 802A4164 2631000D */ addiu $s1, $s1, 0xD
.L802A4168_7ABB08:
/* 418EF8 802A4168 26730001 */ addiu $s3, $s3, 0x1
/* 418EFC 802A416C 26940004 */ addiu $s4, $s4, 0x4
/* 418F00 802A4170 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount)
/* 418F04 802A4174 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0)
/* 418F08 802A4178 0262102A */ slt $v0, $s3, $v0
/* 418F0C 802A417C 1440FF4E */ bnez $v0, .L802A3EB8_7AB858
/* 418F10 802A4180 26F70004 */ addiu $s7, $s7, 0x4
/* 418F14 802A4184 0000982D */ daddu $s3, $zero, $zero
.L802A4188_7ABB28:
/* 418F18 802A4188 8FA9004C */ lw $t1, 0x4C($sp)
/* 418F1C 802A418C 3C02802B */ lui $v0, %hi(battle_menu_moveScrollOffset)
/* 418F20 802A4190 8442D110 */ lh $v0, %lo(battle_menu_moveScrollOffset)($v0)
/* 418F24 802A4194 25350018 */ addiu $s5, $t1, 0x18
/* 418F28 802A4198 8FA90050 */ lw $t1, 0x50($sp)
/* 418F2C 802A419C 3C03802B */ lui $v1, %hi(BattleMenu_Moves_OptionCount)
/* 418F30 802A41A0 8C63D4A4 */ lw $v1, %lo(BattleMenu_Moves_OptionCount)($v1)
/* 418F34 802A41A4 00491021 */ addu $v0, $v0, $t1
/* 418F38 802A41A8 18600022 */ blez $v1, .L802A4234_7ABBD4
/* 418F3C 802A41AC 24510018 */ addiu $s1, $v0, 0x18
/* 418F40 802A41B0 3C12802B */ lui $s2, %hi(BattleMenu_Moves_OptionIDs)
/* 418F44 802A41B4 2652D128 */ addiu $s2, $s2, %lo(BattleMenu_Moves_OptionIDs)
.L802A41B8_7ABB58:
/* 418F48 802A41B8 3C03802B */ lui $v1, %hi(battle_menu_moveScrollLine)
/* 418F4C 802A41BC 8063D10C */ lb $v1, %lo(battle_menu_moveScrollLine)($v1)
/* 418F50 802A41C0 2462FFFF */ addiu $v0, $v1, -0x1
/* 418F54 802A41C4 0262102A */ slt $v0, $s3, $v0
/* 418F58 802A41C8 54400014 */ bnel $v0, $zero, .L802A421C_7ABBBC
/* 418F5C 802A41CC 2631000D */ addiu $s1, $s1, 0xD
/* 418F60 802A41D0 3C02802B */ lui $v0, %hi(D_802AD10E)
/* 418F64 802A41D4 8042D10E */ lb $v0, %lo(D_802AD10E)($v0)
/* 418F68 802A41D8 00621021 */ addu $v0, $v1, $v0
/* 418F6C 802A41DC 0053102A */ slt $v0, $v0, $s3
/* 418F70 802A41E0 10400003 */ beqz $v0, .L802A41F0_7ABB90
/* 418F74 802A41E4 02A0282D */ daddu $a1, $s5, $zero
/* 418F78 802A41E8 080A9087 */ j .L802A421C_7ABBBC
/* 418F7C 802A41EC 2631000D */ addiu $s1, $s1, 0xD
.L802A41F0_7ABB90:
/* 418F80 802A41F0 0220302D */ daddu $a2, $s1, $zero
/* 418F84 802A41F4 8E500000 */ lw $s0, 0x0($s2)
/* 418F88 802A41F8 2631000D */ addiu $s1, $s1, 0xD
/* 418F8C 802A41FC 0C051261 */ jal hud_element_set_render_pos
/* 418F90 802A4200 0200202D */ daddu $a0, $s0, $zero
/* 418F94 802A4204 3C05802B */ lui $a1, %hi(BattleMenu_Moves_TextAlpha)
/* 418F98 802A4208 84A5D116 */ lh $a1, %lo(BattleMenu_Moves_TextAlpha)($a1)
/* 418F9C 802A420C 0C0513AC */ jal hud_element_set_alpha
/* 418FA0 802A4210 0200202D */ daddu $a0, $s0, $zero
/* 418FA4 802A4214 0C0511F8 */ jal hud_element_draw_without_clipping
/* 418FA8 802A4218 0200202D */ daddu $a0, $s0, $zero
.L802A421C_7ABBBC:
/* 418FAC 802A421C 26730001 */ addiu $s3, $s3, 0x1
/* 418FB0 802A4220 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount)
/* 418FB4 802A4224 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0)
/* 418FB8 802A4228 0262102A */ slt $v0, $s3, $v0
/* 418FBC 802A422C 1440FFE2 */ bnez $v0, .L802A41B8_7ABB58
/* 418FC0 802A4230 26520004 */ addiu $s2, $s2, 0x4
.L802A4234_7ABBD4:
/* 418FC4 802A4234 8FA9004C */ lw $t1, 0x4C($sp)
/* 418FC8 802A4238 3C03802B */ lui $v1, %hi(battle_menu_moveCursorPos)
/* 418FCC 802A423C 8063D109 */ lb $v1, %lo(battle_menu_moveCursorPos)($v1)
/* 418FD0 802A4240 3C02802B */ lui $v0, %hi(battle_menu_moveScrollLine)
/* 418FD4 802A4244 8042D10C */ lb $v0, %lo(battle_menu_moveScrollLine)($v0)
/* 418FD8 802A4248 3C08802B */ lui $t0, %hi(D_802AD112)
/* 418FDC 802A424C 8508D112 */ lh $t0, %lo(D_802AD112)($t0)
/* 418FE0 802A4250 2535000A */ addiu $s5, $t1, 0xA
/* 418FE4 802A4254 00621823 */ subu $v1, $v1, $v0
/* 418FE8 802A4258 00031040 */ sll $v0, $v1, 1
/* 418FEC 802A425C 00431021 */ addu $v0, $v0, $v1
/* 418FF0 802A4260 00021080 */ sll $v0, $v0, 2
/* 418FF4 802A4264 00438821 */ addu $s1, $v0, $v1
/* 418FF8 802A4268 02281023 */ subu $v0, $s1, $t0
/* 418FFC 802A426C 44820000 */ mtc1 $v0, $f0
/* 419000 802A4270 00000000 */ nop
/* 419004 802A4274 46800021 */ cvt.d.w $f0, $f0
/* 419008 802A4278 4620018D */ trunc.w.d $f6, $f0
/* 41900C 802A427C 44023000 */ mfc1 $v0, $f6
/* 419010 802A4280 00000000 */ nop
/* 419014 802A4284 14400002 */ bnez $v0, .L802A4290_7ABC30
/* 419018 802A4288 01024021 */ addu $t0, $t0, $v0
/* 41901C 802A428C 0220402D */ daddu $t0, $s1, $zero
.L802A4290_7ABC30:
/* 419020 802A4290 02A0282D */ daddu $a1, $s5, $zero
/* 419024 802A4294 00083400 */ sll $a2, $t0, 16
/* 419028 802A4298 00063403 */ sra $a2, $a2, 16
/* 41902C 802A429C 3C10802B */ lui $s0, %hi(BattleMenu_Moves_CursorID)
/* 419030 802A42A0 8E10D118 */ lw $s0, %lo(BattleMenu_Moves_CursorID)($s0)
/* 419034 802A42A4 8FA90050 */ lw $t1, 0x50($sp)
/* 419038 802A42A8 24C6001A */ addiu $a2, $a2, 0x1A
/* 41903C 802A42AC 3C01802B */ lui $at, %hi(D_802AD112)
/* 419040 802A42B0 A428D112 */ sh $t0, %lo(D_802AD112)($at)
/* 419044 802A42B4 01263021 */ addu $a2, $t1, $a2
/* 419048 802A42B8 0C051261 */ jal hud_element_set_render_pos
/* 41904C 802A42BC 0200202D */ daddu $a0, $s0, $zero
/* 419050 802A42C0 3C11802B */ lui $s1, %hi(BattleMenu_Moves_TextAlpha)
/* 419054 802A42C4 2631D116 */ addiu $s1, $s1, %lo(BattleMenu_Moves_TextAlpha)
/* 419058 802A42C8 86250000 */ lh $a1, 0x0($s1)
/* 41905C 802A42CC 0C0513AC */ jal hud_element_set_alpha
/* 419060 802A42D0 0200202D */ daddu $a0, $s0, $zero
/* 419064 802A42D4 0C0511F8 */ jal hud_element_draw_without_clipping
/* 419068 802A42D8 0200202D */ daddu $a0, $s0, $zero
/* 41906C 802A42DC 3C02802B */ lui $v0, %hi(battle_menu_moveScrollLine)
/* 419070 802A42E0 8042D10C */ lb $v0, %lo(battle_menu_moveScrollLine)($v0)
/* 419074 802A42E4 1840000E */ blez $v0, .L802A4320_7ABCC0
D_802A42E8_7ABC88:
/* 419078 802A42E8 00000000 */ nop
/* 41907C 802A42EC 8FA9004C */ lw $t1, 0x4C($sp)
/* 419080 802A42F0 3C10802B */ lui $s0, %hi(BattleMenu_Moves_UpArrowID)
/* 419084 802A42F4 8E10D11C */ lw $s0, %lo(BattleMenu_Moves_UpArrowID)($s0)
/* 419088 802A42F8 25250048 */ addiu $a1, $t1, 0x48
/* 41908C 802A42FC 8FA90050 */ lw $t1, 0x50($sp)
/* 419090 802A4300 0200202D */ daddu $a0, $s0, $zero
/* 419094 802A4304 0C051261 */ jal hud_element_set_render_pos
/* 419098 802A4308 2526000F */ addiu $a2, $t1, 0xF
/* 41909C 802A430C 86250000 */ lh $a1, 0x0($s1)
/* 4190A0 802A4310 0C0513AC */ jal hud_element_set_alpha
/* 4190A4 802A4314 0200202D */ daddu $a0, $s0, $zero
/* 4190A8 802A4318 0C0511EA */ jal hud_element_draw_clipped
/* 4190AC 802A431C 0200202D */ daddu $a0, $s0, $zero
.L802A4320_7ABCC0:
/* 4190B0 802A4320 3C02802B */ lui $v0, %hi(D_802AD10D)
/* 4190B4 802A4324 8042D10D */ lb $v0, %lo(D_802AD10D)($v0)
/* 4190B8 802A4328 3C03802B */ lui $v1, %hi(BattleMenu_Moves_OptionCount)
/* 4190BC 802A432C 8C63D4A4 */ lw $v1, %lo(BattleMenu_Moves_OptionCount)($v1)
/* 4190C0 802A4330 0043102A */ slt $v0, $v0, $v1
/* 4190C4 802A4334 1040000E */ beqz $v0, .L802A4370_7ABD10
/* 4190C8 802A4338 00000000 */ nop
/* 4190CC 802A433C 8FA9004C */ lw $t1, 0x4C($sp)
D_802A4340_7ABCE0:
/* 4190D0 802A4340 3C10802B */ lui $s0, %hi(BattleMenu_Moves_DownArrowID)
/* 4190D4 802A4344 8E10D120 */ lw $s0, %lo(BattleMenu_Moves_DownArrowID)($s0)
/* 4190D8 802A4348 25250048 */ addiu $a1, $t1, 0x48
/* 4190DC 802A434C 8FA90050 */ lw $t1, 0x50($sp)
D_802A4350_7ABCF0:
/* 4190E0 802A4350 0200202D */ daddu $a0, $s0, $zero
/* 4190E4 802A4354 0C051261 */ jal hud_element_set_render_pos
/* 4190E8 802A4358 25260064 */ addiu $a2, $t1, 0x64
/* 4190EC 802A435C 86250000 */ lh $a1, 0x0($s1)
/* 4190F0 802A4360 0C0513AC */ jal hud_element_set_alpha
/* 4190F4 802A4364 0200202D */ daddu $a0, $s0, $zero
/* 4190F8 802A4368 0C0511EA */ jal hud_element_draw_clipped
/* 4190FC 802A436C 0200202D */ daddu $a0, $s0, $zero
.L802A4370_7ABD10:
/* 419100 802A4370 3C03802B */ lui $v1, %hi(battle_menu_moveState)
/* 419104 802A4374 8063D108 */ lb $v1, %lo(battle_menu_moveState)($v1)
/* 419108 802A4378 2402FFFF */ addiu $v0, $zero, -0x1
/* 41910C 802A437C 1462000B */ bne $v1, $v0, .L802A43AC_7ABD4C
/* 419110 802A4380 00000000 */ nop
/* 419114 802A4384 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu)
/* 419118 802A4388 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0)
/* 41911C 802A438C 14400005 */ bnez $v0, .L802A43A4_7ABD44
/* 419120 802A4390 00000000 */ nop
/* 419124 802A4394 0C03A674 */ jal status_bar_stop_blinking_fp
/* 419128 802A4398 00000000 */ nop
/* 41912C 802A439C 080A90EB */ j .L802A43AC_7ABD4C
/* 419130 802A43A0 00000000 */ nop
.L802A43A4_7ABD44:
/* 419134 802A43A4 0C03A6A5 */ jal status_bar_stop_blinking_sp
/* 419138 802A43A8 00000000 */ nop
glabel .L802A43AC_7ABD4C
/* 41913C 802A43AC 8FBF0044 */ lw $ra, 0x44($sp)
/* 419140 802A43B0 8FBE0040 */ lw $fp, 0x40($sp)
/* 419144 802A43B4 8FB7003C */ lw $s7, 0x3C($sp)
D_802A43B8_7ABD58:
/* 419148 802A43B8 8FB60038 */ lw $s6, 0x38($sp)
/* 41914C 802A43BC 8FB50034 */ lw $s5, 0x34($sp)
/* 419150 802A43C0 8FB40030 */ lw $s4, 0x30($sp)
/* 419154 802A43C4 8FB3002C */ lw $s3, 0x2C($sp)
/* 419158 802A43C8 8FB20028 */ lw $s2, 0x28($sp)
/* 41915C 802A43CC 8FB10024 */ lw $s1, 0x24($sp)
D_802A43D0_7ABD70:
/* 419160 802A43D0 8FB00020 */ lw $s0, 0x20($sp)
/* 419164 802A43D4 03E00008 */ jr $ra
/* 419168 802A43D8 27BD0048 */ addiu $sp, $sp, 0x48
### DECOMPILED C INSTRUCTIONS:
void func_802A3C98(void* data, s32 x, s32 y) {
s32 var_t0;
s32 temp_f6;
s32 xPos, yPos;
s32 yRenderPos;
s32 palette;
s32 num;
s32 v0;
s32 a0;
s32 idx;
s32 id;
s32 i;
switch (battle_menu_moveState) {
case -1:
case 1:
case 10:
case 20:
case 30:
case 40:
case 41:
yPos = -battle_menu_moveScrollLine * 13;
var_t0 = battle_menu_moveScrollOffset;
temp_f6 = (yPos - var_t0) * 0.5;
if (temp_f6 == 0) {
var_t0 = yPos;
} else {
var_t0 += temp_f6;
}
battle_menu_moveScrollOffset = var_t0;
xPos = x + 2;
yPos = y + 18;
var_t0 = yPos + 1 + (D_802AD10E * 13);
gDPSetScissor(
gMainGfxPos++, G_SC_NON_INTERLACE,
xPos,
yPos,
x + 153,
var_t0
);
xPos = x + 31;
yPos = y + 19 + battle_menu_moveScrollOffset;
idx = 0;
for (i = 0; i < BattleMenu_Moves_OptionCount; i++, idx++) {
if (i >= battle_menu_moveScrollLine - 1 && battle_menu_moveScrollLine + D_802AD10E >= i) {
palette = BattleMenu_Moves_TextColor;
if (BattleMenu_Moves_OptionEnabled[BattleMenu_Moves_OptionIndexMap[idx]] <= 0) {
palette = MSG_PAL_0B;
}
if (battle_menu_moveOptionNames[BattleMenu_Moves_OptionIndexMap[idx]] >= 0) {
draw_msg(
battle_menu_moveOptionNames[BattleMenu_Moves_OptionIndexMap[idx]],
xPos, yPos, BattleMenu_Moves_TextAlpha, palette, 1
);
}
if (BattleMenu_Moves_OptionEnabled[BattleMenu_Moves_OptionIndexMap[idx]] <= 0) {
a0 = battle_menu_moveOptionDisplayCostReductions[BattleMenu_Moves_OptionIndexMap[idx]];
do {} while (0);
v0 = battle_menu_moveOptionDisplayCosts[BattleMenu_Moves_OptionIndexMap[idx]];
} else {
a0 = battle_menu_moveOptionDisplayCostReductions[BattleMenu_Moves_OptionIndexMap[idx]];
do {} while (0);
v0 = battle_menu_moveOptionDisplayCosts[BattleMenu_Moves_OptionIndexMap[idx]];
}
num = v0 - a0;
if (v0 != 0 && num <= 0) {
num = 1;
}
if (!BattleMenu_UsingSpiritsSubmenu ) {
if (i == battle_menu_moveCursorPos) {
if (num == 0 || BattleMenu_Moves_OptionEnabled[BattleMenu_Moves_OptionIndexMap[idx]] <= 0) {
status_bar_stop_blinking_fp();
} else {
status_bar_start_blinking_fp();
}
}
} else {
if (i == battle_menu_moveCursorPos) {
if (num == 0 || BattleMenu_Moves_OptionEnabled[BattleMenu_Moves_OptionIndexMap[idx]] <= 0) {
status_bar_stop_blinking_sp();
} else {
a0 = battle_menu_moveOptionDisplayCosts[BattleMenu_Moves_OptionIndexMap[idx]];
status_bar_start_blinking_sp_bars(
battle_menu_moveOptionDisplayCosts[BattleMenu_Moves_OptionIndexMap[idx]]
);
}
}
}
switch (battle_menu_moveOptionDisplayCostReductionColors[i]) {
case 0:
palette = MSG_PAL_STANDARD;
break;
case 1:
palette = MSG_PAL_37;
break;
default:
palette = MSG_PAL_38;
break;
}
if (BattleMenu_Moves_OptionEnabled[BattleMenu_Moves_OptionIndexMap[idx]] <= 0) {
palette = MSG_PAL_0B;
}
if (battle_menu_moveOptionDisplayCosts[BattleMenu_Moves_OptionIndexMap[idx]] != 0) {
id = BattleMenu_Moves_OptionCostUnitIDs[idx];
if (!BattleMenu_UsingSpiritsSubmenu) {
draw_number(
num, xPos + 108, yPos, DRAW_NUMBER_CHARSET_THIN, palette, BattleMenu_Moves_TextAlpha,
DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT
);
if (BattleMenu_Moves_OptionEnabled[BattleMenu_Moves_OptionIndexMap[idx]] <= 0) {
hud_element_set_script(id, &HES_NotEnoughFP);
}
yRenderPos = yPos + 7;
hud_element_set_render_pos(id, xPos + 116, yRenderPos);
} else {
draw_number(
num, xPos + 93, yPos, DRAW_NUMBER_CHARSET_THIN, palette, BattleMenu_Moves_TextAlpha,
DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT
);
if (BattleMenu_Moves_OptionEnabled[BattleMenu_Moves_OptionIndexMap[idx]] <= 0) {
hud_element_set_script(id, &HES_NotEnoughPOW);
}
yRenderPos = yPos + 7;
hud_element_set_render_pos(id, xPos + 102, yRenderPos);
}
hud_element_set_alpha(id, BattleMenu_Moves_TextAlpha);
hud_element_draw_without_clipping(id);
}
}
yPos += 13;
}
xPos = x + 24;
yPos = battle_menu_moveScrollOffset + y + 24;
idx = 0;
for (i = 0; i < BattleMenu_Moves_OptionCount; i++, idx++) {
if (i < battle_menu_moveScrollLine - 1) {
yPos += 13;
} else if (battle_menu_moveScrollLine + D_802AD10E < i) {
yPos += 13;
} else {
id = BattleMenu_Moves_OptionIDs[idx];
hud_element_set_render_pos(id, xPos, yPos);
hud_element_set_alpha(id, BattleMenu_Moves_TextAlpha);
hud_element_draw_without_clipping(id);
yPos += 13;
}
}
yPos = (battle_menu_moveCursorPos - battle_menu_moveScrollLine) * 13;
var_t0 = D_802AD112;
temp_f6 = (yPos - D_802AD112) * 1.0;
xPos = x + 10;
if (temp_f6 == 0) {
var_t0 = yPos;
} else {
var_t0 += temp_f6;
}
D_802AD112 = var_t0;
yPos = y + 26 + D_802AD112;
id = BattleMenu_Moves_CursorID;
hud_element_set_render_pos(id, xPos, yPos);
hud_element_set_alpha(id, BattleMenu_Moves_TextAlpha);
hud_element_draw_without_clipping(id);
if (battle_menu_moveScrollLine > 0) {
id = BattleMenu_Moves_UpArrowID;
hud_element_set_render_pos(id, x + 72, y + 15);
hud_element_set_alpha(id, BattleMenu_Moves_TextAlpha);
hud_element_draw_clipped(id);
}
if (D_802AD10D < BattleMenu_Moves_OptionCount) {
id = BattleMenu_Moves_DownArrowID;
hud_element_set_render_pos(id, x + 72, y + 100);
hud_element_set_alpha(id, BattleMenu_Moves_TextAlpha);
hud_element_draw_clipped(id);
}
if (battle_menu_moveState == -1) {
if (!BattleMenu_UsingSpiritsSubmenu) {
status_bar_stop_blinking_fp();
} else {
status_bar_stop_blinking_sp();
}
}
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_802601BC
/* 18EA9C 802601BC 3C02800E */ lui $v0, %hi(gBattleSubState)
/* 18EAA0 802601C0 8C42C4DC */ lw $v0, %lo(gBattleSubState)($v0)
/* 18EAA4 802601C4 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 18EAA8 802601C8 AFBF0028 */ sw $ra, 0x28($sp)
/* 18EAAC 802601CC AFB50024 */ sw $s5, 0x24($sp)
/* 18EAB0 802601D0 AFB40020 */ sw $s4, 0x20($sp)
/* 18EAB4 802601D4 AFB3001C */ sw $s3, 0x1C($sp)
/* 18EAB8 802601D8 AFB20018 */ sw $s2, 0x18($sp)
/* 18EABC 802601DC AFB10014 */ sw $s1, 0x14($sp)
/* 18EAC0 802601E0 2443FFF9 */ addiu $v1, $v0, -0x7
/* 18EAC4 802601E4 2C62000F */ sltiu $v0, $v1, 0xF
/* 18EAC8 802601E8 10400193 */ beqz $v0, .L80260838
/* 18EACC 802601EC AFB00010 */ sw $s0, 0x10($sp)
/* 18EAD0 802601F0 00031080 */ sll $v0, $v1, 2
/* 18EAD4 802601F4 3C01802A */ lui $at, %hi(jtbl_8029D550)
/* 18EAD8 802601F8 00220821 */ addu $at, $at, $v0
/* 18EADC 802601FC 8C22D550 */ lw $v0, %lo(jtbl_8029D550)($at)
/* 18EAE0 80260200 00400008 */ jr $v0
/* 18EAE4 80260204 00000000 */ nop
glabel .L80260208
/* 18EAE8 80260208 0C097FE3 */ jal func_8025FF8C
/* 18EAEC 8026020C 0000202D */ daddu $a0, $zero, $zero
/* 18EAF0 80260210 24050080 */ addiu $a1, $zero, 0x80
/* 18EAF4 80260214 00A0302D */ daddu $a2, $a1, $zero
/* 18EAF8 80260218 00A0382D */ daddu $a3, $a1, $zero
/* 18EAFC 8026021C 0000982D */ daddu $s3, $zero, $zero
/* 18EB00 80260220 3C15802A */ lui $s5, %hi(LevelUpStatTextIDs)
/* 18EB04 80260224 26B5FA90 */ addiu $s5, $s5, %lo(LevelUpStatTextIDs)
/* 18EB08 80260228 3C10802A */ lui $s0, %hi(LevelUpStatEmblemIDs)
/* 18EB0C 8026022C 2610FA80 */ addiu $s0, $s0, %lo(LevelUpStatEmblemIDs)
/* 18EB10 80260230 8E110000 */ lw $s1, 0x0($s0)
/* 18EB14 80260234 0260A02D */ daddu $s4, $s3, $zero
/* 18EB18 80260238 0C0513BF */ jal hud_element_set_tint
/* 18EB1C 8026023C 0220202D */ daddu $a0, $s1, $zero
/* 18EB20 80260240 0C0511EA */ jal hud_element_draw_clipped
/* 18EB24 80260244 0220202D */ daddu $a0, $s1, $zero
/* 18EB28 80260248 24050080 */ addiu $a1, $zero, 0x80
/* 18EB2C 8026024C 00A0302D */ daddu $a2, $a1, $zero
/* 18EB30 80260250 8E11000C */ lw $s1, 0xC($s0)
/* 18EB34 80260254 00A0382D */ daddu $a3, $a1, $zero
/* 18EB38 80260258 0C0513BF */ jal hud_element_set_tint
/* 18EB3C 8026025C 0220202D */ daddu $a0, $s1, $zero
/* 18EB40 80260260 0C0511EA */ jal hud_element_draw_clipped
/* 18EB44 80260264 0220202D */ daddu $a0, $s1, $zero
/* 18EB48 80260268 24050080 */ addiu $a1, $zero, 0x80
/* 18EB4C 8026026C 00A0302D */ daddu $a2, $a1, $zero
/* 18EB50 80260270 8E110004 */ lw $s1, 0x4($s0)
/* 18EB54 80260274 00A0382D */ daddu $a3, $a1, $zero
/* 18EB58 80260278 0C0513BF */ jal hud_element_set_tint
/* 18EB5C 8026027C 0220202D */ daddu $a0, $s1, $zero
/* 18EB60 80260280 0C0511EA */ jal hud_element_draw_clipped
/* 18EB64 80260284 0220202D */ daddu $a0, $s1, $zero
/* 18EB68 80260288 24050080 */ addiu $a1, $zero, 0x80
/* 18EB6C 8026028C 00A0302D */ daddu $a2, $a1, $zero
/* 18EB70 80260290 8E110008 */ lw $s1, 0x8($s0)
/* 18EB74 80260294 00A0382D */ daddu $a3, $a1, $zero
/* 18EB78 80260298 0C0513BF */ jal hud_element_set_tint
/* 18EB7C 8026029C 0220202D */ daddu $a0, $s1, $zero
/* 18EB80 802602A0 0C0511EA */ jal hud_element_draw_clipped
/* 18EB84 802602A4 0220202D */ daddu $a0, $s1, $zero
.L802602A8:
/* 18EB88 802602A8 0000902D */ daddu $s2, $zero, $zero
/* 18EB8C 802602AC 0280802D */ daddu $s0, $s4, $zero
/* 18EB90 802602B0 02151021 */ addu $v0, $s0, $s5
.L802602B4:
/* 18EB94 802602B4 8C510000 */ lw $s1, 0x0($v0)
/* 18EB98 802602B8 24050080 */ addiu $a1, $zero, 0x80
/* 18EB9C 802602BC 00A0302D */ daddu $a2, $a1, $zero
/* 18EBA0 802602C0 00A0382D */ daddu $a3, $a1, $zero
/* 18EBA4 802602C4 26100004 */ addiu $s0, $s0, 0x4
/* 18EBA8 802602C8 26520001 */ addiu $s2, $s2, 0x1
/* 18EBAC 802602CC 0C0513BF */ jal hud_element_set_tint
/* 18EBB0 802602D0 0220202D */ daddu $a0, $s1, $zero
/* 18EBB4 802602D4 0C0511EA */ jal hud_element_draw_clipped
/* 18EBB8 802602D8 0220202D */ daddu $a0, $s1, $zero
/* 18EBBC 802602DC 2A420007 */ slti $v0, $s2, 0x7
/* 18EBC0 802602E0 1440FFF4 */ bnez $v0, .L802602B4
/* 18EBC4 802602E4 02151021 */ addu $v0, $s0, $s5
/* 18EBC8 802602E8 26730001 */ addiu $s3, $s3, 0x1
/* 18EBCC 802602EC 2A620003 */ slti $v0, $s3, 0x3
/* 18EBD0 802602F0 1440FFED */ bnez $v0, .L802602A8
/* 18EBD4 802602F4 2694001C */ addiu $s4, $s4, 0x1C
/* 18EBD8 802602F8 0809820E */ j .L80260838
/* 18EBDC 802602FC 00000000 */ nop
glabel .L80260300
/* 18EBE0 80260300 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 18EBE4 80260304 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
/* 18EBE8 80260308 80430048 */ lb $v1, 0x48($v0)
/* 18EBEC 8026030C 24020001 */ addiu $v0, $zero, 0x1
/* 18EBF0 80260310 1062006B */ beq $v1, $v0, .L802604C0
/* 18EBF4 80260314 28620002 */ slti $v0, $v1, 0x2
/* 18EBF8 80260318 104000A9 */ beqz $v0, .L802605C0
/* 18EBFC 8026031C 241500D0 */ addiu $s5, $zero, 0xD0
/* 18EC00 80260320 146000A8 */ bnez $v1, .L802605C4
/* 18EC04 80260324 24050080 */ addiu $a1, $zero, 0x80
/* 18EC08 80260328 24150098 */ addiu $s5, $zero, 0x98
/* 18EC0C 8026032C 240500FF */ addiu $a1, $zero, 0xFF
/* 18EC10 80260330 00A0302D */ daddu $a2, $a1, $zero
/* 18EC14 80260334 00A0382D */ daddu $a3, $a1, $zero
/* 18EC18 80260338 3C10802A */ lui $s0, %hi(LevelUpStatEmblemIDs)
/* 18EC1C 8026033C 2610FA80 */ addiu $s0, $s0, %lo(LevelUpStatEmblemIDs)
/* 18EC20 80260340 8E040000 */ lw $a0, 0x0($s0)
/* 18EC24 80260344 3C11802A */ lui $s1, %hi(LevelUpStatTextIDs)
/* 18EC28 80260348 2631FA90 */ addiu $s1, $s1, %lo(LevelUpStatTextIDs)
/* 18EC2C 8026034C 0C0513BF */ jal hud_element_set_tint
/* 18EC30 80260350 0000902D */ daddu $s2, $zero, $zero
/* 18EC34 80260354 24050080 */ addiu $a1, $zero, 0x80
/* 18EC38 80260358 00A0302D */ daddu $a2, $a1, $zero
/* 18EC3C 8026035C 8E04000C */ lw $a0, 0xC($s0)
/* 18EC40 80260360 0C0513BF */ jal hud_element_set_tint
/* 18EC44 80260364 00A0382D */ daddu $a3, $a1, $zero
/* 18EC48 80260368 24050080 */ addiu $a1, $zero, 0x80
/* 18EC4C 8026036C 00A0302D */ daddu $a2, $a1, $zero
/* 18EC50 80260370 8E040004 */ lw $a0, 0x4($s0)
/* 18EC54 80260374 0C0513BF */ jal hud_element_set_tint
/* 18EC58 80260378 00A0382D */ daddu $a3, $a1, $zero
/* 18EC5C 8026037C 24050080 */ addiu $a1, $zero, 0x80
/* 18EC60 80260380 00A0302D */ daddu $a2, $a1, $zero
/* 18EC64 80260384 8E040008 */ lw $a0, 0x8($s0)
/* 18EC68 80260388 0C0513BF */ jal hud_element_set_tint
/* 18EC6C 8026038C 00A0382D */ daddu $a3, $a1, $zero
.L80260390:
/* 18EC70 80260390 8E240000 */ lw $a0, 0x0($s1)
/* 18EC74 80260394 24050080 */ addiu $a1, $zero, 0x80
/* 18EC78 80260398 00A0302D */ daddu $a2, $a1, $zero
/* 18EC7C 8026039C 00A0382D */ daddu $a3, $a1, $zero
/* 18EC80 802603A0 26310004 */ addiu $s1, $s1, 0x4
/* 18EC84 802603A4 0C0513BF */ jal hud_element_set_tint
/* 18EC88 802603A8 26520001 */ addiu $s2, $s2, 0x1
/* 18EC8C 802603AC 2A420007 */ slti $v0, $s2, 0x7
/* 18EC90 802603B0 1440FFF7 */ bnez $v0, .L80260390
/* 18EC94 802603B4 00000000 */ nop
/* 18EC98 802603B8 0000902D */ daddu $s2, $zero, $zero
/* 18EC9C 802603BC 3C10802A */ lui $s0, %hi(LevelUpStatTextIDs)
/* 18ECA0 802603C0 2610FA90 */ addiu $s0, $s0, %lo(LevelUpStatTextIDs)
.L802603C4:
/* 18ECA4 802603C4 8E04001C */ lw $a0, 0x1C($s0)
/* 18ECA8 802603C8 240500FF */ addiu $a1, $zero, 0xFF
/* 18ECAC 802603CC 00A0302D */ daddu $a2, $a1, $zero
/* 18ECB0 802603D0 00A0382D */ daddu $a3, $a1, $zero
/* 18ECB4 802603D4 26100004 */ addiu $s0, $s0, 0x4
/* 18ECB8 802603D8 0C0513BF */ jal hud_element_set_tint
/* 18ECBC 802603DC 26520001 */ addiu $s2, $s2, 0x1
/* 18ECC0 802603E0 2A420007 */ slti $v0, $s2, 0x7
/* 18ECC4 802603E4 1440FFF7 */ bnez $v0, .L802603C4
/* 18ECC8 802603E8 00000000 */ nop
/* 18ECCC 802603EC 0000902D */ daddu $s2, $zero, $zero
/* 18ECD0 802603F0 3C10802A */ lui $s0, %hi(LevelUpStatTextIDs)
/* 18ECD4 802603F4 2610FA90 */ addiu $s0, $s0, %lo(LevelUpStatTextIDs)
.L802603F8:
/* 18ECD8 802603F8 8E040038 */ lw $a0, 0x38($s0)
/* 18ECDC 802603FC 24050080 */ addiu $a1, $zero, 0x80
/* 18ECE0 80260400 00A0302D */ daddu $a2, $a1, $zero
/* 18ECE4 80260404 00A0382D */ daddu $a3, $a1, $zero
/* 18ECE8 80260408 26100004 */ addiu $s0, $s0, 0x4
/* 18ECEC 8026040C 0C0513BF */ jal hud_element_set_tint
/* 18ECF0 80260410 26520001 */ addiu $s2, $s2, 0x1
/* 18ECF4 80260414 2A420007 */ slti $v0, $s2, 0x7
/* 18ECF8 80260418 1440FFF7 */ bnez $v0, .L802603F8
/* 18ECFC 8026041C 00000000 */ nop
/* 18ED00 80260420 3C10802A */ lui $s0, %hi(LevelUpStatEmblemIDs)
/* 18ED04 80260424 2610FA80 */ addiu $s0, $s0, %lo(LevelUpStatEmblemIDs)
/* 18ED08 80260428 8E110000 */ lw $s1, 0x0($s0)
/* 18ED0C 8026042C 0C05122C */ jal hud_element_get_script
/* 18ED10 80260430 0220202D */ daddu $a0, $s1, $zero
/* 18ED14 80260434 3C05802B */ lui $a1, %hi(D_802A9F34_7B18D4)
/* 18ED18 80260438 24A59F34 */ addiu $a1, $a1, %lo(D_802A9F34_7B18D4)
/* 18ED1C 8026043C 10450003 */ beq $v0, $a1, .L8026044C
/* 18ED20 80260440 00000000 */ nop
/* 18ED24 80260444 0C0511FF */ jal hud_element_set_script
/* 18ED28 80260448 0220202D */ daddu $a0, $s1, $zero
.L8026044C:
/* 18ED2C 8026044C 8E11000C */ lw $s1, 0xC($s0)
/* 18ED30 80260450 0C05122C */ jal hud_element_get_script
/* 18ED34 80260454 0220202D */ daddu $a0, $s1, $zero
/* 18ED38 80260458 3C05802B */ lui $a1, %hi(.L802A9F84_7B1924)
/* 18ED3C 8026045C 24A59F84 */ addiu $a1, $a1, %lo(.L802A9F84_7B1924)
/* 18ED40 80260460 10450003 */ beq $v0, $a1, .L80260470
/* 18ED44 80260464 00000000 */ nop
/* 18ED48 80260468 0C0511FF */ jal hud_element_set_script
/* 18ED4C 8026046C 0220202D */ daddu $a0, $s1, $zero
.L80260470:
/* 18ED50 80260470 8E110004 */ lw $s1, 0x4($s0)
/* 18ED54 80260474 0C05122C */ jal hud_element_get_script
/* 18ED58 80260478 0220202D */ daddu $a0, $s1, $zero
/* 18ED5C 8026047C 3C05802B */ lui $a1, %hi(D_802A9F5C_7B18FC)
/* 18ED60 80260480 24A59F5C */ addiu $a1, $a1, %lo(D_802A9F5C_7B18FC)
/* 18ED64 80260484 10450003 */ beq $v0, $a1, .L80260494
/* 18ED68 80260488 00000000 */ nop
/* 18ED6C 8026048C 0C0511FF */ jal hud_element_set_script
/* 18ED70 80260490 0220202D */ daddu $a0, $s1, $zero
.L80260494:
/* 18ED74 80260494 8E110008 */ lw $s1, 0x8($s0)
/* 18ED78 80260498 0C05122C */ jal hud_element_get_script
/* 18ED7C 8026049C 0220202D */ daddu $a0, $s1, $zero
/* 18ED80 802604A0 3C05802B */ lui $a1, %hi(D_802A9FAC_7B194C)
/* 18ED84 802604A4 24A59FAC */ addiu $a1, $a1, %lo(D_802A9FAC_7B194C)
/* 18ED88 802604A8 10450082 */ beq $v0, $a1, .L802606B4
/* 18ED8C 802604AC 00000000 */ nop
/* 18ED90 802604B0 0C0511FF */ jal hud_element_set_script
/* 18ED94 802604B4 0220202D */ daddu $a0, $s1, $zero
/* 18ED98 802604B8 080981AD */ j .L802606B4
/* 18ED9C 802604BC 00000000 */ nop
.L802604C0:
/* 18EDA0 802604C0 241500B4 */ addiu $s5, $zero, 0xB4
/* 18EDA4 802604C4 24050080 */ addiu $a1, $zero, 0x80
/* 18EDA8 802604C8 00A0302D */ daddu $a2, $a1, $zero
/* 18EDAC 802604CC 00A0382D */ daddu $a3, $a1, $zero
/* 18EDB0 802604D0 3C10802A */ lui $s0, %hi(LevelUpStatEmblemIDs)
/* 18EDB4 802604D4 2610FA80 */ addiu $s0, $s0, %lo(LevelUpStatEmblemIDs)
/* 18EDB8 802604D8 8E040000 */ lw $a0, 0x0($s0)
/* 18EDBC 802604DC 3C11802A */ lui $s1, %hi(LevelUpStatTextIDs)
/* 18EDC0 802604E0 2631FA90 */ addiu $s1, $s1, %lo(LevelUpStatTextIDs)
/* 18EDC4 802604E4 0C0513BF */ jal hud_element_set_tint
/* 18EDC8 802604E8 0000902D */ daddu $s2, $zero, $zero
/* 18EDCC 802604EC 240500FF */ addiu $a1, $zero, 0xFF
/* 18EDD0 802604F0 00A0302D */ daddu $a2, $a1, $zero
/* 18EDD4 802604F4 8E04000C */ lw $a0, 0xC($s0)
/* 18EDD8 802604F8 0C0513BF */ jal hud_element_set_tint
/* 18EDDC 802604FC 00A0382D */ daddu $a3, $a1, $zero
/* 18EDE0 80260500 240500FF */ addiu $a1, $zero, 0xFF
/* 18EDE4 80260504 00A0302D */ daddu $a2, $a1, $zero
/* 18EDE8 80260508 8E040004 */ lw $a0, 0x4($s0)
/* 18EDEC 8026050C 0C0513BF */ jal hud_element_set_tint
/* 18EDF0 80260510 00A0382D */ daddu $a3, $a1, $zero
/* 18EDF4 80260514 24050080 */ addiu $a1, $zero, 0x80
/* 18EDF8 80260518 00A0302D */ daddu $a2, $a1, $zero
/* 18EDFC 8026051C 8E040008 */ lw $a0, 0x8($s0)
/* 18EE00 80260520 0C0513BF */ jal hud_element_set_tint
/* 18EE04 80260524 00A0382D */ daddu $a3, $a1, $zero
.L80260528:
/* 18EE08 80260528 8E240000 */ lw $a0, 0x0($s1)
/* 18EE0C 8026052C 240500FF */ addiu $a1, $zero, 0xFF
/* 18EE10 80260530 00A0302D */ daddu $a2, $a1, $zero
/* 18EE14 80260534 00A0382D */ daddu $a3, $a1, $zero
/* 18EE18 80260538 26310004 */ addiu $s1, $s1, 0x4
/* 18EE1C 8026053C 0C0513BF */ jal hud_element_set_tint
/* 18EE20 80260540 26520001 */ addiu $s2, $s2, 0x1
/* 18EE24 80260544 2A420007 */ slti $v0, $s2, 0x7
/* 18EE28 80260548 1440FFF7 */ bnez $v0, .L80260528
/* 18EE2C 8026054C 00000000 */ nop
/* 18EE30 80260550 0000902D */ daddu $s2, $zero, $zero
/* 18EE34 80260554 3C10802A */ lui $s0, %hi(LevelUpStatTextIDs)
/* 18EE38 80260558 2610FA90 */ addiu $s0, $s0, %lo(LevelUpStatTextIDs)
.L8026055C:
/* 18EE3C 8026055C 8E04001C */ lw $a0, 0x1C($s0)
/* 18EE40 80260560 24050080 */ addiu $a1, $zero, 0x80
/* 18EE44 80260564 00A0302D */ daddu $a2, $a1, $zero
/* 18EE48 80260568 00A0382D */ daddu $a3, $a1, $zero
/* 18EE4C 8026056C 26100004 */ addiu $s0, $s0, 0x4
/* 18EE50 80260570 0C0513BF */ jal hud_element_set_tint
/* 18EE54 80260574 26520001 */ addiu $s2, $s2, 0x1
/* 18EE58 80260578 2A420007 */ slti $v0, $s2, 0x7
/* 18EE5C 8026057C 1440FFF7 */ bnez $v0, .L8026055C
/* 18EE60 80260580 00000000 */ nop
/* 18EE64 80260584 0000902D */ daddu $s2, $zero, $zero
/* 18EE68 80260588 3C10802A */ lui $s0, %hi(LevelUpStatTextIDs)
/* 18EE6C 8026058C 2610FA90 */ addiu $s0, $s0, %lo(LevelUpStatTextIDs)
.L80260590:
/* 18EE70 80260590 8E040038 */ lw $a0, 0x38($s0)
/* 18EE74 80260594 24050080 */ addiu $a1, $zero, 0x80
/* 18EE78 80260598 00A0302D */ daddu $a2, $a1, $zero
/* 18EE7C 8026059C 00A0382D */ daddu $a3, $a1, $zero
/* 18EE80 802605A0 26100004 */ addiu $s0, $s0, 0x4
/* 18EE84 802605A4 0C0513BF */ jal hud_element_set_tint
/* 18EE88 802605A8 26520001 */ addiu $s2, $s2, 0x1
/* 18EE8C 802605AC 2A420007 */ slti $v0, $s2, 0x7
/* 18EE90 802605B0 10400040 */ beqz $v0, .L802606B4
/* 18EE94 802605B4 00000000 */ nop
/* 18EE98 802605B8 08098164 */ j .L80260590
/* 18EE9C 802605BC 00000000 */ nop
.L802605C0:
/* 18EEA0 802605C0 24050080 */ addiu $a1, $zero, 0x80
.L802605C4:
/* 18EEA4 802605C4 00A0302D */ daddu $a2, $a1, $zero
/* 18EEA8 802605C8 00A0382D */ daddu $a3, $a1, $zero
/* 18EEAC 802605CC 3C10802A */ lui $s0, %hi(LevelUpStatEmblemIDs)
/* 18EEB0 802605D0 2610FA80 */ addiu $s0, $s0, %lo(LevelUpStatEmblemIDs)
/* 18EEB4 802605D4 8E040000 */ lw $a0, 0x0($s0)
/* 18EEB8 802605D8 3C11802A */ lui $s1, %hi(LevelUpStatTextIDs)
/* 18EEBC 802605DC 2631FA90 */ addiu $s1, $s1, %lo(LevelUpStatTextIDs)
/* 18EEC0 802605E0 0C0513BF */ jal hud_element_set_tint
/* 18EEC4 802605E4 0000902D */ daddu $s2, $zero, $zero
/* 18EEC8 802605E8 24050080 */ addiu $a1, $zero, 0x80
/* 18EECC 802605EC 00A0302D */ daddu $a2, $a1, $zero
/* 18EED0 802605F0 8E04000C */ lw $a0, 0xC($s0)
/* 18EED4 802605F4 0C0513BF */ jal hud_element_set_tint
/* 18EED8 802605F8 00A0382D */ daddu $a3, $a1, $zero
/* 18EEDC 802605FC 24050080 */ addiu $a1, $zero, 0x80
/* 18EEE0 80260600 00A0302D */ daddu $a2, $a1, $zero
/* 18EEE4 80260604 8E040004 */ lw $a0, 0x4($s0)
/* 18EEE8 80260608 0C0513BF */ jal hud_element_set_tint
/* 18EEEC 8026060C 00A0382D */ daddu $a3, $a1, $zero
/* 18EEF0 80260610 240500FF */ addiu $a1, $zero, 0xFF
/* 18EEF4 80260614 00A0302D */ daddu $a2, $a1, $zero
/* 18EEF8 80260618 8E040008 */ lw $a0, 0x8($s0)
/* 18EEFC 8026061C 0C0513BF */ jal hud_element_set_tint
/* 18EF00 80260620 00A0382D */ daddu $a3, $a1, $zero
.L80260624:
/* 18EF04 80260624 8E240000 */ lw $a0, 0x0($s1)
/* 18EF08 80260628 24050080 */ addiu $a1, $zero, 0x80
/* 18EF0C 8026062C 00A0302D */ daddu $a2, $a1, $zero
/* 18EF10 80260630 00A0382D */ daddu $a3, $a1, $zero
/* 18EF14 80260634 26310004 */ addiu $s1, $s1, 0x4
/* 18EF18 80260638 0C0513BF */ jal hud_element_set_tint
/* 18EF1C 8026063C 26520001 */ addiu $s2, $s2, 0x1
/* 18EF20 80260640 2A420007 */ slti $v0, $s2, 0x7
/* 18EF24 80260644 1440FFF7 */ bnez $v0, .L80260624
/* 18EF28 80260648 00000000 */ nop
/* 18EF2C 8026064C 0000902D */ daddu $s2, $zero, $zero
/* 18EF30 80260650 3C10802A */ lui $s0, %hi(LevelUpStatTextIDs)
/* 18EF34 80260654 2610FA90 */ addiu $s0, $s0, %lo(LevelUpStatTextIDs)
.L80260658:
/* 18EF38 80260658 8E04001C */ lw $a0, 0x1C($s0)
/* 18EF3C 8026065C 24050080 */ addiu $a1, $zero, 0x80
/* 18EF40 80260660 00A0302D */ daddu $a2, $a1, $zero
/* 18EF44 80260664 00A0382D */ daddu $a3, $a1, $zero
/* 18EF48 80260668 26100004 */ addiu $s0, $s0, 0x4
/* 18EF4C 8026066C 0C0513BF */ jal hud_element_set_tint
/* 18EF50 80260670 26520001 */ addiu $s2, $s2, 0x1
/* 18EF54 80260674 2A420007 */ slti $v0, $s2, 0x7
/* 18EF58 80260678 1440FFF7 */ bnez $v0, .L80260658
/* 18EF5C 8026067C 00000000 */ nop
/* 18EF60 80260680 0000902D */ daddu $s2, $zero, $zero
/* 18EF64 80260684 3C10802A */ lui $s0, %hi(LevelUpStatTextIDs)
/* 18EF68 80260688 2610FA90 */ addiu $s0, $s0, %lo(LevelUpStatTextIDs)
.L8026068C:
/* 18EF6C 8026068C 8E040038 */ lw $a0, 0x38($s0)
/* 18EF70 80260690 240500FF */ addiu $a1, $zero, 0xFF
/* 18EF74 80260694 00A0302D */ daddu $a2, $a1, $zero
/* 18EF78 80260698 00A0382D */ daddu $a3, $a1, $zero
/* 18EF7C 8026069C 26100004 */ addiu $s0, $s0, 0x4
/* 18EF80 802606A0 0C0513BF */ jal hud_element_set_tint
/* 18EF84 802606A4 26520001 */ addiu $s2, $s2, 0x1
/* 18EF88 802606A8 2A420007 */ slti $v0, $s2, 0x7
/* 18EF8C 802606AC 1440FFF7 */ bnez $v0, .L8026068C
/* 18EF90 802606B0 00000000 */ nop
.L802606B4:
/* 18EF94 802606B4 0C097FE3 */ jal func_8025FF8C
/* 18EF98 802606B8 24040001 */ addiu $a0, $zero, 0x1
/* 18EF9C 802606BC 3C10802A */ lui $s0, %hi(LevelUpStatEmblemIDs)
/* 18EFA0 802606C0 2610FA80 */ addiu $s0, $s0, %lo(LevelUpStatEmblemIDs)
/* 18EFA4 802606C4 8E040000 */ lw $a0, 0x0($s0)
/* 18EFA8 802606C8 0C0511EA */ jal hud_element_draw_clipped
/* 18EFAC 802606CC 0000982D */ daddu $s3, $zero, $zero
/* 18EFB0 802606D0 8E04000C */ lw $a0, 0xC($s0)
/* 18EFB4 802606D4 0C0511EA */ jal hud_element_draw_clipped
/* 18EFB8 802606D8 0260882D */ daddu $s1, $s3, $zero
/* 18EFBC 802606DC 8E040004 */ lw $a0, 0x4($s0)
/* 18EFC0 802606E0 3C14802A */ lui $s4, %hi(LevelUpStatTextIDs)
/* 18EFC4 802606E4 2694FA90 */ addiu $s4, $s4, %lo(LevelUpStatTextIDs)
/* 18EFC8 802606E8 0C0511EA */ jal hud_element_draw_clipped
/* 18EFCC 802606EC 00000000 */ nop
/* 18EFD0 802606F0 0C0511EA */ jal hud_element_draw_clipped
/* 18EFD4 802606F4 8E040008 */ lw $a0, 0x8($s0)
.L802606F8:
/* 18EFD8 802606F8 0000902D */ daddu $s2, $zero, $zero
/* 18EFDC 802606FC 0220802D */ daddu $s0, $s1, $zero
/* 18EFE0 80260700 02141021 */ addu $v0, $s0, $s4
.L80260704:
/* 18EFE4 80260704 8C440000 */ lw $a0, 0x0($v0)
/* 18EFE8 80260708 26100004 */ addiu $s0, $s0, 0x4
/* 18EFEC 8026070C 0C0511EA */ jal hud_element_draw_clipped
/* 18EFF0 80260710 26520001 */ addiu $s2, $s2, 0x1
/* 18EFF4 80260714 2A420007 */ slti $v0, $s2, 0x7
/* 18EFF8 80260718 1440FFFA */ bnez $v0, .L80260704
/* 18EFFC 8026071C 02141021 */ addu $v0, $s0, $s4
/* 18F000 80260720 26730001 */ addiu $s3, $s3, 0x1
/* 18F004 80260724 2A620003 */ slti $v0, $s3, 0x3
/* 18F008 80260728 1440FFF3 */ bnez $v0, .L802606F8
/* 18F00C 8026072C 2631001C */ addiu $s1, $s1, 0x1C
/* 18F010 80260730 0C051086 */ jal func_80144218
/* 18F014 80260734 2404FFFF */ addiu $a0, $zero, -0x1
/* 18F018 80260738 44951000 */ mtc1 $s5, $f2
/* 18F01C 8026073C 00000000 */ nop
/* 18F020 80260740 468010A0 */ cvt.s.w $f2, $f2
/* 18F024 80260744 44071000 */ mfc1 $a3, $f2
/* 18F028 80260748 44800000 */ mtc1 $zero, $f0
/* 18F02C 8026074C 3C11802A */ lui $s1, %hi(D_8029FAE8)
/* 18F030 80260750 8E31FAE8 */ lw $s1, %lo(D_8029FAE8)($s1)
/* 18F034 80260754 44050000 */ mfc1 $a1, $f0
/* 18F038 80260758 0220202D */ daddu $a0, $s1, $zero
/* 18F03C 8026075C 0C051489 */ jal hud_element_set_transform_rotation
/* 18F040 80260760 00A0302D */ daddu $a2, $a1, $zero
/* 18F044 80260764 0C05108E */ jal func_80144238
/* 18F048 80260768 0220202D */ daddu $a0, $s1, $zero
/* 18F04C 8026076C 0809820E */ j .L80260838
/* 18F050 80260770 00000000 */ nop
glabel .L80260774
/* 18F054 80260774 0C097FE3 */ jal func_8025FF8C
/* 18F058 80260778 24040001 */ addiu $a0, $zero, 0x1
/* 18F05C 8026077C 3C10802A */ lui $s0, %hi(LevelUpStatEmblemIDs)
/* 18F060 80260780 2610FA80 */ addiu $s0, $s0, %lo(LevelUpStatEmblemIDs)
/* 18F064 80260784 8E040000 */ lw $a0, 0x0($s0)
/* 18F068 80260788 0C0511EA */ jal hud_element_draw_clipped
/* 18F06C 8026078C 0000982D */ daddu $s3, $zero, $zero
/* 18F070 80260790 8E04000C */ lw $a0, 0xC($s0)
/* 18F074 80260794 0C0511EA */ jal hud_element_draw_clipped
/* 18F078 80260798 0260882D */ daddu $s1, $s3, $zero
/* 18F07C 8026079C 8E040004 */ lw $a0, 0x4($s0)
/* 18F080 802607A0 3C14802A */ lui $s4, %hi(LevelUpStatTextIDs)
/* 18F084 802607A4 2694FA90 */ addiu $s4, $s4, %lo(LevelUpStatTextIDs)
/* 18F088 802607A8 0C0511EA */ jal hud_element_draw_clipped
/* 18F08C 802607AC 00000000 */ nop
/* 18F090 802607B0 0C0511EA */ jal hud_element_draw_clipped
/* 18F094 802607B4 8E040008 */ lw $a0, 0x8($s0)
.L802607B8:
/* 18F098 802607B8 0000902D */ daddu $s2, $zero, $zero
/* 18F09C 802607BC 0220802D */ daddu $s0, $s1, $zero
/* 18F0A0 802607C0 02141021 */ addu $v0, $s0, $s4
.L802607C4:
/* 18F0A4 802607C4 8C440000 */ lw $a0, 0x0($v0)
/* 18F0A8 802607C8 26100004 */ addiu $s0, $s0, 0x4
/* 18F0AC 802607CC 0C0511EA */ jal hud_element_draw_clipped
/* 18F0B0 802607D0 26520001 */ addiu $s2, $s2, 0x1
/* 18F0B4 802607D4 2A420007 */ slti $v0, $s2, 0x7
/* 18F0B8 802607D8 1440FFFA */ bnez $v0, .L802607C4
/* 18F0BC 802607DC 02141021 */ addu $v0, $s0, $s4
/* 18F0C0 802607E0 26730001 */ addiu $s3, $s3, 0x1
/* 18F0C4 802607E4 2A620003 */ slti $v0, $s3, 0x3
/* 18F0C8 802607E8 1440FFF3 */ bnez $v0, .L802607B8
/* 18F0CC 802607EC 2631001C */ addiu $s1, $s1, 0x1C
/* 18F0D0 802607F0 3C018028 */ lui $at, %hi(D_80284150)
/* 18F0D4 802607F4 C4224150 */ lwc1 $f2, %lo(D_80284150)($at)
/* 18F0D8 802607F8 0809820B */ j .L8026082C
/* 18F0DC 802607FC 468010A0 */ cvt.s.w $f2, $f2
glabel .L80260800
/* 18F0E0 80260800 3C018028 */ lui $at, %hi(D_80284150)
/* 18F0E4 80260804 C4224150 */ lwc1 $f2, %lo(D_80284150)($at)
/* 18F0E8 80260808 0809820B */ j .L8026082C
/* 18F0EC 8026080C 468010A0 */ cvt.s.w $f2, $f2
glabel .L80260810
/* 18F0F0 80260810 3C058028 */ lui $a1, %hi(D_80284150)
/* 18F0F4 80260814 8CA54150 */ lw $a1, %lo(D_80284150)($a1)
/* 18F0F8 80260818 10A00007 */ beqz $a1, .L80260838
/* 18F0FC 8026081C 00000000 */ nop
/* 18F100 80260820 44851000 */ mtc1 $a1, $f2
/* 18F104 80260824 00000000 */ nop
/* 18F108 80260828 468010A0 */ cvt.s.w $f2, $f2
.L8026082C:
/* 18F10C 8026082C 44051000 */ mfc1 $a1, $f2
/* 18F110 80260830 0C04DF62 */ jal set_screen_overlay_params_front
/* 18F114 80260834 0000202D */ daddu $a0, $zero, $zero
glabel .L80260838
/* 18F118 80260838 3C03800E */ lui $v1, %hi(gBattleSubState)
/* 18F11C 8026083C 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
/* 18F120 80260840 28620007 */ slti $v0, $v1, 0x7
/* 18F124 80260844 14400037 */ bnez $v0, .L80260924
/* 18F128 80260848 2862000A */ slti $v0, $v1, 0xA
/* 18F12C 8026084C 14400005 */ bnez $v0, .L80260864
/* 18F130 80260850 2402000A */ addiu $v0, $zero, 0xA
/* 18F134 80260854 1062001B */ beq $v1, $v0, .L802608C4
/* 18F138 80260858 00000000 */ nop
/* 18F13C 8026085C 08098249 */ j .L80260924
/* 18F140 80260860 00000000 */ nop
.L80260864:
/* 18F144 80260864 3C06802A */ lui $a2, %hi(LevelUpSelectTextVelX)
/* 18F148 80260868 24C6FB8C */ addiu $a2, $a2, %lo(LevelUpSelectTextVelX)
/* 18F14C 8026086C 3C05802A */ lui $a1, %hi(LevelUpSelectTextOffsetX)
/* 18F150 80260870 24A5FB88 */ addiu $a1, $a1, %lo(LevelUpSelectTextOffsetX)
/* 18F154 80260874 8CC30000 */ lw $v1, 0x0($a2)
/* 18F158 80260878 8CA20000 */ lw $v0, 0x0($a1)
/* 18F15C 8026087C 24640002 */ addiu $a0, $v1, 0x2
/* 18F160 80260880 00441021 */ addu $v0, $v0, $a0
/* 18F164 80260884 ACC40000 */ sw $a0, 0x0($a2)
/* 18F168 80260888 ACA20000 */ sw $v0, 0x0($a1)
/* 18F16C 8026088C 284200C9 */ slti $v0, $v0, 0xC9
/* 18F170 80260890 5440001C */ bnel $v0, $zero, .L80260904
/* 18F174 80260894 240600B0 */ addiu $a2, $zero, 0xB0
/* 18F178 80260898 3C035555 */ lui $v1, (0x55555556 >> 16)
/* 18F17C 8026089C 34635556 */ ori $v1, $v1, (0x55555556 & 0xFFFF)
/* 18F180 802608A0 00041023 */ negu $v0, $a0
/* 18F184 802608A4 00430018 */ mult $v0, $v1
/* 18F188 802608A8 240300C8 */ addiu $v1, $zero, 0xC8
/* 18F18C 802608AC 000217C3 */ sra $v0, $v0, 31
/* 18F190 802608B0 ACA30000 */ sw $v1, 0x0($a1)
/* 18F194 802608B4 00004010 */ mfhi $t0
/* 18F198 802608B8 01021023 */ subu $v0, $t0, $v0
/* 18F19C 802608BC 08098240 */ j .L80260900
/* 18F1A0 802608C0 ACC20000 */ sw $v0, 0x0($a2)
.L802608C4:
/* 18F1A4 802608C4 3C02802A */ lui $v0, %hi(LevelUpSelectTextVelX)
/* 18F1A8 802608C8 2442FB8C */ addiu $v0, $v0, %lo(LevelUpSelectTextVelX)
/* 18F1AC 802608CC 3C05802A */ lui $a1, %hi(LevelUpSelectTextOffsetX)
/* 18F1B0 802608D0 24A5FB88 */ addiu $a1, $a1, %lo(LevelUpSelectTextOffsetX)
/* 18F1B4 802608D4 8C430000 */ lw $v1, 0x0($v0)
/* 18F1B8 802608D8 8CA40000 */ lw $a0, 0x0($a1)
/* 18F1BC 802608DC 24630004 */ addiu $v1, $v1, 0x4
/* 18F1C0 802608E0 00832021 */ addu $a0, $a0, $v1
/* 18F1C4 802608E4 AC430000 */ sw $v1, 0x0($v0)
/* 18F1C8 802608E8 ACA40000 */ sw $a0, 0x0($a1)
/* 18F1CC 802608EC 288401F5 */ slti $a0, $a0, 0x1F5
/* 18F1D0 802608F0 14800004 */ bnez $a0, .L80260904
/* 18F1D4 802608F4 240600B0 */ addiu $a2, $zero, 0xB0
/* 18F1D8 802608F8 240201F4 */ addiu $v0, $zero, 0x1F4
/* 18F1DC 802608FC ACA20000 */ sw $v0, 0x0($a1)
.L80260900:
/* 18F1E0 80260900 240600B0 */ addiu $a2, $zero, 0xB0
.L80260904:
/* 18F1E4 80260904 3C11802A */ lui $s1, %hi(LevelUpSelectTextID)
/* 18F1E8 80260908 8E31FB48 */ lw $s1, %lo(LevelUpSelectTextID)($s1)
/* 18F1EC 8026090C 8CA50000 */ lw $a1, 0x0($a1)
/* 18F1F0 80260910 0220202D */ daddu $a0, $s1, $zero
/* 18F1F4 80260914 0C051261 */ jal hud_element_set_render_pos
/* 18F1F8 80260918 24A5FFD5 */ addiu $a1, $a1, -0x2B
/* 18F1FC 8026091C 0C0511EA */ jal hud_element_draw_clipped
/* 18F200 80260920 0220202D */ daddu $a0, $s1, $zero
.L80260924:
/* 18F204 80260924 8FBF0028 */ lw $ra, 0x28($sp)
/* 18F208 80260928 8FB50024 */ lw $s5, 0x24($sp)
/* 18F20C 8026092C 8FB40020 */ lw $s4, 0x20($sp)
/* 18F210 80260930 8FB3001C */ lw $s3, 0x1C($sp)
/* 18F214 80260934 8FB20018 */ lw $s2, 0x18($sp)
/* 18F218 80260938 8FB10014 */ lw $s1, 0x14($sp)
/* 18F21C 8026093C 8FB00010 */ lw $s0, 0x10($sp)
/* 18F220 80260940 03E00008 */ jr $ra
/* 18F224 80260944 27BD0030 */ addiu $sp, $sp, 0x30
### DECOMPILED C INSTRUCTIONS:
void btl_state_draw_celebration(void) {
BattleStatus* battleStatus = &gBattleStatus;
s32 rotZ;
s32 id;
s32 i;
s32 j;
switch (gBattleSubState) {
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_SHOW_HUD:
btl_draw_upgrade_windows(0);
id = LevelUpStatEmblemIDs[0];
hud_element_set_tint(id, 128, 128, 128);
hud_element_draw_clipped(id);
id = LevelUpStatEmblemIDs[3];
hud_element_set_tint(id, 128, 128, 128);
hud_element_draw_clipped(id);
id = LevelUpStatEmblemIDs[1];
hud_element_set_tint(id, 128, 128, 128);
hud_element_draw_clipped(id);
id = LevelUpStatEmblemIDs[2];
hud_element_set_tint(id, 128, 128, 128);
hud_element_draw_clipped(id);
for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs); j++) {
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
id = LevelUpStatTextIDs[j][i];
hud_element_set_tint(id, 128, 128, 128);
hud_element_draw_clipped(id);
}
}
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CHOOSE:
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_INVALID:
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_INVALID_DELAY:
switch (battleStatus->currentSubmenu) {
case 0:
rotZ = 152;
hud_element_set_tint(LevelUpStatEmblemIDs[0], 255, 255, 255);
hud_element_set_tint(LevelUpStatEmblemIDs[3], 128, 128, 128);
hud_element_set_tint(LevelUpStatEmblemIDs[1], 128, 128, 128);
hud_element_set_tint(LevelUpStatEmblemIDs[2], 128, 128, 128);
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
id = LevelUpStatTextIDs[LVL_UP_FP][i];
hud_element_set_tint(id, 128, 128, 128);
}
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
id = LevelUpStatTextIDs[LVL_UP_HP][i];
hud_element_set_tint(id, 255, 255, 255);
}
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
id = LevelUpStatTextIDs[LVL_UP_BP][i];
hud_element_set_tint(id, 128, 128, 128);
}
id = LevelUpStatEmblemIDs[0];
if (hud_element_get_script(id) != &HES_level_up_heart_copy) {
hud_element_set_script(id, &HES_level_up_heart_copy);
}
id = LevelUpStatEmblemIDs[3];
if (hud_element_get_script(id) != &HES_level_up_leaves) {
hud_element_set_script(id, &HES_level_up_leaves);
}
id = LevelUpStatEmblemIDs[1];
if (hud_element_get_script(id) != &HES_level_up_flower) {
hud_element_set_script(id, &HES_level_up_flower);
}
id = LevelUpStatEmblemIDs[2];
if (hud_element_get_script(id) != &HES_level_up_badge) {
hud_element_set_script(id, &HES_level_up_badge);
}
break;
case 1:
rotZ = 180;
hud_element_set_tint(LevelUpStatEmblemIDs[0], 128, 128, 128);
hud_element_set_tint(LevelUpStatEmblemIDs[3], 255, 255, 255);
hud_element_set_tint(LevelUpStatEmblemIDs[1], 255, 255, 255);
hud_element_set_tint(LevelUpStatEmblemIDs[2], 128, 128, 128);
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
id = LevelUpStatTextIDs[LVL_UP_FP][i];
hud_element_set_tint(id, 255, 255, 255);
}
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
id = LevelUpStatTextIDs[LVL_UP_HP][i];
hud_element_set_tint(id, 128, 128, 128);
}
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
id = LevelUpStatTextIDs[LVL_UP_BP][i];
hud_element_set_tint(id, 128, 128, 128);
}
break;
case 2:
default:
rotZ = 208;
hud_element_set_tint(LevelUpStatEmblemIDs[0], 128, 128, 128);
hud_element_set_tint(LevelUpStatEmblemIDs[3], 128, 128, 128);
hud_element_set_tint(LevelUpStatEmblemIDs[1], 128, 128, 128);
hud_element_set_tint(LevelUpStatEmblemIDs[2], 255, 255, 255);
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
id = LevelUpStatTextIDs[LVL_UP_FP][i];
hud_element_set_tint(id, 128, 128, 128);
}
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
id = LevelUpStatTextIDs[LVL_UP_HP][i];
hud_element_set_tint(id, 128, 128, 128);
}
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
id = LevelUpStatTextIDs[LVL_UP_BP][i];
hud_element_set_tint(id, 255, 255, 255);
}
break;
}
btl_draw_upgrade_windows(1);
hud_element_draw_clipped(LevelUpStatEmblemIDs[0]);
hud_element_draw_clipped(LevelUpStatEmblemIDs[3]);
hud_element_draw_clipped(LevelUpStatEmblemIDs[1]);
hud_element_draw_clipped(LevelUpStatEmblemIDs[2]);
for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs); j++) {
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
hud_element_draw_clipped(LevelUpStatTextIDs[j][i]);
}
}
func_80144218(-1);
id = LevelUpSpotlightID;
hud_element_set_transform_rotation(id, 0.0f, 0.0f, rotZ);
func_80144238(id);
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_UPGRADE:
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_FADE_OUT:
btl_draw_upgrade_windows(1);
hud_element_draw_clipped(LevelUpStatEmblemIDs[0]);
hud_element_draw_clipped(LevelUpStatEmblemIDs[3]);
hud_element_draw_clipped(LevelUpStatEmblemIDs[1]);
hud_element_draw_clipped(LevelUpStatEmblemIDs[2]);
for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs); j++) {
for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
hud_element_draw_clipped(LevelUpStatTextIDs[j][i]);
}
}
set_screen_overlay_params_front(OVERLAY_SCREEN_COLOR, bFadeToBlackAmt);
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_DESTROY_HUD:
set_screen_overlay_params_front(OVERLAY_SCREEN_COLOR, bFadeToBlackAmt);
break;
case BTL_SUBSTATE_CELEBRATE_WALK_AWAY:
if (bFadeToBlackAmt != 0) {
set_screen_overlay_params_front(OVERLAY_SCREEN_COLOR, bFadeToBlackAmt);
}
break;
}
switch (gBattleSubState) {
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_SHOW_HUD:
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CHOOSE:
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_UPGRADE:
LevelUpSelectTextVelX += 2;
LevelUpSelectTextOffsetX += LevelUpSelectTextVelX;
if (LevelUpSelectTextOffsetX > 200) {
LevelUpSelectTextOffsetX = 200;
LevelUpSelectTextVelX = -LevelUpSelectTextVelX / 3; // rebounding
}
id = LevelUpSelectTextID;
hud_element_set_render_pos(id, LevelUpSelectTextOffsetX - 43, 176);
hud_element_draw_clipped(id);
break;
case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_FADE_OUT:
LevelUpSelectTextVelX += 4;
LevelUpSelectTextOffsetX += LevelUpSelectTextVelX;
if (LevelUpSelectTextOffsetX > 500) {
LevelUpSelectTextOffsetX = 500;
}
id = LevelUpSelectTextID;
hud_element_set_render_pos(id, LevelUpSelectTextOffsetX - 43, 176);
hud_element_draw_clipped(id);
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel underwater_appendGfx
/* 3B91F0 E00BA620 27BDFF28 */ addiu $sp, $sp, -0xD8
/* 3B91F4 E00BA624 3C06DB06 */ lui $a2, (0xDB060024 >> 16)
/* 3B91F8 E00BA628 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF)
/* 3B91FC E00BA62C 3C07FF10 */ lui $a3, (0xFF10013F >> 16)
/* 3B9200 E00BA630 34E7013F */ ori $a3, $a3, (0xFF10013F & 0xFFFF)
/* 3B9204 E00BA634 0000682D */ daddu $t5, $zero, $zero
/* 3B9208 E00BA638 3C02800A */ lui $v0, %hi(gMainGfxPos)
/* 3B920C E00BA63C 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos)
/* 3B9210 E00BA640 0040402D */ daddu $t0, $v0, $zero
/* 3B9214 E00BA644 AFB200B8 */ sw $s2, 0xB8($sp)
/* 3B9218 E00BA648 3C12FD10 */ lui $s2, (0xFD10013F >> 16)
/* 3B921C E00BA64C 3652013F */ ori $s2, $s2, (0xFD10013F & 0xFFFF)
/* 3B9220 E00BA650 3C18800A */ lui $t8, %hi(nuGfxCfb_ptr)
/* 3B9224 E00BA654 2718A64C */ addiu $t8, $t8, %lo(nuGfxCfb_ptr)
/* 3B9228 E00BA658 3C0CF510 */ lui $t4, (0xF510A000 >> 16)
/* 3B922C E00BA65C 358CA000 */ ori $t4, $t4, (0xF510A000 & 0xFFFF)
/* 3B9230 E00BA660 AFB700CC */ sw $s7, 0xCC($sp)
/* 3B9234 E00BA664 3C170700 */ lui $s7, (0x7000000 >> 16)
/* 3B9238 E00BA668 AFB500C4 */ sw $s5, 0xC4($sp)
/* 3B923C E00BA66C 3C15F400 */ lui $s5, (0xF4000000 >> 16)
/* 3B9240 E00BA670 AFB100B4 */ sw $s1, 0xB4($sp)
/* 3B9244 E00BA674 3C11074F */ lui $s1, (0x74FC014 >> 16)
/* 3B9248 E00BA678 3631C014 */ ori $s1, $s1, (0x74FC014 & 0xFFFF)
/* 3B924C E00BA67C 3C0EE700 */ lui $t6, (0xE7000000 >> 16)
/* 3B9250 E00BA680 AFB300BC */ sw $s3, 0xBC($sp)
/* 3B9254 E00BA684 3C13F200 */ lui $s3, (0xF2000000 >> 16)
/* 3B9258 E00BA688 AFB000B0 */ sw $s0, 0xB0($sp)
/* 3B925C E00BA68C 3C10004F */ lui $s0, (0x4FC014 >> 16)
/* 3B9260 E00BA690 3610C014 */ ori $s0, $s0, (0x4FC014 & 0xFFFF)
/* 3B9264 E00BA694 3C0FE44F */ lui $t7, (0xE44FC000 >> 16)
/* 3B9268 E00BA698 35EFC000 */ ori $t7, $t7, (0xE44FC000 & 0xFFFF)
/* 3B926C E00BA69C 01A0582D */ daddu $t3, $t5, $zero
/* 3B9270 E00BA6A0 240A0014 */ addiu $t2, $zero, 0x14
/* 3B9274 E00BA6A4 01A0482D */ daddu $t1, $t5, $zero
/* 3B9278 E00BA6A8 01C0102D */ daddu $v0, $t6, $zero
/* 3B927C E00BA6AC AFBF00D4 */ sw $ra, 0xD4($sp)
/* 3B9280 E00BA6B0 AFBE00D0 */ sw $fp, 0xD0($sp)
/* 3B9284 E00BA6B4 AFB600C8 */ sw $s6, 0xC8($sp)
/* 3B9288 E00BA6B8 AFB400C0 */ sw $s4, 0xC0($sp)
/* 3B928C E00BA6BC 8D030000 */ lw $v1, 0x0($t0)
/* 3B9290 E00BA6C0 8C94000C */ lw $s4, 0xC($a0)
/* 3B9294 E00BA6C4 0060282D */ daddu $a1, $v1, $zero
/* 3B9298 E00BA6C8 9299001F */ lbu $t9, 0x1F($s4)
/* 3B929C E00BA6CC 24630008 */ addiu $v1, $v1, 0x8
/* 3B92A0 E00BA6D0 AD030000 */ sw $v1, 0x0($t0)
/* 3B92A4 E00BA6D4 ACA20000 */ sw $v0, 0x0($a1)
/* 3B92A8 E00BA6D8 24620008 */ addiu $v0, $v1, 0x8
/* 3B92AC E00BA6DC ACA00004 */ sw $zero, 0x4($a1)
/* 3B92B0 E00BA6E0 AD020000 */ sw $v0, 0x0($t0)
/* 3B92B4 E00BA6E4 AC660000 */ sw $a2, 0x0($v1)
/* 3B92B8 E00BA6E8 8C840010 */ lw $a0, 0x10($a0)
/* 3B92BC E00BA6EC 24620010 */ addiu $v0, $v1, 0x10
/* 3B92C0 E00BA6F0 AD020000 */ sw $v0, 0x0($t0)
/* 3B92C4 E00BA6F4 3C05800A */ lui $a1, %hi(nuGfxZBuffer)
/* 3B92C8 E00BA6F8 8CA5A5DC */ lw $a1, %lo(nuGfxZBuffer)($a1)
/* 3B92CC E00BA6FC 8C84001C */ lw $a0, 0x1C($a0)
/* 3B92D0 E00BA700 24620018 */ addiu $v0, $v1, 0x18
/* 3B92D4 E00BA704 AD020000 */ sw $v0, 0x0($t0)
/* 3B92D8 E00BA708 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* 3B92DC E00BA70C AC620010 */ sw $v0, 0x10($v1)
/* 3B92E0 E00BA710 3C020900 */ lui $v0, %hi(D_09000528_415588)
/* 3B92E4 E00BA714 24420528 */ addiu $v0, $v0, %lo(D_09000528_415588)
/* 3B92E8 E00BA718 AC620014 */ sw $v0, 0x14($v1)
/* 3B92EC E00BA71C 3C028000 */ lui $v0, (0x80000000 >> 16)
/* 3B92F0 E00BA720 AC670008 */ sw $a3, 0x8($v1)
/* 3B92F4 E00BA724 AC65000C */ sw $a1, 0xC($v1)
/* 3B92F8 E00BA728 00822021 */ addu $a0, $a0, $v0
/* 3B92FC E00BA72C AC640004 */ sw $a0, 0x4($v1)
.LE00BA730:
/* 3B9300 E00BA730 3C071000 */ lui $a3, (0x10000400 >> 16)
/* 3B9304 E00BA734 34E70400 */ ori $a3, $a3, (0x10000400 & 0xFFFF)
/* 3B9308 E00BA738 31660FFF */ andi $a2, $t3, 0xFFF
/* 3B930C E00BA73C 256B0018 */ addiu $t3, $t3, 0x18
/* 3B9310 E00BA740 31450FFF */ andi $a1, $t2, 0xFFF
/* 3B9314 E00BA744 254A0018 */ addiu $t2, $t2, 0x18
/* 3B9318 E00BA748 25AD0001 */ addiu $t5, $t5, 0x1
/* 3B931C E00BA74C 00AF2825 */ or $a1, $a1, $t7
/* 3B9320 E00BA750 8D020000 */ lw $v0, 0x0($t0)
/* 3B9324 E00BA754 8F030000 */ lw $v1, 0x0($t8)
/* 3B9328 E00BA758 0040202D */ daddu $a0, $v0, $zero
/* 3B932C E00BA75C 24420008 */ addiu $v0, $v0, 0x8
/* 3B9330 E00BA760 00691821 */ addu $v1, $v1, $t1
/* 3B9334 E00BA764 AD020000 */ sw $v0, 0x0($t0)
/* 3B9338 E00BA768 AC830004 */ sw $v1, 0x4($a0)
/* 3B933C E00BA76C 24430008 */ addiu $v1, $v0, 0x8
/* 3B9340 E00BA770 AC920000 */ sw $s2, 0x0($a0)
/* 3B9344 E00BA774 AD030000 */ sw $v1, 0x0($t0)
/* 3B9348 E00BA778 24430010 */ addiu $v1, $v0, 0x10
/* 3B934C E00BA77C 3C16E600 */ lui $s6, (0xE6000000 >> 16)
/* 3B9350 E00BA780 AC4C0000 */ sw $t4, 0x0($v0)
/* 3B9354 E00BA784 AC570004 */ sw $s7, 0x4($v0)
/* 3B9358 E00BA788 AD030000 */ sw $v1, 0x0($t0)
/* 3B935C E00BA78C 24430018 */ addiu $v1, $v0, 0x18
/* 3B9360 E00BA790 AC560008 */ sw $s6, 0x8($v0)
/* 3B9364 E00BA794 AC40000C */ sw $zero, 0xC($v0)
/* 3B9368 E00BA798 AD030000 */ sw $v1, 0x0($t0)
/* 3B936C E00BA79C 24430020 */ addiu $v1, $v0, 0x20
/* 3B9370 E00BA7A0 AC550010 */ sw $s5, 0x10($v0)
/* 3B9374 E00BA7A4 AC510014 */ sw $s1, 0x14($v0)
/* 3B9378 E00BA7A8 AD030000 */ sw $v1, 0x0($t0)
/* 3B937C E00BA7AC 24430028 */ addiu $v1, $v0, 0x28
/* 3B9380 E00BA7B0 AC4E0018 */ sw $t6, 0x18($v0)
/* 3B9384 E00BA7B4 AC40001C */ sw $zero, 0x1C($v0)
/* 3B9388 E00BA7B8 AD030000 */ sw $v1, 0x0($t0)
/* 3B938C E00BA7BC 24430030 */ addiu $v1, $v0, 0x30
/* 3B9390 E00BA7C0 AC4C0020 */ sw $t4, 0x20($v0)
/* 3B9394 E00BA7C4 AC400024 */ sw $zero, 0x24($v0)
/* 3B9398 E00BA7C8 AD030000 */ sw $v1, 0x0($t0)
/* 3B939C E00BA7CC 24430038 */ addiu $v1, $v0, 0x38
/* 3B93A0 E00BA7D0 AC530028 */ sw $s3, 0x28($v0)
/* 3B93A4 E00BA7D4 AC50002C */ sw $s0, 0x2C($v0)
/* 3B93A8 E00BA7D8 AD030000 */ sw $v1, 0x0($t0)
/* 3B93AC E00BA7DC 24430040 */ addiu $v1, $v0, 0x40
/* 3B93B0 E00BA7E0 AC450030 */ sw $a1, 0x30($v0)
/* 3B93B4 E00BA7E4 AC460034 */ sw $a2, 0x34($v0)
/* 3B93B8 E00BA7E8 AD030000 */ sw $v1, 0x0($t0)
/* 3B93BC E00BA7EC 3C03E100 */ lui $v1, (0xE1000000 >> 16)
/* 3B93C0 E00BA7F0 AC430038 */ sw $v1, 0x38($v0)
/* 3B93C4 E00BA7F4 24430048 */ addiu $v1, $v0, 0x48
/* 3B93C8 E00BA7F8 AC40003C */ sw $zero, 0x3C($v0)
/* 3B93CC E00BA7FC AD030000 */ sw $v1, 0x0($t0)
/* 3B93D0 E00BA800 3C03F100 */ lui $v1, (0xF1000000 >> 16)
/* 3B93D4 E00BA804 AC430040 */ sw $v1, 0x40($v0)
/* 3B93D8 E00BA808 24430050 */ addiu $v1, $v0, 0x50
/* 3B93DC E00BA80C AC470044 */ sw $a3, 0x44($v0)
/* 3B93E0 E00BA810 AD030000 */ sw $v1, 0x0($t0)
/* 3B93E4 E00BA814 AC4E0048 */ sw $t6, 0x48($v0)
/* 3B93E8 E00BA818 AC40004C */ sw $zero, 0x4C($v0)
/* 3B93EC E00BA81C 29A20028 */ slti $v0, $t5, 0x28
/* 3B93F0 E00BA820 1440FFC3 */ bnez $v0, .LE00BA730
/* 3B93F4 E00BA824 25290F00 */ addiu $t1, $t1, 0xF00
/* 3B93F8 E00BA828 3C06FF10 */ lui $a2, (0xFF10013F >> 16)
/* 3B93FC E00BA82C 34C6013F */ ori $a2, $a2, (0xFF10013F & 0xFFFF)
/* 3B9400 E00BA830 3C0AE300 */ lui $t2, (0xE3000A01 >> 16)
/* 3B9404 E00BA834 354A0A01 */ ori $t2, $t2, (0xE3000A01 & 0xFFFF)
/* 3B9408 E00BA838 3C0CFC35 */ lui $t4, (0xFC357E6A >> 16)
/* 3B940C E00BA83C 358C7E6A */ ori $t4, $t4, (0xFC357E6A & 0xFFFF)
/* 3B9410 E00BA840 3C0BFFFC */ lui $t3, (0xFFFCF87C >> 16)
/* 3B9414 E00BA844 356BF87C */ ori $t3, $t3, (0xFFFCF87C & 0xFFFF)
/* 3B9418 E00BA848 3C0DFD10 */ lui $t5, (0xFD10013F >> 16)
/* 3B941C E00BA84C 35AD013F */ ori $t5, $t5, (0xFD10013F & 0xFFFF)
/* 3B9420 E00BA850 3C0FE200 */ lui $t7, (0xE200001C >> 16)
/* 3B9424 E00BA854 35EF001C */ ori $t7, $t7, (0xE200001C & 0xFFFF)
/* 3B9428 E00BA858 3C0E0F0A */ lui $t6, (0xF0A4300 >> 16)
/* 3B942C E00BA85C 35CE4300 */ ori $t6, $t6, (0xF0A4300 & 0xFFFF)
/* 3B9430 E00BA860 3C11E300 */ lui $s1, (0xE3000C00 >> 16)
/* 3B9434 E00BA864 36310C00 */ ori $s1, $s1, (0xE3000C00 & 0xFFFF)
/* 3B9438 E00BA868 3C12E300 */ lui $s2, (0xE3001201 >> 16)
/* 3B943C E00BA86C 36521201 */ ori $s2, $s2, (0xE3001201 & 0xFFFF)
/* 3B9440 E00BA870 27A40020 */ addiu $a0, $sp, 0x20
/* 3B9444 E00BA874 3C130001 */ lui $s3, (0x11630 >> 16)
/* 3B9448 E00BA878 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF)
/* 3B944C E00BA87C 3C10800A */ lui $s0, %hi(gMainGfxPos)
/* 3B9450 E00BA880 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos)
/* 3B9454 E00BA884 8E080000 */ lw $t0, 0x0($s0)
/* 3B9458 E00BA888 3C05C2A0 */ lui $a1, (0xC2A00000 >> 16)
/* 3B945C E00BA88C 3C03800A */ lui $v1, %hi(nuGfxCfb_ptr)
/* 3B9460 E00BA890 8C63A64C */ lw $v1, %lo(nuGfxCfb_ptr)($v1)
/* 3B9464 E00BA894 3C01C270 */ lui $at, (0xC2700000 >> 16)
/* 3B9468 E00BA898 44810000 */ mtc1 $at, $f0
/* 3B946C E00BA89C 3C014320 */ lui $at, (0x43200000 >> 16)
/* 3B9470 E00BA8A0 44811000 */ mtc1 $at, $f2
/* 3B9474 E00BA8A4 3C014420 */ lui $at, (0x44200000 >> 16)
/* 3B9478 E00BA8A8 44812000 */ mtc1 $at, $f4
/* 3B947C E00BA8AC 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 3B9480 E00BA8B0 44813000 */ mtc1 $at, $f6
/* 3B9484 E00BA8B4 0100102D */ daddu $v0, $t0, $zero
/* 3B9488 E00BA8B8 25080008 */ addiu $t0, $t0, 0x8
/* 3B948C E00BA8BC AE080000 */ sw $t0, 0x0($s0)
/* 3B9490 E00BA8C0 AC460000 */ sw $a2, 0x0($v0)
/* 3B9494 E00BA8C4 AC430004 */ sw $v1, 0x4($v0)
/* 3B9498 E00BA8C8 25020008 */ addiu $v0, $t0, 0x8
/* 3B949C E00BA8CC AE020000 */ sw $v0, 0x0($s0)
/* 3B94A0 E00BA8D0 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* 3B94A4 E00BA8D4 AD020000 */ sw $v0, 0x0($t0)
/* 3B94A8 E00BA8D8 9289001C */ lbu $t1, 0x1C($s4)
/* 3B94AC E00BA8DC 9286001D */ lbu $a2, 0x1D($s4)
/* 3B94B0 E00BA8E0 9287001E */ lbu $a3, 0x1E($s4)
/* 3B94B4 E00BA8E4 25020010 */ addiu $v0, $t0, 0x10
/* 3B94B8 E00BA8E8 AE020000 */ sw $v0, 0x0($s0)
/* 3B94BC E00BA8EC 25020018 */ addiu $v0, $t0, 0x18
/* 3B94C0 E00BA8F0 AD0A0008 */ sw $t2, 0x8($t0)
/* 3B94C4 E00BA8F4 AD00000C */ sw $zero, 0xC($t0)
/* 3B94C8 E00BA8F8 AE020000 */ sw $v0, 0x0($s0)
/* 3B94CC E00BA8FC 25020020 */ addiu $v0, $t0, 0x20
/* 3B94D0 E00BA900 AD0C0010 */ sw $t4, 0x10($t0)
/* 3B94D4 E00BA904 AD0B0014 */ sw $t3, 0x14($t0)
/* 3B94D8 E00BA908 AE020000 */ sw $v0, 0x0($s0)
/* 3B94DC E00BA90C 3C02800A */ lui $v0, %hi(nuGfxZBuffer)
/* 3B94E0 E00BA910 8C42A5DC */ lw $v0, %lo(nuGfxZBuffer)($v0)
/* 3B94E4 E00BA914 3C038000 */ lui $v1, (0x80000000 >> 16)
/* 3B94E8 E00BA918 AD0D0018 */ sw $t5, 0x18($t0)
/* 3B94EC E00BA91C 00431021 */ addu $v0, $v0, $v1
/* 3B94F0 E00BA920 AD02001C */ sw $v0, 0x1C($t0)
/* 3B94F4 E00BA924 25020028 */ addiu $v0, $t0, 0x28
/* 3B94F8 E00BA928 AE020000 */ sw $v0, 0x0($s0)
/* 3B94FC E00BA92C 25020030 */ addiu $v0, $t0, 0x30
/* 3B9500 E00BA930 AD0F0020 */ sw $t7, 0x20($t0)
/* 3B9504 E00BA934 AD0E0024 */ sw $t6, 0x24($t0)
/* 3B9508 E00BA938 AE020000 */ sw $v0, 0x0($s0)
/* 3B950C E00BA93C 3C020008 */ lui $v0, (0x80000 >> 16)
/* 3B9510 E00BA940 AD02002C */ sw $v0, 0x2C($t0)
/* 3B9514 E00BA944 25020038 */ addiu $v0, $t0, 0x38
/* 3B9518 E00BA948 AD110028 */ sw $s1, 0x28($t0)
/* 3B951C E00BA94C AE020000 */ sw $v0, 0x0($s0)
/* 3B9520 E00BA950 24022000 */ addiu $v0, $zero, 0x2000
/* 3B9524 E00BA954 00094E00 */ sll $t1, $t1, 24
/* 3B9528 E00BA958 00063400 */ sll $a2, $a2, 16
/* 3B952C E00BA95C 01264825 */ or $t1, $t1, $a2
/* 3B9530 E00BA960 00073A00 */ sll $a3, $a3, 8
/* 3B9534 E00BA964 01274825 */ or $t1, $t1, $a3
/* 3B9538 E00BA968 AD020034 */ sw $v0, 0x34($t0)
/* 3B953C E00BA96C 00191042 */ srl $v0, $t9, 1
/* 3B9540 E00BA970 3C0642A0 */ lui $a2, (0x42A00000 >> 16)
/* 3B9544 E00BA974 3C074270 */ lui $a3, (0x42700000 >> 16)
/* 3B9548 E00BA978 01224825 */ or $t1, $t1, $v0
/* 3B954C E00BA97C AD120030 */ sw $s2, 0x30($t0)
/* 3B9550 E00BA980 AD090004 */ sw $t1, 0x4($t0)
/* 3B9554 E00BA984 E7A00010 */ swc1 $f0, 0x10($sp)
/* 3B9558 E00BA988 E7A20014 */ swc1 $f2, 0x14($sp)
/* 3B955C E00BA98C E7A40018 */ swc1 $f4, 0x18($sp)
/* 3B9560 E00BA990 0C080188 */ jal shim_guFrustumF
/* 3B9564 E00BA994 E7A6001C */ swc1 $f6, 0x1C($sp)
/* 3B9568 E00BA998 27A40020 */ addiu $a0, $sp, 0x20
/* 3B956C E00BA99C 3C118007 */ lui $s1, %hi(gMatrixListPos)
/* 3B9570 E00BA9A0 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos)
/* 3B9574 E00BA9A4 3C12800A */ lui $s2, %hi(gDisplayContext)
/* 3B9578 E00BA9A8 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext)
/* 3B957C E00BA9AC 96250000 */ lhu $a1, 0x0($s1)
/* 3B9580 E00BA9B0 8E420000 */ lw $v0, 0x0($s2)
/* 3B9584 E00BA9B4 00052980 */ sll $a1, $a1, 6
/* 3B9588 E00BA9B8 00B32821 */ addu $a1, $a1, $s3
/* 3B958C E00BA9BC 0C080118 */ jal shim_guMtxF2L
/* 3B9590 E00BA9C0 00452821 */ addu $a1, $v0, $a1
/* 3B9594 E00BA9C4 3C03DA38 */ lui $v1, (0xDA380007 >> 16)
/* 3B9598 E00BA9C8 34630007 */ ori $v1, $v1, (0xDA380007 & 0xFFFF)
/* 3B959C E00BA9CC 3C06D9FD */ lui $a2, (0xD9FDF9FF >> 16)
/* 3B95A0 E00BA9D0 34C6F9FF */ ori $a2, $a2, (0xD9FDF9FF & 0xFFFF)
/* 3B95A4 E00BA9D4 3C08D9FF */ lui $t0, (0xD9FFFFFF >> 16)
/* 3B95A8 E00BA9D8 3508FFFF */ ori $t0, $t0, (0xD9FFFFFF & 0xFFFF)
/* 3B95AC E00BA9DC 3C070020 */ lui $a3, (0x200004 >> 16)
/* 3B95B0 E00BA9E0 34E70004 */ ori $a3, $a3, (0x200004 & 0xFFFF)
/* 3B95B4 E00BA9E4 3C090101 */ lui $t1, (0x1010020 >> 16)
/* 3B95B8 E00BA9E8 35290020 */ ori $t1, $t1, (0x1010020 & 0xFFFF)
/* 3B95BC E00BA9EC 0000702D */ daddu $t6, $zero, $zero
/* 3B95C0 E00BA9F0 3C150218 */ lui $s5, (0x2180000 >> 16)
/* 3B95C4 E00BA9F4 24190018 */ addiu $t9, $zero, 0x18
/* 3B95C8 E00BA9F8 8E040000 */ lw $a0, 0x0($s0)
/* 3B95CC E00BA9FC 96220000 */ lhu $v0, 0x0($s1)
/* 3B95D0 E00BAA00 0080282D */ daddu $a1, $a0, $zero
/* 3B95D4 E00BAA04 24840008 */ addiu $a0, $a0, 0x8
/* 3B95D8 E00BAA08 AE040000 */ sw $a0, 0x0($s0)
/* 3B95DC E00BAA0C ACA30000 */ sw $v1, 0x0($a1)
/* 3B95E0 E00BAA10 24430001 */ addiu $v1, $v0, 0x1
/* 3B95E4 E00BAA14 3042FFFF */ andi $v0, $v0, 0xFFFF
/* 3B95E8 E00BAA18 00021180 */ sll $v0, $v0, 6
/* 3B95EC E00BAA1C A6230000 */ sh $v1, 0x0($s1)
/* 3B95F0 E00BAA20 8E430000 */ lw $v1, 0x0($s2)
/* 3B95F4 E00BAA24 00531021 */ addu $v0, $v0, $s3
/* 3B95F8 E00BAA28 00621821 */ addu $v1, $v1, $v0
/* 3B95FC E00BAA2C 24820008 */ addiu $v0, $a0, 0x8
/* 3B9600 E00BAA30 ACA30004 */ sw $v1, 0x4($a1)
/* 3B9604 E00BAA34 AE020000 */ sw $v0, 0x0($s0)
/* 3B9608 E00BAA38 24820010 */ addiu $v0, $a0, 0x10
/* 3B960C E00BAA3C AC860000 */ sw $a2, 0x0($a0)
/* 3B9610 E00BAA40 AC800004 */ sw $zero, 0x4($a0)
/* 3B9614 E00BAA44 AE020000 */ sw $v0, 0x0($s0)
/* 3B9618 E00BAA48 00991021 */ addu $v0, $a0, $t9
/* 3B961C E00BAA4C AC880008 */ sw $t0, 0x8($a0)
/* 3B9620 E00BAA50 AC87000C */ sw $a3, 0xC($a0)
/* 3B9624 E00BAA54 AE020000 */ sw $v0, 0x0($s0)
/* 3B9628 E00BAA58 3C020900 */ lui $v0, %hi(D_09000428_415488)
/* 3B962C E00BAA5C 24420428 */ addiu $v0, $v0, %lo(D_09000428_415488)
/* 3B9630 E00BAA60 AC890010 */ sw $t1, 0x10($a0)
/* 3B9634 E00BAA64 AC820014 */ sw $v0, 0x14($a0)
.LE00BAA68:
/* 3B9638 E00BAA68 15C00004 */ bnez $t6, .LE00BAA7C
/* 3B963C E00BAA6C 0000902D */ daddu $s2, $zero, $zero
/* 3B9640 E00BAA70 2404FFFC */ addiu $a0, $zero, -0x4
/* 3B9644 E00BAA74 0802EAA0 */ j .LE00BAA80
/* 3B9648 E00BAA78 24120001 */ addiu $s2, $zero, 0x1
.LE00BAA7C:
/* 3B964C E00BAA7C 0000202D */ daddu $a0, $zero, $zero
.LE00BAA80:
/* 3B9650 E00BAA80 2402000B */ addiu $v0, $zero, 0xB
/* 3B9654 E00BAA84 15C20003 */ bne $t6, $v0, .LE00BAA94
/* 3B9658 E00BAA88 0000182D */ daddu $v1, $zero, $zero
/* 3B965C E00BAA8C 24030004 */ addiu $v1, $zero, 0x4
/* 3B9660 E00BAA90 24120001 */ addiu $s2, $zero, 0x1
.LE00BAA94:
/* 3B9664 E00BAA94 0000682D */ daddu $t5, $zero, $zero
/* 3B9668 E00BAA98 03241021 */ addu $v0, $t9, $a0
/* 3B966C E00BAA9C 0002C080 */ sll $t8, $v0, 2
/* 3B9670 E00BAAA0 33020FFF */ andi $v0, $t8, 0xFFF
/* 3B9674 E00BAAA4 3C16F400 */ lui $s6, (0xF4000000 >> 16)
/* 3B9678 E00BAAA8 0056B025 */ or $s6, $v0, $s6
/* 3B967C E00BAAAC AFB600A0 */ sw $s6, 0xA0($sp)
/* 3B9680 E00BAAB0 03231821 */ addu $v1, $t9, $v1
/* 3B9684 E00BAAB4 24620010 */ addiu $v0, $v1, 0x10
/* 3B9688 E00BAAB8 00029880 */ sll $s3, $v0, 2
/* 3B968C E00BAABC 32620FFF */ andi $v0, $s3, 0xFFF
/* 3B9690 E00BAAC0 3C160700 */ lui $s6, (0x7000000 >> 16)
/* 3B9694 E00BAAC4 0056F025 */ or $fp, $v0, $s6
/* 3B9698 E00BAAC8 2463001F */ addiu $v1, $v1, 0x1F
/* 3B969C E00BAACC 00031880 */ sll $v1, $v1, 2
/* 3B96A0 E00BAAD0 30770FFF */ andi $s7, $v1, 0xFFF
/* 3B96A4 E00BAAD4 0012B023 */ negu $s6, $s2
/* 3B96A8 E00BAAD8 AFB600A8 */ sw $s6, 0xA8($sp)
.LE00BAADC:
/* 3B96AC E00BAADC 0000502D */ daddu $t2, $zero, $zero
/* 3B96B0 E00BAAE0 000D1100 */ sll $v0, $t5, 4
/* 3B96B4 E00BAAE4 15A00004 */ bnez $t5, .LE00BAAF8
/* 3B96B8 E00BAAE8 244F0010 */ addiu $t7, $v0, 0x10
/* 3B96BC E00BAAEC 240BFFFC */ addiu $t3, $zero, -0x4
/* 3B96C0 E00BAAF0 0802EABF */ j .LE00BAAFC
/* 3B96C4 E00BAAF4 240A0001 */ addiu $t2, $zero, 0x1
.LE00BAAF8:
/* 3B96C8 E00BAAF8 0000582D */ daddu $t3, $zero, $zero
.LE00BAAFC:
/* 3B96CC E00BAAFC 24020011 */ addiu $v0, $zero, 0x11
/* 3B96D0 E00BAB00 15A20003 */ bne $t5, $v0, .LE00BAB10
/* 3B96D4 E00BAB04 0000882D */ daddu $s1, $zero, $zero
/* 3B96D8 E00BAB08 24110004 */ addiu $s1, $zero, 0x4
/* 3B96DC E00BAB0C 240A0001 */ addiu $t2, $zero, 0x1
.LE00BAB10:
/* 3B96E0 E00BAB10 3C080709 */ lui $t0, (0x7098260 >> 16)
/* 3B96E4 E00BAB14 35088260 */ ori $t0, $t0, (0x7098260 & 0xFFFF)
/* 3B96E8 E00BAB18 3C090009 */ lui $t1, (0x98260 >> 16)
/* 3B96EC E00BAB1C 35298260 */ ori $t1, $t1, (0x98260 & 0xFFFF)
/* 3B96F0 E00BAB20 01F13021 */ addu $a2, $t7, $s1
/* 3B96F4 E00BAB24 01EB2021 */ addu $a0, $t7, $t3
/* 3B96F8 E00BAB28 2483FFF0 */ addiu $v1, $a0, -0x10
/* 3B96FC E00BAB2C 00C31823 */ subu $v1, $a2, $v1
/* 3B9700 E00BAB30 24630001 */ addiu $v1, $v1, 0x1
/* 3B9704 E00BAB34 00031840 */ sll $v1, $v1, 1
/* 3B9708 E00BAB38 24630007 */ addiu $v1, $v1, 0x7
/* 3B970C E00BAB3C 000318C3 */ sra $v1, $v1, 3
/* 3B9710 E00BAB40 306301FF */ andi $v1, $v1, 0x1FF
/* 3B9714 E00BAB44 00031A40 */ sll $v1, $v1, 9
/* 3B9718 E00BAB48 3C02F510 */ lui $v0, (0xF5100000 >> 16)
/* 3B971C E00BAB4C 00621825 */ or $v1, $v1, $v0
/* 3B9720 E00BAB50 00042080 */ sll $a0, $a0, 2
/* 3B9724 E00BAB54 30840FFF */ andi $a0, $a0, 0xFFF
/* 3B9728 E00BAB58 8E050000 */ lw $a1, 0x0($s0)
/* 3B972C E00BAB5C 00042300 */ sll $a0, $a0, 12
/* 3B9730 E00BAB60 00A0382D */ daddu $a3, $a1, $zero
/* 3B9734 E00BAB64 24A50008 */ addiu $a1, $a1, 0x8
/* 3B9738 E00BAB68 24A20008 */ addiu $v0, $a1, 0x8
/* 3B973C E00BAB6C AE050000 */ sw $a1, 0x0($s0)
/* 3B9740 E00BAB70 ACE30000 */ sw $v1, 0x0($a3)
/* 3B9744 E00BAB74 ACE80004 */ sw $t0, 0x4($a3)
/* 3B9748 E00BAB78 AE020000 */ sw $v0, 0x0($s0)
/* 3B974C E00BAB7C 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* 3B9750 E00BAB80 ACA20000 */ sw $v0, 0x0($a1)
/* 3B9754 E00BAB84 24A20010 */ addiu $v0, $a1, 0x10
/* 3B9758 E00BAB88 ACA00004 */ sw $zero, 0x4($a1)
/* 3B975C E00BAB8C AE020000 */ sw $v0, 0x0($s0)
/* 3B9760 E00BAB90 24C20010 */ addiu $v0, $a2, 0x10
/* 3B9764 E00BAB94 00021080 */ sll $v0, $v0, 2
/* 3B9768 E00BAB98 30420FFF */ andi $v0, $v0, 0xFFF
/* 3B976C E00BAB9C 00021300 */ sll $v0, $v0, 12
/* 3B9770 E00BABA0 8FB600A0 */ lw $s6, 0xA0($sp)
/* 3B9774 E00BABA4 005E1025 */ or $v0, $v0, $fp
/* 3B9778 E00BABA8 ACA2000C */ sw $v0, 0xC($a1)
/* 3B977C E00BABAC 24A20018 */ addiu $v0, $a1, 0x18
/* 3B9780 E00BABB0 24C6001F */ addiu $a2, $a2, 0x1F
/* 3B9784 E00BABB4 00063080 */ sll $a2, $a2, 2
/* 3B9788 E00BABB8 30C60FFF */ andi $a2, $a2, 0xFFF
/* 3B978C E00BABBC 00063300 */ sll $a2, $a2, 12
/* 3B9790 E00BABC0 00D73025 */ or $a2, $a2, $s7
/* 3B9794 E00BABC4 00962025 */ or $a0, $a0, $s6
/* 3B9798 E00BABC8 3C16E700 */ lui $s6, (0xE7000000 >> 16)
/* 3B979C E00BABCC ACA40008 */ sw $a0, 0x8($a1)
/* 3B97A0 E00BABD0 AE020000 */ sw $v0, 0x0($s0)
/* 3B97A4 E00BABD4 24A20020 */ addiu $v0, $a1, 0x20
/* 3B97A8 E00BABD8 ACB60010 */ sw $s6, 0x10($a1)
/* 3B97AC E00BABDC ACA00014 */ sw $zero, 0x14($a1)
/* 3B97B0 E00BABE0 AE020000 */ sw $v0, 0x0($s0)
/* 3B97B4 E00BABE4 24A20028 */ addiu $v0, $a1, 0x28
/* 3B97B8 E00BABE8 ACA30018 */ sw $v1, 0x18($a1)
/* 3B97BC E00BABEC ACA9001C */ sw $t1, 0x1C($a1)
/* 3B97C0 E00BABF0 AE020000 */ sw $v0, 0x0($s0)
/* 3B97C4 E00BABF4 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* 3B97C8 E00BABF8 ACA20020 */ sw $v0, 0x20($a1)
/* 3B97CC E00BABFC 11400003 */ beqz $t2, .LE00BAC0C
/* 3B97D0 E00BAC00 ACA60024 */ sw $a2, 0x24($a1)
/* 3B97D4 E00BAC04 16400005 */ bnez $s2, .LE00BAC1C
/* 3B97D8 E00BAC08 240C000C */ addiu $t4, $zero, 0xC
.LE00BAC0C:
/* 3B97DC E00BAC0C 15400003 */ bnez $t2, .LE00BAC1C
/* 3B97E0 E00BAC10 240C0004 */ addiu $t4, $zero, 0x4
/* 3B97E4 E00BAC14 8FB600A8 */ lw $s6, 0xA8($sp)
/* 3B97E8 E00BAC18 32CC0008 */ andi $t4, $s6, 0x8
.LE00BAC1C:
/* 3B97EC E00BAC1C 000D2840 */ sll $a1, $t5, 1
/* 3B97F0 E00BAC20 00AD2821 */ addu $a1, $a1, $t5
/* 3B97F4 E00BAC24 00052880 */ sll $a1, $a1, 2
/* 3B97F8 E00BAC28 00AD2821 */ addu $a1, $a1, $t5
/* 3B97FC E00BAC2C 25A20001 */ addiu $v0, $t5, 0x1
/* 3B9800 E00BAC30 0040682D */ daddu $t5, $v0, $zero
/* 3B9804 E00BAC34 000C5040 */ sll $t2, $t4, 1
/* 3B9808 E00BAC38 01551025 */ or $v0, $t2, $s5
/* 3B980C E00BAC3C 01EB4821 */ addu $t1, $t7, $t3
/* 3B9810 E00BAC40 00094C80 */ sll $t1, $t1, 18
/* 3B9814 E00BAC44 258B0001 */ addiu $t3, $t4, 0x1
/* 3B9818 E00BAC48 000B5840 */ sll $t3, $t3, 1
/* 3B981C E00BAC4C 25880002 */ addiu $t0, $t4, 0x2
/* 3B9820 E00BAC50 00084040 */ sll $t0, $t0, 1
/* 3B9824 E00BAC54 01F13821 */ addu $a3, $t7, $s1
/* 3B9828 E00BAC58 24E70010 */ addiu $a3, $a3, 0x10
/* 3B982C E00BAC5C 00073C80 */ sll $a3, $a3, 18
/* 3B9830 E00BAC60 8E060000 */ lw $a2, 0x0($s0)
/* 3B9834 E00BAC64 000A5400 */ sll $t2, $t2, 16
/* 3B9838 E00BAC68 00C0202D */ daddu $a0, $a2, $zero
/* 3B983C E00BAC6C 24C60008 */ addiu $a2, $a2, 0x8
/* 3B9840 E00BAC70 AE060000 */ sw $a2, 0x0($s0)
/* 3B9844 E00BAC74 AC820000 */ sw $v0, 0x0($a0)
/* 3B9848 E00BAC78 01C51021 */ addu $v0, $t6, $a1
/* 3B984C E00BAC7C 02821021 */ addu $v0, $s4, $v0
/* 3B9850 E00BAC80 80430023 */ lb $v1, 0x23($v0)
/* 3B9854 E00BAC84 24C20008 */ addiu $v0, $a2, 0x8
/* 3B9858 E00BAC88 AE020000 */ sw $v0, 0x0($s0)
/* 3B985C E00BAC8C 01751025 */ or $v0, $t3, $s5
/* 3B9860 E00BAC90 24A50001 */ addiu $a1, $a1, 0x1
/* 3B9864 E00BAC94 01C52821 */ addu $a1, $t6, $a1
/* 3B9868 E00BAC98 02852821 */ addu $a1, $s4, $a1
/* 3B986C E00BAC9C 03031821 */ addu $v1, $t8, $v1
/* 3B9870 E00BACA0 01231825 */ or $v1, $t1, $v1
/* 3B9874 E00BACA4 AC830004 */ sw $v1, 0x4($a0)
/* 3B9878 E00BACA8 000D1840 */ sll $v1, $t5, 1
/* 3B987C E00BACAC 006D1821 */ addu $v1, $v1, $t5
/* 3B9880 E00BACB0 00031880 */ sll $v1, $v1, 2
/* 3B9884 E00BACB4 006D1821 */ addu $v1, $v1, $t5
/* 3B9888 E00BACB8 ACC20000 */ sw $v0, 0x0($a2)
/* 3B988C E00BACBC 01C31021 */ addu $v0, $t6, $v1
/* 3B9890 E00BACC0 02821021 */ addu $v0, $s4, $v0
/* 3B9894 E00BACC4 80440023 */ lb $a0, 0x23($v0)
/* 3B9898 E00BACC8 24C20010 */ addiu $v0, $a2, 0x10
/* 3B989C E00BACCC AE020000 */ sw $v0, 0x0($s0)
/* 3B98A0 E00BACD0 01151025 */ or $v0, $t0, $s5
/* 3B98A4 E00BACD4 ACC20008 */ sw $v0, 0x8($a2)
/* 3B98A8 E00BACD8 24C20018 */ addiu $v0, $a2, 0x18
/* 3B98AC E00BACDC 24630001 */ addiu $v1, $v1, 0x1
/* 3B98B0 E00BACE0 01C31821 */ addu $v1, $t6, $v1
/* 3B98B4 E00BACE4 02831821 */ addu $v1, $s4, $v1
/* 3B98B8 E00BACE8 00084200 */ sll $t0, $t0, 8
/* 3B98BC E00BACEC 03042021 */ addu $a0, $t8, $a0
/* 3B98C0 E00BACF0 00E42025 */ or $a0, $a3, $a0
/* 3B98C4 E00BACF4 ACC40004 */ sw $a0, 0x4($a2)
/* 3B98C8 E00BACF8 80A40023 */ lb $a0, 0x23($a1)
/* 3B98CC E00BACFC 25850003 */ addiu $a1, $t4, 0x3
/* 3B98D0 E00BAD00 00052840 */ sll $a1, $a1, 1
/* 3B98D4 E00BAD04 AE020000 */ sw $v0, 0x0($s0)
/* 3B98D8 E00BAD08 00B51025 */ or $v0, $a1, $s5
/* 3B98DC E00BAD0C ACC20010 */ sw $v0, 0x10($a2)
/* 3B98E0 E00BAD10 24C20020 */ addiu $v0, $a2, 0x20
/* 3B98E4 E00BAD14 02642021 */ addu $a0, $s3, $a0
/* 3B98E8 E00BAD18 01244825 */ or $t1, $t1, $a0
/* 3B98EC E00BAD1C ACC9000C */ sw $t1, 0xC($a2)
/* 3B98F0 E00BAD20 80640023 */ lb $a0, 0x23($v1)
/* 3B98F4 E00BAD24 30A500FF */ andi $a1, $a1, 0xFF
/* 3B98F8 E00BAD28 AE020000 */ sw $v0, 0x0($s0)
/* 3B98FC E00BAD2C 00051200 */ sll $v0, $a1, 8
/* 3B9900 E00BAD30 01421025 */ or $v0, $t2, $v0
/* 3B9904 E00BAD34 004B1025 */ or $v0, $v0, $t3
/* 3B9908 E00BAD38 3C030600 */ lui $v1, (0x6000000 >> 16)
/* 3B990C E00BAD3C 00431025 */ or $v0, $v0, $v1
/* 3B9910 E00BAD40 01485025 */ or $t2, $t2, $t0
/* 3B9914 E00BAD44 01455025 */ or $t2, $t2, $a1
/* 3B9918 E00BAD48 ACC20018 */ sw $v0, 0x18($a2)
/* 3B991C E00BAD4C 24C20028 */ addiu $v0, $a2, 0x28
/* 3B9920 E00BAD50 3C16E700 */ lui $s6, (0xE7000000 >> 16)
/* 3B9924 E00BAD54 ACCA001C */ sw $t2, 0x1C($a2)
/* 3B9928 E00BAD58 AE020000 */ sw $v0, 0x0($s0)
/* 3B992C E00BAD5C 29A20012 */ slti $v0, $t5, 0x12
/* 3B9930 E00BAD60 ACD60020 */ sw $s6, 0x20($a2)
/* 3B9934 E00BAD64 ACC00024 */ sw $zero, 0x24($a2)
/* 3B9938 E00BAD68 02642021 */ addu $a0, $s3, $a0
/* 3B993C E00BAD6C 00E43825 */ or $a3, $a3, $a0
/* 3B9940 E00BAD70 1440FF5A */ bnez $v0, .LE00BAADC
/* 3B9944 E00BAD74 ACC70014 */ sw $a3, 0x14($a2)
/* 3B9948 E00BAD78 25CE0001 */ addiu $t6, $t6, 0x1
/* 3B994C E00BAD7C 29C2000C */ slti $v0, $t6, 0xC
/* 3B9950 E00BAD80 1440FF39 */ bnez $v0, .LE00BAA68
/* 3B9954 E00BAD84 27390010 */ addiu $t9, $t9, 0x10
/* 3B9958 E00BAD88 3C06FF10 */ lui $a2, (0xFF10013F >> 16)
/* 3B995C E00BAD8C 34C6013F */ ori $a2, $a2, (0xFF10013F & 0xFFFF)
/* 3B9960 E00BAD90 3C07DA38 */ lui $a3, (0xDA380007 >> 16)
/* 3B9964 E00BAD94 3C05800A */ lui $a1, %hi(gMainGfxPos)
/* 3B9968 E00BAD98 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos)
/* 3B996C E00BAD9C 8CA30000 */ lw $v1, 0x0($a1)
/* 3B9970 E00BADA0 3C04800A */ lui $a0, %hi(nuGfxZBuffer)
/* 3B9974 E00BADA4 8C84A5DC */ lw $a0, %lo(nuGfxZBuffer)($a0)
/* 3B9978 E00BADA8 0060102D */ daddu $v0, $v1, $zero
/* 3B997C E00BADAC 24630008 */ addiu $v1, $v1, 0x8
/* 3B9980 E00BADB0 ACA30000 */ sw $v1, 0x0($a1)
/* 3B9984 E00BADB4 AC460000 */ sw $a2, 0x0($v0)
/* 3B9988 E00BADB8 AC440004 */ sw $a0, 0x4($v0)
/* 3B998C E00BADBC 24620008 */ addiu $v0, $v1, 0x8
/* 3B9990 E00BADC0 ACA20000 */ sw $v0, 0x0($a1)
/* 3B9994 E00BADC4 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr)
/* 3B9998 E00BADC8 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0)
/* 3B999C E00BADCC 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* 3B99A0 E00BADD0 AC620000 */ sw $v0, 0x0($v1)
/* 3B99A4 E00BADD4 3C020900 */ lui $v0, %hi(D_09000570_4155D0)
/* 3B99A8 E00BADD8 24420570 */ addiu $v0, $v0, %lo(D_09000570_4155D0)
/* 3B99AC E00BADDC AC620004 */ sw $v0, 0x4($v1)
/* 3B99B0 E00BADE0 24620010 */ addiu $v0, $v1, 0x10
/* 3B99B4 E00BADE4 ACA20000 */ sw $v0, 0x0($a1)
/* 3B99B8 E00BADE8 24620018 */ addiu $v0, $v1, 0x18
/* 3B99BC E00BADEC AC660008 */ sw $a2, 0x8($v1)
/* 3B99C0 E00BADF0 02C0302D */ daddu $a2, $s6, $zero
/* 3B99C4 E00BADF4 AC64000C */ sw $a0, 0xC($v1)
/* 3B99C8 E00BADF8 ACA20000 */ sw $v0, 0x0($a1)
/* 3B99CC E00BADFC 3C048007 */ lui $a0, %hi(gCurrentCameraID)
/* 3B99D0 E00BAE00 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0)
/* 3B99D4 E00BAE04 24620020 */ addiu $v0, $v1, 0x20
/* 3B99D8 E00BAE08 AC660010 */ sw $a2, 0x10($v1)
/* 3B99DC E00BAE0C AC600014 */ sw $zero, 0x14($v1)
/* 3B99E0 E00BAE10 ACA20000 */ sw $v0, 0x0($a1)
/* 3B99E4 E00BAE14 3C02800A */ lui $v0, %hi(gDisplayContext)
/* 3B99E8 E00BAE18 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0)
/* 3B99EC E00BAE1C 34E70007 */ ori $a3, $a3, (0xDA380007 & 0xFFFF)
/* 3B99F0 E00BAE20 AC670018 */ sw $a3, 0x18($v1)
/* 3B99F4 E00BAE24 00042180 */ sll $a0, $a0, 6
/* 3B99F8 E00BAE28 24840030 */ addiu $a0, $a0, 0x30
/* 3B99FC E00BAE2C 00441021 */ addu $v0, $v0, $a0
/* 3B9A00 E00BAE30 AC62001C */ sw $v0, 0x1C($v1)
/* 3B9A04 E00BAE34 24620028 */ addiu $v0, $v1, 0x28
/* 3B9A08 E00BAE38 ACA20000 */ sw $v0, 0x0($a1)
/* 3B9A0C E00BAE3C AC660020 */ sw $a2, 0x20($v1)
/* 3B9A10 E00BAE40 AC600024 */ sw $zero, 0x24($v1)
/* 3B9A14 E00BAE44 8FBF00D4 */ lw $ra, 0xD4($sp)
/* 3B9A18 E00BAE48 8FBE00D0 */ lw $fp, 0xD0($sp)
/* 3B9A1C E00BAE4C 8FB700CC */ lw $s7, 0xCC($sp)
/* 3B9A20 E00BAE50 8FB600C8 */ lw $s6, 0xC8($sp)
/* 3B9A24 E00BAE54 8FB500C4 */ lw $s5, 0xC4($sp)
/* 3B9A28 E00BAE58 8FB400C0 */ lw $s4, 0xC0($sp)
/* 3B9A2C E00BAE5C 8FB300BC */ lw $s3, 0xBC($sp)
/* 3B9A30 E00BAE60 8FB200B8 */ lw $s2, 0xB8($sp)
/* 3B9A34 E00BAE64 8FB100B4 */ lw $s1, 0xB4($sp)
/* 3B9A38 E00BAE68 8FB000B0 */ lw $s0, 0xB0($sp)
/* 3B9A3C E00BAE6C 03E00008 */ jr $ra
/* 3B9A40 E00BAE70 27BD00D8 */ addiu $sp, $sp, 0xD8
/* 3B9A44 E00BAE74 00000000 */ nop
/* 3B9A48 E00BAE78 00000000 */ nop
/* 3B9A4C E00BAE7C 00000000 */ nop
### DECOMPILED C INSTRUCTIONS:
void underwater_appendGfx(void* effect) {
UnderwaterFXData* data = ((EffectInstance*)effect)->data.underwater;
s32 alpha = data->waterColor.a;
s32 x, y;
s32 dxRight, dxLeft, dyTop, dyBottom;
s32 edgeX, edgeY;
s32 vtxIdx;
Matrix4f mtx;
Matrix4f unused_matrix;
s32 i, j;
gDPPipeSync(gMainGfxPos++);
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxZBuffer);
gSPDisplayList(gMainGfxPos++, D_09000528_3B9F98);
// copy image from framebuffer to zbuffer
for (i = 0; i < 40; i++) {
gDPLoadTextureTile(
gMainGfxPos++, nuGfxCfb_ptr + SCREEN_WIDTH * i * 6,
G_IM_FMT_RGBA, G_IM_SIZ_16b,
SCREEN_WIDTH, 6,
0, 0, SCREEN_WIDTH - 1, 5, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(
gMainGfxPos++,
0 * 4, (i * 6) * 4,
(SCREEN_WIDTH - 1) * 4, (i * 6 + 5) * 4,
G_TX_RENDERTILE, 0, 0, 0x1000, 0x0400);
gDPPipeSync(gMainGfxPos++);
}
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxCfb_ptr);
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->waterColor.r, data->waterColor.g, data->waterColor.b, alpha >> 1);
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
gDPSetCombineLERP(gMainGfxPos++, PRIMITIVE, 0, PRIMITIVE_ALPHA, TEXEL0, 0, 0, 0, SHADE, PRIMITIVE, 0, PRIMITIVE_ALPHA, TEXEL0, 0, 0, 0, SHADE);
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, OS_K0_TO_PHYSICAL(nuGfxZBuffer));
gDPSetRenderMode(gMainGfxPos++, CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | G_RM_PASS, CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1));
gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP);
gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP);
shim_guFrustumF(mtx, -80.0f, 80.0f, 60.0f, -60.0f, 160.0f, 640.0f, 1.0f);
shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH | G_LIGHTING);
gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH);
gSPVertex(gMainGfxPos++, D_09000428_3B9E98, 16, 0);
for (j = 0; j < 12; j++) {
y = j * 16 + 24;
edgeY = FALSE;
if (j == 0) {
dyTop = -4;
edgeY = TRUE;
} else {
dyTop = 0;
}
if (j == 11) {
dyBottom = 4;
edgeY = TRUE;
} else {
dyBottom = 0;
}
for (i = 0; i < 18; i++) {
x = i * 16 + 16;
edgeX = FALSE;
if (i == 0) {
dxLeft = -4;
edgeX = TRUE;
} else {
dxLeft = 0;
}
if (i == 17) {
dxRight = 4;
edgeX = TRUE;
} else {
dxRight = 0;
}
gDPSetTile(
gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
(((((x + dxRight + 16) - (x + dxLeft)) + 1) * 2) + 7) >> 3, 0x0000,
G_TX_LOADTILE, 0,
G_TX_NOMIRROR | G_TX_CLAMP, 6, G_TX_NOLOD,
G_TX_NOMIRROR | G_TX_CLAMP, 6, G_TX_NOLOD);
gDPLoadSync(gMainGfxPos++);
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE,
(x + dxLeft) * 4,
(y + dyTop) * 4,
(x + dxRight + 16) * 4,
(y + dyBottom + 16) * 4);
gDPPipeSync(gMainGfxPos++);
gDPSetTile(
gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
(((((x + dxRight + 16) - (x + dxLeft)) + 1) * 2) + 7) >> 3, 0x0000,
G_TX_RENDERTILE, 0,
G_TX_NOMIRROR | G_TX_CLAMP, 6, G_TX_NOLOD,
G_TX_NOMIRROR | G_TX_CLAMP, 6, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE,
0, 0, (x + dxRight + 31) * 4, (y + dyBottom + 31) * 4);
if (edgeX && edgeY) {
vtxIdx = 12;
} else {
vtxIdx = 4;
if (!edgeX) {
if (!edgeY) {
vtxIdx = 0;
} else {
vtxIdx = 8;
}
}
}
gSPModifyVertex(gMainGfxPos++, vtxIdx , G_MWO_POINT_XYSCREEN, ((x + dxLeft ) << 0x12) | ((y + dyTop ) * 4 + data->unk_23[i ][j ]));
gSPModifyVertex(gMainGfxPos++, vtxIdx + 1, G_MWO_POINT_XYSCREEN, ((x + dxRight + 0x10) << 0x12) | ((y + dyTop ) * 4 + data->unk_23[i + 1][j ]));
gSPModifyVertex(gMainGfxPos++, vtxIdx + 2, G_MWO_POINT_XYSCREEN, ((x + dxLeft ) << 0x12) | ((y + dyBottom + 0x10) * 4 + data->unk_23[i ][j + 1]));
gSPModifyVertex(gMainGfxPos++, vtxIdx + 3, G_MWO_POINT_XYSCREEN, ((x + dxRight + 0x10) << 0x12) | ((y + dyBottom + 0x10) * 4 + data->unk_23[i + 1][j + 1]));
gSP2Triangles(gMainGfxPos++, vtxIdx, vtxIdx + 3, vtxIdx + 1, 0, vtxIdx, vtxIdx + 2, vtxIdx + 3, 0);
gDPPipeSync(gMainGfxPos++);
}
}
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxZBuffer);
gSPDisplayList(gMainGfxPos++, D_09000570_3B9FE0);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxCfb_ptr);
gDPPipeSync(gMainGfxPos++);
gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gDPPipeSync(gMainGfxPos++);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_80248BF4
/* 169454 80248BF4 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 169458 80248BF8 AFB00010 */ sw $s0, 0x10($sp)
.L80248BFC:
/* 16945C 80248BFC 0080802D */ daddu $s0, $a0, $zero
D_80248C00:
/* 169460 80248C00 3C038025 */ lui $v1, %hi(D_8024C08C)
D_80248C04:
/* 169464 80248C04 8C63C08C */ lw $v1, %lo(D_8024C08C)($v1)
/* 169468 80248C08 3C020004 */ lui $v0, (0x40000 >> 16)
glabel .L80248C0C
/* 16946C 80248C0C AFBF0018 */ sw $ra, 0x18($sp)
/* 169470 80248C10 AFB10014 */ sw $s1, 0x14($sp)
/* 169474 80248C14 92050003 */ lbu $a1, 0x3($s0)
/* 169478 80248C18 00621024 */ and $v0, $v1, $v0
/* 16947C 80248C1C 1040000A */ beqz $v0, .L80248C48
/* 169480 80248C20 3C020008 */ lui $v0, (0x80000 >> 16)
/* 169484 80248C24 92020001 */ lbu $v0, 0x1($s0)
D_80248C28:
/* 169488 80248C28 2442FFFF */ addiu $v0, $v0, -0x1
D_80248C2C:
/* 16948C 80248C2C A2020001 */ sb $v0, 0x1($s0)
D_80248C30:
/* 169490 80248C30 00021600 */ sll $v0, $v0, 24
D_80248C34:
/* 169494 80248C34 04410026 */ bgez $v0, D_80248CD0
/* 169498 80248C38 00000000 */ nop
/* 16949C 80248C3C 92020005 */ lbu $v0, 0x5($s0)
/* 1694A0 80248C40 08092333 */ j .L80248CCC
/* 1694A4 80248C44 2442FFFF */ addiu $v0, $v0, -0x1
.L80248C48:
/* 1694A8 80248C48 00621024 */ and $v0, $v1, $v0
.L80248C4C:
/* 1694AC 80248C4C 10400020 */ beqz $v0, D_80248CD0
/* 1694B0 80248C50 00000000 */ nop
/* 1694B4 80248C54 92020001 */ lbu $v0, 0x1($s0)
D_80248C58:
/* 1694B8 80248C58 82030005 */ lb $v1, 0x5($s0)
/* 1694BC 80248C5C 24420001 */ addiu $v0, $v0, 0x1
/* 1694C0 80248C60 A2020001 */ sb $v0, 0x1($s0)
/* 1694C4 80248C64 00021600 */ sll $v0, $v0, 24
/* 1694C8 80248C68 00021603 */ sra $v0, $v0, 24
D_80248C6C:
/* 1694CC 80248C6C 0043102A */ slt $v0, $v0, $v1
D_80248C70:
/* 1694D0 80248C70 50400001 */ beql $v0, $zero, .L80248C78
/* 1694D4 80248C74 A2000001 */ sb $zero, 0x1($s0)
.L80248C78:
/* 1694D8 80248C78 82020006 */ lb $v0, 0x6($s0)
/* 1694DC 80248C7C 82030002 */ lb $v1, 0x2($s0)
/* 1694E0 80248C80 2442FFFF */ addiu $v0, $v0, -0x1
D_80248C84:
/* 1694E4 80248C84 14620012 */ bne $v1, $v0, D_80248CD0
/* 1694E8 80248C88 00000000 */ nop
/* 1694EC 80248C8C 82020001 */ lb $v0, 0x1($s0)
glabel .L80248C90
/* 1694F0 80248C90 92030001 */ lbu $v1, 0x1($s0)
D_80248C94:
/* 1694F4 80248C94 2842000B */ slti $v0, $v0, 0xB
/* 1694F8 80248C98 14400003 */ bnez $v0, .L80248CA8
/* 1694FC 80248C9C 2462FFF8 */ addiu $v0, $v1, -0x8
/* 169500 80248CA0 08092334 */ j D_80248CD0
/* 169504 80248CA4 A2000001 */ sb $zero, 0x1($s0)
.L80248CA8:
/* 169508 80248CA8 304200FF */ andi $v0, $v0, 0xFF
glabel .L80248CAC
/* 16950C 80248CAC 2C420002 */ sltiu $v0, $v0, 0x2
D_80248CB0:
/* 169510 80248CB0 14400006 */ bnez $v0, .L80248CCC
/* 169514 80248CB4 2402000A */ addiu $v0, $zero, 0xA
.L80248CB8:
/* 169518 80248CB8 2462FFFB */ addiu $v0, $v1, -0x5
/* 16951C 80248CBC 304200FF */ andi $v0, $v0, 0xFF
.L80248CC0:
/* 169520 80248CC0 2C420002 */ sltiu $v0, $v0, 0x2
/* 169524 80248CC4 10400002 */ beqz $v0, D_80248CD0
D_80248CC8:
/* 169528 80248CC8 24020007 */ addiu $v0, $zero, 0x7
.L80248CCC:
/* 16952C 80248CCC A2020001 */ sb $v0, 0x1($s0)
D_80248CD0:
/* 169530 80248CD0 3C038025 */ lui $v1, %hi(D_8024C08C)
D_80248CD4:
/* 169534 80248CD4 8C63C08C */ lw $v1, %lo(D_8024C08C)($v1)
/* 169538 80248CD8 3C020001 */ lui $v0, (0x10000 >> 16)
D_80248CDC:
/* 16953C 80248CDC 00621024 */ and $v0, $v1, $v0
/* 169540 80248CE0 1040000B */ beqz $v0, .L80248D10
/* 169544 80248CE4 3C020002 */ lui $v0, (0x20000 >> 16)
/* 169548 80248CE8 92020002 */ lbu $v0, 0x2($s0)
.L80248CEC:
/* 16954C 80248CEC 2442FFFF */ addiu $v0, $v0, -0x1
D_80248CF0:
/* 169550 80248CF0 A2020002 */ sb $v0, 0x2($s0)
/* 169554 80248CF4 00021600 */ sll $v0, $v0, 24
/* 169558 80248CF8 04410011 */ bgez $v0, .L80248D40
/* 16955C 80248CFC 00000000 */ nop
/* 169560 80248D00 92020006 */ lbu $v0, 0x6($s0)
/* 169564 80248D04 2442FFFF */ addiu $v0, $v0, -0x1
D_80248D08:
/* 169568 80248D08 08092350 */ j .L80248D40
/* 16956C 80248D0C A2020002 */ sb $v0, 0x2($s0)
.L80248D10:
/* 169570 80248D10 00621024 */ and $v0, $v1, $v0
/* 169574 80248D14 1040000A */ beqz $v0, .L80248D40
D_80248D18:
/* 169578 80248D18 00000000 */ nop
/* 16957C 80248D1C 92020002 */ lbu $v0, 0x2($s0)
.L80248D20:
/* 169580 80248D20 82030006 */ lb $v1, 0x6($s0)
D_80248D24:
/* 169584 80248D24 24420001 */ addiu $v0, $v0, 0x1
D_80248D28:
/* 169588 80248D28 A2020002 */ sb $v0, 0x2($s0)
/* 16958C 80248D2C 00021600 */ sll $v0, $v0, 24
/* 169590 80248D30 00021603 */ sra $v0, $v0, 24
D_80248D34:
/* 169594 80248D34 0043102A */ slt $v0, $v0, $v1
/* 169598 80248D38 50400001 */ beql $v0, $zero, .L80248D40
D_80248D3C:
/* 16959C 80248D3C A2000002 */ sb $zero, 0x2($s0)
.L80248D40:
/* 1695A0 80248D40 82020006 */ lb $v0, 0x6($s0)
/* 1695A4 80248D44 82030002 */ lb $v1, 0x2($s0)
/* 1695A8 80248D48 2442FFFF */ addiu $v0, $v0, -0x1
D_80248D4C:
/* 1695AC 80248D4C 14620012 */ bne $v1, $v0, .L80248D98
/* 1695B0 80248D50 00000000 */ nop
D_80248D54:
/* 1695B4 80248D54 82020001 */ lb $v0, 0x1($s0)
/* 1695B8 80248D58 92030001 */ lbu $v1, 0x1($s0)
.L80248D5C:
/* 1695BC 80248D5C 2842000B */ slti $v0, $v0, 0xB
D_80248D60:
/* 1695C0 80248D60 14400003 */ bnez $v0, .L80248D70
/* 1695C4 80248D64 2462FFF8 */ addiu $v0, $v1, -0x8
/* 1695C8 80248D68 08092365 */ j .L80248D94
/* 1695CC 80248D6C 2402000A */ addiu $v0, $zero, 0xA
.L80248D70:
/* 1695D0 80248D70 304200FF */ andi $v0, $v0, 0xFF
/* 1695D4 80248D74 2C420002 */ sltiu $v0, $v0, 0x2
glabel func_80248D78
/* 1695D8 80248D78 14400006 */ bnez $v0, .L80248D94
/* 1695DC 80248D7C 24020007 */ addiu $v0, $zero, 0x7
/* 1695E0 80248D80 2462FFFB */ addiu $v0, $v1, -0x5
/* 1695E4 80248D84 304200FF */ andi $v0, $v0, 0xFF
/* 1695E8 80248D88 2C420002 */ sltiu $v0, $v0, 0x2
D_80248D8C:
/* 1695EC 80248D8C 10400002 */ beqz $v0, .L80248D98
D_80248D90:
/* 1695F0 80248D90 24020004 */ addiu $v0, $zero, 0x4
.L80248D94:
/* 1695F4 80248D94 A2020001 */ sb $v0, 0x1($s0)
.L80248D98:
/* 1695F8 80248D98 82020004 */ lb $v0, 0x4($s0)
/* 1695FC 80248D9C 82030005 */ lb $v1, 0x5($s0)
/* 169600 80248DA0 00430018 */ mult $v0, $v1
/* 169604 80248DA4 00003812 */ mflo $a3
/* 169608 80248DA8 82020006 */ lb $v0, 0x6($s0)
/* 16960C 80248DAC 00000000 */ nop
/* 169610 80248DB0 00E20018 */ mult $a3, $v0
/* 169614 80248DB4 00002012 */ mflo $a0
/* 169618 80248DB8 82020002 */ lb $v0, 0x2($s0)
.L80248DBC:
/* 16961C 80248DBC 00000000 */ nop
/* 169620 80248DC0 00620018 */ mult $v1, $v0
.L80248DC4:
/* 169624 80248DC4 00001012 */ mflo $v0
D_80248DC8:
/* 169628 80248DC8 00821821 */ addu $v1, $a0, $v0
/* 16962C 80248DCC 82040001 */ lb $a0, 0x1($s0)
glabel func_80248DD0
/* 169630 80248DD0 8E020008 */ lw $v0, 0x8($s0)
/* 169634 80248DD4 00641821 */ addu $v1, $v1, $a0
D_80248DD8:
/* 169638 80248DD8 00431021 */ addu $v0, $v0, $v1
/* 16963C 80248DDC 90420000 */ lbu $v0, 0x0($v0)
/* 169640 80248DE0 A2020003 */ sb $v0, 0x3($s0)
glabel func_80248DE4
/* 169644 80248DE4 304200FF */ andi $v0, $v0, 0xFF
/* 169648 80248DE8 10A20003 */ beq $a1, $v0, .L80248DF8
.L80248DEC:
/* 16964C 80248DEC 00000000 */ nop
/* 169650 80248DF0 0C05272D */ jal sfx_play_sound
/* 169654 80248DF4 24042102 */ addiu $a0, $zero, 0x2102
.L80248DF8:
/* 169658 80248DF8 3C028025 */ lui $v0, %hi(D_8024C084)
/* 16965C 80248DFC 8C42C084 */ lw $v0, %lo(D_8024C084)($v0)
.L80248E00:
/* 169660 80248E00 30428000 */ andi $v0, $v0, 0x8000
/* 169664 80248E04 1040009A */ beqz $v0, dgb_01_img2_png
/* 169668 80248E08 00000000 */ nop
/* 16966C 80248E0C 92020003 */ lbu $v0, 0x3($s0)
/* 169670 80248E10 2443FF3A */ addiu $v1, $v0, -0xC6
/* 169674 80248E14 2C620005 */ sltiu $v0, $v1, 0x5
.L80248E18:
/* 169678 80248E18 1040006D */ beqz $v0, .L80248FD0
/* 16967C 80248E1C 00031080 */ sll $v0, $v1, 2
/* 169680 80248E20 3C018025 */ lui $at, %hi(jtbl_8024C060)
/* 169684 80248E24 00220821 */ addu $at, $at, $v0
/* 169688 80248E28 8C22C060 */ lw $v0, %lo(jtbl_8024C060)($at)
/* 16968C 80248E2C 00400008 */ jr $v0
D_80248E30:
/* 169690 80248E30 00000000 */ nop
glabel .L80248E34
/* 169694 80248E34 0C05272D */ jal sfx_play_sound
/* 169698 80248E38 24042103 */ addiu $a0, $zero, 0x2103
/* 16969C 80248E3C 3C048025 */ lui $a0, %hi(D_8024C090)
.L80248E40:
/* 1696A0 80248E40 2484C090 */ addiu $a0, $a0, %lo(D_8024C090)
/* 1696A4 80248E44 80820000 */ lb $v0, 0x0($a0)
/* 1696A8 80248E48 24050008 */ addiu $a1, $zero, 0x8
/* 1696AC 80248E4C 14450002 */ bne $v0, $a1, .L80248E58
/* 1696B0 80248E50 24020007 */ addiu $v0, $zero, 0x7
.L80248E54:
/* 1696B4 80248E54 A0820000 */ sb $v0, 0x0($a0)
.L80248E58:
/* 1696B8 80248E58 80830000 */ lb $v1, 0x0($a0)
/* 1696BC 80248E5C 08092402 */ j .L80249008
/* 1696C0 80248E60 240200F7 */ addiu $v0, $zero, 0xF7
glabel .L80248E64
/* 1696C4 80248E64 82020004 */ lb $v0, 0x4($s0)
/* 1696C8 80248E68 24110001 */ addiu $s1, $zero, 0x1
/* 1696CC 80248E6C 10510071 */ beq $v0, $s1, .L80249034
/* 1696D0 80248E70 00000000 */ nop
/* 1696D4 80248E74 0C05272D */ jal sfx_play_sound
/* 1696D8 80248E78 24042105 */ addiu $a0, $zero, 0x2105
.L80248E7C:
/* 1696DC 80248E7C 82050001 */ lb $a1, 0x1($s0)
/* 1696E0 80248E80 82060002 */ lb $a2, 0x2($s0)
/* 1696E4 80248E84 0200202D */ daddu $a0, $s0, $zero
/* 1696E8 80248E88 080923AD */ j .L80248EB4
/* 1696EC 80248E8C A2110004 */ sb $s1, 0x4($s0)
glabel .L80248E90
/* 1696F0 80248E90 82020004 */ lb $v0, 0x4($s0)
/* 1696F4 80248E94 10400067 */ beqz $v0, .L80249034
/* 1696F8 80248E98 00000000 */ nop
/* 1696FC 80248E9C 0C05272D */ jal sfx_play_sound
/* 169700 80248EA0 24042105 */ addiu $a0, $zero, 0x2105
/* 169704 80248EA4 82050001 */ lb $a1, 0x1($s0)
/* 169708 80248EA8 82060002 */ lb $a2, 0x2($s0)
/* 16970C 80248EAC 0200202D */ daddu $a0, $s0, $zero
/* 169710 80248EB0 A2000004 */ sb $zero, 0x4($s0)
.L80248EB4:
/* 169714 80248EB4 0C090B65 */ jal func_80242D94
/* 169718 80248EB8 00000000 */ nop
D_80248EBC:
/* 16971C 80248EBC 3C058025 */ lui $a1, %hi(func_80248170)
/* 169720 80248EC0 24A58170 */ addiu $a1, $a1, %lo(func_80248170)
/* 169724 80248EC4 0C051F9F */ jal set_window_update
/* 169728 80248EC8 24040031 */ addiu $a0, $zero, 0x31
/* 16972C 80248ECC 0809240D */ j .L80249034
/* 169730 80248ED0 00000000 */ nop
glabel .L80248ED4
/* 169734 80248ED4 0000182D */ daddu $v1, $zero, $zero
/* 169738 80248ED8 3C058025 */ lui $a1, %hi(D_8024C110)
.L80248EDC:
/* 16973C 80248EDC 24A5C110 */ addiu $a1, $a1, %lo(D_8024C110)
/* 169740 80248EE0 240400F7 */ addiu $a0, $zero, 0xF7
/* 169744 80248EE4 00651021 */ addu $v0, $v1, $a1
.L80248EE8:
/* 169748 80248EE8 90420000 */ lbu $v0, 0x0($v0)
/* 16974C 80248EEC 14440006 */ bne $v0, $a0, .L80248F08
/* 169750 80248EF0 24020008 */ addiu $v0, $zero, 0x8
/* 169754 80248EF4 24630001 */ addiu $v1, $v1, 0x1
/* 169758 80248EF8 28620008 */ slti $v0, $v1, 0x8
/* 16975C 80248EFC 1440FFFA */ bnez $v0, .L80248EE8
/* 169760 80248F00 00651021 */ addu $v0, $v1, $a1
/* 169764 80248F04 24020008 */ addiu $v0, $zero, 0x8
.L80248F08:
/* 169768 80248F08 14620005 */ bne $v1, $v0, D_80248F20
/* 16976C 80248F0C 00000000 */ nop
/* 169770 80248F10 0C05272D */ jal sfx_play_sound
/* 169774 80248F14 2404021D */ addiu $a0, $zero, 0x21D
D_80248F18:
/* 169778 80248F18 0809240D */ j .L80249034
/* 16977C 80248F1C 00000000 */ nop
D_80248F20:
/* 169780 80248F20 0C05272D */ jal sfx_play_sound
/* 169784 80248F24 240400C9 */ addiu $a0, $zero, 0xC9
D_80248F28:
/* 169788 80248F28 3C058024 */ lui $a1, %hi(func_80243CCC)
/* 16978C 80248F2C 24A53CCC */ addiu $a1, $a1, %lo(func_80243CCC)
/* 169790 80248F30 0C051F9F */ jal set_window_update
/* 169794 80248F34 24040032 */ addiu $a0, $zero, 0x32
/* 169798 80248F38 3C048016 */ lui $a0, %hi(gWindows)
/* 16979C 80248F3C 24849D50 */ addiu $a0, $a0, %lo(gWindows)
/* 1697A0 80248F40 24020079 */ addiu $v0, $zero, 0x79
/* 1697A4 80248F44 A482064E */ sh $v0, 0x64E($a0)
D_80248F48:
/* 1697A8 80248F48 24020045 */ addiu $v0, $zero, 0x45
/* 1697AC 80248F4C A4820650 */ sh $v0, 0x650($a0)
/* 1697B0 80248F50 2402002C */ addiu $v0, $zero, 0x2C
.L80248F54:
/* 1697B4 80248F54 80830643 */ lb $v1, 0x643($a0)
/* 1697B8 80248F58 A4820652 */ sh $v0, 0x652($a0)
/* 1697BC 80248F5C 2402FFFF */ addiu $v0, $zero, -0x1
D_80248F60:
/* 1697C0 80248F60 1062000B */ beq $v1, $v0, D_80248F90
/* 1697C4 80248F64 2485064C */ addiu $a1, $a0, 0x64C
/* 1697C8 80248F68 00031140 */ sll $v0, $v1, 5
/* 1697CC 80248F6C 00441021 */ addu $v0, $v0, $a0
D_80248F70:
/* 1697D0 80248F70 94420010 */ lhu $v0, 0x10($v0)
/* 1697D4 80248F74 00021400 */ sll $v0, $v0, 16
/* 1697D8 80248F78 00021C03 */ sra $v1, $v0, 16
.L80248F7C:
/* 1697DC 80248F7C 000217C2 */ srl $v0, $v0, 31
.L80248F80:
/* 1697E0 80248F80 00621821 */ addu $v1, $v1, $v0
.L80248F84:
/* 1697E4 80248F84 00031843 */ sra $v1, $v1, 1
/* 1697E8 80248F88 080923E7 */ j .L80248F9C
/* 1697EC 80248F8C 2463FFDE */ addiu $v1, $v1, -0x22
D_80248F90:
/* 1697F0 80248F90 2403007E */ addiu $v1, $zero, 0x7E
/* 1697F4 80248F94 3C048016 */ lui $a0, %hi(gWindows)
/* 1697F8 80248F98 24849D50 */ addiu $a0, $a0, %lo(gWindows)
.L80248F9C:
/* 1697FC 80248F9C 2402FFBA */ addiu $v0, $zero, -0x46
/* 169800 80248FA0 A4A30000 */ sh $v1, 0x0($a1)
/* 169804 80248FA4 A48205CE */ sh $v0, 0x5CE($a0)
/* 169808 80248FA8 240200A4 */ addiu $v0, $zero, 0xA4
/* 16980C 80248FAC A48205D0 */ sh $v0, 0x5D0($a0)
/* 169810 80248FB0 2402003E */ addiu $v0, $zero, 0x3E
/* 169814 80248FB4 808305C3 */ lb $v1, 0x5C3($a0)
/* 169818 80248FB8 A48205D2 */ sh $v0, 0x5D2($a0)
/* 16981C 80248FBC 2402FFFF */ addiu $v0, $zero, -0x1
glabel func_80248FC0
/* 169820 80248FC0 146200BD */ bne $v1, $v0, .L802492B8
/* 169824 80248FC4 248705CC */ addiu $a3, $a0, 0x5CC
/* 169828 80248FC8 080924B9 */ j .L802492E4
.L80248FCC:
/* 16982C 80248FCC 2403004E */ addiu $v1, $zero, 0x4E
.L80248FD0:
/* 169830 80248FD0 0C05272D */ jal sfx_play_sound
/* 169834 80248FD4 24042103 */ addiu $a0, $zero, 0x2103
/* 169838 80248FD8 3C048025 */ lui $a0, %hi(D_8024C090)
/* 16983C 80248FDC 2484C090 */ addiu $a0, $a0, %lo(D_8024C090)
/* 169840 80248FE0 80830000 */ lb $v1, 0x0($a0)
/* 169844 80248FE4 24050008 */ addiu $a1, $zero, 0x8
/* 169848 80248FE8 14650006 */ bne $v1, $a1, .L80249004
/* 16984C 80248FEC 00000000 */ nop
dgb_01_img1_gfx:
/* 169850 80248FF0 92020003 */ lbu $v0, 0x3($s0)
/* 169854 80248FF4 3C018025 */ lui $at, %hi(D_8024C117)
/* 169858 80248FF8 A022C117 */ sb $v0, %lo(D_8024C117)($at)
/* 16985C 80248FFC 0809240D */ j .L80249034
/* 169860 80249000 00000000 */ nop
.L80249004:
/* 169864 80249004 92020003 */ lbu $v0, 0x3($s0)
.L80249008:
/* 169868 80249008 3C018025 */ lui $at, %hi(D_8024C110)
/* 16986C 8024900C 00230821 */ addu $at, $at, $v1
/* 169870 80249010 A022C110 */ sb $v0, %lo(D_8024C110)($at)
/* 169874 80249014 90820000 */ lbu $v0, 0x0($a0)
/* 169878 80249018 24420001 */ addiu $v0, $v0, 0x1
.L8024901C:
/* 16987C 8024901C A0820000 */ sb $v0, 0x0($a0)
/* 169880 80249020 00021600 */ sll $v0, $v0, 24
/* 169884 80249024 00021603 */ sra $v0, $v0, 24
/* 169888 80249028 28420009 */ slti $v0, $v0, 0x9
.L8024902C:
/* 16988C 8024902C 50400001 */ beql $v0, $zero, .L80249034
/* 169890 80249030 A0850000 */ sb $a1, 0x0($a0)
glabel .L80249034
/* 169894 80249034 92020003 */ lbu $v0, 0x3($s0)
/* 169898 80249038 24420039 */ addiu $v0, $v0, 0x39
D_8024903C:
/* 16989C 8024903C 304200FF */ andi $v0, $v0, 0xFF
/* 1698A0 80249040 2C420003 */ sltiu $v0, $v0, 0x3
/* 1698A4 80249044 1440000A */ bnez $v0, dgb_01_img2_png
/* 1698A8 80249048 24020008 */ addiu $v0, $zero, 0x8
/* 1698AC 8024904C 3C038025 */ lui $v1, %hi(D_8024C090)
/* 1698B0 80249050 8063C090 */ lb $v1, %lo(D_8024C090)($v1)
/* 1698B4 80249054 14620006 */ bne $v1, $v0, dgb_01_img2_png
/* 1698B8 80249058 0200202D */ daddu $a0, $s0, $zero
/* 1698BC 8024905C 82050005 */ lb $a1, 0x5($s0)
/* 1698C0 80249060 82060006 */ lb $a2, 0x6($s0)
.L80249064:
/* 1698C4 80249064 24A5FFFD */ addiu $a1, $a1, -0x3
/* 1698C8 80249068 0C090B65 */ jal func_80242D94
D_8024906C:
/* 1698CC 8024906C 24C6FFFF */ addiu $a2, $a2, -0x1
dgb_01_img2_png:
/* 1698D0 80249070 3C038025 */ lui $v1, %hi(D_8024C084)
/* 1698D4 80249074 8C63C084 */ lw $v1, %lo(D_8024C084)($v1)
/* 1698D8 80249078 30624000 */ andi $v0, $v1, 0x4000
/* 1698DC 8024907C 14400006 */ bnez $v0, .L80249098
/* 1698E0 80249080 30628000 */ andi $v0, $v1, 0x8000
/* 1698E4 80249084 1040004B */ beqz $v0, .L802491B4
/* 1698E8 80249088 240200C9 */ addiu $v0, $zero, 0xC9
.L8024908C:
/* 1698EC 8024908C 92030003 */ lbu $v1, 0x3($s0)
/* 1698F0 80249090 14620048 */ bne $v1, $v0, .L802491B4
/* 1698F4 80249094 00000000 */ nop
.L80249098:
/* 1698F8 80249098 0C05272D */ jal sfx_play_sound
D_8024909C:
/* 1698FC 8024909C 24042104 */ addiu $a0, $zero, 0x2104
/* 169900 802490A0 3C038025 */ lui $v1, %hi(D_8024C090)
/* 169904 802490A4 2463C090 */ addiu $v1, $v1, %lo(D_8024C090)
glabel func_802490A8
/* 169908 802490A8 90620000 */ lbu $v0, 0x0($v1)
/* 16990C 802490AC 2442FFFF */ addiu $v0, $v0, -0x1
/* 169910 802490B0 A0620000 */ sb $v0, 0x0($v1)
/* 169914 802490B4 00021600 */ sll $v0, $v0, 24
/* 169918 802490B8 00021603 */ sra $v0, $v0, 24
/* 16991C 802490BC 04430031 */ bgezl $v0, .L80249184
/* 169920 802490C0 0040182D */ daddu $v1, $v0, $zero
/* 169924 802490C4 24040030 */ addiu $a0, $zero, 0x30
/* 169928 802490C8 3C108024 */ lui $s0, %hi(D_80243628)
/* 16992C 802490CC 26103628 */ addiu $s0, $s0, %lo(D_80243628)
/* 169930 802490D0 0200282D */ daddu $a1, $s0, $zero
/* 169934 802490D4 0C051F9F */ jal set_window_update
/* 169938 802490D8 A0600000 */ sb $zero, 0x0($v1)
/* 16993C 802490DC 24040031 */ addiu $a0, $zero, 0x31
/* 169940 802490E0 0C051F9F */ jal set_window_update
/* 169944 802490E4 0200282D */ daddu $a1, $s0, $zero
/* 169948 802490E8 2404002D */ addiu $a0, $zero, 0x2D
/* 16994C 802490EC 3C108024 */ lui $s0, %hi(func_8024381C)
/* 169950 802490F0 2610381C */ addiu $s0, $s0, %lo(func_8024381C)
/* 169954 802490F4 0C051F9F */ jal set_window_update
.L802490F8:
/* 169958 802490F8 0200282D */ daddu $a1, $s0, $zero
/* 16995C 802490FC 24040033 */ addiu $a0, $zero, 0x33
/* 169960 80249100 0C051F9F */ jal set_window_update
/* 169964 80249104 0200282D */ daddu $a1, $s0, $zero
/* 169968 80249108 24040034 */ addiu $a0, $zero, 0x34
.L8024910C:
/* 16996C 8024910C 0C051F9F */ jal set_window_update
.L80249110:
/* 169970 80249110 0200282D */ daddu $a1, $s0, $zero
/* 169974 80249114 24040035 */ addiu $a0, $zero, 0x35
/* 169978 80249118 0C051F9F */ jal set_window_update
/* 16997C 8024911C 0200282D */ daddu $a1, $s0, $zero
/* 169980 80249120 24040036 */ addiu $a0, $zero, 0x36
/* 169984 80249124 0C051F9F */ jal set_window_update
flo_00_pad_9128:
/* 169988 80249128 0200282D */ daddu $a1, $s0, $zero
/* 16998C 8024912C 24040037 */ addiu $a0, $zero, 0x37
D_80249130:
/* 169990 80249130 0C051F9F */ jal set_window_update
/* 169994 80249134 0200282D */ daddu $a1, $s0, $zero
.L80249138:
/* 169998 80249138 24040035 */ addiu $a0, $zero, 0x35
/* 16999C 8024913C 0C051F9F */ jal set_window_update
.L80249140:
/* 1699A0 80249140 0200282D */ daddu $a1, $s0, $zero
/* 1699A4 80249144 24040038 */ addiu $a0, $zero, 0x38
/* 1699A8 80249148 0C051F9F */ jal set_window_update
/* 1699AC 8024914C 0200282D */ daddu $a1, $s0, $zero
/* 1699B0 80249150 24040039 */ addiu $a0, $zero, 0x39
/* 1699B4 80249154 0C051F9F */ jal set_window_update
D_80249158:
/* 1699B8 80249158 0200282D */ daddu $a1, $s0, $zero
/* 1699BC 8024915C 2404003A */ addiu $a0, $zero, 0x3A
/* 1699C0 80249160 0C051F9F */ jal set_window_update
/* 1699C4 80249164 0200282D */ daddu $a1, $s0, $zero
D_80249168:
/* 1699C8 80249168 2404003B */ addiu $a0, $zero, 0x3B
/* 1699CC 8024916C 0C051F9F */ jal set_window_update
/* 1699D0 80249170 0200282D */ daddu $a1, $s0, $zero
/* 1699D4 80249174 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 1699D8 80249178 A020C098 */ sb $zero, %lo(D_8024C098_C09918)($at)
.L8024917C:
/* 1699DC 8024917C 080924C4 */ j .L80249310
/* 1699E0 80249180 00000000 */ nop
.L80249184:
/* 1699E4 80249184 28620008 */ slti $v0, $v1, 0x8
/* 1699E8 80249188 1040000A */ beqz $v0, .L802491B4
D_8024918C:
/* 1699EC 8024918C 00000000 */ nop
.L80249190:
/* 1699F0 80249190 3C058025 */ lui $a1, %hi(D_8024C110)
/* 1699F4 80249194 24A5C110 */ addiu $a1, $a1, %lo(D_8024C110)
/* 1699F8 80249198 240400F7 */ addiu $a0, $zero, 0xF7
D_8024919C:
/* 1699FC 8024919C 00651021 */ addu $v0, $v1, $a1
.L802491A0:
/* 169A00 802491A0 A0440000 */ sb $a0, 0x0($v0)
/* 169A04 802491A4 24630001 */ addiu $v1, $v1, 0x1
/* 169A08 802491A8 28620008 */ slti $v0, $v1, 0x8
/* 169A0C 802491AC 1440FFFC */ bnez $v0, .L802491A0
D_802491B0:
/* 169A10 802491B0 00651021 */ addu $v0, $v1, $a1
.L802491B4:
/* 169A14 802491B4 3C028025 */ lui $v0, %hi(D_8024C084)
D_802491B8:
/* 169A18 802491B8 8C42C084 */ lw $v0, %lo(D_8024C084)($v0)
/* 169A1C 802491BC 30421000 */ andi $v0, $v0, 0x1000
D_802491C0:
/* 169A20 802491C0 10400053 */ beqz $v0, .L80249310
/* 169A24 802491C4 0000182D */ daddu $v1, $zero, $zero
D_802491C8:
/* 169A28 802491C8 3C058025 */ lui $a1, %hi(D_8024C110)
.L802491CC:
/* 169A2C 802491CC 24A5C110 */ addiu $a1, $a1, %lo(D_8024C110)
D_802491D0:
/* 169A30 802491D0 240400F7 */ addiu $a0, $zero, 0xF7
/* 169A34 802491D4 00651021 */ addu $v0, $v1, $a1
D_802491D8:
/* 169A38 802491D8 90420000 */ lbu $v0, 0x0($v0)
/* 169A3C 802491DC 14440006 */ bne $v0, $a0, D_802491F8_EC2048
D_802491E0:
/* 169A40 802491E0 24020008 */ addiu $v0, $zero, 0x8
.L802491E4:
/* 169A44 802491E4 24630001 */ addiu $v1, $v1, 0x1
/* 169A48 802491E8 28620008 */ slti $v0, $v1, 0x8
/* 169A4C 802491EC 1440FFFA */ bnez $v0, D_802491D8
D_802491F0_EC2040:
/* 169A50 802491F0 00651021 */ addu $v0, $v1, $a1
/* 169A54 802491F4 24020008 */ addiu $v0, $zero, 0x8
D_802491F8_EC2048:
/* 169A58 802491F8 14620005 */ bne $v1, $v0, .L80249210
.L802491FC:
/* 169A5C 802491FC 00000000 */ nop
jtbl_80249200:
/* 169A60 80249200 0C05272D */ jal sfx_play_sound
/* 169A64 80249204 2404021D */ addiu $a0, $zero, 0x21D
/* 169A68 80249208 080924C4 */ j .L80249310
.L8024920C:
/* 169A6C 8024920C 00000000 */ nop
.L80249210:
/* 169A70 80249210 0C05272D */ jal sfx_play_sound
/* 169A74 80249214 240400C9 */ addiu $a0, $zero, 0xC9
/* 169A78 80249218 3C058024 */ lui $a1, %hi(func_80243CCC)
.L8024921C:
/* 169A7C 8024921C 24A53CCC */ addiu $a1, $a1, %lo(func_80243CCC)
/* 169A80 80249220 0C051F9F */ jal set_window_update
/* 169A84 80249224 24040032 */ addiu $a0, $zero, 0x32
/* 169A88 80249228 3C048016 */ lui $a0, %hi(gWindows)
/* 169A8C 8024922C 24849D50 */ addiu $a0, $a0, %lo(gWindows)
/* 169A90 80249230 24020079 */ addiu $v0, $zero, 0x79
.L80249234:
/* 169A94 80249234 A482064E */ sh $v0, 0x64E($a0)
/* 169A98 80249238 24020045 */ addiu $v0, $zero, 0x45
.L8024923C:
/* 169A9C 8024923C A4820650 */ sh $v0, 0x650($a0)
/* 169AA0 80249240 2402002C */ addiu $v0, $zero, 0x2C
/* 169AA4 80249244 80830643 */ lb $v1, 0x643($a0)
/* 169AA8 80249248 A4820652 */ sh $v0, 0x652($a0)
/* 169AAC 8024924C 2402FFFF */ addiu $v0, $zero, -0x1
/* 169AB0 80249250 1062000B */ beq $v1, $v0, .L80249280
/* 169AB4 80249254 2485064C */ addiu $a1, $a0, 0x64C
D_80249258:
/* 169AB8 80249258 00031140 */ sll $v0, $v1, 5
/* 169ABC 8024925C 00441021 */ addu $v0, $v0, $a0
/* 169AC0 80249260 94420010 */ lhu $v0, 0x10($v0)
/* 169AC4 80249264 00021400 */ sll $v0, $v0, 16
/* 169AC8 80249268 00021C03 */ sra $v1, $v0, 16
/* 169ACC 8024926C 000217C2 */ srl $v0, $v0, 31
/* 169AD0 80249270 00621821 */ addu $v1, $v1, $v0
.L80249274:
/* 169AD4 80249274 00031843 */ sra $v1, $v1, 1
/* 169AD8 80249278 080924A3 */ j .L8024928C
/* 169ADC 8024927C 2463FFDE */ addiu $v1, $v1, -0x22
.L80249280:
/* 169AE0 80249280 2403007E */ addiu $v1, $zero, 0x7E
.L80249284:
/* 169AE4 80249284 3C048016 */ lui $a0, %hi(gWindows)
/* 169AE8 80249288 24849D50 */ addiu $a0, $a0, %lo(gWindows)
.L8024928C:
/* 169AEC 8024928C 2402FFBA */ addiu $v0, $zero, -0x46
.L80249290:
/* 169AF0 80249290 A4A30000 */ sh $v1, 0x0($a1)
/* 169AF4 80249294 A48205CE */ sh $v0, 0x5CE($a0)
/* 169AF8 80249298 240200A4 */ addiu $v0, $zero, 0xA4
/* 169AFC 8024929C A48205D0 */ sh $v0, 0x5D0($a0)
/* 169B00 802492A0 2402003E */ addiu $v0, $zero, 0x3E
/* 169B04 802492A4 808305C3 */ lb $v1, 0x5C3($a0)
/* 169B08 802492A8 A48205D2 */ sh $v0, 0x5D2($a0)
.L802492AC:
/* 169B0C 802492AC 2402FFFF */ addiu $v0, $zero, -0x1
/* 169B10 802492B0 1062000B */ beq $v1, $v0, .L802492E0
.L802492B4:
/* 169B14 802492B4 248705CC */ addiu $a3, $a0, 0x5CC
.L802492B8:
/* 169B18 802492B8 00031140 */ sll $v0, $v1, 5
/* 169B1C 802492BC 00441021 */ addu $v0, $v0, $a0
/* 169B20 802492C0 94420010 */ lhu $v0, 0x10($v0)
/* 169B24 802492C4 00021400 */ sll $v0, $v0, 16
/* 169B28 802492C8 00021C03 */ sra $v1, $v0, 16
/* 169B2C 802492CC 000217C2 */ srl $v0, $v0, 31
/* 169B30 802492D0 00621821 */ addu $v1, $v1, $v0
/* 169B34 802492D4 00031843 */ sra $v1, $v1, 1
.L802492D8:
/* 169B38 802492D8 080924B9 */ j .L802492E4
/* 169B3C 802492DC 2463FFAE */ addiu $v1, $v1, -0x52
.L802492E0:
/* 169B40 802492E0 2403004E */ addiu $v1, $zero, 0x4E
.L802492E4:
/* 169B44 802492E4 0000282D */ daddu $a1, $zero, $zero
/* 169B48 802492E8 00A0302D */ daddu $a2, $a1, $zero
/* 169B4C 802492EC A4E30000 */ sh $v1, 0x0($a3)
/* 169B50 802492F0 3C048025 */ lui $a0, %hi(D_80249B88)
/* 169B54 802492F4 8C849B88 */ lw $a0, %lo(D_80249B88)($a0)
/* 169B58 802492F8 24020001 */ addiu $v0, $zero, 0x1
/* 169B5C 802492FC 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 169B60 80249300 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 169B64 80249304 24020002 */ addiu $v0, $zero, 0x2
/* 169B68 80249308 0C090B65 */ jal func_80242D94
/* 169B6C 8024930C A0820004 */ sb $v0, 0x4($a0)
.L80249310:
/* 169B70 80249310 8FBF0018 */ lw $ra, 0x18($sp)
/* 169B74 80249314 8FB10014 */ lw $s1, 0x14($sp)
/* 169B78 80249318 8FB00010 */ lw $s0, 0x10($sp)
/* 169B7C 8024931C 03E00008 */ jr $ra
/* 169B80 80249320 27BD0020 */ addiu $sp, $sp, 0x20
### DECOMPILED C INSTRUCTIONS:
void filemenu_choose_name_handle_input(MenuPanel* menu) {
s32 oldSelected = menu->selected;
MenuPanel* newMenu;
MenuPanel* newMenu2;
s32 temp;
s32 i;
if (filemenu_heldButtons & BUTTON_STICK_LEFT) {
menu->col--;
if (menu->col < 0) {
menu->col = menu->numCols - 1;
}
} else if (filemenu_heldButtons & BUTTON_STICK_RIGHT) {
menu->col++;
if (menu->col >= menu->numCols) {
menu->col = 0;
}
if (menu->row == menu->numRows - 1) {
if (menu->col > 10) {
menu->col = 0;
} else if (menu->col == 8 || menu->col == 9) {
menu->col = 10;
} else if (menu->col == 5 || menu->col == 6) {
menu->col = 7;
}
}
}
if (filemenu_heldButtons & BUTTON_STICK_UP) {
menu->row--;
if (menu->row < 0) {
menu->row = menu->numRows - 1;
}
} else if (filemenu_heldButtons & BUTTON_STICK_DOWN) {
menu->row++;
if (menu->row >= menu->numRows) {
menu->row = 0;
}
}
if (menu->row == menu->numRows - 1) {
if (menu->col > 10) {
menu->col = 10;
} else if (menu->col == 8 || menu->col == 9) {
menu->col = 7;
} else if (menu->col == 5 || menu->col == 6) {
menu->col = 4;
}
}
menu->selected = MENU_PANEL_SELECTED_GRID_DATA(menu);
if (oldSelected != menu->selected) {
sfx_play_sound(SOUND_2102);
}
if (filemenu_pressedButtons & BUTTON_A) {
switch (menu->selected) {
case 0xC6:
sfx_play_sound(SOUND_2103);
if (filemenu_filename_pos == ARRAY_COUNT(filemenu_filename)) {
filemenu_filename_pos = ARRAY_COUNT(filemenu_filename) - 1;
}
filemenu_filename[filemenu_filename_pos] = 0xF7;
filemenu_filename_pos++;
if (filemenu_filename_pos > ARRAY_COUNT(filemenu_filename)) {
filemenu_filename_pos = ARRAY_COUNT(filemenu_filename);
}
break;
case 0xC9:
break;
case 0xC7:
if (menu->page != 1) {
sfx_play_sound(SOUND_2105);
menu->page = 1;
filemenu_set_selected(menu, menu->col, menu->row);
set_window_update(WINDOW_ID_FILEMENU_KEYBOARD, (s32)filemenu_update_change_layout);
}
break;
case 0xC8:
if (menu->page != 0) {
sfx_play_sound(SOUND_2105);
menu->page = 0;
filemenu_set_selected(menu, menu->col, menu->row);
set_window_update(WINDOW_ID_FILEMENU_KEYBOARD, (s32)filemenu_update_change_layout);
}
break;
case 0xCA:
for (i = 0; i < ARRAY_COUNT(filemenu_filename); i++) {
if (filemenu_filename[i] != 0xF7) {
break;
}
}
if (i == ARRAY_COUNT(filemenu_filename)) {
sfx_play_sound(SOUND_MENU_ERROR);
break;
}
sfx_play_sound(SOUND_MENU_NEXT);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32) filemenu_update_show_name_confirm);
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.y = 121;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width = 69;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].height = 44;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width / 2;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.y = -70;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = 164;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 62;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2;
filemenu_currentMenu = 1;
newMenu = filemenu_menus[filemenu_currentMenu];
newMenu->page = 2;
filemenu_set_selected(newMenu, 0, 0);
return;
default:
sfx_play_sound(SOUND_2103);
if (filemenu_filename_pos == ARRAY_COUNT(filemenu_filename)) {
filemenu_filename[7] = menu->selected;
} else {
filemenu_filename[filemenu_filename_pos] = menu->selected;
filemenu_filename_pos++;
if (filemenu_filename_pos > ARRAY_COUNT(filemenu_filename)) {
filemenu_filename_pos = ARRAY_COUNT(filemenu_filename);
}
}
break;
}
if (menu->selected != 0xC7 && menu->selected != 0xC8 && menu->selected != 0xC9 &&
filemenu_filename_pos == ARRAY_COUNT(filemenu_filename)) {
filemenu_set_selected(menu, menu->numCols - 3, menu->numRows - 1);
}
}
if ((filemenu_pressedButtons & BUTTON_B) || ((filemenu_pressedButtons & BUTTON_A) && menu->selected == 0xC9)) {
sfx_play_sound(SOUND_2104);
filemenu_filename_pos--;
if (filemenu_filename_pos < 0) {
filemenu_filename_pos = 0;
set_window_update(WINDOW_ID_FILEMENU_CREATEFILE_HEADER, (s32) &filemenu_update_hidden_name_input);
set_window_update(WINDOW_ID_FILEMENU_KEYBOARD, (s32) &filemenu_update_hidden_name_input);
set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32) &filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32) &filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_MONO, (s32) &filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32) &filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32) &filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32) &filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32) &filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32) &filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32) &filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32) &filemenu_update_show_with_rotation);
set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32) &filemenu_update_show_with_rotation);
filemenu_currentMenu = 0;
return;
}
for (i = filemenu_filename_pos; i < ARRAY_COUNT(filemenu_filename); i++) {
filemenu_filename[i] = 0xF7;
}
}
if (filemenu_pressedButtons & BUTTON_START) {
for (i = 0; i < ARRAY_COUNT(filemenu_filename); i++) {
if (filemenu_filename[i] != 0xF7) {
break;
}
}
if (i == ARRAY_COUNT(filemenu_filename)) {
sfx_play_sound(SOUND_MENU_ERROR);
return;
}
sfx_play_sound(SOUND_MENU_NEXT);
set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32) filemenu_update_show_name_confirm);
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.y = 121;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width = 69;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].height = 44;
gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width / 2;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.y = -70;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = 164;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 62;
gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1)
? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2)
: SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2;
newMenu2 = filemenu_menus[1];
filemenu_currentMenu = 1;
newMenu2->page = 2;
filemenu_set_selected(newMenu2, 0, 0);
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel make_item_entity
/* C7AF4 801313F4 27BDFFC8 */ addiu $sp, $sp, -0x38
/* C7AF8 801313F8 AFB20028 */ sw $s2, 0x28($sp)
/* C7AFC 801313FC 0080902D */ daddu $s2, $a0, $zero
/* C7B00 80131400 AFB10024 */ sw $s1, 0x24($sp)
/* C7B04 80131404 8FB10054 */ lw $s1, 0x54($sp)
/* C7B08 80131408 3C02F8D8 */ lui $v0, (0xF8D8F200 >> 16)
/* C7B0C 8013140C AFB3002C */ sw $s3, 0x2C($sp)
/* C7B10 80131410 8FB30048 */ lw $s3, 0x48($sp)
/* C7B14 80131414 3442F200 */ ori $v0, $v0, (0xF8D8F200 & 0xFFFF)
/* C7B18 80131418 AFBF0034 */ sw $ra, 0x34($sp)
/* C7B1C 8013141C AFB40030 */ sw $s4, 0x30($sp)
/* C7B20 80131420 AFB00020 */ sw $s0, 0x20($sp)
/* C7B24 80131424 AFA5003C */ sw $a1, 0x3C($sp)
/* C7B28 80131428 AFA60040 */ sw $a2, 0x40($sp)
/* C7B2C 8013142C 0051102A */ slt $v0, $v0, $s1
/* C7B30 80131430 14400004 */ bnez $v0, .L80131444
/* C7B34 80131434 AFA70044 */ sw $a3, 0x44($sp)
/* C7B38 80131438 3C0207BF */ lui $v0, (0x7BFA480 >> 16)
/* C7B3C 8013143C 3442A480 */ ori $v0, $v0, (0x7BFA480 & 0xFFFF)
/* C7B40 80131440 02228821 */ addu $s1, $s1, $v0
.L80131444:
/* C7B44 80131444 1A20000C */ blez $s1, .L80131478
/* C7B48 80131448 2E620017 */ sltiu $v0, $s3, 0x17
/* C7B4C 8013144C 1040000A */ beqz $v0, .L80131478
/* C7B50 80131450 00131080 */ sll $v0, $s3, 2
/* C7B54 80131454 3C018015 */ lui $at, %hi(jtbl_80150A98)
/* C7B58 80131458 00220821 */ addu $at, $at, $v0
/* C7B5C 8013145C 8C220A98 */ lw $v0, %lo(jtbl_80150A98)($at)
/* C7B60 80131460 00400008 */ jr $v0
/* C7B64 80131464 00000000 */ nop
glabel .L80131468
/* C7B68 80131468 0C05152F */ jal get_global_flag
/* C7B6C 8013146C 0220202D */ daddu $a0, $s1, $zero
/* C7B70 80131470 14400180 */ bnez $v0, .L80131A74
/* C7B74 80131474 2402FFFF */ addiu $v0, $zero, -0x1
glabel .L80131478
/* C7B78 80131478 0000182D */ daddu $v1, $zero, $zero
/* C7B7C 8013147C 3C048015 */ lui $a0, %hi(gCurrentItemEntities)
/* C7B80 80131480 8C8465A0 */ lw $a0, %lo(gCurrentItemEntities)($a0)
.L80131484:
/* C7B84 80131484 8C820000 */ lw $v0, 0x0($a0)
/* C7B88 80131488 10400006 */ beqz $v0, .L801314A4
/* C7B8C 8013148C 28620100 */ slti $v0, $v1, 0x100
/* C7B90 80131490 24630001 */ addiu $v1, $v1, 0x1
/* C7B94 80131494 28620100 */ slti $v0, $v1, 0x100
/* C7B98 80131498 1440FFFA */ bnez $v0, .L80131484
/* C7B9C 8013149C 24840004 */ addiu $a0, $a0, 0x4
/* C7BA0 801314A0 28620100 */ slti $v0, $v1, 0x100
.L801314A4:
/* C7BA4 801314A4 54400003 */ bnel $v0, $zero, .L801314B4
/* C7BA8 801314A8 2404005C */ addiu $a0, $zero, 0x5C
.L801314AC:
/* C7BAC 801314AC 0804C52B */ j .L801314AC
/* C7BB0 801314B0 00000000 */ nop
.L801314B4:
/* C7BB4 801314B4 0C00AB39 */ jal heap_malloc
/* C7BB8 801314B8 0060A02D */ daddu $s4, $v1, $zero
/* C7BBC 801314BC 00142080 */ sll $a0, $s4, 2
/* C7BC0 801314C0 3C038015 */ lui $v1, %hi(gCurrentItemEntities)
/* C7BC4 801314C4 8C6365A0 */ lw $v1, %lo(gCurrentItemEntities)($v1)
/* C7BC8 801314C8 3C058015 */ lui $a1, %hi(ItemEntitiesCreated)
/* C7BCC 801314CC 24A512F8 */ addiu $a1, $a1, %lo(ItemEntitiesCreated)
/* C7BD0 801314D0 00832021 */ addu $a0, $a0, $v1
/* C7BD4 801314D4 8CA30000 */ lw $v1, 0x0($a1)
/* C7BD8 801314D8 0040802D */ daddu $s0, $v0, $zero
/* C7BDC 801314DC AC900000 */ sw $s0, 0x0($a0)
/* C7BE0 801314E0 24630001 */ addiu $v1, $v1, 0x1
/* C7BE4 801314E4 16000003 */ bnez $s0, .L801314F4
/* C7BE8 801314E8 ACA30000 */ sw $v1, 0x0($a1)
.L801314EC:
/* C7BEC 801314EC 0804C53B */ j .L801314EC
/* C7BF0 801314F0 00000000 */ nop
.L801314F4:
/* C7BF4 801314F4 00121402 */ srl $v0, $s2, 16
/* C7BF8 801314F8 3042000F */ andi $v0, $v0, 0xF
/* C7BFC 801314FC 24030005 */ addiu $v1, $zero, 0x5
/* C7C00 80131500 14430003 */ bne $v0, $v1, .L80131510
/* C7C04 80131504 A202001D */ sb $v0, 0x1D($s0)
/* C7C08 80131508 2402FFFF */ addiu $v0, $zero, -0x1
/* C7C0C 8013150C A202001D */ sb $v0, 0x1D($s0)
.L80131510:
/* C7C10 80131510 3252FFFF */ andi $s2, $s2, 0xFFFF
/* C7C14 80131514 A213001B */ sb $s3, 0x1B($s0)
/* C7C18 80131518 A200001A */ sb $zero, 0x1A($s0)
/* C7C1C 8013151C C7A2003C */ lwc1 $f2, 0x3C($sp)
/* C7C20 80131520 C7A40040 */ lwc1 $f4, 0x40($sp)
/* C7C24 80131524 C7A60044 */ lwc1 $f6, 0x44($sp)
/* C7C28 80131528 24020097 */ addiu $v0, $zero, 0x97
/* C7C2C 8013152C AE020000 */ sw $v0, 0x0($s0)
/* C7C30 80131530 A6000006 */ sh $zero, 0x6($s0)
/* C7C34 80131534 A6110004 */ sh $s1, 0x4($s0)
/* C7C38 80131538 A6120018 */ sh $s2, 0x18($s0)
/* C7C3C 8013153C AE000014 */ sw $zero, 0x14($s0)
/* C7C40 80131540 8FA2004C */ lw $v0, 0x4C($sp)
/* C7C44 80131544 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* C7C48 80131548 44810000 */ mtc1 $at, $f0
/* C7C4C 8013154C 8E030000 */ lw $v1, 0x0($s0)
/* C7C50 80131550 A202001C */ sb $v0, 0x1C($s0)
/* C7C54 80131554 8FA20050 */ lw $v0, 0x50($sp)
/* C7C58 80131558 34644000 */ ori $a0, $v1, 0x4000
/* C7C5C 8013155C E6020008 */ swc1 $f2, 0x8($s0)
/* C7C60 80131560 E604000C */ swc1 $f4, 0xC($s0)
/* C7C64 80131564 E6060010 */ swc1 $f6, 0x10($s0)
/* C7C68 80131568 E6000030 */ swc1 $f0, 0x30($s0)
/* C7C6C 8013156C AE040000 */ sw $a0, 0x0($s0)
/* C7C70 80131570 A602001E */ sh $v0, 0x1E($s0)
/* C7C74 80131574 2402FFFF */ addiu $v0, $zero, -0x1
/* C7C78 80131578 A6020020 */ sh $v0, 0x20($s0)
/* C7C7C 8013157C 24020001 */ addiu $v0, $zero, 0x1
/* C7C80 80131580 A202002E */ sb $v0, 0x2E($s0)
/* C7C84 80131584 2402D8F1 */ addiu $v0, $zero, -0x270F
/* C7C88 80131588 A6020034 */ sh $v0, 0x34($s0)
/* C7C8C 8013158C A6020036 */ sh $v0, 0x36($s0)
/* C7C90 80131590 A6020038 */ sh $v0, 0x38($s0)
/* C7C94 80131594 00121140 */ sll $v0, $s2, 5
/* C7C98 80131598 3C018008 */ lui $at, %hi(gItemTable + 0x18)
/* C7C9C 8013159C 00220821 */ addu $at, $at, $v0
/* C7CA0 801315A0 942278F8 */ lhu $v0, %lo(gItemTable + 0x18)($at)
/* C7CA4 801315A4 2403001E */ addiu $v1, $zero, 0x1E
/* C7CA8 801315A8 3C018015 */ lui $at, %hi(D_801565A6)
/* C7CAC 801315AC A42365A6 */ sh $v1, %lo(D_801565A6)($at)
/* C7CB0 801315B0 30421000 */ andi $v0, $v0, 0x1000
/* C7CB4 801315B4 10400005 */ beqz $v0, .L801315CC
/* C7CB8 801315B8 3C020004 */ lui $v0, (0x40000 >> 16)
/* C7CBC 801315BC 00821025 */ or $v0, $a0, $v0
/* C7CC0 801315C0 2403BFFF */ addiu $v1, $zero, -0x4001
/* C7CC4 801315C4 00431024 */ and $v0, $v0, $v1
/* C7CC8 801315C8 AE020000 */ sw $v0, 0x0($s0)
.L801315CC:
/* C7CCC 801315CC 3C048015 */ lui $a0, %hi(ItemEntityAlternatingSpawn)
/* C7CD0 801315D0 24845D84 */ addiu $a0, $a0, %lo(ItemEntityAlternatingSpawn)
/* C7CD4 801315D4 8C820000 */ lw $v0, 0x0($a0)
/* C7CD8 801315D8 10400005 */ beqz $v0, .L801315F0
/* C7CDC 801315DC 3C030002 */ lui $v1, (0x20000 >> 16)
/* C7CE0 801315E0 8E020000 */ lw $v0, 0x0($s0)
/* C7CE4 801315E4 00431025 */ or $v0, $v0, $v1
/* C7CE8 801315E8 AE020000 */ sw $v0, 0x0($s0)
/* C7CEC 801315EC 8C820000 */ lw $v0, 0x0($a0)
.L801315F0:
/* C7CF0 801315F0 24030001 */ addiu $v1, $zero, 0x1
/* C7CF4 801315F4 00621823 */ subu $v1, $v1, $v0
/* C7CF8 801315F8 AC830000 */ sw $v1, 0x0($a0)
/* C7CFC 801315FC 8203001B */ lb $v1, 0x1B($s0)
/* C7D00 80131600 2C62001C */ sltiu $v0, $v1, 0x1C
/* C7D04 80131604 104000C1 */ beqz $v0, .L8013190C
/* C7D08 80131608 00031080 */ sll $v0, $v1, 2
/* C7D0C 8013160C 3C018015 */ lui $at, %hi(jtbl_80150AF8)
/* C7D10 80131610 00220821 */ addu $at, $at, $v0
/* C7D14 80131614 8C220AF8 */ lw $v0, %lo(jtbl_80150AF8)($at)
/* C7D18 80131618 00400008 */ jr $v0
/* C7D1C 8013161C 00000000 */ nop
glabel .L80131620
/* C7D20 80131620 8E020000 */ lw $v0, 0x0($s0)
/* C7D24 80131624 0804C640 */ j .L80131900
/* C7D28 80131628 3C038000 */ lui $v1, (0x80000000 >> 16)
glabel .L8013162C
/* C7D2C 8013162C 8E020000 */ lw $v0, 0x0($s0)
/* C7D30 80131630 0804C640 */ j .L80131900
/* C7D34 80131634 3C030080 */ lui $v1, (0x800000 >> 16)
glabel .L80131638
/* C7D38 80131638 8E020000 */ lw $v0, 0x0($s0)
/* C7D3C 8013163C 0804C640 */ j .L80131900
/* C7D40 80131640 3C030010 */ lui $v1, (0x100000 >> 16)
glabel .L80131644
/* C7D44 80131644 24020003 */ addiu $v0, $zero, 0x3
/* C7D48 80131648 A202001B */ sb $v0, 0x1B($s0)
/* C7D4C 8013164C 8E020000 */ lw $v0, 0x0($s0)
/* C7D50 80131650 3C030080 */ lui $v1, (0x800000 >> 16)
/* C7D54 80131654 00431025 */ or $v0, $v0, $v1
/* C7D58 80131658 0804C640 */ j .L80131900
/* C7D5C 8013165C 3C030001 */ lui $v1, (0x10000 >> 16)
glabel .L80131660
/* C7D60 80131660 3C020080 */ lui $v0, (0x800600 >> 16)
/* C7D64 80131664 34420600 */ ori $v0, $v0, (0x800600 & 0xFFFF)
/* C7D68 80131668 8E030000 */ lw $v1, 0x0($s0)
/* C7D6C 8013166C 0804C635 */ j .L801318D4
/* C7D70 80131670 24040003 */ addiu $a0, $zero, 0x3
glabel .L80131674
/* C7D74 80131674 3C020080 */ lui $v0, (0x800400 >> 16)
/* C7D78 80131678 34420400 */ ori $v0, $v0, (0x800400 & 0xFFFF)
/* C7D7C 8013167C 8E030000 */ lw $v1, 0x0($s0)
/* C7D80 80131680 0804C635 */ j .L801318D4
/* C7D84 80131684 24040003 */ addiu $a0, $zero, 0x3
glabel .L80131688
/* C7D88 80131688 3C020080 */ lui $v0, (0x800800 >> 16)
/* C7D8C 8013168C 34420800 */ ori $v0, $v0, (0x800800 & 0xFFFF)
/* C7D90 80131690 8E030000 */ lw $v1, 0x0($s0)
/* C7D94 80131694 0804C635 */ j .L801318D4
/* C7D98 80131698 24040003 */ addiu $a0, $zero, 0x3
glabel .L8013169C
/* C7D9C 8013169C 3C020080 */ lui $v0, (0x800A00 >> 16)
/* C7DA0 801316A0 34420A00 */ ori $v0, $v0, (0x800A00 & 0xFFFF)
/* C7DA4 801316A4 8E030000 */ lw $v1, 0x0($s0)
/* C7DA8 801316A8 0804C635 */ j .L801318D4
/* C7DAC 801316AC 24040003 */ addiu $a0, $zero, 0x3
glabel .L801316B0
/* C7DB0 801316B0 3C020080 */ lui $v0, (0x800200 >> 16)
/* C7DB4 801316B4 34420200 */ ori $v0, $v0, (0x800200 & 0xFFFF)
/* C7DB8 801316B8 8E030000 */ lw $v1, 0x0($s0)
/* C7DBC 801316BC 0804C635 */ j .L801318D4
/* C7DC0 801316C0 24040003 */ addiu $a0, $zero, 0x3
glabel .L801316C4
/* C7DC4 801316C4 3C040080 */ lui $a0, (0x800400 >> 16)
/* C7DC8 801316C8 34840400 */ ori $a0, $a0, (0x800400 & 0xFFFF)
/* C7DCC 801316CC 8E020000 */ lw $v0, 0x0($s0)
/* C7DD0 801316D0 24030003 */ addiu $v1, $zero, 0x3
/* C7DD4 801316D4 A203001B */ sb $v1, 0x1B($s0)
/* C7DD8 801316D8 0804C63F */ j .L801318FC
/* C7DDC 801316DC 3C034000 */ lui $v1, (0x40000000 >> 16)
glabel .L801316E0
/* C7DE0 801316E0 3C050080 */ lui $a1, (0x800400 >> 16)
/* C7DE4 801316E4 34A50400 */ ori $a1, $a1, (0x800400 & 0xFFFF)
/* C7DE8 801316E8 3C044000 */ lui $a0, (0x40000200 >> 16)
/* C7DEC 801316EC 34840200 */ ori $a0, $a0, (0x40000200 & 0xFFFF)
/* C7DF0 801316F0 8E020000 */ lw $v0, 0x0($s0)
/* C7DF4 801316F4 24030003 */ addiu $v1, $zero, 0x3
/* C7DF8 801316F8 A203001B */ sb $v1, 0x1B($s0)
/* C7DFC 801316FC 00451025 */ or $v0, $v0, $a1
/* C7E00 80131700 0804C641 */ j .L80131904
/* C7E04 80131704 00441025 */ or $v0, $v0, $a0
glabel .L80131708
/* C7E08 80131708 8E020000 */ lw $v0, 0x0($s0)
/* C7E0C 8013170C 0804C640 */ j .L80131900
/* C7E10 80131710 3C030080 */ lui $v1, (0x800000 >> 16)
glabel .L80131714
/* C7E14 80131714 3C020080 */ lui $v0, (0x800600 >> 16)
/* C7E18 80131718 34420600 */ ori $v0, $v0, (0x800600 & 0xFFFF)
/* C7E1C 8013171C 8E030000 */ lw $v1, 0x0($s0)
/* C7E20 80131720 0804C635 */ j .L801318D4
/* C7E24 80131724 2404000C */ addiu $a0, $zero, 0xC
glabel .L80131728
/* C7E28 80131728 3C020080 */ lui $v0, (0x800400 >> 16)
/* C7E2C 8013172C 34420400 */ ori $v0, $v0, (0x800400 & 0xFFFF)
/* C7E30 80131730 8E030000 */ lw $v1, 0x0($s0)
/* C7E34 80131734 0804C635 */ j .L801318D4
/* C7E38 80131738 2404000C */ addiu $a0, $zero, 0xC
glabel .L8013173C
/* C7E3C 8013173C 3C020080 */ lui $v0, (0x800800 >> 16)
/* C7E40 80131740 34420800 */ ori $v0, $v0, (0x800800 & 0xFFFF)
/* C7E44 80131744 8E030000 */ lw $v1, 0x0($s0)
/* C7E48 80131748 0804C635 */ j .L801318D4
/* C7E4C 8013174C 2404000C */ addiu $a0, $zero, 0xC
glabel .L80131750
/* C7E50 80131750 3C020080 */ lui $v0, (0x802000 >> 16)
/* C7E54 80131754 8E030000 */ lw $v1, 0x0($s0)
/* C7E58 80131758 34422000 */ ori $v0, $v0, (0x802000 & 0xFFFF)
/* C7E5C 8013175C 00621825 */ or $v1, $v1, $v0
/* C7E60 80131760 0804C636 */ j .L801318D8
/* C7E64 80131764 3C021000 */ lui $v0, (0x10000000 >> 16)
glabel .L80131768
/* C7E68 80131768 3C040080 */ lui $a0, (0x802600 >> 16)
/* C7E6C 8013176C 34842600 */ ori $a0, $a0, (0x802600 & 0xFFFF)
/* C7E70 80131770 8E020000 */ lw $v0, 0x0($s0)
/* C7E74 80131774 24030010 */ addiu $v1, $zero, 0x10
/* C7E78 80131778 A203001B */ sb $v1, 0x1B($s0)
/* C7E7C 8013177C 0804C63F */ j .L801318FC
/* C7E80 80131780 3C031000 */ lui $v1, (0x10000000 >> 16)
glabel .L80131784
/* C7E84 80131784 3C040080 */ lui $a0, (0x802400 >> 16)
/* C7E88 80131788 34842400 */ ori $a0, $a0, (0x802400 & 0xFFFF)
/* C7E8C 8013178C 8E020000 */ lw $v0, 0x0($s0)
/* C7E90 80131790 24030010 */ addiu $v1, $zero, 0x10
/* C7E94 80131794 A203001B */ sb $v1, 0x1B($s0)
/* C7E98 80131798 0804C63F */ j .L801318FC
/* C7E9C 8013179C 3C031000 */ lui $v1, (0x10000000 >> 16)
glabel .L801317A0
/* C7EA0 801317A0 3C040080 */ lui $a0, (0x802200 >> 16)
/* C7EA4 801317A4 34842200 */ ori $a0, $a0, (0x802200 & 0xFFFF)
/* C7EA8 801317A8 8E020000 */ lw $v0, 0x0($s0)
/* C7EAC 801317AC 24030010 */ addiu $v1, $zero, 0x10
/* C7EB0 801317B0 A203001B */ sb $v1, 0x1B($s0)
/* C7EB4 801317B4 0804C63F */ j .L801318FC
/* C7EB8 801317B8 3C031000 */ lui $v1, (0x10000000 >> 16)
glabel .L801317BC
/* C7EBC 801317BC 3C030080 */ lui $v1, (0x801000 >> 16)
/* C7EC0 801317C0 34631000 */ ori $v1, $v1, (0x801000 & 0xFFFF)
/* C7EC4 801317C4 8E020000 */ lw $v0, 0x0($s0)
/* C7EC8 801317C8 3C013F4C */ lui $at, (0x3F4CCCCD >> 16)
/* C7ECC 801317CC 3421CCCD */ ori $at, $at, (0x3F4CCCCD & 0xFFFF)
/* C7ED0 801317D0 44810000 */ mtc1 $at, $f0
/* C7ED4 801317D4 00431025 */ or $v0, $v0, $v1
/* C7ED8 801317D8 AE020000 */ sw $v0, 0x0($s0)
/* C7EDC 801317DC 34424000 */ ori $v0, $v0, 0x4000
/* C7EE0 801317E0 0804C641 */ j .L80131904
/* C7EE4 801317E4 E6000030 */ swc1 $f0, 0x30($s0)
glabel .L801317E8
/* C7EE8 801317E8 3C030080 */ lui $v1, (0x801000 >> 16)
/* C7EEC 801317EC 34631000 */ ori $v1, $v1, (0x801000 & 0xFFFF)
/* C7EF0 801317F0 8E020000 */ lw $v0, 0x0($s0)
/* C7EF4 801317F4 3C013F4C */ lui $at, (0x3F4CCCCD >> 16)
/* C7EF8 801317F8 3421CCCD */ ori $at, $at, (0x3F4CCCCD & 0xFFFF)
/* C7EFC 801317FC 44810000 */ mtc1 $at, $f0
/* C7F00 80131800 00431025 */ or $v0, $v0, $v1
/* C7F04 80131804 3C030001 */ lui $v1, (0x14000 >> 16)
/* C7F08 80131808 00431025 */ or $v0, $v0, $v1
/* C7F0C 8013180C AE020000 */ sw $v0, 0x0($s0)
/* C7F10 80131810 0040182D */ daddu $v1, $v0, $zero
/* C7F14 80131814 0804C628 */ j .L801318A0
/* C7F18 80131818 24020017 */ addiu $v0, $zero, 0x17
glabel .L8013181C
/* C7F1C 8013181C 3C030080 */ lui $v1, (0x801000 >> 16)
/* C7F20 80131820 34631000 */ ori $v1, $v1, (0x801000 & 0xFFFF)
/* C7F24 80131824 8E020000 */ lw $v0, 0x0($s0)
/* C7F28 80131828 3C013F4C */ lui $at, (0x3F4CCCCD >> 16)
/* C7F2C 8013182C 3421CCCD */ ori $at, $at, (0x3F4CCCCD & 0xFFFF)
/* C7F30 80131830 44810000 */ mtc1 $at, $f0
/* C7F34 80131834 00431025 */ or $v0, $v0, $v1
/* C7F38 80131838 3C030040 */ lui $v1, (0x404000 >> 16)
/* C7F3C 8013183C 00431025 */ or $v0, $v0, $v1
/* C7F40 80131840 AE020000 */ sw $v0, 0x0($s0)
/* C7F44 80131844 0040182D */ daddu $v1, $v0, $zero
/* C7F48 80131848 0804C628 */ j .L801318A0
/* C7F4C 8013184C 24020017 */ addiu $v0, $zero, 0x17
glabel .L80131850
/* C7F50 80131850 3C030080 */ lui $v1, (0x804000 >> 16)
/* C7F54 80131854 8E020000 */ lw $v0, 0x0($s0)
/* C7F58 80131858 3C013F4C */ lui $at, (0x3F4CCCCD >> 16)
/* C7F5C 8013185C 3421CCCD */ ori $at, $at, (0x3F4CCCCD & 0xFFFF)
/* C7F60 80131860 44810000 */ mtc1 $at, $f0
/* C7F64 80131864 00431025 */ or $v0, $v0, $v1
/* C7F68 80131868 AE020000 */ sw $v0, 0x0($s0)
/* C7F6C 8013186C 0040182D */ daddu $v1, $v0, $zero
/* C7F70 80131870 0804C628 */ j .L801318A0
/* C7F74 80131874 24020003 */ addiu $v0, $zero, 0x3
glabel .L80131878
/* C7F78 80131878 3C030080 */ lui $v1, (0x808000 >> 16)
/* C7F7C 8013187C 34638000 */ ori $v1, $v1, (0x808000 & 0xFFFF)
/* C7F80 80131880 8E020000 */ lw $v0, 0x0($s0)
/* C7F84 80131884 3C013F4C */ lui $at, (0x3F4CCCCD >> 16)
/* C7F88 80131888 3421CCCD */ ori $at, $at, (0x3F4CCCCD & 0xFFFF)
/* C7F8C 8013188C 44810000 */ mtc1 $at, $f0
/* C7F90 80131890 00431025 */ or $v0, $v0, $v1
/* C7F94 80131894 AE020000 */ sw $v0, 0x0($s0)
/* C7F98 80131898 0040182D */ daddu $v1, $v0, $zero
/* C7F9C 8013189C 24020014 */ addiu $v0, $zero, 0x14
.L801318A0:
/* C7FA0 801318A0 34634000 */ ori $v1, $v1, (0x804000 & 0xFFFF)
/* C7FA4 801318A4 A202001B */ sb $v0, 0x1B($s0)
/* C7FA8 801318A8 E6000030 */ swc1 $f0, 0x30($s0)
/* C7FAC 801318AC 0804C642 */ j .L80131908
/* C7FB0 801318B0 AE030000 */ sw $v1, 0x0($s0)
glabel .L801318B4
/* C7FB4 801318B4 3C030080 */ lui $v1, (0x808200 >> 16)
/* C7FB8 801318B8 8E020000 */ lw $v0, 0x0($s0)
/* C7FBC 801318BC 0804C640 */ j .L80131900
/* C7FC0 801318C0 34638200 */ ori $v1, $v1, (0x808200 & 0xFFFF)
glabel .L801318C4
/* C7FC4 801318C4 3C020080 */ lui $v0, (0x808600 >> 16)
/* C7FC8 801318C8 34428600 */ ori $v0, $v0, (0x808600 & 0xFFFF)
/* C7FCC 801318CC 8E030000 */ lw $v1, 0x0($s0)
/* C7FD0 801318D0 24040014 */ addiu $a0, $zero, 0x14
.L801318D4:
/* C7FD4 801318D4 A204001B */ sb $a0, 0x1B($s0)
.L801318D8:
/* C7FD8 801318D8 00621825 */ or $v1, $v1, $v0
/* C7FDC 801318DC 0804C642 */ j .L80131908
/* C7FE0 801318E0 AE030000 */ sw $v1, 0x0($s0)
glabel .L801318E4
/* C7FE4 801318E4 3C040080 */ lui $a0, (0x800600 >> 16)
/* C7FE8 801318E8 34840600 */ ori $a0, $a0, (0x800600 & 0xFFFF)
/* C7FEC 801318EC 8E020000 */ lw $v0, 0x0($s0)
/* C7FF0 801318F0 24030003 */ addiu $v1, $zero, 0x3
/* C7FF4 801318F4 A203001B */ sb $v1, 0x1B($s0)
/* C7FF8 801318F8 3C030100 */ lui $v1, (0x1000000 >> 16)
.L801318FC:
/* C7FFC 801318FC 00441025 */ or $v0, $v0, $a0
.L80131900:
/* C8000 80131900 00431025 */ or $v0, $v0, $v1
.L80131904:
/* C8004 80131904 AE020000 */ sw $v0, 0x0($s0)
.L80131908:
/* C8008 80131908 8203001B */ lb $v1, 0x1B($s0)
.L8013190C:
/* C800C 8013190C 2C620015 */ sltiu $v0, $v1, 0x15
/* C8010 80131910 1040003E */ beqz $v0, .L80131A0C
/* C8014 80131914 00031080 */ sll $v0, $v1, 2
/* C8018 80131918 3C018015 */ lui $at, %hi(jtbl_80150B68)
/* C801C 8013191C 00220821 */ addu $at, $at, $v0
/* C8020 80131920 8C220B68 */ lw $v0, %lo(jtbl_80150B68)($at)
/* C8024 80131924 00400008 */ jr $v0
/* C8028 80131928 00000000 */ nop
glabel .L8013192C
/* C802C 8013192C 8E050008 */ lw $a1, 0x8($s0)
/* C8030 80131930 8E06000C */ lw $a2, 0xC($s0)
/* C8034 80131934 8E070010 */ lw $a3, 0x10($s0)
/* C8038 80131938 0C044898 */ jal create_shadow_type
/* C803C 8013193C 0000202D */ daddu $a0, $zero, $zero
/* C8040 80131940 00022400 */ sll $a0, $v0, 16
/* C8044 80131944 00042403 */ sra $a0, $a0, 16
/* C8048 80131948 0C044181 */ jal get_shadow_by_index
/* C804C 8013194C A6020020 */ sh $v0, 0x20($s0)
/* C8050 80131950 0040882D */ daddu $s1, $v0, $zero
/* C8054 80131954 8203001B */ lb $v1, 0x1B($s0)
/* C8058 80131958 24020014 */ addiu $v0, $zero, 0x14
/* C805C 8013195C 14620004 */ bne $v1, $v0, .L80131970
/* C8060 80131960 3C040002 */ lui $a0, (0x20000 >> 16)
/* C8064 80131964 8E220000 */ lw $v0, 0x0($s1)
/* C8068 80131968 34420001 */ ori $v0, $v0, 0x1
/* C806C 8013196C AE220000 */ sw $v0, 0x0($s1)
.L80131970:
/* C8070 80131970 27A5003C */ addiu $a1, $sp, 0x3C
/* C8074 80131974 27A60040 */ addiu $a2, $sp, 0x40
/* C8078 80131978 27A70044 */ addiu $a3, $sp, 0x44
/* C807C 8013197C 27A20018 */ addiu $v0, $sp, 0x18
/* C8080 80131980 C6080008 */ lwc1 $f8, 0x8($s0)
/* C8084 80131984 C600000C */ lwc1 $f0, 0xC($s0)
/* C8088 80131988 3C014140 */ lui $at, (0x41400000 >> 16)
/* C808C 8013198C 44811000 */ mtc1 $at, $f2
/* C8090 80131990 C6040010 */ lwc1 $f4, 0x10($s0)
/* C8094 80131994 3C01447A */ lui $at, (0x447A0000 >> 16)
/* C8098 80131998 44813000 */ mtc1 $at, $f6
/* C809C 8013199C 46020000 */ add.s $f0, $f0, $f2
/* C80A0 801319A0 E7A8003C */ swc1 $f8, 0x3C($sp)
/* C80A4 801319A4 E7A40044 */ swc1 $f4, 0x44($sp)
/* C80A8 801319A8 E7A00040 */ swc1 $f0, 0x40($sp)
/* C80AC 801319AC E7A60018 */ swc1 $f6, 0x18($sp)
/* C80B0 801319B0 0C0372DF */ jal npc_raycast_down_sides
/* C80B4 801319B4 AFA20010 */ sw $v0, 0x10($sp)
/* C80B8 801319B8 C7A0003C */ lwc1 $f0, 0x3C($sp)
/* C80BC 801319BC C7A20040 */ lwc1 $f2, 0x40($sp)
/* C80C0 801319C0 C7A40044 */ lwc1 $f4, 0x44($sp)
/* C80C4 801319C4 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* C80C8 801319C8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* C80CC 801319CC E6200010 */ swc1 $f0, 0x10($s1)
/* C80D0 801319D0 E6220014 */ swc1 $f2, 0x14($s1)
/* C80D4 801319D4 E6240018 */ swc1 $f4, 0x18($s1)
/* C80D8 801319D8 C7A20018 */ lwc1 $f2, 0x18($sp)
/* C80DC 801319DC 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* C80E0 801319E0 44810000 */ mtc1 $at, $f0
/* C80E4 801319E4 C444011C */ lwc1 $f4, 0x11C($v0)
/* C80E8 801319E8 46001082 */ mul.s $f2, $f2, $f0
/* C80EC 801319EC 00000000 */ nop
/* C80F0 801319F0 AE20002C */ sw $zero, 0x2C($s1)
/* C80F4 801319F4 E6240028 */ swc1 $f4, 0x28($s1)
/* C80F8 801319F8 C4400124 */ lwc1 $f0, 0x124($v0)
/* C80FC 801319FC 44051000 */ mfc1 $a1, $f2
/* C8100 80131A00 0220202D */ daddu $a0, $s1, $zero
/* C8104 80131A04 0C044A17 */ jal set_standard_shadow_scale
/* C8108 80131A08 E4800030 */ swc1 $f0, 0x30($a0)
glabel .L80131A0C
/* C810C 80131A0C 9202001C */ lbu $v0, 0x1C($s0)
/* C8110 80131A10 10400003 */ beqz $v0, .L80131A20
/* C8114 80131A14 00000000 */ nop
/* C8118 80131A18 0C04C3DC */ jal hide_item_entity
/* C811C 80131A1C 0200202D */ daddu $a0, $s0, $zero
.L80131A20:
/* C8120 80131A20 0C04C44A */ jal item_entity_load
/* C8124 80131A24 0200202D */ daddu $a0, $s0, $zero
/* C8128 80131A28 86030018 */ lh $v1, 0x18($s0)
/* C812C 80131A2C 24020157 */ addiu $v0, $zero, 0x157
/* C8130 80131A30 14620009 */ bne $v1, $v0, .L80131A58
/* C8134 80131A34 2402015C */ addiu $v0, $zero, 0x15C
/* C8138 80131A38 3C058010 */ lui $a1, %hi(SparkleScript_Coin)
/* C813C 80131A3C 24A54AC0 */ addiu $a1, $a1, %lo(SparkleScript_Coin)
/* C8140 80131A40 0C04C27C */ jal sparkle_script_init
/* C8144 80131A44 0200202D */ daddu $a0, $s0, $zero
/* C8148 80131A48 0C04C2B3 */ jal sparkle_script_update
/* C814C 80131A4C 0200202D */ daddu $a0, $s0, $zero
/* C8150 80131A50 86030018 */ lh $v1, 0x18($s0)
/* C8154 80131A54 2402015C */ addiu $v0, $zero, 0x15C
.L80131A58:
/* C8158 80131A58 14620006 */ bne $v1, $v0, .L80131A74
/* C815C 80131A5C 0280102D */ daddu $v0, $s4, $zero
/* C8160 80131A60 8E020000 */ lw $v0, 0x0($s0)
/* C8164 80131A64 2403FF7F */ addiu $v1, $zero, -0x81
/* C8168 80131A68 00431024 */ and $v0, $v0, $v1
/* C816C 80131A6C AE020000 */ sw $v0, 0x0($s0)
/* C8170 80131A70 0280102D */ daddu $v0, $s4, $zero
.L80131A74:
/* C8174 80131A74 8FBF0034 */ lw $ra, 0x34($sp)
/* C8178 80131A78 8FB40030 */ lw $s4, 0x30($sp)
/* C817C 80131A7C 8FB3002C */ lw $s3, 0x2C($sp)
/* C8180 80131A80 8FB20028 */ lw $s2, 0x28($sp)
/* C8184 80131A84 8FB10024 */ lw $s1, 0x24($sp)
/* C8188 80131A88 8FB00020 */ lw $s0, 0x20($sp)
/* C818C 80131A8C 03E00008 */ jr $ra
/* C8190 80131A90 27BD0038 */ addiu $sp, $sp, 0x38
### DECOMPILED C INSTRUCTIONS:
s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 angle, s32 pickupFlagIndex) {
s32 i;
s32 id;
ItemEntity* item;
f32 hitDepth;
Shadow* shadow;
if (pickupFlagIndex <= EVT_GAME_FLAG_CUTOFF) {
pickupFlagIndex = EVT_INDEX_OF_GAME_FLAG(pickupFlagIndex);
}
if (pickupFlagIndex > 0) {
switch (itemSpawnMode) {
case ITEM_SPAWN_MODE_KEY:
case ITEM_SPAWN_MODE_TOSS_NEVER_VANISH:
case ITEM_SPAWN_MODE_TOSS:
case ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE:
case ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE_NEVER_VANISH:
case ITEM_SPAWN_MODE_ITEM_BLOCK_ITEM:
case ITEM_SPAWN_MODE_ITEM_BLOCK_BADGE:
case ITEM_SPAWN_MODE_FALL_NEVER_VANISH:
case ITEM_SPAWN_MODE_FALL:
case ITEM_SPAWN_MODE_FALL_SPAWN_ONCE:
case ITEM_SPAWN_MODE_FIXED_NEVER_VANISH:
case ITEM_SPAWN_MODE_FIXED:
case ITEM_SPAWN_MODE_ITEM_BLOCK_COIN:
case ITEM_SPAWN_MODE_TOSS_HIGHER_NEVER_VANISH:
if (get_global_flag(pickupFlagIndex) != 0) {
return -1;
}
break;
}
}
for (i = 0; i < MAX_ITEM_ENTITIES; i++) {
if (gCurrentItemEntities[i] == NULL) {
break;
}
}
ASSERT(i < MAX_ITEM_ENTITIES);
id = i;
gCurrentItemEntities[id] = item = heap_malloc(sizeof(*item));
ItemEntitiesCreated++;
ASSERT(item != NULL);
item->renderGroup = (itemID & 0xF0000) >> 16;
if (item->renderGroup == VIS_GROUP_5) {
item->renderGroup = -1;
}
item->spawnType = itemSpawnMode;
item->state = ITEM_PHYSICS_STATE_INIT;
item->position.x = x;
item->position.y = y;
item->position.z = z;
itemID &= 0xFFFF;
item->flags = ITEM_ENTITY_FLAG_80 | ITEM_ENTITY_FLAG_10 | ITEM_ENTITY_FLAG_CAM2 | ITEM_ENTITY_FLAG_CAM1 | ITEM_ENTITY_FLAG_CAM0;
item->pickupMsgFlags = 0;
item->boundVar = pickupFlagIndex;
item->itemID = itemID;
item->physicsData = NULL;
item->pickupDelay = pickupDelay;
item->scale = 1.0f;
item->spawnAngle = angle;
item->shadowIndex = -1;
item->nextUpdate = 1;
item->lastPos.x = -9999;
item->lastPos.y = -9999;
item->lastPos.z = -9999;
D_801565A6 = 30;
item->flags |= ITEM_ENTITY_RESIZABLE;
if (gItemTable[itemID].typeFlags & ITEM_TYPE_FLAG_ENTITY_FULLSIZE) {
item->flags |= ITEM_ENTITY_FLAG_40000;
item->flags &= ~ITEM_ENTITY_RESIZABLE;
}
if (ItemEntityAlternatingSpawn != 0) {
item->flags |= ITEM_ENTITY_FLAG_20000;
}
ItemEntityAlternatingSpawn = 1 - ItemEntityAlternatingSpawn;
switch (item->spawnType) {
case ITEM_SPAWN_MODE_KEY:
item->flags |= ITEM_ENTITY_FLAG_SAVE_ON_RECEIPT;
break;
case ITEM_SPAWN_MODE_DECORATION:
case ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS:
item->flags |= ITEM_ENTITY_FLAG_800000;
break;
case ITEM_SPAWN_MODE_INVISIBLE:
item->flags |= ITEM_ENTITY_FLAG_100000;
break;
case ITEM_SPAWN_MODE_BATTLE_REWARD:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_TOSS_LOWER;
item->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_TOSS_NEVER_VANISH:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_SAVE_ON_TOUCH;
item->flags |= ITEM_ENTITY_FLAG_NEVER_VANISH;
item->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_TOSS:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_SAVE_ON_TOUCH;
item->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_800;
item->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE_NEVER_VANISH:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_800;
item->flags |= ITEM_ENTITY_FLAG_NEVER_VANISH;
item->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_NEVER_VANISH:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_NEVER_VANISH;
item->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_ITEM_BLOCK_ITEM:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_SAVE_ON_TOUCH;
item->flags |= ITEM_ENTITY_FLAG_ANGLE_RELATIVE_VELOCITY;
item->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_ITEM_BLOCK_BADGE:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_SAVE_ON_TOUCH;
item->flags |= ITEM_ENTITY_FLAG_ANGLE_RELATIVE_VELOCITY;
item->flags |= ITEM_ENTITY_FLAG_NEVER_VANISH;
item->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS:
item->flags |= ITEM_ENTITY_FLAG_800000;
break;
case ITEM_SPAWN_MODE_FALL_NEVER_VANISH:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_SAVE_ON_TOUCH;
item->flags |= ITEM_ENTITY_FLAG_NEVER_VANISH;
item->spawnType = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_FALL:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_SAVE_ON_TOUCH;
item->spawnType = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_FALL_SPAWN_ONCE:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_800;
item->spawnType = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_NO_GRAVITY;
item->flags |= ITEM_ENTITY_FLAG_NO_MOTION;
break;
case ITEM_SPAWN_MODE_FIXED_NEVER_VANISH:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_NO_GRAVITY;
item->flags |= ITEM_ENTITY_FLAG_SAVE_ON_TOUCH;
item->flags |= ITEM_ENTITY_FLAG_NEVER_VANISH;
item->flags |= ITEM_ENTITY_FLAG_NO_MOTION;
item->spawnType = ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_FIXED:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_NO_GRAVITY;
item->flags |= ITEM_ENTITY_FLAG_SAVE_ON_TOUCH;
item->flags |= ITEM_ENTITY_FLAG_NO_MOTION;
item->spawnType = ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS_NEVER_VANISH:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_NO_GRAVITY;
item->flags |= ITEM_ENTITY_FLAG_NEVER_VANISH;
item->flags |= ITEM_ENTITY_FLAG_NO_MOTION;
item->spawnType = ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS;
break;
case ITEM_SPAWN_MODE_TOSS_FADE1:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_1000;
item->scale = 0.8f;
item->flags |= ITEM_ENTITY_RESIZABLE;
break;
case ITEM_SPAWN_MODE_TOSS_FADE2:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_1000;
item->flags |= ITEM_ENTITY_FLAG_TOSS_LOWER;
item->spawnType = ITEM_SPAWN_MODE_TOSS_FADE1;
item->scale = 0.8f;
item->flags |= ITEM_ENTITY_RESIZABLE;
break;
case ITEM_SPAWN_MODE_TOSS_FADE3:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_1000;
item->flags |= ITEM_ENTITY_FLAG_400000;
item->spawnType = ITEM_SPAWN_MODE_TOSS_FADE1;
item->scale = 0.8f;
item->flags |= ITEM_ENTITY_RESIZABLE;
break;
case ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
item->scale = 0.8f;
item->flags |= ITEM_ENTITY_RESIZABLE;
break;
case ITEM_SPAWN_MODE_UNKNOWN_1B:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_8000;
item->spawnType = ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS;
item->scale = 0.8f;
item->flags |= ITEM_ENTITY_RESIZABLE;
break;
case ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS:
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_8000;
item->flags |= ITEM_ENTITY_FLAG_NEVER_VANISH;
break;
case ITEM_SPAWN_MODE_ITEM_BLOCK_COIN:
item->spawnType = ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS;
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_8000;
item->flags |= ITEM_ENTITY_FLAG_SAVE_ON_TOUCH;
item->flags |= ITEM_ENTITY_FLAG_NEVER_VANISH;
break;
case ITEM_SPAWN_MODE_TOSS_HIGHER_NEVER_VANISH:
item->spawnType = ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS;
item->flags |= ITEM_ENTITY_FLAG_800000;
item->flags |= ITEM_ENTITY_FLAG_SAVE_ON_TOUCH;
item->flags |= ITEM_ENTITY_FLAG_NEVER_VANISH;
item->flags |= ITEM_ENTITY_FLAG_TOSS_HIGHER;
break;
}
switch (item->spawnType) {
case ITEM_SPAWN_MODE_KEY:
case ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS:
case ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS:
case ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS:
case ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS:
item->shadowIndex = create_shadow_type(0, item->position.x, item->position.y, item->position.z);
shadow = get_shadow_by_index(item->shadowIndex);
if (item->spawnType == ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS) {
shadow->flags |= ENTITY_FLAG_HIDDEN;
}
x = item->position.x;
y = item->position.y + 12.0f;
z = item->position.z;
hitDepth = 1000.0f;
npc_raycast_down_sides(COLLISION_CHANNEL_20000, &x, &y, &z, &hitDepth);
shadow->position.x = x;
shadow->position.y = y;
shadow->position.z = z;
shadow->rotation.x = gGameStatusPtr->playerGroundTraceAngles.x;
shadow->rotation.y = 0.0f;
shadow->rotation.z = gGameStatusPtr->playerGroundTraceAngles.z;
set_standard_shadow_scale(shadow, hitDepth * 0.5f);
break;
}
if (item->pickupDelay != 0) {
hide_item_entity(item);
}
item_entity_load(item);
if (item->itemID == ITEM_COIN) {
sparkle_script_init(item, &SparkleScript_Coin);
sparkle_script_update(item);
}
if (item->itemID == ITEM_STAR_PIECE) {
item->flags &= ~ITEM_ENTITY_FLAG_80;
}
return id;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel lightning_bolt_appendGfx
/* 3BA3A4 E00BC374 27BDFF08 */ addiu $sp, $sp, -0xF8
/* 3BA3A8 E00BC378 0080482D */ daddu $t1, $a0, $zero
/* 3BA3AC E00BC37C 3C0ADB06 */ lui $t2, (0xDB060024 >> 16)
/* 3BA3B0 E00BC380 354A0024 */ ori $t2, $t2, (0xDB060024 & 0xFFFF)
/* 3BA3B4 E00BC384 27A40010 */ addiu $a0, $sp, 0x10
/* 3BA3B8 E00BC388 AFB400B0 */ sw $s4, 0xB0($sp)
/* 3BA3BC E00BC38C 3C140001 */ lui $s4, (0x11630 >> 16)
/* 3BA3C0 E00BC390 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF)
/* 3BA3C4 E00BC394 AFB100A4 */ sw $s1, 0xA4($sp)
/* 3BA3C8 E00BC398 3C11800A */ lui $s1, %hi(gMainGfxPos)
/* 3BA3CC E00BC39C 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos)
/* 3BA3D0 E00BC3A0 3C013DCC */ lui $at, (0x3DCCCCCD >> 16)
/* 3BA3D4 E00BC3A4 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF)
/* 3BA3D8 E00BC3A8 44810000 */ mtc1 $at, $f0
/* 3BA3DC E00BC3AC 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* 3BA3E0 E00BC3B0 AFBF00C4 */ sw $ra, 0xC4($sp)
/* 3BA3E4 E00BC3B4 AFBE00C0 */ sw $fp, 0xC0($sp)
/* 3BA3E8 E00BC3B8 AFB700BC */ sw $s7, 0xBC($sp)
/* 3BA3EC E00BC3BC AFB600B8 */ sw $s6, 0xB8($sp)
/* 3BA3F0 E00BC3C0 AFB500B4 */ sw $s5, 0xB4($sp)
/* 3BA3F4 E00BC3C4 AFB300AC */ sw $s3, 0xAC($sp)
/* 3BA3F8 E00BC3C8 AFB200A8 */ sw $s2, 0xA8($sp)
/* 3BA3FC E00BC3CC AFB000A0 */ sw $s0, 0xA0($sp)
/* 3BA400 E00BC3D0 F7BE00F0 */ sdc1 $f30, 0xF0($sp)
/* 3BA404 E00BC3D4 F7BC00E8 */ sdc1 $f28, 0xE8($sp)
/* 3BA408 E00BC3D8 F7BA00E0 */ sdc1 $f26, 0xE0($sp)
/* 3BA40C E00BC3DC F7B800D8 */ sdc1 $f24, 0xD8($sp)
/* 3BA410 E00BC3E0 F7B600D0 */ sdc1 $f22, 0xD0($sp)
/* 3BA414 E00BC3E4 F7B400C8 */ sdc1 $f20, 0xC8($sp)
/* 3BA418 E00BC3E8 8E280000 */ lw $t0, 0x0($s1)
/* 3BA41C E00BC3EC 8D35000C */ lw $s5, 0xC($t1)
/* 3BA420 E00BC3F0 0100182D */ daddu $v1, $t0, $zero
/* 3BA424 E00BC3F4 44050000 */ mfc1 $a1, $f0
/* 3BA428 E00BC3F8 25080008 */ addiu $t0, $t0, 0x8
/* 3BA42C E00BC3FC AE280000 */ sw $t0, 0x0($s1)
/* 3BA430 E00BC400 8EB7002C */ lw $s7, 0x2C($s5)
/* 3BA434 E00BC404 8EB3003C */ lw $s3, 0x3C($s5)
/* 3BA438 E00BC408 8EB60000 */ lw $s6, 0x0($s5)
/* 3BA43C E00BC40C C6B0004C */ lwc1 $f16, 0x4C($s5)
/* 3BA440 E00BC410 00A0302D */ daddu $a2, $a1, $zero
/* 3BA444 E00BC414 00A0382D */ daddu $a3, $a1, $zero
/* 3BA448 E00BC418 E7B00094 */ swc1 $f16, 0x94($sp)
/* 3BA44C E00BC41C AC620000 */ sw $v0, 0x0($v1)
/* 3BA450 E00BC420 AC600004 */ sw $zero, 0x4($v1)
/* 3BA454 E00BC424 AD0A0000 */ sw $t2, 0x0($t0)
/* 3BA458 E00BC428 8D230010 */ lw $v1, 0x10($t1)
/* 3BA45C E00BC42C 25020008 */ addiu $v0, $t0, 0x8
/* 3BA460 E00BC430 AE220000 */ sw $v0, 0x0($s1)
/* 3BA464 E00BC434 8C62001C */ lw $v0, 0x1C($v1)
/* 3BA468 E00BC438 3C038000 */ lui $v1, (0x80000000 >> 16)
/* 3BA46C E00BC43C 00431021 */ addu $v0, $v0, $v1
/* 3BA470 E00BC440 0C080110 */ jal shim_guScaleF
/* 3BA474 E00BC444 AD020004 */ sw $v0, 0x4($t0)
/* 3BA478 E00BC448 27A40010 */ addiu $a0, $sp, 0x10
/* 3BA47C E00BC44C 3C108007 */ lui $s0, %hi(gMatrixListPos)
/* 3BA480 E00BC450 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos)
/* 3BA484 E00BC454 3C12800A */ lui $s2, %hi(gDisplayContext)
/* 3BA488 E00BC458 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext)
/* 3BA48C E00BC45C 96050000 */ lhu $a1, 0x0($s0)
/* 3BA490 E00BC460 8E420000 */ lw $v0, 0x0($s2)
/* 3BA494 E00BC464 00052980 */ sll $a1, $a1, 6
/* 3BA498 E00BC468 00B42821 */ addu $a1, $a1, $s4
/* 3BA49C E00BC46C 0C080118 */ jal shim_guMtxF2L
/* 3BA4A0 E00BC470 00452821 */ addu $a1, $v0, $a1
/* 3BA4A4 E00BC474 3C03DA38 */ lui $v1, (0xDA380002 >> 16)
/* 3BA4A8 E00BC478 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3BA4AC E00BC47C 327300FF */ andi $s3, $s3, 0xFF
/* 3BA4B0 E00BC480 8E260000 */ lw $a2, 0x0($s1)
/* 3BA4B4 E00BC484 96020000 */ lhu $v0, 0x0($s0)
/* 3BA4B8 E00BC488 00C0202D */ daddu $a0, $a2, $zero
/* 3BA4BC E00BC48C 24C60008 */ addiu $a2, $a2, 0x8
/* 3BA4C0 E00BC490 AE260000 */ sw $a2, 0x0($s1)
/* 3BA4C4 E00BC494 AC830000 */ sw $v1, 0x0($a0)
/* 3BA4C8 E00BC498 24430001 */ addiu $v1, $v0, 0x1
/* 3BA4CC E00BC49C 3042FFFF */ andi $v0, $v0, 0xFFFF
/* 3BA4D0 E00BC4A0 00021180 */ sll $v0, $v0, 6
/* 3BA4D4 E00BC4A4 A6030000 */ sh $v1, 0x0($s0)
/* 3BA4D8 E00BC4A8 8E430000 */ lw $v1, 0x0($s2)
/* 3BA4DC E00BC4AC 00541021 */ addu $v0, $v0, $s4
/* 3BA4E0 E00BC4B0 00621821 */ addu $v1, $v1, $v0
/* 3BA4E4 E00BC4B4 24C20008 */ addiu $v0, $a2, 0x8
/* 3BA4E8 E00BC4B8 AC830004 */ sw $v1, 0x4($a0)
/* 3BA4EC E00BC4BC AE220000 */ sw $v0, 0x0($s1)
/* 3BA4F0 E00BC4C0 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* 3BA4F4 E00BC4C4 ACC20000 */ sw $v0, 0x0($a2)
/* 3BA4F8 E00BC4C8 92A20033 */ lbu $v0, 0x33($s5)
/* 3BA4FC E00BC4CC 92A40037 */ lbu $a0, 0x37($s5)
/* 3BA500 E00BC4D0 92A5003B */ lbu $a1, 0x3B($s5)
/* 3BA504 E00BC4D4 24C30010 */ addiu $v1, $a2, 0x10
/* 3BA508 E00BC4D8 AE230000 */ sw $v1, 0x0($s1)
/* 3BA50C E00BC4DC 3C03FB00 */ lui $v1, (0xFB000000 >> 16)
/* 3BA510 E00BC4E0 ACC30008 */ sw $v1, 0x8($a2)
/* 3BA514 E00BC4E4 00021600 */ sll $v0, $v0, 24
/* 3BA518 E00BC4E8 00042400 */ sll $a0, $a0, 16
/* 3BA51C E00BC4EC 00441025 */ or $v0, $v0, $a0
/* 3BA520 E00BC4F0 00052A00 */ sll $a1, $a1, 8
/* 3BA524 E00BC4F4 00451025 */ or $v0, $v0, $a1
/* 3BA528 E00BC4F8 00531025 */ or $v0, $v0, $s3
/* 3BA52C E00BC4FC ACC20004 */ sw $v0, 0x4($a2)
/* 3BA530 E00BC500 92A20043 */ lbu $v0, 0x43($s5)
/* 3BA534 E00BC504 92A40047 */ lbu $a0, 0x47($s5)
/* 3BA538 E00BC508 92A5004B */ lbu $a1, 0x4B($s5)
/* 3BA53C E00BC50C 24C30018 */ addiu $v1, $a2, 0x18
/* 3BA540 E00BC510 AE230000 */ sw $v1, 0x0($s1)
/* 3BA544 E00BC514 3C03DE00 */ lui $v1, (0xDE000000 >> 16)
/* 3BA548 E00BC518 ACC30010 */ sw $v1, 0x10($a2)
/* 3BA54C E00BC51C 3C030900 */ lui $v1, %hi(D_09001000_40E290)
/* 3BA550 E00BC520 24631000 */ addiu $v1, $v1, %lo(D_09001000_40E290)
/* 3BA554 E00BC524 ACC30014 */ sw $v1, 0x14($a2)
/* 3BA558 E00BC528 00021600 */ sll $v0, $v0, 24
/* 3BA55C E00BC52C 00042400 */ sll $a0, $a0, 16
/* 3BA560 E00BC530 00441025 */ or $v0, $v0, $a0
/* 3BA564 E00BC534 00052A00 */ sll $a1, $a1, 8
/* 3BA568 E00BC538 00451025 */ or $v0, $v0, $a1
/* 3BA56C E00BC53C 34420080 */ ori $v0, $v0, 0x80
/* 3BA570 E00BC540 ACC2000C */ sw $v0, 0xC($a2)
/* 3BA574 E00BC544 24020002 */ addiu $v0, $zero, 0x2
/* 3BA578 E00BC548 12C20011 */ beq $s6, $v0, .LE00BC590
/* 3BA57C E00BC54C 26E4FFFF */ addiu $a0, $s7, -0x1
/* 3BA580 E00BC550 2882000B */ slti $v0, $a0, 0xB
/* 3BA584 E00BC554 10400009 */ beqz $v0, .LE00BC57C
/* 3BA588 E00BC558 00161080 */ sll $v0, $s6, 2
/* 3BA58C E00BC55C 00041840 */ sll $v1, $a0, 1
/* 3BA590 E00BC560 00641821 */ addu $v1, $v1, $a0
/* 3BA594 E00BC564 3C01E00C */ lui $at, (0xE00C0000 >> 16)
/* 3BA598 E00BC568 00220821 */ addu $at, $at, $v0
/* 3BA59C E00BC56C 8C22CE40 */ lw $v0, -0x31C0($at)
/* 3BA5A0 E00BC570 000318C0 */ sll $v1, $v1, 3
/* 3BA5A4 E00BC574 0802F184 */ j .LE00BC610
/* 3BA5A8 E00BC578 00439021 */ addu $s2, $v0, $v1
.LE00BC57C:
/* 3BA5AC E00BC57C 3C01E00C */ lui $at, (0xE00C0000 >> 16)
/* 3BA5B0 E00BC580 00220821 */ addu $at, $at, $v0
/* 3BA5B4 E00BC584 8C22CE40 */ lw $v0, -0x31C0($at)
/* 3BA5B8 E00BC588 0802F184 */ j .LE00BC610
/* 3BA5BC E00BC58C 245200F0 */ addiu $s2, $v0, 0xF0
.LE00BC590:
/* 3BA5C0 E00BC590 28820008 */ slti $v0, $a0, 0x8
/* 3BA5C4 E00BC594 10400007 */ beqz $v0, .LE00BC5B4
/* 3BA5C8 E00BC598 00041040 */ sll $v0, $a0, 1
/* 3BA5CC E00BC59C 00441021 */ addu $v0, $v0, $a0
/* 3BA5D0 E00BC5A0 3C03E00C */ lui $v1, (0xE00C0000 >> 16)
/* 3BA5D4 E00BC5A4 8C63CE40 */ lw $v1, -0x31C0($v1)
/* 3BA5D8 E00BC5A8 000210C0 */ sll $v0, $v0, 3
/* 3BA5DC E00BC5AC 0802F184 */ j .LE00BC610
/* 3BA5E0 E00BC5B0 00629021 */ addu $s2, $v1, $v0
.LE00BC5B4:
/* 3BA5E4 E00BC5B4 28820024 */ slti $v0, $a0, 0x24
/* 3BA5E8 E00BC5B8 10400012 */ beqz $v0, .LE00BC604
/* 3BA5EC E00BC5BC 3C022AAA */ lui $v0, (0x2AAAAAAB >> 16)
/* 3BA5F0 E00BC5C0 3442AAAB */ ori $v0, $v0, (0x2AAAAAAB & 0xFFFF)
/* 3BA5F4 E00BC5C4 00820018 */ mult $a0, $v0
/* 3BA5F8 E00BC5C8 00041FC3 */ sra $v1, $a0, 31
/* 3BA5FC E00BC5CC 00007010 */ mfhi $t6
/* 3BA600 E00BC5D0 01C31823 */ subu $v1, $t6, $v1
/* 3BA604 E00BC5D4 00031040 */ sll $v0, $v1, 1
/* 3BA608 E00BC5D8 00431021 */ addu $v0, $v0, $v1
/* 3BA60C E00BC5DC 00021040 */ sll $v0, $v0, 1
/* 3BA610 E00BC5E0 00821023 */ subu $v0, $a0, $v0
/* 3BA614 E00BC5E4 00021840 */ sll $v1, $v0, 1
/* 3BA618 E00BC5E8 00621821 */ addu $v1, $v1, $v0
/* 3BA61C E00BC5EC 000318C0 */ sll $v1, $v1, 3
/* 3BA620 E00BC5F0 3C02E00C */ lui $v0, (0xE00C0000 >> 16)
/* 3BA624 E00BC5F4 8C42CE40 */ lw $v0, -0x31C0($v0)
/* 3BA628 E00BC5F8 24630030 */ addiu $v1, $v1, 0x30
/* 3BA62C E00BC5FC 0802F184 */ j .LE00BC610
/* 3BA630 E00BC600 00439021 */ addu $s2, $v0, $v1
.LE00BC604:
/* 3BA634 E00BC604 3C02E00C */ lui $v0, (0xE00C0000 >> 16)
/* 3BA638 E00BC608 8C42CE40 */ lw $v0, -0x31C0($v0)
/* 3BA63C E00BC60C 245200F0 */ addiu $s2, $v0, 0xF0
.LE00BC610:
/* 3BA640 E00BC610 0000982D */ daddu $s3, $zero, $zero
/* 3BA644 E00BC614 02A0882D */ daddu $s1, $s5, $zero
/* 3BA648 E00BC618 3C013DBA */ lui $at, (0x3DBA2E8C >> 16)
/* 3BA64C E00BC61C 34212E8C */ ori $at, $at, (0x3DBA2E8C & 0xFFFF)
/* 3BA650 E00BC620 4481F000 */ mtc1 $at, $f30
.LE00BC624:
/* 3BA654 E00BC624 3C058888 */ lui $a1, (0x88888889 >> 16)
/* 3BA658 E00BC628 34A58889 */ ori $a1, $a1, (0x88888889 & 0xFFFF)
/* 3BA65C E00BC62C 02771823 */ subu $v1, $s3, $s7
/* 3BA660 E00BC630 00031080 */ sll $v0, $v1, 2
/* 3BA664 E00BC634 00431021 */ addu $v0, $v0, $v1
/* 3BA668 E00BC638 8EA40110 */ lw $a0, 0x110($s5)
/* 3BA66C E00BC63C 00021040 */ sll $v0, $v0, 1
/* 3BA670 E00BC640 00822021 */ addu $a0, $a0, $v0
/* 3BA674 E00BC644 00850018 */ mult $a0, $a1
/* 3BA678 E00BC648 C6B8001C */ lwc1 $f24, 0x1C($s5)
/* 3BA67C E00BC64C C6A00010 */ lwc1 $f0, 0x10($s5)
/* 3BA680 E00BC650 4600C601 */ sub.s $f24, $f24, $f0
/* 3BA684 E00BC654 461EC602 */ mul.s $f24, $f24, $f30
/* 3BA688 E00BC658 00000000 */ nop
/* 3BA68C E00BC65C C6B60020 */ lwc1 $f22, 0x20($s5)
/* 3BA690 E00BC660 C6A00014 */ lwc1 $f0, 0x14($s5)
/* 3BA694 E00BC664 4600B581 */ sub.s $f22, $f22, $f0
/* 3BA698 E00BC668 461EB582 */ mul.s $f22, $f22, $f30
/* 3BA69C E00BC66C 00000000 */ nop
/* 3BA6A0 E00BC670 02538021 */ addu $s0, $s2, $s3
/* 3BA6A4 E00BC674 000417C3 */ sra $v0, $a0, 31
/* 3BA6A8 E00BC678 00007010 */ mfhi $t6
/* 3BA6AC E00BC67C 01C41821 */ addu $v1, $t6, $a0
/* 3BA6B0 E00BC680 00031983 */ sra $v1, $v1, 6
/* 3BA6B4 E00BC684 00621823 */ subu $v1, $v1, $v0
/* 3BA6B8 E00BC688 00031100 */ sll $v0, $v1, 4
/* 3BA6BC E00BC68C 00431023 */ subu $v0, $v0, $v1
/* 3BA6C0 E00BC690 000210C0 */ sll $v0, $v0, 3
/* 3BA6C4 E00BC694 00822023 */ subu $a0, $a0, $v0
/* 3BA6C8 E00BC698 2484FFC4 */ addiu $a0, $a0, -0x3C
/* 3BA6CC E00BC69C 4484E000 */ mtc1 $a0, $f28
/* 3BA6D0 E00BC6A0 00000000 */ nop
/* 3BA6D4 E00BC6A4 4680E720 */ cvt.s.w $f28, $f28
/* 3BA6D8 E00BC6A8 92020000 */ lbu $v0, 0x0($s0)
/* 3BA6DC E00BC6AC 4482D000 */ mtc1 $v0, $f26
/* 3BA6E0 E00BC6B0 00000000 */ nop
/* 3BA6E4 E00BC6B4 4680D6A0 */ cvt.s.w $f26, $f26
/* 3BA6E8 E00BC6B8 0C080140 */ jal shim_sin_deg
/* 3BA6EC E00BC6BC 4600E306 */ mov.s $f12, $f28
/* 3BA6F0 E00BC6C0 461A0502 */ mul.s $f20, $f0, $f26
/* 3BA6F4 E00BC6C4 00000000 */ nop
/* 3BA6F8 E00BC6C8 3C01E00C */ lui $at, (0xE00C0000 >> 16)
/* 3BA6FC E00BC6CC D430CE58 */ ldc1 $f16, -0x31A8($at)
/* 3BA700 E00BC6D0 4600A521 */ cvt.d.s $f20, $f20
/* 3BA704 E00BC6D4 4630A502 */ mul.d $f20, $f20, $f16
/* 3BA708 E00BC6D8 00000000 */ nop
/* 3BA70C E00BC6DC 4600E306 */ mov.s $f12, $f28
/* 3BA710 E00BC6E0 0C080144 */ jal shim_cos_deg
/* 3BA714 E00BC6E4 4620A520 */ cvt.s.d $f20, $f20
/* 3BA718 E00BC6E8 461A0002 */ mul.s $f0, $f0, $f26
/* 3BA71C E00BC6EC 00000000 */ nop
/* 3BA720 E00BC6F0 3C01E00C */ lui $at, (0xE00C0000 >> 16)
/* 3BA724 E00BC6F4 D430CE60 */ ldc1 $f16, -0x31A0($at)
/* 3BA728 E00BC6F8 46000021 */ cvt.d.s $f0, $f0
/* 3BA72C E00BC6FC 46300002 */ mul.d $f0, $f0, $f16
/* 3BA730 E00BC700 00000000 */ nop
/* 3BA734 E00BC704 4614B182 */ mul.s $f6, $f22, $f20
/* 3BA738 E00BC708 00000000 */ nop
/* 3BA73C E00BC70C C6A2001C */ lwc1 $f2, 0x1C($s5)
/* 3BA740 E00BC710 C6A40010 */ lwc1 $f4, 0x10($s5)
/* 3BA744 E00BC714 46041081 */ sub.s $f2, $f2, $f4
/* 3BA748 E00BC718 44935000 */ mtc1 $s3, $f10
/* 3BA74C E00BC71C 00000000 */ nop
/* 3BA750 E00BC720 468052A0 */ cvt.s.w $f10, $f10
/* 3BA754 E00BC724 460A1082 */ mul.s $f2, $f2, $f10
/* 3BA758 E00BC728 00000000 */ nop
/* 3BA75C E00BC72C 461E1082 */ mul.s $f2, $f2, $f30
/* 3BA760 E00BC730 00000000 */ nop
/* 3BA764 E00BC734 46200020 */ cvt.s.d $f0, $f0
/* 3BA768 E00BC738 4600C202 */ mul.s $f8, $f24, $f0
/* 3BA76C E00BC73C 00000000 */ nop
/* 3BA770 E00BC740 4614C602 */ mul.s $f24, $f24, $f20
/* 3BA774 E00BC744 00000000 */ nop
/* 3BA778 E00BC748 46022100 */ add.s $f4, $f4, $f2
/* 3BA77C E00BC74C 46064201 */ sub.s $f8, $f8, $f6
/* 3BA780 E00BC750 46082100 */ add.s $f4, $f4, $f8
/* 3BA784 E00BC754 4600B582 */ mul.s $f22, $f22, $f0
/* 3BA788 E00BC758 00000000 */ nop
/* 3BA78C E00BC75C E6240050 */ swc1 $f4, 0x50($s1)
/* 3BA790 E00BC760 C6A20020 */ lwc1 $f2, 0x20($s5)
/* 3BA794 E00BC764 C6A40014 */ lwc1 $f4, 0x14($s5)
/* 3BA798 E00BC768 46041081 */ sub.s $f2, $f2, $f4
/* 3BA79C E00BC76C 460A1082 */ mul.s $f2, $f2, $f10
/* 3BA7A0 E00BC770 00000000 */ nop
/* 3BA7A4 E00BC774 461E1082 */ mul.s $f2, $f2, $f30
/* 3BA7A8 E00BC778 00000000 */ nop
/* 3BA7AC E00BC77C 4616C600 */ add.s $f24, $f24, $f22
/* 3BA7B0 E00BC780 46022100 */ add.s $f4, $f4, $f2
/* 3BA7B4 E00BC784 46182100 */ add.s $f4, $f4, $f24
/* 3BA7B8 E00BC788 E6240080 */ swc1 $f4, 0x80($s1)
/* 3BA7BC E00BC78C C6A00024 */ lwc1 $f0, 0x24($s5)
/* 3BA7C0 E00BC790 C6A20018 */ lwc1 $f2, 0x18($s5)
/* 3BA7C4 E00BC794 46020001 */ sub.s $f0, $f0, $f2
/* 3BA7C8 E00BC798 460A0002 */ mul.s $f0, $f0, $f10
/* 3BA7CC E00BC79C 00000000 */ nop
/* 3BA7D0 E00BC7A0 461E0002 */ mul.s $f0, $f0, $f30
/* 3BA7D4 E00BC7A4 00000000 */ nop
/* 3BA7D8 E00BC7A8 46001080 */ add.s $f2, $f2, $f0
/* 3BA7DC E00BC7AC 44808000 */ mtc1 $zero, $f16
/* 3BA7E0 E00BC7B0 00000000 */ nop
/* 3BA7E4 E00BC7B4 46101080 */ add.s $f2, $f2, $f16
/* 3BA7E8 E00BC7B8 E62200B0 */ swc1 $f2, 0xB0($s1)
/* 3BA7EC E00BC7BC 9202000C */ lbu $v0, 0xC($s0)
/* 3BA7F0 E00BC7C0 3C01E00C */ lui $at, (0xE00C0000 >> 16)
/* 3BA7F4 E00BC7C4 D422CE68 */ ldc1 $f2, -0x3198($at)
/* 3BA7F8 E00BC7C8 44820000 */ mtc1 $v0, $f0
/* 3BA7FC E00BC7CC 00000000 */ nop
/* 3BA800 E00BC7D0 46800020 */ cvt.s.w $f0, $f0
/* 3BA804 E00BC7D4 46000021 */ cvt.d.s $f0, $f0
/* 3BA808 E00BC7D8 46220002 */ mul.d $f0, $f0, $f2
/* 3BA80C E00BC7DC 00000000 */ nop
/* 3BA810 E00BC7E0 26730001 */ addiu $s3, $s3, 0x1
/* 3BA814 E00BC7E4 2A62000C */ slti $v0, $s3, 0xC
/* 3BA818 E00BC7E8 46200020 */ cvt.s.d $f0, $f0
/* 3BA81C E00BC7EC E62000E0 */ swc1 $f0, 0xE0($s1)
/* 3BA820 E00BC7F0 1440FF8C */ bnez $v0, .LE00BC624
/* 3BA824 E00BC7F4 26310004 */ addiu $s1, $s1, 0x4
/* 3BA828 E00BC7F8 0000982D */ daddu $s3, $zero, $zero
/* 3BA82C E00BC7FC 0260F02D */ daddu $fp, $s3, $zero
/* 3BA830 E00BC800 0260B82D */ daddu $s7, $s3, $zero
/* 3BA834 E00BC804 0260B02D */ daddu $s6, $s3, $zero
/* 3BA838 E00BC808 02A0902D */ daddu $s2, $s5, $zero
/* 3BA83C E00BC80C 46008706 */ mov.s $f28, $f16
/* 3BA840 E00BC810 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* 3BA844 E00BC814 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* 3BA848 E00BC818 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 3BA84C E00BC81C 4481F000 */ mtc1 $at, $f30
/* 3BA850 E00BC820 3C02DE01 */ lui $v0, (0xDE010000 >> 16)
/* 3BA854 E00BC824 AFA00098 */ sw $zero, 0x98($sp)
/* 3BA858 E00BC828 8C830000 */ lw $v1, 0x0($a0)
/* 3BA85C E00BC82C 3C014120 */ lui $at, (0x41200000 >> 16)
/* 3BA860 E00BC830 4481D000 */ mtc1 $at, $f26
/* 3BA864 E00BC834 246E0008 */ addiu $t6, $v1, 0x8
/* 3BA868 E00BC838 01C0A02D */ daddu $s4, $t6, $zero
/* 3BA86C E00BC83C 24710016 */ addiu $s1, $v1, 0x16
/* 3BA870 E00BC840 AFAE0090 */ sw $t6, 0x90($sp)
/* 3BA874 E00BC844 AC620000 */ sw $v0, 0x0($v1)
/* 3BA878 E00BC848 24620188 */ addiu $v0, $v1, 0x188
/* 3BA87C E00BC84C AC620004 */ sw $v0, 0x4($v1)
/* 3BA880 E00BC850 AC820000 */ sw $v0, 0x0($a0)
.LE00BC854:
/* 3BA884 E00BC854 1660000D */ bnez $s3, .LE00BC88C
/* 3BA888 E00BC858 2402000B */ addiu $v0, $zero, 0xB
/* 3BA88C E00BC85C 3C014100 */ lui $at, (0x41000000 >> 16)
/* 3BA890 E00BC860 4481C000 */ mtc1 $at, $f24
/* 3BA894 E00BC864 C6AC0084 */ lwc1 $f12, 0x84($s5)
/* 3BA898 E00BC868 8EA60080 */ lw $a2, 0x80($s5)
/* 3BA89C E00BC86C C6A00050 */ lwc1 $f0, 0x50($s5)
/* 3BA8A0 E00BC870 C6AE0054 */ lwc1 $f14, 0x54($s5)
/* 3BA8A4 E00BC874 46000007 */ neg.s $f0, $f0
/* 3BA8A8 E00BC878 44070000 */ mfc1 $a3, $f0
/* 3BA8AC E00BC87C 0C080148 */ jal shim_atan2
/* 3BA8B0 E00BC880 46007387 */ neg.s $f14, $f14
/* 3BA8B4 E00BC884 0802F25B */ j .LE00BC96C
/* 3BA8B8 E00BC888 46000587 */ neg.s $f22, $f0
.LE00BC88C:
/* 3BA8BC E00BC88C 3C014100 */ lui $at, (0x41000000 >> 16)
/* 3BA8C0 E00BC890 4481C000 */ mtc1 $at, $f24
/* 3BA8C4 E00BC894 16620005 */ bne $s3, $v0, .LE00BC8AC
/* 3BA8C8 E00BC898 26620001 */ addiu $v0, $s3, 0x1
/* 3BA8CC E00BC89C 3C01C2B4 */ lui $at, (0xC2B40000 >> 16)
/* 3BA8D0 E00BC8A0 4481B000 */ mtc1 $at, $f22
/* 3BA8D4 E00BC8A4 0802F25B */ j .LE00BC96C
/* 3BA8D8 E00BC8A8 00000000 */ nop
.LE00BC8AC:
/* 3BA8DC E00BC8AC 00021080 */ sll $v0, $v0, 2
/* 3BA8E0 E00BC8B0 02A21021 */ addu $v0, $s5, $v0
/* 3BA8E4 E00BC8B4 C44C0080 */ lwc1 $f12, 0x80($v0)
/* 3BA8E8 E00BC8B8 8E460080 */ lw $a2, 0x80($s2)
/* 3BA8EC E00BC8BC C6400050 */ lwc1 $f0, 0x50($s2)
/* 3BA8F0 E00BC8C0 C44E0050 */ lwc1 $f14, 0x50($v0)
/* 3BA8F4 E00BC8C4 46000007 */ neg.s $f0, $f0
/* 3BA8F8 E00BC8C8 44070000 */ mfc1 $a3, $f0
/* 3BA8FC E00BC8CC 0C080148 */ jal shim_atan2
/* 3BA900 E00BC8D0 46007387 */ neg.s $f14, $f14
/* 3BA904 E00BC8D4 2662FFFF */ addiu $v0, $s3, -0x1
/* 3BA908 E00BC8D8 00021080 */ sll $v0, $v0, 2
/* 3BA90C E00BC8DC 02A21021 */ addu $v0, $s5, $v0
/* 3BA910 E00BC8E0 C64C0080 */ lwc1 $f12, 0x80($s2)
/* 3BA914 E00BC8E4 8C460080 */ lw $a2, 0x80($v0)
/* 3BA918 E00BC8E8 46000507 */ neg.s $f20, $f0
/* 3BA91C E00BC8EC C4400050 */ lwc1 $f0, 0x50($v0)
/* 3BA920 E00BC8F0 C64E0050 */ lwc1 $f14, 0x50($s2)
/* 3BA924 E00BC8F4 46000007 */ neg.s $f0, $f0
/* 3BA928 E00BC8F8 44070000 */ mfc1 $a3, $f0
/* 3BA92C E00BC8FC 0C080148 */ jal shim_atan2
/* 3BA930 E00BC900 46007387 */ neg.s $f14, $f14
/* 3BA934 E00BC904 46000087 */ neg.s $f2, $f0
/* 3BA938 E00BC908 46141101 */ sub.s $f4, $f2, $f20
/* 3BA93C E00BC90C 3C014334 */ lui $at, (0x43340000 >> 16)
/* 3BA940 E00BC910 44810000 */ mtc1 $at, $f0
/* 3BA944 E00BC914 00000000 */ nop
/* 3BA948 E00BC918 4604003C */ c.lt.s $f0, $f4
/* 3BA94C E00BC91C 00000000 */ nop
/* 3BA950 E00BC920 45000003 */ bc1f .LE00BC930
/* 3BA954 E00BC924 00000000 */ nop
/* 3BA958 E00BC928 0802F253 */ j .LE00BC94C
/* 3BA95C E00BC92C 461EA500 */ add.s $f20, $f20, $f30
.LE00BC930:
/* 3BA960 E00BC930 3C01C334 */ lui $at, (0xC3340000 >> 16)
/* 3BA964 E00BC934 44810000 */ mtc1 $at, $f0
/* 3BA968 E00BC938 00000000 */ nop
/* 3BA96C E00BC93C 4600203C */ c.lt.s $f4, $f0
/* 3BA970 E00BC940 00000000 */ nop
/* 3BA974 E00BC944 45030001 */ bc1tl .LE00BC94C
/* 3BA978 E00BC948 461E1080 */ add.s $f2, $f2, $f30
.LE00BC94C:
/* 3BA97C E00BC94C 4602A580 */ add.s $f22, $f20, $f2
/* 3BA980 E00BC950 3C013FE0 */ lui $at, (0x3FE00000 >> 16)
/* 3BA984 E00BC954 44810800 */ mtc1 $at, $f1
/* 3BA988 E00BC958 44800000 */ mtc1 $zero, $f0
/* 3BA98C E00BC95C 4600B0A1 */ cvt.d.s $f2, $f22
/* 3BA990 E00BC960 46201082 */ mul.d $f2, $f2, $f0
/* 3BA994 E00BC964 00000000 */ nop
/* 3BA998 E00BC968 462015A0 */ cvt.s.d $f22, $f2
.LE00BC96C:
/* 3BA99C E00BC96C C64000E0 */ lwc1 $f0, 0xE0($s2)
/* 3BA9A0 E00BC970 C7B00094 */ lwc1 $f16, 0x94($sp)
/* 3BA9A4 E00BC974 46008002 */ mul.s $f0, $f16, $f0
/* 3BA9A8 E00BC978 00000000 */ nop
/* 3BA9AC E00BC97C 4600B306 */ mov.s $f12, $f22
/* 3BA9B0 E00BC980 8FAE0098 */ lw $t6, 0x98($sp)
/* 3BA9B4 E00BC984 4600C602 */ mul.s $f24, $f24, $f0
/* 3BA9B8 E00BC988 00000000 */ nop
/* 3BA9BC E00BC98C 24100080 */ addiu $s0, $zero, 0x80
/* 3BA9C0 E00BC990 020E8023 */ subu $s0, $s0, $t6
/* 3BA9C4 E00BC994 0C080140 */ jal shim_sin_deg
/* 3BA9C8 E00BC998 00108140 */ sll $s0, $s0, 5
/* 3BA9CC E00BC99C 4600C502 */ mul.s $f20, $f24, $f0
/* 3BA9D0 E00BC9A0 00000000 */ nop
/* 3BA9D4 E00BC9A4 0C080144 */ jal shim_cos_deg
/* 3BA9D8 E00BC9A8 4600B306 */ mov.s $f12, $f22
/* 3BA9DC E00BC9AC C6420050 */ lwc1 $f2, 0x50($s2)
/* 3BA9E0 E00BC9B0 46141080 */ add.s $f2, $f2, $f20
/* 3BA9E4 E00BC9B4 461A1082 */ mul.s $f2, $f2, $f26
/* 3BA9E8 E00BC9B8 00000000 */ nop
/* 3BA9EC E00BC9BC 4600C002 */ mul.s $f0, $f24, $f0
/* 3BA9F0 E00BC9C0 00000000 */ nop
/* 3BA9F4 E00BC9C4 4600140D */ trunc.w.s $f16, $f2
/* 3BA9F8 E00BC9C8 44028000 */ mfc1 $v0, $f16
/* 3BA9FC E00BC9CC 00000000 */ nop
/* 3BAA00 E00BC9D0 A6820000 */ sh $v0, 0x0($s4)
/* 3BAA04 E00BC9D4 C6420080 */ lwc1 $f2, 0x80($s2)
/* 3BAA08 E00BC9D8 46001080 */ add.s $f2, $f2, $f0
/* 3BAA0C E00BC9DC 461A1082 */ mul.s $f2, $f2, $f26
/* 3BAA10 E00BC9E0 00000000 */ nop
/* 3BAA14 E00BC9E4 4600140D */ trunc.w.s $f16, $f2
/* 3BAA18 E00BC9E8 44028000 */ mfc1 $v0, $f16
/* 3BAA1C E00BC9EC 00000000 */ nop
/* 3BAA20 E00BC9F0 A622FFF4 */ sh $v0, -0xC($s1)
/* 3BAA24 E00BC9F4 C64200B0 */ lwc1 $f2, 0xB0($s2)
/* 3BAA28 E00BC9F8 461C1080 */ add.s $f2, $f2, $f28
/* 3BAA2C E00BC9FC A630FFFA */ sh $s0, -0x6($s1)
/* 3BAA30 E00BCA00 461A1082 */ mul.s $f2, $f2, $f26
/* 3BAA34 E00BCA04 00000000 */ nop
/* 3BAA38 E00BCA08 A620FFFC */ sh $zero, -0x4($s1)
/* 3BAA3C E00BCA0C A236FFFE */ sb $s6, -0x2($s1)
/* 3BAA40 E00BCA10 A237FFFF */ sb $s7, -0x1($s1)
/* 3BAA44 E00BCA14 A23E0000 */ sb $fp, 0x0($s1)
/* 3BAA48 E00BCA18 4600140D */ trunc.w.s $f16, $f2
/* 3BAA4C E00BCA1C 44028000 */ mfc1 $v0, $f16
/* 3BAA50 E00BCA20 00000000 */ nop
/* 3BAA54 E00BCA24 A622FFF6 */ sh $v0, -0xA($s1)
/* 3BAA58 E00BCA28 C6420050 */ lwc1 $f2, 0x50($s2)
/* 3BAA5C E00BCA2C 46141081 */ sub.s $f2, $f2, $f20
/* 3BAA60 E00BCA30 461A1082 */ mul.s $f2, $f2, $f26
/* 3BAA64 E00BCA34 00000000 */ nop
/* 3BAA68 E00BCA38 26940010 */ addiu $s4, $s4, 0x10
/* 3BAA6C E00BCA3C 4600140D */ trunc.w.s $f16, $f2
/* 3BAA70 E00BCA40 44028000 */ mfc1 $v0, $f16
/* 3BAA74 E00BCA44 00000000 */ nop
/* 3BAA78 E00BCA48 A6820000 */ sh $v0, 0x0($s4)
/* 3BAA7C E00BCA4C C6420080 */ lwc1 $f2, 0x80($s2)
/* 3BAA80 E00BCA50 46001081 */ sub.s $f2, $f2, $f0
/* 3BAA84 E00BCA54 26730001 */ addiu $s3, $s3, 0x1
/* 3BAA88 E00BCA58 461A1082 */ mul.s $f2, $f2, $f26
/* 3BAA8C E00BCA5C 00000000 */ nop
/* 3BAA90 E00BCA60 8FAE0098 */ lw $t6, 0x98($sp)
/* 3BAA94 E00BCA64 26310010 */ addiu $s1, $s1, 0x10
/* 3BAA98 E00BCA68 25CE000C */ addiu $t6, $t6, 0xC
/* 3BAA9C E00BCA6C AFAE0098 */ sw $t6, 0x98($sp)
/* 3BAAA0 E00BCA70 4600140D */ trunc.w.s $f16, $f2
/* 3BAAA4 E00BCA74 44028000 */ mfc1 $v0, $f16
/* 3BAAA8 E00BCA78 00000000 */ nop
/* 3BAAAC E00BCA7C A622FFF4 */ sh $v0, -0xC($s1)
/* 3BAAB0 E00BCA80 C64000B0 */ lwc1 $f0, 0xB0($s2)
/* 3BAAB4 E00BCA84 26940010 */ addiu $s4, $s4, 0x10
/* 3BAAB8 E00BCA88 A23E0000 */ sb $fp, 0x0($s1)
/* 3BAABC E00BCA8C 27DE001E */ addiu $fp, $fp, 0x1E
/* 3BAAC0 E00BCA90 A237FFFF */ sb $s7, -0x1($s1)
/* 3BAAC4 E00BCA94 26F70078 */ addiu $s7, $s7, 0x78
/* 3BAAC8 E00BCA98 461C0000 */ add.s $f0, $f0, $f28
/* 3BAACC E00BCA9C A236FFFE */ sb $s6, -0x2($s1)
/* 3BAAD0 E00BCAA0 26D60032 */ addiu $s6, $s6, 0x32
/* 3BAAD4 E00BCAA4 461A0002 */ mul.s $f0, $f0, $f26
/* 3BAAD8 E00BCAA8 00000000 */ nop
/* 3BAADC E00BCAAC 26520004 */ addiu $s2, $s2, 0x4
/* 3BAAE0 E00BCAB0 24020400 */ addiu $v0, $zero, 0x400
/* 3BAAE4 E00BCAB4 A630FFFA */ sh $s0, -0x6($s1)
/* 3BAAE8 E00BCAB8 A622FFFC */ sh $v0, -0x4($s1)
/* 3BAAEC E00BCABC 4600040D */ trunc.w.s $f16, $f0
/* 3BAAF0 E00BCAC0 44028000 */ mfc1 $v0, $f16
/* 3BAAF4 E00BCAC4 00000000 */ nop
/* 3BAAF8 E00BCAC8 A622FFF6 */ sh $v0, -0xA($s1)
/* 3BAAFC E00BCACC 2A62000C */ slti $v0, $s3, 0xC
/* 3BAB00 E00BCAD0 1440FF60 */ bnez $v0, .LE00BC854
/* 3BAB04 E00BCAD4 26310010 */ addiu $s1, $s1, 0x10
/* 3BAB08 E00BCAD8 0260382D */ daddu $a3, $s3, $zero
/* 3BAB0C E00BCADC 3C08D9DF */ lui $t0, (0xD9DFFFFF >> 16)
/* 3BAB10 E00BCAE0 3508FFFF */ ori $t0, $t0, (0xD9DFFFFF & 0xFFFF)
/* 3BAB14 E00BCAE4 3C09800A */ lui $t1, %hi(gMainGfxPos)
/* 3BAB18 E00BCAE8 2529A66C */ addiu $t1, $t1, %lo(gMainGfxPos)
/* 3BAB1C E00BCAEC 00071040 */ sll $v0, $a3, 1
/* 3BAB20 E00BCAF0 0000982D */ daddu $s3, $zero, $zero
/* 3BAB24 E00BCAF4 304400FF */ andi $a0, $v0, 0xFF
/* 3BAB28 E00BCAF8 00042300 */ sll $a0, $a0, 12
/* 3BAB2C E00BCAFC 3042007F */ andi $v0, $v0, 0x7F
/* 3BAB30 E00BCB00 00021040 */ sll $v0, $v0, 1
/* 3BAB34 E00BCB04 3C030100 */ lui $v1, (0x1000000 >> 16)
/* 3BAB38 E00BCB08 00431025 */ or $v0, $v0, $v1
/* 3BAB3C E00BCB0C 00822025 */ or $a0, $a0, $v0
/* 3BAB40 E00BCB10 8D250000 */ lw $a1, 0x0($t1)
/* 3BAB44 E00BCB14 24EBFFFF */ addiu $t3, $a3, -0x1
/* 3BAB48 E00BCB18 00A0302D */ daddu $a2, $a1, $zero
/* 3BAB4C E00BCB1C 24A50008 */ addiu $a1, $a1, 0x8
/* 3BAB50 E00BCB20 AD250000 */ sw $a1, 0x0($t1)
/* 3BAB54 E00BCB24 ACC40000 */ sw $a0, 0x0($a2)
/* 3BAB58 E00BCB28 8FAE0090 */ lw $t6, 0x90($sp)
/* 3BAB5C E00BCB2C 24A20008 */ addiu $v0, $a1, 0x8
/* 3BAB60 E00BCB30 ACCE0004 */ sw $t6, 0x4($a2)
/* 3BAB64 E00BCB34 AD220000 */ sw $v0, 0x0($t1)
/* 3BAB68 E00BCB38 ACA80000 */ sw $t0, 0x0($a1)
/* 3BAB6C E00BCB3C 1960001E */ blez $t3, .LE00BCBB8
/* 3BAB70 E00BCB40 ACA00004 */ sw $zero, 0x4($a1)
/* 3BAB74 E00BCB44 0120602D */ daddu $t4, $t1, $zero
/* 3BAB78 E00BCB48 3C0D0600 */ lui $t5, (0x6000000 >> 16)
/* 3BAB7C E00BCB4C 240A0006 */ addiu $t2, $zero, 0x6
/* 3BAB80 E00BCB50 24090004 */ addiu $t1, $zero, 0x4
/* 3BAB84 E00BCB54 24080002 */ addiu $t0, $zero, 0x2
.LE00BCB58:
/* 3BAB88 E00BCB58 314700FF */ andi $a3, $t2, 0xFF
/* 3BAB8C E00BCB5C 254A0004 */ addiu $t2, $t2, 0x4
/* 3BAB90 E00BCB60 312500FF */ andi $a1, $t1, 0xFF
/* 3BAB94 E00BCB64 25290004 */ addiu $t1, $t1, 0x4
/* 3BAB98 E00BCB68 310400FF */ andi $a0, $t0, 0xFF
/* 3BAB9C E00BCB6C 25080004 */ addiu $t0, $t0, 0x4
/* 3BABA0 E00BCB70 00131280 */ sll $v0, $s3, 10
/* 3BABA4 E00BCB74 26730001 */ addiu $s3, $s3, 0x1
/* 3BABA8 E00BCB78 00042400 */ sll $a0, $a0, 16
/* 3BABAC E00BCB7C 3042FC00 */ andi $v0, $v0, 0xFC00
/* 3BABB0 E00BCB80 00821025 */ or $v0, $a0, $v0
/* 3BABB4 E00BCB84 00451025 */ or $v0, $v0, $a1
/* 3BABB8 E00BCB88 004D1025 */ or $v0, $v0, $t5
/* 3BABBC E00BCB8C 00052A00 */ sll $a1, $a1, 8
/* 3BABC0 E00BCB90 00852025 */ or $a0, $a0, $a1
/* 3BABC4 E00BCB94 8D830000 */ lw $v1, 0x0($t4)
/* 3BABC8 E00BCB98 00872025 */ or $a0, $a0, $a3
/* 3BABCC E00BCB9C 0060302D */ daddu $a2, $v1, $zero
/* 3BABD0 E00BCBA0 24630008 */ addiu $v1, $v1, 0x8
/* 3BABD4 E00BCBA4 AD830000 */ sw $v1, 0x0($t4)
/* 3BABD8 E00BCBA8 ACC20000 */ sw $v0, 0x0($a2)
/* 3BABDC E00BCBAC 026B102A */ slt $v0, $s3, $t3
/* 3BABE0 E00BCBB0 1440FFE9 */ bnez $v0, .LE00BCB58
/* 3BABE4 E00BCBB4 ACC40004 */ sw $a0, 0x4($a2)
.LE00BCBB8:
/* 3BABE8 E00BCBB8 3C05D838 */ lui $a1, (0xD8380002 >> 16)
/* 3BABEC E00BCBBC 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* 3BABF0 E00BCBC0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* 3BABF4 E00BCBC4 8C620000 */ lw $v0, 0x0($v1)
/* 3BABF8 E00BCBC8 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF)
/* 3BABFC E00BCBCC 0040202D */ daddu $a0, $v0, $zero
/* 3BAC00 E00BCBD0 24420008 */ addiu $v0, $v0, 0x8
/* 3BAC04 E00BCBD4 AC620000 */ sw $v0, 0x0($v1)
/* 3BAC08 E00BCBD8 24020040 */ addiu $v0, $zero, 0x40
/* 3BAC0C E00BCBDC AC850000 */ sw $a1, 0x0($a0)
/* 3BAC10 E00BCBE0 AC820004 */ sw $v0, 0x4($a0)
/* 3BAC14 E00BCBE4 8FBF00C4 */ lw $ra, 0xC4($sp)
/* 3BAC18 E00BCBE8 8FBE00C0 */ lw $fp, 0xC0($sp)
/* 3BAC1C E00BCBEC 8FB700BC */ lw $s7, 0xBC($sp)
/* 3BAC20 E00BCBF0 8FB600B8 */ lw $s6, 0xB8($sp)
/* 3BAC24 E00BCBF4 8FB500B4 */ lw $s5, 0xB4($sp)
/* 3BAC28 E00BCBF8 8FB400B0 */ lw $s4, 0xB0($sp)
/* 3BAC2C E00BCBFC 8FB300AC */ lw $s3, 0xAC($sp)
/* 3BAC30 E00BCC00 8FB200A8 */ lw $s2, 0xA8($sp)
/* 3BAC34 E00BCC04 8FB100A4 */ lw $s1, 0xA4($sp)
/* 3BAC38 E00BCC08 8FB000A0 */ lw $s0, 0xA0($sp)
/* 3BAC3C E00BCC0C D7BE00F0 */ ldc1 $f30, 0xF0($sp)
/* 3BAC40 E00BCC10 D7BC00E8 */ ldc1 $f28, 0xE8($sp)
/* 3BAC44 E00BCC14 D7BA00E0 */ ldc1 $f26, 0xE0($sp)
/* 3BAC48 E00BCC18 D7B800D8 */ ldc1 $f24, 0xD8($sp)
/* 3BAC4C E00BCC1C D7B600D0 */ ldc1 $f22, 0xD0($sp)
/* 3BAC50 E00BCC20 D7B400C8 */ ldc1 $f20, 0xC8($sp)
/* 3BAC54 E00BCC24 03E00008 */ jr $ra
/* 3BAC58 E00BCC28 27BD00F8 */ addiu $sp, $sp, 0xF8
/* 3BAC5C E00BCC2C 00000000 */ nop
### DECOMPILED C INSTRUCTIONS:
void lightning_bolt_appendGfx(void* effect) {
Vtx_t* vtxBuffer;
f32 widthScale;
f32 cosAngle;
f32 edgeDeltaY;
f32 temp;
f32 sinAngle;
f32 edgeDeltaX;
f32 avgDeltaY;
f32 avgDeltaX;
f32 deltaPos;
f32 theta;
f32 nextAngle;
f32 edgeAngle;
f32 prevAngle;
s16 texOffsetX;
s32 temp_a0;
s32 alpha;
s32 type;
s32 lifetime;
s32 quadCount;
LightningPreset* preset;
Vtx_t* vtx;
f32 edgeDeltaZ;
f32 deltaX, deltaY, deltaZ;
LightningBoltFXData* data = ((EffectInstance*)effect)->data.lightningBolt;
Matrix4f sp10;
Matrix4f unused;
s32 i;
f32 edgeLength;
lifetime = data->lifetime;
alpha = data->outerColor.a;
type = data->type;
widthScale = data->widthScale;
gDPPipeSync(gMainGfxPos++);
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
shim_guScaleF(sp10, 0.1f, 0.1f, 0.1f);
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->outerColor.r, data->outerColor.g, data->outerColor.b, alpha);
gDPSetEnvColor(gMainGfxPos++, data->innerColor.r, data->innerColor.g, data->innerColor.b, 128);
gSPDisplayList(gMainGfxPos++, D_09001000_3BBEA0);
temp_a0 = lifetime - 1;
if (type != 2) {
if (temp_a0 <= 10) {
preset = &D_E00BCE40[type][temp_a0];
} else {
preset = &D_E00BCE40[type][10];
}
} else if (temp_a0 < 8) {
preset = &D_E00BCE40[0][temp_a0];
} else if (temp_a0 < 0x24) {
preset = &D_E00BCE40[0][temp_a0 % 6 + 2];
} else {
preset = &D_E00BCE40[0][10];
}
for (i = 0; i < ARRAY_COUNT(data->boltVertexPosX); i++) {
avgDeltaX = (data->endPos.x - data->startPos.x) * (1 / 11.0f);
avgDeltaY = (data->endPos.y - data->startPos.y) * (1 / 11.0f);
theta = (data->unk_110 + (i - lifetime) * 10) % 120 - 60;
deltaPos = preset->offset[i];
sinAngle = shim_sin_deg(theta) * deltaPos * 0.04;
cosAngle = shim_cos_deg(theta) * deltaPos * 0.04;
deltaX = avgDeltaX * cosAngle - avgDeltaY * sinAngle;
deltaY = avgDeltaX * sinAngle + avgDeltaY * cosAngle;
deltaZ = 0.0f;
data->boltVertexPosX[i] = data->startPos.x + (data->endPos.x - data->startPos.x) * i * (1 / 11.0f) + deltaX;
data->boltVertexPosY[i] = data->startPos.y + (data->endPos.y - data->startPos.y) * i * (1 / 11.0f) + deltaY;
data->boltVertexPosZ[i] = data->startPos.z + (data->endPos.z - data->startPos.z) * i * (1 / 11.0f) + deltaZ;
data->edgeLength[i] = (f32) preset->width[i] * 0.1;
}
vtxBuffer = (Vtx_t*) (gMainGfxPos + 1);
vtx = (Vtx_t*) (gMainGfxPos + 1);
gSPBranchList(gMainGfxPos, gMainGfxPos + 0x31);
gMainGfxPos += 0x31;
for (i = 0; i < ARRAY_COUNT(data->boltVertexPosX); i++) {
if (i == 0) {
edgeLength = 8.0f;
edgeAngle = -shim_atan2(data->boltVertexPosY[1], -data->boltVertexPosX[1], data->boltVertexPosY[0], -data->boltVertexPosX[0]);
} else {
edgeLength = 8.0f;
if (i == ARRAY_COUNT(data->boltVertexPosX) - 1) {
edgeAngle = -90.0f;
} else {
nextAngle = -shim_atan2(data->boltVertexPosY[i + 1], -data->boltVertexPosX[i + 1], data->boltVertexPosY[i], -data->boltVertexPosX[i]);
prevAngle = -shim_atan2(data->boltVertexPosY[i], -data->boltVertexPosX[i], data->boltVertexPosY[i - 1], -data->boltVertexPosX[i - 1]);
if (prevAngle - nextAngle > 180.0f) {
nextAngle += 360.0f;
} else if (prevAngle - nextAngle < -180.0f) {
prevAngle += 360.0f;
}
temp = nextAngle + prevAngle; // required to match
edgeAngle = temp;
edgeAngle *= 0.5;
if (prevAngle + nextAngle < 0.0f) { // required to match
nextAngle += 360.0f;
}
}
}
edgeLength *= (widthScale * data->edgeLength[i]);
texOffsetX = (128 - i * 12) * 32;
edgeDeltaX = edgeLength * shim_sin_deg(edgeAngle);
edgeDeltaY = edgeLength * shim_cos_deg(edgeAngle);
edgeDeltaZ = 0.0f;
vtx->ob[0] = (data->boltVertexPosX[i] + edgeDeltaX) * 10.0f;
vtx->ob[1] = (data->boltVertexPosY[i] + edgeDeltaY) * 10.0f;
vtx->ob[2] = (data->boltVertexPosZ[i] + edgeDeltaZ) * 10.0f;
vtx->tc[0] = texOffsetX;
vtx->tc[1] = 0;
vtx->cn[0] = i * 50;
vtx->cn[1] = i * 120;
vtx->cn[2] = i * 30;
vtx++;
vtx->ob[0] = (data->boltVertexPosX[i] - edgeDeltaX) * 10.0f;
vtx->ob[1] = (data->boltVertexPosY[i] - edgeDeltaY) * 10.0f;
vtx->ob[2] = (data->boltVertexPosZ[i] + edgeDeltaZ) * 10.0f;
vtx->tc[0] = texOffsetX;
vtx->tc[1] = 0x400;
vtx->cn[0] = i * 50;
vtx->cn[1] = i * 120;
vtx->cn[2] = i * 30;
vtx++;
}
quadCount = i;
gSPVertex(gMainGfxPos++, vtxBuffer, i * 2, 0);
gSPClearGeometryMode(gMainGfxPos++, G_SHADING_SMOOTH);
for (i = 0; i < quadCount - 1; i++) {
gSP2Triangles(gMainGfxPos++, i * 2 + 1, i * 2 + 0, i * 2 + 2, 0,
i * 2 + 1, i * 2 + 2, i * 2 + 3, 0);
}
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_80250818
/* 17F0F8 80250818 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 17F0FC 8025081C AFB20020 */ sw $s2, 0x20($sp)
D_80250820_C0E0A0:
/* 17F100 80250820 24B2000F */ addiu $s2, $a1, 0xF
/* 17F104 80250824 AFB30024 */ sw $s3, 0x24($sp)
/* 17F108 80250828 0080982D */ daddu $s3, $a0, $zero
/* 17F10C 8025082C AFBF002C */ sw $ra, 0x2C($sp)
/* 17F110 80250830 AFB40028 */ sw $s4, 0x28($sp)
/* 17F114 80250834 AFB1001C */ sw $s1, 0x1C($sp)
/* 17F118 80250838 AFB00018 */ sw $s0, 0x18($sp)
/* 17F11C 8025083C F7B40030 */ sdc1 $f20, 0x30($sp)
/* 17F120 80250840 86630012 */ lh $v1, 0x12($s3)
/* 17F124 80250844 2C620055 */ sltiu $v0, $v1, 0x55
/* 17F128 80250848 1040018D */ beqz $v0, .L80250E80
/* 17F12C 8025084C 24D10006 */ addiu $s1, $a2, 0x6
/* 17F130 80250850 00031080 */ sll $v0, $v1, 2
/* 17F134 80250854 3C01802A */ lui $at, %hi(jtbl_8029D048)
/* 17F138 80250858 00220821 */ addu $at, $at, $v0
/* 17F13C 8025085C 8C22D048 */ lw $v0, %lo(jtbl_8029D048)($at)
/* 17F140 80250860 00400008 */ jr $v0
/* 17F144 80250864 00000000 */ nop
glabel .L80250868
/* 17F148 80250868 86620012 */ lh $v0, 0x12($s3)
/* 17F14C 8025086C 00021080 */ sll $v0, $v0, 2
/* 17F150 80250870 3C108028 */ lui $s0, %hi(bMessages)
/* 17F154 80250874 02028021 */ addu $s0, $s0, $v0
/* 17F158 80250878 8E103770 */ lw $s0, %lo(bMessages)($s0)
/* 17F15C 8025087C 0C04992C */ jal get_msg_lines
/* 17F160 80250880 0200202D */ daddu $a0, $s0, $zero
/* 17F164 80250884 2443FFFF */ addiu $v1, $v0, -0x1
/* 17F168 80250888 0200202D */ daddu $a0, $s0, $zero
/* 17F16C 8025088C 0240282D */ daddu $a1, $s2, $zero
/* 17F170 80250890 240700FF */ addiu $a3, $zero, 0xFF
/* 17F174 80250894 00031040 */ sll $v0, $v1, 1
D_80250898_C0E118:
/* 17F178 80250898 3C068028 */ lui $a2, %hi(D_802835D4)
/* 17F17C 8025089C 00C23021 */ addu $a2, $a2, $v0
/* 17F180 802508A0 84C635D4 */ lh $a2, %lo(D_802835D4)($a2)
/* 17F184 802508A4 2402000F */ addiu $v0, $zero, 0xF
/* 17F188 802508A8 AFA20010 */ sw $v0, 0x10($sp)
/* 17F18C 802508AC AFA00014 */ sw $zero, 0x14($sp)
D_802508B0:
/* 17F190 802508B0 0C04993B */ jal draw_msg
/* 17F194 802508B4 02263021 */ addu $a2, $s1, $a2
/* 17F198 802508B8 080943A0 */ j .L80250E80
/* 17F19C 802508BC 00000000 */ nop
glabel .L802508C0
/* 17F1A0 802508C0 86620012 */ lh $v0, 0x12($s3)
/* 17F1A4 802508C4 00021080 */ sll $v0, $v0, 2
/* 17F1A8 802508C8 3C108028 */ lui $s0, %hi(bMessages)
/* 17F1AC 802508CC 02028021 */ addu $s0, $s0, $v0
/* 17F1B0 802508D0 8E103770 */ lw $s0, %lo(bMessages)($s0)
/* 17F1B4 802508D4 0C04992C */ jal get_msg_lines
/* 17F1B8 802508D8 0200202D */ daddu $a0, $s0, $zero
/* 17F1BC 802508DC 2443FFFF */ addiu $v1, $v0, -0x1
/* 17F1C0 802508E0 0000282D */ daddu $a1, $zero, $zero
/* 17F1C4 802508E4 00031040 */ sll $v0, $v1, 1
/* 17F1C8 802508E8 3C018028 */ lui $at, %hi(D_802835D4)
/* 17F1CC 802508EC 00220821 */ addu $at, $at, $v0
/* 17F1D0 802508F0 842235D4 */ lh $v0, %lo(D_802835D4)($at)
/* 17F1D4 802508F4 3C04802A */ lui $a0, %hi(D_8029F640)
/* 17F1D8 802508F8 8484F640 */ lh $a0, %lo(D_8029F640)($a0)
/* 17F1DC 802508FC 0C0496FA */ jal set_message_value
/* 17F1E0 80250900 02228821 */ addu $s1, $s1, $v0
/* 17F1E4 80250904 08094259 */ j .L80250964
/* 17F1E8 80250908 0200202D */ daddu $a0, $s0, $zero
glabel .L8025090C
/* 17F1EC 8025090C 86620012 */ lh $v0, 0x12($s3)
D_80250910_C0E190:
/* 17F1F0 80250910 00021080 */ sll $v0, $v0, 2
/* 17F1F4 80250914 3C108028 */ lui $s0, %hi(bMessages)
/* 17F1F8 80250918 02028021 */ addu $s0, $s0, $v0
/* 17F1FC 8025091C 8E103770 */ lw $s0, %lo(bMessages)($s0)
/* 17F200 80250920 0C04992C */ jal get_msg_lines
/* 17F204 80250924 0200202D */ daddu $a0, $s0, $zero
/* 17F208 80250928 2443FFFF */ addiu $v1, $v0, -0x1
/* 17F20C 8025092C 0000282D */ daddu $a1, $zero, $zero
/* 17F210 80250930 00031840 */ sll $v1, $v1, 1
/* 17F214 80250934 3C02802A */ lui $v0, %hi(D_8029F640)
/* 17F218 80250938 8442F640 */ lh $v0, %lo(D_8029F640)($v0)
/* 17F21C 8025093C 3C018028 */ lui $at, %hi(D_802835D4)
/* 17F220 80250940 00230821 */ addu $at, $at, $v1
/* 17F224 80250944 842335D4 */ lh $v1, %lo(D_802835D4)($at)
/* 17F228 80250948 00021080 */ sll $v0, $v0, 2
/* 17F22C 8025094C 3C048028 */ lui $a0, %hi(bActorMessages)
/* 17F230 80250950 00822021 */ addu $a0, $a0, $v0
/* 17F234 80250954 8C8438C4 */ lw $a0, %lo(bActorMessages)($a0)
/* 17F238 80250958 0C0496CF */ jal set_message_msg
/* 17F23C 8025095C 02238821 */ addu $s1, $s1, $v1
/* 17F240 80250960 0200202D */ daddu $a0, $s0, $zero
.L80250964:
/* 17F244 80250964 0240282D */ daddu $a1, $s2, $zero
/* 17F248 80250968 0220302D */ daddu $a2, $s1, $zero
/* 17F24C 8025096C 240700FF */ addiu $a3, $zero, 0xFF
/* 17F250 80250970 2402000F */ addiu $v0, $zero, 0xF
/* 17F254 80250974 AFA20010 */ sw $v0, 0x10($sp)
/* 17F258 80250978 0C04993B */ jal draw_msg
/* 17F25C 8025097C AFA00014 */ sw $zero, 0x14($sp)
/* 17F260 80250980 080943A0 */ j .L80250E80
/* 17F264 80250984 00000000 */ nop
glabel .L80250988
/* 17F268 80250988 2645001D */ addiu $a1, $s2, 0x1D
/* 17F26C 8025098C 26260006 */ addiu $a2, $s1, 0x6
D_80250990:
/* 17F270 80250990 86620012 */ lh $v0, 0x12($s3)
/* 17F274 80250994 240700FF */ addiu $a3, $zero, 0xFF
/* 17F278 80250998 00021080 */ sll $v0, $v0, 2
/* 17F27C 8025099C 3C108028 */ lui $s0, %hi(bMessages)
/* 17F280 802509A0 02028021 */ addu $s0, $s0, $v0
/* 17F284 802509A4 8E103770 */ lw $s0, %lo(bMessages)($s0)
/* 17F288 802509A8 2402000F */ addiu $v0, $zero, 0xF
/* 17F28C 802509AC AFA20010 */ sw $v0, 0x10($sp)
/* 17F290 802509B0 AFA00014 */ sw $zero, 0x14($sp)
/* 17F294 802509B4 0C04993B */ jal draw_msg
/* 17F298 802509B8 0200202D */ daddu $a0, $s0, $zero
/* 17F29C 802509BC 2645000D */ addiu $a1, $s2, 0xD
/* 17F2A0 802509C0 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F2A4 802509C4 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17F2A8 802509C8 86040000 */ lh $a0, 0x0($s0)
/* 17F2AC 802509CC 0C051261 */ jal hud_element_set_render_pos
/* 17F2B0 802509D0 2626000E */ addiu $a2, $s1, 0xE
/* 17F2B4 802509D4 0809439D */ j .L80250E74
/* 17F2B8 802509D8 00000000 */ nop
glabel .L802509DC
/* 17F2BC 802509DC 82620016 */ lb $v0, 0x16($s3)
/* 17F2C0 802509E0 28420002 */ slti $v0, $v0, 0x2
/* 17F2C4 802509E4 10400002 */ beqz $v0, .L802509F0
/* 17F2C8 802509E8 241400FF */ addiu $s4, $zero, 0xFF
/* 17F2CC 802509EC 241400A0 */ addiu $s4, $zero, 0xA0
.L802509F0:
/* 17F2D0 802509F0 86630012 */ lh $v1, 0x12($s3)
/* 17F2D4 802509F4 2402003B */ addiu $v0, $zero, 0x3B
/* 17F2D8 802509F8 50620001 */ beql $v1, $v0, .L80250A00
/* 17F2DC 802509FC 241400FF */ addiu $s4, $zero, 0xFF
.L80250A00:
/* 17F2E0 80250A00 2652FFF5 */ addiu $s2, $s2, -0xB
/* 17F2E4 80250A04 00031080 */ sll $v0, $v1, 2
/* 17F2E8 80250A08 3C108028 */ lui $s0, %hi(bMessages)
/* 17F2EC 80250A0C 02028021 */ addu $s0, $s0, $v0
/* 17F2F0 80250A10 8E103770 */ lw $s0, %lo(bMessages)($s0)
/* 17F2F4 80250A14 2631FFFA */ addiu $s1, $s1, -0x6
/* 17F2F8 80250A18 0C04992C */ jal get_msg_lines
/* 17F2FC 80250A1C 0200202D */ daddu $a0, $s0, $zero
/* 17F300 80250A20 2443FFFF */ addiu $v1, $v0, -0x1
/* 17F304 80250A24 0200202D */ daddu $a0, $s0, $zero
/* 17F308 80250A28 2645000B */ addiu $a1, $s2, 0xB
/* 17F30C 80250A2C 0280382D */ daddu $a3, $s4, $zero
/* 17F310 80250A30 00031040 */ sll $v0, $v1, 1
/* 17F314 80250A34 3C038028 */ lui $v1, %hi(D_802835D4)
/* 17F318 80250A38 00621821 */ addu $v1, $v1, $v0
/* 17F31C 80250A3C 846335D4 */ lh $v1, %lo(D_802835D4)($v1)
/* 17F320 80250A40 2402000F */ addiu $v0, $zero, 0xF
/* 17F324 80250A44 AFA20010 */ sw $v0, 0x10($sp)
/* 17F328 80250A48 AFA00014 */ sw $zero, 0x14($sp)
/* 17F32C 80250A4C 02238821 */ addu $s1, $s1, $v1
D_80250A50:
/* 17F330 80250A50 0C04993B */ jal draw_msg
D_80250A54:
/* 17F334 80250A54 26260006 */ addiu $a2, $s1, 0x6
D_80250A58:
/* 17F338 80250A58 96620012 */ lhu $v0, 0x12($s3)
/* 17F33C 80250A5C 2442FFD2 */ addiu $v0, $v0, -0x2E
/* 17F340 80250A60 00021400 */ sll $v0, $v0, 16
/* 17F344 80250A64 00021C03 */ sra $v1, $v0, 16
/* 17F348 80250A68 2C620014 */ sltiu $v0, $v1, 0x14
/* 17F34C 80250A6C 10400104 */ beqz $v0, .L80250E80
/* 17F350 80250A70 00031080 */ sll $v0, $v1, 2
/* 17F354 80250A74 3C01802A */ lui $at, %hi(jtbl_8029D1A0)
/* 17F358 80250A78 00220821 */ addu $at, $at, $v0
/* 17F35C 80250A7C 8C22D1A0 */ lw $v0, %lo(jtbl_8029D1A0)($at)
/* 17F360 80250A80 00400008 */ jr $v0
/* 17F364 80250A84 00000000 */ nop
glabel .L80250A88
/* 17F368 80250A88 26450041 */ addiu $a1, $s2, 0x41
/* 17F36C 80250A8C 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F370 80250A90 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17F374 80250A94 86040000 */ lh $a0, 0x0($s0)
/* 17F378 80250A98 08094394 */ j .L80250E50
/* 17F37C 80250A9C 2626000E */ addiu $a2, $s1, 0xE
glabel .L80250AA0
/* 17F380 80250AA0 26450037 */ addiu $a1, $s2, 0x37
/* 17F384 80250AA4 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F388 80250AA8 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17F38C 80250AAC 86040000 */ lh $a0, 0x0($s0)
/* 17F390 80250AB0 0C051261 */ jal hud_element_set_render_pos
/* 17F394 80250AB4 2626000E */ addiu $a2, $s1, 0xE
/* 17F398 80250AB8 86040000 */ lh $a0, 0x0($s0)
/* 17F39C 80250ABC 3C053F19 */ lui $a1, (0x3F19999A >> 16)
/* 17F3A0 80250AC0 0C051308 */ jal hud_element_set_scale
/* 17F3A4 80250AC4 34A5999A */ ori $a1, $a1, (0x3F19999A & 0xFFFF)
/* 17F3A8 80250AC8 86040000 */ lh $a0, 0x0($s0)
/* 17F3AC 80250ACC 0C0513AC */ jal hud_element_set_alpha
/* 17F3B0 80250AD0 0280282D */ daddu $a1, $s4, $zero
/* 17F3B4 80250AD4 86040000 */ lh $a0, 0x0($s0)
/* 17F3B8 80250AD8 0C0511EA */ jal hud_element_draw_clipped
/* 17F3BC 80250ADC 00000000 */ nop
/* 17F3C0 80250AE0 26450049 */ addiu $a1, $s2, 0x49
/* 17F3C4 80250AE4 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17F3C8 80250AE8 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
/* 17F3CC 80250AEC 86040000 */ lh $a0, 0x0($s0)
/* 17F3D0 80250AF0 0C051261 */ jal hud_element_set_render_pos
/* 17F3D4 80250AF4 2626001F */ addiu $a2, $s1, 0x1F
/* 17F3D8 80250AF8 0809439A */ j .L80250E68
/* 17F3DC 80250AFC 00000000 */ nop
glabel .L80250B00
/* 17F3E0 80250B00 26450040 */ addiu $a1, $s2, 0x40
/* 17F3E4 80250B04 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F3E8 80250B08 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17F3EC 80250B0C 86040000 */ lh $a0, 0x0($s0)
/* 17F3F0 80250B10 08094394 */ j .L80250E50
/* 17F3F4 80250B14 2626000E */ addiu $a2, $s1, 0xE
glabel .L80250B18
/* 17F3F8 80250B18 26450043 */ addiu $a1, $s2, 0x43
/* 17F3FC 80250B1C 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F400 80250B20 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17F404 80250B24 86040000 */ lh $a0, 0x0($s0)
/* 17F408 80250B28 08094394 */ j .L80250E50
/* 17F40C 80250B2C 2626000E */ addiu $a2, $s1, 0xE
glabel .L80250B30
/* 17F410 80250B30 26450038 */ addiu $a1, $s2, 0x38
D_80250B34:
/* 17F414 80250B34 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F418 80250B38 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17F41C 80250B3C 86040000 */ lh $a0, 0x0($s0)
/* 17F420 80250B40 0C051261 */ jal hud_element_set_render_pos
D_80250B44:
/* 17F424 80250B44 2626000E */ addiu $a2, $s1, 0xE
/* 17F428 80250B48 86040000 */ lh $a0, 0x0($s0)
/* 17F42C 80250B4C 3C053F19 */ lui $a1, (0x3F19999A >> 16)
/* 17F430 80250B50 08094398 */ j .L80250E60
D_80250B54:
/* 17F434 80250B54 34A5999A */ ori $a1, $a1, (0x3F19999A & 0xFFFF)
glabel .L80250B58
/* 17F438 80250B58 26450041 */ addiu $a1, $s2, 0x41
/* 17F43C 80250B5C 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F440 80250B60 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
D_80250B64:
/* 17F444 80250B64 86040000 */ lh $a0, 0x0($s0)
/* 17F448 80250B68 0C051261 */ jal hud_element_set_render_pos
/* 17F44C 80250B6C 2626000D */ addiu $a2, $s1, 0xD
/* 17F450 80250B70 86040000 */ lh $a0, 0x0($s0)
/* 17F454 80250B74 3C053F19 */ lui $a1, (0x3F19999A >> 16)
/* 17F458 80250B78 0C051308 */ jal hud_element_set_scale
/* 17F45C 80250B7C 34A5999A */ ori $a1, $a1, (0x3F19999A & 0xFFFF)
/* 17F460 80250B80 86040000 */ lh $a0, 0x0($s0)
/* 17F464 80250B84 0C0513AC */ jal hud_element_set_alpha
/* 17F468 80250B88 0280282D */ daddu $a1, $s4, $zero
/* 17F46C 80250B8C 86040000 */ lh $a0, 0x0($s0)
/* 17F470 80250B90 0C0511EA */ jal hud_element_draw_clipped
/* 17F474 80250B94 00000000 */ nop
/* 17F478 80250B98 26450092 */ addiu $a1, $s2, 0x92
/* 17F47C 80250B9C 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17F480 80250BA0 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
/* 17F484 80250BA4 86040000 */ lh $a0, 0x0($s0)
/* 17F488 80250BA8 08094381 */ j .L80250E04
/* 17F48C 80250BAC 26260020 */ addiu $a2, $s1, 0x20
glabel .L80250BB0
/* 17F490 80250BB0 26450056 */ addiu $a1, $s2, 0x56
/* 17F494 80250BB4 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F498 80250BB8 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17F49C 80250BBC 2631000D */ addiu $s1, $s1, 0xD
/* 17F4A0 80250BC0 86040000 */ lh $a0, 0x0($s0)
/* 17F4A4 80250BC4 0C051261 */ jal hud_element_set_render_pos
/* 17F4A8 80250BC8 0220302D */ daddu $a2, $s1, $zero
/* 17F4AC 80250BCC 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 17F4B0 80250BD0 4481A000 */ mtc1 $at, $f20
/* 17F4B4 80250BD4 86040000 */ lh $a0, 0x0($s0)
/* 17F4B8 80250BD8 4405A000 */ mfc1 $a1, $f20
/* 17F4BC 80250BDC 0C051308 */ jal hud_element_set_scale
/* 17F4C0 80250BE0 00000000 */ nop
/* 17F4C4 80250BE4 86040000 */ lh $a0, 0x0($s0)
/* 17F4C8 80250BE8 0C0513AC */ jal hud_element_set_alpha
/* 17F4CC 80250BEC 0280282D */ daddu $a1, $s4, $zero
/* 17F4D0 80250BF0 86040000 */ lh $a0, 0x0($s0)
/* 17F4D4 80250BF4 0C0511EA */ jal hud_element_draw_clipped
/* 17F4D8 80250BF8 00000000 */ nop
/* 17F4DC 80250BFC 26450040 */ addiu $a1, $s2, 0x40
/* 17F4E0 80250C00 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17F4E4 80250C04 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
/* 17F4E8 80250C08 86040000 */ lh $a0, 0x0($s0)
/* 17F4EC 80250C0C 0C051261 */ jal hud_element_set_render_pos
/* 17F4F0 80250C10 0220302D */ daddu $a2, $s1, $zero
/* 17F4F4 80250C14 86040000 */ lh $a0, 0x0($s0)
/* 17F4F8 80250C18 4405A000 */ mfc1 $a1, $f20
/* 17F4FC 80250C1C 0C051308 */ jal hud_element_set_scale
/* 17F500 80250C20 00000000 */ nop
/* 17F504 80250C24 86040000 */ lh $a0, 0x0($s0)
/* 17F508 80250C28 0C0513AC */ jal hud_element_set_alpha
/* 17F50C 80250C2C 0280282D */ daddu $a1, $s4, $zero
/* 17F510 80250C30 86040000 */ lh $a0, 0x0($s0)
/* 17F514 80250C34 0C0511EA */ jal hud_element_draw_clipped
/* 17F518 80250C38 00000000 */ nop
/* 17F51C 80250C3C 2645006C */ addiu $a1, $s2, 0x6C
/* 17F520 80250C40 3C10802A */ lui $s0, %hi(D_8029F646)
/* 17F524 80250C44 2610F646 */ addiu $s0, $s0, %lo(D_8029F646)
/* 17F528 80250C48 86040000 */ lh $a0, 0x0($s0)
/* 17F52C 80250C4C 08094394 */ j .L80250E50
/* 17F530 80250C50 0220302D */ daddu $a2, $s1, $zero
glabel .L80250C54
/* 17F534 80250C54 26450069 */ addiu $a1, $s2, 0x69
/* 17F538 80250C58 3C10802A */ lui $s0, %hi(D_8029F642)
D_80250C5C:
/* 17F53C 80250C5C 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17F540 80250C60 86040000 */ lh $a0, 0x0($s0)
/* 17F544 80250C64 0C051261 */ jal hud_element_set_render_pos
/* 17F548 80250C68 2626000D */ addiu $a2, $s1, 0xD
/* 17F54C 80250C6C 86040000 */ lh $a0, 0x0($s0)
/* 17F550 80250C70 0C0513AC */ jal hud_element_set_alpha
/* 17F554 80250C74 0280282D */ daddu $a1, $s4, $zero
/* 17F558 80250C78 86040000 */ lh $a0, 0x0($s0)
/* 17F55C 80250C7C 0C0511EA */ jal hud_element_draw_clipped
/* 17F560 80250C80 00000000 */ nop
/* 17F564 80250C84 26450041 */ addiu $a1, $s2, 0x41
/* 17F568 80250C88 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17F56C 80250C8C 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
/* 17F570 80250C90 86040000 */ lh $a0, 0x0($s0)
/* 17F574 80250C94 08094394 */ j .L80250E50
/* 17F578 80250C98 2626000E */ addiu $a2, $s1, 0xE
glabel .L80250C9C
/* 17F57C 80250C9C 2645003F */ addiu $a1, $s2, 0x3F
/* 17F580 80250CA0 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F584 80250CA4 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17F588 80250CA8 2631000E */ addiu $s1, $s1, 0xE
/* 17F58C 80250CAC 86040000 */ lh $a0, 0x0($s0)
D_80250CB0:
/* 17F590 80250CB0 0C051261 */ jal hud_element_set_render_pos
/* 17F594 80250CB4 0220302D */ daddu $a2, $s1, $zero
/* 17F598 80250CB8 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 17F59C 80250CBC 4481A000 */ mtc1 $at, $f20
/* 17F5A0 80250CC0 86040000 */ lh $a0, 0x0($s0)
/* 17F5A4 80250CC4 4405A000 */ mfc1 $a1, $f20
/* 17F5A8 80250CC8 0C051308 */ jal hud_element_set_scale
/* 17F5AC 80250CCC 00000000 */ nop
/* 17F5B0 80250CD0 86040000 */ lh $a0, 0x0($s0)
/* 17F5B4 80250CD4 0C0513AC */ jal hud_element_set_alpha
/* 17F5B8 80250CD8 0280282D */ daddu $a1, $s4, $zero
/* 17F5BC 80250CDC 86040000 */ lh $a0, 0x0($s0)
/* 17F5C0 80250CE0 0C0511EA */ jal hud_element_draw_clipped
/* 17F5C4 80250CE4 00000000 */ nop
/* 17F5C8 80250CE8 26450054 */ addiu $a1, $s2, 0x54
/* 17F5CC 80250CEC 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17F5D0 80250CF0 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
/* 17F5D4 80250CF4 86040000 */ lh $a0, 0x0($s0)
/* 17F5D8 80250CF8 08094394 */ j .L80250E50
/* 17F5DC 80250CFC 0220302D */ daddu $a2, $s1, $zero
glabel .L80250D00
/* 17F5E0 80250D00 2645007C */ addiu $a1, $s2, 0x7C
/* 17F5E4 80250D04 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F5E8 80250D08 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17F5EC 80250D0C 86040000 */ lh $a0, 0x0($s0)
/* 17F5F0 80250D10 08094394 */ j .L80250E50
D_80250D14:
/* 17F5F4 80250D14 2626000E */ addiu $a2, $s1, 0xE
glabel .L80250D18
/* 17F5F8 80250D18 26450038 */ addiu $a1, $s2, 0x38
/* 17F5FC 80250D1C 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F600 80250D20 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17F604 80250D24 86040000 */ lh $a0, 0x0($s0)
/* 17F608 80250D28 0C051261 */ jal hud_element_set_render_pos
/* 17F60C 80250D2C 2626001F */ addiu $a2, $s1, 0x1F
/* 17F610 80250D30 86040000 */ lh $a0, 0x0($s0)
/* 17F614 80250D34 0C0513AC */ jal hud_element_set_alpha
/* 17F618 80250D38 0280282D */ daddu $a1, $s4, $zero
/* 17F61C 80250D3C 86040000 */ lh $a0, 0x0($s0)
/* 17F620 80250D40 0C0511EA */ jal hud_element_draw_clipped
/* 17F624 80250D44 00000000 */ nop
/* 17F628 80250D48 26450035 */ addiu $a1, $s2, 0x35
/* 17F62C 80250D4C 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17F630 80250D50 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
/* 17F634 80250D54 86040000 */ lh $a0, 0x0($s0)
D_80250D58_C0E5D8:
/* 17F638 80250D58 08094394 */ j .L80250E50
/* 17F63C 80250D5C 2626000E */ addiu $a2, $s1, 0xE
glabel .L80250D60
/* 17F640 80250D60 2645006B */ addiu $a1, $s2, 0x6B
/* 17F644 80250D64 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F648 80250D68 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17F64C 80250D6C 86040000 */ lh $a0, 0x0($s0)
/* 17F650 80250D70 0C051261 */ jal hud_element_set_render_pos
/* 17F654 80250D74 2626000D */ addiu $a2, $s1, 0xD
/* 17F658 80250D78 86040000 */ lh $a0, 0x0($s0)
/* 17F65C 80250D7C 3C053F19 */ lui $a1, (0x3F19999A >> 16)
/* 17F660 80250D80 34A5999A */ ori $a1, $a1, (0x3F19999A & 0xFFFF)
/* 17F664 80250D84 0C051308 */ jal hud_element_set_scale
/* 17F668 80250D88 2631000F */ addiu $s1, $s1, 0xF
/* 17F66C 80250D8C 86040000 */ lh $a0, 0x0($s0)
/* 17F670 80250D90 0C0513AC */ jal hud_element_set_alpha
/* 17F674 80250D94 0280282D */ daddu $a1, $s4, $zero
/* 17F678 80250D98 86040000 */ lh $a0, 0x0($s0)
/* 17F67C 80250D9C 0C0511EA */ jal hud_element_draw_clipped
/* 17F680 80250DA0 00000000 */ nop
/* 17F684 80250DA4 264500D2 */ addiu $a1, $s2, 0xD2
D_80250DA8_C0E628:
/* 17F688 80250DA8 3C10802A */ lui $s0, %hi(D_8029F644)
/* 17F68C 80250DAC 2610F644 */ addiu $s0, $s0, %lo(D_8029F644)
/* 17F690 80250DB0 86040000 */ lh $a0, 0x0($s0)
/* 17F694 80250DB4 0C051261 */ jal hud_element_set_render_pos
/* 17F698 80250DB8 0220302D */ daddu $a2, $s1, $zero
/* 17F69C 80250DBC 3C013F4C */ lui $at, (0x3F4CCCCD >> 16)
/* 17F6A0 80250DC0 3421CCCD */ ori $at, $at, (0x3F4CCCCD & 0xFFFF)
/* 17F6A4 80250DC4 4481A000 */ mtc1 $at, $f20
/* 17F6A8 80250DC8 86040000 */ lh $a0, 0x0($s0)
/* 17F6AC 80250DCC 4405A000 */ mfc1 $a1, $f20
/* 17F6B0 80250DD0 0C051308 */ jal hud_element_set_scale
/* 17F6B4 80250DD4 00000000 */ nop
/* 17F6B8 80250DD8 86040000 */ lh $a0, 0x0($s0)
/* 17F6BC 80250DDC 0C0513AC */ jal hud_element_set_alpha
D_80250DE0_C0E660:
/* 17F6C0 80250DE0 0280282D */ daddu $a1, $s4, $zero
/* 17F6C4 80250DE4 86040000 */ lh $a0, 0x0($s0)
/* 17F6C8 80250DE8 0C051086 */ jal func_80144218
/* 17F6CC 80250DEC 00000000 */ nop
/* 17F6D0 80250DF0 26450038 */ addiu $a1, $s2, 0x38
/* 17F6D4 80250DF4 3C10802A */ lui $s0, %hi(D_8029F646)
/* 17F6D8 80250DF8 2610F646 */ addiu $s0, $s0, %lo(D_8029F646)
D_80250DFC:
/* 17F6DC 80250DFC 86040000 */ lh $a0, 0x0($s0)
/* 17F6E0 80250E00 0220302D */ daddu $a2, $s1, $zero
.L80250E04:
/* 17F6E4 80250E04 0C051261 */ jal hud_element_set_render_pos
/* 17F6E8 80250E08 00000000 */ nop
/* 17F6EC 80250E0C 86040000 */ lh $a0, 0x0($s0)
/* 17F6F0 80250E10 3C053F4C */ lui $a1, (0x3F4CCCCD >> 16)
/* 17F6F4 80250E14 0C051308 */ jal hud_element_set_scale
/* 17F6F8 80250E18 34A5CCCD */ ori $a1, $a1, (0x3F4CCCCD & 0xFFFF)
/* 17F6FC 80250E1C 86040000 */ lh $a0, 0x0($s0)
/* 17F700 80250E20 0C0513AC */ jal hud_element_set_alpha
/* 17F704 80250E24 0280282D */ daddu $a1, $s4, $zero
/* 17F708 80250E28 86040000 */ lh $a0, 0x0($s0)
/* 17F70C 80250E2C 0C051086 */ jal func_80144218
/* 17F710 80250E30 00000000 */ nop
/* 17F714 80250E34 080943A0 */ j .L80250E80
/* 17F718 80250E38 00000000 */ nop
glabel .L80250E3C
/* 17F71C 80250E3C 26450040 */ addiu $a1, $s2, 0x40
/* 17F720 80250E40 3C10802A */ lui $s0, %hi(D_8029F642)
/* 17F724 80250E44 2610F642 */ addiu $s0, $s0, %lo(D_8029F642)
/* 17F728 80250E48 86040000 */ lh $a0, 0x0($s0)
/* 17F72C 80250E4C 2626000D */ addiu $a2, $s1, 0xD
.L80250E50:
/* 17F730 80250E50 0C051261 */ jal hud_element_set_render_pos
/* 17F734 80250E54 00000000 */ nop
/* 17F738 80250E58 86040000 */ lh $a0, 0x0($s0)
/* 17F73C 80250E5C 3C053F00 */ lui $a1, (0x3F000000 >> 16)
.L80250E60:
/* 17F740 80250E60 0C051308 */ jal hud_element_set_scale
/* 17F744 80250E64 00000000 */ nop
.L80250E68:
/* 17F748 80250E68 86040000 */ lh $a0, 0x0($s0)
/* 17F74C 80250E6C 0C0513AC */ jal hud_element_set_alpha
/* 17F750 80250E70 0280282D */ daddu $a1, $s4, $zero
.L80250E74:
/* 17F754 80250E74 86040000 */ lh $a0, 0x0($s0)
/* 17F758 80250E78 0C0511EA */ jal hud_element_draw_clipped
/* 17F75C 80250E7C 00000000 */ nop
glabel .L80250E80
/* 17F760 80250E80 8FBF002C */ lw $ra, 0x2C($sp)
/* 17F764 80250E84 8FB40028 */ lw $s4, 0x28($sp)
D_80250E88_C0E708:
/* 17F768 80250E88 8FB30024 */ lw $s3, 0x24($sp)
/* 17F76C 80250E8C 8FB20020 */ lw $s2, 0x20($sp)
/* 17F770 80250E90 8FB1001C */ lw $s1, 0x1C($sp)
/* 17F774 80250E94 8FB00018 */ lw $s0, 0x18($sp)
/* 17F778 80250E98 D7B40030 */ ldc1 $f20, 0x30($sp)
/* 17F77C 80250E9C 03E00008 */ jr $ra
/* 17F780 80250EA0 27BD0038 */ addiu $sp, $sp, 0x38
### DECOMPILED C INSTRUCTIONS:
void func_80250818(void* data, s32 x, s32 y) {
PopupMessage* popup = data;
s32 messageID;
s32 msgLinesIdx;
s32 opacity;
x += 15;
y += 6;
switch (popup->messageIndex) {
case BTL_MSG_MERLEE_ATK_UP:
case BTL_MSG_MERLEE_DEF_UP:
case BTL_MSG_MERLEE_EXP_UP:
case BTL_MSG_MERLEE_DONE:
case BTL_MSG_CANT_CHARGE:
case BTL_MSG_ENEMY_MISSED:
case BTL_MSG_PLAYER_DAZED:
case BTL_MSG_PLAYER_ASLEEP:
case BTL_MSG_PLAYER_FROZEN:
case BTL_MSG_PLAYER_POISONED:
case BTL_MSG_PLAYER_SHRUNK:
case BTL_MSG_PLAYER_PARALYZED:
case BTL_MSG_PLAYER_CHARGED:
case BTL_MSG_PLAYER_TRANSPARENT:
case BTL_MSG_ENEMY_DAZED:
case BTL_MSG_ENEMY_ASLEEP:
case BTL_MSG_ENEMY_FROZEN:
case BTL_MSG_ENEMY_POISONED:
case BTL_MSG_ENEMY_SHRUNK:
case BTL_MSG_ENEMY_PARALYZED:
case BTL_MSG_ENEMY_ELECTRIFIED:
case BTL_MSG_ENEMY_CANT_MOVE:
case BTL_MSG_STAR_POWER_RECHARGED:
case BTL_MSG_STAR_POWER_MAXED:
case BTL_MSG_STAR_POWER_FILLED:
case BTL_MSG_PARTNER_INJURED:
case BTL_MSG_CHARGE_GOOMBARIO:
case BTL_MSG_CHARGE_GOOMBARIO_MORE:
case BTL_MSG_WATER_BLOCK_BEGIN:
case BTL_MSG_WATER_BLOCK_END:
case BTL_MSG_CLOUD_NINE_BEGIN:
case BTL_MSG_CLOUD_NINE_END:
case BTL_MSG_TURBO_CHARGE_BEGIN:
case BTL_MSG_TURBO_CHARGE_END:
case BTL_MSG_CHILL_OUT_BEGIN:
case BTL_MSG_UNUSED_CLOUD_NINE:
case BTL_MSG_NO_JUMP_TARGET:
case BTL_MSG_NO_HAMMER_TARGET:
case BTL_MSG_NO_ITEM_TARGET:
case BTL_MSG_46:
case BTL_MSG_47:
case BTL_MSG_CANT_SELECT_NOW:
case BTL_MSG_CANT_SWITCH:
case BTL_MSG_CANT_SWITCH_UNUSED:
case BTL_MSG_CANT_MOVE_UNUSED:
case BTL_MSG_CANT_SELECT_NOW_ALT:
messageID = bMessages[popup->messageIndex];
msgLinesIdx = get_msg_lines(messageID) - 1;
draw_msg(messageID, x, y + D_802835D4[msgLinesIdx], 255, MSG_PAL_0F, 0);
break;
case BTL_MSG_CHARGE_HAMMER:
case BTL_MSG_CHARGE_HAMMER_MORE:
case BTL_MSG_CHARGE_JUMP:
case BTL_MSG_CHARGE_JUMP_MORE:
case BTL_MSG_ATTACK_UP:
case BTL_MSG_DEFENCE_UP:
case BTL_MSG_1F:
case BTL_MSG_20:
case BTL_MSG_ENEMY_TRANSPARENT:
case BTL_MSG_ENEMY_CHARGED:
messageID = bMessages[popup->messageIndex];
msgLinesIdx = get_msg_lines(messageID) - 1;
y += D_802835D4[msgLinesIdx];
set_message_value(D_8029F640, 0);
draw_msg(messageID, x, y, 255, MSG_PAL_0F, 0);
break;
case BTL_MSG_CANT_MOVE:
messageID = bMessages[popup->messageIndex];
msgLinesIdx = get_msg_lines(messageID) - 1;
y += D_802835D4[msgLinesIdx];
set_message_msg(bActorMessages[D_8029F640], 0);
draw_msg(messageID, x, y, 255, MSG_PAL_0F, 0);
break;
case BTL_MSG_HAMMER_DISABLED_1:
case BTL_MSG_HAMMER_DISABLED_2:
case BTL_MSG_HAMMER_DISABLED_3:
case BTL_MSG_JUMP_DISABLED_1:
case BTL_MSG_JUMP_DISABLED_2:
case BTL_MSG_JUMP_DISABLED_3:
case BTL_MSG_ITEMS_DISABLED:
messageID = bMessages[popup->messageIndex];
draw_msg(messageID, x + 0x1D, y + 6, 255, MSG_PAL_0F, 0);
hud_element_set_render_pos(D_8029F642, x + 13, y + 14);
hud_element_draw_clipped(D_8029F642);
break;
case BTL_MSG_ACTION_TIP_00:
case BTL_MSG_ACTION_TIP_01:
case BTL_MSG_ACTION_TIP_02:
case BTL_MSG_ACTION_TIP_03:
case BTL_MSG_ACTION_TIP_04:
case BTL_MSG_ACTION_TIP_05:
case BTL_MSG_ACTION_TIP_06:
case BTL_MSG_ACTION_TIP_07:
case BTL_MSG_ACTION_TIP_08:
case BTL_MSG_ACTION_TIP_09:
case BTL_MSG_ACTION_TIP_0A:
case BTL_MSG_ACTION_TIP_0B:
case BTL_MSG_ACTION_TIP_0C:
case BTL_MSG_ACTION_TIP_0D:
case BTL_MSG_ACTION_TIP_0E:
case BTL_MSG_ACTION_TIP_0F:
case BTL_MSG_ACTION_TIP_10:
case BTL_MSG_ACTION_TIP_11:
case BTL_MSG_ACTION_TIP_12:
case BTL_MSG_ACTION_TIP_13:
case BTL_MSG_ACTION_TIP_14:
opacity = 255;
if (popup->showMsgState < 2) {
opacity = 160;
}
if (popup->messageIndex == BTL_MSG_ACTION_TIP_0D) {
opacity = 255;
}
x -= 11;
y -= 6;
messageID = bMessages[popup->messageIndex];
msgLinesIdx = get_msg_lines(messageID) - 1;
y += D_802835D4[msgLinesIdx];
draw_msg(messageID, x + 11, y + 6, opacity, MSG_PAL_0F, 0);
switch (popup->messageIndex) {
case BTL_MSG_ACTION_TIP_00:
hud_element_set_render_pos(D_8029F642, x + 65, y + 14);
hud_element_set_scale(D_8029F642, 0.5f);
hud_element_set_alpha(D_8029F642, opacity);
hud_element_draw_clipped(D_8029F642);
break;
case BTL_MSG_ACTION_TIP_01:
hud_element_set_render_pos(D_8029F642, x + 55, y + 14);
hud_element_set_scale(D_8029F642, 0.6f);
hud_element_set_alpha(D_8029F642, opacity);
hud_element_draw_clipped(D_8029F642);
hud_element_set_render_pos(D_8029F644, x + 73, y + 31);
hud_element_set_alpha(D_8029F644, opacity);
hud_element_draw_clipped(D_8029F644);
break;
case BTL_MSG_ACTION_TIP_02:
hud_element_set_render_pos(D_8029F642, x + 64, y + 14);
hud_element_set_scale(D_8029F642, 0.5f);
hud_element_set_alpha(D_8029F642, opacity);
hud_element_draw_clipped(D_8029F642);
break;
case BTL_MSG_ACTION_TIP_03:
hud_element_set_render_pos(D_8029F642, x + 67, y + 14);
hud_element_set_scale(D_8029F642, 0.5f);
hud_element_set_alpha(D_8029F642, opacity);
hud_element_draw_clipped(D_8029F642);
break;
case BTL_MSG_ACTION_TIP_04:
hud_element_set_render_pos(D_8029F642, x + 56, y + 14);
hud_element_set_scale(D_8029F642, 0.6f);
hud_element_set_alpha(D_8029F642, opacity);
hud_element_draw_clipped(D_8029F642);
break;
case BTL_MSG_ACTION_TIP_05:
hud_element_set_render_pos(D_8029F642, x + 65, y + 13);
hud_element_set_scale(D_8029F642, 0.6f);
hud_element_set_alpha(D_8029F642, opacity);
hud_element_draw_clipped(D_8029F642);
hud_element_set_render_pos(D_8029F644, x + 146, y + 32);
hud_element_set_scale(D_8029F644, 0.8f);
hud_element_set_alpha(D_8029F644, opacity);
func_80144218(D_8029F644);
break;
case BTL_MSG_ACTION_TIP_08:
hud_element_set_render_pos(D_8029F642, x + 86, y + 13);
hud_element_set_scale(D_8029F642, 0.5f);
hud_element_set_alpha(D_8029F642, opacity);
hud_element_draw_clipped(D_8029F642);
hud_element_set_render_pos(D_8029F644, x + 64, y + 13);
hud_element_set_scale(D_8029F644, 0.5f);
hud_element_set_alpha(D_8029F644, opacity);
hud_element_draw_clipped(D_8029F644);
hud_element_set_render_pos(D_8029F646, x + 108, y + 13);
hud_element_set_scale(D_8029F646, 0.5f);
hud_element_set_alpha(D_8029F646, opacity);
hud_element_draw_clipped(D_8029F646);
break;
case BTL_MSG_ACTION_TIP_0A:
hud_element_set_render_pos(D_8029F642, x + 105, y + 13);
hud_element_set_alpha(D_8029F642, opacity);
hud_element_draw_clipped(D_8029F642);
hud_element_set_render_pos(D_8029F644, x + 65, y + 14);
hud_element_set_scale(D_8029F644, 0.5f);
hud_element_set_alpha(D_8029F644, opacity);
hud_element_draw_clipped(D_8029F644);
break;
case BTL_MSG_ACTION_TIP_0C:
hud_element_set_render_pos(D_8029F642, x + 63, y + 14);
hud_element_set_scale(D_8029F642, 0.5f);
hud_element_set_alpha(D_8029F642, opacity);
hud_element_draw_clipped(D_8029F642);
hud_element_set_render_pos(D_8029F644, x + 84, y + 14);
hud_element_set_scale(D_8029F644, 0.5f);
hud_element_set_alpha(D_8029F644, opacity);
hud_element_draw_clipped(D_8029F644);
break;
case BTL_MSG_ACTION_TIP_0E:
hud_element_set_render_pos(D_8029F642, x + 124, y + 14);
hud_element_set_scale(D_8029F642, 0.5f);
hud_element_set_alpha(D_8029F642, opacity);
hud_element_draw_clipped(D_8029F642);
break;
case BTL_MSG_ACTION_TIP_0F:
hud_element_set_render_pos(D_8029F642, x + 56, y + 31);
hud_element_set_alpha(D_8029F642, opacity);
hud_element_draw_clipped(D_8029F642);
hud_element_set_render_pos(D_8029F644, x + 53, y + 14);
hud_element_set_scale(D_8029F644, 0.5f);
hud_element_set_alpha(D_8029F644, opacity);
hud_element_draw_clipped(D_8029F644);
break;
case BTL_MSG_ACTION_TIP_10:
hud_element_set_render_pos(D_8029F642, x + 107, y + 13);
hud_element_set_scale(D_8029F642, 0.6f);
hud_element_set_alpha(D_8029F642, opacity);
hud_element_draw_clipped(D_8029F642);
hud_element_set_render_pos(D_8029F644, x + 210, y + 15);
hud_element_set_scale(D_8029F644, 0.8f);
hud_element_set_alpha(D_8029F644, opacity);
func_80144218(D_8029F644);
hud_element_set_render_pos(D_8029F646, x + 56, y + 15);
hud_element_set_scale(D_8029F646, 0.8f);
hud_element_set_alpha(D_8029F646, opacity);
func_80144218(D_8029F646);
break;
case BTL_MSG_ACTION_TIP_12:
case BTL_MSG_ACTION_TIP_13:
hud_element_set_render_pos(D_8029F642, x + 64, y + 13);
hud_element_set_scale(D_8029F642, 0.5f);
hud_element_set_alpha(D_8029F642, opacity);
hud_element_draw_clipped(D_8029F642);
break;
}
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_8024CA00
/* 13FD40 8024CA00 27BDFED0 */ addiu $sp, $sp, -0x130
/* 13FD44 8024CA04 AFBF00FC */ sw $ra, 0xFC($sp)
/* 13FD48 8024CA08 AFBE00F8 */ sw $fp, 0xF8($sp)
.L8024CA0C:
/* 13FD4C 8024CA0C AFB700F4 */ sw $s7, 0xF4($sp)
/* 13FD50 8024CA10 AFB600F0 */ sw $s6, 0xF0($sp)
/* 13FD54 8024CA14 AFB500EC */ sw $s5, 0xEC($sp)
/* 13FD58 8024CA18 AFB400E8 */ sw $s4, 0xE8($sp)
.L8024CA1C:
/* 13FD5C 8024CA1C AFB300E4 */ sw $s3, 0xE4($sp)
/* 13FD60 8024CA20 AFB200E0 */ sw $s2, 0xE0($sp)
/* 13FD64 8024CA24 AFB100DC */ sw $s1, 0xDC($sp)
/* 13FD68 8024CA28 AFB000D8 */ sw $s0, 0xD8($sp)
/* 13FD6C 8024CA2C F7BE0128 */ sdc1 $f30, 0x128($sp)
/* 13FD70 8024CA30 F7BC0120 */ sdc1 $f28, 0x120($sp)
/* 13FD74 8024CA34 F7BA0118 */ sdc1 $f26, 0x118($sp)
/* 13FD78 8024CA38 F7B80110 */ sdc1 $f24, 0x110($sp)
/* 13FD7C 8024CA3C F7B60108 */ sdc1 $f22, 0x108($sp)
/* 13FD80 8024CA40 F7B40100 */ sdc1 $f20, 0x100($sp)
/* 13FD84 8024CA44 AFA40130 */ sw $a0, 0x130($sp)
/* 13FD88 8024CA48 AFA50134 */ sw $a1, 0x134($sp)
/* 13FD8C 8024CA4C AFA60138 */ sw $a2, 0x138($sp)
/* 13FD90 8024CA50 0C039D59 */ jal get_player_data
/* 13FD94 8024CA54 AFA7013C */ sw $a3, 0x13C($sp)
/* 13FD98 8024CA58 3C05DC08 */ lui $a1, (0xDC080008 >> 16)
/* 13FD9C 8024CA5C 34A50008 */ ori $a1, $a1, (0xDC080008 & 0xFFFF)
.L8024CA60:
/* 13FDA0 8024CA60 0000A02D */ daddu $s4, $zero, $zero
/* 13FDA4 8024CA64 AFA200D0 */ sw $v0, 0xD0($sp)
/* 13FDA8 8024CA68 3C02800A */ lui $v0, %hi(gMainGfxPos)
.L8024CA6C:
/* 13FDAC 8024CA6C 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos)
/* 13FDB0 8024CA70 0040882D */ daddu $s1, $v0, $zero
/* 13FDB4 8024CA74 3C1EE700 */ lui $fp, (0xE7000000 >> 16)
.L8024CA78:
/* 13FDB8 8024CA78 24170400 */ addiu $s7, $zero, 0x400
/* 13FDBC 8024CA7C 24160010 */ addiu $s6, $zero, 0x10
/* 13FDC0 8024CA80 24150016 */ addiu $s5, $zero, 0x16
.L8024CA84:
/* 13FDC4 8024CA84 24130054 */ addiu $s3, $zero, 0x54
/* 13FDC8 8024CA88 0280902D */ daddu $s2, $s4, $zero
.L8024CA8C:
/* 13FDCC 8024CA8C 8E230000 */ lw $v1, 0x0($s1)
/* 13FDD0 8024CA90 03C0102D */ daddu $v0, $fp, $zero
/* 13FDD4 8024CA94 0060202D */ daddu $a0, $v1, $zero
/* 13FDD8 8024CA98 24630008 */ addiu $v1, $v1, 0x8
/* 13FDDC 8024CA9C AE230000 */ sw $v1, 0x0($s1)
/* 13FDE0 8024CAA0 AC820000 */ sw $v0, 0x0($a0)
/* 13FDE4 8024CAA4 24620008 */ addiu $v0, $v1, 0x8
D_8024CAA8_C0A328:
/* 13FDE8 8024CAA8 AC800004 */ sw $zero, 0x4($a0)
/* 13FDEC 8024CAAC AE220000 */ sw $v0, 0x0($s1)
/* 13FDF0 8024CAB0 3C028025 */ lui $v0, %hi(D_8024F8B0_C0D130)
/* 13FDF4 8024CAB4 2442F8B0 */ addiu $v0, $v0, %lo(D_8024F8B0_C0D130)
/* 13FDF8 8024CAB8 AC620004 */ sw $v0, 0x4($v1)
/* 13FDFC 8024CABC 00761021 */ addu $v0, $v1, $s6
/* 13FE00 8024CAC0 AC650000 */ sw $a1, 0x0($v1)
/* 13FE04 8024CAC4 AE220000 */ sw $v0, 0x0($s1)
/* 13FE08 8024CAC8 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* 13FE0C 8024CACC AC620008 */ sw $v0, 0x8($v1)
/* 13FE10 8024CAD0 3C028027 */ lui $v0, %hi(gPauseDLSpiritsBg)
/* 13FE14 8024CAD4 2442F5A0 */ addiu $v0, $v0, %lo(gPauseDLSpiritsBg)
.L8024CAD8:
/* 13FE18 8024CAD8 AC62000C */ sw $v0, 0xC($v1)
.L8024CADC:
/* 13FE1C 8024CADC 3C02FD48 */ lui $v0, (0xFD48003F >> 16)
/* 13FE20 8024CAE0 3442003F */ ori $v0, $v0, (0xFD48003F & 0xFFFF)
/* 13FE24 8024CAE4 3C0DF548 */ lui $t5, (0xF5481000 >> 16)
/* 13FE28 8024CAE8 35AD1000 */ ori $t5, $t5, (0xF5481000 & 0xFFFF)
/* 13FE2C 8024CAEC 3C0C0708 */ lui $t4, (0x7080170 >> 16)
D_8024CAF0_C0A370:
/* 13FE30 8024CAF0 358C0170 */ ori $t4, $t4, (0x7080170 & 0xFFFF)
/* 13FE34 8024CAF4 3C0B070F */ lui $t3, (0x70FE000 >> 16)
/* 13FE38 8024CAF8 356BE000 */ ori $t3, $t3, (0x70FE000 & 0xFFFF)
/* 13FE3C 8024CAFC 3C0FF540 */ lui $t7, (0xF5401000 >> 16)
/* 13FE40 8024CB00 35EF1000 */ ori $t7, $t7, (0xF5401000 & 0xFFFF)
/* 13FE44 8024CB04 3C0E0008 */ lui $t6, (0x80170 >> 16)
/* 13FE48 8024CB08 35CE0170 */ ori $t6, $t6, (0x80170 & 0xFFFF)
/* 13FE4C 8024CB0C 3C10001F */ lui $s0, (0x1FC000 >> 16)
/* 13FE50 8024CB10 3610C000 */ ori $s0, $s0, (0x1FC000 & 0xFFFF)
/* 13FE54 8024CB14 326A0FFF */ andi $t2, $s3, 0xFFF
/* 13FE58 8024CB18 26730058 */ addiu $s3, $s3, 0x58
/* 13FE5C 8024CB1C 32490FFF */ andi $t1, $s2, 0xFFF
/* 13FE60 8024CB20 26520058 */ addiu $s2, $s2, 0x58
/* 13FE64 8024CB24 26940001 */ addiu $s4, $s4, 0x1
/* 13FE68 8024CB28 014B5825 */ or $t3, $t2, $t3
/* 13FE6C 8024CB2C 01505025 */ or $t2, $t2, $s0
/* 13FE70 8024CB30 8FB80134 */ lw $t8, 0x134($sp)
/* 13FE74 8024CB34 8E230000 */ lw $v1, 0x0($s1)
.L8024CB38:
/* 13FE78 8024CB38 2704000F */ addiu $a0, $t8, 0xF
/* 13FE7C 8024CB3C 00042080 */ sll $a0, $a0, 2
/* 13FE80 8024CB40 0060402D */ daddu $t0, $v1, $zero
/* 13FE84 8024CB44 8FB80138 */ lw $t8, 0x138($sp)
/* 13FE88 8024CB48 24630008 */ addiu $v1, $v1, 0x8
/* 13FE8C 8024CB4C 03153821 */ addu $a3, $t8, $s5
.L8024CB50:
/* 13FE90 8024CB50 00072880 */ sll $a1, $a3, 2
.L8024CB54:
/* 13FE94 8024CB54 24E70016 */ addiu $a3, $a3, 0x16
/* 13FE98 8024CB58 00073880 */ sll $a3, $a3, 2
/* 13FE9C 8024CB5C 8FB80134 */ lw $t8, 0x134($sp)
/* 13FEA0 8024CB60 26B50016 */ addiu $s5, $s5, 0x16
/* 13FEA4 8024CB64 AE230000 */ sw $v1, 0x0($s1)
D_8024CB68_C0A3E8:
/* 13FEA8 8024CB68 AD020000 */ sw $v0, 0x0($t0)
/* 13FEAC 8024CB6C 3C028027 */ lui $v0, %hi(pause_spirits_bg_png)
D_8024CB70:
/* 13FEB0 8024CB70 2442A2B0 */ addiu $v0, $v0, %lo(pause_spirits_bg_png)
/* 13FEB4 8024CB74 AD020004 */ sw $v0, 0x4($t0)
/* 13FEB8 8024CB78 24620008 */ addiu $v0, $v1, 0x8
/* 13FEBC 8024CB7C AE220000 */ sw $v0, 0x0($s1)
/* 13FEC0 8024CB80 24620010 */ addiu $v0, $v1, 0x10
/* 13FEC4 8024CB84 AC6D0000 */ sw $t5, 0x0($v1)
/* 13FEC8 8024CB88 AC6C0004 */ sw $t4, 0x4($v1)
/* 13FECC 8024CB8C AE220000 */ sw $v0, 0x0($s1)
/* 13FED0 8024CB90 3C02E600 */ lui $v0, (0xE6000000 >> 16)
/* 13FED4 8024CB94 AC620008 */ sw $v0, 0x8($v1)
/* 13FED8 8024CB98 24620018 */ addiu $v0, $v1, 0x18
/* 13FEDC 8024CB9C AC60000C */ sw $zero, 0xC($v1)
/* 13FEE0 8024CBA0 AE220000 */ sw $v0, 0x0($s1)
/* 13FEE4 8024CBA4 3C02F400 */ lui $v0, (0xF4000000 >> 16)
/* 13FEE8 8024CBA8 01221025 */ or $v0, $t1, $v0
/* 13FEEC 8024CBAC AC620010 */ sw $v0, 0x10($v1)
/* 13FEF0 8024CBB0 24620020 */ addiu $v0, $v1, 0x20
/* 13FEF4 8024CBB4 AC6B0014 */ sw $t3, 0x14($v1)
/* 13FEF8 8024CBB8 AE220000 */ sw $v0, 0x0($s1)
/* 13FEFC 8024CBBC 24620028 */ addiu $v0, $v1, 0x28
/* 13FF00 8024CBC0 AC7E0018 */ sw $fp, 0x18($v1)
/* 13FF04 8024CBC4 AC60001C */ sw $zero, 0x1C($v1)
/* 13FF08 8024CBC8 AE220000 */ sw $v0, 0x0($s1)
/* 13FF0C 8024CBCC 24620030 */ addiu $v0, $v1, 0x30
/* 13FF10 8024CBD0 AC6F0020 */ sw $t7, 0x20($v1)
/* 13FF14 8024CBD4 AC6E0024 */ sw $t6, 0x24($v1)
/* 13FF18 8024CBD8 AE220000 */ sw $v0, 0x0($s1)
/* 13FF1C 8024CBDC 3C02F200 */ lui $v0, (0xF2000000 >> 16)
/* 13FF20 8024CBE0 01224825 */ or $t1, $t1, $v0
/* 13FF24 8024CBE4 24020010 */ addiu $v0, $zero, 0x10
/* 13FF28 8024CBE8 AC690028 */ sw $t1, 0x28($v1)
/* 13FF2C 8024CBEC AC6A002C */ sw $t2, 0x2C($v1)
/* 13FF30 8024CBF0 AFA00010 */ sw $zero, 0x10($sp)
/* 13FF34 8024CBF4 AFA20014 */ sw $v0, 0x14($sp)
/* 13FF38 8024CBF8 AFB60018 */ sw $s6, 0x18($sp)
/* 13FF3C 8024CBFC AFB7001C */ sw $s7, 0x1C($sp)
/* 13FF40 8024CC00 AFB70020 */ sw $s7, 0x20($sp)
/* 13FF44 8024CC04 2706010F */ addiu $a2, $t8, 0x10F
.L8024CC08:
/* 13FF48 8024CC08 0C091216 */ jal func_80244858
/* 13FF4C 8024CC0C 00063080 */ sll $a2, $a2, 2
/* 13FF50 8024CC10 8E220000 */ lw $v0, 0x0($s1)
.L8024CC14:
/* 13FF54 8024CC14 26D602C0 */ addiu $s6, $s6, 0x2C0
.L8024CC18:
/* 13FF58 8024CC18 0040182D */ daddu $v1, $v0, $zero
.L8024CC1C:
/* 13FF5C 8024CC1C 24420008 */ addiu $v0, $v0, 0x8
/* 13FF60 8024CC20 AE220000 */ sw $v0, 0x0($s1)
/* 13FF64 8024CC24 2A820005 */ slti $v0, $s4, 0x5
D_8024CC28_C0A4A8:
/* 13FF68 8024CC28 AC7E0000 */ sw $fp, 0x0($v1)
/* 13FF6C 8024CC2C 1440FFAB */ bnez $v0, .L8024CADC
.L8024CC30:
/* 13FF70 8024CC30 AC600004 */ sw $zero, 0x4($v1)
D_8024CC34:
/* 13FF74 8024CC34 4480A000 */ mtc1 $zero, $f20
/* 13FF78 8024CC38 3C130001 */ lui $s3, (0x11630 >> 16)
/* 13FF7C 8024CC3C 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF)
/* 13FF80 8024CC40 0000A02D */ daddu $s4, $zero, $zero
/* 13FF84 8024CC44 3C0643A0 */ lui $a2, (0x43A00000 >> 16)
/* 13FF88 8024CC48 3C074370 */ lui $a3, (0x43700000 >> 16)
/* 13FF8C 8024CC4C 3C01C47A */ lui $at, (0xC47A0000 >> 16)
/* 13FF90 8024CC50 44810000 */ mtc1 $at, $f0
/* 13FF94 8024CC54 3C01447A */ lui $at, (0x447A0000 >> 16)
/* 13FF98 8024CC58 44811000 */ mtc1 $at, $f2
/* 13FF9C 8024CC5C 3C013F80 */ lui $at, (0x3F800000 >> 16)
D_8024CC60:
/* 13FFA0 8024CC60 4481B000 */ mtc1 $at, $f22
/* 13FFA4 8024CC64 4405A000 */ mfc1 $a1, $f20
/* 13FFA8 8024CC68 27A40050 */ addiu $a0, $sp, 0x50
/* 13FFAC 8024CC6C E7B40010 */ swc1 $f20, 0x10($sp)
/* 13FFB0 8024CC70 E7A00014 */ swc1 $f0, 0x14($sp)
/* 13FFB4 8024CC74 E7A20018 */ swc1 $f2, 0x18($sp)
/* 13FFB8 8024CC78 0C018E44 */ jal guOrthoF
/* 13FFBC 8024CC7C E7B6001C */ swc1 $f22, 0x1C($sp)
/* 13FFC0 8024CC80 27A40050 */ addiu $a0, $sp, 0x50
/* 13FFC4 8024CC84 3C118007 */ lui $s1, %hi(gMatrixListPos)
/* 13FFC8 8024CC88 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos)
/* 13FFCC 8024CC8C 3C12800A */ lui $s2, %hi(gDisplayContext)
/* 13FFD0 8024CC90 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext)
/* 13FFD4 8024CC94 96250000 */ lhu $a1, 0x0($s1)
/* 13FFD8 8024CC98 8E420000 */ lw $v0, 0x0($s2)
/* 13FFDC 8024CC9C 00052980 */ sll $a1, $a1, 6
D_8024CCA0_C0A520:
/* 13FFE0 8024CCA0 00B32821 */ addu $a1, $a1, $s3
/* 13FFE4 8024CCA4 0C019D40 */ jal guMtxF2L
.L8024CCA8:
/* 13FFE8 8024CCA8 00452821 */ addu $a1, $v0, $a1
/* 13FFEC 8024CCAC 3C09DA38 */ lui $t1, (0xDA380007 >> 16)
/* 13FFF0 8024CCB0 35290007 */ ori $t1, $t1, (0xDA380007 & 0xFFFF)
/* 13FFF4 8024CCB4 27A40050 */ addiu $a0, $sp, 0x50
/* 13FFF8 8024CCB8 3C10800A */ lui $s0, %hi(gMainGfxPos)
/* 13FFFC 8024CCBC 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos)
/* 140000 8024CCC0 8E030000 */ lw $v1, 0x0($s0)
D_8024CCC4:
/* 140004 8024CCC4 4405A000 */ mfc1 $a1, $f20
/* 140008 8024CCC8 4406A000 */ mfc1 $a2, $f20
/* 14000C 8024CCCC 4407A000 */ mfc1 $a3, $f20
/* 140010 8024CCD0 96220000 */ lhu $v0, 0x0($s1)
/* 140014 8024CCD4 0060402D */ daddu $t0, $v1, $zero
D_8024CCD8:
/* 140018 8024CCD8 24630008 */ addiu $v1, $v1, 0x8
/* 14001C 8024CCDC AE030000 */ sw $v1, 0x0($s0)
/* 140020 8024CCE0 24430001 */ addiu $v1, $v0, 0x1
/* 140024 8024CCE4 3042FFFF */ andi $v0, $v0, 0xFFFF
/* 140028 8024CCE8 00021180 */ sll $v0, $v0, 6
/* 14002C 8024CCEC AD090000 */ sw $t1, 0x0($t0)
.L8024CCF0:
/* 140030 8024CCF0 A6230000 */ sh $v1, 0x0($s1)
/* 140034 8024CCF4 8E430000 */ lw $v1, 0x0($s2)
/* 140038 8024CCF8 00531021 */ addu $v0, $v0, $s3
/* 14003C 8024CCFC 00621821 */ addu $v1, $v1, $v0
/* 140040 8024CD00 0C019E40 */ jal guTranslateF
/* 140044 8024CD04 AD030004 */ sw $v1, 0x4($t0)
.L8024CD08:
/* 140048 8024CD08 27A40050 */ addiu $a0, $sp, 0x50
/* 14004C 8024CD0C 96250000 */ lhu $a1, 0x0($s1)
D_8024CD10_C0A590:
/* 140050 8024CD10 8E420000 */ lw $v0, 0x0($s2)
/* 140054 8024CD14 00052980 */ sll $a1, $a1, 6
/* 140058 8024CD18 00B32821 */ addu $a1, $a1, $s3
/* 14005C 8024CD1C 0C019D40 */ jal guMtxF2L
/* 140060 8024CD20 00452821 */ addu $a1, $v0, $a1
/* 140064 8024CD24 3C04DA38 */ lui $a0, (0xDA380002 >> 16)
.L8024CD28:
/* 140068 8024CD28 34840002 */ ori $a0, $a0, (0xDA380002 & 0xFFFF)
/* 14006C 8024CD2C 8E020000 */ lw $v0, 0x0($s0)
/* 140070 8024CD30 96230000 */ lhu $v1, 0x0($s1)
/* 140074 8024CD34 0040282D */ daddu $a1, $v0, $zero
/* 140078 8024CD38 24420008 */ addiu $v0, $v0, 0x8
/* 14007C 8024CD3C AE020000 */ sw $v0, 0x0($s0)
.L8024CD40:
/* 140080 8024CD40 24620001 */ addiu $v0, $v1, 0x1
/* 140084 8024CD44 3063FFFF */ andi $v1, $v1, 0xFFFF
/* 140088 8024CD48 00031980 */ sll $v1, $v1, 6
/* 14008C 8024CD4C 00731821 */ addu $v1, $v1, $s3
/* 140090 8024CD50 ACA40000 */ sw $a0, 0x0($a1)
/* 140094 8024CD54 A6220000 */ sh $v0, 0x0($s1)
/* 140098 8024CD58 8E420000 */ lw $v0, 0x0($s2)
.L8024CD5C:
/* 14009C 8024CD5C 3C048027 */ lui $a0, %hi(gPauseSpiritsNumSpirits)
/* 1400A0 8024CD60 8C8406FC */ lw $a0, %lo(gPauseSpiritsNumSpirits)($a0)
/* 1400A4 8024CD64 00431021 */ addu $v0, $v0, $v1
/* 1400A8 8024CD68 188000B3 */ blez $a0, .L8024D038
/* 1400AC 8024CD6C ACA20004 */ sw $v0, 0x4($a1)
/* 1400B0 8024CD70 3C168027 */ lui $s6, %hi(gPauseSpiritsSpriteIDs)
/* 1400B4 8024CD74 26D606C0 */ addiu $s6, $s6, %lo(gPauseSpiritsSpriteIDs)
/* 1400B8 8024CD78 4600A686 */ mov.s $f26, $f20
/* 1400BC 8024CD7C 27B30090 */ addiu $s3, $sp, 0x90
/* 1400C0 8024CD80 3C013F66 */ lui $at, (0x3F666666 >> 16)
/* 1400C4 8024CD84 34216666 */ ori $at, $at, (0x3F666666 & 0xFFFF)
/* 1400C8 8024CD88 4481F000 */ mtc1 $at, $f30
/* 1400CC 8024CD8C 00141880 */ sll $v1, $s4, 2
.L8024CD90:
/* 1400D0 8024CD90 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 1400D4 8024CD94 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
D_8024CD98_C0A618:
/* 1400D8 8024CD98 3C128025 */ lui $s2, %hi(D_8024F974)
/* 1400DC 8024CD9C 02439021 */ addu $s2, $s2, $v1
D_8024CDA0:
/* 1400E0 8024CDA0 8E52F974 */ lw $s2, %lo(D_8024F974)($s2)
.L8024CDA4:
/* 1400E4 8024CDA4 3C038025 */ lui $v1, %hi(D_8024F93C)
/* 1400E8 8024CDA8 2463F93C */ addiu $v1, $v1, %lo(D_8024F93C)
D_8024CDAC:
/* 1400EC 8024CDAC 94420134 */ lhu $v0, 0x134($v0)
/* 1400F0 8024CDB0 8FB800D0 */ lw $t8, 0xD0($sp)
/* 1400F4 8024CDB4 00021080 */ sll $v0, $v0, 2
/* 1400F8 8024CDB8 4482B000 */ mtc1 $v0, $f22
.L8024CDBC:
/* 1400FC 8024CDBC 00000000 */ nop
/* 140100 8024CDC0 4680B5A0 */ cvt.s.w $f22, $f22
/* 140104 8024CDC4 001210C0 */ sll $v0, $s2, 3
/* 140108 8024CDC8 00431021 */ addu $v0, $v0, $v1
/* 14010C 8024CDCC C4580000 */ lwc1 $f24, 0x0($v0)
/* 140110 8024CDD0 4680C620 */ cvt.s.w $f24, $f24
/* 140114 8024CDD4 C45C0004 */ lwc1 $f28, 0x4($v0)
/* 140118 8024CDD8 4680E720 */ cvt.s.w $f28, $f28
/* 14011C 8024CDDC 8302028E */ lb $v0, 0x28E($t8)
/* 140120 8024CDE0 26430001 */ addiu $v1, $s2, 0x1
/* 140124 8024CDE4 0043102A */ slt $v0, $v0, $v1
/* 140128 8024CDE8 10400004 */ beqz $v0, .L8024CDFC
/* 14012C 8024CDEC 0000802D */ daddu $s0, $zero, $zero
/* 140130 8024CDF0 4480A000 */ mtc1 $zero, $f20
/* 140134 8024CDF4 080933BA */ j .L8024CEE8
/* 140138 8024CDF8 24110080 */ addiu $s1, $zero, 0x80
.L8024CDFC:
/* 14013C 8024CDFC 3C018027 */ lui $at, %hi(D_80270050)
/* 140140 8024CE00 D4240050 */ ldc1 $f4, %lo(D_80270050)($at)
.L8024CE04:
/* 140144 8024CE04 4600B5A1 */ cvt.d.s $f22, $f22
D_8024CE08_C0A688:
/* 140148 8024CE08 4624B102 */ mul.d $f4, $f22, $f4
/* 14014C 8024CE0C 00000000 */ nop
/* 140150 8024CE10 3C018027 */ lui $at, %hi(D_80270058)
/* 140154 8024CE14 D4220058 */ ldc1 $f2, %lo(D_80270058)($at)
/* 140158 8024CE18 4492A000 */ mtc1 $s2, $f20
.L8024CE1C:
/* 14015C 8024CE1C 00000000 */ nop
/* 140160 8024CE20 4680A521 */ cvt.d.w $f20, $f20
/* 140164 8024CE24 4622A082 */ mul.d $f2, $f20, $f2
/* 140168 8024CE28 00000000 */ nop
/* 14016C 8024CE2C 3C018027 */ lui $at, %hi(D_80270060)
/* 140170 8024CE30 D4200060 */ ldc1 $f0, %lo(D_80270060)($at)
/* 140174 8024CE34 46201080 */ add.d $f2, $f2, $f0
/* 140178 8024CE38 4622B082 */ mul.d $f2, $f22, $f2
/* 14017C 8024CE3C 00000000 */ nop
/* 140180 8024CE40 02520018 */ mult $s2, $s2
/* 140184 8024CE44 0000C012 */ mflo $t8
/* 140188 8024CE48 00000000 */ nop
/* 14018C 8024CE4C 00000000 */ nop
/* 140190 8024CE50 03120018 */ mult $t8, $s2
/* 140194 8024CE54 0000C012 */ mflo $t8
/* 140198 8024CE58 44986000 */ mtc1 $t8, $f12
/* 14019C 8024CE5C 00000000 */ nop
/* 1401A0 8024CE60 46806321 */ cvt.d.w $f12, $f12
.L8024CE64:
/* 1401A4 8024CE64 46246300 */ add.d $f12, $f12, $f4
/* 1401A8 8024CE68 46226300 */ add.d $f12, $f12, $f2
/* 1401AC 8024CE6C 0C00A8BB */ jal sin_deg
/* 1401B0 8024CE70 46206320 */ cvt.s.d $f12, $f12
/* 1401B4 8024CE74 3C013FD0 */ lui $at, (0x3FD00000 >> 16)
/* 1401B8 8024CE78 44816800 */ mtc1 $at, $f13
.L8024CE7C:
/* 1401BC 8024CE7C 44806000 */ mtc1 $zero, $f12
.L8024CE80:
/* 1401C0 8024CE80 00000000 */ nop
/* 1401C4 8024CE84 462CA302 */ mul.d $f12, $f20, $f12
/* 1401C8 8024CE88 00000000 */ nop
/* 1401CC 8024CE8C 3C018027 */ lui $at, %hi(D_80270068)
/* 1401D0 8024CE90 D4220068 */ ldc1 $f2, %lo(D_80270068)($at)
/* 1401D4 8024CE94 4622A502 */ mul.d $f20, $f20, $f2
/* 1401D8 8024CE98 00000000 */ nop
glabel func_8024CE9C
/* 1401DC 8024CE9C 3C018027 */ lui $at, %hi(D_80270070)
/* 1401E0 8024CEA0 D4220070 */ ldc1 $f2, %lo(D_80270070)($at)
/* 1401E4 8024CEA4 46341081 */ sub.d $f2, $f2, $f20
/* 1401E8 8024CEA8 4622B082 */ mul.d $f2, $f22, $f2
/* 1401EC 8024CEAC 00000000 */ nop
/* 1401F0 8024CEB0 46366300 */ add.d $f12, $f12, $f22
/* 1401F4 8024CEB4 46226300 */ add.d $f12, $f12, $f2
/* 1401F8 8024CEB8 46000506 */ mov.s $f20, $f0
/* 1401FC 8024CEBC 0C00A8BB */ jal sin_deg
/* 140200 8024CEC0 46206320 */ cvt.s.d $f12, $f12
/* 140204 8024CEC4 3C0140A0 */ lui $at, (0x40A00000 >> 16)
/* 140208 8024CEC8 44811000 */ mtc1 $at, $f2
/* 14020C 8024CECC 00000000 */ nop
/* 140210 8024CED0 4602A502 */ mul.s $f20, $f20, $f2
/* 140214 8024CED4 00000000 */ nop
/* 140218 8024CED8 241000FF */ addiu $s0, $zero, 0xFF
/* 14021C 8024CEDC 0200882D */ daddu $s1, $s0, $zero
/* 140220 8024CEE0 4600A502 */ mul.s $f20, $f20, $f0
/* 140224 8024CEE4 00000000 */ nop
.L8024CEE8:
/* 140228 8024CEE8 24050008 */ addiu $a1, $zero, 0x8
/* 14022C 8024CEEC 3C038027 */ lui $v1, %hi(gPauseSpiritsIndexes)
/* 140230 8024CEF0 246306E0 */ addiu $v1, $v1, %lo(gPauseSpiritsIndexes)
/* 140234 8024CEF4 00121080 */ sll $v0, $s2, 2
/* 140238 8024CEF8 0043A821 */ addu $s5, $v0, $v1
/* 14023C 8024CEFC 0200302D */ daddu $a2, $s0, $zero
/* 140240 8024CF00 8EA30000 */ lw $v1, 0x0($s5)
/* 140244 8024CF04 24020040 */ addiu $v0, $zero, 0x40
/* 140248 8024CF08 AFA60010 */ sw $a2, 0x10($sp)
/* 14024C 8024CF0C AFB10014 */ sw $s1, 0x14($sp)
/* 140250 8024CF10 AFA20018 */ sw $v0, 0x18($sp)
/* 140254 8024CF14 00031880 */ sll $v1, $v1, 2
/* 140258 8024CF18 00761821 */ addu $v1, $v1, $s6
/* 14025C 8024CF1C 8C640000 */ lw $a0, 0x0($v1)
/* 140260 8024CF20 0C0B7A25 */ jal set_npc_imgfx_all
/* 140264 8024CF24 00C0382D */ daddu $a3, $a2, $zero
/* 140268 8024CF28 8FB80134 */ lw $t8, 0x134($sp)
/* 14026C 8024CF2C 27020016 */ addiu $v0, $t8, 0x16
/* 140270 8024CF30 44820000 */ mtc1 $v0, $f0
glabel func_8024CF34
/* 140274 8024CF34 00000000 */ nop
/* 140278 8024CF38 46800020 */ cvt.s.w $f0, $f0
/* 14027C 8024CF3C 46180000 */ add.s $f0, $f0, $f24
/* 140280 8024CF40 8FB80138 */ lw $t8, 0x138($sp)
/* 140284 8024CF44 2702004D */ addiu $v0, $t8, 0x4D
/* 140288 8024CF48 44050000 */ mfc1 $a1, $f0
/* 14028C 8024CF4C 44820000 */ mtc1 $v0, $f0
/* 140290 8024CF50 00000000 */ nop
/* 140294 8024CF54 46800020 */ cvt.s.w $f0, $f0
/* 140298 8024CF58 461C0000 */ add.s $f0, $f0, $f28
/* 14029C 8024CF5C 46140000 */ add.s $f0, $f0, $f20
/* 1402A0 8024CF60 4407D000 */ mfc1 $a3, $f26
/* 1402A4 8024CF64 44060000 */ mfc1 $a2, $f0
/* 1402A8 8024CF68 0C019E40 */ jal guTranslateF
/* 1402AC 8024CF6C 27A40050 */ addiu $a0, $sp, 0x50
/* 1402B0 8024CF70 3C054334 */ lui $a1, (0x43340000 >> 16)
/* 1402B4 8024CF74 4406D000 */ mfc1 $a2, $f26
/* 1402B8 8024CF78 4407D000 */ mfc1 $a3, $f26
D_8024CF7C:
/* 1402BC 8024CF7C 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1402C0 8024CF80 44813000 */ mtc1 $at, $f6
/* 1402C4 8024CF84 0260202D */ daddu $a0, $s3, $zero
/* 1402C8 8024CF88 0C019EC8 */ jal guRotateF
/* 1402CC 8024CF8C E7A60010 */ swc1 $f6, 0x10($sp)
/* 1402D0 8024CF90 0260202D */ daddu $a0, $s3, $zero
/* 1402D4 8024CF94 27A50050 */ addiu $a1, $sp, 0x50
/* 1402D8 8024CF98 0C019D80 */ jal guMtxCatF
/* 1402DC 8024CF9C 00A0302D */ daddu $a2, $a1, $zero
/* 1402E0 8024CFA0 2642FFFF */ addiu $v0, $s2, -0x1
/* 1402E4 8024CFA4 2C420003 */ sltiu $v0, $v0, 0x3
/* 1402E8 8024CFA8 1040000A */ beqz $v0, .L8024CFD4
/* 1402EC 8024CFAC 0260202D */ daddu $a0, $s3, $zero
glabel .L8024CFB0
/* 1402F0 8024CFB0 3C054334 */ lui $a1, (0x43340000 >> 16)
/* 1402F4 8024CFB4 4406D000 */ mfc1 $a2, $f26
D_8024CFB8:
/* 1402F8 8024CFB8 3C073F80 */ lui $a3, (0x3F800000 >> 16)
glabel .L8024CFBC
/* 1402FC 8024CFBC 0C019EC8 */ jal guRotateF
/* 140300 8024CFC0 E7BA0010 */ swc1 $f26, 0x10($sp)
/* 140304 8024CFC4 0260202D */ daddu $a0, $s3, $zero
glabel .L8024CFC8
/* 140308 8024CFC8 27A50050 */ addiu $a1, $sp, 0x50
/* 14030C 8024CFCC 0C019D80 */ jal guMtxCatF
/* 140310 8024CFD0 00A0302D */ daddu $a2, $a1, $zero
.L8024CFD4:
/* 140314 8024CFD4 4405F000 */ mfc1 $a1, $f30
/* 140318 8024CFD8 4406F000 */ mfc1 $a2, $f30
/* 14031C 8024CFDC 4407F000 */ mfc1 $a3, $f30
/* 140320 8024CFE0 0C019DF0 */ jal guScaleF
/* 140324 8024CFE4 0260202D */ daddu $a0, $s3, $zero
/* 140328 8024CFE8 0260202D */ daddu $a0, $s3, $zero
/* 14032C 8024CFEC 27A50050 */ addiu $a1, $sp, 0x50
/* 140330 8024CFF0 0C019D80 */ jal guMtxCatF
/* 140334 8024CFF4 00A0302D */ daddu $a2, $a1, $zero
D_8024CFF8_C0A878:
/* 140338 8024CFF8 0000282D */ daddu $a1, $zero, $zero
glabel .L8024CFFC
/* 14033C 8024CFFC 00A0302D */ daddu $a2, $a1, $zero
/* 140340 8024D000 8EA20000 */ lw $v0, 0x0($s5)
/* 140344 8024D004 27A30050 */ addiu $v1, $sp, 0x50
/* 140348 8024D008 AFA30010 */ sw $v1, 0x10($sp)
/* 14034C 8024D00C 00021080 */ sll $v0, $v0, 2
/* 140350 8024D010 00561021 */ addu $v0, $v0, $s6
/* 140354 8024D014 8C440000 */ lw $a0, 0x0($v0)
/* 140358 8024D018 0C0B78F6 */ jal spr_draw_npc_sprite
/* 14035C 8024D01C 00A0382D */ daddu $a3, $a1, $zero
/* 140360 8024D020 3C028027 */ lui $v0, %hi(gPauseSpiritsNumSpirits)
glabel .L8024D024
/* 140364 8024D024 8C4206FC */ lw $v0, %lo(gPauseSpiritsNumSpirits)($v0)
/* 140368 8024D028 26940001 */ addiu $s4, $s4, 0x1
/* 14036C 8024D02C 0282102A */ slt $v0, $s4, $v0
/* 140370 8024D030 1440FF57 */ bnez $v0, .L8024CD90
/* 140374 8024D034 00141880 */ sll $v1, $s4, 2
.L8024D038:
/* 140378 8024D038 3C02D838 */ lui $v0, (0xD8380002 >> 16)
/* 14037C 8024D03C 34420002 */ ori $v0, $v0, (0xD8380002 & 0xFFFF)
/* 140380 8024D040 8FB80134 */ lw $t8, 0x134($sp)
/* 140384 8024D044 3C0C800A */ lui $t4, %hi(gMainGfxPos)
/* 140388 8024D048 258CA66C */ addiu $t4, $t4, %lo(gMainGfxPos)
D_8024D04C:
/* 14038C 8024D04C 27060007 */ addiu $a2, $t8, 0x7
/* 140390 8024D050 8FB80138 */ lw $t8, 0x138($sp)
/* 140394 8024D054 8D890000 */ lw $t1, 0x0($t4)
/* 140398 8024D058 2708000E */ addiu $t0, $t8, 0xE
/* 14039C 8024D05C 8FB80134 */ lw $t8, 0x134($sp)
D_8024D060_C0A8E0:
/* 1403A0 8024D060 0120182D */ daddu $v1, $t1, $zero
/* 1403A4 8024D064 270A0117 */ addiu $t2, $t8, 0x117
/* 1403A8 8024D068 8FB80138 */ lw $t8, 0x138($sp)
/* 1403AC 8024D06C 25290008 */ addiu $t1, $t1, 0x8
/* 1403B0 8024D070 AD890000 */ sw $t1, 0x0($t4)
glabel .L8024D074
/* 1403B4 8024D074 AC620000 */ sw $v0, 0x0($v1)
/* 1403B8 8024D078 24020040 */ addiu $v0, $zero, 0x40
/* 1403BC 8024D07C AC620004 */ sw $v0, 0x4($v1)
/* 1403C0 8024D080 1CC00002 */ bgtz $a2, .L8024D08C
/* 1403C4 8024D084 270B008C */ addiu $t3, $t8, 0x8C
/* 1403C8 8024D088 24060001 */ addiu $a2, $zero, 0x1
.L8024D08C:
/* 1403CC 8024D08C 59000001 */ blezl $t0, .L8024D094
/* 1403D0 8024D090 24080001 */ addiu $t0, $zero, 0x1
.L8024D094:
/* 1403D4 8024D094 1940006D */ blez $t2, .L8024D24C
/* 1403D8 8024D098 00000000 */ nop
glabel .L8024D09C
/* 1403DC 8024D09C 1960006B */ blez $t3, .L8024D24C
/* 1403E0 8024D0A0 28C2013F */ slti $v0, $a2, 0x13F
/* 1403E4 8024D0A4 10400069 */ beqz $v0, .L8024D24C
/* 1403E8 8024D0A8 290200EF */ slti $v0, $t0, 0xEF
/* 1403EC 8024D0AC 10400067 */ beqz $v0, .L8024D24C
/* 1403F0 8024D0B0 2942013F */ slti $v0, $t2, 0x13F
/* 1403F4 8024D0B4 50400001 */ beql $v0, $zero, .L8024D0BC
/* 1403F8 8024D0B8 240A013F */ addiu $t2, $zero, 0x13F
.L8024D0BC:
/* 1403FC 8024D0BC 296200EF */ slti $v0, $t3, 0xEF
/* 140400 8024D0C0 50400001 */ beql $v0, $zero, .L8024D0C8
glabel .L8024D0C4
/* 140404 8024D0C4 240B00EF */ addiu $t3, $zero, 0xEF
.L8024D0C8:
/* 140408 8024D0C8 44861000 */ mtc1 $a2, $f2
/* 14040C 8024D0CC 00000000 */ nop
/* 140410 8024D0D0 468010A0 */ cvt.s.w $f2, $f2
/* 140414 8024D0D4 25220008 */ addiu $v0, $t1, 0x8
/* 140418 8024D0D8 3C014080 */ lui $at, (0x40800000 >> 16)
/* 14041C 8024D0DC 44812000 */ mtc1 $at, $f4
/* 140420 8024D0E0 44880000 */ mtc1 $t0, $f0
/* 140424 8024D0E4 00000000 */ nop
/* 140428 8024D0E8 46800020 */ cvt.s.w $f0, $f0
glabel .L8024D0EC
/* 14042C 8024D0EC 46041082 */ mul.s $f2, $f2, $f4
/* 140430 8024D0F0 00000000 */ nop
/* 140434 8024D0F4 8FB80134 */ lw $t8, 0x134($sp)
/* 140438 8024D0F8 3C08ED00 */ lui $t0, (0xED000000 >> 16)
/* 14043C 8024D0FC 27060007 */ addiu $a2, $t8, 0x7
/* 140440 8024D100 8FB80138 */ lw $t8, 0x138($sp)
/* 140444 8024D104 46040002 */ mul.s $f0, $f0, $f4
/* 140448 8024D108 00000000 */ nop
/* 14044C 8024D10C AD820000 */ sw $v0, 0x0($t4)
/* 140450 8024D110 2707000E */ addiu $a3, $t8, 0xE
/* 140454 8024D114 4600118D */ trunc.w.s $f6, $f2
/* 140458 8024D118 44023000 */ mfc1 $v0, $f6
/* 14045C 8024D11C 00000000 */ nop
glabel .L8024D120
/* 140460 8024D120 30420FFF */ andi $v0, $v0, 0xFFF
/* 140464 8024D124 00021300 */ sll $v0, $v0, 12
/* 140468 8024D128 4600018D */ trunc.w.s $f6, $f0
/* 14046C 8024D12C 44033000 */ mfc1 $v1, $f6
D_8024D130:
/* 140470 8024D130 448A1000 */ mtc1 $t2, $f2
D_8024D134:
/* 140474 8024D134 00000000 */ nop
/* 140478 8024D138 468010A0 */ cvt.s.w $f2, $f2
/* 14047C 8024D13C 46041082 */ mul.s $f2, $f2, $f4
/* 140480 8024D140 00000000 */ nop
/* 140484 8024D144 30630FFF */ andi $v1, $v1, 0xFFF
/* 140488 8024D148 00681825 */ or $v1, $v1, $t0
/* 14048C 8024D14C 00431025 */ or $v0, $v0, $v1
/* 140490 8024D150 448B0000 */ mtc1 $t3, $f0
D_8024D154:
/* 140494 8024D154 00000000 */ nop
/* 140498 8024D158 46800020 */ cvt.s.w $f0, $f0
/* 14049C 8024D15C 46040002 */ mul.s $f0, $f0, $f4
/* 1404A0 8024D160 00000000 */ nop
/* 1404A4 8024D164 AD220000 */ sw $v0, 0x0($t1)
/* 1404A8 8024D168 4600118D */ trunc.w.s $f6, $f2
D_8024D16C:
/* 1404AC 8024D16C 44023000 */ mfc1 $v0, $f6
/* 1404B0 8024D170 00000000 */ nop
/* 1404B4 8024D174 30420FFF */ andi $v0, $v0, 0xFFF
/* 1404B8 8024D178 00021300 */ sll $v0, $v0, 12
glabel .L8024D17C
/* 1404BC 8024D17C 4600018D */ trunc.w.s $f6, $f0
/* 1404C0 8024D180 44033000 */ mfc1 $v1, $f6
/* 1404C4 8024D184 00000000 */ nop
/* 1404C8 8024D188 30630FFF */ andi $v1, $v1, 0xFFF
/* 1404CC 8024D18C 00431025 */ or $v0, $v0, $v1
/* 1404D0 8024D190 AD220004 */ sw $v0, 0x4($t1)
/* 1404D4 8024D194 24020110 */ addiu $v0, $zero, 0x110
/* 1404D8 8024D198 AFA20014 */ sw $v0, 0x14($sp)
/* 1404DC 8024D19C 2402007E */ addiu $v0, $zero, 0x7E
/* 1404E0 8024D1A0 AFA20018 */ sw $v0, 0x18($sp)
/* 1404E4 8024D1A4 93A20147 */ lbu $v0, 0x147($sp)
/* 1404E8 8024D1A8 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1404EC 8024D1AC 44810000 */ mtc1 $at, $f0
glabel .L8024D1B0
/* 1404F0 8024D1B0 8FB8013C */ lw $t8, 0x13C($sp)
/* 1404F4 8024D1B4 AFA2001C */ sw $v0, 0x1C($sp)
/* 1404F8 8024D1B8 93A2014B */ lbu $v0, 0x14B($sp)
/* 1404FC 8024D1BC 0000202D */ daddu $a0, $zero, $zero
/* 140500 8024D1C0 AFA20020 */ sw $v0, 0x20($sp)
/* 140504 8024D1C4 8FA20140 */ lw $v0, 0x140($sp)
/* 140508 8024D1C8 3C058027 */ lui $a1, %hi(gPauseWS_25)
/* 14050C 8024D1CC 24A5FE78 */ addiu $a1, $a1, %lo(gPauseWS_25)
/* 140510 8024D1D0 AFA00010 */ sw $zero, 0x10($sp)
/* 140514 8024D1D4 AFA0002C */ sw $zero, 0x2C($sp)
/* 140518 8024D1D8 AFA00030 */ sw $zero, 0x30($sp)
/* 14051C 8024D1DC AFA00034 */ sw $zero, 0x34($sp)
/* 140520 8024D1E0 AFA00038 */ sw $zero, 0x38($sp)
glabel .L8024D1E4
/* 140524 8024D1E4 AFA0003C */ sw $zero, 0x3C($sp)
/* 140528 8024D1E8 AFA00040 */ sw $zero, 0x40($sp)
/* 14052C 8024D1EC AFA0004C */ sw $zero, 0x4C($sp)
/* 140530 8024D1F0 E7A00024 */ swc1 $f0, 0x24($sp)
/* 140534 8024D1F4 E7A00028 */ swc1 $f0, 0x28($sp)
/* 140538 8024D1F8 AFB80044 */ sw $t8, 0x44($sp)
/* 14053C 8024D1FC 0C03D4B8 */ jal draw_box
/* 140540 8024D200 AFA20048 */ sw $v0, 0x48($sp)
/* 140544 8024D204 3C038027 */ lui $v1, %hi(gPauseMenuCurrentTab)
/* 140548 8024D208 806300D4 */ lb $v1, %lo(gPauseMenuCurrentTab)($v1)
glabel .L8024D20C
/* 14054C 8024D20C 24020005 */ addiu $v0, $zero, 0x5
/* 140550 8024D210 1462000E */ bne $v1, $v0, .L8024D24C
/* 140554 8024D214 24040027 */ addiu $a0, $zero, 0x27
/* 140558 8024D218 8FB80130 */ lw $t8, 0x130($sp)
/* 14055C 8024D21C 3C038025 */ lui $v1, %hi(D_8024F990)
/* 140560 8024D220 2463F990 */ addiu $v1, $v1, %lo(D_8024F990)
/* 140564 8024D224 93020003 */ lbu $v0, 0x3($t8)
/* 140568 8024D228 8FB80134 */ lw $t8, 0x134($sp)
/* 14056C 8024D22C 000210C0 */ sll $v0, $v0, 3
/* 140570 8024D230 00431021 */ addu $v0, $v0, $v1
/* 140574 8024D234 8C450000 */ lw $a1, 0x0($v0)
/* 140578 8024D238 8C460004 */ lw $a2, 0x4($v0)
/* 14057C 8024D23C 03052821 */ addu $a1, $t8, $a1
glabel .L8024D240
/* 140580 8024D240 8FB80138 */ lw $t8, 0x138($sp)
/* 140584 8024D244 0C090B41 */ jal func_80242D04
/* 140588 8024D248 03063021 */ addu $a2, $t8, $a2
.L8024D24C:
/* 14058C 8024D24C 8FBF00FC */ lw $ra, 0xFC($sp)
/* 140590 8024D250 8FBE00F8 */ lw $fp, 0xF8($sp)
/* 140594 8024D254 8FB700F4 */ lw $s7, 0xF4($sp)
/* 140598 8024D258 8FB600F0 */ lw $s6, 0xF0($sp)
/* 14059C 8024D25C 8FB500EC */ lw $s5, 0xEC($sp)
/* 1405A0 8024D260 8FB400E8 */ lw $s4, 0xE8($sp)
/* 1405A4 8024D264 8FB300E4 */ lw $s3, 0xE4($sp)
/* 1405A8 8024D268 8FB200E0 */ lw $s2, 0xE0($sp)
/* 1405AC 8024D26C 8FB100DC */ lw $s1, 0xDC($sp)
/* 1405B0 8024D270 8FB000D8 */ lw $s0, 0xD8($sp)
/* 1405B4 8024D274 D7BE0128 */ ldc1 $f30, 0x128($sp)
/* 1405B8 8024D278 D7BC0120 */ ldc1 $f28, 0x120($sp)
/* 1405BC 8024D27C D7BA0118 */ ldc1 $f26, 0x118($sp)
D_8024D280_C0AB00:
/* 1405C0 8024D280 D7B80110 */ ldc1 $f24, 0x110($sp)
/* 1405C4 8024D284 D7B60108 */ ldc1 $f22, 0x108($sp)
glabel .L8024D288
/* 1405C8 8024D288 D7B40100 */ ldc1 $f20, 0x100($sp)
/* 1405CC 8024D28C 03E00008 */ jr $ra
/* 1405D0 8024D290 27BD0130 */ addiu $sp, $sp, 0x130
### DECOMPILED C INSTRUCTIONS:
void pause_spirits_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
Matrix4f matrix1;
Matrix4f matrix2;
s32 i, j;
s32 color;
s32 alpha;
s32 index;
f32 x, y;
f32 offsetY;
s32 x1, y1, x2, y2;
f32 frameCounter;
f32 scale;
PlayerData* playerData = get_player_data();
gDPPipeSync(gMainGfxPos++);
gSPViewport(gMainGfxPos++, &gPauseSpiritsViewport);
gSPDisplayList(gMainGfxPos++, gPauseDLSpiritsBg);
for (i = 0; i < 5; i++) {
gDPLoadTextureTile_4b(gMainGfxPos++, pause_spirits_bg_png, G_IM_FMT_CI, 128, 110,
0, i * 22, 127, i * 22 + 21, 0,
G_TX_MIRROR, G_TX_CLAMP, 7, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
pause_draw_rect((baseX + 15) * 4, (baseY + 22 + i * 22) * 4, (baseX + 271) * 4, (baseY + 22 + i * 22 + 22) * 4, 0, 16, 16 + i * 704, 0x400, 0x400);
gDPPipeSync(gMainGfxPos++);
}
guOrthoF(matrix1, 0.0f, 320.0f, 240.0f, 0.0f, -1000.0f, 1000.0f, 1.0f);
guMtxF2L(matrix1, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guTranslateF(matrix1, 0.0f, 0.0f, 0.0f);
guMtxF2L(matrix1, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
for (i = 0; i < gPauseSpiritsNumSpirits; i++) {
index = gPauseSpiritsDrawOrder[i];
frameCounter = gGameStatusPtr->frameCounter * 4;
x = gPauseSpiritsPositions[index].x;
y = gPauseSpiritsPositions[index].y;
if (playerData->maxStarPower < index + 1) {
color = 0;
alpha = 128;
offsetY = 0.0f;
} else {
color = 255;
alpha = 255;
offsetY = sin_deg(index * index * index + frameCounter * 0.4321 + frameCounter * (index * 0.02 + 0.1324))
* 5.0f
* sin_deg(index * 0.25 + frameCounter + frameCounter * (0.0432 - index * 0.01));
}
set_npc_imgfx_all(gPauseSpiritsSpriteIDs[gPauseSpiritsIndexes[index]], IMGFX_SET_TINT, color, color, color, alpha, 64);
guTranslateF(matrix1, baseX + 22 + x, baseY + 77 + y + offsetY, 0.0f);
guRotateF(matrix2, 180.0f, 0.0f, 0.0f, 1.0f);
guMtxCatF(matrix2, matrix1, matrix1);
if (index == 1 || index == 2 || index == 3) {
guRotateF(matrix2, 180.0f, 0.0f, 1.0f, 0.0f);
guMtxCatF(matrix2, matrix1, matrix1);
}
guScaleF(matrix2, 0.9f, 0.9f, 0.9f);
guMtxCatF(matrix2, matrix1, matrix1);
spr_draw_npc_sprite(gPauseSpiritsSpriteIDs[gPauseSpiritsIndexes[index]], 0, 0, 0, matrix1);
}
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
x1 = baseX + 7;
y1 = baseY + 14;
x2 = baseX + 279;
y2 = baseY + 140;
if (x1 <= 0) {
x1 = 1;
}
if (y1 <= 0) {
y1 = 1;
}
if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) {
return;
}
if (x2 >= SCREEN_WIDTH - 1) {
x2 = SCREEN_WIDTH - 1;
}
if (y2 >= SCREEN_HEIGHT - 1) {
y2 = SCREEN_HEIGHT - 1;
}
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
draw_box(0, &gPauseWS_25, baseX + 7, baseY + 14, 0, 272, 126, opacity, darkening, 1.0f, 1.0f, 0, 0, 0, 0, 0, 0, width, height, 0);
if (gPauseMenuCurrentTab == 5) {
pause_set_cursor_pos(WINDOW_ID_PAUSE_SPIRITS, baseX + gPauseSpiritsCursorPositions[menu->selected].x, baseY + gPauseSpiritsCursorPositions[menu->selected].y);
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel action_update_sliding
/* E27570 802B6060 27BDFF90 */ addiu $sp, $sp, -0x70
/* E27574 802B6064 AFB00058 */ sw $s0, 0x58($sp)
.L802B6068:
/* E27578 802B6068 3C108011 */ lui $s0, %hi(gPlayerStatus)
/* E2757C 802B606C 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus)
/* E27580 802B6070 AFBF0064 */ sw $ra, 0x64($sp)
.L802B6074:
/* E27584 802B6074 AFB20060 */ sw $s2, 0x60($sp)
/* E27588 802B6078 AFB1005C */ sw $s1, 0x5C($sp)
glabel .L802B607C
/* E2758C 802B607C F7B40068 */ sdc1 $f20, 0x68($sp)
.L802B6080:
/* E27590 802B6080 8E040000 */ lw $a0, 0x0($s0)
/* E27594 802B6084 04830021 */ bgezl $a0, .L802B610C
/* E27598 802B6088 0200202D */ daddu $a0, $s0, $zero
.L802B608C:
/* E2759C 802B608C 3C027FFF */ lui $v0, (0x7FFFFFFF >> 16)
.L802B6090:
/* E275A0 802B6090 3442FFFF */ ori $v0, $v0, (0x7FFFFFFF & 0xFFFF)
.L802B6094:
/* E275A4 802B6094 8E030004 */ lw $v1, 0x4($s0)
/* E275A8 802B6098 00821024 */ and $v0, $a0, $v0
glabel action_update_state_23
/* E275AC 802B609C AE020000 */ sw $v0, 0x0($s0)
/* E275B0 802B60A0 A20000B6 */ sb $zero, 0xB6($s0)
glabel action_update_use_spinning_flower
/* E275B4 802B60A4 AE000054 */ sw $zero, 0x54($s0)
.L802B60A8:
/* E275B8 802B60A8 34630004 */ ori $v1, $v1, 0x4
.L802B60AC:
/* E275BC 802B60AC 0C0AD800 */ jal parasol_get_npc
/* E275C0 802B60B0 AE030004 */ sw $v1, 0x4($s0)
glabel action_update_jump
/* E275C4 802B60B4 3C040001 */ lui $a0, (0x1000A >> 16)
/* E275C8 802B60B8 3C01802B */ lui $at, %hi(D_802B6780)
/* E275CC 802B60BC AC206780 */ sw $zero, %lo(D_802B6780)($at)
/* E275D0 802B60C0 3C01802B */ lui $at, %hi(D_802B6790)
/* E275D4 802B60C4 AC206790 */ sw $zero, %lo(D_802B6790)($at)
.L802B60C8:
/* E275D8 802B60C8 3C01802B */ lui $at, %hi(D_802B6794)
/* E275DC 802B60CC AC206794 */ sw $zero, %lo(D_802B6794)($at)
glabel .L802B60D0
/* E275E0 802B60D0 3C01802B */ lui $at, %hi(D_802B6798)
.L802B60D4:
/* E275E4 802B60D4 AC206798 */ sw $zero, %lo(D_802B6798)($at)
/* E275E8 802B60D8 3C01802B */ lui $at, %hi(D_802B679C)
/* E275EC 802B60DC AC20679C */ sw $zero, %lo(D_802B679C)($at)
/* E275F0 802B60E0 0C037FBF */ jal suggest_player_anim_allow_backward
/* E275F4 802B60E4 3484000A */ ori $a0, $a0, (0x1000A & 0xFFFF)
.L802B60E8:
/* E275F8 802B60E8 24040167 */ addiu $a0, $zero, 0x167
.L802B60EC:
/* E275FC 802B60EC 0C052736 */ jal sfx_play_sound_at_player
.L802B60F0:
/* E27600 802B60F0 0000282D */ daddu $a1, $zero, $zero
glabel .L802B60F4
/* E27604 802B60F4 3C03800B */ lui $v1, %hi(gCameras)
/* E27608 802B60F8 24631D80 */ addiu $v1, $v1, %lo(gCameras)
/* E2760C 802B60FC 94620002 */ lhu $v0, 0x2($v1)
.L802B6100:
/* E27610 802B6100 34420001 */ ori $v0, $v0, 0x1
.L802B6104:
/* E27614 802B6104 A4620002 */ sh $v0, 0x2($v1)
.L802B6108:
/* E27618 802B6108 0200202D */ daddu $a0, $s0, $zero
glabel .L802B610C
/* E2761C 802B610C 27A50028 */ addiu $a1, $sp, 0x28
.L802B6110:
/* E27620 802B6110 27A6002C */ addiu $a2, $sp, 0x2C
/* E27624 802B6114 C6080054 */ lwc1 $f8, 0x54($s0)
.L802B6118:
/* E27628 802B6118 C6000028 */ lwc1 $f0, 0x28($s0)
/* E2762C 802B611C C602002C */ lwc1 $f2, 0x2C($s0)
glabel action_update_parasol
/* E27630 802B6120 C6040030 */ lwc1 $f4, 0x30($s0)
.L802B6124:
/* E27634 802B6124 C60600A0 */ lwc1 $f6, 0xA0($s0)
.L802B6128:
/* E27638 802B6128 27A70030 */ addiu $a3, $sp, 0x30
/* E2763C 802B612C E7A00028 */ swc1 $f0, 0x28($sp)
/* E27640 802B6130 E7A2002C */ swc1 $f2, 0x2C($sp)
glabel .L802B6134
/* E27644 802B6134 E7A40030 */ swc1 $f4, 0x30($sp)
/* E27648 802B6138 E7A80010 */ swc1 $f8, 0x10($sp)
.L802B613C:
/* E2764C 802B613C 0C037D18 */ jal player_test_move_with_slipping
.L802B6140:
/* E27650 802B6140 E7A60014 */ swc1 $f6, 0x14($sp)
.L802B6144:
/* E27654 802B6144 C7A00028 */ lwc1 $f0, 0x28($sp)
/* E27658 802B6148 C7A20030 */ lwc1 $f2, 0x30($sp)
.L802B614C:
/* E2765C 802B614C C7A4002C */ lwc1 $f4, 0x2C($sp)
.L802B6150:
/* E27660 802B6150 820300B6 */ lb $v1, 0xB6($s0)
.L802B6154:
/* E27664 802B6154 AFA20048 */ sw $v0, 0x48($sp)
.L802B6158:
/* E27668 802B6158 2C620008 */ sltiu $v0, $v1, 0x8
.L802B615C:
/* E2766C 802B615C E6000028 */ swc1 $f0, 0x28($s0)
/* E27670 802B6160 E6020030 */ swc1 $f2, 0x30($s0)
.L802B6164:
/* E27674 802B6164 1040016D */ beqz $v0, .L802B671C
.L802B6168:
/* E27678 802B6168 E604002C */ swc1 $f4, 0x2C($s0)
/* E2767C 802B616C 00031080 */ sll $v0, $v1, 2
glabel .L802B6170
/* E27680 802B6170 3C01802B */ lui $at, %hi(func_802B6738 + 0x8)
glabel .L802B6174
/* E27684 802B6174 00220821 */ addu $at, $at, $v0
/* E27688 802B6178 8C226740 */ lw $v0, %lo(func_802B6738 + 0x8)($at)
.L802B617C:
/* E2768C 802B617C 00400008 */ jr $v0
.L802B6180:
/* E27690 802B6180 00000000 */ nop
glabel .L802B6184
/* E27694 802B6184 3C02802B */ lui $v0, %hi(D_802B6780)
.L802B6188:
/* E27698 802B6188 24426780 */ addiu $v0, $v0, %lo(D_802B6780)
.L802B618C:
/* E2769C 802B618C C4400000 */ lwc1 $f0, 0x0($v0)
.L802B6190:
/* E276A0 802B6190 3C01802B */ lui $at, %hi(D_802B6760_E29190)
.L802B6194:
/* E276A4 802B6194 D4226760 */ ldc1 $f2, %lo(D_802B6760_E29190)($at)
glabel func_802B6198
/* E276A8 802B6198 46000021 */ cvt.d.s $f0, $f0
/* E276AC 802B619C 46220000 */ add.d $f0, $f0, $f2
.L802B61A0:
/* E276B0 802B61A0 3C01802B */ lui $at, %hi(D_802B6784)
.L802B61A4:
/* E276B4 802B61A4 C4226784 */ lwc1 $f2, %lo(D_802B6784)($at)
.L802B61A8:
/* E276B8 802B61A8 46200020 */ cvt.s.d $f0, $f0
.L802B61AC:
/* E276BC 802B61AC 4600103E */ c.le.s $f2, $f0
.L802B61B0:
/* E276C0 802B61B0 00000000 */ nop
.L802B61B4:
/* E276C4 802B61B4 45000002 */ bc1f func_802B61C0
/* E276C8 802B61B8 E4400000 */ swc1 $f0, 0x0($v0)
/* E276CC 802B61BC E4420000 */ swc1 $f2, 0x0($v0)
glabel func_802B61C0
/* E276D0 802B61C0 C6000054 */ lwc1 $f0, 0x54($s0)
/* E276D4 802B61C4 C4420000 */ lwc1 $f2, 0x0($v0)
.L802B61C8:
/* E276D8 802B61C8 46020000 */ add.s $f0, $f0, $f2
.L802B61CC:
/* E276DC 802B61CC 3C01802B */ lui $at, %hi(D_802B6788)
/* E276E0 802B61D0 C4226788 */ lwc1 $f2, %lo(D_802B6788)($at)
.L802B61D4:
/* E276E4 802B61D4 4600103E */ c.le.s $f2, $f0
.L802B61D8:
/* E276E8 802B61D8 00000000 */ nop
.L802B61DC:
/* E276EC 802B61DC 45000002 */ bc1f .L802B61E8
/* E276F0 802B61E0 E6000054 */ swc1 $f0, 0x54($s0)
glabel func_802B61E4
/* E276F4 802B61E4 E6020054 */ swc1 $f2, 0x54($s0)
.L802B61E8:
/* E276F8 802B61E8 0200202D */ daddu $a0, $s0, $zero
.L802B61EC:
/* E276FC 802B61EC 27A50028 */ addiu $a1, $sp, 0x28
.L802B61F0:
/* E27700 802B61F0 27A6002C */ addiu $a2, $sp, 0x2C
.L802B61F4:
/* E27704 802B61F4 27A70030 */ addiu $a3, $sp, 0x30
.L802B61F8:
/* E27708 802B61F8 3C11802B */ lui $s1, %hi(D_802B6798)
.L802B61FC:
/* E2770C 802B61FC 26316798 */ addiu $s1, $s1, %lo(D_802B6798)
.L802B6200:
/* E27710 802B6200 C6000028 */ lwc1 $f0, 0x28($s0)
.L802B6204:
/* E27714 802B6204 860200B0 */ lh $v0, 0xB0($s0)
glabel .L802B6208
/* E27718 802B6208 3C0142C8 */ lui $at, (0x42C80000 >> 16)
/* E2771C 802B620C 44813000 */ mtc1 $at, $f6
.L802B6210:
/* E27720 802B6210 44821000 */ mtc1 $v0, $f2
.L802B6214:
/* E27724 802B6214 00000000 */ nop
glabel .L802B6218
/* E27728 802B6218 468010A0 */ cvt.s.w $f2, $f2
/* E2772C 802B621C E7A00028 */ swc1 $f0, 0x28($sp)
.L802B6220:
/* E27730 802B6220 3C013F00 */ lui $at, (0x3F000000 >> 16)
.L802B6224:
/* E27734 802B6224 44810000 */ mtc1 $at, $f0
glabel .L802B6228
/* E27738 802B6228 C6040030 */ lwc1 $f4, 0x30($s0)
.L802B622C:
/* E2773C 802B622C 46001082 */ mul.s $f2, $f2, $f0
glabel action_update_step_up_peach
/* E27740 802B6230 00000000 */ nop
/* E27744 802B6234 E7A60034 */ swc1 $f6, 0x34($sp)
glabel .L802B6238
/* E27748 802B6238 E7A40030 */ swc1 $f4, 0x30($sp)
glabel .L802B623C
/* E2774C 802B623C C600002C */ lwc1 $f0, 0x2C($s0)
glabel .L802B6240
/* E27750 802B6240 3C12802B */ lui $s2, %hi(D_802B6794)
glabel .L802B6244
/* E27754 802B6244 26526794 */ addiu $s2, $s2, %lo(D_802B6794)
glabel .L802B6248
/* E27758 802B6248 46020000 */ add.s $f0, $f0, $f2
/* E2775C 802B624C C6220000 */ lwc1 $f2, 0x0($s1)
glabel .L802B6250
/* E27760 802B6250 27A20034 */ addiu $v0, $sp, 0x34
.L802B6254:
/* E27764 802B6254 E6420000 */ swc1 $f2, 0x0($s2)
glabel .L802B6258
/* E27768 802B6258 E7A0002C */ swc1 $f0, 0x2C($sp)
.L802B625C:
/* E2776C 802B625C AFA20010 */ sw $v0, 0x10($sp)
/* E27770 802B6260 27A20038 */ addiu $v0, $sp, 0x38
/* E27774 802B6264 AFA20014 */ sw $v0, 0x14($sp)
.L802B6268:
/* E27778 802B6268 27A2003C */ addiu $v0, $sp, 0x3C
.L802B626C:
/* E2777C 802B626C AFA20018 */ sw $v0, 0x18($sp)
/* E27780 802B6270 27A20040 */ addiu $v0, $sp, 0x40
.L802B6274:
/* E27784 802B6274 AFA2001C */ sw $v0, 0x1C($sp)
glabel .L802B6278
/* E27788 802B6278 27A20044 */ addiu $v0, $sp, 0x44
/* E2778C 802B627C 0C03791B */ jal player_raycast_below_cam_relative
.L802B6280:
/* E27790 802B6280 AFA20020 */ sw $v0, 0x20($sp)
.L802B6284:
/* E27794 802B6284 C7A0003C */ lwc1 $f0, 0x3C($sp)
glabel action_update_run
/* E27798 802B6288 AFA20048 */ sw $v0, 0x48($sp)
/* E2779C 802B628C 04400023 */ bltz $v0, .L802B631C
.L802B6290:
/* E277A0 802B6290 E6200000 */ swc1 $f0, 0x0($s1)
glabel func_802B6294
/* E277A4 802B6294 0C016F6A */ jal get_collider_flags
glabel .L802B6298
/* E277A8 802B6298 0040202D */ daddu $a0, $v0, $zero
/* E277AC 802B629C 304200FF */ andi $v0, $v0, 0xFF
/* E277B0 802B62A0 24030005 */ addiu $v1, $zero, 0x5
glabel func_802B62A4
/* E277B4 802B62A4 1443000F */ bne $v0, $v1, .L802B62E4
.L802B62A8:
/* E277B8 802B62A8 00000000 */ nop
/* E277BC 802B62AC 3C028016 */ lui $v0, %hi(gCollisionStatus)
jtbl_802B62B0:
/* E277C0 802B62B0 2442A550 */ addiu $v0, $v0, %lo(gCollisionStatus)
.L802B62B4:
/* E277C4 802B62B4 97A3004A */ lhu $v1, 0x4A($sp)
glabel .L802B62B8
/* E277C8 802B62B8 C7A0003C */ lwc1 $f0, 0x3C($sp)
/* E277CC 802B62BC 3C014334 */ lui $at, (0x43340000 >> 16)
/* E277D0 802B62C0 44811000 */ mtc1 $at, $f2
/* E277D4 802B62C4 C7A4002C */ lwc1 $f4, 0x2C($sp)
.L802B62C8:
/* E277D8 802B62C8 46020000 */ add.s $f0, $f0, $f2
glabel action_update_peach_land
/* E277DC 802B62CC A4430002 */ sh $v1, 0x2($v0)
Munchlesia_LaunchVelocity:
/* E277E0 802B62D0 E604002C */ swc1 $f4, 0x2C($s0)
Munchlesia_LateralVelocity:
/* E277E4 802B62D4 3C01802B */ lui $at, %hi(D_802B6790)
Munchlesia_LaunchAccel:
/* E277E8 802B62D8 E4206790 */ swc1 $f0, %lo(D_802B6790)($at)
Munchlesia_LaunchYaw:
/* E277EC 802B62DC 080AD9C7 */ j .L802B671C
D_802B62E0:
/* E277F0 802B62E0 00000000 */ nop
.L802B62E4:
/* E277F4 802B62E4 C6400000 */ lwc1 $f0, 0x0($s2)
/* E277F8 802B62E8 C6220000 */ lwc1 $f2, 0x0($s1)
/* E277FC 802B62EC 46020001 */ sub.s $f0, $f0, $f2
/* E27800 802B62F0 3C014049 */ lui $at, (0x40490000 >> 16)
/* E27804 802B62F4 44811800 */ mtc1 $at, $f3
glabel func_802B62F8
/* E27808 802B62F8 44801000 */ mtc1 $zero, $f2
.L802B62FC:
/* E2780C 802B62FC 46000021 */ cvt.d.s $f0, $f0
D_802B6300:
/* E27810 802B6300 46200005 */ abs.d $f0, $f0
/* E27814 802B6304 4620103E */ c.le.d $f2, $f0
.L802B6308:
/* E27818 802B6308 00000000 */ nop
.L802B630C:
/* E2781C 802B630C 45010004 */ bc1t .L802B6320
.L802B6310:
/* E27820 802B6310 24020002 */ addiu $v0, $zero, 0x2
/* E27824 802B6314 080AD8C8 */ j .L802B6320
/* E27828 802B6318 24020001 */ addiu $v0, $zero, 0x1
glabel .L802B631C
/* E2782C 802B631C 24020002 */ addiu $v0, $zero, 0x2
.L802B6320:
/* E27830 802B6320 A20200B6 */ sb $v0, 0xB6($s0)
glabel .L802B6324
/* E27834 802B6324 3C01802B */ lui $at, %hi(D_802B6790)
.L802B6328:
/* E27838 802B6328 C42C6790 */ lwc1 $f12, %lo(D_802B6790)($at)
glabel .L802B632C
/* E2783C 802B632C 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
.L802B6330:
/* E27840 802B6330 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* E27844 802B6334 44810000 */ mtc1 $at, $f0
.L802B6338:
/* E27848 802B6338 00000000 */ nop
/* E2784C 802B633C 46006302 */ mul.s $f12, $f12, $f0
.L802B6340:
/* E27850 802B6340 00000000 */ nop
/* E27854 802B6344 27A5004C */ addiu $a1, $sp, 0x4C
glabel func_802B6348
/* E27858 802B6348 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* E2785C 802B634C 44810000 */ mtc1 $at, $f0
PlayerTweesterPhysicsPtr:
/* E27860 802B6350 27A60050 */ addiu $a2, $sp, 0x50
glabel .L802B6354
/* E27864 802B6354 0C00A82D */ jal sin_cos_rad
/* E27868 802B6358 46006303 */ div.s $f12, $f12, $f0
.L802B635C:
/* E2786C 802B635C C7A0004C */ lwc1 $f0, 0x4C($sp)
D_802B6360:
/* E27870 802B6360 C7A20050 */ lwc1 $f2, 0x50($sp)
.L802B6364:
/* E27874 802B6364 C6040054 */ lwc1 $f4, 0x54($s0)
/* E27878 802B6368 46020003 */ div.s $f0, $f0, $f2
.L802B636C:
/* E2787C 802B636C 46040002 */ mul.s $f0, $f0, $f4
glabel .L802B6370
/* E27880 802B6370 00000000 */ nop
.L802B6374:
/* E27884 802B6374 C602002C */ lwc1 $f2, 0x2C($s0)
/* E27888 802B6378 46000005 */ abs.s $f0, $f0
glabel .L802B637C
/* E2788C 802B637C 46001080 */ add.s $f2, $f2, $f0
/* E27890 802B6380 24040167 */ addiu $a0, $zero, 0x167
/* E27894 802B6384 0C0154F0 */ jal snd_stop_sound
/* E27898 802B6388 E602002C */ swc1 $f2, 0x2C($s0)
/* E2789C 802B638C 080AD9C7 */ j .L802B671C
/* E278A0 802B6390 00000000 */ nop
glabel .L802B6394
/* E278A4 802B6394 0200202D */ daddu $a0, $s0, $zero
.L802B6398:
/* E278A8 802B6398 27A50028 */ addiu $a1, $sp, 0x28
.L802B639C:
/* E278AC 802B639C 27A6002C */ addiu $a2, $sp, 0x2C
/* E278B0 802B63A0 27A70030 */ addiu $a3, $sp, 0x30
/* E278B4 802B63A4 860200B0 */ lh $v0, 0xB0($s0)
.L802B63A8:
/* E278B8 802B63A8 3C013F00 */ lui $at, (0x3F000000 >> 16)
.L802B63AC:
/* E278BC 802B63AC 44810000 */ mtc1 $at, $f0
glabel .L802B63B0
/* E278C0 802B63B0 C6040028 */ lwc1 $f4, 0x28($s0)
/* E278C4 802B63B4 3C014248 */ lui $at, (0x42480000 >> 16)
/* E278C8 802B63B8 44813000 */ mtc1 $at, $f6
/* E278CC 802B63BC 44821000 */ mtc1 $v0, $f2
.L802B63C0:
/* E278D0 802B63C0 00000000 */ nop
.L802B63C4:
/* E278D4 802B63C4 468010A0 */ cvt.s.w $f2, $f2
.L802B63C8:
/* E278D8 802B63C8 46001082 */ mul.s $f2, $f2, $f0
.L802B63CC:
/* E278DC 802B63CC 00000000 */ nop
.L802B63D0:
/* E278E0 802B63D0 27A20034 */ addiu $v0, $sp, 0x34
glabel action_update_first_strike
/* E278E4 802B63D4 E7A40028 */ swc1 $f4, 0x28($sp)
.L802B63D8:
/* E278E8 802B63D8 C600002C */ lwc1 $f0, 0x2C($s0)
glabel .L802B63DC
/* E278EC 802B63DC C6040030 */ lwc1 $f4, 0x30($s0)
.L802B63E0:
/* E278F0 802B63E0 46020000 */ add.s $f0, $f0, $f2
.L802B63E4:
/* E278F4 802B63E4 E7A60034 */ swc1 $f6, 0x34($sp)
/* E278F8 802B63E8 E7A40030 */ swc1 $f4, 0x30($sp)
/* E278FC 802B63EC E7A0002C */ swc1 $f0, 0x2C($sp)
.L802B63F0:
/* E27900 802B63F0 AFA20010 */ sw $v0, 0x10($sp)
.L802B63F4:
/* E27904 802B63F4 27A20038 */ addiu $v0, $sp, 0x38
/* E27908 802B63F8 AFA20014 */ sw $v0, 0x14($sp)
/* E2790C 802B63FC 27A2003C */ addiu $v0, $sp, 0x3C
.L802B6400:
/* E27910 802B6400 AFA20018 */ sw $v0, 0x18($sp)
/* E27914 802B6404 27A20040 */ addiu $v0, $sp, 0x40
/* E27918 802B6408 AFA2001C */ sw $v0, 0x1C($sp)
.L802B640C:
/* E2791C 802B640C 27A20044 */ addiu $v0, $sp, 0x44
/* E27920 802B6410 0C03791B */ jal player_raycast_below_cam_relative
.L802B6414:
/* E27924 802B6414 AFA20020 */ sw $v0, 0x20($sp)
.L802B6418:
/* E27928 802B6418 04400023 */ bltz $v0, .L802B64A8
/* E2792C 802B641C AFA20048 */ sw $v0, 0x48($sp)
.L802B6420:
/* E27930 802B6420 C6020054 */ lwc1 $f2, 0x54($s0)
.L802B6424:
/* E27934 802B6424 3C014040 */ lui $at, (0x40400000 >> 16)
.L802B6428:
/* E27938 802B6428 44810000 */ mtc1 $at, $f0
.L802B642C:
/* E2793C 802B642C 00000000 */ nop
D_802B6430:
/* E27940 802B6430 46001203 */ div.s $f8, $f2, $f0
/* E27944 802B6434 3C01802B */ lui $at, %hi(D_802B6768_E29198)
/* E27948 802B6438 D4226768 */ ldc1 $f2, %lo(D_802B6768_E29198)($at)
/* E2794C 802B643C 46004021 */ cvt.d.s $f0, $f8
/* E27950 802B6440 4622003C */ c.lt.d $f0, $f2
/* E27954 802B6444 00000000 */ nop
.L802B6448:
/* E27958 802B6448 45030001 */ bc1tl .L802B6450
glabel action_update_peach_step_down_land
/* E2795C 802B644C AE000054 */ sw $zero, 0x54($s0)
.L802B6450:
/* E27960 802B6450 C6000054 */ lwc1 $f0, 0x54($s0)
.L802B6454:
/* E27964 802B6454 46080001 */ sub.s $f0, $f0, $f8
/* E27968 802B6458 4480A000 */ mtc1 $zero, $f20
/* E2796C 802B645C 00000000 */ nop
.L802B6460:
/* E27970 802B6460 4614003E */ c.le.s $f0, $f20
.L802B6464:
/* E27974 802B6464 00000000 */ nop
/* E27978 802B6468 450000AC */ bc1f .L802B671C
glabel .L802B646C
/* E2797C 802B646C E6000054 */ swc1 $f0, 0x54($s0)
/* E27980 802B6470 24040172 */ addiu $a0, $zero, 0x172
/* E27984 802B6474 0C052736 */ jal sfx_play_sound_at_player
glabel action_update_raise_arms
/* E27988 802B6478 0000282D */ daddu $a1, $zero, $zero
glabel action_update_peach_falling
/* E2798C 802B647C 3C040001 */ lui $a0, (0x10031 >> 16)
/* E27990 802B6480 0C037FDE */ jal suggest_player_anim_always_forward
/* E27994 802B6484 34840031 */ ori $a0, $a0, (0x10031 & 0xFFFF)
/* E27998 802B6488 24020006 */ addiu $v0, $zero, 0x6
.L802B648C:
/* E2799C 802B648C A20200B6 */ sb $v0, 0xB6($s0)
.L802B6490:
/* E279A0 802B6490 C7A0002C */ lwc1 $f0, 0x2C($sp)
.L802B6494:
/* E279A4 802B6494 2402000F */ addiu $v0, $zero, 0xF
/* E279A8 802B6498 A6020008 */ sh $v0, 0x8($s0)
/* E279AC 802B649C E6140054 */ swc1 $f20, 0x54($s0)
.L802B64A0:
/* E279B0 802B64A0 080AD9C7 */ j .L802B671C
/* E279B4 802B64A4 E600002C */ swc1 $f0, 0x2C($s0)
glabel .L802B64A8
/* E279B8 802B64A8 C6000054 */ lwc1 $f0, 0x54($s0)
.L802B64AC:
/* E279BC 802B64AC 3C01802B */ lui $at, %hi(.L802B678C)
/* E279C0 802B64B0 C422678C */ lwc1 $f2, %lo(.L802B678C)($at)
.L802B64B4:
/* E279C4 802B64B4 46020000 */ add.s $f0, $f0, $f2
/* E279C8 802B64B8 44802000 */ mtc1 $zero, $f4
/* E279CC 802B64BC 00000000 */ nop
/* E279D0 802B64C0 4604003E */ c.le.s $f0, $f4
.L802B64C4:
/* E279D4 802B64C4 00000000 */ nop
/* E279D8 802B64C8 45000002 */ bc1f .L802B64D4
.L802B64CC:
/* E279DC 802B64CC E6000054 */ swc1 $f0, 0x54($s0)
.L802B64D0:
/* E279E0 802B64D0 E6040054 */ swc1 $f4, 0x54($s0)
.L802B64D4:
/* E279E4 802B64D4 C6000070 */ lwc1 $f0, 0x70($s0)
.L802B64D8:
/* E279E8 802B64D8 C6020074 */ lwc1 $f2, 0x74($s0)
glabel .L802B64DC
/* E279EC 802B64DC 46020000 */ add.s $f0, $f0, $f2
glabel .L802B64E0
/* E279F0 802B64E0 C602002C */ lwc1 $f2, 0x2C($s0)
/* E279F4 802B64E4 46001080 */ add.s $f2, $f2, $f0
/* E279F8 802B64E8 4604003E */ c.le.s $f0, $f4
.L802B64EC:
/* E279FC 802B64EC E6000070 */ swc1 $f0, 0x70($s0)
glabel .L802B64F0
/* E27A00 802B64F0 4500008A */ bc1f .L802B671C
/* E27A04 802B64F4 E602002C */ swc1 $f2, 0x2C($s0)
.L802B64F8:
/* E27A08 802B64F8 3C013DEA */ lui $at, (0x3DEA161E >> 16)
/* E27A0C 802B64FC 3421161E */ ori $at, $at, (0x3DEA161E & 0xFFFF)
/* E27A10 802B6500 44810000 */ mtc1 $at, $f0
/* E27A14 802B6504 3C01BE92 */ lui $at, (0xBE92FEC5 >> 16)
glabel action_update_pushing_block
/* E27A18 802B6508 3421FEC5 */ ori $at, $at, (0xBE92FEC5 & 0xFFFF)
.L802B650C:
/* E27A1C 802B650C 44811000 */ mtc1 $at, $f2
glabel .L802B6510
/* E27A20 802B6510 3C01BE3A */ lui $at, (0xBE3AACDA >> 16)
/* E27A24 802B6514 3421ACDA */ ori $at, $at, (0xBE3AACDA & 0xFFFF)
/* E27A28 802B6518 44812000 */ mtc1 $at, $f4
.L802B651C:
/* E27A2C 802B651C 3C013C3C */ lui $at, (0x3C3CBE62 >> 16)
.L802B6520:
/* E27A30 802B6520 3421BE62 */ ori $at, $at, (0x3C3CBE62 & 0xFFFF)
.L802B6524:
/* E27A34 802B6524 44813000 */ mtc1 $at, $f6
/* E27A38 802B6528 24020003 */ addiu $v0, $zero, 0x3
/* E27A3C 802B652C A20200B6 */ sb $v0, 0xB6($s0)
.L802B6530:
/* E27A40 802B6530 E6000070 */ swc1 $f0, 0x70($s0)
.L802B6534:
/* E27A44 802B6534 E6020074 */ swc1 $f2, 0x74($s0)
/* E27A48 802B6538 E6040078 */ swc1 $f4, 0x78($s0)
/* E27A4C 802B653C 080AD9C7 */ j .L802B671C
/* E27A50 802B6540 E606007C */ swc1 $f6, 0x7C($s0)
glabel .L802B6544
/* E27A54 802B6544 3C11802B */ lui $s1, %hi(.L802B678C)
glabel .L802B6548
/* E27A58 802B6548 2631678C */ addiu $s1, $s1, %lo(.L802B678C)
/* E27A5C 802B654C C6000054 */ lwc1 $f0, 0x54($s0)
glabel func_802B6550
/* E27A60 802B6550 C6220000 */ lwc1 $f2, 0x0($s1)
.L802B6554:
/* E27A64 802B6554 46020000 */ add.s $f0, $f0, $f2
/* E27A68 802B6558 44801000 */ mtc1 $zero, $f2
/* E27A6C 802B655C 00000000 */ nop
/* E27A70 802B6560 4602003E */ c.le.s $f0, $f2
/* E27A74 802B6564 00000000 */ nop
glabel .L802B6568
/* E27A78 802B6568 45000002 */ bc1f .L802B6574
.L802B656C:
/* E27A7C 802B656C E6000054 */ swc1 $f0, 0x54($s0)
.L802B6570:
/* E27A80 802B6570 E6020054 */ swc1 $f2, 0x54($s0)
.L802B6574:
/* E27A84 802B6574 0C038D36 */ jal func_800E34D8
/* E27A88 802B6578 00000000 */ nop
/* E27A8C 802B657C 46000306 */ mov.s $f12, $f0
.L802B6580:
/* E27A90 802B6580 0C038D45 */ jal player_check_collision_below
/* E27A94 802B6584 27A50048 */ addiu $a1, $sp, 0x48
/* E27A98 802B6588 8FA20048 */ lw $v0, 0x48($sp)
glabel .L802B658C
/* E27A9C 802B658C 04400063 */ bltz $v0, .L802B671C
.L802B6590:
/* E27AA0 802B6590 E600002C */ swc1 $f0, 0x2C($s0)
glabel .L802B6594
/* E27AA4 802B6594 3C040008 */ lui $a0, (0x80003 >> 16)
.L802B6598:
/* E27AA8 802B6598 3C01BF80 */ lui $at, (0xBF800000 >> 16)
.L802B659C:
/* E27AAC 802B659C 44810000 */ mtc1 $at, $f0
/* E27AB0 802B65A0 34840003 */ ori $a0, $a0, (0x80003 & 0xFFFF)
glabel .L802B65A4
/* E27AB4 802B65A4 0C037FDE */ jal suggest_player_anim_always_forward
.L802B65A8:
/* E27AB8 802B65A8 E6200000 */ swc1 $f0, 0x0($s1)
/* E27ABC 802B65AC 24040162 */ addiu $a0, $zero, 0x162
/* E27AC0 802B65B0 0C052736 */ jal sfx_play_sound_at_player
glabel .L802B65B4
/* E27AC4 802B65B4 0000282D */ daddu $a1, $zero, $zero
.L802B65B8:
/* E27AC8 802B65B8 080AD9AC */ j .L802B66B0
/* E27ACC 802B65BC 00000000 */ nop
glabel .L802B65C0
/* E27AD0 802B65C0 C6000054 */ lwc1 $f0, 0x54($s0)
/* E27AD4 802B65C4 3C01802B */ lui $at, %hi(.L802B678C)
/* E27AD8 802B65C8 C422678C */ lwc1 $f2, %lo(.L802B678C)($at)
glabel .L802B65CC
/* E27ADC 802B65CC 46020000 */ add.s $f0, $f0, $f2
.L802B65D0:
/* E27AE0 802B65D0 44801000 */ mtc1 $zero, $f2
/* E27AE4 802B65D4 00000000 */ nop
/* E27AE8 802B65D8 4602003E */ c.le.s $f0, $f2
.L802B65DC:
/* E27AEC 802B65DC 00000000 */ nop
.L802B65E0:
/* E27AF0 802B65E0 45000002 */ bc1f .L802B65EC
.L802B65E4:
/* E27AF4 802B65E4 E6000054 */ swc1 $f0, 0x54($s0)
glabel action_update_walk_peach
/* E27AF8 802B65E8 E6020054 */ swc1 $f2, 0x54($s0)
.L802B65EC:
/* E27AFC 802B65EC 960200BC */ lhu $v0, 0xBC($s0)
.L802B65F0:
/* E27B00 802B65F0 1040004A */ beqz $v0, .L802B671C
/* E27B04 802B65F4 00000000 */ nop
glabel func_802B65F8_E26D08
/* E27B08 802B65F8 3C040001 */ lui $a0, (0x10030 >> 16)
/* E27B0C 802B65FC 0C037FDE */ jal suggest_player_anim_always_forward
/* E27B10 802B6600 34840030 */ ori $a0, $a0, (0x10030 & 0xFFFF)
.L802B6604:
/* E27B14 802B6604 080AD9AC */ j .L802B66B0
/* E27B18 802B6608 00000000 */ nop
glabel .L802B660C
/* E27B1C 802B660C C6000054 */ lwc1 $f0, 0x54($s0)
/* E27B20 802B6610 3C01802B */ lui $at, %hi(.L802B678C)
/* E27B24 802B6614 C422678C */ lwc1 $f2, %lo(.L802B678C)($at)
/* E27B28 802B6618 46020000 */ add.s $f0, $f0, $f2
glabel .L802B661C
/* E27B2C 802B661C 44801000 */ mtc1 $zero, $f2
.L802B6620:
/* E27B30 802B6620 00000000 */ nop
/* E27B34 802B6624 4602003E */ c.le.s $f0, $f2
.L802B6628:
/* E27B38 802B6628 00000000 */ nop
/* E27B3C 802B662C 45000002 */ bc1f action_update_talk
.L802B6630:
/* E27B40 802B6630 E6000054 */ swc1 $f0, 0x54($s0)
glabel .L802B6634
/* E27B44 802B6634 E6020054 */ swc1 $f2, 0x54($s0)
glabel action_update_talk
/* E27B48 802B6638 960200BC */ lhu $v0, 0xBC($s0)
/* E27B4C 802B663C 10400037 */ beqz $v0, .L802B671C
/* E27B50 802B6640 00000000 */ nop
glabel .L802B6644
/* E27B54 802B6644 3C040001 */ lui $a0, (0x10031 >> 16)
glabel func_802B6648_E27428
/* E27B58 802B6648 0C037FDE */ jal suggest_player_anim_always_forward
.L802B664C:
/* E27B5C 802B664C 34840031 */ ori $a0, $a0, (0x10031 & 0xFFFF)
.L802B6650:
/* E27B60 802B6650 24040172 */ addiu $a0, $zero, 0x172
glabel .L802B6654
/* E27B64 802B6654 0C052736 */ jal sfx_play_sound_at_player
/* E27B68 802B6658 0000282D */ daddu $a1, $zero, $zero
/* E27B6C 802B665C 920200B6 */ lbu $v0, 0xB6($s0)
glabel .L802B6660
/* E27B70 802B6660 2403000F */ addiu $v1, $zero, 0xF
/* E27B74 802B6664 080AD9AD */ j .L802B66B4
/* E27B78 802B6668 A6030008 */ sh $v1, 0x8($s0)
glabel .L802B666C
/* E27B7C 802B666C C6000054 */ lwc1 $f0, 0x54($s0)
glabel .L802B6670
/* E27B80 802B6670 3C01802B */ lui $at, %hi(.L802B678C)
glabel .L802B6674
/* E27B84 802B6674 C422678C */ lwc1 $f2, %lo(.L802B678C)($at)
.L802B6678:
/* E27B88 802B6678 46020000 */ add.s $f0, $f0, $f2
/* E27B8C 802B667C 44801000 */ mtc1 $zero, $f2
glabel .L802B6680
/* E27B90 802B6680 00000000 */ nop
/* E27B94 802B6684 4602003E */ c.le.s $f0, $f2
/* E27B98 802B6688 00000000 */ nop
glabel func_802B668C
/* E27B9C 802B668C 45000002 */ bc1f .L802B6698
jtbl_802B6690:
/* E27BA0 802B6690 E6000054 */ swc1 $f0, 0x54($s0)
/* E27BA4 802B6694 E6020054 */ swc1 $f2, 0x54($s0)
.L802B6698:
/* E27BA8 802B6698 96020008 */ lhu $v0, 0x8($s0)
/* E27BAC 802B669C 2442FFFF */ addiu $v0, $v0, -0x1
/* E27BB0 802B66A0 A6020008 */ sh $v0, 0x8($s0)
.L802B66A4:
/* E27BB4 802B66A4 00021400 */ sll $v0, $v0, 16
glabel func_802B66A8
/* E27BB8 802B66A8 1440001C */ bnez $v0, .L802B671C
/* E27BBC 802B66AC 00000000 */ nop
.L802B66B0:
/* E27BC0 802B66B0 920200B6 */ lbu $v0, 0xB6($s0)
.L802B66B4:
/* E27BC4 802B66B4 24420001 */ addiu $v0, $v0, 0x1
/* E27BC8 802B66B8 080AD9C7 */ j .L802B671C
glabel .L802B66BC
/* E27BCC 802B66BC A20200B6 */ sb $v0, 0xB6($s0)
glabel .L802B66C0
/* E27BD0 802B66C0 C6020054 */ lwc1 $f2, 0x54($s0)
/* E27BD4 802B66C4 3C014040 */ lui $at, (0x40400000 >> 16)
/* E27BD8 802B66C8 44810000 */ mtc1 $at, $f0
/* E27BDC 802B66CC 00000000 */ nop
/* E27BE0 802B66D0 46001203 */ div.s $f8, $f2, $f0
/* E27BE4 802B66D4 3C01802B */ lui $at, %hi(D_802B6770_E27C80)
/* E27BE8 802B66D8 D4226770 */ ldc1 $f2, %lo(D_802B6770_E27C80)($at)
.L802B66DC:
/* E27BEC 802B66DC 46004021 */ cvt.d.s $f0, $f8
.L802B66E0:
/* E27BF0 802B66E0 4622003C */ c.lt.d $f0, $f2
/* E27BF4 802B66E4 00000000 */ nop
/* E27BF8 802B66E8 45030001 */ bc1tl .L802B66F0
/* E27BFC 802B66EC AE000054 */ sw $zero, 0x54($s0)
.L802B66F0:
/* E27C00 802B66F0 C6000054 */ lwc1 $f0, 0x54($s0)
.L802B66F4:
/* E27C04 802B66F4 46080001 */ sub.s $f0, $f0, $f8
/* E27C08 802B66F8 44801000 */ mtc1 $zero, $f2
/* E27C0C 802B66FC 00000000 */ nop
/* E27C10 802B6700 4602003E */ c.le.s $f0, $f2
/* E27C14 802B6704 00000000 */ nop
.L802B6708:
/* E27C18 802B6708 45000004 */ bc1f .L802B671C
/* E27C1C 802B670C E6000054 */ swc1 $f0, 0x54($s0)
.L802B6710:
/* E27C20 802B6710 E6020054 */ swc1 $f2, 0x54($s0)
/* E27C24 802B6714 0C039769 */ jal set_action_state
D_802B6718_E274F8:
/* E27C28 802B6718 0000202D */ daddu $a0, $zero, $zero
.L802B671C:
/* E27C2C 802B671C 8FBF0064 */ lw $ra, 0x64($sp)
D_802B6720_E27500:
/* E27C30 802B6720 8FB20060 */ lw $s2, 0x60($sp)
/* E27C34 802B6724 8FB1005C */ lw $s1, 0x5C($sp)
D_802B6728_E27508:
/* E27C38 802B6728 8FB00058 */ lw $s0, 0x58($sp)
.L802B672C:
/* E27C3C 802B672C D7B40068 */ ldc1 $f20, 0x68($sp)
D_802B6730:
/* E27C40 802B6730 03E00008 */ jr $ra
/* E27C44 802B6734 27BD0070 */ addiu $sp, $sp, 0x70
### DECOMPILED C INSTRUCTIONS:
void action_update_sliding(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
CollisionStatus* collisionStatus;
s32 surfaceType;
f32 sinA, cosA;
f32 speed;
f32 posX, posY, posZ, depth;
f32 hitRx, hitRy, hitDirX, hitDirZ;
s32 hitID;
if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
playerStatus->flags &= ~PS_FLAG_ACTION_STATE_CHANGED;
playerStatus->actionSubstate = SUBSTATE_SLIDING;
playerStatus->currentSpeed = 0.0f;
playerStatus->animFlags |= PA_FLAG_INTERRUPT_USE_PARTNER;
func_802B6000_E27510();
SlideAcceleration = 0.0f;
D_802B6790 = 0.0f;
D_802B6794 = 0.0f;
D_802B6798 = 0.0f;
D_802B679C = 0;
suggest_player_anim_allow_backward(ANIM_Mario1_Sit);
sfx_play_sound_at_player(SOUND_167, SOUND_SPACE_MODE_0);
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
}
speed = playerStatus->currentSpeed;
posX = playerStatus->position.x;
posY = playerStatus->position.y;
posZ = playerStatus->position.z;
hitID = player_test_move_with_slipping(playerStatus, &posX, &posY, &posZ, speed, playerStatus->heading);
playerStatus->position.x = posX;
playerStatus->position.z = posZ;
playerStatus->position.y = posY;
switch (playerStatus->actionSubstate) {
case SUBSTATE_SLIDING:
SlideAcceleration += 0.1;
if (MaxSlideAccel <= SlideAcceleration) {
SlideAcceleration = MaxSlideAccel;
}
playerStatus->currentSpeed += SlideAcceleration;
if (MaxSlideVelocity <= playerStatus->currentSpeed) {
playerStatus->currentSpeed = MaxSlideVelocity;
}
posX = playerStatus->position.x;
depth = 100.0f;
posZ = playerStatus->position.z;
D_802B6794 = D_802B6798;
posY = playerStatus->position.y + (playerStatus->colliderHeight * 0.5f);
hitID = player_raycast_below_cam_relative(playerStatus, &posX, &posY, &posZ, &depth, &hitRx, &hitRy, &hitDirX, &hitDirZ);
D_802B6798 = hitRy;
if (hitID >= 0) {
collisionStatus = &gCollisionStatus;
surfaceType = get_collider_flags(hitID) & COLLIDER_FLAGS_SURFACE_TYPE_MASK;
if (surfaceType == SURFACE_TYPE_SLIDE) {
collisionStatus->currentFloor = hitID;
playerStatus->position.y = posY;
D_802B6790 = hitRy + 180.0f;
break;
}
if (!(fabs(D_802B6794 - D_802B6798) >= 50.0)) {
playerStatus->actionSubstate = SUBSTATE_STOP;
} else {
playerStatus->actionSubstate = SUBSTATE_LAUNCH;
}
} else {
playerStatus->actionSubstate = SUBSTATE_LAUNCH;
}
sin_cos_rad(DEG_TO_RAD(D_802B6790), &sinA, &cosA);
playerStatus->position.y += fabsf((sinA / cosA) * playerStatus->currentSpeed);
snd_stop_sound(SOUND_167);
break;
case SUBSTATE_STOP:
posX = playerStatus->position.x;
depth = 50.0f;
posZ = playerStatus->position.z;
posY = playerStatus->position.y + (playerStatus->colliderHeight * 0.5f);
hitID = player_raycast_below_cam_relative(playerStatus, &posX, &posY, &posZ, &depth, &hitRx, &hitRy, &hitDirX, &hitDirZ);
if (hitID >= 0) {
speed = playerStatus->currentSpeed / 3.0f;
if (speed < 0.01) {
playerStatus->currentSpeed = 0.0f;
}
playerStatus->currentSpeed -= speed;
if (playerStatus->currentSpeed <= 0.0f) {
sfx_play_sound_at_player(SOUND_DUST_OFF, SOUND_SPACE_MODE_0);
suggest_player_anim_always_forward(ANIM_Mario1_DustOff);
playerStatus->actionSubstate = SUBSTATE_DUST_OFF;
playerStatus->currentStateTime = 15;
playerStatus->currentSpeed = 0.0f;
playerStatus->position.y = posY;
}
break;
}
case SUBSTATE_LAUNCH:
playerStatus->currentSpeed += SlideLaunchSpeed;
if (playerStatus->currentSpeed <= 0.0f) {
playerStatus->currentSpeed = 0.0f;
}
playerStatus->gravityIntegrator[0] += playerStatus->gravityIntegrator[1];
playerStatus->position.y += playerStatus->gravityIntegrator[0];
if (playerStatus->gravityIntegrator[0] <= 0.0f) {
playerStatus->actionSubstate = SUBSTATE_FALL;
LOAD_INTEGRATOR_FALL(playerStatus->gravityIntegrator);
}
break;
case SUBSTATE_FALL:
playerStatus->currentSpeed += SlideLaunchSpeed;
if (playerStatus->currentSpeed <= 0.0f) {
playerStatus->currentSpeed = 0.0f;
}
playerStatus->position.y = player_check_collision_below(player_fall_distance(), &hitID);
if (hitID >= 0) {
SlideLaunchSpeed = -1;
suggest_player_anim_always_forward(ANIM_MarioW2_Collapse);
sfx_play_sound_at_player(SOUND_162, SOUND_SPACE_MODE_0);
playerStatus->actionSubstate++; // SUBSTATE_CRASH
}
break;
case SUBSTATE_CRASH:
playerStatus->currentSpeed += SlideLaunchSpeed;
if (playerStatus->currentSpeed <= 0.0f) {
playerStatus->currentSpeed = 0.0f;
}
if (playerStatus->animNotifyValue != 0) {
suggest_player_anim_always_forward(ANIM_Mario1_GetUp);
playerStatus->actionSubstate++; // SUBSTATE_GET_UP
}
break;
case SUBSTATE_GET_UP:
playerStatus->currentSpeed += SlideLaunchSpeed;
if (playerStatus->currentSpeed <= 0.0f) {
playerStatus->currentSpeed = 0.0f;
}
if (playerStatus->animNotifyValue != 0) {
suggest_player_anim_always_forward(ANIM_Mario1_DustOff);
sfx_play_sound_at_player(SOUND_DUST_OFF, SOUND_SPACE_MODE_0);
playerStatus->currentStateTime = 15;
playerStatus->actionSubstate++; // SUBSTATE_DUST_OFF
}
break;
case SUBSTATE_DUST_OFF:
playerStatus->currentSpeed += SlideLaunchSpeed;
if (playerStatus->currentSpeed <= 0.0f) {
playerStatus->currentSpeed = 0.0f;
}
if (--playerStatus->currentStateTime == 0) {
playerStatus->actionSubstate++; // SUBSTATE_DONE
}
break;
case SUBSTATE_DONE:
speed = playerStatus->currentSpeed / 3.0f;
if (speed < 0.01) {
playerStatus->currentSpeed = 0.0f;
}
playerStatus->currentSpeed -= speed;
if (playerStatus->currentSpeed <= 0.0f) {
playerStatus->currentSpeed = 0.0f;
set_action_state(ACTION_STATE_IDLE);
}
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_802403BC
/* 16EC9C 802403BC 27BDFF70 */ addiu $sp, $sp, -0x90
glabel func_802403C0
/* 16ECA0 802403C0 3C0B800E */ lui $t3, %hi(gBattleStatus)
glabel func_802403C4
/* 16ECA4 802403C4 256BC070 */ addiu $t3, $t3, %lo(gBattleStatus)
glabel func_802403C8
/* 16ECA8 802403C8 AFBF007C */ sw $ra, 0x7C($sp)
glabel func_802403CC
/* 16ECAC 802403CC AFBE0078 */ sw $fp, 0x78($sp)
glabel func_802403D0
/* 16ECB0 802403D0 AFB70074 */ sw $s7, 0x74($sp)
glabel func_802403D4_EE6984
/* 16ECB4 802403D4 AFB60070 */ sw $s6, 0x70($sp)
glabel func_802403D8
/* 16ECB8 802403D8 AFB5006C */ sw $s5, 0x6C($sp)
glabel func_802403DC
/* 16ECBC 802403DC AFB40068 */ sw $s4, 0x68($sp)
glabel func_802403E0
/* 16ECC0 802403E0 AFB30064 */ sw $s3, 0x64($sp)
glabel func_802403E4
/* 16ECC4 802403E4 AFB20060 */ sw $s2, 0x60($sp)
.L802403E8:
/* 16ECC8 802403E8 AFB1005C */ sw $s1, 0x5C($sp)
glabel func_802403EC
/* 16ECCC 802403EC AFB00058 */ sw $s0, 0x58($sp)
glabel dead_flo_12_AddPlayerHandsOffset
/* 16ECD0 802403F0 F7B60088 */ sdc1 $f22, 0x88($sp)
glabel func_802403F4
/* 16ECD4 802403F4 F7B40080 */ sdc1 $f20, 0x80($sp)
glabel func_802403F8
/* 16ECD8 802403F8 8D620000 */ lw $v0, 0x0($t3)
glabel mgm_01_DisableMenus
/* 16ECDC 802403FC 30420001 */ andi $v0, $v0, 0x1
glabel func_80240400
/* 16ECE0 80240400 1040016E */ beqz $v0, D_802409BC
glabel func_80240404
/* 16ECE4 80240404 00000000 */ nop
glabel func_80240408
/* 16ECE8 80240408 8D620004 */ lw $v0, 0x4($t3)
glabel func_8024040C
/* 16ECEC 8024040C 30420001 */ andi $v0, $v0, 0x1
glabel dead_flo_03_foliage_setup_shear_mtx
/* 16ECF0 80240410 1440001D */ bnez $v0, D_80240488
glabel func_80240414
/* 16ECF4 80240414 240500CA */ addiu $a1, $zero, 0xCA
arn_12_pad_418:
/* 16ECF8 80240418 3C036666 */ lui $v1, (0x66666667 >> 16)
glabel dead_flo_08_SuperBlock_SwitchToPartner
/* 16ECFC 8024041C 34636667 */ ori $v1, $v1, (0x66666667 & 0xFFFF)
glabel func_80240420
/* 16ED00 80240420 91650078 */ lbu $a1, 0x78($t3)
arn_10_pad_424:
/* 16ED04 80240424 24020124 */ addiu $v0, $zero, 0x124
glabel dead_03_GetNpcCollisionHeight
/* 16ED08 80240428 3C01802A */ lui $at, %hi(D_8029DA40)
glabel func_8024042C_EE69DC
/* 16ED0C 8024042C AC22DA40 */ sw $v0, %lo(D_8029DA40)($at)
glabel mgm_02_worker_draw_score
/* 16ED10 80240430 240200C4 */ addiu $v0, $zero, 0xC4
glabel func_80240434
/* 16ED14 80240434 00052E00 */ sll $a1, $a1, 24
glabel mgm_01_EnableMenus
/* 16ED18 80240438 00052603 */ sra $a0, $a1, 24
glabel func_8024043C
/* 16ED1C 8024043C 00830018 */ mult $a0, $v1
glabel dead_flo_00_PatrolAI_LoiterInit
/* 16ED20 80240440 3C01802A */ lui $at, %hi(D_8029DA44)
glabel func_80240444
/* 16ED24 80240444 AC22DA44 */ sw $v0, %lo(D_8029DA44)($at)
glabel dead_flo_08_SuperBlock_LoadCurrentPartnerName
/* 16ED28 80240448 24020006 */ addiu $v0, $zero, 0x6
glabel func_8024044C
/* 16ED2C 8024044C 3C01802A */ lui $at, %hi(D_8029DA48)
glabel func_80240450
/* 16ED30 80240450 AC22DA48 */ sw $v0, %lo(D_8029DA48)($at)
glabel func_80240454
/* 16ED34 80240454 00052FC3 */ sra $a1, $a1, 31
glabel omo_13_ShyGuyWanderAI_17
/* 16ED38 80240458 00006010 */ mfhi $t4
glabel func_8024045C
/* 16ED3C 8024045C 000C1883 */ sra $v1, $t4, 2
glabel func_80240460
/* 16ED40 80240460 00651823 */ subu $v1, $v1, $a1
D_80240464:
/* 16ED44 80240464 00031080 */ sll $v0, $v1, 2
glabel func_80240468
/* 16ED48 80240468 00431021 */ addu $v0, $v0, $v1
glabel func_8024046C_EE6A1C
/* 16ED4C 8024046C 00021040 */ sll $v0, $v0, 1
D_80240470:
/* 16ED50 80240470 00822023 */ subu $a0, $a0, $v0
D_80240474:
/* 16ED54 80240474 00042600 */ sll $a0, $a0, 24
glabel func_80240478_EB76A8
/* 16ED58 80240478 00042603 */ sra $a0, $a0, 24
glabel dgb_14_pad_47C
/* 16ED5C 8024047C 3C01802A */ lui $at, %hi(D_8029DA4C)
glabel dead_flo_08_SuperBlock_StartGlowEffect
/* 16ED60 80240480 0809014B */ j func_8024052C
glabel dead_03_AddPlayerHandsOffset
/* 16ED64 80240484 AC24DA4C */ sw $a0, %lo(D_8029DA4C)($at)
D_80240488:
/* 16ED68 80240488 3C08802A */ lui $t0, %hi(D_8029DA40)
.L8024048C:
/* 16ED6C 8024048C 2508DA40 */ addiu $t0, $t0, %lo(D_8029DA40)
glabel func_80240490
/* 16ED70 80240490 3C0A802A */ lui $t2, %hi(D_8029DA48)
glabel func_80240494
/* 16ED74 80240494 254ADA48 */ addiu $t2, $t2, %lo(D_8029DA48)
D_80240498:
/* 16ED78 80240498 8D060000 */ lw $a2, 0x0($t0)
glabel func_8024049C
/* 16ED7C 8024049C 8D430000 */ lw $v1, 0x0($t2)
glabel func_802404A0
/* 16ED80 802404A0 00A62823 */ subu $a1, $a1, $a2
glabel func_802404A4
/* 16ED84 802404A4 14600002 */ bnez $v1, func_802404B0_ED46D0
glabel func_802404A8
/* 16ED88 802404A8 00A3001A */ div $zero, $a1, $v1
glabel func_802404AC
/* 16ED8C 802404AC 0007000D */ break 7
glabel func_802404B0_ED46D0
/* 16ED90 802404B0 2401FFFF */ addiu $at, $zero, -0x1
glabel func_802404B4
/* 16ED94 802404B4 14610004 */ bne $v1, $at, D_802404C8
glabel func_802404B8
/* 16ED98 802404B8 3C018000 */ lui $at, (0x80000000 >> 16)
D_802404BC:
/* 16ED9C 802404BC 14A10002 */ bne $a1, $at, D_802404C8
glabel func_802404C0
/* 16EDA0 802404C0 00000000 */ nop
glabel dead_kzn_17_MeleeHitbox_33
/* 16EDA4 802404C4 0006000D */ break 6
D_802404C8:
/* 16EDA8 802404C8 00002812 */ mflo $a1
arn_09_pad_4CC:
/* 16EDAC 802404CC 3C07802A */ lui $a3, %hi(D_8029DA44)
glabel func_802404D0_EFEFD0
/* 16EDB0 802404D0 24E7DA44 */ addiu $a3, $a3, %lo(D_8029DA44)
glabel func_802404D4
/* 16EDB4 802404D4 8CE40000 */ lw $a0, 0x0($a3)
D_802404D8:
/* 16EDB8 802404D8 24020078 */ addiu $v0, $zero, 0x78
glabel func_802404DC
/* 16EDBC 802404DC 00441023 */ subu $v0, $v0, $a0
glabel func_802404E0
/* 16EDC0 802404E0 14600002 */ bnez $v1, func_802404EC
glabel func_802404E4
/* 16EDC4 802404E4 0043001A */ div $zero, $v0, $v1
D_802404E8:
/* 16EDC8 802404E8 0007000D */ break 7
glabel func_802404EC
/* 16EDCC 802404EC 2401FFFF */ addiu $at, $zero, -0x1
obk_08_KnockdownDestroy:
/* 16EDD0 802404F0 14610004 */ bne $v1, $at, func_80240504_EE6AB4
glabel func_802404F4
/* 16EDD4 802404F4 3C018000 */ lui $at, (0x80000000 >> 16)
D_802404F8:
/* 16EDD8 802404F8 14410002 */ bne $v0, $at, func_80240504_EE6AB4
glabel dead_flo_16_SuperBlock_SwitchToPartner
/* 16EDDC 802404FC 00000000 */ nop
glabel dead_flo_00_PatrolAI_Loiter
/* 16EDE0 80240500 0006000D */ break 6
glabel func_80240504_EE6AB4
/* 16EDE4 80240504 00001012 */ mflo $v0
glabel func_80240508
/* 16EDE8 80240508 2463FFFF */ addiu $v1, $v1, -0x1
glabel func_8024050C
/* 16EDEC 8024050C AD430000 */ sw $v1, 0x0($t2)
glabel dead_flo_08_SuperBlock_EndGlowEffect
/* 16EDF0 80240510 00C53021 */ addu $a2, $a2, $a1
glabel func_80240514
/* 16EDF4 80240514 00822021 */ addu $a0, $a0, $v0
flo_22_pad_518:
/* 16EDF8 80240518 AD060000 */ sw $a2, 0x0($t0)
glabel func_8024051C
/* 16EDFC 8024051C 1C600003 */ bgtz $v1, func_8024052C
glabel func_80240520_EB7750
/* 16EE00 80240520 ACE40000 */ sw $a0, 0x0($a3)
glabel .L80240524
/* 16EE04 80240524 24020001 */ addiu $v0, $zero, 0x1
glabel dead_flo_16_SuperBlock_LoadCurrentPartnerName
/* 16EE08 80240528 AD420000 */ sw $v0, 0x0($t2)
glabel func_8024052C
/* 16EE0C 8024052C 3C028028 */ lui $v0, %hi(D_802809F4)
glabel dead_flo_18_UnkFunc42
/* 16EE10 80240530 804209F4 */ lb $v0, %lo(D_802809F4)($v0)
glabel func_80240534
/* 16EE14 80240534 1040000F */ beqz $v0, func_80240574
glabel func_80240538
/* 16EE18 80240538 24050001 */ addiu $a1, $zero, 0x1
glabel func_8024053C
/* 16EE1C 8024053C 3C048028 */ lui $a0, %hi(D_802809F5)
glabel func_80240540_EFF040
/* 16EE20 80240540 248409F5 */ addiu $a0, $a0, %lo(D_802809F5)
glabel dead_flo_08_SuperBlock_GatherEnergyFX
/* 16EE24 80240544 80830000 */ lb $v1, 0x0($a0)
glabel func_80240548
/* 16EE28 80240548 28620009 */ slti $v0, $v1, 0x9
D_8024054C:
/* 16EE2C 8024054C 14400004 */ bnez $v0, dead_flo_16_SuperBlock_StartGlowEffect
glabel end_01_CharAnim_FadeIn_2
/* 16EE30 80240550 2862000D */ slti $v0, $v1, 0xD
glabel func_80240554
/* 16EE34 80240554 50400002 */ beql $v0, $zero, dead_flo_16_SuperBlock_StartGlowEffect
glabel func_80240558
/* 16EE38 80240558 A0800000 */ sb $zero, 0x0($a0)
glabel func_8024055C
/* 16EE3C 8024055C 0000282D */ daddu $a1, $zero, $zero
glabel dead_flo_16_SuperBlock_StartGlowEffect
/* 16EE40 80240560 3C038028 */ lui $v1, %hi(D_802809F5)
glabel func_80240564
/* 16EE44 80240564 246309F5 */ addiu $v1, $v1, %lo(D_802809F5)
glabel func_80240568
/* 16EE48 80240568 90620000 */ lbu $v0, 0x0($v1)
dgb_11_pad_56C:
/* 16EE4C 8024056C 24420001 */ addiu $v0, $v0, 0x1
D_80240570:
/* 16EE50 80240570 A0620000 */ sb $v0, 0x0($v1)
glabel func_80240574
/* 16EE54 80240574 10A00111 */ beqz $a1, D_802409BC
glabel func_80240578
/* 16EE58 80240578 00000000 */ nop
glabel omo_03_UpdateTexturePanSmooth
/* 16EE5C 8024057C 3C038028 */ lui $v1, %hi(D_802809F0)
glabel func_80240580
/* 16EE60 80240580 246309F0 */ addiu $v1, $v1, %lo(D_802809F0)
glabel func_80240584
/* 16EE64 80240584 9162007A */ lbu $v0, 0x7A($t3)
glabel func_80240588
/* 16EE68 80240588 C4600000 */ lwc1 $f0, 0x0($v1)
glabel mgm_01_InitPanelEmergeFromBlock
/* 16EE6C 8024058C 3C013FF0 */ lui $at, (0x3FF00000 >> 16)
glabel dead_flo_18_foliage_setup_shear_mtx
/* 16EE70 80240590 44811800 */ mtc1 $at, $f3
glabel func_80240594
/* 16EE74 80240594 44801000 */ mtc1 $zero, $f2
.L80240598:
/* 16EE78 80240598 3C013F80 */ lui $at, (0x3F800000 >> 16)
glabel func_8024059C
/* 16EE7C 8024059C 4481B000 */ mtc1 $at, $f22
glabel func_802405A0
/* 16EE80 802405A0 46000021 */ cvt.d.s $f0, $f0
glabel func_802405A4
/* 16EE84 802405A4 46220001 */ sub.d $f0, $f0, $f2
arn_09_pad_5A8:
/* 16EE88 802405A8 44801000 */ mtc1 $zero, $f2
.L802405AC:
/* 16EE8C 802405AC 2442FFFF */ addiu $v0, $v0, -0x1
glabel func_802405B0
/* 16EE90 802405B0 A162007A */ sb $v0, 0x7A($t3)
glabel func_802405B4
/* 16EE94 802405B4 46200020 */ cvt.s.d $f0, $f0
glabel func_802405B8
/* 16EE98 802405B8 4602003E */ c.le.s $f0, $f2
glabel omo_15_StarSpiritEffectFunc4
/* 16EE9C 802405BC 00000000 */ nop
glabel func_802405C0_EDC5A0
/* 16EEA0 802405C0 45000036 */ bc1f func_8024069C
glabel func_802405C4
/* 16EEA4 802405C4 E4600000 */ swc1 $f0, 0x0($v1)
glabel func_802405C8
/* 16EEA8 802405C8 81620079 */ lb $v0, 0x79($t3)
glabel func_802405CC
/* 16EEAC 802405CC 1840000D */ blez $v0, func_80240604
glabel func_802405D0
/* 16EEB0 802405D0 00000000 */ nop
glabel func_802405D4
/* 16EEB4 802405D4 91620078 */ lbu $v0, 0x78($t3)
glabel func_802405D8
/* 16EEB8 802405D8 24420001 */ addiu $v0, $v0, 0x1
glabel pra_32_StarSpiritEffectFunc4
/* 16EEBC 802405DC A1620078 */ sb $v0, 0x78($t3)
D_802405E0:
/* 16EEC0 802405E0 00021600 */ sll $v0, $v0, 24
D_802405E4:
/* 16EEC4 802405E4 00021603 */ sra $v0, $v0, 24
glabel func_802405E8
/* 16EEC8 802405E8 28420065 */ slti $v0, $v0, 0x65
glabel gv_01_FadeToTitleScreen
/* 16EECC 802405EC 14400002 */ bnez $v0, func_802405F8
glabel dead_flo_16_SuperBlock_EndGlowEffect
/* 16EED0 802405F0 24020064 */ addiu $v0, $zero, 0x64
glabel func_802405F4
/* 16EED4 802405F4 A1620078 */ sb $v0, 0x78($t3)
glabel func_802405F8
/* 16EED8 802405F8 91620079 */ lbu $v0, 0x79($t3)
glabel omo_15_StarSpiritEffectFunc5
/* 16EEDC 802405FC 2442FFFF */ addiu $v0, $v0, -0x1
glabel dead_flo_18_TransformFoliage
/* 16EEE0 80240600 A1620079 */ sb $v0, 0x79($t3)
glabel func_80240604
/* 16EEE4 80240604 81630079 */ lb $v1, 0x79($t3)
glabel func_80240608
/* 16EEE8 80240608 58600001 */ blezl $v1, func_80240610
glabel func_8024060C
/* 16EEEC 8024060C 24030001 */ addiu $v1, $zero, 0x1
glabel func_80240610
/* 16EEF0 80240610 44830000 */ mtc1 $v1, $f0
glabel func_80240614_EDC5F4
/* 16EEF4 80240614 00000000 */ nop
.L80240618:
/* 16EEF8 80240618 46800020 */ cvt.s.w $f0, $f0
glabel func_8024061C
/* 16EEFC 8024061C 8162007A */ lb $v0, 0x7A($t3)
dgb_06_Chest_VarStash:
/* 16EF00 80240620 3C013FF0 */ lui $at, (0x3FF00000 >> 16)
glabel dead_flo_16_SuperBlock_GatherEnergyFX
/* 16EF04 80240624 44811800 */ mtc1 $at, $f3
glabel func_80240628
/* 16EF08 80240628 44801000 */ mtc1 $zero, $f2
D_8024062C:
/* 16EF0C 8024062C 44822000 */ mtc1 $v0, $f4
D_80240630:
/* 16EF10 80240630 00000000 */ nop
glabel func_80240634
/* 16EF14 80240634 46802120 */ cvt.s.w $f4, $f4
glabel func_80240638
/* 16EF18 80240638 46002103 */ div.s $f4, $f4, $f0
glabel func_8024063C
/* 16EF1C 8024063C 46002021 */ cvt.d.s $f0, $f4
D_80240640:
/* 16EF20 80240640 3C028028 */ lui $v0, %hi(D_802809F0)
glabel mgm_02_OnHitBox
/* 16EF24 80240644 244209F0 */ addiu $v0, $v0, %lo(D_802809F0)
.L80240648:
/* 16EF28 80240648 4622003C */ c.lt.d $f0, $f2
glabel func_8024064C_EDC62C
/* 16EF2C 8024064C 00000000 */ nop
glabel sam_07_MeleeHitbox_30
/* 16EF30 80240650 45000005 */ bc1f .L80240668
glabel func_80240654
/* 16EF34 80240654 E4440000 */ swc1 $f4, 0x0($v0)
glabel func_80240658
/* 16EF38 80240658 3C013F80 */ lui $at, (0x3F800000 >> 16)
glabel func_8024065C
/* 16EF3C 8024065C 44810000 */ mtc1 $at, $f0
glabel func_80240660_EFF160
/* 16EF40 80240660 00000000 */ nop
glabel func_80240664
/* 16EF44 80240664 E4400000 */ swc1 $f0, 0x0($v0)
.L80240668:
/* 16EF48 80240668 C4400000 */ lwc1 $f0, 0x0($v0)
dgb_10_pad_66C:
/* 16EF4C 8024066C 3C014018 */ lui $at, (0x40180000 >> 16)
D_80240670:
/* 16EF50 80240670 44811800 */ mtc1 $at, $f3
arn_11_pad_674:
/* 16EF54 80240674 44801000 */ mtc1 $zero, $f2
glabel func_80240678
/* 16EF58 80240678 46000021 */ cvt.d.s $f0, $f0
glabel func_8024067C
/* 16EF5C 8024067C 4620103C */ c.lt.d $f2, $f0
glabel func_80240680
/* 16EF60 80240680 00000000 */ nop
.L80240684:
/* 16EF64 80240684 45000006 */ bc1f omo_17_ShyGuyWanderAI_16
glabel dead_flo_16_SuperBlock_RadiateFaintEnergyFX
/* 16EF68 80240688 3C036666 */ lui $v1, (0x66666667 >> 16)
glabel pra_40_appendGfx_reflect_player_floor_basic
/* 16EF6C 8024068C 3C0140C0 */ lui $at, (0x40C00000 >> 16)
D_80240690:
/* 16EF70 80240690 44810000 */ mtc1 $at, $f0
glabel func_80240694
/* 16EF74 80240694 00000000 */ nop
D_80240698:
/* 16EF78 80240698 E4400000 */ swc1 $f0, 0x0($v0)
glabel func_8024069C
/* 16EF7C 8024069C 3C036666 */ lui $v1, (0x66666667 >> 16)
glabel omo_17_ShyGuyWanderAI_16
/* 16EF80 802406A0 34636667 */ ori $v1, $v1, (0x66666667 & 0xFFFF)
glabel func_802406A4
/* 16EF84 802406A4 91620078 */ lbu $v0, 0x78($t3)
glabel dead_03_ItemChoice_SaveSelected
/* 16EF88 802406A8 00021600 */ sll $v0, $v0, 24
glabel func_802406AC
/* 16EF8C 802406AC 00022603 */ sra $a0, $v0, 24
glabel func_802406B0
/* 16EF90 802406B0 00830018 */ mult $a0, $v1
glabel func_802406B4
/* 16EF94 802406B4 0000882D */ daddu $s1, $zero, $zero
.L802406B8:
/* 16EF98 802406B8 3C12802A */ lui $s2, %hi(D_8029DA40)
glabel func_802406BC
/* 16EF9C 802406BC 8E52DA40 */ lw $s2, %lo(D_8029DA40)($s2)
sam_09_varStash:
/* 16EFA0 802406C0 3C15802A */ lui $s5, %hi(D_8029DA44)
glabel func_802406C4
/* 16EFA4 802406C4 8EB5DA44 */ lw $s5, %lo(D_8029DA44)($s5)
glabel func_802406C8
/* 16EFA8 802406C8 000217C3 */ sra $v0, $v0, 31
glabel dead_kzn_17_MeleeHitbox_Main
/* 16EFAC 802406CC 00006010 */ mfhi $t4
glabel func_802406D0
/* 16EFB0 802406D0 000C1883 */ sra $v1, $t4, 2
glabel func_802406D4
/* 16EFB4 802406D4 00621823 */ subu $v1, $v1, $v0
glabel func_802406D8
/* 16EFB8 802406D8 00031600 */ sll $v0, $v1, 24
glabel func_802406DC
/* 16EFBC 802406DC 0002B603 */ sra $s6, $v0, 24
glabel dead_flo_16_SuperBlock_AnimateEnergyOrbs
/* 16EFC0 802406E0 00031080 */ sll $v0, $v1, 2
D_802406E4:
/* 16EFC4 802406E4 00431021 */ addu $v0, $v0, $v1
glabel func_802406E8
/* 16EFC8 802406E8 00021040 */ sll $v0, $v0, 1
glabel func_802406EC
/* 16EFCC 802406EC 00822023 */ subu $a0, $a0, $v0
D_802406F0:
/* 16EFD0 802406F0 00042600 */ sll $a0, $a0, 24
D_802406F4:
/* 16EFD4 802406F4 00042603 */ sra $a0, $a0, 24
glabel func_802406F8
/* 16EFD8 802406F8 1AC00039 */ blez $s6, func_802407E0
D_802406FC:
/* 16EFDC 802406FC AFA40050 */ sw $a0, 0x50($sp)
glabel func_80240700
/* 16EFE0 80240700 3C1E8008 */ lui $fp, %hi(HES_Item_StarPoint)
glabel func_80240704
/* 16EFE4 80240704 27DE0FF0 */ addiu $fp, $fp, %lo(HES_Item_StarPoint)
glabel func_80240708
/* 16EFE8 80240708 3C178010 */ lui $s7, %hi(HES_StatusSPShine)
glabel func_8024070C
/* 16EFEC 8024070C 26F74BEC */ addiu $s7, $s7, %lo(HES_StatusSPShine)
D_80240710:
/* 16EFF0 80240710 3C14802A */ lui $s4, %hi(D_8029EFE8)
glabel func_80240714
/* 16EFF4 80240714 2694EFE8 */ addiu $s4, $s4, %lo(D_8029EFE8)
glabel func_80240718
/* 16EFF8 80240718 3C13802A */ lui $s3, %hi(D_8029EFC0)
glabel func_8024071C
/* 16EFFC 8024071C 2673EFC0 */ addiu $s3, $s3, %lo(D_8029EFC0)
glabel func_80240720
/* 16F000 80240720 8E700000 */ lw $s0, 0x0($s3)
glabel func_80240724
/* 16F004 80240724 0C05122C */ jal hud_element_get_script
glabel func_80240728
/* 16F008 80240728 0200202D */ daddu $a0, $s0, $zero
glabel func_8024072C
/* 16F00C 8024072C 105E0004 */ beq $v0, $fp, D_80240740
glabel func_80240730
/* 16F010 80240730 0200202D */ daddu $a0, $s0, $zero
glabel func_80240734
/* 16F014 80240734 0C0511FF */ jal hud_element_set_script
glabel omo_17_ShyGuyWanderAI_17
/* 16F018 80240738 03C0282D */ daddu $a1, $fp, $zero
glabel func_8024073C
/* 16F01C 8024073C 0200202D */ daddu $a0, $s0, $zero
D_80240740:
/* 16F020 80240740 0C05128B */ jal hud_element_clear_flags
glabel func_80240744
/* 16F024 80240744 24050002 */ addiu $a1, $zero, 0x2
glabel func_80240748
/* 16F028 80240748 0200202D */ daddu $a0, $s0, $zero
glabel func_8024074C
/* 16F02C 8024074C 0240282D */ daddu $a1, $s2, $zero
D_80240750:
/* 16F030 80240750 0C051261 */ jal hud_element_set_render_pos
glabel func_80240754
/* 16F034 80240754 02A0302D */ daddu $a2, $s5, $zero
glabel func_80240758
/* 16F038 80240758 0C0511EA */ jal hud_element_draw_clipped
D_8024075C:
/* 16F03C 8024075C 0200202D */ daddu $a0, $s0, $zero
D_80240760:
/* 16F040 80240760 8E900000 */ lw $s0, 0x0($s4)
glabel func_80240764
/* 16F044 80240764 0C05122C */ jal hud_element_get_script
glabel func_80240768
/* 16F048 80240768 0200202D */ daddu $a0, $s0, $zero
D_8024076C:
/* 16F04C 8024076C 10570004 */ beq $v0, $s7, func_80240780
glabel dead_flo_00_PatrolAI_JumpInit
/* 16F050 80240770 0200202D */ daddu $a0, $s0, $zero
glabel func_80240774
/* 16F054 80240774 0C0511FF */ jal hud_element_set_script
D_80240778:
/* 16F058 80240778 02E0282D */ daddu $a1, $s7, $zero
glabel dead_03_LetterDelivery_Init
/* 16F05C 8024077C 0200202D */ daddu $a0, $s0, $zero
glabel func_80240780
/* 16F060 80240780 0C05128B */ jal hud_element_clear_flags
glabel func_80240784_EFF284
/* 16F064 80240784 24050002 */ addiu $a1, $zero, 0x2
glabel func_80240788
/* 16F068 80240788 0200202D */ daddu $a0, $s0, $zero
sbk_00_pad_78C:
/* 16F06C 8024078C 0240282D */ daddu $a1, $s2, $zero
glabel func_80240790
/* 16F070 80240790 0C051261 */ jal hud_element_set_render_pos
D_80240794:
/* 16F074 80240794 26A6FFFB */ addiu $a2, $s5, -0x5
glabel omo_17_ShyGuyWanderAI_Main
/* 16F078 80240798 0C0511EA */ jal hud_element_draw_clipped
D_8024079C:
/* 16F07C 8024079C 0200202D */ daddu $a0, $s0, $zero
glabel mgm_00_PatrolAI_Loiter
/* 16F080 802407A0 3C0141A0 */ lui $at, (0x41A00000 >> 16)
glabel func_802407A4
/* 16F084 802407A4 44810000 */ mtc1 $at, $f0
D_802407A8:
/* 16F088 802407A8 00000000 */ nop
glabel func_802407AC
/* 16F08C 802407AC 4600B002 */ mul.s $f0, $f22, $f0
glabel EFEB00_CosInterpMinMax
/* 16F090 802407B0 00000000 */ nop
glabel func_802407B4
/* 16F094 802407B4 26940004 */ addiu $s4, $s4, 0x4
D_802407B8:
/* 16F098 802407B8 44921000 */ mtc1 $s2, $f2
glabel func_802407BC
/* 16F09C 802407BC 00000000 */ nop
D_802407C0:
/* 16F0A0 802407C0 468010A0 */ cvt.s.w $f2, $f2
glabel func_802407C4
/* 16F0A4 802407C4 46001081 */ sub.s $f2, $f2, $f0
glabel .L802407C8
/* 16F0A8 802407C8 26310001 */ addiu $s1, $s1, 0x1
glabel func_802407CC
/* 16F0AC 802407CC 0236102A */ slt $v0, $s1, $s6
glabel func_802407D0
/* 16F0B0 802407D0 4600118D */ trunc.w.s $f6, $f2
glabel func_802407D4_EE6D84
/* 16F0B4 802407D4 44123000 */ mfc1 $s2, $f6
glabel func_802407D8
/* 16F0B8 802407D8 1440FFD1 */ bnez $v0, func_80240720
D_802407DC:
/* 16F0BC 802407DC 26730004 */ addiu $s3, $s3, 0x4
glabel func_802407E0
/* 16F0C0 802407E0 2A22000A */ slti $v0, $s1, 0xA
glabel dead_flo_00_PatrolAI_Jump
/* 16F0C4 802407E4 10400013 */ beqz $v0, dgb_06_pad_834
glabel func_802407E8
/* 16F0C8 802407E8 00111880 */ sll $v1, $s1, 2
glabel func_802407EC
/* 16F0CC 802407EC 3C02802A */ lui $v0, %hi(D_8029EFE8)
D_802407F0:
/* 16F0D0 802407F0 2442EFE8 */ addiu $v0, $v0, %lo(D_8029EFE8)
glabel func_802407F4
/* 16F0D4 802407F4 00629021 */ addu $s2, $v1, $v0
glabel omo_11_SuperBlock_GetPartnerRank
/* 16F0D8 802407F8 3C02802A */ lui $v0, %hi(D_8029EFC0)
glabel func_802407FC
/* 16F0DC 802407FC 2442EFC0 */ addiu $v0, $v0, %lo(D_8029EFC0)
glabel func_80240800
/* 16F0E0 80240800 00628021 */ addu $s0, $v1, $v0
glabel func_80240804
/* 16F0E4 80240804 24050002 */ addiu $a1, $zero, 0x2
glabel func_80240808
/* 16F0E8 80240808 8E040000 */ lw $a0, 0x0($s0)
D_8024080C:
/* 16F0EC 8024080C 26100004 */ addiu $s0, $s0, 0x4
D_80240810:
/* 16F0F0 80240810 0C051280 */ jal hud_element_set_flags
glabel func_80240814
/* 16F0F4 80240814 26310001 */ addiu $s1, $s1, 0x1
glabel func_80240818
/* 16F0F8 80240818 24050002 */ addiu $a1, $zero, 0x2
glabel end_00_CharAnim_FadeIn_3
/* 16F0FC 8024081C 8E440000 */ lw $a0, 0x0($s2)
glabel kzn_07_FlyingAI_WanderInit
/* 16F100 80240820 0C051280 */ jal hud_element_set_flags
glabel func_80240824
/* 16F104 80240824 26520004 */ addiu $s2, $s2, 0x4
glabel func_80240828
/* 16F108 80240828 2A22000A */ slti $v0, $s1, 0xA
glabel end_01_CharAnim_FadeIn_3
/* 16F10C 8024082C 1440FFF6 */ bnez $v0, func_80240808
glabel func_80240830
/* 16F110 80240830 24050002 */ addiu $a1, $zero, 0x2
dgb_06_pad_834:
/* 16F114 80240834 3C014160 */ lui $at, (0x41600000 >> 16)
glabel func_80240838
/* 16F118 80240838 44810000 */ mtc1 $at, $f0
glabel func_8024083C
/* 16F11C 8024083C 00000000 */ nop
D_80240840:
/* 16F120 80240840 4600B002 */ mul.s $f0, $f22, $f0
glabel func_80240844_D9B734
/* 16F124 80240844 00000000 */ nop
glabel dead_11_FlyingAI_LoiterInit
/* 16F128 80240848 3C01802A */ lui $at, %hi(D_8029DA44)
glabel func_8024084C
/* 16F12C 8024084C C422DA44 */ lwc1 $f2, %lo(D_8029DA44)($at)
glabel sam_02_ToadHouse_ShowWorldStatusBar
/* 16F130 80240850 468010A0 */ cvt.s.w $f2, $f2
glabel func_80240854
/* 16F134 80240854 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4)
glabel func_80240858
/* 16F138 80240858 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0)
glabel dead_flo_00_PatrolAI_ChaseInit
/* 16F13C 8024085C 46001080 */ add.s $f2, $f2, $f0
D_80240860:
/* 16F140 80240860 3C12802A */ lui $s2, %hi(D_8029DA40)
glabel omo_11_SuperBlock_get_partner_rank
/* 16F144 80240864 8E52DA40 */ lw $s2, %lo(D_8029DA40)($s2)
dgb_12_pad_868:
/* 16F148 80240868 30420001 */ andi $v0, $v0, 0x1
dead_03_LetterDelivery_CalcLetterPos:
/* 16F14C 8024086C 4600118D */ trunc.w.s $f6, $f2
glabel dgb_12_varStash
/* 16F150 80240870 44153000 */ mfc1 $s5, $f6
D_80240874:
/* 16F154 80240874 1040001D */ beqz $v0, func_802408EC
glabel func_80240878
/* 16F158 80240878 00000000 */ nop
glabel func_8024087C
/* 16F15C 8024087C 8FAC0050 */ lw $t4, 0x50($sp)
D_80240880:
/* 16F160 80240880 1180001B */ beqz $t4, func_802408F0
glabel sam_11_GetItemName
/* 16F164 80240884 0000202D */ daddu $a0, $zero, $zero
glabel func_80240888
/* 16F168 80240888 24050004 */ addiu $a1, $zero, 0x4
glabel func_8024088C
/* 16F16C 8024088C 2646FF9C */ addiu $a2, $s2, -0x64
D_80240890:
/* 16F170 80240890 2402006E */ addiu $v0, $zero, 0x6E
glabel func_80240894_D7F5F4
/* 16F174 80240894 AFA20014 */ sw $v0, 0x14($sp)
glabel func_80240898
/* 16F178 80240898 2402000C */ addiu $v0, $zero, 0xC
glabel func_8024089C
/* 16F17C 8024089C AFA20018 */ sw $v0, 0x18($sp)
glabel func_802408A0
/* 16F180 802408A0 24020078 */ addiu $v0, $zero, 0x78
glabel func_802408A4
/* 16F184 802408A4 AFA2001C */ sw $v0, 0x1C($sp)
glabel func_802408A8
/* 16F188 802408A8 24020140 */ addiu $v0, $zero, 0x140
glabel func_802408AC
/* 16F18C 802408AC AFA20044 */ sw $v0, 0x44($sp)
glabel func_802408B0
/* 16F190 802408B0 240200F0 */ addiu $v0, $zero, 0xF0
glabel func_802408B4
/* 16F194 802408B4 26A7FFFB */ addiu $a3, $s5, -0x5
glabel flo_18_pad_8B8
/* 16F198 802408B8 AFA00010 */ sw $zero, 0x10($sp)
glabel mim_01_MeleeHitbox_Main
/* 16F19C 802408BC AFA00020 */ sw $zero, 0x20($sp)
D_802408C0:
/* 16F1A0 802408C0 AFA00024 */ sw $zero, 0x24($sp)
glabel func_802408C4
/* 16F1A4 802408C4 AFA00028 */ sw $zero, 0x28($sp)
glabel dead_kzn_19_StarSpiritEffectFunc4
/* 16F1A8 802408C8 AFA0002C */ sw $zero, 0x2C($sp)
flo_07_pad_8CC:
/* 16F1AC 802408CC AFA00030 */ sw $zero, 0x30($sp)
glabel func_802408D0
/* 16F1B0 802408D0 AFA00034 */ sw $zero, 0x34($sp)
.L802408D4:
/* 16F1B4 802408D4 AFA00038 */ sw $zero, 0x38($sp)
glabel flo_25_FlyingAI_Loiter
/* 16F1B8 802408D8 AFA0003C */ sw $zero, 0x3C($sp)
D_802408DC:
/* 16F1BC 802408DC AFA00040 */ sw $zero, 0x40($sp)
glabel omo_08_ShyGuyWanderAI_15
/* 16F1C0 802408E0 AFA20048 */ sw $v0, 0x48($sp)
.L802408E4:
/* 16F1C4 802408E4 0C03D4B8 */ jal draw_box
glabel func_802408E8
/* 16F1C8 802408E8 AFA0004C */ sw $zero, 0x4C($sp)
glabel func_802408EC
/* 16F1CC 802408EC 8FAC0050 */ lw $t4, 0x50($sp)
glabel func_802408F0
/* 16F1D0 802408F0 19800024 */ blez $t4, func_80240984
glabel func_802408F4
/* 16F1D4 802408F4 0000882D */ daddu $s1, $zero, $zero
glabel func_802408F8
/* 16F1D8 802408F8 3C148008 */ lui $s4, %hi(HES_Item_SmallStarPoint)
glabel func_802408FC
/* 16F1DC 802408FC 269410C8 */ addiu $s4, $s4, %lo(HES_Item_SmallStarPoint)
glabel .L80240900
/* 16F1E0 80240900 3C014120 */ lui $at, (0x41200000 >> 16)
glabel func_80240904
/* 16F1E4 80240904 4481A000 */ mtc1 $at, $f20
glabel dead_11_FlyingAI_Loiter
/* 16F1E8 80240908 3C13802A */ lui $s3, %hi(D_8029F010)
glabel func_8024090C
/* 16F1EC 8024090C 2673F010 */ addiu $s3, $s3, %lo(D_8029F010)
glabel func_80240910
/* 16F1F0 80240910 8E700000 */ lw $s0, 0x0($s3)
.L80240914:
/* 16F1F4 80240914 0C05122C */ jal hud_element_get_script
glabel func_80240918
/* 16F1F8 80240918 0200202D */ daddu $a0, $s0, $zero
glabel func_8024091C
/* 16F1FC 8024091C 10540004 */ beq $v0, $s4, func_80240930
glabel func_80240920
/* 16F200 80240920 0200202D */ daddu $a0, $s0, $zero
glabel omo_06_GetItemName
/* 16F204 80240924 0C0511FF */ jal hud_element_set_script
glabel func_80240928
/* 16F208 80240928 0280282D */ daddu $a1, $s4, $zero
glabel func_8024092C
/* 16F20C 8024092C 0200202D */ daddu $a0, $s0, $zero
glabel func_80240930
/* 16F210 80240930 0C05128B */ jal hud_element_clear_flags
glabel func_80240934
/* 16F214 80240934 24050002 */ addiu $a1, $zero, 0x2
glabel func_80240938
/* 16F218 80240938 0200202D */ daddu $a0, $s0, $zero
glabel func_8024093C
/* 16F21C 8024093C 0240282D */ daddu $a1, $s2, $zero
D_80240940:
/* 16F220 80240940 0C051261 */ jal hud_element_set_render_pos
glabel func_80240944
/* 16F224 80240944 02A0302D */ daddu $a2, $s5, $zero
kmr_03_pad_948:
/* 16F228 80240948 0C0511EA */ jal hud_element_draw_clipped
D_8024094C:
/* 16F22C 8024094C 0200202D */ daddu $a0, $s0, $zero
D_80240950:
/* 16F230 80240950 4614B082 */ mul.s $f2, $f22, $f20
D_80240954:
/* 16F234 80240954 00000000 */ nop
glabel func_80240958
/* 16F238 80240958 44920000 */ mtc1 $s2, $f0
glabel mgm_00_PatrolAI_PostLoiter
/* 16F23C 8024095C 00000000 */ nop
glabel func_80240960
/* 16F240 80240960 46800020 */ cvt.s.w $f0, $f0
.L80240964:
/* 16F244 80240964 46020001 */ sub.s $f0, $f0, $f2
glabel func_80240968
/* 16F248 80240968 4600018D */ trunc.w.s $f6, $f0
glabel func_8024096C
/* 16F24C 8024096C 44123000 */ mfc1 $s2, $f6
glabel omo_02_ShyGuyWanderAI_14
/* 16F250 80240970 8FAC0050 */ lw $t4, 0x50($sp)
glabel sam_02_ToadHouse_AwaitScriptComplete
/* 16F254 80240974 26310001 */ addiu $s1, $s1, 0x1
glabel func_80240978
/* 16F258 80240978 022C102A */ slt $v0, $s1, $t4
glabel dead_kzn_17_WanderMeleeAI_Main
/* 16F25C 8024097C 1440FFE4 */ bnez $v0, func_80240910
D_80240980:
/* 16F260 80240980 26730004 */ addiu $s3, $s3, 0x4
glabel func_80240984
/* 16F264 80240984 2A22000A */ slti $v0, $s1, 0xA
glabel omo_09_IsItemBadge
/* 16F268 80240988 1040000C */ beqz $v0, D_802409BC
glabel func_8024098C
/* 16F26C 8024098C 00111080 */ sll $v0, $s1, 2
glabel func_80240990
/* 16F270 80240990 3C03802A */ lui $v1, %hi(D_8029F010)
glabel func_80240994
/* 16F274 80240994 2463F010 */ addiu $v1, $v1, %lo(D_8029F010)
D_80240998:
/* 16F278 80240998 00438021 */ addu $s0, $v0, $v1
glabel func_8024099C
/* 16F27C 8024099C 8E040000 */ lw $a0, 0x0($s0)
.L802409A0:
/* 16F280 802409A0 24050002 */ addiu $a1, $zero, 0x2
glabel func_802409A4
/* 16F284 802409A4 26100004 */ addiu $s0, $s0, 0x4
glabel func_802409A8
/* 16F288 802409A8 0C051280 */ jal hud_element_set_flags
glabel func_802409AC
/* 16F28C 802409AC 26310001 */ addiu $s1, $s1, 0x1
glabel omo_08_ShyGuyWanderAI_16
/* 16F290 802409B0 2A22000A */ slti $v0, $s1, 0xA
glabel .L802409B4
/* 16F294 802409B4 1440FFF9 */ bnez $v0, func_8024099C
D_802409B8:
/* 16F298 802409B8 00000000 */ nop
D_802409BC:
/* 16F29C 802409BC 8FBF007C */ lw $ra, 0x7C($sp)
D_802409C0:
/* 16F2A0 802409C0 8FBE0078 */ lw $fp, 0x78($sp)
glabel func_802409C4
/* 16F2A4 802409C4 8FB70074 */ lw $s7, 0x74($sp)
D_802409C8:
/* 16F2A8 802409C8 8FB60070 */ lw $s6, 0x70($sp)
D_802409CC:
/* 16F2AC 802409CC 8FB5006C */ lw $s5, 0x6C($sp)
glabel func_802409D0
/* 16F2B0 802409D0 8FB40068 */ lw $s4, 0x68($sp)
glabel func_802409D4
/* 16F2B4 802409D4 8FB30064 */ lw $s3, 0x64($sp)
glabel func_802409D8
/* 16F2B8 802409D8 8FB20060 */ lw $s2, 0x60($sp)
D_802409DC:
/* 16F2BC 802409DC 8FB1005C */ lw $s1, 0x5C($sp)
glabel func_802409E0
/* 16F2C0 802409E0 8FB00058 */ lw $s0, 0x58($sp)
D_802409E4:
/* 16F2C4 802409E4 D7B60088 */ ldc1 $f22, 0x88($sp)
glabel func_802409E8
/* 16F2C8 802409E8 D7B40080 */ ldc1 $f20, 0x80($sp)
glabel func_802409EC
/* 16F2CC 802409EC 03E00008 */ jr $ra
glabel func_802409F0
/* 16F2D0 802409F0 27BD0090 */ addiu $sp, $sp, 0x90
### DECOMPILED C INSTRUCTIONS:
void btl_update_starpoints_display(void) {
BattleStatus* battleStatus = &gBattleStatus;
s32 cond;
s32 i;
if (gBattleStatus.flags1 & BS_FLAGS1_ACTORS_VISIBLE) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_1)) {
D_8029DA40 = 292;
D_8029DA44 = 196;
D_8029DA48 = 6;
D_8029DA4C = battleStatus->totalStarPoints % 10;
} else {
D_8029DA40 += (202 - D_8029DA40) / D_8029DA48;
D_8029DA44 += (120 - D_8029DA44) / D_8029DA48;
D_8029DA48--;
if (D_8029DA48 < 1) {
D_8029DA48 = 1;
}
}
cond = TRUE;
if (D_802809F4 != 0) {
if (D_802809F5 > 8) {
if (D_802809F5 <= 12) {
cond = FALSE;
} else {
D_802809F5 = 0;
}
}
D_802809F5++;
}
if (cond) {
s32 posX, posY;
s32 tens, ones;
s32 id;
f32 one = 1.0f;
battleStatus->incrementStarPointDelay--;
D_802809F0 -= 1.0;
if (D_802809F0 <= 0.0f) {
s32 pendingStarPoints;
if (battleStatus->pendingStarPoints > 0) {
battleStatus->totalStarPoints++;
if (battleStatus->totalStarPoints > 100) {
battleStatus->totalStarPoints = 100;
}
battleStatus->pendingStarPoints--;
}
pendingStarPoints = battleStatus->pendingStarPoints;
if (pendingStarPoints < 1) {
pendingStarPoints = 1;
}
D_802809F0 = (f32) battleStatus->incrementStarPointDelay / pendingStarPoints;
if (D_802809F0 < 1.0) {
D_802809F0 = 1.0f;
}
if (D_802809F0 > 6.0) {
D_802809F0 = 6.0f;
}
}
posX = D_8029DA40;
posY = D_8029DA44;
tens = battleStatus->totalStarPoints / 10;
ones = battleStatus->totalStarPoints % 10;
for (i = 0; i < tens; i++) {
id = D_8029EFC0[i];
if (hud_element_get_script(id) != &HES_Item_StarPoint) {
hud_element_set_script(id, &HES_Item_StarPoint);
}
hud_element_clear_flags(id, 2);
hud_element_set_render_pos(id, posX, posY);
hud_element_draw_clipped(id);
id = D_8029EFE8[i];
if (hud_element_get_script(id) != &HES_StatusSPShine) {
hud_element_set_script(id, &HES_StatusSPShine);
}
hud_element_clear_flags(id, 2);
hud_element_set_render_pos(id, posX, posY - 5);
hud_element_draw_clipped(id);
posX -= (one * 20.0f);
}
for (; i < ARRAY_COUNT(D_8029EFC0); i++) {
hud_element_set_flags(D_8029EFC0[i], HUD_ELEMENT_FLAG_DISABLED);
hud_element_set_flags(D_8029EFE8[i], HUD_ELEMENT_FLAG_DISABLED);
}
posX = D_8029DA40;
posY = D_8029DA44 + (one * 14.0f);
if (gBattleStatus.flags2 & BS_FLAGS2_1) {
if (ones != 0) {
draw_box(0, WINDOW_STYLE_4, posX - 100, posY - 5, 0, 110, 12, 120, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL,
NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
}
}
for (i = 0; i < ones; i++) {
id = D_8029F010[i];
if (hud_element_get_script(id) != &HES_Item_SmallStarPoint) {
hud_element_set_script(id, &HES_Item_SmallStarPoint);
}
hud_element_clear_flags(id, 2);
hud_element_set_render_pos(id, posX, posY);
hud_element_draw_clipped(id);
posX -= one * 10.0f;
}
for (; i < ARRAY_COUNT(D_8029F010); i++) {
hud_element_set_flags(D_8029F010[i], HUD_ELEMENT_FLAG_DISABLED);
}
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_80246450
/* 174D30 80246450 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 174D34 80246454 AFB3001C */ sw $s3, 0x1C($sp)
/* 174D38 80246458 3C13800E */ lui $s3, %hi(gBattleStatus)
/* 174D3C 8024645C 2673C070 */ addiu $s3, $s3, %lo(gBattleStatus)
dead_flo_08_FlowerGuard_ItemChoiceList:
/* 174D40 80246460 3C04800E */ lui $a0, %hi(gBattleSubState)
/* 174D44 80246464 2484C4DC */ addiu $a0, $a0, %lo(gBattleSubState)
/* 174D48 80246468 AFBF0030 */ sw $ra, 0x30($sp)
.L8024646C:
/* 174D4C 8024646C AFB7002C */ sw $s7, 0x2C($sp)
D_80246470:
/* 174D50 80246470 AFB60028 */ sw $s6, 0x28($sp)
/* 174D54 80246474 AFB50024 */ sw $s5, 0x24($sp)
D_80246478:
/* 174D58 80246478 AFB40020 */ sw $s4, 0x20($sp)
.L8024647C:
/* 174D5C 8024647C AFB20018 */ sw $s2, 0x18($sp)
D_80246480_EA6D80:
/* 174D60 80246480 AFB10014 */ sw $s1, 0x14($sp)
/* 174D64 80246484 AFB00010 */ sw $s0, 0x10($sp)
glabel func_80246488
/* 174D68 80246488 F7B80048 */ sdc1 $f24, 0x48($sp)
/* 174D6C 8024648C F7B60040 */ sdc1 $f22, 0x40($sp)
glabel func_80246490
/* 174D70 80246490 F7B40038 */ sdc1 $f20, 0x38($sp)
/* 174D74 80246494 8E7000D8 */ lw $s0, 0xD8($s3)
/* 174D78 80246498 8C820000 */ lw $v0, 0x0($a0)
/* 174D7C 8024649C 8E7100DC */ lw $s1, 0xDC($s3)
/* 174D80 802464A0 1440007F */ bnez $v0, .L802466A0
D_802464A4:
/* 174D84 802464A4 24020002 */ addiu $v0, $zero, 0x2
/* 174D88 802464A8 82630178 */ lb $v1, 0x178($s3)
/* 174D8C 802464AC 14620007 */ bne $v1, $v0, .L802464CC
/* 174D90 802464B0 00000000 */ nop
/* 174D94 802464B4 82620088 */ lb $v0, 0x88($s3)
/* 174D98 802464B8 28420002 */ slti $v0, $v0, 0x2
/* 174D9C 802464BC 14400003 */ bnez $v0, .L802464CC
/* 174DA0 802464C0 24020005 */ addiu $v0, $zero, 0x5
D_802464C4:
/* 174DA4 802464C4 080919A8 */ j .L802466A0
/* 174DA8 802464C8 AC820000 */ sw $v0, 0x0($a0)
.L802464CC:
/* 174DAC 802464CC 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4)
D_802464D0:
/* 174DB0 802464D0 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0)
/* 174DB4 802464D4 3C030400 */ lui $v1, (0x4000000 >> 16)
jtbl_802464D8:
/* 174DB8 802464D8 00431024 */ and $v0, $v0, $v1
/* 174DBC 802464DC 1440000D */ bnez $v0, .L80246514
/* 174DC0 802464E0 00000000 */ nop
/* 174DC4 802464E4 0C03A752 */ jal is_ability_active
D_802464E8:
/* 174DC8 802464E8 24040012 */ addiu $a0, $zero, 0x12
/* 174DCC 802464EC 14400009 */ bnez $v0, .L80246514
/* 174DD0 802464F0 00000000 */ nop
/* 174DD4 802464F4 0C03A752 */ jal is_ability_active
/* 174DD8 802464F8 2404001F */ addiu $a0, $zero, 0x1F
.L802464FC:
/* 174DDC 802464FC 14400005 */ bnez $v0, .L80246514
D_80246500:
/* 174DE0 80246500 00000000 */ nop
.L80246504:
/* 174DE4 80246504 0C03A752 */ jal is_ability_active
D_80246508:
/* 174DE8 80246508 24040034 */ addiu $a0, $zero, 0x34
/* 174DEC 8024650C 10400031 */ beqz $v0, .L802465D4
D_80246510:
/* 174DF0 80246510 24020005 */ addiu $v0, $zero, 0x5
.L80246514:
/* 174DF4 80246514 82030214 */ lb $v1, 0x214($s0)
jtbl_80246518:
/* 174DF8 80246518 2402000C */ addiu $v0, $zero, 0xC
.L8024651C:
/* 174DFC 8024651C 1062002D */ beq $v1, $v0, .L802465D4
D_80246520:
/* 174E00 80246520 24020005 */ addiu $v0, $zero, 0x5
/* 174E04 80246524 8262009A */ lb $v0, 0x9A($s3)
D_80246528:
/* 174E08 80246528 1440002A */ bnez $v0, .L802465D4
D_8024652C:
/* 174E0C 8024652C 24020005 */ addiu $v0, $zero, 0x5
D_80246530:
/* 174E10 80246530 0000A82D */ daddu $s5, $zero, $zero
D_80246534:
/* 174E14 80246534 02A0902D */ daddu $s2, $s5, $zero
D_80246538:
/* 174E18 80246538 3C16800E */ lui $s6, %hi(gBattleStatus)
/* 174E1C 8024653C 26D6C070 */ addiu $s6, $s6, %lo(gBattleStatus)
D_80246540:
/* 174E20 80246540 8EC20004 */ lw $v0, 0x4($s6)
/* 174E24 80246544 3C170400 */ lui $s7, (0x4000000 >> 16)
D_80246548:
/* 174E28 80246548 00571024 */ and $v0, $v0, $s7
/* 174E2C 8024654C 10400003 */ beqz $v0, D_8024655C
D_80246550:
/* 174E30 80246550 02A0A02D */ daddu $s4, $s5, $zero
D_80246554:
/* 174E34 80246554 82750089 */ lb $s5, 0x89($s3)
D_80246558:
/* 174E38 80246558 A2600089 */ sb $zero, 0x89($s3)
D_8024655C:
/* 174E3C 8024655C 0C00A67F */ jal rand_int
D_80246560:
/* 174E40 80246560 24040064 */ addiu $a0, $zero, 0x64
/* 174E44 80246564 28420032 */ slti $v0, $v0, 0x32
D_80246568:
/* 174E48 80246568 10400005 */ beqz $v0, .L80246580
/* 174E4C 8024656C 00000000 */ nop
jtbl_80246570:
/* 174E50 80246570 0C03A752 */ jal is_ability_active
/* 174E54 80246574 2404001F */ addiu $a0, $zero, 0x1F
D_80246578:
/* 174E58 80246578 00021840 */ sll $v1, $v0, 1
/* 174E5C 8024657C 00629021 */ addu $s2, $v1, $v0
.L80246580:
/* 174E60 80246580 0C00A67F */ jal rand_int
/* 174E64 80246584 24040064 */ addiu $a0, $zero, 0x64
/* 174E68 80246588 28420032 */ slti $v0, $v0, 0x32
/* 174E6C 8024658C 10400004 */ beqz $v0, D_802465A0
D_80246590:
/* 174E70 80246590 00000000 */ nop
/* 174E74 80246594 0C03A752 */ jal is_ability_active
D_80246598:
/* 174E78 80246598 24040012 */ addiu $a0, $zero, 0x12
D_8024659C:
/* 174E7C 8024659C 02429021 */ addu $s2, $s2, $v0
D_802465A0:
/* 174E80 802465A0 0C00A67F */ jal rand_int
/* 174E84 802465A4 24040064 */ addiu $a0, $zero, 0x64
/* 174E88 802465A8 28420032 */ slti $v0, $v0, 0x32
/* 174E8C 802465AC 10400005 */ beqz $v0, .L802465C4
/* 174E90 802465B0 02B21021 */ addu $v0, $s5, $s2
/* 174E94 802465B4 0C03A752 */ jal is_ability_active
D_802465B8:
/* 174E98 802465B8 24040034 */ addiu $a0, $zero, 0x34
/* 174E9C 802465BC 0040A02D */ daddu $s4, $v0, $zero
D_802465C0:
/* 174EA0 802465C0 02B21021 */ addu $v0, $s5, $s2
.L802465C4:
/* 174EA4 802465C4 00541021 */ addu $v0, $v0, $s4
D_802465C8_915C78:
/* 174EA8 802465C8 14400006 */ bnez $v0, .L802465E4
D_802465CC:
/* 174EAC 802465CC 2402001E */ addiu $v0, $zero, 0x1E
D_802465D0:
/* 174EB0 802465D0 24020005 */ addiu $v0, $zero, 0x5
.L802465D4:
/* 174EB4 802465D4 3C01800E */ lui $at, %hi(gBattleSubState)
D_802465D8:
/* 174EB8 802465D8 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 174EBC 802465DC 080919A8 */ j .L802466A0
D_802465E0:
/* 174EC0 802465E0 00000000 */ nop
.L802465E4:
/* 174EC4 802465E4 3C048028 */ lui $a0, %hi(EVS_Mario_HandlePhase)
D_802465E8:
/* 174EC8 802465E8 24844EBC */ addiu $a0, $a0, %lo(EVS_Mario_HandlePhase)
.L802465EC:
/* 174ECC 802465EC 2405000A */ addiu $a1, $zero, 0xA
D_802465F0:
/* 174ED0 802465F0 0000302D */ daddu $a2, $zero, $zero
/* 174ED4 802465F4 0C0B0CF8 */ jal start_script
/* 174ED8 802465F8 A26201A7 */ sb $v0, 0x1A7($s3)
/* 174EDC 802465FC 0040202D */ daddu $a0, $v0, $zero
/* 174EE0 80246600 AE0401D4 */ sw $a0, 0x1D4($s0)
/* 174EE4 80246604 8C820144 */ lw $v0, 0x144($a0)
/* 174EE8 80246608 AE0201E4 */ sw $v0, 0x1E4($s0)
/* 174EEC 8024660C AC800148 */ sw $zero, 0x148($a0)
D_80246610:
/* 174EF0 80246610 8EC20004 */ lw $v0, 0x4($s6)
D_80246614:
/* 174EF4 80246614 00571024 */ and $v0, $v0, $s7
D_80246618_EA6F18:
/* 174EF8 80246618 50400007 */ beql $v0, $zero, D_80246638_EA6F38
/* 174EFC 8024661C AC9500AC */ sw $s5, 0xAC($a0)
D_80246620_EA6F20:
/* 174F00 80246620 82630089 */ lb $v1, 0x89($s3)
D_80246624:
/* 174F04 80246624 8C8200AC */ lw $v0, 0xAC($a0)
D_80246628_EA6F28:
/* 174F08 80246628 00431021 */ addu $v0, $v0, $v1
/* 174F0C 8024662C AC8200AC */ sw $v0, 0xAC($a0)
D_80246630_EA6F30:
/* 174F10 80246630 A2600089 */ sb $zero, 0x89($s3)
/* 174F14 80246634 AC9500AC */ sw $s5, 0xAC($a0)
D_80246638_EA6F38:
/* 174F18 80246638 02A0102D */ daddu $v0, $s5, $zero
/* 174F1C 8024663C 28420064 */ slti $v0, $v0, 0x64
D_80246640_EA6F40:
/* 174F20 80246640 AC9200B0 */ sw $s2, 0xB0($a0)
D_80246644:
/* 174F24 80246644 14400003 */ bnez $v0, .L80246654
D_80246648_EA6F48:
/* 174F28 80246648 AC9400B4 */ sw $s4, 0xB4($a0)
/* 174F2C 8024664C 24020063 */ addiu $v0, $zero, 0x63
jtbl_80246650:
/* 174F30 80246650 AC8200AC */ sw $v0, 0xAC($a0)
.L80246654:
/* 174F34 80246654 8C8200B0 */ lw $v0, 0xB0($a0)
.L80246658:
/* 174F38 80246658 28420064 */ slti $v0, $v0, 0x64
/* 174F3C 8024665C 14400002 */ bnez $v0, .L80246668
D_80246660:
/* 174F40 80246660 24020063 */ addiu $v0, $zero, 0x63
/* 174F44 80246664 AC8200B0 */ sw $v0, 0xB0($a0)
.L80246668:
/* 174F48 80246668 8C8200B4 */ lw $v0, 0xB4($a0)
/* 174F4C 8024666C 28420064 */ slti $v0, $v0, 0x64
/* 174F50 80246670 14400004 */ bnez $v0, .L80246684
/* 174F54 80246674 3C02FBFF */ lui $v0, (0xFBFFFFFF >> 16)
/* 174F58 80246678 24020063 */ addiu $v0, $zero, 0x63
D_8024667C:
/* 174F5C 8024667C AC8200B4 */ sw $v0, 0xB4($a0)
/* 174F60 80246680 3C02FBFF */ lui $v0, (0xFBFFFFFF >> 16)
.L80246684:
/* 174F64 80246684 3442FFFF */ ori $v0, $v0, (0xFBFFFFFF & 0xFFFF)
/* 174F68 80246688 8EC30004 */ lw $v1, 0x4($s6)
/* 174F6C 8024668C 24040005 */ addiu $a0, $zero, 0x5
/* 174F70 80246690 3C01800E */ lui $at, %hi(gBattleSubState)
/* 174F74 80246694 AC24C4DC */ sw $a0, %lo(gBattleSubState)($at)
/* 174F78 80246698 00621824 */ and $v1, $v1, $v0
D_8024669C:
/* 174F7C 8024669C AEC30004 */ sw $v1, 0x4($s6)
.L802466A0:
/* 174F80 802466A0 3C12800E */ lui $s2, %hi(gBattleSubState)
/* 174F84 802466A4 2652C4DC */ addiu $s2, $s2, %lo(gBattleSubState)
D_802466A8:
/* 174F88 802466A8 8E430000 */ lw $v1, 0x0($s2)
.L802466AC:
/* 174F8C 802466AC 24020005 */ addiu $v0, $zero, 0x5
D_802466B0_EA6FB0:
/* 174F90 802466B0 14620027 */ bne $v1, $v0, jtbl_80246750
flo_18_pad_66B4:
/* 174F94 802466B4 24020006 */ addiu $v0, $zero, 0x6
D_802466B8_EA6FB8:
/* 174F98 802466B8 8E0201D4 */ lw $v0, 0x1D4($s0)
D_802466BC:
/* 174F9C 802466BC 10400005 */ beqz $v0, .L802466D4
D_802466C0_EA6FC0:
/* 174FA0 802466C0 00000000 */ nop
/* 174FA4 802466C4 0C0B1059 */ jal does_script_exist
D_802466C8_EA6FC8:
/* 174FA8 802466C8 8E0401E4 */ lw $a0, 0x1E4($s0)
/* 174FAC 802466CC 1440001E */ bnez $v0, .L80246748
dead_kzn_17_D_802466D0:
/* 174FB0 802466D0 00000000 */ nop
.L802466D4:
/* 174FB4 802466D4 3C03800E */ lui $v1, %hi(gBattleStatus)
.L802466D8:
/* 174FB8 802466D8 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 174FBC 802466DC AE0001D4 */ sw $zero, 0x1D4($s0)
/* 174FC0 802466E0 8C620004 */ lw $v0, 0x4($v1)
/* 174FC4 802466E4 30420040 */ andi $v0, $v0, 0x40
D_802466E8:
/* 174FC8 802466E8 10400006 */ beqz $v0, .L80246704
/* 174FCC 802466EC 2402000A */ addiu $v0, $zero, 0xA
/* 174FD0 802466F0 8C620000 */ lw $v0, 0x0($v1)
/* 174FD4 802466F4 3C030010 */ lui $v1, (0x100000 >> 16)
/* 174FD8 802466F8 00431024 */ and $v0, $v0, $v1
.L802466FC:
/* 174FDC 802466FC 10400003 */ beqz $v0, .L8024670C
.L80246700:
/* 174FE0 80246700 2402000A */ addiu $v0, $zero, 0xA
.L80246704:
/* 174FE4 80246704 080919D0 */ j .L80246740
/* 174FE8 80246708 AE420000 */ sw $v0, 0x0($s2)
.L8024670C:
/* 174FEC 8024670C C6000138 */ lwc1 $f0, 0x138($s0)
/* 174FF0 80246710 C6020140 */ lwc1 $f2, 0x140($s0)
/* 174FF4 80246714 E600000C */ swc1 $f0, 0xC($s0)
D_80246718:
/* 174FF8 80246718 E6020014 */ swc1 $f2, 0x14($s0)
/* 174FFC 8024671C C6200138 */ lwc1 $f0, 0x138($s1)
/* 175000 80246720 24020006 */ addiu $v0, $zero, 0x6
/* 175004 80246724 AE420000 */ sw $v0, 0x0($s2)
D_80246728:
/* 175008 80246728 E6000018 */ swc1 $f0, 0x18($s0)
/* 17500C 8024672C C6200140 */ lwc1 $f0, 0x140($s1)
D_80246730:
/* 175010 80246730 24020004 */ addiu $v0, $zero, 0x4
/* 175014 80246734 A6020070 */ sh $v0, 0x70($s0)
/* 175018 80246738 AE000054 */ sw $zero, 0x54($s0)
/* 17501C 8024673C E6000020 */ swc1 $f0, 0x20($s0)
.L80246740:
/* 175020 80246740 3C12800E */ lui $s2, %hi(gBattleSubState)
D_80246744:
/* 175024 80246744 2652C4DC */ addiu $s2, $s2, %lo(gBattleSubState)
.L80246748:
/* 175028 80246748 8E430000 */ lw $v1, 0x0($s2)
D_8024674C:
/* 17502C 8024674C 24020006 */ addiu $v0, $zero, 0x6
jtbl_80246750:
/* 175030 80246750 1462006C */ bne $v1, $v0, .L80246904
.L80246754:
/* 175034 80246754 00000000 */ nop
/* 175038 80246758 86020070 */ lh $v0, 0x70($s0)
.L8024675C:
/* 17503C 8024675C 10400022 */ beqz $v0, .L802467E8
/* 175040 80246760 00000000 */ nop
.L80246764:
/* 175044 80246764 C6000018 */ lwc1 $f0, 0x18($s0)
D_80246768:
/* 175048 80246768 C6080144 */ lwc1 $f8, 0x144($s0)
/* 17504C 8024676C C6020020 */ lwc1 $f2, 0x20($s0)
D_80246770:
/* 175050 80246770 46080001 */ sub.s $f0, $f0, $f8
.L80246774:
/* 175054 80246774 C604014C */ lwc1 $f4, 0x14C($s0)
/* 175058 80246778 46041081 */ sub.s $f2, $f2, $f4
/* 17505C 8024677C 44823000 */ mtc1 $v0, $f6
/* 175060 80246780 00000000 */ nop
D_80246784:
/* 175064 80246784 468031A0 */ cvt.s.w $f6, $f6
/* 175068 80246788 46060003 */ div.s $f0, $f0, $f6
/* 17506C 8024678C 46004200 */ add.s $f8, $f8, $f0
/* 175070 80246790 46003006 */ mov.s $f0, $f6
D_80246794:
/* 175074 80246794 46061083 */ div.s $f2, $f2, $f6
D_80246798:
/* 175078 80246798 C600000C */ lwc1 $f0, 0xC($s0)
/* 17507C 8024679C 46022100 */ add.s $f4, $f4, $f2
/* 175080 802467A0 E6080144 */ swc1 $f8, 0x144($s0)
/* 175084 802467A4 E604014C */ swc1 $f4, 0x14C($s0)
/* 175088 802467A8 C6240144 */ lwc1 $f4, 0x144($s1)
/* 17508C 802467AC 46040001 */ sub.s $f0, $f0, $f4
/* 175090 802467B0 46003086 */ mov.s $f2, $f6
kzn_17_LetterDelivery_SavedNpcAnim:
/* 175094 802467B4 46060003 */ div.s $f0, $f0, $f6
/* 175098 802467B8 46002100 */ add.s $f4, $f4, $f0
/* 17509C 802467BC E6240144 */ swc1 $f4, 0x144($s1)
/* 1750A0 802467C0 C6000014 */ lwc1 $f0, 0x14($s0)
.L802467C4:
/* 1750A4 802467C4 C624014C */ lwc1 $f4, 0x14C($s1)
/* 1750A8 802467C8 86020070 */ lh $v0, 0x70($s0)
.L802467CC:
/* 1750AC 802467CC 46040001 */ sub.s $f0, $f0, $f4
/* 1750B0 802467D0 44821000 */ mtc1 $v0, $f2
/* 1750B4 802467D4 00000000 */ nop
/* 1750B8 802467D8 468010A0 */ cvt.s.w $f2, $f2
.L802467DC:
/* 1750BC 802467DC 46020003 */ div.s $f0, $f0, $f2
/* 1750C0 802467E0 46002100 */ add.s $f4, $f4, $f0
.L802467E4:
/* 1750C4 802467E4 E624014C */ swc1 $f4, 0x14C($s1)
.L802467E8:
/* 1750C8 802467E8 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 1750CC 802467EC 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
D_802467F0:
/* 1750D0 802467F0 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1750D4 802467F4 4481B000 */ mtc1 $at, $f22
/* 1750D8 802467F8 00000000 */ nop
/* 1750DC 802467FC 46166302 */ mul.s $f12, $f12, $f22
/* 1750E0 80246800 00000000 */ nop
/* 1750E4 80246804 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 1750E8 80246808 4481C000 */ mtc1 $at, $f24
/* 1750EC 8024680C 3C014180 */ lui $at, (0x41800000 >> 16)
/* 1750F0 80246810 4481A000 */ mtc1 $at, $f20
D_80246814:
/* 1750F4 80246814 0C00A85B */ jal sin_rad
/* 1750F8 80246818 46186303 */ div.s $f12, $f12, $f24
/* 1750FC 8024681C 46140002 */ mul.s $f0, $f0, $f20
/* 175100 80246820 00000000 */ nop
D_80246824:
/* 175104 80246824 C602014C */ lwc1 $f2, 0x14C($s0)
/* 175108 80246828 46001080 */ add.s $f2, $f2, $f0
.L8024682C:
/* 17510C 8024682C C60C0054 */ lwc1 $f12, 0x54($s0)
/* 175110 80246830 46006307 */ neg.s $f12, $f12
D_80246834:
/* 175114 80246834 0C00A6C9 */ jal clamp_angle
/* 175118 80246838 E602014C */ swc1 $f2, 0x14C($s0)
/* 17511C 8024683C C60C0054 */ lwc1 $f12, 0x54($s0)
/* 175120 80246840 46166302 */ mul.s $f12, $f12, $f22
.L80246844:
/* 175124 80246844 00000000 */ nop
D_80246848:
/* 175128 80246848 E600018C */ swc1 $f0, 0x18C($s0)
flo_00_pad_684C:
/* 17512C 8024684C 0C00A85B */ jal sin_rad
D_80246850:
/* 175130 80246850 46186303 */ div.s $f12, $f12, $f24
.L80246854:
/* 175134 80246854 46140002 */ mul.s $f0, $f0, $f20
/* 175138 80246858 00000000 */ nop
/* 17513C 8024685C C622014C */ lwc1 $f2, 0x14C($s1)
.L80246860:
/* 175140 80246860 46001081 */ sub.s $f2, $f2, $f0
/* 175144 80246864 E622014C */ swc1 $f2, 0x14C($s1)
/* 175148 80246868 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 17514C 8024686C 0C00A6C9 */ jal clamp_angle
/* 175150 80246870 46006307 */ neg.s $f12, $f12
/* 175154 80246874 E620018C */ swc1 $f0, 0x18C($s1)
/* 175158 80246878 C6000054 */ lwc1 $f0, 0x54($s0)
/* 17515C 8024687C 3C0142B4 */ lui $at, (0x42B40000 >> 16)
D_80246880:
/* 175160 80246880 44811000 */ mtc1 $at, $f2
/* 175164 80246884 86020070 */ lh $v0, 0x70($s0)
/* 175168 80246888 46020000 */ add.s $f0, $f0, $f2
/* 17516C 8024688C 96030070 */ lhu $v1, 0x70($s0)
/* 175170 80246890 10400004 */ beqz $v0, .L802468A4
dead_kzn_17_LetterDelivery_SavedNpcAnim:
/* 175174 80246894 E6000054 */ swc1 $f0, 0x54($s0)
/* 175178 80246898 2462FFFF */ addiu $v0, $v1, -0x1
.L8024689C:
/* 17517C 8024689C 08091A41 */ j .L80246904
/* 175180 802468A0 A6020070 */ sh $v0, 0x70($s0)
.L802468A4:
/* 175184 802468A4 C6000018 */ lwc1 $f0, 0x18($s0)
/* 175188 802468A8 C6020020 */ lwc1 $f2, 0x20($s0)
.L802468AC:
/* 17518C 802468AC C604000C */ lwc1 $f4, 0xC($s0)
/* 175190 802468B0 E6000144 */ swc1 $f0, 0x144($s0)
.L802468B4:
/* 175194 802468B4 E602014C */ swc1 $f2, 0x14C($s0)
.L802468B8:
/* 175198 802468B8 E6240144 */ swc1 $f4, 0x144($s1)
/* 17519C 802468BC C6000014 */ lwc1 $f0, 0x14($s0)
/* 1751A0 802468C0 E620014C */ swc1 $f0, 0x14C($s1)
D_802468C4:
/* 1751A4 802468C4 C6000144 */ lwc1 $f0, 0x144($s0)
D_802468C8:
/* 1751A8 802468C8 C602014C */ lwc1 $f2, 0x14C($s0)
/* 1751AC 802468CC 2402000A */ addiu $v0, $zero, 0xA
/* 1751B0 802468D0 E6000138 */ swc1 $f0, 0x138($s0)
/* 1751B4 802468D4 E6020140 */ swc1 $f2, 0x140($s0)
/* 1751B8 802468D8 C6200144 */ lwc1 $f0, 0x144($s1)
.L802468DC:
/* 1751BC 802468DC C622014C */ lwc1 $f2, 0x14C($s1)
.L802468E0:
/* 1751C0 802468E0 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 1751C4 802468E4 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
.L802468E8:
/* 1751C8 802468E8 AE420000 */ sw $v0, 0x0($s2)
/* 1751CC 802468EC E6200138 */ swc1 $f0, 0x138($s1)
/* 1751D0 802468F0 E6220140 */ swc1 $f2, 0x140($s1)
/* 1751D4 802468F4 8C820000 */ lw $v0, 0x0($a0)
D_802468F8:
/* 1751D8 802468F8 3C030010 */ lui $v1, (0x100000 >> 16)
.L802468FC:
/* 1751DC 802468FC 00431025 */ or $v0, $v0, $v1
/* 1751E0 80246900 AC820000 */ sw $v0, 0x0($a0)
.L80246904:
/* 1751E4 80246904 3C03800E */ lui $v1, %hi(gBattleSubState)
/* 1751E8 80246908 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
/* 1751EC 8024690C 2402000A */ addiu $v0, $zero, 0xA
/* 1751F0 80246910 14620078 */ bne $v1, $v0, .L80246AF4
.L80246914:
/* 1751F4 80246914 00000000 */ nop
/* 1751F8 80246918 0C098D0D */ jal btl_check_enemies_defeated
/* 1751FC 8024691C 00000000 */ nop
glabel .L80246920
/* 175200 80246920 14400074 */ bnez $v0, .L80246AF4
D_80246924:
/* 175204 80246924 24020002 */ addiu $v0, $zero, 0x2
/* 175208 80246928 82630178 */ lb $v1, 0x178($s3)
glabel .L8024692C
/* 17520C 8024692C 14620010 */ bne $v1, $v0, .L80246970
/* 175210 80246930 00000000 */ nop
.L80246934:
/* 175214 80246934 82620088 */ lb $v0, 0x88($s3)
/* 175218 80246938 28420002 */ slti $v0, $v0, 0x2
/* 17521C 8024693C 1440000C */ bnez $v0, .L80246970
.L80246940:
/* 175220 80246940 00000000 */ nop
/* 175224 80246944 0C093903 */ jal func_8024E40C
/* 175228 80246948 24040002 */ addiu $a0, $zero, 0x2
/* 17522C 8024694C 0C093936 */ jal D_8024E4D8_C0BD58
D_80246950:
/* 175230 80246950 2404000A */ addiu $a0, $zero, 0xA
/* 175234 80246954 3C02800E */ lui $v0, %hi(gBattleStatus)
D_80246958:
/* 175238 80246958 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
/* 17523C 8024695C 8C430004 */ lw $v1, 0x4($v0)
glabel .L80246960
/* 175240 80246960 2404FFFD */ addiu $a0, $zero, -0x3
.L80246964:
/* 175244 80246964 00641824 */ and $v1, $v1, $a0
/* 175248 80246968 08091A61 */ j .L80246984
.L8024696C:
/* 17524C 8024696C AC430004 */ sw $v1, 0x4($v0)
.L80246970:
/* 175250 80246970 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 175254 80246974 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 175258 80246978 8C620004 */ lw $v0, 0x4($v1)
.L8024697C:
/* 17525C 8024697C 34420002 */ ori $v0, $v0, 0x2
/* 175260 80246980 AC620004 */ sw $v0, 0x4($v1)
.L80246984:
/* 175264 80246984 82620094 */ lb $v0, 0x94($s3)
/* 175268 80246988 04410004 */ bgez $v0, .L8024699C
/* 17526C 8024698C 24040006 */ addiu $a0, $zero, 0x6
D_80246990:
/* 175270 80246990 A2600094 */ sb $zero, 0x94($s3)
/* 175274 80246994 08091ABB */ j .L80246AEC
/* 175278 80246998 A2600088 */ sb $zero, 0x88($s3)
.L8024699C:
/* 17527C 8024699C 82620088 */ lb $v0, 0x88($s3)
/* 175280 802469A0 92630088 */ lbu $v1, 0x88($s3)
/* 175284 802469A4 1040002C */ beqz $v0, .L80246A58
/* 175288 802469A8 2462FFFF */ addiu $v0, $v1, -0x1
D_802469AC:
/* 17528C 802469AC A2620088 */ sb $v0, 0x88($s3)
/* 175290 802469B0 00021600 */ sll $v0, $v0, 24
/* 175294 802469B4 10400008 */ beqz $v0, .L802469D8
/* 175298 802469B8 3C040400 */ lui $a0, (0x4000000 >> 16)
/* 17529C 802469BC 0C090464 */ jal func_80241190
/* 1752A0 802469C0 2404000C */ addiu $a0, $zero, 0xC
D_802469C4:
/* 1752A4 802469C4 24020046 */ addiu $v0, $zero, 0x46
/* 1752A8 802469C8 3C01800E */ lui $at, %hi(gBattleSubState)
.L802469CC:
/* 1752AC 802469CC AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 1752B0 802469D0 08091ABD */ j .L80246AF4
.L802469D4:
/* 1752B4 802469D4 00000000 */ nop
.L802469D8:
/* 1752B8 802469D8 3C05800E */ lui $a1, %hi(gBattleStatus)
dgb_08_pad_69DC:
/* 1752BC 802469DC 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus)
D_802469E0:
/* 1752C0 802469E0 8CA20000 */ lw $v0, 0x0($a1)
.L802469E4:
/* 1752C4 802469E4 00441024 */ and $v0, $v0, $a0
/* 1752C8 802469E8 10400006 */ beqz $v0, D_80246A04
/* 1752CC 802469EC 00000000 */ nop
D_802469F0:
/* 1752D0 802469F0 8262008B */ lb $v0, 0x8B($s3)
/* 1752D4 802469F4 9263008B */ lbu $v1, 0x8B($s3)
D_802469F8:
/* 1752D8 802469F8 1040000E */ beqz $v0, .L80246A34
/* 1752DC 802469FC 2462FFFF */ addiu $v0, $v1, -0x1
D_80246A00:
/* 1752E0 80246A00 A262008B */ sb $v0, 0x8B($s3)
D_80246A04:
/* 1752E4 80246A04 8262008B */ lb $v0, 0x8B($s3)
D_80246A08:
/* 1752E8 80246A08 5040000B */ beql $v0, $zero, .L80246A38
/* 1752EC 80246A0C 3C05FBFF */ lui $a1, (0xFBFFFFFF >> 16)
jtbl_80246A10:
/* 1752F0 80246A10 8CA20000 */ lw $v0, 0x0($a1)
/* 1752F4 80246A14 00441024 */ and $v0, $v0, $a0
/* 1752F8 80246A18 10400006 */ beqz $v0, .L80246A34
/* 1752FC 80246A1C 2404000C */ addiu $a0, $zero, 0xC
D_80246A20:
/* 175300 80246A20 8CA20004 */ lw $v0, 0x4($a1)
/* 175304 80246A24 2403FFFD */ addiu $v1, $zero, -0x3
/* 175308 80246A28 00431024 */ and $v0, $v0, $v1
.L80246A2C:
/* 17530C 80246A2C 08091ABB */ j .L80246AEC
/* 175310 80246A30 ACA20004 */ sw $v0, 0x4($a1)
.L80246A34:
/* 175314 80246A34 3C05FBFF */ lui $a1, (0xFBFFFFFF >> 16)
.L80246A38:
/* 175318 80246A38 34A5FFFF */ ori $a1, $a1, (0xFBFFFFFF & 0xFFFF)
/* 17531C 80246A3C 3C03800E */ lui $v1, %hi(gBattleStatus)
.L80246A40:
/* 175320 80246A40 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 175324 80246A44 8C620000 */ lw $v0, 0x0($v1)
/* 175328 80246A48 24040008 */ addiu $a0, $zero, 0x8
.L80246A4C:
/* 17532C 80246A4C 00451024 */ and $v0, $v0, $a1
/* 175330 80246A50 08091ABB */ j .L80246AEC
/* 175334 80246A54 AC620000 */ sw $v0, 0x0($v1)
.L80246A58:
/* 175338 80246A58 3C05800E */ lui $a1, %hi(gBattleStatus)
/* 17533C 80246A5C 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus)
glabel .L80246A60
/* 175340 80246A60 8CA20000 */ lw $v0, 0x0($a1)
/* 175344 80246A64 3C040400 */ lui $a0, (0x4000000 >> 16)
/* 175348 80246A68 00441024 */ and $v0, $v0, $a0
/* 17534C 80246A6C 10400006 */ beqz $v0, .L80246A88
D_80246A70:
/* 175350 80246A70 00000000 */ nop
/* 175354 80246A74 8262008B */ lb $v0, 0x8B($s3)
/* 175358 80246A78 9263008B */ lbu $v1, 0x8B($s3)
D_80246A7C:
/* 17535C 80246A7C 1040000E */ beqz $v0, .L80246AB8
/* 175360 80246A80 2462FFFF */ addiu $v0, $v1, -0x1
/* 175364 80246A84 A262008B */ sb $v0, 0x8B($s3)
.L80246A88:
/* 175368 80246A88 8262008B */ lb $v0, 0x8B($s3)
/* 17536C 80246A8C 5040000B */ beql $v0, $zero, .L80246ABC
/* 175370 80246A90 3C05FBFF */ lui $a1, (0xFBFFFFFF >> 16)
D_80246A94:
/* 175374 80246A94 8CA20000 */ lw $v0, 0x0($a1)
.L80246A98:
/* 175378 80246A98 00441024 */ and $v0, $v0, $a0
/* 17537C 80246A9C 10400006 */ beqz $v0, .L80246AB8
/* 175380 80246AA0 2404000C */ addiu $a0, $zero, 0xC
/* 175384 80246AA4 8CA20004 */ lw $v0, 0x4($a1)
/* 175388 80246AA8 2403FFFD */ addiu $v1, $zero, -0x3
/* 17538C 80246AAC 00431024 */ and $v0, $v0, $v1
/* 175390 80246AB0 08091ABB */ j .L80246AEC
/* 175394 80246AB4 ACA20004 */ sw $v0, 0x4($a1)
.L80246AB8:
/* 175398 80246AB8 3C05FBFF */ lui $a1, (0xFBFFFFFF >> 16)
glabel .L80246ABC
/* 17539C 80246ABC 34A5FFFF */ ori $a1, $a1, (0xFBFFFFFF & 0xFFFF)
/* 1753A0 80246AC0 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1753A4 80246AC4 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
glabel func_80246AC8
/* 1753A8 80246AC8 8C620000 */ lw $v0, 0x0($v1)
/* 1753AC 80246ACC 8C640004 */ lw $a0, 0x4($v1)
/* 1753B0 80246AD0 00451024 */ and $v0, $v0, $a1
/* 1753B4 80246AD4 30840040 */ andi $a0, $a0, 0x40
/* 1753B8 80246AD8 14800003 */ bnez $a0, .L80246AE8
/* 1753BC 80246ADC AC620000 */ sw $v0, 0x0($v1)
/* 1753C0 80246AE0 08091ABB */ j .L80246AEC
/* 1753C4 80246AE4 24040008 */ addiu $a0, $zero, 0x8
.L80246AE8:
/* 1753C8 80246AE8 24040009 */ addiu $a0, $zero, 0x9
.L80246AEC:
/* 1753CC 80246AEC 0C090464 */ jal func_80241190
/* 1753D0 80246AF0 00000000 */ nop
.L80246AF4:
/* 1753D4 80246AF4 8FBF0030 */ lw $ra, 0x30($sp)
.L80246AF8:
/* 1753D8 80246AF8 8FB7002C */ lw $s7, 0x2C($sp)
glabel .L80246AFC
/* 1753DC 80246AFC 8FB60028 */ lw $s6, 0x28($sp)
/* 1753E0 80246B00 8FB50024 */ lw $s5, 0x24($sp)
/* 1753E4 80246B04 8FB40020 */ lw $s4, 0x20($sp)
.L80246B08:
/* 1753E8 80246B08 8FB3001C */ lw $s3, 0x1C($sp)
/* 1753EC 80246B0C 8FB20018 */ lw $s2, 0x18($sp)
.L80246B10:
/* 1753F0 80246B10 8FB10014 */ lw $s1, 0x14($sp)
/* 1753F4 80246B14 8FB00010 */ lw $s0, 0x10($sp)
/* 1753F8 80246B18 D7B80048 */ ldc1 $f24, 0x48($sp)
/* 1753FC 80246B1C D7B60040 */ ldc1 $f22, 0x40($sp)
/* 175400 80246B20 D7B40038 */ ldc1 $f20, 0x38($sp)
/* 175404 80246B24 03E00008 */ jr $ra
/* 175408 80246B28 27BD0050 */ addiu $sp, $sp, 0x50
### DECOMPILED C INSTRUCTIONS:
void btl_state_update_end_player_turn(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor;
Actor* partner = battleStatus->partnerActor;
Evt* script;
if (gBattleSubState == BTL_SUBSTATE_END_PLAYER_TURN_CHECK_HAPPY) {
if (battleStatus->moveCategory == BTL_MENU_TYPE_ITEMS && battleStatus->itemUsesLeft >= 2) {
gBattleSubState = BTL_SUBSTATE_END_PLAYER_TURN_AWAIT_HAPPY;
} else if (
!(gBattleStatus.flags2 & BS_FLAGS2_HAS_DRAINED_HP)
&& !is_ability_active(ABILITY_HAPPY_HEART)
&& !is_ability_active(ABILITY_CRAZY_HEART)
&& !is_ability_active(ABILITY_HAPPY_FLOWER)
) {
gBattleSubState = BTL_SUBSTATE_END_PLAYER_TURN_AWAIT_HAPPY;
} else if (player->stoneStatus == STATUS_KEY_STONE || battleStatus->outtaSightActive) {
gBattleSubState = BTL_SUBSTATE_END_PLAYER_TURN_AWAIT_HAPPY;
} else {
s32 prevHPDrainCount = 0;
s32 hpRecovery = 0;
s32 fpRecovery = 0;
if (gBattleStatus.flags2 & BS_FLAGS2_HAS_DRAINED_HP) {
prevHPDrainCount = battleStatus->hpDrainCount;
battleStatus->hpDrainCount = 0;
}
if (rand_int(100) < 50) {
hpRecovery = is_ability_active(ABILITY_CRAZY_HEART) * 3;
}
if (rand_int(100) < 50) {
hpRecovery += is_ability_active(ABILITY_HAPPY_HEART);
}
if (rand_int(100) < 50) {
fpRecovery = is_ability_active(ABILITY_HAPPY_FLOWER);
}
if (prevHPDrainCount + hpRecovery + fpRecovery == 0) {
gBattleSubState = BTL_SUBSTATE_END_PLAYER_TURN_AWAIT_HAPPY;
} else {
battleStatus->battlePhase = PHASE_PLAYER_HAPPY;
script = start_script(&EVS_Mario_HandlePhase, EVT_PRIORITY_A, 0);
player->takeTurnScript = script;
player->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PLAYER;
if (gBattleStatus.flags2 & BS_FLAGS2_HAS_DRAINED_HP) {
script->varTable[10] += battleStatus->hpDrainCount;
battleStatus->hpDrainCount = 0;
}
script->varTable[10] = prevHPDrainCount;
script->varTable[11] = hpRecovery;
script->varTable[12] = fpRecovery;
if (script->varTable[10] > 99) {
script->varTable[10] = 99;
}
if (script->varTable[11] > 99) {
script->varTable[11] = 99;
}
if (script->varTable[12] > 99) {
script->varTable[12] = 99;
}
gBattleStatus.flags2 &= ~BS_FLAGS2_HAS_DRAINED_HP;
gBattleSubState = BTL_SUBSTATE_END_PLAYER_TURN_AWAIT_HAPPY;
}
}
}
switch (gBattleSubState) {
case BTL_SUBSTATE_END_PLAYER_TURN_AWAIT_HAPPY:
if (player->takeTurnScript != NULL && does_script_exist(player->takeTurnScriptID)) {
break;
}
player->takeTurnScript = NULL;
if (!(gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) || (gBattleStatus.flags1 & BS_FLAGS1_PLAYER_IN_BACK)) {
gBattleSubState = BTL_SUBSTATE_END_PLAYER_TURN_DONE;
} else {
player->state.currentPos.x = player->homePos.x;
player->state.currentPos.z = player->homePos.z;
player->state.goalPos.x = partner->homePos.x;
player->state.goalPos.z = partner->homePos.z;
player->state.moveTime = 4;
player->state.angle = 0.0f;
gBattleSubState = BTL_SUBSTATE_END_PLAYER_TURN_AWAIT_SWAP;
}
break;
}
if (gBattleSubState == BTL_SUBSTATE_END_PLAYER_TURN_AWAIT_SWAP) {
if (player->state.moveTime != 0) {
player->currentPos.x += (player->state.goalPos.x - player->currentPos.x) / player->state.moveTime;
player->currentPos.z += (player->state.goalPos.z - player->currentPos.z) / player->state.moveTime;
partner->currentPos.x += (player->state.currentPos.x - partner->currentPos.x) / player->state.moveTime;
partner->currentPos.z += (player->state.currentPos.z - partner->currentPos.z) / player->state.moveTime;
}
player->currentPos.z += sin_rad((player->state.angle * TAU) / 360.0f) * 16.0f;
player->yaw = clamp_angle(-player->state.angle);
partner->currentPos.z -= sin_rad((player->state.angle * TAU) / 360.0f) * 16.0f;
partner->yaw = clamp_angle(-player->state.angle);
player->state.angle += 90.0f;
if (player->state.moveTime != 0) {
player->state.moveTime--;
} else {
player->currentPos.x = player->state.goalPos.x;
player->currentPos.z = player->state.goalPos.z;
partner->currentPos.x = player->state.currentPos.x;
partner->currentPos.z = player->state.currentPos.z;
player->homePos.x = player->currentPos.x;
player->homePos.z = player->currentPos.z;
partner->homePos.x = partner->currentPos.x;
partner->homePos.z = partner->currentPos.z;
gBattleStatus.flags1 |= BS_FLAGS1_PLAYER_IN_BACK;
gBattleSubState = BTL_SUBSTATE_END_PLAYER_TURN_DONE;
}
}
if (gBattleSubState == BTL_SUBSTATE_END_PLAYER_TURN_DONE) {
if(!btl_check_enemies_defeated()) {
if (battleStatus->moveCategory == BTL_MENU_TYPE_ITEMS && battleStatus->itemUsesLeft >= 2) {
btl_cam_use_preset(BTL_CAM_DEFAULT);
btl_cam_move(10);
gBattleStatus.flags2 &= ~BS_FLAGS2_2;
} else {
gBattleStatus.flags2 |= BS_FLAGS2_2;
}
if (battleStatus->unk_94 < 0) {
battleStatus->unk_94 = 0;
battleStatus->itemUsesLeft = 0;
btl_set_state(BATTLE_STATE_END_TURN);
return;
}
if (battleStatus->itemUsesLeft != 0) {
battleStatus->itemUsesLeft--;
if (battleStatus->itemUsesLeft != 0) {
// double or triple dip has not run out yet, let the player choose another item
btl_set_state(BATTLE_STATE_PREPARE_MENU);
gBattleSubState = BATTLE_SUBSTATE_PREPARE_MENU_DIPPING;
return;
}
if (gBattleStatus.flags1 & BS_FLAGS1_HUSTLED) {
if (battleStatus->hustleTurns != 0) {
battleStatus->hustleTurns--;
}
}
if (battleStatus->hustleTurns != 0 && (gBattleStatus.flags1 & BS_FLAGS1_HUSTLED)) {
gBattleStatus.flags2 &= ~BS_FLAGS2_2;
btl_set_state(BATTLE_STATE_PREPARE_MENU);
return;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_HUSTLED;
btl_set_state(BATTLE_STATE_BEGIN_PARTNER_TURN);
return;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_HUSTLED) {
if (battleStatus->hustleTurns != 0) {
battleStatus->hustleTurns--;
}
}
if (battleStatus->hustleTurns != 0 && (gBattleStatus.flags1 & BS_FLAGS1_HUSTLED)) {
gBattleStatus.flags2 &= ~BS_FLAGS2_2;
btl_set_state(BATTLE_STATE_PREPARE_MENU);
} else {
gBattleStatus.flags1 &= ~BS_FLAGS2_HAS_DRAINED_HP;
if (!(gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE)) {
btl_set_state(BATTLE_STATE_BEGIN_PARTNER_TURN);
} else {
btl_set_state(BATTLE_STATE_9);
}
}
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel shape_spell_appendGfx
/* 3396A4 E0024454 27BDFF18 */ addiu $sp, $sp, -0xE8
/* 3396A8 E0024458 3C07DB06 */ lui $a3, (0xDB060024 >> 16)
/* 3396AC E002445C 3C05800A */ lui $a1, %hi(gMainGfxPos)
/* 3396B0 E0024460 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos)
/* 3396B4 E0024464 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF)
/* 3396B8 E0024468 AFBF00B4 */ sw $ra, 0xB4($sp)
/* 3396BC E002446C AFBE00B0 */ sw $fp, 0xB0($sp)
/* 3396C0 E0024470 AFB700AC */ sw $s7, 0xAC($sp)
/* 3396C4 E0024474 AFB600A8 */ sw $s6, 0xA8($sp)
/* 3396C8 E0024478 AFB500A4 */ sw $s5, 0xA4($sp)
/* 3396CC E002447C AFB400A0 */ sw $s4, 0xA0($sp)
/* 3396D0 E0024480 AFB3009C */ sw $s3, 0x9C($sp)
/* 3396D4 E0024484 AFB20098 */ sw $s2, 0x98($sp)
/* 3396D8 E0024488 AFB10094 */ sw $s1, 0x94($sp)
/* 3396DC E002448C AFB00090 */ sw $s0, 0x90($sp)
/* 3396E0 E0024490 F7BE00E0 */ sdc1 $f30, 0xE0($sp)
/* 3396E4 E0024494 F7BC00D8 */ sdc1 $f28, 0xD8($sp)
/* 3396E8 E0024498 F7BA00D0 */ sdc1 $f26, 0xD0($sp)
/* 3396EC E002449C F7B800C8 */ sdc1 $f24, 0xC8($sp)
/* 3396F0 E00244A0 F7B600C0 */ sdc1 $f22, 0xC0($sp)
/* 3396F4 E00244A4 F7B400B8 */ sdc1 $f20, 0xB8($sp)
/* 3396F8 E00244A8 8CA30000 */ lw $v1, 0x0($a1)
/* 3396FC E00244AC 8C96000C */ lw $s6, 0xC($a0)
/* 339700 E00244B0 0060302D */ daddu $a2, $v1, $zero
/* 339704 E00244B4 24630008 */ addiu $v1, $v1, 0x8
/* 339708 E00244B8 ACA30000 */ sw $v1, 0x0($a1)
/* 33970C E00244BC C6C40028 */ lwc1 $f4, 0x28($s6)
/* 339710 E00244C0 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* 339714 E00244C4 E7A4007C */ swc1 $f4, 0x7C($sp)
/* 339718 E00244C8 ACC20000 */ sw $v0, 0x0($a2)
/* 33971C E00244CC 24620008 */ addiu $v0, $v1, 0x8
/* 339720 E00244D0 ACC00004 */ sw $zero, 0x4($a2)
/* 339724 E00244D4 ACA20000 */ sw $v0, 0x0($a1)
/* 339728 E00244D8 AC670000 */ sw $a3, 0x0($v1)
/* 33972C E00244DC 24670010 */ addiu $a3, $v1, 0x10
/* 339730 E00244E0 ACA70000 */ sw $a3, 0x0($a1)
/* 339734 E00244E4 8C820010 */ lw $v0, 0x10($a0)
/* 339738 E00244E8 24660018 */ addiu $a2, $v1, 0x18
/* 33973C E00244EC ACA60000 */ sw $a2, 0x0($a1)
/* 339740 E00244F0 8C44001C */ lw $a0, 0x1C($v0)
/* 339744 E00244F4 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* 339748 E00244F8 AC620008 */ sw $v0, 0x8($v1)
/* 33974C E00244FC 3C020900 */ lui $v0, %hi(D_09001080_40E310)
/* 339750 E0024500 24421080 */ addiu $v0, $v0, %lo(D_09001080_40E310)
/* 339754 E0024504 AC62000C */ sw $v0, 0xC($v1)
/* 339758 E0024508 3C028000 */ lui $v0, (0x80000000 >> 16)
/* 33975C E002450C 00822021 */ addu $a0, $a0, $v0
/* 339760 E0024510 AC640004 */ sw $a0, 0x4($v1)
/* 339764 E0024514 8EC80034 */ lw $t0, 0x34($s6)
/* 339768 E0024518 AFA80080 */ sw $t0, 0x80($sp)
/* 33976C E002451C C6C40014 */ lwc1 $f4, 0x14($s6)
/* 339770 E0024520 C6DA0010 */ lwc1 $f26, 0x10($s6)
/* 339774 E0024524 E7A40084 */ swc1 $f4, 0x84($sp)
/* 339778 E0024528 C6C40018 */ lwc1 $f4, 0x18($s6)
/* 33977C E002452C AFA70078 */ sw $a3, 0x78($sp)
/* 339780 E0024530 AFA60074 */ sw $a2, 0x74($sp)
/* 339784 E0024534 E7A40088 */ swc1 $f4, 0x88($sp)
/* 339788 E0024538 8EC80000 */ lw $t0, 0x0($s6)
/* 33978C E002453C AFA80070 */ sw $t0, 0x70($sp)
/* 339790 E0024540 8EC30030 */ lw $v1, 0x30($s6)
/* 339794 E0024544 15000018 */ bnez $t0, .LE00245A8
/* 339798 E0024548 00031040 */ sll $v0, $v1, 1
/* 33979C E002454C 000310C0 */ sll $v0, $v1, 3
/* 3397A0 E0024550 00431021 */ addu $v0, $v0, $v1
/* 3397A4 E0024554 00021080 */ sll $v0, $v0, 2
/* 3397A8 E0024558 00431023 */ subu $v0, $v0, $v1
/* 3397AC E002455C 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 3397B0 E0024560 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 3397B4 E0024564 4482B000 */ mtc1 $v0, $f22
/* 3397B8 E0024568 00000000 */ nop
/* 3397BC E002456C 4680B5A0 */ cvt.s.w $f22, $f22
/* 3397C0 E0024570 00031080 */ sll $v0, $v1, 2
/* 3397C4 E0024574 00431021 */ addu $v0, $v0, $v1
/* 3397C8 E0024578 00021080 */ sll $v0, $v0, 2
/* 3397CC E002457C 00431023 */ subu $v0, $v0, $v1
/* 3397D0 E0024580 000218C0 */ sll $v1, $v0, 3
/* 3397D4 E0024584 00431021 */ addu $v0, $v0, $v1
/* 3397D8 E0024588 000210C0 */ sll $v0, $v0, 3
/* 3397DC E002458C 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* 3397E0 E0024590 00220821 */ addu $at, $at, $v0
/* 3397E4 E0024594 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at)
/* 3397E8 E0024598 3C014110 */ lui $at, (0x41100000 >> 16)
/* 3397EC E002459C 4481C000 */ mtc1 $at, $f24
/* 3397F0 E00245A0 08009176 */ j .LE00245D8
/* 3397F4 E00245A4 46000787 */ neg.s $f30, $f0
.LE00245A8:
/* 3397F8 E00245A8 00431021 */ addu $v0, $v0, $v1
/* 3397FC E00245AC 000210C0 */ sll $v0, $v0, 3
/* 339800 E00245B0 00431021 */ addu $v0, $v0, $v1
/* 339804 E00245B4 4482B000 */ mtc1 $v0, $f22
/* 339808 E00245B8 00000000 */ nop
/* 33980C E00245BC 4680B5A0 */ cvt.s.w $f22, $f22
/* 339810 E00245C0 C7A4007C */ lwc1 $f4, 0x7C($sp)
/* 339814 E00245C4 3C0140C0 */ lui $at, (0x40C00000 >> 16)
/* 339818 E00245C8 4481C000 */ mtc1 $at, $f24
/* 33981C E00245CC 4480F000 */ mtc1 $zero, $f30
/* 339820 E00245D0 4604D682 */ mul.s $f26, $f26, $f4
/* 339824 E00245D4 00000000 */ nop
.LE00245D8:
/* 339828 E00245D8 0000B82D */ daddu $s7, $zero, $zero
/* 33982C E00245DC 3C1E8007 */ lui $fp, %hi(gMatrixListPos)
/* 339830 E00245E0 27DE41F0 */ addiu $fp, $fp, %lo(gMatrixListPos)
/* 339834 E00245E4 3C080001 */ lui $t0, (0x11630 >> 16)
/* 339838 E00245E8 35081630 */ ori $t0, $t0, (0x11630 & 0xFFFF)
/* 33983C E00245EC 4480E000 */ mtc1 $zero, $f28
/* 339840 E00245F0 3C15800A */ lui $s5, %hi(gMainGfxPos)
/* 339844 E00245F4 26B5A66C */ addiu $s5, $s5, %lo(gMainGfxPos)
/* 339848 E00245F8 AFA8008C */ sw $t0, 0x8C($sp)
.LE00245FC:
/* 33984C E00245FC 1AE00033 */ blez $s7, .LE00246CC
/* 339850 E0024600 00000000 */ nop
/* 339854 E0024604 8FA80070 */ lw $t0, 0x70($sp)
/* 339858 E0024608 15000013 */ bnez $t0, .LE0024658
/* 33985C E002460C 00000000 */ nop
/* 339860 E0024610 3C01428C */ lui $at, (0x428C0000 >> 16)
/* 339864 E0024614 44810000 */ mtc1 $at, $f0
/* 339868 E0024618 00000000 */ nop
/* 33986C E002461C 4600B581 */ sub.s $f22, $f22, $f0
/* 339870 E0024620 C6C0001C */ lwc1 $f0, 0x1C($s6)
/* 339874 E0024624 46000000 */ add.s $f0, $f0, $f0
/* 339878 E0024628 4600D681 */ sub.s $f26, $f26, $f0
/* 33987C E002462C C6C00020 */ lwc1 $f0, 0x20($s6)
/* 339880 E0024630 46000000 */ add.s $f0, $f0, $f0
/* 339884 E0024634 C7A40084 */ lwc1 $f4, 0x84($sp)
/* 339888 E0024638 46002101 */ sub.s $f4, $f4, $f0
/* 33988C E002463C E7A40084 */ swc1 $f4, 0x84($sp)
/* 339890 E0024640 C6C00024 */ lwc1 $f0, 0x24($s6)
/* 339894 E0024644 46000000 */ add.s $f0, $f0, $f0
/* 339898 E0024648 C7A40088 */ lwc1 $f4, 0x88($sp)
/* 33989C E002464C 46002101 */ sub.s $f4, $f4, $f0
/* 3398A0 E0024650 080091A4 */ j .LE0024690
/* 3398A4 E0024654 E7A40088 */ swc1 $f4, 0x88($sp)
.LE0024658:
/* 3398A8 E0024658 C6C0001C */ lwc1 $f0, 0x1C($s6)
/* 3398AC E002465C 3C01E002 */ lui $at, (0xE0024D00 >> 16)
/* 3398B0 E0024660 D4224D00 */ ldc1 $f2, (0xE0024D00 & 0xFFFF)($at)
/* 3398B4 E0024664 46000021 */ cvt.d.s $f0, $f0
/* 3398B8 E0024668 46220002 */ mul.d $f0, $f0, $f2
/* 3398BC E002466C 00000000 */ nop
/* 3398C0 E0024670 46200000 */ add.d $f0, $f0, $f0
/* 3398C4 E0024674 4600D0A1 */ cvt.d.s $f2, $f26
/* 3398C8 E0024678 46201081 */ sub.d $f2, $f2, $f0
/* 3398CC E002467C 3C014248 */ lui $at, (0x42480000 >> 16)
/* 3398D0 E0024680 44810000 */ mtc1 $at, $f0
/* 3398D4 E0024684 00000000 */ nop
/* 3398D8 E0024688 4600B581 */ sub.s $f22, $f22, $f0
/* 3398DC E002468C 462016A0 */ cvt.s.d $f26, $f2
.LE0024690:
/* 3398E0 E0024690 3C048080 */ lui $a0, (0x80808081 >> 16)
/* 3398E4 E0024694 8EC30034 */ lw $v1, 0x34($s6)
/* 3398E8 E0024698 34848081 */ ori $a0, $a0, (0x80808081 & 0xFFFF)
/* 3398EC E002469C 00031040 */ sll $v0, $v1, 1
/* 3398F0 E00246A0 00431021 */ addu $v0, $v0, $v1
/* 3398F4 E00246A4 000210C0 */ sll $v0, $v0, 3
/* 3398F8 E00246A8 00431021 */ addu $v0, $v0, $v1
/* 3398FC E00246AC 00021080 */ sll $v0, $v0, 2
/* 339900 E00246B0 00440018 */ mult $v0, $a0
/* 339904 E00246B4 00004010 */ mfhi $t0
/* 339908 E00246B8 01021821 */ addu $v1, $t0, $v0
/* 33990C E00246BC 000319C3 */ sra $v1, $v1, 7
/* 339910 E00246C0 000217C3 */ sra $v0, $v0, 31
/* 339914 E00246C4 00621823 */ subu $v1, $v1, $v0
/* 339918 E00246C8 AFA30080 */ sw $v1, 0x80($sp)
.LE00246CC:
/* 33991C E00246CC C7A4007C */ lwc1 $f4, 0x7C($sp)
/* 339920 E00246D0 4405E000 */ mfc1 $a1, $f28
/* 339924 E00246D4 4406F000 */ mfc1 $a2, $f30
/* 339928 E00246D8 4407E000 */ mfc1 $a3, $f28
/* 33992C E00246DC E7A40010 */ swc1 $f4, 0x10($sp)
/* 339930 E00246E0 C7A40084 */ lwc1 $f4, 0x84($sp)
/* 339934 E00246E4 E7A40018 */ swc1 $f4, 0x18($sp)
/* 339938 E00246E8 C7A40088 */ lwc1 $f4, 0x88($sp)
/* 33993C E00246EC 27A40020 */ addiu $a0, $sp, 0x20
/* 339940 E00246F0 E7BA0014 */ swc1 $f26, 0x14($sp)
/* 339944 E00246F4 0C080180 */ jal shim_guPositionF
/* 339948 E00246F8 E7A4001C */ swc1 $f4, 0x1C($sp)
/* 33994C E00246FC 27A40020 */ addiu $a0, $sp, 0x20
/* 339950 E0024700 97C50000 */ lhu $a1, 0x0($fp)
/* 339954 E0024704 3C02800A */ lui $v0, %hi(gDisplayContext)
/* 339958 E0024708 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0)
/* 33995C E002470C 8FA8008C */ lw $t0, 0x8C($sp)
/* 339960 E0024710 00052980 */ sll $a1, $a1, 6
/* 339964 E0024714 00A82821 */ addu $a1, $a1, $t0
/* 339968 E0024718 0C080118 */ jal shim_guMtxF2L
/* 33996C E002471C 00452821 */ addu $a1, $v0, $a1
/* 339970 E0024720 8EA20000 */ lw $v0, 0x0($s5)
/* 339974 E0024724 4600B306 */ mov.s $f12, $f22
/* 339978 E0024728 0040202D */ daddu $a0, $v0, $zero
/* 33997C E002472C 24420008 */ addiu $v0, $v0, 0x8
/* 339980 E0024730 AEA20000 */ sw $v0, 0x0($s5)
/* 339984 E0024734 97C20000 */ lhu $v0, 0x0($fp)
/* 339988 E0024738 3C03DA38 */ lui $v1, (0xDA380000 >> 16)
/* 33998C E002473C AC830000 */ sw $v1, 0x0($a0)
/* 339990 E0024740 24430001 */ addiu $v1, $v0, 0x1
/* 339994 E0024744 3042FFFF */ andi $v0, $v0, 0xFFFF
/* 339998 E0024748 00021180 */ sll $v0, $v0, 6
/* 33999C E002474C A7C30000 */ sh $v1, 0x0($fp)
/* 3399A0 E0024750 8FA8008C */ lw $t0, 0x8C($sp)
/* 3399A4 E0024754 3C03800A */ lui $v1, %hi(gDisplayContext)
/* 3399A8 E0024758 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* 3399AC E002475C 00481021 */ addu $v0, $v0, $t0
/* 3399B0 E0024760 00621821 */ addu $v1, $v1, $v0
/* 3399B4 E0024764 0C080140 */ jal shim_sin_deg
/* 3399B8 E0024768 AC830004 */ sw $v1, 0x4($a0)
/* 3399BC E002476C 46180502 */ mul.s $f20, $f0, $f24
/* 3399C0 E0024770 00000000 */ nop
/* 3399C4 E0024774 0C080144 */ jal shim_cos_deg
/* 3399C8 E0024778 4600B306 */ mov.s $f12, $f22
/* 3399CC E002477C 46180002 */ mul.s $f0, $f0, $f24
/* 3399D0 E0024780 00000000 */ nop
/* 3399D4 E0024784 27A40020 */ addiu $a0, $sp, 0x20
/* 3399D8 E0024788 4407E000 */ mfc1 $a3, $f28
/* 3399DC E002478C 3C0142F0 */ lui $at, (0x42F00000 >> 16)
/* 3399E0 E0024790 44812000 */ mtc1 $at, $f4
/* 3399E4 E0024794 44060000 */ mfc1 $a2, $f0
/* 3399E8 E0024798 4405A000 */ mfc1 $a1, $f20
/* 3399EC E002479C 0C080108 */ jal shim_guTranslateF
/* 3399F0 E00247A0 4604B580 */ add.s $f22, $f22, $f4
/* 3399F4 E00247A4 27A40020 */ addiu $a0, $sp, 0x20
/* 3399F8 E00247A8 97C30000 */ lhu $v1, 0x0($fp)
/* 3399FC E00247AC 3C05800A */ lui $a1, %hi(gDisplayContext)
/* 339A00 E00247B0 8CA5A674 */ lw $a1, %lo(gDisplayContext)($a1)
/* 339A04 E00247B4 8FA8008C */ lw $t0, 0x8C($sp)
/* 339A08 E00247B8 3062FFFF */ andi $v0, $v1, 0xFFFF
/* 339A0C E00247BC 00021180 */ sll $v0, $v0, 6
/* 339A10 E00247C0 00481021 */ addu $v0, $v0, $t0
/* 339A14 E00247C4 00A22821 */ addu $a1, $a1, $v0
/* 339A18 E00247C8 24630001 */ addiu $v1, $v1, 0x1
/* 339A1C E00247CC A7C30000 */ sh $v1, 0x0($fp)
/* 339A20 E00247D0 0C080118 */ jal shim_guMtxF2L
/* 339A24 E00247D4 AFA50060 */ sw $a1, 0x60($sp)
/* 339A28 E00247D8 0C080140 */ jal shim_sin_deg
/* 339A2C E00247DC 4600B306 */ mov.s $f12, $f22
/* 339A30 E00247E0 46180502 */ mul.s $f20, $f0, $f24
/* 339A34 E00247E4 00000000 */ nop
/* 339A38 E00247E8 0C080144 */ jal shim_cos_deg
/* 339A3C E00247EC 4600B306 */ mov.s $f12, $f22
/* 339A40 E00247F0 46180002 */ mul.s $f0, $f0, $f24
/* 339A44 E00247F4 00000000 */ nop
/* 339A48 E00247F8 27A40020 */ addiu $a0, $sp, 0x20
/* 339A4C E00247FC 4407E000 */ mfc1 $a3, $f28
/* 339A50 E0024800 3C0142F0 */ lui $at, (0x42F00000 >> 16)
/* 339A54 E0024804 44812000 */ mtc1 $at, $f4
/* 339A58 E0024808 44060000 */ mfc1 $a2, $f0
/* 339A5C E002480C 4405A000 */ mfc1 $a1, $f20
/* 339A60 E0024810 0C080108 */ jal shim_guTranslateF
/* 339A64 E0024814 4604B580 */ add.s $f22, $f22, $f4
/* 339A68 E0024818 27A40020 */ addiu $a0, $sp, 0x20
/* 339A6C E002481C 97C30000 */ lhu $v1, 0x0($fp)
/* 339A70 E0024820 3C05800A */ lui $a1, %hi(gDisplayContext)
/* 339A74 E0024824 8CA5A674 */ lw $a1, %lo(gDisplayContext)($a1)
/* 339A78 E0024828 8FA8008C */ lw $t0, 0x8C($sp)
/* 339A7C E002482C 3062FFFF */ andi $v0, $v1, 0xFFFF
/* 339A80 E0024830 00021180 */ sll $v0, $v0, 6
/* 339A84 E0024834 00481021 */ addu $v0, $v0, $t0
/* 339A88 E0024838 00A22821 */ addu $a1, $a1, $v0
/* 339A8C E002483C 24630001 */ addiu $v1, $v1, 0x1
/* 339A90 E0024840 A7C30000 */ sh $v1, 0x0($fp)
/* 339A94 E0024844 0C080118 */ jal shim_guMtxF2L
/* 339A98 E0024848 AFA50064 */ sw $a1, 0x64($sp)
/* 339A9C E002484C 0C080140 */ jal shim_sin_deg
/* 339AA0 E0024850 4600B306 */ mov.s $f12, $f22
/* 339AA4 E0024854 46180502 */ mul.s $f20, $f0, $f24
/* 339AA8 E0024858 00000000 */ nop
/* 339AAC E002485C 0C080144 */ jal shim_cos_deg
/* 339AB0 E0024860 4600B306 */ mov.s $f12, $f22
/* 339AB4 E0024864 46180002 */ mul.s $f0, $f0, $f24
/* 339AB8 E0024868 00000000 */ nop
/* 339ABC E002486C 0000A02D */ daddu $s4, $zero, $zero
/* 339AC0 E0024870 3C13E002 */ lui $s3, %hi(D_E0024CC0)
/* 339AC4 E0024874 26734CC0 */ addiu $s3, $s3, %lo(D_E0024CC0)
/* 339AC8 E0024878 4407E000 */ mfc1 $a3, $f28
/* 339ACC E002487C 44060000 */ mfc1 $a2, $f0
/* 339AD0 E0024880 4405A000 */ mfc1 $a1, $f20
/* 339AD4 E0024884 0C080108 */ jal shim_guTranslateF
/* 339AD8 E0024888 27A40020 */ addiu $a0, $sp, 0x20
/* 339ADC E002488C 27A40020 */ addiu $a0, $sp, 0x20
/* 339AE0 E0024890 97C30000 */ lhu $v1, 0x0($fp)
/* 339AE4 E0024894 3C05800A */ lui $a1, %hi(gDisplayContext)
/* 339AE8 E0024898 8CA5A674 */ lw $a1, %lo(gDisplayContext)($a1)
/* 339AEC E002489C 8FA8008C */ lw $t0, 0x8C($sp)
/* 339AF0 E00248A0 3062FFFF */ andi $v0, $v1, 0xFFFF
/* 339AF4 E00248A4 00021180 */ sll $v0, $v0, 6
/* 339AF8 E00248A8 00481021 */ addu $v0, $v0, $t0
/* 339AFC E00248AC 00A22821 */ addu $a1, $a1, $v0
/* 339B00 E00248B0 24630001 */ addiu $v1, $v1, 0x1
/* 339B04 E00248B4 A7C30000 */ sh $v1, 0x0($fp)
/* 339B08 E00248B8 0C080118 */ jal shim_guMtxF2L
/* 339B0C E00248BC AFA50068 */ sw $a1, 0x68($sp)
.LE00248C0:
/* 339B10 E00248C0 8EB20000 */ lw $s2, 0x0($s5)
/* 339B14 E00248C4 3C02DA38 */ lui $v0, (0xDA380000 >> 16)
/* 339B18 E00248C8 0240202D */ daddu $a0, $s2, $zero
/* 339B1C E00248CC 26520008 */ addiu $s2, $s2, 0x8
/* 339B20 E00248D0 AEB20000 */ sw $s2, 0x0($s5)
/* 339B24 E00248D4 AC820000 */ sw $v0, 0x0($a0)
/* 339B28 E00248D8 00141080 */ sll $v0, $s4, 2
/* 339B2C E00248DC 03A21021 */ addu $v0, $sp, $v0
/* 339B30 E00248E0 8C430060 */ lw $v1, 0x60($v0)
/* 339B34 E00248E4 26420008 */ addiu $v0, $s2, 0x8
/* 339B38 E00248E8 AEA20000 */ sw $v0, 0x0($s5)
/* 339B3C E00248EC 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* 339B40 E00248F0 AC830004 */ sw $v1, 0x4($a0)
/* 339B44 E00248F4 AE420000 */ sw $v0, 0x0($s2)
/* 339B48 E00248F8 92640001 */ lbu $a0, 0x1($s3)
/* 339B4C E00248FC 0C0090EF */ jal func_E00243BC
/* 339B50 E0024900 92650000 */ lbu $a1, 0x0($s3)
/* 339B54 E0024904 92640002 */ lbu $a0, 0x2($s3)
/* 339B58 E0024908 92650000 */ lbu $a1, 0x0($s3)
/* 339B5C E002490C 0C0090EF */ jal func_E00243BC
/* 339B60 E0024910 0040882D */ daddu $s1, $v0, $zero
/* 339B64 E0024914 92640003 */ lbu $a0, 0x3($s3)
/* 339B68 E0024918 92650000 */ lbu $a1, 0x0($s3)
/* 339B6C E002491C 0C0090EF */ jal func_E00243BC
/* 339B70 E0024920 0040802D */ daddu $s0, $v0, $zero
/* 339B74 E0024924 00118E00 */ sll $s1, $s1, 24
/* 339B78 E0024928 321000FF */ andi $s0, $s0, 0xFF
/* 339B7C E002492C 00108400 */ sll $s0, $s0, 16
/* 339B80 E0024930 02308825 */ or $s1, $s1, $s0
/* 339B84 E0024934 304200FF */ andi $v0, $v0, 0xFF
/* 339B88 E0024938 00021200 */ sll $v0, $v0, 8
/* 339B8C E002493C 02228825 */ or $s1, $s1, $v0
/* 339B90 E0024940 8FA80080 */ lw $t0, 0x80($sp)
/* 339B94 E0024944 8EA30000 */ lw $v1, 0x0($s5)
/* 339B98 E0024948 310200FF */ andi $v0, $t0, 0xFF
/* 339B9C E002494C 02228825 */ or $s1, $s1, $v0
/* 339BA0 E0024950 AE510004 */ sw $s1, 0x4($s2)
/* 339BA4 E0024954 0060902D */ daddu $s2, $v1, $zero
/* 339BA8 E0024958 24630008 */ addiu $v1, $v1, 0x8
/* 339BAC E002495C 3C02FB00 */ lui $v0, (0xFB000000 >> 16)
/* 339BB0 E0024960 AEA30000 */ sw $v1, 0x0($s5)
/* 339BB4 E0024964 AE420000 */ sw $v0, 0x0($s2)
/* 339BB8 E0024968 92640001 */ lbu $a0, 0x1($s3)
/* 339BBC E002496C 0C0090C9 */ jal func_E0024324
/* 339BC0 E0024970 92650000 */ lbu $a1, 0x0($s3)
/* 339BC4 E0024974 92640002 */ lbu $a0, 0x2($s3)
/* 339BC8 E0024978 92650000 */ lbu $a1, 0x0($s3)
/* 339BCC E002497C 0C0090C9 */ jal func_E0024324
/* 339BD0 E0024980 0040882D */ daddu $s1, $v0, $zero
/* 339BD4 E0024984 92640003 */ lbu $a0, 0x3($s3)
/* 339BD8 E0024988 92650000 */ lbu $a1, 0x0($s3)
/* 339BDC E002498C 0C0090C9 */ jal func_E0024324
/* 339BE0 E0024990 0040802D */ daddu $s0, $v0, $zero
/* 339BE4 E0024994 00118E00 */ sll $s1, $s1, 24
/* 339BE8 E0024998 321000FF */ andi $s0, $s0, 0xFF
/* 339BEC E002499C 00108400 */ sll $s0, $s0, 16
/* 339BF0 E00249A0 02308825 */ or $s1, $s1, $s0
/* 339BF4 E00249A4 304200FF */ andi $v0, $v0, 0xFF
/* 339BF8 E00249A8 00021200 */ sll $v0, $v0, 8
/* 339BFC E00249AC 02228825 */ or $s1, $s1, $v0
/* 339C00 E00249B0 363100FF */ ori $s1, $s1, 0xFF
/* 339C04 E00249B4 8EA40000 */ lw $a0, 0x0($s5)
/* 339C08 E00249B8 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* 339C0C E00249BC AE510004 */ sw $s1, 0x4($s2)
/* 339C10 E00249C0 0080182D */ daddu $v1, $a0, $zero
/* 339C14 E00249C4 24840008 */ addiu $a0, $a0, 0x8
/* 339C18 E00249C8 AEA40000 */ sw $a0, 0x0($s5)
/* 339C1C E00249CC AC620000 */ sw $v0, 0x0($v1)
/* 339C20 E00249D0 8FA80070 */ lw $t0, 0x70($sp)
/* 339C24 E00249D4 15000004 */ bnez $t0, .LE00249E8
/* 339C28 E00249D8 24630004 */ addiu $v1, $v1, 0x4
/* 339C2C E00249DC 8E640004 */ lw $a0, 0x4($s3)
/* 339C30 E00249E0 0800927C */ j .LE00249F0
/* 339C34 E00249E4 3C05D838 */ lui $a1, (0xD8380002 >> 16)
.LE00249E8:
/* 339C38 E00249E8 8E640008 */ lw $a0, 0x8($s3)
/* 339C3C E00249EC 3C05D838 */ lui $a1, (0xD8380002 >> 16)
.LE00249F0:
/* 339C40 E00249F0 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF)
/* 339C44 E00249F4 2673000C */ addiu $s3, $s3, 0xC
/* 339C48 E00249F8 8EA20000 */ lw $v0, 0x0($s5)
/* 339C4C E00249FC 26940001 */ addiu $s4, $s4, 0x1
/* 339C50 E0024A00 AC640000 */ sw $a0, 0x0($v1)
/* 339C54 E0024A04 24040040 */ addiu $a0, $zero, 0x40
/* 339C58 E0024A08 0040182D */ daddu $v1, $v0, $zero
/* 339C5C E0024A0C 24420008 */ addiu $v0, $v0, 0x8
/* 339C60 E0024A10 AEA20000 */ sw $v0, 0x0($s5)
/* 339C64 E0024A14 2A820003 */ slti $v0, $s4, 0x3
/* 339C68 E0024A18 AC650000 */ sw $a1, 0x0($v1)
/* 339C6C E0024A1C 1440FFA8 */ bnez $v0, .LE00248C0
/* 339C70 E0024A20 AC640004 */ sw $a0, 0x4($v1)
/* 339C74 E0024A24 8EA20000 */ lw $v0, 0x0($s5)
/* 339C78 E0024A28 26F70001 */ addiu $s7, $s7, 0x1
/* 339C7C E0024A2C 0040182D */ daddu $v1, $v0, $zero
/* 339C80 E0024A30 24420008 */ addiu $v0, $v0, 0x8
/* 339C84 E0024A34 AEA20000 */ sw $v0, 0x0($s5)
/* 339C88 E0024A38 2AE20003 */ slti $v0, $s7, 0x3
/* 339C8C E0024A3C AC650000 */ sw $a1, 0x0($v1)
/* 339C90 E0024A40 1440FEEE */ bnez $v0, .LE00245FC
/* 339C94 E0024A44 AC640004 */ sw $a0, 0x4($v1)
/* 339C98 E0024A48 3C02800A */ lui $v0, %hi(gMainGfxPos)
/* 339C9C E0024A4C 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos)
/* 339CA0 E0024A50 8C430000 */ lw $v1, 0x0($v0)
/* 339CA4 E0024A54 0060202D */ daddu $a0, $v1, $zero
/* 339CA8 E0024A58 24630008 */ addiu $v1, $v1, 0x8
/* 339CAC E0024A5C AC430000 */ sw $v1, 0x0($v0)
/* 339CB0 E0024A60 3C02DF00 */ lui $v0, (0xDF000000 >> 16)
/* 339CB4 E0024A64 AC820000 */ sw $v0, 0x0($a0)
/* 339CB8 E0024A68 AC800004 */ sw $zero, 0x4($a0)
/* 339CBC E0024A6C 8FA80078 */ lw $t0, 0x78($sp)
/* 339CC0 E0024A70 3C02DE01 */ lui $v0, (0xDE010000 >> 16)
/* 339CC4 E0024A74 AD020000 */ sw $v0, 0x0($t0)
/* 339CC8 E0024A78 AD030004 */ sw $v1, 0x4($t0)
/* 339CCC E0024A7C 8FA80070 */ lw $t0, 0x70($sp)
/* 339CD0 E0024A80 15000004 */ bnez $t0, .LE0024A94
/* 339CD4 E0024A84 00000000 */ nop
/* 339CD8 E0024A88 4480F000 */ mtc1 $zero, $f30
/* 339CDC E0024A8C 080092B2 */ j .LE0024AC8
/* 339CE0 E0024A90 00000000 */ nop
.LE0024A94:
/* 339CE4 E0024A94 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 339CE8 E0024A98 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 339CEC E0024A9C 00031080 */ sll $v0, $v1, 2
/* 339CF0 E0024AA0 00431021 */ addu $v0, $v0, $v1
/* 339CF4 E0024AA4 00021080 */ sll $v0, $v0, 2
/* 339CF8 E0024AA8 00431023 */ subu $v0, $v0, $v1
/* 339CFC E0024AAC 000218C0 */ sll $v1, $v0, 3
/* 339D00 E0024AB0 00431021 */ addu $v0, $v0, $v1
/* 339D04 E0024AB4 000210C0 */ sll $v0, $v0, 3
/* 339D08 E0024AB8 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* 339D0C E0024ABC 00220821 */ addu $at, $at, $v0
/* 339D10 E0024AC0 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at)
/* 339D14 E0024AC4 46000787 */ neg.s $f30, $f0
.LE0024AC8:
/* 339D18 E0024AC8 4480A000 */ mtc1 $zero, $f20
/* 339D1C E0024ACC 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 339D20 E0024AD0 4481B000 */ mtc1 $at, $f22
/* 339D24 E0024AD4 4406F000 */ mfc1 $a2, $f30
/* 339D28 E0024AD8 4405A000 */ mfc1 $a1, $f20
/* 339D2C E0024ADC 4407A000 */ mfc1 $a3, $f20
/* 339D30 E0024AE0 E7B60010 */ swc1 $f22, 0x10($sp)
/* 339D34 E0024AE4 C6C00004 */ lwc1 $f0, 0x4($s6)
/* 339D38 E0024AE8 27A40020 */ addiu $a0, $sp, 0x20
/* 339D3C E0024AEC E7A00014 */ swc1 $f0, 0x14($sp)
/* 339D40 E0024AF0 C6C00008 */ lwc1 $f0, 0x8($s6)
/* 339D44 E0024AF4 3C100001 */ lui $s0, (0x11630 >> 16)
/* 339D48 E0024AF8 E7A00018 */ swc1 $f0, 0x18($sp)
/* 339D4C E0024AFC C6C0000C */ lwc1 $f0, 0xC($s6)
/* 339D50 E0024B00 36101630 */ ori $s0, $s0, (0x11630 & 0xFFFF)
/* 339D54 E0024B04 0C080180 */ jal shim_guPositionF
/* 339D58 E0024B08 E7A0001C */ swc1 $f0, 0x1C($sp)
/* 339D5C E0024B0C 27A40020 */ addiu $a0, $sp, 0x20
/* 339D60 E0024B10 3C118007 */ lui $s1, %hi(gMatrixListPos)
/* 339D64 E0024B14 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos)
/* 339D68 E0024B18 3C13800A */ lui $s3, %hi(gDisplayContext)
/* 339D6C E0024B1C 2673A674 */ addiu $s3, $s3, %lo(gDisplayContext)
/* 339D70 E0024B20 96250000 */ lhu $a1, 0x0($s1)
/* 339D74 E0024B24 8E620000 */ lw $v0, 0x0($s3)
/* 339D78 E0024B28 00052980 */ sll $a1, $a1, 6
/* 339D7C E0024B2C 00B02821 */ addu $a1, $a1, $s0
/* 339D80 E0024B30 0C080118 */ jal shim_guMtxF2L
/* 339D84 E0024B34 00452821 */ addu $a1, $v0, $a1
/* 339D88 E0024B38 3C12800A */ lui $s2, %hi(gMainGfxPos)
/* 339D8C E0024B3C 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos)
/* 339D90 E0024B40 8E450000 */ lw $a1, 0x0($s2)
/* 339D94 E0024B44 00A0202D */ daddu $a0, $a1, $zero
/* 339D98 E0024B48 24A50008 */ addiu $a1, $a1, 0x8
/* 339D9C E0024B4C AE450000 */ sw $a1, 0x0($s2)
/* 339DA0 E0024B50 96220000 */ lhu $v0, 0x0($s1)
/* 339DA4 E0024B54 3C03DA38 */ lui $v1, (0xDA380000 >> 16)
/* 339DA8 E0024B58 AC830000 */ sw $v1, 0x0($a0)
/* 339DAC E0024B5C 24430001 */ addiu $v1, $v0, 0x1
/* 339DB0 E0024B60 3042FFFF */ andi $v0, $v0, 0xFFFF
/* 339DB4 E0024B64 00021180 */ sll $v0, $v0, 6
/* 339DB8 E0024B68 A6230000 */ sh $v1, 0x0($s1)
/* 339DBC E0024B6C 8E630000 */ lw $v1, 0x0($s3)
/* 339DC0 E0024B70 00501021 */ addu $v0, $v0, $s0
/* 339DC4 E0024B74 00621821 */ addu $v1, $v1, $v0
/* 339DC8 E0024B78 AC830004 */ sw $v1, 0x4($a0)
/* 339DCC E0024B7C 8FA80070 */ lw $t0, 0x70($sp)
/* 339DD0 E0024B80 15000008 */ bnez $t0, .LE0024BA4
/* 339DD4 E0024B84 27A40020 */ addiu $a0, $sp, 0x20
/* 339DD8 E0024B88 24A20008 */ addiu $v0, $a1, 0x8
/* 339DDC E0024B8C AE420000 */ sw $v0, 0x0($s2)
/* 339DE0 E0024B90 3C02DE00 */ lui $v0, (0xDE000000 >> 16)
/* 339DE4 E0024B94 ACA20000 */ sw $v0, 0x0($a1)
/* 339DE8 E0024B98 8FA80074 */ lw $t0, 0x74($sp)
/* 339DEC E0024B9C 0800930C */ j .LE0024C30
/* 339DF0 E0024BA0 ACA80004 */ sw $t0, 0x4($a1)
.LE0024BA4:
/* 339DF4 E0024BA4 3C0541F0 */ lui $a1, (0x41F00000 >> 16)
/* 339DF8 E0024BA8 4406A000 */ mfc1 $a2, $f20
/* 339DFC E0024BAC 0000B82D */ daddu $s7, $zero, $zero
/* 339E00 E0024BB0 E7B60010 */ swc1 $f22, 0x10($sp)
/* 339E04 E0024BB4 0C080104 */ jal shim_guRotateF
/* 339E08 E0024BB8 00C0382D */ daddu $a3, $a2, $zero
/* 339E0C E0024BBC 27A40020 */ addiu $a0, $sp, 0x20
/* 339E10 E0024BC0 96220000 */ lhu $v0, 0x0($s1)
/* 339E14 E0024BC4 8E650000 */ lw $a1, 0x0($s3)
/* 339E18 E0024BC8 3043FFFF */ andi $v1, $v0, 0xFFFF
/* 339E1C E0024BCC 00031980 */ sll $v1, $v1, 6
/* 339E20 E0024BD0 00701821 */ addu $v1, $v1, $s0
/* 339E24 E0024BD4 00A38021 */ addu $s0, $a1, $v1
/* 339E28 E0024BD8 0200282D */ daddu $a1, $s0, $zero
/* 339E2C E0024BDC 24420001 */ addiu $v0, $v0, 0x1
/* 339E30 E0024BE0 0C080118 */ jal shim_guMtxF2L
/* 339E34 E0024BE4 A6220000 */ sh $v0, 0x0($s1)
/* 339E38 E0024BE8 0240202D */ daddu $a0, $s2, $zero
/* 339E3C E0024BEC 3C05DA38 */ lui $a1, (0xDA380001 >> 16)
/* 339E40 E0024BF0 34A50001 */ ori $a1, $a1, (0xDA380001 & 0xFFFF)
/* 339E44 E0024BF4 3C06DE00 */ lui $a2, (0xDE000000 >> 16)
.LE0024BF8:
/* 339E48 E0024BF8 8C830000 */ lw $v1, 0x0($a0)
/* 339E4C E0024BFC 26F70001 */ addiu $s7, $s7, 0x1
/* 339E50 E0024C00 0060102D */ daddu $v0, $v1, $zero
/* 339E54 E0024C04 24630008 */ addiu $v1, $v1, 0x8
/* 339E58 E0024C08 AC830000 */ sw $v1, 0x0($a0)
/* 339E5C E0024C0C AC450000 */ sw $a1, 0x0($v0)
/* 339E60 E0024C10 AC500004 */ sw $s0, 0x4($v0)
/* 339E64 E0024C14 24620008 */ addiu $v0, $v1, 0x8
/* 339E68 E0024C18 AC820000 */ sw $v0, 0x0($a0)
/* 339E6C E0024C1C AC660000 */ sw $a2, 0x0($v1)
/* 339E70 E0024C20 8FA80074 */ lw $t0, 0x74($sp)
/* 339E74 E0024C24 2AE2000C */ slti $v0, $s7, 0xC
/* 339E78 E0024C28 1440FFF3 */ bnez $v0, .LE0024BF8
/* 339E7C E0024C2C AC680004 */ sw $t0, 0x4($v1)
.LE0024C30:
/* 339E80 E0024C30 3C03D838 */ lui $v1, (0xD8380002 >> 16)
/* 339E84 E0024C34 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* 339E88 E0024C38 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* 339E8C E0024C3C 8C820000 */ lw $v0, 0x0($a0)
/* 339E90 E0024C40 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF)
/* 339E94 E0024C44 0040282D */ daddu $a1, $v0, $zero
/* 339E98 E0024C48 24420008 */ addiu $v0, $v0, 0x8
/* 339E9C E0024C4C AC820000 */ sw $v0, 0x0($a0)
/* 339EA0 E0024C50 ACA30000 */ sw $v1, 0x0($a1)
/* 339EA4 E0024C54 24030040 */ addiu $v1, $zero, 0x40
/* 339EA8 E0024C58 ACA30004 */ sw $v1, 0x4($a1)
/* 339EAC E0024C5C 24430008 */ addiu $v1, $v0, 0x8
/* 339EB0 E0024C60 AC830000 */ sw $v1, 0x0($a0)
/* 339EB4 E0024C64 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* 339EB8 E0024C68 AC430000 */ sw $v1, 0x0($v0)
/* 339EBC E0024C6C AC400004 */ sw $zero, 0x4($v0)
/* 339EC0 E0024C70 8FBF00B4 */ lw $ra, 0xB4($sp)
/* 339EC4 E0024C74 8FBE00B0 */ lw $fp, 0xB0($sp)
/* 339EC8 E0024C78 8FB700AC */ lw $s7, 0xAC($sp)
/* 339ECC E0024C7C 8FB600A8 */ lw $s6, 0xA8($sp)
/* 339ED0 E0024C80 8FB500A4 */ lw $s5, 0xA4($sp)
/* 339ED4 E0024C84 8FB400A0 */ lw $s4, 0xA0($sp)
/* 339ED8 E0024C88 8FB3009C */ lw $s3, 0x9C($sp)
/* 339EDC E0024C8C 8FB20098 */ lw $s2, 0x98($sp)
/* 339EE0 E0024C90 8FB10094 */ lw $s1, 0x94($sp)
/* 339EE4 E0024C94 8FB00090 */ lw $s0, 0x90($sp)
/* 339EE8 E0024C98 D7BE00E0 */ ldc1 $f30, 0xE0($sp)
/* 339EEC E0024C9C D7BC00D8 */ ldc1 $f28, 0xD8($sp)
/* 339EF0 E0024CA0 D7BA00D0 */ ldc1 $f26, 0xD0($sp)
/* 339EF4 E0024CA4 D7B800C8 */ ldc1 $f24, 0xC8($sp)
/* 339EF8 E0024CA8 D7B600C0 */ ldc1 $f22, 0xC0($sp)
/* 339EFC E0024CAC D7B400B8 */ ldc1 $f20, 0xB8($sp)
/* 339F00 E0024CB0 03E00008 */ jr $ra
/* 339F04 E0024CB4 27BD00E8 */ addiu $sp, $sp, 0xE8
/* 339F08 E0024CB8 00000000 */ nop
/* 339F0C E0024CBC 00000000 */ nop
### DECOMPILED C INSTRUCTIONS:
void shape_spell_appendGfx(void* effect) {
ShapeSpellFXData* data = ((EffectInstance*)effect)->data.shapeSpell;
s32 isChild;
Gfx* savedGfxPos2;
Gfx* savedGfxPos;
f32 unk_28 = data->unk_28;
s32 primA;
f32 unk_10;
f32 unk_14;
f32 unk_18;
f32 angle;
f32 factor;
f32 var_f30;
s32 timeLeft;
Matrix4f sp20;
Mtx* sp60[3];
Mtx* mtx;
s32 i;
s32 j;
gDPPipeSync(gMainGfxPos++);
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
gSPDisplayList(gMainGfxPos++, D_09001080_33AFE0);
savedGfxPos = gMainGfxPos++;
savedGfxPos2 = gMainGfxPos;
isChild = data->isChild;
primA = data->unk_34;
unk_10 = data->unk_10;
unk_14 = data->unk_14;
unk_18 = data->unk_18;
timeLeft = data->timeLeft;
if (isChild == 0) {
angle = timeLeft * 35;
factor = 9.0f;
var_f30 = -gCameras[gCurrentCameraID].currentYaw;
} else {
angle = timeLeft * 25;
factor = 6.0f;
var_f30 = 0.0f;
unk_10 *= unk_28;
}
for (i = 0; i < 3; i++) {
if (i > 0) {
if (!isChild) {
angle -= 70.0f;
unk_10 -= 2.0f * data->unk_1C;
unk_14 -= 2.0f * data->unk_20;
unk_18 -= 2.0f * data->unk_24;
} else {
angle -= 50.0f;
unk_10 -= data->unk_1C * (100.0 / 83) * 2.0;
}
primA = data->unk_34 * 100 / 255;
}
shim_guPositionF(sp20, 0.0f, var_f30, 0.0f, unk_28, unk_10, unk_14, unk_18);
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
shim_guTranslateF(sp20,
shim_sin_deg(angle) * factor,
shim_cos_deg(angle) * factor, 0.0f);
angle += 120.0f;
sp60[0] = &gDisplayContext->matrixStack[gMatrixListPos++];
shim_guMtxF2L(sp20, sp60[0]);
shim_guTranslateF(sp20,
shim_sin_deg(angle) * factor,
shim_cos_deg(angle) * factor, 0.0f);
angle += 120.0f;
sp60[1] = &gDisplayContext->matrixStack[gMatrixListPos++];
shim_guMtxF2L(sp20, sp60[1]);
shim_guTranslateF(sp20,
shim_sin_deg(angle) * factor,
shim_cos_deg(angle) * factor, 0.0f);
sp60[2] = &gDisplayContext->matrixStack[gMatrixListPos++];
shim_guMtxF2L(sp20, sp60[2]);
for (j = 0; j < 3; j++) {
gSPMatrix(gMainGfxPos++, sp60[j], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gDPSetPrimColor(gMainGfxPos++, 0, 0,
func_E00243BC(D_E0024CC0[j].unk_01, D_E0024CC0[j].unk_00),
func_E00243BC(D_E0024CC0[j].unk_02, D_E0024CC0[j].unk_00),
func_E00243BC(D_E0024CC0[j].unk_03, D_E0024CC0[j].unk_00),
primA);
gDPSetEnvColor(gMainGfxPos++,
func_E0024324(D_E0024CC0[j].unk_01, D_E0024CC0[j].unk_00),
func_E0024324(D_E0024CC0[j].unk_02, D_E0024CC0[j].unk_00),
func_E0024324(D_E0024CC0[j].unk_03, D_E0024CC0[j].unk_00),
255);
gSPDisplayList(gMainGfxPos++, !isChild ?
D_E0024CC0[j].unk_04 : D_E0024CC0[j].unk_08);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}
gSPEndDisplayList(gMainGfxPos++);
gSPBranchList(savedGfxPos, gMainGfxPos);
if (!isChild) {
var_f30 = 0.0f;
} else {
var_f30 = -gCameras[gCurrentCameraID].currentYaw;
}
shim_guPositionF(sp20, 0.0f, var_f30, 0.0f, 1.0f, data->pos.x, data->pos.y, data->pos.z);
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
if (!isChild) {
gSPDisplayList(gMainGfxPos++, savedGfxPos2);
} else {
shim_guRotateF(sp20, 30.0f, 0.0f, 0.0f, 1.0f);
mtx = &gDisplayContext->matrixStack[gMatrixListPos++];
shim_guMtxF2L(sp20, mtx);
for (i = 0; i < 12; i++) {
gSPMatrix(gMainGfxPos++, mtx, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, savedGfxPos2);
}
}
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMainGfxPos++);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel npc_follow_npc
/* 3952C 8005E12C 27BDFF98 */ addiu $sp, $sp, -0x68
/* 39530 8005E130 AFB20040 */ sw $s2, 0x40($sp)
/* 39534 8005E134 0080902D */ daddu $s2, $a0, $zero
/* 39538 8005E138 27A50018 */ addiu $a1, $sp, 0x18
/* 3953C 8005E13C 27A6001C */ addiu $a2, $sp, 0x1C
/* 39540 8005E140 AFBF0044 */ sw $ra, 0x44($sp)
/* 39544 8005E144 AFB1003C */ sw $s1, 0x3C($sp)
/* 39548 8005E148 AFB00038 */ sw $s0, 0x38($sp)
/* 3954C 8005E14C F7BA0060 */ sdc1 $f26, 0x60($sp)
/* 39550 8005E150 F7B80058 */ sdc1 $f24, 0x58($sp)
/* 39554 8005E154 F7B60050 */ sdc1 $f22, 0x50($sp)
/* 39558 8005E158 F7B40048 */ sdc1 $f20, 0x48($sp)
/* 3955C 8005E15C 8E510020 */ lw $s1, 0x20($s2)
/* 39560 8005E160 27A20024 */ addiu $v0, $sp, 0x24
/* 39564 8005E164 AFA20010 */ sw $v0, 0x10($sp)
/* 39568 8005E168 8E24028C */ lw $a0, 0x28C($s1)
/* 3956C 8005E16C 0C017784 */ jal get_npc_pos
/* 39570 8005E170 27A70020 */ addiu $a3, $sp, 0x20
/* 39574 8005E174 8E230288 */ lw $v1, 0x288($s1)
/* 39578 8005E178 24020001 */ addiu $v0, $zero, 0x1
/* 3957C 8005E17C 106200A4 */ beq $v1, $v0, .L8005E410
/* 39580 8005E180 28620002 */ slti $v0, $v1, 0x2
/* 39584 8005E184 50400005 */ beql $v0, $zero, .L8005E19C
/* 39588 8005E188 24020002 */ addiu $v0, $zero, 0x2
/* 3958C 8005E18C 10600015 */ beqz $v1, .L8005E1E4
/* 39590 8005E190 00000000 */ nop
/* 39594 8005E194 08017A20 */ j .L8005E880
/* 39598 8005E198 00000000 */ nop
.L8005E19C:
/* 3959C 8005E19C 10620104 */ beq $v1, $v0, .L8005E5B0
/* 395A0 8005E1A0 2402000A */ addiu $v0, $zero, 0xA
/* 395A4 8005E1A4 1062014C */ beq $v1, $v0, .L8005E6D8
/* 395A8 8005E1A8 00000000 */ nop
/* 395AC 8005E1AC 08017A20 */ j .L8005E880
/* 395B0 8005E1B0 00000000 */ nop
.L8005E1B4:
/* 395B4 8005E1B4 8E220290 */ lw $v0, 0x290($s1)
/* 395B8 8005E1B8 C658000C */ lwc1 $f24, 0xC($s2)
/* 395BC 8005E1BC 8C420010 */ lw $v0, 0x10($v0)
/* 395C0 8005E1C0 080178ED */ j .L8005E3B4
/* 395C4 8005E1C4 AE420028 */ sw $v0, 0x28($s2)
.L8005E1C8:
/* 395C8 8005E1C8 AE400018 */ sw $zero, 0x18($s2)
/* 395CC 8005E1CC 8E220290 */ lw $v0, 0x290($s1)
/* 395D0 8005E1D0 C658000C */ lwc1 $f24, 0xC($s2)
/* 395D4 8005E1D4 8C420010 */ lw $v0, 0x10($v0)
/* 395D8 8005E1D8 AE420028 */ sw $v0, 0x28($s2)
/* 395DC 8005E1DC 080178EC */ j .L8005E3B0
/* 395E0 8005E1E0 2402000A */ addiu $v0, $zero, 0xA
.L8005E1E4:
/* 395E4 8005E1E4 C64C0038 */ lwc1 $f12, 0x38($s2)
/* 395E8 8005E1E8 C64E0040 */ lwc1 $f14, 0x40($s2)
/* 395EC 8005E1EC 8FA60018 */ lw $a2, 0x18($sp)
/* 395F0 8005E1F0 8E220284 */ lw $v0, 0x284($s1)
/* 395F4 8005E1F4 8FA70020 */ lw $a3, 0x20($sp)
/* 395F8 8005E1F8 C642003C */ lwc1 $f2, 0x3C($s2)
/* 395FC 8005E1FC C6260294 */ lwc1 $f6, 0x294($s1)
/* 39600 8005E200 00021100 */ sll $v0, $v0, 4
/* 39604 8005E204 02228021 */ addu $s0, $s1, $v0
/* 39608 8005E208 46006006 */ mov.s $f0, $f12
/* 3960C 8005E20C C6160004 */ lwc1 $f22, 0x4($s0)
/* 39610 8005E210 C614000C */ lwc1 $f20, 0xC($s0)
/* 39614 8005E214 46007106 */ mov.s $f4, $f14
/* 39618 8005E218 E7A00028 */ swc1 $f0, 0x28($sp)
/* 3961C 8005E21C E7A2002C */ swc1 $f2, 0x2C($sp)
/* 39620 8005E220 E7A40030 */ swc1 $f4, 0x30($sp)
/* 39624 8005E224 0C00A7B5 */ jal dist2D
/* 39628 8005E228 E6460018 */ swc1 $f6, 0x18($s2)
/* 3962C 8005E22C C62202A0 */ lwc1 $f2, 0x2A0($s1)
/* 39630 8005E230 4600103E */ c.le.s $f2, $f0
/* 39634 8005E234 00000000 */ nop
/* 39638 8005E238 45000003 */ bc1f .L8005E248
/* 3963C 8005E23C E7A00034 */ swc1 $f0, 0x34($sp)
/* 39640 8005E240 C6200298 */ lwc1 $f0, 0x298($s1)
/* 39644 8005E244 E6400018 */ swc1 $f0, 0x18($s2)
.L8005E248:
/* 39648 8005E248 8E220290 */ lw $v0, 0x290($s1)
/* 3964C 8005E24C 8C430014 */ lw $v1, 0x14($v0)
/* 39650 8005E250 8E420000 */ lw $v0, 0x0($s2)
/* 39654 8005E254 30421000 */ andi $v0, $v0, 0x1000
/* 39658 8005E258 14400004 */ bnez $v0, .L8005E26C
/* 3965C 8005E25C AE430028 */ sw $v1, 0x28($s2)
/* 39660 8005E260 8E220290 */ lw $v0, 0x290($s1)
/* 39664 8005E264 8C420008 */ lw $v0, 0x8($v0)
/* 39668 8005E268 AE420028 */ sw $v0, 0x28($s2)
.L8005E26C:
/* 3966C 8005E26C C7AC0028 */ lwc1 $f12, 0x28($sp)
/* 39670 8005E270 C7AE0030 */ lwc1 $f14, 0x30($sp)
/* 39674 8005E274 4406B000 */ mfc1 $a2, $f22
/* 39678 8005E278 4407A000 */ mfc1 $a3, $f20
/* 3967C 8005E27C 0C00A7B5 */ jal dist2D
/* 39680 8005E280 00000000 */ nop
/* 39684 8005E284 C7AC0028 */ lwc1 $f12, 0x28($sp)
/* 39688 8005E288 C7AE0030 */ lwc1 $f14, 0x30($sp)
/* 3968C 8005E28C 4406B000 */ mfc1 $a2, $f22
/* 39690 8005E290 4407A000 */ mfc1 $a3, $f20
/* 39694 8005E294 0C00A720 */ jal atan2
/* 39698 8005E298 E7A00034 */ swc1 $f0, 0x34($sp)
/* 3969C 8005E29C C6440018 */ lwc1 $f4, 0x18($s2)
/* 396A0 8005E2A0 C7A20034 */ lwc1 $f2, 0x34($sp)
/* 396A4 8005E2A4 4602203C */ c.lt.s $f4, $f2
/* 396A8 8005E2A8 00000000 */ nop
/* 396AC 8005E2AC 45000020 */ bc1f .L8005E330
/* 396B0 8005E2B0 46000606 */ mov.s $f24, $f0
/* 396B4 8005E2B4 C7AC0028 */ lwc1 $f12, 0x28($sp)
/* 396B8 8005E2B8 C7AE0030 */ lwc1 $f14, 0x30($sp)
/* 396BC 8005E2BC 8FA60018 */ lw $a2, 0x18($sp)
/* 396C0 8005E2C0 0C00A7B5 */ jal dist2D
/* 396C4 8005E2C4 8FA70020 */ lw $a3, 0x20($sp)
/* 396C8 8005E2C8 E7A00034 */ swc1 $f0, 0x34($sp)
/* 396CC 8005E2CC C62202A0 */ lwc1 $f2, 0x2A0($s1)
/* 396D0 8005E2D0 4600103C */ c.lt.s $f2, $f0
/* 396D4 8005E2D4 00000000 */ nop
/* 396D8 8005E2D8 45010036 */ bc1t .L8005E3B4
/* 396DC 8005E2DC 00000000 */ nop
/* 396E0 8005E2E0 C622029C */ lwc1 $f2, 0x29C($s1)
/* 396E4 8005E2E4 4600103C */ c.lt.s $f2, $f0
/* 396E8 8005E2E8 00000000 */ nop
/* 396EC 8005E2EC 45000010 */ bc1f .L8005E330
/* 396F0 8005E2F0 00000000 */ nop
/* 396F4 8005E2F4 46020001 */ sub.s $f0, $f0, $f2
/* 396F8 8005E2F8 E6400018 */ swc1 $f0, 0x18($s2)
/* 396FC 8005E2FC C6220294 */ lwc1 $f2, 0x294($s1)
/* 39700 8005E300 4600103C */ c.lt.s $f2, $f0
/* 39704 8005E304 00000000 */ nop
/* 39708 8005E308 4503002A */ bc1tl .L8005E3B4
/* 3970C 8005E30C E6420018 */ swc1 $f2, 0x18($s2)
/* 39710 8005E310 3C013FF0 */ lui $at, (0x3FF00000 >> 16)
/* 39714 8005E314 44811800 */ mtc1 $at, $f3
/* 39718 8005E318 44801000 */ mtc1 $zero, $f2
/* 3971C 8005E31C 46000021 */ cvt.d.s $f0, $f0
/* 39720 8005E320 46220000 */ add.d $f0, $f0, $f2
/* 39724 8005E324 46200020 */ cvt.s.d $f0, $f0
/* 39728 8005E328 080178ED */ j .L8005E3B4
/* 3972C 8005E32C E6400018 */ swc1 $f0, 0x18($s2)
.L8005E330:
/* 39730 8005E330 8E230284 */ lw $v1, 0x284($s1)
/* 39734 8005E334 8E220280 */ lw $v0, 0x280($s1)
/* 39738 8005E338 5062FF9E */ beql $v1, $v0, .L8005E1B4
/* 3973C 8005E33C AE400018 */ sw $zero, 0x18($s2)
/* 39740 8005E340 C64C0038 */ lwc1 $f12, 0x38($s2)
/* 39744 8005E344 C64E0040 */ lwc1 $f14, 0x40($s2)
/* 39748 8005E348 8FA60018 */ lw $a2, 0x18($sp)
/* 3974C 8005E34C 0C00A7B5 */ jal dist2D
/* 39750 8005E350 8FA70020 */ lw $a3, 0x20($sp)
/* 39754 8005E354 C622029C */ lwc1 $f2, 0x29C($s1)
/* 39758 8005E358 4602003E */ c.le.s $f0, $f2
/* 3975C 8005E35C 00000000 */ nop
/* 39760 8005E360 4501FF99 */ bc1t .L8005E1C8
/* 39764 8005E364 E7A00034 */ swc1 $f0, 0x34($sp)
/* 39768 8005E368 8E220284 */ lw $v0, 0x284($s1)
/* 3976C 8005E36C 24420001 */ addiu $v0, $v0, 0x1
/* 39770 8005E370 AE220284 */ sw $v0, 0x284($s1)
/* 39774 8005E374 28420028 */ slti $v0, $v0, 0x28
/* 39778 8005E378 50400001 */ beql $v0, $zero, .L8005E380
/* 3977C 8005E37C AE200284 */ sw $zero, 0x284($s1)
.L8005E380:
/* 39780 8005E380 8E220284 */ lw $v0, 0x284($s1)
/* 39784 8005E384 00021100 */ sll $v0, $v0, 4
/* 39788 8005E388 02228021 */ addu $s0, $s1, $v0
/* 3978C 8005E38C C6160004 */ lwc1 $f22, 0x4($s0)
/* 39790 8005E390 8E420000 */ lw $v0, 0x0($s2)
/* 39794 8005E394 C614000C */ lwc1 $f20, 0xC($s0)
/* 39798 8005E398 30421000 */ andi $v0, $v0, 0x1000
/* 3979C 8005E39C 1040FFB3 */ beqz $v0, .L8005E26C
/* 397A0 8005E3A0 00000000 */ nop
/* 397A4 8005E3A4 82020000 */ lb $v0, 0x0($s0)
/* 397A8 8005E3A8 1040FFB0 */ beqz $v0, .L8005E26C
/* 397AC 8005E3AC 24020001 */ addiu $v0, $zero, 0x1
.L8005E3B0:
/* 397B0 8005E3B0 AE220288 */ sw $v0, 0x288($s1)
.L8005E3B4:
/* 397B4 8005E3B4 8E420000 */ lw $v0, 0x0($s2)
/* 397B8 8005E3B8 30421000 */ andi $v0, $v0, 0x1000
/* 397BC 8005E3BC 14400008 */ bnez $v0, .L8005E3E0
/* 397C0 8005E3C0 00000000 */ nop
/* 397C4 8005E3C4 C6400018 */ lwc1 $f0, 0x18($s2)
/* 397C8 8005E3C8 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 397CC 8005E3CC 44811000 */ mtc1 $at, $f2
/* 397D0 8005E3D0 00000000 */ nop
/* 397D4 8005E3D4 46020002 */ mul.s $f0, $f0, $f2
/* 397D8 8005E3D8 00000000 */ nop
/* 397DC 8005E3DC E6400018 */ swc1 $f0, 0x18($s2)
.L8005E3E0:
/* 397E0 8005E3E0 8E450018 */ lw $a1, 0x18($s2)
/* 397E4 8005E3E4 4406C000 */ mfc1 $a2, $f24
/* 397E8 8005E3E8 0240202D */ daddu $a0, $s2, $zero
/* 397EC 8005E3EC 0C00EA95 */ jal npc_move_heading
/* 397F0 8005E3F0 AE46000C */ sw $a2, 0xC($s2)
/* 397F4 8005E3F4 8E420000 */ lw $v0, 0x0($s2)
/* 397F8 8005E3F8 24035000 */ addiu $v1, $zero, 0x5000
/* 397FC 8005E3FC 30425000 */ andi $v0, $v0, 0x5000
/* 39800 8005E400 1443011F */ bne $v0, $v1, .L8005E880
/* 39804 8005E404 24020001 */ addiu $v0, $zero, 0x1
/* 39808 8005E408 08017A20 */ j .L8005E880
/* 3980C 8005E40C AE220288 */ sw $v0, 0x288($s1)
.L8005E410:
/* 39810 8005E410 8E230284 */ lw $v1, 0x284($s1)
/* 39814 8005E414 8E220280 */ lw $v0, 0x280($s1)
/* 39818 8005E418 10620119 */ beq $v1, $v0, .L8005E880
/* 3981C 8005E41C 24620001 */ addiu $v0, $v1, 0x1
/* 39820 8005E420 AE220284 */ sw $v0, 0x284($s1)
/* 39824 8005E424 28420028 */ slti $v0, $v0, 0x28
/* 39828 8005E428 50400001 */ beql $v0, $zero, .L8005E430
/* 3982C 8005E42C AE200284 */ sw $zero, 0x284($s1)
.L8005E430:
/* 39830 8005E430 C64C0038 */ lwc1 $f12, 0x38($s2)
/* 39834 8005E434 8E220284 */ lw $v0, 0x284($s1)
/* 39838 8005E438 C64E0040 */ lwc1 $f14, 0x40($s2)
/* 3983C 8005E43C 3C014000 */ lui $at, (0x40000000 >> 16)
/* 39840 8005E440 44810000 */ mtc1 $at, $f0
/* 39844 8005E444 00021100 */ sll $v0, $v0, 4
/* 39848 8005E448 02228021 */ addu $s0, $s1, $v0
/* 3984C 8005E44C C6160004 */ lwc1 $f22, 0x4($s0)
/* 39850 8005E450 C614000C */ lwc1 $f20, 0xC($s0)
/* 39854 8005E454 C6020008 */ lwc1 $f2, 0x8($s0)
/* 39858 8005E458 A640008E */ sh $zero, 0x8E($s2)
/* 3985C 8005E45C E6400014 */ swc1 $f0, 0x14($s2)
/* 39860 8005E460 E6560060 */ swc1 $f22, 0x60($s2)
/* 39864 8005E464 E6540068 */ swc1 $f20, 0x68($s2)
/* 39868 8005E468 E6420064 */ swc1 $f2, 0x64($s2)
/* 3986C 8005E46C C6200298 */ lwc1 $f0, 0x298($s1)
/* 39870 8005E470 4406B000 */ mfc1 $a2, $f22
/* 39874 8005E474 4407A000 */ mfc1 $a3, $f20
/* 39878 8005E478 0C00A7B5 */ jal dist2D
/* 3987C 8005E47C E6400018 */ swc1 $f0, 0x18($s2)
/* 39880 8005E480 C64C0038 */ lwc1 $f12, 0x38($s2)
/* 39884 8005E484 C64E0040 */ lwc1 $f14, 0x40($s2)
/* 39888 8005E488 8E460060 */ lw $a2, 0x60($s2)
/* 3988C 8005E48C 8E470068 */ lw $a3, 0x68($s2)
/* 39890 8005E490 0C00A720 */ jal atan2
/* 39894 8005E494 E6400010 */ swc1 $f0, 0x10($s2)
/* 39898 8005E498 C6480010 */ lwc1 $f8, 0x10($s2)
/* 3989C 8005E49C C6440064 */ lwc1 $f4, 0x64($s2)
/* 398A0 8005E4A0 C642003C */ lwc1 $f2, 0x3C($s2)
/* 398A4 8005E4A4 E640000C */ swc1 $f0, 0xC($s2)
/* 398A8 8005E4A8 46022101 */ sub.s $f4, $f4, $f2
/* 398AC 8005E4AC 46004186 */ mov.s $f6, $f8
/* 398B0 8005E4B0 E7A80034 */ swc1 $f8, 0x34($sp)
/* 398B4 8005E4B4 4604303C */ c.lt.s $f6, $f4
/* 398B8 8005E4B8 00000000 */ nop
/* 398BC 8005E4BC 45000002 */ bc1f .L8005E4C8
/* 398C0 8005E4C0 E7A4002C */ swc1 $f4, 0x2C($sp)
/* 398C4 8005E4C4 E7A40034 */ swc1 $f4, 0x34($sp)
.L8005E4C8:
/* 398C8 8005E4C8 C620029C */ lwc1 $f0, 0x29C($s1)
/* 398CC 8005E4CC C7A20034 */ lwc1 $f2, 0x34($sp)
/* 398D0 8005E4D0 4600103C */ c.lt.s $f2, $f0
/* 398D4 8005E4D4 00000000 */ nop
/* 398D8 8005E4D8 4500000A */ bc1f .L8005E504
/* 398DC 8005E4DC 00000000 */ nop
/* 398E0 8005E4E0 C64C0038 */ lwc1 $f12, 0x38($s2)
/* 398E4 8005E4E4 C64E0040 */ lwc1 $f14, 0x40($s2)
/* 398E8 8005E4E8 8FA60018 */ lw $a2, 0x18($sp)
/* 398EC 8005E4EC 8FA70020 */ lw $a3, 0x20($sp)
/* 398F0 8005E4F0 8E420000 */ lw $v0, 0x0($s2)
/* 398F4 8005E4F4 AE40001C */ sw $zero, 0x1C($s2)
/* 398F8 8005E4F8 34420200 */ ori $v0, $v0, 0x200
/* 398FC 8005E4FC 080179B1 */ j .L8005E6C4
/* 39900 8005E500 AE420000 */ sw $v0, 0x0($s2)
.L8005E504:
/* 39904 8005E504 C6400018 */ lwc1 $f0, 0x18($s2)
/* 39908 8005E508 46001003 */ div.s $f0, $f2, $f0
/* 3990C 8005E50C 4600028D */ trunc.w.s $f10, $f0
/* 39910 8005E510 44025000 */ mfc1 $v0, $f10
/* 39914 8005E514 00000000 */ nop
/* 39918 8005E518 A642008E */ sh $v0, 0x8E($s2)
/* 3991C 8005E51C 00021400 */ sll $v0, $v0, 16
/* 39920 8005E520 00021403 */ sra $v0, $v0, 16
/* 39924 8005E524 2842000A */ slti $v0, $v0, 0xA
/* 39928 8005E528 10400002 */ beqz $v0, .L8005E534
/* 3992C 8005E52C 2402000A */ addiu $v0, $zero, 0xA
/* 39930 8005E530 A642008E */ sh $v0, 0x8E($s2)
.L8005E534:
/* 39934 8005E534 8642008E */ lh $v0, 0x8E($s2)
/* 39938 8005E538 C6420014 */ lwc1 $f2, 0x14($s2)
/* 3993C 8005E53C 44823000 */ mtc1 $v0, $f6
/* 39940 8005E540 00000000 */ nop
/* 39944 8005E544 468031A0 */ cvt.s.w $f6, $f6
/* 39948 8005E548 46061082 */ mul.s $f2, $f2, $f6
/* 3994C 8005E54C 00000000 */ nop
/* 39950 8005E550 46061082 */ mul.s $f2, $f2, $f6
/* 39954 8005E554 00000000 */ nop
/* 39958 8005E558 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 3995C 8005E55C 44810000 */ mtc1 $at, $f0
/* 39960 8005E560 00000000 */ nop
/* 39964 8005E564 46001082 */ mul.s $f2, $f2, $f0
/* 39968 8005E568 00000000 */ nop
/* 3996C 8005E56C 2404FDFF */ addiu $a0, $zero, -0x201
/* 39970 8005E570 C7A4002C */ lwc1 $f4, 0x2C($sp)
/* 39974 8005E574 46003206 */ mov.s $f8, $f6
/* 39978 8005E578 C6400010 */ lwc1 $f0, 0x10($s2)
/* 3997C 8005E57C 46022100 */ add.s $f4, $f4, $f2
/* 39980 8005E580 46080003 */ div.s $f0, $f0, $f8
/* 39984 8005E584 E6400018 */ swc1 $f0, 0x18($s2)
/* 39988 8005E588 46062103 */ div.s $f4, $f4, $f6
/* 3998C 8005E58C E644001C */ swc1 $f4, 0x1C($s2)
/* 39990 8005E590 8E230290 */ lw $v1, 0x290($s1)
/* 39994 8005E594 8E420000 */ lw $v0, 0x0($s2)
/* 39998 8005E598 8C630004 */ lw $v1, 0x4($v1)
/* 3999C 8005E59C 00441024 */ and $v0, $v0, $a0
/* 399A0 8005E5A0 AE420000 */ sw $v0, 0x0($s2)
/* 399A4 8005E5A4 24020002 */ addiu $v0, $zero, 0x2
/* 399A8 8005E5A8 08017A1F */ j .L8005E87C
/* 399AC 8005E5AC AE430028 */ sw $v1, 0x28($s2)
.L8005E5B0:
/* 399B0 8005E5B0 C640001C */ lwc1 $f0, 0x1C($s2)
/* 399B4 8005E5B4 C6420014 */ lwc1 $f2, 0x14($s2)
/* 399B8 8005E5B8 46020001 */ sub.s $f0, $f0, $f2
/* 399BC 8005E5BC C642003C */ lwc1 $f2, 0x3C($s2)
/* 399C0 8005E5C0 46001080 */ add.s $f2, $f2, $f0
/* 399C4 8005E5C4 4480B000 */ mtc1 $zero, $f22
/* 399C8 8005E5C8 00000000 */ nop
/* 399CC 8005E5CC 4616003E */ c.le.s $f0, $f22
/* 399D0 8005E5D0 E640001C */ swc1 $f0, 0x1C($s2)
/* 399D4 8005E5D4 45000004 */ bc1f .L8005E5E8
/* 399D8 8005E5D8 E642003C */ swc1 $f2, 0x3C($s2)
/* 399DC 8005E5DC 8E220290 */ lw $v0, 0x290($s1)
/* 399E0 8005E5E0 8C420008 */ lw $v0, 0x8($v0)
/* 399E4 8005E5E4 AE420028 */ sw $v0, 0x28($s2)
.L8005E5E8:
/* 399E8 8005E5E8 8E450018 */ lw $a1, 0x18($s2)
/* 399EC 8005E5EC 8E46000C */ lw $a2, 0xC($s2)
/* 399F0 8005E5F0 0C00EA95 */ jal npc_move_heading
/* 399F4 8005E5F4 0240202D */ daddu $a0, $s2, $zero
/* 399F8 8005E5F8 C640001C */ lwc1 $f0, 0x1C($s2)
/* 399FC 8005E5FC 4616003E */ c.le.s $f0, $f22
/* 39A00 8005E600 00000000 */ nop
/* 39A04 8005E604 4500009E */ bc1f .L8005E880
/* 39A08 8005E608 27A50028 */ addiu $a1, $sp, 0x28
/* 39A0C 8005E60C 46000005 */ abs.s $f0, $f0
/* 39A10 8005E610 46000021 */ cvt.d.s $f0, $f0
/* 39A14 8005E614 27A6002C */ addiu $a2, $sp, 0x2C
/* 39A18 8005E618 27A20034 */ addiu $v0, $sp, 0x34
/* 39A1C 8005E61C 3C014020 */ lui $at, (0x40200000 >> 16)
/* 39A20 8005E620 4481A800 */ mtc1 $at, $f21
/* 39A24 8005E624 4480A000 */ mtc1 $zero, $f20
/* 39A28 8005E628 C6420038 */ lwc1 $f2, 0x38($s2)
/* 39A2C 8005E62C 46340000 */ add.d $f0, $f0, $f20
/* 39A30 8005E630 E7A20028 */ swc1 $f2, 0x28($sp)
/* 39A34 8005E634 C642003C */ lwc1 $f2, 0x3C($s2)
/* 39A38 8005E638 C6440040 */ lwc1 $f4, 0x40($s2)
/* 39A3C 8005E63C 46200020 */ cvt.s.d $f0, $f0
/* 39A40 8005E640 46001080 */ add.s $f2, $f2, $f0
/* 39A44 8005E644 E7A40030 */ swc1 $f4, 0x30($sp)
/* 39A48 8005E648 E7A00034 */ swc1 $f0, 0x34($sp)
/* 39A4C 8005E64C E7A2002C */ swc1 $f2, 0x2C($sp)
/* 39A50 8005E650 AFA20010 */ sw $v0, 0x10($sp)
/* 39A54 8005E654 8E440080 */ lw $a0, 0x80($s2)
/* 39A58 8005E658 0C0372DF */ jal npc_raycast_down_sides
/* 39A5C 8005E65C 27A70030 */ addiu $a3, $sp, 0x30
/* 39A60 8005E660 10400087 */ beqz $v0, .L8005E880
/* 39A64 8005E664 00000000 */ nop
/* 39A68 8005E668 C640001C */ lwc1 $f0, 0x1C($s2)
/* 39A6C 8005E66C C7A20034 */ lwc1 $f2, 0x34($sp)
/* 39A70 8005E670 46000005 */ abs.s $f0, $f0
/* 39A74 8005E674 46000021 */ cvt.d.s $f0, $f0
/* 39A78 8005E678 46340000 */ add.d $f0, $f0, $f20
/* 39A7C 8005E67C 460010A1 */ cvt.d.s $f2, $f2
/* 39A80 8005E680 4620103E */ c.le.d $f2, $f0
/* 39A84 8005E684 00000000 */ nop
/* 39A88 8005E688 4500007D */ bc1f .L8005E880
/* 39A8C 8005E68C 00000000 */ nop
/* 39A90 8005E690 C7AC0028 */ lwc1 $f12, 0x28($sp)
/* 39A94 8005E694 C7AE0030 */ lwc1 $f14, 0x30($sp)
/* 39A98 8005E698 8FA60018 */ lw $a2, 0x18($sp)
/* 39A9C 8005E69C 8E220290 */ lw $v0, 0x290($s1)
/* 39AA0 8005E6A0 8FA70020 */ lw $a3, 0x20($sp)
/* 39AA4 8005E6A4 C7A0002C */ lwc1 $f0, 0x2C($sp)
/* 39AA8 8005E6A8 8C43000C */ lw $v1, 0xC($v0)
/* 39AAC 8005E6AC 8E420000 */ lw $v0, 0x0($s2)
/* 39AB0 8005E6B0 E656001C */ swc1 $f22, 0x1C($s2)
/* 39AB4 8005E6B4 E640003C */ swc1 $f0, 0x3C($s2)
/* 39AB8 8005E6B8 34420200 */ ori $v0, $v0, 0x200
/* 39ABC 8005E6BC AE420000 */ sw $v0, 0x0($s2)
/* 39AC0 8005E6C0 AE430028 */ sw $v1, 0x28($s2)
.L8005E6C4:
/* 39AC4 8005E6C4 0C00A720 */ jal atan2
/* 39AC8 8005E6C8 00000000 */ nop
/* 39ACC 8005E6CC E640000C */ swc1 $f0, 0xC($s2)
/* 39AD0 8005E6D0 08017A20 */ j .L8005E880
/* 39AD4 8005E6D4 AE200288 */ sw $zero, 0x288($s1)
.L8005E6D8:
/* 39AD8 8005E6D8 C64C0038 */ lwc1 $f12, 0x38($s2)
/* 39ADC 8005E6DC C64E0040 */ lwc1 $f14, 0x40($s2)
/* 39AE0 8005E6E0 8FA60018 */ lw $a2, 0x18($sp)
/* 39AE4 8005E6E4 8E220284 */ lw $v0, 0x284($s1)
/* 39AE8 8005E6E8 8FA70020 */ lw $a3, 0x20($sp)
/* 39AEC 8005E6EC C642003C */ lwc1 $f2, 0x3C($s2)
/* 39AF0 8005E6F0 00021100 */ sll $v0, $v0, 4
/* 39AF4 8005E6F4 02228021 */ addu $s0, $s1, $v0
/* 39AF8 8005E6F8 46006006 */ mov.s $f0, $f12
/* 39AFC 8005E6FC C6160004 */ lwc1 $f22, 0x4($s0)
/* 39B00 8005E700 C614000C */ lwc1 $f20, 0xC($s0)
/* 39B04 8005E704 46007106 */ mov.s $f4, $f14
/* 39B08 8005E708 E7A00028 */ swc1 $f0, 0x28($sp)
/* 39B0C 8005E70C E7A2002C */ swc1 $f2, 0x2C($sp)
/* 39B10 8005E710 0C00A7B5 */ jal dist2D
/* 39B14 8005E714 E7A40030 */ swc1 $f4, 0x30($sp)
/* 39B18 8005E718 C622029C */ lwc1 $f2, 0x29C($s1)
/* 39B1C 8005E71C 4602003E */ c.le.s $f0, $f2
/* 39B20 8005E720 00000000 */ nop
/* 39B24 8005E724 45010056 */ bc1t .L8005E880
/* 39B28 8005E728 E7A00034 */ swc1 $f0, 0x34($sp)
/* 39B2C 8005E72C 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 39B30 8005E730 4481D000 */ mtc1 $at, $f26
.L8005E734:
/* 39B34 8005E734 82020000 */ lb $v0, 0x0($s0)
/* 39B38 8005E738 14400028 */ bnez $v0, .L8005E7DC
/* 39B3C 8005E73C 00000000 */ nop
/* 39B40 8005E740 C64C0038 */ lwc1 $f12, 0x38($s2)
/* 39B44 8005E744 C64E0040 */ lwc1 $f14, 0x40($s2)
/* 39B48 8005E748 4406B000 */ mfc1 $a2, $f22
/* 39B4C 8005E74C 4407A000 */ mfc1 $a3, $f20
/* 39B50 8005E750 0C00A720 */ jal atan2
/* 39B54 8005E754 00000000 */ nop
/* 39B58 8005E758 C64C0038 */ lwc1 $f12, 0x38($s2)
/* 39B5C 8005E75C C64E0040 */ lwc1 $f14, 0x40($s2)
/* 39B60 8005E760 8FA60018 */ lw $a2, 0x18($sp)
/* 39B64 8005E764 8FA70020 */ lw $a3, 0x20($sp)
/* 39B68 8005E768 0C00A720 */ jal atan2
/* 39B6C 8005E76C 46000606 */ mov.s $f24, $f0
/* 39B70 8005E770 4600C306 */ mov.s $f12, $f24
/* 39B74 8005E774 0C00A70A */ jal get_clamped_angle_diff
/* 39B78 8005E778 46000386 */ mov.s $f14, $f0
/* 39B7C 8005E77C 46000005 */ abs.s $f0, $f0
/* 39B80 8005E780 461A003C */ c.lt.s $f0, $f26
/* 39B84 8005E784 00000000 */ nop
/* 39B88 8005E788 4501000F */ bc1t .L8005E7C8
/* 39B8C 8005E78C 00000000 */ nop
/* 39B90 8005E790 8E230284 */ lw $v1, 0x284($s1)
/* 39B94 8005E794 8E220280 */ lw $v0, 0x280($s1)
/* 39B98 8005E798 1062000B */ beq $v1, $v0, .L8005E7C8
/* 39B9C 8005E79C 24620001 */ addiu $v0, $v1, 0x1
/* 39BA0 8005E7A0 AE220284 */ sw $v0, 0x284($s1)
/* 39BA4 8005E7A4 28420028 */ slti $v0, $v0, 0x28
/* 39BA8 8005E7A8 50400001 */ beql $v0, $zero, .L8005E7B0
/* 39BAC 8005E7AC AE200284 */ sw $zero, 0x284($s1)
.L8005E7B0:
/* 39BB0 8005E7B0 8E220284 */ lw $v0, 0x284($s1)
/* 39BB4 8005E7B4 00021100 */ sll $v0, $v0, 4
/* 39BB8 8005E7B8 02228021 */ addu $s0, $s1, $v0
/* 39BBC 8005E7BC C6160004 */ lwc1 $f22, 0x4($s0)
/* 39BC0 8005E7C0 080179CD */ j .L8005E734
/* 39BC4 8005E7C4 C614000C */ lwc1 $f20, 0xC($s0)
.L8005E7C8:
/* 39BC8 8005E7C8 82020000 */ lb $v0, 0x0($s0)
/* 39BCC 8005E7CC 14400003 */ bnez $v0, .L8005E7DC
/* 39BD0 8005E7D0 00000000 */ nop
/* 39BD4 8005E7D4 08017A20 */ j .L8005E880
/* 39BD8 8005E7D8 AE200288 */ sw $zero, 0x288($s1)
.L8005E7DC:
/* 39BDC 8005E7DC 3C0142B4 */ lui $at, (0x42B40000 >> 16)
/* 39BE0 8005E7E0 4481D000 */ mtc1 $at, $f26
.L8005E7E4:
/* 39BE4 8005E7E4 82020000 */ lb $v0, 0x0($s0)
/* 39BE8 8005E7E8 10400024 */ beqz $v0, .L8005E87C
/* 39BEC 8005E7EC 24020001 */ addiu $v0, $zero, 0x1
/* 39BF0 8005E7F0 C64C0038 */ lwc1 $f12, 0x38($s2)
/* 39BF4 8005E7F4 C64E0040 */ lwc1 $f14, 0x40($s2)
/* 39BF8 8005E7F8 4406B000 */ mfc1 $a2, $f22
/* 39BFC 8005E7FC 4407A000 */ mfc1 $a3, $f20
/* 39C00 8005E800 0C00A720 */ jal atan2
/* 39C04 8005E804 00000000 */ nop
/* 39C08 8005E808 C64C0038 */ lwc1 $f12, 0x38($s2)
/* 39C0C 8005E80C C64E0040 */ lwc1 $f14, 0x40($s2)
/* 39C10 8005E810 8FA60018 */ lw $a2, 0x18($sp)
/* 39C14 8005E814 8FA70020 */ lw $a3, 0x20($sp)
/* 39C18 8005E818 0C00A720 */ jal atan2
/* 39C1C 8005E81C 46000606 */ mov.s $f24, $f0
/* 39C20 8005E820 4600C306 */ mov.s $f12, $f24
/* 39C24 8005E824 0C00A70A */ jal get_clamped_angle_diff
/* 39C28 8005E828 46000386 */ mov.s $f14, $f0
/* 39C2C 8005E82C 46000005 */ abs.s $f0, $f0
/* 39C30 8005E830 461A003C */ c.lt.s $f0, $f26
/* 39C34 8005E834 00000000 */ nop
/* 39C38 8005E838 45010010 */ bc1t .L8005E87C
/* 39C3C 8005E83C 24020001 */ addiu $v0, $zero, 0x1
/* 39C40 8005E840 8E230284 */ lw $v1, 0x284($s1)
/* 39C44 8005E844 8E220280 */ lw $v0, 0x280($s1)
/* 39C48 8005E848 1062000B */ beq $v1, $v0, .L8005E878
/* 39C4C 8005E84C 24620001 */ addiu $v0, $v1, 0x1
/* 39C50 8005E850 AE220284 */ sw $v0, 0x284($s1)
/* 39C54 8005E854 28420028 */ slti $v0, $v0, 0x28
/* 39C58 8005E858 50400001 */ beql $v0, $zero, .L8005E860
/* 39C5C 8005E85C AE200284 */ sw $zero, 0x284($s1)
.L8005E860:
/* 39C60 8005E860 8E220284 */ lw $v0, 0x284($s1)
/* 39C64 8005E864 00021100 */ sll $v0, $v0, 4
/* 39C68 8005E868 02228021 */ addu $s0, $s1, $v0
/* 39C6C 8005E86C C6160004 */ lwc1 $f22, 0x4($s0)
/* 39C70 8005E870 080179F9 */ j .L8005E7E4
/* 39C74 8005E874 C614000C */ lwc1 $f20, 0xC($s0)
.L8005E878:
/* 39C78 8005E878 24020001 */ addiu $v0, $zero, 0x1
.L8005E87C:
/* 39C7C 8005E87C AE220288 */ sw $v0, 0x288($s1)
.L8005E880:
/* 39C80 8005E880 8FBF0044 */ lw $ra, 0x44($sp)
/* 39C84 8005E884 8FB20040 */ lw $s2, 0x40($sp)
/* 39C88 8005E888 8FB1003C */ lw $s1, 0x3C($sp)
/* 39C8C 8005E88C 8FB00038 */ lw $s0, 0x38($sp)
/* 39C90 8005E890 D7BA0060 */ ldc1 $f26, 0x60($sp)
/* 39C94 8005E894 D7B80058 */ ldc1 $f24, 0x58($sp)
/* 39C98 8005E898 D7B60050 */ ldc1 $f22, 0x50($sp)
/* 39C9C 8005E89C D7B40048 */ ldc1 $f20, 0x48($sp)
/* 39CA0 8005E8A0 03E00008 */ jr $ra
/* 39CA4 8005E8A4 27BD0068 */ addiu $sp, $sp, 0x68
/* 39CA8 8005E8A8 00000000 */ nop
/* 39CAC 8005E8AC 00000000 */ nop
### DECOMPILED C INSTRUCTIONS:
void npc_follow_npc(Npc* npc) {
NpcFollowData* followData = npc->blur.followData;
f32 x, y, z;
s32 airborne;
f32 currentX, currentY, currentZ;
f32 dist;
NpcHistoryPoint* historyPoint;
f32 targetX, targetY, targetZ;
f32 theta;
f32 yaw;
get_npc_pos(followData->targetNpcID, &x, &y, &z, &airborne);
switch (followData->followState) {
case NPC_FOLLOW_STATE_RUN:
historyPoint = &followData->moveHistory[followData->targetPointIdx];
targetX = historyPoint->pos.x;
targetY = historyPoint->pos.y;
targetZ = historyPoint->pos.z;
currentX = npc->pos.x;
currentY = npc->pos.y;
currentZ = npc->pos.z;
npc->moveSpeed = followData->walkSpeed;
dist = dist2D(npc->pos.x, npc->pos.z, x, z);
if (dist >= followData->walkRadius) {
npc->moveSpeed = followData->runSpeed;
}
npc->currentAnim = followData->anims->run;
if (!(npc->flags & NPC_FLAG_GROUNDED)) {
npc->currentAnim = followData->anims->fall;
}
while (TRUE) {
dist = dist2D(currentX, currentZ, targetX, targetZ);
yaw = atan2(currentX, currentZ, targetX, targetZ);
if (dist > npc->moveSpeed) {
dist = dist2D(currentX, currentZ, x, z);
if (dist > followData->walkRadius) {
break;
}
if (dist > followData->idleRadius) {
npc->moveSpeed = dist - followData->idleRadius;
if (npc->moveSpeed > followData->walkSpeed) {
npc->moveSpeed = followData->walkSpeed;
} else {
npc->moveSpeed += 1.0;
}
break;
}
}
if (followData->targetPointIdx == followData->lastPointIdx) {
npc->moveSpeed = 0.0f;
yaw = npc->yaw;
npc->currentAnim = followData->anims->idle;
break;
}
dist = dist2D(npc->pos.x, npc->pos.z, x, z);
if (dist <= followData->idleRadius) {
npc->moveSpeed = 0.0f;
yaw = npc->yaw;
npc->currentAnim = followData->anims->idle;
followData->followState = NPC_FOLLOW_STATE_IDLE;
break;
}
followData->targetPointIdx++;
if (followData->targetPointIdx >= ARRAY_COUNT(followData->moveHistory)) {
followData->targetPointIdx = 0;
}
historyPoint = &followData->moveHistory[followData->targetPointIdx];
targetX = historyPoint->pos.x;
targetZ = historyPoint->pos.z;
if (npc->flags & NPC_FLAG_GROUNDED) {
if (historyPoint->isAirborne) {
followData->followState = NPC_FOLLOW_STATE_JUMP;
break;
}
}
}
if (!(npc->flags & NPC_FLAG_GROUNDED)) {
npc->moveSpeed *= 0.5f;
}
npc->yaw = yaw;
npc_move_heading(npc, npc->moveSpeed, yaw);
if ((npc->flags & NPC_FLAG_COLLDING_FORWARD_WITH_WORLD) && (npc->flags & NPC_FLAG_GROUNDED)) {
followData->followState = NPC_FOLLOW_STATE_JUMP;
}
break;
case NPC_FOLLOW_STATE_JUMP:
if (followData->targetPointIdx != followData->lastPointIdx) {
followData->targetPointIdx++;
if (followData->targetPointIdx >= ARRAY_COUNT(followData->moveHistory)) {
followData->targetPointIdx = 0;
}
historyPoint = &followData->moveHistory[followData->targetPointIdx];
targetX = historyPoint->pos.x;
targetY = historyPoint->pos.y;
targetZ = historyPoint->pos.z;
npc->moveToPos.x = targetX;
npc->moveToPos.y = targetY;
npc->moveToPos.z = targetZ;
npc->duration = 0;
npc->jumpScale = 2.0f;
npc->moveSpeed = followData->runSpeed;
npc->planarFlyDist = dist2D(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z);
npc->yaw = atan2(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z);
dist = npc->planarFlyDist;
currentY = npc->moveToPos.y - npc->pos.y;
if (npc->planarFlyDist < currentY) {
dist = currentY;
}
if (dist < followData->idleRadius) {
npc->jumpVelocity = 0.0f;
npc->flags |= NPC_FLAG_GRAVITY;
npc->yaw = atan2(npc->pos.x, npc->pos.z, x, z);
followData->followState = NPC_FOLLOW_STATE_RUN;
return;
}
npc->duration = dist / npc->moveSpeed;
if (npc->duration < 10) {
npc->duration = 10;
}
npc->moveSpeed = npc->planarFlyDist / npc->duration;
npc->jumpVelocity = (currentY + (npc->jumpScale * npc->duration * npc->duration * 0.5f)) / npc->duration;
npc->currentAnim = followData->anims->jump;
npc->flags &= ~NPC_FLAG_GRAVITY;
followData->followState = NPC_FOLLOW_STATE_FALL;
}
break;
case NPC_FOLLOW_STATE_FALL:
npc->jumpVelocity -= npc->jumpScale;
npc->pos.y += npc->jumpVelocity;
if (npc->jumpVelocity <= 0.0f) {
npc->currentAnim = followData->anims->fall;
}
npc_move_heading(npc, npc->moveSpeed, npc->yaw);
if (npc->jumpVelocity <= 0.0f) {
currentX = npc->pos.x;
dist = fabsf(npc->jumpVelocity) + 8.0;
currentY = npc->pos.y + dist;
currentZ = npc->pos.z;
if (npc_raycast_down_sides(npc->collisionChannel, ¤tX, ¤tY, ¤tZ, &dist) != 0 &&
dist <= fabsf(npc->jumpVelocity) + 8.0)
{
npc->currentAnim = followData->anims->land;
npc->jumpVelocity = 0.0f;
npc->pos.y = currentY;
npc->flags |= NPC_FLAG_GRAVITY;
npc->yaw = atan2(currentX, currentZ, x, z);
followData->followState = NPC_FOLLOW_STATE_RUN;
}
}
break;
case NPC_FOLLOW_STATE_IDLE:
historyPoint = &followData->moveHistory[followData->targetPointIdx];
targetX = historyPoint->pos.x;
targetY = historyPoint->pos.y;
targetZ = historyPoint->pos.z;
currentX = npc->pos.x;
currentY = npc->pos.y;
currentZ = npc->pos.z;
dist = dist2D(npc->pos.x, npc->pos.z, x, z);
if (dist <= followData->idleRadius) {
break;
}
while (TRUE) {
if (historyPoint->isAirborne) {
break;
}
yaw = atan2(npc->pos.x, npc->pos.z, targetX, targetZ);
if (fabsf(get_clamped_angle_diff(yaw, atan2(npc->pos.x, npc->pos.z, x, z))) < 90.0f) {
break;
}
if (followData->targetPointIdx == followData->lastPointIdx) {
break;
}
followData->targetPointIdx++;
if (followData->targetPointIdx >= ARRAY_COUNT(followData->moveHistory)) {
followData->targetPointIdx = 0;
}
historyPoint = &followData->moveHistory[followData->targetPointIdx];
targetX = historyPoint->pos.x;
targetZ = historyPoint->pos.z;
continue;
}
if (!historyPoint->isAirborne) {
followData->followState = NPC_FOLLOW_STATE_RUN;
return;
}
while (TRUE) {
if (!historyPoint->isAirborne) {
break;
}
yaw = atan2(npc->pos.x, npc->pos.z, targetX, targetZ);
if (fabsf(get_clamped_angle_diff(yaw, atan2(npc->pos.x, npc->pos.z, x, z))) < 90.0f) {
break;
}
if (followData->targetPointIdx == followData->lastPointIdx) {
break;
}
followData->targetPointIdx++;
if (followData->targetPointIdx >= ARRAY_COUNT(followData->moveHistory)) {
followData->targetPointIdx = 0;
}
historyPoint = &followData->moveHistory[followData->targetPointIdx];
targetX = historyPoint->pos.x;
targetZ = historyPoint->pos.z;
}
followData->followState = NPC_FOLLOW_STATE_JUMP;
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel func_8024A214
/* 178AF4 8024A214 27BDFFA0 */ addiu $sp, $sp, -0x60
/* 178AF8 8024A218 AFB20028 */ sw $s2, 0x28($sp)
/* 178AFC 8024A21C 00A0902D */ daddu $s2, $a1, $zero
/* 178B00 8024A220 AFB10024 */ sw $s1, 0x24($sp)
/* 178B04 8024A224 3C11800B */ lui $s1, %hi(gCameras + 0x558)
/* 178B08 8024A228 263122D8 */ addiu $s1, $s1, %lo(gCameras + 0x558)
/* 178B0C 8024A22C 3C02802A */ lui $v0, %hi(BattleCam_TargetActor)
/* 178B10 8024A230 9442F27C */ lhu $v0, %lo(BattleCam_TargetActor)($v0)
/* 178B14 8024A234 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 178B18 8024A238 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 178B1C 8024A23C AFBF002C */ sw $ra, 0x2C($sp)
/* 178B20 8024A240 AFB00020 */ sw $s0, 0x20($sp)
/* 178B24 8024A244 F7BE0058 */ sdc1 $f30, 0x58($sp)
/* 178B28 8024A248 F7BC0050 */ sdc1 $f28, 0x50($sp)
/* 178B2C 8024A24C F7BA0048 */ sdc1 $f26, 0x48($sp)
/* 178B30 8024A250 F7B80040 */ sdc1 $f24, 0x40($sp)
/* 178B34 8024A254 F7B60038 */ sdc1 $f22, 0x38($sp)
/* 178B38 8024A258 F7B40030 */ sdc1 $f20, 0x30($sp)
/* 178B3C 8024A25C 30430700 */ andi $v1, $v0, 0x700
/* 178B40 8024A260 304500FF */ andi $a1, $v0, 0xFF
.L8024A264:
/* 178B44 8024A264 24020100 */ addiu $v0, $zero, 0x100
/* 178B48 8024A268 10620044 */ beq $v1, $v0, .L8024A37C
/* 178B4C 8024A26C 28620101 */ slti $v0, $v1, 0x101
/* 178B50 8024A270 10400005 */ beqz $v0, .L8024A288
/* 178B54 8024A274 24020200 */ addiu $v0, $zero, 0x200
/* 178B58 8024A278 10600007 */ beqz $v1, .L8024A298
.L8024A27C:
/* 178B5C 8024A27C 24020002 */ addiu $v0, $zero, 0x2
/* 178B60 8024A280 08092A58 */ j .L8024A960
/* 178B64 8024A284 00000000 */ nop
.L8024A288:
/* 178B68 8024A288 1062003F */ beq $v1, $v0, .L8024A388
/* 178B6C 8024A28C 24020002 */ addiu $v0, $zero, 0x2
D_8024A290:
/* 178B70 8024A290 08092A58 */ j .L8024A960
/* 178B74 8024A294 00000000 */ nop
.L8024A298:
/* 178B78 8024A298 8C8500D8 */ lw $a1, 0xD8($a0)
.L8024A29C:
/* 178B7C 8024A29C 10A001B0 */ beqz $a1, .L8024A960
D_8024A2A0:
/* 178B80 8024A2A0 0000102D */ daddu $v0, $zero, $zero
/* 178B84 8024A2A4 C4BA0144 */ lwc1 $f26, 0x144($a1)
/* 178B88 8024A2A8 C4B6014C */ lwc1 $f22, 0x14C($a1)
/* 178B8C 8024A2AC 84A40428 */ lh $a0, 0x428($a1)
/* 178B90 8024A2B0 90A20191 */ lbu $v0, 0x191($a1)
/* 178B94 8024A2B4 90A30190 */ lbu $v1, 0x190($a1)
/* 178B98 8024A2B8 C4A20148 */ lwc1 $f2, 0x148($a1)
/* 178B9C 8024A2BC 4482F000 */ mtc1 $v0, $f30
/* 178BA0 8024A2C0 00000000 */ nop
/* 178BA4 8024A2C4 4680F7A0 */ cvt.s.w $f30, $f30
/* 178BA8 8024A2C8 4483A000 */ mtc1 $v1, $f20
/* 178BAC 8024A2CC 00000000 */ nop
end_01_CreditsMessageBuffers:
/* 178BB0 8024A2D0 4680A520 */ cvt.s.w $f20, $f20
.L8024A2D4:
/* 178BB4 8024A2D4 00021842 */ srl $v1, $v0, 1
/* 178BB8 8024A2D8 44830000 */ mtc1 $v1, $f0
/* 178BBC 8024A2DC 00000000 */ nop
/* 178BC0 8024A2E0 46800020 */ cvt.s.w $f0, $f0
/* 178BC4 8024A2E4 46001080 */ add.s $f2, $f2, $f0
/* 178BC8 8024A2E8 00021082 */ srl $v0, $v0, 2
/* 178BCC 8024A2EC 44820000 */ mtc1 $v0, $f0
/* 178BD0 8024A2F0 00000000 */ nop
/* 178BD4 8024A2F4 46800020 */ cvt.s.w $f0, $f0
/* 178BD8 8024A2F8 0C09A75B */ jal get_actor
/* 178BDC 8024A2FC 46001600 */ add.s $f24, $f2, $f0
/* 178BE0 8024A300 0040802D */ daddu $s0, $v0, $zero
/* 178BE4 8024A304 12000196 */ beqz $s0, .L8024A960
/* 178BE8 8024A308 0000102D */ daddu $v0, $zero, $zero
/* 178BEC 8024A30C C6040144 */ lwc1 $f4, 0x144($s0)
/* 178BF0 8024A310 461A2101 */ sub.s $f4, $f4, $f26
/* 178BF4 8024A314 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 178BF8 8024A318 44815000 */ mtc1 $at, $f10
/* 178BFC 8024A31C 00000000 */ nop
/* 178C00 8024A320 460A2102 */ mul.s $f4, $f4, $f10
/* 178C04 8024A324 00000000 */ nop
/* 178C08 8024A328 92020191 */ lbu $v0, 0x191($s0)
/* 178C0C 8024A32C C6020148 */ lwc1 $f2, 0x148($s0)
/* 178C10 8024A330 00021842 */ srl $v1, $v0, 1
/* 178C14 8024A334 44830000 */ mtc1 $v1, $f0
/* 178C18 8024A338 00000000 */ nop
/* 178C1C 8024A33C 46800020 */ cvt.s.w $f0, $f0
.L8024A340:
/* 178C20 8024A340 46001080 */ add.s $f2, $f2, $f0
/* 178C24 8024A344 00021082 */ srl $v0, $v0, 2
/* 178C28 8024A348 44820000 */ mtc1 $v0, $f0
/* 178C2C 8024A34C 00000000 */ nop
/* 178C30 8024A350 46800020 */ cvt.s.w $f0, $f0
.L8024A354:
/* 178C34 8024A354 46001180 */ add.s $f6, $f2, $f0
/* 178C38 8024A358 C608014C */ lwc1 $f8, 0x14C($s0)
/* 178C3C 8024A35C 3C02802A */ lui $v0, %hi(BattleCam_ModeY)
/* 178C40 8024A360 8042F2A2 */ lb $v0, %lo(BattleCam_ModeY)($v0)
/* 178C44 8024A364 0440004E */ bltz $v0, .L8024A4A0
/* 178C48 8024A368 4604D680 */ add.s $f26, $f26, $f4
/* 178C4C 8024A36C 54400044 */ bnel $v0, $zero, .L8024A480
D_8024A370:
/* 178C50 8024A370 4606C001 */ sub.s $f0, $f24, $f6
/* 178C54 8024A374 08092929 */ j .L8024A4A4
/* 178C58 8024A378 4600C706 */ mov.s $f28, $f24
.L8024A37C:
/* 178C5C 8024A37C 8C8500DC */ lw $a1, 0xDC($a0)
/* 178C60 8024A380 080928A7 */ j .L8024A29C
/* 178C64 8024A384 00000000 */ nop
.L8024A388:
/* 178C68 8024A388 00051080 */ sll $v0, $a1, 2
/* 178C6C 8024A38C 00441021 */ addu $v0, $v0, $a0
/* 178C70 8024A390 8C5000E0 */ lw $s0, 0xE0($v0)
/* 178C74 8024A394 12000172 */ beqz $s0, .L8024A960
/* 178C78 8024A398 0000102D */ daddu $v0, $zero, $zero
/* 178C7C 8024A39C 3C05802A */ lui $a1, %hi(BattleCam_TargetActorPart)
D_8024A3A0:
/* 178C80 8024A3A0 84A5F27E */ lh $a1, %lo(BattleCam_TargetActorPart)($a1)
.L8024A3A4:
/* 178C84 8024A3A4 0C099117 */ jal get_actor_part
/* 178C88 8024A3A8 0200202D */ daddu $a0, $s0, $zero
/* 178C8C 8024A3AC C45A002C */ lwc1 $f26, 0x2C($v0)
/* 178C90 8024A3B0 C4560034 */ lwc1 $f22, 0x34($v0)
/* 178C94 8024A3B4 86040428 */ lh $a0, 0x428($s0)
D_8024A3B8:
/* 178C98 8024A3B8 90430073 */ lbu $v1, 0x73($v0)
/* 178C9C 8024A3BC 90450072 */ lbu $a1, 0x72($v0)
/* 178CA0 8024A3C0 C4420030 */ lwc1 $f2, 0x30($v0)
/* 178CA4 8024A3C4 4483F000 */ mtc1 $v1, $f30
/* 178CA8 8024A3C8 00000000 */ nop
/* 178CAC 8024A3CC 4680F7A0 */ cvt.s.w $f30, $f30
D_8024A3D0:
/* 178CB0 8024A3D0 4485A000 */ mtc1 $a1, $f20
/* 178CB4 8024A3D4 00000000 */ nop
/* 178CB8 8024A3D8 4680A520 */ cvt.s.w $f20, $f20
/* 178CBC 8024A3DC 00032842 */ srl $a1, $v1, 1
/* 178CC0 8024A3E0 44850000 */ mtc1 $a1, $f0
/* 178CC4 8024A3E4 00000000 */ nop
/* 178CC8 8024A3E8 46800020 */ cvt.s.w $f0, $f0
/* 178CCC 8024A3EC 46001080 */ add.s $f2, $f2, $f0
/* 178CD0 8024A3F0 00031882 */ srl $v1, $v1, 2
/* 178CD4 8024A3F4 44830000 */ mtc1 $v1, $f0
/* 178CD8 8024A3F8 00000000 */ nop
D_8024A3FC:
/* 178CDC 8024A3FC 46800020 */ cvt.s.w $f0, $f0
D_8024A400:
/* 178CE0 8024A400 0C09A75B */ jal get_actor
/* 178CE4 8024A404 46001600 */ add.s $f24, $f2, $f0
/* 178CE8 8024A408 0040802D */ daddu $s0, $v0, $zero
/* 178CEC 8024A40C 12000154 */ beqz $s0, .L8024A960
/* 178CF0 8024A410 0000102D */ daddu $v0, $zero, $zero
/* 178CF4 8024A414 C6040144 */ lwc1 $f4, 0x144($s0)
/* 178CF8 8024A418 461A2101 */ sub.s $f4, $f4, $f26
/* 178CFC 8024A41C 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 178D00 8024A420 44815000 */ mtc1 $at, $f10
/* 178D04 8024A424 00000000 */ nop
/* 178D08 8024A428 460A2102 */ mul.s $f4, $f4, $f10
/* 178D0C 8024A42C 00000000 */ nop
/* 178D10 8024A430 92020191 */ lbu $v0, 0x191($s0)
/* 178D14 8024A434 C6020148 */ lwc1 $f2, 0x148($s0)
/* 178D18 8024A438 00021842 */ srl $v1, $v0, 1
/* 178D1C 8024A43C 44830000 */ mtc1 $v1, $f0
/* 178D20 8024A440 00000000 */ nop
/* 178D24 8024A444 46800020 */ cvt.s.w $f0, $f0
/* 178D28 8024A448 46001080 */ add.s $f2, $f2, $f0
.L8024A44C:
/* 178D2C 8024A44C 00021082 */ srl $v0, $v0, 2
/* 178D30 8024A450 44820000 */ mtc1 $v0, $f0
.L8024A454:
/* 178D34 8024A454 00000000 */ nop
/* 178D38 8024A458 46800020 */ cvt.s.w $f0, $f0
/* 178D3C 8024A45C 46001180 */ add.s $f6, $f2, $f0
/* 178D40 8024A460 C608014C */ lwc1 $f8, 0x14C($s0)
/* 178D44 8024A464 3C02802A */ lui $v0, %hi(BattleCam_ModeY)
/* 178D48 8024A468 8042F2A2 */ lb $v0, %lo(BattleCam_ModeY)($v0)
/* 178D4C 8024A46C 0440000C */ bltz $v0, .L8024A4A0
/* 178D50 8024A470 4604D680 */ add.s $f26, $f26, $f4
/* 178D54 8024A474 1040000B */ beqz $v0, .L8024A4A4
/* 178D58 8024A478 4600C706 */ mov.s $f28, $f24
/* 178D5C 8024A47C 4606C001 */ sub.s $f0, $f24, $f6
.L8024A480:
/* 178D60 8024A480 460A0082 */ mul.s $f2, $f0, $f10
/* 178D64 8024A484 00000000 */ nop
/* 178D68 8024A488 3C0140C0 */ lui $at, (0x40C00000 >> 16)
/* 178D6C 8024A48C 44812000 */ mtc1 $at, $f4
.L8024A490:
/* 178D70 8024A490 46023080 */ add.s $f2, $f6, $f2
/* 178D74 8024A494 46040003 */ div.s $f0, $f0, $f4
/* 178D78 8024A498 08092929 */ j .L8024A4A4
/* 178D7C 8024A49C 46001700 */ add.s $f28, $f2, $f0
.L8024A4A0:
/* 178D80 8024A4A0 C63C0058 */ lwc1 $f28, 0x58($s1)
.L8024A4A4:
/* 178D84 8024A4A4 46164001 */ sub.s $f0, $f8, $f22
/* 178D88 8024A4A8 3C013F00 */ lui $at, (0x3F000000 >> 16)
.L8024A4AC:
/* 178D8C 8024A4AC 44811000 */ mtc1 $at, $f2
/* 178D90 8024A4B0 00000000 */ nop
/* 178D94 8024A4B4 46020002 */ mul.s $f0, $f0, $f2
/* 178D98 8024A4B8 00000000 */ nop
/* 178D9C 8024A4BC 4600B580 */ add.s $f22, $f22, $f0
/* 178DA0 8024A4C0 E7B60010 */ swc1 $f22, 0x10($sp)
/* 178DA4 8024A4C4 3C02802A */ lui $v0, %hi(D_8029F2A6)
/* 178DA8 8024A4C8 8042F2A6 */ lb $v0, %lo(D_8029F2A6)($v0)
/* 178DAC 8024A4CC 10400029 */ beqz $v0, .L8024A574
/* 178DB0 8024A4D0 00000000 */ nop
/* 178DB4 8024A4D4 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength)
/* 178DB8 8024A4D8 C422F28C */ lwc1 $f2, %lo(BattleCam_InitialBoomLength)($at)
glabel func_8024A4DC
/* 178DBC 8024A4DC 3C0143FA */ lui $at, (0x43FA0000 >> 16)
/* 178DC0 8024A4E0 44810000 */ mtc1 $at, $f0
/* 178DC4 8024A4E4 00000000 */ nop
/* 178DC8 8024A4E8 46020001 */ sub.s $f0, $f0, $f2
/* 178DCC 8024A4EC 3C01802A */ lui $at, %hi(D_8029CC10)
/* 178DD0 8024A4F0 D422CC10 */ ldc1 $f2, %lo(D_8029CC10)($at)
/* 178DD4 8024A4F4 46000021 */ cvt.d.s $f0, $f0
/* 178DD8 8024A4F8 46220002 */ mul.d $f0, $f0, $f2
/* 178DDC 8024A4FC 00000000 */ nop
/* 178DE0 8024A500 3C01403E */ lui $at, (0x403E0000 >> 16)
/* 178DE4 8024A504 44811800 */ mtc1 $at, $f3
/* 178DE8 8024A508 44801000 */ mtc1 $zero, $f2
/* 178DEC 8024A50C 00000000 */ nop
/* 178DF0 8024A510 46220000 */ add.d $f0, $f0, $f2
.L8024A514:
/* 178DF4 8024A514 46200120 */ cvt.s.d $f4, $f0
/* 178DF8 8024A518 46002007 */ neg.s $f0, $f4
/* 178DFC 8024A51C 4600D03C */ c.lt.s $f26, $f0
D_8024A520:
/* 178E00 8024A520 00000000 */ nop
/* 178E04 8024A524 45000008 */ bc1f .L8024A548
/* 178E08 8024A528 00000000 */ nop
/* 178E0C 8024A52C 461A0001 */ sub.s $f0, $f0, $f26
.L8024A530:
/* 178E10 8024A530 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 178E14 8024A534 44811000 */ mtc1 $at, $f2
/* 178E18 8024A538 00000000 */ nop
/* 178E1C 8024A53C 46020002 */ mul.s $f0, $f0, $f2
/* 178E20 8024A540 00000000 */ nop
.L8024A544:
/* 178E24 8024A544 4600D680 */ add.s $f26, $f26, $f0
.L8024A548:
/* 178E28 8024A548 461A203C */ c.lt.s $f4, $f26
/* 178E2C 8024A54C 00000000 */ nop
/* 178E30 8024A550 45000008 */ bc1f .L8024A574
.L8024A554:
/* 178E34 8024A554 00000000 */ nop
/* 178E38 8024A558 461A2001 */ sub.s $f0, $f4, $f26
/* 178E3C 8024A55C 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 178E40 8024A560 44811000 */ mtc1 $at, $f2
/* 178E44 8024A564 00000000 */ nop
/* 178E48 8024A568 46020002 */ mul.s $f0, $f0, $f2
/* 178E4C 8024A56C 00000000 */ nop
.L8024A570:
/* 178E50 8024A570 4600D680 */ add.s $f26, $f26, $f0
.L8024A574:
/* 178E54 8024A574 12400055 */ beqz $s2, .L8024A6CC
/* 178E58 8024A578 00000000 */ nop
.L8024A57C:
/* 178E5C 8024A57C 3C0141C0 */ lui $at, (0x41C00000 >> 16)
/* 178E60 8024A580 44810000 */ mtc1 $at, $f0
/* 178E64 8024A584 00000000 */ nop
/* 178E68 8024A588 4600A501 */ sub.s $f20, $f20, $f0
/* 178E6C 8024A58C 4600F781 */ sub.s $f30, $f30, $f0
/* 178E70 8024A590 44800000 */ mtc1 $zero, $f0
.L8024A594:
/* 178E74 8024A594 00000000 */ nop
/* 178E78 8024A598 4600A03C */ c.lt.s $f20, $f0
/* 178E7C 8024A59C 00000000 */ nop
/* 178E80 8024A5A0 45030001 */ bc1tl .L8024A5A8
/* 178E84 8024A5A4 46000506 */ mov.s $f20, $f0
.L8024A5A8:
/* 178E88 8024A5A8 4600F03C */ c.lt.s $f30, $f0
D_8024A5AC:
/* 178E8C 8024A5AC 00000000 */ nop
/* 178E90 8024A5B0 45030001 */ bc1tl .L8024A5B8
/* 178E94 8024A5B4 46000786 */ mov.s $f30, $f0
.L8024A5B8:
/* 178E98 8024A5B8 3C03802A */ lui $v1, %hi(BattleCam_BoomLength)
/* 178E9C 8024A5BC 2463F280 */ addiu $v1, $v1, %lo(BattleCam_BoomLength)
/* 178EA0 8024A5C0 84620000 */ lh $v0, 0x0($v1)
/* 178EA4 8024A5C4 461EA080 */ add.s $f2, $f20, $f30
/* 178EA8 8024A5C8 44820000 */ mtc1 $v0, $f0
/* 178EAC 8024A5CC 00000000 */ nop
/* 178EB0 8024A5D0 46800020 */ cvt.s.w $f0, $f0
.L8024A5D4:
/* 178EB4 8024A5D4 46020000 */ add.s $f0, $f0, $f2
/* 178EB8 8024A5D8 3C02802A */ lui $v0, %hi(BattleCam_SetImmediately)
/* 178EBC 8024A5DC 8042F2A4 */ lb $v0, %lo(BattleCam_SetImmediately)($v0)
/* 178EC0 8024A5E0 4600038D */ trunc.w.s $f14, $f0
/* 178EC4 8024A5E4 44047000 */ mfc1 $a0, $f14
.L8024A5E8:
/* 178EC8 8024A5E8 10400010 */ beqz $v0, .L8024A62C
/* 178ECC 8024A5EC A4640000 */ sh $a0, 0x0($v1)
dgb_01_img5_gfx:
/* 178ED0 8024A5F0 E63A0054 */ swc1 $f26, 0x54($s1)
/* 178ED4 8024A5F4 E63C0058 */ swc1 $f28, 0x58($s1)
/* 178ED8 8024A5F8 C7AE0010 */ lwc1 $f14, 0x10($sp)
/* 178EDC 8024A5FC 3C02802A */ lui $v0, %hi(BattleCam_BoomZOffset)
/* 178EE0 8024A600 8442F286 */ lh $v0, %lo(BattleCam_BoomZOffset)($v0)
/* 178EE4 8024A604 3C03802A */ lui $v1, %hi(BattleCam_BoomYaw)
/* 178EE8 8024A608 9463F282 */ lhu $v1, %lo(BattleCam_BoomYaw)($v1)
/* 178EEC 8024A60C A624001E */ sh $a0, 0x1E($s1)
/* 178EF0 8024A610 3C04802A */ lui $a0, %hi(BattleCam_BoomPitch)
/* 178EF4 8024A614 9484F284 */ lhu $a0, %lo(BattleCam_BoomPitch)($a0)
/* 178EF8 8024A618 00021200 */ sll $v0, $v0, 8
/* 178EFC 8024A61C E62E005C */ swc1 $f14, 0x5C($s1)
/* 178F00 8024A620 A6220026 */ sh $v0, 0x26($s1)
/* 178F04 8024A624 A6230024 */ sh $v1, 0x24($s1)
/* 178F08 8024A628 A6240022 */ sh $a0, 0x22($s1)
.L8024A62C:
/* 178F0C 8024A62C 8622001E */ lh $v0, 0x1E($s1)
D_8024A630_DD7300:
/* 178F10 8024A630 86240026 */ lh $a0, 0x26($s1)
.L8024A634:
/* 178F14 8024A634 86230024 */ lh $v1, 0x24($s1)
D_8024A638_DD7308:
/* 178F18 8024A638 44820000 */ mtc1 $v0, $f0
/* 178F1C 8024A63C 00000000 */ nop
jtbl_8024A640:
/* 178F20 8024A640 46800020 */ cvt.s.w $f0, $f0
/* 178F24 8024A644 86220022 */ lh $v0, 0x22($s1)
/* 178F28 8024A648 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength)
/* 178F2C 8024A64C E420F28C */ swc1 $f0, %lo(BattleCam_InitialBoomLength)($at)
/* 178F30 8024A650 44820000 */ mtc1 $v0, $f0
/* 178F34 8024A654 00000000 */ nop
/* 178F38 8024A658 46800020 */ cvt.s.w $f0, $f0
/* 178F3C 8024A65C 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch)
/* 178F40 8024A660 E420F294 */ swc1 $f0, %lo(BattleCam_InitialBoomPitch)($at)
/* 178F44 8024A664 44830000 */ mtc1 $v1, $f0
/* 178F48 8024A668 00000000 */ nop
/* 178F4C 8024A66C 46800020 */ cvt.s.w $f0, $f0
dgb_01_img6_png:
/* 178F50 8024A670 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw)
/* 178F54 8024A674 E420F290 */ swc1 $f0, %lo(BattleCam_InitialBoomYaw)($at)
.L8024A678:
/* 178F58 8024A678 04820001 */ bltzl $a0, .L8024A680
/* 178F5C 8024A67C 248400FF */ addiu $a0, $a0, 0xFF
.L8024A680:
/* 178F60 8024A680 00041203 */ sra $v0, $a0, 8
/* 178F64 8024A684 C6220054 */ lwc1 $f2, 0x54($s1)
/* 178F68 8024A688 C6240058 */ lwc1 $f4, 0x58($s1)
/* 178F6C 8024A68C C626005C */ lwc1 $f6, 0x5C($s1)
/* 178F70 8024A690 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeLeft)
/* 178F74 8024A694 9463F29E */ lhu $v1, %lo(BattleCam_MoveTimeLeft)($v1)
/* 178F78 8024A698 44820000 */ mtc1 $v0, $f0
/* 178F7C 8024A69C 00000000 */ nop
/* 178F80 8024A6A0 46800020 */ cvt.s.w $f0, $f0
/* 178F84 8024A6A4 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset)
/* 178F88 8024A6A8 E420F298 */ swc1 $f0, %lo(BattleCam_InitialBoomZOffset)($at)
.L8024A6AC:
/* 178F8C 8024A6AC 3C01802A */ lui $at, %hi(BattleCam_InitialPosX)
D_8024A6B0:
/* 178F90 8024A6B0 E422F2A8 */ swc1 $f2, %lo(BattleCam_InitialPosX)($at)
/* 178F94 8024A6B4 3C01802A */ lui $at, %hi(BattleCam_InitialPosY)
/* 178F98 8024A6B8 E424F2AC */ swc1 $f4, %lo(BattleCam_InitialPosY)($at)
/* 178F9C 8024A6BC 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ)
/* 178FA0 8024A6C0 E426F2B0 */ swc1 $f6, %lo(BattleCam_InitialPosZ)($at)
/* 178FA4 8024A6C4 3C01802A */ lui $at, %hi(BattleCam_MoveTimeTotal)
/* 178FA8 8024A6C8 A423F2A0 */ sh $v1, %lo(BattleCam_MoveTimeTotal)($at)
.L8024A6CC:
/* 178FAC 8024A6CC 3C02802A */ lui $v0, %hi(BattleCam_UseLinearInterp)
/* 178FB0 8024A6D0 8042F2A5 */ lb $v0, %lo(BattleCam_UseLinearInterp)($v0)
.L8024A6D4:
/* 178FB4 8024A6D4 14400027 */ bnez $v0, .L8024A774
.L8024A6D8:
/* 178FB8 8024A6D8 00000000 */ nop
.L8024A6DC:
/* 178FBC 8024A6DC 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft)
/* 178FC0 8024A6E0 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0)
/* 178FC4 8024A6E4 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal)
/* 178FC8 8024A6E8 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 178FCC 8024A6EC 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 178FD0 8024A6F0 4481C000 */ mtc1 $at, $f24
/* 178FD4 8024A6F4 44822000 */ mtc1 $v0, $f4
/* 178FD8 8024A6F8 00000000 */ nop
/* 178FDC 8024A6FC 46802120 */ cvt.s.w $f4, $f4
/* 178FE0 8024A700 44830000 */ mtc1 $v1, $f0
/* 178FE4 8024A704 00000000 */ nop
/* 178FE8 8024A708 46800020 */ cvt.s.w $f0, $f0
/* 178FEC 8024A70C 46002103 */ div.s $f4, $f4, $f0
/* 178FF0 8024A710 4604C301 */ sub.s $f12, $f24, $f4
glabel func_8024A714
/* 178FF4 8024A714 3C014049 */ lui $at, (0x40490FD0 >> 16)
/* 178FF8 8024A718 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF)
/* 178FFC 8024A71C 4481B000 */ mtc1 $at, $f22
/* 179000 8024A720 00000000 */ nop
/* 179004 8024A724 46166302 */ mul.s $f12, $f12, $f22
/* 179008 8024A728 00000000 */ nop
/* 17900C 8024A72C 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 179010 8024A730 4481A000 */ mtc1 $at, $f20
/* 179014 8024A734 00000000 */ nop
/* 179018 8024A738 46146302 */ mul.s $f12, $f12, $f20
/* 17901C 8024A73C 0C00A85B */ jal sin_rad
/* 179020 8024A740 00000000 */ nop
/* 179024 8024A744 46160002 */ mul.s $f0, $f0, $f22
/* 179028 8024A748 00000000 */ nop
/* 17902C 8024A74C 46140302 */ mul.s $f12, $f0, $f20
/* 179030 8024A750 0C00A85B */ jal sin_rad
/* 179034 8024A754 00000000 */ nop
/* 179038 8024A758 46160002 */ mul.s $f0, $f0, $f22
.L8024A75C:
/* 17903C 8024A75C 00000000 */ nop
/* 179040 8024A760 46140302 */ mul.s $f12, $f0, $f20
/* 179044 8024A764 0C00A85B */ jal sin_rad
/* 179048 8024A768 00000000 */ nop
/* 17904C 8024A76C 080929E8 */ j .L8024A7A0
/* 179050 8024A770 4600C101 */ sub.s $f4, $f24, $f0
.L8024A774:
/* 179054 8024A774 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft)
/* 179058 8024A778 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0)
/* 17905C 8024A77C 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal)
/* 179060 8024A780 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 179064 8024A784 44822000 */ mtc1 $v0, $f4
/* 179068 8024A788 00000000 */ nop
/* 17906C 8024A78C 46802120 */ cvt.s.w $f4, $f4
/* 179070 8024A790 44830000 */ mtc1 $v1, $f0
.L8024A794:
/* 179074 8024A794 00000000 */ nop
/* 179078 8024A798 46800020 */ cvt.s.w $f0, $f0
/* 17907C 8024A79C 46002103 */ div.s $f4, $f4, $f0
.L8024A7A0:
/* 179080 8024A7A0 3C01802A */ lui $at, %hi(BattleCam_InitialPosX)
/* 179084 8024A7A4 C434F2A8 */ lwc1 $f20, %lo(BattleCam_InitialPosX)($at)
/* 179088 8024A7A8 4604A502 */ mul.s $f20, $f20, $f4
/* 17908C 8024A7AC 00000000 */ nop
/* 179090 8024A7B0 3C01802A */ lui $at, %hi(BattleCam_InitialPosY)
/* 179094 8024A7B4 C432F2AC */ lwc1 $f18, %lo(BattleCam_InitialPosY)($at)
/* 179098 8024A7B8 46049482 */ mul.s $f18, $f18, $f4
/* 17909C 8024A7BC 00000000 */ nop
/* 1790A0 8024A7C0 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ)
/* 1790A4 8024A7C4 C430F2B0 */ lwc1 $f16, %lo(BattleCam_InitialPosZ)($at)
/* 1790A8 8024A7C8 46048402 */ mul.s $f16, $f16, $f4
/* 1790AC 8024A7CC 00000000 */ nop
D_8024A7D0_DD74A0:
/* 1790B0 8024A7D0 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset)
/* 1790B4 8024A7D4 C426F298 */ lwc1 $f6, %lo(BattleCam_InitialBoomZOffset)($at)
D_8024A7D8_DD74A8:
/* 1790B8 8024A7D8 46043182 */ mul.s $f6, $f6, $f4
/* 1790BC 8024A7DC 00000000 */ nop
jtbl_8024A7E0:
/* 1790C0 8024A7E0 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength)
/* 1790C4 8024A7E4 C42CF28C */ lwc1 $f12, %lo(BattleCam_InitialBoomLength)($at)
/* 1790C8 8024A7E8 46046302 */ mul.s $f12, $f12, $f4
/* 1790CC 8024A7EC 00000000 */ nop
/* 1790D0 8024A7F0 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw)
/* 1790D4 8024A7F4 C428F290 */ lwc1 $f8, %lo(BattleCam_InitialBoomYaw)($at)
/* 1790D8 8024A7F8 46044202 */ mul.s $f8, $f8, $f4
/* 1790DC 8024A7FC 00000000 */ nop
/* 1790E0 8024A800 3C013F80 */ lui $at, (0x3F800000 >> 16)
/* 1790E4 8024A804 44811000 */ mtc1 $at, $f2
/* 1790E8 8024A808 00000000 */ nop
/* 1790EC 8024A80C 46041081 */ sub.s $f2, $f2, $f4
/* 1790F0 8024A810 4602D682 */ mul.s $f26, $f26, $f2
/* 1790F4 8024A814 00000000 */ nop
/* 1790F8 8024A818 4602E602 */ mul.s $f24, $f28, $f2
/* 1790FC 8024A81C 00000000 */ nop
/* 179100 8024A820 3C02802A */ lui $v0, %hi(BattleCam_BoomZOffset)
.L8024A824:
/* 179104 8024A824 8442F286 */ lh $v0, %lo(BattleCam_BoomZOffset)($v0)
/* 179108 8024A828 44820000 */ mtc1 $v0, $f0
/* 17910C 8024A82C 00000000 */ nop
/* 179110 8024A830 46800020 */ cvt.s.w $f0, $f0
/* 179114 8024A834 46020002 */ mul.s $f0, $f0, $f2
/* 179118 8024A838 00000000 */ nop
.L8024A83C:
/* 17911C 8024A83C C7AE0010 */ lwc1 $f14, 0x10($sp)
/* 179120 8024A840 46027582 */ mul.s $f22, $f14, $f2
/* 179124 8024A844 00000000 */ nop
/* 179128 8024A848 3C02802A */ lui $v0, %hi(BattleCam_BoomLength)
/* 17912C 8024A84C 8442F280 */ lh $v0, %lo(BattleCam_BoomLength)($v0)
/* 179130 8024A850 44827000 */ mtc1 $v0, $f14
/* 179134 8024A854 00000000 */ nop
/* 179138 8024A858 468073A0 */ cvt.s.w $f14, $f14
/* 17913C 8024A85C 46027382 */ mul.s $f14, $f14, $f2
/* 179140 8024A860 00000000 */ nop
/* 179144 8024A864 3C02802A */ lui $v0, %hi(BattleCam_BoomYaw)
/* 179148 8024A868 8442F282 */ lh $v0, %lo(BattleCam_BoomYaw)($v0)
/* 17914C 8024A86C 44825000 */ mtc1 $v0, $f10
/* 179150 8024A870 00000000 */ nop
/* 179154 8024A874 468052A0 */ cvt.s.w $f10, $f10
/* 179158 8024A878 46025282 */ mul.s $f10, $f10, $f2
/* 17915C 8024A87C 00000000 */ nop
/* 179160 8024A880 46003180 */ add.s $f6, $f6, $f0
/* 179164 8024A884 3C014380 */ lui $at, (0x43800000 >> 16)
.L8024A888:
/* 179168 8024A888 44810000 */ mtc1 $at, $f0
D_8024A88C:
/* 17916C 8024A88C 00000000 */ nop
/* 179170 8024A890 46003182 */ mul.s $f6, $f6, $f0
/* 179174 8024A894 00000000 */ nop
/* 179178 8024A898 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch)
.L8024A89C:
/* 17917C 8024A89C C420F294 */ lwc1 $f0, %lo(BattleCam_InitialBoomPitch)($at)
/* 179180 8024A8A0 46040002 */ mul.s $f0, $f0, $f4
/* 179184 8024A8A4 00000000 */ nop
/* 179188 8024A8A8 461AA500 */ add.s $f20, $f20, $f26
/* 17918C 8024A8AC 46189480 */ add.s $f18, $f18, $f24
D_8024A8B0:
/* 179190 8024A8B0 46168400 */ add.s $f16, $f16, $f22
/* 179194 8024A8B4 3C02802A */ lui $v0, %hi(BattleCam_BoomPitch)
/* 179198 8024A8B8 8442F284 */ lh $v0, %lo(BattleCam_BoomPitch)($v0)
/* 17919C 8024A8BC 460A4200 */ add.s $f8, $f8, $f10
/* 1791A0 8024A8C0 E7AE0018 */ swc1 $f14, 0x18($sp)
/* 1791A4 8024A8C4 E6340054 */ swc1 $f20, 0x54($s1)
/* 1791A8 8024A8C8 460E6300 */ add.s $f12, $f12, $f14
/* 1791AC 8024A8CC 3C04802A */ lui $a0, %hi(BattleCam_MoveTimeLeft)
/* 1791B0 8024A8D0 2484F29E */ addiu $a0, $a0, %lo(BattleCam_MoveTimeLeft)
/* 1791B4 8024A8D4 44822000 */ mtc1 $v0, $f4
/* 1791B8 8024A8D8 00000000 */ nop
D_8024A8DC:
/* 1791BC 8024A8DC 46802120 */ cvt.s.w $f4, $f4
/* 1791C0 8024A8E0 46022102 */ mul.s $f4, $f4, $f2
.L8024A8E4:
/* 1791C4 8024A8E4 00000000 */ nop
/* 1791C8 8024A8E8 E6320058 */ swc1 $f18, 0x58($s1)
/* 1791CC 8024A8EC E630005C */ swc1 $f16, 0x5C($s1)
/* 1791D0 8024A8F0 4600638D */ trunc.w.s $f14, $f12
/* 1791D4 8024A8F4 44027000 */ mfc1 $v0, $f14
/* 1791D8 8024A8F8 00000000 */ nop
/* 1791DC 8024A8FC A622001E */ sh $v0, 0x1E($s1)
/* 1791E0 8024A900 46040000 */ add.s $f0, $f0, $f4
/* 1791E4 8024A904 4600438D */ trunc.w.s $f14, $f8
D_8024A908:
/* 1791E8 8024A908 44027000 */ mfc1 $v0, $f14
.L8024A90C:
/* 1791EC 8024A90C 00000000 */ nop
/* 1791F0 8024A910 A6220024 */ sh $v0, 0x24($s1)
/* 1791F4 8024A914 4600038D */ trunc.w.s $f14, $f0
/* 1791F8 8024A918 44027000 */ mfc1 $v0, $f14
/* 1791FC 8024A91C 00000000 */ nop
/* 179200 8024A920 A6220022 */ sh $v0, 0x22($s1)
/* 179204 8024A924 4600338D */ trunc.w.s $f14, $f6
/* 179208 8024A928 44027000 */ mfc1 $v0, $f14
/* 17920C 8024A92C 00000000 */ nop
/* 179210 8024A930 A6220026 */ sh $v0, 0x26($s1)
/* 179214 8024A934 84820000 */ lh $v0, 0x0($a0)
.L8024A938:
/* 179218 8024A938 94830000 */ lhu $v1, 0x0($a0)
/* 17921C 8024A93C 14400006 */ bnez $v0, .L8024A958
/* 179220 8024A940 2462FFFF */ addiu $v0, $v1, -0x1
/* 179224 8024A944 24020001 */ addiu $v0, $zero, 0x1
/* 179228 8024A948 3C01802A */ lui $at, %hi(BattleCam_DoneMoving)
/* 17922C 8024A94C A022F29C */ sb $v0, %lo(BattleCam_DoneMoving)($at)
/* 179230 8024A950 08092A58 */ j .L8024A960
/* 179234 8024A954 0000102D */ daddu $v0, $zero, $zero
.L8024A958:
/* 179238 8024A958 A4820000 */ sh $v0, 0x0($a0)
/* 17923C 8024A95C 0000102D */ daddu $v0, $zero, $zero
.L8024A960:
/* 179240 8024A960 8FBF002C */ lw $ra, 0x2C($sp)
/* 179244 8024A964 8FB20028 */ lw $s2, 0x28($sp)
/* 179248 8024A968 8FB10024 */ lw $s1, 0x24($sp)
D_8024A96C:
/* 17924C 8024A96C 8FB00020 */ lw $s0, 0x20($sp)
D_8024A970_DD7640:
/* 179250 8024A970 D7BE0058 */ ldc1 $f30, 0x58($sp)
/* 179254 8024A974 D7BC0050 */ ldc1 $f28, 0x50($sp)
D_8024A978_DD7648:
/* 179258 8024A978 D7BA0048 */ ldc1 $f26, 0x48($sp)
/* 17925C 8024A97C D7B80040 */ ldc1 $f24, 0x40($sp)
jtbl_8024A980:
/* 179260 8024A980 D7B60038 */ ldc1 $f22, 0x38($sp)
/* 179264 8024A984 D7B40030 */ ldc1 $f20, 0x30($sp)
/* 179268 8024A988 03E00008 */ jr $ra
.L8024A98C:
/* 17926C 8024A98C 27BD0060 */ addiu $sp, $sp, 0x60
### DECOMPILED C INSTRUCTIONS:
s32 CamPresetUpdate_G(Evt* script, s32 isInitialCall) {
Actor* actor;
Actor* targetActor;
Actor* enemyActor;
ActorPart* actorPart;
Camera* camera = &gCameras[CAM_BATTLE];
BattleStatus* battleStatus = &gBattleStatus;
f32 x, y, z;
f32 middlePosX, middlePosY, middlePosZ;
f32 targetX, targetY, targetZ;
f32 sizeX, sizeY;
f32 targetAverageSize;
f32 alpha;
s32 actorClass = BattleCam_TargetActor & ACTOR_CLASS_MASK;
s32 actorID = BattleCam_TargetActor & 0xFF;
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
actor = battleStatus->playerActor;
if (actor == NULL) {
return ApiStatus_BLOCK;
}
x = actor->currentPos.x;
y = actor->currentPos.y + actor->size.y / 2 + actor->size.y / 4;
z = actor->currentPos.z;
sizeY = actor->size.y;
sizeX = actor->size.x;
targetActor = get_actor(actor->targetActorID);
if (targetActor == NULL) {
return ApiStatus_BLOCK;
}
targetX = targetActor->currentPos.x;
targetY = targetActor->currentPos.y + targetActor->size.y / 2 + targetActor->size.y / 4;
targetZ = targetActor->currentPos.z;
targetAverageSize = (targetActor->size.y + targetActor->size.x) / 2;
middlePosX = x + (targetX - x) / 2;
if (BattleCam_ModeY > BTL_CAM_MODEY_MINUS_1) {
if (BattleCam_ModeY != BTL_CAM_MODEY_0) {
middlePosY = targetY + (y - targetY) * 0.5f + (y - targetY) / 6.0f;
} else {
middlePosY = y;
}
} else {
middlePosY = camera->lookAt_obj_target.y;
}
middlePosZ = z + (targetZ - z) / 2;
break;
case ACTOR_CLASS_PARTNER:
actor = battleStatus->partnerActor;
if (actor == NULL) {
return ApiStatus_BLOCK;
}
x = actor->currentPos.x;
y = actor->currentPos.y + actor->size.y / 2 + actor->size.y / 4;
z = actor->currentPos.z;
sizeY = actor->size.y;
sizeX = actor->size.x;
targetActor = get_actor(actor->targetActorID);
if (targetActor == NULL) {
return ApiStatus_BLOCK;
}
targetX = targetActor->currentPos.x;
targetY = targetActor->currentPos.y + targetActor->size.y / 2 + targetActor->size.y / 4;
targetZ = targetActor->currentPos.z;
targetAverageSize = (targetActor->size.y + targetActor->size.x) / 2;
middlePosX = x + (targetX - x) / 2;
if (BattleCam_ModeY > BTL_CAM_MODEY_MINUS_1) {
if (BattleCam_ModeY != BTL_CAM_MODEY_0) {
middlePosY = targetY + (y - targetY) * 0.5f + (y - targetY) / 6.0f;
} else {
middlePosY = y;
}
} else {
middlePosY = camera->lookAt_obj_target.y;
}
middlePosZ = z + (targetZ - z) / 2;
break;
case ACTOR_CLASS_ENEMY:
targetActor = battleStatus->enemyActors[actorID];
if (targetActor == NULL) {
return ApiStatus_BLOCK;
}
actorPart = get_actor_part(targetActor, BattleCam_TargetActorPart);
x = actorPart->absolutePosition.x;
y = actorPart->absolutePosition.y + actorPart->size.y / 2 + actorPart->size.y / 4;
z = actorPart->absolutePosition.z;
sizeY = actorPart->size.y;
sizeX = actorPart->size.x;
targetActor = get_actor(targetActor->targetActorID);
if (targetActor == NULL) {
return ApiStatus_BLOCK;
}
targetX = targetActor->currentPos.x;
targetY = targetActor->currentPos.y + targetActor->size.y / 2 + targetActor->size.y / 4;
targetZ = targetActor->currentPos.z;
targetAverageSize = (targetActor->size.y + targetActor->size.x) / 2;
middlePosX = x + (targetX - x) / 2;
if (BattleCam_ModeY > BTL_CAM_MODEY_MINUS_1) {
if (BattleCam_ModeY != BTL_CAM_MODEY_0) {
middlePosY = targetY + (y - targetY) * 0.5f + (y - targetY) / 6.0f;
} else {
middlePosY = y;
}
} else {
middlePosY = camera->lookAt_obj_target.y;
}
middlePosZ = z + (targetZ - z) / 2;
break;
default:
return ApiStatus_DONE2;
}
if (D_8029F2A6) {
f32 upperBound = (500.0f - BattleCam_InitialBoomLength) * 0.4 + 30.0;
f32 lowerBound = -upperBound;
if (middlePosX < lowerBound) {
middlePosX += (lowerBound - middlePosX) / 2;
}
if (middlePosX > upperBound) {
middlePosX += (upperBound - middlePosX) / 2;
}
}
if (isInitialCall) {
sizeX -= 24.0f;
sizeY -= 24.0f;
if (sizeX < 0.0f) {
sizeX = 0.0f;
}
if (sizeY < 0.0f) {
sizeY = 0.0f;
}
BattleCam_BoomLength += sizeX + sizeY;
if (BattleCam_SetImmediately) {
camera->lookAt_obj_target.x = middlePosX;
camera->lookAt_obj_target.y = middlePosY;
camera->lookAt_obj_target.z = middlePosZ;
camera->auxBoomLength = BattleCam_BoomLength;
camera->auxBoomZOffset = BattleCam_BoomZOffset * 256;
camera->auxBoomYaw = BattleCam_BoomYaw;
camera->auxBoomPitch = BattleCam_BoomPitch;
}
BattleCam_InitialBoomLength = camera->auxBoomLength;
BattleCam_InitialBoomPitch = camera->auxBoomPitch;
BattleCam_InitialBoomYaw = camera->auxBoomYaw;
BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
BattleCam_InitialPosX = camera->lookAt_obj_target.x;
BattleCam_InitialPosY = camera->lookAt_obj_target.y;
BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
}
if (!BattleCam_UseLinearInterp) {
alpha = BattleCam_MoveTimeLeft;
alpha /= BattleCam_MoveTimeTotal;
alpha = 1.0f - sin_rad(sin_rad(sin_rad((1.0f - alpha) * PI_S / 2) * PI_S / 2) * PI_S / 2);
} else {
alpha = BattleCam_MoveTimeLeft;
alpha /= BattleCam_MoveTimeTotal;
}
x = camera->lookAt_obj_target.x;
y = camera->lookAt_obj_target.y;
z = camera->lookAt_obj_target.z;
camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, middlePosX, alpha);
camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, middlePosY, alpha);
camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, middlePosZ, alpha);
camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
camera->auxBoomYaw = LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
camera->auxBoomPitch = LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);
if (BattleCam_MoveTimeLeft == 0) {
BattleCam_DoneMoving = TRUE;
} else {
BattleCam_MoveTimeLeft--;
}
return ApiStatus_BLOCK;
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel windy_leaves_update
/* 35DD0C E005630C 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 35DD10 E0056310 AFB40020 */ sw $s4, 0x20($sp)
/* 35DD14 E0056314 0080A02D */ daddu $s4, $a0, $zero
/* 35DD18 E0056318 AFBF0024 */ sw $ra, 0x24($sp)
/* 35DD1C E005631C AFB3001C */ sw $s3, 0x1C($sp)
/* 35DD20 E0056320 AFB20018 */ sw $s2, 0x18($sp)
/* 35DD24 E0056324 AFB10014 */ sw $s1, 0x14($sp)
/* 35DD28 E0056328 AFB00010 */ sw $s0, 0x10($sp)
/* 35DD2C E005632C F7BC0048 */ sdc1 $f28, 0x48($sp)
/* 35DD30 E0056330 F7BA0040 */ sdc1 $f26, 0x40($sp)
/* 35DD34 E0056334 F7B80038 */ sdc1 $f24, 0x38($sp)
/* 35DD38 E0056338 F7B60030 */ sdc1 $f22, 0x30($sp)
/* 35DD3C E005633C F7B40028 */ sdc1 $f20, 0x28($sp)
/* 35DD40 E0056340 8E84000C */ lw $a0, 0xC($s4)
/* 35DD44 E0056344 8C820028 */ lw $v0, 0x28($a0)
/* 35DD48 E0056348 8C85002C */ lw $a1, 0x2C($a0)
/* 35DD4C E005634C 2442FFFF */ addiu $v0, $v0, -0x1
/* 35DD50 E0056350 AC820028 */ sw $v0, 0x28($a0)
/* 35DD54 E0056354 0040302D */ daddu $a2, $v0, $zero
/* 35DD58 E0056358 24A20001 */ addiu $v0, $a1, 0x1
/* 35DD5C E005635C 04C10005 */ bgez $a2, .LE0056374
/* 35DD60 E0056360 AC82002C */ sw $v0, 0x2C($a0)
/* 35DD64 E0056364 0C080128 */ jal shim_remove_effect
/* 35DD68 E0056368 0280202D */ daddu $a0, $s4, $zero
/* 35DD6C E005636C 08015AD6 */ j .LE0056B58
/* 35DD70 E0056370 00000000 */ nop
.LE0056374:
/* 35DD74 E0056374 8C930000 */ lw $s3, 0x0($a0)
/* 35DD78 E0056378 2842000A */ slti $v0, $v0, 0xA
/* 35DD7C E005637C 10400010 */ beqz $v0, .LE00563C0
/* 35DD80 E0056380 240200FF */ addiu $v0, $zero, 0xFF
/* 35DD84 E0056384 8C830024 */ lw $v1, 0x24($a0)
/* 35DD88 E0056388 3C01E005 */ lui $at, (0xE0056EB8 >> 16)
/* 35DD8C E005638C D4206EB8 */ ldc1 $f0, (0xE0056EB8 & 0xFFFF)($at)
/* 35DD90 E0056390 00431023 */ subu $v0, $v0, $v1
/* 35DD94 E0056394 44821000 */ mtc1 $v0, $f2
/* 35DD98 E0056398 00000000 */ nop
/* 35DD9C E005639C 468010A1 */ cvt.d.w $f2, $f2
/* 35DDA0 E00563A0 46201082 */ mul.d $f2, $f2, $f0
/* 35DDA4 E00563A4 00000000 */ nop
/* 35DDA8 E00563A8 44830000 */ mtc1 $v1, $f0
/* 35DDAC E00563AC 00000000 */ nop
/* 35DDB0 E00563B0 46800021 */ cvt.d.w $f0, $f0
/* 35DDB4 E00563B4 46220000 */ add.d $f0, $f0, $f2
/* 35DDB8 E00563B8 4620028D */ trunc.w.d $f10, $f0
/* 35DDBC E00563BC E48A0024 */ swc1 $f10, 0x24($a0)
.LE00563C0:
/* 35DDC0 E00563C0 28C2000A */ slti $v0, $a2, 0xA
/* 35DDC4 E00563C4 10400009 */ beqz $v0, .LE00563EC
/* 35DDC8 E00563C8 24020001 */ addiu $v0, $zero, 0x1
/* 35DDCC E00563CC 3C01E005 */ lui $at, (0xE0056EC0 >> 16)
/* 35DDD0 E00563D0 D4226EC0 */ ldc1 $f2, (0xE0056EC0 & 0xFFFF)($at)
/* 35DDD4 E00563D4 C4800024 */ lwc1 $f0, 0x24($a0)
/* 35DDD8 E00563D8 46800021 */ cvt.d.w $f0, $f0
/* 35DDDC E00563DC 46220002 */ mul.d $f0, $f0, $f2
/* 35DDE0 E00563E0 00000000 */ nop
/* 35DDE4 E00563E4 4620028D */ trunc.w.d $f10, $f0
/* 35DDE8 E00563E8 E48A0024 */ swc1 $f10, 0x24($a0)
.LE00563EC:
/* 35DDEC E00563EC 126200E6 */ beq $s3, $v0, .LE0056788
/* 35DDF0 E00563F0 2484003C */ addiu $a0, $a0, 0x3C
/* 35DDF4 E00563F4 2A620002 */ slti $v0, $s3, 0x2
/* 35DDF8 E00563F8 50400005 */ beql $v0, $zero, .LE0056410
/* 35DDFC E00563FC 24020002 */ addiu $v0, $zero, 0x2
/* 35DE00 E0056400 12600007 */ beqz $s3, .LE0056420
/* 35DE04 E0056404 24120001 */ addiu $s2, $zero, 0x1
/* 35DE08 E0056408 08015AD6 */ j .LE0056B58
/* 35DE0C E005640C 00000000 */ nop
.LE0056410:
/* 35DE10 E0056410 1262019E */ beq $s3, $v0, .LE0056A8C
/* 35DE14 E0056414 24120001 */ addiu $s2, $zero, 0x1
/* 35DE18 E0056418 08015AD6 */ j .LE0056B58
/* 35DE1C E005641C 00000000 */ nop
.LE0056420:
/* 35DE20 E0056420 8E820008 */ lw $v0, 0x8($s4)
/* 35DE24 E0056424 0242102A */ slt $v0, $s2, $v0
/* 35DE28 E0056428 104001CB */ beqz $v0, .LE0056B58
/* 35DE2C E005642C 2490000C */ addiu $s0, $a0, 0xC
/* 35DE30 E0056430 24B10015 */ addiu $s1, $a1, 0x15
/* 35DE34 E0056434 3C01BD4C */ lui $at, (0xBD4CCCCD >> 16)
/* 35DE38 E0056438 3421CCCD */ ori $at, $at, (0xBD4CCCCD & 0xFFFF)
/* 35DE3C E005643C 4481E000 */ mtc1 $at, $f28
/* 35DE40 E0056440 3C014120 */ lui $at, (0x41200000 >> 16)
/* 35DE44 E0056444 4481D000 */ mtc1 $at, $f26
/* 35DE48 E0056448 3C01E005 */ lui $at, (0xE0056EC8 >> 16)
/* 35DE4C E005644C D4346EC8 */ ldc1 $f20, (0xE0056EC8 & 0xFFFF)($at)
/* 35DE50 E0056450 4480C000 */ mtc1 $zero, $f24
/* 35DE54 E0056454 3C01E005 */ lui $at, (0xE0056ED0 >> 16)
/* 35DE58 E0056458 D4366ED0 */ ldc1 $f22, (0xE0056ED0 & 0xFFFF)($at)
.LE005645C:
/* 35DE5C E005645C C60C000C */ lwc1 $f12, 0xC($s0)
/* 35DE60 E0056460 0C080140 */ jal shim_sin_deg
/* 35DE64 E0056464 460C6300 */ add.s $f12, $f12, $f12
/* 35DE68 E0056468 3C01E005 */ lui $at, (0xE0056ED8 >> 16)
/* 35DE6C E005646C D4226ED8 */ ldc1 $f2, (0xE0056ED8 & 0xFFFF)($at)
/* 35DE70 E0056470 46000021 */ cvt.d.s $f0, $f0
/* 35DE74 E0056474 46220002 */ mul.d $f0, $f0, $f2
/* 35DE78 E0056478 00000000 */ nop
/* 35DE7C E005647C C6020008 */ lwc1 $f2, 0x8($s0)
/* 35DE80 E0056480 461C1080 */ add.s $f2, $f2, $f28
/* 35DE84 E0056484 C6040004 */ lwc1 $f4, 0x4($s0)
/* 35DE88 E0056488 46200020 */ cvt.s.d $f0, $f0
/* 35DE8C E005648C 46002000 */ add.s $f0, $f4, $f0
/* 35DE90 E0056490 E6020008 */ swc1 $f2, 0x8($s0)
/* 35DE94 E0056494 16600019 */ bnez $s3, .LE00564FC
/* 35DE98 E0056498 E6000004 */ swc1 $f0, 0x4($s0)
/* 35DE9C E005649C 3C01E005 */ lui $at, (0xE0056EE0 >> 16)
/* 35DEA0 E00564A0 D4226EE0 */ ldc1 $f2, (0xE0056EE0 & 0xFFFF)($at)
/* 35DEA4 E00564A4 46000021 */ cvt.d.s $f0, $f0
/* 35DEA8 E00564A8 46220002 */ mul.d $f0, $f0, $f2
/* 35DEAC E00564AC 00000000 */ nop
/* 35DEB0 E00564B0 C60C000C */ lwc1 $f12, 0xC($s0)
/* 35DEB4 E00564B4 46200020 */ cvt.s.d $f0, $f0
/* 35DEB8 E00564B8 0C080140 */ jal shim_sin_deg
/* 35DEBC E00564BC E6000004 */ swc1 $f0, 0x4($s0)
/* 35DEC0 E00564C0 3C01E005 */ lui $at, (0xE0056EE8 >> 16)
/* 35DEC4 E00564C4 D4226EE8 */ ldc1 $f2, (0xE0056EE8 & 0xFFFF)($at)
/* 35DEC8 E00564C8 46000021 */ cvt.d.s $f0, $f0
/* 35DECC E00564CC 46220002 */ mul.d $f0, $f0, $f2
/* 35DED0 E00564D0 00000000 */ nop
/* 35DED4 E00564D4 3C01E005 */ lui $at, (0xE0056EF0 >> 16)
/* 35DED8 E00564D8 D4246EF0 */ ldc1 $f4, (0xE0056EF0 & 0xFFFF)($at)
/* 35DEDC E00564DC C6020008 */ lwc1 $f2, 0x8($s0)
/* 35DEE0 E00564E0 46240000 */ add.d $f0, $f0, $f4
/* 35DEE4 E00564E4 460010A1 */ cvt.d.s $f2, $f2
/* 35DEE8 E00564E8 46201082 */ mul.d $f2, $f2, $f0
/* 35DEEC E00564EC 00000000 */ nop
/* 35DEF0 E00564F0 462010A0 */ cvt.s.d $f2, $f2
/* 35DEF4 E00564F4 0801594A */ j .LE0056528
/* 35DEF8 E00564F8 E6020008 */ swc1 $f2, 0x8($s0)
.LE00564FC:
/* 35DEFC E00564FC C6000004 */ lwc1 $f0, 0x4($s0)
/* 35DF00 E0056500 3C01E005 */ lui $at, (0xE0056EF8 >> 16)
/* 35DF04 E0056504 D4226EF8 */ ldc1 $f2, (0xE0056EF8 & 0xFFFF)($at)
/* 35DF08 E0056508 46000021 */ cvt.d.s $f0, $f0
/* 35DF0C E005650C 46220002 */ mul.d $f0, $f0, $f2
/* 35DF10 E0056510 00000000 */ nop
/* 35DF14 E0056514 C6020008 */ lwc1 $f2, 0x8($s0)
/* 35DF18 E0056518 461C1080 */ add.s $f2, $f2, $f28
/* 35DF1C E005651C E6020008 */ swc1 $f2, 0x8($s0)
/* 35DF20 E0056520 46200020 */ cvt.s.d $f0, $f0
/* 35DF24 E0056524 E6000004 */ swc1 $f0, 0x4($s0)
.LE0056528:
/* 35DF28 E0056528 24040032 */ addiu $a0, $zero, 0x32
/* 35DF2C E005652C 0C080011 */ jal func_E0200044
/* 35DF30 E0056530 0220282D */ daddu $a1, $s1, $zero
/* 35DF34 E0056534 2442FFE7 */ addiu $v0, $v0, -0x19
/* 35DF38 E0056538 C60C0010 */ lwc1 $f12, 0x10($s0)
/* 35DF3C E005653C 44820000 */ mtc1 $v0, $f0
/* 35DF40 E0056540 00000000 */ nop
/* 35DF44 E0056544 46800020 */ cvt.s.w $f0, $f0
/* 35DF48 E0056548 46006300 */ add.s $f12, $f12, $f0
/* 35DF4C E005654C 0C080140 */ jal shim_sin_deg
/* 35DF50 E0056550 E60C0010 */ swc1 $f12, 0x10($s0)
/* 35DF54 E0056554 C60C0010 */ lwc1 $f12, 0x10($s0)
/* 35DF58 E0056558 3C013FE0 */ lui $at, (0x3FE00000 >> 16)
/* 35DF5C E005655C 44811800 */ mtc1 $at, $f3
/* 35DF60 E0056560 44801000 */ mtc1 $zero, $f2
/* 35DF64 E0056564 46006321 */ cvt.d.s $f12, $f12
/* 35DF68 E0056568 46226302 */ mul.d $f12, $f12, $f2
/* 35DF6C E005656C 00000000 */ nop
/* 35DF70 E0056570 461A0002 */ mul.s $f0, $f0, $f26
/* 35DF74 E0056574 00000000 */ nop
/* 35DF78 E0056578 C602000C */ lwc1 $f2, 0xC($s0)
/* 35DF7C E005657C 46001080 */ add.s $f2, $f2, $f0
/* 35DF80 E0056580 E602000C */ swc1 $f2, 0xC($s0)
/* 35DF84 E0056584 0C080144 */ jal shim_cos_deg
/* 35DF88 E0056588 46206320 */ cvt.s.d $f12, $f12
/* 35DF8C E005658C 461A0002 */ mul.s $f0, $f0, $f26
/* 35DF90 E0056590 00000000 */ nop
/* 35DF94 E0056594 C606FFF8 */ lwc1 $f6, -0x8($s0)
/* 35DF98 E0056598 C6020004 */ lwc1 $f2, 0x4($s0)
/* 35DF9C E005659C C604FFFC */ lwc1 $f4, -0x4($s0)
/* 35DFA0 E00565A0 46023180 */ add.s $f6, $f6, $f2
/* 35DFA4 E00565A4 C6020008 */ lwc1 $f2, 0x8($s0)
/* 35DFA8 E00565A8 46022100 */ add.s $f4, $f4, $f2
/* 35DFAC E00565AC C6020014 */ lwc1 $f2, 0x14($s0)
/* 35DFB0 E00565B0 3C0141F0 */ lui $at, (0x41F00000 >> 16)
/* 35DFB4 E00565B4 44814000 */ mtc1 $at, $f8
/* 35DFB8 E00565B8 46001080 */ add.s $f2, $f2, $f0
/* 35DFBC E00565BC E606FFF8 */ swc1 $f6, -0x8($s0)
/* 35DFC0 E00565C0 E604FFFC */ swc1 $f4, -0x4($s0)
/* 35DFC4 E00565C4 4608203C */ c.lt.s $f4, $f8
/* 35DFC8 E00565C8 00000000 */ nop
/* 35DFCC E00565CC 45000032 */ bc1f .LE0056698
/* 35DFD0 E00565D0 E6020014 */ swc1 $f2, 0x14($s0)
/* 35DFD4 E00565D4 3C01C348 */ lui $at, (0xC3480000 >> 16)
/* 35DFD8 E00565D8 44810000 */ mtc1 $at, $f0
/* 35DFDC E00565DC 46003086 */ mov.s $f2, $f6
/* 35DFE0 E00565E0 4602003C */ c.lt.s $f0, $f2
/* 35DFE4 E00565E4 00000000 */ nop
/* 35DFE8 E00565E8 45000005 */ bc1f .LE0056600
/* 35DFEC E00565EC 00000000 */ nop
/* 35DFF0 E00565F0 C6000024 */ lwc1 $f0, 0x24($s0)
/* 35DFF4 E00565F4 46000021 */ cvt.d.s $f0, $f0
/* 35DFF8 E00565F8 08015983 */ j .LE005660C
/* 35DFFC E00565FC 46340001 */ sub.d $f0, $f0, $f20
.LE0056600:
/* 35E000 E0056600 C6000024 */ lwc1 $f0, 0x24($s0)
/* 35E004 E0056604 46000021 */ cvt.d.s $f0, $f0
/* 35E008 E0056608 46340000 */ add.d $f0, $f0, $f20
.LE005660C:
/* 35E00C E005660C 46200020 */ cvt.s.d $f0, $f0
/* 35E010 E0056610 E6000024 */ swc1 $f0, 0x24($s0)
/* 35E014 E0056614 C6000000 */ lwc1 $f0, 0x0($s0)
/* 35E018 E0056618 4600C03C */ c.lt.s $f24, $f0
/* 35E01C E005661C 00000000 */ nop
/* 35E020 E0056620 45000005 */ bc1f .LE0056638
/* 35E024 E0056624 00000000 */ nop
/* 35E028 E0056628 C600002C */ lwc1 $f0, 0x2C($s0)
/* 35E02C E005662C 46000021 */ cvt.d.s $f0, $f0
/* 35E030 E0056630 08015991 */ j .LE0056644
/* 35E034 E0056634 46340001 */ sub.d $f0, $f0, $f20
.LE0056638:
/* 35E038 E0056638 C600002C */ lwc1 $f0, 0x2C($s0)
/* 35E03C E005663C 46000021 */ cvt.d.s $f0, $f0
/* 35E040 E0056640 46340000 */ add.d $f0, $f0, $f20
.LE0056644:
/* 35E044 E0056644 46200020 */ cvt.s.d $f0, $f0
/* 35E048 E0056648 E600002C */ swc1 $f0, 0x2C($s0)
/* 35E04C E005664C C6040024 */ lwc1 $f4, 0x24($s0)
/* 35E050 E0056650 46002121 */ cvt.d.s $f4, $f4
/* 35E054 E0056654 46362102 */ mul.d $f4, $f4, $f22
/* 35E058 E0056658 00000000 */ nop
/* 35E05C E005665C C602002C */ lwc1 $f2, 0x2C($s0)
/* 35E060 E0056660 460010A1 */ cvt.d.s $f2, $f2
/* 35E064 E0056664 46361082 */ mul.d $f2, $f2, $f22
/* 35E068 E0056668 00000000 */ nop
/* 35E06C E005666C C6000008 */ lwc1 $f0, 0x8($s0)
/* 35E070 E0056670 46000021 */ cvt.d.s $f0, $f0
/* 35E074 E0056674 46360002 */ mul.d $f0, $f0, $f22
/* 35E078 E0056678 00000000 */ nop
/* 35E07C E005667C 46202120 */ cvt.s.d $f4, $f4
/* 35E080 E0056680 462010A0 */ cvt.s.d $f2, $f2
/* 35E084 E0056684 46200020 */ cvt.s.d $f0, $f0
/* 35E088 E0056688 E6040024 */ swc1 $f4, 0x24($s0)
/* 35E08C E005668C E602002C */ swc1 $f2, 0x2C($s0)
/* 35E090 E0056690 080159CE */ j .LE0056738
/* 35E094 E0056694 E6000008 */ swc1 $f0, 0x8($s0)
.LE0056698:
/* 35E098 E0056698 C600FFF8 */ lwc1 $f0, -0x8($s0)
/* 35E09C E005669C 4600C03C */ c.lt.s $f24, $f0
/* 35E0A0 E00566A0 00000000 */ nop
/* 35E0A4 E00566A4 45000005 */ bc1f .LE00566BC
/* 35E0A8 E00566A8 00000000 */ nop
/* 35E0AC E00566AC C6000024 */ lwc1 $f0, 0x24($s0)
/* 35E0B0 E00566B0 46000021 */ cvt.d.s $f0, $f0
/* 35E0B4 E00566B4 080159B2 */ j .LE00566C8
/* 35E0B8 E00566B8 46340001 */ sub.d $f0, $f0, $f20
.LE00566BC:
/* 35E0BC E00566BC C6000024 */ lwc1 $f0, 0x24($s0)
/* 35E0C0 E00566C0 46000021 */ cvt.d.s $f0, $f0
/* 35E0C4 E00566C4 46340000 */ add.d $f0, $f0, $f20
.LE00566C8:
/* 35E0C8 E00566C8 46200020 */ cvt.s.d $f0, $f0
/* 35E0CC E00566CC E6000024 */ swc1 $f0, 0x24($s0)
/* 35E0D0 E00566D0 C6000000 */ lwc1 $f0, 0x0($s0)
/* 35E0D4 E00566D4 4600C03C */ c.lt.s $f24, $f0
/* 35E0D8 E00566D8 00000000 */ nop
/* 35E0DC E00566DC 45000005 */ bc1f .LE00566F4
/* 35E0E0 E00566E0 00000000 */ nop
/* 35E0E4 E00566E4 C600002C */ lwc1 $f0, 0x2C($s0)
/* 35E0E8 E00566E8 46000021 */ cvt.d.s $f0, $f0
/* 35E0EC E00566EC 080159C0 */ j .LE0056700
/* 35E0F0 E00566F0 46340001 */ sub.d $f0, $f0, $f20
.LE00566F4:
/* 35E0F4 E00566F4 C600002C */ lwc1 $f0, 0x2C($s0)
/* 35E0F8 E00566F8 46000021 */ cvt.d.s $f0, $f0
/* 35E0FC E00566FC 46340000 */ add.d $f0, $f0, $f20
.LE0056700:
/* 35E100 E0056700 46200020 */ cvt.s.d $f0, $f0
/* 35E104 E0056704 E600002C */ swc1 $f0, 0x2C($s0)
/* 35E108 E0056708 C6020024 */ lwc1 $f2, 0x24($s0)
/* 35E10C E005670C 460010A1 */ cvt.d.s $f2, $f2
/* 35E110 E0056710 46361082 */ mul.d $f2, $f2, $f22
/* 35E114 E0056714 00000000 */ nop
/* 35E118 E0056718 C600002C */ lwc1 $f0, 0x2C($s0)
/* 35E11C E005671C 46000021 */ cvt.d.s $f0, $f0
/* 35E120 E0056720 46360002 */ mul.d $f0, $f0, $f22
/* 35E124 E0056724 00000000 */ nop
/* 35E128 E0056728 462010A0 */ cvt.s.d $f2, $f2
/* 35E12C E005672C 46200020 */ cvt.s.d $f0, $f0
/* 35E130 E0056730 E6020024 */ swc1 $f2, 0x24($s0)
/* 35E134 E0056734 E600002C */ swc1 $f0, 0x2C($s0)
.LE0056738:
/* 35E138 E0056738 26310014 */ addiu $s1, $s1, 0x14
/* 35E13C E005673C C606FFF8 */ lwc1 $f6, -0x8($s0)
/* 35E140 E0056740 C6000024 */ lwc1 $f0, 0x24($s0)
/* 35E144 E0056744 C604FFFC */ lwc1 $f4, -0x4($s0)
/* 35E148 E0056748 46003180 */ add.s $f6, $f6, $f0
/* 35E14C E005674C C6000028 */ lwc1 $f0, 0x28($s0)
/* 35E150 E0056750 C602002C */ lwc1 $f2, 0x2C($s0)
/* 35E154 E0056754 46002100 */ add.s $f4, $f4, $f0
/* 35E158 E0056758 C6000000 */ lwc1 $f0, 0x0($s0)
/* 35E15C E005675C 26520001 */ addiu $s2, $s2, 0x1
/* 35E160 E0056760 46020000 */ add.s $f0, $f0, $f2
/* 35E164 E0056764 E606FFF8 */ swc1 $f6, -0x8($s0)
/* 35E168 E0056768 E604FFFC */ swc1 $f4, -0x4($s0)
/* 35E16C E005676C E6000000 */ swc1 $f0, 0x0($s0)
/* 35E170 E0056770 8E820008 */ lw $v0, 0x8($s4)
/* 35E174 E0056774 0242102A */ slt $v0, $s2, $v0
/* 35E178 E0056778 1440FF38 */ bnez $v0, .LE005645C
/* 35E17C E005677C 2610003C */ addiu $s0, $s0, 0x3C
/* 35E180 E0056780 08015AD6 */ j .LE0056B58
/* 35E184 E0056784 00000000 */ nop
.LE0056788:
/* 35E188 E0056788 8E820008 */ lw $v0, 0x8($s4)
/* 35E18C E005678C 24120001 */ addiu $s2, $zero, 0x1
/* 35E190 E0056790 0242102A */ slt $v0, $s2, $v0
/* 35E194 E0056794 104000F0 */ beqz $v0, .LE0056B58
/* 35E198 E0056798 2490000C */ addiu $s0, $a0, 0xC
/* 35E19C E005679C 24B10015 */ addiu $s1, $a1, 0x15
/* 35E1A0 E00567A0 3C01BD4C */ lui $at, (0xBD4CCCCD >> 16)
/* 35E1A4 E00567A4 3421CCCD */ ori $at, $at, (0xBD4CCCCD & 0xFFFF)
/* 35E1A8 E00567A8 4481E000 */ mtc1 $at, $f28
/* 35E1AC E00567AC 3C014120 */ lui $at, (0x41200000 >> 16)
/* 35E1B0 E00567B0 4481D000 */ mtc1 $at, $f26
/* 35E1B4 E00567B4 3C01E005 */ lui $at, (0xE0056F00 >> 16)
/* 35E1B8 E00567B8 D4346F00 */ ldc1 $f20, (0xE0056F00 & 0xFFFF)($at)
/* 35E1BC E00567BC 4480C000 */ mtc1 $zero, $f24
/* 35E1C0 E00567C0 3C01E005 */ lui $at, (0xE0056F08 >> 16)
/* 35E1C4 E00567C4 D4366F08 */ ldc1 $f22, (0xE0056F08 & 0xFFFF)($at)
.LE00567C8:
/* 35E1C8 E00567C8 C60C000C */ lwc1 $f12, 0xC($s0)
/* 35E1CC E00567CC 0C080140 */ jal shim_sin_deg
/* 35E1D0 E00567D0 460C6300 */ add.s $f12, $f12, $f12
/* 35E1D4 E00567D4 3C01E005 */ lui $at, (0xE0056F10 >> 16)
/* 35E1D8 E00567D8 D4226F10 */ ldc1 $f2, (0xE0056F10 & 0xFFFF)($at)
/* 35E1DC E00567DC 46000021 */ cvt.d.s $f0, $f0
/* 35E1E0 E00567E0 46220002 */ mul.d $f0, $f0, $f2
/* 35E1E4 E00567E4 00000000 */ nop
/* 35E1E8 E00567E8 46200000 */ add.d $f0, $f0, $f0
/* 35E1EC E00567EC C6020004 */ lwc1 $f2, 0x4($s0)
/* 35E1F0 E00567F0 46200020 */ cvt.s.d $f0, $f0
/* 35E1F4 E00567F4 46001080 */ add.s $f2, $f2, $f0
/* 35E1F8 E00567F8 3C01E005 */ lui $at, (0xE0056F18 >> 16)
/* 35E1FC E00567FC D4206F18 */ ldc1 $f0, (0xE0056F18 & 0xFFFF)($at)
/* 35E200 E0056800 E6020004 */ swc1 $f2, 0x4($s0)
/* 35E204 E0056804 460010A1 */ cvt.d.s $f2, $f2
/* 35E208 E0056808 46201082 */ mul.d $f2, $f2, $f0
/* 35E20C E005680C 00000000 */ nop
/* 35E210 E0056810 C6000008 */ lwc1 $f0, 0x8($s0)
/* 35E214 E0056814 461C0000 */ add.s $f0, $f0, $f28
/* 35E218 E0056818 E6000008 */ swc1 $f0, 0x8($s0)
/* 35E21C E005681C 461C0000 */ add.s $f0, $f0, $f28
/* 35E220 E0056820 24040032 */ addiu $a0, $zero, 0x32
/* 35E224 E0056824 0220282D */ daddu $a1, $s1, $zero
/* 35E228 E0056828 E6000008 */ swc1 $f0, 0x8($s0)
/* 35E22C E005682C 462010A0 */ cvt.s.d $f2, $f2
/* 35E230 E0056830 0C080011 */ jal func_E0200044
/* 35E234 E0056834 E6020004 */ swc1 $f2, 0x4($s0)
/* 35E238 E0056838 2442FFE7 */ addiu $v0, $v0, -0x19
/* 35E23C E005683C C60C0010 */ lwc1 $f12, 0x10($s0)
/* 35E240 E0056840 44820000 */ mtc1 $v0, $f0
/* 35E244 E0056844 00000000 */ nop
/* 35E248 E0056848 46800020 */ cvt.s.w $f0, $f0
/* 35E24C E005684C 46006300 */ add.s $f12, $f12, $f0
/* 35E250 E0056850 0C080140 */ jal shim_sin_deg
/* 35E254 E0056854 E60C0010 */ swc1 $f12, 0x10($s0)
/* 35E258 E0056858 C60C0010 */ lwc1 $f12, 0x10($s0)
/* 35E25C E005685C 3C013FE0 */ lui $at, (0x3FE00000 >> 16)
/* 35E260 E0056860 44811800 */ mtc1 $at, $f3
/* 35E264 E0056864 44801000 */ mtc1 $zero, $f2
/* 35E268 E0056868 46006321 */ cvt.d.s $f12, $f12
/* 35E26C E005686C 46226302 */ mul.d $f12, $f12, $f2
/* 35E270 E0056870 00000000 */ nop
/* 35E274 E0056874 461A0002 */ mul.s $f0, $f0, $f26
/* 35E278 E0056878 00000000 */ nop
/* 35E27C E005687C C602000C */ lwc1 $f2, 0xC($s0)
/* 35E280 E0056880 46001080 */ add.s $f2, $f2, $f0
/* 35E284 E0056884 E602000C */ swc1 $f2, 0xC($s0)
/* 35E288 E0056888 0C080144 */ jal shim_cos_deg
/* 35E28C E005688C 46206320 */ cvt.s.d $f12, $f12
/* 35E290 E0056890 461A0002 */ mul.s $f0, $f0, $f26
/* 35E294 E0056894 00000000 */ nop
/* 35E298 E0056898 C606FFF8 */ lwc1 $f6, -0x8($s0)
/* 35E29C E005689C C6020004 */ lwc1 $f2, 0x4($s0)
/* 35E2A0 E00568A0 C604FFFC */ lwc1 $f4, -0x4($s0)
/* 35E2A4 E00568A4 46023180 */ add.s $f6, $f6, $f2
/* 35E2A8 E00568A8 C6020008 */ lwc1 $f2, 0x8($s0)
/* 35E2AC E00568AC 46022100 */ add.s $f4, $f4, $f2
/* 35E2B0 E00568B0 C6020014 */ lwc1 $f2, 0x14($s0)
/* 35E2B4 E00568B4 3C0141F0 */ lui $at, (0x41F00000 >> 16)
/* 35E2B8 E00568B8 44814000 */ mtc1 $at, $f8
/* 35E2BC E00568BC 46001080 */ add.s $f2, $f2, $f0
/* 35E2C0 E00568C0 E606FFF8 */ swc1 $f6, -0x8($s0)
/* 35E2C4 E00568C4 E604FFFC */ swc1 $f4, -0x4($s0)
/* 35E2C8 E00568C8 4608203C */ c.lt.s $f4, $f8
/* 35E2CC E00568CC 00000000 */ nop
/* 35E2D0 E00568D0 45000032 */ bc1f .LE005699C
/* 35E2D4 E00568D4 E6020014 */ swc1 $f2, 0x14($s0)
/* 35E2D8 E00568D8 3C01C348 */ lui $at, (0xC3480000 >> 16)
/* 35E2DC E00568DC 44810000 */ mtc1 $at, $f0
/* 35E2E0 E00568E0 46003086 */ mov.s $f2, $f6
/* 35E2E4 E00568E4 4602003C */ c.lt.s $f0, $f2
/* 35E2E8 E00568E8 00000000 */ nop
/* 35E2EC E00568EC 45000005 */ bc1f .LE0056904
/* 35E2F0 E00568F0 00000000 */ nop
/* 35E2F4 E00568F4 C6000024 */ lwc1 $f0, 0x24($s0)
/* 35E2F8 E00568F8 46000021 */ cvt.d.s $f0, $f0
/* 35E2FC E00568FC 08015A44 */ j .LE0056910
/* 35E300 E0056900 46340001 */ sub.d $f0, $f0, $f20
.LE0056904:
/* 35E304 E0056904 C6000024 */ lwc1 $f0, 0x24($s0)
/* 35E308 E0056908 46000021 */ cvt.d.s $f0, $f0
/* 35E30C E005690C 46340000 */ add.d $f0, $f0, $f20
.LE0056910:
/* 35E310 E0056910 46200020 */ cvt.s.d $f0, $f0
/* 35E314 E0056914 E6000024 */ swc1 $f0, 0x24($s0)
/* 35E318 E0056918 C6000000 */ lwc1 $f0, 0x0($s0)
/* 35E31C E005691C 4600C03C */ c.lt.s $f24, $f0
/* 35E320 E0056920 00000000 */ nop
/* 35E324 E0056924 45000005 */ bc1f .LE005693C
/* 35E328 E0056928 00000000 */ nop
/* 35E32C E005692C C600002C */ lwc1 $f0, 0x2C($s0)
/* 35E330 E0056930 46000021 */ cvt.d.s $f0, $f0
/* 35E334 E0056934 08015A52 */ j .LE0056948
/* 35E338 E0056938 46340001 */ sub.d $f0, $f0, $f20
.LE005693C:
/* 35E33C E005693C C600002C */ lwc1 $f0, 0x2C($s0)
/* 35E340 E0056940 46000021 */ cvt.d.s $f0, $f0
/* 35E344 E0056944 46340000 */ add.d $f0, $f0, $f20
.LE0056948:
/* 35E348 E0056948 46200020 */ cvt.s.d $f0, $f0
/* 35E34C E005694C E600002C */ swc1 $f0, 0x2C($s0)
/* 35E350 E0056950 C6040024 */ lwc1 $f4, 0x24($s0)
/* 35E354 E0056954 46002121 */ cvt.d.s $f4, $f4
/* 35E358 E0056958 46362102 */ mul.d $f4, $f4, $f22
/* 35E35C E005695C 00000000 */ nop
/* 35E360 E0056960 C602002C */ lwc1 $f2, 0x2C($s0)
/* 35E364 E0056964 460010A1 */ cvt.d.s $f2, $f2
/* 35E368 E0056968 46361082 */ mul.d $f2, $f2, $f22
/* 35E36C E005696C 00000000 */ nop
/* 35E370 E0056970 C6000008 */ lwc1 $f0, 0x8($s0)
/* 35E374 E0056974 46000021 */ cvt.d.s $f0, $f0
/* 35E378 E0056978 46360002 */ mul.d $f0, $f0, $f22
/* 35E37C E005697C 00000000 */ nop
/* 35E380 E0056980 46202120 */ cvt.s.d $f4, $f4
/* 35E384 E0056984 462010A0 */ cvt.s.d $f2, $f2
/* 35E388 E0056988 46200020 */ cvt.s.d $f0, $f0
/* 35E38C E005698C E6040024 */ swc1 $f4, 0x24($s0)
/* 35E390 E0056990 E602002C */ swc1 $f2, 0x2C($s0)
/* 35E394 E0056994 08015A8F */ j .LE0056A3C
/* 35E398 E0056998 E6000008 */ swc1 $f0, 0x8($s0)
.LE005699C:
/* 35E39C E005699C C600FFF8 */ lwc1 $f0, -0x8($s0)
/* 35E3A0 E00569A0 4600C03C */ c.lt.s $f24, $f0
/* 35E3A4 E00569A4 00000000 */ nop
/* 35E3A8 E00569A8 45000005 */ bc1f .LE00569C0
/* 35E3AC E00569AC 00000000 */ nop
/* 35E3B0 E00569B0 C6000024 */ lwc1 $f0, 0x24($s0)
/* 35E3B4 E00569B4 46000021 */ cvt.d.s $f0, $f0
/* 35E3B8 E00569B8 08015A73 */ j .LE00569CC
/* 35E3BC E00569BC 46340001 */ sub.d $f0, $f0, $f20
.LE00569C0:
/* 35E3C0 E00569C0 C6000024 */ lwc1 $f0, 0x24($s0)
/* 35E3C4 E00569C4 46000021 */ cvt.d.s $f0, $f0
/* 35E3C8 E00569C8 46340000 */ add.d $f0, $f0, $f20
.LE00569CC:
/* 35E3CC E00569CC 46200020 */ cvt.s.d $f0, $f0
/* 35E3D0 E00569D0 E6000024 */ swc1 $f0, 0x24($s0)
/* 35E3D4 E00569D4 C6000000 */ lwc1 $f0, 0x0($s0)
/* 35E3D8 E00569D8 4600C03C */ c.lt.s $f24, $f0
/* 35E3DC E00569DC 00000000 */ nop
/* 35E3E0 E00569E0 45000005 */ bc1f .LE00569F8
/* 35E3E4 E00569E4 00000000 */ nop
/* 35E3E8 E00569E8 C600002C */ lwc1 $f0, 0x2C($s0)
/* 35E3EC E00569EC 46000021 */ cvt.d.s $f0, $f0
/* 35E3F0 E00569F0 08015A81 */ j .LE0056A04
/* 35E3F4 E00569F4 46340001 */ sub.d $f0, $f0, $f20
.LE00569F8:
/* 35E3F8 E00569F8 C600002C */ lwc1 $f0, 0x2C($s0)
/* 35E3FC E00569FC 46000021 */ cvt.d.s $f0, $f0
/* 35E400 E0056A00 46340000 */ add.d $f0, $f0, $f20
.LE0056A04:
/* 35E404 E0056A04 46200020 */ cvt.s.d $f0, $f0
/* 35E408 E0056A08 E600002C */ swc1 $f0, 0x2C($s0)
/* 35E40C E0056A0C C6020024 */ lwc1 $f2, 0x24($s0)
/* 35E410 E0056A10 460010A1 */ cvt.d.s $f2, $f2
/* 35E414 E0056A14 46361082 */ mul.d $f2, $f2, $f22
/* 35E418 E0056A18 00000000 */ nop
/* 35E41C E0056A1C C600002C */ lwc1 $f0, 0x2C($s0)
/* 35E420 E0056A20 46000021 */ cvt.d.s $f0, $f0
/* 35E424 E0056A24 46360002 */ mul.d $f0, $f0, $f22
/* 35E428 E0056A28 00000000 */ nop
/* 35E42C E0056A2C 462010A0 */ cvt.s.d $f2, $f2
/* 35E430 E0056A30 46200020 */ cvt.s.d $f0, $f0
/* 35E434 E0056A34 E6020024 */ swc1 $f2, 0x24($s0)
/* 35E438 E0056A38 E600002C */ swc1 $f0, 0x2C($s0)
.LE0056A3C:
/* 35E43C E0056A3C 26310014 */ addiu $s1, $s1, 0x14
/* 35E440 E0056A40 C606FFF8 */ lwc1 $f6, -0x8($s0)
/* 35E444 E0056A44 C6000024 */ lwc1 $f0, 0x24($s0)
/* 35E448 E0056A48 C604FFFC */ lwc1 $f4, -0x4($s0)
/* 35E44C E0056A4C 46003180 */ add.s $f6, $f6, $f0
/* 35E450 E0056A50 C6000028 */ lwc1 $f0, 0x28($s0)
/* 35E454 E0056A54 C602002C */ lwc1 $f2, 0x2C($s0)
/* 35E458 E0056A58 46002100 */ add.s $f4, $f4, $f0
/* 35E45C E0056A5C C6000000 */ lwc1 $f0, 0x0($s0)
/* 35E460 E0056A60 26520001 */ addiu $s2, $s2, 0x1
/* 35E464 E0056A64 46020000 */ add.s $f0, $f0, $f2
/* 35E468 E0056A68 E606FFF8 */ swc1 $f6, -0x8($s0)
/* 35E46C E0056A6C E604FFFC */ swc1 $f4, -0x4($s0)
/* 35E470 E0056A70 E6000000 */ swc1 $f0, 0x0($s0)
/* 35E474 E0056A74 8E820008 */ lw $v0, 0x8($s4)
/* 35E478 E0056A78 0242102A */ slt $v0, $s2, $v0
/* 35E47C E0056A7C 1440FF52 */ bnez $v0, .LE00567C8
/* 35E480 E0056A80 2610003C */ addiu $s0, $s0, 0x3C
/* 35E484 E0056A84 08015AD6 */ j .LE0056B58
/* 35E488 E0056A88 00000000 */ nop
.LE0056A8C:
/* 35E48C E0056A8C 8E820008 */ lw $v0, 0x8($s4)
/* 35E490 E0056A90 0242102A */ slt $v0, $s2, $v0
/* 35E494 E0056A94 10400030 */ beqz $v0, .LE0056B58
/* 35E498 E0056A98 24900008 */ addiu $s0, $a0, 0x8
/* 35E49C E0056A9C 24B10015 */ addiu $s1, $a1, 0x15
/* 35E4A0 E0056AA0 3C014120 */ lui $at, (0x41200000 >> 16)
/* 35E4A4 E0056AA4 4481A000 */ mtc1 $at, $f20
/* 35E4A8 E0056AA8 3C013FE0 */ lui $at, (0x3FE00000 >> 16)
/* 35E4AC E0056AAC 4481B800 */ mtc1 $at, $f23
/* 35E4B0 E0056AB0 4480B000 */ mtc1 $zero, $f22
.LE0056AB4:
/* 35E4B4 E0056AB4 24040032 */ addiu $a0, $zero, 0x32
/* 35E4B8 E0056AB8 0C080011 */ jal func_E0200044
/* 35E4BC E0056ABC 0220282D */ daddu $a1, $s1, $zero
/* 35E4C0 E0056AC0 2442FFE7 */ addiu $v0, $v0, -0x19
/* 35E4C4 E0056AC4 C60C0014 */ lwc1 $f12, 0x14($s0)
/* 35E4C8 E0056AC8 44820000 */ mtc1 $v0, $f0
/* 35E4CC E0056ACC 00000000 */ nop
/* 35E4D0 E0056AD0 46800020 */ cvt.s.w $f0, $f0
/* 35E4D4 E0056AD4 46006300 */ add.s $f12, $f12, $f0
/* 35E4D8 E0056AD8 0C080140 */ jal shim_sin_deg
/* 35E4DC E0056ADC E60C0014 */ swc1 $f12, 0x14($s0)
/* 35E4E0 E0056AE0 C60C0014 */ lwc1 $f12, 0x14($s0)
/* 35E4E4 E0056AE4 46006321 */ cvt.d.s $f12, $f12
/* 35E4E8 E0056AE8 46366302 */ mul.d $f12, $f12, $f22
/* 35E4EC E0056AEC 00000000 */ nop
/* 35E4F0 E0056AF0 46140002 */ mul.s $f0, $f0, $f20
/* 35E4F4 E0056AF4 00000000 */ nop
/* 35E4F8 E0056AF8 C6020010 */ lwc1 $f2, 0x10($s0)
/* 35E4FC E0056AFC 46001080 */ add.s $f2, $f2, $f0
/* 35E500 E0056B00 E6020010 */ swc1 $f2, 0x10($s0)
/* 35E504 E0056B04 0C080144 */ jal shim_cos_deg
/* 35E508 E0056B08 46206320 */ cvt.s.d $f12, $f12
/* 35E50C E0056B0C 46140002 */ mul.s $f0, $f0, $f20
/* 35E510 E0056B10 00000000 */ nop
/* 35E514 E0056B14 C606FFFC */ lwc1 $f6, -0x4($s0)
/* 35E518 E0056B18 C6020008 */ lwc1 $f2, 0x8($s0)
/* 35E51C E0056B1C C6040000 */ lwc1 $f4, 0x0($s0)
/* 35E520 E0056B20 46023180 */ add.s $f6, $f6, $f2
/* 35E524 E0056B24 C602000C */ lwc1 $f2, 0xC($s0)
/* 35E528 E0056B28 26310014 */ addiu $s1, $s1, 0x14
/* 35E52C E0056B2C 46022100 */ add.s $f4, $f4, $f2
/* 35E530 E0056B30 C6020018 */ lwc1 $f2, 0x18($s0)
/* 35E534 E0056B34 26520001 */ addiu $s2, $s2, 0x1
/* 35E538 E0056B38 46001080 */ add.s $f2, $f2, $f0
/* 35E53C E0056B3C E606FFFC */ swc1 $f6, -0x4($s0)
/* 35E540 E0056B40 E6040000 */ swc1 $f4, 0x0($s0)
/* 35E544 E0056B44 E6020018 */ swc1 $f2, 0x18($s0)
/* 35E548 E0056B48 8E820008 */ lw $v0, 0x8($s4)
/* 35E54C E0056B4C 0242102A */ slt $v0, $s2, $v0
/* 35E550 E0056B50 1440FFD8 */ bnez $v0, .LE0056AB4
/* 35E554 E0056B54 2610003C */ addiu $s0, $s0, 0x3C
.LE0056B58:
/* 35E558 E0056B58 8FBF0024 */ lw $ra, 0x24($sp)
/* 35E55C E0056B5C 8FB40020 */ lw $s4, 0x20($sp)
/* 35E560 E0056B60 8FB3001C */ lw $s3, 0x1C($sp)
/* 35E564 E0056B64 8FB20018 */ lw $s2, 0x18($sp)
/* 35E568 E0056B68 8FB10014 */ lw $s1, 0x14($sp)
/* 35E56C E0056B6C 8FB00010 */ lw $s0, 0x10($sp)
/* 35E570 E0056B70 D7BC0048 */ ldc1 $f28, 0x48($sp)
/* 35E574 E0056B74 D7BA0040 */ ldc1 $f26, 0x40($sp)
/* 35E578 E0056B78 D7B80038 */ ldc1 $f24, 0x38($sp)
/* 35E57C E0056B7C D7B60030 */ ldc1 $f22, 0x30($sp)
/* 35E580 E0056B80 D7B40028 */ ldc1 $f20, 0x28($sp)
/* 35E584 E0056B84 03E00008 */ jr $ra
/* 35E588 E0056B88 27BD0050 */ addiu $sp, $sp, 0x50
### DECOMPILED C INSTRUCTIONS:
void windy_leaves_update(EffectInstance* effect) {
WindyLeavesFXData* part = effect->data.windyLeaves;
f32 temp_f0_2;
f32 temp_f4;
s32 temp_v0;
s32 temp_v0_2;
s32 temp_a1;
s32 i;
s32 temp;
s32 temp2;
part->unk_28--;
part->unk_2C++;
if (part->unk_28 < 0) {
shim_remove_effect(effect);
return;
}
temp_a1 = part->unk_2C;
temp_v0 = part->unk_28;
temp = part->type;
if (temp_a1 < 10) {
part->alpha += (255 - part->alpha) * 0.3;
}
if (temp_v0 < 10) {
part->alpha *= 0.8;
}
part++;
switch (temp) {
case 0:
for (i = 1; i < effect->numParts; i++, part++) {
f32 temp3 = (shim_sin_deg(2.0f * part->unk_18) * 0.2);
part->unk_14 += -0.05f;
part->unk_10 += temp3;
if (temp == 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 += func_E0200044(50, temp_a1 + i * 20) - 25;
part->unk_18 += shim_sin_deg(part->unk_1C) * 10.0f;
part->unk_20 += shim_cos_deg(part->unk_1C * 0.5) * 10.0f;
part->unk_04.x += part->unk_10;
part->unk_04.y += part->unk_14;
if (part->unk_04.y < 30.0f) {
if (part->unk_04.x > -200.0f) {
part->unk_30 -= 0.4;
} else {
part->unk_30 += 0.4;
}
if (part->unk_04.z > 0.0f) {
part->unk_38 -= 0.4;
} else {
part->unk_38 += 0.4;
}
part->unk_30 *= 0.98;
part->unk_38 *= 0.98;
part->unk_14 *= 0.98;
} else {
if(part->unk_04.x > 0.0f) {
part->unk_30 -= 0.4;
} else {
part->unk_30 += 0.4;
}
if (part->unk_04.z > 0.0f){
part->unk_38 -= 0.4;
} else {
part->unk_38 += 0.4;
}
part->unk_30 *= 0.98;
part->unk_38 *= 0.98;
}
part->unk_04.x += part->unk_30;
part->unk_04.y += part->unk_34;
part->unk_04.z += part->unk_38;
}
break;
case 1:
for (i = 1; i < effect->numParts; i++, part++) {
part->unk_10 += (f32)(shim_sin_deg(2.0f * part->unk_18) * 0.2 * 2.0);
part->unk_14 += -0.05f;
part->unk_10 *= 0.8464;
part->unk_14 += -0.05f;
part->unk_1C += func_E0200044(50, temp_a1 + i * 20) - 25;
part->unk_18 += shim_sin_deg(part->unk_1C) * 10.0f;
part->unk_20 += shim_cos_deg(part->unk_1C * 0.5) * 10.0f;
part->unk_04.x += part->unk_10;
part->unk_04.y += part->unk_14;
if (part->unk_04.y < 30.0f) {
if (part->unk_04.x > -200.0f) {
part->unk_30 -= 0.8;
} else {
part->unk_30 += 0.8;
}
if (part->unk_04.z > 0.0f) {
part->unk_38 -= 0.8;
} else {
part->unk_38 += 0.8;
}
part->unk_30 *= 0.9603999999999999;
part->unk_38 *= 0.9603999999999999;
part->unk_14 *= 0.9603999999999999;
} else {
if (part->unk_04.x > 0.0f){
part->unk_30 -= 0.8;
} else {
part->unk_30 += 0.8;
}
if (part->unk_04.z > 0.0f){
part->unk_38 -= 0.8;
} else {
part->unk_38 += 0.8;
}
part->unk_30 *= 0.9603999999999999;
part->unk_38 *= 0.9603999999999999;
}
part->unk_04.x += part->unk_30;
part->unk_04.y += part->unk_34;
part->unk_04.z += part->unk_38;
}
break;
case 2:
for (i = 1; i < effect->numParts; i++, part++) {
part->unk_1C += func_E0200044(50, temp_a1 + i * 20) - 25;
part->unk_18 += shim_sin_deg(part->unk_1C) * 10.0f;
part->unk_20 += shim_cos_deg(part->unk_1C * 0.5) * 10.0f;
part->unk_04.x += part->unk_10;
part->unk_04.y += part->unk_14;
}
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel parasol_get_npc
/* E26DE0 802B6000 27BDFFC8 */ addiu $sp, $sp, -0x38
/* E26DE4 802B6004 AFB00018 */ sw $s0, 0x18($sp)
/* E26DE8 802B6008 3C108011 */ lui $s0, %hi(gPlayerStatus)
/* E26DEC 802B600C 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus)
/* E26DF0 802B6010 AFBF0024 */ sw $ra, 0x24($sp)
/* E26DF4 802B6014 AFB20020 */ sw $s2, 0x20($sp)
.L802B6018:
/* E26DF8 802B6018 AFB1001C */ sw $s1, 0x1C($sp)
/* E26DFC 802B601C F7B60030 */ sdc1 $f22, 0x30($sp)
/* E26E00 802B6020 F7B40028 */ sdc1 $f20, 0x28($sp)
/* E26E04 802B6024 8E030000 */ lw $v1, 0x0($s0)
/* E26E08 802B6028 3C118016 */ lui $s1, %hi(gCollisionStatus)
/* E26E0C 802B602C 2631A550 */ addiu $s1, $s1, %lo(gCollisionStatus)
/* E26E10 802B6030 0461001D */ bgez $v1, .L802B60A8
/* E26E14 802B6034 3C027FFF */ lui $v0, (0x7FFFFFF9 >> 16)
/* E26E18 802B6038 3442FFF9 */ ori $v0, $v0, (0x7FFFFFF9 & 0xFFFF)
/* E26E1C 802B603C 3C040001 */ lui $a0, (0x1000A >> 16)
.L802B6040:
/* E26E20 802B6040 3484000A */ ori $a0, $a0, (0x1000A & 0xFFFF)
.L802B6044:
/* E26E24 802B6044 00621024 */ and $v0, $v1, $v0
glabel action_hammer_play_hit_fx
/* E26E28 802B6048 3C0140A6 */ lui $at, (0x40A66666 >> 16)
.L802B604C:
/* E26E2C 802B604C 34216666 */ ori $at, $at, (0x40A66666 & 0xFFFF)
.L802B6050:
/* E26E30 802B6050 44810000 */ mtc1 $at, $f0
/* E26E34 802B6054 3442000A */ ori $v0, $v0, 0xA
.L802B6058:
/* E26E38 802B6058 AE020000 */ sw $v0, 0x0($s0)
/* E26E3C 802B605C A20000B6 */ sb $zero, 0xB6($s0)
glabel action_update_sliding
/* E26E40 802B6060 AE000054 */ sw $zero, 0x54($s0)
/* E26E44 802B6064 3C01802B */ lui $at, %hi(D_802B6730)
.L802B6068:
/* E26E48 802B6068 AC206730 */ sw $zero, %lo(D_802B6730)($at)
/* E26E4C 802B606C 0C037FBF */ jal suggest_player_anim_allow_backward
/* E26E50 802B6070 E6000070 */ swc1 $f0, 0x70($s0)
.L802B6074:
/* E26E54 802B6074 0C03805E */ jal disable_player_input
/* E26E58 802B6078 00000000 */ nop
glabel .L802B607C
/* E26E5C 802B607C 24040146 */ addiu $a0, $zero, 0x146
.L802B6080:
/* E26E60 802B6080 0000282D */ daddu $a1, $zero, $zero
/* E26E64 802B6084 3C06800B */ lui $a2, %hi(gCameras)
/* E26E68 802B6088 24C61D80 */ addiu $a2, $a2, %lo(gCameras)
.L802B608C:
/* E26E6C 802B608C 8E020000 */ lw $v0, 0x0($s0)
.L802B6090:
/* E26E70 802B6090 94C30002 */ lhu $v1, 0x2($a2)
.L802B6094:
/* E26E74 802B6094 34420200 */ ori $v0, $v0, 0x200
/* E26E78 802B6098 34630001 */ ori $v1, $v1, 0x1
glabel action_update_state_23
/* E26E7C 802B609C AE020000 */ sw $v0, 0x0($s0)
/* E26E80 802B60A0 0C052736 */ jal sfx_play_sound_at_player
glabel action_update_use_spinning_flower
/* E26E84 802B60A4 A4C30002 */ sh $v1, 0x2($a2)
.L802B60A8:
/* E26E88 802B60A8 820300B6 */ lb $v1, 0xB6($s0)
.L802B60AC:
/* E26E8C 802B60AC 2C62000D */ sltiu $v0, $v1, 0xD
/* E26E90 802B60B0 10400146 */ beqz $v0, .L802B65CC
glabel action_update_jump
/* E26E94 802B60B4 0000902D */ daddu $s2, $zero, $zero
/* E26E98 802B60B8 00031080 */ sll $v0, $v1, 2
/* E26E9C 802B60BC 3C01802B */ lui $at, %hi(func_802B66A8 + 0x38)
/* E26EA0 802B60C0 00220821 */ addu $at, $at, $v0
/* E26EA4 802B60C4 8C2266E0 */ lw $v0, %lo(func_802B66A8 + 0x38)($at)
.L802B60C8:
/* E26EA8 802B60C8 00400008 */ jr $v0
/* E26EAC 802B60CC 00000000 */ nop
glabel .L802B60D0
/* E26EB0 802B60D0 3C014220 */ lui $at, (0x42200000 >> 16)
.L802B60D4:
/* E26EB4 802B60D4 44811000 */ mtc1 $at, $f2
/* E26EB8 802B60D8 C600008C */ lwc1 $f0, 0x8C($s0)
/* E26EBC 802B60DC 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* E26EC0 802B60E0 44812000 */ mtc1 $at, $f4
/* E26EC4 802B60E4 46020000 */ add.s $f0, $f0, $f2
.L802B60E8:
/* E26EC8 802B60E8 3C01802B */ lui $at, %hi(D_802B6730)
.L802B60EC:
/* E26ECC 802B60EC E4226730 */ swc1 $f2, %lo(D_802B6730)($at)
.L802B60F0:
/* E26ED0 802B60F0 4600203E */ c.le.s $f4, $f0
glabel .L802B60F4
/* E26ED4 802B60F4 00000000 */ nop
/* E26ED8 802B60F8 45000002 */ bc1f .L802B6104
/* E26EDC 802B60FC E600008C */ swc1 $f0, 0x8C($s0)
.L802B6100:
/* E26EE0 802B6100 E604008C */ swc1 $f4, 0x8C($s0)
.L802B6104:
/* E26EE4 802B6104 C6040070 */ lwc1 $f4, 0x70($s0)
.L802B6108:
/* E26EE8 802B6108 44800000 */ mtc1 $zero, $f0
glabel .L802B610C
/* E26EEC 802B610C 00000000 */ nop
.L802B6110:
/* E26EF0 802B6110 4604003E */ c.le.s $f0, $f4
/* E26EF4 802B6114 00000000 */ nop
.L802B6118:
/* E26EF8 802B6118 45000023 */ bc1f .L802B61A8
/* E26EFC 802B611C 00000000 */ nop
glabel action_update_parasol
/* E26F00 802B6120 3C01802B */ lui $at, %hi(D_802B6718_E274F8)
.L802B6124:
/* E26F04 802B6124 D4226718 */ ldc1 $f2, %lo(D_802B6718_E274F8)($at)
.L802B6128:
/* E26F08 802B6128 46002021 */ cvt.d.s $f0, $f4
/* E26F0C 802B612C 46220001 */ sub.d $f0, $f0, $f2
/* E26F10 802B6130 462000A0 */ cvt.s.d $f2, $f0
glabel .L802B6134
/* E26F14 802B6134 E6020070 */ swc1 $f2, 0x70($s0)
/* E26F18 802B6138 86240008 */ lh $a0, 0x8($s1)
.L802B613C:
/* E26F1C 802B613C 96220008 */ lhu $v0, 0x8($s1)
.L802B6140:
/* E26F20 802B6140 04810004 */ bgez $a0, .L802B6154
.L802B6144:
/* E26F24 802B6144 30424000 */ andi $v0, $v0, 0x4000
/* E26F28 802B6148 C600002C */ lwc1 $f0, 0x2C($s0)
.L802B614C:
/* E26F2C 802B614C 080AD869 */ j .L802B61A4
.L802B6150:
/* E26F30 802B6150 46020000 */ add.s $f0, $f0, $f2
.L802B6154:
/* E26F34 802B6154 10400014 */ beqz $v0, .L802B61A8
.L802B6158:
/* E26F38 802B6158 00000000 */ nop
.L802B615C:
/* E26F3C 802B615C 0C04417A */ jal get_entity_by_index
/* E26F40 802B6160 00000000 */ nop
.L802B6164:
/* E26F44 802B6164 0040182D */ daddu $v1, $v0, $zero
.L802B6168:
/* E26F48 802B6168 1060000F */ beqz $v1, .L802B61A8
/* E26F4C 802B616C 00000000 */ nop
glabel .L802B6170
/* E26F50 802B6170 860200B0 */ lh $v0, 0xB0($s0)
glabel .L802B6174
/* E26F54 802B6174 3C013FE0 */ lui $at, (0x3FE00000 >> 16)
/* E26F58 802B6178 44810800 */ mtc1 $at, $f1
.L802B617C:
/* E26F5C 802B617C 44800000 */ mtc1 $zero, $f0
.L802B6180:
/* E26F60 802B6180 44821000 */ mtc1 $v0, $f2
glabel .L802B6184
/* E26F64 802B6184 00000000 */ nop
.L802B6188:
/* E26F68 802B6188 468010A1 */ cvt.d.w $f2, $f2
.L802B618C:
/* E26F6C 802B618C 46201082 */ mul.d $f2, $f2, $f0
.L802B6190:
/* E26F70 802B6190 00000000 */ nop
.L802B6194:
/* E26F74 802B6194 C460004C */ lwc1 $f0, 0x4C($v1)
glabel func_802B6198
/* E26F78 802B6198 46000021 */ cvt.d.s $f0, $f0
/* E26F7C 802B619C 46220001 */ sub.d $f0, $f0, $f2
.L802B61A0:
/* E26F80 802B61A0 46200020 */ cvt.s.d $f0, $f0
.L802B61A4:
/* E26F84 802B61A4 E600002C */ swc1 $f0, 0x2C($s0)
.L802B61A8:
/* E26F88 802B61A8 C602008C */ lwc1 $f2, 0x8C($s0)
.L802B61AC:
/* E26F8C 802B61AC 3C0143B4 */ lui $at, (0x43B40000 >> 16)
.L802B61B0:
/* E26F90 802B61B0 44810000 */ mtc1 $at, $f0
.L802B61B4:
/* E26F94 802B61B4 00000000 */ nop
/* E26F98 802B61B8 46001032 */ c.eq.s $f2, $f0
/* E26F9C 802B61BC 00000000 */ nop
glabel func_802B61C0
/* E26FA0 802B61C0 4500000F */ bc1f .L802B6200
/* E26FA4 802B61C4 2402FFFF */ addiu $v0, $zero, -0x1
.L802B61C8:
/* E26FA8 802B61C8 C6020070 */ lwc1 $f2, 0x70($s0)
.L802B61CC:
/* E26FAC 802B61CC 44800000 */ mtc1 $zero, $f0
/* E26FB0 802B61D0 00000000 */ nop
.L802B61D4:
/* E26FB4 802B61D4 4600103E */ c.le.s $f2, $f0
.L802B61D8:
/* E26FB8 802B61D8 00000000 */ nop
.L802B61DC:
/* E26FBC 802B61DC 45000007 */ bc1f .L802B61FC
/* E26FC0 802B61E0 24020005 */ addiu $v0, $zero, 0x5
glabel func_802B61E4
/* E26FC4 802B61E4 3C014000 */ lui $at, (0x40000000 >> 16)
.L802B61E8:
/* E26FC8 802B61E8 44810000 */ mtc1 $at, $f0
.L802B61EC:
/* E26FCC 802B61EC A6020008 */ sh $v0, 0x8($s0)
.L802B61F0:
/* E26FD0 802B61F0 24020002 */ addiu $v0, $zero, 0x2
.L802B61F4:
/* E26FD4 802B61F4 A20200B6 */ sb $v0, 0xB6($s0)
.L802B61F8:
/* E26FD8 802B61F8 E6000070 */ swc1 $f0, 0x70($s0)
.L802B61FC:
/* E26FDC 802B61FC 2402FFFF */ addiu $v0, $zero, -0x1
.L802B6200:
/* E26FE0 802B6200 080AD973 */ j .L802B65CC
.L802B6204:
/* E26FE4 802B6204 A6220008 */ sh $v0, 0x8($s1)
glabel .L802B6208
/* E26FE8 802B6208 C6020070 */ lwc1 $f2, 0x70($s0)
/* E26FEC 802B620C 44800000 */ mtc1 $zero, $f0
.L802B6210:
/* E26FF0 802B6210 00000000 */ nop
.L802B6214:
/* E26FF4 802B6214 4602003E */ c.le.s $f0, $f2
glabel .L802B6218
/* E26FF8 802B6218 00000000 */ nop
/* E26FFC 802B621C 4500000C */ bc1f .L802B6250
.L802B6220:
/* E27000 802B6220 00000000 */ nop
.L802B6224:
/* E27004 802B6224 3C01802B */ lui $at, %hi(D_802B6720_E27500)
glabel .L802B6228
/* E27008 802B6228 D4206720 */ ldc1 $f0, %lo(D_802B6720_E27500)($at)
.L802B622C:
/* E2700C 802B622C 460010A1 */ cvt.d.s $f2, $f2
glabel action_update_step_up_peach
/* E27010 802B6230 46201081 */ sub.d $f2, $f2, $f0
/* E27014 802B6234 86220008 */ lh $v0, 0x8($s1)
glabel .L802B6238
/* E27018 802B6238 462010A0 */ cvt.s.d $f2, $f2
glabel .L802B623C
/* E2701C 802B623C 04410004 */ bgez $v0, .L802B6250
glabel .L802B6240
/* E27020 802B6240 E6020070 */ swc1 $f2, 0x70($s0)
glabel .L802B6244
/* E27024 802B6244 C600002C */ lwc1 $f0, 0x2C($s0)
glabel .L802B6248
/* E27028 802B6248 46020000 */ add.s $f0, $f0, $f2
/* E2702C 802B624C E600002C */ swc1 $f0, 0x2C($s0)
glabel .L802B6250
/* E27030 802B6250 96020008 */ lhu $v0, 0x8($s0)
.L802B6254:
/* E27034 802B6254 2442FFFF */ addiu $v0, $v0, -0x1
glabel .L802B6258
/* E27038 802B6258 A6020008 */ sh $v0, 0x8($s0)
.L802B625C:
/* E2703C 802B625C 00021400 */ sll $v0, $v0, 16
/* E27040 802B6260 1C4000DA */ bgtz $v0, .L802B65CC
/* E27044 802B6264 00000000 */ nop
.L802B6268:
/* E27048 802B6268 920200B6 */ lbu $v0, 0xB6($s0)
.L802B626C:
/* E2704C 802B626C 24420001 */ addiu $v0, $v0, 0x1
/* E27050 802B6270 080AD973 */ j .L802B65CC
.L802B6274:
/* E27054 802B6274 A20200B6 */ sb $v0, 0xB6($s0)
glabel .L802B6278
/* E27058 802B6278 4480A000 */ mtc1 $zero, $f20
/* E2705C 802B627C 27A50010 */ addiu $a1, $sp, 0x10
.L802B6280:
/* E27060 802B6280 0C038D45 */ jal player_check_collision_below
.L802B6284:
/* E27064 802B6284 4600A306 */ mov.s $f12, $f20
glabel action_update_run
/* E27068 802B6288 3C014234 */ lui $at, (0x42340000 >> 16)
/* E2706C 802B628C 44811000 */ mtc1 $at, $f2
.L802B6290:
/* E27070 802B6290 C604008C */ lwc1 $f4, 0x8C($s0)
glabel func_802B6294
/* E27074 802B6294 E600002C */ swc1 $f0, 0x2C($s0)
glabel .L802B6298
/* E27078 802B6298 46022100 */ add.s $f4, $f4, $f2
/* E2707C 802B629C 3C01802B */ lui $at, %hi(D_802B6730)
/* E27080 802B62A0 E4226730 */ swc1 $f2, %lo(D_802B6730)($at)
glabel func_802B62A4
/* E27084 802B62A4 3C01802B */ lui $at, %hi(D_802B6728_E27508)
.L802B62A8:
/* E27088 802B62A8 D4226728 */ ldc1 $f2, %lo(D_802B6728_E27508)($at)
/* E2708C 802B62AC 46002021 */ cvt.d.s $f0, $f4
jtbl_802B62B0:
/* E27090 802B62B0 4620103E */ c.le.d $f2, $f0
.L802B62B4:
/* E27094 802B62B4 00000000 */ nop
glabel .L802B62B8
/* E27098 802B62B8 450000C4 */ bc1f .L802B65CC
/* E2709C 802B62BC E604008C */ swc1 $f4, 0x8C($s0)
/* E270A0 802B62C0 3C040001 */ lui $a0, (0x1000B >> 16)
/* E270A4 802B62C4 3C01C05E */ lui $at, (0xC05E5C92 >> 16)
.L802B62C8:
/* E270A8 802B62C8 34215C92 */ ori $at, $at, (0xC05E5C92 & 0xFFFF)
glabel action_update_peach_land
/* E270AC 802B62CC 44810000 */ mtc1 $at, $f0
Munchlesia_LaunchVelocity:
/* E270B0 802B62D0 920200B6 */ lbu $v0, 0xB6($s0)
Munchlesia_LateralVelocity:
/* E270B4 802B62D4 3C01BF98 */ lui $at, (0xBF985F07 >> 16)
Munchlesia_LaunchAccel:
/* E270B8 802B62D8 34215F07 */ ori $at, $at, (0xBF985F07 & 0xFFFF)
Munchlesia_LaunchYaw:
/* E270BC 802B62DC 44811000 */ mtc1 $at, $f2
D_802B62E0:
/* E270C0 802B62E0 3484000B */ ori $a0, $a0, (0x1000B & 0xFFFF)
.L802B62E4:
/* E270C4 802B62E4 E614008C */ swc1 $f20, 0x8C($s0)
/* E270C8 802B62E8 E6000074 */ swc1 $f0, 0x74($s0)
/* E270CC 802B62EC 3C013EF0 */ lui $at, (0x3EF0D845 >> 16)
/* E270D0 802B62F0 3421D845 */ ori $at, $at, (0x3EF0D845 & 0xFFFF)
/* E270D4 802B62F4 44810000 */ mtc1 $at, $f0
glabel func_802B62F8
/* E270D8 802B62F8 C6040074 */ lwc1 $f4, 0x74($s0)
.L802B62FC:
/* E270DC 802B62FC 24420001 */ addiu $v0, $v0, 0x1
D_802B6300:
/* E270E0 802B6300 A20200B6 */ sb $v0, 0xB6($s0)
/* E270E4 802B6304 E602007C */ swc1 $f2, 0x7C($s0)
.L802B6308:
/* E270E8 802B6308 E6000078 */ swc1 $f0, 0x78($s0)
.L802B630C:
/* E270EC 802B630C 0C037FBF */ jal suggest_player_anim_allow_backward
.L802B6310:
/* E270F0 802B6310 E6040070 */ swc1 $f4, 0x70($s0)
/* E270F4 802B6314 080AD973 */ j .L802B65CC
/* E270F8 802B6318 00000000 */ nop
glabel .L802B631C
/* E270FC 802B631C 0C038D36 */ jal func_800E34D8
.L802B6320:
/* E27100 802B6320 00000000 */ nop
glabel .L802B6324
/* E27104 802B6324 46000506 */ mov.s $f20, $f0
.L802B6328:
/* E27108 802B6328 4600A306 */ mov.s $f12, $f20
glabel .L802B632C
/* E2710C 802B632C 0C038D45 */ jal player_check_collision_below
.L802B6330:
/* E27110 802B6330 27A50010 */ addiu $a1, $sp, 0x10
/* E27114 802B6334 3C01C2C8 */ lui $at, (0xC2C80000 >> 16)
.L802B6338:
/* E27118 802B6338 44811000 */ mtc1 $at, $f2
/* E2711C 802B633C 00000000 */ nop
.L802B6340:
/* E27120 802B6340 4602A03C */ c.lt.s $f20, $f2
/* E27124 802B6344 00000000 */ nop
glabel func_802B6348
/* E27128 802B6348 45000005 */ bc1f D_802B6360
/* E2712C 802B634C E600002C */ swc1 $f0, 0x2C($s0)
PlayerTweesterPhysicsPtr:
/* E27130 802B6350 AE00007C */ sw $zero, 0x7C($s0)
glabel .L802B6354
/* E27134 802B6354 AE000078 */ sw $zero, 0x78($s0)
/* E27138 802B6358 AE000074 */ sw $zero, 0x74($s0)
.L802B635C:
/* E2713C 802B635C E6020070 */ swc1 $f2, 0x70($s0)
D_802B6360:
/* E27140 802B6360 8FA20010 */ lw $v0, 0x10($sp)
.L802B6364:
/* E27144 802B6364 04400099 */ bltz $v0, .L802B65CC
/* E27148 802B6368 00000000 */ nop
.L802B636C:
/* E2714C 802B636C 96240002 */ lhu $a0, 0x2($s1)
glabel .L802B6370
/* E27150 802B6370 30824000 */ andi $v0, $a0, 0x4000
.L802B6374:
/* E27154 802B6374 10400013 */ beqz $v0, .L802B63C4
/* E27158 802B6378 00042400 */ sll $a0, $a0, 16
glabel .L802B637C
/* E2715C 802B637C 0C0441A9 */ jal get_entity_type
/* E27160 802B6380 00042403 */ sra $a0, $a0, 16
/* E27164 802B6384 2442FFF9 */ addiu $v0, $v0, -0x7
/* E27168 802B6388 2C420002 */ sltiu $v0, $v0, 0x2
/* E2716C 802B638C 1040000D */ beqz $v0, .L802B63C4
/* E27170 802B6390 00000000 */ nop
glabel .L802B6394
/* E27174 802B6394 0C04417A */ jal get_entity_by_index
.L802B6398:
/* E27178 802B6398 86240002 */ lh $a0, 0x2($s1)
.L802B639C:
/* E2717C 802B639C 90430006 */ lbu $v1, 0x6($v0)
/* E27180 802B63A0 34630001 */ ori $v1, $v1, 0x1
/* E27184 802B63A4 A0430006 */ sb $v1, 0x6($v0)
.L802B63A8:
/* E27188 802B63A8 2402000B */ addiu $v0, $zero, 0xB
.L802B63AC:
/* E2718C 802B63AC A20200B6 */ sb $v0, 0xB6($s0)
glabel .L802B63B0
/* E27190 802B63B0 8E020000 */ lw $v0, 0x0($s0)
/* E27194 802B63B4 2403FFF7 */ addiu $v1, $zero, -0x9
/* E27198 802B63B8 00431024 */ and $v0, $v0, $v1
/* E2719C 802B63BC 080AD973 */ j .L802B65CC
.L802B63C0:
/* E271A0 802B63C0 AE020000 */ sw $v0, 0x0($s0)
.L802B63C4:
/* E271A4 802B63C4 8FA40010 */ lw $a0, 0x10($sp)
.L802B63C8:
/* E271A8 802B63C8 0C016F6A */ jal get_collider_flags
.L802B63CC:
/* E271AC 802B63CC 00000000 */ nop
.L802B63D0:
/* E271B0 802B63D0 304300FF */ andi $v1, $v0, 0xFF
glabel action_update_first_strike
/* E271B4 802B63D4 24020003 */ addiu $v0, $zero, 0x3
.L802B63D8:
/* E271B8 802B63D8 54620009 */ bnel $v1, $v0, .L802B6400
glabel .L802B63DC
/* E271BC 802B63DC 24020002 */ addiu $v0, $zero, 0x2
.L802B63E0:
/* E271C0 802B63E0 24040017 */ addiu $a0, $zero, 0x17
.L802B63E4:
/* E271C4 802B63E4 24020001 */ addiu $v0, $zero, 0x1
/* E271C8 802B63E8 0C039769 */ jal set_action_state
/* E271CC 802B63EC A20200BF */ sb $v0, 0xBF($s0)
.L802B63F0:
/* E271D0 802B63F0 8E020000 */ lw $v0, 0x0($s0)
.L802B63F4:
/* E271D4 802B63F4 2403FFF7 */ addiu $v1, $zero, -0x9
/* E271D8 802B63F8 080AD906 */ j .L802B6418
/* E271DC 802B63FC 34420800 */ ori $v0, $v0, 0x800
.L802B6400:
/* E271E0 802B6400 14620008 */ bne $v1, $v0, .L802B6424
/* E271E4 802B6404 3C040001 */ lui $a0, (0x1000B >> 16)
/* E271E8 802B6408 0C039769 */ jal set_action_state
.L802B640C:
/* E271EC 802B640C 24040017 */ addiu $a0, $zero, 0x17
/* E271F0 802B6410 8E020000 */ lw $v0, 0x0($s0)
.L802B6414:
/* E271F4 802B6414 2403FFF7 */ addiu $v1, $zero, -0x9
.L802B6418:
/* E271F8 802B6418 00431024 */ and $v0, $v0, $v1
/* E271FC 802B641C 080AD98A */ j .L802B6628
.L802B6420:
/* E27200 802B6420 AE020000 */ sw $v0, 0x0($s0)
.L802B6424:
/* E27204 802B6424 3C01C05E */ lui $at, (0xC05E5C92 >> 16)
.L802B6428:
/* E27208 802B6428 34215C92 */ ori $at, $at, (0xC05E5C92 & 0xFFFF)
.L802B642C:
/* E2720C 802B642C 44810000 */ mtc1 $at, $f0
D_802B6430:
/* E27210 802B6430 3C013EF0 */ lui $at, (0x3EF0D845 >> 16)
/* E27214 802B6434 3421D845 */ ori $at, $at, (0x3EF0D845 & 0xFFFF)
/* E27218 802B6438 44811000 */ mtc1 $at, $f2
/* E2721C 802B643C 3C01BF98 */ lui $at, (0xBF985F07 >> 16)
/* E27220 802B6440 34215F07 */ ori $at, $at, (0xBF985F07 & 0xFFFF)
/* E27224 802B6444 44812000 */ mtc1 $at, $f4
.L802B6448:
/* E27228 802B6448 3C014120 */ lui $at, (0x41200000 >> 16)
glabel action_update_peach_step_down_land
/* E2722C 802B644C 44813000 */ mtc1 $at, $f6
.L802B6450:
/* E27230 802B6450 3484000B */ ori $a0, $a0, (0x1000B & 0xFFFF)
.L802B6454:
/* E27234 802B6454 E6000074 */ swc1 $f0, 0x74($s0)
/* E27238 802B6458 E6020078 */ swc1 $f2, 0x78($s0)
/* E2723C 802B645C E604007C */ swc1 $f4, 0x7C($s0)
.L802B6460:
/* E27240 802B6460 0C037FBF */ jal suggest_player_anim_allow_backward
.L802B6464:
/* E27244 802B6464 E6060070 */ swc1 $f6, 0x70($s0)
/* E27248 802B6468 0000202D */ daddu $a0, $zero, $zero
glabel .L802B646C
/* E2724C 802B646C 0080282D */ daddu $a1, $a0, $zero
/* E27250 802B6470 2402000E */ addiu $v0, $zero, 0xE
/* E27254 802B6474 A20200B4 */ sb $v0, 0xB4($s0)
glabel action_update_raise_arms
/* E27258 802B6478 2402000C */ addiu $v0, $zero, 0xC
glabel action_update_peach_falling
/* E2725C 802B647C 920300B6 */ lbu $v1, 0xB6($s0)
/* E27260 802B6480 24060004 */ addiu $a2, $zero, 0x4
/* E27264 802B6484 A60000C0 */ sh $zero, 0xC0($s0)
/* E27268 802B6488 A2020280 */ sb $v0, 0x280($s0)
.L802B648C:
/* E2726C 802B648C AE00008C */ sw $zero, 0x8C($s0)
.L802B6490:
/* E27270 802B6490 24630001 */ addiu $v1, $v1, 0x1
.L802B6494:
/* E27274 802B6494 0C0B2D5B */ jal exec_ShakeCam1
/* E27278 802B6498 A20300B6 */ sb $v1, 0xB6($s0)
/* E2727C 802B649C 24040149 */ addiu $a0, $zero, 0x149
.L802B64A0:
/* E27280 802B64A0 0C052736 */ jal sfx_play_sound_at_player
/* E27284 802B64A4 0000282D */ daddu $a1, $zero, $zero
glabel .L802B64A8
/* E27288 802B64A8 24040080 */ addiu $a0, $zero, 0x80
.L802B64AC:
/* E2728C 802B64AC 0C00A3C2 */ jal start_rumble
/* E27290 802B64B0 24050019 */ addiu $a1, $zero, 0x19
.L802B64B4:
/* E27294 802B64B4 3C048016 */ lui $a0, %hi(gCurrentHiddenPanels)
/* E27298 802B64B8 2484A578 */ addiu $a0, $a0, %lo(gCurrentHiddenPanels)
/* E2729C 802B64BC C600002C */ lwc1 $f0, 0x2C($s0)
/* E272A0 802B64C0 8E030000 */ lw $v1, 0x0($s0)
.L802B64C4:
/* E272A4 802B64C4 24020001 */ addiu $v0, $zero, 0x1
/* E272A8 802B64C8 A0820000 */ sb $v0, 0x0($a0)
.L802B64CC:
/* E272AC 802B64CC 34630400 */ ori $v1, $v1, 0x400
.L802B64D0:
/* E272B0 802B64D0 E4800008 */ swc1 $f0, 0x8($a0)
.L802B64D4:
/* E272B4 802B64D4 080AD973 */ j .L802B65CC
.L802B64D8:
/* E272B8 802B64D8 AE030000 */ sw $v1, 0x0($s0)
glabel .L802B64DC
/* E272BC 802B64DC 0C038D12 */ jal integrate_gravity
glabel .L802B64E0
/* E272C0 802B64E0 00000000 */ nop
/* E272C4 802B64E4 4480B000 */ mtc1 $zero, $f22
/* E272C8 802B64E8 46000506 */ mov.s $f20, $f0
.L802B64EC:
/* E272CC 802B64EC 4616A032 */ c.eq.s $f20, $f22
glabel .L802B64F0
/* E272D0 802B64F0 00000000 */ nop
/* E272D4 802B64F4 45030035 */ bc1tl .L802B65CC
.L802B64F8:
/* E272D8 802B64F8 24120001 */ addiu $s2, $zero, 0x1
/* E272DC 802B64FC C6000070 */ lwc1 $f0, 0x70($s0)
/* E272E0 802B6500 4600B03C */ c.lt.s $f22, $f0
/* E272E4 802B6504 00000000 */ nop
glabel action_update_pushing_block
/* E272E8 802B6508 45000005 */ bc1f .L802B6520
.L802B650C:
/* E272EC 802B650C 4600A306 */ mov.s $f12, $f20
glabel .L802B6510
/* E272F0 802B6510 C600002C */ lwc1 $f0, 0x2C($s0)
/* E272F4 802B6514 46140000 */ add.s $f0, $f0, $f20
/* E272F8 802B6518 080AD955 */ j .L802B6554
.L802B651C:
/* E272FC 802B651C E600002C */ swc1 $f0, 0x2C($s0)
.L802B6520:
/* E27300 802B6520 0C038D45 */ jal player_check_collision_below
.L802B6524:
/* E27304 802B6524 27A50010 */ addiu $a1, $sp, 0x10
/* E27308 802B6528 C6020070 */ lwc1 $f2, 0x70($s0)
/* E2730C 802B652C 4616103C */ c.lt.s $f2, $f22
.L802B6530:
/* E27310 802B6530 00000000 */ nop
.L802B6534:
/* E27314 802B6534 45000007 */ bc1f .L802B6554
/* E27318 802B6538 E600002C */ swc1 $f0, 0x2C($s0)
/* E2731C 802B653C 8FA20010 */ lw $v0, 0x10($sp)
/* E27320 802B6540 04400004 */ bltz $v0, .L802B6554
glabel .L802B6544
/* E27324 802B6544 00000000 */ nop
glabel .L802B6548
/* E27328 802B6548 920200B6 */ lbu $v0, 0xB6($s0)
/* E2732C 802B654C 24420001 */ addiu $v0, $v0, 0x1
glabel func_802B6550
/* E27330 802B6550 A20200B6 */ sb $v0, 0xB6($s0)
.L802B6554:
/* E27334 802B6554 44806000 */ mtc1 $zero, $f12
/* E27338 802B6558 0C038D45 */ jal player_check_collision_below
/* E2733C 802B655C 27A50010 */ addiu $a1, $sp, 0x10
/* E27340 802B6560 080AD973 */ j .L802B65CC
/* E27344 802B6564 E600002C */ swc1 $f0, 0x2C($s0)
glabel .L802B6568
/* E27348 802B6568 4480A000 */ mtc1 $zero, $f20
.L802B656C:
/* E2734C 802B656C 27A50010 */ addiu $a1, $sp, 0x10
.L802B6570:
/* E27350 802B6570 0C038D45 */ jal player_check_collision_below
.L802B6574:
/* E27354 802B6574 4600A306 */ mov.s $f12, $f20
/* E27358 802B6578 8FA20010 */ lw $v0, 0x10($sp)
/* E2735C 802B657C 04400005 */ bltz $v0, .L802B6594
.L802B6580:
/* E27360 802B6580 E600002C */ swc1 $f0, 0x2C($s0)
/* E27364 802B6584 E6140070 */ swc1 $f20, 0x70($s0)
/* E27368 802B6588 E6140074 */ swc1 $f20, 0x74($s0)
glabel .L802B658C
/* E2736C 802B658C E6140078 */ swc1 $f20, 0x78($s0)
.L802B6590:
/* E27370 802B6590 E614007C */ swc1 $f20, 0x7C($s0)
glabel .L802B6594
/* E27374 802B6594 92020280 */ lbu $v0, 0x280($s0)
.L802B6598:
/* E27378 802B6598 2442FFFF */ addiu $v0, $v0, -0x1
.L802B659C:
/* E2737C 802B659C A2020280 */ sb $v0, 0x280($s0)
/* E27380 802B65A0 00021600 */ sll $v0, $v0, 24
glabel .L802B65A4
/* E27384 802B65A4 1C400009 */ bgtz $v0, .L802B65CC
.L802B65A8:
/* E27388 802B65A8 00000000 */ nop
/* E2738C 802B65AC 080AD973 */ j .L802B65CC
/* E27390 802B65B0 24120001 */ addiu $s2, $zero, 0x1
glabel .L802B65B4
/* E27394 802B65B4 0C039769 */ jal set_action_state
.L802B65B8:
/* E27398 802B65B8 24040007 */ addiu $a0, $zero, 0x7
/* E2739C 802B65BC 920200B6 */ lbu $v0, 0xB6($s0)
glabel .L802B65C0
/* E273A0 802B65C0 24420001 */ addiu $v0, $v0, 0x1
/* E273A4 802B65C4 0C038069 */ jal enable_player_input
/* E273A8 802B65C8 A20200B6 */ sb $v0, 0xB6($s0)
glabel .L802B65CC
/* E273AC 802B65CC 12400007 */ beqz $s2, .L802B65EC
.L802B65D0:
/* E273B0 802B65D0 00000000 */ nop
/* E273B4 802B65D4 0C039769 */ jal set_action_state
/* E273B8 802B65D8 2404000A */ addiu $a0, $zero, 0xA
.L802B65DC:
/* E273BC 802B65DC 8E020000 */ lw $v0, 0x0($s0)
.L802B65E0:
/* E273C0 802B65E0 2403FFF7 */ addiu $v1, $zero, -0x9
.L802B65E4:
/* E273C4 802B65E4 00431024 */ and $v0, $v0, $v1
glabel action_update_walk_peach
/* E273C8 802B65E8 AE020000 */ sw $v0, 0x0($s0)
.L802B65EC:
/* E273CC 802B65EC C6020070 */ lwc1 $f2, 0x70($s0)
.L802B65F0:
/* E273D0 802B65F0 44800000 */ mtc1 $zero, $f0
/* E273D4 802B65F4 00000000 */ nop
glabel func_802B65F8_E26D08
/* E273D8 802B65F8 4600103C */ c.lt.s $f2, $f0
/* E273DC 802B65FC 00000000 */ nop
/* E273E0 802B6600 45000009 */ bc1f .L802B6628
.L802B6604:
/* E273E4 802B6604 00000000 */ nop
/* E273E8 802B6608 0C0AD992 */ jal func_802B6648_E27428
glabel .L802B660C
/* E273EC 802B660C 00000000 */ nop
/* E273F0 802B6610 04400005 */ bltz $v0, .L802B6628
/* E273F4 802B6614 AFA20010 */ sw $v0, 0x10($sp)
/* E273F8 802B6618 97A30012 */ lhu $v1, 0x12($sp)
glabel .L802B661C
/* E273FC 802B661C 2402FFFF */ addiu $v0, $zero, -0x1
.L802B6620:
/* E27400 802B6620 A6220004 */ sh $v0, 0x4($s1)
/* E27404 802B6624 A6230002 */ sh $v1, 0x2($s1)
.L802B6628:
/* E27408 802B6628 8FBF0024 */ lw $ra, 0x24($sp)
/* E2740C 802B662C 8FB20020 */ lw $s2, 0x20($sp)
.L802B6630:
/* E27410 802B6630 8FB1001C */ lw $s1, 0x1C($sp)
glabel .L802B6634
/* E27414 802B6634 8FB00018 */ lw $s0, 0x18($sp)
glabel action_update_talk
/* E27418 802B6638 D7B60030 */ ldc1 $f22, 0x30($sp)
/* E2741C 802B663C D7B40028 */ ldc1 $f20, 0x28($sp)
/* E27420 802B6640 03E00008 */ jr $ra
glabel .L802B6644
/* E27424 802B6644 27BD0038 */ addiu $sp, $sp, 0x38
### DECOMPILED C INSTRUCTIONS:
void action_update_spin_jump(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
CollisionStatus* collisionStatus = &gCollisionStatus;
HiddenPanelsData* panels;
Entity* entity;
s32 belowColliderID;
s32 landed;
f32 velocity;
u32 entityType;
s32 surfaceType;
static f32 RotationRate;
if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
playerStatus->flags &= ~(PS_FLAG_ACTION_STATE_CHANGED | PS_FLAG_JUMPING | PS_FLAG_FALLING);
playerStatus->flags |= (PS_FLAG_JUMPING | PS_FLAG_FLYING);
playerStatus->actionSubstate = SUBSTATE_SPIN;
playerStatus->currentSpeed = 0.0f;
RotationRate = 0.0f;
playerStatus->gravityIntegrator[0] = 5.2f;
suggest_player_anim_allow_backward(ANIM_Mario1_Sit);
disable_player_input();
playerStatus->flags |= PS_FLAG_SPECIAL_JUMP;
gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
sfx_play_sound_at_player(SOUND_SPIN_JUMP, SOUND_SPACE_MODE_0);
}
landed = FALSE;
switch (playerStatus->actionSubstate) {
case SUBSTATE_SPIN:
RotationRate = 40.0f;
playerStatus->pitch += RotationRate;
if (playerStatus->pitch >= 360.0f) {
playerStatus->pitch = 360.0f;
}
if (playerStatus->gravityIntegrator[0] >= 0.0f) {
playerStatus->gravityIntegrator[0] -= 0.54;
if (collisionStatus->currentCeiling < 0) {
playerStatus->position.y += playerStatus->gravityIntegrator[0];
} else if (collisionStatus->currentCeiling & COLLISION_WITH_ENTITY_BIT) {
entity = get_entity_by_index(collisionStatus->currentCeiling);
if (entity != NULL) {
playerStatus->position.y = entity->position.y - (playerStatus->colliderHeight * 0.5);
}
}
}
if (playerStatus->pitch == 360.0f) {
if (playerStatus->gravityIntegrator[0] <= 0.0f) {
playerStatus->currentStateTime = 5;
playerStatus->actionSubstate = SUBSTATE_RISE;
playerStatus->gravityIntegrator[0] = 2.0f;
}
}
collisionStatus->currentCeiling = -1;
break;
case SUBSTATE_RISE:
if (playerStatus->gravityIntegrator[0] >= 0.0f) {
playerStatus->gravityIntegrator[0] -= 1.4;
if (collisionStatus->currentCeiling < 0) {
playerStatus->position.y += playerStatus->gravityIntegrator[0];
}
}
if (--playerStatus->currentStateTime <= 0) {
playerStatus->actionSubstate++;
}
break;
case SUBSTATE_HOVER:
playerStatus->position.y = player_check_collision_below(0.0f, &belowColliderID);
RotationRate = 45.0f;
playerStatus->pitch += RotationRate;
if (playerStatus->pitch >= 360.0) {
playerStatus->pitch = 0.0f;
playerStatus->actionSubstate++;
playerStatus->gravityIntegrator[1] = -3.4744f;
playerStatus->gravityIntegrator[2] = 0.4704f;
playerStatus->gravityIntegrator[3] = -1.1904f;
playerStatus->gravityIntegrator[0] = playerStatus->gravityIntegrator[1];
suggest_player_anim_allow_backward(ANIM_Mario1_SpinJump);
}
break;
case SUBSTATE_DESCEND:
velocity = player_fall_distance();
playerStatus->position.y = player_check_collision_below(velocity, &belowColliderID);
if (velocity < -100.0f) {
playerStatus->gravityIntegrator[3] = 0.0f;
playerStatus->gravityIntegrator[2] = 0.0f;
playerStatus->gravityIntegrator[1] = 0.0f;
playerStatus->gravityIntegrator[0] = -100.0f;
}
if (belowColliderID >= 0) {
if (collisionStatus->currentFloor & COLLISION_WITH_ENTITY_BIT && (entityType = get_entity_type(collisionStatus->currentFloor),
entityType == ENTITY_TYPE_RED_SWITCH || entityType == ENTITY_TYPE_BLUE_SWITCH)) {
get_entity_by_index(collisionStatus->currentFloor)->collisionFlags |= ENTITY_COLLISION_PLAYER_TOUCH_FLOOR;
playerStatus->actionSubstate = SUBSTATE_HIT_SWITCH;
playerStatus->flags &= ~PS_FLAG_FLYING;
break;
} else {
surfaceType = get_collider_flags(belowColliderID) & COLLIDER_FLAGS_SURFACE_TYPE_MASK;
if (surfaceType == SURFACE_TYPE_LAVA) {
playerStatus->hazardType = HAZARD_TYPE_LAVA;
set_action_state(ACTION_STATE_HIT_LAVA);
playerStatus->flags |= PS_FLAG_HIT_FIRE;
playerStatus->flags &= ~PS_FLAG_FLYING;
return;
} else if (surfaceType == SURFACE_TYPE_SPIKES) {
set_action_state(ACTION_STATE_HIT_LAVA);
playerStatus->flags &= ~PS_FLAG_FLYING;
return;
} else {
playerStatus->gravityIntegrator[1] = -3.4744f;
playerStatus->gravityIntegrator[2] = 0.4704f;
playerStatus->gravityIntegrator[3] = -1.1904f;
playerStatus->gravityIntegrator[0] = 10.0f;
suggest_player_anim_allow_backward(ANIM_Mario1_SpinJump);
playerStatus->actionState = ACTION_STATE_SPIN_POUND;
playerStatus->timeInAir = 0;
playerStatus->poundImpactDelay = 12;
playerStatus->pitch = 0.0f;
playerStatus->actionSubstate++;
exec_ShakeCam1(0, 0, 4);
sfx_play_sound_at_player(SOUND_149, SOUND_SPACE_MODE_0);
start_rumble(128, 25);
panels = &gCurrentHiddenPanels;
panels->tryFlipTrigger = TRUE;
panels->flipTriggerPosY = playerStatus->position.y;
playerStatus->flags |= PS_FLAG_SPECIAL_LAND;
}
}
}
break;
case SUBSTATE_IMPACT:
velocity = integrate_gravity();
if (velocity == 0.0f) {
landed = TRUE;
} else {
if (playerStatus->gravityIntegrator[0] > 0.0f) {
playerStatus->position.y += velocity;
} else {
playerStatus->position.y = player_check_collision_below(velocity, &belowColliderID);
if (playerStatus->gravityIntegrator[0] < 0.0f && belowColliderID >= 0) {
playerStatus->actionSubstate++;
}
}
playerStatus->position.y = player_check_collision_below(0.0f, &belowColliderID);
}
break;
case SUBSTATE_HOLD:
playerStatus->position.y = player_check_collision_below(0.0f, &belowColliderID);
if (belowColliderID >= 0) {
playerStatus->gravityIntegrator[0] = 0.0f;
playerStatus->gravityIntegrator[1] = 0.0f;
playerStatus->gravityIntegrator[2] = 0.0f;
playerStatus->gravityIntegrator[3] = 0.0f;
}
// fallthrough
case SUBSTATE_ABORT:
if (--playerStatus->poundImpactDelay <= 0) {
landed = TRUE;
}
break;
case SUBSTATE_HIT_SWITCH:
set_action_state(ACTION_STATE_LANDING_ON_SWITCH);
playerStatus->actionSubstate++;
enable_player_input();
break;
case SUBSTATE_DONE_SWITCH:
break;
}
if (landed) {
set_action_state(ACTION_STATE_LAND);
playerStatus->flags &= ~PS_FLAG_FLYING;
}
if (playerStatus->gravityIntegrator[0] < 0.0f) {
belowColliderID = get_collider_below_spin_jump();
if (belowColliderID >= 0) {
collisionStatus->lastTouchedFloor = -1;
collisionStatus->currentFloor = belowColliderID;
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel damage_indicator_render_impl
/* 34F958 E003C498 27BDFF18 */ addiu $sp, $sp, -0xE8
/* 34F95C E003C49C 3C05DB06 */ lui $a1, (0xDB060024 >> 16)
/* 34F960 E003C4A0 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF)
/* 34F964 E003C4A4 AFA400E8 */ sw $a0, 0xE8($sp)
/* 34F968 E003C4A8 27A40020 */ addiu $a0, $sp, 0x20
/* 34F96C E003C4AC AFB300BC */ sw $s3, 0xBC($sp)
/* 34F970 E003C4B0 3C13800A */ lui $s3, %hi(gMainGfxPos)
/* 34F974 E003C4B4 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos)
/* 34F978 E003C4B8 8FAA00E8 */ lw $t2, 0xE8($sp)
/* 34F97C E003C4BC 3C02E700 */ lui $v0, (0xE7000000 >> 16)
/* 34F980 E003C4C0 AFBF00D4 */ sw $ra, 0xD4($sp)
/* 34F984 E003C4C4 AFBE00D0 */ sw $fp, 0xD0($sp)
/* 34F988 E003C4C8 AFB700CC */ sw $s7, 0xCC($sp)
/* 34F98C E003C4CC AFB600C8 */ sw $s6, 0xC8($sp)
/* 34F990 E003C4D0 AFB500C4 */ sw $s5, 0xC4($sp)
/* 34F994 E003C4D4 AFB400C0 */ sw $s4, 0xC0($sp)
/* 34F998 E003C4D8 AFB200B8 */ sw $s2, 0xB8($sp)
/* 34F99C E003C4DC AFB100B4 */ sw $s1, 0xB4($sp)
/* 34F9A0 E003C4E0 AFB000B0 */ sw $s0, 0xB0($sp)
/* 34F9A4 E003C4E4 F7B600E0 */ sdc1 $f22, 0xE0($sp)
/* 34F9A8 E003C4E8 F7B400D8 */ sdc1 $f20, 0xD8($sp)
/* 34F9AC E003C4EC 8E680000 */ lw $t0, 0x0($s3)
/* 34F9B0 E003C4F0 8D54000C */ lw $s4, 0xC($t2)
/* 34F9B4 E003C4F4 0100182D */ daddu $v1, $t0, $zero
/* 34F9B8 E003C4F8 8E8A003C */ lw $t2, 0x3C($s4)
/* 34F9BC E003C4FC 25080008 */ addiu $t0, $t0, 0x8
/* 34F9C0 E003C500 AFAA00A8 */ sw $t2, 0xA8($sp)
/* 34F9C4 E003C504 AC620000 */ sw $v0, 0x0($v1)
/* 34F9C8 E003C508 AC600004 */ sw $zero, 0x4($v1)
/* 34F9CC E003C50C AD050000 */ sw $a1, 0x0($t0)
/* 34F9D0 E003C510 8FAA00E8 */ lw $t2, 0xE8($sp)
/* 34F9D4 E003C514 3C120001 */ lui $s2, (0x11630 >> 16)
/* 34F9D8 E003C518 8D420010 */ lw $v0, 0x10($t2)
/* 34F9DC E003C51C 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF)
/* 34F9E0 E003C520 AE680000 */ sw $t0, 0x0($s3)
/* 34F9E4 E003C524 8C42001C */ lw $v0, 0x1C($v0)
/* 34F9E8 E003C528 3C038000 */ lui $v1, (0x80000000 >> 16)
/* 34F9EC E003C52C 00431021 */ addu $v0, $v0, $v1
/* 34F9F0 E003C530 AD020004 */ sw $v0, 0x4($t0)
/* 34F9F4 E003C534 8E850004 */ lw $a1, 0x4($s4)
/* 34F9F8 E003C538 8E860008 */ lw $a2, 0x8($s4)
/* 34F9FC E003C53C 8E87000C */ lw $a3, 0xC($s4)
/* 34FA00 E003C540 25080008 */ addiu $t0, $t0, 0x8
/* 34FA04 E003C544 0C080108 */ jal shim_guTranslateF
/* 34FA08 E003C548 AE680000 */ sw $t0, 0x0($s3)
/* 34FA0C E003C54C 27B00060 */ addiu $s0, $sp, 0x60
/* 34FA10 E003C550 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 34FA14 E003C554 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 34FA18 E003C558 44800000 */ mtc1 $zero, $f0
/* 34FA1C E003C55C 00031080 */ sll $v0, $v1, 2
/* 34FA20 E003C560 00431021 */ addu $v0, $v0, $v1
/* 34FA24 E003C564 00021080 */ sll $v0, $v0, 2
/* 34FA28 E003C568 00431023 */ subu $v0, $v0, $v1
/* 34FA2C E003C56C 000218C0 */ sll $v1, $v0, 3
/* 34FA30 E003C570 00431021 */ addu $v0, $v0, $v1
/* 34FA34 E003C574 000210C0 */ sll $v0, $v0, 3
/* 34FA38 E003C578 44060000 */ mfc1 $a2, $f0
/* 34FA3C E003C57C 3C01800B */ lui $at, %hi(gCameras + 0x6C)
/* 34FA40 E003C580 00220821 */ addu $at, $at, $v0
/* 34FA44 E003C584 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at)
/* 34FA48 E003C588 3C073F80 */ lui $a3, (0x3F800000 >> 16)
/* 34FA4C E003C58C 46000007 */ neg.s $f0, $f0
/* 34FA50 E003C590 44050000 */ mfc1 $a1, $f0
/* 34FA54 E003C594 0200202D */ daddu $a0, $s0, $zero
/* 34FA58 E003C598 0C080104 */ jal shim_guRotateF
/* 34FA5C E003C59C AFA60010 */ sw $a2, 0x10($sp)
/* 34FA60 E003C5A0 0200202D */ daddu $a0, $s0, $zero
/* 34FA64 E003C5A4 27A50020 */ addiu $a1, $sp, 0x20
/* 34FA68 E003C5A8 0C080114 */ jal shim_guMtxCatF
/* 34FA6C E003C5AC 00A0302D */ daddu $a2, $a1, $zero
/* 34FA70 E003C5B0 27A40020 */ addiu $a0, $sp, 0x20
/* 34FA74 E003C5B4 3C108007 */ lui $s0, %hi(gMatrixListPos)
/* 34FA78 E003C5B8 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos)
/* 34FA7C E003C5BC 3C11800A */ lui $s1, %hi(gDisplayContext)
/* 34FA80 E003C5C0 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext)
/* 34FA84 E003C5C4 96050000 */ lhu $a1, 0x0($s0)
/* 34FA88 E003C5C8 8E220000 */ lw $v0, 0x0($s1)
/* 34FA8C E003C5CC 00052980 */ sll $a1, $a1, 6
/* 34FA90 E003C5D0 00B22821 */ addu $a1, $a1, $s2
/* 34FA94 E003C5D4 0C080118 */ jal shim_guMtxF2L
/* 34FA98 E003C5D8 00452821 */ addu $a1, $v0, $a1
/* 34FA9C E003C5DC 8E670000 */ lw $a3, 0x0($s3)
/* 34FAA0 E003C5E0 00E0282D */ daddu $a1, $a3, $zero
/* 34FAA4 E003C5E4 24E70008 */ addiu $a3, $a3, 0x8
/* 34FAA8 E003C5E8 AE670000 */ sw $a3, 0x0($s3)
/* 34FAAC E003C5EC 96040000 */ lhu $a0, 0x0($s0)
/* 34FAB0 E003C5F0 3C02DA38 */ lui $v0, (0xDA380000 >> 16)
/* 34FAB4 E003C5F4 ACA20000 */ sw $v0, 0x0($a1)
/* 34FAB8 E003C5F8 8E230000 */ lw $v1, 0x0($s1)
/* 34FABC E003C5FC 3082FFFF */ andi $v0, $a0, 0xFFFF
/* 34FAC0 E003C600 00021180 */ sll $v0, $v0, 6
/* 34FAC4 E003C604 00521021 */ addu $v0, $v0, $s2
/* 34FAC8 E003C608 00621821 */ addu $v1, $v1, $v0
/* 34FACC E003C60C ACA30004 */ sw $v1, 0x4($a1)
/* 34FAD0 E003C610 8FAA00E8 */ lw $t2, 0xE8($sp)
/* 34FAD4 E003C614 8D450008 */ lw $a1, 0x8($t2)
/* 34FAD8 E003C618 24840001 */ addiu $a0, $a0, 0x1
/* 34FADC E003C61C A6040000 */ sh $a0, 0x0($s0)
/* 34FAE0 E003C620 8D43000C */ lw $v1, 0xC($t2)
/* 34FAE4 E003C624 8E840034 */ lw $a0, 0x34($s4)
/* 34FAE8 E003C628 00051180 */ sll $v0, $a1, 6
/* 34FAEC E003C62C 2442FFC0 */ addiu $v0, $v0, -0x40
/* 34FAF0 E003C630 0062A021 */ addu $s4, $v1, $v0
/* 34FAF4 E003C634 2484FFFF */ addiu $a0, $a0, -0x1
/* 34FAF8 E003C638 24A5FFFF */ addiu $a1, $a1, -0x1
/* 34FAFC E003C63C AFA400A0 */ sw $a0, 0xA0($sp)
/* 34FB00 E003C640 AFA500A4 */ sw $a1, 0xA4($sp)
/* 34FB04 E003C644 8E83002C */ lw $v1, 0x2C($s4)
/* 34FB08 E003C648 240200FF */ addiu $v0, $zero, 0xFF
/* 34FB0C E003C64C 14620005 */ bne $v1, $v0, .LE003C664
/* 34FB10 E003C650 3C05E200 */ lui $a1, (0xE200001C >> 16)
/* 34FB14 E003C654 34A5001C */ ori $a1, $a1, (0xE200001C & 0xFFFF)
/* 34FB18 E003C658 3C030055 */ lui $v1, (0x553048 >> 16)
/* 34FB1C E003C65C 0800F19C */ j .LE003C670
/* 34FB20 E003C660 34633048 */ ori $v1, $v1, (0x553048 & 0xFFFF)
.LE003C664:
/* 34FB24 E003C664 34A5001C */ ori $a1, $a1, (0xE200001C & 0xFFFF)
/* 34FB28 E003C668 3C030050 */ lui $v1, (0x504340 >> 16)
/* 34FB2C E003C66C 34634340 */ ori $v1, $v1, (0x504340 & 0xFFFF)
.LE003C670:
/* 34FB30 E003C670 3C06FC62 */ lui $a2, (0xFC6232C4 >> 16)
/* 34FB34 E003C674 34C632C4 */ ori $a2, $a2, (0xFC6232C4 & 0xFFFF)
/* 34FB38 E003C678 3C04FF65 */ lui $a0, (0xFF65FEFF >> 16)
/* 34FB3C E003C67C 3484FEFF */ ori $a0, $a0, (0xFF65FEFF & 0xFFFF)
/* 34FB40 E003C680 24E20008 */ addiu $v0, $a3, 0x8
/* 34FB44 E003C684 AE620000 */ sw $v0, 0x0($s3)
/* 34FB48 E003C688 24E20010 */ addiu $v0, $a3, 0x10
/* 34FB4C E003C68C ACE50000 */ sw $a1, 0x0($a3)
/* 34FB50 E003C690 ACE30004 */ sw $v1, 0x4($a3)
/* 34FB54 E003C694 AE620000 */ sw $v0, 0x0($s3)
/* 34FB58 E003C698 ACE60008 */ sw $a2, 0x8($a3)
/* 34FB5C E003C69C ACE4000C */ sw $a0, 0xC($a3)
/* 34FB60 E003C6A0 8FAA00E8 */ lw $t2, 0xE8($sp)
/* 34FB64 E003C6A4 8D420008 */ lw $v0, 0x8($t2)
/* 34FB68 E003C6A8 24120001 */ addiu $s2, $zero, 0x1
/* 34FB6C E003C6AC 0242102A */ slt $v0, $s2, $v0
/* 34FB70 E003C6B0 10400161 */ beqz $v0, .LE003CC38
/* 34FB74 E003C6B4 3C15DE00 */ lui $s5, (0xDE000000 >> 16)
/* 34FB78 E003C6B8 3C10800A */ lui $s0, %hi(gMainGfxPos)
/* 34FB7C E003C6BC 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos)
/* 34FB80 E003C6C0 3C17800A */ lui $s7, %hi(gDisplayContext)
/* 34FB84 E003C6C4 26F7A674 */ addiu $s7, $s7, %lo(gDisplayContext)
/* 34FB88 E003C6C8 3C168007 */ lui $s6, %hi(gMatrixListPos)
/* 34FB8C E003C6CC 26D641F0 */ addiu $s6, $s6, %lo(gMatrixListPos)
/* 34FB90 E003C6D0 3C130001 */ lui $s3, (0x11630 >> 16)
/* 34FB94 E003C6D4 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF)
/* 34FB98 E003C6D8 3C1ED838 */ lui $fp, (0xD8380002 >> 16)
/* 34FB9C E003C6DC 37DE0002 */ ori $fp, $fp, (0xD8380002 & 0xFFFF)
/* 34FBA0 E003C6E0 26910038 */ addiu $s1, $s4, 0x38
/* 34FBA4 E003C6E4 4480A000 */ mtc1 $zero, $f20
/* 34FBA8 E003C6E8 3C013FE0 */ lui $at, (0x3FE00000 >> 16)
/* 34FBAC E003C6EC 4481B800 */ mtc1 $at, $f23
/* 34FBB0 E003C6F0 4480B000 */ mtc1 $zero, $f22
.LE003C6F4:
/* 34FBB4 E003C6F4 3C022AAA */ lui $v0, (0x2AAAAAAB >> 16)
/* 34FBB8 E003C6F8 3442AAAB */ ori $v0, $v0, (0x2AAAAAAB & 0xFFFF)
/* 34FBBC E003C6FC 8FAA00A0 */ lw $t2, 0xA0($sp)
/* 34FBC0 E003C700 8E060000 */ lw $a2, 0x0($s0)
/* 34FBC4 E003C704 024A2021 */ addu $a0, $s2, $t2
/* 34FBC8 E003C708 00C0402D */ daddu $t0, $a2, $zero
/* 34FBCC E003C70C 24C60008 */ addiu $a2, $a2, 0x8
/* 34FBD0 E003C710 00820018 */ mult $a0, $v0
/* 34FBD4 E003C714 3C02FA00 */ lui $v0, (0xFA000000 >> 16)
/* 34FBD8 E003C718 AE060000 */ sw $a2, 0x0($s0)
/* 34FBDC E003C71C AD020000 */ sw $v0, 0x0($t0)
/* 34FBE0 E003C720 000417C3 */ sra $v0, $a0, 31
/* 34FBE4 E003C724 9227FFF7 */ lbu $a3, -0x9($s1)
/* 34FBE8 E003C728 00005010 */ mfhi $t2
/* 34FBEC E003C72C 000A1843 */ sra $v1, $t2, 1
/* 34FBF0 E003C730 00621823 */ subu $v1, $v1, $v0
/* 34FBF4 E003C734 00031040 */ sll $v0, $v1, 1
/* 34FBF8 E003C738 00431021 */ addu $v0, $v0, $v1
/* 34FBFC E003C73C 00021080 */ sll $v0, $v0, 2
/* 34FC00 E003C740 00822023 */ subu $a0, $a0, $v0
/* 34FC04 E003C744 00041040 */ sll $v0, $a0, 1
/* 34FC08 E003C748 00441021 */ addu $v0, $v0, $a0
/* 34FC0C E003C74C 3C0AE004 */ lui $t2, %hi(D_E003CCF8)
/* 34FC10 E003C750 254ACCF8 */ addiu $t2, $t2, %lo(D_E003CCF8)
/* 34FC14 E003C754 004A1821 */ addu $v1, $v0, $t2
/* 34FC18 E003C758 0060202D */ daddu $a0, $v1, $zero
/* 34FC1C E003C75C 0060102D */ daddu $v0, $v1, $zero
/* 34FC20 E003C760 90630000 */ lbu $v1, 0x0($v1)
/* 34FC24 E003C764 90840001 */ lbu $a0, 0x1($a0)
/* 34FC28 E003C768 90450002 */ lbu $a1, 0x2($v0)
/* 34FC2C E003C76C 24C20008 */ addiu $v0, $a2, 0x8
/* 34FC30 E003C770 AE020000 */ sw $v0, 0x0($s0)
/* 34FC34 E003C774 00031E00 */ sll $v1, $v1, 24
/* 34FC38 E003C778 00042400 */ sll $a0, $a0, 16
/* 34FC3C E003C77C 00641825 */ or $v1, $v1, $a0
/* 34FC40 E003C780 00052A00 */ sll $a1, $a1, 8
/* 34FC44 E003C784 00651825 */ or $v1, $v1, $a1
/* 34FC48 E003C788 00671825 */ or $v1, $v1, $a3
/* 34FC4C E003C78C AD030004 */ sw $v1, 0x4($t0)
/* 34FC50 E003C790 3C0A0900 */ lui $t2, %hi(D_09001D40_40EFD0)
/* 34FC54 E003C794 254A1D40 */ addiu $t2, $t2, %lo(D_09001D40_40EFD0)
/* 34FC58 E003C798 ACD50000 */ sw $s5, 0x0($a2)
/* 34FC5C E003C79C ACCA0004 */ sw $t2, 0x4($a2)
/* 34FC60 E003C7A0 8FAA00A4 */ lw $t2, 0xA4($sp)
/* 34FC64 E003C7A4 164A006E */ bne $s2, $t2, .LE003C960
/* 34FC68 E003C7A8 27A40020 */ addiu $a0, $sp, 0x20
/* 34FC6C E003C7AC C6200000 */ lwc1 $f0, 0x0($s1)
/* 34FC70 E003C7B0 4405A000 */ mfc1 $a1, $f20
/* 34FC74 E003C7B4 4406A000 */ mfc1 $a2, $f20
/* 34FC78 E003C7B8 4407A000 */ mfc1 $a3, $f20
/* 34FC7C E003C7BC E7A00010 */ swc1 $f0, 0x10($sp)
/* 34FC80 E003C7C0 C620FFD8 */ lwc1 $f0, -0x28($s1)
/* 34FC84 E003C7C4 E7A00014 */ swc1 $f0, 0x14($sp)
/* 34FC88 E003C7C8 C620FFDC */ lwc1 $f0, -0x24($s1)
/* 34FC8C E003C7CC E7A00018 */ swc1 $f0, 0x18($sp)
/* 34FC90 E003C7D0 C620FFE0 */ lwc1 $f0, -0x20($s1)
/* 34FC94 E003C7D4 0C080180 */ jal shim_guPositionF
/* 34FC98 E003C7D8 E7A0001C */ swc1 $f0, 0x1C($sp)
/* 34FC9C E003C7DC 27A40020 */ addiu $a0, $sp, 0x20
/* 34FCA0 E003C7E0 96C50000 */ lhu $a1, 0x0($s6)
/* 34FCA4 E003C7E4 8EE20000 */ lw $v0, 0x0($s7)
/* 34FCA8 E003C7E8 00052980 */ sll $a1, $a1, 6
/* 34FCAC E003C7EC 00B32821 */ addu $a1, $a1, $s3
/* 34FCB0 E003C7F0 0C080118 */ jal shim_guMtxF2L
/* 34FCB4 E003C7F4 00452821 */ addu $a1, $v0, $a1
/* 34FCB8 E003C7F8 8E080000 */ lw $t0, 0x0($s0)
/* 34FCBC E003C7FC 96C90000 */ lhu $t1, 0x0($s6)
/* 34FCC0 E003C800 0100202D */ daddu $a0, $t0, $zero
/* 34FCC4 E003C804 25080008 */ addiu $t0, $t0, 0x8
/* 34FCC8 E003C808 3C0ADA38 */ lui $t2, (0xDA380000 >> 16)
/* 34FCCC E003C80C 3122FFFF */ andi $v0, $t1, 0xFFFF
/* 34FCD0 E003C810 00021180 */ sll $v0, $v0, 6
/* 34FCD4 E003C814 AC8A0000 */ sw $t2, 0x0($a0)
/* 34FCD8 E003C818 8EE30000 */ lw $v1, 0x0($s7)
/* 34FCDC E003C81C 00531021 */ addu $v0, $v0, $s3
/* 34FCE0 E003C820 00621821 */ addu $v1, $v1, $v0
/* 34FCE4 E003C824 3C020900 */ lui $v0, %hi(D_09002150_40F3E0)
/* 34FCE8 E003C828 24422150 */ addiu $v0, $v0, %lo(D_09002150_40F3E0)
/* 34FCEC E003C82C AC830004 */ sw $v1, 0x4($a0)
/* 34FCF0 E003C830 240A0040 */ addiu $t2, $zero, 0x40
/* 34FCF4 E003C834 AD150000 */ sw $s5, 0x0($t0)
/* 34FCF8 E003C838 AD020004 */ sw $v0, 0x4($t0)
/* 34FCFC E003C83C AD1E0008 */ sw $fp, 0x8($t0)
/* 34FD00 E003C840 AD0A000C */ sw $t2, 0xC($t0)
/* 34FD04 E003C844 C6200000 */ lwc1 $f0, 0x0($s1)
/* 34FD08 E003C848 E7A00010 */ swc1 $f0, 0x10($sp)
/* 34FD0C E003C84C C620FFD8 */ lwc1 $f0, -0x28($s1)
/* 34FD10 E003C850 C622FFCC */ lwc1 $f2, -0x34($s1)
/* 34FD14 E003C854 46020000 */ add.s $f0, $f0, $f2
/* 34FD18 E003C858 46000021 */ cvt.d.s $f0, $f0
/* 34FD1C E003C85C 46360002 */ mul.d $f0, $f0, $f22
/* 34FD20 E003C860 00000000 */ nop
/* 34FD24 E003C864 46200020 */ cvt.s.d $f0, $f0
/* 34FD28 E003C868 E7A00014 */ swc1 $f0, 0x14($sp)
/* 34FD2C E003C86C C620FFDC */ lwc1 $f0, -0x24($s1)
/* 34FD30 E003C870 C622FFD0 */ lwc1 $f2, -0x30($s1)
/* 34FD34 E003C874 46020000 */ add.s $f0, $f0, $f2
/* 34FD38 E003C878 46000021 */ cvt.d.s $f0, $f0
/* 34FD3C E003C87C 46360002 */ mul.d $f0, $f0, $f22
/* 34FD40 E003C880 00000000 */ nop
/* 34FD44 E003C884 4405A000 */ mfc1 $a1, $f20
/* 34FD48 E003C888 46200020 */ cvt.s.d $f0, $f0
/* 34FD4C E003C88C E7A00018 */ swc1 $f0, 0x18($sp)
/* 34FD50 E003C890 C620FFE0 */ lwc1 $f0, -0x20($s1)
/* 34FD54 E003C894 C622FFD4 */ lwc1 $f2, -0x2C($s1)
/* 34FD58 E003C898 4406A000 */ mfc1 $a2, $f20
/* 34FD5C E003C89C 46020000 */ add.s $f0, $f0, $f2
/* 34FD60 E003C8A0 4407A000 */ mfc1 $a3, $f20
/* 34FD64 E003C8A4 25290001 */ addiu $t1, $t1, 0x1
/* 34FD68 E003C8A8 46000021 */ cvt.d.s $f0, $f0
/* 34FD6C E003C8AC 46360002 */ mul.d $f0, $f0, $f22
/* 34FD70 E003C8B0 00000000 */ nop
/* 34FD74 E003C8B4 27A40020 */ addiu $a0, $sp, 0x20
/* 34FD78 E003C8B8 25020008 */ addiu $v0, $t0, 0x8
/* 34FD7C E003C8BC AE080000 */ sw $t0, 0x0($s0)
/* 34FD80 E003C8C0 25080010 */ addiu $t0, $t0, 0x10
/* 34FD84 E003C8C4 A6C90000 */ sh $t1, 0x0($s6)
/* 34FD88 E003C8C8 AE020000 */ sw $v0, 0x0($s0)
/* 34FD8C E003C8CC AE080000 */ sw $t0, 0x0($s0)
/* 34FD90 E003C8D0 46200020 */ cvt.s.d $f0, $f0
/* 34FD94 E003C8D4 0C080180 */ jal shim_guPositionF
/* 34FD98 E003C8D8 E7A0001C */ swc1 $f0, 0x1C($sp)
/* 34FD9C E003C8DC 27A40020 */ addiu $a0, $sp, 0x20
/* 34FDA0 E003C8E0 96C50000 */ lhu $a1, 0x0($s6)
/* 34FDA4 E003C8E4 8EE20000 */ lw $v0, 0x0($s7)
/* 34FDA8 E003C8E8 00052980 */ sll $a1, $a1, 6
/* 34FDAC E003C8EC 00B32821 */ addu $a1, $a1, $s3
/* 34FDB0 E003C8F0 0C080118 */ jal shim_guMtxF2L
/* 34FDB4 E003C8F4 00452821 */ addu $a1, $v0, $a1
/* 34FDB8 E003C8F8 8E040000 */ lw $a0, 0x0($s0)
/* 34FDBC E003C8FC 96C30000 */ lhu $v1, 0x0($s6)
/* 34FDC0 E003C900 0080282D */ daddu $a1, $a0, $zero
/* 34FDC4 E003C904 24840008 */ addiu $a0, $a0, 0x8
/* 34FDC8 E003C908 3C0ADA38 */ lui $t2, (0xDA380000 >> 16)
/* 34FDCC E003C90C 24620001 */ addiu $v0, $v1, 0x1
/* 34FDD0 E003C910 3063FFFF */ andi $v1, $v1, 0xFFFF
/* 34FDD4 E003C914 00031980 */ sll $v1, $v1, 6
/* 34FDD8 E003C918 AE040000 */ sw $a0, 0x0($s0)
/* 34FDDC E003C91C ACAA0000 */ sw $t2, 0x0($a1)
/* 34FDE0 E003C920 A6C20000 */ sh $v0, 0x0($s6)
/* 34FDE4 E003C924 8EE20000 */ lw $v0, 0x0($s7)
/* 34FDE8 E003C928 00731821 */ addu $v1, $v1, $s3
/* 34FDEC E003C92C 00431021 */ addu $v0, $v0, $v1
/* 34FDF0 E003C930 ACA20004 */ sw $v0, 0x4($a1)
/* 34FDF4 E003C934 24820008 */ addiu $v0, $a0, 0x8
/* 34FDF8 E003C938 AE020000 */ sw $v0, 0x0($s0)
/* 34FDFC E003C93C 3C020900 */ lui $v0, %hi(D_09002160_40F3F0)
/* 34FE00 E003C940 24422160 */ addiu $v0, $v0, %lo(D_09002160_40F3F0)
/* 34FE04 E003C944 AC820004 */ sw $v0, 0x4($a0)
/* 34FE08 E003C948 24820010 */ addiu $v0, $a0, 0x10
/* 34FE0C E003C94C 240A0040 */ addiu $t2, $zero, 0x40
/* 34FE10 E003C950 AC950000 */ sw $s5, 0x0($a0)
/* 34FE14 E003C954 AE020000 */ sw $v0, 0x0($s0)
/* 34FE18 E003C958 AC9E0008 */ sw $fp, 0x8($a0)
/* 34FE1C E003C95C AC8A000C */ sw $t2, 0xC($a0)
.LE003C960:
/* 34FE20 E003C960 8E030000 */ lw $v1, 0x0($s0)
/* 34FE24 E003C964 27A40020 */ addiu $a0, $sp, 0x20
/* 34FE28 E003C968 0060102D */ daddu $v0, $v1, $zero
/* 34FE2C E003C96C 3C0A0900 */ lui $t2, %hi(D_09001D40_40EFD0)
/* 34FE30 E003C970 254A1D40 */ addiu $t2, $t2, %lo(D_09001D40_40EFD0)
/* 34FE34 E003C974 AC550000 */ sw $s5, 0x0($v0)
/* 34FE38 E003C978 AC4A0004 */ sw $t2, 0x4($v0)
/* 34FE3C E003C97C 8E25FFCC */ lw $a1, -0x34($s1)
/* 34FE40 E003C980 8E26FFD0 */ lw $a2, -0x30($s1)
/* 34FE44 E003C984 8E27FFD4 */ lw $a3, -0x2C($s1)
/* 34FE48 E003C988 24630008 */ addiu $v1, $v1, 0x8
/* 34FE4C E003C98C 0C080108 */ jal shim_guTranslateF
/* 34FE50 E003C990 AE030000 */ sw $v1, 0x0($s0)
/* 34FE54 E003C994 27A40020 */ addiu $a0, $sp, 0x20
/* 34FE58 E003C998 96C50000 */ lhu $a1, 0x0($s6)
/* 34FE5C E003C99C 8EE20000 */ lw $v0, 0x0($s7)
/* 34FE60 E003C9A0 00052980 */ sll $a1, $a1, 6
/* 34FE64 E003C9A4 00B32821 */ addu $a1, $a1, $s3
/* 34FE68 E003C9A8 0C080118 */ jal shim_guMtxF2L
/* 34FE6C E003C9AC 00452821 */ addu $a1, $v0, $a1
/* 34FE70 E003C9B0 27A40020 */ addiu $a0, $sp, 0x20
/* 34FE74 E003C9B4 8E060000 */ lw $a2, 0x0($s0)
/* 34FE78 E003C9B8 3C073F80 */ lui $a3, (0x3F800000 >> 16)
/* 34FE7C E003C9BC 96C80000 */ lhu $t0, 0x0($s6)
/* 34FE80 E003C9C0 00C0282D */ daddu $a1, $a2, $zero
/* 34FE84 E003C9C4 3C0ADA38 */ lui $t2, (0xDA380000 >> 16)
/* 34FE88 E003C9C8 3102FFFF */ andi $v0, $t0, 0xFFFF
/* 34FE8C E003C9CC 00021180 */ sll $v0, $v0, 6
/* 34FE90 E003C9D0 00531021 */ addu $v0, $v0, $s3
/* 34FE94 E003C9D4 ACAA0000 */ sw $t2, 0x0($a1)
/* 34FE98 E003C9D8 8EE30000 */ lw $v1, 0x0($s7)
/* 34FE9C E003C9DC 24C60008 */ addiu $a2, $a2, 0x8
/* 34FEA0 E003C9E0 00621821 */ addu $v1, $v1, $v0
/* 34FEA4 E003C9E4 ACA30004 */ sw $v1, 0x4($a1)
/* 34FEA8 E003C9E8 8E250000 */ lw $a1, 0x0($s1)
/* 34FEAC E003C9EC 25080001 */ addiu $t0, $t0, 0x1
/* 34FEB0 E003C9F0 AE060000 */ sw $a2, 0x0($s0)
/* 34FEB4 E003C9F4 A6C80000 */ sh $t0, 0x0($s6)
/* 34FEB8 E003C9F8 0C080110 */ jal shim_guScaleF
/* 34FEBC E003C9FC 00A0302D */ daddu $a2, $a1, $zero
/* 34FEC0 E003CA00 27A40020 */ addiu $a0, $sp, 0x20
/* 34FEC4 E003CA04 96C50000 */ lhu $a1, 0x0($s6)
/* 34FEC8 E003CA08 8EE20000 */ lw $v0, 0x0($s7)
/* 34FECC E003CA0C 00052980 */ sll $a1, $a1, 6
/* 34FED0 E003CA10 00B32821 */ addu $a1, $a1, $s3
/* 34FED4 E003CA14 0C080118 */ jal shim_guMtxF2L
/* 34FED8 E003CA18 00452821 */ addu $a1, $v0, $a1
/* 34FEDC E003CA1C 8E050000 */ lw $a1, 0x0($s0)
/* 34FEE0 E003CA20 96C30000 */ lhu $v1, 0x0($s6)
/* 34FEE4 E003CA24 00A0202D */ daddu $a0, $a1, $zero
/* 34FEE8 E003CA28 24A50008 */ addiu $a1, $a1, 0x8
/* 34FEEC E003CA2C 3C0ADA38 */ lui $t2, (0xDA380000 >> 16)
/* 34FEF0 E003CA30 24620001 */ addiu $v0, $v1, 0x1
/* 34FEF4 E003CA34 3063FFFF */ andi $v1, $v1, 0xFFFF
/* 34FEF8 E003CA38 00031980 */ sll $v1, $v1, 6
/* 34FEFC E003CA3C AE050000 */ sw $a1, 0x0($s0)
/* 34FF00 E003CA40 AC8A0000 */ sw $t2, 0x0($a0)
/* 34FF04 E003CA44 A6C20000 */ sh $v0, 0x0($s6)
/* 34FF08 E003CA48 8EE20000 */ lw $v0, 0x0($s7)
/* 34FF0C E003CA4C 00731821 */ addu $v1, $v1, $s3
/* 34FF10 E003CA50 00431021 */ addu $v0, $v0, $v1
/* 34FF14 E003CA54 AC820004 */ sw $v0, 0x4($a0)
/* 34FF18 E003CA58 8FAA00A4 */ lw $t2, 0xA4($sp)
/* 34FF1C E003CA5C 164A0006 */ bne $s2, $t2, .LE003CA78
/* 34FF20 E003CA60 24A20008 */ addiu $v0, $a1, 0x8
/* 34FF24 E003CA64 AE020000 */ sw $v0, 0x0($s0)
/* 34FF28 E003CA68 3C020900 */ lui $v0, %hi(D_09002170_40F400)
/* 34FF2C E003CA6C 24422170 */ addiu $v0, $v0, %lo(D_09002170_40F400)
/* 34FF30 E003CA70 0800F2A2 */ j .LE003CA88
/* 34FF34 E003CA74 ACB50000 */ sw $s5, 0x0($a1)
.LE003CA78:
/* 34FF38 E003CA78 AE020000 */ sw $v0, 0x0($s0)
/* 34FF3C E003CA7C 3C020900 */ lui $v0, %hi(D_09002180_40F410)
/* 34FF40 E003CA80 24422180 */ addiu $v0, $v0, %lo(D_09002180_40F410)
/* 34FF44 E003CA84 ACB50000 */ sw $s5, 0x0($a1)
.LE003CA88:
/* 34FF48 E003CA88 ACA20004 */ sw $v0, 0x4($a1)
/* 34FF4C E003CA8C 8FAA00A4 */ lw $t2, 0xA4($sp)
/* 34FF50 E003CA90 164A0050 */ bne $s2, $t2, .LE003CBD4
/* 34FF54 E003CA94 240A0040 */ addiu $t2, $zero, 0x40
/* 34FF58 E003CA98 8E050000 */ lw $a1, 0x0($s0)
/* 34FF5C E003CA9C 3C020900 */ lui $v0, %hi(D_090021A8_40F438)
/* 34FF60 E003CAA0 244221A8 */ addiu $v0, $v0, %lo(D_090021A8_40F438)
/* 34FF64 E003CAA4 00A0182D */ daddu $v1, $a1, $zero
/* 34FF68 E003CAA8 24A50008 */ addiu $a1, $a1, 0x8
/* 34FF6C E003CAAC AE050000 */ sw $a1, 0x0($s0)
/* 34FF70 E003CAB0 AC620004 */ sw $v0, 0x4($v1)
/* 34FF74 E003CAB4 24A20008 */ addiu $v0, $a1, 0x8
/* 34FF78 E003CAB8 AC750000 */ sw $s5, 0x0($v1)
/* 34FF7C E003CABC AE020000 */ sw $v0, 0x0($s0)
/* 34FF80 E003CAC0 24A20010 */ addiu $v0, $a1, 0x10
/* 34FF84 E003CAC4 ACBE0000 */ sw $fp, 0x0($a1)
/* 34FF88 E003CAC8 ACAA0004 */ sw $t2, 0x4($a1)
/* 34FF8C E003CACC AE020000 */ sw $v0, 0x0($s0)
/* 34FF90 E003CAD0 3C020900 */ lui $v0, %hi(D_09001DE0_40F070)
/* 34FF94 E003CAD4 24421DE0 */ addiu $v0, $v0, %lo(D_09001DE0_40F070)
/* 34FF98 E003CAD8 ACB50008 */ sw $s5, 0x8($a1)
/* 34FF9C E003CADC ACA2000C */ sw $v0, 0xC($a1)
/* 34FFA0 E003CAE0 8FAA00A8 */ lw $t2, 0xA8($sp)
/* 34FFA4 E003CAE4 2942000A */ slti $v0, $t2, 0xA
/* 34FFA8 E003CAE8 10400010 */ beqz $v0, .LE003CB2C
/* 34FFAC E003CAEC 24A20018 */ addiu $v0, $a1, 0x18
/* 34FFB0 E003CAF0 AE020000 */ sw $v0, 0x0($s0)
/* 34FFB4 E003CAF4 00121080 */ sll $v0, $s2, 2
/* 34FFB8 E003CAF8 3C0AE004 */ lui $t2, %hi(D_E003CCA0)
/* 34FFBC E003CAFC 254ACCA0 */ addiu $t2, $t2, %lo(D_E003CCA0)
/* 34FFC0 E003CB00 004A1021 */ addu $v0, $v0, $t2
/* 34FFC4 E003CB04 ACB50010 */ sw $s5, 0x10($a1)
/* 34FFC8 E003CB08 8C430000 */ lw $v1, 0x0($v0)
/* 34FFCC E003CB0C 24A20020 */ addiu $v0, $a1, 0x20
/* 34FFD0 E003CB10 AE020000 */ sw $v0, 0x0($s0)
/* 34FFD4 E003CB14 3C020900 */ lui $v0, %hi(D_090021C0_40F450)
/* 34FFD8 E003CB18 244221C0 */ addiu $v0, $v0, %lo(D_090021C0_40F450)
/* 34FFDC E003CB1C ACB50018 */ sw $s5, 0x18($a1)
/* 34FFE0 E003CB20 ACA2001C */ sw $v0, 0x1C($a1)
/* 34FFE4 E003CB24 0800F301 */ j .LE003CC04
/* 34FFE8 E003CB28 ACA30014 */ sw $v1, 0x14($a1)
.LE003CB2C:
/* 34FFEC E003CB2C 3C036666 */ lui $v1, (0x66666667 >> 16)
/* 34FFF0 E003CB30 34636667 */ ori $v1, $v1, (0x66666667 & 0xFFFF)
/* 34FFF4 E003CB34 8FAA00A8 */ lw $t2, 0xA8($sp)
/* 34FFF8 E003CB38 01430018 */ mult $t2, $v1
/* 34FFFC E003CB3C AE020000 */ sw $v0, 0x0($s0)
/* 350000 E003CB40 24A20020 */ addiu $v0, $a1, 0x20
/* 350004 E003CB44 ACB50010 */ sw $s5, 0x10($a1)
/* 350008 E003CB48 AE020000 */ sw $v0, 0x0($s0)
/* 35000C E003CB4C 00005010 */ mfhi $t2
/* 350010 E003CB50 000A1883 */ sra $v1, $t2, 2
/* 350014 E003CB54 8FAA00A8 */ lw $t2, 0xA8($sp)
/* 350018 E003CB58 000A17C3 */ sra $v0, $t2, 31
/* 35001C E003CB5C 00621023 */ subu $v0, $v1, $v0
/* 350020 E003CB60 0040182D */ daddu $v1, $v0, $zero
/* 350024 E003CB64 00031080 */ sll $v0, $v1, 2
/* 350028 E003CB68 00431021 */ addu $v0, $v0, $v1
/* 35002C E003CB6C 00021040 */ sll $v0, $v0, 1
/* 350030 E003CB70 01421023 */ subu $v0, $t2, $v0
/* 350034 E003CB74 00021080 */ sll $v0, $v0, 2
/* 350038 E003CB78 3C0AE004 */ lui $t2, %hi(D_E003CCA0)
/* 35003C E003CB7C 254ACCA0 */ addiu $t2, $t2, %lo(D_E003CCA0)
/* 350040 E003CB80 004A1021 */ addu $v0, $v0, $t2
/* 350044 E003CB84 8C440000 */ lw $a0, 0x0($v0)
/* 350048 E003CB88 24A20028 */ addiu $v0, $a1, 0x28
/* 35004C E003CB8C AE020000 */ sw $v0, 0x0($s0)
/* 350050 E003CB90 3C020900 */ lui $v0, %hi(D_09002200_40F490)
/* 350054 E003CB94 24422200 */ addiu $v0, $v0, %lo(D_09002200_40F490)
/* 350058 E003CB98 00031880 */ sll $v1, $v1, 2
/* 35005C E003CB9C 006A1821 */ addu $v1, $v1, $t2
/* 350060 E003CBA0 ACB50018 */ sw $s5, 0x18($a1)
/* 350064 E003CBA4 ACA2001C */ sw $v0, 0x1C($a1)
/* 350068 E003CBA8 ACB50020 */ sw $s5, 0x20($a1)
/* 35006C E003CBAC ACA40014 */ sw $a0, 0x14($a1)
/* 350070 E003CBB0 8C630000 */ lw $v1, 0x0($v1)
/* 350074 E003CBB4 24A20030 */ addiu $v0, $a1, 0x30
/* 350078 E003CBB8 AE020000 */ sw $v0, 0x0($s0)
/* 35007C E003CBBC 3C020900 */ lui $v0, %hi(D_090021E0_40F470)
/* 350080 E003CBC0 244221E0 */ addiu $v0, $v0, %lo(D_090021E0_40F470)
/* 350084 E003CBC4 ACB50028 */ sw $s5, 0x28($a1)
/* 350088 E003CBC8 ACA2002C */ sw $v0, 0x2C($a1)
/* 35008C E003CBCC 0800F301 */ j .LE003CC04
/* 350090 E003CBD0 ACA30024 */ sw $v1, 0x24($a1)
.LE003CBD4:
/* 350094 E003CBD4 8E030000 */ lw $v1, 0x0($s0)
/* 350098 E003CBD8 3C020900 */ lui $v0, %hi(D_09002190_40F420)
/* 35009C E003CBDC 24422190 */ addiu $v0, $v0, %lo(D_09002190_40F420)
/* 3500A0 E003CBE0 0060202D */ daddu $a0, $v1, $zero
/* 3500A4 E003CBE4 24630008 */ addiu $v1, $v1, 0x8
/* 3500A8 E003CBE8 AE030000 */ sw $v1, 0x0($s0)
/* 3500AC E003CBEC AC820004 */ sw $v0, 0x4($a0)
/* 3500B0 E003CBF0 24620008 */ addiu $v0, $v1, 0x8
/* 3500B4 E003CBF4 AC950000 */ sw $s5, 0x0($a0)
/* 3500B8 E003CBF8 AE020000 */ sw $v0, 0x0($s0)
/* 3500BC E003CBFC AC7E0000 */ sw $fp, 0x0($v1)
/* 3500C0 E003CC00 AC6A0004 */ sw $t2, 0x4($v1)
.LE003CC04:
/* 3500C4 E003CC04 8E020000 */ lw $v0, 0x0($s0)
/* 3500C8 E003CC08 26520001 */ addiu $s2, $s2, 0x1
/* 3500CC E003CC0C 0040182D */ daddu $v1, $v0, $zero
/* 3500D0 E003CC10 240A0040 */ addiu $t2, $zero, 0x40
/* 3500D4 E003CC14 AC7E0000 */ sw $fp, 0x0($v1)
/* 3500D8 E003CC18 AC6A0004 */ sw $t2, 0x4($v1)
/* 3500DC E003CC1C 8FAA00E8 */ lw $t2, 0xE8($sp)
/* 3500E0 E003CC20 2631FFC0 */ addiu $s1, $s1, -0x40
/* 3500E4 E003CC24 8D430008 */ lw $v1, 0x8($t2)
/* 3500E8 E003CC28 24420008 */ addiu $v0, $v0, 0x8
/* 3500EC E003CC2C 0243182A */ slt $v1, $s2, $v1
/* 3500F0 E003CC30 1460FEB0 */ bnez $v1, .LE003C6F4
/* 3500F4 E003CC34 AE020000 */ sw $v0, 0x0($s0)
.LE003CC38:
/* 3500F8 E003CC38 3C05D838 */ lui $a1, (0xD8380002 >> 16)
/* 3500FC E003CC3C 3C03800A */ lui $v1, %hi(gMainGfxPos)
/* 350100 E003CC40 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos)
/* 350104 E003CC44 8C620000 */ lw $v0, 0x0($v1)
/* 350108 E003CC48 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF)
/* 35010C E003CC4C 0040202D */ daddu $a0, $v0, $zero
/* 350110 E003CC50 24420008 */ addiu $v0, $v0, 0x8
/* 350114 E003CC54 AC620000 */ sw $v0, 0x0($v1)
/* 350118 E003CC58 24020040 */ addiu $v0, $zero, 0x40
/* 35011C E003CC5C AC850000 */ sw $a1, 0x0($a0)
/* 350120 E003CC60 AC820004 */ sw $v0, 0x4($a0)
/* 350124 E003CC64 8FBF00D4 */ lw $ra, 0xD4($sp)
/* 350128 E003CC68 8FBE00D0 */ lw $fp, 0xD0($sp)
/* 35012C E003CC6C 8FB700CC */ lw $s7, 0xCC($sp)
/* 350130 E003CC70 8FB600C8 */ lw $s6, 0xC8($sp)
/* 350134 E003CC74 8FB500C4 */ lw $s5, 0xC4($sp)
/* 350138 E003CC78 8FB400C0 */ lw $s4, 0xC0($sp)
/* 35013C E003CC7C 8FB300BC */ lw $s3, 0xBC($sp)
/* 350140 E003CC80 8FB200B8 */ lw $s2, 0xB8($sp)
/* 350144 E003CC84 8FB100B4 */ lw $s1, 0xB4($sp)
/* 350148 E003CC88 8FB000B0 */ lw $s0, 0xB0($sp)
/* 35014C E003CC8C D7B600E0 */ ldc1 $f22, 0xE0($sp)
/* 350150 E003CC90 D7B400D8 */ ldc1 $f20, 0xD8($sp)
/* 350154 E003CC94 03E00008 */ jr $ra
/* 350158 E003CC98 27BD00E8 */ addiu $sp, $sp, 0xE8
/* 35015C E003CC9C 00000000 */ nop
### DECOMPILED C INSTRUCTIONS:
void damage_indicator_render_impl(EffectInstance* effect) {
DamageIndicatorFXData* part = effect->data.damageIndicator;
Matrix4f mtxTransform;
Matrix4f mtxTemp;
s32 spA0;
s32 lastPartIdx;
s32 numParts = part->damageAmt;
s32 i;
gDPPipeSync(gMainGfxPos++);
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
shim_guTranslateF(mtxTransform, part->basePos.x, part->basePos.y, part->basePos.z);
shim_guRotateF(mtxTemp, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
spA0 = part->lifetime - 1;
lastPartIdx = effect->numParts - 1;
part = &(effect->data.damageIndicator)[effect->numParts - 1];
if (part->alpha == 255) {
gDPSetRenderMode(gMainGfxPos++, G_RM_AA_TEX_EDGE, G_RM_AA_TEX_EDGE2);
gDPSetCombineLERP(gMainGfxPos++, 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0, 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0);
} else {
gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
gDPSetCombineLERP(gMainGfxPos++, 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0, 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0);
}
for(i = 1; i < effect->numParts; i++, part--) {
s32 rIdx = ((i + spA0) % 12) * 3;
gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E003CCF8[rIdx], D_E003CCF8[rIdx + 1], D_E003CCF8[rIdx + 2], part->alpha);
gSPDisplayList(gMainGfxPos++, D_09001D40_351F60);
if (i == lastPartIdx) {
shim_guPositionF(mtxTransform, 0.0f, 0.0f, 0.0f, part->scale, part->curPos.x, part->curPos.y, part->curPos.z);
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_09002150_352370);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
shim_guPositionF(mtxTransform, 0.0f, 0.0f, 0.0f, part->scale,
(part->curPos.x + part->basePos.x) * 0.5,
(part->curPos.y + part->basePos.y) * 0.5,
(part->curPos.z + part->basePos.z) * 0.5);
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_09002160_352380);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}
gSPDisplayList(gMainGfxPos++, D_09001D40_351F60);
shim_guTranslateF(mtxTransform, part->basePos.x, part->basePos.y, part->basePos.z);
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
shim_guScaleF(mtxTransform, part->scale, part->scale, 1.0f);
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
if (i == lastPartIdx) {
gSPDisplayList(gMainGfxPos++, D_09002170_352390);
} else {
gSPDisplayList(gMainGfxPos++, D_09002180_3523A0);
}
if (i == lastPartIdx) {
gSPDisplayList(gMainGfxPos++, D_090021A8_3523C8);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_09001DE0_352000);
if (numParts < 10) {
gSPDisplayList(gMainGfxPos++, D_E003CCA0[i]);
gSPDisplayList(gMainGfxPos++, D_090021C0_3523E0);
} else {
s32 onesDigit = numParts % 10;
s32 tensDigit = numParts / 10;
gSPDisplayList(gMainGfxPos++, D_E003CCA0[onesDigit]); // GfxLoadDigitTex
gSPDisplayList(gMainGfxPos++, D_09002200_352420); // GfxDrawOnesQuad
gSPDisplayList(gMainGfxPos++, D_E003CCA0[tensDigit]);
gSPDisplayList(gMainGfxPos++, D_090021E0_352400); // GfxDrawTensQuad
}
} else {
gSPDisplayList(gMainGfxPos++, D_09002190_3523B0);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel imgfx_appendGfx_mesh_grid
/* D41B4 8013DAB4 27BDFFB0 */ addiu $sp, $sp, -0x50
/* D41B8 8013DAB8 AFB40038 */ sw $s4, 0x38($sp)
/* D41BC 8013DABC 0080A02D */ daddu $s4, $a0, $zero
/* D41C0 8013DAC0 AFBF004C */ sw $ra, 0x4C($sp)
/* D41C4 8013DAC4 AFBE0048 */ sw $fp, 0x48($sp)
/* D41C8 8013DAC8 AFB70044 */ sw $s7, 0x44($sp)
/* D41CC 8013DACC AFB60040 */ sw $s6, 0x40($sp)
/* D41D0 8013DAD0 AFB5003C */ sw $s5, 0x3C($sp)
/* D41D4 8013DAD4 AFB30034 */ sw $s3, 0x34($sp)
/* D41D8 8013DAD8 AFB20030 */ sw $s2, 0x30($sp)
/* D41DC 8013DADC AFB1002C */ sw $s1, 0x2C($sp)
/* D41E0 8013DAE0 AFB00028 */ sw $s0, 0x28($sp)
/* D41E4 8013DAE4 AFA50054 */ sw $a1, 0x54($sp)
/* D41E8 8013DAE8 8E820014 */ lw $v0, 0x14($s4)
/* D41EC 8013DAEC 30420020 */ andi $v0, $v0, 0x20
/* D41F0 8013DAF0 14400030 */ bnez $v0, .L8013DBB4
/* D41F4 8013DAF4 3C03E300 */ lui $v1, (0xE3001001 >> 16)
/* D41F8 8013DAF8 34631001 */ ori $v1, $v1, (0xE3001001 & 0xFFFF)
/* D41FC 8013DAFC 3C06F500 */ lui $a2, (0xF5000100 >> 16)
/* D4200 8013DB00 34C60100 */ ori $a2, $a2, (0xF5000100 & 0xFFFF)
/* D4204 8013DB04 3C070703 */ lui $a3, (0x703C000 >> 16)
/* D4208 8013DB08 3C04800A */ lui $a0, %hi(gMainGfxPos)
/* D420C 8013DB0C 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos)
/* D4210 8013DB10 8C820000 */ lw $v0, 0x0($a0)
/* D4214 8013DB14 34E7C000 */ ori $a3, $a3, (0x703C000 & 0xFFFF)
/* D4218 8013DB18 0040282D */ daddu $a1, $v0, $zero
/* D421C 8013DB1C 24420008 */ addiu $v0, $v0, 0x8
/* D4220 8013DB20 AC820000 */ sw $v0, 0x0($a0)
/* D4224 8013DB24 ACA30000 */ sw $v1, 0x0($a1)
/* D4228 8013DB28 34038000 */ ori $v1, $zero, 0x8000
/* D422C 8013DB2C ACA30004 */ sw $v1, 0x4($a1)
/* D4230 8013DB30 24430008 */ addiu $v1, $v0, 0x8
/* D4234 8013DB34 AC830000 */ sw $v1, 0x0($a0)
/* D4238 8013DB38 3C058015 */ lui $a1, %hi(ImgFXCurrentTexturePtr)
/* D423C 8013DB3C 8CA5EE10 */ lw $a1, %lo(ImgFXCurrentTexturePtr)($a1)
/* D4240 8013DB40 3C03FD10 */ lui $v1, (0xFD100000 >> 16)
/* D4244 8013DB44 AC430000 */ sw $v1, 0x0($v0)
/* D4248 8013DB48 24430010 */ addiu $v1, $v0, 0x10
/* D424C 8013DB4C AC830000 */ sw $v1, 0x0($a0)
/* D4250 8013DB50 8CA50004 */ lw $a1, 0x4($a1)
/* D4254 8013DB54 3C03E800 */ lui $v1, (0xE8000000 >> 16)
/* D4258 8013DB58 AC430008 */ sw $v1, 0x8($v0)
/* D425C 8013DB5C 24430018 */ addiu $v1, $v0, 0x18
/* D4260 8013DB60 AC40000C */ sw $zero, 0xC($v0)
/* D4264 8013DB64 AC830000 */ sw $v1, 0x0($a0)
/* D4268 8013DB68 3C030700 */ lui $v1, (0x7000000 >> 16)
/* D426C 8013DB6C AC430014 */ sw $v1, 0x14($v0)
/* D4270 8013DB70 24430020 */ addiu $v1, $v0, 0x20
/* D4274 8013DB74 AC460010 */ sw $a2, 0x10($v0)
/* D4278 8013DB78 AC830000 */ sw $v1, 0x0($a0)
/* D427C 8013DB7C 3C03E600 */ lui $v1, (0xE6000000 >> 16)
/* D4280 8013DB80 AC430018 */ sw $v1, 0x18($v0)
/* D4284 8013DB84 24430028 */ addiu $v1, $v0, 0x28
/* D4288 8013DB88 AC40001C */ sw $zero, 0x1C($v0)
/* D428C 8013DB8C AC830000 */ sw $v1, 0x0($a0)
/* D4290 8013DB90 3C03F000 */ lui $v1, (0xF0000000 >> 16)
/* D4294 8013DB94 AC430020 */ sw $v1, 0x20($v0)
/* D4298 8013DB98 24430030 */ addiu $v1, $v0, 0x30
/* D429C 8013DB9C AC470024 */ sw $a3, 0x24($v0)
/* D42A0 8013DBA0 AC830000 */ sw $v1, 0x0($a0)
/* D42A4 8013DBA4 3C03E700 */ lui $v1, (0xE7000000 >> 16)
/* D42A8 8013DBA8 AC430028 */ sw $v1, 0x28($v0)
/* D42AC 8013DBAC AC40002C */ sw $zero, 0x2C($v0)
/* D42B0 8013DBB0 AC450004 */ sw $a1, 0x4($v0)
.L8013DBB4:
/* D42B4 8013DBB4 92820004 */ lbu $v0, 0x4($s4)
/* D42B8 8013DBB8 968E0008 */ lhu $t6, 0x8($s4)
/* D42BC 8013DBBC 104001C0 */ beqz $v0, .L8013E2C0
/* D42C0 8013DBC0 0000A82D */ daddu $s5, $zero, $zero
/* D42C4 8013DBC4 3C10800A */ lui $s0, %hi(gMainGfxPos)
/* D42C8 8013DBC8 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos)
/* D42CC 8013DBCC 3C1EF540 */ lui $fp, (0xF5400000 >> 16)
/* D42D0 8013DBD0 3C17F200 */ lui $s7, (0xF2000000 >> 16)
.L8013DBD4:
/* D42D4 8013DBD4 92830003 */ lbu $v1, 0x3($s4)
/* D42D8 8013DBD8 106001B4 */ beqz $v1, .L8013E2AC
/* D42DC 8013DBDC 0000902D */ daddu $s2, $zero, $zero
/* D42E0 8013DBE0 24630001 */ addiu $v1, $v1, 0x1
.L8013DBE4:
/* D42E4 8013DBE4 02A30018 */ mult $s5, $v1
/* D42E8 8013DBE8 00004012 */ mflo $t0
/* D42EC 8013DBEC 26A20001 */ addiu $v0, $s5, 0x1
/* D42F0 8013DBF0 00000000 */ nop
/* D42F4 8013DBF4 00430018 */ mult $v0, $v1
/* D42F8 8013DBF8 01C81021 */ addu $v0, $t6, $t0
/* D42FC 8013DBFC 00528821 */ addu $s1, $v0, $s2
/* D4300 8013DC00 262F0001 */ addiu $t7, $s1, 0x1
/* D4304 8013DC04 00001812 */ mflo $v1
/* D4308 8013DC08 01C31021 */ addu $v0, $t6, $v1
/* D430C 8013DC0C 0052B021 */ addu $s6, $v0, $s2
/* D4310 8013DC10 8E830014 */ lw $v1, 0x14($s4)
/* D4314 8013DC14 30620020 */ andi $v0, $v1, 0x20
/* D4318 8013DC18 14400173 */ bnez $v0, .L8013E1E8
/* D431C 8013DC1C 26D30001 */ addiu $s3, $s6, 0x1
/* D4320 8013DC20 3C028015 */ lui $v0, %hi(gSpriteShadingProfile)
/* D4324 8013DC24 8C421328 */ lw $v0, %lo(gSpriteShadingProfile)($v0)
/* D4328 8013DC28 94420000 */ lhu $v0, 0x0($v0)
/* D432C 8013DC2C 30420001 */ andi $v0, $v0, 0x1
/* D4330 8013DC30 504000E9 */ beql $v0, $zero, .L8013DFD8
/* D4334 8013DC34 3C08070A */ lui $t0, (0x70A0280 >> 16)
/* D4338 8013DC38 3C028015 */ lui $v0, %hi(ImgFXInstances)
/* D433C 8013DC3C 8C426954 */ lw $v0, %lo(ImgFXInstances)($v0)
/* D4340 8013DC40 90420000 */ lbu $v0, 0x0($v0)
/* D4344 8013DC44 104000E3 */ beqz $v0, .L8013DFD4
/* D4348 8013DC48 3C020018 */ lui $v0, (0x180000 >> 16)
/* D434C 8013DC4C 00621024 */ and $v0, $v1, $v0
/* D4350 8013DC50 504000E1 */ beql $v0, $zero, .L8013DFD8
/* D4354 8013DC54 3C08070A */ lui $t0, (0x70A0280 >> 16)
/* D4358 8013DC58 92830002 */ lbu $v1, 0x2($s4)
/* D435C 8013DC5C 10600005 */ beqz $v1, .L8013DC74
/* D4360 8013DC60 24020002 */ addiu $v0, $zero, 0x2
/* D4364 8013DC64 10620003 */ beq $v1, $v0, .L8013DC74
/* D4368 8013DC68 24020007 */ addiu $v0, $zero, 0x7
/* D436C 8013DC6C 146200DA */ bne $v1, $v0, .L8013DFD8
/* D4370 8013DC70 3C08070A */ lui $t0, (0x70A0280 >> 16)
.L8013DC74:
/* D4374 8013DC74 3C08070A */ lui $t0, (0x70A0280 >> 16)
/* D4378 8013DC78 35080280 */ ori $t0, $t0, (0x70A0280 & 0xFFFF)
/* D437C 8013DC7C 3C09010A */ lui $t1, (0x10A0280 >> 16)
/* D4380 8013DC80 35290280 */ ori $t1, $t1, (0x10A0280 & 0xFFFF)
/* D4384 8013DC84 3C0B001A */ lui $t3, (0x1A0280 >> 16)
/* D4388 8013DC88 356B0280 */ ori $t3, $t3, (0x1A0280 & 0xFFFF)
/* D438C 8013DC8C 3C0AF510 */ lui $t2, (0xF5100900 >> 16)
/* D4390 8013DC90 354A0900 */ ori $t2, $t2, (0xF5100900 & 0xFFFF)
/* D4394 8013DC94 3C0C020F */ lui $t4, (0x20FC000 >> 16)
/* D4398 8013DC98 358CC000 */ ori $t4, $t4, (0x20FC000 & 0xFFFF)
/* D439C 8013DC9C 8E050000 */ lw $a1, 0x0($s0)
/* D43A0 8013DCA0 3C048015 */ lui $a0, %hi(ImgFXCurrentTexturePtr)
/* D43A4 8013DCA4 8C84EE10 */ lw $a0, %lo(ImgFXCurrentTexturePtr)($a0)
/* D43A8 8013DCA8 00A0302D */ daddu $a2, $a1, $zero
/* D43AC 8013DCAC 24A50008 */ addiu $a1, $a1, 0x8
/* D43B0 8013DCB0 AE050000 */ sw $a1, 0x0($s0)
/* D43B4 8013DCB4 94820008 */ lhu $v0, 0x8($a0)
/* D43B8 8013DCB8 24A30008 */ addiu $v1, $a1, 0x8
/* D43BC 8013DCBC AE030000 */ sw $v1, 0x0($s0)
/* D43C0 8013DCC0 3C03FD48 */ lui $v1, (0xFD480000 >> 16)
/* D43C4 8013DCC4 00021042 */ srl $v0, $v0, 1
/* D43C8 8013DCC8 2442FFFF */ addiu $v0, $v0, -0x1
/* D43CC 8013DCCC 30420FFF */ andi $v0, $v0, 0xFFF
/* D43D0 8013DCD0 00431025 */ or $v0, $v0, $v1
/* D43D4 8013DCD4 ACC20000 */ sw $v0, 0x0($a2)
/* D43D8 8013DCD8 8C830000 */ lw $v1, 0x0($a0)
/* D43DC 8013DCDC 24A20010 */ addiu $v0, $a1, 0x10
/* D43E0 8013DCE0 AE020000 */ sw $v0, 0x0($s0)
/* D43E4 8013DCE4 3C028015 */ lui $v0, %hi(imgfx_vtxBuf)
/* D43E8 8013DCE8 8C426950 */ lw $v0, %lo(imgfx_vtxBuf)($v0)
/* D43EC 8013DCEC 00133900 */ sll $a3, $s3, 4
/* D43F0 8013DCF0 00E23821 */ addu $a3, $a3, $v0
/* D43F4 8013DCF4 ACC30004 */ sw $v1, 0x4($a2)
/* D43F8 8013DCF8 00113100 */ sll $a2, $s1, 4
/* D43FC 8013DCFC 00C23021 */ addu $a2, $a2, $v0
/* D4400 8013DD00 94E20008 */ lhu $v0, 0x8($a3)
/* D4404 8013DD04 94C40008 */ lhu $a0, 0x8($a2)
/* D4408 8013DD08 24A30018 */ addiu $v1, $a1, 0x18
/* D440C 8013DD0C AE030000 */ sw $v1, 0x0($s0)
/* D4410 8013DD10 3C03E600 */ lui $v1, (0xE6000000 >> 16)
/* D4414 8013DD14 ACA30008 */ sw $v1, 0x8($a1)
/* D4418 8013DD18 3C03F548 */ lui $v1, (0xF5480000 >> 16)
/* D441C 8013DD1C ACA80004 */ sw $t0, 0x4($a1)
/* D4420 8013DD20 ACA0000C */ sw $zero, 0xC($a1)
/* D4424 8013DD24 00021400 */ sll $v0, $v0, 16
/* D4428 8013DD28 00021543 */ sra $v0, $v0, 21
/* D442C 8013DD2C 00042400 */ sll $a0, $a0, 16
/* D4430 8013DD30 00042543 */ sra $a0, $a0, 21
/* D4434 8013DD34 00441023 */ subu $v0, $v0, $a0
/* D4438 8013DD38 00021043 */ sra $v0, $v0, 1
/* D443C 8013DD3C 24420007 */ addiu $v0, $v0, 0x7
/* D4440 8013DD40 000210C3 */ sra $v0, $v0, 3
/* D4444 8013DD44 304201FF */ andi $v0, $v0, 0x1FF
/* D4448 8013DD48 00021240 */ sll $v0, $v0, 9
/* D444C 8013DD4C 00431025 */ or $v0, $v0, $v1
/* D4450 8013DD50 ACA20000 */ sw $v0, 0x0($a1)
/* D4454 8013DD54 24A20020 */ addiu $v0, $a1, 0x20
/* D4458 8013DD58 94C30008 */ lhu $v1, 0x8($a2)
/* D445C 8013DD5C 3C04F400 */ lui $a0, (0xF4000000 >> 16)
/* D4460 8013DD60 AE020000 */ sw $v0, 0x0($s0)
/* D4464 8013DD64 94C2000A */ lhu $v0, 0xA($a2)
/* D4468 8013DD68 00031C00 */ sll $v1, $v1, 16
/* D446C 8013DD6C 00031D43 */ sra $v1, $v1, 21
/* D4470 8013DD70 2463FF00 */ addiu $v1, $v1, -0x100
/* D4474 8013DD74 00031840 */ sll $v1, $v1, 1
/* D4478 8013DD78 30630FFF */ andi $v1, $v1, 0xFFF
/* D447C 8013DD7C 00031B00 */ sll $v1, $v1, 12
/* D4480 8013DD80 00021400 */ sll $v0, $v0, 16
/* D4484 8013DD84 00021543 */ sra $v0, $v0, 21
/* D4488 8013DD88 2442FF00 */ addiu $v0, $v0, -0x100
/* D448C 8013DD8C 00021080 */ sll $v0, $v0, 2
/* D4490 8013DD90 30420FFF */ andi $v0, $v0, 0xFFF
/* D4494 8013DD94 00441025 */ or $v0, $v0, $a0
/* D4498 8013DD98 00621825 */ or $v1, $v1, $v0
/* D449C 8013DD9C ACA30010 */ sw $v1, 0x10($a1)
/* D44A0 8013DDA0 94E20008 */ lhu $v0, 0x8($a3)
/* D44A4 8013DDA4 94E3000A */ lhu $v1, 0xA($a3)
/* D44A8 8013DDA8 3C04E700 */ lui $a0, (0xE7000000 >> 16)
/* D44AC 8013DDAC ACA40018 */ sw $a0, 0x18($a1)
/* D44B0 8013DDB0 3C040700 */ lui $a0, (0x7000000 >> 16)
/* D44B4 8013DDB4 ACA0001C */ sw $zero, 0x1C($a1)
/* D44B8 8013DDB8 00021400 */ sll $v0, $v0, 16
/* D44BC 8013DDBC 00021543 */ sra $v0, $v0, 21
/* D44C0 8013DDC0 2442FEFF */ addiu $v0, $v0, -0x101
/* D44C4 8013DDC4 00021040 */ sll $v0, $v0, 1
/* D44C8 8013DDC8 30420FFF */ andi $v0, $v0, 0xFFF
/* D44CC 8013DDCC 00021300 */ sll $v0, $v0, 12
/* D44D0 8013DDD0 00031C00 */ sll $v1, $v1, 16
/* D44D4 8013DDD4 00031D43 */ sra $v1, $v1, 21
/* D44D8 8013DDD8 2463FEFF */ addiu $v1, $v1, -0x101
/* D44DC 8013DDDC 00031880 */ sll $v1, $v1, 2
/* D44E0 8013DDE0 30630FFF */ andi $v1, $v1, 0xFFF
/* D44E4 8013DDE4 00641825 */ or $v1, $v1, $a0
/* D44E8 8013DDE8 00431025 */ or $v0, $v0, $v1
/* D44EC 8013DDEC ACA20014 */ sw $v0, 0x14($a1)
/* D44F0 8013DDF0 94E20008 */ lhu $v0, 0x8($a3)
/* D44F4 8013DDF4 94C40008 */ lhu $a0, 0x8($a2)
/* D44F8 8013DDF8 24A30028 */ addiu $v1, $a1, 0x28
/* D44FC 8013DDFC AE030000 */ sw $v1, 0x0($s0)
/* D4500 8013DE00 ACA90024 */ sw $t1, 0x24($a1)
/* D4504 8013DE04 00021400 */ sll $v0, $v0, 16
/* D4508 8013DE08 00021543 */ sra $v0, $v0, 21
/* D450C 8013DE0C 00042400 */ sll $a0, $a0, 16
/* D4510 8013DE10 00042543 */ sra $a0, $a0, 21
/* D4514 8013DE14 00441023 */ subu $v0, $v0, $a0
/* D4518 8013DE18 00021043 */ sra $v0, $v0, 1
/* D451C 8013DE1C 24420007 */ addiu $v0, $v0, 0x7
/* D4520 8013DE20 000210C3 */ sra $v0, $v0, 3
/* D4524 8013DE24 304201FF */ andi $v0, $v0, 0x1FF
/* D4528 8013DE28 00021240 */ sll $v0, $v0, 9
/* D452C 8013DE2C 005E1025 */ or $v0, $v0, $fp
/* D4530 8013DE30 ACA20020 */ sw $v0, 0x20($a1)
/* D4534 8013DE34 24A20030 */ addiu $v0, $a1, 0x30
/* D4538 8013DE38 94C30008 */ lhu $v1, 0x8($a2)
/* D453C 8013DE3C 3C040100 */ lui $a0, (0x1000000 >> 16)
/* D4540 8013DE40 AE020000 */ sw $v0, 0x0($s0)
/* D4544 8013DE44 94C2000A */ lhu $v0, 0xA($a2)
/* D4548 8013DE48 000318C2 */ srl $v1, $v1, 3
/* D454C 8013DE4C 30630FFC */ andi $v1, $v1, 0xFFC
/* D4550 8013DE50 00031B00 */ sll $v1, $v1, 12
/* D4554 8013DE54 000210C2 */ srl $v0, $v0, 3
/* D4558 8013DE58 30420FFC */ andi $v0, $v0, 0xFFC
/* D455C 8013DE5C 00571025 */ or $v0, $v0, $s7
/* D4560 8013DE60 00621825 */ or $v1, $v1, $v0
/* D4564 8013DE64 24A20038 */ addiu $v0, $a1, 0x38
/* D4568 8013DE68 ACA30028 */ sw $v1, 0x28($a1)
/* D456C 8013DE6C AE020000 */ sw $v0, 0x0($s0)
/* D4570 8013DE70 94E30008 */ lhu $v1, 0x8($a3)
/* D4574 8013DE74 24A20040 */ addiu $v0, $a1, 0x40
/* D4578 8013DE78 AE020000 */ sw $v0, 0x0($s0)
/* D457C 8013DE7C 94E2000A */ lhu $v0, 0xA($a3)
/* D4580 8013DE80 00031C00 */ sll $v1, $v1, 16
/* D4584 8013DE84 00031D43 */ sra $v1, $v1, 21
/* D4588 8013DE88 2463FFFF */ addiu $v1, $v1, -0x1
/* D458C 8013DE8C 00031880 */ sll $v1, $v1, 2
/* D4590 8013DE90 30630FFF */ andi $v1, $v1, 0xFFF
/* D4594 8013DE94 00031B00 */ sll $v1, $v1, 12
/* D4598 8013DE98 00021400 */ sll $v0, $v0, 16
/* D459C 8013DE9C 00021543 */ sra $v0, $v0, 21
/* D45A0 8013DEA0 2442FFFF */ addiu $v0, $v0, -0x1
/* D45A4 8013DEA4 00021080 */ sll $v0, $v0, 2
/* D45A8 8013DEA8 30420FFF */ andi $v0, $v0, 0xFFF
/* D45AC 8013DEAC 00441025 */ or $v0, $v0, $a0
/* D45B0 8013DEB0 00621825 */ or $v1, $v1, $v0
/* D45B4 8013DEB4 ACA3002C */ sw $v1, 0x2C($a1)
/* D45B8 8013DEB8 94E20008 */ lhu $v0, 0x8($a3)
/* D45BC 8013DEBC 94C40008 */ lhu $a0, 0x8($a2)
/* D45C0 8013DEC0 24A30048 */ addiu $v1, $a1, 0x48
/* D45C4 8013DEC4 AE030000 */ sw $v1, 0x0($s0)
/* D45C8 8013DEC8 3C030200 */ lui $v1, (0x2000000 >> 16)
/* D45CC 8013DECC ACAB0034 */ sw $t3, 0x34($a1)
/* D45D0 8013DED0 ACAA0038 */ sw $t2, 0x38($a1)
/* D45D4 8013DED4 ACA3003C */ sw $v1, 0x3C($a1)
/* D45D8 8013DED8 ACB70040 */ sw $s7, 0x40($a1)
/* D45DC 8013DEDC ACAC0044 */ sw $t4, 0x44($a1)
/* D45E0 8013DEE0 00021400 */ sll $v0, $v0, 16
/* D45E4 8013DEE4 00021543 */ sra $v0, $v0, 21
/* D45E8 8013DEE8 00042400 */ sll $a0, $a0, 16
/* D45EC 8013DEEC 00042543 */ sra $a0, $a0, 21
/* D45F0 8013DEF0 00441023 */ subu $v0, $v0, $a0
/* D45F4 8013DEF4 00021043 */ sra $v0, $v0, 1
/* D45F8 8013DEF8 24420007 */ addiu $v0, $v0, 0x7
/* D45FC 8013DEFC 000210C3 */ sra $v0, $v0, 3
/* D4600 8013DF00 304201FF */ andi $v0, $v0, 0x1FF
/* D4604 8013DF04 00021240 */ sll $v0, $v0, 9
/* D4608 8013DF08 005E1025 */ or $v0, $v0, $fp
/* D460C 8013DF0C ACA20030 */ sw $v0, 0x30($a1)
/* D4610 8013DF10 92830002 */ lbu $v1, 0x2($s4)
/* D4614 8013DF14 24020002 */ addiu $v0, $zero, 0x2
/* D4618 8013DF18 10620009 */ beq $v1, $v0, .L8013DF40
/* D461C 8013DF1C 240D00FF */ addiu $t5, $zero, 0xFF
/* D4620 8013DF20 28620003 */ slti $v0, $v1, 0x3
/* D4624 8013DF24 1440000A */ bnez $v0, .L8013DF50
/* D4628 8013DF28 00111100 */ sll $v0, $s1, 4
/* D462C 8013DF2C 24020007 */ addiu $v0, $zero, 0x7
/* D4630 8013DF30 10620006 */ beq $v1, $v0, .L8013DF4C
/* D4634 8013DF34 00111100 */ sll $v0, $s1, 4
/* D4638 8013DF38 0804F7D4 */ j .L8013DF50
/* D463C 8013DF3C 00000000 */ nop
.L8013DF40:
/* D4640 8013DF40 8E8D0038 */ lw $t5, 0x38($s4)
/* D4644 8013DF44 0804F7D4 */ j .L8013DF50
/* D4648 8013DF48 00111100 */ sll $v0, $s1, 4
.L8013DF4C:
/* D464C 8013DF4C 240DFFFF */ addiu $t5, $zero, -0x1
.L8013DF50:
/* D4650 8013DF50 3C048015 */ lui $a0, %hi(imgfx_vtxBuf)
/* D4654 8013DF54 8C846950 */ lw $a0, %lo(imgfx_vtxBuf)($a0)
/* D4658 8013DF58 00131900 */ sll $v1, $s3, 4
/* D465C 8013DF5C 00441021 */ addu $v0, $v0, $a0
/* D4660 8013DF60 00641821 */ addu $v1, $v1, $a0
/* D4664 8013DF64 94450008 */ lhu $a1, 0x8($v0)
/* D4668 8013DF68 9446000A */ lhu $a2, 0xA($v0)
/* D466C 8013DF6C 94670008 */ lhu $a3, 0x8($v1)
/* D4670 8013DF70 9462000A */ lhu $v0, 0xA($v1)
/* D4674 8013DF74 8FA40054 */ lw $a0, 0x54($sp)
/* D4678 8013DF78 AFAD0014 */ sw $t5, 0x14($sp)
/* D467C 8013DF7C 00021400 */ sll $v0, $v0, 16
/* D4680 8013DF80 00021543 */ sra $v0, $v0, 21
/* D4684 8013DF84 2442FF00 */ addiu $v0, $v0, -0x100
/* D4688 8013DF88 00052C00 */ sll $a1, $a1, 16
/* D468C 8013DF8C 00052D43 */ sra $a1, $a1, 21
/* D4690 8013DF90 00063400 */ sll $a2, $a2, 16
/* D4694 8013DF94 00063543 */ sra $a2, $a2, 21
/* D4698 8013DF98 00073C00 */ sll $a3, $a3, 16
/* D469C 8013DF9C 00073D43 */ sra $a3, $a3, 21
/* D46A0 8013DFA0 24A5FF00 */ addiu $a1, $a1, -0x100
/* D46A4 8013DFA4 24C6FF00 */ addiu $a2, $a2, -0x100
/* D46A8 8013DFA8 AFA20010 */ sw $v0, 0x10($sp)
/* D46AC 8013DFAC 8E820078 */ lw $v0, 0x78($s4)
/* D46B0 8013DFB0 24E7FF00 */ addiu $a3, $a3, -0x100
/* D46B4 8013DFB4 AFAE0020 */ sw $t6, 0x20($sp)
/* D46B8 8013DFB8 AFAF0024 */ sw $t7, 0x24($sp)
/* D46BC 8013DFBC 0C052071 */ jal create_shading_palette
/* D46C0 8013DFC0 AFA20018 */ sw $v0, 0x18($sp)
/* D46C4 8013DFC4 8FAE0020 */ lw $t6, 0x20($sp)
/* D46C8 8013DFC8 8FAF0024 */ lw $t7, 0x24($sp)
/* D46CC 8013DFCC 0804F87B */ j .L8013E1EC
/* D46D0 8013DFD0 3C020100 */ lui $v0, (0x1001002 >> 16)
.L8013DFD4:
/* D46D4 8013DFD4 3C08070A */ lui $t0, (0x70A0280 >> 16)
.L8013DFD8:
/* D46D8 8013DFD8 35080280 */ ori $t0, $t0, (0x70A0280 & 0xFFFF)
/* D46DC 8013DFDC 3C09000A */ lui $t1, (0xA0280 >> 16)
/* D46E0 8013DFE0 35290280 */ ori $t1, $t1, (0xA0280 & 0xFFFF)
/* D46E4 8013DFE4 8E050000 */ lw $a1, 0x0($s0)
/* D46E8 8013DFE8 3C048015 */ lui $a0, %hi(ImgFXCurrentTexturePtr)
/* D46EC 8013DFEC 8C84EE10 */ lw $a0, %lo(ImgFXCurrentTexturePtr)($a0)
/* D46F0 8013DFF0 00A0302D */ daddu $a2, $a1, $zero
/* D46F4 8013DFF4 24A50008 */ addiu $a1, $a1, 0x8
/* D46F8 8013DFF8 AE050000 */ sw $a1, 0x0($s0)
/* D46FC 8013DFFC 94820008 */ lhu $v0, 0x8($a0)
/* D4700 8013E000 24A30008 */ addiu $v1, $a1, 0x8
/* D4704 8013E004 AE030000 */ sw $v1, 0x0($s0)
/* D4708 8013E008 3C03FD48 */ lui $v1, (0xFD480000 >> 16)
/* D470C 8013E00C 00021042 */ srl $v0, $v0, 1
/* D4710 8013E010 2442FFFF */ addiu $v0, $v0, -0x1
/* D4714 8013E014 30420FFF */ andi $v0, $v0, 0xFFF
/* D4718 8013E018 00431025 */ or $v0, $v0, $v1
/* D471C 8013E01C ACC20000 */ sw $v0, 0x0($a2)
/* D4720 8013E020 8C830000 */ lw $v1, 0x0($a0)
/* D4724 8013E024 24A20010 */ addiu $v0, $a1, 0x10
/* D4728 8013E028 AE020000 */ sw $v0, 0x0($s0)
/* D472C 8013E02C 3C028015 */ lui $v0, %hi(imgfx_vtxBuf)
/* D4730 8013E030 8C426950 */ lw $v0, %lo(imgfx_vtxBuf)($v0)
/* D4734 8013E034 00133900 */ sll $a3, $s3, 4
/* D4738 8013E038 00E23821 */ addu $a3, $a3, $v0
/* D473C 8013E03C ACC30004 */ sw $v1, 0x4($a2)
/* D4740 8013E040 00113100 */ sll $a2, $s1, 4
/* D4744 8013E044 00C23021 */ addu $a2, $a2, $v0
/* D4748 8013E048 94E20008 */ lhu $v0, 0x8($a3)
/* D474C 8013E04C 94C40008 */ lhu $a0, 0x8($a2)
/* D4750 8013E050 24A30018 */ addiu $v1, $a1, 0x18
/* D4754 8013E054 AE030000 */ sw $v1, 0x0($s0)
/* D4758 8013E058 3C03E600 */ lui $v1, (0xE6000000 >> 16)
/* D475C 8013E05C ACA30008 */ sw $v1, 0x8($a1)
/* D4760 8013E060 3C03F548 */ lui $v1, (0xF5480000 >> 16)
/* D4764 8013E064 ACA80004 */ sw $t0, 0x4($a1)
/* D4768 8013E068 ACA0000C */ sw $zero, 0xC($a1)
/* D476C 8013E06C 00021400 */ sll $v0, $v0, 16
/* D4770 8013E070 00021543 */ sra $v0, $v0, 21
/* D4774 8013E074 00042400 */ sll $a0, $a0, 16
/* D4778 8013E078 00042543 */ sra $a0, $a0, 21
/* D477C 8013E07C 00441023 */ subu $v0, $v0, $a0
/* D4780 8013E080 00021043 */ sra $v0, $v0, 1
/* D4784 8013E084 24420007 */ addiu $v0, $v0, 0x7
/* D4788 8013E088 000210C3 */ sra $v0, $v0, 3
/* D478C 8013E08C 304201FF */ andi $v0, $v0, 0x1FF
/* D4790 8013E090 00021240 */ sll $v0, $v0, 9
/* D4794 8013E094 00431025 */ or $v0, $v0, $v1
/* D4798 8013E098 ACA20000 */ sw $v0, 0x0($a1)
/* D479C 8013E09C 24A20020 */ addiu $v0, $a1, 0x20
/* D47A0 8013E0A0 94C30008 */ lhu $v1, 0x8($a2)
/* D47A4 8013E0A4 3C04F400 */ lui $a0, (0xF4000000 >> 16)
/* D47A8 8013E0A8 AE020000 */ sw $v0, 0x0($s0)
/* D47AC 8013E0AC 94C2000A */ lhu $v0, 0xA($a2)
/* D47B0 8013E0B0 00031C00 */ sll $v1, $v1, 16
/* D47B4 8013E0B4 00031D43 */ sra $v1, $v1, 21
/* D47B8 8013E0B8 2463FF00 */ addiu $v1, $v1, -0x100
/* D47BC 8013E0BC 00031840 */ sll $v1, $v1, 1
/* D47C0 8013E0C0 30630FFF */ andi $v1, $v1, 0xFFF
/* D47C4 8013E0C4 00031B00 */ sll $v1, $v1, 12
/* D47C8 8013E0C8 00021400 */ sll $v0, $v0, 16
/* D47CC 8013E0CC 00021543 */ sra $v0, $v0, 21
/* D47D0 8013E0D0 2442FF00 */ addiu $v0, $v0, -0x100
/* D47D4 8013E0D4 00021080 */ sll $v0, $v0, 2
/* D47D8 8013E0D8 30420FFF */ andi $v0, $v0, 0xFFF
/* D47DC 8013E0DC 00441025 */ or $v0, $v0, $a0
/* D47E0 8013E0E0 00621825 */ or $v1, $v1, $v0
/* D47E4 8013E0E4 ACA30010 */ sw $v1, 0x10($a1)
/* D47E8 8013E0E8 94E20008 */ lhu $v0, 0x8($a3)
/* D47EC 8013E0EC 94E3000A */ lhu $v1, 0xA($a3)
/* D47F0 8013E0F0 3C04E700 */ lui $a0, (0xE7000000 >> 16)
/* D47F4 8013E0F4 ACA40018 */ sw $a0, 0x18($a1)
/* D47F8 8013E0F8 3C040700 */ lui $a0, (0x7000000 >> 16)
/* D47FC 8013E0FC ACA0001C */ sw $zero, 0x1C($a1)
/* D4800 8013E100 00021400 */ sll $v0, $v0, 16
/* D4804 8013E104 00021543 */ sra $v0, $v0, 21
/* D4808 8013E108 2442FEFF */ addiu $v0, $v0, -0x101
/* D480C 8013E10C 00021040 */ sll $v0, $v0, 1
/* D4810 8013E110 30420FFF */ andi $v0, $v0, 0xFFF
/* D4814 8013E114 00021300 */ sll $v0, $v0, 12
/* D4818 8013E118 00031C00 */ sll $v1, $v1, 16
/* D481C 8013E11C 00031D43 */ sra $v1, $v1, 21
/* D4820 8013E120 2463FEFF */ addiu $v1, $v1, -0x101
/* D4824 8013E124 00031880 */ sll $v1, $v1, 2
/* D4828 8013E128 30630FFF */ andi $v1, $v1, 0xFFF
/* D482C 8013E12C 00641825 */ or $v1, $v1, $a0
/* D4830 8013E130 00431025 */ or $v0, $v0, $v1
/* D4834 8013E134 ACA20014 */ sw $v0, 0x14($a1)
/* D4838 8013E138 94E20008 */ lhu $v0, 0x8($a3)
/* D483C 8013E13C 94C40008 */ lhu $a0, 0x8($a2)
/* D4840 8013E140 24A30028 */ addiu $v1, $a1, 0x28
/* D4844 8013E144 AE030000 */ sw $v1, 0x0($s0)
/* D4848 8013E148 ACA90024 */ sw $t1, 0x24($a1)
/* D484C 8013E14C 00021400 */ sll $v0, $v0, 16
/* D4850 8013E150 00021543 */ sra $v0, $v0, 21
/* D4854 8013E154 00042400 */ sll $a0, $a0, 16
/* D4858 8013E158 00042543 */ sra $a0, $a0, 21
/* D485C 8013E15C 00441023 */ subu $v0, $v0, $a0
/* D4860 8013E160 00021043 */ sra $v0, $v0, 1
/* D4864 8013E164 24420007 */ addiu $v0, $v0, 0x7
/* D4868 8013E168 000210C3 */ sra $v0, $v0, 3
/* D486C 8013E16C 304201FF */ andi $v0, $v0, 0x1FF
/* D4870 8013E170 00021240 */ sll $v0, $v0, 9
/* D4874 8013E174 005E1025 */ or $v0, $v0, $fp
/* D4878 8013E178 ACA20020 */ sw $v0, 0x20($a1)
/* D487C 8013E17C 94C30008 */ lhu $v1, 0x8($a2)
/* D4880 8013E180 24A20030 */ addiu $v0, $a1, 0x30
/* D4884 8013E184 AE020000 */ sw $v0, 0x0($s0)
/* D4888 8013E188 94C2000A */ lhu $v0, 0xA($a2)
/* D488C 8013E18C 000318C2 */ srl $v1, $v1, 3
/* D4890 8013E190 30630FFC */ andi $v1, $v1, 0xFFC
/* D4894 8013E194 00031B00 */ sll $v1, $v1, 12
/* D4898 8013E198 000210C2 */ srl $v0, $v0, 3
/* D489C 8013E19C 30420FFC */ andi $v0, $v0, 0xFFC
/* D48A0 8013E1A0 00571025 */ or $v0, $v0, $s7
/* D48A4 8013E1A4 00621825 */ or $v1, $v1, $v0
/* D48A8 8013E1A8 ACA30028 */ sw $v1, 0x28($a1)
/* D48AC 8013E1AC 94E30008 */ lhu $v1, 0x8($a3)
/* D48B0 8013E1B0 94E2000A */ lhu $v0, 0xA($a3)
/* D48B4 8013E1B4 00031C00 */ sll $v1, $v1, 16
/* D48B8 8013E1B8 00031D43 */ sra $v1, $v1, 21
/* D48BC 8013E1BC 2463FFFF */ addiu $v1, $v1, -0x1
/* D48C0 8013E1C0 00031880 */ sll $v1, $v1, 2
/* D48C4 8013E1C4 30630FFF */ andi $v1, $v1, 0xFFF
/* D48C8 8013E1C8 00031B00 */ sll $v1, $v1, 12
/* D48CC 8013E1CC 00021400 */ sll $v0, $v0, 16
/* D48D0 8013E1D0 00021543 */ sra $v0, $v0, 21
/* D48D4 8013E1D4 2442FFFF */ addiu $v0, $v0, -0x1
/* D48D8 8013E1D8 00021080 */ sll $v0, $v0, 2
/* D48DC 8013E1DC 30420FFF */ andi $v0, $v0, 0xFFF
/* D48E0 8013E1E0 00621825 */ or $v1, $v1, $v0
/* D48E4 8013E1E4 ACA3002C */ sw $v1, 0x2C($a1)
.L8013E1E8:
/* D48E8 8013E1E8 3C020100 */ lui $v0, (0x1001002 >> 16)
.L8013E1EC:
/* D48EC 8013E1EC 34421002 */ ori $v0, $v0, (0x1001002 & 0xFFFF)
/* D48F0 8013E1F0 3C060100 */ lui $a2, (0x1001004 >> 16)
/* D48F4 8013E1F4 34C61004 */ ori $a2, $a2, (0x1001004 & 0xFFFF)
/* D48F8 8013E1F8 3C070100 */ lui $a3, (0x1001006 >> 16)
/* D48FC 8013E1FC 34E71006 */ ori $a3, $a3, (0x1001006 & 0xFFFF)
/* D4900 8013E200 3C080100 */ lui $t0, (0x1001008 >> 16)
/* D4904 8013E204 35081008 */ ori $t0, $t0, (0x1001008 & 0xFFFF)
/* D4908 8013E208 3C0A0600 */ lui $t2, (0x6000402 >> 16)
/* D490C 8013E20C 354A0402 */ ori $t2, $t2, (0x6000402 & 0xFFFF)
/* D4910 8013E210 8E030000 */ lw $v1, 0x0($s0)
/* D4914 8013E214 3C090002 */ lui $t1, (0x20406 >> 16)
/* D4918 8013E218 0060282D */ daddu $a1, $v1, $zero
/* D491C 8013E21C 24630008 */ addiu $v1, $v1, 0x8
/* D4920 8013E220 AE030000 */ sw $v1, 0x0($s0)
/* D4924 8013E224 3C048015 */ lui $a0, %hi(imgfx_vtxBuf)
/* D4928 8013E228 8C846950 */ lw $a0, %lo(imgfx_vtxBuf)($a0)
/* D492C 8013E22C 35290406 */ ori $t1, $t1, (0x20406 & 0xFFFF)
/* D4930 8013E230 ACA20000 */ sw $v0, 0x0($a1)
/* D4934 8013E234 00111100 */ sll $v0, $s1, 4
/* D4938 8013E238 00821021 */ addu $v0, $a0, $v0
/* D493C 8013E23C ACA20004 */ sw $v0, 0x4($a1)
/* D4940 8013E240 24620008 */ addiu $v0, $v1, 0x8
/* D4944 8013E244 AE020000 */ sw $v0, 0x0($s0)
/* D4948 8013E248 000F1100 */ sll $v0, $t7, 4
/* D494C 8013E24C 00821021 */ addu $v0, $a0, $v0
/* D4950 8013E250 AC620004 */ sw $v0, 0x4($v1)
/* D4954 8013E254 24620010 */ addiu $v0, $v1, 0x10
/* D4958 8013E258 AC660000 */ sw $a2, 0x0($v1)
/* D495C 8013E25C AE020000 */ sw $v0, 0x0($s0)
/* D4960 8013E260 00161100 */ sll $v0, $s6, 4
/* D4964 8013E264 00821021 */ addu $v0, $a0, $v0
/* D4968 8013E268 AC62000C */ sw $v0, 0xC($v1)
/* D496C 8013E26C 24620018 */ addiu $v0, $v1, 0x18
/* D4970 8013E270 AC670008 */ sw $a3, 0x8($v1)
/* D4974 8013E274 AE020000 */ sw $v0, 0x0($s0)
/* D4978 8013E278 00131100 */ sll $v0, $s3, 4
/* D497C 8013E27C 00822021 */ addu $a0, $a0, $v0
/* D4980 8013E280 24620020 */ addiu $v0, $v1, 0x20
/* D4984 8013E284 AC680010 */ sw $t0, 0x10($v1)
/* D4988 8013E288 AC640014 */ sw $a0, 0x14($v1)
/* D498C 8013E28C AE020000 */ sw $v0, 0x0($s0)
/* D4990 8013E290 AC6A0018 */ sw $t2, 0x18($v1)
/* D4994 8013E294 AC69001C */ sw $t1, 0x1C($v1)
/* D4998 8013E298 92830003 */ lbu $v1, 0x3($s4)
/* D499C 8013E29C 26520001 */ addiu $s2, $s2, 0x1
/* D49A0 8013E2A0 0243102A */ slt $v0, $s2, $v1
/* D49A4 8013E2A4 5440FE4F */ bnel $v0, $zero, .L8013DBE4
/* D49A8 8013E2A8 24630001 */ addiu $v1, $v1, 0x1
.L8013E2AC:
/* D49AC 8013E2AC 92820004 */ lbu $v0, 0x4($s4)
/* D49B0 8013E2B0 26B50001 */ addiu $s5, $s5, 0x1
/* D49B4 8013E2B4 02A2102A */ slt $v0, $s5, $v0
/* D49B8 8013E2B8 1440FE46 */ bnez $v0, .L8013DBD4
/* D49BC 8013E2BC 00000000 */ nop
.L8013E2C0:
/* D49C0 8013E2C0 8FBF004C */ lw $ra, 0x4C($sp)
/* D49C4 8013E2C4 8FBE0048 */ lw $fp, 0x48($sp)
/* D49C8 8013E2C8 8FB70044 */ lw $s7, 0x44($sp)
/* D49CC 8013E2CC 8FB60040 */ lw $s6, 0x40($sp)
/* D49D0 8013E2D0 8FB5003C */ lw $s5, 0x3C($sp)
/* D49D4 8013E2D4 8FB40038 */ lw $s4, 0x38($sp)
/* D49D8 8013E2D8 8FB30034 */ lw $s3, 0x34($sp)
/* D49DC 8013E2DC 8FB20030 */ lw $s2, 0x30($sp)
/* D49E0 8013E2E0 8FB1002C */ lw $s1, 0x2C($sp)
/* D49E4 8013E2E4 8FB00028 */ lw $s0, 0x28($sp)
/* D49E8 8013E2E8 03E00008 */ jr $ra
/* D49EC 8013E2EC 27BD0050 */ addiu $sp, $sp, 0x50
### DECOMPILED C INSTRUCTIONS:
void imgfx_appendGfx_mesh_grid(ImgFXState* state, Matrix4f mtx) {
s32 i, j;
s32 firstVtxIdx;
if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) {
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
gDPLoadTLUT_pal16(gMainGfxPos++, 0, ImgFXCurrentTexturePtr->tex.palette);
}
firstVtxIdx = state->firstVtxIdx;
for (i = 0; i < state->subdivY; i++) {
for (j = 0; j < state->subdivX; j++) {
s32 ulIdx = firstVtxIdx + i * (state->subdivX + 1) + j;
s32 urIdx = firstVtxIdx + i * (state->subdivX + 1) + j + 1;
s32 llIdx = firstVtxIdx + (i + 1) * (state->subdivX + 1) + j;
s32 lrIdx = firstVtxIdx + (i + 1) * (state->subdivX + 1) + j + 1;
if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) {
if ((gSpriteShadingProfile->flags & 1) &&
(*ImgFXInstances)[0].arrayIdx != 0 &&
(state->flags & (IMGFX_FLAG_100000 | IMGFX_FLAG_80000)) &&
(state->renderType == IMGFX_RENDER_DEFAULT
|| state->renderType == IMGFX_RENDER_MULTIPLY_ALPHA
|| state->renderType == IMGFX_RENDER_MULTIPLY_SHADE_ALPHA)) {
s32 alpha = 255;
gDPScrollMultiTile2_4b(gMainGfxPos++,
ImgFXCurrentTexturePtr->tex.raster, G_IM_FMT_CI,
ImgFXCurrentTexturePtr->tex.width, ImgFXCurrentTexturePtr->tex.height, // img size
(imgfx_vtxBuf[ulIdx].v.tc[0] >> 5) - 0x100, (imgfx_vtxBuf[ulIdx].v.tc[1] >> 5) - 0x100, // top left
(imgfx_vtxBuf[lrIdx].v.tc[0] >> 5) - 0x100 - 1, (imgfx_vtxBuf[lrIdx].v.tc[1] >> 5) - 0x100 - 1, // bottom right
0, // palette
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, // clamp wrap mirror
8, 8, // mask
G_TX_NOLOD, G_TX_NOLOD, // shift,
0x100, 0x100); // scroll
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 63 << 2, 0);
switch (state->renderType) {
case IMGFX_RENDER_DEFAULT:
alpha = 255;
break;
case IMGFX_RENDER_MULTIPLY_ALPHA:
alpha = state->ints.color.a;
break;
case IMGFX_RENDER_MULTIPLY_SHADE_ALPHA:
alpha = -1;
break;
}
create_shading_palette(mtx,
(imgfx_vtxBuf[ulIdx].v.tc[0] >> 5) - 0x100, (imgfx_vtxBuf[ulIdx].v.tc[1] >> 5) - 0x100,
(imgfx_vtxBuf[lrIdx].v.tc[0] >> 5) - 0x100, (imgfx_vtxBuf[lrIdx].v.tc[1] >> 5) - 0x100,
alpha, state->otherModeL);
} else {
gDPScrollTextureTile_4b(gMainGfxPos++,
ImgFXCurrentTexturePtr->tex.raster, G_IM_FMT_CI,
ImgFXCurrentTexturePtr->tex.width, ImgFXCurrentTexturePtr->tex.height, // img size
(imgfx_vtxBuf[ulIdx].v.tc[0] >> 5) - 0x100, (imgfx_vtxBuf[ulIdx].v.tc[1] >> 5) - 0x100, // top left
(imgfx_vtxBuf[lrIdx].v.tc[0] >> 5) - 0x100 - 1, (imgfx_vtxBuf[lrIdx].v.tc[1] >> 5) - 0x100 - 1, // bottom right
0, // palette
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, // clamp wrap mirror
8, 8, // mask
G_TX_NOLOD, G_TX_NOLOD, // shift,
0x100, 0x100); // scroll
}
}
gSPVertex(gMainGfxPos++, &imgfx_vtxBuf[ulIdx], 1, 0);
gSPVertex(gMainGfxPos++, &imgfx_vtxBuf[urIdx], 1, 1);
gSPVertex(gMainGfxPos++, &imgfx_vtxBuf[llIdx], 1, 2);
gSPVertex(gMainGfxPos++, &imgfx_vtxBuf[lrIdx], 1, 3);
gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
}
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
dlabel func_802AA688_7B2028
/* 41F418 802AA688 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 41F41C 802AA68C AFB40020 */ sw $s4, 0x20($sp)
/* 41F420 802AA690 3C14800E */ lui $s4, %hi(gBattleStatus)
D_802AA694_7B2034:
/* 41F424 802AA694 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
/* 41F428 802AA698 AFBF0028 */ sw $ra, 0x28($sp)
/* 41F42C 802AA69C AFB50024 */ sw $s5, 0x24($sp)
/* 41F430 802AA6A0 AFB3001C */ sw $s3, 0x1C($sp)
/* 41F434 802AA6A4 AFB20018 */ sw $s2, 0x18($sp)
/* 41F438 802AA6A8 AFB10014 */ sw $s1, 0x14($sp)
/* 41F43C 802AA6AC AFB00010 */ sw $s0, 0x10($sp)
/* 41F440 802AA6B0 8E820000 */ lw $v0, 0x0($s4)
/* 41F444 802AA6B4 3C030008 */ lui $v1, (0x80000 >> 16)
/* 41F448 802AA6B8 00431024 */ and $v0, $v0, $v1
D_802AA6BC_7B205C:
/* 41F44C 802AA6BC 14400004 */ bnez $v0, .L802AA6D0_7B2070
/* 41F450 802AA6C0 3C02F7FF */ lui $v0, (0xF7FFFFFF >> 16)
/* 41F454 802AA6C4 8E9200D8 */ lw $s2, 0xD8($s4)
/* 41F458 802AA6C8 080AA9B6 */ j .L802AA6D8_7B2078
/* 41F45C 802AA6CC 3442FFFF */ ori $v0, $v0, (0xF7FFFFFF & 0xFFFF)
.L802AA6D0_7B2070:
/* 41F460 802AA6D0 8E9200DC */ lw $s2, 0xDC($s4)
/* 41F464 802AA6D4 3442FFFF */ ori $v0, $v0, (0xF7FFFFFF & 0xFFFF)
.L802AA6D8_7B2078:
/* 41F468 802AA6D8 8253040C */ lb $s3, 0x40C($s2)
/* 41F46C 802AA6DC 8E430000 */ lw $v1, 0x0($s2)
D_802AA6E0_7B2080:
/* 41F470 802AA6E0 82500425 */ lb $s0, 0x425($s2)
/* 41F474 802AA6E4 00621824 */ and $v1, $v1, $v0
D_802AA6E8_7B2088:
/* 41F478 802AA6E8 AE430000 */ sw $v1, 0x0($s2)
/* 41F47C 802AA6EC 3C03800E */ lui $v1, %hi(gBattleSubState)
/* 41F480 802AA6F0 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1)
/* 41F484 802AA6F4 24020001 */ addiu $v0, $zero, 0x1
/* 41F488 802AA6F8 10620085 */ beq $v1, $v0, .L802AA910_7B22B0
/* 41F48C 802AA6FC 2655040D */ addiu $s5, $s2, 0x40D
D_802AA700_7B20A0:
/* 41F490 802AA700 28620002 */ slti $v0, $v1, 0x2
/* 41F494 802AA704 50400005 */ beql $v0, $zero, .L802AA71C_7B20BC
/* 41F498 802AA708 24020002 */ addiu $v0, $zero, 0x2
/* 41F49C 802AA70C 10600009 */ beqz $v1, .L802AA734_7B20D4
D_802AA710_7B20B0:
/* 41F4A0 802AA710 24040015 */ addiu $a0, $zero, 0x15
/* 41F4A4 802AA714 080AAB2D */ j .L802AACB4_7B2654
/* 41F4A8 802AA718 00000000 */ nop
.L802AA71C_7B20BC:
/* 41F4AC 802AA71C 106200D7 */ beq $v1, $v0, .L802AAA7C_7B241C
/* 41F4B0 802AA720 2402000A */ addiu $v0, $zero, 0xA
/* 41F4B4 802AA724 1062011B */ beq $v1, $v0, .L802AAB94_7B2534
D_802AA728_7B20C8:
/* 41F4B8 802AA728 00000000 */ nop
/* 41F4BC 802AA72C 080AAB2D */ j .L802AACB4_7B2654
/* 41F4C0 802AA730 00000000 */ nop
.L802AA734_7B20D4:
/* 41F4C4 802AA734 240200FF */ addiu $v0, $zero, 0xFF
D_802AA738_7B20D8:
/* 41F4C8 802AA738 3C01802B */ lui $at, %hi(D_802ACC64)
/* 41F4CC 802AA73C AC22CC64 */ sw $v0, %lo(D_802ACC64)($at)
/* 41F4D0 802AA740 2402FF9C */ addiu $v0, $zero, -0x64
/* 41F4D4 802AA744 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 41F4D8 802AA748 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 41F4DC 802AA74C 3C01802B */ lui $at, %hi(D_802ACC68)
D_802AA750_7B20F0:
/* 41F4E0 802AA750 AC22CC68 */ sw $v0, %lo(D_802ACC68)($at)
/* 41F4E4 802AA754 8E020000 */ lw $v0, 0x0($s0)
/* 41F4E8 802AA758 2403FFFD */ addiu $v1, $zero, -0x3
/* 41F4EC 802AA75C 00431024 */ and $v0, $v0, $v1
D_802AA760_7B2100:
/* 41F4F0 802AA760 0C03A752 */ jal is_ability_active
/* 41F4F4 802AA764 AE020000 */ sw $v0, 0x0($s0)
/* 41F4F8 802AA768 10400005 */ beqz $v0, .L802AA780_7B2120
/* 41F4FC 802AA76C 3C030008 */ lui $v1, (0x80000 >> 16)
/* 41F500 802AA770 8E020000 */ lw $v0, 0x0($s0)
/* 41F504 802AA774 00431024 */ and $v0, $v0, $v1
D_802AA778_7B2118:
/* 41F508 802AA778 1040000D */ beqz $v0, .L802AA7B0_7B2150
/* 41F50C 802AA77C 00000000 */ nop
.L802AA780_7B2120:
/* 41F510 802AA780 8683017C */ lh $v1, 0x17C($s4)
/* 41F514 802AA784 1060000A */ beqz $v1, .L802AA7B0_7B2150
D_802AA788_7B2128:
/* 41F518 802AA788 00031080 */ sll $v0, $v1, 2
/* 41F51C 802AA78C 00431021 */ addu $v0, $v0, $v1
/* 41F520 802AA790 00021080 */ sll $v0, $v0, 2
/* 41F524 802AA794 3C048009 */ lui $a0, %hi(D_8008F073)
/* 41F528 802AA798 00822021 */ addu $a0, $a0, $v0
/* 41F52C 802AA79C 8084F073 */ lb $a0, %lo(D_8008F073)($a0)
D_802AA7A0_7B2140:
/* 41F530 802AA7A0 04800003 */ bltz $a0, .L802AA7B0_7B2150
/* 41F534 802AA7A4 2484002E */ addiu $a0, $a0, 0x2E
/* 41F538 802AA7A8 0C093E58 */ jal func_8024F960
/* 41F53C 802AA7AC 2405003C */ addiu $a1, $zero, 0x3C
.L802AA7B0_7B2150:
/* 41F540 802AA7B0 0C098C0B */ jal func_8026302C
/* 41F544 802AA7B4 0240202D */ daddu $a0, $s2, $zero
/* 41F548 802AA7B8 8E820184 */ lw $v0, 0x184($s4)
/* 41F54C 802AA7BC 8253040C */ lb $s3, 0x40C($s2)
/* 41F550 802AA7C0 30420001 */ andi $v0, $v0, 0x1
/* 41F554 802AA7C4 10400018 */ beqz $v0, .L802AA828_7B21C8
D_802AA7C8_7B2168:
/* 41F558 802AA7C8 00000000 */ nop
/* 41F55C 802AA7CC 2655040D */ addiu $s5, $s2, 0x40D
/* 41F560 802AA7D0 1A600015 */ blez $s3, .L802AA828_7B21C8
/* 41F564 802AA7D4 0000802D */ daddu $s0, $zero, $zero
D_802AA7D8_7B2178:
/* 41F568 802AA7D8 02B01021 */ addu $v0, $s5, $s0
.L802AA7DC_7B217C:
/* 41F56C 802AA7DC 80430000 */ lb $v1, 0x0($v0)
/* 41F570 802AA7E0 00031080 */ sll $v0, $v1, 2
/* 41F574 802AA7E4 00431021 */ addu $v0, $v0, $v1
/* 41F578 802AA7E8 00021080 */ sll $v0, $v0, 2
/* 41F57C 802AA7EC 2442022C */ addiu $v0, $v0, 0x22C
D_802AA7F0_7B2190:
/* 41F580 802AA7F0 02428821 */ addu $s1, $s2, $v0
/* 41F584 802AA7F4 0C09A75B */ jal get_actor
/* 41F588 802AA7F8 86240000 */ lh $a0, 0x0($s1)
/* 41F58C 802AA7FC 86250002 */ lh $a1, 0x2($s1)
D_802AA800_7B21A0:
/* 41F590 802AA800 0C099117 */ jal get_actor_part
/* 41F594 802AA804 0040202D */ daddu $a0, $v0, $zero
/* 41F598 802AA808 8C420000 */ lw $v0, 0x0($v0)
/* 41F59C 802AA80C 30420008 */ andi $v0, $v0, 0x8
/* 41F5A0 802AA810 54400005 */ bnel $v0, $zero, .L802AA828_7B21C8
/* 41F5A4 802AA814 A2500425 */ sb $s0, 0x425($s2)
D_802AA818_7B21B8:
/* 41F5A8 802AA818 26100001 */ addiu $s0, $s0, 0x1
/* 41F5AC 802AA81C 0213102A */ slt $v0, $s0, $s3
/* 41F5B0 802AA820 1440FFEE */ bnez $v0, .L802AA7DC_7B217C
/* 41F5B4 802AA824 02B01021 */ addu $v0, $s5, $s0
.L802AA828_7B21C8:
/* 41F5B8 802AA828 8E820184 */ lw $v0, 0x184($s4)
/* 41F5BC 802AA82C 04410015 */ bgez $v0, .L802AA884_7B2224
/* 41F5C0 802AA830 3C030008 */ lui $v1, (0x80000 >> 16)
/* 41F5C4 802AA834 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 41F5C8 802AA838 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 41F5CC 802AA83C 8C820000 */ lw $v0, 0x0($a0)
/* 41F5D0 802AA840 00431024 */ and $v0, $v0, $v1
D_802AA844_7B21E4:
/* 41F5D4 802AA844 14400006 */ bnez $v0, D_802AA860_7B2200
/* 41F5D8 802AA848 00000000 */ nop
.L802AA84C_7B21EC:
/* 41F5DC 802AA84C 8683006E */ lh $v1, 0x6E($s4)
D_802AA850_7B21F0:
/* 41F5E0 802AA850 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41F5E4 802AA854 AC23C4DC */ sw $v1, %lo(gBattleSubState)($at)
/* 41F5E8 802AA858 080AAACE */ j .L802AAB38_7B24D8
D_802AA85C_7B21FC:
/* 41F5EC 802AA85C 00000000 */ nop
D_802AA860_7B2200:
/* 41F5F0 802AA860 8C820004 */ lw $v0, 0x4($a0)
/* 41F5F4 802AA864 8683006E */ lh $v1, 0x6E($s4)
/* 41F5F8 802AA868 30420040 */ andi $v0, $v0, 0x40
/* 41F5FC 802AA86C 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41F600 802AA870 AC23C4DC */ sw $v1, %lo(gBattleSubState)($at)
/* 41F604 802AA874 104000C1 */ beqz $v0, .L802AAB7C_7B251C
D_802AA878_7B2218:
/* 41F608 802AA878 00000000 */ nop
/* 41F60C 802AA87C 080AAADB */ j .L802AAB6C_7B250C
D_802AA880_7B2220:
/* 41F610 802AA880 00000000 */ nop
.L802AA884_7B2224:
/* 41F614 802AA884 16600009 */ bnez $s3, .L802AA8AC_7B224C
D_802AA888_7B2228:
/* 41F618 802AA888 00000000 */ nop
/* 41F61C 802AA88C 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 41F620 802AA890 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 41F624 802AA894 8C820000 */ lw $v0, 0x0($a0)
/* 41F628 802AA898 00431024 */ and $v0, $v0, $v1
/* 41F62C 802AA89C 1040FFEB */ beqz $v0, .L802AA84C_7B21EC
D_802AA8A0_7B2240:
/* 41F630 802AA8A0 00000000 */ nop
/* 41F634 802AA8A4 080AAA18 */ j D_802AA860_7B2200
/* 41F638 802AA8A8 00000000 */ nop
.L802AA8AC_7B224C:
/* 41F63C 802AA8AC 1A600013 */ blez $s3, .L802AA8FC_7B229C
/* 41F640 802AA8B0 0000802D */ daddu $s0, $zero, $zero
D_802AA8B4_7B2254:
/* 41F644 802AA8B4 3C12802B */ lui $s2, %hi(D_802ACC70)
/* 41F648 802AA8B8 2652CC70 */ addiu $s2, $s2, %lo(D_802ACC70)
.L802AA8BC_7B225C:
/* 41F64C 802AA8BC 3C048008 */ lui $a0, %hi(HES_HandPointDownLoop)
/* 41F650 802AA8C0 2484FF20 */ addiu $a0, $a0, %lo(HES_HandPointDownLoop)
/* 41F654 802AA8C4 0C050529 */ jal hud_element_create
D_802AA8C8_7B2268:
/* 41F658 802AA8C8 26100001 */ addiu $s0, $s0, 0x1
/* 41F65C 802AA8CC 0040882D */ daddu $s1, $v0, $zero
/* 41F660 802AA8D0 AE510000 */ sw $s1, 0x0($s2)
/* 41F664 802AA8D4 0220202D */ daddu $a0, $s1, $zero
/* 41F668 802AA8D8 0C051277 */ jal hud_element_set_render_depth
/* 41F66C 802AA8DC 0000282D */ daddu $a1, $zero, $zero
jtbl_802AA8E0_7B2280:
/* 41F670 802AA8E0 0220202D */ daddu $a0, $s1, $zero
/* 41F674 802AA8E4 0000282D */ daddu $a1, $zero, $zero
/* 41F678 802AA8E8 0C051261 */ jal hud_element_set_render_pos
/* 41F67C 802AA8EC 2406FF9C */ addiu $a2, $zero, -0x64
D_802AA8F0_7B2290:
/* 41F680 802AA8F0 0213102A */ slt $v0, $s0, $s3
/* 41F684 802AA8F4 1440FFF1 */ bnez $v0, .L802AA8BC_7B225C
/* 41F688 802AA8F8 26520004 */ addiu $s2, $s2, 0x4
.L802AA8FC_7B229C:
/* 41F68C 802AA8FC 24020001 */ addiu $v0, $zero, 0x1
/* 41F690 802AA900 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41F694 802AA904 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 41F698 802AA908 080AAB2D */ j .L802AACB4_7B2654
/* 41F69C 802AA90C 00000000 */ nop
.L802AA910_7B22B0:
/* 41F6A0 802AA910 3C03802B */ lui $v1, %hi(D_802ACC68)
/* 41F6A4 802AA914 2463CC68 */ addiu $v1, $v1, %lo(D_802ACC68)
D_802AA918_7B22B8:
/* 41F6A8 802AA918 8C620000 */ lw $v0, 0x0($v1)
/* 41F6AC 802AA91C 04410004 */ bgez $v0, .L802AA930_7B22D0
/* 41F6B0 802AA920 24420014 */ addiu $v0, $v0, 0x14
/* 41F6B4 802AA924 18400002 */ blez $v0, .L802AA930_7B22D0
/* 41F6B8 802AA928 AC620000 */ sw $v0, 0x0($v1)
/* 41F6BC 802AA92C AC600000 */ sw $zero, 0x0($v1)
.L802AA930_7B22D0:
/* 41F6C0 802AA930 8E830214 */ lw $v1, 0x214($s4)
/* 41F6C4 802AA934 30624000 */ andi $v0, $v1, 0x4000
/* 41F6C8 802AA938 10400008 */ beqz $v0, .L802AA95C_7B22FC
/* 41F6CC 802AA93C 30628000 */ andi $v0, $v1, 0x8000
D_802AA940_7B22E0:
/* 41F6D0 802AA940 0C05272D */ jal sfx_play_sound
/* 41F6D4 802AA944 240400CA */ addiu $a0, $zero, 0xCA
/* 41F6D8 802AA948 2402000A */ addiu $v0, $zero, 0xA
/* 41F6DC 802AA94C 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41F6E0 802AA950 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
/* 41F6E4 802AA954 080AAB2D */ j .L802AACB4_7B2654
/* 41F6E8 802AA958 00000000 */ nop
.L802AA95C_7B22FC:
/* 41F6EC 802AA95C 1040000E */ beqz $v0, .L802AA998_7B2338
/* 41F6F0 802AA960 00000000 */ nop
/* 41F6F4 802AA964 0C05272D */ jal sfx_play_sound
D_802AA968_7B2308:
/* 41F6F8 802AA968 240400C9 */ addiu $a0, $zero, 0xC9
/* 41F6FC 802AA96C 24020008 */ addiu $v0, $zero, 0x8
/* 41F700 802AA970 3C01802B */ lui $at, %hi(D_802ACC60)
/* 41F704 802AA974 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at)
/* 41F708 802AA978 24020004 */ addiu $v0, $zero, 0x4
/* 41F70C 802AA97C 3C01802B */ lui $at, %hi(D_802ACC6C)
/* 41F710 802AA980 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at)
/* 41F714 802AA984 24020002 */ addiu $v0, $zero, 0x2
/* 41F718 802AA988 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41F71C 802AA98C AC22C4DC */ sw $v0, %lo(gBattleSubState)($at)
D_802AA990_7B2330:
/* 41F720 802AA990 080AAB2D */ j .L802AACB4_7B2654
/* 41F724 802AA994 00000000 */ nop
.L802AA998_7B2338:
/* 41F728 802AA998 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 41F72C 802AA99C 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 41F730 802AA9A0 8C830000 */ lw $v1, 0x0($a0)
/* 41F734 802AA9A4 8E820210 */ lw $v0, 0x210($s4)
/* 41F738 802AA9A8 34630002 */ ori $v1, $v1, 0x2
/* 41F73C 802AA9AC 30422010 */ andi $v0, $v0, 0x2010
/* 41F740 802AA9B0 10400005 */ beqz $v0, .L802AA9C8_7B2368
/* 41F744 802AA9B4 AC830000 */ sw $v1, 0x0($a0)
D_802AA9B8_7B2358:
/* 41F748 802AA9B8 2402FFFD */ addiu $v0, $zero, -0x3
/* 41F74C 802AA9BC 00621024 */ and $v0, $v1, $v0
/* 41F750 802AA9C0 080AAB2D */ j .L802AACB4_7B2654
/* 41F754 802AA9C4 AC820000 */ sw $v0, 0x0($a0)
.L802AA9C8_7B2368:
/* 41F758 802AA9C8 8E820184 */ lw $v0, 0x184($s4)
/* 41F75C 802AA9CC 30420001 */ andi $v0, $v0, 0x1
/* 41F760 802AA9D0 104000B8 */ beqz $v0, .L802AACB4_7B2654
/* 41F764 802AA9D4 3C020004 */ lui $v0, (0x40000 >> 16)
/* 41F768 802AA9D8 8E830218 */ lw $v1, 0x218($s4)
/* 41F76C 802AA9DC 00621024 */ and $v0, $v1, $v0
D_802AA9E0_7B2380:
/* 41F770 802AA9E0 10400002 */ beqz $v0, .L802AA9EC_7B238C
/* 41F774 802AA9E4 0200202D */ daddu $a0, $s0, $zero
/* 41F778 802AA9E8 2610FFFF */ addiu $s0, $s0, -0x1
.L802AA9EC_7B238C:
/* 41F77C 802AA9EC 3C020008 */ lui $v0, (0x80000 >> 16)
/* 41F780 802AA9F0 00621024 */ and $v0, $v1, $v0
/* 41F784 802AA9F4 54400001 */ bnel $v0, $zero, .L802AA9FC_7B239C
/* 41F788 802AA9F8 26100001 */ addiu $s0, $s0, 0x1
.L802AA9FC_7B239C:
/* 41F78C 802AA9FC 06020001 */ bltzl $s0, .L802AAA04_7B23A4
D_802AAA00_7B23A0:
/* 41F790 802AAA00 2670FFFF */ addiu $s0, $s3, -0x1
.L802AAA04_7B23A4:
/* 41F794 802AAA04 0213102A */ slt $v0, $s0, $s3
D_802AAA08_7B23A8:
/* 41F798 802AAA08 50400001 */ beql $v0, $zero, .L802AAA10_7B23B0
/* 41F79C 802AAA0C 0000802D */ daddu $s0, $zero, $zero
.L802AAA10_7B23B0:
/* 41F7A0 802AAA10 12040018 */ beq $s0, $a0, .L802AAA74_7B2414
/* 41F7A4 802AAA14 02B01021 */ addu $v0, $s5, $s0
/* 41F7A8 802AAA18 80430000 */ lb $v1, 0x0($v0)
/* 41F7AC 802AAA1C 00031080 */ sll $v0, $v1, 2
/* 41F7B0 802AAA20 00431021 */ addu $v0, $v0, $v1
/* 41F7B4 802AAA24 00021080 */ sll $v0, $v0, 2
/* 41F7B8 802AAA28 00528821 */ addu $s1, $v0, $s2
/* 41F7BC 802AAA2C 0C09A75B */ jal get_actor
D_802AAA30_7B23D0:
/* 41F7C0 802AAA30 8624022C */ lh $a0, 0x22C($s1)
/* 41F7C4 802AAA34 8C420000 */ lw $v0, 0x0($v0)
/* 41F7C8 802AAA38 3C11802B */ lui $s1, %hi(D_802ACC70)
/* 41F7CC 802AAA3C 8E31CC70 */ lw $s1, %lo(D_802ACC70)($s1)
/* 41F7D0 802AAA40 30420800 */ andi $v0, $v0, 0x800
/* 41F7D4 802AAA44 10400005 */ beqz $v0, .L802AAA5C_7B23FC
/* 41F7D8 802AAA48 0220202D */ daddu $a0, $s1, $zero
/* 41F7DC 802AAA4C 3C058008 */ lui $a1, %hi(HES_HandPointLeftLoop)
/* 41F7E0 802AAA50 24A50208 */ addiu $a1, $a1, %lo(HES_HandPointLeftLoop)
/* 41F7E4 802AAA54 080AAA99 */ j .L802AAA64_7B2404
/* 41F7E8 802AAA58 00000000 */ nop
.L802AAA5C_7B23FC:
/* 41F7EC 802AAA5C 3C058008 */ lui $a1, %hi(HES_HandPointDownLoop)
/* 41F7F0 802AAA60 24A5FF20 */ addiu $a1, $a1, %lo(HES_HandPointDownLoop)
.L802AAA64_7B2404:
/* 41F7F4 802AAA64 0C0511FF */ jal hud_element_set_script
/* 41F7F8 802AAA68 00000000 */ nop
/* 41F7FC 802AAA6C 0C05272D */ jal sfx_play_sound
/* 41F800 802AAA70 240400C7 */ addiu $a0, $zero, 0xC7
.L802AAA74_7B2414:
/* 41F804 802AAA74 080AAB2D */ j .L802AACB4_7B2654
D_802AAA78_7B2418:
/* 41F808 802AAA78 A2500425 */ sb $s0, 0x425($s2)
.L802AAA7C_7B241C:
/* 41F80C 802AAA7C 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 41F810 802AAA80 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 41F814 802AAA84 8C820000 */ lw $v0, 0x0($a0)
/* 41F818 802AAA88 2403FFFD */ addiu $v1, $zero, -0x3
/* 41F81C 802AAA8C 00431024 */ and $v0, $v0, $v1
/* 41F820 802AAA90 AC820000 */ sw $v0, 0x0($a0)
/* 41F824 802AAA94 82420425 */ lb $v0, 0x425($s2)
/* 41F828 802AAA98 02A21021 */ addu $v0, $s5, $v0
/* 41F82C 802AAA9C 80430000 */ lb $v1, 0x0($v0)
/* 41F830 802AAAA0 00031080 */ sll $v0, $v1, 2
/* 41F834 802AAAA4 00431021 */ addu $v0, $v0, $v1
/* 41F838 802AAAA8 00021080 */ sll $v0, $v0, 2
/* 41F83C 802AAAAC 2442022C */ addiu $v0, $v0, 0x22C
/* 41F840 802AAAB0 02428821 */ addu $s1, $s2, $v0
/* 41F844 802AAAB4 96220000 */ lhu $v0, 0x0($s1)
/* 41F848 802AAAB8 A6420428 */ sh $v0, 0x428($s2)
/* 41F84C 802AAABC 92220003 */ lbu $v0, 0x3($s1)
D_802AAAC0_7B2460:
/* 41F850 802AAAC0 0000802D */ daddu $s0, $zero, $zero
/* 41F854 802AAAC4 1A60000C */ blez $s3, .L802AAAF8_7B2498
/* 41F858 802AAAC8 A2420426 */ sb $v0, 0x426($s2)
/* 41F85C 802AAACC 3C11802B */ lui $s1, %hi(D_802ACC70)
D_802AAAD0_7B2470:
/* 41F860 802AAAD0 2631CC70 */ addiu $s1, $s1, %lo(D_802ACC70)
.L802AAAD4_7B2474:
/* 41F864 802AAAD4 8E240000 */ lw $a0, 0x0($s1)
/* 41F868 802AAAD8 26310004 */ addiu $s1, $s1, 0x4
/* 41F86C 802AAADC 0C05123D */ jal hud_element_free
D_802AAAE0_7B2480:
/* 41F870 802AAAE0 26100001 */ addiu $s0, $s0, 0x1
/* 41F874 802AAAE4 0213102A */ slt $v0, $s0, $s3
/* 41F878 802AAAE8 1440FFFA */ bnez $v0, .L802AAAD4_7B2474
/* 41F87C 802AAAEC 00000000 */ nop
/* 41F880 802AAAF0 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 41F884 802AAAF4 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
.L802AAAF8_7B2498:
/* 41F888 802AAAF8 8C820000 */ lw $v0, 0x0($a0)
/* 41F88C 802AAAFC 3C030008 */ lui $v1, (0x80000 >> 16)
/* 41F890 802AAB00 00431024 */ and $v0, $v0, $v1
/* 41F894 802AAB04 14400012 */ bnez $v0, .L802AAB50_7B24F0
/* 41F898 802AAB08 00000000 */ nop
/* 41F89C 802AAB0C 8C820004 */ lw $v0, 0x4($a0)
/* 41F8A0 802AAB10 8683006E */ lh $v1, 0x6E($s4)
/* 41F8A4 802AAB14 30420040 */ andi $v0, $v0, 0x40
/* 41F8A8 802AAB18 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41F8AC 802AAB1C AC23C4DC */ sw $v1, %lo(gBattleSubState)($at)
D_802AAB20_7B24C0:
/* 41F8B0 802AAB20 10400005 */ beqz $v0, .L802AAB38_7B24D8
/* 41F8B4 802AAB24 00000000 */ nop
/* 41F8B8 802AAB28 0C0AA6D1 */ jal func_802A9B44_7B14E4
/* 41F8BC 802AAB2C 00000000 */ nop
/* 41F8C0 802AAB30 080AAAD0 */ j .L802AAB40_7B24E0
/* 41F8C4 802AAB34 00000000 */ nop
.L802AAB38_7B24D8:
/* 41F8C8 802AAB38 0C0A9662 */ jal func_802A5988_7AD328
/* 41F8CC 802AAB3C 00000000 */ nop
.L802AAB40_7B24E0:
/* 41F8D0 802AAB40 0C090464 */ jal func_80241190
/* 41F8D4 802AAB44 24040012 */ addiu $a0, $zero, 0x12
/* 41F8D8 802AAB48 080AAB2D */ j .L802AACB4_7B2654
/* 41F8DC 802AAB4C 00000000 */ nop
.L802AAB50_7B24F0:
/* 41F8E0 802AAB50 8C820004 */ lw $v0, 0x4($a0)
/* 41F8E4 802AAB54 8683006E */ lh $v1, 0x6E($s4)
/* 41F8E8 802AAB58 30420040 */ andi $v0, $v0, 0x40
/* 41F8EC 802AAB5C 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41F8F0 802AAB60 AC23C4DC */ sw $v1, %lo(gBattleSubState)($at)
/* 41F8F4 802AAB64 10400005 */ beqz $v0, .L802AAB7C_7B251C
/* 41F8F8 802AAB68 00000000 */ nop
.L802AAB6C_7B250C:
/* 41F8FC 802AAB6C 0C0AA82E */ jal func_802AA0B8_7B1A58
/* 41F900 802AAB70 00000000 */ nop
/* 41F904 802AAB74 080AAAE1 */ j .L802AAB84_7B2524
/* 41F908 802AAB78 00000000 */ nop
.L802AAB7C_7B251C:
/* 41F90C 802AAB7C 0C0AA072 */ jal func_802A81C8_7AFB68
/* 41F910 802AAB80 00000000 */ nop
.L802AAB84_7B2524:
/* 41F914 802AAB84 0C090464 */ jal func_80241190
/* 41F918 802AAB88 24040013 */ addiu $a0, $zero, 0x13
/* 41F91C 802AAB8C 080AAB2D */ j .L802AACB4_7B2654
/* 41F920 802AAB90 00000000 */ nop
.L802AAB94_7B2534:
/* 41F924 802AAB94 1A60000A */ blez $s3, D_802AABC0_7B2560
/* 41F928 802AAB98 0000802D */ daddu $s0, $zero, $zero
/* 41F92C 802AAB9C 3C11802B */ lui $s1, %hi(D_802ACC70)
D_802AABA0_7B2540:
/* 41F930 802AABA0 2631CC70 */ addiu $s1, $s1, %lo(D_802ACC70)
.L802AABA4_7B2544:
/* 41F934 802AABA4 8E240000 */ lw $a0, 0x0($s1)
/* 41F938 802AABA8 26310004 */ addiu $s1, $s1, 0x4
/* 41F93C 802AABAC 0C05123D */ jal hud_element_free
/* 41F940 802AABB0 26100001 */ addiu $s0, $s0, 0x1
/* 41F944 802AABB4 0213102A */ slt $v0, $s0, $s3
/* 41F948 802AABB8 1440FFFA */ bnez $v0, .L802AABA4_7B2544
/* 41F94C 802AABBC 00000000 */ nop
D_802AABC0_7B2560:
/* 41F950 802AABC0 3C030001 */ lui $v1, (0x10002 >> 16)
/* 41F954 802AABC4 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 41F958 802AABC8 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 41F95C 802AABCC 8E020000 */ lw $v0, 0x0($s0)
/* 41F960 802AABD0 34630002 */ ori $v1, $v1, (0x10002 & 0xFFFF)
/* 41F964 802AABD4 00431025 */ or $v0, $v0, $v1
/* 41F968 802AABD8 AE020000 */ sw $v0, 0x0($s0)
/* 41F96C 802AABDC 8E420000 */ lw $v0, 0x0($s2)
/* 41F970 802AABE0 3C030800 */ lui $v1, (0x8000000 >> 16)
/* 41F974 802AABE4 00431025 */ or $v0, $v0, $v1
/* 41F978 802AABE8 AE420000 */ sw $v0, 0x0($s2)
/* 41F97C 802AABEC 82820088 */ lb $v0, 0x88($s4)
/* 41F980 802AABF0 1040000C */ beqz $v0, .L802AAC24_7B25C4
/* 41F984 802AABF4 3C030008 */ lui $v1, (0x80000 >> 16)
/* 41F988 802AABF8 0C090464 */ jal func_80241190
/* 41F98C 802AABFC 2404000D */ addiu $a0, $zero, 0xD
/* 41F990 802AAC00 8E020004 */ lw $v0, 0x4($s0)
/* 41F994 802AAC04 8683006C */ lh $v1, 0x6C($s4)
/* 41F998 802AAC08 30420040 */ andi $v0, $v0, 0x40
/* 41F99C 802AAC0C 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41F9A0 802AAC10 AC23C4DC */ sw $v1, %lo(gBattleSubState)($at)
/* 41F9A4 802AAC14 10400014 */ beqz $v0, .L802AAC68_7B2608
/* 41F9A8 802AAC18 00000000 */ nop
/* 41F9AC 802AAC1C 080AAB16 */ j .L802AAC58_7B25F8
/* 41F9B0 802AAC20 00000000 */ nop
.L802AAC24_7B25C4:
/* 41F9B4 802AAC24 8E020000 */ lw $v0, 0x0($s0)
/* 41F9B8 802AAC28 00431024 */ and $v0, $v0, $v1
/* 41F9BC 802AAC2C 14400012 */ bnez $v0, .L802AAC78_7B2618
/* 41F9C0 802AAC30 00000000 */ nop
/* 41F9C4 802AAC34 0C090464 */ jal func_80241190
/* 41F9C8 802AAC38 2404000D */ addiu $a0, $zero, 0xD
/* 41F9CC 802AAC3C 8E020004 */ lw $v0, 0x4($s0)
/* 41F9D0 802AAC40 8683006C */ lh $v1, 0x6C($s4)
/* 41F9D4 802AAC44 30420040 */ andi $v0, $v0, 0x40
/* 41F9D8 802AAC48 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41F9DC 802AAC4C AC23C4DC */ sw $v1, %lo(gBattleSubState)($at)
/* 41F9E0 802AAC50 10400005 */ beqz $v0, .L802AAC68_7B2608
/* 41F9E4 802AAC54 00000000 */ nop
.L802AAC58_7B25F8:
/* 41F9E8 802AAC58 0C0AA6D1 */ jal func_802A9B44_7B14E4
/* 41F9EC 802AAC5C 00000000 */ nop
/* 41F9F0 802AAC60 080AAB2D */ j .L802AACB4_7B2654
/* 41F9F4 802AAC64 00000000 */ nop
.L802AAC68_7B2608:
/* 41F9F8 802AAC68 0C0A9662 */ jal func_802A5988_7AD328
/* 41F9FC 802AAC6C 00000000 */ nop
/* 41FA00 802AAC70 080AAB2D */ j .L802AACB4_7B2654
/* 41FA04 802AAC74 00000000 */ nop
.L802AAC78_7B2618:
/* 41FA08 802AAC78 0C090464 */ jal func_80241190
/* 41FA0C 802AAC7C 2404000E */ addiu $a0, $zero, 0xE
/* 41FA10 802AAC80 8E020004 */ lw $v0, 0x4($s0)
/* 41FA14 802AAC84 8683006C */ lh $v1, 0x6C($s4)
/* 41FA18 802AAC88 30420040 */ andi $v0, $v0, 0x40
/* 41FA1C 802AAC8C 3C01800E */ lui $at, %hi(gBattleSubState)
/* 41FA20 802AAC90 AC23C4DC */ sw $v1, %lo(gBattleSubState)($at)
/* 41FA24 802AAC94 10400005 */ beqz $v0, .L802AACAC_7B264C
/* 41FA28 802AAC98 00000000 */ nop
/* 41FA2C 802AAC9C 0C0AA82E */ jal func_802AA0B8_7B1A58
/* 41FA30 802AACA0 00000000 */ nop
/* 41FA34 802AACA4 080AAB2D */ j .L802AACB4_7B2654
/* 41FA38 802AACA8 00000000 */ nop
.L802AACAC_7B264C:
/* 41FA3C 802AACAC 0C0AA072 */ jal func_802A81C8_7AFB68
/* 41FA40 802AACB0 00000000 */ nop
.L802AACB4_7B2654:
/* 41FA44 802AACB4 8FBF0028 */ lw $ra, 0x28($sp)
/* 41FA48 802AACB8 8FB50024 */ lw $s5, 0x24($sp)
/* 41FA4C 802AACBC 8FB40020 */ lw $s4, 0x20($sp)
/* 41FA50 802AACC0 8FB3001C */ lw $s3, 0x1C($sp)
/* 41FA54 802AACC4 8FB20018 */ lw $s2, 0x18($sp)
/* 41FA58 802AACC8 8FB10014 */ lw $s1, 0x14($sp)
/* 41FA5C 802AACCC 8FB00010 */ lw $s0, 0x10($sp)
/* 41FA60 802AACD0 03E00008 */ jr $ra
/* 41FA64 802AACD4 27BD0030 */ addiu $sp, $sp, 0x30
### DECOMPILED C INSTRUCTIONS:
void btl_state_update_select_target(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* actor;
s32 targetListLength;
s32 selectedTargetIndex;
s32 id;
s8* targetIndexList;
SelectableTarget* target;
s32 i;
if (!(gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING)) {
actor = battleStatus->playerActor;
} else {
actor = battleStatus->partnerActor;
}
targetListLength = actor->targetListLength;
selectedTargetIndex = actor->selectedTargetIndex;
actor->flags &= ~ACTOR_FLAG_8000000;
targetIndexList = actor->targetIndexList;
switch (gBattleSubState) {
case BTL_SUBSTATE_SELECT_TARGET_INIT:
D_802ACC64 = 255;
D_802ACC68 = -100;
gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN;
if (!is_ability_active(ABILITY_BERSERKER) || (gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING)) {
if (battleStatus->selectedMoveID != MOVE_NONE) {
s8 actionTip = gMoveTable[battleStatus->selectedMoveID].actionTip;
if (actionTip >= 0) {
btl_show_battle_message(BTL_MSG_ACTION_TIP_00 + actionTip, 60);
}
}
}
player_create_target_list(actor);
targetListLength = actor->targetListLength;
if (battleStatus->currentTargetListFlags & TARGET_FLAG_ENEMY) {
targetIndexList = actor->targetIndexList;
for (i = 0; i < targetListLength; i++) {
target = &actor->targetData[targetIndexList[i]];
if (get_actor_part(get_actor(target->actorID), target->partID)->flags & ACTOR_PART_FLAG_8) {
actor->selectedTargetIndex = i;
break;
}
}
}
if (battleStatus->currentTargetListFlags & TARGET_FLAG_80000000) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING)) {
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_player_menu();
} else {
btl_state_update_player_menu();
}
btl_set_state(BATTLE_STATE_PLAYER_MOVE);
} else {
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_twink_menu();
} else {
btl_state_update_partner_menu();
}
btl_set_state(BATTLE_STATE_PARTNER_MOVE);
}
return;
}
if (targetListLength == 0) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING)) {
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_player_menu();
} else {
btl_state_update_player_menu();
}
btl_set_state(BATTLE_STATE_PLAYER_MOVE);
} else {
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_twink_menu();
} else {
btl_state_update_partner_menu();
}
btl_set_state(BATTLE_STATE_PARTNER_MOVE);
}
return;
}
for (i = 0; i < targetListLength; i++) {
id = hud_element_create(&HES_HandPointDownLoop);
D_802ACC70[i] = id;
hud_element_set_render_depth(id, 0);
hud_element_set_render_pos(id, 0, -100);
}
gBattleSubState = BTL_SUBSTATE_SELECT_TARGET_CHOOSE;
break;
case BTL_SUBSTATE_SELECT_TARGET_CHOOSE:
if (D_802ACC68 < 0) {
D_802ACC68 += 20;
if (D_802ACC68 > 0) {
D_802ACC68 = 0;
}
}
if (battleStatus->currentButtonsPressed & BUTTON_B) {
sfx_play_sound(SOUND_MENU_BACK);
gBattleSubState = BTL_SUBSTATE_SELECT_TARGET_CANCEL;
break;
}
if (battleStatus->currentButtonsPressed & BUTTON_A) {
sfx_play_sound(SOUND_MENU_NEXT);
D_802ACC60 = 8;
D_802ACC6C = 4;
gBattleSubState = BTL_SUBSTATE_SELECT_TARGET_DONE;
break;
}
gBattleStatus.flags1 |= BS_FLAGS1_MENU_OPEN;
if (battleStatus->currentButtonsDown & (BUTTON_Z | BUTTON_R)) {
gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN;
break;
}
if (battleStatus->currentTargetListFlags & TARGET_FLAG_ENEMY) {
s32 oldSelectedTargetIndex = selectedTargetIndex;
if (battleStatus->currentButtonsHeld & BUTTON_STICK_LEFT) {
selectedTargetIndex--;
}
if (battleStatus->currentButtonsHeld & BUTTON_STICK_RIGHT) {
selectedTargetIndex++;
}
if (selectedTargetIndex < 0) {
selectedTargetIndex = targetListLength - 1;
}
if (selectedTargetIndex >= targetListLength) {
selectedTargetIndex = 0;
}
if (selectedTargetIndex != oldSelectedTargetIndex) {
s32 actorFlags;
target = &actor->targetData[targetIndexList[selectedTargetIndex]];
actorFlags = get_actor(target->actorID)->flags;
id = D_802ACC70[0];
if (actorFlags & ACTOR_FLAG_UPSIDE_DOWN) {
hud_element_set_script(id, &HES_HandPointLeftLoop);
} else {
hud_element_set_script(id, &HES_HandPointDownLoop);
}
sfx_play_sound(SOUND_MENU_CHANGE_SELECTION);
}
actor->selectedTargetIndex = selectedTargetIndex;
}
break;
case BTL_SUBSTATE_SELECT_TARGET_DONE:
gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN;
target = &actor->targetData[targetIndexList[actor->selectedTargetIndex]];
actor->targetActorID = target->actorID;
actor->targetPartIndex = target->partID;
for (i = 0; i < targetListLength; i++) {
hud_element_free(D_802ACC70[i]);
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING)) {
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_peach_menu();
} else {
btl_state_update_player_menu();
}
btl_set_state(BATTLE_STATE_PLAYER_MOVE);
} else {
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_twink_menu();
} else {
btl_state_update_partner_menu();
}
btl_set_state(BATTLE_STATE_PARTNER_MOVE);
}
break;
case BTL_SUBSTATE_SELECT_TARGET_CANCEL:
for (i = 0; i < targetListLength; i++) {
hud_element_free(D_802ACC70[i]);
}
gBattleStatus.flags1 |= BS_FLAGS1_10000 | BS_FLAGS1_MENU_OPEN;
actor->flags |= ACTOR_FLAG_8000000;
if (battleStatus->itemUsesLeft != 0) {
btl_set_state(BATTLE_STATE_PLAYER_MENU);
gBattleSubState = battleStatus->cancelTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_peach_menu();
} else {
btl_state_update_player_menu();
}
} else if (!(gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING)) {
btl_set_state(BATTLE_STATE_PLAYER_MENU);
gBattleSubState = battleStatus->cancelTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_peach_menu();
} else {
btl_state_update_player_menu();
}
} else {
btl_set_state(BATTLE_STATE_PARTNER_MENU);
gBattleSubState = battleStatus->cancelTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_twink_menu();
} else {
btl_state_update_partner_menu();
}
}
break;
}
}
|
### RAW ASSEMBLY INSTRUCTIONS:
glabel au_sfx_load_sound
/* 26E74 8004BA74 27BDFFC0 */ addiu $sp, $sp, -0x40
/* 26E78 8004BA78 AFB40028 */ sw $s4, 0x28($sp)
/* 26E7C 8004BA7C 0080A02D */ daddu $s4, $a0, $zero
/* 26E80 8004BA80 AFB70034 */ sw $s7, 0x34($sp)
/* 26E84 8004BA84 00A0B82D */ daddu $s7, $a1, $zero
/* 26E88 8004BA88 AFBF003C */ sw $ra, 0x3C($sp)
/* 26E8C 8004BA8C AFBE0038 */ sw $fp, 0x38($sp)
/* 26E90 8004BA90 AFB60030 */ sw $s6, 0x30($sp)
/* 26E94 8004BA94 AFB5002C */ sw $s5, 0x2C($sp)
/* 26E98 8004BA98 AFB30024 */ sw $s3, 0x24($sp)
/* 26E9C 8004BA9C AFB20020 */ sw $s2, 0x20($sp)
/* 26EA0 8004BAA0 AFB1001C */ sw $s1, 0x1C($sp)
/* 26EA4 8004BAA4 AFB00018 */ sw $s0, 0x18($sp)
/* 26EA8 8004BAA8 96E20000 */ lhu $v0, 0x0($s7)
/* 26EAC 8004BAAC 0000402D */ daddu $t0, $zero, $zero
/* 26EB0 8004BAB0 2445FFFF */ addiu $a1, $v0, -0x1
/* 26EB4 8004BAB4 304923FF */ andi $t1, $v0, 0x23FF
/* 26EB8 8004BAB8 0040182D */ daddu $v1, $v0, $zero
/* 26EBC 8004BABC 30422000 */ andi $v0, $v0, 0x2000
/* 26EC0 8004BAC0 10400020 */ beqz $v0, .L8004BB44
/* 26EC4 8004BAC4 30A400FF */ andi $a0, $a1, 0xFF
/* 26EC8 8004BAC8 30A401FF */ andi $a0, $a1, 0x1FF
/* 26ECC 8004BACC 2C820140 */ sltiu $v0, $a0, 0x140
/* 26ED0 8004BAD0 10400178 */ beqz $v0, .L8004C0B4
/* 26ED4 8004BAD4 00041880 */ sll $v1, $a0, 2
/* 26ED8 8004BAD8 8E82002C */ lw $v0, 0x2C($s4)
/* 26EDC 8004BADC 00439021 */ addu $s2, $v0, $v1
/* 26EE0 8004BAE0 96420000 */ lhu $v0, 0x0($s2)
/* 26EE4 8004BAE4 10400173 */ beqz $v0, .L8004C0B4
/* 26EE8 8004BAE8 24100007 */ addiu $s0, $zero, 0x7
/* 26EEC 8004BAEC 3124FFFF */ andi $a0, $t1, 0xFFFF
/* 26EF0 8004BAF0 24030620 */ addiu $v1, $zero, 0x620
.L8004BAF4:
/* 26EF4 8004BAF4 02833821 */ addu $a3, $s4, $v1
/* 26EF8 8004BAF8 94E20096 */ lhu $v0, 0x96($a3)
/* 26EFC 8004BAFC 1044000F */ beq $v0, $a0, .L8004BB3C
/* 26F00 8004BB00 2610FFFF */ addiu $s0, $s0, -0x1
/* 26F04 8004BB04 0601FFFB */ bgez $s0, .L8004BAF4
/* 26F08 8004BB08 2463FF54 */ addiu $v1, $v1, -0xAC
.L8004BB0C:
/* 26F0C 8004BB0C 55000038 */ bnel $t0, $zero, .L8004BBF0
/* 26F10 8004BB10 0280202D */ daddu $a0, $s4, $zero
/* 26F14 8004BB14 24100007 */ addiu $s0, $zero, 0x7
/* 26F18 8004BB18 24030620 */ addiu $v1, $zero, 0x620
.L8004BB1C:
/* 26F1C 8004BB1C 02833821 */ addu $a3, $s4, $v1
/* 26F20 8004BB20 8CE20000 */ lw $v0, 0x0($a3)
/* 26F24 8004BB24 10400010 */ beqz $v0, .L8004BB68
/* 26F28 8004BB28 2610FFFF */ addiu $s0, $s0, -0x1
/* 26F2C 8004BB2C 0601FFFB */ bgez $s0, .L8004BB1C
/* 26F30 8004BB30 2463FF54 */ addiu $v1, $v1, -0xAC
/* 26F34 8004BB34 08012EFA */ j .L8004BBE8
/* 26F38 8004BB38 00000000 */ nop
.L8004BB3C:
/* 26F3C 8004BB3C 08012EC3 */ j .L8004BB0C
/* 26F40 8004BB40 24080001 */ addiu $t0, $zero, 0x1
.L8004BB44:
/* 26F44 8004BB44 2C8200C0 */ sltiu $v0, $a0, 0xC0
/* 26F48 8004BB48 14400031 */ bnez $v0, .L8004BC10
/* 26F4C 8004BB4C 00000000 */ nop
/* 26F50 8004BB50 10C00007 */ beqz $a2, .L8004BB70
/* 26F54 8004BB54 00C0902D */ daddu $s2, $a2, $zero
/* 26F58 8004BB58 08012EE5 */ j .L8004BB94
/* 26F5C 8004BB5C 00000000 */ nop
.L8004BB60:
/* 26F60 8004BB60 08012EF0 */ j .L8004BBC0
/* 26F64 8004BB64 24080001 */ addiu $t0, $zero, 0x1
.L8004BB68:
/* 26F68 8004BB68 08012EFA */ j .L8004BBE8
/* 26F6C 8004BB6C 24080001 */ addiu $t0, $zero, 0x1
.L8004BB70:
/* 26F70 8004BB70 2522FFFF */ addiu $v0, $t1, -0x1
/* 26F74 8004BB74 00021203 */ sra $v0, $v0, 8
/* 26F78 8004BB78 24420004 */ addiu $v0, $v0, 0x4
/* 26F7C 8004BB7C 00021080 */ sll $v0, $v0, 2
/* 26F80 8004BB80 02821021 */ addu $v0, $s4, $v0
/* 26F84 8004BB84 2483FF40 */ addiu $v1, $a0, -0xC0
/* 26F88 8004BB88 8C42000C */ lw $v0, 0xC($v0)
/* 26F8C 8004BB8C 00031880 */ sll $v1, $v1, 2
/* 26F90 8004BB90 00439021 */ addu $s2, $v0, $v1
.L8004BB94:
/* 26F94 8004BB94 96420000 */ lhu $v0, 0x0($s2)
/* 26F98 8004BB98 10400146 */ beqz $v0, .L8004C0B4
/* 26F9C 8004BB9C 24100007 */ addiu $s0, $zero, 0x7
/* 26FA0 8004BBA0 3124FFFF */ andi $a0, $t1, 0xFFFF
/* 26FA4 8004BBA4 24030620 */ addiu $v1, $zero, 0x620
.L8004BBA8:
/* 26FA8 8004BBA8 02833821 */ addu $a3, $s4, $v1
/* 26FAC 8004BBAC 94E20096 */ lhu $v0, 0x96($a3)
/* 26FB0 8004BBB0 1044FFEB */ beq $v0, $a0, .L8004BB60
/* 26FB4 8004BBB4 2610FFFF */ addiu $s0, $s0, -0x1
/* 26FB8 8004BBB8 0601FFFB */ bgez $s0, .L8004BBA8
/* 26FBC 8004BBBC 2463FF54 */ addiu $v1, $v1, -0xAC
.L8004BBC0:
/* 26FC0 8004BBC0 5500000B */ bnel $t0, $zero, .L8004BBF0
/* 26FC4 8004BBC4 0280202D */ daddu $a0, $s4, $zero
/* 26FC8 8004BBC8 24100007 */ addiu $s0, $zero, 0x7
/* 26FCC 8004BBCC 24030620 */ addiu $v1, $zero, 0x620
.L8004BBD0:
/* 26FD0 8004BBD0 02833821 */ addu $a3, $s4, $v1
/* 26FD4 8004BBD4 8CE20000 */ lw $v0, 0x0($a3)
/* 26FD8 8004BBD8 1040FFE3 */ beqz $v0, .L8004BB68
/* 26FDC 8004BBDC 2610FFFF */ addiu $s0, $s0, -0x1
/* 26FE0 8004BBE0 0601FFFB */ bgez $s0, .L8004BBD0
/* 26FE4 8004BBE4 2463FF54 */ addiu $v1, $v1, -0xAC
.L8004BBE8:
/* 26FE8 8004BBE8 11000132 */ beqz $t0, .L8004C0B4
/* 26FEC 8004BBEC 0280202D */ daddu $a0, $s4, $zero
.L8004BBF0:
/* 26FF0 8004BBF0 00E0282D */ daddu $a1, $a3, $zero
/* 26FF4 8004BBF4 0240302D */ daddu $a2, $s2, $zero
/* 26FF8 8004BBF8 02E0382D */ daddu $a3, $s7, $zero
/* 26FFC 8004BBFC AFA00010 */ sw $zero, 0x10($sp)
/* 27000 8004BC00 0C013039 */ jal au_sfx_play_sound
/* 27004 8004BC04 AFA00014 */ sw $zero, 0x14($sp)
/* 27008 8004BC08 0801302D */ j .L8004C0B4
/* 2700C 8004BC0C 00000000 */ nop
.L8004BC10:
/* 27010 8004BC10 10C00005 */ beqz $a2, .L8004BC28
/* 27014 8004BC14 00C0902D */ daddu $s2, $a2, $zero
/* 27018 8004BC18 08012F10 */ j .L8004BC40
/* 2701C 8004BC1C 00000000 */ nop
.L8004BC20:
/* 27020 8004BC20 08012F28 */ j .L8004BCA0
/* 27024 8004BC24 24080001 */ addiu $t0, $zero, 0x1
.L8004BC28:
/* 27028 8004BC28 00031182 */ srl $v0, $v1, 6
/* 2702C 8004BC2C 3042000C */ andi $v0, $v0, 0xC
/* 27030 8004BC30 02821021 */ addu $v0, $s4, $v0
/* 27034 8004BC34 8C43000C */ lw $v1, 0xC($v0)
/* 27038 8004BC38 00041080 */ sll $v0, $a0, 2
/* 2703C 8004BC3C 00629021 */ addu $s2, $v1, $v0
.L8004BC40:
/* 27040 8004BC40 96420000 */ lhu $v0, 0x0($s2)
/* 27044 8004BC44 1040011B */ beqz $v0, .L8004C0B4
/* 27048 8004BC48 00000000 */ nop
/* 2704C 8004BC4C 96440002 */ lhu $a0, 0x2($s2)
/* 27050 8004BC50 30820300 */ andi $v0, $a0, 0x300
/* 27054 8004BC54 0002AA02 */ srl $s5, $v0, 8
/* 27058 8004BC58 30820060 */ andi $v0, $a0, 0x60
/* 2705C 8004BC5C 00028142 */ srl $s0, $v0, 5
/* 27060 8004BC60 30820080 */ andi $v0, $a0, 0x80
/* 27064 8004BC64 1600007F */ bnez $s0, .L8004BE64
/* 27068 8004BC68 000299C2 */ srl $s3, $v0, 7
/* 2706C 8004BC6C 96E20002 */ lhu $v0, 0x2($s7)
/* 27070 8004BC70 1040000B */ beqz $v0, .L8004BCA0
/* 27074 8004BC74 00000000 */ nop
/* 27078 8004BC78 0000802D */ daddu $s0, $zero, $zero
/* 2707C 8004BC7C 0040282D */ daddu $a1, $v0, $zero
/* 27080 8004BC80 2403016C */ addiu $v1, $zero, 0x16C
.L8004BC84:
/* 27084 8004BC84 02833821 */ addu $a3, $s4, $v1
/* 27088 8004BC88 94E20096 */ lhu $v0, 0x96($a3)
/* 2708C 8004BC8C 1045FFE4 */ beq $v0, $a1, .L8004BC20
/* 27090 8004BC90 26100001 */ addiu $s0, $s0, 0x1
/* 27094 8004BC94 2A020008 */ slti $v0, $s0, 0x8
/* 27098 8004BC98 1440FFFA */ bnez $v0, .L8004BC84
/* 2709C 8004BC9C 246300AC */ addiu $v1, $v1, 0xAC
.L8004BCA0:
/* 270A0 8004BCA0 1660001C */ bnez $s3, .L8004BD14
/* 270A4 8004BCA4 00000000 */ nop
/* 270A8 8004BCA8 55000064 */ bnel $t0, $zero, .L8004BE3C
/* 270AC 8004BCAC 0280202D */ daddu $a0, $s4, $zero
/* 270B0 8004BCB0 30900007 */ andi $s0, $a0, 0x7
/* 270B4 8004BCB4 00101040 */ sll $v0, $s0, 1
/* 270B8 8004BCB8 00501021 */ addu $v0, $v0, $s0
/* 270BC 8004BCBC 00021080 */ sll $v0, $v0, 2
/* 270C0 8004BCC0 00501023 */ subu $v0, $v0, $s0
/* 270C4 8004BCC4 00021080 */ sll $v0, $v0, 2
/* 270C8 8004BCC8 00501023 */ subu $v0, $v0, $s0
/* 270CC 8004BCCC 00021080 */ sll $v0, $v0, 2
/* 270D0 8004BCD0 2442016C */ addiu $v0, $v0, 0x16C
/* 270D4 8004BCD4 02823821 */ addu $a3, $s4, $v0
/* 270D8 8004BCD8 8CE20000 */ lw $v0, 0x0($a3)
/* 270DC 8004BCDC 10400057 */ beqz $v0, .L8004BE3C
/* 270E0 8004BCE0 0280202D */ daddu $a0, $s4, $zero
/* 270E4 8004BCE4 90E20098 */ lbu $v0, 0x98($a3)
/* 270E8 8004BCE8 02A2102B */ sltu $v0, $s5, $v0
/* 270EC 8004BCEC 10400054 */ beqz $v0, .L8004BE40
/* 270F0 8004BCF0 00E0282D */ daddu $a1, $a3, $zero
/* 270F4 8004BCF4 0801302D */ j .L8004C0B4
/* 270F8 8004BCF8 00000000 */ nop
.L8004BCFC:
/* 270FC 8004BCFC 08012F58 */ j .L8004BD60
/* 27100 8004BD00 24080001 */ addiu $t0, $zero, 0x1
.L8004BD04:
/* 27104 8004BD04 08012F6A */ j .L8004BDA8
/* 27108 8004BD08 24080001 */ addiu $t0, $zero, 0x1
.L8004BD0C:
/* 2710C 8004BD0C 08012F7D */ j .L8004BDF4
/* 27110 8004BD10 24080001 */ addiu $t0, $zero, 0x1
.L8004BD14:
/* 27114 8004BD14 55000049 */ bnel $t0, $zero, .L8004BE3C
/* 27118 8004BD18 0280202D */ daddu $a0, $s4, $zero
/* 2711C 8004BD1C 30900007 */ andi $s0, $a0, 0x7
/* 27120 8004BD20 0600000F */ bltz $s0, .L8004BD60
/* 27124 8004BD24 00101040 */ sll $v0, $s0, 1
/* 27128 8004BD28 3125FFFF */ andi $a1, $t1, 0xFFFF
/* 2712C 8004BD2C 00501021 */ addu $v0, $v0, $s0
/* 27130 8004BD30 00021080 */ sll $v0, $v0, 2
/* 27134 8004BD34 00501023 */ subu $v0, $v0, $s0
/* 27138 8004BD38 00021080 */ sll $v0, $v0, 2
/* 2713C 8004BD3C 00501023 */ subu $v0, $v0, $s0
/* 27140 8004BD40 00021080 */ sll $v0, $v0, 2
/* 27144 8004BD44 2443016C */ addiu $v1, $v0, 0x16C
.L8004BD48:
/* 27148 8004BD48 02833821 */ addu $a3, $s4, $v1
/* 2714C 8004BD4C 94E20096 */ lhu $v0, 0x96($a3)
/* 27150 8004BD50 1045FFEA */ beq $v0, $a1, .L8004BCFC
/* 27154 8004BD54 2610FFFF */ addiu $s0, $s0, -0x1
/* 27158 8004BD58 0601FFFB */ bgez $s0, .L8004BD48
/* 2715C 8004BD5C 2463FF54 */ addiu $v1, $v1, -0xAC
.L8004BD60:
/* 27160 8004BD60 55000036 */ bnel $t0, $zero, .L8004BE3C
/* 27164 8004BD64 0280202D */ daddu $a0, $s4, $zero
/* 27168 8004BD68 30900007 */ andi $s0, $a0, 0x7
/* 2716C 8004BD6C 0600000E */ bltz $s0, .L8004BDA8
/* 27170 8004BD70 00101040 */ sll $v0, $s0, 1
/* 27174 8004BD74 00501021 */ addu $v0, $v0, $s0
/* 27178 8004BD78 00021080 */ sll $v0, $v0, 2
/* 2717C 8004BD7C 00501023 */ subu $v0, $v0, $s0
/* 27180 8004BD80 00021080 */ sll $v0, $v0, 2
/* 27184 8004BD84 00501023 */ subu $v0, $v0, $s0
/* 27188 8004BD88 00021080 */ sll $v0, $v0, 2
/* 2718C 8004BD8C 2443016C */ addiu $v1, $v0, 0x16C
.L8004BD90:
/* 27190 8004BD90 02833821 */ addu $a3, $s4, $v1
/* 27194 8004BD94 8CE20000 */ lw $v0, 0x0($a3)
/* 27198 8004BD98 1040FFDA */ beqz $v0, .L8004BD04
/* 2719C 8004BD9C 2610FFFF */ addiu $s0, $s0, -0x1
/* 271A0 8004BDA0 0601FFFB */ bgez $s0, .L8004BD90
/* 271A4 8004BDA4 2463FF54 */ addiu $v1, $v1, -0xAC
.L8004BDA8:
/* 271A8 8004BDA8 55000024 */ bnel $t0, $zero, .L8004BE3C
/* 271AC 8004BDAC 0280202D */ daddu $a0, $s4, $zero
/* 271B0 8004BDB0 30900007 */ andi $s0, $a0, 0x7
/* 271B4 8004BDB4 0600000F */ bltz $s0, .L8004BDF4
/* 271B8 8004BDB8 00101040 */ sll $v0, $s0, 1
/* 271BC 8004BDBC 00501021 */ addu $v0, $v0, $s0
/* 271C0 8004BDC0 00021080 */ sll $v0, $v0, 2
/* 271C4 8004BDC4 00501023 */ subu $v0, $v0, $s0
/* 271C8 8004BDC8 00021080 */ sll $v0, $v0, 2
/* 271CC 8004BDCC 00501023 */ subu $v0, $v0, $s0
/* 271D0 8004BDD0 00021080 */ sll $v0, $v0, 2
/* 271D4 8004BDD4 2443016C */ addiu $v1, $v0, 0x16C
.L8004BDD8:
/* 271D8 8004BDD8 02833821 */ addu $a3, $s4, $v1
/* 271DC 8004BDDC 90E20098 */ lbu $v0, 0x98($a3)
/* 271E0 8004BDE0 0055102B */ sltu $v0, $v0, $s5
/* 271E4 8004BDE4 1440FFC9 */ bnez $v0, .L8004BD0C
/* 271E8 8004BDE8 2610FFFF */ addiu $s0, $s0, -0x1
/* 271EC 8004BDEC 0601FFFA */ bgez $s0, .L8004BDD8
/* 271F0 8004BDF0 2463FF54 */ addiu $v1, $v1, -0xAC
.L8004BDF4:
/* 271F4 8004BDF4 55000011 */ bnel $t0, $zero, .L8004BE3C
/* 271F8 8004BDF8 0280202D */ daddu $a0, $s4, $zero
/* 271FC 8004BDFC 30900007 */ andi $s0, $a0, 0x7
/* 27200 8004BE00 00101040 */ sll $v0, $s0, 1
/* 27204 8004BE04 00501021 */ addu $v0, $v0, $s0
/* 27208 8004BE08 00021080 */ sll $v0, $v0, 2
/* 2720C 8004BE0C 00501023 */ subu $v0, $v0, $s0
/* 27210 8004BE10 00021080 */ sll $v0, $v0, 2
/* 27214 8004BE14 00501023 */ subu $v0, $v0, $s0
/* 27218 8004BE18 00021080 */ sll $v0, $v0, 2
/* 2721C 8004BE1C 2442016C */ addiu $v0, $v0, 0x16C
/* 27220 8004BE20 02823821 */ addu $a3, $s4, $v0
/* 27224 8004BE24 90E20098 */ lbu $v0, 0x98($a3)
/* 27228 8004BE28 02A2102B */ sltu $v0, $s5, $v0
/* 2722C 8004BE2C 50400001 */ beql $v0, $zero, .L8004BE34
/* 27230 8004BE30 24080001 */ addiu $t0, $zero, 0x1
.L8004BE34:
/* 27234 8004BE34 1100009F */ beqz $t0, .L8004C0B4
/* 27238 8004BE38 0280202D */ daddu $a0, $s4, $zero
.L8004BE3C:
/* 2723C 8004BE3C 00E0282D */ daddu $a1, $a3, $zero
.L8004BE40:
/* 27240 8004BE40 96420000 */ lhu $v0, 0x0($s2)
/* 27244 8004BE44 8C860008 */ lw $a2, 0x8($a0)
/* 27248 8004BE48 02E0382D */ daddu $a3, $s7, $zero
/* 2724C 8004BE4C AFB50010 */ sw $s5, 0x10($sp)
/* 27250 8004BE50 AFA00014 */ sw $zero, 0x14($sp)
/* 27254 8004BE54 0C013039 */ jal au_sfx_play_sound
/* 27258 8004BE58 00463021 */ addu $a2, $v0, $a2
/* 2725C 8004BE5C 0801302D */ j .L8004C0B4
/* 27260 8004BE60 00000000 */ nop
.L8004BE64:
/* 27264 8004BE64 96420000 */ lhu $v0, 0x0($s2)
/* 27268 8004BE68 8E830008 */ lw $v1, 0x8($s4)
/* 2726C 8004BE6C 00439021 */ addu $s2, $v0, $v1
/* 27270 8004BE70 30821800 */ andi $v0, $a0, 0x1800
/* 27274 8004BE74 0002B2C2 */ srl $s6, $v0, 11
/* 27278 8004BE78 12C00005 */ beqz $s6, .L8004BE90
/* 2727C 8004BE7C 0280202D */ daddu $a0, $s4, $zero
/* 27280 8004BE80 0C0130C0 */ jal au_sfx_stop_by_exlusive_id
/* 27284 8004BE84 02C0282D */ daddu $a1, $s6, $zero
/* 27288 8004BE88 08012FA8 */ j .L8004BEA0
/* 2728C 8004BE8C 2603FFFF */ addiu $v1, $s0, -0x1
.L8004BE90:
/* 27290 8004BE90 96E50000 */ lhu $a1, 0x0($s7)
/* 27294 8004BE94 0C0130A9 */ jal au_sfx_stop_by_id
/* 27298 8004BE98 0280202D */ daddu $a0, $s4, $zero
/* 2729C 8004BE9C 2603FFFF */ addiu $v1, $s0, -0x1
.L8004BEA0:
/* 272A0 8004BEA0 24020002 */ addiu $v0, $zero, 0x2
/* 272A4 8004BEA4 1260005D */ beqz $s3, .L8004C01C
/* 272A8 8004BEA8 00628804 */ sllv $s1, $v0, $v1
/* 272AC 8004BEAC 24100007 */ addiu $s0, $zero, 0x7
/* 272B0 8004BEB0 3C1E8008 */ lui $fp, %hi(D_80078464)
/* 272B4 8004BEB4 27DE8464 */ addiu $fp, $fp, %lo(D_80078464)
/* 272B8 8004BEB8 24130620 */ addiu $s3, $zero, 0x620
.L8004BEBC:
/* 272BC 8004BEBC 96420000 */ lhu $v0, 0x0($s2)
/* 272C0 8004BEC0 10400010 */ beqz $v0, .L8004BF04
/* 272C4 8004BEC4 02933821 */ addu $a3, $s4, $s3
/* 272C8 8004BEC8 8CE20000 */ lw $v0, 0x0($a3)
/* 272CC 8004BECC 545E0011 */ bnel $v0, $fp, .L8004BF14
/* 272D0 8004BED0 2610FFFF */ addiu $s0, $s0, -0x1
/* 272D4 8004BED4 0280202D */ daddu $a0, $s4, $zero
/* 272D8 8004BED8 00E0282D */ daddu $a1, $a3, $zero
/* 272DC 8004BEDC 02E0382D */ daddu $a3, $s7, $zero
/* 272E0 8004BEE0 96420000 */ lhu $v0, 0x0($s2)
/* 272E4 8004BEE4 8E860008 */ lw $a2, 0x8($s4)
/* 272E8 8004BEE8 2631FFFF */ addiu $s1, $s1, -0x1
/* 272EC 8004BEEC AFB50010 */ sw $s5, 0x10($sp)
/* 272F0 8004BEF0 AFB60014 */ sw $s6, 0x14($sp)
/* 272F4 8004BEF4 0C013039 */ jal au_sfx_play_sound
/* 272F8 8004BEF8 00463021 */ addu $a2, $v0, $a2
/* 272FC 8004BEFC 08012FC2 */ j .L8004BF08
/* 27300 8004BF00 00000000 */ nop
.L8004BF04:
/* 27304 8004BF04 2631FFFF */ addiu $s1, $s1, -0x1
.L8004BF08:
/* 27308 8004BF08 1A200004 */ blez $s1, .L8004BF1C
/* 2730C 8004BF0C 2610FFFF */ addiu $s0, $s0, -0x1
/* 27310 8004BF10 26520004 */ addiu $s2, $s2, 0x4
.L8004BF14:
/* 27314 8004BF14 0601FFE9 */ bgez $s0, .L8004BEBC
/* 27318 8004BF18 2673FF54 */ addiu $s3, $s3, -0xAC
.L8004BF1C:
/* 2731C 8004BF1C 12200065 */ beqz $s1, .L8004C0B4
/* 27320 8004BF20 24100007 */ addiu $s0, $zero, 0x7
/* 27324 8004BF24 24130620 */ addiu $s3, $zero, 0x620
.L8004BF28:
/* 27328 8004BF28 96420000 */ lhu $v0, 0x0($s2)
/* 2732C 8004BF2C 10400013 */ beqz $v0, .L8004BF7C
/* 27330 8004BF30 02933821 */ addu $a3, $s4, $s3
/* 27334 8004BF34 8CE20000 */ lw $v0, 0x0($a3)
/* 27338 8004BF38 5440000E */ bnel $v0, $zero, .L8004BF74
/* 2733C 8004BF3C 2673FF54 */ addiu $s3, $s3, -0xAC
/* 27340 8004BF40 0280202D */ daddu $a0, $s4, $zero
/* 27344 8004BF44 00E0282D */ daddu $a1, $a3, $zero
/* 27348 8004BF48 02E0382D */ daddu $a3, $s7, $zero
/* 2734C 8004BF4C 96420000 */ lhu $v0, 0x0($s2)
/* 27350 8004BF50 8E860008 */ lw $a2, 0x8($s4)
/* 27354 8004BF54 2631FFFF */ addiu $s1, $s1, -0x1
/* 27358 8004BF58 AFB50010 */ sw $s5, 0x10($sp)
/* 2735C 8004BF5C AFB60014 */ sw $s6, 0x14($sp)
/* 27360 8004BF60 0C013039 */ jal au_sfx_play_sound
/* 27364 8004BF64 00463021 */ addu $a2, $v0, $a2
/* 27368 8004BF68 1A20000A */ blez $s1, .L8004BF94
/* 2736C 8004BF6C 2673FF54 */ addiu $s3, $s3, -0xAC
/* 27370 8004BF70 26520004 */ addiu $s2, $s2, 0x4
.L8004BF74:
/* 27374 8004BF74 08012FE3 */ j .L8004BF8C
/* 27378 8004BF78 2610FFFF */ addiu $s0, $s0, -0x1
.L8004BF7C:
/* 2737C 8004BF7C 2631FFFF */ addiu $s1, $s1, -0x1
/* 27380 8004BF80 1A200004 */ blez $s1, .L8004BF94
/* 27384 8004BF84 00000000 */ nop
/* 27388 8004BF88 26520004 */ addiu $s2, $s2, 0x4
.L8004BF8C:
/* 2738C 8004BF8C 0601FFE6 */ bgez $s0, .L8004BF28
/* 27390 8004BF90 00000000 */ nop
.L8004BF94:
/* 27394 8004BF94 12200047 */ beqz $s1, .L8004C0B4
/* 27398 8004BF98 24100007 */ addiu $s0, $zero, 0x7
/* 2739C 8004BF9C 24130620 */ addiu $s3, $zero, 0x620
.L8004BFA0:
/* 273A0 8004BFA0 96420000 */ lhu $v0, 0x0($s2)
/* 273A4 8004BFA4 10400015 */ beqz $v0, .L8004BFFC
/* 273A8 8004BFA8 02933821 */ addu $a3, $s4, $s3
/* 273AC 8004BFAC 90E20099 */ lbu $v0, 0x99($a3)
/* 273B0 8004BFB0 0056102B */ sltu $v0, $v0, $s6
/* 273B4 8004BFB4 50400015 */ beql $v0, $zero, .L8004C00C
/* 273B8 8004BFB8 2610FFFF */ addiu $s0, $s0, -0x1
/* 273BC 8004BFBC 90E20098 */ lbu $v0, 0x98($a3)
/* 273C0 8004BFC0 02A2102B */ sltu $v0, $s5, $v0
/* 273C4 8004BFC4 54400011 */ bnel $v0, $zero, .L8004C00C
/* 273C8 8004BFC8 2610FFFF */ addiu $s0, $s0, -0x1
/* 273CC 8004BFCC 0280202D */ daddu $a0, $s4, $zero
/* 273D0 8004BFD0 00E0282D */ daddu $a1, $a3, $zero
/* 273D4 8004BFD4 02E0382D */ daddu $a3, $s7, $zero
/* 273D8 8004BFD8 96420000 */ lhu $v0, 0x0($s2)
/* 273DC 8004BFDC 8E860008 */ lw $a2, 0x8($s4)
/* 273E0 8004BFE0 2631FFFF */ addiu $s1, $s1, -0x1
/* 273E4 8004BFE4 AFB50010 */ sw $s5, 0x10($sp)
/* 273E8 8004BFE8 AFB60014 */ sw $s6, 0x14($sp)
/* 273EC 8004BFEC 0C013039 */ jal au_sfx_play_sound
/* 273F0 8004BFF0 00463021 */ addu $a2, $v0, $a2
/* 273F4 8004BFF4 08013000 */ j .L8004C000
/* 273F8 8004BFF8 00000000 */ nop
.L8004BFFC:
/* 273FC 8004BFFC 2631FFFF */ addiu $s1, $s1, -0x1
.L8004C000:
/* 27400 8004C000 1A20002C */ blez $s1, .L8004C0B4
/* 27404 8004C004 26520004 */ addiu $s2, $s2, 0x4
/* 27408 8004C008 2610FFFF */ addiu $s0, $s0, -0x1
.L8004C00C:
/* 2740C 8004C00C 0601FFE4 */ bgez $s0, .L8004BFA0
/* 27410 8004C010 2673FF54 */ addiu $s3, $s3, -0xAC
/* 27414 8004C014 0801302D */ j .L8004C0B4
/* 27418 8004C018 00000000 */ nop
.L8004C01C:
/* 2741C 8004C01C 1A200025 */ blez $s1, .L8004C0B4
/* 27420 8004C020 0000982D */ daddu $s3, $zero, $zero
.L8004C024:
/* 27424 8004C024 96420000 */ lhu $v0, 0x0($s2)
/* 27428 8004C028 5040001F */ beql $v0, $zero, .L8004C0A8
/* 2742C 8004C02C 26730001 */ addiu $s3, $s3, 0x1
/* 27430 8004C030 96440002 */ lhu $a0, 0x2($s2)
/* 27434 8004C034 30900007 */ andi $s0, $a0, 0x7
/* 27438 8004C038 00101040 */ sll $v0, $s0, 1
/* 2743C 8004C03C 00501021 */ addu $v0, $v0, $s0
/* 27440 8004C040 00021080 */ sll $v0, $v0, 2
/* 27444 8004C044 00501023 */ subu $v0, $v0, $s0
/* 27448 8004C048 00021080 */ sll $v0, $v0, 2
/* 2744C 8004C04C 00501023 */ subu $v0, $v0, $s0
/* 27450 8004C050 00021080 */ sll $v0, $v0, 2
/* 27454 8004C054 2442016C */ addiu $v0, $v0, 0x16C
/* 27458 8004C058 02823821 */ addu $a3, $s4, $v0
/* 2745C 8004C05C 30820300 */ andi $v0, $a0, 0x300
/* 27460 8004C060 8CE30000 */ lw $v1, 0x0($a3)
/* 27464 8004C064 10600005 */ beqz $v1, .L8004C07C
/* 27468 8004C068 0002AA02 */ srl $s5, $v0, 8
/* 2746C 8004C06C 90E20098 */ lbu $v0, 0x98($a3)
/* 27470 8004C070 02A2102B */ sltu $v0, $s5, $v0
/* 27474 8004C074 5440000B */ bnel $v0, $zero, .L8004C0A4
/* 27478 8004C078 26520004 */ addiu $s2, $s2, 0x4
.L8004C07C:
/* 2747C 8004C07C 0280202D */ daddu $a0, $s4, $zero
/* 27480 8004C080 00E0282D */ daddu $a1, $a3, $zero
/* 27484 8004C084 96420000 */ lhu $v0, 0x0($s2)
/* 27488 8004C088 8E860008 */ lw $a2, 0x8($s4)
/* 2748C 8004C08C 02E0382D */ daddu $a3, $s7, $zero
/* 27490 8004C090 AFB50010 */ sw $s5, 0x10($sp)
/* 27494 8004C094 AFB60014 */ sw $s6, 0x14($sp)
/* 27498 8004C098 0C013039 */ jal au_sfx_play_sound
/* 2749C 8004C09C 00463021 */ addu $a2, $v0, $a2
/* 274A0 8004C0A0 26520004 */ addiu $s2, $s2, 0x4
.L8004C0A4:
/* 274A4 8004C0A4 26730001 */ addiu $s3, $s3, 0x1
.L8004C0A8:
/* 274A8 8004C0A8 0271102A */ slt $v0, $s3, $s1
/* 274AC 8004C0AC 1440FFDD */ bnez $v0, .L8004C024
/* 274B0 8004C0B0 00000000 */ nop
.L8004C0B4:
/* 274B4 8004C0B4 8FBF003C */ lw $ra, 0x3C($sp)
/* 274B8 8004C0B8 8FBE0038 */ lw $fp, 0x38($sp)
/* 274BC 8004C0BC 8FB70034 */ lw $s7, 0x34($sp)
/* 274C0 8004C0C0 8FB60030 */ lw $s6, 0x30($sp)
/* 274C4 8004C0C4 8FB5002C */ lw $s5, 0x2C($sp)
/* 274C8 8004C0C8 8FB40028 */ lw $s4, 0x28($sp)
/* 274CC 8004C0CC 8FB30024 */ lw $s3, 0x24($sp)
/* 274D0 8004C0D0 8FB20020 */ lw $s2, 0x20($sp)
/* 274D4 8004C0D4 8FB1001C */ lw $s1, 0x1C($sp)
/* 274D8 8004C0D8 8FB00018 */ lw $s0, 0x18($sp)
/* 274DC 8004C0DC 03E00008 */ jr $ra
/* 274E0 8004C0E0 27BD0040 */ addiu $sp, $sp, 0x40
### DECOMPILED C INSTRUCTIONS:
void au_sfx_load_sound(SoundManager* manager, SoundSFXEntry* entry, SoundManagerCustomCmdList* customSEF) {
SoundPlayer* player;
s32 playerIndex;
u16* cmdList;
s32 trackCount;
s32 cond = FALSE;
u32 exclusiveID;
s32 sectionIndex;
u16 soundInfo;
u32 priority, polyphonyMode, useSpecificPlayerMode;
s32 v1;
s32* normalSounds;
#define NEXT_CMD trackCount--; if (trackCount <= 0 ) { break; } cmdList += 2;
u32 soundIndex = (entry->soundID - 1) & 0xFF;
u16 soundIDLower = entry->soundID & SOUND_ID_LOWER;
u16 soundID = entry->soundID;
if (soundID & 0x2000) {
// sound from extra section
soundIndex = (entry->soundID - 1) & 0x1FF;
if (soundIndex < 0x140) {
cmdList = (u16*)&manager->extraSounds[soundIndex];
if (*cmdList != 0) {
// check if any player is playing this sound
for (playerIndex = 7; playerIndex >= 0; playerIndex--) {
player = &manager->players[playerIndex];
if (player->currentSoundID == soundIDLower) {
cond = TRUE;
break;
}
}
if (!cond) {
//find free player
for (playerIndex = 7; playerIndex >= 0; playerIndex--) {
player = &manager->players[playerIndex];
if (player->sefDataReadPos == NULL) {
cond = TRUE;
break;
}
}
}
if (cond) {
au_sfx_play_sound(manager, player, (s8*)cmdList, entry, 0, 0);
}
}
}
} else {
if (soundIndex >= 0xC0) {
if (customSEF != NULL) {
cmdList = (u16*)customSEF;
} else {
sectionIndex = ((soundIDLower - 1) >> 8) + 4;
normalSounds = manager->normalSounds[sectionIndex];
v1 = soundIndex - 0xC0;
cmdList = (u16*)&manager->normalSounds[sectionIndex][v1];
}
if (*cmdList != 0) {
// check if any player is playing this sound
for (playerIndex = 7; playerIndex >= 0; playerIndex--) {
player = &manager->players[playerIndex];
if (player->currentSoundID == soundIDLower) {
cond = TRUE;
break;
}
}
if (!cond) {
//find free player
for (playerIndex = 7; playerIndex >= 0; playerIndex--) {
player = &manager->players[playerIndex];
if (player->sefDataReadPos == NULL) {
cond = TRUE;
break;
}
}
}
if (cond) {
au_sfx_play_sound(manager, player, (u8*)cmdList, entry, 0, 0);
}
}
} else {
if (customSEF != NULL) {
cmdList = (u16*)customSEF;
} else {
sectionIndex = ((soundID) >> 8) & 3;
cmdList = (u16*)&manager->normalSounds[sectionIndex][soundIndex];
}
if (*cmdList != 0) {
soundInfo = cmdList[1];
priority = (soundInfo & 0x300) >> 8; // bits 8, 9
polyphonyMode = (soundInfo & 0x60) >> 5; // bits 5, 6,
useSpecificPlayerMode = soundInfo;
useSpecificPlayerMode = (useSpecificPlayerMode & 0x80) >> 7; // bit 7
if (polyphonyMode == 0) {
if (entry->upperSoundID != 0) {
for (playerIndex = 0; playerIndex < 8; playerIndex++) {
player = &manager->players[playerIndex];
if (player->currentSoundID == entry->upperSoundID) {
cond = TRUE;
break;
}
}
}
if (useSpecificPlayerMode == 0) {
if (!cond) {
playerIndex = soundInfo & 0x7;
player = &manager->players[playerIndex];
if (player->sefDataReadPos == NULL || priority >= player->priority) {
au_sfx_play_sound(manager, player, AU_FILE_RELATIVE(manager->sefData, *cmdList), entry, priority, 0);
}
return;
}
}
if (!cond) {
// lower 4 bits of soundInfo: max playerIndex
// check if any player is playing this sound
for (playerIndex = soundInfo & 0x7; playerIndex >= 0; playerIndex--) {
player = &manager->players[playerIndex];
if (player->currentSoundID == soundIDLower) {
cond = TRUE;
break;
}
}
}
if (!cond) {
// find free player
for (playerIndex = soundInfo & 0x7; playerIndex >= 0; playerIndex--) {
player = &manager->players[playerIndex];
if (player->sefDataReadPos == NULL) {
cond = TRUE;
break;
}
}
}
if (!cond) {
// if there is no free player try stealing one with lower priority
for (playerIndex = soundInfo & 0x7; playerIndex >= 0; playerIndex--) {
player = &manager->players[playerIndex];
if (player->priority < priority) {
cond = TRUE;
break;
}
}
}
if (!cond) {
playerIndex = soundInfo & 0x7;
player = &manager->players[playerIndex];
if (player->priority <= priority) {
cond = TRUE;
}
}
if (cond) {
au_sfx_play_sound(manager, player, AU_FILE_RELATIVE(manager->sefData, *cmdList), entry, priority, 0);
}
} else {
cmdList = AU_FILE_RELATIVE(manager->sefData, *cmdList);
exclusiveID = (soundInfo & 0x1800) >> 11; // bits 11, 12
if (exclusiveID != 0) {
au_sfx_stop_by_exlusive_id(manager, exclusiveID);
} else {
au_sfx_stop_by_id(manager, entry->soundID);
}
trackCount = 2 << (polyphonyMode - 1); // 2 or 4 or 8
if (useSpecificPlayerMode != 0) {
for (playerIndex = 7; playerIndex >= 0; playerIndex--) {
if (*cmdList != 0) {
// first check the players that were stopped just now
player = &manager->players[playerIndex];
if (player->sefDataReadPos == BlankSEFData) {
au_sfx_play_sound(manager, player, AU_FILE_RELATIVE(manager->sefData, *cmdList), entry, priority, exclusiveID);
NEXT_CMD;
}
} else {
NEXT_CMD;
}
}
if (trackCount != 0) {
for (playerIndex = 7; playerIndex >= 0;){
if (*cmdList != 0) {
// then check any free players
player = &manager->players[playerIndex];
if (player->sefDataReadPos == NULL) {
au_sfx_play_sound(manager, player, AU_FILE_RELATIVE(manager->sefData, *cmdList), entry, priority, exclusiveID);
NEXT_CMD;
}
playerIndex--;
} else {
NEXT_CMD;
}
}
}
if (trackCount != 0) {
for (playerIndex = 7; playerIndex >= 0; playerIndex--) {
if (*cmdList != 0) {
// then try to steal
player = &manager->players[playerIndex];
if (exclusiveID > player->exclusiveID && priority >= player->priority) {
au_sfx_play_sound(manager, player, AU_FILE_RELATIVE(manager->sefData, *cmdList), entry, priority, exclusiveID);
NEXT_CMD;
}
} else {
NEXT_CMD;
}
}
}
} else {
s32 i;
for (i = 0; i < trackCount; i++) {
if (*cmdList != 0) {
soundInfo = cmdList[1];
playerIndex = soundInfo & 7;
player = &manager->players[playerIndex];
priority = (soundInfo & 0x300) >> 8; // bits 8, 9
if (player->sefDataReadPos == NULL || priority >= player->priority) {
au_sfx_play_sound(manager, player, AU_FILE_RELATIVE(manager->sefData, *cmdList), entry, priority, exclusiveID);
}
cmdList += 2;
}
}
}
}
}
}
}
#undef NEXT_CMD
}
|